优化移动端已知的问题
parent
0cfb5d42c0
commit
c529688932
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="address">
|
<view class="address">
|
||||||
|
|
||||||
<u-empty class="empty" v-if="empty" text="暂无收货地址" mode="address"></u-empty>
|
<u-empty class="empty" v-if="addressList.length == 0" text="暂无收货地址" mode="address"></u-empty>
|
||||||
<view class="list" v-else>
|
<view class="list" v-else>
|
||||||
<view class="item c-content" v-for="(item, index) in addressList" :key="index">
|
<view class="item c-content" v-for="(item, index) in addressList" :key="index">
|
||||||
<view class="basic" @click="selectAddressData(item)">
|
<view class="basic" @click="selectAddressData(item)">
|
||||||
|
@ -50,7 +50,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
addressList: [], //地址列表
|
addressList: [], //地址列表
|
||||||
showAction: false, //是否显示下栏框
|
showAction: false, //是否显示下栏框
|
||||||
empty: false, //是否为空
|
|
||||||
removeList: [
|
removeList: [
|
||||||
{
|
{
|
||||||
text: "确定",
|
text: "确定",
|
||||||
|
@ -67,11 +66,16 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
//下拉刷新
|
||||||
|
this.addressList = [];
|
||||||
|
this.getAddressList();
|
||||||
|
},
|
||||||
onLoad: function (val) {
|
onLoad: function (val) {
|
||||||
this.routerVal = val;
|
this.routerVal = val;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
console.log("onshow");
|
||||||
this.addressList = [];
|
this.addressList = [];
|
||||||
this.getAddressList();
|
this.getAddressList();
|
||||||
},
|
},
|
||||||
|
@ -92,15 +96,11 @@ export default {
|
||||||
this.params.pageNumber,
|
this.params.pageNumber,
|
||||||
this.params.pageSize
|
this.params.pageSize
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
if (res.data.result.records.length == 0) {
|
res.data.result.records.forEach((item) => {
|
||||||
this.empty = true;
|
item.consigneeAddressPath = item.consigneeAddressPath.split(",");
|
||||||
} else {
|
});
|
||||||
res.data.result.records.forEach((item) => {
|
this.addressList = res.data.result.records;
|
||||||
item.consigneeAddressPath = item.consigneeAddressPath.split(",");
|
console.log(this.addressList);
|
||||||
});
|
|
||||||
|
|
||||||
this.$set(this, "addressList", res.data.result.records);
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
});
|
});
|
||||||
|
|
|
@ -244,7 +244,7 @@ text.shop {
|
||||||
.btn-callback {
|
.btn-callback {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
border: 1rpx solid #ededed;
|
background: #ededed;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- 店铺信息模块 -->
|
<!-- 店铺信息模块 -->
|
||||||
<div class="store flex">
|
<div class="store flex">
|
||||||
<u-image border-radius="10" width="150" height="150" :src="storeInfo.storeLogo || config.logo" mode="aspectFit"></u-image>
|
<u-image border-radius="10" width="150" height="150" :src="storeInfo.storeLogo || config.logo" mode="aspectFit">
|
||||||
|
</u-image>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="store-name" @click="getStoreLicencePhoto">
|
<div class="store-name" @click="getStoreLicencePhoto">
|
||||||
{{ storeInfo.storeName || ''}}
|
{{ storeInfo.storeName || ''}}
|
||||||
|
@ -83,7 +84,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- 分类子级 -->
|
<!-- 分类子级 -->
|
||||||
<div class="child-list" v-if="item.children && item.children.length!=0">
|
<div class="child-list" v-if="item.children && item.children.length!=0">
|
||||||
<div class="child" @click="getCategoryGoodsList(child)" v-for="(child,i) in item.children">{{child.labelName}}</div>
|
<div class="child" @click="getCategoryGoodsList(child)" v-for="(child,i) in item.children">{{child.labelName}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,7 +101,7 @@ import {
|
||||||
collectionGoods,
|
collectionGoods,
|
||||||
getGoodsIsCollect,
|
getGoodsIsCollect,
|
||||||
} from "@/api/members.js";
|
} from "@/api/members.js";
|
||||||
import config from '@/config/config'
|
import config from "@/config/config";
|
||||||
import storage from "@/utils/storage";
|
import storage from "@/utils/storage";
|
||||||
import { getGoodsList } from "@/api/goods.js";
|
import { getGoodsList } from "@/api/goods.js";
|
||||||
import { getAllCoupons } from "@/api/promotions.js";
|
import { getAllCoupons } from "@/api/promotions.js";
|
||||||
|
@ -137,18 +139,18 @@ export default {
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
this.scrollTop = e.scrollTop;
|
this.scrollTop = e.scrollTop;
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 小程序默认分享
|
// 小程序默认分享
|
||||||
uni.showShareMenu({ withShareTicket: true });
|
uni.showShareMenu({ withShareTicket: true });
|
||||||
// #endif
|
// #endif
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
onShow() {
|
|
||||||
if (this.goodsList.length == 0) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 下拉加载
|
// 下拉加载
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.goodsParams.pageNumber++;
|
this.goodsParams.pageNumber++;
|
||||||
|
@ -322,7 +324,7 @@ export default {
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
title: "请先登录!",
|
title: "请先登录!",
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$options.filters.navigateToLogin("redirectTo");
|
this.$options.filters.navigateToLogin("redirectTo");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ function cleanStorage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/passport/wechatMPLogin",
|
url: "/pages/passport/wechatMPLogin",
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 500);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
|
@ -92,7 +92,7 @@ function cleanStorage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/passport/login",
|
url: "/pages/passport/login",
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 500);
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue