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
052bf502
Commit
052bf502
authored
Nov 12, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'class_lvtz' of git.server:wangxuelai/wechatapp.shangjiadao.com into sj-dev-dev
parents
5267621f
13d63a3c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1121 additions
and
491 deletions
+1121
-491
reviewdetail.js
business/pages/classservice/reviewdetail.js
+31
-10
reviewdetail.wxml
business/pages/classservice/reviewdetail.wxml
+11
-0
reviewdetail.wxss
business/pages/classservice/reviewdetail.wxss
+2
-0
info.wxml
business/pages/organizationalmgt/info.wxml
+32
-32
activityconfig.js
constants/activityconfig.js
+14
-0
constants.js
constants/constants.js
+14
-14
classservice.js
service/business/classservice.js
+10
-0
papersquare.js
service/customer/papersquare.js
+1
-1
index.js
src/components/clockitemv2/index.js
+3
-0
index.wxml
src/components/clockitemv2/index.wxml
+62
-62
index.js
src/pages/calendarthemeindex/index.js
+145
-2
index.js
src/pages/morethemeindex/index.js
+310
-167
classreviewshare.js
src/pages/papersquare/classreviewshare.js
+24
-8
reviewdetail.js
src/pages/papersquare/reviewdetail.js
+30
-8
reviewdetail.wxml
src/pages/papersquare/reviewdetail.wxml
+11
-0
reviewdetail.wxss
src/pages/papersquare/reviewdetail.wxss
+91
-0
index.js
src/pages/themeindex/index.js
+330
-187
No files found.
business/pages/classservice/reviewdetail.js
View file @
052bf502
...
...
@@ -8,7 +8,7 @@ import {
LocalStorage
}
from
'../../../utilities/index.js'
;
import
{
classroomdetailGet
,
classroomdetailGet
2
,
readreviewcountGet
,
classroomlikesGet
,
classroomcommentsGet
,
...
...
@@ -67,9 +67,11 @@ Page({
optDialog
:
false
,
//操作(置顶 修改 删除)
modalDeleteReview
:
false
,
//删除确认
modalReviewHadDel
:
false
,
//被删除弹框
like_status
:
false
,
likeSubmitting
:
false
,
showRefresh
:
false
,
errTip
:
'点评故事已被删除'
},
/**
...
...
@@ -163,11 +165,17 @@ Page({
}
},
ClassroomDetailGet
(){
classroomdetailGet
({
classroomdetailGet
2
({
id
:
this
.
data
.
rid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
){
if
(
code
==
40018
){
this
.
setData
({
modalReviewHadDel
:
true
,
errTip
:
'点评故事已被删除'
})
return
}
else
if
(
code
==
200
){
try
{
data
.
content
=
data
.
content
?
JSON
.
parse
(
data
.
content
)
:
''
;
data
.
works
=
data
.
works
?
JSON
.
parse
(
data
.
works
)
:
''
;
...
...
@@ -178,11 +186,18 @@ Page({
data
.
read_remind
=
Number
(
data
.
read_remind
);
data
.
unread_remind
=
Number
(
data
.
unread_remind
);
this
.
setData
({
reviewDetail
:
data
reviewDetail
:
data
,
like_status
:
data
.
like_status
})
if
(
this
.
data
.
type
==
2
){
this
.
subjectReviewTemplate
(
data
.
content
.
templates
);
}
}
else
{
this
.
setData
({
modalReviewHadDel
:
true
,
errTip
:
msg
})
return
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
...
...
@@ -241,8 +256,7 @@ Page({
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
setData
({
likesList
:
data
.
list
[
Number
(
this
.
data
.
rid
)].
list
||
[],
like_status
:
data
.
list
[
Number
(
this
.
data
.
rid
)].
list
.
find
(
ele
=>
ele
.
like_user_id
==
this
.
data
.
reviewDetail
.
school_teacher
.
id
)?
true
:
false
likesList
:
data
.
list
[
Number
(
this
.
data
.
rid
)].
list
||
[]
})
}
}).
catch
((
err
)
=>
{
...
...
@@ -781,9 +795,10 @@ Page({
})
},
toShareCard
(){
const
{
sid
,
id
,
rid
,
type
}
=
this
.
data
const
{
sid
,
id
,
rid
,
type
}
=
this
.
data
;
// role 1为b端,2为c端
wx
.
navigateTo
({
url
:
`/src/pages/papersquare/classreviewshare?sid=
${
sid
}
&id=
${
id
}
&rid=
${
rid
}
&type=
${
type
}
`
url
:
`/src/pages/papersquare/classreviewshare?sid=
${
sid
}
&id=
${
id
}
&rid=
${
rid
}
&type=
${
type
}
&role=1
`
})
},
hideCountDailogShow
(
e
){
...
...
@@ -819,6 +834,7 @@ Page({
title
:
`
${
warnText
}
成功`
,
duration
:
500
})
that
.
prevPageShow
();
})
}
else
{
wx
.
showToast
({
...
...
@@ -938,7 +954,7 @@ Page({
if
(
code
==
200
)
{
if
(
like_status
==
2
)
{
// 取消点赞
like_status
=
false
;
likesList
=
likesList
.
filter
(
ele
=>
ele
.
like_user_id
!=
this
.
data
.
reviewDetail
.
school_teacher
.
id
);
likesList
=
likesList
.
filter
(
ele
=>
ele
.
id
!=
data
.
id
);
}
else
if
(
like_status
==
1
)
{
// 点赞
like_status
=
true
;
likesList
.
push
({
...
...
@@ -946,7 +962,6 @@ Page({
avatar
:
data
.
school_teacher
.
avatar
||
avatar
},
id
:
data
.
id
,
like_user_id
:
data
.
like_user_id
,
like_user_type
:
data
.
like_user_type
,
});
}
...
...
@@ -974,5 +989,11 @@ Page({
showRefresh
:
true
})
}
},
bindIGet
(){
const
{
sid
,
id
}
=
this
.
data
wx
.
redirectTo
({
url
:
`/business/pages/classservice/classreviewindex?sid=
${
sid
}
&id=
${
id
}
`
})
}
})
\ No newline at end of file
business/pages/classservice/reviewdetail.wxml
View file @
052bf502
...
...
@@ -377,3 +377,14 @@
</view>
</view>
</view>
<view class="modal-dialog" wx:if="{{modalReviewHadDel}}">
<view class="modal-mask"></view>
<view class="modal-box">
<view class="modal-title">温馨提示</view>
<view class="modal-content">{{errTip}}</view>
<view class="modal-bottom">
<view class="modal-btn" bindtap="bindIGet">我知道了</view>
</view>
</view>
</view>
\ No newline at end of file
business/pages/classservice/reviewdetail.wxss
View file @
052bf502
...
...
@@ -777,6 +777,8 @@ page{
display: flex;
align-items: center;
justify-content: center;
color: #4F4F4F;
font-size: 30rpx;
}
.modal-dialog .modal-box .modal-bottom{
width: 100%;
...
...
business/pages/organizationalmgt/info.wxml
View file @
052bf502
...
...
@@ -20,7 +20,7 @@
</view>
</view>
</view>
<block wx:if="{{dakarole==1}}">
<view class="box">
<view class="box-title">
<view class="title">完善机构信息</view>
...
...
@@ -62,7 +62,7 @@
</view>
<view class="submitbtn" bindtap="save">完成</view>
</block>
<!-- <view class="common-dialog" wx:if="{{showAuthSettingDia}}">
<view class="dialog-box">
...
...
constants/activityconfig.js
0 → 100644
View file @
052bf502
export
default
{
// dailysignSchool 机构825生成日签,自定义的一张poster
dailysignSchool
:
[
{
sid
:
825
,
posterbg
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg825.png'
},
{
sid
:
449
,
posterbg
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg825.png'
},
]
}
\ No newline at end of file
constants/constants.js
View file @
052bf502
export
default
{
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/'
,
//
host: 'https://qxapi.qingxiao.online/daka',
//
host2: 'https://wx.m.shangjiadao.cn',
host
:
'https://qxapi.qingxiao.online/daka'
,
host2
:
'https://wx.m.shangjiadao.cn'
,
storageVersion
:
'4.0'
,
imageVersion
:
'20191104'
,
host
:
'https://clock.wp53.cn'
,
host2
:
'https://test.wp53.cn'
,
//
host: 'https://clock.wp53.cn',
//
host2: 'https://test.wp53.cn',
appId
:
'wxc1246ea029394785'
,
miniProgram
:
{
clock
:
'wxdeee20e52a1fd7ee'
...
...
@@ -152,25 +152,25 @@ export default {
}],
dailyPosterNew
:
[{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg1.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg1.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg2.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg2.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg3.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg3.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg4.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg4.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg5.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg5.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg6.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg6.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg7.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg7.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg8.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg8.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg9.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg9.png'
},{
bg
:
'https://cdn.img.shangjiadao.cn/
source/images/dakav4
/2c/dailyposter2/bg10.png'
bg
:
'https://cdn.img.shangjiadao.cn/
qingxiao/daka/images
/2c/dailyposter2/bg10.png'
}],
dailytextNew
:
[{
linea
:
'慈母手中线,游子身上衣。谁言寸草心,报得三春晖。'
,
...
...
service/business/classservice.js
View file @
052bf502
...
...
@@ -104,6 +104,15 @@ function classroomdetailGet (data) {
errorresolve
:
1
,
})
}
function
classroomdetailGet2
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
url
:
apis
.
business
.
classservice
.
classroomdetail
,
data
,
method
:
'GET'
,
errorresolve
:
2
,
})
}
function
classreviewPlacetop
(
data
)
{
return
wxRequest
({
role
:
'2b'
,
...
...
@@ -196,6 +205,7 @@ export {
remindpushPOST
,
studentreviewPost
,
classroomdetailGet
,
classroomdetailGet2
,
readreviewcountGet
,
classroomlikesGet
,
classroomcommentsGet
,
...
...
service/customer/papersquare.js
View file @
052bf502
...
...
@@ -49,7 +49,7 @@ function classroomdetailGet(data){
url
:
`
${
apis
.
customer
.
common
.
classroomdetailGet
}
`
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
errorresolve
:
2
,
})
}
export
{
...
...
src/components/clockitemv2/index.js
View file @
052bf502
...
...
@@ -479,6 +479,9 @@ Component({
}
},
goClockDetail
()
{
if
(
this
.
data
.
type
!=
0
&&
this
.
data
.
othertype
!=
1
){
return
}
if
(
this
.
data
.
clock
.
subject_type
==
3
)
{
wx
.
navigateTo
({
url
:
`/src/pages/clockdetail/newindex?tid=
${
this
.
data
.
clock
.
unlock_mode_id
}
&cid=
${
this
.
data
.
clock
.
id
}
`
,
...
...
src/components/clockitemv2/index.wxml
View file @
052bf502
This diff is collapsed.
Click to expand it.
src/pages/calendarthemeindex/index.js
View file @
052bf502
...
...
@@ -62,6 +62,8 @@ import {
import
{
studentidentity
}
from
'../../../service/customer/signup.js'
import
activityconfig
from
'../../../constants/activityconfig.js'
;
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -180,7 +182,7 @@ Page({
isSchoolStudent
:
false
,
myBaseinfo
:
''
,
needREfresh
:
false
,
studentId
:
''
studentId
:
''
,
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
// this.getWeeksDay(new Date());
...
...
@@ -2253,6 +2255,145 @@ Page({
if
(
myrate
<
80
){
myrate
=
Math
.
floor
(
Math
.
random
()
*
10
+
80
);
}
if
(
activityconfig
.
dailysignSchool
.
find
(
item
=>
item
.
sid
==
this
.
data
.
sid
)){
let
activitySchoolInfo
=
activityconfig
.
dailysignSchool
.
filter
(
item
=>
item
.
sid
==
this
.
data
.
sid
)[
0
];
this
.
setData
({
painting
:
{
width
:
750
,
height
:
1334
,
views
:
[
{
// 头像
type
:
'image'
,
url
:
userInfo
?
imagify
(
userInfo
.
avatar
,
'image/resize,w_160/format,jpg'
):
imagify
(
visitor
.
userInfo
.
avatarUrl
,
'image/resize,w_160/format,jpg'
),
top
:
766
,
left
:
70
,
width
:
80
,
height
:
80
},
{
// 背景
type
:
'image'
,
url
:
activitySchoolInfo
.
posterbg
,
top
:
0
,
left
:
0
,
width
:
750
,
height
:
1334
},
{
// 二维码
type
:
'image'
,
url
:
qrcode
,
top
:
1133
,
left
:
528
,
width
:
145
,
height
:
145
},
{
// 日期
type
:
'text'
,
content
:
date
.
day
,
fontSize
:
100
,
color
:
'#fff'
,
textAlign
:
'left'
,
top
:
120
,
left
:
40
,
lineHeight
:
1
,
bolder
:
true
},
{
// 月份英文
type
:
'text'
,
content
:
date
.
month
.
shortName
+
' '
+
date
.
year
,
fontSize
:
30
,
color
:
'#fff'
,
textAlign
:
'left'
,
top
:
240
,
left
:
41
,
lineHeight
:
1
,
bolder
:
true
},
{
// 昵称
type
:
'text'
,
content
:
userInfo
?
userInfo
.
nickname
:
visitor
.
userInfo
.
nickName
,
fontSize
:
30
,
color
:
'#2C2C2C'
,
textAlign
:
'left'
,
top
:
767
,
left
:
175
,
bolder
:
true
},
{
// 打卡详情
type
:
'text'
,
content
:
`在〔
${
circleInfo
.
title
&&
circleInfo
.
title
.
length
>
15
?
circleInfo
.
title
.
substr
(
0
,
15
)
+
'...'
:
circleInfo
.
title
||
''
}
〕完成打卡`
,
fontSize
:
24
,
color
:
'#4F4F4F'
,
textAlign
:
'left'
,
top
:
819
,
left
:
176
,
bolder
:
false
},
{
// %
type
:
'text'
,
content
:
'%'
,
fontSize
:
22
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1020
,
left
:
565
,
bolder
:
false
},
{
// 天
type
:
'text'
,
content
:
'天'
,
fontSize
:
22
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1020
,
left
:
240
,
bolder
:
false
},
{
// 百分比
type
:
'text'
,
content
:
`
${
myrate
}
`
,
fontSize
:
60
,
color
:
'#000000'
,
textAlign
:
'center'
,
width
:
120
,
top
:
985
,
left
:
510
,
bolder
:
true
},
{
// 打卡次数
type
:
'text'
,
content
:
my_rank
.
clock_days
,
fontSize
:
60
,
color
:
'#000000'
,
textAlign
:
'center'
,
width
:
120
,
top
:
985
,
left
:
200
,
bolder
:
true
},
{
// 校区名
type
:
'text'
,
content
:
`来「
${
schoolInfo
.
title
&&
schoolInfo
.
title
.
length
>
15
?
schoolInfo
.
title
.
substr
(
0
,
15
)
+
'...'
:
schoolInfo
.
title
||
''
}
」`
,
fontSize
:
24
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1139
,
left
:
86
,
bolder
:
true
},
{
// 校区名
type
:
'text'
,
content
:
'和TA一起学习'
,
fontSize
:
24
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1175
,
left
:
86
,
bolder
:
true
},
]
}
})
}
else
{
this
.
setData
({
painting
:
{
width
:
750
,
...
...
@@ -2419,6 +2560,8 @@ Page({
]
}
})
}
})
},
eventGetImage
(
e
)
{
...
...
src/pages/morethemeindex/index.js
View file @
052bf502
...
...
@@ -60,6 +60,8 @@ import regexp from '../../../constants/regexp.js';
import
{
studentidentity
}
from
'../../../service/customer/signup.js'
import
activityconfig
from
'../../../constants/activityconfig.js'
;
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -178,7 +180,7 @@ Page({
isSchoolStudent
:
false
,
myBaseinfo
:
''
,
needREfresh
:
false
,
studentId
:
''
studentId
:
''
,
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
this
.
innerAudioContext
=
wx
.
createInnerAudioContext
();
// 当前页面唯一的一个音频容器
...
...
@@ -1426,6 +1428,145 @@ Page({
if
(
myrate
<
80
){
myrate
=
Math
.
floor
(
Math
.
random
()
*
10
+
80
);
}
if
(
activityconfig
.
dailysignSchool
.
find
(
item
=>
item
.
sid
==
this
.
data
.
sid
)){
let
activitySchoolInfo
=
activityconfig
.
dailysignSchool
.
filter
(
item
=>
item
.
sid
==
this
.
data
.
sid
)[
0
];
this
.
setData
({
painting
:
{
width
:
750
,
height
:
1334
,
views
:
[
{
// 头像
type
:
'image'
,
url
:
userInfo
?
imagify
(
userInfo
.
avatar
,
'image/resize,w_160/format,jpg'
):
imagify
(
visitor
.
userInfo
.
avatarUrl
,
'image/resize,w_160/format,jpg'
),
top
:
766
,
left
:
70
,
width
:
80
,
height
:
80
},
{
// 背景
type
:
'image'
,
url
:
activitySchoolInfo
.
posterbg
,
top
:
0
,
left
:
0
,
width
:
750
,
height
:
1334
},
{
// 二维码
type
:
'image'
,
url
:
qrcode
,
top
:
1133
,
left
:
528
,
width
:
145
,
height
:
145
},
{
// 日期
type
:
'text'
,
content
:
date
.
day
,
fontSize
:
100
,
color
:
'#fff'
,
textAlign
:
'left'
,
top
:
120
,
left
:
40
,
lineHeight
:
1
,
bolder
:
true
},
{
// 月份英文
type
:
'text'
,
content
:
date
.
month
.
shortName
+
' '
+
date
.
year
,
fontSize
:
30
,
color
:
'#fff'
,
textAlign
:
'left'
,
top
:
240
,
left
:
41
,
lineHeight
:
1
,
bolder
:
true
},
{
// 昵称
type
:
'text'
,
content
:
userInfo
?
userInfo
.
nickname
:
visitor
.
userInfo
.
nickName
,
fontSize
:
30
,
color
:
'#2C2C2C'
,
textAlign
:
'left'
,
top
:
767
,
left
:
175
,
bolder
:
true
},
{
// 打卡详情
type
:
'text'
,
content
:
`在〔
${
circleInfo
.
title
&&
circleInfo
.
title
.
length
>
15
?
circleInfo
.
title
.
substr
(
0
,
15
)
+
'...'
:
circleInfo
.
title
||
''
}
〕完成打卡`
,
fontSize
:
24
,
color
:
'#4F4F4F'
,
textAlign
:
'left'
,
top
:
819
,
left
:
176
,
bolder
:
false
},
{
// %
type
:
'text'
,
content
:
'%'
,
fontSize
:
22
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1020
,
left
:
565
,
bolder
:
false
},
{
// 天
type
:
'text'
,
content
:
'天'
,
fontSize
:
22
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1020
,
left
:
240
,
bolder
:
false
},
{
// 百分比
type
:
'text'
,
content
:
`
${
myrate
}
`
,
fontSize
:
60
,
color
:
'#000000'
,
textAlign
:
'center'
,
width
:
120
,
top
:
985
,
left
:
510
,
bolder
:
true
},
{
// 打卡次数
type
:
'text'
,
content
:
my_rank
.
clock_days
,
fontSize
:
60
,
color
:
'#000000'
,
textAlign
:
'center'
,
width
:
120
,
top
:
985
,
left
:
200
,
bolder
:
true
},
{
// 校区名
type
:
'text'
,
content
:
`来「
${
schoolInfo
.
title
&&
schoolInfo
.
title
.
length
>
15
?
schoolInfo
.
title
.
substr
(
0
,
15
)
+
'...'
:
schoolInfo
.
title
||
''
}
」`
,
fontSize
:
24
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1139
,
left
:
86
,
bolder
:
true
},
{
// 校区名
type
:
'text'
,
content
:
'和TA一起学习'
,
fontSize
:
24
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1175
,
left
:
86
,
bolder
:
true
},
]
}
})
}
else
{
this
.
setData
({
painting
:
{
width
:
750
,
...
...
@@ -1592,6 +1733,8 @@ Page({
]
}
})
}
})
},
eventGetImage
(
e
)
{
...
...
src/pages/papersquare/classreviewshare.js
View file @
052bf502
...
...
@@ -15,11 +15,14 @@ import {
}
from
'../../../service/customer/signup.js'
import
{
classroomdetailGet
}
from
'../../../service/
business/classservic
e.js'
;
}
from
'../../../service/
customer/papersquar
e.js'
;
import
{
wxGetImageInfo
}
from
'../../../utilities/wxApi.js'
;
import
CanvasDrag
from
'../../../components/canvas-drag/canvas-drag'
;
import
{
classroomdetailGet2
}
from
'../../../service/business/classservice.js'
;
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -55,12 +58,13 @@ Page({
sharePage
:
'src/pages/papersquare/reviewdetail'
,
// TODO 换路径 src/pages/papersquare/classsharereview 事例src/pages/clockdetail/newindex
},
onLoad
:
function
(
options
)
{
const
{
sid
,
rid
,
type
,
id
}
=
options
;
const
{
sid
,
rid
,
type
,
id
,
role
}
=
options
;
this
.
setData
({
rid
,
sid
,
type
,
id
:
id
||
''
,
role
,
tempImgArr1
:
[
{
idx
:
0
,
...
...
@@ -161,9 +165,20 @@ Page({
wx
.
showLoading
({
title
:
'加载中'
});
classroomdetailGet
({
let
ajax
=
null
;
console
.
log
(
this
.
data
.
role
,
'role'
,
this
.
data
.
role
==
1
)
// role 1为b端,2为c端
if
(
this
.
data
.
role
==
1
){
ajax
=
classroomdetailGet2
({
id
:
this
.
data
.
rid
})
}
else
{
ajax
=
classroomdetailGet
({
id
:
this
.
data
.
rid
}).
then
((
res
)
=>
{
})
}
ajax
.
then
((
res
)
=>
{
const
{
code
,
data
,
datetime
}
=
res
;
this
.
data
.
datetime
=
datetime
;
if
(
code
==
200
){
...
...
@@ -531,8 +546,10 @@ Page({
changeCover
(){
let
that
=
this
;
let
ReviewImgLen
=
this
.
data
.
hasReviewImg
.
length
;
let
coverindex
=
this
.
data
.
coverindex
let
coverindex
=
this
.
data
.
coverindex
;
if
(
ReviewImgLen
==
1
){
return
}
if
(
this
.
data
.
coverindex
>=
ReviewImgLen
-
1
){
coverindex
=
0
}
else
{
...
...
@@ -541,7 +558,6 @@ Page({
that
.
setData
({
coverindex
,
})
// that.setData({canvasBg:null});
CanvasDrag
.
clearCanvas
();
that
.
setData
({
graph
:
{
...
...
src/pages/papersquare/reviewdetail.js
View file @
052bf502
...
...
@@ -58,7 +58,9 @@ Page({
erpStudentId
:
0
,
like_status
:
false
,
likeSubmitting
:
false
likeSubmitting
:
false
,
modalDeleteReview
:
false
,
//内容删除
errTip
:
'点评故事已被删除'
},
onLoad
:
function
(
options
)
{
this
.
innerAudioContext
=
wx
.
createInnerAudioContext
();
// 当前页面唯一的一个音频容器
...
...
@@ -77,7 +79,7 @@ Page({
sid
,
id
,
rid
,
type
type
,
})
}
app
.
getCurrentSchoolStudentId
({
...
...
@@ -93,7 +95,6 @@ Page({
},
onShow
:
function
()
{
},
onHide
:
function
()
{
this
.
innerAudioContext
.
pause
();
...
...
@@ -138,8 +139,14 @@ Page({
classroomdetailGet
({
id
:
this
.
data
.
rid
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
){
const
{
code
,
data
,
msg
}
=
res
;
if
(
code
==
40018
){
this
.
setData
({
modalDeleteReview
:
true
,
errTip
:
'点评故事已被删除'
})
return
}
else
if
(
code
==
200
){
try
{
let
thisContent
=
JSON
.
parse
(
data
.
content
);
data
.
content
=
thisContent
;
...
...
@@ -163,6 +170,12 @@ Page({
id
:
data
.
id
,
school_id
:
data
.
school_id
,
})
}
else
{
this
.
setData
({
modalDeleteReview
:
true
,
errTip
:
msg
})
return
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
...
...
@@ -521,13 +534,14 @@ Page({
return
}
wx
.
navigateTo
({
url
:
`/src/pages/growthrecord/index?consumerId=
${
dataset
.
like
.
student
.
id
}
&id=
${
this
.
data
.
id
}
&sid=
${
this
.
data
.
id
}
`
url
:
`/src/pages/growthrecord/index?consumerId=
${
dataset
.
like
.
student
.
id
}
&id=
${
this
.
data
.
id
}
&sid=
${
this
.
data
.
s
id
}
`
})
},
generatelongimg
(){
const
{
sid
,
id
,
rid
,
type
}
=
this
.
data
;
// role 1为b端,2为c端
wx
.
navigateTo
({
url
:
`/src/pages/papersquare/classreviewshare?sid=
${
sid
}
&id=
${
id
}
&rid=
${
rid
}
&type=
${
type
}
`
url
:
`/src/pages/papersquare/classreviewshare?sid=
${
sid
}
&id=
${
id
}
&rid=
${
rid
}
&type=
${
type
}
&role=2
`
})
},
backPage
(){
...
...
@@ -572,9 +586,12 @@ Page({
like_status
=
true
;
likesList
.
push
({
student
:{
avatar
:
data
.
school_student
.
avatar
||
avatar
avatar
:
data
.
school_student
.
avatar
||
avatar
,
id
:
data
.
school_student
.
id
},
id
:
data
.
id
,
is_join_school
:
1
,
like_user_type
:
data
.
like_user_type
});
}
this
.
setData
({
...
...
@@ -601,5 +618,10 @@ Page({
needRefresh
:
true
})
}
},
bindIGet
(){
wx
.
reLaunch
({
url
:
'/ucenter/index'
})
}
})
\ No newline at end of file
src/pages/papersquare/reviewdetail.wxml
View file @
052bf502
...
...
@@ -281,3 +281,14 @@
</view>
<view class="modal-dialog" wx:if="{{modalDeleteReview}}">
<view class="modal-mask"></view>
<view class="modal-box">
<view class="modal-title">温馨提示</view>
<view class="modal-content">{{errTip}}</view>
<view class="modal-bottom">
<view class="modal-btn" bindtap="bindIGet">我知道了</view>
</view>
</view>
</view>
src/pages/papersquare/reviewdetail.wxss
View file @
052bf502
...
...
@@ -486,3 +486,94 @@
color: #828E9C;
font-size: 26rpx;
}
.modal-dialog{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 99;
}
.modal-dialog .modal-mask{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,.5);
z-index: 99;
}
.modal-dialog .modal-box{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
width: 600rpx;
height: 357rpx;
background:rgba(255,255,255,1);
border-radius: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 1;
z-index: 100;
}
.modal-dialog .modal-box .modal-title{
font-size: 32rpx;
color: #000;
font-weight: bold;
text-align: center;
padding-top: 56rpx;
}
.modal-dialog .modal-box .modal-content{
padding: 0 24rpx;
display: flex;
align-items: center;
justify-content: center;
color: #4F4F4F;
font-size: 30rpx;
}
.modal-dialog .modal-box .modal-bottom{
width: 100%;
height: 96rpx;
display: flex;
position: relative;
}
.modal-dialog .modal-box .modal-bottom::before{
content: '';
width: 100%;
height: 1px;
background:rgba(0,0,0,.05);
position: absolute;
left: 0;
top: 0;
transform: scaleY(.5);
}
.modal-dialog .modal-box .modal-bottom .modal-btn{
flex: 1;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
font-size: 30rpx;
font-weight: bold;
color: #434343;
}
.modal-dialog .modal-box .modal-bottom .modal-btn.btn-red{
color: #FF5A5A;
}
.modal-dialog .modal-box .modal-bottom .modal-btn::after{
content: '';
width: 1px;
height:100%;
background:rgba(0,0,0,.05);
position: absolute;
right: 0;
top: 0;
transform: scaleX(.5);
}
.modal-dialog .modal-box .modal-bottom .modal-btn:last-of-type::after{
display: none;
}
\ No newline at end of file
src/pages/themeindex/index.js
View file @
052bf502
...
...
@@ -66,6 +66,7 @@ import {
import
{
studentidentity
}
from
'../../../service/customer/signup.js'
import
activityconfig
from
'../../../constants/activityconfig.js'
;
var
app
=
getApp
();
Page
({
data
:
{
...
...
@@ -185,7 +186,7 @@ Page({
countdownShow
:
true
,
needREfresh
:
false
,
bigindex
:
undefined
,
studentId
:
''
studentId
:
''
,
},
onLoad
:
function
(
options
,
b
)
{
// Do some initialize when page load.
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
...
...
@@ -1541,6 +1542,147 @@ Page({
if
(
myrate
<
80
){
myrate
=
Math
.
floor
(
Math
.
random
()
*
10
+
80
);
}
if
(
activityconfig
.
dailysignSchool
.
find
(
item
=>
item
.
sid
==
this
.
data
.
sid
)){
let
activitySchoolInfo
=
activityconfig
.
dailysignSchool
.
filter
(
item
=>
item
.
sid
==
this
.
data
.
sid
)[
0
];
this
.
setData
({
painting
:
{
width
:
750
,
height
:
1334
,
views
:
[
{
// 头像
type
:
'image'
,
url
:
userInfo
?
imagify
(
userInfo
.
avatar
,
'image/resize,w_160/format,jpg'
):
imagify
(
visitor
.
userInfo
.
avatarUrl
,
'image/resize,w_160/format,jpg'
),
top
:
766
,
left
:
70
,
width
:
80
,
height
:
80
},
{
// 背景
type
:
'image'
,
url
:
activitySchoolInfo
.
posterbg
,
top
:
0
,
left
:
0
,
width
:
750
,
height
:
1334
},
{
// 二维码
type
:
'image'
,
url
:
qrcode
,
top
:
1133
,
left
:
528
,
width
:
145
,
height
:
145
},
{
// 日期
type
:
'text'
,
content
:
date
.
day
,
fontSize
:
100
,
color
:
'#fff'
,
textAlign
:
'left'
,
top
:
120
,
left
:
40
,
lineHeight
:
1
,
bolder
:
true
},
{
// 月份英文
type
:
'text'
,
content
:
date
.
month
.
shortName
+
' '
+
date
.
year
,
fontSize
:
30
,
color
:
'#fff'
,
textAlign
:
'left'
,
top
:
240
,
left
:
41
,
lineHeight
:
1
,
bolder
:
true
},
{
// 昵称
type
:
'text'
,
content
:
userInfo
?
userInfo
.
nickname
:
visitor
.
userInfo
.
nickName
,
fontSize
:
30
,
color
:
'#2C2C2C'
,
textAlign
:
'left'
,
top
:
767
,
left
:
175
,
bolder
:
true
},
{
// 打卡详情
type
:
'text'
,
content
:
`在〔
${
circleInfo
.
title
&&
circleInfo
.
title
.
length
>
15
?
circleInfo
.
title
.
substr
(
0
,
15
)
+
'...'
:
circleInfo
.
title
||
''
}
〕完成打卡`
,
fontSize
:
24
,
color
:
'#4F4F4F'
,
textAlign
:
'left'
,
top
:
819
,
left
:
176
,
bolder
:
false
},
{
// %
type
:
'text'
,
content
:
'%'
,
fontSize
:
22
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1020
,
left
:
565
,
bolder
:
false
},
{
// 天
type
:
'text'
,
content
:
'天'
,
fontSize
:
22
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1020
,
left
:
240
,
bolder
:
false
},
{
// 百分比
type
:
'text'
,
content
:
`
${
myrate
}
`
,
fontSize
:
60
,
color
:
'#000000'
,
textAlign
:
'center'
,
width
:
120
,
top
:
985
,
left
:
510
,
bolder
:
true
},
{
// 打卡次数
type
:
'text'
,
content
:
my_rank
.
clock_days
,
fontSize
:
60
,
color
:
'#000000'
,
textAlign
:
'center'
,
width
:
120
,
top
:
985
,
left
:
200
,
bolder
:
true
},
{
// 校区名
type
:
'text'
,
content
:
`来「
${
schoolInfo
.
title
&&
schoolInfo
.
title
.
length
>
15
?
schoolInfo
.
title
.
substr
(
0
,
15
)
+
'...'
:
schoolInfo
.
title
||
''
}
」`
,
fontSize
:
24
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1139
,
left
:
86
,
bolder
:
true
},
{
// 校区名
type
:
'text'
,
content
:
'和TA一起学习'
,
fontSize
:
24
,
color
:
'#000000'
,
textAlign
:
'left'
,
top
:
1175
,
left
:
86
,
bolder
:
true
},
]
}
})
}
else
{
console
.
log
(
'没有'
)
this
.
setData
({
painting
:
{
width
:
750
,
...
...
@@ -1727,6 +1869,7 @@ Page({
]
}
})
}
})
},
eventGetImage
(
e
)
{
...
...
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