Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-webapp-cli
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
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
heasy
hls-webapp-cli
Commits
cc3652f3
Commit
cc3652f3
authored
Apr 22, 2021
by
nature
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vw替换rem
parent
e24861d0
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
132 additions
and
705 deletions
+132
-705
dev.env.js
template/config/dev.env.js
+0
-4
prod.env.js
template/config/prod.env.js
+0
-4
uat.env.js
template/config/uat.env.js
+0
-4
index.html
template/index.html
+1
-0
package.json
template/package.json
+2
-0
App.vue
template/src/App.vue
+5
-0
main.js
template/src/main.js
+3
-10
hlsHttp.js
template/src/scripts/hlsHttp.js
+5
-2
hlsUtil.js
template/src/scripts/hlsUtil.js
+2
-681
index.js
template/src/store/index.js
+114
-0
No files found.
template/config/dev.env.js
View file @
cc3652f3
...
...
@@ -7,11 +7,7 @@ module.exports = merge(prodEnv, {
CONFIG_ENV
:
JSON
.
stringify
(
process
.
env
.
CONFIG_ENV
),
debug
:
true
,
isMobilePlatform
:
false
,
hmapUrl
:
'"http://hippius.hand-china.com/hmap220"'
,
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"'
,
currentVersion
:
'"1.0.0"'
});
template/config/prod.env.js
View file @
cc3652f3
...
...
@@ -4,11 +4,7 @@ module.exports = {
CONFIG_ENV
:
JSON
.
stringify
(
process
.
env
.
CONFIG_ENV
),
debug
:
false
,
isMobilePlatform
:
true
,
hmapUrl
:
'"http://hippius.hand-china.com/hmap220"'
,
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"'
,
currentVersion
:
'"1.0.0"'
}
template/config/uat.env.js
View file @
cc3652f3
...
...
@@ -4,11 +4,7 @@ module.exports = {
CONFIG_ENV
:
JSON
.
stringify
(
process
.
env
.
CONFIG_ENV
),
debug
:
true
,
isMobilePlatform
:
true
,
hmapUrl
:
'"http://hippius.hand-china.com/hmap220"'
,
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"'
,
currentVersion
:
'"1.0.0"'
}
template/index.html
View file @
cc3652f3
...
...
@@ -9,6 +9,7 @@
<!-- safari私有meta标签 允许全屏模式浏览 指定safari顶部状态栏样式(黑色) -->
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
>
<script
type=
"text/javascript"
src=
"./static/prototype.js"
></script>
<title>
车租易
</title>
</head>
<body>
...
...
template/package.json
View file @
cc3652f3
...
...
@@ -17,6 +17,8 @@
"vue"
:
"^2.5.2"
,
"vue-router"
:
"^3.0.1"
,
"vux"
:
"^2.9.2"
,
"axios"
:
"^0.21.1"
,
"vuex"
:
"^3.6.2"
,
"hls-easy-ui"
:
"https://hel.hand-china.com/easyUI/hls-easy-ui.git"
},
"devDependencies"
:
{
...
...
template/src/App.vue
View file @
cc3652f3
...
...
@@ -12,6 +12,7 @@
</
template
>
<
script
>
import
{
mapActions
}
from
'vuex'
export
default
{
data
()
{
return
{
...
...
@@ -39,8 +40,12 @@
},
},
mounted
()
{
this
.
getUserInfo
()
},
methods
:
{
...
mapActions
([
'getUserInfo'
,
]),
onSwipeLeft
()
{
this
.
$router
.
go
(
-
1
)
},
...
...
template/src/main.js
View file @
cc3652f3
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import
Vue
from
'vue'
// import FastClick from 'fastclick'
import
App
from
'./App'
import
router
from
'./router/index'
// import flexible from './common/ydui.flexible'
import
{
componentInstall
,
hlsPopup
,
directives
,
filter
,
prototype
}
from
'hls-easy-ui'
import
{
componentInstall
,
hlsPopup
,
directives
,
filter
}
from
'hls-easy-ui'
import
store
from
'./store'
/**
* http
*/
...
...
@@ -31,10 +29,8 @@ Vue.use(filter)
*/
Vue
.
use
(
componentInstall
)
Vue
.
use
(
prototype
)
Vue
.
prototype
.
hlsPopup
=
window
.
hlsPopup
=
hlsPopup
Vue
.
prototype
.
$devicePixelRatio
=
2
let
hlsHttp
=
{
get
:
get
,
...
...
@@ -77,10 +73,6 @@ let hlsExit = function () {
}
Vue
.
prototype
.
$hlsExit
=
hlsExit
// FastClick.attach(document.body)
Vue
.
config
.
productionTip
=
true
/* eslint-disable no-new */
new
Vue
({
data
()
{
...
...
@@ -90,6 +82,7 @@ new Vue({
}
},
router
,
store
,
watch
:
{
// 监听路由变化
$route
(
to
,
from
)
{
document
.
body
.
scrollTop
=
0
...
...
template/src/scripts/hlsHttp.js
View file @
cc3652f3
...
...
@@ -2,6 +2,7 @@
import
axios
from
'axios'
import
{
hlsPopup
}
from
'hls-easy-ui'
import
router
from
'../router/index'
import
qs
from
'qs'
let
promiseArr
=
{}
let
cancel
=
{}
const
CancelToken
=
axios
.
CancelToken
...
...
@@ -99,9 +100,11 @@ axios.interceptors.response.use(response => {
})
axios
.
defaults
.
baseURL
=
''
axios
.
defaults
.
timeout
=
100000
axios
.
defaults
.
paramsSerializer
=
(
params
)
=>
{
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'repeat'
})
}
// get请求
export
function
get
(
url
)
{
let
param
=
{}
export
function
get
(
url
,
param
=
{})
{
let
headers
=
{}
if
(
window
.
localStorage
.
access_token
)
{
headers
=
{
...
...
template/src/scripts/hlsUtil.js
View file @
cc3652f3
This diff is collapsed.
Click to expand it.
template/src/store/index.js
0 → 100644
View file @
cc3652f3
import
Vue
from
'vue'
import
Vuex
from
'vuex'
Vue
.
use
(
Vuex
)
const
store
=
new
Vuex
.
Store
({
state
:
{
userInfo
:
''
,
accessToken
:
''
,
userId
:
''
,
loginAccount
:
''
,
employeeId
:
''
,
employeeName
:
''
,
employeeNum
:
''
,
tenantId
:
''
,
tenantName
:
''
,
},
getters
:
{
getUserInfo
:
state
=>
{
return
state
.
userInfo
},
getToken
:
state
=>
{
return
state
.
accessToken
},
getUserId
:
state
=>
{
return
state
.
userId
},
getLoginAccount
:
state
=>
{
return
state
.
loginAccount
},
getEmployeeId
:
state
=>
{
return
state
.
employeeId
},
getEmployeeName
:
state
=>
{
return
state
.
employeeName
},
getEmployeeNum
:
state
=>
{
return
state
.
employeeNum
},
getTenantId
:
state
=>
{
return
state
.
tenantId
},
getTenantName
:
state
=>
{
return
state
.
tenantName
},
},
mutations
:
{
setUserInfo
:
(
state
,
userInfo
)
=>
{
state
.
userInfo
=
userInfo
this
.
commit
(
'setToken'
,
userInfo
.
token
)
this
.
commit
(
'setUserId'
,
userInfo
.
userId
)
this
.
commit
(
'setLoginAccount'
,
userInfo
.
loginAccount
)
this
.
commit
(
'setEmployeeId'
,
userInfo
.
employeeId
)
this
.
commit
(
'setEmployeeName'
,
userInfo
.
employeeName
)
this
.
commit
(
'setEmployeeNum'
,
userInfo
.
employeeNum
)
this
.
commit
(
'setTenantId'
,
userInfo
.
tenantId
)
this
.
commit
(
'setTenantName'
,
userInfo
.
tenantName
)
},
setToken
:
(
state
,
token
)
=>
{
localStorage
.
setItem
(
'access_token'
,
token
)
state
.
accessToken
=
token
},
setUserId
:
(
state
,
userId
)
=>
{
state
.
userId
=
userId
},
setLoginAccount
:
(
state
,
loginAccount
)
=>
{
state
.
loginAccount
=
loginAccount
},
setEmployeeId
:
(
state
,
employeeId
)
=>
{
state
.
roles
=
employeeId
},
setEmployeeName
:
(
state
,
employeeName
)
=>
{
state
.
employeeName
=
employeeName
},
setEmployeeNum
:
(
state
,
employeeNum
)
=>
{
state
.
employeeNum
=
employeeNum
},
setTenantId
:
(
state
,
tenantId
)
=>
{
localStorage
.
setItem
(
'tenantId'
,
tenantId
)
state
.
tenantId
=
tenantId
},
setTenantName
:
(
state
,
tenantName
)
=>
{
state
.
tenantName
=
tenantName
},
},
actions
:
{
// 登录
getUserInfo
({
commit
})
{
window
.
onSuccess
=
function
(
message
)
{
let
userInfo
=
JSON
.
parse
(
message
)
commit
(
'setUserInfo'
,
userInfo
)
}
window
.
onError
=
function
(
message
)
{
var
argument
=
{
className
:
'BaseBridge'
,
function
:
'closeWebView'
,
successCallBack
:
'closeSuccess'
,
failCallBack
:
'closeError'
,
}
HandBridge
.
postMessage
(
JSON
.
stringify
(
argument
))
}
let
params
=
{
className
:
'BaseBridge'
,
function
:
'getBaseInfo'
,
successCallBack
:
'onSuccess'
,
failCallBack
:
'onError'
,
}
HandBridge
.
postMessage
(
JSON
.
stringify
(
params
))
},
},
})
export
default
store
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