Commit 555d000a authored by FE-安焕焕's avatar FE-安焕焕 👣

修改问题

parent 9b8dacdd
......@@ -14,7 +14,7 @@ const localStorageParams = [
'formXcxPage'
];
const cookiesParams = ['h'];
const sessionStorageParams = ['target'];
const sessionStorageParams = ['returnUrl'];
export default {
// token校验,整个流程都是登陆后的
......
......@@ -34,6 +34,7 @@
class="type-item-checkbox"
checked-color="#EC1500"
:disabled="disabled || value.disabled"
@click.native="changePayType(value)"
/>
</div>
<p v-if="riskLimit && value.riskManagementDesc && !disabled" class="limitDes">
......
import localStorage from '@/service/localStorage.service';
import config from '@/config/index';
const { toBHost } = config;
export const goUrlExtends = {
methods: {
goHome() {
// 商城地址
const tob = this.getTarget();
if (tob) {
window.location.replace = `${toBHost}`;
const returnUrl = this.getReturnUrl();
if (returnUrl) {
window.location.replace = `${returnUrl}`;
return;
}
this.$router.replace({ name: 'home' });
},
goOrderList() {
const tob = this.getTarget();
if (tob) {
window.location.replace = `${toBHost}/orderList`;
const returnUrl = this.getReturnUrl();
if (returnUrl) {
window.location.replace = `${returnUrl}/orderList`;
return;
}
this.$router.replace({ name: 'orderList' }, 'sessionStorage');
},
goOrderDetail() {
const tob = this.getTarget();
const returnUrl = this.getReturnUrl();
const orderNo = localStorage.get('orderNo')?.orderNo;
if (tob) {
window.location.replace = `${toBHost}/orderDetail?orderNo=${orderNo}`;
if (returnUrl) {
window.location.replace = `${returnUrl}/orderDetail?orderNo=${orderNo}`;
return;
}
this.$router.replace({
......@@ -32,9 +30,9 @@ export const goUrlExtends = {
query: { orderNo }
});
},
getTarget() {
const tob = localStorage.get('target', 'sessionStorage');
return tob;
getReturnUrl() {
const returnUrl = localStorage.get('returnUrl', 'sessionStorage');
return returnUrl;
}
}
};
......@@ -26,6 +26,7 @@
import { queryPayStatus } from '@/api/pay.api';
import localStorage from '@/service/localStorage.service';
import { goUrlExtends } from './extends';
import { isApp } from '@/service/validation.service';
export default {
components: {},
extends: goUrlExtends,
......@@ -39,6 +40,11 @@ export default {
},
created() {
this.orderNo = this.$route.query.orderNo || localStorage.get('orderNo')?.orderNo;
if (!isApp) {
setTimeout(() => {
window.location.href = 'xyqb://openApp';
}, 2000);
}
},
mounted() {
this.$dialog({
......
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