You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.8 KiB

<?php
namespace app\mall\controller\api;
use app\mall\model\MallConfig;
use app\mall\model\MallRefundCause;
class Config extends Base
{
/**
* 获取商城轮播图
* @date 2022-10-27
*/
public function getCarousel()
{
$config_logic = new \app\mall\logic\Config();
// 获取商城轮播图
$result = $config_logic -> getCarousel();
return json($result);
}
/**
* 获取商城广告图
* @date 2022-10-27
*/
public function getAdvertise()
{
$config_logic = new \app\mall\logic\Config();
// 获取商城广告图
$result = $config_logic -> getAdvertise();
return json($result);
}
/**
* 获取商城客服手机号
* @date 2021-03-01
*/
public function getLinkTel()
{
$config_model = new MallConfig();
//获取商城客服手机号
$link_tel = $config_model->getField('link_tel');
return sendSuccessMessage([
'link_tel' => $link_tel
]);
}
/**
* 获取商城免运费
* @date 2021-03-01
*/
public function getFreeFreight()
{
$config_model = new MallConfig();
//获取商城免运费
$free_freight_limit = $config_model->getField('free_freight_limit');
return sendSuccessMessage([
'free_freight_limit' => $free_freight_limit
]);
}
/**
* 获取退款原因
* @date 2021-06-01
*/
public function getCauseList()
{
$cause_model = new MallRefundCause();
//获取退款原因
$cause_list = $cause_model->getAllData([
['uid','=',UID]
],'id,content','id asc');
return sendSuccessMessage([
'cause_list' => $cause_list
]);
}
}