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
aa8d4a03
Commit
aa8d4a03
authored
Mar 23, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'编辑打卡无班级流程完毕'
parent
5e587664
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
415 additions
and
1389 deletions
+415
-1389
index.js
business/pages/themead/index.js
+87
-57
index.wxml
business/pages/themead/index.wxml
+1
-1
landpage.js
business/pages/themead/landpage.js
+250
-1162
landpage.json
business/pages/themead/landpage.json
+1
-15
landpage.wxml
business/pages/themead/landpage.wxml
+11
-119
landpage.wxss
business/pages/themead/landpage.wxss
+28
-1
list.js
business/pages/themead/list.js
+20
-11
list.wxml
business/pages/themead/list.wxml
+1
-1
setting.js
business/pages/themeeditor/setting.js
+1
-11
setting.wxml
business/pages/themeeditor/setting.wxml
+8
-8
setting.wxss
business/pages/themeeditor/setting.wxss
+4
-0
select1.png
images/2b/common/select1.png
+0
-0
themead.js
service/business/themead.js
+3
-3
No files found.
business/pages/themead/index.js
View file @
aa8d4a03
...
...
@@ -21,7 +21,6 @@ import {
bOssAccess
,
}
from
'../../../service/common.js'
;
Page
({
// mixins: [require('../../../mixins/myMins/audioCallback')],
data
:
{
maxLength
:
500
,
maxImgCount
:
9
,
...
...
@@ -47,6 +46,10 @@ Page({
{
type
:
"text"
,
value
:
"洛子帅, 书法练字训练营创始人,杭州阳关灿烂教育
\
r
\n
教学主管,专业书法教师,已帮助3000多人写好字。"
},
{
type
:
"img"
,
value
:
"https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2b/themeeditorlock/shoubiao.png"
},
],
audioStorage
:
{},
has_subject
:
false
,
deletePosting
:
false
,
publishing
:
false
,
},
onLoad
:
function
(
options
)
{
const
{
id
,
sid
}
=
options
;
...
...
@@ -83,7 +86,23 @@ Page({
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
console
.
log
(
data
,
'data'
);
let
content
=
[];
try
{
content
=
JSON
.
parse
(
data
.
content
);
}
catch
(
e
)
{
content
=
[];
}
this
.
setData
({
content
,
has_subject
:
data
.
has_subject
,
params
:
{
title
:
data
.
title
,
name
:
data
.
name
,
mobile
:
data
.
mobile
,
img
:
data
.
img
,
cover
:
data
.
cover
,
},
})
}
})
},
...
...
@@ -151,7 +170,9 @@ Page({
}
})
params
.
content
=
JSON
.
stringify
(
_content
);
wx
.
showLoading
(
'保存中...'
);
wx
.
showLoading
({
title
:
'保存中...'
});
editThemeAd
(
Object
.
assign
(
params
,
{
id
:
this
.
data
.
id
,
school_id
:
this
.
data
.
sid
...
...
@@ -160,6 +181,21 @@ Page({
this
.
data
.
publishing
=
false
;
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
wx
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
1000
})
let
pages
=
getCurrentPages
();
let
currPage
=
null
;
//当前页面
let
prevPage
=
null
;
//上一个页面
if
(
pages
.
length
>=
2
)
{
currPage
=
pages
[
pages
.
length
-
1
];
//当前页面
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
}
prevPage
.
setData
({
showRefresh
:
true
,
});
wx
.
navigateBack
({
delta
:
1
})
...
...
@@ -239,27 +275,13 @@ Page({
audioStorage
[
value
].
innerAudioContext
.
src
=
audioorigin
(
value
);
audioStorage
[
value
].
innerAudioContext
.
obeyMuteSwitch
=
false
;
audioStorage
[
value
].
innerAudioContext
.
onWaiting
((
e
)
=>
{
console
.
log
(
'等待中'
);
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
;
// if(audioStorage[value].isWaiting){
// return
// }
clearInterval
(
that
.
data
.
voiceInterval
);
audioStorage
[
value
].
isWaiting
=
true
that
.
setData
({
audioStorage
,
})
// setTimeout((e)=>{
// this.data.audioStorage[value].isWaiting = false;
// this.setData({
// audioStorage: this.data.audioStorage
// })
// },5000)
})
// audioStorage[value].innerAudioContext.onPlay((e) => {
// console.log('dasdad');
// that.voiceIntervalPlay(value);
// })
audioStorage
[
value
].
innerAudioContext
.
onTimeUpdate
((
e
)
=>
{
console
.
log
(
'sss'
);
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
...
...
@@ -343,25 +365,15 @@ Page({
console
.
log
(
value
,
'等待1111'
);
if
(
audioStorage
[
value
]
&&
!
audioStorage
[
value
].
play
)
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
// if(audioStorage[value].isWaiting){
// return
// }
audioStorage
[
value
].
isWaiting
=
true
that
.
setData
({
audioStorage
,
})
}
// setTimeout((e)=>{
// this.data.audioStorage[value].isWaiting = false;
// this.setData({
// audioStorage: this.data.audioStorage
// })
// },5000)
})
audioStorage
[
value
].
innerAudioContext
.
onTimeUpdate
((
e
)
=>
{
const
{
actPalyaudioValue
,
audioStorage
}
=
this
.
data
if
(
audioStorage
[
value
].
isWaiting
)
{
console
.
log
(
'22222222222222222'
);
clearInterval
(
that
.
data
.
voiceInterval
);
that
.
voiceIntervalPlay
(
value
);
audioStorage
[
value
].
isWaiting
=
false
...
...
@@ -383,7 +395,6 @@ Page({
audioStorage
,
})
});
// audioStorage[value].innerAudioContext.seek(slide);
}
else
{
if
(
slide
>=
audioStorage
[
value
].
duration
)
{
audioStorage
[
value
].
currentTime
=
0
;
...
...
@@ -397,19 +408,6 @@ Page({
}
audioStorage
[
value
].
isWaiting
=
false
;
}
// if (audioStorage[value] && audioStorage[value].play) { // 如果当前是播放状态 则启用定时器 播放按钮状态不需要改
// // audioStorage[value].play = false;
// console.log(slide, '播放slide')
// audioStorage[value].innerAudioContext.seek(slide); // audioStorage[value].currentTime
// // audioStorage[value].innerAudioContext.play();
// // clearInterval(this.data.voiceInterval);
// setTimeout(() => {
// audioStorage[value].innerAudioContext.play();
// }, 500)
// this.voiceIntervalPlay(value);
// } else { // 如果当前不是播放状态 则该干嘛干嘛
// // audioStorage[value].innerAudioContext.play();
// }
this
.
setData
({
audioStorage
,
})
...
...
@@ -438,19 +436,6 @@ Page({
})
},
slideend
(
e
)
{
// const {value, slide} = e.detail;
// let audioStorage = this.data.audioStorage;
// clearInterval(this.slideTimeOut);
// if (audioStorage[value] && audioStorage[value].play) { // 如果当前是播放状态 则启用定时器 播放按钮状态不需要改
// // audioStorage[value].play = false;
// console.log(audioStorage[value].currentTime, '播放')
// audioStorage[value].innerAudioContext.seek(audioStorage[value].currentTime);
// // audioStorage[value].innerAudioContext.play();
// // clearInterval(this.data.voiceInterval);
// this.voiceIntervalPlay(value);
// } else { // 如果当前不是播放状态 则该干嘛干嘛
// // audioStorage[value].innerAudioContext.play();
// }
},
resetAudiosPlayStatus
()
{
// 点击一个录音的时候把其他的录音状态改成暂停状态
let
audioStorage
=
this
.
data
.
audioStorage
;
...
...
@@ -614,14 +599,59 @@ Page({
});
},
getThemeAdDetail
()
{
getThemeAdDetail
({
delThemeAd
()
{
// 删除落地页模板
const
that
=
this
;
if
(
this
.
data
.
has_subject
)
{
wx
.
showModal
({
title
:
'这个营销页已经有主题使用,不能删除'
,
confirmText
:
'确定'
,
showCancel
:
false
,
})
return
;
}
wx
.
showModal
({
title
:
'您确定删除这个主题营销页吗?'
,
cancelText
:
'取消'
,
confirmText
:
'删除'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
that
.
sureDelThemeAd
();
}
}
})
},
sureDelThemeAd
()
{
if
(
this
.
data
.
deletePosting
)
{
return
;
}
this
.
data
.
deletePosting
=
true
;
wx
.
showLoading
({
title
:
'删除中...'
})
delThemeAd
({
id
:
this
.
data
.
id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
wx
.
hideLoading
();
this
.
data
.
deletePosting
=
false
;
if
(
code
==
200
)
{
console
.
log
(
data
,
'data'
);
wx
.
showToast
({
title
:
'删除成功'
,
duration
:
1000
})
const
currentPages
=
getCurrentPages
();
const
themeListPage
=
currentPages
.
find
(
ele
=>
ele
.
route
==
'business/pages/themead/list'
);
const
themeListPageIndex
=
currentPages
.
findIndex
(
ele
=>
ele
.
route
==
'business/pages/themead/list'
);
const
delta
=
currentPages
.
length
-
themeListPageIndex
-
1
;
themeListPage
.
setData
({
showRefresh
:
true
,
})
wx
.
navigateBack
({
delta
,
})
}
}).
catch
(()
=>
{
this
.
data
.
deletePosting
=
false
;
})
}
})
\ No newline at end of file
business/pages/themead/index.wxml
View file @
aa8d4a03
...
...
@@ -74,7 +74,7 @@
<view class="footer-box">
<view class="footer-innerbox">
<view class="btn">删除</view>
<view class="btn"
bindtap="delThemeAd"
>删除</view>
<view class="btn btn-primary" bindtap="saveLock">保存</view>
</view>
</view>
...
...
business/pages/themead/landpage.js
View file @
aa8d4a03
This diff is collapsed.
Click to expand it.
business/pages/themead/landpage.json
View file @
aa8d4a03
{
"navigationBarTitleText"
:
""
,
"usingComponents"
:
{
"sjd-media-show"
:
"../../../components/sjdmediashow"
,
"clock-item"
:
"../../components/clockitemv2"
,
"empty-content"
:
"../../../components/emptycontent"
,
"remark-editor"
:
"../../components/remarkeditor"
,
"psd-editor"
:
"../../components/psdeditor"
,
"poster-box"
:
"../../../components/posterbox"
,
"sjd-bullet"
:
"../../../components/bullet"
,
"sjd-contact"
:
"../../../components/contact"
,
"go-top"
:
"../../../components/goTop"
,
"list-loading"
:
"../../../components/listloading"
,
"comment-editor"
:
"../../../components/commenteditor"
,
"canvasdrawer"
:
"/components/canvasdrawer/canvasdrawer"
,
"activity-bar"
:
"../../../components/activitybar"
,
"btn-drag"
:
"../../../components/btndrag"
,
"guidecollection"
:
"../../../components/guidecollection"
"sjd-media-show"
:
"../../../components/sjdmediashow"
}
}
\ No newline at end of file
business/pages/themead/landpage.wxml
View file @
aa8d4a03
...
...
@@ -2,24 +2,15 @@
<view class="container">
<view class="section">
<view class="banner-box" >
<image class="banner" src="https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png"></image>
<view class="btn-group">
<button class="btn" open-type="share">分享</button>
<!-- <view class="btn">排行榜</view> -->
</view>
<view class="shadow-box"></view>
<view class="title-box">
<view class="title">{{themeSelect.title}}</view>
<view class="time">老师 {{themeSelect.start_time}} 发布</view>
</view>
<image class="banner" src="{{filter.imagify(landPageInfo.cover)}}"></image>
</view>
<view class="instro-bx" wx:if="{{
themeSelect.land_content && themeSelect.land_content.length>
0}}">
<view class="instro-bx" wx:if="{{
landPageInfo.content && landPageInfo.content.length >
0}}">
<view class="title-box">
<view class="title">介绍</view>
</view>
<view class="media-box">
<sjd-media-show
content="{{
themeSelect.land_
content}}"
content="{{
landPageInfo.
content}}"
bind:playvoice="playvoice"
actionsPalyvalue="{{actPalyaudioValue}}"
bind:pausevoice="pausevoice"
...
...
@@ -27,12 +18,12 @@
audioStorage="{{audioStorage}}"
bind:slidestart="slidestart"
bind:slideend="slideend"
widthtext="{{
tru
e}}"
widthtext="{{
fals
e}}"
expanded="{{isexpand}}"
bind:expandaction="expandaction"
text="点击"
bind:playvideo="playvideo"
defineheight="{{360
}}"
expandeddefault="{{false
}}"
>
</sjd-media-show>
</view>
...
...
@@ -41,98 +32,14 @@
<view class="section contact-box">
<view class="left">
<image class="avatar" src="
https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png" wx:if="{{themeSelect.land_content.teacher.avatar
}}"></image>
<image class="avatar" src="
{{filter.imagify(landPageInfo.img)}}" wx:if="{{landPageInfo.img
}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_teacher.png?{{imageVersion}}" wx:else></image>
<view class="nickname">
齇老师
</view>
<view class="nickname">
{{landPageInfo.name}}
</view>
</view>
<view class="right" bindtap="bindModalContact">
<view class="btn-contact">联系老师</view>
</view>
</view>
<view class="section clocker-box" wx:if="{{signStudentsTotal>0}}">
<view class="title">他们也在({{signStudentsTotal}}人)</view>
<view class="sub-title">加入打卡跟他们一起养成好习惯</view>
<view class="list">
<view class="item" wx:for="{{signStudentsList}}" wx:key="item.id">
<image class="avatar" src="{{filter.imagify(item.school_student.avatar)}}" wx:if="{{item.school_student.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="nickname">{{item.school_student.nickname}}</view>
</view>
</view>
</view>
<!-- <view class="text" bindtap="goInviteFriend">邀请好友</view> -->
<view class="section recomend-clockbox">
<view class="title">精选打卡预览({{clockTotal}}篇打卡)</view>
<block wx:if="{{themeSelect.is_cheat == 0 || (themeSelect.is_cheat == 1 && isClock) || (themeSelect.is_cheat == 1 && !isSchoolStudent) || (clockTotal + selfcount) == 0}}">
<view class="clock-list" wx:if="{{!emptyPage}}">
<block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem">
<view class="clock-item" wx:key="index" wx:for="{{bigitem}}">
<clock-item clock="{{item}}"
bind:delClock="delClock"
bind:expandAccessment="expandAccessment"
bind:fingureUp="fingureUp"
cindex="{{index}}"
bigindex="{{bigindex}}"
tid="{{themeSelect.id}}"
cid="{{id}}"
frompage="1"
bind:expandLikes="expandLikes"
bind:expandContent="expandContent"
headerclick="{{true}}"
bind:playvoice="playvoice"
bind:pausevoice="pausevoice"
bind:voiceslide="voiceslide"
audioStorage="{{audioStorage}}"
bind:slidestart="slidestart"
bind:slideend="slideend"
bind:videoplay="videoplay"
bind:delEvaluate="delEvaluate"
bind:showcommenteditor="showcommenteditor"
bind:playvideo="playvideo"
isactivityclock="{{tid == activtySchoolInfo.tid}}"
bind:drawpaint="drawpaint"
bind:integrallogpost="integrallogpost"
data-bigindex="{{bigindex}}"
data-index="{{index}}"
data-clockitemtype="clocklist"
>
</clock-item>
</view>
</block>
<list-loading loading="{{clockGetting}}"></list-loading>
</view>
<view class="empty-content-box" wx:if="{{(clockTotal + selfcount) == 0}}">
<empty-content text="还没有精选打卡内容~" emptyimg="common/empty/empty_c_sraech.png" width="263" height="219"></empty-content>
</view>
</block>
<view class="empty-content-box" wx:else>
<empty-content text="打卡后才能看到其他同学的打卡内容喔~" emptyimg="common/empty/empty_c_sraech.png" width="263" height="219"></empty-content>
</view>
</view>
<view class="footer-box">
<view class="footer-innerbox" wx:if="{{true}}">
<view class="btn btn-inviteinfo">
<image class="avatar" src="https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png"></image>
<view class="info">
<view class="nickname">齇老师</view>
<view class="tip">邀请你加入</view>
</view>
</view>
<!-- <button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">加入打卡</button> -->
<button class="btn btn-clock" bindtap="goClock">加入打卡</button>
</view>
<view class="footer-innerbox" wx:if="{{!true}}">
<view class="btn btn-home" bindtap="goWebsiteIndex">
<image class="icon-home" src="{{localImageRoot}}common/icon_home.png?{{imageVersion}}"></image>
<view class="tip">学校首页</view>
</view>
<view class="btn btn-clock" bindtap="goClock">去打卡</view>
</view>
</view>
<view class="modal modal-contact {{modelContactAnimate? 'hide': ''}}" hidden="{{!modalContact}}">
<view class="mask" bindtap="bindModalContact"></view>
<view class="modal-content">
...
...
@@ -141,7 +48,7 @@
<image class="icon-opt" src="{{localImageRoot}}2c/themeindex/icon_wx.png?{{imageVersion}}"></image>
<view class="item-title">添加微信</view>
</button>
<view class="opt-item" bindtap="bindCall">
<view class="opt-item" bindtap="bindCall"
wx:if="{{landPageInfo.mobile}}"
>
<image class="icon-opt" src="{{localImageRoot}}2c/themeindex/icon_call.png?{{imageVersion}}"></image>
<view class="item-title">拨打电话</view>
</view>
...
...
@@ -149,23 +56,8 @@
<image class="icon-cancel" src="{{localImageRoot}}2c/themeindex/icon_close.png?{{imageVersion}}" bindtap="bindModalContact"></image>
</view>
</view>
<psd-editor bind:closepsddia="closepsddia" circleid="{{id}}" wx:if="{{showPsdDia}}" bind:checkPsd="checkPsd">
</psd-editor>
<go-top wx:if="{{backTopValue}}"></go-top>
<view class="" data-editor="commenteditor">
<comment-editor wx:if="{{commenteditor}}" prams="{{commentclock}}" bind:hidecommenteditor="hidecommenteditor"
type="2c"></comment-editor>
</view>
<view class="videodialog" wx:if="{{videostatus.videoShow}}">
<view class="videodialogmask" bindtap="closeVideo"></view>
<video class="" binderror="videoErrorCallback" src="{{filter.transformOssVideofy(videostatus.src,videostatus.mode)}}" id="{{videostatus.videoId}}"
initial-time="0" autoplay="false" loop="false" bindplay="" bindpause="" bindended=""
bindtimeupdate="" bindwaiting="" binderror="" bindfullscreenchange="screenchange">
</video>
<view class="bottombtnbox">
<view class="editbtn bottombtn" bindtap="goedit">编辑</view>
<view class="usebtn bottombtn" bindtap="gouse">使用</view>
</view>
<guidecollection/>
</view>
\ No newline at end of file
business/pages/themead/landpage.wxss
View file @
aa8d4a03
...
...
@@ -72,7 +72,7 @@ page {
}
.instro-bx {
padding: 20rpx 20rpx
0
;
padding: 20rpx 20rpx
20rpx
;
}
.instro-bx .title-box {
display: flex;
...
...
@@ -428,3 +428,30 @@ page {
height: 500rpx;
position: relative;
}
.bottombtnbox {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
height: 100rpx;
display: flex;
}
.bottombtnbox .bottombtn{
display: flex;
align-items: center;
justify-content: center;
height: 100rpx;
font-size: 30rpx;
z-index: 5;
box-shadow:0px -2rpx 4rpx 0px rgba(214,205,189,0.5);
}
.bottombtnbox .bottombtn.editbtn {
width: 220rpx;
background-color: #FFFFFF;
color: #666666;
}
.bottombtnbox .bottombtn.usebtn {
width: 530rpx;
background-color: #16B0FD;
color: #fff;
}
\ No newline at end of file
business/pages/themead/list.js
View file @
aa8d4a03
...
...
@@ -30,12 +30,13 @@ Page({
localImageRoot
:
'../../../images/'
,
sid
:
0
,
page
:
1
,
perPage
:
10
,
perPage
:
10
0
,
hasmore
:
true
,
listLoading
:
false
,
emptyPage
:
false
,
list
:
[],
total
:
0
,
showRefresh
:
false
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
{
sid
}
=
options
;
...
...
@@ -48,6 +49,15 @@ Page({
},
onShow
:
function
()
{
// Do something when page show.
if
(
this
.
data
.
showRefresh
)
{
this
.
setData
({
hasmore
:
true
,
listLoading
:
false
,
emptyPage
:
false
,
})
this
.
getThemeAdList
(
'init'
);
this
.
data
.
showRefresh
=
false
;
}
},
onHide
:
function
()
{
// Do something when page hide.
},
...
...
@@ -169,17 +179,10 @@ Page({
},
useThemeAd
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
item
,
'item'
);
const
currentPages
=
getCurrentPages
();
console
.
log
(
currentPages
,
'currentPages'
);
// business/pages/themeeditor/index
const
themeeditorPage
=
currentPages
.
find
(
ele
=>
ele
.
path
=
'business/pages/themeeditor/index'
);
const
themeeditorPageIndex
=
currentPages
.
findIndex
(
ele
=>
ele
.
path
=
'business/pages/themeeditor/index'
);
const
themeeditorPage
=
currentPages
.
find
(
ele
=>
ele
.
route
==
'business/pages/themeeditor/index'
);
const
themeeditorPageIndex
=
currentPages
.
findIndex
(
ele
=>
ele
.
route
==
'business/pages/themeeditor/index'
);
const
delta
=
currentPages
.
length
-
themeeditorPageIndex
-
1
;
console
.
log
(
themeeditorPage
,
'themeeditorPage'
);
console
.
log
(
themeeditorPageIndex
,
'themeeditorPageIndex'
);
console
.
log
(
delta
,
'delta'
);
// if ()
themeeditorPage
.
setData
({
themeAdInfo
:
{
id
:
item
.
id
,
...
...
@@ -192,7 +195,13 @@ Page({
},
toEditLandpage
()
{
wx
.
navigateTo
({
url
:
`/business/pages/themead/index?sid=
${
this
.
data
.
sid
}
`
url
:
`/business/pages/themead/index?id=0&sid=
${
this
.
data
.
sid
}
`
})
},
viewThemeAd
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
;
wx
.
navigateTo
({
url
:
`/business/pages/themead/landpage?id=
${
item
.
id
}
&sid=
${
this
.
data
.
sid
}
`
})
}
})
\ No newline at end of file
business/pages/themead/list.wxml
View file @
aa8d4a03
...
...
@@ -16,7 +16,7 @@
<view class="status">当前使用</view>
<view class="itembtnbox">
<view class="itembtn" data-item="{{item}}" bindtap="useThemeAd">立即使用</view>
<view class="itembtn">查看模板</view>
<view class="itembtn"
data-item="{{item}}" bindtap="viewThemeAd"
>查看模板</view>
</view>
</view>
</view>
...
...
business/pages/themeeditor/setting.js
View file @
aa8d4a03
...
...
@@ -4,6 +4,7 @@ Page({
data
:
{
sid
:
0
,
imageRoot
:
app
.
globalData
.
imageRoot
,
localImageRoot
:
'../../../images/'
,
imageVersion
:
app
.
globalData
.
imageVersion
,
is_cheat
:
0
,
// is_encrypt: 0,
...
...
@@ -103,17 +104,6 @@ Page({
})
}
},
// encryptswitch() {
// if (Number(this.data.is_encrypt) == 0) {
// this.setData({
// is_encrypt: 1
// })
// } else if (Number(this.data.is_encrypt) == 1) {
// this.setData({
// is_encrypt: 0
// })
// }
// },
readswitch
(){
if
(
Number
(
this
.
data
.
force_status
)
==
2
)
{
this
.
setData
({
...
...
business/pages/themeeditor/setting.wxml
View file @
aa8d4a03
...
...
@@ -2,18 +2,18 @@
<view class="bigtitle">参与打卡方式 (单选)</view>
<view class="section">
<w-cell-group>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px"
data-type="1" bindtap="joinruletypeChange"
>
<view class="form-item ">
<view class="item-l">
<text class="title">任何人都可参与</text>
<text class="title" style="color: #999999">(无通知)</text>
</view>
<view class="item-r">
<
w-switch slot="content" value="{{ join_rule_type == 1 }}" color="#65B8F4" size="small" data-type="1" bind:onChange="joinruletypeChange" /
>
<
image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 1 ? 'select1' : 'notselect'}}.png"></image
>
</view>
</view>
</view>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px"
data-type="2" bindtap="joinruletypeChange"
>
<view class="form-item ">
<view class="item-l" style="display: block;">
<view>
...
...
@@ -23,29 +23,29 @@
<view wx:if="{{ join_rule_type == 2 }}" style="font-size: 22rpx;color: #999999;"><text wx:for="{{classes}}" wx:for-item="class" wx:key="id">{{class.title}}<text wx:if="{{index < classes.length}}">,</text></text></view>
</view>
<view class="item-r">
<
w-switch slot="content" value="{{ join_rule_type == 2 }}" color="#65B8F4" size="small" data-type="2" bind:onChange="joinruletypeChange" /
>
<
image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 2 ? 'select1' : 'notselect'}}.png"></image
>
</view>
</view>
</view>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px"
data-type="3" bindtap="joinruletypeChange"
>
<view class="form-item ">
<view class="item-l" style="display: block;">
<view class="title">输入密码都可参与</view>
<view style="font-size: 22rpx;color: #999999;" wx:if="{{ join_rule_type == 3 }}">{{join_secret ? '已设置(密码:' + join_secret + ')' : '未设置'}}<text bindtap="changePsd" style="font-size: 22rpx;color: #16B0FD;margin-left: 20rpx">修改</text></view>
</view>
<view class="item-r">
<
w-switch slot="content" value="{{ join_rule_type == 3 }}" color="#65B8F4" size="small" data-type="3" bind:onChange="joinruletypeChange" /
>
<
image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 3 ? 'select1' : 'notselect'}}.png" ></image
>
</view>
</view>
</view>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px"
data-type="4" bindtap="joinruletypeChange"
>
<view class="form-item ">
<view class="item-l" style="display: block;">
<view class="title">指定班级学生参与</view>
<view wx:if="{{ join_rule_type == 4 }}" style="font-size: 22rpx;color: #999999;"><text wx:for="{{classes}}" wx:for-item="class" wx:key="id">{{class.title}}<text wx:if="{{index < (classes.length - 1)}}">,</text></text></view>
</view>
<view class="item-r">
<
w-switch slot="content" value="{{ join_rule_type == 4 }}" color="#65B8F4" size="small" data-type="4" bind:onChange="joinruletypeChange" /
>
<
image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 4 ? 'select1' : 'notselect'}}.png" ></image
>
</view>
</view>
</view>
...
...
business/pages/themeeditor/setting.wxss
View file @
aa8d4a03
...
...
@@ -21,6 +21,10 @@ page{
/* padding: 10rpx 0; */
margin-bottom: 26rpx;
}
.selectedicon {
width: 38rpx;
height: 38rpx;
}
.usedesc {
color: #999999;
font-size: 22rpx;
...
...
images/2b/common/select1.png
0 → 100644
View file @
aa8d4a03
831 Bytes
service/business/themead.js
View file @
aa8d4a03
...
...
@@ -14,7 +14,7 @@ function getThemeAdList (data) { // 获取主题营销页列表
function
getThemeAdDetail
(
data
)
{
// 获取主题营销页详情
return
wxRequest
({
role
:
'2b'
,
url
:
`
apis.business.themeAd.index
/
${
data
.
id
}
`
,
url
:
`
${
apis
.
business
.
themeAd
.
index
}
/
${
data
.
id
}
`
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
...
...
@@ -24,7 +24,7 @@ function editThemeAd (data) { // 新增或修改主题营销模板
const
{
id
}
=
data
;
return
wxRequest
({
role
:
'2b'
,
url
:
id
==
0
?
apis
.
business
.
themeAd
.
index
:
`
apis.business.themeAd.index
/
${
data
.
id
}
`
,
url
:
id
==
0
?
apis
.
business
.
themeAd
.
index
:
`
${
apis
.
business
.
themeAd
.
index
}
/
${
data
.
id
}
`
,
data
,
method
:
id
==
0
?
'POST'
:
'PUT'
,
errorresolve
:
1
,
...
...
@@ -34,7 +34,7 @@ function delThemeAd (data) { // 新增或修改主题营销模板
const
{
id
}
=
data
;
return
wxRequest
({
role
:
'2b'
,
url
:
`
apis.business.themeAd.index
/
${
data
.
id
}
`
,
url
:
`
${
apis
.
business
.
themeAd
.
index
}
/
${
data
.
id
}
`
,
data
,
method
:
'DELETE'
,
errorresolve
:
1
,
...
...
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