|
@@ -7,32 +7,28 @@ Page({
|
|
* 页面的初始数据
|
|
* 页面的初始数据
|
|
*/
|
|
*/
|
|
data: {
|
|
data: {
|
|
- frameStyle: { useTop: false, name: '', leftArrow: false, useBar: false },
|
|
|
|
|
|
+ frameStyle: { useTop: false, name: '登录', leftArrow: false, useBar: false },
|
|
// 主体高度
|
|
// 主体高度
|
|
infoHeight: '',
|
|
infoHeight: '',
|
|
- // 使用协议
|
|
|
|
- agreement: false
|
|
|
|
|
|
+ //判断协议是否选中
|
|
|
|
+ agreement: false,
|
|
},
|
|
},
|
|
initValidate() {
|
|
initValidate() {
|
|
const rules = { phone: { required: true, tel: true }, password: { required: true, } }
|
|
const rules = { phone: { required: true, tel: true }, password: { required: true, } }
|
|
// 验证字段的提示信息,若不传则调用默认的信息
|
|
// 验证字段的提示信息,若不传则调用默认的信息
|
|
- const messages = { phone: { required: '请输入手机号', }, password: { required: '请输入密码', } };
|
|
|
|
|
|
+ const messages = { phone: { required: '请输入账号', }, password: { required: '请输入密码', } };
|
|
this.WxValidate = new WxValidate(rules, messages)
|
|
this.WxValidate = new WxValidate(rules, messages)
|
|
},
|
|
},
|
|
back: function () {
|
|
back: function () {
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
},
|
|
},
|
|
- // 协议选择
|
|
|
|
- agreementChange: function (e) {
|
|
|
|
|
|
+ //使用协议
|
|
|
|
+ checkboxChange(e) {
|
|
const that = this;
|
|
const that = this;
|
|
let value = e.detail.value;
|
|
let value = e.detail.value;
|
|
if (value.length > 0) that.setData({ agreement: true })
|
|
if (value.length > 0) that.setData({ agreement: true })
|
|
else that.setData({ agreement: false })
|
|
else that.setData({ agreement: false })
|
|
},
|
|
},
|
|
- // 协议查看
|
|
|
|
- agreementView: function () {
|
|
|
|
- wx.navigateTo({ url: '/pages/login2/agreement' })
|
|
|
|
- },
|
|
|
|
// 提交登录
|
|
// 提交登录
|
|
onSubmit: function (e) {
|
|
onSubmit: function (e) {
|
|
const params = e.detail.value;
|
|
const params = e.detail.value;
|
|
@@ -63,12 +59,20 @@ Page({
|
|
} else {
|
|
} else {
|
|
wx.showToast({ title: `请同意使用协议`, icon: 'error', duration: 1000 })
|
|
wx.showToast({ title: `请同意使用协议`, icon: 'error', duration: 1000 })
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 微信登录
|
|
|
|
- wxLogin: function () {
|
|
|
|
|
|
+ //微信登录
|
|
|
|
+ wxlogin: function () {
|
|
|
|
+ wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
|
|
|
|
+ },
|
|
|
|
+ //注册
|
|
|
|
+ register: function () {
|
|
|
|
+ wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
|
|
|
|
+ },
|
|
|
|
+ //忘记密码
|
|
|
|
+ noopen: function () {
|
|
wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
|
|
wx.showToast({ title: `暂未开放`, icon: 'error', duration: 2000 })
|
|
- // wx.navigateTo({ url: '/pages/home/index' })
|
|
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|