Commit 3ca69a6b authored by Facius's avatar Facius

首页代码合并之后需要一些改动

parent f84dc333
......@@ -19,15 +19,16 @@
<text>订单推荐</text>
</view>
</u-sticky>
<!-- 入驻成功之后显示订单列表 -->
<view v-if="status > 0 && orderList.length > 0">
<!-- 入驻成功之后显示推荐订单列表 -->
<view v-if="settled && orderList.length > 0">
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item">
</OrderCell>
</view>
<u-loadmore :status="currentLoadStatus" bgColor="#f2f2f2"></u-loadmore>
</view>
<view v-else-if="status > 0 && orderList.length <= 0">
</view>
<!-- 入驻成功之后无推荐订单 -->
<view v-else-if="settled && orderList.length <= 0">
暂无订单
</view>
<!-- 入驻前-->
......@@ -56,7 +57,7 @@
},
data() {
return {
settled: false,
settled: false, // 入驻状态
triggered: false,
list: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
......@@ -73,7 +74,6 @@
indicatorPos: 'bottomCenter',
title: 'Hello',
count: 0, // 推荐订单数量
status: 0, // 入驻状态
messageList: [{
id: 1234,
type: '',
......@@ -115,7 +115,8 @@
},
onShow() {
// 每次进入页面都刷新入驻状态
if (app.globalData.token) {
if (app.globalData.token) {
// 获取是否显示入驻按钮
this.initSettleInfo()
}
},
......@@ -134,11 +135,14 @@
onRefresh() {
if (this._freshing) return;
this._freshing = true;
// 加载数据
// ...
// 获取入驻状态
this.initSettleInfo()
// 获取推荐订单及数量
// ....
setTimeout(() => {
// 数据加载完成更新status和推荐列表
// 数据加载完成更新入驻状态和推荐列表
this.triggered = false;
this._freshing = false;
}, 1000)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment