提交 0ced546e 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-stage2-20191125' into dev-copy-stage2

...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
methods: { methods: {
handlerMethod() { handlerMethod() {
if(this.btnType) { if(this.btnType) {
this.$router.push('/in-activity') this.$router.push('/activityPage')
} else { } else {
this.$emit('sureBtn') this.$emit('sureBtn')
} }
......
...@@ -51,7 +51,11 @@ ...@@ -51,7 +51,11 @@
isCheckAuth: { // 是否校驗權限 isCheckAuth: { // 是否校驗權限
type: Boolean, type: Boolean,
default: false default: false
} },
isStageTwoHomePage: { // 是否是二期主页面
type: Boolean,
default: false
},
}, },
data(){ data(){
return { return {
...@@ -98,15 +102,27 @@ ...@@ -98,15 +102,27 @@
}) })
}, },
goBack(){ goBack(){
if(this.isStageTwoHomePage){
vm.$sendBuriedData({
component_tag: `302#302002`
});
}else{
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `301#301002` component_tag: `301#301002`
}); });
}
this.$rocNative.goBack(); this.$rocNative.goBack();
}, },
goShare(){ goShare(){
if(this.isStageTwoHomePage){
vm.$sendBuriedData({
component_tag: `302#302001`
});
}else{
this.$sendBuriedData({ this.$sendBuriedData({
component_tag: `301#301001` component_tag: `301#301001`
}); });
}
if(this.isCheckAuth){ if(this.isCheckAuth){
this.$emit('checkAuth', ()=>{ this.$emit('checkAuth', ()=>{
this.$rocNative.shareWechat(this.shareObj); this.$rocNative.shareWechat(this.shareObj);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:isOpacity="false" :isOpacity="false"
:shareObj="shareObj" :shareObj="shareObj"
:isCheckAuth="true" :isCheckAuth="true"
:isStageTwoHomePage="true"
@checkAuth="handleLoginCheck" @checkAuth="handleLoginCheck"
@getHeaderHeight="getHeaderHeight" @getHeaderHeight="getHeaderHeight"
/> />
...@@ -153,7 +154,7 @@ ...@@ -153,7 +154,7 @@
<img src="../assets/img/stage-two/invite-btn.png" alt="" class="invite-btn"> <img src="../assets/img/stage-two/invite-btn.png" alt="" class="invite-btn">
<p @click="handleInviteClick" class="text">去邀请</p> <p @click="handleInviteClick" class="text">去邀请</p>
</div> </div>
<div class="login-tips">被邀请好友登录APP,收益X4</div> <div class="login-tips">被邀请好友登录APP,收益X9</div>
</div> </div>
<!-- 每日任务 --> <!-- 每日任务 -->
...@@ -173,9 +174,7 @@ ...@@ -173,9 +174,7 @@
</div> </div>
<!-- 底部云鹊logo --> <!-- 底部云鹊logo -->
<div class="bottom-logo"> <div class="bottom-logo"></div>
<img src="" alt="">
</div>
<!-- 打卡成功 弹窗 --> <!-- 打卡成功 弹窗 -->
<div v-if="clockSuccessVisible" class="toast-wrap" @touchmove.prevent> <div v-if="clockSuccessVisible" class="toast-wrap" @touchmove.prevent>
...@@ -260,8 +259,8 @@ ...@@ -260,8 +259,8 @@
userToken: '', userToken: '',
}, },
eachInviteAward: { // 每邀请1位医生好友领取课程,+??勤奋分 +??云鹊豆 (默认均为20) eachInviteAward: { // 每邀请1位医生好友领取课程,+??勤奋分 +??云鹊豆 (默认均为20)
mark: 20, // 勤奋分 mark: 10, // 勤奋分
bean: 20, // 云鹊豆 bean: 10, // 云鹊豆
taskId: '', taskId: '',
activityId: '', activityId: '',
}, },
...@@ -348,6 +347,7 @@ ...@@ -348,6 +347,7 @@
}, },
created() { created() {
vm = this; vm = this;
}, },
mounted() { mounted() {
// // 这里需要删掉!!! // // 这里需要删掉!!!
...@@ -361,8 +361,6 @@ ...@@ -361,8 +361,6 @@
// 请求接口获取activityId (经与后端产品确认,默认没传id的话,就取接口;默认有的话就不取接口) // 请求接口获取activityId (经与后端产品确认,默认没传id的话,就取接口;默认有的话就不取接口)
if( !vm.activityId ){ if( !vm.activityId ){
getActivityId().then(res => { getActivityId().then(res => {
alert('guhui 获取id')
alert(JSON.stringify(res))
if(res && res.code == '000000' ){ if(res && res.code == '000000' ){
let data = res.data ; let data = res.data ;
for(let i in data){ for(let i in data){
...@@ -493,8 +491,6 @@ ...@@ -493,8 +491,6 @@
vm.getUserActivityInfo(); vm.getUserActivityInfo();
vm.goToCheckJoin(); vm.goToCheckJoin();
getEncryptId().then(res => { getEncryptId().then(res => {
alert('获取加密过后的id');
alert(JSON.stringify(res))
if( res && res.code && res.code == '000000' ){ if( res && res.code && res.code == '000000' ){
vm.encryptId = res.data; vm.encryptId = res.data;
}else{ }else{
...@@ -504,8 +500,6 @@ ...@@ -504,8 +500,6 @@
}, },
getUserActivityInfo() { // 获取用户及参加活动的具体信息 getUserActivityInfo() { // 获取用户及参加活动的具体信息
getUserScoreInfo().then(res => { getUserScoreInfo().then(res => {
// alert('获取用户及分数信息。。。');
// alert(JSON.stringify(res));
vm.doctorInfo = res.data; vm.doctorInfo = res.data;
if(vm.doctorInfo.userYesterdayRank==1){ if(vm.doctorInfo.userYesterdayRank==1){
vm.awardModalShow = true; vm.awardModalShow = true;
...@@ -548,8 +542,8 @@ ...@@ -548,8 +542,8 @@
}, },
handleGetInviteList() { handleGetInviteList() {
getInviteList().then(res => { getInviteList().then(res => {
alert(JSON.stringify('获取邀请的列表 OK')); // alert(JSON.stringify('获取邀请的列表 OK'));
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; vm.inviteList = res.data.list;
...@@ -574,19 +568,42 @@ ...@@ -574,19 +568,42 @@
}, },
// 活动规则 // 活动规则
handleRuleBtnClick() { handleRuleBtnClick() {
alert('跳转至 活动规则页面') vm.$sendBuriedData({
component_tag: `302#302003`
});
let url = 'https://phome.yunqueyi.com/template_v2/?id=599&token=9D4E3E66DC214776A523752AC26D4329&wx_code=7519926147';
// alert(url)
let paramList = [
{
"key":"pageUrl",
"value": url,
"type":4,
"seqNo":1
},{
"key":"showTitle",
"value": false,
"type":1,
"seqNo":2
},{
"key":"title",
"value": '',
"type":1,
"seqNo":3
}
]
vm.$rocNative.dispatchEventByModuleCode && vm.$rocNative.dispatchEventByModuleCode({
modeCode: 'M300',
jsonString: paramList
})
}, },
// 去登录 // 去登录
goToLogin() { goToLogin() {
alert('去登录...');
vm.appLogin(); vm.appLogin();
}, },
// 去加入机构 // 去加入机构
goToJoin() { goToJoin() {
alert('去加入机构...')
// 用户点击【加入机构】,继续判断用户是否有创建机构在审核状态,若有,则弹出弹窗提示。若无则跳转加入机构页面 // 用户点击【加入机构】,继续判断用户是否有创建机构在审核状态,若有,则弹出弹窗提示。若无则跳转加入机构页面
if( vm.joinStatus == 2 ){ // 机构审核中 if( vm.joinStatus == 2 ){ // 机构审核中
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: `抱歉,您创建的机构【${vm.doctorInfo.hospital}】正在审核中,审核通过后可参与活动<br/><br/>如有疑问可联系客:<span>400-920-8877</span><br/>(周一至周五9:00-18:00)`,
...@@ -603,7 +620,6 @@ ...@@ -603,7 +620,6 @@
}); });
}else if( vm.joinStatus == 3 ){ // 未加入机构 }else if( vm.joinStatus == 3 ){ // 未加入机构
alert('未加入机构。。。。。')
this.checkVersion(()=>{ this.checkVersion(()=>{
if (this.$rocNative.isAndroid) { if (this.$rocNative.isAndroid) {
this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' }); this.$rocNative.setNeedClearUrl({ url: 'year_end_ssr' });
...@@ -639,21 +655,27 @@ ...@@ -639,21 +655,27 @@
// 跳转至 个人明细 // 跳转至 个人明细
goToUserDetail() { goToUserDetail() {
alert('跳转至 个人明细') vm.$sendBuriedData({
component_tag: `302#302004`
});
this.$router.push({ this.$router.push({
name: 'person-detail', name: 'person-detail',
}); });
}, },
// 查看个人榜单 // 查看个人榜单
goToUserBoard() { goToUserBoard() {
alert('跳转至 个人榜单') vm.$sendBuriedData({
component_tag: `302#302005`
});
this.$router.push({ this.$router.push({
name: 'person-ranking', name: 'person-ranking',
}); });
}, },
// 查看机构榜单 // 查看机构榜单
goToOrganBoard() { goToOrganBoard() {
alert('跳转至 机构榜单') vm.$sendBuriedData({
component_tag: `302#302006`
});
this.$router.push({ this.$router.push({
name: 'hospital-ranking', name: 'hospital-ranking',
}); });
...@@ -663,7 +685,6 @@ ...@@ -663,7 +685,6 @@
}, },
// 昨日获奖 // 昨日获奖
goToYesterdayPrize() { goToYesterdayPrize() {
alert('跳转至 昨日获奖页面')
if(!this.showAwadModal){ if(!this.showAwadModal){
return; return;
}else{ }else{
...@@ -674,8 +695,11 @@ ...@@ -674,8 +695,11 @@
}, },
// 云鹊豆中心 // 云鹊豆中心
goToBeanCenter() { goToBeanCenter() {
vm.$sendBuriedData({
component_tag: `302#302007`
});
let url = getShareUrl() + 'integral/#/chirpCenter'; let url = getShareUrl() + 'integral/#/chirpCenter';
alert(url) // alert(url)
let paramList = [ let paramList = [
{ {
"key":"pageUrl", "key":"pageUrl",
...@@ -715,6 +739,9 @@ ...@@ -715,6 +739,9 @@
//“邀请医生好友学课程” 查看更多 //“邀请医生好友学课程” 查看更多
seeMore() { seeMore() {
vm.$sendBuriedData({
component_tag: `302#302009`
});
let cb = this.seeInviteMore; let cb = this.seeInviteMore;
this.handleLoginCheck(cb); this.handleLoginCheck(cb);
}, },
...@@ -729,21 +756,18 @@ ...@@ -729,21 +756,18 @@
}, },
// 去邀请 按钮 // 去邀请 按钮
handleInviteClick() { handleInviteClick() {
vm.$sendBuriedData({
component_tag: `302#302008`
});
vm.shareObj.shareUrl = vm.shareWxUrl(); vm.shareObj.shareUrl = vm.shareWxUrl();
let cb = this.goToShare; let cb = this.goToShare;
this.handleLoginCheck(cb); this.handleLoginCheck(cb);
}, },
goToShare() { goToShare() {
alert('调app分享');
// let id = vm.encryptDoctorId();
// 调用APP分享 // 调用APP分享
this.$rocNative.shareWechat(this.shareObj); this.$rocNative.shareWechat(this.shareObj);
}, },
encryptDoctorId() {
// 给id加密
// return 'dddddd'
},
// 去完成任务 按钮 // 去完成任务 按钮
goToFinish(item) { goToFinish(item) {
...@@ -755,6 +779,9 @@ ...@@ -755,6 +779,9 @@
goToFinishCB(item) { goToFinishCB(item) {
// resourceType 业务类型 1.课程 2.考试 3.调查问卷 4.患者招募 5.宣教漫画 6.打卡 7.邀请 // resourceType 业务类型 1.课程 2.考试 3.调查问卷 4.患者招募 5.宣教漫画 6.打卡 7.邀请
if( item.resourceType == 6 ){ if( item.resourceType == 6 ){
vm.$sendBuriedData({
component_tag: `302#302010`
});
// 执行打卡接口 // 执行打卡接口
if( vm.isClockFinish ){ // 已打卡,不执行,未打卡,去调用打卡接口 if( vm.isClockFinish ){ // 已打卡,不执行,未打卡,去调用打卡接口
// 已打卡,不处理 // 已打卡,不处理
...@@ -764,10 +791,17 @@ ...@@ -764,10 +791,17 @@
activityId: item.activityId, activityId: item.activityId,
taskId: item.id, taskId: item.id,
}; };
goToUpdateClock(params).then(res => {
alert(JSON.stringify('goTO 更新去打卡状态'));
alert(JSON.stringify(res));
setTimeout(() => {
if(!vm.clockSuccessVisible){
vm.$toast({
duration: 3000, // 持续展示 toast
forbidClick: true,
message: '网络错误,请检查网络'
});
}
}, 15000)
goToUpdateClock(params).then(res => {
if(res && res.code == '000000'){ if(res && res.code == '000000'){
if(res.data){ // 打卡成功 if(res.data){ // 打卡成功
vm.clockSuccessVisible = true; vm.clockSuccessVisible = true;
...@@ -776,12 +810,21 @@ ...@@ -776,12 +810,21 @@
vm.$toast(res.message); vm.$toast(res.message);
} }
}else{ }else{
vm.$toast(res.message); vm.$toast('打卡发生错误,请重新进入活动,再次尝试打卡');
} }
}) })
} }
}else{ // 非打卡,直接走积木tims跳转逻辑 }else{ // 非打卡,直接走积木tims跳转逻辑
// alert('去课程或者患者招募 。。。。。。') // alert('去课程或者患者招募 。。。。。。')
if(item.resourceType == 1){ // 课程
vm.$sendBuriedData({
component_tag: `302#302011`
});
}else if(item.resourceType == 4){ // SMO
vm.$sendBuriedData({
component_tag: `302#302012`
});
}
if(item.isFinish == 0){ // 已完成 不可点 if(item.isFinish == 0){ // 已完成 不可点
return; return;
} }
...@@ -956,7 +999,7 @@ ...@@ -956,7 +999,7 @@
id: url, id: url,
token token
}); });
alert('inJumpage'); alert(JSON.stringify(data)) // alert('inJumpage'); alert(JSON.stringify(data))
const itemData = data.model; const itemData = data.model;
// 增加点击图片时候,是否有loginFlag参数,有,则校验并登录。如未登录去登录,已登录,老逻辑。 // 增加点击图片时候,是否有loginFlag参数,有,则校验并登录。如未登录去登录,已登录,老逻辑。
...@@ -992,7 +1035,7 @@ ...@@ -992,7 +1035,7 @@
return flag; return flag;
}, },
// 原先的点击图片跳转逻辑 // 原先的点击图片跳转逻辑
oldJumpHandle(itemData, token){ alert('oldJUmpHundalsdllksllll') oldJumpHandle(itemData, token){
// 不改动原先逻辑 // 不改动原先逻辑
if (itemData.code == 'M301') { if (itemData.code == 'M301') {
itemData.code = 'M300'; itemData.code = 'M300';
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
}, },
methods: { methods: {
goInActivity() { goInActivity() {
this.$router.push('/in-activity') this.$router.push('/activityPage')
}, },
changeRanking(val) { changeRanking(val) {
this.activeBtnType = val; this.activeBtnType = val;
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
}, },
methods: { methods: {
goInActivity() { goInActivity() {
this.$router.push('/in-activity') this.$router.push('/activityPage')
}, },
detailTaskIcon(taskType) { detailTaskIcon(taskType) {
if(taskType == 4) { //smo if(taskType == 4) { //smo
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册