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.
116 lines
3.5 KiB
116 lines
3.5 KiB
<?php
|
|
|
|
namespace App\Service\v3\Implementations;
|
|
|
|
use App\Service\v3\Interfaces\ShopCartServiceInterface;
|
|
|
|
class ShopCartService implements ShopCartServiceInterface
|
|
{
|
|
public function do()
|
|
{
|
|
$res = [
|
|
[
|
|
'store_nmae' => '五金杂货铺',
|
|
'price' => '100.00',
|
|
'note' => '多放辣椒',
|
|
'store_id' => 66,
|
|
'goods_list' =>
|
|
[
|
|
[
|
|
'id' => 3971,
|
|
'goods_id' => 1301,
|
|
'name' => '半边手撕鸡',
|
|
'num' => 4,
|
|
'price' => '90.00',
|
|
'total' => '360.00'
|
|
]
|
|
]
|
|
],
|
|
[
|
|
'store_nmae' => '回味手撕鸡J009',
|
|
'note' => '手撕鸡加辣',
|
|
'store_price' => '720.00',
|
|
'store_id' => 123,
|
|
'goods_list' =>
|
|
[
|
|
[
|
|
'id' => 3971,
|
|
'goods_id' => 1301,
|
|
'name' => '半边手撕鸡',
|
|
'num' => 4,
|
|
'price' => '90.00',
|
|
'total' => '360.00'
|
|
],
|
|
[
|
|
'id' => 3971,
|
|
'goods_id' => 1301,
|
|
'name' => '半边手撕鸡',
|
|
'num' => 4,
|
|
'price' => '90.00',
|
|
'total' => '360.00'
|
|
]
|
|
]
|
|
],
|
|
];
|
|
return $res;
|
|
}
|
|
|
|
public function check()
|
|
{
|
|
return mt_rand(0,6);
|
|
}
|
|
|
|
public function undo()
|
|
{
|
|
$res = [
|
|
[
|
|
'store_nmae' => '五金杂货铺',
|
|
'price' => '100.00',
|
|
'note' => '多放辣椒',
|
|
'store_id' => 66,
|
|
'goods_list' =>
|
|
[
|
|
[
|
|
'id' => 3971,
|
|
'goods_id' => 1301,
|
|
'name' => '半边手撕鸡',
|
|
'num' => 4,
|
|
'price' => '90.00',
|
|
'total' => '360.00'
|
|
]
|
|
]
|
|
],
|
|
[
|
|
'store_nmae' => '回味手撕鸡J009',
|
|
'note' => '手撕鸡加辣',
|
|
'store_price' => '720.00',
|
|
'store_id' => 123,
|
|
'goods_list' =>
|
|
[
|
|
[
|
|
'id' => 3971,
|
|
'goods_id' => 1301,
|
|
'name' => '半边手撕鸡',
|
|
'num' => 4,
|
|
'price' => '90.00',
|
|
'total' => '360.00'
|
|
],
|
|
[
|
|
'id' => 3971,
|
|
'goods_id' => 1301,
|
|
'name' => '半边手撕鸡',
|
|
'num' => 4,
|
|
'price' => '90.00',
|
|
'total' => '360.00'
|
|
]
|
|
]
|
|
],
|
|
];
|
|
return $res;
|
|
}
|
|
|
|
public function countGoods()
|
|
{
|
|
return mt_rand(1,100);
|
|
}
|
|
}
|