随笔分类 - 微信小程序
关于微信小程序遇到的问题及解答
摘要:绑定catchtouchmove事件 return ; wx.ml <view class="c_con" wx:if="{{show}}" catchtouchmove="stopScroll"> <view> js stopScroll(){ return ; },
阅读全文
摘要:XML <view class="authorized-mobile"> <view class="contnet"> <view class="img"></view> <button class="btn" open-type="getPhoneNumber" bindgetphonenumbe
阅读全文
摘要://支付 payMent() { const that = this; // let data={ // courseId:that.data.courseId, // dealPrice:courseId, // primePrice:courseId, // studentId:courseId
阅读全文
摘要:单个上传 //选择图片 uploadImg() { const that = this; wx.chooseMessageFile({ count: 1, type: 'image', success(res) { // tempFilePath可以作为img标签的src属性显示图片 const t
阅读全文
摘要:app.js // app.js const interfaces = require("./utils/urlconfig") App({ onLaunch() { // 展示本地存储能力 const logs = wx.getStorageSync('logs') || []; logs.uns
阅读全文
摘要:wx.ml <view class="con"> <textarea name="" id="" class="inputText" cols="30" rows="10" value="{{inputText}}" placeholder="(选填)留下您的评语吧~" bindinput="get
阅读全文
摘要:wxml <!-- pages/vip/index.wxml --> <view class="con_box"> <view style="height:{{navHeight+'rpx'}};" class="window_top"> <view class="w_text" style="ma
阅读全文
摘要:observers: { 'show': function (val) { const that = this; that.setData({ showTitlt: val }, () => { if(val){ setTimeout(() => { that.triggerEvent('myeve
阅读全文
摘要:wx.ml <view class="item {{change2?'change_border':''}}"> <label for="">验证码</label> <input type="testmsg" value="{{testmsg}}" data-index="2" bindblur="
阅读全文
摘要:wx.js previewImage(val) { let result=val.currentTarget.dataset.item; const that = this; wx.previewImage({ current: result, // 当前显示图片的http链接 urls: that
阅读全文
摘要:app.json中修改 tabBar "tabBar": { "custom": true, "color": "#ABABAB", "selectedColor": "#22C992", "borderStyle": "white", "backgroundColor": "#FAF9F9", "
阅读全文
摘要:text-overflow:ellipsis; word-break: break-all;
阅读全文
摘要:::-webkit-scrollbar { display:none; width:0; height:0; color:transparent; } 阻止滚动的方法 page-meta 页面属性配置节点,用于指定页面的一些属性、监听页面事件。只能是页面内的第一个节点。可以配合 navigation
阅读全文
摘要:wx.ml <button class="btn" open-type="share" data-mode="teacher" data-type="1">hello world</button> wx.js 内wx 定义的分享方法 /** * 用户点击右上角分享 */ onShareAppMess
阅读全文
摘要:wx.showModal({ title:'提示', content:'第一行内容\r\n第二行内容\r\n第三行内容\r\n第四行内容', success:function (res) { if (res.confirm) { console.log('用户点击确定') }else if (res
阅读全文
摘要:wx.ml <view class="concact_index"> <view class="ai_top" style='height:{{titleBarHeight}}rpx;line-height:{{titleBarHeight}}rpx;padding-top:{{statusBarH
阅读全文
摘要:calc经常被使用在计算剩下的宽度或者高度,可以根据机型动态改变布局的宽度或者高度,但是使用过程中有以下注意事项 在表达式中运算符的前后必须要有空格才能生效 .bottle{ border:1px solid purple; display:block; height:calc(100vh - 19
阅读全文
摘要:wx.js /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { let menuButtonObject = wx.getMenuButtonBoundingClientRect(); wx.getSystemInfo({ success: (r
阅读全文
摘要:父组件内 wx.ml <popup_window isAlert="{{isAlert}}" bind:changwindow="handleTap"></popup_window> 子组件内wx.ml <!-- 弹出框 --> <view class="cover" wx:if="{{isAler
阅读全文
摘要:index.wxml <view class="c_item" bindtap="getPublishDate"> <label for="name">截止时间</label> <input type="text" id="name" bin disabled="{{true}}" value="{
阅读全文