zengh
2021-06-24 67652e6b27e9d1a154aba482d953a2bb9d72339e
登录模式修改
6 files modified
24 ■■■■ changed files
manifest.json 2 ●●● patch | view | raw | blame | history
pages.json 2 ●●● patch | view | raw | blame | history
pages/index/index.vue 2 ●●● patch | view | raw | blame | history
pages/loging/loging.vue 10 ●●●● patch | view | raw | blame | history
pages/myself/myself.vue 6 ●●●● patch | view | raw | blame | history
store/mutations.js 2 ●●● patch | view | raw | blame | history
manifest.json
@@ -1,5 +1,5 @@
{
    "name" : "jfpt",
    "name" : "群防群控",
    "appid" : "__UNI__1A57486",
    "description" : "",
    "versionName" : "1.0.0",
pages.json
@@ -4,7 +4,7 @@
            "path": "pages/loging/loging",
            "name": "loging",
            "style": {
                "navigationBarTitleText": "请登入"
                "navigationBarTitleText": "请登录"
                // "app-plus": {
                //     "animationType": "fade-in",
                //     "animationDuration": 300
pages/index/index.vue
@@ -20,7 +20,7 @@
        },
        methods: {
            cc() {
                this.$store.commit('loginReset', this); //重置登入
                this.$store.commit('loginReset', this); //重置登录
                console.log('清空')
            }
        },
pages/loging/loging.vue
@@ -17,7 +17,7 @@
                <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>
@@ -46,7 +46,7 @@
        },
        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");
@@ -107,14 +107,14 @@
                    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 '未成功登录'
                }
            }
        }
pages/myself/myself.vue
@@ -53,7 +53,7 @@
                showTextmsg: false,
                textmsg: {
                    title: '提示',
                    content: '您已登入,确认登出?',
                    content: '您已登录,确认登出?',
                    contentTwo: '',
                    cancel: '取消',
                    confirm: '登出'
@@ -100,7 +100,7 @@
                return this.$store.state.puserName;
            },
            butTitle() {
                return this.$store.state.loging == true ? '登出' : '登入'
                return this.$store.state.loging == true ? '登出' : '登录'
            }
        },
        onLoad() {
@@ -150,7 +150,7 @@
                }
            },
            goToLoging() {
                this.$store.commit('loginReset'); //重置登入
                this.$store.commit('loginReset'); //重置登录
                uni.redirectTo({ //关闭并打开
                    url: '../loging/loging',
                    animationType: 'slide-in-top',
store/mutations.js
@@ -3,7 +3,7 @@
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;