随笔分类 - 微信小程序
摘要:function wxToPromise(method, options = {}) { return new Promise((resolve, reject) => { options.success = resolve options.fail = err => { reject(err) }
阅读全文
摘要:var touchstartX; function handleTouchstart(e){ // 数据绑定 记录触摸开始 x 轴的位置 touchstartX = e.changedTouches[0].clientX } function handleTouchend(e,ownerInstan
阅读全文
摘要:https://gitee.com/eric167/shio-small
阅读全文
摘要:<!--components/Tabs/Tabs.wxml--> <view class="tabs"> <view class="tabs_title"> <view wx:for="{{tabs}}" wx:key="id" class="title_item {{item.isActive ?
阅读全文
摘要:<!--pages/feedback/index.wxml--> <Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange"> <view class="fb_main"> <view class="fb_title">问题的种类<
阅读全文
摘要:<view class="search_row"> <input value="{{inputValue}}" placeholder="请输入你要搜索的商品" bindinput="handleInput"> </input> <button class="search_btn" bindtap=
阅读全文
摘要:import regeneratorRuntime from "../../lib/runtime/runtime.js"; /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under
阅读全文
摘要:// pages/cart/index.js import {getSetting,chooseAddress,openSetting} from '../../utils/asyncWx.js' import regeneratorRuntime from "../../lib/runtime/r
阅读全文
摘要:<view class="btm_tool"> <view class="tool_item"> <view class="iconfont icon-kefu"></view> <view> 联系客服 </view> <button open-type="contact"></button> </
阅读全文
摘要:// 点击轮播图 放大预览 handlePrevewImage(e){ // 1 先构造要预览的图片数组 const urls = this.GoodsInfo.pics.map(v=>v.pics_mid) // 2 接收传递过来的图片url const current = e.currentTa
阅读全文
摘要:// 同时发送的异步代码的次数 let ajaxTimes = 0; export const request=(params)=>{ ajaxTimes++; // 显示加载中效果 wx.showLoading({ title: "加载中", mask: true }); // 定义公共的url
阅读全文
摘要:"enablePullDownRefresh": true, "backgroundTextStyle":"dark" /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { console.log('下拉刷新') //1 重置数
阅读全文
摘要:// pages/goods_list/index.js import {request} from "../../request/index.js" import regeneratorRuntime from "../../lib/runtime/runtime.js"; Page({ /**
阅读全文
摘要:runtime.js /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the
阅读全文
摘要:/** * 页面的初始数据 */ data: { // 左侧菜单的数据 leftMenuList:[], // 右侧的商品数据 rightContent:[], // 被点击的 左侧的菜单 currentIndex:0 }, // 接口的返回数据 Cates:[], /** * 生命周期函数--监听
阅读全文
摘要:下载 小程序开发助手 和 easy less "less.compile": { "outExt": ".wxss" }, ok
阅读全文
摘要:"window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#eb4450", "navigationBarTitleText": "优购", "navigationBarTextStyle":"white"
阅读全文
摘要:"tabBar": { "color": "#999", "selectedColor": "#ff2d4a", "backgroundColor": "#fafafa", "list": [ { "pagePath": "pages/index/index", "text": "首页",
阅读全文
摘要:Page({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { console.log("onLoad"); // onLoad发送异步请求来初始化页面数据 }, /** * 生命周期函数
阅读全文

浙公网安备 33010602011771号