变更商品数量,调整字段错误,推荐关系页面调整
This commit is contained in:
@@ -1,53 +1,45 @@
|
||||
<template>
|
||||
<view class="NumberWeight">
|
||||
<!-- 订单分类 -->
|
||||
<view class="nav" >
|
||||
<view :class="['nav-item' ,selectNavId === item.id?'nav-item-selected':'']" v-for="(item,index) in navList"
|
||||
:key="index" @click="selectNav(item.id)">
|
||||
{{item.name}}
|
||||
{{item.id ==='signed' && count.signed >0 ? '('+count.signed + ')':''}}
|
||||
{{item.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
{{item.id ==='init' && count.init >0 ?'('+count.init + ')':''}}
|
||||
{{item.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
<view class="NumberWeight">
|
||||
<!-- 订单分类 -->
|
||||
<view class="nav">
|
||||
<view :class="['nav-item', selectNavId === item.id ? 'nav-item-selected' : '']" v-for="(item, index) in navList" :key="index" @click="selectNav(item.id)">
|
||||
{{ item.name }} {{ item.id === 'signed' && count.signed > 0 ? '(' + count.signed + ')' : '' }}
|
||||
{{ item.id === 'completed' && count.completed > 0 ? '(' + count.completed + ')' : '' }} {{ item.id === 'init' && count.init > 0 ? '(' + count.init + ')' : '' }}
|
||||
{{ item.id === 'delivered' && count.delivered > 0 ? '(' + count.delivered + ')' : '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 有订单列表 -->
|
||||
<block v-if="lists.length > 0">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index">
|
||||
<MallShipmentsTemplate :item="item" />
|
||||
<view class="actions">
|
||||
<view class="nowPay" @click="goDetail(item.shipment_no)" >查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
<!-- 有订单列表 -->
|
||||
<block v-if="lists.length > 0">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item, index) in lists" :key="index">
|
||||
<MallShipmentsTemplate :item="item" />
|
||||
<view class="actions"><view class="nowPay" @click="goDetail(item.shipment_no)">查看详情</view></view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="lists.length === 0" name="no-order" txt="暂无数据~" />
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MallShipmentsTemplate from '@/components/mall-shipments-template/mall-shipments-template'
|
||||
import { mallShipmentsPostShop , mallShipmentsSign , mallShipmentsCancel } from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
components: {
|
||||
MallShipmentsTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page:1,
|
||||
total:0,
|
||||
navList: [],
|
||||
type:'',// post 快递单 空为自提单
|
||||
selectNavId: 'signed',
|
||||
count:{},// 订单数量
|
||||
};
|
||||
},
|
||||
import MallShipmentsTemplate from '@/components/mall-shipments-template/mall-shipments-template';
|
||||
import { mallShipmentsPostShop, mallShipmentsSign, mallShipmentsCancel } from '@/apis/interfaces/numberWeight';
|
||||
export default {
|
||||
components: {
|
||||
MallShipmentsTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists : [],
|
||||
page : 1,
|
||||
total : 0,
|
||||
navList : [],
|
||||
type : '', // post 快递单 空为自提单
|
||||
selectNavId : 'signed',
|
||||
count : {} // 订单数量
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.navList = [
|
||||
{
|
||||
@@ -58,178 +50,180 @@
|
||||
name: '已完成',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
this.selectNavId = 'signed'
|
||||
this.getList()
|
||||
];
|
||||
this.selectNavId = 'signed';
|
||||
this.getList();
|
||||
},
|
||||
onShow(){
|
||||
if(uni.getStorageSync('refresh')){
|
||||
this.reset()
|
||||
onShow() {
|
||||
if (uni.getStorageSync('refresh')) {
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.setStorageSync('refresh',false)
|
||||
uni.setStorageSync('refresh', false);
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.total>this.lists.length){
|
||||
this.page = this.page + 1
|
||||
this.getList()
|
||||
}else{
|
||||
if (this.total > this.lists.length) {
|
||||
this.page = this.page + 1;
|
||||
this.getList();
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '吼吼吼~我是有底的~',
|
||||
duration: 3000
|
||||
})
|
||||
title: '吼吼吼~我是有底的~',
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset(){
|
||||
this.page =1
|
||||
this.total = 0
|
||||
this.lists = []
|
||||
this.getList()
|
||||
uni.setStorageSync('refresh',false)
|
||||
methods: {
|
||||
reset() {
|
||||
this.page = 1;
|
||||
this.total = 0;
|
||||
this.lists = [];
|
||||
this.getList();
|
||||
uni.setStorageSync('refresh', false);
|
||||
},
|
||||
// 选择订单
|
||||
selectNav(id) {
|
||||
if (this.selectNavId !== id) {
|
||||
this.selectNavId = id
|
||||
this.reset()
|
||||
}
|
||||
if (this.selectNavId !== id) {
|
||||
this.selectNavId = id;
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
// 获取订单列表
|
||||
getList(){
|
||||
getList() {
|
||||
let data = {
|
||||
pageSize:4,
|
||||
page:this.page,
|
||||
state:this.selectNavId
|
||||
}
|
||||
let apiUrl = ''
|
||||
apiUrl = 'mall/shipments/service'
|
||||
data.channel = 'app'
|
||||
mallShipmentsPostShop(apiUrl,data).then(res=>{
|
||||
this.count = res.count
|
||||
this.lists = this.lists.concat(res.lists.data)
|
||||
this.total = res.lists.page.total
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
duration: 3000
|
||||
pageSize: 4,
|
||||
page: this.page,
|
||||
state: this.selectNavId
|
||||
};
|
||||
let apiUrl = '';
|
||||
apiUrl = 'mall/shipments/service';
|
||||
data.channel = 'app';
|
||||
mallShipmentsPostShop(apiUrl, data)
|
||||
.then(res => {
|
||||
this.count = res.count;
|
||||
this.lists = this.lists.concat(res.lists.data);
|
||||
this.total = res.lists.page.total;
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
duration: 3000
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 查看详情
|
||||
goDetail(no){
|
||||
goDetail(no) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/property/order/servicesOrderInfo?no='+no
|
||||
})
|
||||
url: '/pages/property/order/servicesOrderInfo?no=' + no
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.NumberWeight {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
.NumberWeight {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
// 订单nav
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size*0.95;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
border-top: solid 20rpx #f7f7f7;
|
||||
position: sticky;
|
||||
top: 0rpx;
|
||||
z-index: 10000;
|
||||
// 订单nav
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size * 0.95;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
border-top: solid 20rpx #f7f7f7;
|
||||
position: sticky;
|
||||
top: 0rpx;
|
||||
z-index: 10000;
|
||||
|
||||
.nav-item {
|
||||
border-bottom: solid 4rpx #fff;
|
||||
padding: 30rpx 10rpx;
|
||||
}
|
||||
.nav-item {
|
||||
border-bottom: solid 4rpx #fff;
|
||||
padding: 30rpx 10rpx;
|
||||
}
|
||||
|
||||
.nav-item-selected {
|
||||
border-bottom: solid 4rpx $mian-color;
|
||||
color: $mian-color;
|
||||
}
|
||||
}
|
||||
.nav-item-selected {
|
||||
border-bottom: solid 4rpx $mian-color;
|
||||
color: $mian-color;
|
||||
}
|
||||
}
|
||||
|
||||
// 订单列表
|
||||
.order-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
min-height: 300rpx;
|
||||
margin: 30rpx 20rpx 0 20rpx;
|
||||
padding:30rpx 30rpx 20rpx 30rpx ;
|
||||
// border-top: solid 4rpx #cacaca;
|
||||
// 订单列表
|
||||
.order-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
min-height: 300rpx;
|
||||
margin: 30rpx 20rpx 0 20rpx;
|
||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||
// border-top: solid 4rpx #cacaca;
|
||||
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
border-top: solid 1rpx #EFF4F2;
|
||||
.nowPay {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
// background-color: $mian-color;
|
||||
color: #999;
|
||||
border:solid 1rpx #cacaca;
|
||||
}
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
border-top: solid 1rpx #eff4f2;
|
||||
.nowPay {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
// background-color: $mian-color;
|
||||
color: #999;
|
||||
border: solid 1rpx #cacaca;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #dd524d;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $mian-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.logistics {
|
||||
background-color: $mian-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.sign {
|
||||
background-color: #dd524d;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $mian-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.evaluate {
|
||||
background-color: $mian-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -12,17 +12,14 @@
|
||||
<image class="partner-avatar" :src="item.avatar ? item.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image>
|
||||
<view class="partner-cont">
|
||||
<view class="partner-name">
|
||||
<view class="partner-nickname">
|
||||
{{item.nickname}}
|
||||
</view>
|
||||
<view class="partner-nickname">{{item.nickname}}</view>
|
||||
<image v-if="item.identity" class="partner-identity" :src="item.identity.cover" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="partner-tel">
|
||||
{{item.username}}
|
||||
</view>
|
||||
<view class="partner-tel">{{item.username}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more :status="pageMore"></uni-load-more>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="list-null">
|
||||
@@ -40,7 +37,8 @@
|
||||
return {
|
||||
larer : '',
|
||||
lists : [],
|
||||
pages : {}
|
||||
pageMore : 'more',
|
||||
page : 1
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -48,20 +46,31 @@
|
||||
// 获取伙伴列表
|
||||
this.getPartner()
|
||||
},
|
||||
onReachBottom(){
|
||||
if(this.pageMore === 'more'){
|
||||
this.pageMore = 'loading'
|
||||
this.page++
|
||||
this.getPartner()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 伙伴列表
|
||||
getPartner() {
|
||||
userPartne({
|
||||
larer: this.larer
|
||||
larer: this.larer,
|
||||
page : this.page
|
||||
}).then(res => {
|
||||
this.lists = res.users
|
||||
if(this.page === 1) this.lists = []
|
||||
this.lists = this.lists.concat(res.users.data)
|
||||
this.page = res.users.page.current
|
||||
this.pageMore = res.users.page.has_more ? 'more': 'noMore'
|
||||
})
|
||||
},
|
||||
|
||||
// tabs
|
||||
onTabs(value){
|
||||
if(value == this.larer) return
|
||||
this.lists = []
|
||||
this.page = 1
|
||||
this.larer = value
|
||||
this.getPartner()
|
||||
}
|
||||
@@ -118,6 +127,7 @@
|
||||
padding: 15rpx 0;
|
||||
font-size: $title-size-lg;
|
||||
color: $text-gray;
|
||||
box-shadow: 0 0 5rpx 5rpx rgba($color: $border-color, $alpha: .2);
|
||||
.item{
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
@@ -130,53 +140,46 @@
|
||||
|
||||
// 列表
|
||||
.partner-list{
|
||||
margin: calc(#{$padding} - 10rpx);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background-color: #FFFFFF;
|
||||
.partner-label {
|
||||
padding: 20rpx;
|
||||
padding: ($padding - 10) $padding;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
border-radius: 4rpx;
|
||||
width: 100%;
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
&:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
border-radius: $radius;
|
||||
margin: $margin;
|
||||
background-color: white;
|
||||
.partner-avatar {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
vertical-align: top;
|
||||
}
|
||||
.partner-cont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 22rpx 20rpx 20rpx 150rpx;
|
||||
padding: ($padding - 10) $padding ($padding - 10) 150rpx;
|
||||
box-sizing: border-box;
|
||||
.partner-name {
|
||||
display: flex;
|
||||
margin-bottom: 15rpx;
|
||||
.partner-nickname {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.partner-identity {
|
||||
width: 84rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
padding-top: 10rpx;
|
||||
display: flex;
|
||||
line-height: 40rpx;
|
||||
.partner-nickname {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.partner-identity {
|
||||
width: 84rpx;
|
||||
margin-top: 5rpx;
|
||||
margin-left: 5rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.partner-tel{
|
||||
line-height: 40rpx;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user