| | |
| | | { |
| | | "name" : "jfpt", |
| | | "name" : "群防群控", |
| | | "appid" : "__UNI__1A57486", |
| | | "description" : "", |
| | | "versionName" : "1.0.0", |
| | |
| | | "path": "pages/loging/loging", |
| | | "name": "loging", |
| | | "style": { |
| | | "navigationBarTitleText": "请登入" |
| | | "navigationBarTitleText": "请登录" |
| | | // "app-plus": { |
| | | // "animationType": "fade-in", |
| | | // "animationDuration": 300 |
| | |
| | | }, |
| | | methods: { |
| | | cc() { |
| | | this.$store.commit('loginReset', this); //重置登入 |
| | | this.$store.commit('loginReset', this); //重置登录 |
| | | console.log('清空') |
| | | } |
| | | }, |
| | |
| | | <input type="password" v-model="passwords" placeholder="请输入密码" /> |
| | | </view> |
| | | <view class="loging"> |
| | | <button class="confirm bubble" @click="longing(names,passwords)" type="default">登入</button> |
| | | <button class="confirm bubble" @click="longing(names,passwords)" type="default">登录</button> |
| | | </view> |
| | | <view class="msg"> |
| | | <span>{{msg}}</span> |
| | |
| | | }, |
| | | methods: { |
| | | judgeUse() { |
| | | var login = WxStorage.get("init") //重复登入 |
| | | var login = WxStorage.get("init") //重复登录 |
| | | var name = WxStorage.get("name") |
| | | var userID = WxStorage.get("ids") |
| | | var accounts = WxStorage.get("accounts"); |
| | |
| | | uni.reLaunch({ |
| | | url: '../alarm_list/alarm_list' |
| | | }) |
| | | return '成功登入' |
| | | return '成功登录' |
| | | } else { |
| | | this.icons = 'warn'; |
| | | this.colors = '#d53c00'; |
| | | this.msg = '账号密码错误'; |
| | | this.$store.commit('loginReset', this); //重置登入 |
| | | this.$store.commit('loginReset', this); //重置登录 |
| | | uni.hideNavigationBarLoading(); |
| | | return '未成功登入' |
| | | return '未成功登录' |
| | | } |
| | | } |
| | | } |
| | |
| | | showTextmsg: false, |
| | | textmsg: { |
| | | title: '提示', |
| | | content: '您已登入,确认登出?', |
| | | content: '您已登录,确认登出?', |
| | | contentTwo: '', |
| | | cancel: '取消', |
| | | confirm: '登出' |
| | |
| | | return this.$store.state.puserName; |
| | | }, |
| | | butTitle() { |
| | | return this.$store.state.loging == true ? '登出' : '登入' |
| | | return this.$store.state.loging == true ? '登出' : '登录' |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | } |
| | | }, |
| | | goToLoging() { |
| | | this.$store.commit('loginReset'); //重置登入 |
| | | this.$store.commit('loginReset'); //重置登录 |
| | | uni.redirectTo({ //关闭并打开 |
| | | url: '../loging/loging', |
| | | animationType: 'slide-in-top', |
| | |
| | | const mutations = { |
| | | login(state, data) { |
| | | // console.log(data); |
| | | state.loging = data.isit; //登入状态 |
| | | state.loging = data.isit; //登录状态 |
| | | if (data.isit) { //写入用户数据 |
| | | state.message.useName = data.userName; |
| | | state.puserName = data.userName; |