遇到同样问题
小程序云开发上线后怎么管理数据库?最近阅读小程序云开发的文档时,一直没明白一个问题。假如我给客户开发上线了一个云开发的小程序后,数据库初始有一些信息,但是后期客户肯定会更新数据,有一个web版的管理后台来更新数据信息吗?或者说通过其他方式管理数据库?不可能让用户用web开发工具的云开发控制台吧?
2021-06-09同问
云开发的小程序上线后怎么管理数据库?如果我给客户开发上线了一个云开发的小程序后,数据库初始有一些信息,但是后期客户肯定会更新数据,这里没有后台管理系统,怎么更新信息呢?
2021-06-09不知道怎么回事请求帮助我是个菜鸟
我的云函数update问题请帮助?我在云函数里写update更新数据,里面有多个update语句,只执行第一个,第二个成功后第三个就退出不执行了为什么?我是个菜鸟。 const cloud = require('wx-server-sdk') cloud.init({ env: 'jlccba-0gjdzjbs62e3fd4b', }) const db=cloud.database() const _ = db.command var timestamp = Date.parse(new Date()); var date = new Date(timestamp); var thisyear=date.getFullYear(); // 云函数入口函数 exports.main = async (event, context) => { try { // 遍历修改数据库信息 for (let i = 0; i < event.data.length; i++) { console.log(event.data) 第一个: db.collection('match').where({ _id: event.data[i]._id }).update({ data: { mth_results_primary: event.data[i].mth_results_primary, mth_results_second: event.data[i].mth_results_second, mth_finish_flag:'1', }, }) if(event.data[i].mth_results_primary !=0 || event.data[i].mth_results_second!=0){ if (event.data[i].mth_results_primary>event.data[i].mth_results_second){ 第二个 await db.collection(thisyear.toString()).where({teamname:event.data[i].mth_name_primary}).update({ data:{ t_absolute_score:_.inc(event.data[i].mth_results_primary-event.data[i].mth_results_second), t_victory:_.inc(1), t_score:_.inc(2) } }) 第三个 await db.collection(thisyear.toString()).where({teamname:event.data[i].mth_name_second}).update({ data:{ t_absolute_score:_.inc(event.data[i].mth_results_second-event.data[i].mth_results_primary), t_lost:_.inc(-1), t_score:_.inc(1) } }) }else{ await db.collection(thisyear.toString()).where({teamname:event.data[i].mth_name_second}).update({ data:{ t_absolute_score:_.inc(event.data[i].mth_results_second-event.data[i].mth_results_primary), t_victory:_.inc(1), t_score:_.inc(2) } }) console.log('问问:'+event.data[i].mth_name_primary) await db.collection(thisyear.toString()).where({teamname:event.data[i].mth_name_primary}).update({ data:{ t_absolute_score:_.inc(event.data[i].mth_name_primary-event.data[i].mth_name_second), t_lost:_.inc(-1), t_score:_.inc(1) } }) console.log('我我:'+event.data[i].mth_name_primary) } } } return { success: true, data: event.data } } catch (e) { return { success: false, errMsg: e } } }
2021-06-07数据加载失败几秒前 加载 “cosListBucket” 失败:{"error":{"Code":"PaymentRequired","Message":"The action performed on your resource is not allowed for now, please check the quota of your package.","Resource":"6a6c-jlccba-0gjdzjbs62e3fd4b-1305934875.cos.ap-shanghai.myqcloud.com","RequestId":"NjBiYzQ1NTdfYTM5ZjA4MDlfMmVjNF9iN2RiYWY=","TraceId":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0MTA2MzlhODljYTgwODczMTAzZGU1OGMxZmY5YzExYjI="},"statusCode":402,"headers":{"connection":"keep-alive","content-length":"559","content-type":"application/xml","date":"Sun, 06 Jun 2021 03:47:35 GMT","server":"tencent-cos","x-cos-request-id":"NjBiYzQ1NTdfYTM5ZjA4MDlfMmVjNF9iN2RiYWY=","x-cos-trace-id":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0MTA2MzlhODljYTgwODczMTAzZGU1OGMxZmY5YzExYjI="}}
发起云存储为什么会提示“列表是空的, 因为发生了错误。”报错?数据加载失败几秒前 加载 “cosListBucket” 失败:{"error":{"Code":"PaymentRequired","Message":"The action performed on your resource is not allowed for now, please check the quota of your package.","Resource":"6a6c-jlccba-0gjdzjbs62e3fd4b-1305934875.cos.ap-shanghai.myqcloud.com","RequestId":"NjBiYzQ1NTdfYTM5ZjA4MDlfMmVjNF9iN2RiYWY=","TraceId":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0MTA2MzlhODljYTgwODczMTAzZGU1OGMxZmY5YzExYjI="},"statusCode":402,"headers":{"connection":"keep-alive","content-length":"559","content-type":"application/xml","date":"Sun, 06 Jun 2021 03:47:35 GMT","server":"tencent-cos","x-cos-request-id":"NjBiYzQ1NTdfYTM5ZjA4MDlfMmVjNF9iN2RiYWY=","x-cos-trace-id":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0MTA2MzlhODljYTgwODczMTAzZGU1OGMxZmY5YzExYjI="}}
2021-06-06同样的问题 加载 “cosListBucket” 失败:{"error":{"Code":"PaymentRequired","Message":"The action performed on your resource is not allowed for now, please check the quota of your package.","Resource":"6a6c-jlccba-0gjdzjbs62e3fd4b-1305934875.cos.ap-shanghai.myqcloud.com","RequestId":"NjBiYjlkMDBfZmU5ZjA4MDlfMTIwNjFfYTk4MjJi","TraceId":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0MTA2MzlhODljYTgwODczMTAzZGU1OGMxZmY5YzExYjI="},"statusCode":402,"headers":{"connection":"keep-alive","content-length":"559","content-type":"application/xml","date":"Sat, 05 Jun 2021 15:49:20 GMT","server":"tencent-cos","x-cos-request-id":"NjBiYjlkMDBfZmU5ZjA4MDlfMTIwNjFfYTk4MjJi","x-cos-trace-id":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0MTA2MzlhODljYTgwODczMTAzZGU1OGMxZmY5YzExYjI="}}
为什么在云开发平台上的云存储无法使用?版本都是官网最新的,一直报错,然后显示列表是空的,因为发生了错误。也找不到答案,卸载重装也不行,一直报错不停,上传文件不行,创建文件夹也不行。完全做不了列表是空的, 因为发生了错误。列表是空的, 因为发生了错误。列表是空的, 因为发生了错误。
2021-06-05同样的问题 求助
云开发 云存储内容消失了?加载 “cosListBucket” 失败:{"error":"error","headers":{
2021-06-05我的也开始出现这个问题怎么解决
云开发存储无法读取?出现这个错误 数据加载失败加载 “cosListBucket” 失败:{"error":"error","headers":{}} [图片]
2021-06-05这个问题解决了吗? 也是这样的问题。
小程序 value未定义错误提示: [图片]代码: [代码]// pages/music/music.js[代码][代码]var[代码] [代码]config = require([代码][代码]'../../config.js'[代码][代码]);[代码] [代码]Page({[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]value:[代码][代码]' '[代码][代码],[代码][代码]//定义了变量 value :用来保存用户输入的查询关键字[代码][代码] [代码][代码]loading: [代码][代码]false[代码][代码],[代码][代码]//按键前的loading图标[代码][代码] [代码][代码]list: [], [代码][代码]//搜索结果[代码][代码] [代码][代码]ranks: [{[代码][代码] [代码][代码]type: 26,[代码][代码] [代码][代码]text: [代码][代码]'热歌'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 23,[代码][代码] [代码][代码]text: [代码][代码]'销量'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 18,[代码][代码] [代码][代码]text: [代码][代码]'民谣'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 19,[代码][代码] [代码][代码]text: [代码][代码]'摇滚'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 5,[代码][代码] [代码][代码]text: [代码][代码]'内地'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 6,[代码][代码] [代码][代码]text: [代码][代码]'港台'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 16,[代码][代码] [代码][代码]text: [代码][代码]'韩国'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 17,[代码][代码] [代码][代码]text: [代码][代码]'日本'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]type: 3,[代码][代码] [代码][代码]text: [代码][代码]'欧美'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]],[代码][代码] [代码][代码]},[代码][代码] [代码][代码]//保存输入的关键字[代码][代码] [代码][代码]inputing: [代码][代码]function[代码][代码](e) {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]value: e.datail.value [代码][代码]//更新搜索关键字[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码][代码] [代码][代码]//立即搜索按钮[代码][代码] [代码][代码]bindSearch: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]var[代码] [代码]self = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]loading: !self.data.loading[代码][代码] [代码][代码]});[代码][代码] [代码][代码]//开始搜索[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: config.config.searchByNameUrl,[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]keyword: self.data.value[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](e) {[代码][代码] [代码][代码]if[代码] [代码](e.statusCode == 200) {[代码][代码] [代码][代码]self.setData({[代码][代码] [代码][代码]list: e.data.showapi_res_body.pagebean.contentlist,[代码][代码] [代码][代码]loading: !self.data.loading [代码][代码]//更新立即搜索按钮的loading图标[代码][代码] [代码][代码]});[代码][代码] [代码][代码]//将歌曲保存到本地缓存中[代码][代码] [代码][代码]wx.setStorageSync([代码][代码]'songlist'[代码][代码], e.data.showapi_res_body.pagebean.contentlist);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码]})[代码]已经定义了value,却提示没有定义。应该如何解决这个问题?
2021-05-22