shiFN:function(e){ // touchstart // touchend let that=this; let n=0; // 判断是开始还是结束的参数 let textTure = e.type; that.setData({ textTure: textTure }) if (textTure =='touchstart'){ let lovetime = setInterval(function () { n += 0.5;   if (that.data.textTure…
本地----------------------------------------------------------------------------------------------------- // 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;…
// 订单生成返回数据,弹出是否支付模态 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,显示购…
var str = 'abcadeacf'; var str1 = str.replace('a', 'o'); alert(str1);    // 打印结果: obcadeacf   var str2 = str.replace(/a/g, 'o'); alert(str2);    //打印结果: obcodeocf,…
<view class="list"> <form bindsubmit="formSubmit"> <view class="item-addr flexa" bindtap="translate"> <view>所在城市:</view> <view style='color:#666' wx:if="{{valuetext?'':true}}&qu…