Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
06e9531f
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,发现更多精彩内容 >>
提交
06e9531f
编写于
2月 12, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
63f05f69
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
104 addition
and
47 deletion
+104
-47
application/admin/view/default/order/index.html
application/admin/view/default/order/index.html
+4
-2
application/admin/view/default/orderaftersale/index.html
application/admin/view/default/orderaftersale/index.html
+7
-1
application/api/controller/User.php
application/api/controller/User.php
+20
-10
application/service/UserService.php
application/service/UserService.php
+62
-20
public/static/admin/default/css/order.css
public/static/admin/default/css/order.css
+0
-3
public/static/admin/default/css/orderaftersale.css
public/static/admin/default/css/orderaftersale.css
+5
-5
public/static/common/css/common.css
public/static/common/css/common.css
+1
-1
sourcecode/alipay/app.js
sourcecode/alipay/app.js
+1
-1
sourcecode/baidu/app.js
sourcecode/baidu/app.js
+1
-1
sourcecode/qq/app.js
sourcecode/qq/app.js
+1
-1
sourcecode/toutiao/app.js
sourcecode/toutiao/app.js
+1
-1
sourcecode/weixin/app.js
sourcecode/weixin/app.js
+1
-1
未找到文件。
application/admin/view/default/order/index.html
浏览文件 @
06e9531f
...
...
@@ -143,11 +143,12 @@
{{foreach $data_list as $v}}
<tr
id=
"data-list-{{$v.id}}"
{{
if
$
v
['
pay_status
']
eq
1
and
$
v
['
total_price
']
gt
$
v
['
pay_price
']}}
class=
"am-danger"
{{/
if
}}
>
<td
class=
"am-hide-sm-only"
>
<div
class=
"
order-no
am-padding-bottom-xs"
>
<s
pan>
{{$v.order_no}}
</span
>
<div
class=
"am-padding-bottom-xs"
>
<s
trong>
{{$v.order_no}}
</strong
>
<span
class=
"am-badge am-badge-primary am-radius"
title=
"订单模式"
>
{{$v.order_model_name}}
</span>
<span
class=
"am-badge am-badge-secondary am-radius"
title=
"客户端类型"
>
{{$v.client_type_name}}
</span>
</div>
<hr
data-am-widget=
"divider"
class=
"am-divider am-divider-dashed am-margin-vertical-0"
/>
{{foreach $v.items as $vs}}
<div
class=
"goods-item"
>
<div
class=
"base"
>
...
...
@@ -168,6 +169,7 @@
<span
class=
"am-fr"
>
{{$vs.price}}x{{$vs.buy_number}}
</span>
</div>
</div>
<hr
data-am-widget=
"divider"
class=
"am-divider am-divider-dashed am-margin-vertical-0"
/>
{{/foreach}}
<div
class=
"goods-item"
>
{{$v.describe}}
</div>
</td>
...
...
application/admin/view/default/orderaftersale/index.html
浏览文件 @
06e9531f
...
...
@@ -115,7 +115,13 @@
{{foreach $data_list as $v}}
<tr
id=
"data-list-{{$v.id}}"
>
<td
class=
"am-hide-sm-only"
>
<div
class=
"goods-detail"
>
<div
class=
"am-padding-bottom-xs"
>
<strong>
{{$v.order_data.order_no}}
</strong>
<span
class=
"am-badge am-badge-primary am-radius"
title=
"订单模式"
>
{{$v.order_data.order_model_name}}
</span>
<span
class=
"am-badge am-badge-secondary am-radius"
title=
"客户端类型"
>
{{$v.order_data.client_type_name}}
</span>
</div>
<hr
data-am-widget=
"divider"
class=
"am-divider am-divider-dashed am-margin-vertical-0"
/>
<div
class=
"goods-detail am-padding-vertical-xs"
>
<a
href=
"{{$v.order_data.items.goods_url}}"
target=
"_blank"
>
<img
src=
"{{$v.order_data.items.images}}"
class=
"am-img-thumbnail am-radius"
/>
</a>
...
...
application/api/controller/User.php
浏览文件 @
06e9531f
...
...
@@ -100,9 +100,11 @@ class User extends Common
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'alipay_openid'
,
$result
[
'data'
][
'user_id'
]);
if
(
empty
(
$user
))
{
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_
alipay_
user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
][
'user_id'
]]);
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
][
'user_id'
]]);
}
$user
[
'is_alipay_user_exist'
]
=
1
;
// 标记用户存在
$user
[
'is_user_exist'
]
=
1
;
return
DataReturn
(
'授权成功'
,
0
,
$user
);
}
return
DataReturn
(
$result
[
'msg'
],
-
100
);
...
...
@@ -169,9 +171,11 @@ class User extends Common
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'weixin_openid'
,
$result
);
if
(
empty
(
$user
))
{
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_
alipay_
user_exist'
=>
0
,
'openid'
=>
$result
]);
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
]);
}
$user
[
'is_alipay_user_exist'
]
=
1
;
// 标记用户存在
$user
[
'is_user_exist'
]
=
1
;
return
DataReturn
(
'授权登录成功'
,
0
,
$user
);
}
return
DataReturn
(
'授权登录失败'
,
-
100
);
...
...
@@ -255,9 +259,11 @@ class User extends Common
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'baidu_openid'
,
$result
);
if
(
empty
(
$user
))
{
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_
alipay_
user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
]]);
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
]]);
}
$user
[
'is_alipay_user_exist'
]
=
1
;
// 标记用户存在
$user
[
'is_user_exist'
]
=
1
;
return
DataReturn
(
'授权登录成功'
,
0
,
$user
);
}
return
DataReturn
(
$result
[
'msg'
],
-
10
);
...
...
@@ -346,9 +352,11 @@ class User extends Common
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'toutiao_openid'
,
$result
);
if
(
empty
(
$user
))
{
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_
alipay_
user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
]]);
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
]]);
}
$user
[
'is_alipay_user_exist'
]
=
1
;
// 标记用户存在
$user
[
'is_user_exist'
]
=
1
;
return
DataReturn
(
'授权登录成功'
,
0
,
$user
);
}
return
DataReturn
(
$result
[
'msg'
],
-
10
);
...
...
@@ -427,9 +435,11 @@ class User extends Common
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'qq_openid'
,
$result
);
if
(
empty
(
$user
))
{
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_
alipay_
user_exist'
=>
0
,
'openid'
=>
$result
]);
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
]);
}
$user
[
'is_alipay_user_exist'
]
=
1
;
// 标记用户存在
$user
[
'is_user_exist'
]
=
1
;
return
DataReturn
(
'授权登录成功'
,
0
,
$user
);
}
return
DataReturn
(
'授权登录失败'
,
-
100
);
...
...
application/service/UserService.php
浏览文件 @
06e9531f
...
...
@@ -1718,31 +1718,25 @@ class UserService
{
return
DataReturn
(
'授权成功'
,
0
,
$user
);
}
else
{
// 用户unionid列表
// 微信用户unionid
// QQ用户unionid
$unionid_all
=
[
'weixin_unionid'
,
'qq_unionid'
];
foreach
(
$unionid_all
as
$unionid
)
// 用户unionid
$unionid
=
self
::
UserUnionidHandle
(
$params
);
if
(
!
empty
(
$unionid
[
'field'
])
&&
!
empty
(
$unionid
[
'value'
]))
{
if
(
!
empty
(
$params
[
$unionid
]))
// unionid字段是否存在用户
$user_unionid
=
UserService
::
AppUserInfoHandle
(
null
,
$unionid
[
'field'
],
$unionid
[
'value'
]);
if
(
!
empty
(
$user_unionid
))
{
// unionid字段是否存在用户
$user_unionid
=
UserService
::
AppUserInfoHandle
(
null
,
$unionid
,
$params
[
$unionid
]);
if
(
!
empty
(
$user_unionid
))
// openid绑定
if
(
Db
::
name
(
'User'
)
->
where
([
'id'
=>
$user_unionid
[
'id'
]])
->
update
([
$field
=>
$params
[
'openid'
],
'upd_time'
=>
time
()]))
{
// openid绑定
if
(
Db
::
name
(
'User'
)
->
where
([
'id'
=>
$user_unionid
[
'id'
]])
->
update
([
$field
=>
$params
[
'openid'
],
'upd_time'
=>
time
()]))
{
// 直接返回用户信息
$user_unionid
[
$field
]
=
$params
[
'openid'
];
return
DataReturn
(
'授权成功'
,
0
,
$user_unionid
);
}
// 直接返回用户信息
$user_unionid
[
$field
]
=
$params
[
'openid'
];
return
DataReturn
(
'授权成功'
,
0
,
$user_unionid
);
}
// 如果用户不存在数据库中,则unionid放入用户data中
$data
[
$unionid
]
=
$params
[
$unionid
];
break
;
}
// 如果用户不存在数据库中,则unionid放入用户data中
$data
[
$unionid
[
'field'
]]
=
$unionid
[
'value'
];
}
// 不强制绑定手机则写入用户信息
...
...
@@ -1760,6 +1754,35 @@ class UserService
return
DataReturn
(
'授权成功'
,
0
,
self
::
AppUserInfoHandle
(
null
,
null
,
null
,
$data
));
}
/**
* 用户unionid处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-02-11
* @desc description
* @param [array] $params [输入参数]
*/
private
static
function
UserUnionidHandle
(
$params
=
[])
{
// 用户unionid列表
// 微信用户unionid
// QQ用户unionid
$field
=
null
;
$value
=
null
;
$unionid_all
=
[
'weixin_unionid'
,
'qq_unionid'
];
foreach
(
$unionid_all
as
$unionid
)
{
if
(
!
empty
(
$params
[
$unionid
]))
{
$field
=
$unionid
;
$value
=
$params
[
$unionid
];
break
;
}
}
return
[
'field'
=>
$field
,
'value'
=>
$value
];
}
/**
* app用户信息
* @author Devil
...
...
@@ -1870,6 +1893,14 @@ class UserService
return
DataReturn
(
'账号已存在'
,
-
10
);
}
// 用户unionid
$unionid
=
self
::
UserUnionidHandle
(
$params
);
if
(
!
empty
(
$unionid
[
'field'
])
&&
!
empty
(
$unionid
[
'value'
]))
{
// unionid放入用户data中
$data
[
$unionid
[
'field'
]]
=
$unionid
[
'value'
];
}
// 推荐人id
$data
[
'referrer'
]
=
self
::
UserReferrerDecrypt
(
$params
);
...
...
@@ -2043,6 +2074,17 @@ class UserService
return
$user_ret
;
}
}
else
{
// 用户unionid
$unionid
=
self
::
UserUnionidHandle
(
$params
);
if
(
!
empty
(
$unionid
[
'field'
])
&&
!
empty
(
$unionid
[
'value'
]))
{
if
(
empty
(
$temp_user
[
$unionid
[
'field'
]]))
{
// unionid放入用户data中
$data
[
$unionid
[
'field'
]]
=
$unionid
[
'value'
];
}
}
$data
[
'upd_time'
]
=
time
();
if
(
Db
::
name
(
'User'
)
->
where
([
'id'
=>
$temp_user
[
'id'
]])
->
update
(
$data
))
{
...
...
public/static/admin/default/css/order.css
浏览文件 @
06e9531f
...
...
@@ -11,9 +11,6 @@
.am-table
.goods-item
{
padding
:
5px
0
;
}
.am-table
.goods-item
,
.am-table
.goods-item
.base
{
overflow
:
hidden
;
}
.am-table
.goods-item
.other
.fl
{
width
:
60%
;
}
.am-table
.goods-item
:not
(
:last-child
),
.am-table
.order-no
{
border-bottom
:
1px
solid
#eee
;
}
.am-table
.order-no
{
font-weight
:
700
;
color
:
#333
;}
/**
* 业务弹窗
...
...
public/static/admin/default/css/orderaftersale.css
浏览文件 @
06e9531f
/**
* 商品列表
*/
.content-right
.goods-detail
img
{
width
:
80px
;
height
:
8
0px
;
position
:
absolute
;
left
:
0
;
}
.content-right
.goods-detail
{
position
:
relative
;
min-height
:
80
px
;
}
.content-right
.goods-detail
img
{
width
:
60px
;
height
:
6
0px
;
position
:
absolute
;
left
:
0
;
}
.content-right
.goods-detail
{
position
:
relative
;
min-height
:
65
px
;
}
.content-right
.goods-title
{
display
:
block
;
max-height
:
36px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.content-right
.goods-title
:hover
{
text-decoration
:
underline
;
}
.content-right
.goods-base
{
float
:
left
;
top
:
0
;
margin-left
:
8
5px
;
}
.content-right
.goods-base
{
float
:
left
;
top
:
0
;
margin-left
:
6
5px
;
}
.content-right
.goods-attr
{
margin-top
:
5px
;
}
.content-right
.goods-attr
li
{
color
:
#888
;
line-height
:
16px
;
}
.content-right
.original-price
,
.content-right
.line-price
{
font-family
:
Verdana
,
Tahoma
,
arial
;
}
...
...
@@ -30,8 +30,8 @@
* 列表
*/
@media
only
screen
and
(
min-width
:
640px
)
{
.content-right
table
.am-table
tr
.row-
user-info
{
width
:
20
%
;
}
.content-right
table
.am-table
tr
.row-
goods
{
width
:
20
%
;
}
.content-right
table
.am-table
tr
.row-
goods
{
width
:
25
%
;
}
.content-right
table
.am-table
tr
.row-
user-info
{
width
:
15
%
;
}
.content-right
table
.am-table
tr
.row-apply
{
width
:
25%
;
}
.content-right
table
.am-table
tr
.row-more
{
width
:
80px
;
}
.content-right
table
.am-table
tr
.row-operation
{
width
:
85px
;
}
...
...
public/static/common/css/common.css
浏览文件 @
06e9531f
...
...
@@ -19,7 +19,7 @@
.am-form-group
:hover
>
input
,
.am-form-group
:hover
>
select
,
.am-form-group
:hover
>
textarea
,
.am-form-group
:hover
.chosen-choices
,
.am-form-group
:hover
.chosen-single
{
border
:
1px
solid
#999
;
}
.am-form-error
.chosen-choices
,
.am-form-error
.chosen-default
{
border
:
1px
solid
#dd514c
!important
;
}
.am-form-success
.chosen-choices
,
.am-form-success
.chosen-single
{
border
:
1px
solid
#5eb95e
!important
;
}
form
.am-form
.am-form-group-label-tips
,
form
.am-form
.am-form-group-label-tips-must
{
font-size
:
12px
;
font-weight
:
1
00
;
margin-left
:
10px
;
}
form
.am-form
.am-form-group-label-tips
,
form
.am-form
.am-form-group-label-tips-must
{
font-size
:
12px
;
font-weight
:
4
00
;
margin-left
:
10px
;
}
form
.am-form
.am-form-group-label-tips
{
color
:
#ccc
;
}
form
.am-form
.am-form-group-label-tips-must
{
color
:
#f00
;
}
.am-form-group
:hover
>
label
{
color
:
#333
!important
;
}
...
...
sourcecode/alipay/app.js
浏览文件 @
06e9531f
...
...
@@ -283,7 +283,7 @@ App({
my
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
if
((
data
.
is_
alipay_
user_exist
||
0
)
==
1
)
if
((
data
.
is_user_exist
||
0
)
==
1
)
{
my
.
setStorage
({
key
:
self
.
data
.
cache_user_info_key
,
...
...
sourcecode/baidu/app.js
浏览文件 @
06e9531f
...
...
@@ -281,7 +281,7 @@ App({
swan
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
if
((
data
.
is_
alipay_
user_exist
||
0
)
==
1
)
{
if
((
data
.
is_user_exist
||
0
)
==
1
)
{
swan
.
setStorage
({
key
:
self
.
data
.
cache_user_info_key
,
data
:
data
,
...
...
sourcecode/qq/app.js
浏览文件 @
06e9531f
...
...
@@ -249,7 +249,7 @@ App({
qq
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
if
((
data
.
is_
alipay_
user_exist
||
0
)
==
1
)
{
if
((
data
.
is_user_exist
||
0
)
==
1
)
{
qq
.
setStorage
({
key
:
self
.
data
.
cache_user_info_key
,
data
:
data
,
...
...
sourcecode/toutiao/app.js
浏览文件 @
06e9531f
...
...
@@ -251,7 +251,7 @@ App({
tt
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
if
((
data
.
is_
alipay_
user_exist
||
0
)
==
1
)
{
if
((
data
.
is_user_exist
||
0
)
==
1
)
{
tt
.
setStorage
({
key
:
self
.
data
.
cache_user_info_key
,
data
:
data
,
...
...
sourcecode/weixin/app.js
浏览文件 @
06e9531f
...
...
@@ -252,7 +252,7 @@ App({
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
if
((
data
.
is_
alipay_
user_exist
||
0
)
==
1
)
{
if
((
data
.
is_user_exist
||
0
)
==
1
)
{
wx
.
setStorage
({
key
:
self
.
data
.
cache_user_info_key
,
data
:
data
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录