From 1382a7990e9b13f60c6416ada5477673a934dd16 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 29 八月 2024 09:02:57 +0800
Subject: [PATCH] ll

---
 pda/pages/index/login.vue |   73 ++++++++++++++++--------------------
 1 files changed, 32 insertions(+), 41 deletions(-)

diff --git a/pda/pages/index/login.vue b/pda/pages/index/login.vue
index 6e0f386..60e8d8f 100644
--- a/pda/pages/index/login.vue
+++ b/pda/pages/index/login.vue
@@ -3,7 +3,7 @@
     <image class="login_bg" src="@/static/login_bg@2x.png" />
     <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
     <view class="login_title" style="marginTop: 40rpx;">瀹夋嘲鐗╂祦鏅烘収鍥尯</view>
-    <view class="login_title" style="marginBottom: 80rpx;">鐗╂祦杞︾鐞嗙郴缁�</view>
+    <view class="login_title" style="marginBottom: 60rpx;">鏁板瓧鍖栨湀鍙拌皟搴﹀钩鍙�</view>
     <view class="login_list">
       <view class="login_list_item">
         <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
@@ -42,8 +42,8 @@
   data() {
     return {
       form: {
-        account: '',
-        password: '',
+        username: '13996529050',
+        password: '123456',
       },
       isShowProtocol: false,
       ProtocolFlag: false,
@@ -53,7 +53,7 @@
   },
 
   onLoad() {
-    // this.initCaptcha()
+    this.initCaptcha()
   },
 
   methods: {
@@ -61,6 +61,33 @@
     changeFalg() {
       this.ProtocolFlag = !this.ProtocolFlag
     },
+		onLogin() {
+		  const { form, ProtocolFlag } = this
+		  if (!form.username) return uni.showToast({
+		    title: '璐﹀彿涓嶈兘涓虹┖',
+		    icon: 'none'
+		  })
+		  if (!form.password) return uni.showToast({
+		    title: '瀵嗙爜涓嶈兘涓虹┖',
+		    icon: 'none'
+		  })
+		  loginPost({
+		    ...form,
+				code: 1,
+		    uuid: this.captcha.uuid,
+		    openId: this.$store.state.openId
+		  }).then(res => {
+		    if (res.code === 200) {
+		      this.setToken(res.data)
+		      getUserInfo().then(ress => {
+		        this.setUserInfo(ress.data)
+		        uni.redirectTo({
+		          url: "/pages/index/index"
+		        })
+		      })
+		    }
+		  })
+		},
     getContent() {
       getSystemDictData({
         dictCode: 'SYSTEM',
@@ -78,41 +105,6 @@
         this.captcha = res.data
       })
     },
-
-    onLogin() {
-      const { form, ProtocolFlag } = this
-      if (!ProtocolFlag) return uni.showToast({
-        title: '璇峰厛闃呰骞跺悓鎰忕敤鎴峰崗璁�',
-        icon: 'none'
-      })
-      if (!form.username) return uni.showToast({
-        title: '璐﹀彿涓嶈兘涓虹┖',
-        icon: 'none'
-      })
-      if (!form.password) return uni.showToast({
-        title: '瀵嗙爜涓嶈兘涓虹┖',
-        icon: 'none'
-      })
-      if (!form.code) return uni.showToast({
-        title: '楠岃瘉鐮佷笉鑳戒负绌�',
-        icon: 'none'
-      })
-      loginPost({
-        ...form,
-        uuid: this.captcha.uuid,
-        openId: this.$store.state.openId
-      }).then(res => {
-        if (res.code === 200) {
-          this.setToken(res.data)
-          getUserInfo().then(ress => {
-            this.setUserInfo(ress.data)
-            uni.redirectTo({
-              url: "/pages/staff/index"
-            })
-          })
-        }
-      })
-    }
   }
 }
 </script>
@@ -120,9 +112,8 @@
 <style lang="scss" scoped>
 .login {
   width: 100%;
-  height: 100vh;
   display: flex;
-  padding-top: 160rpx;
+  padding-top: 100rpx;
   box-sizing: border-box;
   align-items: center;
   flex-direction: column;

--
Gitblit v1.9.3