- 云开发-查询短信记录提示环境不存在 rid: 642fd4be-4534a152-4c66f10?
发送参数 array:8 [ "env" => "qiju-online-7gre2mrpf6730c1d" "phone_number_list" => array:1 [ 0 => "+8618520015605" ] "sms_type" => "Marketing" "template_id" => "844110" "content" => "您预约的行程已被管家接单啦,电话:18520232024" "path" => "/jump-mp.html?path=/pages/tabBar/mine" "use_short_name" => true "resource_appid" => "wx81efd89c24c41fae" ] 服务端调用发送接口,结果如下 array:3 [ "errcode" => 0 "send_status_list" => array:1 [ 0 => array:5 [ "serial_no" => "3369:289930145916808565271401560" "phone_number" => "+8618520015605" "code" => "Ok" "message" => "send success" "iso_code" => "" ] ] "query_id" => "d086fe2260ef438d8f94b52d1a17df35" ] 然后调用查询短信记录接口,参数如下: array:7 [ "EnvId" => "qiju-online-7gre2mrpf6730c1d" "StartDate" => "2023-04-07" "EndDate" => "2023-04-07" "Mobile" => "+8618520015605" "QueryId" => "d086fe2260ef438d8f94b52d1a17df35" "PageNumber" => 1 "PageSize" => 1 ] 返回结果: array:2 [ "errcode" => -601027 "errmsg" => "环境不存在 rid: 642fd79e-7a6028a7-62691884" ]
2023-04-07 - 可以开放公众号素材管理的分组管理接口吗?
RT:)
2020-03-23 - 开发者工具v1.02.1810250上传接口报错
-------------------------------------- 最新更新 11.01号 -------------------------------- 问题已自行解决:在上传代码前,打开一次将要上传的项目。 [代码] //打开指定目录的项目[代码][代码] [代码][代码]$strIDEPath[代码] [代码]= [代码][代码]$this[代码][代码]->_strWxidePath;[代码][代码] [代码][代码]$strDriverPath[代码] [代码]= [代码][代码]substr[代码][代码]([代码][代码]$strIDEPath[代码][代码], 0, 2);[代码] [代码]exec[代码][代码]([代码][代码]"$strDriverPath && cd $strIDEPath && cli -o $strProjectPath 2>&1"[代码][代码]);[代码]存在的问题:打开项目的过程中还是会报 runtimeAttr 的错误,虽然并不会影响之后上传流程。 StatusCodeError: 400 - "{\"code\":40000,\"error\":\"错误 {\\\"code\\\":40000,\\\"error\\\":\\\"错误 TypeError: Cannot read property 'runtimeAttr' of undefined\\\"}\"}" [图片] -------------------------------------- 以下是历史问题 ---------------------------------- 更新了最新版的微信开发者工具后,调用HTTP接口上传代码,爆出的错误: {"code":40000,"error":"错误 {\"code\":40000,\"error\":\"错误 TypeError: Cannot read property 'runtimeAttr' of undefined\"}"} 代码调用流程(PHP命令行模式,workerman框架): 1、onWorkerStart,进程初始化时(之后不再执行),命令行调用打开工具 [代码] /**[代码][代码] [代码][代码]* php命令行调取微信开发者工具[代码][代码] [代码][代码]* @param array $aInput [in]参数列表,暂无,填空数组即可[代码][代码] [代码][代码]* @param array $aOutput [out]输出结果,如果成功,则返回[代码][代码] [代码][代码]* <pre>[代码][代码] [代码][代码]* port - int .ide端口号[代码][代码] [代码][代码]* </pre>[代码][代码] [代码][代码]* @return boolean[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]public[代码] [代码]function[代码] [代码]openWxideCli([代码][代码]array[代码] [代码]$aInput[代码][代码], [代码][代码]array[代码] [代码]&[代码][代码]$aOutput[代码] [代码]= [])[代码][代码] [代码][代码]{[代码][代码] [代码][代码]$strIDEPath[代码] [代码]= [代码][代码]$this[代码][代码]->_strWxidePath;[代码][代码] [代码][代码]$strDriverPath[代码] [代码]= [代码][代码]substr[代码][代码]([代码][代码]$strIDEPath[代码][代码], 0, 2);[代码][代码] [代码][代码]$nOpenRet[代码] [代码]= 1;[代码][代码] [代码][代码]$aOpenOut[代码] [代码]= [];[代码][代码] [代码][代码]exec[代码][代码]([代码][代码]"$strDriverPath && cd $strIDEPath && cli.bat 2>&1"[代码][代码], [代码][代码]$aOpenOut[代码][代码], [代码][代码]$nOpenRet[代码][代码]);[代码][代码] [代码][代码]if[代码] [代码]([代码][代码]$nOpenRet[代码][代码])[代码][代码] [代码][代码]{[代码][代码] [代码][代码]$this[代码][代码]->setError([代码][代码]'开启微信开发者工具命令行失败!'[代码][代码]);[代码][代码] [代码][代码]return[代码] [代码]false;[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]//匹配出端口号[代码][代码] [代码][代码]$strPattern[代码] [代码]= [代码][代码]'/http:\/\/127\.0\.0\.1:([\d]+)/'[代码][代码];[代码] [代码] [代码][代码]foreach[代码] [代码]([代码][代码]$aOpenOut[代码] [代码]as[代码] [代码]$line[代码][代码])[代码][代码] [代码][代码]{[代码][代码] [代码][代码]$aMatch[代码] [代码]= [];[代码][代码] [代码][代码]if[代码] [代码](preg_match([代码][代码]$strPattern[代码][代码], [代码][代码]$line[代码][代码], [代码][代码]$aMatch[代码][代码]))[代码][代码] [代码][代码]{[代码][代码] [代码][代码]$aOutput[代码][代码][[代码][代码]'port'[代码][代码]] = [代码][代码]intval[代码][代码]([代码][代码]$aMatch[代码][代码][1]);[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]true;[代码][代码] [代码][代码]}[代码] [图片] 2、onMessage监听我们平台的上传代码请求,然后调用工具的HTTP上传接口,就是在这里返回的错误 [代码] /**[代码][代码] [代码][代码]* php命令行调取微信开发者工具HTTP上传接口[代码][代码] [代码][代码]* @param array $aInput [in]参数列表[代码][代码] [代码][代码]* <pre>[代码][代码] [代码][代码]* project_path - string 必填 需要上传的项目路径[代码][代码] [代码][代码]* version - string 必填 版本号[代码][代码] [代码][代码]* desc - string 选填 版本描述[代码][代码] [代码][代码]* </pre>[代码][代码] [代码][代码]* @param array $aOutput [out]输出结果[代码][代码] [代码][代码]* @return boolean[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]public[代码] [代码]function[代码] [代码]wxideCliUpload([代码][代码]array[代码] [代码]$aInput[代码][代码], [代码][代码]array[代码] [代码]&[代码][代码]$aOutput[代码] [代码]= [])[代码][代码] [代码][代码]{[代码][代码] [代码][代码]if[代码] [代码](![代码][代码]$this[代码][代码]->_checkFields([代码][代码]$aInput[代码][代码], [[代码][代码]'project_path'[代码][代码], [代码][代码]'version'[代码][代码], [代码][代码]'desc'[代码][代码]], [], true))[代码][代码] [代码][代码]{[代码][代码] [代码][代码]return[代码] [代码]false;[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]$strProjectPath[代码] [代码]= [代码][代码]$aInput[代码][代码][[代码][代码]'project_path'[代码][代码]];[代码][代码] [代码][代码]$strVersionNum[代码] [代码]= [代码][代码]$aInput[代码][代码][[代码][代码]'version'[代码][代码]];[代码][代码] [代码][代码]$strDesc[代码] [代码]= [代码][代码]$aInput[代码][代码][[代码][代码]'desc'[代码][代码]];[代码][代码] [代码][代码]$nPort[代码] [代码]= [代码][代码]$aInput[代码][代码][[代码][代码]'wxide_port'[代码][代码]];[代码][代码] [代码] [代码] [代码][代码]//echo $nPort."\n";[代码][代码] [代码] [代码] [代码][代码]if[代码][代码](![代码][代码]$nPort[代码][代码])[代码][代码] [代码][代码]{[代码][代码] [代码][代码]$aOpenResult[代码] [代码]= [];[代码][代码] [代码][代码]if[代码] [代码](![代码][代码]$this[代码][代码]->openWxideCli([], [代码][代码]$aOpenResult[代码][代码]))[代码][代码] [代码][代码]{[代码][代码] [代码][代码]return[代码] [代码]false;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]$nPort[代码] [代码]= [代码][代码]$aOpenResult[代码][代码][[代码][代码]'port'[代码][代码]];[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]//http上传代码[代码][代码] [代码][代码]$_oCurlService[代码] [代码]= [代码][代码]new[代码] [代码]CurlService();[代码][代码] [代码][代码]$url[代码] [代码]= [代码][代码]'http://127.0.0.1:'[代码] [代码]. [代码][代码]$nPort[代码] [代码]. [代码][代码]'/upload?projectpath='[代码] [代码]. urlencode([代码][代码]$strProjectPath[代码][代码])[代码][代码] [代码][代码]. [代码][代码]'&version='[代码] [代码]. [代码][代码]$strVersionNum[代码][代码];[代码] [代码] [代码][代码]if[代码] [代码](![代码][代码]empty[代码][代码]([代码][代码]$strDesc[代码][代码]))[代码][代码] [代码][代码]{[代码][代码] [代码][代码]$url[代码] [代码].= [代码][代码]'&desc='[代码] [代码]. urlencode([代码][代码]$strDesc[代码][代码]);[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]$result[代码] [代码]= [代码][代码]''[代码][代码];[代码][代码] [代码][代码]$bResponse[代码] [代码]= [代码][代码]$_oCurlService[代码][代码]->get([代码][代码]$url[代码][代码], [代码][代码]$result[代码][代码]);[代码] [代码] [代码][代码]if[代码] [代码](![代码][代码]$bResponse[代码][代码])[代码][代码] [代码][代码]{[代码][代码] [代码][代码]echo[代码] [代码]date[代码][代码]([代码][代码]'Y-m-d H:i:s'[代码][代码]) . PHP_EOL;[代码][代码] [代码][代码]echo[代码] [代码]$strProjectPath[代码] [代码]. PHP_EOL;[代码][代码] [代码][代码]echo[代码] [代码]$result[代码] [代码]. PHP_EOL;[代码][代码] [代码][代码]echo[代码] [代码]$nPort[代码][代码].PHP_EOL;[代码][代码] [代码][代码]$aResponse[代码] [代码]= json_decode([代码][代码]$result[代码][代码], true);[代码][代码] [代码][代码]$this[代码][代码]->setError([代码][代码]$aResponse[代码][代码][[代码][代码]'code'[代码][代码]]);[代码][代码] [代码][代码]return[代码] [代码]false;[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]return[代码] [代码]true;[代码][代码] [代码][代码]}[代码]命令行输出错误信息: [图片] [图片] 3、项目配置文件模板 project.config.json [代码]{[代码][代码] [代码][代码]"description"[代码][代码]: [代码][代码]"项目配置文件。"[代码][代码],[代码][代码] [代码][代码]"packOptions"[代码][代码]: {[代码][代码] [代码][代码]"ignore"[代码][代码]: [][代码][代码] [代码][代码]},[代码][代码] [代码][代码]"setting"[代码][代码]: {[代码][代码] [代码][代码]"urlCheck"[代码][代码]: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]"es6"[代码][代码]: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]"postcss"[代码][代码]: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]"minified"[代码][代码]: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]"newFeature"[代码][代码]: [代码][代码]true[代码][代码] [代码][代码]},[代码][代码] [代码][代码]"compileType"[代码][代码]: [代码][代码]"miniprogram"[代码][代码],[代码] [代码] //上传时会替换为具体的appid[代码] [代码] [代码][代码]"appid"[代码][代码]: [代码][代码]"__DEVELOPERAPPID__"[代码][代码],[代码] [代码] //上传时会替换为具体的名称[代码] [代码] [代码][代码]"projectname"[代码][代码]:[代码][代码]"__PROJECTNAME__"[代码][代码]}[代码]
2018-10-30 - 微信IDE更新后CLI上传问题
使用cli调用上传代码,提示{"code":40000,"error":"错误 ReferenceError: path is not defined"}
2018-09-11