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

充值卡测试

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