|
@@ -61,7 +61,7 @@ Page({
|
|
},
|
|
},
|
|
|
|
|
|
// 获取验证码
|
|
// 获取验证码
|
|
- clickGetVCode: function (event: any) {
|
|
|
|
|
|
+ clickGetVCode: function () {
|
|
console.log("账号密码登录")
|
|
console.log("账号密码登录")
|
|
if (this.data.hasGetVCode) {
|
|
if (this.data.hasGetVCode) {
|
|
this.showToast("请勿频繁点击")
|
|
this.showToast("请勿频繁点击")
|
|
@@ -88,7 +88,7 @@ Page({
|
|
}
|
|
}
|
|
time--;
|
|
time--;
|
|
that.setData({
|
|
that.setData({
|
|
- getVCodeText: time.toString(),
|
|
|
|
|
|
+ getVCodeText: time.toString() + "秒",
|
|
hasGetVCode: true
|
|
hasGetVCode: true
|
|
})
|
|
})
|
|
}, 1000)
|
|
}, 1000)
|
|
@@ -104,7 +104,7 @@ Page({
|
|
|
|
|
|
|
|
|
|
//账号密码登录——---------------------------
|
|
//账号密码登录——---------------------------
|
|
- showAccountPwd: function (event: any) {
|
|
|
|
|
|
+ showAccountPwd: function () {
|
|
if (this.data.showAccPwd) {
|
|
if (this.data.showAccPwd) {
|
|
this.setData({
|
|
this.setData({
|
|
showAccPwd: false
|
|
showAccPwd: false
|
|
@@ -118,7 +118,7 @@ Page({
|
|
|
|
|
|
|
|
|
|
//显示修改密码的框
|
|
//显示修改密码的框
|
|
- showUpdatePwdLayout: function (event: any) {
|
|
|
|
|
|
+ showUpdatePwdLayout: function () {
|
|
|
|
|
|
if (this.data.showUpdatePassWordLayout) {
|
|
if (this.data.showUpdatePassWordLayout) {
|
|
this.setData({
|
|
this.setData({
|
|
@@ -238,7 +238,27 @@ Page({
|
|
}).catch((res) => {
|
|
}).catch((res) => {
|
|
console.log("保存失败:", res)
|
|
console.log("保存失败:", res)
|
|
})
|
|
})
|
|
- this.toNextPage()
|
|
|
|
|
|
+ if (Number(ConstsData.AppData.myInfoData.type) == 3) {
|
|
|
|
+ //走了3里面
|
|
|
|
+ this.setData({
|
|
|
|
+ teacherEnable: true
|
|
|
|
+ })
|
|
|
|
+ //是老师,并且点击进入的也是老师
|
|
|
|
+ if (Number(this.data.loginType) == loginType.Teacher) {
|
|
|
|
+ this.toNextPage()
|
|
|
|
+ } else {
|
|
|
|
+ this.goBack()
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ console.log("走了不是3")
|
|
|
|
+ if (!res.data.data.role) {
|
|
|
|
+ let arr = res.data.data.role.split(",")
|
|
|
|
+ this.choseType(arr)
|
|
|
|
+ } else {
|
|
|
|
+ this.goBack()
|
|
|
|
+ wx.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.showToast(res.data.message)
|
|
this.showToast(res.data.message)
|
|
}
|
|
}
|
|
@@ -286,8 +306,7 @@ Page({
|
|
if (this.data.loginType == loginType.Installer) {
|
|
if (this.data.loginType == loginType.Installer) {
|
|
this.toNextPage();
|
|
this.toNextPage();
|
|
} else {
|
|
} else {
|
|
- console.log("没有权限")
|
|
|
|
- wx.navigateBack()
|
|
|
|
|
|
+ this.goBack()
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
@@ -299,8 +318,7 @@ Page({
|
|
if (this.data.loginType == loginType.Installer) {
|
|
if (this.data.loginType == loginType.Installer) {
|
|
this.toNextPage();
|
|
this.toNextPage();
|
|
} else {
|
|
} else {
|
|
- console.log("没有权限")
|
|
|
|
- wx.navigateBack()
|
|
|
|
|
|
+ this.goBack()
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
@@ -311,8 +329,7 @@ Page({
|
|
if (this.data.loginType == loginType.Repairman) {
|
|
if (this.data.loginType == loginType.Repairman) {
|
|
this.toNextPage();
|
|
this.toNextPage();
|
|
} else {
|
|
} else {
|
|
- console.log("没有权限")
|
|
|
|
- wx.navigateBack()
|
|
|
|
|
|
+ this.goBack()
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -345,6 +362,18 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+
|
|
|
|
+ goBack: function () {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '身份选择错误',
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 1000
|
|
|
|
+ })
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ wx.navigateBack()
|
|
|
|
+ }, 1000)
|
|
|
|
+ },
|
|
|
|
+
|
|
showToast: function (message: string) {
|
|
showToast: function (message: string) {
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: message,
|
|
title: message,
|