Commit 6d2c62ba by 杨树贤

兑换配置显示库存

parent 26ca96aa
...@@ -10,13 +10,16 @@ use App\Http\Controllers\Controller; ...@@ -10,13 +10,16 @@ use App\Http\Controllers\Controller;
class ExchangeSettingsApiController extends Controller class ExchangeSettingsApiController extends Controller
{ {
protected $service; protected $service;
public function __construct(ExchangeSettingService $service) {
public function __construct(ExchangeSettingService $service)
{
$this->service = $service; $this->service = $service;
} }
public function exchangeSettingListApi(Request $request, ExchangeSettingService $service) public function exchangeSettingListApi(Request $request, ExchangeSettingService $service)
{ {
$data = $service->getExchangeSettingList('/exchange_settings/list?' . urldecode(http_build_query($request->all()))); $params = urldecode(http_build_query($request->all()));
$data = $service->getExchangeSettingList('/exchange_settings/list?' . $params);
$data = $this->transformer($data); $data = $this->transformer($data);
return $this->apiReturn(0, 'ok', [ return $this->apiReturn(0, 'ok', [
......
...@@ -15,8 +15,8 @@ class BaseService ...@@ -15,8 +15,8 @@ class BaseService
public function __construct() public function __construct()
{ {
$this->client = new Client([ $this->client = new Client([
// 'base_uri' => '192.168.10.10:61009', 'base_uri' => '192.168.10.10:61009',
'base_uri' => 'http://ic_server_welfare.test', // 'base_uri' => 'http://ic_server_welfare.test',
'timeout' => 20, 'timeout' => 20,
]); ]);
} }
......
...@@ -34,6 +34,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () { ...@@ -34,6 +34,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
, {field: 'id', title: '序号'} , {field: 'id', title: '序号'}
, {field: 'name', title: '商品名称'} , {field: 'name', title: '商品名称'}
, {field: 'type', title: '商品类型', templet: '#type'} , {field: 'type', title: '商品类型', templet: '#type'}
, {field: 'stock', title: '库存'}
, {field: 'amount', title: '兑换所需金额'} , {field: 'amount', title: '兑换所需金额'}
, {field: 'status', title: '配置状态', templet: '#status'} , {field: 'status', title: '配置状态', templet: '#status'}
, {field: 'update_time', title: '配置更新时间', templet: '#update_time'} , {field: 'update_time', title: '配置更新时间', templet: '#update_time'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment