Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
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
xugong
hls-xcmg-vue-app
Commits
6f850c0e
Commit
6f850c0e
authored
Nov 19, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'版本更新'
parent
45c25f93
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
10 deletions
+76
-10
dev.env.js
config/dev.env.js
+2
-3
prod.env.js
config/prod.env.js
+1
-2
uat.env.js
config/uat.env.js
+2
-3
login.vue
src/pages/login.vue
+71
-2
No files found.
config/dev.env.js
View file @
6f850c0e
...
...
@@ -12,7 +12,6 @@ module.exports = merge(prodEnv, {
rootPath
:
'"http://180.104.121.66:8088/r/api"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"'
,
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
file_url
:
'"http://hlsapp.hand-china.com/file/"'
,
appId
:
'"com.hls.easy.car"'
,
currentVersion
:
'"0.0.1"'
appId
:
'"com.xcmg.app"'
,
currentVersion
:
'"1.0.1"'
});
config/prod.env.js
View file @
6f850c0e
...
...
@@ -8,7 +8,6 @@ module.exports = {
loginPath
:
'"http://hlsapp.hand-china.com/core/oauth/token?client_id=hQGCtxTItRa34PUOgxaD0r7oSPeuEaIB&client_secret=7ee8338c-4a06-44a1-87cc-afa63f8e1bc3&grant_type=password&username=app&password=" '
,
basePath
:
'"http://hlsapp.hand-china.com/core/r/api?sysName=HLS_APP&apiName="'
,
rootPath
:
'"http://hlsapp.hand-china.com/core/r/api"'
,
file_url
:
'"http://hlsapp.hand-china.com/file/"'
,
appId
:
'"com.hls.easy.car"'
,
appId
:
'"com.xcmg.app"'
,
currentVersion
:
'"1.0.0"'
}
config/uat.env.js
View file @
6f850c0e
...
...
@@ -9,7 +9,6 @@ module.exports = {
rootPath
:
'"http://180.104.121.66:8088/r/api"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"'
,
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
file_url
:
'"http://hlsapp.hand-china.com/file/"'
,
appId
:
'"com.hls.easy.car"'
,
currentVersion
:
'"0.0.1"'
appId
:
'"com.xcmg.app"'
,
currentVersion
:
'"1.0.1"'
}
src/pages/login.vue
View file @
6f850c0e
...
...
@@ -26,7 +26,7 @@
<div
class=
"button submit"
@
click=
"access"
>
登录
</div>
</div>
</h-content>
<!--
<div
style=
"width: 100%;height: 100%;background-color: #007aff;display: flex;justify-content: center;align-items: center;"
>
<!--
<div
style=
"width: 100%;height: 100%;background-color: #007aff;display: flex;justify-content: center;align-items: center;"
>
<p
style=
"font-weight: 700;font-size: 36px"
>
登录
</p>
</div>
-->
</
template
>
...
...
@@ -42,7 +42,7 @@ export default {
?
window
.
localStorage
.
username
:
''
,
password
:
''
,
v
ersion
:
process
.
env
.
currentVersion
,
currentV
ersion
:
process
.
env
.
currentVersion
,
routeName
:
this
.
$route
.
params
.
routeName
||
''
,
}
},
...
...
@@ -50,6 +50,7 @@ export default {
window
.
addEventListener
(
'native.keyboardhide'
,
function
()
{
document
.
activeElement
.
blur
()
})
this
.
updateVersion
()
// 版本更新
},
methods
:
{
changeType
()
{
...
...
@@ -119,6 +120,74 @@ export default {
clearPassword
:
function
()
{
this
.
password
=
''
},
// 版本更新
updateVersion
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'version_update'
let
param
=
{}
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
if
(
res
.
result
===
'S'
)
{
// 版本更新
var
updateUrl
=
''
var
content
=
''
if
(
vum
.
Platform
.
isAndroid
())
{
if
(
res
.
android_version_list
.
length
)
{
if
(
res
.
android_version_list
[
0
].
app_version
!==
vm
.
currentVersion
)
{
updateUrl
=
res
.
android_version_list
[
0
].
version_url
content
=
res
.
android_version_list
[
0
].
update_content
if
(
res
.
android_version_list
[
0
].
big_version
===
'Y'
)
{
vm
.
open_new_win
(
content
,
updateUrl
)
}
else
{
vm
.
hote_update_version
(
content
,
updateUrl
)
}
}
else
{
}
}
}
else
if
(
vum
.
Platform
.
isIOS
())
{
if
(
res
.
ios_version_list
.
length
)
{
if
(
res
.
ios_version_list
[
0
].
app_version
!==
vm
.
currentVersion
)
{
updateUrl
=
res
.
ios_version_list
[
0
].
version_url
content
=
res
.
ios_version_list
[
0
].
update_content
if
(
res
.
ios_version_list
[
0
].
big_version
===
'Y'
)
{
vm
.
open_new_win
(
content
,
updateUrl
)
}
else
{
vm
.
hote_update_version
(
content
,
updateUrl
)
}
}
else
{
}
}
}
}
})
},
open_new_win
(
content
,
url
)
{
if
(
url
)
{
hlsPopup
.
showConfirm
({
title
:
'版本更新'
,
content
:
content
,
onConfirm
:
function
(
index
)
{
if
(
index
===
1
)
{
cordova
.
InAppBrowser
.
open
(
url
,
'_system'
,
'location=yes'
)
}
else
{
}
},
})
}
},
hote_update_version
(
content
,
url
)
{
hlsPopup
.
showConfirm
({
title
:
'版本更新'
,
content
:
content
,
onConfirm
:
function
(
index
)
{
if
(
index
===
1
)
{
hotpatch
.
updateNewVersion
(
url
)
}
},
})
},
},
}
</
script
>
...
...
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