Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
c1d3a730
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c1d3a730
编写于
11月 25, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
order
上级
9c45b046
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
109 addition
and
49 deletion
+109
-49
alipay/app.js
alipay/app.js
+1
-1
alipay/app.json
alipay/app.json
+2
-2
alipay/images/user-index-nav-order-icon-1.png
alipay/images/user-index-nav-order-icon-1.png
+0
-0
alipay/images/user-index-nav-order-icon-2.png
alipay/images/user-index-nav-order-icon-2.png
+0
-0
alipay/images/user-index-nav-order-icon-3.png
alipay/images/user-index-nav-order-icon-3.png
+0
-0
alipay/images/user-index-nav-order-icon-4.png
alipay/images/user-index-nav-order-icon-4.png
+0
-0
alipay/images/user-nav-booking-order-icon.png
alipay/images/user-nav-booking-order-icon.png
+0
-0
alipay/images/user-nav-order-icon.png
alipay/images/user-nav-order-icon.png
+0
-0
alipay/pages/user-order/user-order.js
alipay/pages/user-order/user-order.js
+16
-3
alipay/pages/user/user.acss
alipay/pages/user/user.acss
+22
-1
alipay/pages/user/user.axml
alipay/pages/user/user.axml
+20
-5
alipay/pages/user/user.js
alipay/pages/user/user.js
+30
-19
alipay/pages/user/user.json
alipay/pages/user/user.json
+4
-1
service/Application/Api/Controller/OrderController.class.php
service/Application/Api/Controller/OrderController.class.php
+0
-11
service/Application/Api/Controller/UserController.class.php
service/Application/Api/Controller/UserController.class.php
+6
-0
service/Application/Service/OrderService.class.php
service/Application/Service/OrderService.class.php
+8
-6
未找到文件。
alipay/app.js
浏览文件 @
c1d3a730
...
...
@@ -47,7 +47,7 @@ App({
// 请求地址
request_url
:
"
https://demo.shopxo.net/
"
,
//
request_url: 'http://localhost/project/shopxo/service/',
request_url
:
'
http://localhost/project/shopxo/service/
'
,
// 基础信息
application_title
:
"
ShopXO电商系统
"
,
...
...
alipay/app.json
浏览文件 @
c1d3a730
{
"pages"
:
[
"pages"
:
[
"pages/user/user"
,
"pages/index/index"
,
"pages/goods-category/goods-category"
,
"pages/cart/cart"
,
"pages/user/user"
,
"pages/web-view/web-view"
,
"pages/login/login"
,
"pages/paytips/paytips"
,
...
...
alipay/images/user-index-nav-order-icon-1.png
0 → 100644
浏览文件 @
c1d3a730
1.6 KB
alipay/images/user-index-nav-order-icon-2.png
0 → 100644
浏览文件 @
c1d3a730
2.0 KB
alipay/images/user-index-nav-order-icon-3.png
0 → 100644
浏览文件 @
c1d3a730
4.0 KB
alipay/images/user-index-nav-order-icon-4.png
0 → 100644
浏览文件 @
c1d3a730
2.8 KB
alipay/images/user-nav-booking-order-icon.png
已删除
100755 → 0
浏览文件 @
9c45b046
5.3 KB
alipay/images/user-nav-order-icon.png
0 → 100644
浏览文件 @
c1d3a730
2.6 KB
alipay/pages/user-order/user-order.js
浏览文件 @
c1d3a730
...
...
@@ -16,7 +16,7 @@ Page({
temp_pay_index
:
0
,
nav_status_list
:
[
{
name
:
"
全部
"
,
value
:
"
-1
"
},
{
name
:
"
待付款
"
,
value
:
"
0,
1
"
},
{
name
:
"
待付款
"
,
value
:
"
1
"
},
{
name
:
"
待发货
"
,
value
:
"
2
"
},
{
name
:
"
待收货
"
,
value
:
"
3
"
},
{
name
:
"
已完成
"
,
value
:
"
4
"
},
...
...
@@ -26,7 +26,21 @@ Page({
},
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
// 是否指定状态
var
nav_status_index
=
0
;
if
((
params
.
status
||
null
)
!=
null
)
{
for
(
var
i
in
this
.
data
.
nav_status_list
)
{
if
(
this
.
data
.
nav_status_list
[
i
][
'
value
'
]
==
params
.
status
)
{
nav_status_index
=
i
;
break
;
}
}
}
this
.
setData
({
params
:
params
,
nav_status_index
:
nav_status_index
,
});
this
.
init
();
},
...
...
@@ -122,7 +136,6 @@ Page({
data_page
:
this
.
data
.
data_page
+
1
,
load_status
:
1
,
payment_list
:
res
.
data
.
data
.
payment_list
||
[],
nav_status_list
:
res
.
data
.
data
.
nav_status_list
||
[],
});
// 是否还有数据
...
...
alipay/pages/user/user.acss
浏览文件 @
c1d3a730
...
...
@@ -3,7 +3,7 @@
padding: 30rpx 10rpx;
font-size: 24rpx;
}
.head-item .
portrait
{
.head-item .
avatar
{
width: 160rpx;
height: 160rpx;
border-radius: 50%;
...
...
@@ -27,6 +27,7 @@
}
.nav-box .nav-item .item-icon{
width: 40rpx;
height: 40rpx;
vertical-align: middle;
}
.nav-box .nav-item .item-name{
...
...
@@ -35,4 +36,24 @@
.nav-box .nav-item .item-arrow{
width: 25rpx;
}
.items-list {
padding: 15rpx 0;
}
.items-list .items {
width: 25%;
position: relative;
}
.items-list .items .items-icon {
width: 60rpx;
height: 60rpx;
margin-bottom: 6rpx;
}
.items-list .items .am-badge {
position: absolute;
top: 0;
left: calc(50% + 30rpx);
}
.user-notice { margin-top: 20rpx; padding: 0 10rpx 20rpx 10rpx; }
\ No newline at end of file
alipay/pages/user/user.axml
浏览文件 @
c1d3a730
<view class="head-box bg-main">
<view class="head-item oh tc">
<image onTap="preview_event" onError="user_avatar_error" class="
portrait
" src="{{avatar}}" mode="widthFix" />
<image onTap="preview_event" onError="user_avatar_error" class="
avatar
" src="{{avatar}}" mode="widthFix" />
<text class="item-name dis-block cr-fff">{{nickname}}</text>
</view>
</view>
<view class="nav-box bg-white">
<navigator a:for="{{lists}}" a:if="{{item.is_show == 1}}" url="/pages/{{item.url}}/{{item.url}}" class="nav-item br-b">
<block a:for="{{lists}}">
<view a:if="{{item.is_show == 1}}">
<navigator url="/pages/{{item.url}}/{{item.url}}" class="nav-item br-b">
<view class="arrow-right">
<image src="/images/{{item.icon}}.png" class="item-icon" mode="widthFix" />
<text class="item-name">{{item.name}}</text>
<image src="/images/{{item.icon}}.png" class="item-icon" mode="widthFix" />
<text class="item-name">{{item.name}}</text>
</view>
</navigator>
</navigator>
</view>
<view a:if="{{item.url == 'user-order' && user_order_status_list.length > 0}}" class="items-list br-b oh">
<block a:for="{{user_order_status_list}}" a:for-item="items">
<navigator url="/pages/{{item.url}}/{{item.url}}?status={{items.status}}">
<view class="items fl tc">
<badge a:if="{{items.count > 0}}" text="{{items.count}}" dot="{{false}}"></badge>
<image src="/images/user-index-nav-order-icon-{{items.status}}.png" class="items-icon" mode="aspectFill" />
<view class="items-name">{{items.name}}</view>
</view>
</navigator>
</block>
</view>
</block>
<view class="nav-item br-b" onTap="clear_storage">
<image src="/images/user-nav-cache-icon.png" class="item-icon" mode="widthFix" />
...
...
alipay/pages/user/user.js
浏览文件 @
c1d3a730
...
...
@@ -8,19 +8,24 @@ Page({
agreement_url
:
''
,
customer_service_tel
:
null
,
common_user_center_notice
:
null
,
user_order_status_list
:
[
{
name
:
"
待付款
"
,
status
:
1
,
count
:
0
},
{
name
:
"
待发货
"
,
status
:
2
,
count
:
0
},
{
name
:
"
待收货
"
,
status
:
3
,
count
:
0
},
{
name
:
"
已完成
"
,
status
:
4
,
count
:
0
},
],
lists
:
[
{
url
:
"
user-
address
"
,
icon
:
"
user-nav-
address
-icon
"
,
url
:
"
user-
order
"
,
icon
:
"
user-nav-
order
-icon
"
,
is_show
:
1
,
name
:
"
我的
地址
"
name
:
"
我的
订单
"
,
},
{
url
:
"
user-
order
"
,
icon
:
"
user-nav-
booking-order
-icon
"
,
url
:
"
user-
address
"
,
icon
:
"
user-nav-
address
-icon
"
,
is_show
:
1
,
name
:
"
我的
订单
"
name
:
"
我的
地址
"
},
{
url
:
"
user-faovr
"
,
...
...
@@ -83,22 +88,28 @@ Page({
my
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
// 订单数量处理
var
temp_user_order_status_list
=
this
.
data
.
user_order_status_list
;
if
((
data
.
user_order_status
||
null
)
!=
null
&&
data
.
user_order_status
.
length
>
0
)
{
for
(
var
i
in
temp_user_order_status_list
)
{
for
(
var
t
in
data
.
user_order_status
)
{
if
(
temp_user_order_status_list
[
i
][
'
status
'
]
==
data
.
user_order_status
[
t
][
'
status
'
])
{
temp_user_order_status_list
[
i
][
'
count
'
]
=
data
.
user_order_status
[
t
][
'
count
'
];
break
;
}
}
}
}
this
.
setData
({
user_order_status_list
:
temp_user_order_status_list
,
customer_service_tel
:
data
.
customer_service_tel
||
null
,
common_user_center_notice
:
data
.
common_user_center_notice
||
null
,
avatar
:
(
data
.
avatar
!=
null
)
?
data
.
avatar
:
this
.
data
.
avatar
,
nickname
:
(
data
.
nickname
!=
null
)
?
data
.
nickname
:
this
.
data
.
nickname
,
integral
:
(
data
.
integral
!=
null
)
?
data
.
integral
:
this
.
data
.
integral
,
});
if
(
data
.
avatar
!=
null
)
{
this
.
setData
({
avatar
:
data
.
avatar
});
}
if
(
data
.
nickname
!=
null
)
{
this
.
setData
({
nickname
:
data
.
nickname
});
}
if
(
data
.
integral
!=
null
)
{
this
.
setData
({
integral
:
data
.
integral
});
}
}
else
{
my
.
showToast
({
type
:
"
fail
"
,
...
...
alipay/pages/user/user.json
浏览文件 @
c1d3a730
{
"pullRefresh"
:
true
"pullRefresh"
:
true
,
"usingComponents"
:
{
"badge"
:
"mini-antui/es/badge/index"
}
}
\ No newline at end of file
service/Application/Api/Controller/OrderController.class.php
浏览文件 @
c1d3a730
...
...
@@ -68,23 +68,12 @@ class OrderController extends CommonController
// 支付方式
$payment_list
=
ResourcesService
::
BuyPaymentList
([
'is_enable'
=>
1
,
'is_open_user'
=>
1
]);
// 导航状态列表
$nav_status_list
=
[
[
'name'
=>
'全部'
,
'value'
=>
'-1'
],
[
'name'
=>
'待付款'
,
'value'
=>
'0,1'
],
[
'name'
=>
'待发货'
,
'value'
=>
'2'
],
[
'name'
=>
'待收货'
,
'value'
=>
'3'
],
[
'name'
=>
'已完成'
,
'value'
=>
'4'
],
[
'name'
=>
'已失效'
,
'value'
=>
'5,6'
],
];
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'payment_list'
=>
$payment_list
,
'nav_status_list'
=>
$nav_status_list
,
];
$this
->
ajaxReturn
(
L
(
'common_operation_success'
),
0
,
$result
);
}
...
...
service/Application/Api/Controller/UserController.class.php
浏览文件 @
c1d3a730
...
...
@@ -2,6 +2,8 @@
namespace
Api\Controller
;
use
Service\OrderService
;
/**
* 用户
* @author Devil
...
...
@@ -235,6 +237,9 @@ class UserController extends CommonController
// 登录校验
$this
->
Is_Login
();
// 用户订单状态
$user_order_status
=
OrderService
::
OrderStatusStepTotal
([
'user_type'
=>
'user'
,
'user'
=>
$this
->
user
,
'is_comments'
=>
1
]);
// 初始化数据
$result
=
array
(
'integral'
=>
$this
->
user
[
'integral'
],
...
...
@@ -243,6 +248,7 @@ class UserController extends CommonController
'username'
=>
$this
->
user
[
'username'
],
'customer_service_tel'
=>
MyC
(
'common_customer_service_tel'
),
'common_user_center_notice'
=>
MyC
(
'common_user_center_notice'
),
'user_order_status'
=>
$user_order_status
[
'data'
],
);
// 返回数据
...
...
service/Application/Service/OrderService.class.php
浏览文件 @
c1d3a730
...
...
@@ -1245,7 +1245,7 @@ class OrderService
$order_status_list
=
L
(
'common_order_user_status'
);
foreach
(
L
(
'common_order_user_status'
)
as
$v
)
{
$result
[
$v
[
'id'
]
]
=
[
$result
[]
=
[
'name'
=>
$v
[
'name'
],
'status'
=>
$v
[
'id'
],
'count'
=>
0
,
...
...
@@ -1255,15 +1255,17 @@ class OrderService
// 数据处理
if
(
!
empty
(
$data
))
{
foreach
(
$data
as
$v
)
foreach
(
$result
as
&
$v
)
{
if
(
isset
(
$result
[
$v
[
'status'
]])
)
foreach
(
$data
as
$vs
)
{
$result
[
$v
[
'status'
]][
'count'
]
=
$v
[
'count'
];
if
(
$v
[
'status'
]
==
$vs
[
'status'
])
{
$v
[
'count'
]
=
$vs
[
'count'
];
continue
;
}
}
}
sort
(
$result
);
}
// 待评价状态站位100
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录