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
ef36a12c
Commit
ef36a12c
authored
Mar 28, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wxl-user-optimize' of git.server:wangxuelai/wechatapp.shangjiadao.com into lvtz_clock
parents
ed83cd7d
c0e14121
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
153 additions
and
57 deletions
+153
-57
index.js
business/pages/calendarthemeindex/index.js
+5
-0
index.wxml
business/pages/calendarthemeindex/index.wxml
+1
-1
clocklist.js
business/pages/deskcenter/clocklist.js
+22
-26
index.js
business/pages/themead/index.js
+43
-11
index.json
business/pages/themead/index.json
+1
-1
index.wxml
business/pages/themead/index.wxml
+4
-2
list.js
business/pages/themead/list.js
+2
-0
list.wxss
business/pages/themead/list.wxss
+5
-1
index.js
business/pages/themeeditor/index.js
+26
-8
lockthemelist.js
business/pages/themeeditor/lockthemelist.js
+1
-1
setting.js
business/pages/themeeditor/setting.js
+8
-0
setting.wxml
business/pages/themeeditor/setting.wxml
+2
-2
setting.wxss
business/pages/themeeditor/setting.wxss
+21
-0
subjecteditor.js
business/pages/themeeditor/subjecteditor.js
+5
-2
index.js
business/pages/themeindex/index.js
+6
-1
index.wxml
business/pages/themeindex/index.wxml
+1
-1
No files found.
business/pages/calendarthemeindex/index.js
View file @
ef36a12c
...
...
@@ -1546,5 +1546,10 @@ Page({
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/index?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&editType=2`
});
},
goEditLandcontent
()
{
wx
.
navigateTo
({
url
:
`/business/pages/themead/index?id=
${
this
.
data
.
params
.
content_id
}
&sid=
${
this
.
data
.
sid
}
&editType=2`
})
}
});
business/pages/calendarthemeindex/index.wxml
View file @
ef36a12c
...
...
@@ -255,7 +255,7 @@
<image class="icon-arr" src="{{imageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
<view class="setting-item">
<view class="setting-item"
bindtap="goEditLandcontent"
>
<view class="left">
<view class="item-label">打卡营销页设置</view>
<view class="item-desc">配置此页面后可在学生加入打卡前展示,此功能可收集有意向学生的联系方式。 <text class="more-tip">了解更多</text></view>
...
...
business/pages/deskcenter/clocklist.js
View file @
ef36a12c
...
...
@@ -486,13 +486,13 @@ Page({
!
needIosWarn
)
{
if
(
mockStatus
==
2
)
{
itemList
=
[
text
,
"删除"
];
itemList
=
[
'复制'
,
text
,
"删除"
];
}
else
{
itemList
=
[
"发布"
,
text
,
"删除"
];
}
}
else
{
if
(
mockStatus
==
2
)
{
itemList
=
[
text
,
"删除"
,
"取消"
];
itemList
=
[
'复制'
,
text
,
"删除"
,
"取消"
];
}
else
{
itemList
=
[
"发布"
,
text
,
"删除"
,
"取消"
];
}
...
...
@@ -503,12 +503,12 @@ Page({
itemList
:
itemList
,
success
(
res
)
{
const
{
tapIndex
}
=
res
;
// if (tapIndex == 0
) {
// that.setData({
// showcopybox: true,
// selectedtheme: theme
//
})
// } else
if
(
tapIndex
==
0
&&
mockStatus
==
2
)
{
const
url
=
`/business/pages/themeeditor/index?tid=
${
theme
.
id
}
&sid=
${
that
.
data
.
sid
}
&classes=
${
encodeURIComponent
(
'[]'
)}
&editType=
${
theme
.
subject_type
}
&clone=1`
;
wx
.
navigateTo
({
url
,
})
}
if
(
tapIndex
==
0
&&
mockStatus
!=
2
)
{
if
(
that
.
data
.
unlockHadEditTatol
>
0
)
{
unlockSubjectRelease
({
...
...
@@ -537,13 +537,10 @@ Page({
});
}
}
if
(
(
tapIndex
==
0
&&
mockStatus
==
2
)
||
(
tapIndex
==
1
&&
mockStatus
!=
2
)
)
{
if
(
tapIndex
==
1
)
{
that
.
unlocksubjectplacetop
(
theme
);
}
if
(
(
tapIndex
==
1
&&
mockStatus
==
2
)
||
tapIndex
==
2
)
{
if
(
tapIndex
==
2
)
{
that
.
setData
({
deleteBox
:
true
,
// 确认删除主题
deleteTheme
:
theme
,
...
...
@@ -569,10 +566,14 @@ Page({
success
(
res
)
{
const
{
tapIndex
}
=
res
;
if
(
tapIndex
==
0
)
{
that
.
setData
({
showcopybox
:
true
,
selectedtheme
:
theme
});
// that.setData({
// showcopybox: true,
// selectedtheme: theme
// });
const
url
=
`/business/pages/themeeditor/index?tid=
${
theme
.
id
}
&sid=
${
that
.
data
.
sid
}
&classes=
${
encodeURIComponent
(
'[]'
)}
&editType=
${
theme
.
subject_type
}
&clone=1`
;
wx
.
navigateTo
({
url
,
})
}
if
(
tapIndex
==
1
)
{
that
.
subjectsplacetop
(
theme
,
listindex
,
index
);
...
...
@@ -687,15 +688,10 @@ Page({
this
.
setData
({
showcopybox
:
false
});
if
(
this
.
data
.
selectedtheme
.
subject_type
==
1
)
{
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/index?tid=
${
this
.
data
.
selectedtheme
.
id
}
&id=
${
this
.
data
.
selectedCopyClass
}
&clone=1&sid=
${
this
.
data
.
sid
}
`
});
}
else
if
(
this
.
data
.
selectedtheme
.
subject_type
==
2
)
{
wx
.
navigateTo
({
url
:
`/business/pages/calendarthemeeditor/index?tid=
${
this
.
data
.
selectedtheme
.
id
}
&id=
${
this
.
data
.
selectedCopyClass
}
&clone=1&sid=
${
this
.
data
.
sid
}
`
});
}
const
url
=
`/business/pages/themeeditor/index?tid=
${
this
.
data
.
selectedtheme
.
id
}
&sid=
${
this
.
data
.
sid
}
&classes=
${
encodeURIComponent
(
'[]'
)}
&editType=
${
this
.
data
.
selectedtheme
.
subject_type
}
&clone=1`
;
wx
.
navigateTo
({
url
,
})
},
// 删除打卡主题
...
...
business/pages/themead/index.js
View file @
ef36a12c
...
...
@@ -169,21 +169,54 @@ Page({
})
return
;
}
if
(
this
.
data
.
has_subject
)
{
wx
.
showModal
({
title
:
'修改后的模板将覆盖之前的内容'
,
confirmText
:
'确定'
,
// showCancel: false,
success
(
res
)
{
if
(
res
.
confirm
)
{
that
.
saveLockPost
();
}
}
})
return
;
}
this
.
saveLockPost
();
},
saveLockPost
()
{
const
that
=
this
;
const
{
params
}
=
this
.
data
// if (params.title.trim() == '') {
// wx.showToast({
// title: '请输入模板名称',
// duration: 1500,
// icon: 'none',
// })
// return;
// }
// if (params.name.trim() == '') {
// wx.showToast({
// title: '请输入老师姓名',
// duration: 1500,
// icon: 'none',
// })
// return;
// }
// if (params.mobile == '' && params.img=='') {
// wx.showToast({
// title: '请添加手机号码或者上传微信二维码',
// duration: 1500,
// icon: 'none',
// })
// return;
// }
if
(
this
.
data
.
publishing
)
{
return
}
this
.
data
.
publishing
=
true
;
const
sjdMediaEditor
=
this
.
selectComponent
(
'#sjd-media-editor'
);
let
content
=
JSON
.
parse
(
JSON
.
stringify
(
sjdMediaEditor
.
data
.
content
));
let
_content
=
content
.
filter
((
ele
)
=>
ele
.
value
.
trim
()
!=
''
);
_content
.
forEach
((
ele
)
=>
{
if
(
ele
.
type
==
'video'
&&
ele
.
poster
)
{
delete
ele
.
poster
;
}
})
params
.
content
=
JSON
.
stringify
(
_content
);
const
{
introduceContent
}
=
this
.
data
;
const
sjdMediaEditorList
=
[]
const
sjdMediaEditorList
=
[]
;
for
(
let
i
=
0
;
i
<
introduceContent
.
length
;
i
++
){
const
sjdMediaEditor
=
this
.
selectComponent
(
`#sjd-media-editor
${
i
}
`
);
let
content
=
JSON
.
parse
(
JSON
.
stringify
(
sjdMediaEditor
.
data
.
content
));
...
...
@@ -200,7 +233,6 @@ Page({
}
catch
(
error
)
{
}
wx
.
showLoading
({
title
:
'保存中...'
});
...
...
business/pages/themead/index.json
View file @
ef36a12c
{
"navigationBarTitleText"
:
"
打卡
营销页设置"
,
"navigationBarTitleText"
:
"营销页设置"
,
"usingComponents"
:
{
"sjd-media-editor"
:
"../../../components/sjdmediaeditor"
,
"w-switch"
:
"/dist/w-switch/index"
,
...
...
business/pages/themead/index.wxml
View file @
ef36a12c
...
...
@@ -30,8 +30,10 @@
<view class="tips">点击修改标题,最多15个字</view>
</view> -->
<view>
<sjd-media-editor content="{{item.content}}"
id="sjd-media-editor{{index}}" sid="{{sid}}"
<sjd-media-editor
content="{{item.content}}"
id="sjd-media-editor{{index}}"
sid="{{sid}}"
haveAddVoice="{{true}}"
haveAddWxfile="{{true}}"
bind:addVoice="addVoice"
...
...
business/pages/themead/list.js
View file @
ef36a12c
...
...
@@ -69,6 +69,7 @@ Page({
page
:
this
.
data
.
page
,
perPage
:
this
.
data
.
perPage
,
school_id
:
this
.
data
.
sid
,
first_id
:
this
.
data
.
id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
this
.
setData
({
...
...
@@ -80,6 +81,7 @@ Page({
if
(
data
.
total
)
{
this
.
data
.
total
=
data
.
total
;
}
// data.list = data.list.splice(1,2);
data
.
list
.
forEach
((
ele
)
=>
{
let
content
=
[];
try
{
...
...
business/pages/themead/list.wxss
View file @
ef36a12c
...
...
@@ -2,6 +2,7 @@
min-height: 100vh;
background-color: #fff;
padding: 0 20rpx 28rpx;
position: relative;
}
.helpenterbox {
text-align: right;
...
...
@@ -11,6 +12,9 @@
color: #16b0fd;
font-size: 22rpx;
}
.listbox {
position: relative;
}
.listitem {
border: 1px solid #ebedf0;
border-radius: 4rpx;
...
...
@@ -80,7 +84,7 @@
border-radius: 4rpx;
}
.btn-add {
position:
fixed
;
position:
absolute
;
left: 50%;
transform: translateX(-50%);
height: 148rpx;
...
...
business/pages/themeeditor/index.js
View file @
ef36a12c
...
...
@@ -293,7 +293,7 @@ Page({
});
}
else
if
(
editType
==
2
)
{
wx
.
setNavigationBarTitle
({
title
:
'编辑
作业
打卡'
title
:
'编辑
日历
打卡'
})
this
.
loadCalendarThemeData
({
tid
,
...
...
@@ -301,7 +301,7 @@ Page({
});
}
else
if
(
editType
==
3
)
{
wx
.
setNavigationBarTitle
({
title
:
'编辑
作业
打卡'
title
:
'编辑
闯关
打卡'
})
this
.
unlockSubjectShow
();
}
...
...
@@ -878,7 +878,8 @@ Page({
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
}
prevPage
.
setData
({
showRefresh
:
true
showRefresh
:
true
,
needRefresh
:
true
,
});
wx
.
navigateBack
({
delta
:
1
,
// 回退前 delta(默认为1) 页面
...
...
@@ -1742,7 +1743,14 @@ Page({
// 视频播放相关代码
// 跳转到营销列表页面
goyinxiaoPage
()
{
let
id
=
this
.
data
.
themeAdInfo
.
id
||
0
;
let
id
=
0
;
if
(
this
.
data
.
editType
==
1
)
{
id
=
this
.
data
.
themeAdInfo
.
id
||
0
;
}
else
if
(
this
.
data
.
editType
==
2
)
{
id
=
this
.
data
.
calendarThemeAdInfo
.
id
||
0
;
}
else
if
(
this
.
data
.
editType
==
3
)
{
id
=
this
.
data
.
lockThemeAdInfo
.
id
||
0
;
}
wx
.
navigateTo
({
url
:
`/business/pages/themead/list?sid=
${
this
.
data
.
sid
}
&id=
${
id
}
&editType=
${
this
.
data
.
editType
}
`
,
})
...
...
@@ -2036,7 +2044,7 @@ Page({
addSort
=
1
;
}
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/subjecteditor?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&addSort=
${
addSort
}
&sort=
${
sort
}
&id=
${
item
.
id
}
&index=
${
index
}
¤tSortIndex=
${
this
.
data
.
currentSortIndex
}
&from=edit`
,
url
:
`/business/pages/themeeditor/subjecteditor?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&addSort=
${
addSort
}
&sort=
${
sort
}
&id=
${
item
.
id
}
&index=
${
index
}
¤tSortIndex=
${
this
.
data
.
currentSortIndex
}
&from=edit
&clone=
${
this
.
data
.
clone
||
0
}
`
,
})
},
checknameIpt
(
e
)
{
...
...
@@ -2246,6 +2254,14 @@ Page({
}
}
}
if
(
this
.
data
.
lockThemeAdInfo
.
id
==
0
)
{
wx
.
showToast
({
title
:
'请选择打卡营销页'
,
duration
:
1500
,
icon
:
'none'
,
})
return
;
}
if
(
this
.
data
.
publishing
)
{
return
}
...
...
@@ -2262,16 +2278,18 @@ Page({
}
this
.
data
.
lockparams
.
content_id
=
this
.
data
.
lockThemeAdInfo
.
id
;
wx
.
showLoading
(
'保存中...'
);
wx
.
showLoading
({
title
:
'保存中...'
,
mask
:
true
});
const
subject_ids
=
this
.
data
.
lockSubjects
.
map
(
ele
=>
ele
.
id
).
join
(
','
);
this
.
data
.
lockparams
.
subject_ids
=
subject_ids
;
unlockSubjectEditor
({
tid
:
this
.
data
.
clone
==
'clone'
?
0
:
this
.
data
.
tid
,
tid
:
this
.
data
.
clone
==
1
?
0
:
this
.
data
.
tid
,
data
:
this
.
data
.
lockparams
,
school_id
:
this
.
data
.
sid
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
res
.
code
==
200
)
{
this
.
setData
({
confirmId
:
data
.
id
,
...
...
business/pages/themeeditor/lockthemelist.js
View file @
ef36a12c
...
...
@@ -150,7 +150,7 @@ Page({
toEdit
()
{
const
that
=
this
;
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/index?id=0&tid=
${
this
.
data
.
tid
}
&sid=
tid=
${
this
.
data
.
sid
}
&classes=[]&editType=3`
,
url
:
`/business/pages/themeeditor/index?id=0&tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&classes=[]&editType=3`
,
success
()
{
that
.
closeSettingModal
()
}
...
...
business/pages/themeeditor/setting.js
View file @
ef36a12c
...
...
@@ -404,6 +404,14 @@ Page({
})
},
sureChangePsd
()
{
const
reg
=
/^
[\d]{6,12}
$/
;
if
(
!
reg
.
test
(
this
.
data
.
copy_join_secret
))
{
wx
.
showToast
({
title
:
'请输入6-12位的数字密码'
,
icon
:
'none'
})
return
;
}
this
.
setData
({
psdshow
:
false
,
join_secret
:
this
.
data
.
copy_join_secret
,
...
...
business/pages/themeeditor/setting.wxml
View file @
ef36a12c
...
...
@@ -201,8 +201,8 @@
<view class="modal-dialog" wx:if="{{psdshow}}">
<view class="modal-mask"></view>
<view class="modal-box">
<input type="number" placeholder="请输入密码" value="{{join_secret}}" bindinput="inputPsd" />
<view>
<input type="number" placeholder="请输入密码"
class="inputPsd"
value="{{join_secret}}" bindinput="inputPsd" />
<view
class="modal-btn-box"
>
<view class="modal-btn" bindtap="hideChangePsd">关闭</view>
<view class="modal-btn" bindtap="sureChangePsd">确定</view>
</view>
...
...
business/pages/themeeditor/setting.wxss
View file @
ef36a12c
...
...
@@ -177,10 +177,15 @@ picker .icon-arr{
font-size: 28rpx;
color: #000;
}
.modal-btn-box {
display: flex;
align-items: center;
}
.modal-dialog .modal-box .modal-btn{
width: 100%;
height: 100rpx;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
border-top: 1px solid rgba(0,0,0,.05);
...
...
@@ -188,6 +193,22 @@ picker .icon-arr{
color: #434343;
font-weight: bold;
}
.modal-dialog .modal-box .inputPsd {
width: 420rpx;
height: 78rpx;
border-radius: 38rpx;
background:rgba(238,238,237,1);
display: block;
margin: 80rpx auto;
text-align: center;
padding: 0 30rpx;
}
.modal-dialog .modal-box .modal-btn:first-child {
border-right: 1px solid rgba(0,0,0,.05);
}
.modal-dialog .modal-box .modal-btn:last-child {
color: #65B8F4;
}
.borderbottom1px {
border-bottom: 1px solid #F1F2F3;
}
\ No newline at end of file
business/pages/themeeditor/subjecteditor.js
View file @
ef36a12c
...
...
@@ -72,9 +72,11 @@ Page({
videoId
:
''
,
src
:
''
},
clone
:
0
,
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
{
clone
,
id
,
index
,
currentSortIndex
,
...
...
@@ -94,6 +96,7 @@ Page({
index
,
currentSortIndex
,
from
,
clone
,
// params: JSON.parse(decodeURIComponent(detail)),
})
if
(
this
.
data
.
id
>
0
)
{
...
...
@@ -236,12 +239,12 @@ Page({
_params
.
content
=
JSON
.
stringify
(
_content
);
const
paramsData
=
Object
.
assign
(
_params
,
{
school_id
:
this
.
data
.
sid
,
id
:
this
.
data
.
id
,
id
:
this
.
data
.
clone
==
1
?
0
:
this
.
data
.
id
,
sort
:
this
.
data
.
sort
,
is_cheat
:
0
,
is_encrypt
:
0
,
subject_type
:
3
,
unlock_mode_id
:
this
.
data
.
tid
unlock_mode_id
:
this
.
data
.
clone
==
1
?
0
:
this
.
data
.
tid
})
if
(
this
.
data
.
addSort
==
1
)
{
const
that
=
this
;
...
...
business/pages/themeindex/index.js
View file @
ef36a12c
...
...
@@ -241,6 +241,7 @@ Page({
themeDetail
({
id
:
this
.
data
.
tid
,
school_id
:
this
.
data
.
sid
,
extra
:
'land_content'
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
...
...
@@ -289,7 +290,6 @@ Page({
path
:
`/src/pages/themeindex/index?tid=
${
this
.
data
.
tid
}
&id=
${
data
.
class_id
}
`
}
})
this
.
setData
({
id
:
data
.
class_id
,
params
:
Object
.
assign
(
data
,
{
...
...
@@ -1292,5 +1292,10 @@ Page({
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/index?tid=
${
this
.
data
.
tid
}
&sid=
${
this
.
data
.
sid
}
&editType=1`
})
},
goEditLandcontent
()
{
wx
.
navigateTo
({
url
:
`/business/pages/themead/index?id=
${
this
.
data
.
params
.
content_id
}
&sid=
${
this
.
data
.
sid
}
&editType=1`
})
}
})
\ No newline at end of file
business/pages/themeindex/index.wxml
View file @
ef36a12c
...
...
@@ -202,7 +202,7 @@
<image class="icon-arr" src="{{imageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
<view class="setting-item">
<view class="setting-item"
bindtap="goEditLandcontent"
>
<view class="left">
<view class="item-label">打卡营销页设置</view>
<view class="item-desc">配置此页面后可在学生加入打卡前展示,此功能可收集有意向学生的联系方式。 <text class="more-tip">了解更多</text></view>
...
...
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