diff --git a/application/api/controller/User.php b/application/api/controller/User.php
index bd77bdd6f..21db0f70d 100755
--- a/application/api/controller/User.php
+++ b/application/api/controller/User.php
@@ -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);
diff --git a/application/service/UserService.php b/application/service/UserService.php
index a9ac27c08..f84850a25 100755
--- a/application/service/UserService.php
+++ b/application/service/UserService.php
@@ -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))
{
diff --git a/public/static/admin/default/css/order.css b/public/static/admin/default/css/order.css
index 02bd681e5..fc922bea7 100755
--- a/public/static/admin/default/css/order.css
+++ b/public/static/admin/default/css/order.css
@@ -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;}
-
/**
* 业务弹窗
diff --git a/public/static/admin/default/css/orderaftersale.css b/public/static/admin/default/css/orderaftersale.css
index ac528b7dd..25001b9ab 100644
--- a/public/static/admin/default/css/orderaftersale.css
+++ b/public/static/admin/default/css/orderaftersale.css
@@ -1,11 +1,11 @@
/**
* 商品列表
*/
-.content-right .goods-detail img { width: 80px; height: 80px; position: absolute; left: 0; }
-.content-right .goods-detail { position: relative; min-height: 80px; }
+.content-right .goods-detail img { width: 60px; height: 60px; position: absolute; left: 0; }
+.content-right .goods-detail { position: relative; min-height: 65px; }
.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: 85px; }
+.content-right .goods-base {float: left; top: 0; margin-left: 65px; }
.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; }
diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css
index bc9bf7df4..4fbfca920 100755
--- a/public/static/common/css/common.css
+++ b/public/static/common/css/common.css
@@ -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: 100; 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: 400; 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; }
diff --git a/sourcecode/alipay/app.js b/sourcecode/alipay/app.js
index d062cac43..7894afc16 100644
--- a/sourcecode/alipay/app.js
+++ b/sourcecode/alipay/app.js
@@ -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,
diff --git a/sourcecode/baidu/app.js b/sourcecode/baidu/app.js
index 1e5bb1502..4d74fd060 100755
--- a/sourcecode/baidu/app.js
+++ b/sourcecode/baidu/app.js
@@ -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,
diff --git a/sourcecode/qq/app.js b/sourcecode/qq/app.js
index 8c5622768..7e2199766 100755
--- a/sourcecode/qq/app.js
+++ b/sourcecode/qq/app.js
@@ -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,
diff --git a/sourcecode/toutiao/app.js b/sourcecode/toutiao/app.js
index f0f73e06c..44a1eace9 100755
--- a/sourcecode/toutiao/app.js
+++ b/sourcecode/toutiao/app.js
@@ -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,
diff --git a/sourcecode/weixin/app.js b/sourcecode/weixin/app.js
index 3d511a498..b07f0985d 100755
--- a/sourcecode/weixin/app.js
+++ b/sourcecode/weixin/app.js
@@ -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,