mini-program
Cocoanerd
Pick a schedule you can live with, and stick to it. I don’t care if you suck at writing, if nobody reads, if you have nothing interesting to say. If you can demonstrate a willingness to write, and a desire to keep continually improving your writing, you will eventually be successful.
展开
-
支付宝小程序分包
今天小程序开发完毕了,需要进行测试。在这里小编为大家讲解下上传时候极容易遇见的问题包的大小官方文档明确说明,主包大小不许超过2M 所有分包大小不许超过4M然后我的小程序2.05M 完美超过了一丢丢。于是分包方案的实施,让问题迎刃而解。先简单说下分包的时候,非常简单,就是目录结构及设计到的路径的修改。主要修改文件app.json先给一个小白自己的app.json的demo{ "...原创 2019-10-14 15:11:11 · 2182 阅读 · 1 评论 -
支付宝小程序网络状态监听
不知道什么时候,貌似更新了工具,发现网络状态监听不到了。发现判断的字段和官方文档不对应了。上代码/** * 网络状态监听 */ networkManage() { var that = this; //监听网络状态 my.onNetworkStatusChange(function (res) { // console.log('网络状态'+J...原创 2019-10-08 10:51:58 · 897 阅读 · 0 评论 -
支付宝小程序tabs标签
本文主要针对支付宝小程序的tabs标签页切换进行自定义。大家可以发现官方文档是有点小缺陷的,可以支持页面左右滑动,但是要固定高度而且要写到acss样式文件里。不支持页面滑动的话高度可以自适应。但是还是有点小问题的哦。况且不支持滑动显得还是不是很友好。下面粘上我的代码。自定义实现tabs页切换和页面左右切换。page.axml<scroll-view scroll-x="true" c...原创 2019-09-16 13:57:02 · 2949 阅读 · 2 评论 -
微信小程序md5加密
md5.js/** A JavaScript implementation of the RSA Data Security, Inc. MD5 Message* Digest Algorithm, as defined in RFC 1321.* Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.* Code also contr...转载 2019-09-09 14:05:06 · 258 阅读 · 0 评论 -
支付宝小程序md5加密
commad C+ commad V搞起来/** A JavaScript implementation of the RSA Data Security, Inc. MD5 Message* Digest Algorithm, as defined in RFC 1321.* Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.* C...转载 2019-09-09 11:54:43 · 1222 阅读 · 0 评论 -
支付宝小程序网络请求封装
公司要开人,赔不起钱,还想把人利用干净。开发完微信小程序,又让开发支付宝小程序,稳住,虽然自己做iOS,但是会开发小程序也不错哦。上吧皮卡丘。直接贴代码 request.js/开发// const baseUrl = 'http://192.168.45.191:9183';//测试const baseUrl = 'http://192.168.100.142:9183';//tok...原创 2019-09-09 11:49:36 · 2790 阅读 · 4 评论 -
小程序开发版只能自己微信真机调试,别人微信步行,小程序开发版如何提供给测试人员测试
今天项目基本上完结了,接口也都调完了。自测的时候想用不统计机型多个微信号登录同时测试观察机型表现。结果发现为什么我的账号可以访问到小程序,别人的不可以。然后就按照标题类似的方式百度,发现并没有多少帖子说明。原来搜索的方式不对,搜索测试相关的,就看到又帖子说明。在这里也简单表述下问题及解决方案:作为开发版的开发者可以体验小程序,因为我又测试号id啊。为什么别人别人不行呢?没有权限喽。我们需要...原创 2019-08-14 13:44:22 · 20251 阅读 · 2 评论 -
微信小程序错误码参考
状态码(场景值)说明-1系统繁忙0 请求成功40001验证失败40002不合法的凭证类型40003不合法的OpenID40004不合法的媒体文件类型40005不合法的文件类型40006不合法的文件大小40007不合法的媒体文件id40008不合法的消息类型40009不合法的图片文件大小400...转载 2019-08-02 13:48:57 · 1380 阅读 · 0 评论 -
小程序网络请求封装 promise
今天项目的界面画完了,要为调接口坐准别了。我翻了网上的帖子,综合封装了一下,希望对入手小程序的人有帮助。新建一个request.js 再utils目录下request.js内容//BaseUrlconst baseUrl = 'http://192.168.45.191:9183';//tokenvar tokenKey = "token";// 登录地址, 根据这个地址来设置t...原创 2019-08-08 19:15:16 · 440 阅读 · 0 评论 -
小程序wxml里面的时间格式化
新建一个filter.wxs 文件,放到utils文件夹下。复制下面代码喽//日期格式化-------------------------------------------------------------var formatTime = function (strDate, format = "yyyy-MM-dd hh:mm:ss") { // 解决ios出现NaN问题 va...原创 2019-08-08 18:15:57 · 8019 阅读 · 7 评论 -
小程序自定义input框,带图片带删除按钮
废话不多说,先看下效果这个是我抽离出来的一个component组件。上代码:wxml文件<view class='input-class'> <image class='icon-class' src='{{inputIcon}}' mode="scaleToFill" ></image> <input class='input' p...原创 2019-08-02 11:54:26 · 3239 阅读 · 0 评论 -
小程序scroll-view与系统下拉刷新冲突
请不要喷我,标题太过吸引人。。。。毕竟我也是头一次做小程序开发今天开发小程序做的是一个tabs切换的页面,然而列表外层事用scrollview包含着的,系统的下拉刷新会被scroll-view的弹性禁用掉,大方向的解决方案大致归类为三种:一、自定义导航加自定义刷新二、采用scrollview,舍弃系统弹性下拉刷新,可以换中方式呈现,比如wx.showLoading 或者wx.showNavi...原创 2019-08-02 11:42:16 · 5451 阅读 · 0 评论 -
微信小程序自定义navigationbar与下拉刷新思考
第一次开发小程序,产品提出要求导航栏字体样式,然后系统的未提供修改的接口。那么只能自定义导航栏才行呀。迅速的自定义了一个导航栏app.json中添加"navigationStyle": "custom"创建一个componentwxml<view class='status-bar'> <view class='goBack' bindtap='goBack...原创 2019-07-24 20:27:17 · 5407 阅读 · 0 评论