Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-report
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
4
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 38e51a95
authored
Feb 14, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
cea13555
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
src/store/modules/app.js
src/views/report/index.vue
src/store/modules/app.js
View file @
38e51a9
...
@@ -55,7 +55,6 @@ const actions = {
...
@@ -55,7 +55,6 @@ const actions = {
},
},
login
({
dispatch
})
{
login
({
dispatch
})
{
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
console
.
log
(
redirectUrl
)
// 以下是 本地调试
// 以下是 本地调试
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
if
(
process
.
env
.
NODE_ENV
==
'development'
)
{
const
code
=
getParams
(
'code'
)
const
code
=
getParams
(
'code'
)
...
@@ -122,19 +121,17 @@ const actions = {
...
@@ -122,19 +121,17 @@ const actions = {
window
.
location
.
href
=
`
${
wxUrl
}
?appid=
${
appid
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
window
.
location
.
href
=
`
${
wxUrl
}
?appid=
${
appid
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
}
}
}
else
{
}
else
{
let
{
reportType
}
=
getParams
()
util
.
setLocalStorage
(
'reportType'
,
{
reportType
})
const
storage_corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
const
storage_corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
const
reportType
=
util
.
getLocalStorage
(
'reportType'
)
const
{
baseURL
}
=
window
.
$fetchConfig
.
request
const
{
baseURL
}
=
window
.
$fetchConfig
.
request
let
url
=
`
${
baseURL
}
/dj-scrm-wx-work-main/#/`
let
url
=
`
${
baseURL
}
/dj-scrm-wx-work-main/#/`
console
.
log
(
'url'
,
url
)
window
.
location
.
href
=
`
${
url
}
?redirect_uri=
${
redirectUrl
}
&corpId=
${
storage_corpId
.
corpId
}
`
window
.
location
.
href
=
`
${
url
}
?redirect_uri=
${
redirectUrl
}
&corpId=
${
storage_corpId
.
corpId
}
&reportType=
${
reportType
.
reportType
}
`
}
}
},
},
navigation
({
dispatch
})
{
navigation
({
dispatch
})
{
let
{
sessionId
,
corpId
,
reportType
}
=
getParams
()
let
{
sessionId
,
corpId
,
reportType
}
=
getParams
()
console
.
log
(
'getParams()'
,
getParams
())
const
storage_corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
const
storage_corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
if
(
!
corpId
)
corpId
=
storage_corpId
&&
storage_corpId
.
corpId
if
(
!
corpId
)
corpId
=
storage_corpId
&&
storage_corpId
.
corpId
if
(
corpId
&&
storage_corpId
)
{
if
(
corpId
&&
storage_corpId
)
{
if
(
corpId
!=
storage_corpId
.
corpId
)
{
if
(
corpId
!=
storage_corpId
.
corpId
)
{
...
@@ -146,12 +143,10 @@ const actions = {
...
@@ -146,12 +143,10 @@ const actions = {
util
.
setLocalStorage
(
'dj_scrm_corpId'
,
{
corpId
})
util
.
setLocalStorage
(
'dj_scrm_corpId'
,
{
corpId
})
const
storage_sessionId
=
util
.
getSessionId
()
const
storage_sessionId
=
util
.
getSessionId
()
if
(
sessionId
||
storage_sessionId
)
{
if
(
sessionId
||
storage_sessionId
)
{
console
.
log
(
222222222
)
state
.
showWindow
=
true
state
.
showWindow
=
true
util
.
setSessionId
(
sessionId
||
storage_sessionId
)
util
.
setSessionId
(
sessionId
||
storage_sessionId
)
dispatch
(
'registerHttp'
,
sessionId
||
storage_sessionId
)
dispatch
(
'registerHttp'
,
sessionId
||
storage_sessionId
)
}
else
{
}
else
{
console
.
log
(
333333333
)
util
.
showLoading
()
util
.
showLoading
()
dispatch
(
'registerHttp'
)
dispatch
(
'registerHttp'
)
dispatch
(
'login'
)
dispatch
(
'login'
)
...
...
src/views/report/index.vue
View file @
38e51a9
...
@@ -51,8 +51,6 @@ export default {
...
@@ -51,8 +51,6 @@ export default {
this
.
getData
()
this
.
getData
()
},
},
created
()
{
created
()
{
console
.
log
(
'this.getQuery()'
,
this
.
getQuery
())
console
.
log
(
window
.
localStorage
.
getItem
(
'reportType'
))
let
reportType
=
this
.
getQuery
().
reportType
?
this
.
getQuery
().
reportType
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'reportType'
)).
reportType
let
reportType
=
this
.
getQuery
().
reportType
?
this
.
getQuery
().
reportType
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'reportType'
)).
reportType
// let reportType =1
// let reportType =1
if
(
reportType
==
0
)
{
if
(
reportType
==
0
)
{
...
...
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