This commit is contained in:
luyuan 2020-09-11 20:15:49 +08:00
parent ad5ed4040c
commit 7a9c0eb53f
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 17 additions and 6 deletions

View File

@ -33,7 +33,7 @@ export default {
border-radius: 50%; border-radius: 50%;
} }
>text{ >text{
width: 100rpx; max-width: 100rpx;
margin-top: 14rpx; margin-top: 14rpx;
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;

View File

@ -232,7 +232,7 @@ export default {
this.$u.api.getOrderInfo({ this.$u.api.getOrderInfo({
order_id: id, order_id: id,
}).then(res => { }).then(res => {
// console.log(res) console.log(res)
if(res.errCode == 0) { if(res.errCode == 0) {
this.orderInfo = res.data; this.orderInfo = res.data;
this.setTitle(this.orderInfo.view_type); this.setTitle(this.orderInfo.view_type);
@ -286,6 +286,7 @@ export default {
toOtherPage(url) { toOtherPage(url) {
this.$u.route('/pageE/order/' + url, { this.$u.route('/pageE/order/' + url, {
oid: this.orderInfo.order_id, oid: this.orderInfo.order_id,
type:this.orderInfo.view_type
}); });
}, },
makePhone(phone) { makePhone(phone) {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="mine-history"> <view class="mine-history">
<scroll-view scroll-y class="history-box" @scrolltolower="reachBottom"> <view scroll-y class="history-box">
<view class="item-box"> <view class="item-box">
<!-- 需求只显示最近五十条数据 后台未作限制 --> <!-- 需求只显示最近五十条数据 后台未作限制 -->
<view v-for="(item, index) in historyList" :key="index" class="history-item"> <view v-for="(item, index) in historyList" :key="index" class="history-item">
@ -20,7 +20,7 @@
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet> <u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty> <u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
<u-loadmore class="load-size" :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length >= pageSize" @loadmore="reachBottom"></u-loadmore> <u-loadmore class="load-size" :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length >= pageSize" @loadmore="reachBottom"></u-loadmore>
</scroll-view> </view>
</view> </view>
</template> </template>
@ -47,6 +47,9 @@ export default {
onLoad() { onLoad() {
this.getBrowseList(); this.getBrowseList();
}, },
onReachBottom(){
this.reachBottom()
},
methods: { methods: {
viewAction(id) { viewAction(id) {
this.showAction = true; this.showAction = true;
@ -58,6 +61,10 @@ export default {
this.$u.api.delMemberBrowse({ goods_id: glist }).then(res => { this.$u.api.delMemberBrowse({ goods_id: glist }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.getBrowseList(); this.getBrowseList();
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
} else { } else {
this.$u.toast(res.message); this.$u.toast(res.message);
} }
@ -109,13 +116,16 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
page{
background: #ECECEC;
}
.mine-history { .mine-history {
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
background: #ECECEC; background: #ECECEC;
.history-box { .history-box {
box-sizing: border-box; box-sizing: border-box;
height: calc(100vh - var(--window-top)); // height: calc(100vh - var(--window-top));
padding: 20rpx 30rpx 0; padding: 20rpx 30rpx 0;
.item-box { .item-box {
display: flex; display: flex;