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

Merge branch 'fix/goods' into 'master'

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

See merge request !95
parents 4210c87c ea274b7d
...@@ -155,9 +155,10 @@ export default [ ...@@ -155,9 +155,10 @@ export default [
meta: { title: "了解芒果保险" } meta: { title: "了解芒果保险" }
}, },
{ {
path: "/paytest", path: "/payWaiting",
name: "Introduction", name: "PayWaiting",
component: () => import("../views/paytest") component: () => import("../views/Policy/PayWaiting/index.vue"),
meta: { title: "支付中" }
}, },
{ {
path: "*", path: "*",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转) * @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52 * @Date: 2020-07-28 15:03:52
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-27 14:54:50 * @LastEditTime: 2020-08-27 15:41:41
*/ */
// import cherry from "@qg/cherry-ui"; // import cherry from "@qg/cherry-ui";
...@@ -58,7 +58,9 @@ function payByWeixinJsapi(info = {}, callback) { ...@@ -58,7 +58,9 @@ function payByWeixinJsapi(info = {}, callback) {
function payByWeixinH5(info) { function payByWeixinH5(info) {
if (!info.url) return; if (!info.url) return;
const currentPath = encodeURIComponent( 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}`; window.location.href = `${info.url}&redirect_url=${currentPath}`;
} }
...@@ -74,7 +76,9 @@ function payByWeixinH5(info) { ...@@ -74,7 +76,9 @@ function payByWeixinH5(info) {
function payByThirdPartyCashier(info) { function payByThirdPartyCashier(info) {
if (!info.url) return; if (!info.url) return;
const currentPath = encodeURIComponent( 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}`; window.location.href = `${info.url}&redirect_uri=${currentPath}`;
} }
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
return; return;
} }
const res = await getCulOrder(); 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) { pageBack(e) {
this.showRec = false; this.showRec = false;
......
<template> <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> <h4 slot="title" class="pay-title">立即拥有<br />{{ title }}</h4>
<compactCellGroup class="pay-det" :cell-data="payData" :text-bold="true" /> <compactCellGroup class="pay-det" :cell-data="payData" :text-bold="true" />
<slot> <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