- getUnlimit能否本地调试
动态生成二维码,如何不审核通过也可以尽心本地调试
2019-07-19 - 开发者工具问题
[图片] 为什么开发者工具json这样的配置会出现自动生成两个文件夹的情况,而且不能删除文件夹,求官方给解释
2018-08-11 - 开发者工具问题
[图片] 为什么开发者工具json这样的配置会出现自动生成两个文件夹的情况,而且不能删除文件夹,求官方给解释
2018-08-11 - onPullDownRefresh es6 class面向对象调用问题
hello: 我碰到了一个这样的问题,下路刷新的时候进行数据比对,如果有变化则调用this.setData({}),真不知道是哪里写错了,还是无法调用, 在ajax成功回调里面调用这个 [代码]new[代码] [代码]appUtil.ObjectCpm(app.GO.page_data, res.data, [代码][代码]this[代码][代码]).resultOp()[代码] util工具类中是这样的 [代码]class ObjectCpm {[代码][代码] [代码][代码]constructor(obj1, obj2, pages) {[代码][代码] [代码][代码]this[代码][代码].result = [];[代码][代码] [代码][代码]this[代码][代码].item = [代码][代码]""[代码][代码];[代码][代码] [代码][代码]this[代码][代码].obj1 = obj1;[代码][代码] [代码][代码]this[代码][代码].obj2 = obj2;[代码][代码] [代码][代码]this[代码][代码].pages = pages;[代码][代码] [代码][代码]([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]try[代码] [代码]{[代码][代码] [代码][代码]if[代码] [代码](Object.prototype.toString.call(obj1) != [代码][代码]'[object Object]'[代码][代码]) [代码][代码]throw[代码] [代码]new[代码] [代码]Error([代码][代码]'第一的参数必须是对象'[代码][代码])[代码][代码] [代码][代码]if[代码] [代码](Object.prototype.toString.call(obj2) != [代码][代码]'[object Object]'[代码][代码]) [代码][代码]throw[代码] [代码]new[代码] [代码]Error([代码][代码]'第二的参数必须是对象'[代码][代码])[代码][代码] [代码][代码]if[代码] [代码](Object.prototype.toString.call(pages.onHide) != [代码][代码]'[object Function]'[代码][代码]) [代码][代码]throw[代码] [代码]'必须把page传入'[代码][代码] [代码][代码]} [代码][代码]catch[代码] [代码](err) {[代码][代码] [代码][代码]throw[代码] [代码]err[代码][代码] [代码][代码]}[代码][代码] [代码][代码]console.log(obj1)[代码][代码] [代码][代码]console.log(obj2)[代码][代码] [代码][代码]})()[代码][代码] [代码][代码]}[代码][代码] [代码][代码]// 比较类[代码][代码] [代码][代码]compary() {[代码][代码] [代码][代码]let result = [代码][代码]this[代码][代码].result[代码][代码] [代码][代码]let item = [代码][代码]this[代码][代码].item[代码][代码] [代码][代码]let obj1 = [代码][代码]this[代码][代码].obj1[代码][代码] [代码][代码]let obj2 = [代码][代码]this[代码][代码].obj2[代码][代码] [代码][代码]for[代码] [代码](let i [代码][代码]in[代码] [代码]obj1) {[代码][代码] [代码][代码]switch[代码] [代码](Object.prototype.toString.call(obj1[i])) {[代码][代码] [代码][代码]case[代码] [代码]"[object Number]"[代码][代码]:[代码][代码] [代码][代码]item = obj1[i] != obj2[i] && i[代码][代码] [代码][代码]result.push(item)[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]case[代码] [代码]"[object String]"[代码][代码]:[代码][代码] [代码][代码]item = obj1[i] != obj2[i] && i[代码][代码] [代码][代码]result.push(item)[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]case[代码] [代码]"[object Boolean]"[代码][代码]:[代码][代码] [代码][代码]item = obj1[i] != obj2[i] && i[代码][代码] [代码][代码]result.push(item)[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]case[代码] [代码]"[object Object]"[代码][代码]:[代码][代码] [代码][代码]let objectChange = [代码][代码]true[代码][代码] [代码][代码]let resluts = ObjectCpm(obj1[i], obj2[i])[代码][代码] [代码][代码]for[代码] [代码](let j [代码][代码]in[代码] [代码]resluts) {[代码][代码] [代码][代码]if[代码] [代码](resluts[j] != [代码][代码]false[代码][代码]) {[代码][代码] [代码][代码]objectChange = [代码][代码]false[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]item = !objectChange && i[代码][代码] [代码][代码]result.push(item)[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]case[代码] [代码]"[object Array]"[代码][代码]:[代码][代码] [代码][代码]let items = obj1[i],[代码][代码] [代码][代码]objectChanges = [代码][代码]true[代码] [代码] [代码][代码]if[代码] [代码](obj1[i].length != obj2[i].length) {[代码][代码] [代码][代码]item = i[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]for[代码] [代码](let z [代码][代码]in[代码] [代码]obj1[i]) {[代码][代码] [代码][代码]if[代码] [代码](Object.prototype.toString.call(obj1[i][z]) == [代码][代码]"[object Object]"[代码][代码]) {[代码][代码] [代码][代码]let resluts = ObjectCpm(obj1[i][z], obj2[i][z])[代码][代码] [代码][代码]for[代码] [代码](let m [代码][代码]in[代码] [代码]resluts) {[代码][代码] [代码][代码]if[代码] [代码](resluts[m] != [代码][代码]false[代码][代码]) {[代码][代码] [代码][代码]objectChanges = [代码][代码]false[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]item = !objectChanges && i[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]item = obj1[i][z] != obj2[i][z] && i[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]result.push(item)[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]result[代码][代码] [代码][代码]}[代码][代码] [代码][代码]//结果类[代码][代码] [代码][代码]resultOp() {[代码][代码] [代码][代码]let page = [代码][代码]this[代码][代码].pages[代码][代码] [代码][代码]let resluts = [代码][代码]this[代码][代码].compary()[代码][代码] [代码][代码]let obj2 = [代码][代码]this[代码][代码].obj2[代码][代码] [代码][代码]for[代码] [代码](let i = 0; i < resluts.length; i++) {[代码][代码] [代码][代码]if[代码] [代码](resluts[i] != [代码][代码]false[代码][代码]) {[代码][代码] [代码][代码]page.setData({ [resluts[i]]: obj2[resluts[i]] })[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码]}[代码] 但是使用时出现 [图片] 请问如何正确调用?
2018-07-26 - @官方线上小程序点击事件反应时间变长
问一下各位最近有没有发现这样的问题,点击加减或者选择口味,给他们元素上使用bindtap。然后进行加减操作,但是反馈的时间变长了,可以参照美团外卖等线上小程序去体验,延迟很长,是this.setData方法有做了什么调整么?请官方给出相应解答 [图片]
2018-07-05 - project.config.json
[图片] [图片] 为何我打包上传依然告诉我没有打包,不是已经忽略了么
2018-06-07 - 组件的wxss的引用
[图片] [图片] @官方,可否向vue一样,引用工共WXSS,或者直接使用app.wxss中的样式表
2018-05-23 - 小程序如何面向对象编程
- 需求的场景描述(希望解决的问题) [代码]Page({[代码][代码] [代码][代码]onload(){[代码][代码]let app = getApp()[代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]let customer = [代码][代码]new[代码] [代码]customer(app ,that )[代码][代码]}[代码][代码]})[代码] [代码][代码][代码]function[代码] [代码]customer(app,indexPage){[代码][代码] [代码][代码]this[代码][代码].app= app[代码][代码] [代码][代码]this[代码][代码].api= [代码][代码]'//api地址[代码][代码] [代码][代码]this.appid= '[代码][代码]'//appid[代码][代码] [代码][代码]// this.indexPage = indexPage[代码][代码]}[代码][代码]customer.prototype.login=function(){[代码][代码] [代码][代码]let result ={}[代码][代码] [代码][代码]let thatt = this[代码][代码] [代码][代码]let url = this.api + "地址"[代码][代码] [代码][代码]let form_data = {}[代码][代码] [代码][代码]wx.login({[代码][代码] [代码][代码]success: function (res) {[代码][代码] [代码][代码]let client_code = res.code[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: url,[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]app_id: thatt.appid,[代码][代码] [代码][代码]client_code: client_code,[代码][代码] [代码][代码]scene: '[代码][代码]101[代码][代码]',[代码][代码] [代码][代码]},[代码][代码] [代码][代码]method: '[代码][代码]POST[代码][代码]',[代码][代码] [代码][代码]success: function (res) {[代码][代码] [代码][代码]if (res.data.status == '[代码][代码]success[代码][代码]') {[代码][代码] [代码][代码]result=res.data.data[代码][代码] [代码][代码]console.log(result)[代码][代码] [代码][代码]// thatt.indexPage.setData({ login_info: res.data.data })[代码][代码] [代码][代码]} else { systemAlert(res.data.info); }[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: function (res) { systemAlert(res.errMsg); }[代码][代码] [代码][代码]})[代码][代码] [代码] [代码] [代码][代码]},[代码][代码] [代码][代码]fail: function (res) { systemAlert('[代码][代码]登陆失败'); }[代码][代码] [代码][代码]})[代码][代码]}[代码]为什么这个时候我登陆成功以后为什么不能用thi.setData({})
2018-04-16 - @官方 开发者工具无法打开项目
[图片] 已经重新登陆几次了为什么无法登陆进去,
2017-11-16 - 设置了swiper-item的宽度以后出现的问题
[图片] 如图,设置了swiper-item宽度以后,滑动会出现显示bug
2017-09-29