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