|
@@ -26,11 +26,31 @@ Page({
|
|
|
wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
|
|
|
return false
|
|
|
} else {
|
|
|
- params.name = '登录';
|
|
|
- app.globalData.userInfo = params;
|
|
|
- wx.setStorage({ key: "token", data: 'token' })
|
|
|
- wx.showToast({ title: `账号登录成功`, icon: 'success', duration: 2000 })
|
|
|
- wx.navigateTo({ url: '/pages/home/index' })
|
|
|
+ console.log("parmas",params);
|
|
|
+ var phone = params.phone;
|
|
|
+ var password = params.password;
|
|
|
+ wx.request({
|
|
|
+ url: 'http://broadcast.waityou24.cn/courtAdmin/api/user/login',
|
|
|
+ dataType: 'json',
|
|
|
+ method: 'POST',
|
|
|
+ data: {
|
|
|
+ phone: phone,
|
|
|
+ password: password,
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/json'
|
|
|
+ },
|
|
|
+ success (res) {
|
|
|
+ console.log(res.data)
|
|
|
+ if (res.data.errmsg == "用户不存在") {
|
|
|
+ wx.showToast({
|
|
|
+ title: res.data.errmsg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -55,7 +75,7 @@ Page({
|
|
|
searchHeight: function () {
|
|
|
let frameStyle = this.data.frameStyle;
|
|
|
let client = app.globalData.client;
|
|
|
- let infoHeight=client.windowHeight;
|
|
|
+ let infoHeight = client.windowHeight;
|
|
|
|
|
|
if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2)
|
|
|
|