WechatThirdController.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers;
  8. use app\jobs\SyncSharerListJob;
  9. use app\models\StoreMini;
  10. use app\modules\admin\models\VideoShopForm;
  11. use app\modules\admin\models\VideoShopGoodsForm;
  12. use app\modules\admin\models\VideoShopOrderForm;
  13. use app\modules\admin\models\WechatThirdForm;
  14. use app\modules\client\models\v1\NewSalesmanForm;
  15. use app\utils\Wechat\WechatMini;
  16. use app\models\Option;
  17. class WechatThirdController extends BaseController
  18. {
  19. public function actionStoreMiniSelectList(){
  20. $res = WechatThirdForm::getStoreMiniSelectList(get_store_id());
  21. return $this->asJson($res);
  22. }
  23. /**
  24. * 快速注册小程序
  25. */
  26. public function actionFastRegisterMini(){
  27. $form = new WechatThirdForm();
  28. $form->name = post_params('name');
  29. $form->code = post_params('code');
  30. $form->code_type = post_params('code_type',1);
  31. $form->legal_persona_wechat = post_params('legal_persona_wechat');
  32. $form->license_pic = post_params('license_pic');
  33. $form->legal_persona_name = post_params('legal_persona_name');
  34. $res = $form->fastRegisterMini();
  35. return $this->asJson($res);
  36. }
  37. /**
  38. * 查询快速注册状态
  39. */
  40. public function actionGetFast(){
  41. $form = new WechatThirdForm();
  42. $form->getRegisterStatus();
  43. }
  44. /**
  45. * 获取授权方的帐号基本信息
  46. */
  47. public function actionGetAuthInfo(){
  48. $form = new WechatThirdForm();
  49. $form->mini_id = post_params("id");
  50. $res = $form->api_get_authorizer_info();
  51. return $this->asJson($res);
  52. }
  53. /**
  54. * @return \yii\web\Response
  55. * 获取扫码授权回调参数
  56. */
  57. public function actionGetBackInfo(){
  58. $form = new WechatThirdForm();
  59. $res = $form->backAuthInfo();
  60. return $this->asJson($res);
  61. }
  62. /**
  63. * @return \yii\web\Response
  64. * 通过auth_code(授权码)换取小程序信息
  65. */
  66. public function actionGetMiniInfo(){
  67. $form = new WechatThirdForm();
  68. $form->store_id = get_store_id();
  69. $res = $form->getAuthorization_info(post_params("auth_code"));
  70. return $this->asJson($res);
  71. }
  72. public function actionGetAuthorizers(){
  73. $form = new WechatThirdForm();
  74. $form->store_id = get_store_id();
  75. $res = $form->getAuthorizers();
  76. return $this->asJson($res);
  77. }
  78. /**
  79. * @return \yii\web\Response
  80. * 设置服务器域名
  81. */
  82. public function actionDomainName(){
  83. $form = new WechatThirdForm();
  84. $action = post_params("action",0);
  85. switch ($action){
  86. case 0:
  87. $action = "get";
  88. break;
  89. case 1:
  90. $action = "add";
  91. break;
  92. case 2:
  93. $action = "delete";
  94. break;
  95. case 3:
  96. $action = "set";
  97. break;
  98. }
  99. $form->action = $action;
  100. $form->requestdomain = post_params("requestdomain");
  101. $form->wsrequestdomain = post_params("wsrequestdomain");
  102. $form->uploaddomain = post_params("uploaddomain");
  103. $form->downloaddomain = post_params("downloaddomain");
  104. $form->udpdomain = post_params("udpdomain");
  105. $form->tcpdomai = post_params("tcpdomai");
  106. $res = $form->setDomainName();
  107. return $this->asJson($res);
  108. }
  109. /**
  110. * @return \yii\web\Response
  111. * 设置业务域名
  112. * @throws \GuzzleHttp\Exception\GuzzleException
  113. */
  114. public function actionWebviewDomain(){
  115. $form = new WechatThirdForm();
  116. $action = post_params("action",0);
  117. $form->mini_id = post_params("id")??get_params("id");
  118. switch ($action){
  119. case 0:
  120. $action = "get";
  121. break;
  122. case 1:
  123. $action = "add";
  124. break;
  125. case 2:
  126. $action = "delete";
  127. break;
  128. case 3:
  129. $action = "set";
  130. break;
  131. }
  132. $form->action = $action;
  133. $form->webviewdomain = post_params("webviewdomain");
  134. $res = $form->setWebviewDomainName();
  135. return $this->asJson($res);
  136. }
  137. /**
  138. * 设置名称
  139. * 使用各项media_id,设置名称
  140. */
  141. public function actionSetNickname(){
  142. $form = new WechatThirdForm();
  143. $form->mini_nickname = post_params("nick_name");
  144. $form->mini_id = post_params("id");
  145. $form->id_card = post_params("id_card");
  146. $form->license = post_params("license");
  147. $form->naming_other_stuff_1 = post_params("naming_other_stuff_1","");
  148. $form->naming_other_stuff_2 = post_params("naming_other_stuff_2","");
  149. $form->naming_other_stuff_3 = post_params("naming_other_stuff_3","");
  150. $form->naming_other_stuff_4 = post_params("naming_other_stuff_4","");
  151. $form->naming_other_stuff_5 = post_params("naming_other_stuff_5","");
  152. $res = $form->setMiniNianname();
  153. return $this->asJson($res);
  154. }
  155. /**
  156. * @return \yii\web\Response
  157. * 微信认证名称检测
  158. */
  159. public function actionCheckNickname(){
  160. $form = new WechatThirdForm();
  161. $form->mini_nickname = post_params("nick_name");
  162. $form->mini_id = post_params("id")??get_params("id");
  163. $res = $form->checkWxVerifyNickname();
  164. return $this->asJson($res);
  165. }
  166. //查询名称审核状态
  167. public function actionGetNicknameAuditStatus(){
  168. $form = new WechatThirdForm();
  169. $form->mini_id = post_params("id");
  170. $res = $form->getNicknameAuditStatus();
  171. return $this->asJson($res);
  172. }
  173. /**
  174. * 修改头像
  175. */
  176. public function actionSetHeadImage(){
  177. $form = new WechatThirdForm();
  178. $form->mini_id = post_params("id")??get_params("id");
  179. $form->head_img_media_id = post_params("head_img_media_id")??get_params("head_img_media_id");
  180. $form->x1 = post_params("x1");
  181. $form->y1 = post_params("y1");
  182. $form->x2 = post_params("x2");
  183. $form->y2 = post_params("y2");
  184. $res = $form->setHeadImage();
  185. return $this->asJson($res);
  186. }
  187. /**
  188. * 修改简介
  189. */
  190. public function actionSetSignature(){
  191. $form = new WechatThirdForm();
  192. $form->signature = post_params("signature");
  193. $form->mini_id = post_params("id")??get_params("id");
  194. $res = $form->setSignature();
  195. return $this->asJson($res);
  196. }
  197. /**
  198. * 获取可以设置的所有类目
  199. */
  200. public function actionGetAllCategories(){
  201. $form = new WechatThirdForm();
  202. $form->mini_id = post_params("id")??get_params("id");
  203. $res = $form->getAllCategories();
  204. return $this->asJson($res);
  205. }
  206. /**
  207. * 获取已经设置的类目
  208. */
  209. public function actionGetCategories(){
  210. $form = new WechatThirdForm();
  211. $form->mini_id = post_params("id")??get_params("id");
  212. $res = $form->getCategories();
  213. return $this->asJson($res);
  214. }
  215. /**
  216. * 添加类目
  217. */
  218. public function actionAddCategory(){
  219. $form = new WechatThirdForm();
  220. $form->categories = post_params("categories");
  221. $form->mini_id = post_params("id")??get_params("id");
  222. $res = $form->addCategory();
  223. return $this->asJson($res);
  224. }
  225. /**
  226. * 删除类目
  227. */
  228. public function actionDelCategory(){
  229. $form = new WechatThirdForm();
  230. $form->cate_first = post_params("cate_first");
  231. $form->cate_second = post_params("cate_second");
  232. $form->mini_id = post_params("id")??get_params("id");
  233. $res = $form->delCategory();
  234. return $this->asJson($res);
  235. }
  236. /**
  237. * 获取模版列表
  238. */
  239. public function actionTemplateList(){
  240. $form = new WechatThirdForm();
  241. $res = $form->getTemplateList();
  242. return $this->asJson($res);
  243. }
  244. /**
  245. * 上传小程序
  246. */
  247. public function actionCanUsePlug(){
  248. $form = new WechatThirdForm();
  249. $form->mini_id = input_params("id");
  250. $appid = input_params('appid', 'wx2b03c6e691cd7370');
  251. $aid = input_params('aid', 52);
  252. $res = $form->canUsePlugin($appid, $aid);
  253. return $this->asJson($res);
  254. }
  255. /**
  256. * 上传小程序
  257. */
  258. public function actionUpMini(){
  259. $form = new WechatThirdForm();
  260. $form->mini_id = post_params("id")??get_params("id");
  261. $form->user_version = post_params('user_version');
  262. $form->user_desc = post_params('user_desc');
  263. $useLive = input_params('is_live', 0);
  264. $useStudent = input_params('is_student', 0);
  265. $useB2b = input_params('is_b2b', 0);
  266. $res = $form->upMini($useLive, $useStudent, $useB2b);
  267. return $this->asJson($res);
  268. }
  269. //添加体验者
  270. public function actionAddTester(){
  271. $form = new WechatThirdForm();
  272. $form->mini_id = post_params("id")??get_params("id");
  273. $form->wechatId = post_params("wechatId");
  274. $res = $form->addTester();
  275. return $this->asJson($res);
  276. }
  277. /**
  278. * 获取体验版二维码
  279. */
  280. public function actionGetMiniQrcode(){
  281. $form = new WechatThirdForm();
  282. $form->mini_id = post_params("id")??get_params("id");
  283. $res = $form->getMiniQrcode();
  284. return $this->asJson($res);
  285. }
  286. /**
  287. * 获取小程序二维码
  288. */
  289. public function actionGetMiniQr(){
  290. $form = new WechatThirdForm();
  291. $form->mini_id = post_params("id")??get_params("id");
  292. $res = $form->getMiniQr();
  293. return $this->asJson($res);
  294. }
  295. /**
  296. * 提交审核
  297. */
  298. public function actionSubmitAudit(){
  299. $form = new WechatThirdForm();
  300. $form->user_version = post_params('user_version');
  301. $form->user_desc = post_params('user_desc');
  302. $form->mini_id = post_params("id")??get_params("id");
  303. $form->is_fast_audit = post_params('is_fast_audit',0);
  304. $form->mini_id = post_params("id")??get_params("id");
  305. $form->feedback_stuff = post_params("feedback_stuff");
  306. $form->feedback_info = post_params("feedback_info");
  307. $form->item_list = post_params("item_list");
  308. $res = $form->submitAudit();
  309. return $this->asJson($res);
  310. }
  311. /**
  312. * 撤回审核
  313. */
  314. public function actionUndoCodeAudit(){
  315. $form = new WechatThirdForm();
  316. $form->mini_id = post_params("id")??get_params("id");
  317. $res = $form->unDoCodeAudit();
  318. return $this->asJson($res);
  319. }
  320. /**
  321. * 查询最后一次提交审核的状态
  322. */
  323. public function actionLastAuditStatus(){
  324. $form = new WechatThirdForm();
  325. $form->mini_id = post_params("id")??get_params("id");
  326. $res = $form->lastAuditStatus();
  327. return $this->asJson($res);
  328. }
  329. /**
  330. * 发布已经通过审核的小程序
  331. */
  332. public function actionRelease(){
  333. $form = new WechatThirdForm();
  334. $form->mini_id = post_params("id")??get_params("id");
  335. $res = $form->release();
  336. return $this->asJson($res);
  337. }
  338. /**
  339. * 设置小程序用户隐私保护指引
  340. */
  341. public function actionSetPrivacySetting(){
  342. $form = new WechatThirdForm();
  343. $form->privacy_ver = post_params('privacy_ver');
  344. $form->owner_setting = post_params("owner_setting");
  345. $form->setting_list = post_params("setting_list");
  346. $form->mini_id = post_params("id")??get_params("id");
  347. $res = $form->setPrivacySetting();
  348. return $this->asJson($res);
  349. }
  350. /**
  351. * 查询小程序用户隐私保护指引
  352. */
  353. public function actionGetPrivacySetting(){
  354. $form = new WechatThirdForm();
  355. $form->privacy_ver = post_params('privacy_ver',2);
  356. $form->mini_id = post_params("id")??get_params("id");
  357. $res = $form->getPrivacySetting();
  358. return $this->asJson($res);
  359. }
  360. /**
  361. * 上传txt/上传小程序用户隐私保护指引
  362. */
  363. public function actionUpFile(){
  364. $filename = $_FILES['file']['name'];
  365. $tmpname = $_FILES['file']['tmp_name'];
  366. $path = \Yii::$app->basePath . '/web/temp/txt/';
  367. if(!is_dir($path)){
  368. mkdir($path, 0777, true);
  369. }
  370. $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
  371. if (($ext != 'txt') ) {
  372. return $this->asJson([
  373. 'code' => 1,
  374. 'msg' => '请上传txt文件'
  375. ]);
  376. }
  377. $file = time() . $this->store_id . '.' . $ext;
  378. $uploadfile = $path . $file;
  379. $result = move_uploaded_file($tmpname, $uploadfile);
  380. if($result){
  381. $form = new WechatThirdForm();
  382. $form->file_url = $uploadfile;
  383. $res = $form->uploadPrivacySetting();
  384. return $this->asJson($res);
  385. }
  386. return $this->asJson([
  387. 'code' => 1,
  388. 'msg' => '上传失败'
  389. ]);
  390. }
  391. /**
  392. * @return \yii\web\Response
  393. * 获取小程序列表
  394. */
  395. public function actionGetMiniList(){
  396. $form = new WechatThirdForm();
  397. $form->mini_nickname = get_params("mini_nickname");
  398. $form->status = get_params("status",0);
  399. $form->is_use = get_params("is_use",0);
  400. $form->fuwu_type = input_params("fuwu_type",0);
  401. $res = $form->getMiniList();
  402. return $this->asJson($res);
  403. }
  404. /**
  405. * @return \yii\web\Response
  406. * 获取小程序状态
  407. */
  408. public function actionGetMini(){
  409. $form = new WechatThirdForm();
  410. $form->mini_id = post_params("id")??get_params("id");
  411. $res = $form->getMini();
  412. return $this->asJson($res);
  413. }
  414. public function actionOpenGet(){
  415. $form = new WechatThirdForm();
  416. $form->mini_id = post_params("id")??get_params("id");
  417. $res = $form->openGet();
  418. return $this->asJson($res);
  419. }
  420. public function actionOpenCreate(){
  421. $form = new WechatThirdForm();
  422. $form->mini_id = post_params("id")??get_params("id");
  423. $res = $form->openCreate();
  424. return $this->asJson($res);
  425. }
  426. public function actionOpenBind(){
  427. $open_appid = input_params('open_appid');
  428. $form = new WechatThirdForm();
  429. $form->mini_id = post_params("id")??get_params("id");
  430. $res = $form->openBind($open_appid);
  431. return $this->asJson($res);
  432. }
  433. public function actionOpenUnbind(){
  434. $form = new WechatThirdForm();
  435. $form->mini_id = post_params("id")??get_params("id");
  436. $res = $form->openUnbind();
  437. return $this->asJson($res);
  438. }
  439. /**
  440. * @return \yii\web\Response
  441. * 获取小程序开始使用/暂停使用
  442. */
  443. public function actionMiniIsUse(){
  444. $form = new WechatThirdForm();
  445. $form->mini_id = post_params("id")??get_params("id");
  446. $form->is_use = post_params("is_use");
  447. $res = $form->unbind();
  448. return $this->asJson($res);
  449. }
  450. /**
  451. * @return \yii\web\Response
  452. * 微信支付进件
  453. */
  454. public function actionMchRegister(){
  455. $form = new WechatThirdForm();
  456. $form->mini_id = post_params("id")??get_params("id");
  457. $res = $form->mchRegister();
  458. return $this->asJson($res);
  459. }
  460. //绑定普通二维码
  461. public function actionBindQrcode(){
  462. $form = new NewSalesmanForm();
  463. $form->type = "weixin";
  464. $form->mini_id = post_params("id");
  465. $res = $form->bindPayQrcode();
  466. return $this->asJson($res);
  467. }
  468. //删除普通二维码
  469. public function actionDelBindQrcode(){
  470. $form = new WechatThirdForm();
  471. $form->mini_id = post_params("id");
  472. $res = $form->delQrcodeRules();
  473. return $this->asJson($res);
  474. }
  475. //获取小店指南
  476. public function actionShopHelp() {
  477. return $this->asJson([
  478. 'code' => 0,
  479. 'msg' => 'success',
  480. 'data' => [
  481. 'platform_wechat_fuwu_help_qrcode' => Option::get('platform_wechat_fuwu_help_qrcode', 0, 'saas', '')['value'],
  482. 'platform_wechat_fuwu_help_tel' => Option::get('platform_wechat_fuwu_help_tel', 0, 'saas', '')['value'],
  483. 'platform_wechat_fuwu_help_link' => Option::get('platform_wechat_fuwu_help_link', 0, 'saas', '')['value'],
  484. ],
  485. ]);
  486. }
  487. //添加小店
  488. public function actionAddShop() {
  489. $form = new VideoShopForm();
  490. $form->params = post_params("params");
  491. $form->store_id = get_store_id();
  492. $res = $form->addShop();
  493. return $this->asJson($res);
  494. }
  495. //删除小店
  496. public function actionDelShop() {
  497. $form = new VideoShopForm();
  498. $form->attributes = post_params();
  499. $form->store_id = get_store_id();
  500. $res = $form->delShop();
  501. return $this->asJson($res);
  502. }
  503. //邀请分享员
  504. public function actionInviteSharer() {
  505. $form = new VideoShopForm();
  506. $form->params = post_params("params");
  507. $base_ = new WechatMini();
  508. $form->miniProgram = $base_::getWechatConfig(get_store_id(), input_params('mini_id', (post_params("params")['mini_id'] ?: 0)), 1);
  509. $form->mini_id = $base_::$mini_id;
  510. $form->store_id = get_store_id();
  511. $res = $form->inviteSharer();
  512. return $this->asJson($res);
  513. }
  514. //修改分享员
  515. public function actionEditSharerInfo() {
  516. $form = new VideoShopForm();
  517. $form->params = post_params("params");
  518. $form->store_id = get_store_id();
  519. $res = $form->editSharerInfo();
  520. return $this->asJson($res);
  521. }
  522. //解绑小店分享员
  523. public function actionUnbindSharer() {
  524. $form = new VideoShopForm();
  525. $form->attributes = post_params();
  526. $form->miniProgram = (new WechatMini())::getWechatConfig(get_store_id(), input_params('mini_id', 0), 1);
  527. $form->store_id = get_store_id();
  528. $res = $form->unbindSharer();
  529. return $this->asJson($res);
  530. }
  531. // 获取小店分享员列表
  532. public function actionGetSharerList() {
  533. cache()->getOrSet('actionSyncVideoShopSharer_' . get_store_id(), function(){
  534. $res = $this->actionSyncVideoShopSharer();
  535. // debug_log(['actionGetSharerList', $res->data], __CLASS__ . '.log');
  536. return 1;
  537. });
  538. $form = new VideoShopForm();
  539. $form->attributes = get_params();
  540. $form->store_id = get_store_id();
  541. $res = $form->getSharerList();
  542. return $this->asJson($res);
  543. }
  544. // 获取同步小店产品
  545. public function actionSyncGoodsList() {
  546. $form = new VideoShopGoodsForm();
  547. $base_ = new WechatMini();
  548. $miniProgram = $base_::getWechatConfig(get_store_id(), get_mini_id(), 1);
  549. $form->miniProgram = $miniProgram;
  550. $form->store_id = get_store_id();
  551. $form->mini_id = $base_::$mini_id;
  552. $res = $form->syncGoodsList();
  553. return $this->asJson($res);
  554. }
  555. //获取小店同步产品列表
  556. public function actionShopGoodsList() {
  557. $form = new VideoShopGoodsForm();
  558. $form->attributes = get_params();
  559. $form->store_id = get_store_id();
  560. $res = $form->shopGoodsList(all_params());
  561. return $this->asJson($res);
  562. }
  563. public function actionShopProductListing() {
  564. $form = new VideoShopGoodsForm();
  565. $form->store_id = get_store_id();
  566. $res = $form->product_listing(input_params('product_id'), input_params('delisting'));
  567. return $this->asJson($res);
  568. }
  569. //修改小店产品分佣状态
  570. public function actionShopGoodsSetStatus() {
  571. $form = new VideoShopGoodsForm();
  572. $form->attributes = post_params();
  573. $form->store_id = get_store_id();
  574. $res = $form->setStatus();
  575. return $this->asJson($res);
  576. }
  577. //修改小店产品分佣
  578. public function actionShopGoodsSetRateParams() {
  579. $form = new VideoShopGoodsForm();
  580. $form->attributes = post_params();
  581. $form->store_id = get_store_id();
  582. $res = $form->setRateParams();
  583. return $this->asJson($res);
  584. }
  585. //获取分享员订单列表
  586. public function actionSharerOrderList() {
  587. $form = new VideoShopOrderForm();
  588. $form->attributes = get_params();
  589. $form->store_id = get_store_id();
  590. $res = $form->getSharerOrderList();
  591. return $this->asJson($res);
  592. }
  593. //同步分享员信息
  594. public function actionSyncVideoShopSharer() {
  595. $form = new VideoShopForm();
  596. $store_id = get_store_id();
  597. // 同步视频号小店
  598. queue_push(new SyncSharerListJob(['store_id' => $store_id, 'type' => 0]), 0, 1);
  599. return $this->asJson([
  600. 'code' => 0,
  601. 'msg' => '同步完成'
  602. ]);
  603. }
  604. //同步订单
  605. public function actionSyncVideoShopOrder() {
  606. $form = new VideoShopOrderForm();
  607. $store_id = get_store_id();
  608. queue_push(new SyncSharerListJob(['store_id' => $store_id, 'type' => 2]), 0, 1);
  609. return $this->asJson([
  610. 'code' => 0,
  611. 'msg' => '同步完成'
  612. ]);
  613. }
  614. public function actionSetWebviewDomain() {
  615. $form = new WechatThirdForm();
  616. $form->mini_id = input_params('mini_id');
  617. return $this->asJson($form->setWebviewDomain());
  618. }
  619. public function actionGetWebviewFile() {
  620. $form = new WechatThirdForm();
  621. $form->mini_id = get_params('mini_id');
  622. return $this->asJson($form->getWebviewFile());
  623. }
  624. //获取短链
  625. public function actionGetShortLink() {
  626. $form = new WechatThirdForm();
  627. $form->store_id = get_store_id();
  628. $path = post_params('path', '');
  629. $mini_id = post_params('mini_id', '');
  630. $is_platform = post_params('is_platform', '');
  631. $is_serve = post_params('is_serve', '');
  632. return $this->asJson($form->getShortLink($path, $mini_id, $is_platform, $is_serve));
  633. }
  634. }