Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-main
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f5fcf8db
authored
Jun 29, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
cf05e3c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
src/config/env.development.js
src/store/modules/app.js
src/config/env.development.js
View file @
f5fcf8d
...
...
@@ -11,7 +11,7 @@ module.exports = {
envVersion
:
'trial'
,
title
:
'嘀加企微管家'
,
request
:
{
baseURL
:
'http://scrm.
dev
.glsx.com.cn'
,
// 本地测试项目地址,
baseURL
:
'http://scrm.
test
.glsx.com.cn'
,
// 本地测试项目地址,
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
src/store/modules/app.js
View file @
f5fcf8d
...
...
@@ -121,11 +121,13 @@ const actions = {
}
else
{
util
.
showLoading
()
let
appid
=
getParams
(
'corpId'
)
//从链接获取
let
agentid
=
getParams
(
'agentid'
)
//从链接获取
let
dj_scrm
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
const
IS_PROD
=
[
'production'
,
'prod'
].
includes
(
process
.
env
.
NODE_ENV
)
if
(
!
appid
)
{
if
(
dj_scrm
)
{
appid
=
dj_scrm
.
corpId
agentid
=
dj_scrm
.
agentid
}
else
{
if
(
IS_PROD
)
{
Notify
({
...
...
@@ -133,12 +135,18 @@ const actions = {
duration
:
15000
})
return
}
else
appid
=
'ww7ee69c648ae1b7e6'
}
else
{
appid
=
'ww7ee69c648ae1b7e6'
agentid
=
1000003
}
}
}
util
.
setLocalStorage
(
'dj_scrm_corpId'
,
{
corpId
:
appid
})
const
wxUrl
=
'https://open.weixin.qq.com/connect/oauth2/authorize'
window
.
location
.
href
=
`
${
wxUrl
}
?appid=
${
appid
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
util
.
setLocalStorage
(
'dj_scrm_corpId'
,
{
corpId
:
appid
,
agentid
})
let
wxUrl
=
'https://open.weixin.qq.com/connect/oauth2/authorize'
wxUrl
=
`
${
wxUrl
}
?appid=
${
appid
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_privateinfo&state=STATE`
if
(
agentid
)
wxUrl
=
`
${
wxUrl
}
&agentid=
${
agentid
}
`
console
.
log
(
`
${
wxUrl
}
#wechat_redirect`
)
window
.
location
.
href
=
`
${
wxUrl
}
#wechat_redirect`
}
},
navigation
({
dispatch
},
to
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment