随笔分类 -  微信小程序

摘要:const moment = require('./moment.min.js') module.exports = { formateDate: function (time, fmt = 'yyyy-MM-dd hh:mm:ss') { let _this = new Date(time) le 阅读全文
posted @ 2022-11-16 11:30 Panax 阅读(144) 评论(0) 推荐(0) 编辑
摘要:export const getAddress = function (wx) { return new Promise((resolve, reject) => { let _this = this wx.getSetting({ success: (res) => { let authSetti 阅读全文
posted @ 2022-11-16 11:15 Panax 阅读(321) 评论(0) 推荐(0) 编辑
摘要:'use strict' import { getToken } from './auth' const baseUrl1 = 'https://xxx'. // 域名地址 var Request = function (url, data, method="get",header,code=200 阅读全文
posted @ 2022-11-16 11:04 Panax 阅读(19) 评论(0) 推荐(0) 编辑
摘要:新建一个另外的组件 // components/noRecord/index.js Component({ /** * 组件的属性列表 */ properties: { }, /** * 组件的初始数据 */ data: { }, /** * 组件的方法列表 */ methods: { } }) 阅读全文
posted @ 2022-11-16 10:47 Panax 阅读(28) 评论(0) 推荐(0) 编辑
摘要:<!--components/noRecord/index.wxml--> <view class="mod_no_record"> <view class="content"> <image src="/imgs/no_record.png" alt srcset class="img" mode 阅读全文
posted @ 2022-11-16 10:40 Panax 阅读(22) 评论(0) 推荐(0) 编辑
摘要:<swiper class="{{swiperClass}}" current="{{activeTab}}" duration="{{duration}}" bindchange="handleSwiperChange" > <swiper-item wx:for="{{tabs}}" wx:ke 阅读全文
posted @ 2022-11-16 10:20 Panax 阅读(61) 评论(0) 推荐(0) 编辑
摘要:<scroll-view class="main_con" bindscrolltolower="getOrderList" // 写请求事件 scroll-y="true" > </scroll-view> 可以加上 scroll-with-animation = 'true' 平滑滚动 阅读全文
posted @ 2022-11-16 10:17 Panax 阅读(13) 评论(0) 推荐(0) 编辑
摘要:1. view 代替了原来的div标签。 2. wx:if 代替了原来的v-if 。wx:elif. 代替了原来的v-else-if 。 3: text 代替了原来的p 标签。 4. catch:tap 或者bind:tap 代替了click 事件,且不支持修饰符。 5. 自定义data-id属性, 阅读全文
posted @ 2022-11-16 09:55 Panax 阅读(167) 评论(0) 推荐(0) 编辑
摘要:介绍事件 bindtap 和 catchtap 都属于点击事件,绑定之后,点击组件是可以触发这个函数的。 区别 bindtap :子元素使用bindtap绑定事件后,执行的时候,会冒泡到父元素(触发父元素上绑定的bingtap事件) catchtap :不会冒泡到父元素上,阻止事件冒泡 阅读全文
posted @ 2022-11-16 09:18 Panax 阅读(137) 评论(0) 推荐(0) 编辑
摘要:开放工具太老,软件需要更新。 去官网上更新稳定版本,并在开发者工具中本地基础库选择对应版本。 开发者工具只是一个展示工具,建议在vscode中进行专业的编辑。 因为在开发者中进行设置less 转wxss ,没有生效。在vscode setting.json 中生效了。 具体设置: 在扩展中安装eas 阅读全文
posted @ 2022-11-15 17:32 Panax 阅读(109) 评论(0) 推荐(0) 编辑
摘要:1.下载city.js (https://download.csdn.net/download/qq_39023042/15502002) 2. 引入citys import citys from "@/utils/citys"; 3. 城市分组 // onLoad 里面: // 筛选level 3 阅读全文
posted @ 2021-03-01 16:06 Panax 阅读(273) 评论(0) 推荐(0) 编辑
摘要:wx.showToast({ title: '需要您授权用户信息用于注册或登陆', icon: 'none', }) 阅读全文
posted @ 2020-08-07 16:43 Panax 阅读(288) 评论(0) 推荐(0) 编辑
摘要:wx.navigateToMiniProgram({ appId: '', success(res) { }, }) 阅读全文
posted @ 2020-08-07 16:42 Panax 阅读(160) 评论(0) 推荐(0) 编辑
摘要:goWx() { this.navigate(); // 此方法针对H5 的返回键,对左上角点击无效, 无法添加点击事件,放到mounted 会无限循环。 }, navigate() { //控制页面跳转 小程序、公众号、非微信跳转方式 【modelName vue路由名字】 this.isMini 阅读全文
posted @ 2020-07-28 18:56 Panax 阅读(4876) 评论(0) 推荐(0) 编辑
摘要:1.加载本地图片 image class="widget__arrow" src="/image/arrowright.png" mode="aspectFill" 2.加载网络图片 image class="image_frame" src="{{imageUrl}}" mode="aspectF 阅读全文
posted @ 2018-12-07 14:40 Panax 阅读(2894) 评论(0) 推荐(0) 编辑
摘要:小程序上给出的文档要求里面的item最少2个,最多五个。 1) tabBar 指底部的 导航配置属性 2)color 未选择时 底部导航文字的颜色 3)selectedColor 选择时 底部导航文字的颜色 4)borderStyle 底部导航边框的样色(注意 这里如果没有写入样式 会导致 导航框上 阅读全文
posted @ 2018-12-07 14:03 Panax 阅读(607) 评论(0) 推荐(0) 编辑
摘要:很简单就是app.js 存下变量 在其他页面顶部引入 const app = getApp() app.globalData.scene 阅读全文
posted @ 2018-12-07 13:04 Panax 阅读(4315) 评论(0) 推荐(1) 编辑
摘要:有点类似jQuery Ajax、 阅读全文
posted @ 2018-12-07 12:56 Panax 阅读(162) 评论(0) 推荐(0) 编辑
摘要:微信小程序自带的一套规则,类似vue语法,但是好多功能都集成在api中,给了很多初学者轮子,所以首先要熟悉这些api,忘记可照官网继续开发 这里主要说下微信小程序的支付,原理类似上篇介绍的公众网页支付,话不多说,直接贴代码,不懂的可以直接留言,我们一起来探讨。 wxPay: function (pa 阅读全文
posted @ 2018-12-07 11:20 Panax 阅读(1177) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示