Browse Source

登录优化

master
yxq 2 months ago
parent
commit
274ccf59ab
2 changed files with 10 additions and 7 deletions
  1. +1
    -1
      monitorMobile/pages/work/returnBed/index.vue
  2. +9
    -6
      monitorMobile/store/index.js

+ 1
- 1
monitorMobile/pages/work/returnBed/index.vue View File

@@ -1,7 +1,7 @@
<template> <template>
<view style="height: 100%;"> <view style="height: 100%;">
<view class="searchBox"> <view class="searchBox">
<selectRadio v-model="search.loudong" :options="[{value:1,label:'男生宿舍1号楼'},{value:2,label:'男生宿舍2号楼'},{value:3,label:'女生宿舍1号楼'},{value:4,label:'女生宿舍2号楼'}]"
<selectRadio v-model="search.loudong" :options="this.allOptions.monitorList"
title="楼栋" /> title="楼栋" />
<selectSearch v-model="search.qinshi" :options="[{value:1,label:'寝室302'},{value:2,label:'寝室305'},{value:3,label:'寝室303'}]" <selectSearch v-model="search.qinshi" :options="[{value:1,label:'寝室302'},{value:2,label:'寝室305'},{value:3,label:'寝室303'}]"
placeholder="请选择寝室" popupTitle="选择寝室" search-placeholder="请输入宿舍号"/> placeholder="请选择寝室" popupTitle="选择寝室" search-placeholder="请输入宿舍号"/>


+ 9
- 6
monitorMobile/store/index.js View File

@@ -51,6 +51,7 @@ const store = new Vuex.Store({
refreshToken: lifeData.refreshToken || '', refreshToken: lifeData.refreshToken || '',
allOptions: lifeData.allOptions || { allOptions: lifeData.allOptions || {
monitorList: [], //摄像头列表 monitorList: [], //摄像头列表
monitorList:[], //楼栋列表
}, },
}, },
actions: { actions: {
@@ -71,18 +72,20 @@ const store = new Vuex.Store({
name: 'token', name: 'token',
value: payload.token value: payload.token
}) })
context.commit('$uStore', {
name: 'refreshToken',
value: payload.refreshToken || ''
})
if (payload.refreshToken) {
context.commit('$uStore', {
name: 'refreshToken',
value: payload.refreshToken || ''
})
}
}, },
clearToken(context) { clearToken(context) {
context.commit('$uStore', { context.commit('$uStore', {
name: 'token', name: 'token',
value: '' value: ''
}) })
context.commit('refreshToken', {
name: 'token',
context.commit('$uStore', {
name: 'refreshToken',
value: '' value: ''
}) })
}, },


Loading…
Cancel
Save