diff --git a/application/api/controller/User.php b/application/api/controller/User.php
index b38eece6c9322851e10d87b830217e6fc1cf90cb..62dc7edc329b70445788d3225975f8c115063011 100755
--- a/application/api/controller/User.php
+++ b/application/api/controller/User.php
@@ -271,7 +271,7 @@ class User extends Common
$common_message_total = ($common_message_total > 99) ? '99+' : $common_message_total;
// 用户订单状态
- $user_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1]);
+ $user_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1, 'is_aftersale'=>1]);
// 初始化数据
$result = array(
diff --git a/application/index/controller/User.php b/application/index/controller/User.php
index 4ff83757d888e18052ce78ba3f72311684e99283..82adb0b7ca9910b157b70ecee2e1711dbf8288cc 100755
--- a/application/index/controller/User.php
+++ b/application/index/controller/User.php
@@ -91,7 +91,7 @@ class User extends Common
$this->assign('user_goods_browse_count', GoodsService::GoodsBrowseTotal($where));
// 用户订单状态
- $user_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1]);
+ $user_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1, 'is_aftersale'=>1]);
$this->assign('user_order_status', $user_order_status['data']);
// 未读消息总数
diff --git a/application/index/view/default/user/index.html b/application/index/view/default/user/index.html
index 92a819e529f6db379f1a7ffa22fe77aa78cfa4a5..6a65f6dd25f9c25484a602959166a5222a34a486 100755
--- a/application/index/view/default/user/index.html
+++ b/application/index/view/default/user/index.html
@@ -125,6 +125,16 @@
{{/if}}
+ {{elseif in_array($v['status'], [101]) /}}
+
+
+
+ {{$v.name}}
+ {{if !empty($v.count)}}
+ {{$v.count}}
+ {{/if}}
+
+
{{/if}}
{{/foreach}}
diff --git a/application/service/OrderService.php b/application/service/OrderService.php
index 135d42bc0db3461f7bcffeb613352dd3fbd4bd92..0f0ca00f008c9ddc96483ab71406e4a3b91b0a58 100755
--- a/application/service/OrderService.php
+++ b/application/service/OrderService.php
@@ -1385,7 +1385,7 @@ class OrderService
}
}
- // 待评价状态站位100
+ // 待评价 状态站位100
if(isset($params['is_comments']) && $params['is_comments'] == 1)
{
switch($user_type)
@@ -1407,6 +1407,23 @@ class OrderService
'count' => (int) Db::name('Order')->where($where)->count(),
];
}
+
+ // 退款/售后 状态站位101
+ if(isset($params['is_aftersale']) && $params['is_aftersale'] == 1)
+ {
+ $where = [
+ ['status', '<=', 2],
+ ];
+ if($user_type == 'user' && !empty($params['user']))
+ {
+ $where[] = ['user_id', '=', $params['user']['id']];
+ }
+ $result[] = [
+ 'name' => '退款/售后',
+ 'status' => 101,
+ 'count' => (int) Db::name('OrderAftersale')->where($where)->count(),
+ ];
+ }
return DataReturn('处理成功', 0, $result);
}
diff --git a/public/appmini/old/weixin/pages/user-order/user-order.wxss b/public/appmini/old/weixin/pages/user-order/user-order.wxss
index b052afd8cb0bb17fc679973fae45f24d37a3e974..b88114d6260e8d2fe0d33666874954c5e9d8f61c 100755
--- a/public/appmini/old/weixin/pages/user-order/user-order.wxss
+++ b/public/appmini/old/weixin/pages/user-order/user-order.wxss
@@ -48,7 +48,7 @@
bottom: 0;
}
.item-base, .item-describe, .item-operation {
- padding: 25rpx 10rpx 10rpx 10rpx;
+ padding: 20rpx 10rpx 20rpx 10rpx;
}
.submit-cancel {
border: 1px solid #f7c3b3;
diff --git a/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.js b/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
index 4d1668d6041b6b2411587f58a21abd00976e9ac6..2cac4f36830b863524953c9a470f16d65be204da 100644
--- a/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
+++ b/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
@@ -454,7 +454,9 @@ Page({
// 查看售后数据
show_aftersale_event(e) {
- console.log(1);
+ wx.navigateTo({
+ url: "/pages/user-orderaftersale/user-orderaftersale?keywords=" + this.data.new_aftersale_data.order_no
+ });
},
// 下拉刷新
diff --git a/public/appmini/old/weixin/pages/user-orderaftersale/user-orderaftersale.js b/public/appmini/old/weixin/pages/user-orderaftersale/user-orderaftersale.js
index f56c72af8c5fd341af4930d84ebceb1e59d44f33..5ac856209039b642069e7e69f552a0cba0fef751 100644
--- a/public/appmini/old/weixin/pages/user-orderaftersale/user-orderaftersale.js
+++ b/public/appmini/old/weixin/pages/user-orderaftersale/user-orderaftersale.js
@@ -10,7 +10,7 @@ Page({
data_list: [],
data_page_total: 0,
data_page: 1,
- input_keyword_value: '',
+ form_keyword_value: '',
// 导航
// 状态(0待确认, 1待退货, 2待审核, 3已完成, 4已拒绝, 5已取消)
@@ -40,6 +40,7 @@ Page({
this.setData({
params: params,
+ form_keyword_value: params.keywords || '',
nav_status_index: nav_status_index,
});
this.init();
@@ -86,7 +87,7 @@ Page({
method: "POST",
data: {
page: this.data.data_page,
- keywords: this.data.input_keyword_value || "",
+ keywords: this.data.form_keyword_value || "",
status: status,
is_more: 1,
},
@@ -174,7 +175,7 @@ Page({
// 输入框事件
input_event(e) {
- this.setData({ input_keyword_value: e.detail.value });
+ this.setData({ form_keyword_value: e.detail.value });
},
// 取消
@@ -238,7 +239,10 @@ Page({
// 下拉刷新
onPullDownRefresh() {
- this.init();
+ this.setData({
+ data_page: 1
+ });
+ this.get_data_list(1);
},
});
diff --git a/public/static/index/default/css/user.index.css b/public/static/index/default/css/user.index.css
index c571e5f83632bde8fe688930605d7fbbb326433c..453f58b84ca95295c03dc53a369ffcfb41d12e92 100755
--- a/public/static/index/default/css/user.index.css
+++ b/public/static/index/default/css/user.index.css
@@ -18,12 +18,13 @@ ul.user-base-icon{background: rgba(0,0,0,0.1); position: absolute;}
.order-nav .icon-tips, .order-base a{color: #888;}
.order-nav .icon-tips i{padding-left: 5px;}
ul.order-base{margin-bottom: 10px; border-bottom: 1px solid #f1f1f1; padding: 13px 0 5px 0;}
-ul.order-base li{float: left; width: 25%; text-align: center; position: relative;}
+ul.order-base li{float: left; width: 20%; text-align: center; position: relative;}
ul.order-base li i{width: 20px; height: 20px; background-repeat: no-repeat; display: inline-block; vertical-align: bottom; opacity: 0.5; background-size: cover; margin-bottom: 2px;}
ul.order-base i.icon-1{background-image: url(../images/user-index-nav-order-icon-1.png);}
ul.order-base i.icon-2{background-image: url(../images/user-index-nav-order-icon-2.png);}
ul.order-base i.icon-3{background-image: url(../images/user-index-nav-order-icon-3.png);}
ul.order-base i.icon-100{background-image: url(../images/user-index-nav-order-icon-100.png);}
+ul.order-base i.icon-101{background-image: url(../images/user-index-nav-order-icon-101.png);}
ul.order-base li span.am-badge{position: absolute; top: -7px; left: 55%;}
/**
diff --git a/public/static/index/default/images/user-index-nav-order-icon-101.png b/public/static/index/default/images/user-index-nav-order-icon-101.png
new file mode 100644
index 0000000000000000000000000000000000000000..9cce12e345f4a2ce26bc631e1e116c6cbf56528d
Binary files /dev/null and b/public/static/index/default/images/user-index-nav-order-icon-101.png differ