mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
优化无痛刷新token 修改分销扫码bug
This commit is contained in:
@@ -483,6 +483,7 @@ export default {
|
||||
getMpScene(this.routerVal.scene).then((res) => {
|
||||
if (res.data.success) {
|
||||
let data = res.data.result.split(","); // skuId,goodsId,distributionId
|
||||
console.warn(data)
|
||||
this.init(data[0], data[1], data[2]);
|
||||
}
|
||||
});
|
||||
@@ -520,7 +521,7 @@ export default {
|
||||
/**
|
||||
* 初始化信息
|
||||
*/
|
||||
async init(id, goodsId, distributionId) {
|
||||
async init(id, goodsId, distributionId="") {
|
||||
this.isGroup = false; //初始化拼团
|
||||
this.productId = id; // skuId
|
||||
// 这里请求获取到页面数据 解析数据
|
||||
@@ -535,6 +536,7 @@ export default {
|
||||
if (distributionId || this.$store.state.distributionId) {
|
||||
let disResult = await getGoodsDistribution(distributionId);
|
||||
if (!disResult.data.success || disResult.statusCode == 403) {
|
||||
console.log("绑定成功!")
|
||||
this.$store.state.distributionId = distributionId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
* 实例化首页数据楼层
|
||||
*/
|
||||
init() {
|
||||
this.pageData = ""
|
||||
this.pageData = "";
|
||||
getFloorData().then((res) => {
|
||||
if (res.data.success) {
|
||||
this.pageData = JSON.parse(res.data.result.pageData);
|
||||
@@ -128,19 +128,28 @@ export default {
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
let path = encodeURIComponent(res.result);
|
||||
config.scanAuthNavigation.forEach((src) => {
|
||||
if (res.result.indexOf(src) != -1) {
|
||||
uni.navigateTo({
|
||||
url: `/${res.result.substring(src.length)}`,
|
||||
});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
|
||||
// WX_CODE 为小程序码
|
||||
if (res.scanType == "WX_CODE") {
|
||||
console.log(res)
|
||||
uni.navigateTo({
|
||||
url: `/${res.path}`,
|
||||
});
|
||||
} else {
|
||||
config.scanAuthNavigation.forEach((src) => {
|
||||
if (res.result.indexOf(src) != -1) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/tabbar/home/web-view?src=" + path,
|
||||
url: `/${res.result.substring(src.length)}`,
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/tabbar/home/web-view?src=" + path,
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user