From d154966cc9492a30c47809aa2824ba61d18e6fef Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 28 五月 2024 16:51:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 h5/pages/login/login.vue |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index a948b9d..732caac 100644
--- a/h5/pages/login/login.vue
+++ b/h5/pages/login/login.vue
@@ -7,7 +7,7 @@
       <view class="login_list_item">
         <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
         <input
-          v-model="form.idCard"
+          v-model="form.account"
           maxlength="18"
           type="number"
           placeholder="璐﹀彿"
@@ -32,14 +32,15 @@
 </template>
 
 <script>
+import { loginPost } from '@/api'
 export default {
   name: 'login',
 
   data() {
     return {
       form: {
-        idCard: '',
-        password: ''
+        account: '',
+        password: '',
       }
     }
   },
@@ -52,14 +53,21 @@
       console.log(e)
     },
     onLogin() {
-      const appID = 'wx4d7c10bdec51942b'
-      const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
-      // const scope = 'snsapi_userinfo'
-      let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc')
-      let authURL =
-        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`
-      window.location.href = authURL
-
+      const { form } = this
+      if (!form.account) return uni.showToast({
+        title: '璐﹀彿鍚庝笉鑳戒负绌�',
+        icon: 'none'
+      })
+      if (!form.password) return uni.showToast({
+        title: '瀵嗙爜涓嶈兘涓虹┖',
+        icon: 'none'
+      })
+      loginPost({
+        ...form,
+        openId: this.$store.state.openId
+      }).then(res => {
+        console.log('res', res);
+      })
     }
   }
 }

--
Gitblit v1.9.3