Commit 0719084f by zhangxw

样式优化

1 parent 8989419b
...@@ -183,7 +183,8 @@ Component({ ...@@ -183,7 +183,8 @@ Component({
pageNum: 1, // 接待记录时间轴分页 pageNum: 1, // 接待记录时间轴分页
searchForm: {}, searchForm: {},
showEmployeeName: false, // 是否展示销售顾问字段 showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true // 是否展示录单按钮入口 isShowDefeatBtn: true, // 是否展示录单按钮入口
loaded: false
}, },
lifetimes: { lifetimes: {
...@@ -525,7 +526,10 @@ Component({ ...@@ -525,7 +526,10 @@ Component({
// 获取接待记录统计数据 // 获取接待记录统计数据
getReceptionList() { getReceptionList() {
let params = this.getParams() let params = this.getParams()
wx.$util.showLoading() this.setData({
loaded: false
}, () => {
wx.showLoading('加载中')
getReceptionRecordList({ getReceptionRecordList({
merchantNo: params.merchantNo, merchantNo: params.merchantNo,
startDateTime: params.startDateTime, startDateTime: params.startDateTime,
...@@ -548,6 +552,9 @@ Component({ ...@@ -548,6 +552,9 @@ Component({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}).catch(err => {
wx.hideLoading()
})
}) })
}, },
// 获取接待记录接待时间轴详情数据 // 获取接待记录接待时间轴详情数据
...@@ -558,7 +565,7 @@ Component({ ...@@ -558,7 +565,7 @@ Component({
...this.getParams() ...this.getParams()
} }
if (nothing) return // 进获取近七天数据 if (nothing) return // 进获取近七天数据
wx.$util.showLoading() wx.showLoading('加载中')
getRecordDetailList(params).then(res => { getRecordDetailList(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
...@@ -568,6 +575,7 @@ Component({ ...@@ -568,6 +575,7 @@ Component({
}) })
}) })
this.setData({ this.setData({
loaded: true,
listData, listData,
pageNum: pageNum + 1, pageNum: pageNum + 1,
nothing: pageNum == data?.pages || data?.total == listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0) nothing: pageNum == data?.pages || data?.total == listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
...@@ -575,7 +583,9 @@ Component({ ...@@ -575,7 +583,9 @@ Component({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
wx.$util.hideLoading() wx.hideLoading()
}).catch(err => {
wx.hideLoading()
}) })
}, },
// 过滤升级/战败接待记录数据 // 过滤升级/战败接待记录数据
......
...@@ -633,7 +633,7 @@ swiper{ ...@@ -633,7 +633,7 @@ swiper{
} }
.list-not-text{ .list-not-text{
margin-top: var(--fontSize10); margin-top: var(--fontSize10);
font-size: var(--fontSize28); font-size: var(--fontSize24);
color: #BEC1C7; color: #BEC1C7;
} }
} }
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</block> </block>
</block> </block>
</block> </block>
<block wx:if="{{!filter.isShowEmpty(listData)}}"> <block wx:if="{{!filter.isShowEmpty(listData) && loaded}}">
<view class="empty-box"> <view class="empty-box">
<image class="no-data-img" src="{{IMG_URL}}empty_data.png" /> <image class="no-data-img" src="{{IMG_URL}}empty_data.png" />
<view class="list-not-text">近七天暂无接待记录数据</view> <view class="list-not-text">近七天暂无接待记录数据</view>
......
...@@ -16,7 +16,8 @@ Page({ ...@@ -16,7 +16,8 @@ Page({
searchForm: {}, searchForm: {},
nothing: false, nothing: false,
showEmployeeName: false, // 是否展示销售顾问字段 showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true isShowDefeatBtn: true,
loaded: false
}, },
/** /**
...@@ -128,7 +129,10 @@ Page({ ...@@ -128,7 +129,10 @@ Page({
getReceptionList() { getReceptionList() {
let { listData } = this.data let { listData } = this.data
let params = this.getParams() let params = this.getParams()
wx.$util.showLoading() this.setData({
loaded: false
}, () => {
wx.showLoading()
getReceptionRecordList({ getReceptionRecordList({
merchantNo: params.merchantNo, merchantNo: params.merchantNo,
startDateTime: params.startDateTime, startDateTime: params.startDateTime,
...@@ -150,7 +154,11 @@ Page({ ...@@ -150,7 +154,11 @@ Page({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}).catch(err => {
wx.hideLoading()
}) })
})
}, },
// 获取接待记录接待时间轴详情数据 // 获取接待记录接待时间轴详情数据
getReceptionRecordDetailInfo() { getReceptionRecordDetailInfo() {
...@@ -160,7 +168,7 @@ Page({ ...@@ -160,7 +168,7 @@ Page({
...this.getParams() ...this.getParams()
} }
if (nothing) return if (nothing) return
wx.$util.showLoading() wx.showLoading('加载中')
getRecordDetailList(params).then(res => { getRecordDetailList(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
...@@ -171,6 +179,7 @@ Page({ ...@@ -171,6 +179,7 @@ Page({
}) })
let listDataLength = listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0) let listDataLength = listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0)
this.setData({ this.setData({
loaded: true,
listData, listData,
pageNum: pageNum + 1, pageNum: pageNum + 1,
triggered: false, triggered: false,
...@@ -179,7 +188,9 @@ Page({ ...@@ -179,7 +188,9 @@ Page({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
wx.$util.hideLoading() wx.hideLoading()
}).catch(err => {
wx.hideLoading()
}) })
}, },
// 过滤升级/战败接待记录数据 // 过滤升级/战败接待记录数据
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<view class="list-nothing">到底了~</view> <view class="list-nothing">到底了~</view>
</block> </block>
</block> </block>
<block wx:else> <block wx:if="{{!filter.isShowEmpty(listData) && loaded}}">
<empty-data /> <empty-data />
</block> </block>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!