diff --git a/common/api/user.js b/common/api/user.js
index 39c86d6..4727a9f 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -230,16 +230,15 @@ export default {
});
},
// 订单列表
- getOrderList({ page, type, refund_state }) {
+ getOrderList({ page, type }) {
let params = { page: page };
- if(type >= 0 || typeof type == 'string') Object.assign(params, {state_type: type});
- if(refund_state) Object.assign(params, {refund_state: refund_state});
+ if(type > 0) Object.assign(params, {type: type});
return vm.$u.post('Order/orderList', params);
},
// 售后列表
- getAfterSaleList({ page }) {
- return vm.$u.post('order/afterSaleList', { page: page });
- },
+ // getAfterSaleList({ page }) {
+ // return vm.$u.post('order/afterSaleList', { page: page });
+ // },
// 试穿列表
goodsTryOrderList() {
return vm.$u.post('order/goodsTryOrderList');
diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue
index c0c3af9..445a5d9 100644
--- a/components/mine/order-item/index.vue
+++ b/components/mine/order-item/index.vue
@@ -15,7 +15,7 @@
{{ spec + ';' }}
- 结束时间:{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}
+
总价:¥{{ goods.goods_price }},实付款¥{{ goods.goods_pay_price }}
@@ -24,14 +24,14 @@
-
- 确认收货
- 查看物流
-
- 取消支付
- 立即支付
- 联系官方客服
- 提交官方审核
+
+ 查看物流
+ 确认收货
+
+ 取消支付
+ 立即支付
+ 联系官方客服
+ 提交官方审核
@@ -40,7 +40,7 @@ import common from '@/static/js/common.js';
export default {
data() {
return {
- state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付, 7: 售后
+ state: '',
}
},
props: {
@@ -49,44 +49,25 @@ export default {
created() {
this.viewState();
},
- filters: {
- // timeLine(timestamp) {
- // const timestamp = 0.5*60*60*1000;
- // const now = new Date().getTime();
- // let line = now - timestamp * 1000;
- // return common.getLineTime({ timestamp: line });
- // }
- },
methods: {
viewState() {
let state;
- switch (this.order.order_state) {
- case 0: // 已取消
- state = '已取消';
- break;
- case 10: // 未付款
+ switch (this.order.view_type) {
+ case 1:
state = '待支付';
break;
- case 20: // 已付款
- state = '交易成功';
+ case 2:
+ state = '待发货';
break;
- case 30: // 已发货
+ case 3:
state = '待收货';
break;
- case 40: // 已收货
- if(this.order.evaluation_state == 0) state = '待评价';
- else state = '交易成功'
+ case 4:
+ state = '待评价';
break;
default:
break;
}
- if(this.order.refund_state) state = '已退款';
- // 申请退款
- if(this.order.refund_data) {
- if([1, 2].indexOf(this.order.refund_data.refund_state) >= 0) state = '待退款';
- if(this.order.refund_data.refund_state == 3) state = '已退款';
- }
-
this.state = state;
},
cancelOrder() {
@@ -94,7 +75,17 @@ export default {
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
- this.$emit("refreshOrderList", { reload: 'again' });
+ this.$emit("refreshOrderList");
+ }
+ this.$u.toast(res.message);
+ })
+ },
+ confirmReceive() {
+ this.$u.api.confirmReceive({
+ order_id: this.order.order_id,
+ }).then(res => {
+ if(res.errCode == 0) {
+ this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
@@ -165,6 +156,7 @@ export default {
line-height: 38rpx;
}
.goods-sku {
+ display: inline-block;
max-width: 230rpx;
background: rgba(236,236,236,1);
border-radius: 6rpx;
diff --git a/pageE/order/Comment.vue b/pageE/order/Comment.vue
index b6eb931..f6a7895 100644
--- a/pageE/order/Comment.vue
+++ b/pageE/order/Comment.vue
@@ -1,34 +1,47 @@
-
-
+
+
物流评分
-
+
服务态度
-
- 描述相符
-
-
- 发表意见
+ 发表意见
@@ -81,30 +162,62 @@ export default {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
.main-container {
- background-color: #ffffff;
- padding: 30rpx;
margin-bottom: 10rpx;
- textarea {
- width: 100% !important;
- margin-bottom: 60rpx;
- }
- .slot-btn {
- width: 140rpx;
- height: 140rpx;
- background: rgba(236,236,236,1);
- border-radius: 10rpx;
- text-align: center;
- > image {
- margin-top: 48rpx;
- width: 54rpx;
- height: 49rpx;
+ .goods-comment {
+ background-color: #ffffff;
+ padding: 30rpx;
+ margin-bottom: 30rpx;
+ .goods-info {
+ display: flex;
+ margin-bottom: 40rpx;
+ > image {
+ width: 113rpx;
+ height: 106rpx;
+ border-radius: 5rpx;
+ margin-right: 20rpx;
+ background-color: antiquewhite;
+ }
+ .goods-text {
+ .goods-name {
+ width: 530rpx;
+ font-size: 28rpx;
+ color: rgba(0,0,51,1);
+ margin-bottom: 20rpx;
+ }
+ .goods-spec {
+ max-width: 300rpx;
+ box-sizing: content-box;
+ padding: 10rpx 15rpx;
+ font-size: 24rpx;
+ color: rgba(153,153,153,1);
+ background:rgba(236,236,236,1);
+ border-radius: 6rpx;
+ display: inline-block;
+ }
+ }
+ }
+ textarea {
+ width: 100% !important;
+ margin-bottom: 60rpx;
+ }
+ .slot-btn {
+ width: 140rpx;
+ height: 140rpx;
+ background: rgba(236,236,236,1);
+ border-radius: 10rpx;
+ text-align: center;
+ > image {
+ margin-top: 48rpx;
+ width: 54rpx;
+ height: 49rpx;
+ }
}
}
}
.rate {
- background-color: #ffffff;
- padding: 33rpx 30rpx;
- > view {
+ // background-color: #ffffff;
+ // padding: 33rpx 30rpx;
+ // > view {
display: flex;
&:not(:last-child) {
margin-bottom: 35rpx;
@@ -114,7 +227,11 @@ export default {
font-size: 28rpx;
color: rgba(51,51,51,1);
}
- }
+ // }
+ }
+ .order-rate {
+ background-color: #ffffff;
+ padding: 33rpx 30rpx;
}
.write-btn {
margin: 120rpx auto 0;
diff --git a/pageE/order/Details.vue b/pageE/order/Details.vue
index 1a9544a..7eee07d 100644
--- a/pageE/order/Details.vue
+++ b/pageE/order/Details.vue
@@ -3,7 +3,7 @@
{{ s_object[state].text }}
- 距离结束22:22:22
+ 结束时间:{{ orderInfo.end_time }}
@@ -67,8 +67,10 @@
创建时间:{{ orderInfo.add_time | date}}
-
- 查看物流
+
+ 申请退款
+ 查看物流
+ 确认收货
取消支付
立即支付
@@ -96,8 +98,8 @@ export default {
image: '../static/mine/31.png',
},
'4': {
- text: '已取消',
- image: '../static/mine/33.png',
+ text: '待发货',
+ image: '../static/mine/36.png',
},
'5': {
text: '已退款',
@@ -112,45 +114,44 @@ export default {
image: '../static/mine/34.png',
},
},
- current: 0,
- orderInfo: {}
+ orderInfo: {},
+ oid: '',
}
},
onLoad(option) {
this.setTitle();
+ this.oid = option.oid;
this.getOrderInfo(option.oid);
},
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.getOrderInfo(this.oid);
+ },
methods: {
viewState(value) {
let state;
switch (value) {
- case 0: // 已取消
- state = '4';
- break;
- case 10: // 未付款
+ case 1:
state = '6';
break;
- case 20: // 已付款
- state = '3';
+ case 2:
+ state = '4';
break;
- case 30: // 已发货
+ case 3:
state = '1';
break;
- case 40: // 已收货
- if(this.orderInfo.evaluation_state == 0) state = '2';
+ case 4:
+ state = '2';
+ break;
+ case 6:
+ state = '7';
+ break;
+ case 7:
+ state = '5';
break;
default:
break;
}
- if(this.orderInfo.refund_state) state = '5';
- // 申请退款
- if(this.orderInfo.refund_list) {
- const refund = this.orderInfo.refund_list[this.orderInfo.extend_order_common.order_id];
- if(this.orderInfo.refund_list) {
- if([1, 2].indexOf(refund.refund_state) >= 0) state = '7';
- if(refund.refund_state == 3) state = '8';
- }
- }
this.state = state;
},
getOrderInfo(id) {
@@ -159,9 +160,14 @@ export default {
}).then(res => {
if(res.errCode == 0) {
this.orderInfo = res.data;
- this.viewState(this.orderInfo.order_state);
+ this.viewState(this.orderInfo.view_type);
+ this.setTitle(this.orderInfo.view_type);
}
+ uni.stopPullDownRefresh(); // 结束刷新
})
+ },
+ applyRefund() {
+
},
cancelOrder() {
this.$u.api.cancelOrder({
@@ -172,10 +178,20 @@ export default {
}
})
},
- setTitle(){
+ confirmReceive() {
+ this.$u.api.confirmReceive({
+ order_id: this.order.order_id,
+ }).then(res => {
+ if(res.errCode == 0) {
+ this.getOrderInfo(this.oid);
+ }
+ this.$u.toast(res.message);
+ })
+ },
+ setTitle(value){
let title = '';
- switch (this.current) {
- case '1':
+ switch (value) {
+ case 1:
title = "支付成功"
break;
default:
@@ -292,6 +308,7 @@ export default {
}
.store-goods {
display: flex;
+ margin-bottom: 20rpx;
> image {
width: 180rpx;
height: 160rpx;
@@ -300,6 +317,7 @@ export default {
flex-shrink: 0;
}
.goods-info {
+ flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
diff --git a/pageE/order/Index.vue b/pageE/order/Index.vue
index 85783fc..cde9515 100644
--- a/pageE/order/Index.vue
+++ b/pageE/order/Index.vue
@@ -30,15 +30,15 @@ export default {
}, {
name: '待支付'
}, {
- name: '已取消'
+ name: '待发货'
}, {
name: '待收货'
}, {
name: '试穿试送'
- }, {
- name: '待评价'
}, {
name: '售后'
+ }, {
+ name: '待评价'
}],
orderList: [],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
@@ -59,13 +59,11 @@ export default {
this.orderList = [];
}
this.page = 0;
- // again 重新请求列表 不然往列表里添加
- if(value == 6) {
- this.getAfterSaleList({ reload: 'again' });
- } else if(value == 4) {
- this.goodsTryOrderList({ reload: 'again' });
+ // reload 重新请求列表 loadmore 往列表里添加
+ if(value == 4) {
+ this.goodsTryOrderList({ load: 'reload' });
} else {
- this.getOrderList({ reload: 'again' });
+ this.getOrderList({ load: 'reload' });
}
},
},
@@ -75,25 +73,31 @@ export default {
this.swiperCurrent = this.current;
this.setViewHeight();
},
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.refreshOrderList();
+ },
methods: {
setOrderType() {
let type;
- // state_type 订单状态:0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
switch (this.current) {
case 1:
- type = 10; // 待支付
+ type = 1; // 待支付
break;
case 2:
- type = 0; // 已取消
+ type = 2; // 待发货
break;
case 3:
- type = 30; // 待收货
+ type = 3; // 待收货
break;
case 4:
type = -1; // 试穿试送
break;
case 5:
- type = 'state_noeval'; // 待评价
+ type = 8; // 售后
+ break;
+ case 6:
+ type = 4; // 待评价
break;
default:
type = -1;
@@ -103,46 +107,52 @@ export default {
},
refreshOrderList() {
this.page = 0;
- if(this.current == 6) {
- this.getAfterSaleList({ reload: 'again' });
- } else if(this.current == 4) {
- this.goodsTryOrderList({ reload: 'again' });
+ // if(this.current == 6) {
+ // this.getAfterSaleList({ load: 'reload' });
+ // } else
+ if(this.current == 4) {
+ this.goodsTryOrderList({ load: 'reload' });
} else {
- this.getOrderList({ reload: 'again' });
+ this.getOrderList({ load: 'reload' });
}
},
- async getOrderList({ reload = '' } = {}) {
+ // 普通
+ async getOrderList({ load = 'loadmore' } = {}) {
const type = this.setOrderType();
const res = await this.$u.api.getOrderList({
page: this.page,
type: type,
})
this.timer = true;
+ uni.stopPullDownRefresh(); // 结束刷新
if(res.errCode == 0) {
- if(reload) this.orderList = res.data;
- else this.orderList.push(...res.data);
+ if(load == 'reload') this.orderList = res.data;
+ else if(load == 'loadmore') this.orderList.push(...res.data);
}
return res;
},
- async getAfterSaleList({ reload = '' } = {}) {
+ // 售后
+ async getAfterSaleList({ load = 'loadmore' } = {}) {
const res = await this.$u.api.getAfterSaleList({
page: this.page,
})
this.timer = true;
if(res.errCode == 0) {
- if(reload) this.orderList = res.data;
- else this.orderList.push(...res.data);
+ if(load == 'reload') this.orderList = res.data;
+ else if(load == 'loadmore') this.orderList.push(...res.data);
}
return res;
},
- async goodsTryOrderList({ reload = '' } = {}) {
+ // 试穿
+ async goodsTryOrderList({ load = 'loadmore' } = {}) {
const res = await this.$u.api.goodsTryOrderList({
page: this.page,
})
+ uni.stopPullDownRefresh(); // 结束刷新
this.timer = true;
if(res.errCode == 0) {
- if(reload) this.orderList = res.data.list;
- else this.orderList.push(...res.data.list);
+ if(load == 'reload') this.orderList = res.data.list;
+ else if(load == 'loadmore') this.orderList.push(...res.data.list);
}
return res;
},
@@ -154,8 +164,9 @@ export default {
this.loadStatus.splice(this.current, 1, "loading");
this.page++;
let promise;
- if(this.current == 6) promise = this.getAfterSaleList();
- else if(this.current == 4) promise = this.goodsTryOrderList();
+ // if(this.current == 6) promise = this.getAfterSaleList();
+ // else
+ if(this.current == 4) promise = this.goodsTryOrderList();
else promise = this.getOrderList();
promise.then(res => {
this.loadStatus.splice(this.current, 1, "nomore");
diff --git a/pageE/order/Logistics.vue b/pageE/order/Logistics.vue
index 9d7e90c..8217e5a 100644
--- a/pageE/order/Logistics.vue
+++ b/pageE/order/Logistics.vue
@@ -42,7 +42,8 @@ export default {
},
methods: {
getOrderLogistics(id) {
- this.$u.api.orderLogistics({ id: 16 }).then(res => {
+ this.$u.api.orderLogistics({ id: id }).then(res => {
+ this.$u.toast(res.message);
if(res.errCode == 0) {
this.expressInfo = res.data.express_info;
this.list = res.data.express_list;
diff --git a/pageE/static/mine/36.png b/pageE/static/mine/36.png
new file mode 100644
index 0000000..9185b1b
Binary files /dev/null and b/pageE/static/mine/36.png differ
diff --git a/pages.json b/pages.json
index a98c2ea..1a9be83 100644
--- a/pages.json
+++ b/pages.json
@@ -849,6 +849,7 @@
{
"path": "order/Index",
"style": {
+ "enablePullDownRefresh": true,
"navigationBarTitleText": "我的订单",
"app-plus": {
"titleSize": "36px",
@@ -862,6 +863,7 @@
{
"path": "order/Details",
"style": {
+ "enablePullDownRefresh": true,
"navigationBarTitleText": "订单详情",
"app-plus": {
"titleSize": "36px",
@@ -937,6 +939,7 @@
{
"path": "pages/mine/index",
"style": {
+ "enablePullDownRefresh": true,
"navigationBarTitleText": "我的",
"app-plus": {
"titleSize": "36px",
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index cc36111..761e967 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -56,8 +56,8 @@
待支付
-
- 已取消
+
+ 待发货
@@ -148,6 +148,10 @@ export default {
}
this.getUserInfo();
},
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.getUserInfo();
+ },
onNavigationBarButtonTap() {
this.toOtherPage("/setting/Index");
},
@@ -157,6 +161,7 @@ export default {
if (res.errCode == 0) {
// this.userInfo = res.data.MemberArray;
this.$set(this, 'userInfo', res.data.MemberArray);
+ uni.stopPullDownRefresh();
}
})
},
@@ -326,7 +331,7 @@ export default {
@include image-size($image-width: 33rpx, $image-height: 36rpx);
}
> view:nth-child(2){
- @include image-size($image-width: 39rpx, $image-height: 33rpx);
+ @include image-size($image-width: 38rpx, $image-height: 32rpx);
}
> view:nth-child(3){
@include image-size($image-width: 41rpx, $image-height: 33rpx);
diff --git a/static/image/mine/35.png b/static/image/mine/35.png
new file mode 100644
index 0000000..2416662
Binary files /dev/null and b/static/image/mine/35.png differ