Commit b4c68031 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/bainian_backurl' into 'master'

fix: 顾问问题修复

See merge request !219
parents b0801e0f 6503f917
...@@ -90,6 +90,7 @@ import Collapse from "@/components/Collapse"; ...@@ -90,6 +90,7 @@ import Collapse from "@/components/Collapse";
import PayWaitLayer from "@/components/PayWaitLayer"; import PayWaitLayer from "@/components/PayWaitLayer";
import CpsQa from "../../Goods/Detail/modules/CpsQA"; import CpsQa from "../../Goods/Detail/modules/CpsQA";
import { checkOpenId } from "@/service/wxJsSdk"; import { checkOpenId } from "@/service/wxJsSdk";
import Cookies from "js-cookie";
const SUM = 300; const SUM = 300;
export default { export default {
name: "ConsultantBuy", name: "ConsultantBuy",
...@@ -280,6 +281,7 @@ export default { ...@@ -280,6 +281,7 @@ export default {
}; };
const res = await goPay(_param); const res = await goPay(_param);
if (res) { if (res) {
Cookies.set("consultantPay", 1, { expires: 3 * 60 * 60 * 1000 });
let payInfo = ""; let payInfo = "";
if (res.payInfo && res.payInfo.payUrl) { if (res.payInfo && res.payInfo.payUrl) {
payInfo = { payInfo = {
......
...@@ -20,6 +20,7 @@ import Exclusive from "./Exclusive"; ...@@ -20,6 +20,7 @@ import Exclusive from "./Exclusive";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import localStorage from "@/service/localStorage"; import localStorage from "@/service/localStorage";
import { getCulOrder, getPayState } from "@/api/consultant"; import { getCulOrder, getPayState } from "@/api/consultant";
import Cookies from "js-cookie";
export default { export default {
name: "Consultant", name: "Consultant",
components: { components: {
...@@ -57,7 +58,9 @@ export default { ...@@ -57,7 +58,9 @@ export default {
} }
}, },
mounted() { mounted() {
const fromPay = this.$route.query.from && this.$route.query.from === "wxh5"; const fromPay =
(this.$route.query.from && this.$route.query.from === "wxh5") ||
Cookies.get("consultantPay") == 1;
this.getOrderInfo(fromPay); this.getOrderInfo(fromPay);
}, },
methods: { methods: {
...@@ -72,6 +75,8 @@ export default { ...@@ -72,6 +75,8 @@ export default {
this.orderInfo = res; this.orderInfo = res;
if (checkPayState && res[0] && res[0].state < 3) { if (checkPayState && res[0] && res[0].state < 3) {
this.getPayState(); this.getPayState();
} else {
Cookies.remove("consultantPay");
} }
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -28,8 +28,12 @@ export default { ...@@ -28,8 +28,12 @@ export default {
this.orderInfo = this.$route.query; this.orderInfo = this.$route.query;
// 如果存在isXyqb,同时当前不是在信用钱包环境 // 如果存在isXyqb,同时当前不是在信用钱包环境
if (this.orderInfo.isConsultant) { if (this.orderInfo.isConsultant) {
window.location.href = "xyqb://my"; if (!isXyqb) {
this.$router.replace({ path: "/consultant", query: { from: "wxh5" } }); window.location.href = "xyqb://my";
}
setTimeout(() => {
this.$router.replace({ path: "/consultant", query: { from: "wxh5" } });
}, 1000);
return; return;
} else if ( } else if (
(this.orderInfo.isXyqb == 1 || (this.orderInfo.isXyqb == 1 ||
......
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