|
@@ -5,7 +5,7 @@
|
|
|
* @Author: likang
|
|
|
* @Date: 2022-08-12 10:33:24
|
|
|
* @LastEditors: likang 1186820806@qq.com
|
|
|
- * @LastEditTime: 2022-11-18 15:48:31
|
|
|
+ * @LastEditTime: 2023-02-20 13:49:38
|
|
|
*/
|
|
|
|
|
|
|
|
@@ -72,7 +72,30 @@ class Api extends CatchController
|
|
|
sleep(60*60*24);
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检测小程序版本版本 function
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function detectionVersion(){
|
|
|
+ $token = $_GET['token'];
|
|
|
+ if (!$token || $token != '444333d3') {
|
|
|
+ json_fail('缺少token或者token不对');
|
|
|
+ }
|
|
|
+ $param = json_decode(optimize_json(file_get_contents("php://input")), true);
|
|
|
+ if (json_last_error() != 0) {
|
|
|
+ json_fail('解析异常', json_last_error_msg());
|
|
|
+ }
|
|
|
|
|
|
+ if($param["version"]=="1.1.1"){
|
|
|
+ json_success("版本一致");
|
|
|
+ }else{
|
|
|
+ //当前更新的版本地址
|
|
|
+ $data["url"]="";
|
|
|
+ json_fail("版本需要更新",$data);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|