顶一下
云开发开通报错?[图片] AppId:wxf4c087b7458dfeb0 公众号已经认证复用资质建立的小程序,开通云开发报错
2023-04-02首先声明一下list为空数组 let i=[] 然后再执行写入i的值 尝试一下不行再找我
小程序联表查询 结果如何正确显示在屏幕上?我使用了联表查询,读取出了1个想要的数据,相关代码如代码1所示。然后我借用变量i想要让它显示在屏幕上,相关代码如代码2所示。 但是尽管我已经把读取的数据量降低到了1个,在屏幕上显示的还是i的位置显示的是[object Object],我想知道正确的显示方法是什么呢? 代码2: queryData:function(){ wx.cloud.callFunction({ name: "connect", }).then(res=>{ console.log(res) this.setData({ i: res }) }) 代码1: // 云函数入口文件 const cloud = require('wx-server-sdk') cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) // 使用当前云环境 const db = cloud.database() const _ = db.command const $ = _.aggregate // 云函数入口函数 exports.main = async (event, context) => { return await db.collection('books').aggregate() .lookup({ from:"author", // localField: 'authorid', // foreignField: 'number', // as: 'newlist' }) .match({ name: "《小王子》" }) .replaceRoot({ newRoot: $.mergeObjects([$.arrayElemAt(['$newlist', 0]), '$$ROOT']) }) .project({ _id:0, authorname:1, }) .end() // return db.collection("books").aggregate() // // .lookup({ // from:"author", // // localField: 'author', // // foreignField: 'number', // // as: 'newlist' // // }).end({ // success:function(res){ // return res.data.name; // }, // fail(error) { // return error; // } // }) }
2023-01-30方便上传console图片查看一下报错吗
利用模板来做小程序,我是小白,求大哥来解救下面出了什么问题?VM189:22 WXMLRT_$gwx:./common/template/list.wxml:view:2:4: wx:key="{{index}}" does not look like a valid key name (did you mean wx:key="index" ?) _wp @ VM189:22 d_.<computed>.list @ VM189:1280 m8 @ VM189:1396 (anonymous) @ VM189:1613 y @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 u.create @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 O.prepare @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 xt @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 It @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 u @ asdebug.js:10 (anonymous) @ asdebug.js:1 f @ asdebug.js:1 g @ asdebug.js:1 (anonymous) @ asdebug.js:1 _ws.onmessage @ asdebug.js:1 [WXML Runtime warning] ./pages/register/register.wxml wx:key="{{item.id}}" does not look like a valid key name (did you mean wx:key="id" ?) 42 | <view class="text"> 43 | <radio-group class="radio-group"> > 44 | <label wx:for="{{sex}}" wx:for-item="item" wx:key="{{item.id}}"> | ^ 45 | <radio value="{{item.value}}" checked="{{item.checked}}" /> {{item.name}} 46 | </label> 47 | </radio-group> [WXML Runtime warning] ./pages/register/register.wxml wx:key="{{index}}" does not look like a valid key name (did you mean wx:key="index" ?) 148 | </view> 149 | <view class="study-wrap"> > 150 | <view class="addstudy delestudy" bind:tap="goAdd" wx:for="{{studyInfo}}" wx:key="{{index}}"> | ^ 151 | <text class="add delete" catch:tap="deleAdd" data-index="{{index}}">x</text> 152 | <text class="school">{{item.school}}</text> 153 | <text class="zye">{{item.zye}}</text> [WXML Runtime warning] ./pages/register/register.wxml wx:key="{{index}}" does not look like a valid key name (did you mean wx:key="index" ?) 165 | </view> 166 | <view class="study-wrap"> > 167 | <view class="addstudy delestudy" bind:tap="goAddwork" wx:for="{{workInfo}}" wx:key="{{index}}"> | ^ 168 | <text class="add delete" catch:tap="deleAddwork" data-index="{{index}}">x</text> 169 | <text class="school">{{item.name}}</text> 170 | <text class="zye">{{item.zwei}}</text> register.js? [sm]:101 {type: "tap", timeStamp: 107257, target: {…}, currentTarget: {…}, detail: {…}, …} register.js? [sm]:101 {type: "tap", timeStamp: 108054, target: {…}, currentTarget: {…}, detail: {…}, …} register.js? [sm]:116 {type: "tap", timeStamp: 109601, target: {…}, currentTarget: {…}, detail: {…}, …} register.js? [sm]:116 {type: "tap", timeStamp: 110188, target: {…}, currentTarget: {…}, detail: {…}, …} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} DevTools: CPU profile parser is fixing 4 missing samples. register.js? [sm]:95 {type: "tap", timeStamp: 218265, target: {…}, currentTarget: {…}, detail: {…}, …} register.js? [sm]:88 picker发送选择改变,携带值为 1980-07-05 register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} register.js? [sm]:131 form发生了submit事件,携带数据为: {} [WXML Runtime warning] ./common/template/list.wxml wx:key="{{index}}" does not look like a valid key name (did you mean wx:key="index" ?) 1 | <template name="list"> > 2 | <view class="list" wx:for="{{list}}" wx:key="{{index}}" > | ^ 3 | <view class="check-box" wx:if="{{isDelete}}"> 4 | <checkbox-group bind:change="checkboxChange" data-id="{{item.ID}}"> 5 | <label class="checkbox"> asdebug.js:10 POST http://127.0.0.1wx/index/init net::ERR_NAME_NOT_RESOLVED(env: Windows,mp,1.06.2301040; lib: 2.6.0) v @ asdebug.js:10 createRequestTask @ asdebug.js:10 invoke @ asdebug.js:10 r @ asdebug.js:10 invoke @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 X @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 ji @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 i @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 t @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 value @ apihook.js?t=wechat&s=1675004718479&v=0cffbba9918afb1342c18e2fdfb25ef5:1 getAtrList @ index.js? [sm]:235 onLoad @ index.js? [sm]:65 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 p.__callPageLifeTime__ @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Ct @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 It @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 u @ asdebug.js:10 (anonymous) @ asdebug.js:1 f @ asdebug.js:1 g @ asdebug.js:1 (anonymous) @ asdebug.js:1 _ws.onmessage @ asdebug.js:1 Show 7 more frames asdebug.js:10 POST http://127.0.0.1wx/hits/add net::ERR_NAME_NOT_RESOLVED(env: Windows,mp,1.06.2301040; lib: 2.6.0) v @ asdebug.js:10 createRequestTask @ asdebug.js:10 invoke @ asdebug.js:10 r @ asdebug.js:10 invoke @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 X @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 ji @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 i @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 t @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 value @ apihook.js?t=wechat&s=1675004718479&v=0cffbba9918afb1342c18e2fdfb25ef5:1 addhits @ util.js? [sm]:101 onLoad @ index.js? [sm]:66 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 p.__callPageLifeTime__ @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Ct @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 It @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 u @ asdebug.js:10 (anonymous) @ asdebug.js:1 f @ asdebug.js:1 g @ asdebug.js:1 (anonymous) @ asdebug.js:1 _ws.onmessage @ asdebug.js:1 Show 7 more frames WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 request:fail (env: Windows,mp,1.06.2301040; lib: 2.6.0) Xe @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Wi @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 (anonymous) @ asdebug.js:10 a.emit @ asdebug.js:1 callback @ asdebug.js:10 (anonymous) @ asdebug.js:10 setTimeout (async) h @ asdebug.js:10 O.onerror @ asdebug.js:10 error (async) v @ asdebug.js:10 createRequestTask @ asdebug.js:10 invoke @ asdebug.js:10 r @ asdebug.js:10 invoke @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 X @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 ji @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 i @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 t @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 value @ apihook.js?t=wechat&s=1675004718479&v=0cffbba9918afb1342c18e2fdfb25ef5:1 getAtrList @ index.js? [sm]:235 onLoad @ index.js? [sm]:65 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 p.__callPageLifeTime__ @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Ct @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 It @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 u @ asdebug.js:10 (anonymous) @ asdebug.js:1 f @ asdebug.js:1 g @ asdebug.js:1 (anonymous) @ asdebug.js:1 _ws.onmessage @ asdebug.js:1 Show 20 more frames WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 request:fail (env: Windows,mp,1.06.2301040; lib: 2.6.0) Xe @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Wi @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 (anonymous) @ asdebug.js:10 a.emit @ asdebug.js:1 callback @ asdebug.js:10 (anonymous) @ asdebug.js:10 setTimeout (async) h @ asdebug.js:10 O.onerror @ asdebug.js:10 error (async) v @ asdebug.js:10 createRequestTask @ asdebug.js:10 invoke @ asdebug.js:10 r @ asdebug.js:10 invoke @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 X @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 ji @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 i @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 t @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 value @ apihook.js?t=wechat&s=1675004718479&v=0cffbba9918afb1342c18e2fdfb25ef5:1 addhits @ util.js? [sm]:101 onLoad @ index.js? [sm]:66 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 p.__callPageLifeTime__ @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Ct @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 It @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 Nt.emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 emit @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 (anonymous) @ WAService.js?t=wechat&s=1675004718479&v=2.6.0:1 c @ asdebug.js:10 u @ asdebug.js:10 (anonymous) @ asdebug.js:1 f @ asdebug.js:1 g @ asdebug.js:1 (anonymous) @ asdebug.js:1 _ws.onmessage @ asdebug.js:1 Show 20 more frames
2023-01-30有没有console报错截图呢
小程序部分设备打开空白?小程序部分设备打开空白? [图片]
2023-01-30