提交 1cc4820a 编写于 作者: huangwensu's avatar huangwensu

test1环境bug修复

上级 aa2c8e46
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="task-activity"> <div class="task-activity">
<div class="task-content" v-for="(item,index) in taskList" :key="index"> <div class="task-content" v-for="(item,index) in taskList" :key="index">
<!-- timeStatus 1 进行中 2 结束 3未开始 hideEndFlag 1 结束后隐藏 2结束后不隐藏 --> <!-- timeStatus 1 进行中 2 结束 3未开始 hideEndFlag 1 结束后隐藏 2结束后不隐藏 -->
<div v-if="(item.timeStatus == 1 || (item.timeStatus == 2 && item.hideEndFlag == 2)) && item.resourceType != 10 && (item.resourceType != 11 || (item.resourceType == 11 && item.resourceId != 2))"> <div class="task-con" v-if="(item.timeStatus == 1 || (item.timeStatus == 2 && item.hideEndFlag == 2)) && item.resourceType != 10 && (item.resourceType != 11 || (item.resourceType == 11 && item.resourceId != 2))">
<img :src="item.defaultBackgroundImage"/> <img :src="item.defaultBackgroundImage"/>
<div class="task-item" @click="linkPage(item)"> <div class="task-item" @click="linkPage(item)">
<!-- 1.课程 2.考试 3.调查问卷 4.患者招募 5.宣教漫画 6.打卡 7.邀请 8.任务排查 9.绑定居民到微信 10.首次进入页面 11.点赞和邀请进入--> <!-- 1.课程 2.考试 3.调查问卷 4.患者招募 5.宣教漫画 6.打卡 7.邀请 8.任务排查 9.绑定居民到微信 10.首次进入页面 11.点赞和邀请进入-->
...@@ -188,59 +188,7 @@ export default { ...@@ -188,59 +188,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.task-activity { .task-activity {
// padding: 0 0px 5px; .task-con {
.login-bg {
position: relative;
.tx-con {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 50%;
padding: 0px 35px;
font-size: 20px !important;
height: 90px;
margin-top: -45px;
overflow: hidden;
.tx-title {
font-size: 15px;
color: #fff;
opacity: 1;
span {
color: #fff;
font-size: 12px;
opacity: 0.54;
}
}
.tx-item {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.item-con {
flex-grow: 1;
padding-top: 8px;
.num{
color: #fff;
font-size: 27px;
font-weight: 600;
span {
color: #fff;
}
}
.name {
font-size: 12px;
opacity: 0.69;
span {
color: #fff !important;
}
}
}
}
}
}
.login-bg, .task-content {
position: relative; position: relative;
padding-bottom: 5px; padding-bottom: 5px;
img { img {
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
:stepText="stepText1" :stepText="stepText1"
:stepTime="stepTime1"/> :stepTime="stepTime1"/>
<task-activity <task-activity
v-if="taskTimeFlag"
:isWeb="isWeb" :isWeb="isWeb"
:acToken="token" :acToken="token"
:userMobile="userMobile" :userMobile="userMobile"
...@@ -132,7 +131,7 @@ export default { ...@@ -132,7 +131,7 @@ export default {
}, },
data() { data() {
return { return {
taskTimeFlag: true, // 任务在有效时间内 // taskTimeFlag: true, // 任务在有效时间内
isShowRightIcon: true, // 是否显示分享按钮 isShowRightIcon: true, // 是否显示分享按钮
isLogin: false, isLogin: false,
userMobile: '', userMobile: '',
...@@ -231,10 +230,10 @@ export default { ...@@ -231,10 +230,10 @@ export default {
getActivityTime().then(res => { getActivityTime().then(res => {
if(res.code == '000000') { if(res.code == '000000') {
let nowTime = res.data; let nowTime = res.data;
let lastTime = (new Date("2020/04/06 24:00:00")).getTime(); // let lastTime = (new Date("2020/04/06 24:00:00")).getTime();
if(lastTime < nowTime) { // if(lastTime < nowTime) {
this.taskTimeFlag = false; // this.taskTimeFlag = false;
} // }
//判断是否到瓜分云鹊豆的时间 //判断是否到瓜分云鹊豆的时间
let carveTime = (new Date("2020/04/07 17:00:00")).getTime();//"2020/04/07 17:00:00" let carveTime = (new Date("2020/04/07 17:00:00")).getTime();//"2020/04/07 17:00:00"
if (carveTime <= nowTime) { if (carveTime <= nowTime) {
......
...@@ -177,21 +177,20 @@ export default { ...@@ -177,21 +177,20 @@ export default {
activityId: this.activityId activityId: this.activityId
}; };
pointResult(param).then(res => { pointResult(param).then(res => {
this.$router.push({path: "/login-point/point-result",query: {code: '000000'}}); this.loadingFlag = false;
// this.loadingFlag = false; if(res.code == '000000') {
// if(res.code == '000000') { if(res.data == '900001') {
// if(res.data == '900001') { this.$toast('不能给自己点赞哦');
// this.$toast('不能给自己点赞哦'); }else {
// }else { this.$router.push({path: "/login-point/point-result",query: {code: res.data}});
// this.$router.push({path: "/login-point/point-result",query: {code: res.data}}); }
// } }else if(res.code == '300000') {
// }else if(res.code == '300000') { this.$toast(res.message);
// this.$toast(res.message); this.captchaAnswer = '';
// this.captchaAnswer = ''; this.getCaptcha();
// this.getCaptcha(); }else {
// }else { this.$toast(res.message);
// this.$toast(res.message); }
// }
}) })
} }
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
</template> </template>
<script> <script>
import { ENV_CONFIG } from '@/utils/enumerate'; import { ENV_CONFIG } from '@/utils/enumerate';
import { browser } from '@/utils/index';
export default { export default {
data() { data() {
return { return {
...@@ -30,7 +31,9 @@ export default { ...@@ -30,7 +31,9 @@ export default {
pointText2: "", pointText2: "",
btnText: "", btnText: "",
code: '', code: '',
status: 1 status: 1,
isWeb: false,
isWeixinWeb: false
} }
}, },
created() { created() {
...@@ -72,6 +75,13 @@ export default { ...@@ -72,6 +75,13 @@ export default {
this.btnText = "打开APP参与瓜分云鹊豆"; this.btnText = "打开APP参与瓜分云鹊豆";
} }
}, },
mounted() {
this.isWeb = this.$rocNative.isWeb;
this.isWeixinWeb = browser();
if(this.isWeb && !this.isWeixinWeb) {
this.openApp();
}
},
methods: { methods: {
openApp() { openApp() {
// let path = window.location.origin + window.location.hash; // let path = window.location.origin + window.location.hash;
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
this.allScore = res.data.totalScore; this.allScore = res.data.totalScore;
this.userId = res.data.id; this.userId = res.data.id;
this.name = res.data.name; this.name = res.data.name;
this.rank = res.data.rank; this.rank = res.data.rank > 100 ? 100 : res.data.rank;
this.firstScore = res.data.firstScore; this.firstScore = res.data.firstScore;
this.lastScore = res.data.lastScore; this.lastScore = res.data.lastScore;
}) })
......
...@@ -63,6 +63,20 @@ export const delCookie = (cname) => { ...@@ -63,6 +63,20 @@ export const delCookie = (cname) => {
} }
} }
// 判断微信
export function browser() {
let u = navigator.userAgent, app = navigator.appVersion;
let isMobile = !!u.match(/AppleWebKit.*Mobile.*/);//是否为移动终端
if(isMobile) {
var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
if (ua.match(/MicroMessenger/i) == "micromessenger") {
//在微信中打开
return true;
}
}
return false;
}
export const setEventByModuleCode = (itemData, token) => { export const setEventByModuleCode = (itemData, token) => {
let modeCode = itemData.code || ''; let modeCode = itemData.code || '';
let paramList = itemData.paramList ? itemData.paramList : ''; let paramList = itemData.paramList ? itemData.paramList : '';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册