Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
高东东-金蝶建发
/
jf-yzj-yunying-sheet
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
d2b4cb48
authored
Oct 26, 2023
by
golton_gao
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update: 代码优化
parent
d6541678
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
src/shared/api.js
src/shared/app.vue
src/shared/plugin.js
src/shared/api.js
View file @
d2b4cb48
...
@@ -5,12 +5,14 @@ export const SetToken = function (val) {
...
@@ -5,12 +5,14 @@ export const SetToken = function (val) {
if
(
env
==
'development'
)
{
if
(
env
==
'development'
)
{
val
.
$mas
.
token
=
testToken
val
.
$mas
.
token
=
testToken
val
.
$mas
.
uid
=
testUid
val
.
$mas
.
uid
=
testUid
return
Promise
.
resolve
()
}
else
{
}
else
{
val
.
$nativeApi
.
account
return
val
.
$nativeApi
.
account
.
getUser
()
.
getUser
()
.
then
(
data
=>
{
.
then
(
data
=>
{
val
.
$mas
.
token
=
data
.
ssoToken
val
.
$mas
.
token
=
data
.
ssoToken
val
.
$mas
.
uid
=
data
.
uid
val
.
$mas
.
uid
=
data
.
uid
return
null
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
console
.
log
(
error
)
console
.
log
(
error
)
...
...
src/shared/app.vue
View file @
d2b4cb48
...
@@ -45,8 +45,7 @@
...
@@ -45,8 +45,7 @@
import
CHeader
from
"./components/commom/c-header.vue"
;
import
CHeader
from
"./components/commom/c-header.vue"
;
import
{
SetToken
,
code
,
projectMapUrl
}
from
"./api.js"
;
import
{
SetToken
,
code
,
projectMapUrl
}
from
"./api.js"
;
import
factory
from
"../libraries/plugins/factory"
;
import
{
delCookie
}
from
"~lib/utils/common"
;
import
{
setCookie
,
delCookie
}
from
"~lib/utils/common"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -89,9 +88,9 @@ export default {
...
@@ -89,9 +88,9 @@ export default {
return
this
.
$store
.
state
.
shareStore
.
authObj
.
showReport
;
return
this
.
$store
.
state
.
shareStore
.
authObj
.
showReport
;
},
},
},
},
beforeCreate
()
{
async
beforeCreate
()
{
// 初始化 token
// 初始化 token
SetToken
(
this
);
await
SetToken
(
this
);
// 修改导航条颜色
// 修改导航条颜色
this
.
$nativeApi
.
system
.
statusBarColor
([
11
,
20
,
29
,
1
]);
this
.
$nativeApi
.
system
.
statusBarColor
([
11
,
20
,
29
,
1
]);
...
...
src/shared/plugin.js
View file @
d2b4cb48
...
@@ -40,14 +40,15 @@ Vue.use(nativeApi, Object.assign({
...
@@ -40,14 +40,15 @@ Vue.use(nativeApi, Object.assign({
maxRetryTimes
:
10
,
maxRetryTimes
:
10
,
retrySleepTime
:
100
retrySleepTime
:
100
}))
}))
// Vue.use(mas, {
const
baseUrl
=
// baseUrl: 'https://mxytest.cndrealty.com:4433',
process
.
env
.
PACK_ENV
===
'prod'
// code: 'cndvp-api
'
?
'https://jffcvp.cndrealty.com:4433
'
// })
:
'https://mxytest.cndrealty.com:4433'
Vue
.
use
(
mas
,
{
Vue
.
use
(
mas
,
{
baseUrl
:
'https://jffcvp.cndrealty.com:4433'
,
baseUrl
:
baseUrl
,
code
:
'cndvp-api'
code
:
'cndvp-api'
})
})
Vue
.
use
(
VIscroll
,
{
Vue
.
use
(
VIscroll
,
{
mouseWheel
:
true
,
mouseWheel
:
true
,
click
:
false
,
click
:
false
,
...
...
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