微信小程序
大秦白起
从前喜欢一个人,现在喜欢一个人,以后喜欢一个人
展开
-
Unexpected token o in JSON at position 1 报错原因
JSON.parse()和JSON.stringify()之间互转JSON.parse():json字符串转json对象JSON.stringify():json对象转json字符串let aa = {a: 2, b: 3, c: 4}let aaa = JSON.stringify(aa)console.log(aaa) ==> {"a":2,"b":3,"c":4}wx.setStorageSync('aa', aaa)let bb = wx.getStora...原创 2021-01-11 17:55:55 · 326 阅读 · 0 评论 -
微信小程序轮播图
wxml中编写<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <block wx:for="{{imgUrls}}"> <swiper-ite原创 2018-07-09 17:04:22 · 338 阅读 · 0 评论 -
小程序获取页面的输入值input-buttom
一:立即刷新(我自己也不知道为什么,在手机上并不能显示button按钮)WXML:<input class='address'type="text" placeholder="合肥市蜀山区蔚蓝商务港A座" bindinput="voteTitle"><button >查询</button></input>(本来是想点击再查询,谁知原创 2018-07-18 11:26:00 · 1684 阅读 · 0 评论 -
微信小程序wepy框架
标题---》头部 ------在app.wpy里或当前页面更改导航栏---》底部 ------只能在app.wpy里更改npm install wepy-cli -g 安装更新最新的wepywepy init standard myproject 创建生成demo项目(会将以前的项目覆盖,修改app,生成index页面)npm install 安装依赖wep...原创 2018-08-30 11:34:22 · 174 阅读 · 0 评论 -
微信小程序---定位和逆地址解析
1.获取微信小程序定位,首先需要授权wx.getSetting 获取用户当前的授权状态wx.openSetting 打开设置界面,引导用户开启授权(是用户已经 授权/拒绝 的权限)wx.authorize 进行授权 scope.userInfo wx.getUserInfo 用户信息 scope.userLocation wx.getLocation, wx...原创 2019-03-15 11:28:02 · 1192 阅读 · 0 评论 -
微信小程序map地图
<style lang="less"> @import "../../assets/styles/base"; @import "../../assets/styles/px"; @import "../../assets/styles/icons"; page { background-color: #F8F8F8; height: 100%; ...原创 2019-04-19 16:42:59 · 360 阅读 · 0 评论 -
微信小程序动态切换城市,swiper显示不同,一张图到多张图可以, 多张图到一张图不可以
<swiper class="swiper-box" current="{{current}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" @change="bannerChange"> <block w...原创 2019-06-01 09:00:34 · 814 阅读 · 0 评论 -
微信小程序(滑动)-animation
官方api: https://developers.weixin.qq.com/miniprogram/dev/api/ui/animation/wx.createAnimation.html例:<style lang="less">.container { display: flex; flex-direction: column; box-siz...原创 2019-07-24 14:35:28 · 481 阅读 · 0 评论 -
微信小程序 ----- 按钮拖拽
<view class="body-suspension" style="top: {{UDnumber}}px; left: {{LRnumber}}px;" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend"> 拖拽</view>data...原创 2019-07-23 15:38:52 · 624 阅读 · 0 评论