作者 lihan
1 个管道 的构建 通过 耗费 0 秒

充值卡测试

... ... @@ -38,6 +38,7 @@ class ChargeController extends HomeBaseController
$balance = $info['denomination'] + $info['bonus'];
Db::startTrans();
if (Db::name('user')->where(['openid' => $return['openid'], 'id' => session('user.id')])->setInc('balance', $balance)) {
session('op', $return['attach']);
$data = [
'user_id' => session('user.id'),
'type' => 1,
... ...
... ... @@ -164,6 +164,7 @@ class CenterController extends HomeBaseController
*/
public function charge()
{
echo session('op');
$is_bonus = request()->param('is_bonus');
$where['is_on_sale'] = ['eq', 1];
$is_bonus = (empty($is_bonus)) ? 0 : 1;
... ...