|
@@ -103,4 +103,21 @@ class IndexController extends BaseController |
|
@@ -103,4 +103,21 @@ class IndexController extends BaseController |
|
103
|
}
|
103
|
}
|
|
104
|
$this->response('success');
|
104
|
$this->response('success');
|
|
105
|
}
|
105
|
}
|
|
|
|
106
|
+
|
|
|
|
107
|
+ /**
|
|
|
|
108
|
+ * 生成嵌套AICC企微的token
|
|
|
|
109
|
+ * @author zbj
|
|
|
|
110
|
+ * @date 2024/2/29
|
|
|
|
111
|
+ */
|
|
|
|
112
|
+ public function generateAiCCToken(){
|
|
|
|
113
|
+ $data = [
|
|
|
|
114
|
+ 'id' => $this->manage['id'],
|
|
|
|
115
|
+ 'name' => $this->manage['name'],
|
|
|
|
116
|
+ 'timestamp' => time(), // 接收到字符串解密出来以后需要 验证时间不超过30秒 超过时间视为无效授权
|
|
|
|
117
|
+ ];
|
|
|
|
118
|
+ $common = new \App\Helper\Common();
|
|
|
|
119
|
+ $str = $common->encrypt($data);
|
|
|
|
120
|
+ $this->response('success',Code::SUCCESS,['str'=>$str]);
|
|
|
|
121
|
+ }
|
|
|
|
122
|
+
|
|
106
|
} |
123
|
} |