登录
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view>
|
||||
<nav-bar title="空管入库"></nav-bar>
|
||||
<view class="content">
|
||||
<view class="container"></view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button btn-disabled">入库确认</button>
|
||||
<button class="submit-button">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
NavBar
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,20 +18,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {handRequest} from '@/utils/api.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [{url: '/pages/ProductManage/EmptyPipeInStore', name: '空管入库'}, {url: '/pages/ProductManage/ZjCasing', name: '子卷套管'}, {url: '/pages/ProductManage/ZjDelivery', name: '子卷配送'}, {url: '/pages/ProductManage/ZjOutStore', name: '子卷出站'}, {url: '/pages/task/painttask', name: '任务生成'}, {url: '/pages/task/sitemanage', name: '站点管理'}, {url: '/pages/task/pointrelease', name: '点位取放货确认'}, {url: '/pages/task/taskmanage', name: '任务管理'}, {url: '/pages/task/zlmanage', name: '指令管理'}]
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this._handRequest()
|
||||
},
|
||||
methods: {
|
||||
async _handRequest () {
|
||||
let res = await handRequest()
|
||||
uni.showModal({
|
||||
content: res.desc,
|
||||
showCancel: false
|
||||
})
|
||||
},
|
||||
toPage (url) {
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
Quit () {
|
||||
this.$store.dispatch('setSignOut')
|
||||
this.$store.dispatch('delUserInfo')
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
})
|
||||
},
|
||||
async toLogin() {
|
||||
uni.redirectTo({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/home/home'
|
||||
// })
|
||||
this.disabled = true
|
||||
if (this.user === '') {
|
||||
uni.showToast({
|
||||
@@ -68,22 +68,16 @@
|
||||
}
|
||||
try {
|
||||
let res = await handLogin(this.user, RSAencrypt(this.password))
|
||||
if(res.code === '1') {
|
||||
if (this.saveUser) {
|
||||
this.$store.dispatch('saveLoginName', this.user)
|
||||
} else {
|
||||
this.$store.dispatch('delLoginName', '')
|
||||
}
|
||||
this.$store.dispatch('saveUserInfo', JSON.stringify(res.result))
|
||||
uni.redirectTo({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
if (this.saveUser) {
|
||||
this.$store.dispatch('saveLoginName', this.user)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.$store.dispatch('delLoginName', '')
|
||||
}
|
||||
this.$store.dispatch('saveUserInfo', JSON.stringify(res.user.user))
|
||||
this.$store.dispatch('saveToken', res.token)
|
||||
uni.redirectTo({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
|
||||
Reference in New Issue
Block a user