- 博客(16)
- 收藏
- 关注
原创 Vue 报错undefined is not iterable (cannot read property Symbol(Symbol.iterator)) 【解决】
Vue 报错undefined is not iterable (cannot read property Symbol(Symbol.iterator)) 【解决】
2022-06-10 16:34:07
14539
原创 微信的跳转问题
使用wx.navigateTo跳转会出现跳转不进去 然后报错errMsg: “navigateTo:fail webview count limit exceed“ 这是因为小程序说了当你多次跳转后不清空页面栈时 会出现报错从而跳转不成功 所以我们可以用wx.redirectTo 关闭当前页面,跳转到应用内某个页面。(如果下一页面 有返回上一页箭头,则跳过当前页面)// 适合登录页wx.reLaunch 关闭所有页面,打开到应用内的某个页面。(不会有返回上一页箭头)// 适合退出登录以上
2022-05-31 14:54:54
512
原创 数组部分操作(二)
unshift()方法向数组首位插入一个对象或者字符串 const dataList = [ {dictValue: "BAO_GAN", dictLabel: "包干拉货", dictType: "contract_type", dictSort: 2}, {dictValue: "JI_LIANG", dictLabel: "计量拉货", dictType: "contract_type", dictSort: 3}, {dictValue: "YUE_J..
2022-05-12 17:50:27
119
原创 数组的部分操作(一)
移除最后一个数组元素 xxx.pop()const sites = ['Google', 'Runoob', 'Taobao', 'Zhihu', 'Baidu']; console.log(sites.pop());// 输出结果为: "Baidu" console.log(sites);// 输出结果为: ['Google', 'Runoob', 'Taobao', 'Zhihu'] sites.pop(); console.log(sites);// 输出结果为: ["G
2022-05-07 16:42:51
80
原创 小程序中使用bindscrolltolower下拉加载有时候不触发
在容器内向下滚动内容至底部的时候,偶尔会出现不触发bindscrolltolower事件还是可以触发但是 必须先下滑再上拉才能触发原因:应该是因为安卓手机下拉滑动到底部时,系统监听到距离底部的距离通常大于50,所以不能触发相应的函数;而小程序默认下拉离底部50px时触发函数(ios没有这种情况)目前解决方法:可以通过官网给出的属性让他在滑动到底部之前执行加载将lower-threshold设置成200 <scroll-view scroll-y bindscrolltol
2022-05-05 17:56:42
2057
1
原创 小程序重复调用接口
使用小程序的节流// 函数节流function throttle(fn, interval = 2000) { var enterTime = 0; //触发的时间 var gapTime = interval; //间隔时间,如果interval不传,则默认2000ms return function (e) { var that = this; var backTime = new Date(); //第一次函数return即触发的时间 if (backTim
2022-04-27 16:50:59
810
原创 小程序带参返回上一页以及带参跳转
带参返回上一页submit() { // 返回上一页,并更新上一页的参数 const pages = getCurrentPages() const prevPage = pages[pages.length - 2] prevPage.setData({ xxx: this.data.xxx }) wx.navigateBack() },带参跳转 url="/pages/chooseWasteType/c
2022-04-22 15:37:19
928
原创 原生小程序下拉刷新列表且保存之前的数据
用concat这个方法存入新数组中上拉加载时再传页数回去就好了如果把加载列表的方法写在onShow里面的话建议多加一个判断 不然会出先重复数据
2022-04-22 15:19:48
283
原创 点击图片在新网页中打开
HTML<img :src="url" @click="openPhoto(url)"/>JavaScriptopenPhoto (url) { var newwin = window.open() newwin.document.write("<img src="+str+" />")},
2022-04-20 15:17:01
1168
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人