Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
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
4646ffc7
authored
Oct 12, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
a2b38e5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
app.js
pages/person/welfare/index.js
project.config.json
app.js
View file @
4646ffc7
...
...
@@ -10,14 +10,14 @@ import {
}
from
'./utils/api.js'
;
App
({
globalData
:
{
auth
:
wx
.
getStorageSync
(
'auth'
),
//是否授权
auth
:
wx
.
getStorageSync
(
'auth'
),
//是否授权
token
:
wx
.
getStorageSync
(
'access_token'
),
isIPX
:
false
,
//是否为iphone X
customerNum
:
"001"
,
//客服
customerName
:
"芯掌柜客服"
,
//客服名称
customerNum
:
"001"
,
//客服
customerName
:
"芯掌柜客服"
,
//客服名称
isRelogin
:
true
,
//登入环信失败后是否重新登入,只允许重新登入一次
bus
:
bus
,
//页面之间的监听
imBoolean
:
false
,
//是否是被异地登入的状态
bus
:
bus
,
//页面之间的监听
imBoolean
:
false
,
//是否是被异地登入的状态
},
getImUser
:
chat
.
getImUser
,
conn
:
chat
.
conn
,
...
...
@@ -42,14 +42,22 @@ App({
member
.
push
(
id
);
wx
.
setStorageSync
(
"member"
,
member
)
},
onLaunch
()
{
wx
.
removeStorageSync
(
'is_ShowModal'
)
//由于小程序的show切后台时会执行,导致异地登入弹窗会重复弹起,所以设置一个缓存进行转换
onLaunch
(
e
)
{
wx
.
removeStorageSync
(
'is_ShowModal'
)
//由于小程序的show切后台时会执行,导致异地登入弹窗会重复弹起,所以设置一个缓存进行转换
this
.
versionUpdate
();
//判断是从app拉起
if
(
e
.
query
.
token
)
{
return
false
;
}
//验证是否授权
if
(
this
.
globalData
.
auth
)
{
//是否登录
if
(
judgeToken
())
{
}
else
{
wx
.
reLaunch
({
url
:
'/pages/person/login/index'
...
...
@@ -65,7 +73,7 @@ App({
if
(
judgeToken
())
{
WebIM
.
conn
.
close
();
//断开im重新登入
WebIM
.
conn
.
close
();
//断开im重新登入
this
.
getImUser
();
}
...
...
pages/person/welfare/index.js
View file @
4646ffc7
...
...
@@ -23,14 +23,13 @@ Page({
onLoad
:
function
(
options
)
{
let
token
=
options
.
token
;
let
user_id
=
options
.
user_id
;
this
.
setData
({
token
:
token
,
user_id
:
user_id
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
...
...
project.config.json
View file @
4646ffc7
...
...
@@ -361,6 +361,13 @@
"pathName"
:
"pages/person/welfare/index"
,
"query"
:
"token= eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXV0aGFwaS5pY3NhbGVzLmNvbS92MS9nZXR3eFVzZXJJbmZvIiwiaWF0IjoxNTcwODQzMDU0LCJleHAiOjE1NzA4NTM4NTQsIm5iZiI6MTU3MDg0MzA1NCwianRpIjoiWXMwdVRTalhnTVF6OWVRTSIsInN1YiI6MjAsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.ClJB0cBhwPar5LK_2TczezcX27n4enis4n_JtFS4wLc"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/welfare/index"
,
"pathName"
:
"pages/person/welfare/index"
,
"query"
:
"user_id=123&token= eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vYXV0aGFwaS5pY3NhbGVzLmNvbS92MS9nZXR3eFVzZXJJbmZvIiwiaWF0IjoxNTcwODQzMDU0LCJleHAiOjE1NzA4NTM4NTQsIm5iZiI6MTU3MDg0MzA1NCwianRpIjoiWXMwdVRTalhnTVF6OWVRTSIsInN1YiI6MjAsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.ClJB0cBhwPar5LK_2TczezcX27n4enis4n_JtFS4wLc"
,
"scene"
:
null
}
]
}
...
...
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