Commit b74ca67e authored by linxin's avatar linxin

add

parents 557f9fd5 7c987057
Pipeline #4656 canceled with stages
...@@ -13,5 +13,5 @@ module.exports = merge(prodEnv, { ...@@ -13,5 +13,5 @@ module.exports = merge(prodEnv, {
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"', 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"', ocrPath: '"http://180.104.121.66:8088/r/api"',
appId: '"com.xcmg.app.dev"', appId: '"com.xcmg.app.dev"',
currentVersion: '"1.6.1"', currentVersion: '"1.6.3"',
}) })
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</div> </div>
</h-content> </h-content>
<bottom-tab class="add-box"> <bottom-tab class="add-box">
<tab-button v-if="!isReadOnly" class="before" @click.native="handSave">同步电子签</tab-button> <tab-button v-if="!isReadOnly" class="before" @click.native="handSave">保存</tab-button>
<tab-button v-if="!isReadOnly" class="next" @click.native="isSubmit">提交</tab-button> <tab-button v-if="!isReadOnly" class="next" @click.native="isSubmit">提交</tab-button>
<tab-button v-if="isReadOnly" class="before" @click.native="$routeGo()">上一步</tab-button> <tab-button v-if="isReadOnly" class="before" @click.native="$routeGo()">上一步</tab-button>
</bottom-tab> </bottom-tab>
...@@ -512,21 +512,21 @@ export default { ...@@ -512,21 +512,21 @@ export default {
}, },
// 同步电子签 // 同步电子签
handSave () { handSave () {
// hlsPopup.showLongCenter('保存成功!') hlsPopup.showLongCenter('保存成功!')
let vm = this // let vm = this
let url = process.env.basePath + 'syn_content_app' // let url = process.env.basePath + 'syn_content_app'
let param = { // let param = {
project_id: window.localStorage.project_id, // project_id: window.localStorage.project_id,
} // }
vm.hlsPopup.showLoading('请稍候') // vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) { // vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res.result === 'S') { // if (res.result === 'S') {
vm.hlsPopup.showSuccess('同步成功') // vm.hlsPopup.showSuccess('同步成功')
} else { // } else {
vm.hlsPopup.showLongCenter(res.message) // vm.hlsPopup.showLongCenter(res.message)
} // }
}) // })
}, },
isSubmit () { isSubmit () {
let vm = this let vm = this
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
</div> </div>
</h-content> </h-content>
<bottom-tab v-if="!flag"> <bottom-tab v-if="!flag">
<tab-button class="save" @click.native="handSave">同步电子签</tab-button> <!-- <tab-button class="save" @click.native="handSave">同步电子签</tab-button> -->
<tab-button class="approve" @click.native="checkStatus">发车申请</tab-button> <tab-button class="approve" @click.native="checkStatus">发车申请</tab-button>
</bottom-tab> </bottom-tab>
<div class="bottom-pop"> <div class="bottom-pop">
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
if (from.name !== 'PrivacyPolicy') { if (from.name !== 'PrivacyPolicy') {
vm.getAccessToken() // vm.getAccessToken()
} }
if (!window.localStorage.getItem('isReadPolicy')) { if (!window.localStorage.getItem('isReadPolicy')) {
setTimeout(() => { setTimeout(() => {
...@@ -124,28 +124,33 @@ export default { ...@@ -124,28 +124,33 @@ export default {
// 极光推送 // 极光推送
}) })
}, },
getAccessToken () { async getAccessToken () {
let vm = this let vm = this
let url = process.env.loginPath + 'appadmin' let url = process.env.loginPath + 'appadmin'
let param = {} let param = {}
// vm.hlsPopup.showLoading('请稍等') // vm.hlsPopup.showLoading('请稍等')
vm.$post(url, param).then(function (res) { let res = await vm.$post(url, param)
// vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res) {
window.localStorage.setItem('access_token', res.access_token) window.localStorage.setItem('access_token', res.access_token)
vm.updateVersion() // 版本更新 vm.updateVersion() // 版本更新
}) return true
}
}, },
access: function () { async access () {
document.getElementById('passwordInput').blur() document.getElementById('passwordInput').blur()
document.activeElement.blur() document.activeElement.blur()
let flag = await this.getAccessToken()
let vm = this let vm = this
if (!vm.username || vm.username === undefined) { if (flag) {
vm.hlsPopup.showLongCenter('请输入用户名') if (!vm.username || vm.username === undefined) {
} else if (!vm.password || vm.password === undefined) { vm.hlsPopup.showLongCenter('请输入用户名')
vm.hlsPopup.showLongCenter('请输入密码') } else if (!vm.password || vm.password === undefined) {
} else { vm.hlsPopup.showLongCenter('请输入密码')
hlsPopup.showLoading('正在登录') } else {
vm.login() hlsPopup.showLoading('正在登录')
vm.login()
}
} }
}, },
registerNew: function () { registerNew: function () {
......
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