33 lines
839 B
PHP
Executable File
33 lines
839 B
PHP
Executable File
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\api\controller\Base;
|
|
use think\facade\Db;
|
|
use \think\Request;
|
|
|
|
class Config extends Base
|
|
{
|
|
/**
|
|
* 配置信息接口
|
|
* 返回盒子类型等配置信息
|
|
*/
|
|
public function index()
|
|
{
|
|
// 查询盒子类型数据
|
|
$goodsTypeList = Db::name('goods_type')
|
|
->field('value, sort_order,is_show, name,pay_wechat,pay_balance,pay_currency,pay_currency2,pay_coupon,is_deduction')
|
|
->order('sort_order')
|
|
->select()
|
|
->toArray();
|
|
$app_setting = getConfig('app_setting');
|
|
// 返回数据
|
|
return $this->renderSuccess('获取成功', [
|
|
'good_type' => $goodsTypeList,
|
|
'app_setting' => $app_setting,
|
|
'version' => '110'
|
|
]);
|
|
}
|
|
|
|
} |