微信云托管官网
cloud.callContainer 怎么接收sse数据?找了半天只能用wx.request方法,但是使用微信云托管,生产环境又不允许公网调用 感觉现在就无解了,除非抛弃微信云托管,自己去买第三方云服务器 官方有没有啥办法啊???
使用微信云托管,小程序使用上述功能,是否需要自定义域名,适用提供的公网域名是否无法使用?
现在项目基本上都是Java11及以上,普遍已经使用Java17了,为什么托管还是只能选择7或者8? [图片]
传参如下: [图片] 返回报错如下: { "errcode": 0, "errmsg": "ok", "respdata": { "return_code": "SUCCESS", "return_msg": "OK", "appid": "wxd2d****5e", "mch_id": "1800008281", "sub_appid": "wx*****697", //此处返回了是云托管绑定的小程序appid, 要改为复用资源时,实际的appid ,怎么搞?要不和openid不对应呀 "sub_mch_id": "171****45", "nonce_str": "qqJu*****9fhn", "sign": "3A8A8EE****CC8EA01F7EE7B1", "result_code": "FAIL", "err_code": "PARAM_ERROR", "err_code_des": "无效的openid", "payment": { "appId": "wx361****97", "timeStamp": "1749963503", "nonceStr": "qqJ****9fhn", "package": "prepay_id=", "signType": "MD5", "paySign": "11547F5***********F3CA" } } }
第一次请求login接口成功,按逻辑需携带cookie请求info接口,但cookie不一致 导致失败重定向 [图片][图片] [图片]
云托管免去了开发中维护登录session的工作量,但是部分微信接口仍旧需要通过session_key进行解密,比如转发接口的authPrivateMessage,因为valid存在篡改风险,建议开发者自行解密验证,而解密时需要用到session_key。 云托管免登录维护并没有session_key,目前能想到的就是主动调用wx.login去获得code,再由后端进行session_key的换取用于解密。那么和云托管的自登录不是有些矛盾了吗? 想问一下官方,是否只能如我前面所说的方式去解密?微信目前有提供其他更简单的方法去完成解密的支持吗?比如增加一个cloudID?让云托管可以像获取手机号一样,凭借cloudID去获取私密消息的activityID?
[图片] 云开发控制台 【云托管】>【相应服务】>【新建版本】选择高可用。 对于这个设置的路径,表示在控制台根本找不到。
我后台仅有一个间隔1小时的定时任务,每次就查询更新一个只有20条记录的数据库表。我查看数据库sql日志,这个时间段内sql执行甚至没有超过100次,为什么监控上会有这么多select数 [图片][图片]
绑定失败:不支持的商户号类目 商户号关联的小程序正在提供商品/服务在线销售及配送,暂不支持使用云开发微信支付,如需使用微信支付请使用微信支付 api 进行开发。详见小程序交易结算管理确认说明 对于以上我想使用云托管的情况下如何解决?
失败代码是:wxf64337e0a929c126 prod-9g0o4pad3725f922 tid=965846 rid=multi_tenant_1uORHP7lSWDu4n aipbackend ptid=637889 bid=53755713 aipbackend-002 具体显示如下: Downloaded from tencent: https://mirrors.tencent.com/nexus/repository/maven-public/org/apache/maven/plugins/maven-war-plugin/3.4.0/maven-war-plugin-3.4.0.jar (83 kB at 392 kB/s) [2025-06-09 09:43:19] #13 6.056 [INFO] ------------------------------------------------------------------------ [2025-06-09 09:43:19] #13 6.056 [INFO] BUILD FAILURE [2025-06-09 09:43:19] #13 6.056 [INFO] ------------------------------------------------------------------------ [2025-06-09 09:43:19] #13 6.057 [INFO] Total time: 4.911 s [2025-06-09 09:43:19] #13 6.057 [INFO] Finished at: 2025-06-09T01:43:18Z [2025-06-09 09:43:19] #13 6.057 [INFO] ------------------------------------------------------------------------ [2025-06-09 09:43:19] #13 6.058 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.4.1:clean (default-clean) on project aipBackend: The plugin org.apache.maven.plugins:maven-clean-plugin:3.4.1 requires Maven version 3.6.3 -> [Help 1] [2025-06-09 09:43:19] #13 6.058 [ERROR] [2025-06-09 09:43:19] #13 6.058 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [2025-06-09 09:43:19] #13 6.059 [ERROR] Re-run Maven using the -X switch to enable full debug logging. [2025-06-09 09:43:19] #13 6.059 [ERROR] [2025-06-09 09:43:19] #13 6.059 [ERROR] For more information about the errors and possible solutions, please read the following articles: [2025-06-09 09:43:19] #13 6.059 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginIncompatibleException [2025-06-09 09:43:19] #13 ERROR: process "/bin/sh -c mvn -s /app/settings.xml -f /app/pom.xml clean package" did not complete successfully: exit code: 1 [2025-06-09 09:43:19] ------ [2025-06-09 09:43:19] > [build 5/5] RUN mvn -s /app/settings.xml -f /app/pom.xml clean package: [2025-06-09 09:43:19] 6.057 [INFO] Total time: 4.911 s [2025-06-09 09:43:19] 6.057 [INFO] Finished at: 2025-06-09T01:43:18Z [2025-06-09 09:43:19] 6.057 [INFO] ------------------------------------------------------------------------ [2025-06-09 09:43:19] 6.058 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.4.1:clean (default-clean) on project aipBackend: The plugin org.apache.maven.plugins:maven-clean-plugin:3.4.1 requires Maven version 3.6.3 -> [Help 1] [2025-06-09 09:43:19] 6.058 [ERROR] [2025-06-09 09:43:19] 6.058 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [2025-06-09 09:43:19] 6.059 [ERROR] Re-run Maven using the -X switch to enable full debug logging. [2025-06-09 09:43:19] 6.059 [ERROR] [2025-06-09 09:43:19] 6.059 [ERROR] For more information about the errors and possible solutions, please read the following articles: [2025-06-09 09:43:19] 6.059 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginIncompatibleException [2025-06-09 09:43:19] ------ [2025-06-09 09:43:19] Dockerfile:16 [2025-06-09 09:43:19] -------------------- [2025-06-09 09:43:19] 14 | # 执行代码编译命令 [2025-06-09 09:43:19] 15 | # 自定义settings.xml, 选用国内镜像源以提高下载速度 [2025-06-09 09:43:19] 16 | >>> RUN mvn -s /app/settings.xml -f /app/pom.xml clean package [2025-06-09 09:43:19] 17 | [2025-06-09 09:43:19] 18 | # 选择运行时基础镜像 [2025-06-09 09:43:19] -------------------- [2025-06-09 09:43:19] ERROR: failed to solve: process "/bin/sh -c mvn -s /app/settings.xml -f /app/pom.xml clean package" did not complete successfully: exit code: 1 [2025-06-09 09:43:19] [Pipeline] } [2025-06-09 09:43:19] [Pipeline] // stage [2025-06-09 09:43:19] [Pipeline] stage [2025-06-09 09:43:19] [Pipeline] { (推送 Docker 镜像到 TCR) [2025-06-09 09:43:19] Stage "推送 Docker 镜像到 TCR" skipped due to earlier failure(s) [2025-06-09 09:43:19] [Pipeline] } [2025-06-09 09:43:19] [Pipeline] // stage [2025-06-09 09:43:19] [Pipeline] } [2025-06-09 09:43:19] [Pipeline] // node [2025-06-09 09:43:19] [Pipeline] End of Pipeline [2025-06-09 09:43:19] ERROR: script returned exit code 1 [2025-06-09 09:43:19] Finished: FAILURE *** -----------构建aip-001----------- 2025-06-09 09:42:55 create_build_image : creating 2025-06-09 09:43:21 check_build_image : fail
不到服务停止按钮
[图片]
也就是说,同一个环境 ID 下,我创建一个服务B来部署 web端后台系统,能否实现去访问使用小程序的后端服务A ? 如果 ok,是访问内网地址吗?后台系统访问地址能用服务 B外网地址访问吗?
我用的是PHP,只想单纯更新代码,看到每更新一次代码,都会重新生成新的容器。这也太费时了,是否可以在原有的容器里,只是同步一次git代码
设置了内网貌似无法访问,开启外网又说不安全,不能作为正式生产。 [图片]
[图片]
向托管的SpringBoot容器提交文件为何会有1兆大小的限制,超过1兆就会报413,如何解除限制? 我们是有处理文件的需求,如何说先从服务端获取到上传地址,再由浏览器端上传,再到服务端去对象存储调用文件处理,处理好了再存回去,再前端来获取处理结果,这得绕好几层呀
我有一个express服务,其中有个api是用于上传文件,代码见如下。 export async function upload(req: express.Request, res: express.Response) { if (!req.files || !req.files.file) { res.status(400).send('未上传文件'); return; } try { //@ts-ignore const uploadedFile = req.files.file; //@ts-ignore const fileBuffer = uploadedFile.data; // 获取文件的 Buffer //@ts-ignore const fileName = uploadedFile.name; const url = await uploadBuffer(fileBuffer, fileName) res.status(200).json({ url }) } catch (ex) { //@ts-ignore res.status(500).json({ msg: ex.msg }) } } 在微信小程序中通过如下代码上传 export async function uploadFile(filePath: string): Promise<string> { const token = wx.getStorageSync("token") return new Promise((resolve, reject) => { wx.uploadFile({ url: env.baseUrl + "/file/upload", filePath: filePath, header: { "Authorization": `Bearer ${token}` }, name: 'file', success(res) { if (res.statusCode == 200) { const json = JSON.parse(res.data) as { url: string } resolve(json.url) return; } reject(res.errMsg) }, fail(e) { reject(e.errMsg) } }) }) } 现在因为一些原因我需要通过微信云托管去提供后端服务,我现在的问题是,我该如何通过callContainer或者其他的方式去上传文件?我不想上传到微信云的文件存储系统,我想通过调用我的后端api去完成文件的上传。 谢谢。
你好,我想要一份java的微信云托管源码,有下载好的方便交流一下
我发现云托管会休眠,有时候登录不进去,过几分钟就好了、能登陆进去了。 怎么避免休眠呢? 我在查阅Cursor的时候,Cursor说: 微信云托管确实有这样的特性: 当应用长时间没有访问时,云托管会自动将应用实例休眠 当有新的请求进来时,需要重新启动实例,这会导致第一次请求响应较慢 如果访问量较小,云托管可能会减少实例数量以节省资源