Commit 1b321f9d authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/fix_openid' into 'master'

fix:openid获取方式修改

See merge request !203
parents bcb6e95b 940c33be
......@@ -92,7 +92,11 @@ axios.interceptors.response.use(
// 后端返回异常信息时提出警告
if (response.data.code && response.data.msg) notifyType = "warning";
Notify({ type: notifyType, message: response.data.msg || "后端服务异常" });
Notify({
type: notifyType,
message: response.data.msg || "后端服务异常",
duration: notifyType === "warning" ? 6000 : 3000
});
return Promise.reject(response.data);
},
async err => {
......
......@@ -13,7 +13,6 @@ export default {
return {
subFormData: {}, // 组装好的数据
orderInfo: {},
openId: localStorage.get("openId"),
tradeType: "",
payTimer: null,
isPayWait: false
......@@ -41,7 +40,7 @@ export default {
},
async goPay() {
this.setIsLoading(false);
const { tradeType, orderInfo, openId } = this;
const { tradeType, orderInfo } = this;
const { payOrderNo, payType } = orderInfo;
if (!payOrderNo) {
this.$toast("请先生成订单");
......@@ -52,8 +51,8 @@ export default {
payOrderType: payType,
tradeType
};
if (openId && tradeType === "JSAPI") {
params.openId = openId;
if (localStorage.get("openId") && tradeType === "JSAPI") {
params.openId = localStorage.get("openId");
}
this.isPayWait = true;
const res = await placeOrder.pay(params);
......
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