微信开发者工具
[图片]
页面点击保存会提示 statics.js:8 Uncaught ReferenceError: define is not defined,开发者工具是最新的,而且只有当前页面才会出现这个提示,并且打开图表之后也无法正常显示图表信息 下面是我当前页面的js代码 var app = getApp(); var util = require('../../utils/util.js'); var wxCharts = require('../../utils/wxcharts.js'); Page({ data: { date: '', amount: '', ring: '', line: '' }, onShow: function (options) { var date = util.formatDate(new Date()); this.setData({ date: date }) this.getRing(); this.getLine(); }, getRing: function () { var that = this; var date = that.data.date.substring(0, 7); var param = { "company_code": wx.getStorageSync("loginUserName"), "start": date + '-01', "end": date + '-31', "app_order_type": "1" }; app.ajax('/order/order/count/companyMoney', param, function (res) { console.log(res) if (res.ok) { that.setData({ amount: { sum: res.sum, yy_sum: res.yy_sum, qd_sum: res.qd_sum }, ring: res.result }) // that.showHt(res); } }); }, getLine: function () { var that = this; var date = that.data.date.substring(0, 7); var param = { "company_code": wx.getStorageSync("loginUserName"), "start": that.sixMonth() + '-01', "end": date + '-31', "app_order_type": "1" }; app.ajax('/order/order/count/companyMoney/other', param, function (res) { console.log(res) that.setData({ line: res.result }) // if(res.ok) { // that.showLine(res) // } }); }, left: function () { var date = this.data.date; var arr = date.split('-'); var year = arr[0]; //获取当前日期的年份 var month = arr[1]; //获取当前日期的月份 var year2 = year; var month2 = parseInt(month) - 1; if (month2 == 0) { year2 = parseInt(year2) - 1; month2 = 12; } if (month2 < 10) { month2 = '0' + month2; } var t2 = year2 + '-' + month2 + '-' + '-01'; this.setData({ date: t2 }) this.getRing(); this.getLine(); }, right: function () { var date = this.data.date; var arr = date.split('-'); var year = arr[0]; //获取当前日期的年份 var month = arr[1]; //获取当前日期的月份 var year2 = year; var month2 = parseInt(month) + 1; if (month2 == 13) { year2 = parseInt(year2) + 1; month2 = 1; } if (month2 < 10) { month2 = '0' + month2; } var t2 = year2 + '-' + month2 + '-' + '-01'; this.setData({ date: t2 }) this.getRing(); this.getLine(); }, showHt: function () { var data = this.data.ring,amount = this.data.amount; var windowWidth = 320; try { var res = wx.getSystemInfoSync(); windowWidth = res.windowWidth; } catch (e) { console.error('getSystemInfoSync failed!'); } var ser = []; data.forEach(function (item) { var one = { name: item._id.serviceType1_title + item.type_sum + '元', data: item.type_sum, stroke: false }; ser.push(one) }) new wxCharts({ animation: true, canvasId: 'ringCanvas', type: 'ring', extra: { ringWidth: 25, pie: { offsetAngle: 45 } }, title: { name: amount.sum + '元', color: '#7cb5ec', fontSize: 20 }, subtitle: { name: '营业收入', color: '#666666', fontSize: 15 }, series: ser, disablePieStroke: true, width: windowWidth, height: 200, dataLabel: false, legend: true, background: '#f5f5f5', padding: 0 }); }, showLine: function () { var data = this.data.line; var windowWidth = 320; try { var res = wx.getSystemInfoSync(); windowWidth = res.windowWidth; } catch (e) { console.error('getSystemInfoSync failed!'); } var cats = [], datas = []; data.forEach(function (item) { cats.push(item._id); datas.push(item.type_sum); }) new wxCharts({ canvasId: 'columnCanvas', type: 'column', animation: true, categories: cats, series: [{ name: '成交额', data: datas, format: function (val, name) { return val.toFixed(2) + '元'; } }], yAxis: { format: function (val) { return val + '元'; }, title: 'hello', min: 0 }, xAxis: { disableGrid: false, type: 'calibration' }, extra: { column: { width: 15 } }, width: windowWidth, height: 200 }); }, sixMonth: function () { var date = this.data.date; var arr = date.split('-'); var year = arr[0]; //获取当前日期的年份 var month = arr[1]; //获取当前日期的月份 var year2 = year; var month2 = parseInt(month) - 6; if (month2 <= 0) { year2 = parseInt(year2) - 1; month2 = 12 - (Math.abs(month2) % 12); } if (month2 < 10) { month2 = '0' + month2; } return year2 + '-' + month2 + '-01'; } })
[图片]有没有大佬帮帮我 该怎么办
[图片] [图片]
stable 1.03.2012120 开发工具没有代码上传功能? 之前的1.03.2006090就有。现在如何上传代码提交审核小程序呢?
https://developers.weixin.qq.com/miniprogram/dev/extended/component-plus/select-text.html [图片] 长按没有任何作用
[图片]
PC电脑上小程序PC端picker日期选择器不显示的bug
本人是Ubuntu18.04的系统,但是开发者工具只有mas和windows的,是不是我没有看清楚啊?
[图片]
[图片][图片]
完全相同的代码,使用 ci.preview()和ci.upload() 两个方法,得到的各个子包的size信息有差异,这个是方法内部处理的问题么?
我申请了微信小程序,还没有发布,感觉好复杂,有申请过人吗?求指导。谢谢。
[图片] 这个是什么情况
基础库是2.7.0,pc端微信版本是最新版本,pc端打开只有底部tab栏,其它白屏,mac可以打开,手机端也可以。 开发班在pc端上打开调试,再切换到正式版本,就能打开,但是只打开正式版就不行?
微信开发者工具的小程序模拟器跑得很好啊,一切正常!真机就不行了,只进fail回调,不进success。。。。而且,一开真机调试,就又正常运行了。。。
创建移动应用为什么选择类目中,只有一个(出行与交通-租车)想选择(出行与交通-城市共享交通)却没有?
微信怎么用电脑直播?知道的加我微信78925095 告诉我
最多能配置多少个合法域名
微信开发者工具1.03.2012121版本在调试公众号网页时跨域,1.03.2011120版本不存在这样的问题,访问的是同一个网址 Access to XMLHttpRequest at 'http://xxxx' from origin 'http://xxx' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
小程序助手
帮助小程序相关成员在手机端更方便、及时地管理小程序
小程序助手
扫码体验