Commit 3ca69a6b authored by Facius's avatar Facius

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

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