Browse Source

刮奖初始传输code

master
wanghongjun 2 years ago
parent
commit
a527900863
  1. 7
      app/controller/Zone.php

7
app/controller/Zone.php

@ -8,6 +8,7 @@ use app\model\ConsumptionRecords;
use app\model\Zone as ZoneModel;
use app\model\ZoneGoods;
use app\logic\Zone as ZoneLogic;
use app\model\ZoneGoodsPlay;
use think\facade\Request;
use think\facade\Session;
@ -52,12 +53,14 @@ class Zone extends BaseController
$zoneGoodsId = $param['zone_goods_id'];
$info = ZoneGoods::where(['status' => 1,'id' => $zoneGoodsId])
->field('max_awards_amount,content,price,bg_image')
->field('max_awards_amount,content,price,bg_image,play_id')
->find();
if (empty($info)) $this->renderError('数据不存在');
$info['important'] = '最高中奖金额'.format_money($info['max_awards_amount']);
if ($info['bg_image']) $info['bg_image'] = get_image_url($info['bg_image']);
unset($info['max_awards_amount']);
$code = ZoneGoodsPlay::where('id',$info['play_id'])->value('play_code');
$info['code'] = $code ?? '';
unset($info['max_awards_amount'],$info['play_id']);
return $this->renderSuccess('数据返回成功',['data' => $info]);
}

Loading…
Cancel
Save