GivingGiftsController.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers\givingGifts;
  8. use app\modules\admin\models\givingGifts\GivingGiftsForm;
  9. class GivingGiftsController extends BaseController {
  10. public function actionTest() {
  11. $id = '14729';
  12. GivingGiftsForm::orderReceivedTimeoutRefund(\app\models\Order::findOne($id));
  13. }
  14. public function actionConf() {
  15. $conf = GivingGiftsForm::conf(get_store_id());
  16. return $this->asJson([
  17. 'code' => 0,
  18. 'data' => $conf,
  19. ]);
  20. }
  21. public function actionConfSave() {
  22. GivingGiftsForm::confSave(get_store_id(), input_params('conf'));
  23. return $this->asJson([
  24. 'code' => 0,
  25. 'msg' => 'ok',
  26. ]);
  27. }
  28. public function actionConfGoodsSave() {
  29. $res = GivingGiftsForm::confGoodsSave(get_store_id(), input_params('goodsIds', []), input_params('del', 0));
  30. return $this->asJson($res);
  31. }
  32. }