Commit cade8030 authored by 郝聪敏's avatar 郝聪敏

fix: 区分测试线上环境

parent 831a605e
NODE_ENV=development NODE_ENV=development
ENVIRONMENT=development VUE_APP_ENVIRONMENT=development
\ No newline at end of file \ No newline at end of file
import prod from "./prod.config"; import prod from "./prod.config";
import dev from "./dev.config"; import dev from "./dev.config";
export default process.env.NODE_ENV === "production" ? prod : dev; export default process.env.VUE_APP_ENVIRONMENT === "production" ? prod : dev;
...@@ -9,10 +9,10 @@ import "amfe-flexible"; ...@@ -9,10 +9,10 @@ import "amfe-flexible";
import sa from "sa-sdk-javascript"; import sa from "sa-sdk-javascript";
import "@/assets/icons/index"; import "@/assets/icons/index";
import "@/service/cherry-ui"; import "@/service/cherry-ui";
// import Raven from "raven-js"; import Raven from "raven-js";
// import RavenVue from "raven-js/plugins/vue"; import RavenVue from "raven-js/plugins/vue";
import config from "@/config"; import config from "@/config";
// import { release } from "../.sentryclirc"; import { release } from "../.sentryclirc";
Vue.config.productionTip = false; Vue.config.productionTip = false;
new Vue({ new Vue({
...@@ -22,12 +22,12 @@ new Vue({ ...@@ -22,12 +22,12 @@ new Vue({
}).$mount("#app"); }).$mount("#app");
// 初始化sentry // 初始化sentry
// Raven.config("https://1dc603dd7c09468793aa003ab0bf9480@sentry.q-gp.com/57", { Raven.config("https://1dc603dd7c09468793aa003ab0bf9480@sentry.q-gp.com/57", {
// release, release,
// environment: process.env.VUE_APP_ENVIRONMENT environment: process.env.VUE_APP_ENVIRONMENT
// }) })
// .addPlugin(RavenVue, Vue) .addPlugin(RavenVue, Vue)
// .install(); .install();
// 初始化神策 // 初始化神策
sa.init({ sa.init({
......
...@@ -125,7 +125,7 @@ export default [ ...@@ -125,7 +125,7 @@ export default [
meta: { title: "芒果保险" } meta: { title: "芒果保险" }
}, },
{ {
path: "/policy/success/:orderNo", path: "/policy/success/:orderNo/:productNo",
name: "Sucess", name: "Sucess",
component: () => import("../views/Policy/Success/index.vue"), component: () => import("../views/Policy/Success/index.vue"),
meta: { title: "芒果保险" } meta: { title: "芒果保险" }
......
...@@ -109,9 +109,9 @@ export default { ...@@ -109,9 +109,9 @@ export default {
return; return;
} }
// 根据状态跳转页面 // 根据状态跳转页面
const status = await this.getPolicyStatus(orderNo); const { status, productNo } = await this.getPolicyStatus(orderNo);
if (["6.2-3", "6.1-3"].includes(status)) { if (["6.2-3", "6.1-3"].includes(status)) {
this.$router.replace(`/policy/success/${orderNo}`); this.$router.replace(`/policy/success/${orderNo}/${productNo}`);
return; return;
} }
// 保单详情页支付需重新调用保单接口 // 保单详情页支付需重新调用保单接口
...@@ -130,9 +130,12 @@ export default { ...@@ -130,9 +130,12 @@ export default {
}, },
async getPolicyStatus(orderNo) { async getPolicyStatus(orderNo) {
const policy = await getPolicyDetail(orderNo); const policy = await getPolicyDetail(orderNo);
return policy?.payState return {
? `${policy?.policyState}-${policy?.payState}` status: policy?.payState
: String(policy?.policyState); ? `${policy?.policyState}-${policy?.payState}`
: String(policy?.policyState),
productNo: policy?.productNo
};
} }
} }
}; };
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