fix: 修复包码
This commit is contained in:
parent
d45ccfb88f
commit
bdccdfd674
|
@ -224,7 +224,7 @@
|
||||||
// 第一步:判断是否为包码
|
// 第一步:判断是否为包码
|
||||||
if (data.settlement_data.settlement_type > 0) {
|
if (data.settlement_data.settlement_type > 0) {
|
||||||
// 存储数据
|
// 存储数据
|
||||||
localStorage.setItem("bm_auth", JSON.stringify(data));
|
sessionStorage.setItem("bm_auth", JSON.stringify(data));
|
||||||
// 跳转包码页面
|
// 跳转包码页面
|
||||||
window.location.href = './packkey/goods-index.html';
|
window.location.href = './packkey/goods-index.html';
|
||||||
return
|
return
|
||||||
|
|
|
@ -84,6 +84,8 @@
|
||||||
/* 获取详情 */
|
/* 获取详情 */
|
||||||
function getInfo() {
|
function getInfo() {
|
||||||
const orderNumber = sessionStorage.getItem('orderNumber');
|
const orderNumber = sessionStorage.getItem('orderNumber');
|
||||||
|
console.log("orderNumber =>", orderNumber)
|
||||||
|
return
|
||||||
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
|
req.axiosGet(`/key/order/detail/${orderNumber}`).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
const { product_name, update_time, status, show_url, account, create_time, use_coupon } = res.data;
|
const { product_name, update_time, status, show_url, account, create_time, use_coupon } = res.data;
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
// 获取 包码结算数据
|
// 获取 包码结算数据
|
||||||
const bm_obj_data = localStorage.getItem("bm_auth") ? JSON.parse(localStorage.getItem("bm_auth")) : null;
|
const bm_obj_data = sessionStorage.getItem("bm_auth") ? JSON.parse(sessionStorage.getItem("bm_auth")) : null;
|
||||||
|
|
||||||
const { createApp, ref, reactive, onMounted } = Vue
|
const { createApp, ref, reactive, onMounted } = Vue
|
||||||
createApp({
|
createApp({
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.获取 商品数据
|
// 1.获取 商品数据
|
||||||
let goodsInfo = JSON.parse(localStorage.getItem("bm_goodsInfo"));
|
let goodsInfo = JSON.parse(sessionStorage.getItem("bm_goodsInfo"));
|
||||||
state.goodsInfo = goodsInfo;
|
state.goodsInfo = goodsInfo;
|
||||||
state.describeUrl = goodsInfo.entity.describe_url;
|
state.describeUrl = goodsInfo.entity.describe_url;
|
||||||
state.useMarkUrl = goodsInfo.entity.detail_url;
|
state.useMarkUrl = goodsInfo.entity.detail_url;
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
findPlaceholderText(goodsInfo.entity.account_type);
|
findPlaceholderText(goodsInfo.entity.account_type);
|
||||||
|
|
||||||
// 4.授权
|
// 4.授权
|
||||||
let bm_data = localStorage.getItem("bm_auth");
|
let bm_data = sessionStorage.getItem("bm_auth");
|
||||||
if (bm_data) {
|
if (bm_data) {
|
||||||
state.bmAuth = JSON.parse(bm_data)
|
state.bmAuth = JSON.parse(bm_data)
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
localStorage.setItem('orderNumber', res.data.order_number);
|
sessionStorage.setItem('orderNumber', res.data.order_number);
|
||||||
/* product_type:2 卡密
|
/* product_type:2 卡密
|
||||||
* card_show:2 线上查看卡密信息
|
* card_show:2 线上查看卡密信息
|
||||||
* backAble:是否多个商品
|
* backAble:是否多个商品
|
||||||
|
|
|
@ -63,10 +63,10 @@
|
||||||
// settlement_type: 2, // 结算类型
|
// settlement_type: 2, // 结算类型
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// localStorage.setItem("bm_auth", JSON.stringify(bm_gold_obj));
|
// sessionStorage.setItem("bm_auth", JSON.stringify(bm_gold_obj));
|
||||||
|
|
||||||
// 获取 包码结算数据-打开结算
|
// 获取 包码结算数据-打开结算
|
||||||
const bm_obj_data = localStorage.getItem("bm_auth") ? JSON.parse(localStorage.getItem("bm_auth")) : null;
|
const bm_obj_data = sessionStorage.getItem("bm_auth") ? JSON.parse(sessionStorage.getItem("bm_auth")) : null;
|
||||||
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 2) {
|
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 2) {
|
||||||
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
let res = await req.axiosPost('/key/products', params);
|
let res = await req.axiosPost('/key/products', params);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
// 注意:只能是一个商品
|
// 注意:只能是一个商品
|
||||||
localStorage.setItem("bm_goodsInfo", JSON.stringify(res.data[0]));
|
sessionStorage.setItem("bm_goodsInfo", JSON.stringify(res.data[0]));
|
||||||
state.describeUrl = res.data[0].entity.describe_url;
|
state.describeUrl = res.data[0].entity.describe_url;
|
||||||
state.useMarkUrl = res.data[0].entity.detail_url;
|
state.useMarkUrl = res.data[0].entity.detail_url;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
let bm_data = localStorage.getItem("bm_auth");
|
let bm_data = sessionStorage.getItem("bm_auth");
|
||||||
if (bm_data) {
|
if (bm_data) {
|
||||||
state.bmAuth = JSON.parse(bm_data)
|
state.bmAuth = JSON.parse(bm_data)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue