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