From e47f3d8ef4d9c5d941f15ba5a24394b6eddd2d29 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 28 五月 2024 11:10:24 +0800
Subject: [PATCH] ''
---
h5/api/index.js | 1 +
h5/pages/auth/auth.vue | 12 ++++++------
h5/pages/notice/notice.vue | 2 +-
h5/pages/login/login.vue | 22 +++++++++++++++++-----
h5/api/visitor.js | 1 -
h5/api/staff.js | 9 +++++++++
6 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/h5/api/index.js b/h5/api/index.js
index d3d05bc..2a49856 100644
--- a/h5/api/index.js
+++ b/h5/api/index.js
@@ -1,6 +1,7 @@
import { http } from '@/utils/service.js'
export * from '@/utils/config.js'
export * from './visitor'
+export * from './staff'
// 鏌ヨ瀛楀吀鍊兼暟鎹�
export const getSystemDictData = (data) => {
diff --git a/h5/api/staff.js b/h5/api/staff.js
new file mode 100644
index 0000000..f319ed2
--- /dev/null
+++ b/h5/api/staff.js
@@ -0,0 +1,9 @@
+import { http } from '@/utils/service.js'
+
+// login
+export const loginPost = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/web/member/accountLogin',
+ data
+ })
+}
\ No newline at end of file
diff --git a/h5/api/visitor.js b/h5/api/visitor.js
index bd22d5a..68126fa 100644
--- a/h5/api/visitor.js
+++ b/h5/api/visitor.js
@@ -1,5 +1,4 @@
import { http } from '@/utils/service.js'
-import { methods } from 'uview-ui/libs/mixin/mixin'
// 璁垮棰勭害璇︽儏
export const visitorSubDetail = (data) => {
diff --git a/h5/pages/auth/auth.vue b/h5/pages/auth/auth.vue
index 14138b1..7015615 100644
--- a/h5/pages/auth/auth.vue
+++ b/h5/pages/auth/auth.vue
@@ -13,12 +13,12 @@
},
onLoad() {
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 AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
+ // const scope = 'snsapi_userinfo'
+ let uri = encodeURIComponent('https://xiaopiqiu2.natapp1.cc')
+ let authURL =
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
+ window.location.href = authURL
}
}
</script>
diff --git a/h5/pages/login/login.vue b/h5/pages/login/login.vue
index a948b9d..2cb32c7 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,25 @@
console.log(e)
},
onLogin() {
+ const { form } = this
+ if (!form.account) return uni.showToast({
+ title: '璐﹀彿鍚庝笉鑳戒负绌�',
+ icon: 'none'
+ })
+ if (!form.password) return uni.showToast({
+ title: '瀵嗙爜涓嶈兘涓虹┖',
+ icon: 'none'
+ })
const appID = 'wx4d7c10bdec51942b'
const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
// const scope = 'snsapi_userinfo'
- let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc')
+ let uri = encodeURIComponent('https://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
-
+ loginPost(form).then(res => {
+ console.log('res', res);
+ })
}
}
}
diff --git a/h5/pages/notice/notice.vue b/h5/pages/notice/notice.vue
index 6a15db8..ddd051b 100644
--- a/h5/pages/notice/notice.vue
+++ b/h5/pages/notice/notice.vue
@@ -24,7 +24,7 @@
}
},
onLoad() {
- // this.getInfo()
+ this.getInfo()
},
methods: {
getInfo() {
--
Gitblit v1.9.3