// 登录手机验证 loginPhone: function (e) { var phone = e.detail.value; if (!(/^1[34578]\d{9}$/.test(phone))) { this.setData({ ajxtrue: false }) if (phone.length >= 11) { wx.showToast({ title: '手机号有误', icon: 'success', duration: 2000 }) } } else { this.setD…
//登录输入密码 userPasswordInput: function (e) { var that = this; this.setData({ userPassword: e.detail.value }) // console.log(e.detail.value.length) // console.log(e.detail.value); var value = e.detail.value var strkong = /^[0-9a-zA-Z]{0,25}$/g; if (strk…
本地----------------------------------------------------------------------------------------------------- // wx.login({ // success: res => { // var code = res.code; //返回code // // console.log(code) // // 小程序appid // // wxd751fc845c90fbd8 // // 3df95e16…
// 商品详情页跳转函数 detailInto: function (e) { // console.log() var change = e.currentTarget.dataset.id; wx.navigateTo({ url: '../detail/detail?id=' + change }) }, //接收的页面 onLoad: function (opt) { var selectnum= this.data.selectnum; selectnum.sq = opt.key;…
yanZhengInput: function (e) { var that = this; var yanzheng = e.detail.value; var huozheng = this.data.huozheng console.log(e.detail.value) that.setData({ yanzheng: yanzheng, zhengTrue: false, }) if (yanzheng.length >= 4) { if (yanzheng == huozheng)…
// 订单生成返回数据,弹出是否支付模态 wx.showModal({ title: '微信支付', content: '确定支付吗?', success: function (res) { if (res.confirm) { self.pay(bianhao); } else if (res.cancel) { setTimeout(function () { wx.redirectTo({ url: "/pages/user/dingdan?id=2&&status=1&q…
ffn: function () { let nnn = this.data.nnn nnn += 1; this.setData({ nnn: nnn }); if (nnn > 10) { wx.vibrateLong() } }, var timer = setInterval(this.ffn, 1000);…
<view> <view class='btn-img'> <image class='image-full' src='../../imgs/index/tab6.png'></image> <contact-button class='section-tel' size="27" session-from="weapp"> </contact-button> </view> &l…
// 将对象的键添加到数组 var arr = Object.keys(site); //英文 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys   中文 https://developer.mozilla.org/zh-CN/   https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference…
// 购物车删除 deleteList(e) { const index = e.currentTarget.dataset.index; let carts = this.data.carts; carts.splice(index, 1); // 删除购物车列表里这个商品 this.setData({ carts: carts }); if (!carts.length) { // 如果购物车为空 this.setData({ hasList: false // 修改标识为false,显示购…