Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
1eb5f970
ShopXO
项目概览
starsw001
/
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,发现更多精彩内容 >>
提交
1eb5f970
编写于
11月 26, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
user
上级
c1d3a730
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
109 addition
and
19 deletion
+109
-19
alipay/app.js
alipay/app.js
+1
-1
alipay/images/user-head-message-icon.png
alipay/images/user-head-message-icon.png
+0
-0
alipay/pages/goods-search/goods-search.axml
alipay/pages/goods-search/goods-search.axml
+2
-4
alipay/pages/goods-search/goods-search.js
alipay/pages/goods-search/goods-search.js
+7
-1
alipay/pages/user/user.acss
alipay/pages/user/user.acss
+33
-3
alipay/pages/user/user.axml
alipay/pages/user/user.axml
+25
-4
alipay/pages/user/user.js
alipay/pages/user/user.js
+16
-4
service/Application/Api/Controller/UserController.class.php
service/Application/Api/Controller/UserController.class.php
+25
-2
未找到文件。
alipay/app.js
浏览文件 @
1eb5f970
...
...
@@ -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/images/user-head-message-icon.png
0 → 100644
浏览文件 @
1eb5f970
1.3 KB
alipay/pages/goods-search/goods-search.axml
浏览文件 @
1eb5f970
...
...
@@ -50,11 +50,9 @@
<input type="digit" placeholder="最高价" name="max_price" class="br fl" />
</view>
<view class="item keywords">
<view class="title cr-666">关键字
</view>
<view class="title cr-666">关键字</view>
<input type="text" placeholder="关键字" name="keywords" value="{{(params.keywords || '')}}" class="br" />
</view>
<button formType="submit" class="bg-main form-submit wh-auto" disabled="{{popup_form_loading_status}}" hover-class="none">确认
</button>
<button formType="submit" class="bg-main form-submit wh-auto" disabled="{{popup_form_loading_status}}" hover-class="none">确认</button>
</form>
</popup>
\ No newline at end of file
alipay/pages/goods-search/goods-search.js
浏览文件 @
1eb5f970
...
...
@@ -99,8 +99,14 @@ Page({
}
}
else
{
this
.
setData
({
data_list_loding_status
:
0
data_list_loding_status
:
0
,
});
if
(
this
.
data
.
data_page
<=
1
)
{
this
.
setData
({
data_list
:
[],
data_bottom_line_status
:
false
,
});
}
}
}
else
{
this
.
setData
({
...
...
alipay/pages/user/user.acss
浏览文件 @
1eb5f970
/* 头部 */
.head-box{
padding
: 30rpx 1
0rpx;
padding
-top: 3
0rpx;
font-size: 24rpx;
}
.head-item .avatar {
...
...
@@ -12,12 +12,42 @@
font-size: 30rpx;
margin-top: 10rpx;
}
.head-item .item-icon{
.head-item .item-icon {
width: 30rpx;
margin-right: 20rpx;
}
/* 头部导航 */
.head-nav {
padding: 5px 0;
background: rgba(0,0,0,0.1);
margin-top: 30rpx;
}
.head-nav-item {
width: 25%;
padding: 5rpx 0;
}
.head-nav-item view {
line-height: 38rpx;
color: #efeaea;
font-weight: 100;
}
.message-nav {
position: absolute;
top: 20rpx;
right: 20rpx;
}
.message-nav image {
width: 28rpx;
height: 28rpx;
vertical-align: middle;
}
.message-nav text {
margin-left: 5rpx;
font-weight: 100;
font-size: 24rpx;
color: #eee;
}
/* 导航列表 */
.nav-box .nav-item{
...
...
alipay/pages/user/user.axml
浏览文件 @
1eb5f970
<!-- 头部 -->
<view class="head-box bg-main">
<view class="head-item oh tc">
<image onTap="preview_event" onError="user_avatar_error" class="avatar" src="{{avatar}}" mode="widthFix" />
<text class="item-name dis-block cr-fff">{{nickname}}</text>
<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 a:if="{{head_nav_list.length > 0}}" class="head-nav oh wh-auto">
<block a:for="{{head_nav_list}}">
<navigator url="/pages/{{item.url}}/{{item.url}}" hover-class="none">
<view class="head-nav-item tc fl">
<view>{{item.count}}</view>
<view>{{item.name}}</view>
</view>
</navigator>
</block>
</view>
<view class="message-nav">
<navigator url="/pages/message/message" hover-class="none">
<image src="/images/user-head-message-icon.png" mode="aspectFill" />
<text>消息</text>
<text>{{message_total}}</text>
</navigator>
</view>
</view>
<!-- 导航 -->
<view class="nav-box bg-white">
<block a:for="{{lists}}">
<view a:if="{{item.is_show == 1}}">
<navigator url="/pages/{{item.url}}/{{item.url}}" class="nav-item br-b">
<navigator url="/pages/{{item.url}}/{{item.url}}" class="nav-item br-b"
hover-class="none"
>
<view class="arrow-right">
<image src="/images/{{item.icon}}.png" class="item-icon" mode="widthFix" />
<text class="item-name">{{item.name}}</text>
...
...
@@ -17,7 +38,7 @@
</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}}">
<navigator url="/pages/{{item.url}}/{{item.url}}?status={{items.status}}"
hover-class="none"
>
<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" />
...
...
alipay/pages/user/user.js
浏览文件 @
1eb5f970
...
...
@@ -3,11 +3,15 @@ Page({
data
:
{
avatar
:
app
.
data
.
default_user_head_src
,
nickname
:
"
用户名
"
,
integral
:
0
,
deadline
:
0
,
agreement_url
:
''
,
customer_service_tel
:
null
,
common_user_center_notice
:
null
,
message_total
:
0
,
head_nav_list
:
[
{
name
:
"
订单总数
"
,
url
:
"
user-order
"
,
count
:
0
},
{
name
:
"
商品收藏
"
,
url
:
"
user-faovr
"
,
count
:
0
},
{
name
:
"
我的足迹
"
,
url
:
"
user-goods-browse
"
,
count
:
0
},
{
name
:
"
我的积分
"
,
url
:
"
user-integral
"
,
count
:
0
},
],
user_order_status_list
:
[
{
name
:
"
待付款
"
,
status
:
1
,
count
:
0
},
{
name
:
"
待发货
"
,
status
:
2
,
count
:
0
},
...
...
@@ -102,13 +106,21 @@ Page({
}
}
// 头部导航总数
var
temp_head_nav_list
=
this
.
data
.
head_nav_list
;
temp_head_nav_list
[
0
][
'
count
'
]
=
((
data
.
user_order_count
||
0
)
==
0
)
?
0
:
data
.
user_order_count
;
temp_head_nav_list
[
1
][
'
count
'
]
=
((
data
.
user_goods_favor_count
||
0
)
==
0
)
?
0
:
data
.
user_goods_favor_count
;
temp_head_nav_list
[
2
][
'
count
'
]
=
((
data
.
user_goods_browse_count
||
0
)
==
0
)
?
0
:
data
.
user_goods_browse_count
;
temp_head_nav_list
[
3
][
'
count
'
]
=
((
data
.
integral
||
0
)
==
0
)
?
0
:
data
.
integral
;
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
,
message_total
:
((
data
.
common_message_total
||
0
)
==
0
)
?
0
:
data
.
common_message_total
,
head_nav_list
:
temp_head_nav_list
,
});
}
else
{
my
.
showToast
({
...
...
service/Application/Api/Controller/UserController.class.php
浏览文件 @
1eb5f970
...
...
@@ -3,6 +3,8 @@
namespace
Api\Controller
;
use
Service\OrderService
;
use
Service\GoodsService
;
use
Service\MessageService
;
/**
* 用户
...
...
@@ -237,18 +239,39 @@ class UserController extends CommonController
// 登录校验
$this
->
Is_Login
();
// 订单总数
$where
=
[
'user_id'
=>
$this
->
user
[
'id'
],
'is_delete_time'
=>
0
,
'user_is_delete_time'
=>
0
];
$user_order_count
=
OrderService
::
OrderTotal
(
$where
);
// 商品收藏总数
$where
=
[
'user_id'
=>
$this
->
user
[
'id'
]];
$user_goods_favor_count
=
GoodsService
::
GoodsFavorTotal
(
$where
);
// 商品浏览总数
$where
=
[
'user_id'
=>
$this
->
user
[
'id'
]];
$user_goods_browse_count
=
GoodsService
::
GoodsBrowseTotal
(
$where
);
// 未读消息总数
$params
=
[
'user'
=>
$this
->
user
,
'is_more'
=>
1
,
'is_read'
=>
0
];
$common_message_total
=
MessageService
::
UserMessageTotal
(
$params
);
$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
]);
// 初始化数据
$result
=
array
(
'integral'
=>
$this
->
user
[
'integral'
],
'integral'
=>
(
int
)
$this
->
user
[
'integral'
],
'avatar'
=>
$this
->
user
[
'avatar'
],
'nickname'
=>
$this
->
user
[
'nickname'
],
'username'
=>
$this
->
user
[
'username'
],
'customer_service_tel'
=>
MyC
(
'common_customer_service_tel'
),
'customer_service_tel'
=>
MyC
(
'common_
app_mini_alipay_
customer_service_tel'
),
'common_user_center_notice'
=>
MyC
(
'common_user_center_notice'
),
'user_order_status'
=>
$user_order_status
[
'data'
],
'user_order_count'
=>
$user_order_count
,
'user_goods_favor_count'
=>
$user_goods_favor_count
,
'user_goods_browse_count'
=>
$user_goods_browse_count
,
'common_message_total'
=>
$common_message_total
,
);
// 返回数据
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录