Commit 21720f1a authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/lvtz_clock' into wxl-user-optimize

parents d3c80ecd 78cd6166
...@@ -194,12 +194,10 @@ Page({ ...@@ -194,12 +194,10 @@ Page({
let sceneQuery = newScenQueryGet(options.scene); let sceneQuery = newScenQueryGet(options.scene);
if (sceneQuery.type == 1) { if (sceneQuery.type == 1) {
const { const {
i,
t, t,
d d
} = sceneQuery.queryObj; } = sceneQuery.queryObj;
this.setData({ this.setData({
id: i,
tid: t, tid: t,
d: d || '', d: d || '',
pagefrom: '', pagefrom: '',
...@@ -216,7 +214,6 @@ Page({ ...@@ -216,7 +214,6 @@ Page({
} }
} else { } else {
const { const {
id,
tid, tid,
sid, sid,
d, d,
...@@ -224,7 +221,6 @@ Page({ ...@@ -224,7 +221,6 @@ Page({
integral integral
} = options; } = options;
this.setData({ this.setData({
id,
tid, tid,
sid: sid || 0, sid: sid || 0,
d: d || '', d: d || '',
...@@ -323,7 +319,7 @@ Page({ ...@@ -323,7 +319,7 @@ Page({
const clockdate = _activeDay.year + month + day; const clockdate = _activeDay.year + month + day;
let myBaseinfo = this.data.myBaseinfo; let myBaseinfo = this.data.myBaseinfo;
let initShareObj = { let initShareObj = {
title: `我正在参加【${this.data.circleInfo.title}】的打卡`, title: `我正在参加【${this.data.themeSelect.title}】的打卡`,
path: `/src/pages/beforeinvitation/index?tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&d=${clockdate.substr(2)}&w=${app.globalData.currentSchoolStudentId}` path: `/src/pages/beforeinvitation/index?tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&d=${clockdate.substr(2)}&w=${app.globalData.currentSchoolStudentId}`
} }
if (from == 'menu') { if (from == 'menu') {
...@@ -346,12 +342,12 @@ Page({ ...@@ -346,12 +342,12 @@ Page({
source_id: clockDetail.id, source_id: clockDetail.id,
source_type_model: 4, source_type_model: 4,
param: JSON.stringify({ param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${app.globalData.currentSchoolStudentId}` query: `&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${app.globalData.currentSchoolStudentId}`
}) })
}); });
shareObj = { shareObj = {
title: `${myBaseinfo.nickname}的打卡详情`, title: `${myBaseinfo.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${app.globalData.currentSchoolStudentId}` path: `/src/pages/clockdetail/newindex?tid=${this.data.themeSelect.id}&cid=${clockDetail.id}&w=${app.globalData.currentSchoolStudentId}`
} }
}else if (target.dataset.info) { }else if (target.dataset.info) {
const { const {
...@@ -384,12 +380,12 @@ Page({ ...@@ -384,12 +380,12 @@ Page({
source_id: info.id, source_id: info.id,
source_type_model: 4, source_type_model: 4,
param: JSON.stringify({ param: JSON.stringify({
query: `id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${app.globalData.currentSchoolStudentId}` query: `tid=${this.data.themeSelect.id}&cid=${info.id}&w=${app.globalData.currentSchoolStudentId}`
}) })
}); });
shareObj = { shareObj = {
title: `${info.school_student.nickname}的打卡详情`, title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=${info.id}&w=${app.globalData.currentSchoolStudentId}` path: `/src/pages/clockdetail/newindex?tid=${this.data.themeSelect.id}&cid=${info.id}&w=${app.globalData.currentSchoolStudentId}`
} }
}else{ }else{
app.setSharerLog({ app.setSharerLog({
...@@ -732,7 +728,7 @@ Page({ ...@@ -732,7 +728,7 @@ Page({
// concatDiaShow: true // concatDiaShow: true
// }) // })
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/contactindex/index?sid=${this.data.circleInfo.school_id}`, url: `/src/pages/contactindex/index?sid=${this.data.sid}`,
}) })
}, },
// 联系方式弹窗相关 // 联系方式弹窗相关
...@@ -896,7 +892,6 @@ Page({ ...@@ -896,7 +892,6 @@ Page({
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
if (this.data.auditStatus == 1) { // 点击审核 if (this.data.auditStatus == 1) { // 点击审核
joinCircle({ joinCircle({
class_id: this.data.id,
consumer_id: visitor && visitor.id, consumer_id: visitor && visitor.id,
student_id: this.data.studentId, student_id: this.data.studentId,
school_id: this.data.sid, school_id: this.data.sid,
...@@ -1114,7 +1109,7 @@ Page({ ...@@ -1114,7 +1109,7 @@ Page({
const clockdate = _activeDay.year + '-' + month + '-' + day; const clockdate = _activeDay.year + '-' + month + '-' + day;
if (this.data.themeSelect.my_clock_circle_user) { // if (this.data.themeSelect.my_clock_circle_user) { //
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}` url: `/src/pages/clockeditor/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}`
}) })
} else { } else {
if (this.data.circleInfo.had_password) { if (this.data.circleInfo.had_password) {
...@@ -1123,7 +1118,7 @@ Page({ ...@@ -1123,7 +1118,7 @@ Page({
}) })
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}` url: `/src/pages/clockeditor/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}`
}) })
} }
} }
...@@ -1140,7 +1135,7 @@ Page({ ...@@ -1140,7 +1135,7 @@ Page({
} }
if (this.data.themeSelect.my_clock_circle_user) { if (this.data.themeSelect.my_clock_circle_user) {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/readthemeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}` url: `/src/pages/readthemeindex/index?tid=${this.data.themeSelect.id}&cid=0&pagefrom=calendarthemeindex&clockdate=${clockdate}`
}) })
} else { } else {
if (this.data.circleInfo.had_password) { if (this.data.circleInfo.had_password) {
...@@ -1149,7 +1144,7 @@ Page({ ...@@ -1149,7 +1144,7 @@ Page({
}) })
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/readthemeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=circleindex&clockdate=${clockdate}` url: `/src/pages/readthemeindex/index?tid=${this.data.themeSelect.id}&cid=0&pagefrom=circleindex&clockdate=${clockdate}`
}) })
} }
} }
...@@ -1161,7 +1156,7 @@ Page({ ...@@ -1161,7 +1156,7 @@ Page({
showNameSetDia: false showNameSetDia: false
}) })
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=themeindex` url: `/src/pages/clockeditor/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}&cid=0&pagefrom=themeindex`
}) })
}, },
closenamedia() { closenamedia() {
...@@ -1169,7 +1164,7 @@ Page({ ...@@ -1169,7 +1164,7 @@ Page({
showNameSetDia: false showNameSetDia: false
}, () => { }, () => {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&cid=0&pagefrom=themeindex` url: `/src/pages/clockeditor/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}&cid=0&pagefrom=themeindex`
}) })
}) })
}, },
...@@ -1194,7 +1189,7 @@ Page({ ...@@ -1194,7 +1189,7 @@ Page({
// 加入圈子输入码相关代码 // 加入圈子输入码相关代码
goCircleIndex() { goCircleIndex() {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/circleindex/index?id=${this.data.id}` url: `/src/pages/circleindex/index`
}) })
}, },
openLocation(e) { openLocation(e) {
...@@ -1468,14 +1463,14 @@ Page({ ...@@ -1468,14 +1463,14 @@ Page({
// 视频播放相关代码 // 视频播放相关代码
goindex() { goindex() {
wx.reLaunch({ wx.reLaunch({
url: `/src/pages/websiteindex/index?sid=${this.data.circleInfo.school_id}` url: `/src/pages/websiteindex/index?sid=${this.data.sid}`
}) })
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
if (!this.data.isSchoolStudent && this.data.pageScene) { if (!this.data.isSchoolStudent && this.data.pageScene) {
activityLog({ activityLog({
type: 27, type: 27,
open_id: visitor && visitor.openid, open_id: visitor && visitor.openid,
school_id: this.data.circleInfo.school_id, school_id: this.data.sid,
remark: '' remark: ''
}) })
} }
...@@ -1992,7 +1987,7 @@ Page({ ...@@ -1992,7 +1987,7 @@ Page({
}, },
goRankList() { goRankList() {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/themeranklist/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/themeranklist/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
}) })
}, },
goMycalendart() { goMycalendart() {
...@@ -2001,7 +1996,7 @@ Page({ ...@@ -2001,7 +1996,7 @@ Page({
const day = Number(_activeDay.day) < 10 ? '0' + _activeDay.day : _activeDay.day const day = Number(_activeDay.day) < 10 ? '0' + _activeDay.day : _activeDay.day
const clockdate = _activeDay.year + '-' + month + '-' + day; const clockdate = _activeDay.year + '-' + month + '-' + day;
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/mycalendart/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&clockdate=${clockdate}` url: `/src/pages/mycalendart/index?tid=${this.data.themeSelect.id}&clockdate=${clockdate}`
}) })
}, },
numberDate(date) { numberDate(date) {
...@@ -2034,7 +2029,7 @@ Page({ ...@@ -2034,7 +2029,7 @@ Page({
page: `src/pages/clockdetail/newindex` page: `src/pages/clockdetail/newindex`
// scene: `ctd=${visitor && visitor.id}&t=${this.data.tid}`, // scene: `ctd=${visitor && visitor.id}&t=${this.data.tid}`,
// page: `src/pages/beforeinvitation/index` // page: `src/pages/beforeinvitation/index`
// scene: `i=${this.data.id}&t=${this.data.tid}&p=7`, // scene: `t=${this.data.tid}&p=7`,
// page: `src/pages/themeindex/index` // page: `src/pages/themeindex/index`
}).then((res) => { }).then((res) => {
const { const {
...@@ -2060,7 +2055,6 @@ Page({ ...@@ -2060,7 +2055,6 @@ Page({
type: 1, type: 1,
school_id: this.data.sid, school_id: this.data.sid,
student_id: this.data.studentId, student_id: this.data.studentId,
// class_id: this.data.id
}) })
}).then((res) => { }).then((res) => {
const { const {
...@@ -2446,7 +2440,7 @@ Page({ ...@@ -2446,7 +2440,7 @@ Page({
// 邀请好友 // 邀请好友
goInviteFriend() { goInviteFriend() {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/invitationcard/index?tid=${this.data.tid}&id=${this.data.id}` url: `/src/pages/invitationcard/index?tid=${this.data.tid}`
}) })
}, },
//生成结课证书 //生成结课证书
...@@ -2461,7 +2455,7 @@ Page({ ...@@ -2461,7 +2455,7 @@ Page({
}) })
let qrcode = ''; let qrcode = '';
generateCustomerQrcode({ generateCustomerQrcode({
// scene: `i=${this.data.id}&t=${this.data.tid}&p=7`, // scene: `t=${this.data.tid}&p=7`,
// page: `src/pages/themeindex/index` // page: `src/pages/themeindex/index`
scene: `ctd=${visitor && visitor.id}&t=${this.data.tid}&w=${app.globalData.currentSchoolStudentId}`, scene: `ctd=${visitor && visitor.id}&t=${this.data.tid}&w=${app.globalData.currentSchoolStudentId}`,
page: `src/pages/beforeinvitation/index` page: `src/pages/beforeinvitation/index`
...@@ -2703,7 +2697,7 @@ Page({ ...@@ -2703,7 +2697,7 @@ Page({
type: 2, type: 2,
subject_id: this.data.tid, subject_id: this.data.tid,
page: 'src/pages/calendarthemeindex/index', page: 'src/pages/calendarthemeindex/index',
scene: `i=${this.data.id}&t=${this.data.tid}&w=${app.globalData.currentSchoolStudentId}` scene: `t=${this.data.tid}&w=${app.globalData.currentSchoolStudentId}`
}).then((res) => { }).then((res) => {
wx.hideLoading(); wx.hideLoading();
if (res.code == 200) { if (res.code == 200) {
......
...@@ -44,9 +44,6 @@ Page({ ...@@ -44,9 +44,6 @@ Page({
imageRoot: app.globalData.imageRoot, imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion, imageVersion: app.globalData.imageVersion,
id: 0, id: 0,
circleInfo: {
school_id: 0
},
clockTotal: 0, clockTotal: 0,
page: 1, page: 1,
perPage: 1000, perPage: 1000,
...@@ -84,7 +81,6 @@ Page({ ...@@ -84,7 +81,6 @@ Page({
commentsObj: {}, commentsObj: {},
likesObj: {}, likesObj: {},
commentsObj: {}, commentsObj: {},
schoolInfo: "",
auditStatus: 3, // 1未申请2审核中3已通过 auditStatus: 3, // 1未申请2审核中3已通过
studentStatus: 1, studentStatus: 1,
noUser: false, noUser: false,
...@@ -140,7 +136,7 @@ Page({ ...@@ -140,7 +136,7 @@ Page({
let that = this; let that = this;
if (options.scene) { if (options.scene) {
let sceneQuery = scenQueryGet(options.scene); let sceneQuery = scenQueryGet(options.scene);
const { i, t, c } = sceneQuery; const { t, c } = sceneQuery;
if (c) { if (c) {
integralLog({ integralLog({
type: 2, type: 2,
...@@ -152,19 +148,16 @@ Page({ ...@@ -152,19 +148,16 @@ Page({
posterLog({ posterLog({
poster_type: 4, poster_type: 4,
type: 2, type: 2,
clock_circle_id: i,
clock_subject_id: t clock_subject_id: t
}); });
this.setData({ this.setData({
id: i,
tid: t, tid: t,
pagefrom: "", pagefrom: "",
pageScene: options.scene || "" pageScene: options.scene || ""
}); });
} else { } else {
const { id, tid, sid, pagefrom, integral } = options; const { tid, sid, pagefrom, integral } = options;
this.setData({ this.setData({
id,
tid, tid,
sid: sid || 0, sid: sid || 0,
pagefrom: pagefrom ? pagefrom : "", pagefrom: pagefrom ? pagefrom : "",
...@@ -172,7 +165,7 @@ Page({ ...@@ -172,7 +165,7 @@ Page({
} }
app app
.getCurrentSchoolStudentId({ .getCurrentSchoolStudentId({
source_id: this.data.id, source_id: this.data.sid,
source_type: 7 source_type: 7
}) })
.then(() => { .then(() => {
...@@ -258,8 +251,8 @@ Page({ ...@@ -258,8 +251,8 @@ Page({
let myBaseinfo = this.data.myBaseinfo; let myBaseinfo = this.data.myBaseinfo;
let shareObj = {}; let shareObj = {};
let initShareObj = { let initShareObj = {
title: `我正在参加【${this.data.circleInfo.title}】的打卡`, title: `我正在参加【${this.data.themeSelect.title}】的打卡`,
path: `/src/pages/themeindex/landpage?id=${this.data.id}&tid=${ path: `/src/pages/themeindex/landpage?&tid=${
this.data.tid this.data.tid
}&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${ }&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${
app.globalData.currentSchoolStudentId app.globalData.currentSchoolStudentId
...@@ -366,34 +359,6 @@ Page({ ...@@ -366,34 +359,6 @@ Page({
isexpand: !this.data.isexpand isexpand: !this.data.isexpand
}); });
}, },
// 班级详情,需要?
getCircleDetail(id) {
circleDetail({
class_id: id
}).then(res => {
if (res.code == 200) {
const visitor = LocalStorage.getItem("visitor");
activityLog({
type: 22,
open_id: visitor && visitor.openid,
school_id: res.data.school_id,
remark: ""
});
if (this.data.pageScene) {
activityLog({
type: 26,
open_id: visitor && visitor.openid,
school_id: res.data.school_id,
remark: ""
});
}
this.judgeIsSchoolStudent(res.data.school_id);
this.setData({
circleInfo: res.data
});
}
});
},
themeDetail() { themeDetail() {
themeDetail({ themeDetail({
subject_id: this.data.tid, subject_id: this.data.tid,
...@@ -422,8 +387,6 @@ Page({ ...@@ -422,8 +387,6 @@ Page({
title: data.title title: data.title
}); });
// this.queryActivtySchoolInfo(data.school_id); // this.queryActivtySchoolInfo(data.school_id);
this.schoolInfoGet(data.school_id);
// this.getCircleDetail(data.class_id);
data.content = JSON.parse(data.content); data.content = JSON.parse(data.content);
data.contentDetail = data.land_content data.contentDetail = data.land_content
? JSON.parse(data.land_content.content) ? JSON.parse(data.land_content.content)
...@@ -434,7 +397,7 @@ Page({ ...@@ -434,7 +397,7 @@ Page({
}); });
// if(this.data.themeSelect.is_clock){ // if(this.data.themeSelect.is_clock){
// wx.redirectTo({ // wx.redirectTo({
// url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&sid=${this.data.sid}` // url: `/src/pages/calendarthemeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
// }) // })
// } // }
} }
...@@ -659,7 +622,7 @@ Page({ ...@@ -659,7 +622,7 @@ Page({
} }
} else { } else {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/calendarthemeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
}); });
} }
}, },
...@@ -793,7 +756,7 @@ Page({ ...@@ -793,7 +756,7 @@ Page({
goInviteFriend() { goInviteFriend() {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/invitationcard/index?tid=${this.data.tid}&id=${this.data.id}` url: `/src/pages/invitationcard/index?tid=${this.data.tid}`
}); });
}, },
// 格式是以录音名字为key value为{play: true || false, currentTime: 0}的一个对象 // 格式是以录音名字为key value为{play: true || false, currentTime: 0}的一个对象
...@@ -826,16 +789,6 @@ Page({ ...@@ -826,16 +789,6 @@ Page({
}); });
}, },
// 视频播放相关代码 // 视频播放相关代码
schoolInfoGet(id) {
getSchoolDetail(id).then(res => {
const { code, data } = res;
if (code == 200) {
this.setData({
schoolInfo: data
})
}
});
},
showcommenteditor(e) { showcommenteditor(e) {
this.data.bigindex = e.currentTarget.dataset.bigindex; this.data.bigindex = e.currentTarget.dataset.bigindex;
this.data.clockitemtype = e.currentTarget.dataset.clockitemtype; this.data.clockitemtype = e.currentTarget.dataset.clockitemtype;
...@@ -1064,7 +1017,7 @@ Page({ ...@@ -1064,7 +1017,7 @@ Page({
const { code, data } = res; const { code, data } = res;
if (code == 200) { if (code == 200) {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/calendarthemeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
}); });
} else { } else {
} }
......
...@@ -124,7 +124,6 @@ Page({ ...@@ -124,7 +124,6 @@ Page({
iosPhoneWarn: false, iosPhoneWarn: false,
needIosWarnSelect: false, needIosWarnSelect: false,
recordRole: '2c', recordRole: '2c',
circleInfo: {},
videostatus: { videostatus: {
preSrc: '', preSrc: '',
currentSrc: '', currentSrc: '',
...@@ -159,16 +158,17 @@ Page({ ...@@ -159,16 +158,17 @@ Page({
}, },
onLoad: function(options) { // Do some initialize when page load. onLoad: function(options) { // Do some initialize when page load.
const that = this; const that = this;
const {id, tid, cid, pagefrom,clockdate,sub} = options; const { tid, sid, cid, pagefrom,clockdate,sub} = options;
this.setData({ this.setData({
tid, tid,
sid,
pagefrom: pagefrom || '', pagefrom: pagefrom || '',
clockdate: clockdate || '', clockdate: clockdate || '',
sub:sub || '' sub:sub || ''
}) })
wx.showLoading(); wx.showLoading();
app.getCurrentSchoolStudentId({ app.getCurrentSchoolStudentId({
source_id: id, source_id: this.data.sid,
source_type: 7, source_type: 7,
}).then(() => { }).then(() => {
themeDetail({ themeDetail({
...@@ -259,28 +259,23 @@ Page({ ...@@ -259,28 +259,23 @@ Page({
userShow () { userShow () {
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
studentidentity({ studentidentity({
class_id: this.data.id, school_id: this.data.sid,
// consumer_id: visitor && visitor.id // consumer_id: visitor && visitor.id
}).then((res) => { }).then((res) => {
wx.hideLoading(); wx.hideLoading();
const {code, data} = res; const {code, data} = res;
if (code == 200 && data) { if (code == 200 && data) {
this.setData({ this.setData({
auditStatus: data.audit_status,
studentStatus: data.student_status || 1,
noUser: data.is_visitor, noUser: data.is_visitor,
}) })
this.pageScrollToBottom(); this.pageScrollToBottom();
} else { } else {
this.setData({ this.setData({
auditStatus: 1,
noUser: true noUser: true
}) })
} }
}).catch(() => { }).catch(() => {
this.setData({
auditStatus: 1,
})
}) })
}, },
// 获取打卡相关参数的UUID // 获取打卡相关参数的UUID
...@@ -645,19 +640,19 @@ Page({ ...@@ -645,19 +640,19 @@ Page({
} else { } else {
if (this.data.pagefrom == 'themeindex') { if (this.data.pagefrom == 'themeindex') {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}&sid=${this.data.sid}` url: `/src/pages/themeindex/index?tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}&sid=${this.data.sid}`
}); });
} else if (this.data.pagefrom == 'circleindex') { } else if (this.data.pagefrom == 'circleindex') {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/circleindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}&sid=${this.data.sid}` url: `/src/pages/circleindex/index?tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}&sid=${this.data.sid}`
}); });
}else if (this.data.pagefrom == 'calendarthemeindex') { }else if (this.data.pagefrom == 'calendarthemeindex') {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}&sid=${this.data.sid}` url: `/src/pages/calendarthemeindex/index?tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}&sid=${this.data.sid}`
}); });
}else if(this.data.pagefrom == 'morethemeindex'){ }else if(this.data.pagefrom == 'morethemeindex'){
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/morethemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}&integral=${integral || 0}&sid=${this.data.sid}` url: `/src/pages/morethemeindex/index?tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}&integral=${integral || 0}&sid=${this.data.sid}`
}); });
} }
} }
...@@ -732,15 +727,15 @@ Page({ ...@@ -732,15 +727,15 @@ Page({
navigatePage(integral) { navigatePage(integral) {
if (this.data.pagefrom == 'themeindex') { if (this.data.pagefrom == 'themeindex') {
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}` url: `/src/pages/themeindex/index?tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
}); });
} else if(this.data.pagefrom == 'calendarthemeindex'){ } else if(this.data.pagefrom == 'calendarthemeindex'){
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}` url: `/src/pages/calendarthemeindex/index?tid=${this.data.tid}&pagefrom=clockeditor&integral=${integral || 0}`
}); });
} else if(this.data.pagefrom == 'morethemeindex'){ } else if(this.data.pagefrom == 'morethemeindex'){
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/morethemeindex/index?id=${this.data.id}&tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}&integral=${integral || 0}` url: `/src/pages/morethemeindex/index?tid=${this.data.tid}&pagefrom=clockeditor&sub=${this.data.sub}&integral=${integral || 0}`
}); });
} }
}, },
......
...@@ -287,11 +287,11 @@ Page({ ...@@ -287,11 +287,11 @@ Page({
this.themeNoticeRead(theme); this.themeNoticeRead(theme);
if(theme.subject_type == 1){ if(theme.subject_type == 1){
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/themeindex/index?id=${theme.class_id}&tid=${theme.id}&sid=${this.data.sid}` url: `/src/pages/themeindex/landpage?&tid=${theme.id}&sid=${this.data.sid}`
}) })
}else if(theme.subject_type == 2){ }else if(theme.subject_type == 2){
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/calendarthemeindex/index?id=${theme.class_id}&tid=${theme.id}&sid=${this.data.sid}` url: `/src/pages/calendarthemeindex/landpage?&tid=${theme.id}&sid=${this.data.sid}`
}) })
}else if(theme.subject_type == 3){ }else if(theme.subject_type == 3){
wx.navigateTo({ wx.navigateTo({
......
This diff is collapsed.
...@@ -144,14 +144,6 @@ ...@@ -144,14 +144,6 @@
</view> </view>
</view> </view>
<!-- <view class="ad-box" wx:if="{{adInfo.status == 1 && adShow && circleInfo.school_id!=activtySchoolInfo.sid}}">
<image class="adimg" animation="{{attentionAnim}}" bindtap="toGetAd"
src="{{imageRoot}}2c/circleindex/adimg.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix"
lazy-load="true" binderror="" bindload=""></image>
<image class="closeicon" bindtap="closeAd" src="{{imageRoot}}2c/common/closeicon.png?{{imageVersion}}"
></image>
</view> -->
<view class="clock-statebox" wx:if="{{isClock || (!isClock && themeSelect.themeStatus==1)}}"> <view class="clock-statebox" wx:if="{{isClock || (!isClock && themeSelect.themeStatus==1)}}">
<!-- {{themeSelect.themeStatus==1?'距离交作业时间倒计时:': themeSelect.themeStatus==3?'作业提交已超时':'未到作业生效时间!'}} --> <!-- {{themeSelect.themeStatus==1?'距离交作业时间倒计时:': themeSelect.themeStatus==3?'作业提交已超时':'未到作业生效时间!'}} -->
...@@ -186,8 +178,7 @@ ...@@ -186,8 +178,7 @@
</view> </view>
<sjd-contact wx:if="{{concatDiaShow}}" address="{{circleInfo.clock_address}}" bind:closecontact="closecontact"> <sjd-contact wx:if="{{concatDiaShow}}" address="{{circleInfo.clock_address}}" bind:closecontact="closecontact">
</sjd-contact> </sjd-contact>
<!-- <prize-get wx-if="{{adGetShow}}" bind:closeAdModal="closeAdModal" adInfo="{{adInfo}}" circleid="{{id}}">
</prize-get> -->
<btn-drag bind:btnDragEvent='goindex' tobottomDis='100' width='60' height="60" catchtouchmove="ture"> <btn-drag bind:btnDragEvent='goindex' tobottomDis='100' width='60' height="60" catchtouchmove="ture">
<view class="gohome gohome-c" slot="dragcontent"> <view class="gohome gohome-c" slot="dragcontent">
<view class="home-text">首页</view> <view class="home-text">首页</view>
......
...@@ -45,9 +45,6 @@ Page({ ...@@ -45,9 +45,6 @@ Page({
imageRoot: app.globalData.imageRoot, imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion, imageVersion: app.globalData.imageVersion,
id: 0, id: 0,
circleInfo: {
school_id: 0
},
themeList: [], themeList: [],
themeTotal: 0, themeTotal: 0,
clockTotal: 0, clockTotal: 0,
...@@ -61,13 +58,7 @@ Page({ ...@@ -61,13 +58,7 @@ Page({
isClock: false, // true 该主题已经签到 false 该主题未签到 isClock: false, // true 该主题已经签到 false 该主题未签到
clockList: [], clockList: [],
showPsdDia: false, showPsdDia: false,
showNameSetDia: false,
password: "",
joining: false,
nameSetting: false,
adShow: true,
adGetShow: false,
adMobile: "",
prizeGetting: false, prizeGetting: false,
posterBoxShow: false, posterBoxShow: false,
canvasShow: false, canvasShow: false,
...@@ -119,8 +110,6 @@ Page({ ...@@ -119,8 +110,6 @@ Page({
tid: 0, tid: 0,
name: "" name: ""
}, },
clockFloatBtnShow: false,
receivedPrize: false,
activitybarloaded: false, activitybarloaded: false,
autoshowprize: false, autoshowprize: false,
retract: false, retract: false,
...@@ -171,9 +160,8 @@ Page({ ...@@ -171,9 +160,8 @@ Page({
pageScene: options.scene || "" pageScene: options.scene || ""
}); });
} else { } else {
const { id, tid, sid, pagefrom, integral } = options; const { tid, sid, pagefrom, integral } = options;
this.setData({ this.setData({
id,
tid, tid,
sid: sid || 0, sid: sid || 0,
pagefrom: pagefrom ? pagefrom : "", pagefrom: pagefrom ? pagefrom : "",
...@@ -183,7 +171,7 @@ Page({ ...@@ -183,7 +171,7 @@ Page({
console.log(this.data.pageScene,'pageScene') console.log(this.data.pageScene,'pageScene')
app app
.getCurrentSchoolStudentId({ .getCurrentSchoolStudentId({
source_id: this.data.id, source_id: this.data.sid,
source_type: 7 source_type: 7
}) })
.then(() => { .then(() => {
...@@ -238,33 +226,6 @@ Page({ ...@@ -238,33 +226,6 @@ Page({
}, },
onReady: function() {}, onReady: function() {},
adInfoGet() {
adInfoGet({
class_id: this.data.id
}).then(res => {
const { code, data } = res;
if (code == 200 && data) {
if (data.custom == "") {
data.custom = [];
} else {
try {
data.custom = JSON.parse(data.custom);
} catch (error) {
data.custom = [];
}
}
this.setData({
adInfo: data
});
} else {
this.setData({
adInfo: {
custom: []
}
});
}
});
},
onHide: function() { onHide: function() {
this.setData({ this.setData({
activitybarloaded: false activitybarloaded: false
...@@ -317,7 +278,7 @@ Page({ ...@@ -317,7 +278,7 @@ Page({
let myBaseinfo = this.data.myBaseinfo; let myBaseinfo = this.data.myBaseinfo;
let shareObj = {}; let shareObj = {};
let initShareObj = { let initShareObj = {
title: `我正在参加【${this.data.circleInfo.title}】的打卡`, title: `我正在参加【${this.data.themeSelect.title}】的打卡`,
path: `/src/pages/themeindex/landpage?id=${this.data.id}&tid=${ path: `/src/pages/themeindex/landpage?id=${this.data.id}&tid=${
this.data.tid this.data.tid
}&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${ }&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${
...@@ -380,37 +341,6 @@ Page({ ...@@ -380,37 +341,6 @@ Page({
this.data.clockPage = 1; this.data.clockPage = 1;
this.themeDetail(); this.themeDetail();
this.clockListGet("init"); this.clockListGet("init");
return
studentidentity({
class_id: this.data.id
})
.then(res => {
wx.hideLoading();
const { code, data } = res;
if (code == 200 && data) {
this.data.studentStatus = data.student_status || 1;
this.data.userInfoDetail = data;
this.setData({
auditStatus: data.audit_status,
noUser: data.is_visitor,
studentId: data.student_id,
hasmore: true
});
this.data.clockPage = 1;
this.themeDetail();
this.clockListGet("init");
} else {
this.setData({
auditStatus: 1,
noUser: true
});
}
})
.catch(() => {
this.setData({
auditStatus: 1
});
});
}, },
expandaction() { expandaction() {
...@@ -418,60 +348,6 @@ Page({ ...@@ -418,60 +348,6 @@ Page({
isexpand: !this.data.isexpand isexpand: !this.data.isexpand
}); });
}, },
getCircleDetail(id) {
circleDetail({
class_id: id
}).then(res => {
if (res.code == 200) {
let content = [];
try {
content = JSON.parse(res.data.content);
} catch (e) {
content = [];
}
if (res.code == 40000) {
if (res.msg) {
wx.showModal({
title: "提示",
content: "班级已被删除,点击确定返回机构首页",
showCancel: false,
confirmText: "确定",
success(r) {
if (r.confirm) {
wx.reLaunch({
url: `/src/pages/shopindex/index?mid=${res.data.member_id}`
});
}
}
});
// return;
}
}
res.data.content = content;
// res.data.clock_address.tel_parse = JSON.parse(res.data.clock_address.tel);
res.data.school_id = Number(res.data.school_id);
const visitor = LocalStorage.getItem("visitor");
activityLog({
type: 22,
open_id: visitor && visitor.openid,
school_id: res.data.school_id,
remark: ""
});
if (this.data.pageScene) {
activityLog({
type: 26,
open_id: visitor && visitor.openid,
school_id: res.data.school_id,
remark: ""
});
}
this.judgeIsSchoolStudent(res.data.school_id);
this.setData({
circleInfo: res.data
});
}
});
},
themeDetail() { themeDetail() {
themeDetail({ themeDetail({
subject_id: this.data.tid, subject_id: this.data.tid,
...@@ -502,7 +378,6 @@ Page({ ...@@ -502,7 +378,6 @@ Page({
// this.queryActivtySchoolInfo(data.school_id); // this.queryActivtySchoolInfo(data.school_id);
// this.judgeIsClock(this.data.tid); // this.judgeIsClock(this.data.tid);
this.schoolInfoGet(data.school_id); this.schoolInfoGet(data.school_id);
// this.getCircleDetail(data.class_id);
data.content = JSON.parse(data.content); data.content = JSON.parse(data.content);
data.contentDetail = data.land_content? JSON.parse(data.land_content.content) : ''; data.contentDetail = data.land_content? JSON.parse(data.land_content.content) : '';
...@@ -825,14 +700,13 @@ Page({ ...@@ -825,14 +700,13 @@ Page({
} }
} else { } else {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/themeindex/index?&tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
}); });
} }
}, },
// 加入圈子输入码相关代码 // 加入圈子输入码相关代码
closepsddia() { closepsddia() {
this.setData({ this.setData({
// password: '',
showPsdDia: false showPsdDia: false
}); });
}, },
...@@ -974,7 +848,7 @@ Page({ ...@@ -974,7 +848,7 @@ Page({
goInviteFriend() { goInviteFriend() {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/invitationcard/index?tid=${this.data.tid}&id=${this.data.id}` url: `/src/pages/invitationcard/index?tid=${this.data.tid}`
}); });
}, },
// 格式是以录音名字为key value为{play: true || false, currentTime: 0}的一个对象 // 格式是以录音名字为key value为{play: true || false, currentTime: 0}的一个对象
...@@ -1108,14 +982,14 @@ Page({ ...@@ -1108,14 +982,14 @@ Page({
videoErrorCallback(e) {}, videoErrorCallback(e) {},
goWebsiteIndex() { goWebsiteIndex() {
wx.reLaunch({ wx.reLaunch({
url: `/src/pages/websiteindex/index?sid=${this.data.circleInfo.school_id}` url: `/src/pages/websiteindex/index?sid=${this.data.sid}`
}); });
const visitor = LocalStorage.getItem("visitor"); const visitor = LocalStorage.getItem("visitor");
if (!this.data.isSchoolStudent && this.data.pageScene) { if (!this.data.isSchoolStudent && this.data.pageScene) {
activityLog({ activityLog({
type: 27, type: 27,
open_id: visitor && visitor.openid, open_id: visitor && visitor.openid,
school_id: this.data.circleInfo.school_id, school_id: this.data.sid,
remark: "" remark: ""
}); });
} }
...@@ -1265,25 +1139,6 @@ Page({ ...@@ -1265,25 +1139,6 @@ Page({
},()=>{ },()=>{
this.joinClock() this.joinClock()
}) })
// if (this.data.password == this.data.moreTheme.password) {
// wx.showToast({
// title: '密码正确',
// icon: 'none',
// duration: 2000
// })
// wx.navigateTo({
// url: `/src/pages/morethemeindex/index?id=${this.data.moreTheme.class_id}&tid=${this.data.tid}`
// });
// } else {
// wx.showToast({
// title: '密码错误',
// icon: 'none',
// duration: 2000
// })
// this.setData({
// password: ''
// })
// }
}, },
joinClock() { joinClock() {
console.log('该区打卡了') console.log('该区打卡了')
...@@ -1306,7 +1161,7 @@ Page({ ...@@ -1306,7 +1161,7 @@ Page({
const { code, data } = res; const { code, data } = res;
if (code == 200) { if (code == 200) {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/themeindex/index?id=${this.data.id}&tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/themeindex/index?&tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
}); });
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment