不一定
wx.chooseLocation、wx.getLocation接口申请需要多长时间通过?之前小程序发布没问题,今天修改一个bug,然后上传就提示接口调用需要申请。已提交申请,请问wx.chooseLocation、wx.getLocation接口申请需要多长时间通过?
2023-01-30保存跟删除都改成同步接口呢 setStorageSyncgetStorageSync
removeStorage无法生效?api: removeStorage // 本地存储 save() { // wx.setStorageSync('pop', {id:1,name:'zzz'}) wx.setStorage({ key: 'pop', data: { id: 1, name: 'zzz' }, success(res) { console.log(res) } }) }, get() { // console.log(wx.getStorageSync('pop')); wx.getStorage({ key: 'pop', success(res) { console.log(res) } }) }, del() { // wx.removeStorageSync("pop"); wx.removeStorage({ key: 'pop', success(e) { console.log(e) } }) }, clear(){ wx.clearStorageSync() wx.clearStorage() } <!-- 本地存储 --> <button type="primary" size="mini" bindtap="save">本地存储==存</button> <button type="primary" size="mini" bindtap="get">本地存储==取</button> <button type="primary" size="mini" bindtap="del">本地存储==删</button> <button type="primary" size="mini" bindtap="clear">本地存储==清空</button> [图片] 存取删正常 存取立即删除再取 也会发现pop的值已经没了,不会输出取的值 但是 storage一直存在pop这个值 无论怎么删除 清空都会存在 基础库也换了好几个, 微信开发工具也换了几个 [图片]
2023-01-30看不到
公众号推文中插入小程序,可以看到从该篇文章给小程序带来的点击量吗?有没有办法了解到某篇文章里,通过该文章点击进入小程序的点击量。
2023-01-30wx:key是得item里面的某一个属性名字,不能是动态的, 比如遍历的数组是 list=[{id:"1",name:"小红"},{id:"2",name:"小明"}] 那么wx:key="id"或者wx:key="name"
利用模板来做小程序,我是小白,求大哥来解救下面出了什么问题?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理论上是可以写一个自动化脚本一直刷消耗云开发的调用次数,还有一个是云函数如果有对外暴露http访问的话也是有一定风险。其他的就比较难了吧
云开发存在被恶意刷调用的情况吗?不懂就问,云开发会存在恶意刷调用次数的情况发生吗?就是一直瞄着你的一个请求拿个脚本一直刷,然后调用次数咔咔涨这样?如果存在这种情况怎么避免呢?
2023-01-29结果集的格式是list [图片]
小程序联表查询 结果如何正确显示在屏幕上?我使用了联表查询,读取出了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-29建议不要删,如果有用到NG,可以在NG配置文件里面配置一个location即可,类似这样,其实放那边也不碍事 location /MP_verify_bgzRx2MQxTNGCEVE { default_type text/html; return 200 'bgzRx2MQxTNGCEVE'; }
配置业务域名的校验文件,校验通过以后是否可以删除?配置业务域名的校验文件,校验通过以后是否可以删除?
2023-01-29从分享卡片进入小程序,应该是清空了页面栈,所以会重新执行onload方法,你可以把页面栈打印出来看下,然后如果页面栈里面有这个页面,就只会执行onshow方法
分享卡片热启动和前后台切换场景下app.onShow和page.onload调用问题?场景1: 小程序在冷启动后,如果没有被销毁,发现再次从分享卡片进入时,会调用app.onShow和页面的onload生命周期方法 场景2:小程序在冷启动后,如果没有被销毁,此时页面前后台切换,这个时候会调用app.onShow,但是不会调用页面的onload方法 我想问下,这两种场景,小程序内部是怎么判断该不该重新创建页面,重新调用页面的onload方法?
2023-01-29可以考虑存另一个表,读取的时候两个表关联一下即可
如图-我想在云数据库 记录里面 添加数据 这个方法可行吗?[图片] [图片]
2023-01-28最近有看到一个这个,看看对你有没有帮助 https://dev.weixin.qq.com/docs/?utm_source=mp_cloud
公网域名仅能支持测试使用,请勿用于线上生产,且公网域名没有防刷防 DDoS 能力?我们需要使用到公网,怎么解决这个问题?
2023-01-28