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
3f19d903
Commit
3f19d903
authored
Mar 19, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
532376ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
138 additions
and
16 deletions
+138
-16
circleindex.js
service/customer/circleindex.js
+0
-9
themeindex.js
service/customer/themeindex.js
+27
-1
landpage.js
src/pages/themeindex/landpage.js
+106
-3
landpage.wxml
src/pages/themeindex/landpage.wxml
+4
-3
landpage.wxss
src/pages/themeindex/landpage.wxss
+1
-0
No files found.
service/customer/circleindex.js
View file @
3f19d903
...
...
@@ -211,14 +211,6 @@ function subjectClassStudent (data) {//主题打卡学员
errorresolve
:
1
,
})
}
function
subjectSignStudents
(
data
)
{
//主题报名学员
return
wxRequest
({
url
:
apis
.
customer
.
circleIndex
.
subjectStudents
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
scoreTrend
(
data
)
{
return
wxRequest
({
url
:
apis
.
customer
.
scoreStatic
.
scoreTrend
,
...
...
@@ -261,7 +253,6 @@ export {
mineClassList
,
studentTasks
,
subjectClassStudent
,
subjectSignStudents
,
reviewScore
,
scoreTrend
,
}
\ No newline at end of file
service/customer/themeindex.js
View file @
3f19d903
...
...
@@ -50,11 +50,37 @@ function getmycalendar (data) {
errorresolve
:
1
,
})
}
function
getmycalendar
(
data
)
{
return
wxRequest
({
url
:
apis
.
customer
.
themeIndex
.
mycalendar
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
subjectSignStudents
(
data
)
{
//主题报名学员
return
wxRequest
({
url
:
apis
.
customer
.
circleIndex
.
subjectStudents
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
function
subjectStudentSign
(
data
)
{
//主题学员报名
return
wxRequest
({
url
:
apis
.
customer
.
circleIndex
.
subjectStudents
,
data
,
method
:
'POST'
,
errorresolve
:
1
,
})
}
export
{
themeDetail
,
userShow
,
organizationUserShow
,
getclockread
,
putclockread
,
getmycalendar
getmycalendar
,
subjectSignStudents
,
subjectStudentSign
}
\ No newline at end of file
src/pages/themeindex/landpage.js
View file @
3f19d903
...
...
@@ -8,10 +8,14 @@ import {
getPrize
,
newLikeIndex
,
newCommentIndex
,
subjectSignStudents
}
from
"../../../service/customer/circleindex.js"
;
import
{
userShow
,
themeDetail
}
from
"../../../service/customer/themeindex.js"
;
import
{
userShow
,
themeDetail
,
subjectSignStudents
,
subjectStudentSign
}
from
"../../../service/customer/themeindex.js"
;
import
{
wxPreviewImage
}
from
"../../../utilities/wxApi.js"
;
import
{
posterLog
,
...
...
@@ -20,10 +24,14 @@ import {
getActivities
}
from
"../../../service/common.js"
;
import
{
getSchoolDetail
}
from
"../../../service/customer/schoolindex.js"
;
import
{
activityprizestatus
}
from
"../../../service/customer/activity.js"
;
import
{
getwechatmobile
,
activityprizestatus
}
from
"../../../service/customer/activity.js"
;
import
{
LocalStorage
,
scenQueryGet
,
imagify
}
from
"../../../utilities/index.js"
;
import
regexp
from
"../../../constants/regexp.js"
;
import
{
studentidentity
}
from
"../../../service/customer/signup.js"
;
var
app
=
getApp
();
Page
({
mixins
:
[
require
(
"../../../mixins/myMins/audioCallback"
)],
...
...
@@ -143,6 +151,7 @@ Page({
onLoad
:
function
(
options
,
b
)
{
// Do some initialize when page load.
const
visitor
=
LocalStorage
.
getItem
(
"visitor"
);
let
that
=
this
;
if
(
options
.
scene
)
{
let
sceneQuery
=
scenQueryGet
(
options
.
scene
);
const
{
i
,
t
,
c
}
=
sceneQuery
;
...
...
@@ -195,6 +204,15 @@ Page({
});
});
this
.
subjectSignStudents
();
wx
.
login
({
success
(
res
)
{
console
.
log
(
res
,
'load'
)
const
sessionCode
=
res
.
code
;
that
.
setData
({
sessionCode
:
sessionCode
})
}
})
},
onShow
:
function
(
options
)
{
if
(
this
.
data
.
needREfresh
||
this
.
data
.
needRefresh
)
{
...
...
@@ -810,6 +828,7 @@ Page({
},
// 去打卡
goClock
(
e
)
{
// 先授权
const
visitor
=
LocalStorage
.
getItem
(
"visitor"
);
if
(
this
.
data
.
circleInfo
.
had_password
)
{
this
.
setData
({
...
...
@@ -1156,5 +1175,89 @@ Page({
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 获取手机号 学员报名
getPhoneNumber
(
e
)
{
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
let
that
=
this
;
const
{
encryptedData
,
iv
}
=
e
.
detail
if
(
!
encryptedData
)
{
wx
.
login
({
success
(
res
)
{
const
sessionCode
=
res
.
code
;
that
.
setData
({
sessionCode
:
sessionCode
})
}
})
wx
.
showToast
({
title
:
'授权失败'
,
icon
:
'none'
,
duration
:
2000
})
return
}
else
{
}
// wx.showLoading({
// title: '手机号获取中',
// })
getwechatmobile
({
code
:
this
.
data
.
sessionCode
,
encryptData
:
encryptedData
,
iv
}).
then
((
res
)
=>
{
wx
.
hideLoading
();
const
{
code
,
data
}
=
res
;
if
(
code
==
200
&&
data
&&
data
.
mobile
)
{
this
.
joinClock
(
data
.
mobile
)
console
.
log
(
res
,
'res'
)
}
else
{
wx
.
showToast
({
title
:
'手机号获取失败'
,
icon
:
'none'
,
duration
:
2000
})
}
wx
.
login
({
success
(
res
)
{
const
sessionCode
=
res
.
code
;
that
.
setData
({
sessionCode
:
sessionCode
})
}
})
}).
catch
((
err
)
=>
{
wx
.
hideLoading
()
wx
.
login
({
success
(
res
)
{
const
sessionCode
=
res
.
code
;
that
.
setData
({
sessionCode
:
sessionCode
})
}
})
})
},
joinClock
(
mobile
)
{
subjectStudentSign
({
subject_source_id
:
this
.
data
.
tid
,
subject_source_type
:
1
,
mobile
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
goClock
()
}
else
{
wx
.
showToast
({
title
:
'加入失败'
})
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
});
src/pages/themeindex/landpage.wxml
View file @
3f19d903
...
...
@@ -10,7 +10,7 @@
<view class="shadow-box"></view>
<view class="title-box">
<view class="title">{{themeSelect.title}}</view>
<view class="time">老师 {{themeSelect.
created_at
}} 发布</view>
<view class="time">老师 {{themeSelect.
start_time
}} 发布</view>
</view>
</view>
<view class="instro-bx" wx:if="{{themeSelect.land_content && themeSelect.land_content.length>0}}">
...
...
@@ -64,7 +64,7 @@
<!-- <view class="text" bindtap="goInviteFriend">邀请好友</view> -->
<view class="section recomend-clockbox">
<view class="title">精选打卡预览(
156
篇打卡)</view>
<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">
...
...
@@ -121,7 +121,8 @@
<view class="tip">邀请你加入</view>
</view>
</view>
<view class="btn btn-clock" bindtap="goClock">加入打卡</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">
...
...
src/pages/themeindex/landpage.wxss
View file @
3f19d903
...
...
@@ -219,6 +219,7 @@ page {
display: flex;
align-items: center;
justify-content: center;
border-radius: 0;
}
.footer-box .footer-innerbox .btn-inviteinfo {
flex: 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