![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
微信小程序
撸码的小哥
为了曾经吹过的牛逼而努力撸码
展开
-
uni-app之微信小程序web-view显示H5页面
<template> <view class="webview"> <web-view :webview-styles="webviewStyles" :style="webviewStyles" :src="link" @message="onWebMessage"></web-view> </view></template><script> import { siteDomain.原创 2021-02-18 09:47:14 · 1753 阅读 · 0 评论 -
微信小程序之卡片轮播
wxml:<swiper bindchange="cardSwiper" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500" indicator-color="#8799a3" indicator-active-color="#0081ff" class="cardSwiper"> <block wx:for="{{swiperList}}" wx:key="原创 2020-10-13 21:47:26 · 1055 阅读 · 0 评论 -
微信小程序之setData使用
setData()1、参数接受一个对象,以key,value的形式表示;2、参数和变量名称一致,可用一个值代替(es6新语法特性)3、可以设置一个或多个数据this.setData({ list:'change data', info:'change data'})4、修改json对象that.setData({ 'carSum.total_count': count, 'carSum.total_fee': sum})5、修改数组项的属性let q...原创 2020-10-13 21:44:00 · 436 阅读 · 0 评论 -
微信小程序路由跳转带参数,传递对象易错点
微信小程序报错 Unexpected end of JSON input;at pages/flow/checkout page getOrderData function这个报错是在将数组对象通过页面传值,传到指定页面时报的错。是因为JSON.parse无法识别某些url中的特殊字符,所以报错。因此解决这个报错的方法是将要传输的数据用 encodeURIComponent()函数(可把字符串作为 URI 组件进行编码) 先进行编码,传输过去后再通过decodeURIComponent()函数解原创 2020-10-13 21:40:07 · 776 阅读 · 1 评论