|
@@ -1518,7 +1518,21 @@ class User extends Api
|
|
|
|
|
|
//充值列表
|
|
|
public function rechargelist() {
|
|
|
- $list = Db::name('recharge')->field('id, title, price, couponnum')->order('weigh desc')->select();
|
|
|
+ $list = Db::name('recharge')->field('id, title, price, coupon_id, couponnum')->order('weigh desc')->select();
|
|
|
+
|
|
|
+ $coupon = Db::name('coupon');
|
|
|
+ foreach ($list as &$v) {
|
|
|
+ $coupon_info = $coupon->find($v['coupon_id']);
|
|
|
+ if ($coupon_info) {
|
|
|
+ if ($coupon_info['type'] == 1) {
|
|
|
+ $v['coupon_title'] = $coupon_info['money'] . '折';
|
|
|
+ } else {
|
|
|
+ $v['coupon_title'] = $coupon_info['money'] . '元';
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $v['coupon_title'] = '';
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$this->success('充值列表', $list);
|
|
|
}
|