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

测试发布报错问题

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