张含笑
2025-11-13 592b1d7afbfd7427167602da8e902ca98a561a3b
src/pages/login/index.vue
@@ -20,10 +20,10 @@
         </label>
      </div>
      <button class="login-btn" :style="[inputStyle]" @tap="submit">
      <button class="login-btn"  :style="[inputStyle]" @tap="submit">
         登录
      </button>
      <image class="lowerRightCorner" :src="droneSvg" />
   </view>
</template>
@@ -67,6 +67,23 @@
   }
   async function submit() {
       if (!loginForm.value.username.trim()) {
          uni.showToast({
            title: "请输入用户名",
            icon: "none",
            duration: 2000
          });
          return;
        }
        if (!loginForm.value.password.trim()) {
          uni.showToast({
            title: "请输入密码",
            icon: "none",
            duration: 2000
          });
          return;
        }
      let userInfo = {
         tenantId: "000000",
         deptId: "",
@@ -86,7 +103,7 @@
      } else {
         uni.removeStorageSync('rememberedUser');
      }
      try {
         const res = await loginByUsername(
            userInfo.tenantId,
@@ -126,7 +143,7 @@
         redirect = decodeURIComponent(options.redirect);
      }
   });
</script>
<style lang="scss" scoped>
@@ -204,10 +221,10 @@
         margin-left: 62rpx;
         margin-right: 58rpx;
         margin-top: 20rpx;
         color: #666;
         font-size: 28rpx;
         label {
            display: flex;
            align-items: center;
@@ -226,7 +243,7 @@
      .login-btn {
         z-index: 1;
         @apply flex items-center justify-center py-12rpx px-0 text-30rpx border-none;
         background: #5a93e6;
         background: #1D6FE9;
         color: white;
         width: 590rpx;
         height: 76rpx;
@@ -261,4 +278,4 @@
         color: $u-warning;
      }
   }
</style>
</style>