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

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

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