feat: 增加小程序导航功能
This commit is contained in:
parent
0c485b8433
commit
a8f1887b45
@ -49,7 +49,12 @@ class StoreOrderLogic extends BaseLogic
|
|||||||
$v['store_id'] = $params['store_id'];
|
$v['store_id'] = $params['store_id'];
|
||||||
$v['cart_num'] = $v['stock'];
|
$v['cart_num'] = $v['stock'];
|
||||||
if(in_array($params['store_id'],$vendors_store)){
|
if(in_array($params['store_id'],$vendors_store)){
|
||||||
StoreBranchProduct::where('id', $v['id'])->update(['price' => $v['price'], 'vip_price' => $v['price'], 'cost' => $v['price'], 'purchase' => $v['price']]);
|
if(isset($v['purchase']) && $v['purchase'] > 0){
|
||||||
|
$purchase = $v['purchase'];
|
||||||
|
}else{
|
||||||
|
$purchase=$v['price'];
|
||||||
|
}
|
||||||
|
StoreBranchProduct::where('id', $v['id'])->update(['price' => $v['price'], 'vip_price' => $v['price'], 'cost' => $v['price'], 'purchase' => $purchase]);
|
||||||
}
|
}
|
||||||
unset($v['id']);
|
unset($v['id']);
|
||||||
$res = CartLogic::add($v);
|
$res = CartLogic::add($v);
|
||||||
|
@ -194,4 +194,19 @@ class StoreController extends BaseApiController
|
|||||||
return $this->success('ok',['count'=>$count,'create_log'=>$createLog]);
|
return $this->success('ok',['count'=>$count,'create_log'=>$createLog]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序导航
|
||||||
|
*/
|
||||||
|
public function menu_list(){
|
||||||
|
$menu=[
|
||||||
|
['name'=>'每日配送统计'],
|
||||||
|
['name'=>'累计配送统计'],
|
||||||
|
['name'=>'每日销量统计'],
|
||||||
|
['name'=>'累计销量统计'],
|
||||||
|
['name'=>'商品库存'],
|
||||||
|
['name'=>'店铺收支']
|
||||||
|
];
|
||||||
|
return $this->success('ok',['menu'=>$menu]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user