feat: 增加小程序导航功能

This commit is contained in:
mkm 2024-09-23 15:14:09 +08:00
parent 0c485b8433
commit a8f1887b45
2 changed files with 21 additions and 1 deletions

View File

@ -49,7 +49,12 @@ class StoreOrderLogic extends BaseLogic
$v['store_id'] = $params['store_id'];
$v['cart_num'] = $v['stock'];
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']);
$res = CartLogic::add($v);

View File

@ -194,4 +194,19 @@ class StoreController extends BaseApiController
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]);
}
}