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
7d77c275
Commit
7d77c275
authored
Apr 02, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
08392407
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
32 deletions
+63
-32
themetemplate.js
business/pages/deskcenter/themetemplate.js
+1
-5
newinfo.js
business/pages/organizationalmgt/newinfo.js
+0
-8
index.js
business/pages/themeeditor/index.js
+34
-4
common.js
service/business/common.js
+12
-3
landpage.js
src/pages/calendarthemeindex/landpage.js
+3
-1
landpage.wxml
src/pages/calendarthemeindex/landpage.wxml
+1
-1
landpage.js
src/pages/themeindex/landpage.js
+3
-1
landpage.wxml
src/pages/themeindex/landpage.wxml
+1
-1
index.js
ucenter/index.js
+8
-8
No files found.
business/pages/deskcenter/themetemplate.js
View file @
7d77c275
...
...
@@ -128,12 +128,8 @@ Page({
},
bindTemplateSelected
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
;
wx
.
showToast
({
title
:
`模板id是
${
id
}
`
,
icon
:
'none'
});
wx
.
navigateTo
({
url
:
`/business/pages/themeeditor/index?tid=
${
id
}
&sid=
${
this
.
data
.
sid
}
&editType=1&clone=1
`
url
:
`/business/pages/themeeditor/index?tid=
0&sid=
${
this
.
data
.
sid
}
&editType=1&tempid=
${
id
}
`
})
},
createCustom
()
{
...
...
business/pages/organizationalmgt/newinfo.js
View file @
7d77c275
...
...
@@ -528,14 +528,6 @@ Page({
wx
.
hideLoading
();
if
(
res
.
code
==
200
)
{
// 成功的操作
if
(
this
.
data
.
sid
==
0
)
{
// 新增的操作
LocalStorage
.
setItem
(
'dakarole'
,
1
);
LocalStorage
.
setItem
(
"user"
,
{
token
:
`bearer
${
res
.
data
.
token
}
`
});
LocalStorage
.
setItem
(
"teacher"
,
{
token
:
`bearer
${
res
.
data
.
token
}
`
});
// permissionUtils.myMenulistGet(res.data.id)
wx
.
redirectTo
({
url
:
`/business/pages/organizationalmgt/qxknow?sid=
${
res
.
data
.
id
}
`
});
...
...
business/pages/themeeditor/index.js
View file @
7d77c275
...
...
@@ -27,6 +27,7 @@ import initCalendar, {
}
from
'../../components/calendar/main.js'
;
import
{
erpClassListGet
,
subjectTemplateDetail
}
from
'../../../service/business/common.js'
;
var
app
=
getApp
();
Page
({
...
...
@@ -240,7 +241,9 @@ Page({
],
radioname
:
''
,
confirmId
:
0
,
// has_subjects_count: 0
// has_subjects_count: 0,
tempid
:
0
,
//作业模板id,
},
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
that
=
this
;
...
...
@@ -251,6 +254,7 @@ Page({
my
,
classes
,
editType
,
tempid
}
=
options
;
this
.
setData
({
tid
,
...
...
@@ -258,6 +262,7 @@ Page({
sid
:
sid
||
''
,
my
:
my
||
0
,
editType
,
tempid
:
tempid
||
0
});
if
(
tid
==
0
)
{
const
currentclasses
=
classes
?
JSON
.
parse
(
decodeURIComponent
(
classes
))
:
[];
...
...
@@ -267,6 +272,9 @@ Page({
wx
.
setNavigationBarTitle
({
title
:
'新建作业打卡'
})
if
(
tempid
&&
tempid
!=
0
){
this
.
loadThemeTemplate
()
}
this
.
setData
({
classes
:
currentclasses
,
'params.join_rule_type'
:
currentclasses
.
length
>
0
?
4
:
1
...
...
@@ -738,6 +746,31 @@ Page({
wx
.
hideLoading
()
})
},
loadThemeTemplate
(){
wx
.
showLoading
({
title
:
'数据加载中...'
})
subjectTemplateDetail
({
id
:
this
.
data
.
tempid
}).
then
(
res
=>
{
wx
.
hideLoading
();
const
{
code
,
data
}
=
res
;
if
(
code
==
200
){
let
_content
=
[];
try
{
_content
=
JSON
.
parse
(
data
.
content
);
}
catch
(
error
)
{
_content
=
[]
}
this
.
setData
({
'params.title'
:
data
.
title
,
'params.content'
:
_content
,
})
}
}).
catch
((
err
)
=>
{
wx
.
hideLoading
()
})
},
titleInput
(
e
)
{
const
{
value
...
...
@@ -852,7 +885,6 @@ Page({
rest_dates
:
restdates
.
join
(
','
),
content_id
:
this
.
data
.
calendarThemeAdInfo
.
id
,
})
console
.
log
(
data
,
'data'
);
themeEditor
(
data
).
then
((
res
)
=>
{
const
{
code
,
...
...
@@ -2022,7 +2054,6 @@ Page({
lockSubjects
:
lockSubjects
,
lockSubjectLists
:
lockSubjects
.
slice
(
this
.
data
.
currentSortIndex
*
10
,
this
.
data
.
currentSortIndex
*
10
+
10
),
})
console
.
log
(
this
.
data
.
lockSubjectLists
,
'lockSubjectLists1'
)
this
.
getSubjectSort
();
}
else
{
const
that
=
this
;
...
...
@@ -2401,7 +2432,6 @@ Page({
lockSubjectLists
:
lockSubjects
.
slice
(
this
.
data
.
currentSortIndex
*
10
,
this
.
data
.
currentSortIndex
*
10
+
10
)
})
console
.
log
(
this
.
data
.
lockSubjects
,
this
.
data
.
lockSubjectLists
,
'关卡'
,
this
.
data
.
currentSortIndex
*
10
,
this
.
data
.
currentSortIndex
*
10
+
10
)
this
.
getSubjectSort
();
}
}).
catch
(()
=>
{
...
...
service/business/common.js
View file @
7d77c275
...
...
@@ -398,10 +398,18 @@ function getSubjectTemplates(data){
method
:
'GET'
,
data
,
errorresolve
:
1
,
// needToken: true
needToken
:
true
})
}
function
subjectTemplateDetail
(
data
){
return
wxRequest
({
role
:
'2b'
,
url
:
`
${
apis
.
business
.
common
.
subjectTemplates
}
/
${
data
.
id
}
`
,
method
:
'GET'
,
errorresolve
:
1
,
needToken
:
true
})
}
export
{
nicknameGet
,
...
...
@@ -444,5 +452,6 @@ export {
analyzeclasscourseGet
,
analyzeDashboardGet
,
getUuid
,
getSubjectTemplates
getSubjectTemplates
,
subjectTemplateDetail
}
\ No newline at end of file
src/pages/calendarthemeindex/landpage.js
View file @
7d77c275
...
...
@@ -123,6 +123,7 @@ Page({
secret
:
""
,
//加入的密码
studentMobile
:
""
,
//手机号
hadAuthMobile
:
false
,
// 授权成功但未加入成功,只为页面记录状态不再重复授权
w
:
0
,
//页面来源分享的学生id
fromShareInfo
:
{},
scoreFeedBackStatus
:
{
...
...
@@ -965,7 +966,8 @@ Page({
that
.
setData
({
sessionCode
:
that
.
data
.
sessionCode
,
encryptData
:
encryptedData
,
iv
iv
,
hadAuthMobile
:
true
,
});
if
(
this
.
data
.
themeSelect
.
join_rule_type
==
3
)
{
this
.
setData
({
...
...
src/pages/calendarthemeindex/landpage.wxml
View file @
7d77c275
...
...
@@ -132,7 +132,7 @@
<view class="tip">学校首页</view>
</view>
<!-- 没有手机号 需要授权-->
<button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{studentMobile==''}}">加入打卡</button>
<button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{studentMobile==''
|| !hadAuthMobile
}}">加入打卡</button>
<view class="btn btn-clock" bindtap="goClock">{{themeSelect.is_join==1 ? (themeSelect.is_clock ? '已打卡' : '去打卡') : '加入打卡'}}</view>
</view>
</view>
...
...
src/pages/themeindex/landpage.js
View file @
7d77c275
...
...
@@ -129,6 +129,7 @@ Page({
secret
:
''
,
//加入的密码
studentMobile
:
''
,
//手机号
encryptedData
:
''
,
hadAuthMobile
:
false
,
// 授权成功但未加入成功,只为页面记录状态不再重复授权
w
:
0
,
//页面来源分享的学生id
fromShareInfo
:
{},
},
...
...
@@ -957,7 +958,8 @@ Page({
that
.
setData
({
sessionCode
:
that
.
data
.
sessionCode
,
encryptData
:
encryptedData
,
iv
iv
,
hadAuthMobile
:
true
});
if
(
this
.
data
.
themeSelect
.
join_rule_type
==
3
)
{
this
.
setData
({
...
...
src/pages/themeindex/landpage.wxml
View file @
7d77c275
...
...
@@ -133,7 +133,7 @@
<view class="tip">学校首页</view>
</view>
<!-- 没有手机号 需要授权 -->
<button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{studentMobile==''}}">加入打卡</button>
<button class="btn btn-clock" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{studentMobile==''
|| !hadAuthMobile
}}">加入打卡</button>
<view class="btn btn-clock" bindtap="goClock" wx:else>{{themeSelect.is_join==1 ? (themeSelect.is_clock ? '已打卡' : '去打卡') : '加入打卡'}}</view>
</view>
</view>
...
...
ucenter/index.js
View file @
7d77c275
...
...
@@ -333,22 +333,22 @@ Page({
getMember
()
.
then
(
res
=>
{
const
{
data
,
code
}
=
res
;
if
(
code
==
400
00
)
{
if
(
code
==
2
00
)
{
// 没绑定微信或者没有校区
wx
.
navigateTo
({
url
:
`/business/pages/organizationalmgt/newinfo`
});
}
else
if
(
code
==
200
)
{
}
else
if
(
code
==
200
0
)
{
this
.
setData
({
loginStatus
:
1
})
if
(
data
.
member
.
length
+
data
.
teacher
.
length
>
0
)
{
LocalStorage
.
setItem
(
"user"
,
{
token
:
`bearer
${
data
.
token
}
`
});
LocalStorage
.
setItem
(
"teacher"
,
{
token
:
`bearer
${
data
.
token
}
`
});
//
LocalStorage.setItem("user", {
//
token: `bearer ${data.token}`
//
});
//
LocalStorage.setItem("teacher", {
//
token: `bearer ${data.token}`
//
});
wx
.
navigateTo
({
url
:
`/business/pages/exchangebusiness/index?from=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