Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6d2c62ba
authored
Sep 02, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
兑换配置显示库存
parent
26ca96aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
app/Http/Controllers/Api/ExchangeSettingsApiController.php
app/Http/Services/BaseService.php
public/js/web/exchangeSettingList.js
app/Http/Controllers/Api/ExchangeSettingsApiController.php
View file @
6d2c62ba
...
...
@@ -10,13 +10,16 @@ use App\Http\Controllers\Controller;
class
ExchangeSettingsApiController
extends
Controller
{
protected
$service
;
public
function
__construct
(
ExchangeSettingService
$service
)
{
public
function
__construct
(
ExchangeSettingService
$service
)
{
$this
->
service
=
$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
);
return
$this
->
apiReturn
(
0
,
'ok'
,
[
...
...
app/Http/Services/BaseService.php
View file @
6d2c62ba
...
...
@@ -15,8 +15,8 @@ class BaseService
public
function
__construct
()
{
$this
->
client
=
new
Client
([
//
'base_uri' => '192.168.10.10:61009',
'base_uri'
=>
'http://ic_server_welfare.test'
,
'base_uri'
=>
'192.168.10.10:61009'
,
//
'base_uri' => 'http://ic_server_welfare.test',
'timeout'
=>
20
,
]);
}
...
...
public/js/web/exchangeSettingList.js
View file @
6d2c62ba
...
...
@@ -34,6 +34,7 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
,
{
field
:
'id'
,
title
:
'序号'
}
,
{
field
:
'name'
,
title
:
'商品名称'
}
,
{
field
:
'type'
,
title
:
'商品类型'
,
templet
:
'#type'
}
,
{
field
:
'stock'
,
title
:
'库存'
}
,
{
field
:
'amount'
,
title
:
'兑换所需金额'
}
,
{
field
:
'status'
,
title
:
'配置状态'
,
templet
:
'#status'
}
,
{
field
:
'update_time'
,
title
:
'配置更新时间'
,
templet
:
'#update_time'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment