商品添加客服
parent
1489deb618
commit
20c751a7b5
|
@ -2,8 +2,8 @@
|
||||||
"name" : "lili商城",
|
"name" : "lili商城",
|
||||||
"appid" : "__UNI__C100675",
|
"appid" : "__UNI__C100675",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.0.20",
|
"versionName" : "4.0.21",
|
||||||
"versionCode" : 4000020,
|
"versionCode" : 4000021,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
|
|
|
@ -166,10 +166,10 @@
|
||||||
<u-icon size="34" class="red" name="home-fill"></u-icon>
|
<u-icon size="34" class="red" name="home-fill"></u-icon>
|
||||||
<view class="red icon-btn-name">店铺</view>
|
<view class="red icon-btn-name">店铺</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="icon-btn-item" @click="linkMsgDetail()">
|
<view class="icon-btn-item" @click="linkMsgDetail()">
|
||||||
<u-icon size="34" name="kefu-ermai"></u-icon>
|
<u-icon size="34" name="kefu-ermai"></u-icon>
|
||||||
<view class="icon-btn-name">客服</view>
|
<view class="icon-btn-name">客服</view>
|
||||||
</view> -->
|
</view>
|
||||||
<view class="icon-btn-item" @click="reluchToCart()">
|
<view class="icon-btn-item" @click="reluchToCart()">
|
||||||
<u-icon size="34" name="storeping-cart"></u-icon>
|
<u-icon size="34" name="storeping-cart"></u-icon>
|
||||||
<view class="icon-btn-name">购物车</view>
|
<view class="icon-btn-name">购物车</view>
|
||||||
|
|
|
@ -148,7 +148,7 @@ export function orderStatusList(val) {
|
||||||
DELIVERED: "已发货",
|
DELIVERED: "已发货",
|
||||||
CANCELLED: "已取消",
|
CANCELLED: "已取消",
|
||||||
COMPLETE: "已完成",
|
COMPLETE: "已完成",
|
||||||
TAKE: "已完成",
|
TAKE: "待核验",
|
||||||
};
|
};
|
||||||
return orderStatusList[val];
|
return orderStatusList[val];
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ http.interceptors.request.use(
|
||||||
|
|
||||||
config.params = params;
|
config.params = params;
|
||||||
config.header.accessToken = accessToken;
|
config.header.accessToken = accessToken;
|
||||||
console.warn(accessToken);
|
|
||||||
/**
|
/**
|
||||||
* jwt 因为安卓以及ios没有window的属性
|
* jwt 因为安卓以及ios没有window的属性
|
||||||
* window.atob()这个函数 base64编码的使用方法就是btoa(),而用于解码的使用方法是atob(),
|
* window.atob()这个函数 base64编码的使用方法就是btoa(),而用于解码的使用方法是atob(),
|
||||||
|
@ -132,15 +132,10 @@ http.interceptors.request.use(
|
||||||
if (accessToken.split(".").length <= 1) {
|
if (accessToken.split(".").length <= 1) {
|
||||||
refresh();
|
refresh();
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
|
||||||
JSON.parse(atob(accessToken.split(".")[1])).exp,
|
|
||||||
Math.round(new Date() / 1000)
|
|
||||||
);
|
|
||||||
if (
|
if (
|
||||||
JSON.parse(atob(accessToken.split(".")[1])).exp <
|
JSON.parse(atob(accessToken.split(".")[1].replace(/-/g, '+').replace(/_/g, '/'))).exp <
|
||||||
Math.round(new Date() / 1000)
|
Math.round(new Date() / 1000)
|
||||||
) {
|
) {
|
||||||
console.log("过期时间小于当前时间刷新token");
|
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,6 +151,7 @@ http.interceptors.request.use(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
async function refresh() {
|
async function refresh() {
|
||||||
// 本地储存的是过期token了,重新获取
|
// 本地储存的是过期token了,重新获取
|
||||||
const getTokenResult = await refreshToken();
|
const getTokenResult = await refreshToken();
|
||||||
|
|
Loading…
Reference in New Issue