Commit 61fc0cd2 authored by 郭志伟's avatar 郭志伟 Committed by 郝聪敏

fix: 顾问联调

parent 7544b9e5
...@@ -86,6 +86,7 @@ export default { ...@@ -86,6 +86,7 @@ export default {
this.$notify("登录成功"); this.$notify("登录成功");
this.setIsShowLogin(false); this.setIsShowLogin(false);
// localStorage.setItem("mongoToken", res.token); // localStorage.setItem("mongoToken", res.token);
// TODO 开发目前使用这个token
localStorage.setItem("mongoToken", "6ae7da7dd4c543f1a36c702c6f419f12"); localStorage.setItem("mongoToken", "6ae7da7dd4c543f1a36c702c6f419f12");
} }
}, },
......
...@@ -95,6 +95,12 @@ export default { ...@@ -95,6 +95,12 @@ export default {
// eslint-disable-next-line // eslint-disable-next-line
Collapse Collapse
}, },
props: {
state: {
type: [Number, String],
default: 0
}
},
data() { data() {
return { return {
isLogin: localStorage.get("mongoToken"), isLogin: localStorage.get("mongoToken"),
...@@ -212,7 +218,11 @@ export default { ...@@ -212,7 +218,11 @@ export default {
this.setIsShowLogin(true); this.setIsShowLogin(true);
return; return;
} }
if (this.state == 1) {
this.goPay();
} else {
this.generateOrder(); this.generateOrder();
}
}, },
async generateOrder() { async generateOrder() {
const res = await create(); const res = await create();
......
<template> <template>
<div> <div>
<buy v-if="orderState === 1" /> <buy v-if="orderState < 1" :state="orderState" />
<success v-if="orderState === 2 && isLogin && !showQuestion" /> <success v-if="orderState === 3 && isLogin && !showQuestion" />
<exclusive <exclusive
v-if="(orderState === 3 || orderState === 4) && isLogin" v-if="(orderState === 4 || orderState === 5) && isLogin"
:has-suggestion="orderState === 4" :has-suggestion="orderState === 5"
/> />
<question v-if="showQuestion && isLogin" /> <question v-if="showQuestion && isLogin" />
<tabbar /> <tabbar />
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
orderInfo: [ orderInfo: [
{ {
consultantOrderNo: "", consultantOrderNo: "",
state: 1 state: 0
} }
] ]
}; };
...@@ -59,6 +59,7 @@ export default { ...@@ -59,6 +59,7 @@ export default {
this.getOrderInfo(); this.getOrderInfo();
}, },
methods: { methods: {
// 1-待支付,3-支付成功,4-问卷收集完成,方案配置中,5-方案配置完成, -1 -支付失败订单关闭,-2 -支付超过1小时订单关闭,-3 -订单关闭
async getOrderInfo() { async getOrderInfo() {
if (!this.isLogin) return; if (!this.isLogin) return;
this.showQuestion = false; this.showQuestion = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment