Commit ed2fb93a authored by FE-安焕焕's avatar FE-安焕焕 👣

修改存储方式

parent a5f1eeb8
......@@ -5,7 +5,12 @@ const option = {
};
const Cookies = {
get(key) {
return cookies.get(key) || '';
const result = cookies.get(key);
try {
return JSON.parse(result);
} catch (e) {
return result;
}
},
set(key, value) {
return cookies.set(key, value, option);
......
......@@ -5,7 +5,6 @@ import store from '../store';
import { isWechat, isApp } from './validation.service';
import Cookies from './cookieStorage.service';
import localStorage from './localStorage.service';
//formXcxPage:标识是从小程序跳转过来的;
const localStorageParams = [
'creditToken',
'vccToken',
......@@ -13,8 +12,8 @@ const localStorageParams = [
'sonVccChannel',
'formXcxPage'
];
const cookiesParams = ['h'];
const sessionStorageParams = ['returnUrl'];
const cookiesParams = ['h', 'returnUrl'];
const sessionStorageParams = [];
export default {
// token校验,整个流程都是登陆后的
......
......@@ -206,6 +206,7 @@ export default {
},
mounted() {
this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo;
cookies.set('orderNo', { orderNo: this.orderNo });
this.queryPayInfo();
this.getCouponList(this.orderNo);
},
......@@ -398,7 +399,6 @@ export default {
this.retrieveLink();
return;
}
cookies.set('orderNo', { orderNo: this.orderNo });
const paramsData = {
...params,
quitUrl: `${window.location.origin}/payWaiting`,
......
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