|
@@ -10,11 +10,12 @@ class Buy extends Base
|
|
|
parent::__construct();
|
|
|
|
|
|
if (!$this->user) {
|
|
|
- return $this->location('home');
|
|
|
+ //return $this->location('home');
|
|
|
}
|
|
|
|
|
|
if ($this->type == 1) {
|
|
|
- return $this->location('list', array('type' => 2));
|
|
|
+ $this->type = 2;
|
|
|
+ return $this->location('list');
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -59,7 +60,7 @@ class Buy extends Base
|
|
|
foreach ($data as $k => $v) {
|
|
|
$info = Dever::db('journal/info')->one($v['product_id']);
|
|
|
|
|
|
- $data[$k]['code_string'] = '兑换码:' . $v['code'];
|
|
|
+ $data[$k]['code_string'] = '兑换码:' . trim($v['code']);
|
|
|
|
|
|
$data[$k]['name'] = $info['name'];
|
|
|
|
|
@@ -67,7 +68,8 @@ class Buy extends Base
|
|
|
|
|
|
$data[$k]['pic_gd'] .= '?imageView2/2/w/375';
|
|
|
|
|
|
- $data[$k]['code_pic'] = $this->create_code($info['id']);
|
|
|
+ $data[$k]['code_pic'] = '';
|
|
|
+ //$data[$k]['code_pic'] = $this->create_code($info['id']);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -158,7 +160,7 @@ class Buy extends Base
|
|
|
$config['button'] = '刷新';
|
|
|
//$this->location('success', array('id' => $id, 'buy' => $buy_id, 'order_id' => $order_id));
|
|
|
} else {
|
|
|
- $config['button'] = '复制兑换码<span>'.$order['code'].'</span>';
|
|
|
+ $config['button'] = '复制兑换码<span>'.trim($order['code']).'</span>';
|
|
|
}
|
|
|
|
|
|
$config['code'] = '<p>兑换码:'.$order['code'].'</p>';
|