最新提问
  • 全部
  • 文章
  • 问答

  • 微信订阅号上传竖图变成横图,根本用不了,为什么会这样?

    为啥微信订阅号发图文,上传的照片明明竖着的是正常的,只要已上传就变成了横的,而且微信订阅号里面也没有旋转的功能,上传的照片根本用不了,而且好几次了,换了几个浏览器都不行

  • 微信云开发调不通内容安全错误码

    日志内容[图片] securityReview 云函数代码 // 云函数:内容安全审核 const cloud = require('wx-server-sdk'); cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }); const db = cloud.database(); // 模板消息配置 const TEMPLATE_CONFIG = { REVIEW_RESULT: 'REVIEW_RESULT_TEMPLATE', // 审核结果通知模板ID POST_PUBLISHED: 'POST_PUBLISHED_TEMPLATE' // 发布成功通知模板ID }; /** * 内容安全审核工具类 */ class SecurityReviewer { /** * 审核发帖内容 */ static async reviewPostContent(content, images = []) { try { console.log('开始审核发帖内容...'); const reviewResult = { passed: true, reason: '', violations: [], riskLevel: 'low', // low, medium, high reviewTime: new Date() }; // 1. 文本内容审核 const textReview = await this.reviewText(content); if (!textReview.passed) { reviewResult.passed = false; reviewResult.violations.push(...textReview.violations); reviewResult.riskLevel = textReview.riskLevel; } // 2. 图片内容审核 if (images && images.length > 0) { const imageReview = await this.reviewImages(images); if (!imageReview.passed) { reviewResult.passed = false; reviewResult.violations.push(...imageReview.violations); if (imageReview.riskLevel === 'high') { reviewResult.riskLevel = 'high'; } else if (imageReview.riskLevel === 'medium' && reviewResult.riskLevel === 'low') { reviewResult.riskLevel = 'medium'; } } } // 3. 综合风险评估 if (reviewResult.violations.length > 0) { reviewResult.reason = reviewResult.violations.join('; '); } console.log('发帖内容审核完成:', reviewResult); console.log(`审核详情 - 通过: ${reviewResult.passed}, 违规项: ${reviewResult.violations.length}, 风险等级: ${reviewResult.riskLevel}`); return reviewResult; } catch (error) { console.error('发帖内容审核失败:', error); // 当审核服务完全失败时,设置为需要人工审核 return { passed: false, reason: '审核服务异常,需要人工审核', violations: ['审核服务异常'], riskLevel: 'high', reviewTime: new Date() }; } } /** * 审核用户资料 */ static async reviewUserProfile(userData) { try { console.log('开始审核用户资料...'); const reviewResult = { passed: true, reason: '', violations: [], riskLevel: 'low', reviewTime: new Date() }; // 1. 昵称审核 if (userData.nickname) { const nicknameReview = await this.reviewText(userData.nickname); if (!nicknameReview.passed) { reviewResult.passed = false; reviewResult.violations.push(`昵称违规: ${nicknameReview.violations.join(', ')}`); reviewResult.riskLevel = nicknameReview.riskLevel; } } // 2. 个人简介审核 if (userData.bio) { const bioReview = await this.reviewText(userData.bio); if (!bioReview.passed) { reviewResult.passed = false; reviewResult.violations.push(`个人简介违规: ${bioReview.violations.join(', ')}`); if (bioReview.riskLevel === 'high') { reviewResult.riskLevel = 'high'; } else if (bioReview.riskLevel === 'medium' && reviewResult.riskLevel === 'low') { reviewResult.riskLevel = 'medium'; } } } // 3. 头像审核(如果有头像URL) if (userData.avatar && userData.avatar.startsWith('cloud://')) { const avatarReview = await this.reviewImages([userData.avatar]); if (!avatarReview.passed) { reviewResult.passed = false; reviewResult.violations.push(`头像违规: ${avatarReview.violations.join(', ')}`); if (avatarReview.riskLevel === 'high') { reviewResult.riskLevel = 'high'; } } } if (reviewResult.violations.length > 0) { reviewResult.reason = reviewResult.violations.join('; '); } console.log('用户资料审核完成:', reviewResult); return reviewResult; } catch (error) { console.error('用户资料审核失败:', error); return { passed: false, reason: '审核服务异常', violations: ['审核服务异常'], riskLevel: 'high', reviewTime: new Date() }; } } /** * 文本内容审核 */ static async reviewText(text) { try { if (!text || text.trim() === '') { return { passed: true, violations: [], riskLevel: 'low' }; } const violations = []; let riskLevel = 'low'; // 只进行微信云内容安全API审核 console.log('开始文本内容安全审核'); try { // 调用微信文本安全审核API const textSecResult = await cloud.openapi.security.msgSecCheck({ content: text.trim() }); console.log('微信文本安全审核结果:', textSecResult); if (textSecResult.errCode !== 0) { violations.push('文本内容违规'); riskLevel = 'high'; // 根据错误码判断具体违规类型 switch (textSecResult.errCode) { case 87014: violations.push('文本包含违法违规内容'); break; case 87015: violations.push('文本包含敏感词'); break; case 87016: violations.push('文本包含垃圾信息'); break; default: violations.push(`文本审核失败: ${textSecResult.errMsg}`); } return { passed: false, violations: violations, riskLevel: riskLevel }; } else { console.log('微信API审核通过'); return { passed: true, violations: [], riskLevel: 'low' }; } } catch (apiError) { console.error('微信文本安全API调用失败:', apiError); console.error('API错误详情:', { code: apiError.errCode, message: apiError.errMsg }); if (apiError.errCode === -604101) { console.log('权限不足,无法调用微信API,设置为人工审核'); return { passed: false, violations: ['微信API权限不足,需要人工审核'], riskLevel: 'high' }; } else { console.log('API调用失败,设置为人工审核'); return { passed: false, violations: ['微信API调用失败,需要人工审核'], riskLevel: 'high' }; } } } catch (error) { console.error('文本审核失败:', error); return { passed: false, violations: ['文本审核异常'], riskLevel: 'high' }; } } /** * 图片内容审核(使用最新的mediaCheckAsync接口) * * 注意:mediaCheckAsync是微信最新的异步内容安全审核接口 * - 支持更准确的图片内容识别 * - 支持更多违规类型检测 * - 异步处理,成功时返回trace_id * - 审核结果会在30分钟内推送到消息接收服务器 * - 建议使用v2版本获得最佳效果 * * 重要:由于是异步接口,当前实现暂时标记为通过 * 实际审核结果需要等待异步推送,或考虑使用同步的imgSecCheck接口 */ static async reviewImages(images) { try { if (!images || images.length === 0) { return { passed: true, violations: [], riskLevel: 'low' }; } const violations = []; let riskLevel = 'low'; // 只进行微信云内容安全API进行图片审核 for (let i = 0; i < images.length; i++) { const image = images[i]; console.log(`审核图片 ${i + 1}/${images.length}:`, image); try { // 获取图片的Buffer数据 let imageBuffer; let imageUrl = ''; // 处理图片对象,提取URL if (typeof image === 'object' && image.url) { imageUrl = image.url; } else if (typeof image === 'string') { imageUrl = image; } else { console.log(`图片 ${i + 1} 格式无效,跳过审核`); continue; } console.log(`处理图片 ${i + 1} URL: ${imageUrl}`); if (imageUrl.startsWith('cloud://')) { // 云存储图片,下载后审核 console.log(`下载云存储图片: ${imageUrl}`); const downloadResult = await cloud.downloadFile({ fileID: imageUrl }); imageBuffer = downloadResult.fileContent; console.log(`图片下载成功,大小: ${imageBuffer ? imageBuffer.length : 0} bytes`); // 记录图片下载操作(异步执行,不阻塞审核流程) try { cloud.callFunction({ name: 'storageResourceManager', data: { action: 'recordFileDownload', fileID: imageUrl, options: { functionName: 'securityReview', operationType: 'content_review' } } }).catch((error) => { console.error('记录图片下载失败:', error); }); } catch (error) { console.error('记录图片下载异常:', error); } } else if (imageUrl.startsWith('http://tmp/')) { // 临时文件,直接读取 console.log(`处理临时文件: ${imageUrl}`); const tempResult = await cloud.getTempFileURL({ fileList: [imageUrl] }); if (tempResult.fileList && tempResult.fileList[0]) { imageBuffer = tempResult.fileList[0].tempFileURL; } else { console.log(`临时文件获取失败: ${imageUrl}`); continue; } } else { console.log(`跳过非云存储图片: ${imageUrl}`); continue; } // 检查图片数据是否有效 if (!imageBuffer) { console.log(`图片 ${i + 1} 数据无效,跳过审核`); violations.push(`图片${i + 1}数据无效`); continue; } // 检查图片大小限制(微信API限制1MB) if (imageBuffer.length > 1024 * 1024) { console.log(`图片 ${i + 1} 过大,跳过审核`); violations.push(`图片${i + 1}文件过大`); continue; } // 调用微信图片安全审核API(使用最新的mediaCheckAsync接口) // 注意:mediaCheckAsync是异步接口,需要先获取图片的临时URL let mediaUrl = ''; if (imageUrl.startsWith('cloud://')) { // 获取云存储图片的临时URL const tempUrlResult = await cloud.getTempFileURL({ fileList: [imageUrl] }); if (tempUrlResult.fileList && tempUrlResult.fileList[0]) { mediaUrl = tempUrlResult.fileList[0].tempFileURL; } else { console.log(`图片 ${i + 1} 获取临时URL失败`); violations.push(`图片${i + 1}获取临时URL失败`); continue; } } else if (imageUrl.startsWith('http://tmp/')) { // 临时文件直接使用 mediaUrl = imageUrl; } else { console.log(`图片 ${i + 1} 不是有效的云存储文件`); violations.push(`图片${i + 1}不是有效的云存储文件`); continue; } const imgSecResult = await cloud.openapi.security.mediaCheckAsync({ media_url: mediaUrl, media_type: 2, // 2:图片 1:音频 3:视频 version: 2, // 使用v2版本 openid: wxContext.OPENID, // 用户openid scene: 1 // 场景值,1:资料,2:评论,3:论坛,4:社交日志 }); console.log(`图片 ${i + 1} 审核结果:`, imgSecResult); if (imgSecResult.errCode !== 0) { violations.push(`图片${i + 1}审核未通过`); riskLevel = 'high'; // 根据错误码判断具体违规类型(mediaCheckAsync的错误码) switch (imgSecResult.errCode) { case 40001: violations.push(`图片${i + 1}access_token无效`); break; case 40003: violations.push(`图片${i + 1}openid无效`); break; case 40004: violations.push(`图片${i + 1}media_type错误`); break; case 43104: violations.push(`图片${i + 1}appid与openid不匹配`); break; case 44991: violations.push(`图片${i + 1}超出接口每分钟调用限制`); break; case 45009: violations.push(`图片${i + 1}超出接口每日调用限制`); break; case 61010: violations.push(`图片${i + 1}用户访问记录超时`); break; default: violations.push(`图片${i + 1}审核失败: ${imgSecResult.errMsg}`); } } else { console.log(`图片 ${i + 1} 审核任务提交成功`); // mediaCheckAsync是异步接口,成功时返回trace_id if (imgSecResult.trace_id) { console.log(`图片 ${i + 1} 审核任务ID: ${imgSecResult.trace_id}`); // 注意:mediaCheckAsync是异步接口,结果会在30分钟内推送到消息接收服务器 // 这里暂时标记为通过,实际结果需要等待异步推送 // 如果需要同步处理,可以考虑使用imgSecCheck接口 console.log(`图片 ${i + 1} 异步审核已提交,等待结果推送`); } } } catch (imgError) { console.error(`图片 ${i + 1} mediaCheckAsync API调用失败:`, imgError); console.error(`图片错误详情:`, { image: image, code: imgError.errCode, message: imgError.errMsg }); if (imgError.errCode === -1) { console.log(`图片 ${i + 1} 系统错误,设置为人工审核`); violations.push(`图片${i + 1}系统错误,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 40001) { console.log(`图片 ${i + 1} access_token无效,设置为人工审核`); violations.push(`图片${i + 1}access_token无效,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 40003) { console.log(`图片 ${i + 1} openid无效,设置为人工审核`); violations.push(`图片${i + 1}openid无效,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 40004) { console.log(`图片 ${i + 1} media_type错误,设置为人工审核`); violations.push(`图片${i + 1}media_type错误,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 43104) { console.log(`图片 ${i + 1} appid与openid不匹配,设置为人工审核`); violations.push(`图片${i + 1}appid与openid不匹配,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 44991) { console.log(`图片 ${i + 1} 超出接口每分钟调用限制,设置为人工审核`); violations.push(`图片${i + 1}超出接口每分钟调用限制,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 45009) { console.log(`图片 ${i + 1} 超出接口每日调用限制,设置为人工审核`); violations.push(`图片${i + 1}超出接口每日调用限制,需要人工审核`); riskLevel = 'high'; } else if (imgError.errCode === 61010) { console.log(`图片 ${i + 1} 用户访问记录超时,设置为人工审核`); violations.push(`图片${i + 1}用户访问记录超时,需要人工审核`); riskLevel = 'high'; } else { console.log(`图片 ${i + 1} mediaCheckAsync API调用失败,设置为人工审核`); violations.push(`图片${i + 1}API调用失败,需要人工审核`); riskLevel = 'high'; } } } } catch (error) { console.error('图片审核失败:', error); return { passed: false, // 图片审核失败时需要人工审核 violations: ['图片审核服务异常'], riskLevel: 'high' }; } } /** * 审核用户资料 */ } /** * 更新帖子状态 */ async function updatePostStatus(postId, status, reviewResult = null) { try { const updateData = { status: status, updateTime: new Date() }; if (reviewResult) { // 先删除现有的reviewResult字段,再设置新的 await db.collection('posts').doc(postId).update({ data: { reviewResult: db.command.remove() } }); // 等待一下确保删除完成 await new Promise(resolve => setTimeout(resolve, 100)); // 设置新的reviewResult updateData.reviewResult = reviewResult; updateData.reviewTime = reviewResult.reviewTime; // 根据审核结果设置reviewStatus if (reviewResult.passed) { updateData.reviewStatus = 'approved'; } else { updateData.reviewStatus = 'rejected'; } } else { // 如果没有审核结果,保持pending状态 updateData.reviewStatus = 'pending'; } await db.collection('posts').doc(postId).update({ data: updateData }); console.log(`帖子 ${postId} 状态更新为: ${status}, 审核状态: ${updateData.reviewStatus}`); console.log(`更新数据详情:`, updateData); } catch (error) { console.error('更新帖子状态失败:', error); } } // 发送审核结果模板通知 async function sendReviewResultNotification(postId, reviewResult) { try { console.log(`开始发送审核结果通知: 帖子 ${postId}`); // 获取帖子信息 const postResult = await db.collection('posts').doc(postId).get(); if (!postResult.data) { console.error(`帖子 ${postId} 不存在`); return; } const post = postResult.data; const userId = post.userId; // 获取用户信息 const userResult = await db.collection('users').doc(userId).get(); if (!userResult.data) { console.error(`用户 ${userId} 不存在`); return; } const user = userResult.data; // 检查用户是否有openid if (!user.openid) { console.error(`用户 ${userId} 没有openid,无法发送通知`); return; } // 构建模板消息数据 const templateData = { thing1: { value: reviewResult.passed ? '审核通过' : '审核未通过' }, thing2: { value: post.content.substring(0, 20) + (post.content.length > 20 ? '...' : '') }, thing3: { value: reviewResult.passed ? '您的内容已通过审核,现在可以正常显示' : (reviewResult.reason || '内容不符合规范') }, time4: { value: new Date().toLocaleString() } }; console.log(`准备发送模板通知:`, { touser: user.openid, templateData: templateData }); // 发送模板消息 const result = await cloud.openapi.subscribeMessage.send({ touser: user.openid, template_id: TEMPLATE_CONFIG.REVIEW_RESULT, // 使用配置的模板ID page: 'pages/home/index', data: templateData, miniprogram_state: 'formal' }); if (result.errCode === 0) { console.log(`审核结果通知发送成功: 帖子 ${postId}, 用户 ${user.openid}`); } else { console.error(`审核结果通知发送失败:`, result.errMsg); } } catch (error) { console.error('发送审核结果通知异常:', error); } } /** * 异步审核帖子 */ async function asyncReviewPost(postId, content, images) { try { console.log(`=== 开始异步审核帖子: ${postId} ===`); console.log(`内容: ${content}`); console.log(`图片数量: ${images ? images.length : 0}`); // 执行内容审核 console.log(`开始执行内容审核...`); const reviewResult = await SecurityReviewer.reviewPostContent(content, images); console.log(`审核结果:`, reviewResult); console.log(`审核通过: ${reviewResult.passed}`); console.log(`违规项: ${reviewResult.violations.join(', ')}`); console.log(`风险等级: ${reviewResult.riskLevel}`); // 根据审核结果更新帖子状态 if (reviewResult.passed) { // 审核通过,设置为正常状态 console.log(`准备更新帖子状态为正常 (status: 0)`); await updatePostStatus(postId, 0, reviewResult); console.log(`帖子 ${postId} 审核通过,状态已更新`); } else { // 审核未通过,设置为违规状态 console.log(`准备更新帖子状态为违规 (status: 3)`); await updatePostStatus(postId, 3, reviewResult); console.log(`帖子 ${postId} 审核未通过:`, reviewResult.reason); } // 记录审核日志 await db.collection('review_logs').add({ data: { postId: postId, reviewType: 'post_content', reviewResult: reviewResult, createTime: new Date() } }); // 发送审核结果模板通知 try { await sendReviewResultNotification(postId, reviewResult); } catch (notificationError) { console.error(`发送审核结果通知失败:`, notificationError); } } catch (error) { console.error(`=== 异步审核帖子 ${postId} 失败 ===`); console.error(`错误详情:`, error); console.error(`错误堆栈:`, error.stack); // 审核异常时,设置为审核中状态,等待管理员审核 console.log(`设置帖子状态为审核中 (status: 1)`); await updatePostStatus(postId, 1, { passed: false, reason: '审核服务异常,等待管理员审核', violations: ['审核服务异常'], riskLevel: 'high', reviewTime: new Date() }); console.log(`异常处理完成,帖子状态已设置为审核中`); } } // 云函数入口函数 exports.main = async (event, context) => { const { action } = event; try { console.log('=== securityReview云函数被调用 ==='); console.log('action:', action); console.log('event:', JSON.stringify(event, null, 2)); switch (action) { case 'reviewPostContent': // 审核发帖内容 const { content, images } = event; const postReviewResult = await SecurityReviewer.reviewPostContent(content, images); return { success: true, data: postReviewResult }; case 'reviewUserProfile': // 审核用户资料 const { userData } = event; const userReviewResult = await SecurityReviewer.reviewUserProfile(userData); return { success: true, data: userReviewResult }; case 'asyncReviewPost': // 异步审核帖子 const { postId, content: postContent, images: postImages } = event; console.log(`收到审核请求:`, { postId, postContent, postImages }); console.log(`开始执行异步审核...`); await asyncReviewPost(postId, postContent, postImages); console.log(`异步审核执行完成`); return { success: true, message: '异步审核已完成' }; default: return { success: false, message: '未知的操作类型' }; } } catch (error) { console.error('云审核函数执行失败:', error); return { success: false, message: '审核服务异常', error: error.message }; } }; /** * 通用模板消息发送方法 */ async function sendTemplateMessage(openid, templateId, templateData, page = 'pages/home/index') { try { console.log(`发送模板消息:`, { openid, templateId, templateData, page }); const result = await cloud.openapi.subscribeMessage.send({ touser: openid, template_id: templateId, page: page, data: templateData, miniprogram_state: 'formal' }); if (result.errCode === 0) { console.log(`模板消息发送成功: 用户 ${openid}`); return { success: true, result }; } else { console.error(`模板消息发送失败:`, result.errMsg); return { success: false, error: result.errMsg }; } } catch (error) { console.error('发送模板消息异常:', error); return { success: false, error: error.message }; } } 函数执行日志 Request ID: 20fcd358-ab16-44b6-bb42-debceedf3f7c 执行时间: 1471ms内存使用: 29.46 MB 返回结果 {"success":true,"message":"异步审核已完成"} 日志 START RequestId: 20fcd358-ab16-44b6-bb42-debceedf3f7c Event RequestId: 20fcd358-ab16-44b6-bb42-debceedf3f7c 2025-10-14T08:00:59.395Z === securityReview云函数被调用 === 2025-10-14T08:00:59.396Z action: asyncReviewPost 2025-10-14T08:00:59.396Z event: { "action": "asyncReviewPost", "content": "嘎嘎嘎哈慈", "images": [ { "compressed": true, "fileID": "cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg", "name": "hc0pudpfio.jpg", "originalSize": 2074229, "size": 2074229, "tempFilePath": "http://tmp/BmHPnp1aWtntd913cbe0c5b49a18f7c90dc9996dee94.jpg", "url": "cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg" } ], "postId": "a292647f68ee033b02abd2987277469b", "tcbContext": {}, "userInfo": { "appId": "wx50e9743c7db9c712" } } 2025-10-14T08:00:59.397Z 收到审核请求: { postId: 'a292647f68ee033b02abd2987277469b', postContent: '嘎嘎嘎哈慈', postImages: [ { compressed: true, fileID: 'cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg', name: 'hc0pudpfio.jpg', originalSize: 2074229, size: 2074229, tempFilePath: 'http://tmp/BmHPnp1aWtntd913cbe0c5b49a18f7c90dc9996dee94.jpg', url: 'cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg' } ] } 2025-10-14T08:00:59.399Z 开始执行异步审核... 2025-10-14T08:00:59.399Z === 开始异步审核帖子: a292647f68ee033b02abd2987277469b === 2025-10-14T08:00:59.399Z 内容: 嘎嘎嘎哈慈 2025-10-14T08:00:59.399Z 图片数量: 1 2025-10-14T08:00:59.399Z 开始执行内容审核... 2025-10-14T08:00:59.400Z 开始审核发帖内容... 2025-10-14T08:00:59.400Z 开始文本内容安全审核 2025-10-14T08:00:59.602Z 微信文本安全API调用失败: CloudSDKError: errCode: -604101 function has no permission to call this API | errMsg: system error: error code: -604101 at callGeneralOpenAPI (/var/user/node_modules/wx-server-sdk/index.js:487:27) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async callWXOpenAPI (/var/user/node_modules/wx-server-sdk/index.js:2364:28) at async Function.reviewText (/var/user/index.js:166:31) at async Function.reviewPostContent (/var/user/index.js:36:26) at async asyncReviewPost (/var/user/index.js:603:26) at async exports.main (/var/user/index.js:691:9) { errCode: -604101, errMsg: 'system error: error code: -604101' } 2025-10-14T08:00:59.604Z API错误详情: { code: -604101, message: 'system error: error code: -604101' } 2025-10-14T08:00:59.604Z 权限不足,无法调用微信API,设置为人工审核 2025-10-14T08:00:59.605Z 审核图片 1/1: { compressed: true, fileID: 'cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg', name: 'hc0pudpfio.jpg', originalSize: 2074229, size: 2074229, url: 'cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg' tempFilePath: 'http://tmp/BmHPnp1aWtntd913cbe0c5b49a18f7c90dc9996dee94.jpg', } 2025-10-14T08:00:59.605Z 处理图片 1 URL: cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg 2025-10-14T08:00:59.605Z 下载云存储图片: cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg 2025-10-14T08:01:00.131Z 图片下载成功,大小: 253099 bytes 2025-10-14T08:01:00.243Z 图片 1 mediaCheckAsync API调用失败: ReferenceError: wxContext is not defined at Function.reviewImages (/var/user/index.js:370:21) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Function.reviewPostContent (/var/user/index.js:45:29) at async asyncReviewPost (/var/user/index.js:603:26) at async exports.main (/var/user/index.js:691:9) 2025-10-14T08:01:00.243Z 图片错误详情: { image: { compressed: true, fileID: 'cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg', name: 'hc0pudpfio.jpg', originalSize: 2074229, size: 2074229, tempFilePath: 'http://tmp/BmHPnp1aWtntd913cbe0c5b49a18f7c90dc9996dee94.jpg', url: 'cloud://tong-da-2gwptex949b4db43.746f-tong-da-2gwptex949b4db43-1380747349/posts/1760428839217-0-44v0my966.jpg' }, code: undefined, message: undefined } 2025-10-14T08:01:00.243Z 图片 1 mediaCheckAsync API调用失败,设置为人工审核 2025-10-14T08:01:00.244Z 发帖内容审核失败: TypeError: Cannot read properties of undefined (reading 'passed') at Function.reviewPostContent (/var/user/index.js:46:26) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async asyncReviewPost (/var/user/index.js:603:26) at async exports.main (/var/user/index.js:691:9) 2025-10-14T08:01:00.244Z 审核结果: { passed: false, reason: '审核服务异常,需要人工审核', violations: [ '审核服务异常' ],

    有用 0
    0
  • 鸿蒙系统微信小程序里的河南健康扫码登陆不了怎么解决?

    刚换的手机,鸿蒙系统微信小程序里的河南健康扫码登陆不了怎么解决?每天都需要用到的,急!急!急!

    有用 0
    0
  • 微信支付报错total_fee

    [图片] 需求小程序需要为用户提供钱包通过,平台收取手续费,直接使用云开发注册特约商户,分账最多只能30%,期望是商家用户99%,平台1%,所以重新注册了一个服务商商户号,结果失败。前端提示一样的,都是缺少参数,云函数返回结果不一样,具体的结果: 商户号:1724451455 服务商:微信云开发(1800008281) 分账:不添加分账 结果:成功(wx0918443820631211af617a717e424b0000) 商户号:1724451455 服务商:微信云开发(1800008281) 分账:添加分账 结果:失败(没有分账权限) 商户号:1728397477 服务商:自注册服务商 分账:不添加分账 结果:失败(受理关系不存在) 商户号:1728397477 服务商:自注册服务商 分账:添加分账 结果:失败(受理关系不存在)

  • 云调用对接微信支付的问题

    云调用对接微信支付账号绑定:商户号的超级管理员需要在微信支付提供的【微信支付商家助手】小程序上确认授权。 我打开商家助手,没有看到任何确认授权消息通知。而云开发控制台一直显示待模板消息确认!微信支付商户平台上显示小程序已关联,怎么办?我在云开发控制台上没办法进入下一步,

  • 小程序的日期控件点开以后不再显示9月1日以后的日期

    我的小程序的日期控件点开以后不再显示9月1日以后的日期,也不能选择9月1日以后的日期使用。2025年9月1日以前的日期都能够正常选择使用。 小程序是2021年1月发布的,以前一直使用正常,就是微信云服务在八月底缴费延迟了几天就出现了这个情况。咨询过腾讯云,回复环境没有问题,他们让我来咨询你们。重新上传源代码到小程序开发者工具,在电脑模拟器上,手机开发版上,重新运行日期控件,仍然无法选择2025年9月1号以后的日期,我怀疑是不是微信端限制了我的权限。

  • 鸿蒙5.1上传图片报错uploadToCommonCDN:fail.appType is null

    升级鸿蒙5.1之前可以正常使用,升级之后出现上传文件失败的问题[图片]

    有用 0
    0
  • 云函数 , 数据库查询, 能不能 ,文本“词语”关键词拆解匹配?

    [图片]

    有用 0
    0
  • 微信小程序生产环境可以使用图片的cloud地址吗?

    1.新手免费期间,云存储只能使用仅创建者可读写;付费后,可以更改,如改为所有用户可读 2.微信小程序生产环境可以使用图片的cloud地址吗?这个地址是长期地址还是临时地址? 3.所有的云存储共享权限还是可以单独设置?

  • subscribeMessage.send在本地调试调用成功,放到云函数上定时调用失败?

    发送失败 ocWl613KCk-rpE5K-qgsq4NKjFk4: CloudSDKError: errCode: -501007 invalid parameters | errMsg: subscribeMessage.send:fail missing wxCloudApiToken 请前往云开发AI小助手查看问题:https://tcb.cloud.tencent.com/dev#/helper/copilot?q=INVALID_PARAM

  • 【环境共享Bug】主体一致且已授权,但小程序端调用共享环境稳定复现 env not exists,鉴

    基本信息:资源方小程序A的AppID: wxb0112230d1040cf5资源方环境ID: cloud1-3ge5gomsffe800a7使用方小程序B的AppID: wxe483fdffc0125104问题描述:“我严格按照官方文档配置了环境共享,已确认双方小程序主体完全一致(均为个人开发者‘曹XX’),并在A的控制台授权、在B的控制台接受。”“但在B小程序中,无论是通过业务代码还是最小化测试项目,调用共享环境的任何API(如wx.cloud.database())时,前端均稳定报错 env not exists (-501000)。”关键证据:“最关键的是,我检查了资源方小程序A中 cloudbase_auth 云函数的调用日志,发现日志完全为空。这证明B的请求在到达鉴权函数之前,就被平台网关层直接拒绝了,并非鉴权函数逻辑问题。”已排除项:“我已排除了代码问题(使用最小化项目)、配置问题(反复检查)、project.config.json问题、基础库版本问题、主体不一致问题。”诉求:“这看起来是一个平台侧的Bug或数据同步问题,请求官方技术人员从后台协助排查此共享关系的生效状态。谢谢!”[图片][图片][图片][图片]

    有用 0
    0
  • 微信小程序云环境无法共享,提交按钮为什么一直是无法点击的状态?

    [图片]APPID填写是正确的,提交按钮灰色无法点击

  • 云开发收费问题,正式上线后有免费额度吗?还是说必须购买套餐?

    想咨询下,小程序备案上线以后,云开发每个月是有免费使用额度,还是必须购买套餐呢?

  • 小程序的短信能力问题

    最近出现这个问题:使用接口(cloud.openapi.cloudbase.sendSmsV2)发送短信提示错误“(MK:100C)运营商关键词拦截”和“(S:00252)运营商侧签名未实名完成”。 模板ID为10000064 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/cloudbase/newSendCloudBaseSms.html

    有用 0
    0
  • 云开发数据库回档无法使用

    加载 “tcbRestoreTCBTables” 失败:Error: InvalidParameter, 该功能需升级到标准版及以上即可支持。

    有用 0
    2
  • 如何登录[微信云开发控制台]

    如何登录[微信云开发控制台]

  • 问一个查询问题

    我又个云开发云函数 今天突然发先有问题,查了很久。 后面我重新上传了一把就好了。 我之前有找过2个兼职开权限,一直没管。 我怀疑是其中一个人改了我的部署代码。 请问如何查到他的部署信息呢。

  • 跳转小程序页面的链接,被识别成H5链接,页面无法正常打开

    https://xfyec.com/mall-online/code/pay?scene=9 这是跳转小程序页面的链接,现在被识别成H5链接了,页面无法正常打开,我们急需使用这个页面,请尽快解决该问题[图片]

  • 云函数的时区设置2天了 还不生效

    [图片][图片]

    有用 0
    0
  • 云开发调用sendSmsV2,接口返回正常,但是看日志全是MK:100C)运营商关键词拦截?

    [图片]