From 843d0abd014ec20424844546fc57a9f976f366ba Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 02 九月 2024 10:52:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
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