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
eb26f476
authored
Aug 11, 2022
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
0f39f6a6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
19 deletions
pages/home/index.vue
pages/mine/auth.vue
pages/mine/index.vue
util/api.js
pages/home/index.vue
View file @
eb26f476
...
...
@@ -2,7 +2,7 @@
<view
class=
"home-index"
>
<view
class=
"head"
>
<!-- 未登录 -->
<navigator
class=
"row verCenter box"
v-if=
"!is_login"
url=
"/pages/mine/
login
"
hover-class=
"none"
>
<navigator
class=
"row verCenter box"
v-if=
"!is_login"
url=
"/pages/mine/
auth
"
hover-class=
"none"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"t1"
>
未登录
</text>
...
...
pages/mine/auth.vue
View file @
eb26f476
...
...
@@ -26,22 +26,42 @@ export default {
methods
:
{
getCode
()
{
var
self
=
this
;
uni
.
login
({
scopes
:
'auth_user'
,
success
:
function
(
res
)
{
if
(
res
.
code
)
{
self
.
code
=
res
.
code
;
console
.
log
(
res
.
code
);
const
sinfo
=
uni
.
getSystemInfoSync
();
if
(
sinfo
.
environment
==
'wxwork'
)
{
//企业微信端
wx
.
qy
.
login
({
scopes
:
'auth_user'
,
success
:
function
(
res
)
{
if
(
res
.
code
)
{
self
.
code
=
res
.
code
;
}
},
fail
:
function
(
res
)
{
uni
.
showToast
({
title
:
'授权失败'
,
icon
:
'none'
,
duration
:
2000
});
}
},
fail
:
function
(
res
)
{
uni
.
showToast
({
title
:
'授权失败'
,
icon
:
'none'
,
duration
:
2000
});
}
});
});
}
else
{
//微信端逻辑处理
uni
.
login
({
scopes
:
'auth_user'
,
success
:
function
(
res
)
{
if
(
res
.
code
)
{
self
.
code
=
res
.
code
;
}
},
fail
:
function
(
res
)
{
uni
.
showToast
({
title
:
'授权失败'
,
icon
:
'none'
,
duration
:
2000
});
}
});
}
},
getUserProfileChange
()
{
let
self
=
this
;
...
...
pages/mine/index.vue
View file @
eb26f476
...
...
@@ -49,7 +49,7 @@ export default {
},
toUrl
()
{
uni
.
navigateTo
({
url
:
'/pages/mine/
login
'
url
:
'/pages/mine/
auth
'
});
},
exit
()
{
...
...
util/api.js
View file @
eb26f476
//
const API_BASE = 'https://api.ichunt.com';
const
API_BASE
=
'http://api.liexin.com'
;
const
API_BASE
=
'https://api.ichunt.com'
;
//
const API_BASE = 'http://api.liexin.com';
const
API
=
{
/**
* 上传数据
...
...
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