PtYeChangeController.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace pt\controllers;
  3. use biz\pt\classes\PtYeChangeClass;
  4. use common\components\dict;
  5. use common\components\util;
  6. use Yii;
  7. class PtYeChangeController extends BaseController
  8. {
  9. public $guestAccess = [];
  10. public function actionList()
  11. {
  12. $get = Yii::$app->request->get();
  13. $status = $get['status'] ?? 0;
  14. $ptStyle = $get['ptStyle'] ?? dict::getDict('ptStyle', 'hd');
  15. $tx = $get['tx'] ?? dict::getDict('yeTx', 'canNot');
  16. $where = [];
  17. if (!empty($status)) {
  18. $where['status'] = $status;
  19. }
  20. $where['ptStyle'] = $ptStyle;
  21. if (!empty($tx)) {
  22. $where['tx'] = $tx;
  23. }
  24. $respond = PtYeChangeClass::getChangeList($where);
  25. if (isset($respond['list']) && !empty($respond['list'])) {
  26. foreach ($respond['list'] as $key => $val) {
  27. if ($tx == dict::getDict('yeTx', 'can')) {
  28. $respond['list'][$key]['balance'] = '-';
  29. } else {
  30. $respond['list'][$key]['txBalance'] = '-';
  31. }
  32. }
  33. }
  34. util::success($respond);
  35. }
  36. }