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 @@
...
@@ -2,7 +2,7 @@
<view
class=
"home-index"
>
<view
class=
"home-index"
>
<view
class=
"head"
>
<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"
>
<view
class=
"row verCenter"
>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"iconfont icon-juxing"
></text>
<text
class=
"t1"
>
未登录
</text>
<text
class=
"t1"
>
未登录
</text>
...
...
pages/mine/auth.vue
View file @
eb26f476
...
@@ -26,22 +26,42 @@ export default {
...
@@ -26,22 +26,42 @@ export default {
methods
:
{
methods
:
{
getCode
()
{
getCode
()
{
var
self
=
this
;
var
self
=
this
;
uni
.
login
({
const
sinfo
=
uni
.
getSystemInfoSync
();
scopes
:
'auth_user'
,
if
(
sinfo
.
environment
==
'wxwork'
)
{
success
:
function
(
res
)
{
//企业微信端
if
(
res
.
code
)
{
wx
.
qy
.
login
({
self
.
code
=
res
.
code
;
scopes
:
'auth_user'
,
console
.
log
(
res
.
code
);
success
:
function
(
res
)
{
if
(
res
.
code
)
{
self
.
code
=
res
.
code
;
}
},
fail
:
function
(
res
)
{
uni
.
showToast
({
title
:
'授权失败'
,
icon
:
'none'
,
duration
:
2000
});
}
}
},
});
fail
:
function
(
res
)
{
}
else
{
uni
.
showToast
({
//微信端逻辑处理
title
:
'授权失败'
,
uni
.
login
({
icon
:
'none'
,
scopes
:
'auth_user'
,
duration
:
2000
success
:
function
(
res
)
{
});
if
(
res
.
code
)
{
}
self
.
code
=
res
.
code
;
});
}
},
fail
:
function
(
res
)
{
uni
.
showToast
({
title
:
'授权失败'
,
icon
:
'none'
,
duration
:
2000
});
}
});
}
},
},
getUserProfileChange
()
{
getUserProfileChange
()
{
let
self
=
this
;
let
self
=
this
;
...
...
pages/mine/index.vue
View file @
eb26f476
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
},
},
toUrl
()
{
toUrl
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/mine/
login
'
url
:
'/pages/mine/
auth
'
});
});
},
},
exit
()
{
exit
()
{
...
...
util/api.js
View file @
eb26f476
//
const API_BASE = 'https://api.ichunt.com';
const
API_BASE
=
'https://api.ichunt.com'
;
const
API_BASE
=
'http://api.liexin.com'
;
//
const API_BASE = 'http://api.liexin.com';
const
API
=
{
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