12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- // pages/login/login.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- showEyes: false,
- form: {
- phone: "",
- password: ''
- },
- phone: ''
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- // const token = wx.getStorageSync('token')
- // console.log(token);
- // if (!token || token == '') {
- // wx.setNavigationBarTitle({
- // title: '分拣系统',
- // })
- // }else{
- // wx.switchTab({
- // url: '/pages/tabber/home/index',
- // })
- // }
- },
- onReady(){
-
- },
- close() {
- this.data.form.phone = ''
- this.setData({
- phone: ''
- })
- console.log(this.data.phone);
- },
- inputValue1(e) {
- let { value } = e.detail
- this.data.form.phone = value
- this.setData({
- phone: value
- })
- console.log(this.data.phone);
- },
- inputValue2(e) {
- let { value } = e.detail
- this.data.form.password = value
- },
- changeEyes() {
- this.setData({
- showEyes: !this.data.showEyes
- })
- },
- login() {
- console.log(this.data.form);
- wx.setStorageSync('token', "测试值")
- wx.switchTab({
- url: '/pages/tabber/home/index',
- })
- }
- })
|