jialh
2024-12-12 2df0108fa8d914876fc9a6435f9184b3e9bce86c
pages/public/login.vue
@@ -9,17 +9,17 @@
         <view class="input-content">
            <view class="input-item">
               <!-- <text class="tit">机构码</text> -->
               <img class="icon" src="/static/login/jigou.png" alt="" />
               <image class="icon" src="/static/login/jigou.png" alt="" />
               <input type="text" v-model="CompanyRemark" placeholder="请输入机构码" maxlength="11" />
            </view>
            <view class="input-item">
               <!-- <text class="tit">用户名</text> -->
               <img class="icon" src="/static/login/user.png" alt="" />
               <image class="icon" src="/static/login/user.png" alt="" />
               <input type="text" v-model="userName" placeholder="请输入用户名" maxlength="11" />
            </view>
            <view class="input-item">
               <!-- <text class="tit">密码</text> -->
               <img class="icon" src="/static/login/pwd.png" alt="" />
               <image class="icon" src="/static/login/pwd.png" alt="" />
               <input type="password" v-model="password" placeholder="请输入密码" maxlength="20" @confirm="toLogin" />
            </view>
         </view>
@@ -41,9 +41,9 @@
export default {
   data() {
      return {
         CompanyRemark: 'test',
         userName: 'yanan',
         password: '123456!',
         CompanyRemark: 'guest',
         userName: '',
         password: '',
         logining: false
      }
   },
@@ -89,6 +89,10 @@
               uni.switchTab({
                  url: '/pages/index/index'
               });
               // 登录成功后刷新页面
               // uni.reLaunch({
               //   url: '/pages/index/index',
               // });
            } else {
               this.$msg('登录失败');
               
@@ -226,6 +230,7 @@
      }
      .icon{
         width: 40upx;
         height: 40upx;
         margin-right: 20upx;
      }