测试反馈修改-0804
parent
2a34237e13
commit
967913f551
|
@ -20,12 +20,34 @@ const refreshTokenPage = () => {
|
|||
param += '?' + key + '=' + currentParam[key]
|
||||
}
|
||||
let localRoute = '/'+ currentRoute + param;
|
||||
uni.setStorageSync('page-path-options',localRoute);
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
if(localRoute !== '/pages/login/login'){
|
||||
uni.login({
|
||||
success: (res) => {
|
||||
uni.request({
|
||||
url:'https://laonon.scdxtc.cn/api/user/login',
|
||||
data:{
|
||||
code:res.code,
|
||||
invite_code:uni.getStorageSync('inviteCode')?uni.getStorageSync('inviteCode'):'',
|
||||
},
|
||||
success: (result) => {
|
||||
if(result.data.code == 0) {
|
||||
uni.setStorageSync('userId',result.data.account_id);
|
||||
uni.setStorageSync('token',result.data.data.token);//缓存token
|
||||
uni.setStorageSync('openid',result.data.data.openid);//缓存openid
|
||||
uni.setStorageSync('expire',result.data.data.expire);//缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('phone_active',result.data.data.phone_active);//是否授权手机号
|
||||
uni.setStorageSync('is_active',result.data.data.is_active);//是否授权头像和昵称
|
||||
uni.setStorageSync('invite_code',result.data.data.invite_code);//缓存邀请码
|
||||
// 重新进入当前页面
|
||||
uni.reLaunch({
|
||||
url:localRoute
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},1200)
|
||||
}
|
||||
flag = true;
|
||||
}
|
||||
// 请求错误处理
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</view>
|
||||
<!-- 到底啦 -->
|
||||
<view class="no-more font24 pad-sx25" style="margin: 0;" v-if="listData.length!==0 && noMore"><text>—— 到底啦 ——</text></view>
|
||||
<nothing-page v-if="listData.length==0" content="您的购物车,空空如也(*^▽^*)"></nothing-page>
|
||||
<nothing-page v-if="isLoading && listData.length==0" content="您的购物车,空空如也(*^▽^*)"></nothing-page>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,50 +1,51 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/my/my",
|
||||
"pages/cart/cart",
|
||||
"pages/cart/settlement",
|
||||
"pages/cart/finish",
|
||||
"pages/login/login"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pagesA",
|
||||
"pages": [
|
||||
"address/address",
|
||||
"recharge/recharge",
|
||||
"integral/integral",
|
||||
"distribution/distribution",
|
||||
"coupon/coupon",
|
||||
"order/order",
|
||||
"order/detail"
|
||||
]
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/my/my",
|
||||
"pages/cart/cart",
|
||||
"pages/cart/settlement",
|
||||
"pages/cart/finish",
|
||||
"pages/login/login"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pagesA",
|
||||
"pages": [
|
||||
"address/address",
|
||||
"recharge/recharge",
|
||||
"integral/integral",
|
||||
"distribution/distribution",
|
||||
"coupon/coupon",
|
||||
"order/order",
|
||||
"order/detail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pagesB",
|
||||
"pages": [
|
||||
"shop-detail/shop-detail",
|
||||
"ucenter/ucenter",
|
||||
"disclaimers/disclaimers",
|
||||
"integral-rule/integral-rule",
|
||||
"distributor/distributor"
|
||||
]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationStyle": "custom",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"backgroundTextStyle": "light"
|
||||
},
|
||||
{
|
||||
"root": "pagesB",
|
||||
"pages": [
|
||||
"shop-detail/shop-detail",
|
||||
"ucenter/ucenter",
|
||||
"disclaimers/disclaimers",
|
||||
"integral-rule/integral-rule",
|
||||
"distributor/distributor"
|
||||
]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationStyle": "custom",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"backgroundTextStyle": "light"
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "您的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"usingComponents": {
|
||||
"nothing-page": "/components/nothing/nothing-page",
|
||||
"status-nav": "/components/status-nav/status-nav"
|
||||
}
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "您的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"usingComponents": {
|
||||
"nothing-page": "/components/nothing/nothing-page",
|
||||
"status-nav": "/components/status-nav/status-nav"
|
||||
},
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
|
@ -4760,12 +4760,34 @@ var refreshTokenPage = function refreshTokenPage() {
|
|||
param += '?' + key + '=' + currentParam[key];
|
||||
}
|
||||
var localRoute = '/' + currentRoute + param;
|
||||
uni.setStorageSync('page-path-options', localRoute);
|
||||
setTimeout(function () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login' });
|
||||
if (localRoute !== '/pages/login/login') {
|
||||
uni.login({
|
||||
success: function success(res) {
|
||||
uni.request({
|
||||
url: 'https://laonon.scdxtc.cn/api/user/login',
|
||||
data: {
|
||||
code: res.code,
|
||||
invite_code: uni.getStorageSync('inviteCode') ? uni.getStorageSync('inviteCode') : '' },
|
||||
|
||||
}, 1200);
|
||||
success: function success(result) {
|
||||
if (result.data.code == 0) {
|
||||
uni.setStorageSync('userId', result.data.account_id);
|
||||
uni.setStorageSync('token', result.data.data.token); //缓存token
|
||||
uni.setStorageSync('openid', result.data.data.openid); //缓存openid
|
||||
uni.setStorageSync('expire', result.data.data.expire); //缓存失效时间(时间戳格式)
|
||||
uni.setStorageSync('phone_active', result.data.data.phone_active); //是否授权手机号
|
||||
uni.setStorageSync('is_active', result.data.data.is_active); //是否授权头像和昵称
|
||||
uni.setStorageSync('invite_code', result.data.data.invite_code); //缓存邀请码
|
||||
// 重新进入当前页面
|
||||
uni.reLaunch({
|
||||
url: localRoute });
|
||||
|
||||
}
|
||||
} });
|
||||
|
||||
} });
|
||||
|
||||
}
|
||||
flag = true;
|
||||
};
|
||||
// 请求错误处理
|
||||
|
|
|
@ -1 +1 @@
|
|||
<block wx:if="{{isLoading}}"><view class="pad-x170 data-v-0f00adf4"><status-nav vue-id="1775f8c0-1" ifReturn="{{true}}" navBarTitle="购物车" marginBottom="{{0}}" class="data-v-0f00adf4" bind:__l="__l"></status-nav><view class="cart-content data-v-0f00adf4"><view class="change-all border-box background-white font26 flex data-v-0f00adf4" style="{{'top:'+(statusHeight+50+'px')+';'}}"><label data-event-opts="{{[['tap',[['chooseAll',['$event']]]]]}}" class="label flex data-v-0f00adf4" bindtap="__e"><radio style="transform:scale(.8);" checked="{{allChoose}}" color="#febf00" class="data-v-0f00adf4"></radio><text class="data-v-0f00adf4">全选</text></label><view data-event-opts="{{[['tap',[['delShopEv',['$event']]]]]}}" class="del-cart data-v-0f00adf4" bindtap="__e">删除</view></view><view class="slide-list data-v-0f00adf4"><block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="slide-item data-v-0f00adf4"><view class="slide-item-li border-box background-white flex data-v-0f00adf4"><label data-event-opts="{{[['tap',[['chooseEv',[index]]]]]}}" class="radio data-v-0f00adf4" catchtap="__e"><radio checked="{{item.ifcheck}}" color="#febf00" class="data-v-0f00adf4"></radio></label><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['listData','',index,'spuId']]]]]]]}}" class="shop-img radius30 data-v-0f00adf4" catchtap="__e"><image src="{{item.image}}" mode="widthFix" class="data-v-0f00adf4"></image></view><view class="shop-txt data-v-0f00adf4"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['listData','',index,'spuId']]]]]]]}}" class="shop-txt-top data-v-0f00adf4" catchtap="__e"><view class="title font30 clips1 data-v-0f00adf4">{{item.title}}</view><view class="specs font24 color-66 mar-sx10 clips2 data-v-0f00adf4">{{"规格:"+item.skuName}}</view></view><view class="shop-txt-bottom flex data-v-0f00adf4"><view class="price font30 color-red data-v-0f00adf4">{{"¥"+item.price}}</view><view class="num font24 flex data-v-0f00adf4"><view data-event-opts="{{[['tap',[['addCutEv',[index,0]]]]]}}" class="icon icon-cut count-btn fon24 color-ff radius10 flex _i data-v-0f00adf4" style="{{'background-color:'+(item.num==minNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view><input class="input border-box radius10 data-v-0f00adf4" type="digit" disabled="{{item.slide_x!=0}}" data-event-opts="{{[['blur',[['blurEv',[index,'$event']]]],['focus',[['focusEv',['$0'],[[['listData','',index,'num']]]]]],['input',[['__set_model',['$0','num','$event',[]],[[['listData','',index]]]]]]]}}" value="{{item.num}}" bindblur="__e" bindfocus="__e" bindinput="__e"/><view data-event-opts="{{[['tap',[['addCutEv',[index,1]]]]]}}" class="icon icon-add count-btn fon24 color-ff radius10 flex _i data-v-0f00adf4" style="{{'background-color:'+(item.num==maxNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view><view class="pull-footer-bg background-white pad-all20 radius30 border-box data-v-0f00adf4"><view class="pull-footer background-grey radius30 pad-all20 border-box flex data-v-0f00adf4"><view class="price color-ff data-v-0f00adf4"><view class="font36 data-v-0f00adf4">{{"合计:"+(allPrice>0?'¥'+allPrice:'0')}}</view></view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn font36 color-48 radius30 flex data-v-0f00adf4" style="{{'background:'+(!buyNum?'#cccccc':'#febf00')+';'}}" bindtap="__e">{{allPrice==0?'去购物':'立即购买'}}</view></view></view><block wx:if="{{listData.length!==0&&noMore}}"><view class="no-more font24 pad-sx25 data-v-0f00adf4" style="margin:0;"><text class="data-v-0f00adf4">—— 到底啦 ——</text></view></block><block wx:if="{{listData.length==0}}"><nothing-page vue-id="1775f8c0-2" content="您的购物车,空空如也(*^▽^*)" class="data-v-0f00adf4" bind:__l="__l"></nothing-page></block></view></view></block>
|
||||
<block wx:if="{{isLoading}}"><view class="pad-x170 data-v-0f00adf4"><status-nav vue-id="1775f8c0-1" ifReturn="{{true}}" navBarTitle="购物车" marginBottom="{{0}}" class="data-v-0f00adf4" bind:__l="__l"></status-nav><view class="cart-content data-v-0f00adf4"><view class="change-all border-box background-white font26 flex data-v-0f00adf4" style="{{'top:'+(statusHeight+50+'px')+';'}}"><label data-event-opts="{{[['tap',[['chooseAll',['$event']]]]]}}" class="label flex data-v-0f00adf4" bindtap="__e"><radio style="transform:scale(.8);" checked="{{allChoose}}" color="#febf00" class="data-v-0f00adf4"></radio><text class="data-v-0f00adf4">全选</text></label><view data-event-opts="{{[['tap',[['delShopEv',['$event']]]]]}}" class="del-cart data-v-0f00adf4" bindtap="__e">删除</view></view><view class="slide-list data-v-0f00adf4"><block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="slide-item data-v-0f00adf4"><view class="slide-item-li border-box background-white flex data-v-0f00adf4"><label data-event-opts="{{[['tap',[['chooseEv',[index]]]]]}}" class="radio data-v-0f00adf4" catchtap="__e"><radio checked="{{item.ifcheck}}" color="#febf00" class="data-v-0f00adf4"></radio></label><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['listData','',index,'spuId']]]]]]]}}" class="shop-img radius30 data-v-0f00adf4" catchtap="__e"><image src="{{item.image}}" mode="widthFix" class="data-v-0f00adf4"></image></view><view class="shop-txt data-v-0f00adf4"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['listData','',index,'spuId']]]]]]]}}" class="shop-txt-top data-v-0f00adf4" catchtap="__e"><view class="title font30 clips1 data-v-0f00adf4">{{item.title}}</view><view class="specs font24 color-66 mar-sx10 clips2 data-v-0f00adf4">{{"规格:"+item.skuName}}</view></view><view class="shop-txt-bottom flex data-v-0f00adf4"><view class="price font30 color-red data-v-0f00adf4">{{"¥"+item.price}}</view><view class="num font24 flex data-v-0f00adf4"><view data-event-opts="{{[['tap',[['addCutEv',[index,0]]]]]}}" class="icon icon-cut count-btn fon24 color-ff radius10 flex _i data-v-0f00adf4" style="{{'background-color:'+(item.num==minNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view><input class="input border-box radius10 data-v-0f00adf4" type="digit" disabled="{{item.slide_x!=0}}" data-event-opts="{{[['blur',[['blurEv',[index,'$event']]]],['focus',[['focusEv',['$0'],[[['listData','',index,'num']]]]]],['input',[['__set_model',['$0','num','$event',[]],[[['listData','',index]]]]]]]}}" value="{{item.num}}" bindblur="__e" bindfocus="__e" bindinput="__e"/><view data-event-opts="{{[['tap',[['addCutEv',[index,1]]]]]}}" class="icon icon-add count-btn fon24 color-ff radius10 flex _i data-v-0f00adf4" style="{{'background-color:'+(item.num==maxNum||item.slide_x!=0?'#d3d3d3':'#febf00')+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view><view class="pull-footer-bg background-white pad-all20 radius30 border-box data-v-0f00adf4"><view class="pull-footer background-grey radius30 pad-all20 border-box flex data-v-0f00adf4"><view class="price color-ff data-v-0f00adf4"><view class="font36 data-v-0f00adf4">{{"合计:"+(allPrice>0?'¥'+allPrice:'0')}}</view></view><view data-event-opts="{{[['tap',[['submitEv',['$event']]]]]}}" class="btn font36 color-48 radius30 flex data-v-0f00adf4" style="{{'background:'+(!buyNum?'#cccccc':'#febf00')+';'}}" bindtap="__e">{{allPrice==0?'去购物':'立即购买'}}</view></view></view><block wx:if="{{listData.length!==0&&noMore}}"><view class="no-more font24 pad-sx25 data-v-0f00adf4" style="margin:0;"><text class="data-v-0f00adf4">—— 到底啦 ——</text></view></block><block wx:if="{{isLoading&&listData.length==0}}"><nothing-page vue-id="1775f8c0-2" content="您的购物车,空空如也(*^▽^*)" class="data-v-0f00adf4" bind:__l="__l"></nothing-page></block></view></view></block>
|
|
@ -31,7 +31,8 @@
|
|||
"outputPath": ""
|
||||
},
|
||||
"disableUseStrict": false,
|
||||
"useCompilerPlugins": false
|
||||
"useCompilerPlugins": false,
|
||||
"minifyWXML": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.25.2",
|
||||
|
|
Loading…
Reference in New Issue