💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 课堂:应用商店通信管理协议 # 开发文档:https://tower.im/teams/46865/documents/14720/ ## 实例 获取预安装应用列表 app/getPreset http://shop.wmketang.com/?r=shop/app/getPreset ## PAD管理器:(PAD管理器的请求都不需要检测SSK、APPKEY合法性) ### 获取应用安装白名单 padmgr/whiteList http://shop.wmketang.com/?r=shop/padmgr/whiteList http://ketang.test/index.php?r=shop/system/getConfig ### 校验授权码 padmgr/authCode ``` /** * 校验授权码 * @author yemg 10/14/16 */ public function actionAuthCode() { $code = Yii::app()->request->getParam('code'); $authType = Yii::app()->request->getParam('authType'); $model = Yii::app()->request->getParam('model'); $imei = Yii::app()->request->getParam('imei'); if (!$code || !$authType || !$model || !$imei) { ResponseUtils::json(null, 21, '参数错误'); } $authorization = ShopService::factory()->getAuthorization(array( 'status' => WK::CNT_ENABLE, 'expire' => date('Y-m-d H:i:s', time()), 'passwordMD5' => $code, 'authType' => $authType )); if (!$authorization) { ResponseUtils::json(null, 1, '验证失败或已过期'); } ShopService::factory()->saveAuthRecord(array( 'authorizationID' => $authorization->id, 'imei' => $imei, 'model' => $model, 'userID' => $authorization->fdUserID )); $data['expire'] = DateTimeUtils::date2MillSecond($authorization->fdExpire); $data['duration'] = 180; $data['authType'] = $authType; ResponseUtils::json(compact('data')); } ``` ## 创建models wkserver.tbAppConfig wkserver.tbAppConfigCatalog sevAppConfig sevAppConfigCatalog D:\wamp\www\ketang.test\weike\protected\models\server\sevAppConfig.php ## 创建控制器 modules\shop\controllers\SystemController.php ![](./img/2019-01-25_111708.png) ## 新建AbstractHybrid ### 设置APP配置文件 system/setConfig ### 获取APP配置文件 system/getConfig ### 获取版本配置列表 system/listConfig ### 设置catalog system/setCatalog ### 复制catalog system/copyCatalog ### 列出所有catalog system/listCatalog