提交 8306faea 编写于 作者: D Devil

小程序订单售后

上级 383ebf11
......@@ -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(
......
......@@ -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']);
// 未读消息总数
......
......@@ -125,6 +125,16 @@
{{/if}}
</a>
</li>
{{elseif in_array($v['status'], [101]) /}}
<li>
<a href="{{:MyUrl('index/orderaftersale/index')}}">
<i class="icon-{{$v.status}}"></i>
<p>{{$v.name}}</p>
{{if !empty($v.count)}}
<span class="am-badge am-badge-danger am-round">{{$v.count}}</span>
{{/if}}
</a>
</li>
{{/if}}
{{/foreach}}
</ul>
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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
});
},
// 下拉刷新
......
......@@ -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);
},
});
......@@ -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%;}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册