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

fix: 微信H5支付添加支付回调等待页;协议弹框文案修复

parent 4210c87c
......@@ -155,9 +155,10 @@ export default [
meta: { title: "了解芒果保险" }
},
{
path: "/paytest",
name: "Introduction",
component: () => import("../views/paytest")
path: "/payWaiting",
name: "PayWaiting",
component: () => import("../views/Policy/PayWaiting/index.vue"),
meta: { title: "支付中" }
},
{
path: "*",
......
......@@ -2,7 +2,7 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52
* @LastEditors: gzw
* @LastEditTime: 2020-08-27 14:54:50
* @LastEditTime: 2020-08-27 15:41:41
*/
// import cherry from "@qg/cherry-ui";
......@@ -58,7 +58,9 @@ function payByWeixinJsapi(info = {}, callback) {
function payByWeixinH5(info) {
if (!info.url) return;
const currentPath = encodeURIComponent(
window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
window.location.origin +
"/payWaiting" +
qs.stringify(info.params, { encode: true, addQueryPrefix: true })
);
window.location.href = `${info.url}&redirect_url=${currentPath}`;
}
......@@ -74,7 +76,9 @@ function payByWeixinH5(info) {
function payByThirdPartyCashier(info) {
if (!info.url) return;
const currentPath = encodeURIComponent(
window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
window.location.origin +
"/payWaiting" +
qs.stringify(info.params, { encode: true, addQueryPrefix: true })
);
window.location.href = `${info.url}&redirect_uri=${currentPath}`;
}
......
......@@ -56,7 +56,7 @@ export default {
return;
}
const res = await getCulOrder();
this.noOrder = res[0].state && res[0].state <= 2;
this.noOrder = res[0] && res[0].state && res[0].state <= 2;
},
pageBack(e) {
this.showRec = false;
......
<template>
<modal v-model="show" :closeable="true" cancel-btn="" confirm-btn="好的 继续" @confirm="go">
<modal v-model="show" :closeable="true" cancel-btn="" confirm-btn="同意并继续" @confirm="go">
<h4 slot="title" class="pay-title">立即拥有<br />{{ title }}</h4>
<compactCellGroup class="pay-det" :cell-data="payData" :text-bold="true" />
<slot>
......
@import "../../../style/var.less";
.container {
overflow: hidden;
background-color: @white;
}
\ No newline at end of file
<template>
<div class="container"></div>
</template>
<script>
import detailPayMixin from "@/views/Goods/Detail/modules/detailPay.mixin";
export default {
name: "PayWaiting",
mixins: [detailPayMixin],
data() {
return {
orderInfo: {}
};
},
mounted() {
this.setIsPayWait(true);
this.orderInfo = this.$route.query;
if (!this.orderInfo.payOrderNo) {
this.$notify({ type: "warning", message: "正在跳转..." });
setTimeout(() => {
this.$router.replace("/policy");
}, 1000);
return;
}
this.getPayResult();
}
};
</script>
<style lang="less" src="./index.less" scoped></style>
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