Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
u011369184
ShopXO
提交
1cb11b05
ShopXO
项目概览
u011369184
/
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,发现更多精彩内容 >>
提交
1cb11b05
编写于
9月 21, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序一键绑定手机优化
上级
64f0ed86
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
108 addition
and
141 deletion
+108
-141
application/api/controller/User.php
application/api/controller/User.php
+62
-94
application/service/UserService.php
application/service/UserService.php
+21
-22
extend/base/Wechat.php
extend/base/Wechat.php
+21
-16
sourcecode/alipay/pages/login/login.js
sourcecode/alipay/pages/login/login.js
+0
-1
sourcecode/baidu/app.js
sourcecode/baidu/app.js
+1
-1
sourcecode/baidu/pages/login/login.js
sourcecode/baidu/pages/login/login.js
+1
-2
sourcecode/qq/pages/login/login.js
sourcecode/qq/pages/login/login.js
+0
-1
sourcecode/toutiao/pages/login/login.js
sourcecode/toutiao/pages/login/login.js
+0
-1
sourcecode/weixin/app.js
sourcecode/weixin/app.js
+1
-1
sourcecode/weixin/pages/login/login.js
sourcecode/weixin/pages/login/login.js
+1
-2
未找到文件。
application/api/controller/User.php
浏览文件 @
1cb11b05
...
...
@@ -160,28 +160,22 @@ class User extends Common
*/
public
function
WechatUserAuth
()
{
// 参数
if
(
empty
(
$this
->
data_post
[
'authcode'
]))
{
return
DataReturn
(
'授权码为空'
,
-
1
);
}
// 授权
$result
=
(
new
\
base\Wechat
(
MyC
(
'common_app_mini_weixin_appid'
),
MyC
(
'common_app_mini_weixin_appsecret'
)))
->
GetAuthSessionKey
(
$this
->
data_post
[
'authcode'
]
);
if
(
$result
!==
false
)
$result
=
(
new
\
base\Wechat
(
MyC
(
'common_app_mini_weixin_appid'
),
MyC
(
'common_app_mini_weixin_appsecret'
)))
->
GetAuthSessionKey
(
$this
->
data_post
);
if
(
$result
[
'status'
]
==
0
)
{
// 先从数据库获取用户信息
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'weixin_openid'
,
$result
);
$user
=
UserService
::
AppUserInfoHandle
(
null
,
'weixin_openid'
,
$result
[
'data'
]
);
if
(
empty
(
$user
))
{
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
]);
return
DataReturn
(
'授权登录成功'
,
0
,
[
'is_user_exist'
=>
0
,
'openid'
=>
$result
[
'data'
]
]);
}
// 标记用户存在
$user
[
'is_user_exist'
]
=
1
;
return
DataReturn
(
'授权登录成功'
,
0
,
$user
);
}
return
DataReturn
(
'授权登录失败'
,
-
10
0
);
return
DataReturn
(
$result
[
'msg'
],
-
1
0
);
}
/**
...
...
@@ -223,14 +217,13 @@ class User extends Common
if
(
empty
(
$user
))
{
$result
=
(
new
\
base\Wechat
(
MyC
(
'common_app_mini_weixin_appid'
),
MyC
(
'common_app_mini_weixin_appsecret'
)))
->
DecryptData
(
$this
->
data_post
[
'encrypted_data'
],
$this
->
data_post
[
'iv'
],
$this
->
data_post
[
'openid'
]);
if
(
!
empty
(
$result
)
&&
is_array
(
$result
))
if
(
$result
[
'status'
]
==
0
&&
!
empty
(
$result
[
'data'
]))
{
$result
[
'nick_name'
]
=
isset
(
$result
[
'
nickName'
])
?
$result
[
'nickName'
]
:
''
;
$result
[
'avatar'
]
=
isset
(
$result
[
'
avatarUrl'
])
?
$result
[
'avatarUrl'
]
:
''
;
$result
[
'gender'
]
=
empty
(
$result
[
'
gender'
])
?
0
:
((
$result
[
'gender'
]
==
2
)
?
1
:
2
);
$result
[
'weixin_unionid'
]
=
isset
(
$result
[
'
unionId'
])
?
$result
[
'unionId'
]
:
''
;
$result
[
'openid'
]
=
$result
[
'openId'
];
$result
[
'nick_name'
]
=
isset
(
$result
[
'
data'
][
'nickName'
])
?
$result
[
'data'
]
[
'nickName'
]
:
''
;
$result
[
'avatar'
]
=
isset
(
$result
[
'
data'
][
'avatarUrl'
])
?
$result
[
'data'
]
[
'avatarUrl'
]
:
''
;
$result
[
'gender'
]
=
empty
(
$result
[
'
data'
][
'gender'
])
?
0
:
((
$result
[
'data'
]
[
'gender'
]
==
2
)
?
1
:
2
);
$result
[
'weixin_unionid'
]
=
isset
(
$result
[
'
data'
][
'unionId'
])
?
$result
[
'data'
]
[
'unionId'
]
:
''
;
$result
[
'openid'
]
=
$result
[
'
data'
][
'
openId'
];
$result
[
'referrer'
]
=
isset
(
$this
->
data_post
[
'referrer'
])
?
$this
->
data_post
[
'referrer'
]
:
0
;
return
UserService
::
AuthUserProgram
(
$result
,
'weixin_openid'
);
}
...
...
@@ -558,14 +551,14 @@ class User extends Common
}
/**
*
百度小程序用户手机
绑定
*
小程序用户手机一键
绑定
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-20
* @desc description
*/
public
function
Baidu
UserMobileBind
()
public
function
Onekey
UserMobileBind
()
{
// 参数校验
$p
=
[
...
...
@@ -591,85 +584,60 @@ class User extends Common
return
DataReturn
(
$ret
,
-
1
);
}
// 解密数据
$config
=
[
'appid'
=>
MyC
(
'common_app_mini_baidu_appid'
),
'key'
=>
MyC
(
'common_app_mini_baidu_appkey'
),
'secret'
=>
MyC
(
'common_app_mini_baidu_appsecret'
),
];
$result
=
(
new
\
base\Baidu
(
$config
))
->
DecryptData
(
$this
->
data_post
[
'encrypted_data'
],
$this
->
data_post
[
'iv'
],
$this
->
data_post
[
'openid'
],
'mobile_bind'
);
if
(
$result
[
'status'
]
==
0
&&
!
empty
(
$result
[
'data'
]))
// 根据不同平台处理数据解密逻辑
$mobile
=
''
;
$error_msg
=
''
;
switch
(
APPLICATION_CLIENT_TYPE
)
{
$data
=
[
'openid'
=>
$this
->
data_post
[
'openid'
],
'mobile'
=>
$result
[
'data'
][
'mobile'
],
'nickname'
=>
isset
(
$this
->
data_post
[
'nickname'
])
?
$this
->
data_post
[
'nickname'
]
:
''
,
'avatar'
=>
isset
(
$this
->
data_post
[
'avatar'
])
?
$this
->
data_post
[
'avatar'
]
:
''
,
'province'
=>
isset
(
$this
->
data_post
[
'province'
])
?
$this
->
data_post
[
'province'
]
:
''
,
'city'
=>
isset
(
$this
->
data_post
[
'city'
])
?
$this
->
data_post
[
'city'
]
:
''
,
'gender'
=>
isset
(
$this
->
data_post
[
'gender'
])
?
intval
(
$this
->
data_post
[
'gender'
])
:
''
,
'referrer'
=>
isset
(
$this
->
data_post
[
'referrer'
])
?
intval
(
$this
->
data_post
[
'referrer'
])
:
0
,
'is_onekey_mobile_bind'
=>
1
,
];
return
UserService
::
AuthUserProgram
(
$data
,
'baidu_openid'
);
}
else
{
return
DataReturn
(
$result
[
'msg'
],
-
1
);
// 微信
case
'weixin'
:
$result
=
(
new
\
base\Wechat
(
MyC
(
'common_app_mini_weixin_appid'
),
MyC
(
'common_app_mini_weixin_appsecret'
)))
->
DecryptData
(
$this
->
data_post
[
'encrypted_data'
],
$this
->
data_post
[
'iv'
],
$this
->
data_post
[
'openid'
]);
if
(
$result
[
'status'
]
==
0
&&
!
empty
(
$result
[
'data'
])
&&
!
empty
(
$result
[
'data'
][
'purePhoneNumber'
]))
{
$mobile
=
$result
[
'data'
][
'purePhoneNumber'
];
}
else
{
$error_msg
=
$result
[
'msg'
];
}
break
;
// 百度
case
'baidu'
:
$config
=
[
'appid'
=>
MyC
(
'common_app_mini_baidu_appid'
),
'key'
=>
MyC
(
'common_app_mini_baidu_appkey'
),
'secret'
=>
MyC
(
'common_app_mini_baidu_appsecret'
),
];
$result
=
(
new
\
base\Baidu
(
$config
))
->
DecryptData
(
$this
->
data_post
[
'encrypted_data'
],
$this
->
data_post
[
'iv'
],
$this
->
data_post
[
'openid'
],
'mobile_bind'
);
if
(
$result
[
'status'
]
==
0
&&
!
empty
(
$result
[
'data'
])
&&
!
empty
(
$result
[
'data'
][
'mobile'
]))
{
$mobile
=
$result
[
'data'
][
'mobile'
];
}
else
{
$error_msg
=
$result
[
'msg'
];
}
break
;
// 默认
default
:
return
DataReturn
(
APPLICATION_CLIENT_TYPE
.
'平台还未开发手机一键登录'
,
-
1
);
}
}
/**
* 微信小程序用户手机绑定
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-20
* @desc description
*/
public
function
WeixinUserMobileBind
()
{
// 参数校验
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'openid'
,
'error_msg'
=>
'openid为空'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'encrypted_data'
,
'error_msg'
=>
'解密数据为空'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'iv'
,
'error_msg'
=>
'iv为空,请重试'
,
]
];
$ret
=
ParamsChecked
(
$this
->
data_post
,
$p
);
if
(
$ret
!==
true
)
if
(
empty
(
$mobile
))
{
return
DataReturn
(
$ret
,
-
1
);
return
DataReturn
(
empty
(
$error_msg
)
?
'数据解密失败'
:
$error_msg
,
-
1
);
}
// 解密数据
$result
=
(
new
\
base\Wechat
(
MyC
(
'common_app_mini_weixin_appid'
),
MyC
(
'common_app_mini_weixin_appsecret'
)))
->
DecryptData
(
$this
->
data_post
[
'encrypted_data'
],
$this
->
data_post
[
'iv'
],
$this
->
data_post
[
'openid'
]);
if
(
!
empty
(
$result
)
&&
is_array
(
$result
)
&&
!
empty
(
$result
[
'purePhoneNumber'
]))
{
$data
=
[
'openid'
=>
$this
->
data_post
[
'openid'
],
'mobile'
=>
$result
[
'purePhoneNumber'
],
'nickname'
=>
isset
(
$this
->
data_post
[
'nickname'
])
?
$this
->
data_post
[
'nickname'
]
:
''
,
'avatar'
=>
isset
(
$this
->
data_post
[
'avatar'
])
?
$this
->
data_post
[
'avatar'
]
:
''
,
'province'
=>
isset
(
$this
->
data_post
[
'province'
])
?
$this
->
data_post
[
'province'
]
:
''
,
'city'
=>
isset
(
$this
->
data_post
[
'city'
])
?
$this
->
data_post
[
'city'
]
:
''
,
'gender'
=>
isset
(
$this
->
data_post
[
'gender'
])
?
intval
(
$this
->
data_post
[
'gender'
])
:
''
,
'referrer'
=>
isset
(
$this
->
data_post
[
'referrer'
])
?
intval
(
$this
->
data_post
[
'referrer'
])
:
0
,
'is_onekey_mobile_bind'
=>
1
,
];
return
UserService
::
AuthUserProgram
(
$data
,
'weixin_openid'
);
}
else
{
return
DataReturn
(
$result
,
-
1
);
}
// 用户信息处理
$data
=
[
'openid'
=>
$this
->
data_post
[
'openid'
],
'mobile'
=>
$mobile
,
'nickname'
=>
isset
(
$this
->
data_post
[
'nickname'
])
?
$this
->
data_post
[
'nickname'
]
:
''
,
'avatar'
=>
isset
(
$this
->
data_post
[
'avatar'
])
?
$this
->
data_post
[
'avatar'
]
:
''
,
'province'
=>
isset
(
$this
->
data_post
[
'province'
])
?
$this
->
data_post
[
'province'
]
:
''
,
'city'
=>
isset
(
$this
->
data_post
[
'city'
])
?
$this
->
data_post
[
'city'
]
:
''
,
'gender'
=>
isset
(
$this
->
data_post
[
'gender'
])
?
intval
(
$this
->
data_post
[
'gender'
])
:
''
,
'referrer'
=>
isset
(
$this
->
data_post
[
'referrer'
])
?
intval
(
$this
->
data_post
[
'referrer'
])
:
0
,
'is_onekey_mobile_bind'
=>
1
,
];
return
UserService
::
AuthUserProgram
(
$data
,
APPLICATION_CLIENT_TYPE
.
'_openid'
);
}
}
?>
\ No newline at end of file
application/service/UserService.php
浏览文件 @
1cb11b05
...
...
@@ -2024,11 +2024,6 @@ class UserService
'key_name'
=>
'verify'
,
'error_msg'
=>
'验证码不能为空'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'app_type'
,
'error_msg'
=>
'终端用户类型不能为空'
,
],
];
$ret
=
ParamsChecked
(
$params
,
$p
);
if
(
$ret
!==
true
)
...
...
@@ -2061,24 +2056,20 @@ class UserService
}
// 用户信息
$accounts_field
=
$params
[
'app_type'
]
.
'_openid'
;
$accounts_field
=
APPLICATION_CLIENT_TYPE
.
'_openid'
;
if
(
empty
(
$params
[
$accounts_field
]))
{
return
DataReturn
(
'用户openid不能为空'
,
-
20
);
}
// 是否需要审核
$common_register_is_enable_audit
=
MyC
(
'common_register_is_enable_audit'
,
0
);
// 用户数据
$data
=
array
(
$accounts_field
=>
$params
[
$accounts_field
],
'mobile'
=>
$params
[
'mobile'
],
'status'
=>
(
$common_register_is_enable_audit
==
1
)
?
3
:
0
,
);
// 获取用户信息
$
temp
_user
=
Db
::
name
(
'User'
)
->
where
([
$
mobile
_user
=
Db
::
name
(
'User'
)
->
where
([
[
'mobile'
,
'='
,
$data
[
'mobile'
]],
[
'is_delete_time'
,
'='
,
0
],
])
->
find
();
...
...
@@ -2088,40 +2079,48 @@ class UserService
])
->
find
();
// 如果手机号码存在,并且openid也已存在,则更新掉之前的openid
if
(
!
empty
(
$
temp
_user
))
if
(
!
empty
(
$
mobile
_user
))
{
if
(
!
empty
(
$open_user
))
{
Db
::
name
(
'User'
)
->
where
([
'id'
=>
$open_user
[
'id'
]])
->
update
([
$accounts_field
=>
''
,
'upd_time'
=>
time
()]);
}
}
else
{
$temp_user
=
$open_user
;
$mobile_user
=
$open_user
;
}
// 如果用户不存在则新增用户状态字段
if
(
empty
(
$mobile_user
)
&&
empty
(
$open_user
))
{
// 是否需要审核
$common_register_is_enable_audit
=
MyC
(
'common_register_is_enable_audit'
,
0
);
$data
[
'status'
]
=
(
$common_register_is_enable_audit
==
1
)
?
3
:
0
;
}
// 额外信息
if
(
empty
(
$
temp
_user
[
'nickname'
])
&&
!
empty
(
$params
[
'nickname'
]))
if
(
empty
(
$
mobile
_user
[
'nickname'
])
&&
!
empty
(
$params
[
'nickname'
]))
{
$data
[
'nickname'
]
=
$params
[
'nickname'
];
}
if
(
empty
(
$
temp
_user
[
'avatar'
])
&&
!
empty
(
$params
[
'avatar'
]))
if
(
empty
(
$
mobile
_user
[
'avatar'
])
&&
!
empty
(
$params
[
'avatar'
]))
{
$data
[
'avatar'
]
=
$params
[
'avatar'
];
}
if
(
empty
(
$
temp
_user
[
'province'
])
&&
!
empty
(
$params
[
'province'
]))
if
(
empty
(
$
mobile
_user
[
'province'
])
&&
!
empty
(
$params
[
'province'
]))
{
$data
[
'province'
]
=
$params
[
'province'
];
}
if
(
empty
(
$
temp
_user
[
'city'
])
&&
!
empty
(
$params
[
'city'
]))
if
(
empty
(
$
mobile
_user
[
'city'
])
&&
!
empty
(
$params
[
'city'
]))
{
$data
[
'city'
]
=
$params
[
'city'
];
}
if
(
empty
(
$
temp
_user
)
&&
isset
(
$params
[
'gender'
]))
if
(
empty
(
$
mobile
_user
)
&&
isset
(
$params
[
'gender'
]))
{
$data
[
'gender'
]
=
intval
(
$params
[
'gender'
]);
}
// 不存在添加/则更新
if
(
empty
(
$
temp
_user
))
if
(
empty
(
$
mobile
_user
))
{
$user_ret
=
self
::
UserInsert
(
$data
,
$params
);
if
(
$user_ret
[
'code'
]
==
0
)
...
...
@@ -2135,7 +2134,7 @@ class UserService
$unionid
=
self
::
UserUnionidHandle
(
$params
);
if
(
!
empty
(
$unionid
[
'field'
])
&&
!
empty
(
$unionid
[
'value'
]))
{
if
(
empty
(
$
temp
_user
[
$unionid
[
'field'
]]))
if
(
empty
(
$
mobile
_user
[
$unionid
[
'field'
]]))
{
// unionid放入用户data中
$data
[
$unionid
[
'field'
]]
=
$unionid
[
'value'
];
...
...
@@ -2143,9 +2142,9 @@ class UserService
}
$data
[
'upd_time'
]
=
time
();
if
(
Db
::
name
(
'User'
)
->
where
([
'id'
=>
$
temp
_user
[
'id'
]])
->
update
(
$data
))
if
(
Db
::
name
(
'User'
)
->
where
([
'id'
=>
$
mobile
_user
[
'id'
]])
->
update
(
$data
))
{
$user_id
=
$
temp
_user
[
'id'
];
$user_id
=
$
mobile
_user
[
'id'
];
}
}
...
...
extend/base/Wechat.php
浏览文件 @
1cb11b05
...
...
@@ -59,52 +59,57 @@ class Wechat
$session_data
=
cache
(
$login_key
);
if
(
empty
(
$session_data
))
{
return
'session key不存在'
;
return
[
'status'
=>-
1
,
'msg'
=>
'session key不存在'
]
;
}
// iv长度
if
(
strlen
(
$iv
)
!=
24
)
{
return
'iv长度错误'
;
return
[
'status'
=>-
1
,
'msg'
=>
'iv长度错误'
]
;
}
// 加密函数
if
(
!
function_exists
(
'openssl_decrypt'
))
{
return
'openssl不支持'
;
return
[
'status'
=>-
1
,
'msg'
=>
'openssl不支持'
]
;
}
$result
=
openssl_decrypt
(
base64_decode
(
$encrypted_data
),
"AES-128-CBC"
,
base64_decode
(
$session_data
[
'session_key'
]),
1
,
base64_decode
(
$iv
));
$data
=
json_decode
(
$result
,
true
);
if
(
$data
==
NULL
)
{
return
'请重试!'
;
return
[
'status'
=>-
1
,
'msg'
=>
'请重试!'
]
;
}
if
(
$data
[
'watermark'
][
'appid'
]
!=
$this
->
_appid
)
{
return
'appid不匹配'
;
return
[
'status'
=>-
1
,
'msg'
=>
'appid不匹配'
]
;
}
// 缓存存储
$data_key
=
'wechat_user_info_'
.
$openid
;
cache
(
$data_key
,
$data
);
return
$data
;
return
[
'status'
=>
0
,
'data'
=>
$data
]
;
}
/**
*
[GetAuthSessionKey 根据授权code获取 session_key 和 openid]
*
用户授权
* @author Devil
* @blog
http://gong.gg/
* @version
1.0.0
* @date
time 2017-12-30T18:20:53+0800
* @
param [string] $authcode [用户授权码]
* @
return [string|boolean] [失败false, 成功返回appid|
]
* @blog http://gong.gg/
* @version 1.0.0
* @date
2018-11-06
* @
desc description
* @
param [array] $params [输入参数
]
*/
public
function
GetAuthSessionKey
(
$
authcode
)
public
function
GetAuthSessionKey
(
$
params
=
[]
)
{
if
(
empty
(
$params
[
'authcode'
]))
{
return
[
'status'
=>-
1
,
'msg'
=>
'授权码有误'
];
}
// 请求获取session_key
$url
=
'https://api.weixin.qq.com/sns/jscode2session?appid='
.
$this
->
_appid
.
'&secret='
.
$this
->
_appsecret
.
'&js_code='
.
$
authcode
.
'&grant_type=authorization_code'
;
$url
=
'https://api.weixin.qq.com/sns/jscode2session?appid='
.
$this
->
_appid
.
'&secret='
.
$this
->
_appsecret
.
'&js_code='
.
$
params
[
'authcode'
]
.
'&grant_type=authorization_code'
;
$result
=
$this
->
HttpRequestGet
(
$url
);
if
(
!
empty
(
$result
[
'openid'
]))
{
...
...
@@ -113,9 +118,9 @@ class Wechat
// 缓存存储
cache
(
$key
,
$result
);
return
$result
[
'openid'
];
return
[
'status'
=>
0
,
'msg'
=>
'授权成功'
,
'data'
=>
$result
[
'openid'
]
];
}
return
false
;
return
[
'status'
=>-
1
,
'msg'
=>
$result
[
'errmsg'
]]
;
}
/**
...
...
sourcecode/alipay/pages/login/login.js
浏览文件 @
1cb11b05
...
...
@@ -141,7 +141,6 @@ Page({
e
.
detail
.
value
[
'
province
'
]
=
this
.
data
.
user
.
province
;
e
.
detail
.
value
[
'
city
'
]
=
this
.
data
.
user
.
city
;
e
.
detail
.
value
[
'
gender
'
]
=
this
.
data
.
user
.
gender
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
alipay
'
;
e
.
detail
.
value
[
'
referrer
'
]
=
(
params
==
null
||
(
params
.
data
||
null
)
==
null
)
?
(
this
.
data
.
user
.
referrer
||
0
)
:
(
params
.
data
.
referrer
||
0
);
if
(
app
.
fields_check
(
e
.
detail
.
value
,
validation
))
{
...
...
sourcecode/baidu/app.js
浏览文件 @
1cb11b05
...
...
@@ -71,7 +71,7 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
request_url
:
'
http://shopxo.com/
'
,
//
request_url: 'https://dev.shopxo.net/',
request_url
:
'
https://dev.shopxo.net/
'
,
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
sourcecode/baidu/pages/login/login.js
浏览文件 @
1cb11b05
...
...
@@ -142,7 +142,6 @@ Page({
e
.
detail
.
value
[
'
province
'
]
=
this
.
data
.
user
.
province
;
e
.
detail
.
value
[
'
city
'
]
=
this
.
data
.
user
.
city
;
e
.
detail
.
value
[
'
gender
'
]
=
this
.
data
.
user
.
gender
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
baidu
'
;
e
.
detail
.
value
[
'
referrer
'
]
=
(
params
==
null
)
?
this
.
data
.
user
.
referrer
||
0
:
params
.
referrer
||
0
;
if
(
app
.
fields_check
(
e
.
detail
.
value
,
validation
))
{
swan
.
showLoading
({
title
:
'
处理中...
'
});
...
...
@@ -213,7 +212,7 @@ Page({
swan
.
showLoading
({
title
:
"
处理中...
"
});
var
self
=
this
;
swan
.
request
({
url
:
app
.
get_request_url
(
'
baidu
usermobilebind
'
,
'
user
'
),
url
:
app
.
get_request_url
(
'
onekey
usermobilebind
'
,
'
user
'
),
method
:
'
POST
'
,
data
:
data
,
dataType
:
'
json
'
,
...
...
sourcecode/qq/pages/login/login.js
浏览文件 @
1cb11b05
...
...
@@ -140,7 +140,6 @@ Page({
e
.
detail
.
value
[
'
city
'
]
=
this
.
data
.
user
.
city
;
e
.
detail
.
value
[
'
gender
'
]
=
this
.
data
.
user
.
gender
;
e
.
detail
.
value
[
'
qq_unionid
'
]
=
this
.
data
.
user
.
qq_unionid
||
''
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
qq
'
;
e
.
detail
.
value
[
'
referrer
'
]
=
(
params
==
null
)
?
(
this
.
data
.
user
.
referrer
||
0
)
:
(
params
.
referrer
||
0
);
if
(
app
.
fields_check
(
e
.
detail
.
value
,
validation
))
{
...
...
sourcecode/toutiao/pages/login/login.js
浏览文件 @
1cb11b05
...
...
@@ -171,7 +171,6 @@ Page({
e
.
detail
.
value
[
'
province
'
]
=
this
.
data
.
user
.
province
;
e
.
detail
.
value
[
'
city
'
]
=
this
.
data
.
user
.
city
;
e
.
detail
.
value
[
'
gender
'
]
=
this
.
data
.
user
.
gender
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
toutiao
'
;
e
.
detail
.
value
[
'
referrer
'
]
=
(
params
==
null
)
?
(
this
.
data
.
user
.
referrer
||
0
)
:
(
params
.
referrer
||
0
);
if
(
app
.
fields_check
(
e
.
detail
.
value
,
validation
))
{
...
...
sourcecode/weixin/app.js
浏览文件 @
1cb11b05
...
...
@@ -71,7 +71,7 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
request_url
:
'
http://shopxo.com/
'
,
//
request_url: 'https://dev.shopxo.net/',
request_url
:
'
https://dev.shopxo.net/
'
,
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
sourcecode/weixin/pages/login/login.js
浏览文件 @
1cb11b05
...
...
@@ -155,7 +155,6 @@ Page({
e
.
detail
.
value
[
'
city
'
]
=
this
.
data
.
user
.
city
;
e
.
detail
.
value
[
'
gender
'
]
=
this
.
data
.
user
.
gender
;
e
.
detail
.
value
[
'
weixin_unionid
'
]
=
this
.
data
.
user
.
weixin_unionid
||
''
;
e
.
detail
.
value
[
'
app_type
'
]
=
'
weixin
'
;
e
.
detail
.
value
[
'
referrer
'
]
=
(
params
==
null
)
?
(
this
.
data
.
user
.
referrer
||
0
)
:
(
params
.
referrer
||
0
);
if
(
app
.
fields_check
(
e
.
detail
.
value
,
validation
))
{
...
...
@@ -230,7 +229,7 @@ Page({
wx
.
showLoading
({
title
:
"
处理中...
"
});
var
self
=
this
;
wx
.
request
({
url
:
app
.
get_request_url
(
'
weixin
usermobilebind
'
,
'
user
'
),
url
:
app
.
get_request_url
(
'
onekey
usermobilebind
'
,
'
user
'
),
method
:
'
POST
'
,
data
:
data
,
dataType
:
'
json
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录