pay
parent
5f8e35ef24
commit
b790a0c3a1
|
|
@ -58,7 +58,7 @@ class BuyController extends CommonController
|
||||||
$this->assign('express_list', ResourcesService::ExpressList());
|
$this->assign('express_list', ResourcesService::ExpressList());
|
||||||
|
|
||||||
// 支付方式
|
// 支付方式
|
||||||
$this->assign('payment_list', ResourcesService::PaymentList());
|
$this->assign('payment_list', ResourcesService::BuyPaymentList());
|
||||||
|
|
||||||
// 商品/基础信息
|
// 商品/基础信息
|
||||||
$base = [
|
$base = [
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,56 @@ class ResourcesService
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取支付方式列表
|
||||||
|
* @author Devil
|
||||||
|
* @blog http://gong.gg/
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2018-09-19
|
||||||
|
* @desc 下订单根据终端自动筛选支付方式
|
||||||
|
* @param [array] $params [输入参数]
|
||||||
|
*/
|
||||||
|
public static function BuyPaymentList($params = [])
|
||||||
|
{
|
||||||
|
$data = self::PaymentList($params);
|
||||||
|
|
||||||
|
$result = [];
|
||||||
|
if(!empty($data))
|
||||||
|
{
|
||||||
|
foreach($data as $v)
|
||||||
|
{
|
||||||
|
// 根据终端类型筛选
|
||||||
|
switch(APPLICATION)
|
||||||
|
{
|
||||||
|
// pc, wap
|
||||||
|
case 'web' :
|
||||||
|
if(IsMobile())
|
||||||
|
{
|
||||||
|
if(in_array('wap', $v['apply_terminal']))
|
||||||
|
{
|
||||||
|
$result[] = $v;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(in_array('pc', $v['apply_terminal']))
|
||||||
|
{
|
||||||
|
$result[] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
// app
|
||||||
|
case 'app' :
|
||||||
|
if(in_array('app', $v['apply_terminal']))
|
||||||
|
{
|
||||||
|
$result[] = $v;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取地区节点数据
|
* 获取地区节点数据
|
||||||
* @author Devil
|
* @author Devil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue