order number 8.19
This commit is contained in:
parent
bea615253c
commit
86d765d6ba
@ -242,6 +242,10 @@ export default {
|
|||||||
if(type > 0) Object.assign(params, {type: type});
|
if(type > 0) Object.assign(params, {type: type});
|
||||||
return vm.$u.post('Order/orderList', params);
|
return vm.$u.post('Order/orderList', params);
|
||||||
},
|
},
|
||||||
|
// 各种订单数量
|
||||||
|
getOrderNumber() {
|
||||||
|
return vm.$u.post('order/orderNumber');
|
||||||
|
},
|
||||||
// 售后列表
|
// 售后列表
|
||||||
// getAfterSaleList({ page }) {
|
// getAfterSaleList({ page }) {
|
||||||
// return vm.$u.post('order/afterSaleList', { page: page });
|
// return vm.$u.post('order/afterSaleList', { page: page });
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
|
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
|
||||||
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
|
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
|
||||||
<u-loadmore class="load-size" :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length > pageSize" @loadmore="reachBottom"></u-loadmore>
|
<u-loadmore class="load-size" :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length >= pageSize" @loadmore="reachBottom"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -301,18 +301,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getOrderList({ load = 'reload' } = {}) {
|
async getOrderList({ load = 'reload' } = {}) {
|
||||||
// const res = await this.$u.api.getSendOrderList({
|
const res = await this.$u.api.getSendOrderList({
|
||||||
// page: this.page,
|
|
||||||
// })
|
|
||||||
const res = await this.$u.api.getOrderList({
|
|
||||||
page: this.page,
|
page: this.page,
|
||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
// if(res.errCode == 0) {
|
|
||||||
// if(load == 'reload') this.orderList = res.data.order_list;
|
|
||||||
// else this.orderList.push(...res.data.order_list);
|
|
||||||
// }
|
|
||||||
// return res.data.order_list.length;
|
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(load == 'reload') this.orderList = res.data;
|
if(load == 'reload') this.orderList = res.data;
|
||||||
else this.orderList.push(...res.data);
|
else this.orderList.push(...res.data);
|
||||||
|
@ -106,7 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
|
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * (90 + 30) + 'px';
|
||||||
},
|
},
|
||||||
toDetailsPage(id) {
|
toDetailsPage(id) {
|
||||||
this.$u.route('/pageB/sdetails/index', {
|
this.$u.route('/pageB/sdetails/index', {
|
||||||
|
@ -4,17 +4,6 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
|
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<!-- <view class="info-left">
|
|
||||||
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
|
||||||
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
|
|
||||||
<image src="/static/image/mine/13.png"></image>
|
|
||||||
<view class="rank-title">{{ userInfo.member_grade_name }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="info-right">
|
|
||||||
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
|
||||||
<view class="user-rank">等级:{{ userInfo.member_level || 0 }}级</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="info-top">
|
<view class="info-top">
|
||||||
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
||||||
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
||||||
@ -62,9 +51,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view @click="toOtherPage('/order/Index?current=1')">
|
<view v-for="(item, index) in orderList" :key="index" @click="toOtherPage(item.link)">
|
||||||
|
<image :src="item.img"></image>
|
||||||
|
<view>{{ item.title }}</view>
|
||||||
|
<view class="order-num" v-if="item.number">{{ item.number }}</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view @click="toOtherPage('/order/Index?current=1')">
|
||||||
<image src="/static/image/mine/6.png"></image>
|
<image src="/static/image/mine/6.png"></image>
|
||||||
<view>待支付</view>
|
<view>待支付</view>
|
||||||
|
<view class="order-num">{{ 99 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=2')">
|
<view @click="toOtherPage('/order/Index?current=2')">
|
||||||
<image src="/static/image/mine/35.png"></image>
|
<image src="/static/image/mine/35.png"></image>
|
||||||
@ -89,7 +84,7 @@
|
|||||||
<view @click="toOtherPage('/order/Index?current=7')">
|
<view @click="toOtherPage('/order/Index?current=7')">
|
||||||
<image src="/static/image/mine/9.png"></image>
|
<image src="/static/image/mine/9.png"></image>
|
||||||
<view>售后</view>
|
<view>售后</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tool">
|
<view class="tool">
|
||||||
@ -146,7 +141,51 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
|
orderList: [
|
||||||
|
{
|
||||||
|
name: 'wait_pay',
|
||||||
|
title: '待支付',
|
||||||
|
img: '/static/image/mine/6.png',
|
||||||
|
link: '/order/Index?current=1',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'already_pay',
|
||||||
|
title: '待发货',
|
||||||
|
img: '/static/image/mine/35.png',
|
||||||
|
link: '/order/Index?current=2',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'wait_receipt',
|
||||||
|
title: '待收货',
|
||||||
|
img: '/static/image/mine/2.png',
|
||||||
|
link: '/order/Index?current=3',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pintuan',
|
||||||
|
title: '拼团中',
|
||||||
|
img: '/static/image/mine/37.png',
|
||||||
|
link: '/order/Index?current=5',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'wait_evaluation',
|
||||||
|
title: '待评价',
|
||||||
|
img: '/static/image/mine/3.png',
|
||||||
|
link: '/order/Index?current=6',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'refund',
|
||||||
|
title: '售后',
|
||||||
|
img: '/static/image/mine/9.png',
|
||||||
|
link: '/order/Index?current=7',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@ -162,6 +201,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
|
this.getOrderNumber();
|
||||||
},
|
},
|
||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap() {
|
||||||
this.toOtherPage("/setting/Index");
|
this.toOtherPage("/setting/Index");
|
||||||
@ -176,6 +216,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getOrderNumber() {
|
||||||
|
this.$u.api.getOrderNumber().then(res => {
|
||||||
|
const object = res.data;
|
||||||
|
for (const key in object) {
|
||||||
|
if (object.hasOwnProperty(key)) {
|
||||||
|
let element = object[key];
|
||||||
|
const order = this.orderList.filter(item => item.name == key);
|
||||||
|
if(element > 99) element = "99+";
|
||||||
|
this.$set(order[0], 'number', element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(this.orderList);
|
||||||
|
})
|
||||||
|
},
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageE' + url
|
url: '/pageE' + url
|
||||||
@ -200,45 +254,6 @@ export default {
|
|||||||
.user-info {
|
.user-info {
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
// display: flex;
|
// display: flex;
|
||||||
.info-left {
|
|
||||||
margin-right: 15rpx;
|
|
||||||
.user-nickname {
|
|
||||||
max-width: 200rpx;
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
margin-bottom: 19rpx;
|
|
||||||
}
|
|
||||||
.user-medal {
|
|
||||||
display: flex;
|
|
||||||
width: 110rpx;
|
|
||||||
// height: 25rpx;
|
|
||||||
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
|
|
||||||
border-radius: 13rpx;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 17rpx 0 10rpx;
|
|
||||||
> image {
|
|
||||||
margin-right: 9rpx;
|
|
||||||
width: 20rpx;
|
|
||||||
height: 22rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.rank-title {
|
|
||||||
font-size: 16rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-right {
|
|
||||||
.info-phone {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
margin-bottom: 26rpx;
|
|
||||||
}
|
|
||||||
.user-rank {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-top {
|
.info-top {
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -336,16 +351,6 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
border-bottom: 1px solid #ececec;
|
border-bottom: 1px solid #ececec;
|
||||||
// &::after {
|
|
||||||
// content: "";
|
|
||||||
// position: absolute;
|
|
||||||
// width: 650rpx;
|
|
||||||
// height: 1rpx;
|
|
||||||
// background: rgba(234,234,234,1);
|
|
||||||
// bottom: 0;
|
|
||||||
// left: 50%;
|
|
||||||
// transform: translate(-50%,0);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
.title-text-more {
|
.title-text-more {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@ -397,24 +402,42 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
.order-num {
|
||||||
|
z-index: 9;
|
||||||
|
position: absolute;
|
||||||
|
top: -12rpx;
|
||||||
|
right: -16rpx;
|
||||||
|
border: 1rpx solid #FF7807;
|
||||||
|
height: 24rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 6rpx 8rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #FF7807;
|
||||||
|
background-color: #ffffff;
|
||||||
|
font-size: 18rpx;
|
||||||
|
color:rgba(255,120,15,1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
> view:nth-child(1){
|
> view:nth-child(1){
|
||||||
@include image-size($image-width: 36rpx, $image-height: 34rpx);
|
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(2){
|
> view:nth-child(2){
|
||||||
@include image-size($image-width: 38rpx, $image-height: 36rpx);
|
@include image-size($image-width: 38rpx, $image-height: 32rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(3){
|
> view:nth-child(3){
|
||||||
@include image-size($image-width: 40rpx, $image-height: 36rpx);
|
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(4){
|
> view:nth-child(4){
|
||||||
@include image-size($image-width: 38rpx, $image-height: 38rpx);
|
@include image-size($image-width: 35rpx, $image-height: 35rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(5){
|
> view:nth-child(5){
|
||||||
@include image-size($image-width: 36rpx, $image-height: 40rpx);
|
@include image-size($image-width: 37rpx, $image-height: 37rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(6){
|
> view:nth-child(6){
|
||||||
@include image-size($image-width: 36rpx, $image-height: 40rpx);
|
@include image-size($image-width: 33rpx, $image-height: 35rpx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user