Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0f39f6a6
authored
Aug 11, 2022
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
a5275ccf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
14 deletions
assets/css/font.css
pages/mine/auth.vue
pages/mine/login.vue
static/iconfont.ttf
assets/css/font.css
View file @
0f39f6a6
...
...
@@ -11,6 +11,10 @@
-moz-osx-font-smoothing
:
grayscale
;
}
.icon-weixin
:before
{
content
:
"\e600"
;
}
.icon-wuliu
:before
{
content
:
"\e75f"
;
}
...
...
pages/mine/auth.vue
View file @
0f39f6a6
...
...
@@ -3,7 +3,7 @@
<text
class=
"logo"
></text>
<text
class=
"title"
>
SCMWMS
</text>
<button
class=
"share row rowCenter verCenter"
@
tap=
"getUserProfileChange"
>
<text
class=
"iconfont icon-
jinggao1
"
></text>
<text
class=
"iconfont icon-
weixin
"
></text>
<text
class=
"t1"
>
微信授权登录
</text>
</button>
<view
class=
"copyright"
>
©2022深圳市猎芯供应链有限公司 ALL RIGHTS RESERVED
</view>
...
...
@@ -48,19 +48,24 @@ export default {
wx
.
getUserProfile
({
desc
:
'用于完善会员资料'
,
success
:
res
=>
{
self
.
request
(
API
.
getWechatInfo
,
'GET'
,
{
code
:
self
.
code
},
true
).
then
(
data
=>
{
console
.
log
(
data
);
if
(
data
.
err_code
===
0
)
{
uni
.
setStorageSync
(
'openid'
,
data
.
data
.
openid
);
uni
.
setStorageSync
(
'session_key'
,
data
.
data
.
session_key
);
uni
.
setStorageSync
(
'unionid'
,
data
.
data
.
unionid
);
uni
.
navigateTo
({
url
:
'/pages/mine/login'
});
self
.
request
(
API
.
getWechatInfo
,
'GET'
,
{
code
:
self
.
code
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
data
.
token
==
''
)
{
uni
.
setStorageSync
(
'openid'
,
res
.
data
.
wechat_info
.
openid
);
uni
.
setStorageSync
(
'session_key'
,
res
.
data
.
wechat_info
.
session_key
);
uni
.
setStorageSync
(
'unionid'
,
res
.
data
.
wechat_info
.
unionid
);
uni
.
navigateTo
({
url
:
'/pages/mine/login'
});
}
else
{
uni
.
setStorageSync
(
'token'
,
res
.
data
.
token
);
uni
.
navigateBack
({
delta
:
2
});
}
}
else
{
uni
.
showToast
({
title
:
data
.
err_msg
,
title
:
res
.
err_msg
,
icon
:
'none'
,
duration
:
2000
});
...
...
pages/mine/login.vue
View file @
0f39f6a6
...
...
@@ -51,12 +51,13 @@ export default {
});
return
false
;
}
let
unionid
=
uni
.
getStorageSync
(
'unionid'
);
this
.
request
(
API
.
login
,
'POST'
,
{
account
:
this
.
account
,
passwd
:
this
.
passwd
},
true
).
then
(
res
=>
{
this
.
request
(
API
.
login
,
'POST'
,
{
account
:
this
.
account
,
passwd
:
this
.
passwd
,
unionid
:
unionid
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
setStorageSync
(
'token'
,
res
.
data
.
token
);
uni
.
navigateBack
({
delta
:
2
delta
:
3
});
}
else
{
uni
.
showToast
({
...
...
static/iconfont.ttf
View file @
0f39f6a6
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment