123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- Page({
-
- data: {
- userName:'',
- password:''
- },
-
- onLoad: function (options) {
- },
-
- handleInput(event){
-
- let type=event.currentTarget.dataset.type;
-
-
- this.setData({
- [type]:event.detail.value
- })
- },
-
- login(){
- let{userName,password}=this.data;
- if(!userName){
- wx.showToast({
- title: '账号不能为空',
- icon:'none'
- })
- return
- }
- if(!password){
- wx.showToast({
- title: '密码不能为空',
- icon:'none'
- })
- return
- }else if(password.length<6){
- wx.showToast({
- title: '密码不能小于6位',
- icon:'none'
- })
- return
- }
- wx.redirectTo({
- url: '/pages/myInfo/myInfo',
- })
- },
-
- toLoginIn(){
- wx.navigateTo({
- url: '/pages/index/index',
- })
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- }
- })
|