*新闻详情页*/>
input class in1 bindinput value type number placeholder 请输入手机号 /input input class in2 bindinput value2 name in2 type password placeholder 请输入密码 /input button class btn bindtap deng type primary 登录 /button button class btn bindtap zhuce type primary 注册 /buttonwxss页面代码
.in1{ height: 75px; width: 75%; text-align: left; display:block; margin:0 auto; .in2{ height: 75px; width: 75%; text-align: left; display:block; margin:0 auto; .btn{ float: top; width: 75% !important; margin-top: 20px;js页面代码
// pages/show/show.js Page({ data:{ test: , test2: zhuce: function(options){ wx.redirectTo({ url: ../zhu/zhu , })}, xie: function(options){ wx.redirectTo({ url: ../zhu/xie , })}, value:function(e){ this.setData({ test:e.detail.value value2:function(e){ this.setData({ test2:e.detail.value deng:function(e){ let content this.data.test let content2 this.data.test2 if(content.length! 11){ wx.showToast({ title: 手机号不符合格式 , icon: none , duration: 1500 return false else if(content2.length 1){ wx.showToast({ title: 密码不能为空 , icon: none , duration: 1500 return false if(!content ){ wx.showToast({ title: 成功 , icon: success , duration: 2000 than:{ wx.switchTab({ url: ../index/index注释
wx.redirectTo 保留当前页面 跳转到应用内的某个页面
wx.showToast 弹出框
e.detail.value 动态获取input的value
wx.switchTab 跳转到 tabBar 页面 并关闭其他所有非 tabBar 页面
Copyright © 2002-2020 凡科自助建站_企业网站怎么建设_智能建站系统_自己建个网站_搭建网站基本步骤 版权所有 (网站地图) 粤ICP备10235580号