提交 55320c6b 编写于 作者: tao.wu's avatar tao.wu

测试发布报错问题

上级 2ff53ed3
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
</div> </div>
</template> </template>
<!-- <script> <script>
import { getActivityId, getBEServerTime, getUserScoreInfo, getInviteList, getClockStatus, goToUpdateClock, getTimsActivityInfo, selectAppModuleParam, checkToken, getRole, sayHello, getEncryptId } from '@/service/activityMainpage'; import { getActivityId, getBEServerTime, getUserScoreInfo, getInviteList, getClockStatus, goToUpdateClock, getTimsActivityInfo, selectAppModuleParam, checkToken, getRole, sayHello, getEncryptId } from '@/service/activityMainpage';
import { checkHospitalStatus } from '@/service'; import { checkHospitalStatus } from '@/service';
import h5header from '@/components/h5header'; import h5header from '@/components/h5header';
...@@ -312,8 +312,8 @@ ...@@ -312,8 +312,8 @@
}, },
computed: { computed: {
returnBeanImg() { returnBeanImg() {
let hospitalScore = vm.doctorInfo.hospitalScore; let hospitalScore = this.doctorInfo.hospitalScore;
let arr = vm.doctorInfo.hospitalLevelScore; let arr = this.doctorInfo.hospitalLevelScore;
if(arr && arr.length < 1){ if(arr && arr.length < 1){
return; return;
} }
...@@ -331,18 +331,18 @@ ...@@ -331,18 +331,18 @@
}, },
returnScoreAwardTips() { returnScoreAwardTips() {
let award = ''; let award = '';
if( vm.doctorInfo && vm.doctorInfo.userDayRank ) { if( this.doctorInfo && this.doctorInfo.userDayRank ) {
let userDayRank = vm.doctorInfo.userDayRank; let userDayRank = this.doctorInfo.userDayRank;
if( userDayRank == 1 ){ if( userDayRank == 1 ){
return `今日保持第1名,可获得${vm.awardList.No1}`; return `今日保持第1名,可获得${this.awardList.No1}`;
}else if( userDayRank < 4 ){ // 2-3 提示 再获得X勤奋分即可上升到前Y名获得 第1名奖品 }else if( userDayRank < 4 ){ // 2-3 提示 再获得X勤奋分即可上升到前Y名获得 第1名奖品
award = vm.awardList.No1; award = this.awardList.No1;
}else if( userDayRank < 11 ){ // 4-10 提示 再获得X勤奋分即可上升到前Y名获得 第3名奖品 }else if( userDayRank < 11 ){ // 4-10 提示 再获得X勤奋分即可上升到前Y名获得 第3名奖品
award = vm.awardList.No3; award = this.awardList.No3;
}else{ // 10名以后 提示:再获得X勤奋分即可上升到前Y名获得 第10名奖品 }else{ // 10名以后 提示:再获得X勤奋分即可上升到前Y名获得 第10名奖品
award = vm.awardList.No10; award = this.awardList.No10;
} }
return `再获得${vm.doctorInfo.targetRequiredScore}勤奋分即可上升到前${vm.doctorInfo.targetRank}名获得${award}` return `再获得${this.doctorInfo.targetRequiredScore}勤奋分即可上升到前${this.doctorInfo.targetRank}名获得${award}`
} }
}, },
}, },
...@@ -351,15 +351,15 @@ ...@@ -351,15 +351,15 @@
}, },
mounted() { mounted() {
// // 这里需要删掉!!! // // 这里需要删掉!!!
// vm.getUserActivityInfo(); // this.getUserActivityInfo();
// vm.getTasks(); // this.getTasks();
// // 这里需要删掉!!! // // 这里需要删掉!!!
vm.isWeb = vm.$rocNative.isWeb; this.isWeb = this.$rocNative.isWeb;
// 取服务器时间,切换不同时间段的显示 // 取服务器时间,切换不同时间段的显示
vm.getServerTime(); this.getServerTime();
// 请求接口获取activityId (经与后端产品确认,默认没传id的话,就取接口;默认有的话就不取接口) // 请求接口获取activityId (经与后端产品确认,默认没传id的话,就取接口;默认有的话就不取接口)
if( !vm.activityId ){ if( !this.activityId ){
getActivityId().then(res => { getActivityId().then(res => {
alert('guhui 获取id') alert('guhui 获取id')
alert(JSON.stringify(res)) alert(JSON.stringify(res))
...@@ -367,19 +367,19 @@ ...@@ -367,19 +367,19 @@
let data = res.data ; let data = res.data ;
for(let i in data){ for(let i in data){
if(data[i] == 'ID'){ if(data[i] == 'ID'){
vm.activityId = i; this.activityId = i;
} }
} }
} }
}) })
} }
vm.$rocNative.appInit(); this.$rocNative.appInit();
vm.getUserInfo(); // 判断是否登录 this.getUserInfo(); // 判断是否登录
if (process.client) { if (process.client) {
window.__refresh = function(params) { window.__refresh = function(params) {
vm.getUserInfo(); // 判断是否登录 this.getUserInfo(); // 判断是否登录
} }
} }
...@@ -393,15 +393,15 @@ ...@@ -393,15 +393,15 @@
// alert('服务器时间'); // alert('服务器时间');
// alert(JSON.stringify(res)) // alert(JSON.stringify(res))
if(res && res.code == '000000' ){ if(res && res.code == '000000' ){
vm.serverTime = res.data; this.serverTime = res.data;
}else{ }else{
vm.serverTime = new Date().getTime(); this.serverTime = new Date().getTime();
} }
}) })
// vm.serverTime = 1577376000000; // this.serverTime = 1577376000000;
}, },
hideClockModal() { hideClockModal() {
vm.clockSuccessVisible = false; this.clockSuccessVisible = false;
}, },
goQuest(){ goQuest(){
// window.location.href = 'https://wj.qq.com/s2/5112128/18be/'; // window.location.href = 'https://wj.qq.com/s2/5112128/18be/';
...@@ -424,29 +424,29 @@ ...@@ -424,29 +424,29 @@
"seqNo":3 "seqNo":3
} }
] ]
vm.$rocNative.dispatchEventByModuleCode && vm.$rocNative.dispatchEventByModuleCode({ this.$rocNative.dispatchEventByModuleCode && this.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300', modeCode: 'M300',
jsonString: paramList jsonString: paramList
}) })
}, },
returnStageText() { returnStageText() {
if(vm.currentStage == 0){ if(this.currentStage == 0){
return require(`../assets/img/stage-two/stage-01-text.png`); return require(`../assets/img/stage-two/stage-01-text.png`);
}else{ }else{
return require(`../assets/img/stage-two/stage-0${vm.currentStage}-text.png`); return require(`../assets/img/stage-two/stage-0${this.currentStage}-text.png`);
} }
}, },
returnAwardPic() { returnAwardPic() {
if(vm.currentStage == 0){ if(this.currentStage == 0){
return require(`../assets/img/stage-two/award-01-pic.png`) return require(`../assets/img/stage-two/award-01-pic.png`)
}else{ }else{
return require(`../assets/img/stage-two/award-0${vm.currentStage}-pic.png`) return require(`../assets/img/stage-two/award-0${this.currentStage}-pic.png`)
} }
}, },
returnStageClass(item, index){ // 返回顶部四个时间进度条状态 returnStageClass(item, index){ // 返回顶部四个时间进度条状态
// debugger; // debugger;
// 获取当前服务器时间 获取失败则用本地时间 *************************************************** // 获取当前服务器时间 获取失败则用本地时间 ***************************************************
let currentTime = vm.serverTime || new Date().getTime(); let currentTime = this.serverTime || new Date().getTime();
let beginTime = new Date(item.beginDate).getTime(); let beginTime = new Date(item.beginDate).getTime();
...@@ -456,8 +456,8 @@ ...@@ -456,8 +456,8 @@
status = ''; status = '';
}else if( (currentTime == beginTime) || (beginTime < currentTime && currentTime < endTime) || (currentTime == endTime) ){ // 活动中 }else if( (currentTime == beginTime) || (beginTime < currentTime && currentTime < endTime) || (currentTime == endTime) ){ // 活动中
status = 'active'; status = 'active';
vm.awardList.No1 = item.award; // 根据时间段来设置第1名奖品 this.awardList.No1 = item.award; // 根据时间段来设置第1名奖品
vm.currentStage = index + 1; // 决定显示第几张图片 this.currentStage = index + 1; // 决定显示第几张图片
}else{ // 已结束 }else{ // 已结束
status = 'over'; status = 'over';
}; };
...@@ -465,40 +465,40 @@ ...@@ -465,40 +465,40 @@
}, },
// 判断用户是否登录? // 判断用户是否登录?
getUserInfo() { getUserInfo() {
vm.$rocNative.getUserInfo().then(params => { this.$rocNative.getUserInfo().then(params => {
// _seft.userToken = params.userToken; // 存到store里 // _seft.userToken = params.userToken; // 存到store里
if(params && params.userToken){ if(params && params.userToken){
cookies.set('token', params.userToken); cookies.set('token', params.userToken);
vm.token = params.userToken; this.token = params.userToken;
} }
// alert(JSON.stringify(params)); // alert(JSON.stringify(params));
if(params && params.userMobile){ // 已登录 (有手机号表示 已登录,无手机号表示 未登录) if(params && params.userMobile){ // 已登录 (有手机号表示 已登录,无手机号表示 未登录)
vm.isLogin = true; this.isLogin = true;
vm.appUserInfo = params; this.appUserInfo = params;
vm.loginCallback(); this.loginCallback();
}else{ // 未登录 }else{ // 未登录
vm.isLogin = false; this.isLogin = false;
} }
// 登录状态确定后,再调任务接口,以便获取打卡状态 // 登录状态确定后,再调任务接口,以便获取打卡状态
vm.getTasks(); this.getTasks();
}); });
}, },
// 调用APP登录弹窗 // 调用APP登录弹窗
appLogin() { appLogin() {
vm.$rocNative.gotoLogin(); this.$rocNative.gotoLogin();
}, },
// 登陆ok后 回调: 获取邀请的医生列表 & 检查是否加入机构 // 登陆ok后 回调: 获取邀请的医生列表 & 检查是否加入机构
loginCallback() { loginCallback() {
vm.getUserActivityInfo(); this.getUserActivityInfo();
vm.goToCheckJoin(); this.goToCheckJoin();
getEncryptId().then(res => { getEncryptId().then(res => {
alert('获取加密过后的id'); alert('获取加密过后的id');
alert(JSON.stringify(res)) alert(JSON.stringify(res))
if( res && res.code && res.code == '000000' ){ if( res && res.code && res.code == '000000' ){
vm.encryptId = res.data; this.encryptId = res.data;
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}) })
}, },
...@@ -506,43 +506,43 @@ ...@@ -506,43 +506,43 @@
getUserScoreInfo().then(res => { getUserScoreInfo().then(res => {
// alert('获取用户及分数信息。。。'); // alert('获取用户及分数信息。。。');
// alert(JSON.stringify(res)); // alert(JSON.stringify(res));
vm.doctorInfo = res.data; this.doctorInfo = res.data;
if(vm.doctorInfo.userYesterdayRank==1){ if(this.doctorInfo.userYesterdayRank==1){
vm.awardModalShow = true; this.awardModalShow = true;
vm.yestodayAwards = getFirstAwards(vm.doctorInfo.yesterdayDate); this.yestodayAwards = getFirstAwards(this.doctorInfo.yesterdayDate);
}else if(vm.doctorInfo.userYesterdayRank>=2 && vm.doctorInfo.userYesterdayRank<=3){ }else if(this.doctorInfo.userYesterdayRank>=2 && this.doctorInfo.userYesterdayRank<=3){
vm.awardModalShow = true; this.awardModalShow = true;
vm.yestodayAwards = vm.awardList.No3; this.yestodayAwards = this.awardList.No3;
}else if(vm.doctorInfo.userYesterdayRank>=4 && vm.doctorInfo.userYesterdayRank<=10){ }else if(this.doctorInfo.userYesterdayRank>=4 && this.doctorInfo.userYesterdayRank<=10){
vm.awardModalShow = true; this.awardModalShow = true;
vm.yestodayAwards = vm.awardList.No10; this.yestodayAwards = this.awardList.No10;
}else{ }else{
vm.awardModalShow = false; this.awardModalShow = false;
} }
}); });
}, },
goToCheckJoin() { // 检查是否加入结构 goToCheckJoin() { // 检查是否加入结构
checkHospitalStatus(vm.appUserInfo.userToken).then(res => { checkHospitalStatus(this.appUserInfo.userToken).then(res => {
// alert('检查是否加入结构') // alert('检查是否加入结构')
// alert(JSON.stringify(res)) // alert(JSON.stringify(res))
if(res && res.code == '000000' ){ if(res && res.code == '000000' ){
const status = res.data.status; const status = res.data.status;
// const status = 15; // test。。。。。。。。。。。。。。。。。 // const status = 15; // test。。。。。。。。。。。。。。。。。
if (status && status == 1) { // 机构状态正常 if (status && status == 1) { // 机构状态正常
vm.isJoin = true; this.isJoin = true;
vm.joinStatus = 1; this.joinStatus = 1;
// ******************************************* // *******************************************
vm.handleGetInviteList(); //登录且已加入机构才获取医生邀请了的列表 this.handleGetInviteList(); //登录且已加入机构才获取医生邀请了的列表
}else if (status && status == 15) { // 15创建机构审核中 }else if (status && status == 15) { // 15创建机构审核中
vm.isJoin = false; this.isJoin = false;
vm.joinStatus = 2; this.joinStatus = 2;
}else { // 除了1,15 都是未加入机构 }else { // 除了1,15 都是未加入机构
vm.isJoin = false; this.isJoin = false;
vm.joinStatus = 3; this.joinStatus = 3;
} }
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}); });
}, },
...@@ -552,23 +552,23 @@ ...@@ -552,23 +552,23 @@
alert(JSON.stringify(res)); alert(JSON.stringify(res));
if(res && res.code == '000000'){ if(res && res.code == '000000'){
if(res.data && res.data.list){ if(res.data && res.data.list){
vm.inviteList = res.data.list; this.inviteList = res.data.list;
vm.notInviteShowList = []; this.notInviteShowList = [];
if( vm.inviteList.length > 4 || vm.inviteList.length == 4 ){ if( this.inviteList.length > 4 || this.inviteList.length == 4 ){
vm.inviteList.length = 4; this.inviteList.length = 4;
}else{ }else{
let notInviteLength = 4 - vm.inviteList.length; let notInviteLength = 4 - this.inviteList.length;
for(let i=0; i<notInviteLength; i++){ for(let i=0; i<notInviteLength; i++){
vm.notInviteShowList.push({ this.notInviteShowList.push({
notInvite: true notInvite: true
}) })
} }
} }
}else{ }else{
vm.inviteList = []; this.inviteList = [];
} }
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}) })
}, },
...@@ -579,17 +579,17 @@ ...@@ -579,17 +579,17 @@
// 去登录 // 去登录
goToLogin() { goToLogin() {
alert('去登录...'); alert('去登录...');
vm.appLogin(); this.appLogin();
}, },
// 去加入机构 // 去加入机构
goToJoin() { goToJoin() {
alert('去加入机构...') alert('去加入机构...')
// 用户点击【加入机构】,继续判断用户是否有创建机构在审核状态,若有,则弹出弹窗提示。若无则跳转加入机构页面 // 用户点击【加入机构】,继续判断用户是否有创建机构在审核状态,若有,则弹出弹窗提示。若无则跳转加入机构页面
if( vm.joinStatus == 2 ){ // 机构审核中 if( this.joinStatus == 2 ){ // 机构审核中
alert('去机构审核中。。。。') alert('去机构审核中。。。。')
this.$dialog.confirm({ this.$dialog.confirm({
title: '提醒', title: '提醒',
message: `抱歉,您创建的机构【${vm.doctorInfo.hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`, message: `抱歉,您创建的机构【${this.doctorInfo.hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`,
confirmButtonText: '查看进度', confirmButtonText: '查看进度',
cancelButtonText: '我知道了', cancelButtonText: '我知道了',
className: 'remind-success', className: 'remind-success',
...@@ -602,7 +602,7 @@ ...@@ -602,7 +602,7 @@
}); });
}); });
}else if( vm.joinStatus == 3 ){ // 未加入机构 }else if( this.joinStatus == 3 ){ // 未加入机构
alert('未加入机构。。。。。') alert('未加入机构。。。。。')
this.checkVersion(()=>{ this.checkVersion(()=>{
if (this.$rocNative.isAndroid) { if (this.$rocNative.isAndroid) {
...@@ -627,7 +627,7 @@ ...@@ -627,7 +627,7 @@
}); });
}, },
handleLoginCheck(cb) { handleLoginCheck(cb) {
vm.shareObj.shareUrl = vm.shareWxUrl(); this.shareObj.shareUrl = this.shareWxUrl();
if( !this.isLogin ){ // 未登录 >>> 去登录 if( !this.isLogin ){ // 未登录 >>> 去登录
this.goToLogin(); this.goToLogin();
}else if( this.isLogin && !this.isJoin ){ // 已登录 && 未加入机构 >>>> 去加入机构 }else if( this.isLogin && !this.isJoin ){ // 已登录 && 未加入机构 >>>> 去加入机构
...@@ -694,7 +694,7 @@ ...@@ -694,7 +694,7 @@
"seqNo":3 "seqNo":3
} }
] ]
vm.$rocNative.dispatchEventByModuleCode && vm.$rocNative.dispatchEventByModuleCode({ this.$rocNative.dispatchEventByModuleCode && this.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300', modeCode: 'M300',
jsonString: paramList jsonString: paramList
}) })
...@@ -725,17 +725,17 @@ ...@@ -725,17 +725,17 @@
}); });
}, },
shareWxUrl() { shareWxUrl() {
return `${getShareUrl()}year_end_ssr/shareActive?id=${vm.encryptId}&taskId=${vm.eachInviteAward.taskId}&activityId=${vm.eachInviteAward.activityId}` return `${getShareUrl()}year_end_ssr/shareActive?id=${this.encryptId}&taskId=${this.eachInviteAward.taskId}&activityId=${this.eachInviteAward.activityId}`
}, },
// 去邀请 按钮 // 去邀请 按钮
handleInviteClick() { handleInviteClick() {
vm.shareObj.shareUrl = vm.shareWxUrl(); this.shareObj.shareUrl = this.shareWxUrl();
let cb = this.goToShare; let cb = this.goToShare;
this.handleLoginCheck(cb); this.handleLoginCheck(cb);
}, },
goToShare() { goToShare() {
alert('调app分享'); alert('调app分享');
// let id = vm.encryptDoctorId(); // let id = this.encryptDoctorId();
// 调用APP分享 // 调用APP分享
this.$rocNative.shareWechat(this.shareObj); this.$rocNative.shareWechat(this.shareObj);
...@@ -748,7 +748,7 @@ ...@@ -748,7 +748,7 @@
// 去完成任务 按钮 // 去完成任务 按钮
goToFinish(item) { goToFinish(item) {
let cb = () => { let cb = () => {
vm.goToFinishCB(item); this.goToFinishCB(item);
}; };
this.handleLoginCheck(cb); this.handleLoginCheck(cb);
}, },
...@@ -756,7 +756,7 @@ ...@@ -756,7 +756,7 @@
// resourceType 业务类型 1.课程 2.考试 3.调查问卷 4.患者招募 5.宣教漫画 6.打卡 7.邀请 // resourceType 业务类型 1.课程 2.考试 3.调查问卷 4.患者招募 5.宣教漫画 6.打卡 7.邀请
if( item.resourceType == 6 ){ if( item.resourceType == 6 ){
// 执行打卡接口 // 执行打卡接口
if( vm.isClockFinish ){ // 已打卡,不执行,未打卡,去调用打卡接口 if( this.isClockFinish ){ // 已打卡,不执行,未打卡,去调用打卡接口
// 已打卡,不处理 // 已打卡,不处理
// alert('已打过卡》》》》》》') // alert('已打过卡》》》》》》')
}else{ // 未打卡,去打卡 }else{ // 未打卡,去打卡
...@@ -770,13 +770,13 @@ ...@@ -770,13 +770,13 @@
if(res && res.code == '000000'){ if(res && res.code == '000000'){
if(res.data){ // 打卡成功 if(res.data){ // 打卡成功
vm.clockSuccessVisible = true; this.clockSuccessVisible = true;
vm.isClockFinish = true; this.isClockFinish = true;
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}) })
} }
...@@ -785,7 +785,7 @@ ...@@ -785,7 +785,7 @@
if(item.isFinish == 0){ // 已完成 不可点 if(item.isFinish == 0){ // 已完成 不可点
return; return;
} }
vm.jumpPage(item.linkId); this.jumpPage(item.linkId);
} }
}, },
...@@ -802,11 +802,11 @@ ...@@ -802,11 +802,11 @@
// 获取每日任务 及 邀请医生好友学课程里的 邀请1位医生的勤奋分及云鹊豆个数 // 获取每日任务 及 邀请医生好友学课程里的 邀请1位医生的勤奋分及云鹊豆个数
getTasks() { getTasks() {
// debugger; // debugger;
getTimsActivityInfo(vm.activityId).then(res => { getTimsActivityInfo(this.activityId).then(res => {
// alert('^^^^^获取任务信息…………………………') // alert('^^^^^获取任务信息…………………………')
// alert(JSON.stringify(res)) // alert(JSON.stringify(res))
if(res && res.code == '000000'){ if(res && res.code == '000000'){
if(!vm.checkTimeStatus(res.data)){ if(!this.checkTimeStatus(res.data)){
this.activityEndVisible = true; this.activityEndVisible = true;
return; return;
} }
...@@ -818,58 +818,58 @@ ...@@ -818,58 +818,58 @@
let rewardList = []; let rewardList = [];
// 获取 邀请节点,进行中 此时获取邀请1个医生对应的 分数 和 豆子 // 获取 邀请节点,进行中 此时获取邀请1个医生对应的 分数 和 豆子
if( item.resourceType == 7 && item.resourceId == 1){ if( item.resourceType == 7 && item.resourceId == 1){
vm.eachInviteAward.taskId = item.id; this.eachInviteAward.taskId = item.id;
vm.eachInviteAward.activityId = item.activityId; this.eachInviteAward.activityId = item.activityId;
if( item.timeStatus == 1 ){ if( item.timeStatus == 1 ){
rewardList = item.rewardJsonInfo || []; rewardList = item.rewardJsonInfo || [];
for( let j=0; j<rewardList.length; j++ ){ for( let j=0; j<rewardList.length; j++ ){
if( rewardList[j].rewardType == 3 ){ // 勤奋分 if( rewardList[j].rewardType == 3 ){ // 勤奋分
vm.eachInviteAward.mark = rewardList[j].rewardQuantity; this.eachInviteAward.mark = rewardList[j].rewardQuantity;
}else if( rewardList[j].rewardType == 1 ){ // 云鹊豆 }else if( rewardList[j].rewardType == 1 ){ // 云鹊豆
vm.eachInviteAward.bean = rewardList[j].rewardQuantity; this.eachInviteAward.bean = rewardList[j].rewardQuantity;
} }
} }
} }
}else if( item.resourceType == 6 && item.timeStatus == 1 ){ // 打卡 默认奖励 5分 5豆 }else if( item.resourceType == 6 && item.timeStatus == 1 ){ // 打卡 默认奖励 5分 5豆
item.eachInviteAwardMark = 5; item.eachInviteAwardMark = 5;
item.eachInviteAwardBean = 5; item.eachInviteAwardBean = 5;
item = vm.formatEachTaskAward(item); item = this.formatEachTaskAward(item);
vm.clockAward = { this.clockAward = {
mark: item.eachInviteAwardMark, mark: item.eachInviteAwardMark,
bean: item.eachInviteAwardBean, bean: item.eachInviteAwardBean,
activityId: item.activityId, activityId: item.activityId,
id: item.id, id: item.id,
}; };
vm.taskObj.clock = item; this.taskObj.clock = item;
if(vm.isLogin){ // 登录后,获取打卡状态 if(this.isLogin){ // 登录后,获取打卡状态
vm.goToGetClockStatus(vm.clockAward); this.goToGetClockStatus(this.clockAward);
} }
}else if( item.resourceType == 1 && item.timeStatus == 1 ){ // 课程 默认奖励 20分 20豆 }else if( item.resourceType == 1 && item.timeStatus == 1 ){ // 课程 默认奖励 20分 20豆
item.eachInviteAwardMark = 20; item.eachInviteAwardMark = 20;
item.eachInviteAwardBean = 20; item.eachInviteAwardBean = 20;
item = vm.formatEachTaskAward(item); item = this.formatEachTaskAward(item);
vm.taskObj.lesson = item; this.taskObj.lesson = item;
}else if( item.resourceType == 4 && item.timeStatus == 1 ){ // smo 没奖励分 默认奖励100豆 }else if( item.resourceType == 4 && item.timeStatus == 1 ){ // smo 没奖励分 默认奖励100豆
item.eachInviteAwardBean = 100; item.eachInviteAwardBean = 100;
item = vm.formatEachTaskAward(item); item = this.formatEachTaskAward(item);
vm.taskObj.smo = item; this.taskObj.smo = item;
} }
}; };
vm.taskList = []; this.taskList = [];
if( vm.taskObj.clock ){ if( this.taskObj.clock ){
vm.taskList.push( vm.taskObj.clock ); this.taskList.push( this.taskObj.clock );
} }
if( vm.taskObj.lesson ){ if( this.taskObj.lesson ){
vm.taskList.push( vm.taskObj.lesson ); this.taskList.push( this.taskObj.lesson );
} }
if( vm.taskObj.smo ){ if( this.taskObj.smo ){
vm.taskList.push( vm.taskObj.smo ); this.taskList.push( this.taskObj.smo );
} }
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}) })
}, },
...@@ -883,12 +883,12 @@ ...@@ -883,12 +883,12 @@
return true; return true;
}, },
goToGetClockStatus(params) { goToGetClockStatus(params) {
vm.isClockFinish = false; this.isClockFinish = false;
getClockStatus(params).then(res => { getClockStatus(params).then(res => {
if(res && res.code == '000000'){ if(res && res.code == '000000'){
vm.isClockFinish = !!res.data; this.isClockFinish = !!res.data;
}else{ }else{
vm.$toast(res.message); this.$toast(res.message);
} }
}) })
}, },
...@@ -928,7 +928,7 @@ ...@@ -928,7 +928,7 @@
}, },
returnEachTaskStatus(item) { returnEachTaskStatus(item) {
if( item.resourceType == 6 ){ if( item.resourceType == 6 ){
return vm.isClockFinish ? 'right-btn done' : 'right-btn' return this.isClockFinish ? 'right-btn done' : 'right-btn'
}else{ }else{
return item.isFinish == 0 ? 'right-btn done' : 'right-btn' return item.isFinish == 0 ? 'right-btn done' : 'right-btn'
} }
...@@ -938,7 +938,7 @@ ...@@ -938,7 +938,7 @@
returnIconText(item) { returnIconText(item) {
let text = '去完成'; let text = '去完成';
if( item.resourceType == 6 ){ if( item.resourceType == 6 ){
return vm.isClockFinish ? '已打卡' : '去打卡'; return this.isClockFinish ? '已打卡' : '去打卡';
} }
if( item.resourceType == 1 ){ // 1-课程 if( item.resourceType == 1 ){ // 1-课程
text = item.isFinish == 0 ? '已完成' : '去学习'; text = item.isFinish == 0 ? '已完成' : '去学习';
...@@ -1102,7 +1102,7 @@ ...@@ -1102,7 +1102,7 @@
} }
}, },
} }
</script> --> </script>
<style lang="less"> <style lang="less">
@import '../assets/style/in-activity.less'; @import '../assets/style/in-activity.less';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册