Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
2658e874
Commit
2658e874
authored
Dec 13, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改企业微信判断位置
parent
32c46fc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
app.js
src/app.js
+9
-5
No files found.
src/app.js
View file @
2658e874
...
@@ -12,10 +12,12 @@ let isPlusVip = false
...
@@ -12,10 +12,12 @@ let isPlusVip = false
App
({
App
({
onLaunch
:
function
(
e
)
{
onLaunch
:
function
(
e
)
{
console
.
log
(
'onLaunch---'
,
e
);
// "navigationStyle": "custom"
// "navigationStyle": "custom"
// 默认 false
// 默认 false
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
try
{
try
{
this
.
isFromQiyeConsoleIn
(
e
);
this
.
checkForUpdate
();
this
.
checkForUpdate
();
let
res
=
wx
.
getSystemInfoSync
();
// 获取当前运行环境
let
res
=
wx
.
getSystemInfoSync
();
// 获取当前运行环境
config
.
pixelRate
=
res
.
windowWidth
/
750
;
config
.
pixelRate
=
res
.
windowWidth
/
750
;
...
@@ -65,19 +67,21 @@ App({
...
@@ -65,19 +67,21 @@ App({
// 新版本下载失败
// 新版本下载失败
})
})
},
},
//判断是不是从企业微信控制台点击进来的
onShow
:
function
(
options
=
{})
{
isFromQiyeConsoleIn
(
options
)
{
console
.
log
(
'场景值1 ========'
,
options
.
scene
)
console
.
log
(
'场景值1 ========'
,
options
.
scene
)
let
scene
=
wx
.
getLaunchOptionsSync
().
scene
;
let
scene
=
wx
.
getLaunchOptionsSync
().
scene
;
console
.
log
(
'场景值2 ========'
,
scene
)
console
.
log
(
'场景值2 ========'
,
scene
)
//判断是不是在企业微信中通过工作台打开的
//判断是不是在企业微信中通过工作台打开的
if
(
options
.
scene
==
1119
||
scene
==
1119
){
if
(
options
.
scene
==
1119
||
scene
==
1119
)
{
wx
.
redirectTo
({
wx
.
redirectTo
({
url
:
'/shoppingGuid/page/pages/welcomGuider/welcomGuider'
,
url
:
'/shoppingGuid/page/pages/welcomGuider/welcomGuider'
,
});
});
return
;
return
;
}
}
},
onShow
:
function
(
options
=
{})
{
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前会员是否是体验者
// 获取当前会员是否是体验者
const
{
member
}
=
baseUserInfo
const
{
member
}
=
baseUserInfo
...
...
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