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

fix: 顾问联调

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