Commit cc3652f3 authored by nature's avatar nature

vw替换rem

parent e24861d0
......@@ -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"'
});
......@@ -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"'
}
......@@ -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"'
}
......@@ -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>
......
......@@ -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": {
......
......@@ -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)
},
......
// 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
......
......@@ -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 = {
......
This diff is collapsed.
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment