Commit 957bc5fe authored by jiangqihao's avatar jiangqihao

首次登录bug修改

parent f11d980c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</form-title> </form-title>
<ele-table <ele-table
ref="eleTable" ref="eleTable"
:multiple="false" :multiple="true"
:listeners="tableListeners" :listeners="tableListeners"
v-bind="tableConfig" v-bind="tableConfig"
:expand-params="expandParams" :expand-params="expandParams"
......
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
}, },
created() { created() {
localStorage.removeItem('USERINFO') localStorage.removeItem('USERINFO')
this.userInfo = JSON.parse(localStorage.getItem('CEINFO')) // this.userInfo = JSON.parse(localStorage.getItem('CEINFO'))
// window.addEventListener('storage', this.afterQRScan) // window.addEventListener('storage', this.afterQRScan)
}, },
mounted() { mounted() {
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
const start = JSON.parse(localStorage.getItem('CEINFO')).ExtIsFistTime_SDK ? true : false const start = JSON.parse(localStorage.getItem('CEINFO')).ExtIsFistTime_SDK ? true : false
console.log(start) console.log(start)
if (start) { if (start) {
this.$confirm('首次登请修改密码', '提示', { this.$confirm('首次登请修改密码', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
showClose: false, showClose: false,
showCancelButton: false, showCancelButton: false,
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
this.loading = true this.loading = true
if (this.$refs.form.$refs.NewPassword[0].value === this.$refs.form.$refs.AgainPassword[0].value) { if (this.$refs.form.$refs.NewPassword[0].value === this.$refs.form.$refs.AgainPassword[0].value) {
const formData = this.formData const formData = this.formData
formData.ObjectID = this.userInfo.ObjectID formData.ObjectID = JSON.parse(localStorage.getItem('CEINFO')).ObjectID
console.log(formData) console.log(formData)
const formNewData = { const formNewData = {
objectID: formData.ObjectID, objectID: formData.ObjectID,
...@@ -335,7 +335,7 @@ export default { ...@@ -335,7 +335,7 @@ export default {
newPassword: formData.NewPassword newPassword: formData.NewPassword
} }
this.$request(employee.updateUrl, formNewData).then(() => { this.$request(employee.updateUrl, formNewData).then(() => {
localStorage.setItem('USERINFO', JSON.stringify(this.userInfo)) localStorage.setItem('USERINFO', JSON.stringify(JSON.parse(localStorage.getItem('CEINFO'))))
localStorage.removeItem('CEINFO') localStorage.removeItem('CEINFO')
// console.log("登入成功") // console.log("登入成功")
this.loading = false this.loading = false
...@@ -343,8 +343,8 @@ export default { ...@@ -343,8 +343,8 @@ export default {
this.$router.push({ path: this.redirect || '/', query: this.otherQuery }) this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
}) })
} else { } else {
this.$message.error('确认密码出错!!')
this.loading = false this.loading = false
this.$message.error('确认密码出错!!')
} }
}, },
......
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