不可以
小游戏可以跳转H5么小游戏支持跳转H5页面么
2021-05-08[图片]
小游戏服务端API ,setUserStorage 报:48001 api unauthorized根据指南做小游戏排行榜功能,使用HTTPS的方式 调用 storage.setUserStorage API 报:48001 api unauthorized, 网上资料实在太少,想问 sig_method = 'hmac_sha256' 是这样写吗? 希望官方补充一些范例吧。 提示 “48001 ,api unauthorized” 是需要登录mp管理后台后,在游戏设置-排行榜配置中完成配置吗?我看指南说,不影响,就暂时没有配置 该配置只影响搜索、小游戏中心的排行榜展现。并不影响利用托管数据、主域和开放数据域的方式实现的游戏内好友排行榜。 服务端代码部分代码如下, //获取accessToken let got = require('got') let config ={appId:'xxxxxxxxx',appSecret:'xxxxxxxxxxx'} let url = `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${config.appId}&secret=${config.appSecret}` const response = await got(url) let { access_token } = JSON.parse(response.body) //数据签名 let { session_key, openid } = (await common.mysql('user_table').where({ id: userId }).select('session_key', 'openid'))[0] let str_kv = '{ "kv_list":[{"key":"score","value":"100"}] }' let signature = crypto.createHmac('sha256', session_key).update(str_kv).digest('hex') let sig_method = 'hmac_sha256' //得到url,和要发送的数据 let curl = `curl -d '${str_kv}' 'https://api.weixin.qq.com/wxa/set_user_storage` + `?access_token=${access_token}&signature=${signature}&openid=${openid}&sig_method=${sig_method}'` 用代码POST 和 CURL 结果都一样,如下 curl -d '{ "kv_list":[{"key":"score","value":"100"}] }' 'https://api.weixin.qq.com/wxa/set_user_storage?access_token=44_vWhpofvZmVo6BorFsJjcg_66kUlaj6dgQJRuzXDU9Gu7vX0Q-wHZ56sJlirWUAwHracF9X8QwlQTus2HieWYqr-QrzfZiFrTh2uSdmm4PqBfB3vLPYMQbApCvOPUNETuhVlO7UjvNC4u09vUSWGcAJAGKU&signature=4925b27ee196df072e41dfc46f64767b57b003e6b4d730816299b59b064a2b89&openid=oy2Rh5V5B1cM_BsDUIuErs32nBW4&sig_method=hmac_sha256' 报错 {"errcode":48001,"errmsg":"api unauthorized rid: 6093e581-0c52f67b-399463e4"} [图片]
2021-05-07官方的《小游戏示例》小游戏在PC端无法复现你的BUG,gitHub连接 https://github.com/wechat-miniprogram/minigame-demo
小游戏pc端使用wx.createUserInfoButton授权成功后wx.login进入faillet button = wx.createUserInfoButton({ type: 'text', text: '授权登录', style: { left: ddsystemInfo.screenWidth / 2 - 100, top: ddsystemInfo.screenHeight * 0.618 - 20, width: 200, height: 40, backgroundColor: '#16b161', color: '#ffffff', textAlign: 'center', fontSize: 16, lineHeight: 40, borderRadius: 4 } }); button.onTap((res) => { console.log(JSON.stringify(res)); button.destroy(); wx.login({ success(res) { console.log('login成功1', JSON.stringify(res)); }, fail: function (ress) { console.log('login未成功1', JSON.stringify(ress)); var getData = { result: "-1", data: { msg: 'login未成功' } }; } }) })
2021-05-06感觉是你的场景已经删除了,然后没有进行重新加载,而强行进行显示
babylonjs无法加载场景,模拟器正常,真机预览报错[图片][图片] babylon4.2 在使用load函数加载场景时模拟器正常加载,但真机预览的时候报错
2021-05-06不支持这样的能力
如何清除所有用户的开放数据您好,请问开放数据中wx.removeUserCloudStorage(Object object)只能移除自己数据,我该怎样移除所有用户数据?
2021-05-06正确来说不是小游戏支持,是因为Unity引擎支持了H5游戏的功能,而H5游戏是可以运行在小游戏上面的
小游戏支持Unity引擎了?[图片] 有人试过么,我看官方文档新增了Unity适配。
2021-04-30解决办法就是,每次构建微信小游戏前,退出开发者工具
为什么在微信开发平台下真机调试会报这种错?cocos creator开发的小游戏,构建发布到微信开发平台后,然后点击真机调试时,经常会报Error: ENOENT: no such file or directory,open XXXXXXXXXXXXXXXXXXx.json这样的错,报错的概率非常高,50%以上的概率会报错。 [图片] 我发现把微信开发平台关闭后,再次打开,然后重新再点击真机调试,很多时候就没事了。搞不清为什么,但感觉不是cocos creator的bug,就是微信开发平台的bug. 请教各位遇到过这种问题吗?有什么好的解决方法吗?谢谢!
2021-04-30什么是自定义转发图片?能提供截图看看吗?
微信小游戏网页后台 设置里 没有自定义转发图片配置,这是什么情况?[图片]
2021-04-30什么是自定义转发图片?能提供截图看看吗?
小游戏 游戏设置里 没有自定义转发图片配置小游戏 游戏设置里 没有自定义转发图片配置 。公司其他的小游戏设置里都有。
2021-04-30我们这边相关的开发人员说应该是一个兼容性问题,因为大部分手机马达都没法调节
wx.vibrateShort 的三个新参数 type 都是一个震动强度?使用 cocos creator 调用 4 个 api,3个 short 一个 long。 3 个短震动没有明显区别。 它们都是一个效果?!或者说这个参数有了,但是效果你们没写吗? 从感受上讲,应该三个参数的效果都是 light 的效果。。。 // 设备震动测试 const { ccclass, property } = cc._decorator; enum VibrateShortType { heavy = "heavy", medium = "medium", light = "light", } @ccclass export default class TestVibrate extends cc.Component { public vibrateShort1(): void { // heavy、medium、light wx.vibrateShort({ type: VibrateShortType.light }); } public vibrateShort2(): void { // heavy、medium、light wx.vibrateShort({ type: VibrateShortType.medium }); } public vibrateShort3(): void { // heavy、medium、light wx.vibrateShort({ type: VibrateShortType.heavy }); } public async vibrateLong(): Promise { wx.vibrateLong(); } } 或者这样写,也是一样的 // 设备震动测试 const { ccclass, property } = cc._decorator; @ccclass export default class TestVibrate extends cc.Component { public vibrateShort1(): void { // heavy、medium、light wx.vibrateShort({ type: "light" }); } public vibrateShort2(): void { // heavy、medium、light wx.vibrateShort({ type: "medium" }); } public vibrateShort3(): void { // heavy、medium、light wx.vibrateShort({ type: "heavy" }); } public async vibrateLong(): Promise { wx.vibrateLong(); } }
2021-04-30