|
|
@ -10,6 +10,7 @@ use QRcode;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class CoinOrderController extends BaseController
|
|
|
|
class CoinOrderController extends BaseController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
const LV = 2;//平台币充值手续费
|
|
|
|
public function page_show($model,$map,$p=1)
|
|
|
|
public function page_show($model,$map,$p=1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (isset($_REQUEST['row'])) {
|
|
|
|
if (isset($_REQUEST['row'])) {
|
|
|
@ -104,7 +105,7 @@ class CoinOrderController extends BaseController
|
|
|
|
$this->error('无权限操作');
|
|
|
|
$this->error('无权限操作');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->assign("LV",self::LV);
|
|
|
|
if(IS_POST){
|
|
|
|
if(IS_POST){
|
|
|
|
SafeFilter($_POST);
|
|
|
|
SafeFilter($_POST);
|
|
|
|
$coin_num = I("coin_num");
|
|
|
|
$coin_num = I("coin_num");
|
|
|
@ -122,7 +123,7 @@ class CoinOrderController extends BaseController
|
|
|
|
$data['create_time'] = time();
|
|
|
|
$data['create_time'] = time();
|
|
|
|
$data['discount'] = "0";
|
|
|
|
$data['discount'] = "0";
|
|
|
|
if($pay_type==1){ // 在线转账
|
|
|
|
if($pay_type==1){ // 在线转账
|
|
|
|
$free = sprintf("%.2f",$coin_num*(0.2/100));
|
|
|
|
$free = sprintf("%.2f",$coin_num*(self::LV/100));
|
|
|
|
$free = $free<'0.1' ? '0.1':$free;
|
|
|
|
$free = $free<'0.1' ? '0.1':$free;
|
|
|
|
$data['pay_amount'] = bcadd($coin_num,$free,2);
|
|
|
|
$data['pay_amount'] = bcadd($coin_num,$free,2);
|
|
|
|
$data['order_status'] = 0;
|
|
|
|
$data['order_status'] = 0;
|
|
|
|