Promise
index.js页面获取不到app.js中globalData修改后的值?通过openId,来获取用户信息,复制给 globalData.userInfo,但是再index.js中打印【app.globalData.userInfo】,却为空,大佬们这该怎么解决呀? 代码如下,求教,万谢 app.js onLaunch() { this.login() }, globalData: { userInfo: null }, //登录:获取code login(){ const that = this if(wx.getStorageSync('oid')){ return } wx.login({ success (res) { if (res.code) { that.getOpenId(res.code) } else { console.log('登录失败!' + res.errMsg) } } }) }, //获取openid getOpenId(code){ request.GET('/mgzapi/wechat/get123/'+code).then(res=>{ if(res.data.code==200){ this.getUserInfo(res.data.openid) }else{ wx.showToast({ title: '获取数据有误,请重试', icon: 'none', duration: 2000}) } }) }, //获取用户信息 getOneUser(oid){ request.GET('/mgzapi/user/info/'+id).then(res=>{ if(res.data.code==200){ var info = res.data.data[0] //用户保存到全局globalData中 this.globalData.userInfo = info } }) }, index.js const app = getApp() Page({ data: { userInfo :'' }, onLoad() { console.log(app.globalData.userInfo) }, )}
2024-06-25改好重新提交审核就行
现有小程序更换服务器,会影响到前端使用吗?我现在的小程序在服务器A里面,需要换到服务器B,这个过程是不是我修改代码,重新提交就可以? 这个过程中,是否会影响到前端小程序的使用,如果影响,会影响多长时间大概? 求大神们指点
2024-06-24下载后用wx.openDocument右上角可以让用户自己存
小程序下载找不到路径?我这边要实现一个多文件下载功能。现在ios 下载后找不到文件,有什么方案可以替代吗?
2024-06-24去搜一个类似的小程序看看他们的服务类目
如果是做技能考试类的题库小程序,选类目应该选哪个,需要什么资质https://developers.weixin.qq.com/miniprogram/product/material/
2024-06-19一般会是7天多一天
小程序设计社交类目,首次提交代码审核已经七天了,没有进入预上线,没有收到任何消息,什么情况?[图片] 已经七天了,什么时候才能收到结果
2024-06-19代码换一下上传呗
两个小程序的名字互换简便操作方式?的操作吗收到我们企业底下有两个微信小程序,想把两个小程序的名字互换一下,有什么简便的操作吗
2024-06-19参考https://developers.weixin.qq.com/community/develop/doc/000646718d40a08a65ed1e2175bc09
地理位置一直审核不通过?[图片] 申请描述很清楚,用到接口的图片也有,每个图片也有描述,为什么一直审核不通过? 描述: 因当前业务涉及维修员接单,当用户车辆发生故障,需获维修员当前位置查看方圆用户电瓶车故障位置,故申请 wx.getLocation 接口,用于获取小哥当前位置。 因当前业务涉及电瓶车维修服务,需要及时获取维修员所在实时地理位置以及实时运动轨迹,申请接口以便维修员提前规划路线、电瓶车车主和用户实时查看维修员到达维修地点进展,故申请 wx.onLocationChange、wx.startLocationUpdate 接口,用于 监控维修员实时运动位置。 因当前业务涉及电瓶车维修服务,需要及时获取维修员所在实时地理位置以及实时运动轨迹,申请接口以便维修员提前规划路线、电瓶车车主和用户实时查看维修员到达维修地点进展,完成车辆维修业务场景的闭环。
2024-06-19缺少产品官网
APP上绑定第三方微信登录,被驳回,这是为什么呢?[图片]
2024-06-18重新启动编译器,重新构建即可
远程存在基座 APK,但已过期无法使用,需要重新远程构建?[图片] [图片] 中午的时候想在真机上试试,点了图2中的运行,提示如图1。然后按提示再点图2中的构建,仍然提示图1内容。以往点击运行就能下载基座,然后本地编译,安装到手机。
2024-06-18配置一下NSCalendarsUsageDescription 的隐私访问许可描述即可 [图片]
ios打包发版说使用了日历?但是项目里面没有用Missing purpose string in Info.plist. Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “demo.app” bundle should contain a NSCalendarsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources. (90683)
2024-06-18