From 6763ddbac0a8df83bfb5191ed99e3dcbdd16beee Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期五, 13 十月 2023 14:56:54 +0800
Subject: [PATCH] 备份
---
GoldC/pages/login/login.js | 48 ++++++++++++++++++++++++++----------------------
1 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/GoldC/pages/login/login.js b/GoldC/pages/login/login.js
index f567cab..b5548b4 100644
--- a/GoldC/pages/login/login.js
+++ b/GoldC/pages/login/login.js
@@ -9,8 +9,8 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- userName: 'admin',
- psw: 'admin123',
+ userName: 'sdlys',
+ psw: '123456',
codeNum: '',
loginImg: '/images/login.png',
uuid: '',
@@ -38,36 +38,40 @@
},
// 缁戝畾瀵嗙爜
bindPSW(e) {
+ console.log(e);
this.setData({
psw: e.detail.value
})
},
// 楠岃瘉鐮�
bindCodeNum(e) {
+ console.log(e);
this.setData({
codeNum: e.detail.value
})
+ console.log(this.data.codeNum);
},
// 鐧诲綍
login() {
- // wx.showLoading({
- // title: '鐧诲綍涓�',
- // })
+ console.log(this.data);
+ wx.showLoading({
+ title: '鐧诲綍涓�',
+ })
- // loginRequest(this.data.userName, this.data.psw, this.data.codeNum, this.data.uuid).then(res => {
- // console.log(res);
- // if (res.data.code != 200) {
- // wx.showToast({
- // title: res.data.msg,
- // icon: "none"
- // })
- // } else {
- // wx.setStorageSync('token', res.data.token)
- // wx.showToast({
- // title: '鐧诲綍鎴愬姛锛�',
- // icon: 'none'
- // });
+ loginRequest(this.data.userName, this.data.psw, this.data.codeNum, this.data.uuid).then(res => {
+ console.log(res);
+ if (res.data.code != 200) {
+ wx.showToast({
+ title: res.data.msg,
+ icon: "none"
+ })
+ } else {
+ wx.setStorageSync('token', res.data.token)
+ wx.showToast({
+ title: '鐧诲綍鎴愬姛锛�',
+ icon: 'none'
+ });
// // console.log(res);
// this.$store.dispatch('setUserData', {
@@ -79,7 +83,7 @@
// this.$Router.pushTab({
// path: '/pages/home/index',
// });
- // app.setUser(res.data)
+ app.setUser(res.data)
wx.hideLoading({
success: (res) => {
wx.switchTab({
@@ -104,10 +108,10 @@
// })
// }
- // }
- // }).catch(() => {
+ }
+ }).catch(() => {
- // })
+ })
},
//蹇樿瀵嗙爜
goForgot() {
--
Gitblit v1.8.0