- 使用flat函数把taskstemp数组中的5个子数组,放到一个数组tempexam里结果为0?
[图片] taskstemp数组中的5个子数组是分页取得数据,请问要怎么才把5个子数组中93个数据放到一个数组里?
2019-12-20 - 如下图所示,如何获取5个Promise中的值赋值给新的数组?
[图片] 如何获取5个Promise中的data值赋值给新的数组,网上没搜到类似的,,,,谢谢,
2019-12-19 - 腾讯云数据库单集合索引(也就是记录)限制:20个,如果要取大于20个记录应该怎么做?
[图片] 如图,每一次读取数据库集合,都只能够读取20条记录。如何一次读取全部记录或连续几次读取全部记录。
2019-12-04 - 已经开通了云开发,还需要创建域名吗?请大神指教。
已经开通了云开发,还需要创建域名吗?请大神指教。 能具体说一下嘛?
2019-11-29 - Cannot read property 'changeUserInfo' of undefine?
已经改正了好几处这样的错误了,还有,实在找不出问题,请大神帮忙看一下,不胜感激!!! data: { userInfo: {}, canIUse: wx.canIUse('button.open-type.getUserInfo') }, onLoad: function (){ var that = this; wx.getSetting ({ success(res) { if (res.authSetting['scope.userInfo']){ wx.getUserInfo({ success: function (res1){ var bmobUser = res1.result||{}; if (bmobUser.avatarUrl == '' || bmobUser.avatarUrl == undefined) { var resuserInfo = res.userInfo||{}; wx.changeUserInfo(resuserInfo.avatarUrl, resuserInfo.nickName).then(res2 => { }); //错误提示处 } 错误提示如下: VM3292:1 Setting data field "userInfo" to undefined is invalid. Cannot read property 'changeUserInfo' of undefined;at api operateWXData success callback function TypeError: Cannot read property 'changeUserInfo' of undefined
2019-11-26 - Cannot read property 'getUserInfo' of undefined?
请大神伸出援手,万分感谢! onLoad(e) { var that = this; wx.getUserInfo({ success(res) { wx.u.getUserInfo().then(res1 => { //红褐色部分为提示错误处 var bmobUser = res1.result; if (bmobUser.avatarUrl == '' || bmobUser.avatarUrl == undefined) { wx.u.changeUserInfo(res.userInfo.avatarUrl, res.userInfo.nickName).then(res2 => { }); } }) that.setData({ userInfo: res.userInfo }) } }) },
2019-11-26 - Cannot read property 'type1' of undefined什么错误?
求大神搭救啊,,,,,不胜感激 var app = getApp(); // var arr = app.globalData.proArray; var favo_icon_b = "/images/ico_3_h.png"; var favo_icon_c = "/images/ico_31.png" var color_right = "#00a0e9"; var color_err = "#eb3b3b"; var color_blank = "#fff"; var __chooseOne = 0; //题库信息 var prosData = [] var index = 0; var favo_data = [] //获取要做的题库信息 var randomsort = function (a, b) { return Math.random() > .5 ? -1 : 1 } var getPros = function (_chooseOne, _chooseTwo, _random) { prosData = [] var _prosData = JSON.parse(JSON.stringify(app.globalData.prosData)) var baseData = new Object(); __chooseOne = _chooseOne; switch (_chooseOne) { case 1: baseData = _prosData.sect1; break; case 2: baseData = _prosData.sect2; break; case 3: baseData = _prosData.sect3; break; } var baseData2 = [] var type1Data = [] baseData2 = baseData.type1 提示的错误 type1Data = baseData2.concat(_prosData.sect4.type1) switch (_chooseTwo) { case 1: prosData = type1Data; break; case 2: baseData2 = baseData.type2; var type2Data = baseData2.concat(_prosData.sect4.type2) prosData = type1Data.concat(type2Data) break; } onLoad: function (options) { index=0 prosData = [] console.log(options) var that = this; that.inquiryFavo(() => { if (that.checkFavo()) { that.setData({ favoIcon: favo_icon_c }) } else { that.setData({ favoIcon: favo_icon_b }) } }) 提示错误处 getPros(parseInt(options.chooseNumOne), parseInt(options.chooseNumTwo), options.random) console.log(prosData) if (options.random == "true") { this.setData({ chooseText: "随机练习" }) } else { this.setData({ chooseText: "顺序练习" }) } this.setData({ proSum: prosData.length }) this.loadPro() },
2019-11-25