Commit 12822d9c authored by 刘用法's avatar 刘用法

首页推荐订单

parent 1ff65281
...@@ -8,7 +8,7 @@ const UNI_APP = { ...@@ -8,7 +8,7 @@ const UNI_APP = {
apiUrl: 'http://192.168.1.22', //java端域名请求头 apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头 // apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/', qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'http://deudn.c.pp.cc/' qn_asset_url: 'http://deudn.c.pp.cc/',
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -248,7 +248,6 @@ ...@@ -248,7 +248,6 @@
this.$emit('click') this.$emit('click')
}, },
handleChange(timestamp) { handleChange(timestamp) {
console.log(timestamp)
if (this.timeout) this.$refs['order-count-down'].seconds += 2 if (this.timeout) this.$refs['order-count-down'].seconds += 2
if (timestamp == 0 && !this.timeout) { if (timestamp == 0 && !this.timeout) {
setTimeout(()=> { setTimeout(()=> {
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 100vh;
background-color: #f4f5f7; background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx; padding: 0rpx 30rpx 0 30rpx;
overflow-y: auto; overflow-y: auto;
&.fixed { &.fixed {
height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
......
...@@ -41,15 +41,15 @@ ...@@ -41,15 +41,15 @@
<NoOrder /> <NoOrder />
</view> </view>
<view v-else class="order-item-view"> <view v-else class="order-item-view">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" <!-- <scroll-view scroll-y style="margin-bottom: 20rpx;" @scrolltolower="reachBottom"
scroll-anchoring> scroll-anchoring> -->
<view v-for="(item, index) in orderList" :key="index"> <view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item" type="waitAccept" :location="location" <OrderCell :orderData="item" type="waitAccept" :location="location"
@click="handleClick(item.orderId)" @action="handleAction(item.orderId)"> @click="handleClick(item.orderId)" @action="handleAction(item.orderId)">
</OrderCell> </OrderCell>
</view> </view>
<u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore> <u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore>
</scroll-view> <!-- </scroll-view> -->
</view> </view>
</template> </template>
...@@ -145,7 +145,15 @@ ...@@ -145,7 +145,15 @@
// 下拉刷洗 // 下拉刷洗
this.initSettleInfo() this.initSettleInfo()
}, },
// onReachBottom() {
// console.log('----------底部-------------', this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
// onPageScroll(obj) {
// console.log('---------scroll---------', obj)
// },
methods: { methods: {
handleClick(orderId) { // 点击了cell handleClick(orderId) { // 点击了cell
console.log('点击了cell') console.log('点击了cell')
...@@ -174,10 +182,10 @@ ...@@ -174,10 +182,10 @@
}; };
await app.getBaseInfo(self, callBack); await app.getBaseInfo(self, callBack);
this.orderList = []
this.search.pageNumber = 0
// 加载消息列表 // 加载消息列表
self.loadMessageList(); self.loadMessageList();
self.search.pageNumber = 0
self.loadedOrder = false
self.loadOrderList(); self.loadOrderList();
}, },
loadMessageList() { loadMessageList() {
...@@ -239,6 +247,9 @@ ...@@ -239,6 +247,9 @@
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/ /*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
if (res.code == 200) { if (res.code == 200) {
if (res.data && res.data.list && res.data.list.length > 0) { if (res.data && res.data.list && res.data.list.length > 0) {
if (self.search.pageNumber == 1) {
self.orderList = []
}
self.orderList.push(...res.data.list); self.orderList.push(...res.data.list);
self.currentLoadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore' self.currentLoadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
...@@ -251,11 +262,12 @@ ...@@ -251,11 +262,12 @@
onRestore() { onRestore() {
this.triggered = "restore"; this.triggered = "restore";
}, },
reachBottom() { // reachBottom() {
if (this.currentLoadStatus != 'loadmore') return // console.log(this.currentLoadStatus)
this.currentLoadStatus == 'loading' // if (this.currentLoadStatus != 'loadmore') return
this.loadOrderList() // this.currentLoadStatus == 'loading'
}, // this.loadOrderList()
// },
// clickSwiper(index) {}, // clickSwiper(index) {},
handleScroll() { handleScroll() {
console.log("-----scroll-------"); console.log("-----scroll-------");
...@@ -456,6 +468,7 @@ ...@@ -456,6 +468,7 @@
.order-item-view { .order-item-view {
background-color: #F4F5F7; background-color: #F4F5F7;
border-radius: 12rpx; border-radius: 12rpx;
margin-bottom: 20rpx;
} }
} }
} }
......
...@@ -44,21 +44,21 @@ ...@@ -44,21 +44,21 @@
<view v-else class="order-item-more"> <view v-else class="order-item-more">
<view class="line-view"></view> <view class="line-view"></view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>品牌:</text> <text class="cell-title">品牌:</text>
<text>{{ order.brandName }}</text> <text>{{ order.brandName }}</text>
</view> </view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>数量:</text> <text class="cell-title">数量:</text>
<text>x{{ order.orderProductCount }}</text> <text>x{{ order.orderProductCount }}</text>
</view> </view>
<view class="order-cell between-cell"> <view class="order-cell between-cell">
<text>信息:</text> <text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view>
<view class="order-cell between-cell"> <!-- <view class="order-cell between-cell">
<text>备注:</text> <text>备注:</text>
<text>{{ order.serviceContent }}</text> <text>{{ order.serviceContent }}</text>
</view> </view> -->
<view class="read-more-toggle"> <view class="read-more-toggle">
<u-icon name="arrow-up"></u-icon> <u-icon name="arrow-up"></u-icon>
<text class="read-more-text" @click="readMore = true">点击收起</text> <text class="read-more-text" @click="readMore = true">点击收起</text>
...@@ -945,7 +945,7 @@ ...@@ -945,7 +945,7 @@
color: #333333; color: #333333;
line-height: 48rpx; line-height: 48rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
text-align: left; text-align: right;
} }
.between-cell { .between-cell {
...@@ -953,4 +953,8 @@ ...@@ -953,4 +953,8 @@
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
} }
.cell-title {
text-align: left;
flex-shrink: 0;
}
</style> </style>
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
}, },
reachBottom(e) { reachBottom(e) {
console.log('-------底部-------', this.loadStatus)
if (this.loadStatus != 'loadmore') return if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading' this.loadStatus == 'loading'
this.getOrderList(this.currentIndex) this.getOrderList(this.currentIndex)
...@@ -262,7 +263,7 @@ ...@@ -262,7 +263,7 @@
item.count = res.data.toCheckinCount item.count = res.data.toCheckinCount
} else if (item.name === '待完工') { } else if (item.name === '待完工') {
item.count = res.data.toFinishCount item.count = res.data.toFinishCount
} else if (item.name === '待审核') { } else if (item.name === '审核中') {
item.count = res.data.reviewingCount item.count = res.data.reviewingCount
} else if (item.name === '异常单') { } else if (item.name === '异常单') {
item.count = res.data.exceptionCount item.count = res.data.exceptionCount
......
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