Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
f7129a2d
Commit
f7129a2d
authored
Nov 04, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
32998eb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
19 deletions
+25
-19
classreviewshare.js
src/pages/papersquare/classreviewshare.js
+19
-16
classreviewshare.wxml
src/pages/papersquare/classreviewshare.wxml
+2
-2
classreviewshare.wxss
src/pages/papersquare/classreviewshare.wxss
+4
-1
No files found.
src/pages/papersquare/classreviewshare.js
View file @
f7129a2d
...
...
@@ -78,7 +78,7 @@ Page({
],
})
this
.
reviewDetailGet
();
this
.
initPost
(
`s=
${
sid
}
&c=
${
id
}
&r=
${
rid
}
&t=
${
type
}
`
,
'src/pages/
papersquare/classreviewshare
'
)
this
.
initPost
(
`s=
${
sid
}
&c=
${
id
}
&r=
${
rid
}
&t=
${
type
}
`
,
'src/pages/
clockdetail/newindex
'
)
},
onShow
:
function
()
{
},
...
...
@@ -167,7 +167,6 @@ Page({
hasReviewImg
:
JSON
.
parse
(
data
.
content
).
img
.
filter
(
item
=>
item
.
type
==
'image'
),
})
let
that
=
this
;
console
.
log
(
'音频'
,
this
.
data
.
hasReviewAudio
)
if
(
this
.
data
.
hasReviewImg
.
length
>
0
){
this
.
setData
({
graph
:
{
...
...
@@ -210,7 +209,7 @@ Page({
const
{
data
,
code
}
=
res
;
if
(
code
==
200
&&
data
){
this
.
setData
({
userInfo
:
data
.
student
,
userInfo
:
data
.
student
.
formal_school_student
,
})
this
.
generateCustomerQrcode
()
}
...
...
@@ -219,19 +218,23 @@ Page({
})
},
saveAndGenerate
(){
let
ReviewImgLen
=
this
.
data
.
hasReviewImg
.
length
;
if
(
ReviewImgLen
>
0
){
CanvasDrag
.
export
().
then
((
filePath
)
=>
{
console
.
log
(
filePath
);
this
.
data
.
graphAfter
=
filePath
;
this
.
generatePoster
()
}).
catch
((
e
)
=>
{
if
(
this
.
data
.
selectCardLong
){
wx
.
previewImage
({
urls
:[
imagify
(
this
.
data
.
imgSrc
)]
})
}
else
{
this
.
generatePoster
()
let
ReviewImgLen
=
this
.
data
.
hasReviewImg
.
length
;
if
(
ReviewImgLen
>
0
){
CanvasDrag
.
export
().
then
((
filePath
)
=>
{
this
.
data
.
graphAfter
=
filePath
;
this
.
generatePoster
()
}).
catch
((
e
)
=>
{
})
}
else
{
this
.
generatePoster
()
}
}
},
generateCustomerQrcode
()
{
let
scene
=
`s=
${
this
.
data
.
sid
}
&c=
${
this
.
data
.
id
}
&r=
${
this
.
data
.
rid
}
&t=
${
this
.
data
.
type
}
`
;
...
...
@@ -271,7 +274,7 @@ Page({
views
:
[
{
type
:
'image'
,
url
:
this
.
data
.
type
==
1
?
`
${
this
.
data
.
imageRoot
}
2b/common/class-student.png?
${
this
.
data
.
imageVersion
}
`
:
(
this
.
data
.
userInfo
.
avatar
?
imagify
(
this
.
data
.
userInfo
.
avatar
,
'image/resize,w_320/format,jpg/quality,q_50'
):
`
${
this
.
data
.
imageRoot
}
}
common/empty/avatar_user.png?
${
this
.
data
.
imageVersion
}
`
)
,
url
:
this
.
data
.
type
==
1
?
`
${
this
.
data
.
imageRoot
}
2b/common/class-student.png?
${
this
.
data
.
imageVersion
}
`
:
(
this
.
data
.
userInfo
.
avatar
?
imagify
(
this
.
data
.
userInfo
.
avatar
,
'image/resize,w_320/format,jpg/quality,q_50'
):
`
${
this
.
data
.
imageRoot
}
common/empty/avatar_user.png?
${
this
.
data
.
imageVersion
}
`
)
,
top
:
20
,
left
:
329
,
width
:
93
,
...
...
@@ -295,7 +298,7 @@ Page({
},
{
type
:
'text'
,
content
:
this
.
data
.
type
==
1
?
this
.
data
.
className
:
this
.
data
.
userInfo
.
n
ickn
ame
,
content
:
this
.
data
.
type
==
1
?
this
.
data
.
className
:
this
.
data
.
userInfo
.
name
,
fontSize
:
28
,
color
:
'#000000'
,
textAlign
:
'center'
,
...
...
@@ -384,7 +387,7 @@ Page({
views
:
[
{
type
:
'image'
,
url
:
this
.
data
.
type
==
1
?
`
${
this
.
data
.
imageRoot
}
2b/common/class-student.png?
${
this
.
data
.
imageVersion
}
`
:
(
this
.
data
.
userInfo
.
avatar
?
imagify
(
this
.
data
.
userInfo
.
avatar
,
'image/resize,w_320/format,jpg/quality,q_50'
):
`
${
this
.
data
.
imageRoot
}
}
common/empty/avatar_user.png?
${
this
.
data
.
imageVersion
}
`
)
,
url
:
this
.
data
.
type
==
1
?
`
${
this
.
data
.
imageRoot
}
2b/common/class-student.png?
${
this
.
data
.
imageVersion
}
`
:
(
this
.
data
.
userInfo
.
avatar
?
imagify
(
this
.
data
.
userInfo
.
avatar
,
'image/resize,w_320/format,jpg/quality,q_50'
):
`
${
this
.
data
.
imageRoot
}
common/empty/avatar_user.png?
${
this
.
data
.
imageVersion
}
`
)
,
top
:
20
,
left
:
329
,
width
:
93
,
...
...
@@ -400,7 +403,7 @@ Page({
},
{
type
:
'text'
,
content
:
this
.
data
.
type
==
1
?
this
.
data
.
className
:
this
.
data
.
userInfo
.
n
ickn
ame
,
content
:
this
.
data
.
type
==
1
?
this
.
data
.
className
:
this
.
data
.
userInfo
.
name
,
fontSize
:
28
,
color
:
'#000000'
,
textAlign
:
'center'
,
...
...
src/pages/papersquare/classreviewshare.wxml
View file @
f7129a2d
...
...
@@ -7,7 +7,7 @@
<image class="avatar" src="{{imageRoot}}2b/common/class-student.png?{{imageVersion}}" wx:if="{{type==1}}"></image>
<image class="avatar" src="{{filter.imagify(userInfo.avatar, 'image/resize,w_320/format,jpg/quality,q_50')}}" wx:elif="{{userInfo.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="nickname">{{type==1? className: userInfo.n
ickn
ame}}</view>
<view class="nickname">{{type==1? className: userInfo.name}}</view>
<view class="imgbox" wx:if="{{hasReviewImg.length>0}}">
<canvas-drag id="canvas-drag" graph="{{graph2}}" width="520" height="440" enableUndo="{{true}}"></canvas-drag>
<cover-image class="icon-angle icon-angle-lt" src="{{imageRoot}}2b/classreviewshare/icon_angle_lr.png?{{imageVersion}}"></cover-image>
...
...
@@ -22,7 +22,7 @@
<button form-type="submit" class="createidbutton">生成form</button>
</form>
</view>
<view class="{{!selectCardLong?'card-hide':''}}">
长图
<view class="{{!selectCardLong?'card-hide':''}}">
<image class="post-img" src="{{filter.imagify(imgSrc, 'image/resize,w_375/format,jpg')}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
</view>
</view>
...
...
src/pages/papersquare/classreviewshare.wxss
View file @
f7129a2d
...
...
@@ -21,6 +21,9 @@ page{
overflow-y: auto;
align-items: center;
}
.swiperwrap>view{
display: flex;
}
.card {
position: relative;
width: 647rpx;
...
...
@@ -31,7 +34,7 @@ page{
width: 647rpx;
height: 522rpx;
}
.card-hide{
.
swiperwrap>view.
card-hide{
display: none;
}
.cardbg {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment