切换导航条
此项目
正在载入...
登录
李忠强
/
temporaryfood
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
李忠强
3 years ago
提交
9a0c190793487dd112397d5dc0ad2481423bb058
1 个父辈
0ea83690
更新
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
6 行增加
和
7 行删除
application/api/controller/Buy.php
application/api/controller/Cart.php
application/api/controller/Order.php
application/api/controller/Buy.php
查看文件 @
9a0c190
...
...
@@ -63,7 +63,7 @@ class Buy extends Api
*/
public
function
priceCalculation
()
{
$json
=
$this
->
request
->
p
ost
(
'data_json'
);
$json
=
$this
->
request
->
p
aram
(
'data_json'
);
if
(
!
$json
)
$this
->
error
(
'data_json参数不能为空'
);
$data
=
json_decode
(
$json
,
true
);
$goodsmodel
=
new
\app\api\model\Goods
();
...
...
application/api/controller/Cart.php
查看文件 @
9a0c190
...
...
@@ -202,8 +202,7 @@ class Cart extends Api
*/
public
function
priceCalculation
()
{
$json
=
$this
->
request
->
param
();
var_dump
(
$json
);
exit
();
$json
=
$this
->
request
->
param
(
'data_json'
);
if
(
!
$json
)
$this
->
error
(
'data_json参数不能为空'
);
// $json = '[{"goods_id":22,"goods_sku_id":106,"number":2},{"goods_id":23,"goods_sku_id":66,"number":2}]';
$data
=
json_decode
(
$json
,
true
);
...
...
application/api/controller/Order.php
查看文件 @
9a0c190
...
...
@@ -175,7 +175,7 @@ class Order extends Api
*/
public
function
orderCalculation
()
{
$json
=
$this
->
request
->
p
ost
(
'data_json'
);
$json
=
$this
->
request
->
p
aram
(
'data_json'
);
if
(
!
$json
)
$this
->
error
(
'data_json参数不能为空'
);
// $json = '[{"goods_id":22,"goods_sku_id":106,"number":2},{"goods_id":23,"goods_sku_id":66,"number":2}]';
$data
=
json_decode
(
$json
,
true
);
...
...
@@ -364,9 +364,9 @@ class Order extends Api
*/
public
function
addOrder
()
{
$json
=
$this
->
request
->
post
(
'data_json'
);
$coupon_id
=
$this
->
request
->
post
(
'coupon_id'
);
$address_id
=
$this
->
request
->
post
(
'address_id'
);
$json
=
$this
->
request
->
param
(
'data_json'
);
$coupon_id
=
$this
->
request
->
param
(
'coupon_id'
);
$address_id
=
$this
->
request
->
param
(
'address_id'
);
if
(
!
$json
)
$this
->
error
(
'data_json参数不能为空'
);
// $json = '[{"goods_id":22,"goods_sku_id":106,"number":2},{"goods_id":23,"goods_sku_id":66,"number":2}]';
$address
=
Db
::
name
(
'user_address'
)
...
...
请
注册
或
登录
后发表评论