随笔分类 -  微信小程序

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