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

首页推荐订单

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