QuanziController.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers\quanzi;
  8. use app\modules\admin\models\quanzi\QuanziForm;
  9. class QuanziController extends BaseController {
  10. public function actionTest() {
  11. QuanziForm::conf();
  12. $id = '22528';
  13. }
  14. public function actionConf() {
  15. $conf = QuanziForm::conf(get_store_id());
  16. return $this->asJson([
  17. 'code' => 0,
  18. 'data' => $conf,
  19. 'url' => [
  20. 'url_doc_baidu_app' => 'https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application/v1', //创建应用:
  21. 'url_doc_baidu_api' => 'https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11', //接口调试
  22. ]
  23. ]);
  24. }
  25. public function actionConfSave() {
  26. QuanziForm::confSave(get_store_id(), input_params('conf'));
  27. return $this->asJson([
  28. 'code' => 0,
  29. 'msg' => 'ok',
  30. ]);
  31. }
  32. public function actionContentsList() {
  33. $form = new QuanziForm();
  34. $params = all_params();
  35. return $this->asJson($form->contentsList(array_merge($params, ['orderByAdmin' => 1])));
  36. }
  37. public function actionContentsAdd() {
  38. $form = new QuanziForm();
  39. return $this->asJson($form->contentsAdd(0, 0, all_params()));
  40. }
  41. public function actionContentsSaveKey() {
  42. $form = new QuanziForm();
  43. $id = input_params('id');
  44. $key = input_params('key');
  45. $val = input_params('val');
  46. return $this->asJson($form->contentsSaveKey($id, $key, $val));
  47. }
  48. public function actionCommentsList() {
  49. $form = new QuanziForm();
  50. $params = all_params();
  51. return $this->asJson($form->commentsList($params));
  52. }
  53. public function actionCatList() {
  54. $form = new QuanziForm();
  55. return $this->asJson($form->catList(all_params()));
  56. }
  57. public function actionCatSelectList() {
  58. $form = new QuanziForm();
  59. return $this->asJson($form->catSelectList(0));
  60. }
  61. public function actionCatSave() {
  62. $form = new QuanziForm();
  63. return $this->asJson($form->catSave(all_params()));
  64. }
  65. public function actionCatSaveKey() {
  66. $form = new QuanziForm();
  67. $id = input_params('id');
  68. $key = input_params('key');
  69. $val = input_params('val');
  70. return $this->asJson($form->catSaveKey($id, $key, $val));
  71. }
  72. public function actionLabelList() {
  73. $form = new QuanziForm();
  74. return $this->asJson($form->labelList(all_params()));
  75. }
  76. public function actionLabelSelectList() {
  77. $form = new QuanziForm();
  78. return $this->asJson($form->labelSelectList(0));
  79. }
  80. public function actionLabelSave() {
  81. $form = new QuanziForm();
  82. return $this->asJson($form->labelSave(all_params()));
  83. }
  84. public function actionLabelSaveKey() {
  85. $form = new QuanziForm();
  86. $id = input_params('id');
  87. $key = input_params('key');
  88. $val = input_params('val');
  89. return $this->asJson($form->labelSaveKey($id, $key, $val));
  90. }
  91. public function actionBgmList() {
  92. $form = new QuanziForm();
  93. return $this->asJson($form->bgmList(all_params()));
  94. }
  95. public function actionBgmSelectList() {
  96. $form = new QuanziForm();
  97. return $this->asJson($form->bgmSelectList(0));
  98. }
  99. public function actionBgmSave() {
  100. $form = new QuanziForm();
  101. return $this->asJson($form->bgmSave(all_params()));
  102. }
  103. public function actionBgmSaveKey() {
  104. $form = new QuanziForm();
  105. $id = input_params('id');
  106. $key = input_params('key');
  107. $val = input_params('val');
  108. return $this->asJson($form->bgmSaveKey($id, $key, $val));
  109. }
  110. public function actionRoomList() {
  111. $form = new QuanziForm();
  112. return $this->asJson($form->roomList(all_params()));
  113. }
  114. public function actionRoomSaveKey() {
  115. $form = new QuanziForm();
  116. $id = input_params('id');
  117. $key = input_params('key');
  118. $val = input_params('val');
  119. return $this->asJson($form->roomSaveKey($id, $key, $val));
  120. }
  121. public function actionGoodsExtList() {
  122. $form = new QuanziForm();
  123. return $this->asJson($form->goodsExtList(all_params()));
  124. }
  125. public function actionGoodsExtSave() {
  126. $form = new QuanziForm();
  127. return $this->asJson($form->goodsExtSave(all_params()));
  128. }
  129. public function actionGoodsExtSaveKey() {
  130. $form = new QuanziForm();
  131. $id = input_params('id');
  132. $key = input_params('key');
  133. $val = input_params('val');
  134. return $this->asJson($form->goodsExtSaveKey($id, $key, $val));
  135. }
  136. }