| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\client\controllers\v1;
- use app\models\Banner;
- use app\models\Cart;
- use app\models\District;
- use app\models\FoodCart;
- use app\models\FoodFlag;
- use app\models\FoodTableNumber;
- use app\models\Goods;
- use app\models\GoodsPic;
- use app\models\Md;
- use app\models\MdFoodsQrcode;
- use app\models\Option;
- use app\models\Store;
- use app\models\FoodExtGoods;
- use app\models\User;
- use app\modules\client\controllers\BaseController;
- use app\modules\client\models\v1\FoodAddCartForm;
- use app\modules\client\models\v1\FoodCartListForm;
- use app\plugins\food\models\client\IndexForm;
- use app\plugins\food\models\FoodCat;
- use app\plugins\food\models\FoodGoods;
- use app\utils\Tools;
- use yii\base\BaseObject;
- use yii\helpers\Json;
- use app\modules\admin\models\MchForm;
- class MdFoodController extends BaseController
- {
- /**
- * 商品列表
- */
- public function actionGoodsList() {
- $store_id = get_store_id();
- $md_id = get_params('md_id');
- $lat = get_params('lat', 0);
- $lng = get_params('lng', 0);
- $type = get_params('type', null);
- $mch_id = intval(get_mch_id());
- if ($md_id > 0) {
- $md = Md::findOne($md_id);
- $name = $md->name;
- $distance = Tools::getDistance($lat, $lng, $md->latitude, $md->longitude);
- $food_page_title = Option::get('food_page_title', $md_id, 'md', '')['value'] ?: '手机点餐';
- } else {
- $store = Store::findOne(get_store_id());
- $name = $store->name;
- $store_lat = '';
- $store_long = '';
- $coordinate = explode(',', $store->coordinate);
- if ($coordinate) {
- $store_lat = $coordinate[0];
- $store_long = $coordinate[1];
- }
- $distance = Tools::getDistance($lat, $lng, $store_lat, $store_long);
- $food_page_title = Option::get('food_page_title', $store->id, 'store', '')['value'] ?: '手机点餐';
- }
- if($mch_id){
- $mchInfo = (new MchForm(['store_id' => get_store_id(), 'mch_id' => $mch_id, 'lat' => $lat, 'lng' => $lng]))->mchInfo();
- $name = $mchInfo['data']->name;
- $distance = $mchInfo['dis'];
- $food_page_title = Option::get('food_page_title', $mch_id, 'mch', '')['value'] ?: '手机点餐';
- }
- if (isset($md)) {
- $md_id_ = $md_id;
- // if (!$md->is_single) {
- // $md_id_ = [0, -1, $md_id];
- // }
- } else {
- $md_id_ = [0, -1];
- }
- // 分类
- $cats = FoodCat::find()->where([
- 'store_id' => $store_id, 'is_delete' => 0, 'is_show' => 1, 'mch_id' => intval($mch_id), 'md_id' => $md_id_
- ])->orderBy('sort desc')
- ->select('id, name as title, desc as subtitle, pic_url as icon')
- ->asArray()->all();
- // if (empty($cats)) {
- // return $this->asJson([
- // 'code' => 1,
- // 'msg' => '分类未找到'
- // ]);
- // }
- foreach ($cats as $key => &$cat) {
- $where = [
- 'store_id' => $store_id,
- 'cat_id' => $cat['id'],
- 'is_delete' => 0,
- 'status' => 1
- ];
- $where['mch_id'] = $mch_id;
- $where['md_food_id'] = $md_id_;
- $query = Goods::find()->where($where);
- if ($type) {
- $query->andWhere(['like', 'delivery_type', $type]);
- }
- $goods_list = $query->select('id, store_id, food_ext_goods_id, mch_id, md_food_id, name, cover_pic as goods_pic, key_word as desc, price, original_price, attr, use_attr, virtual_sales as sales')->orderBy('sort desc')->asArray()->all();
- if (empty($goods_list)) {
- // 如果当前分类下无商品,不作展示
- unset($cats[$key]);
- continue;
- }
- foreach ($goods_list as $k => $goods) {
- $goods_list[$k]['attr'] = Json::decode($goods['attr']);
- $goods_info = Goods::findOne($goods['id']);
- $goods_list[$k]['attr_group_list'] = $goods_info->getAttrGroupList();
- $goods_list[$k]['num'] = $goods_info->getNum();
- $feg = [];
- $goods_list[$k]['food_ext_goods'] = FoodExtGoods::getAttr($goods['food_ext_goods_id'], $goods['store_id'], $goods['md_food_id'], $feg, $mch_id);
- $goods_list[$k]['food_ext_goods_model'] = $feg;
- }
- $cat['list'] = $goods_list;
- }
- sort($cats);
- // 轮播图
- $banner_arr = [];
- $banners = Banner::find()->where([
- 'store_id' => $store_id,
- 'type' => Banner::TYPE_FOOD,
- 'is_delete' => 0,
- 'mch_id' => intval($mch_id),
- 'md_id' => $md_id_
- ])->orderBy('sort desc')
- ->asArray()->all();
- if (!empty($banners)) {
- foreach ($banners as $value) {
- $banner_arr[] = [
- 'image' => $value['pic_url'],
- 'link' => $value['page_url'],
- 'title' => $value['title']
- ];
- }
- }
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => [
- 'goods_list' => $cats,
- 'md_name' => $name,
- '$mchInfo' => $mchInfo,
- 'md' => $md,
- 'distance' => $distance,
- 'banner' => $banner_arr,
- 'food_page_title' => $food_page_title
- ]
- ]);
- }
- /**
- * 店铺信息
- */
- public function actionMdInfo() {
- $md_id = get_params('md_id');
- $mch_id = intval(get_mch_id());
- if ($md_id > 0) {
- $md = Md::findOne($md_id);
- $md_info['name'] = $md->name;
- $md_info['mobile'] = $md->mobile;
- $md_info['address'] = $md->address;
- $md_info['province_name'] = District::findOne($md->province)->name;
- $md_info['city_name'] = District::findOne($md->city)->name;
- $md_info['district_name'] = District::findOne($md->district)->name;
- $md_info['cover_url'] = $md->cover_url;
- $md_info['open_status'] = $md->open_status;
- $md_info['shop_time_type'] = $md->shop_time_type;
- $md_info['latitude'] = $md->latitude;
- $md_info['longitude'] = $md->longitude;
- $md_info['start_time'] = $md->start_time;
- $md_info['end_time'] = $md->end_time;
- $md_info['food_page_title'] = Option::get('food_page_title', $md_id, 'md', '')['value'];
- } else if($mch_id){
- $mchInfo = (new MchForm(['store_id' => get_store_id(), 'mch_id' => $mch_id]))->mchInfo()['data'];
- $md_info['name'] = $mchInfo->name;
- $md_info['mobile'] = $mchInfo->tel;
- $md_info['address'] = $mchInfo->address;
- $md_info['province_name'] = District::findOne($mchInfo->province_id)->name;
- $md_info['city_name'] = District::findOne($mchInfo->city_id)->name;
- $md_info['district_name'] = District::findOne($mchInfo->district_id)->name;
- $md_info['cover_url'] = $mchInfo->logo;
- $md_info['open_status'] = $mchInfo->is_open;
- $md_info['shop_time_type'] = 0;
- $md_info['latitude'] = $mchInfo->latitude;
- $md_info['longitude'] = $mchInfo->longitude;
- $md_info['start_time'] = '';
- $md_info['end_time'] = '';
- $md_info['food_open_time'] = Option::get('food_open_time', $mch_id, 'mch', '')['value'];
- $md_info['food_page_title'] = Option::get('food_page_title', $mch_id, 'mch', '')['value'];
- } else {
- $store = Store::findOne(get_store_id());
- $md_info['name'] = $store->name;
- $md_info['mobile'] = $store->contact_tel;
- $md_info['address'] = $store->address;
- $md_info['province_name'] = District::findOne($store->province_id)->name;
- $md_info['city_name'] = District::findOne($store->city_id)->name;
- $md_info['district_name'] = District::findOne($store->district_id)->name;
- $md_info['cover_url'] = $store->logo;
- $md_info['open_status'] = $store->open_status;
- $md_info['shop_time_type'] = $store->shop_time_type;
- $md_info['latitude'] = '';
- $md_info['longitude'] = '';
- $coordinate = explode(',', $store->coordinate);
- if ($coordinate) {
- $md_info['latitude'] = $coordinate[0];
- $md_info['longitude'] = $coordinate[1];
- }
- $md_info['start_time'] = $store->s_time;
- $md_info['end_time'] = $store->e_time;
- $md_info['food_page_title'] = Option::get('food_page_title', $store->id, 'store', '')['value'];
- }
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => $md_info
- ]);
- }
- /**
- * 店铺信息
- */
- public function actionGetMdInfo() {
- $md_id = get_md_id();
- if ($md_id > 0) {
- $md = Md::findOne($md_id);
- $md_info['name'] = $md->name;
- $md_info['mobile'] = $md->mobile;
- $md_info['address'] = $md->address;
- $md_info['province_name'] = District::findOne($md->province)->name;
- $md_info['city_name'] = District::findOne($md->city)->name;
- $md_info['district_name'] = District::findOne($md->district)->name;
- $md_info['cover_url'] = $md->cover_url;
- $md_info['open_status'] = $md->open_status;
- $md_info['shop_time_type'] = $md->shop_time_type;
- $md_info['latitude'] = $md->latitude;
- $md_info['longitude'] = $md->longitude;
- $md_info['start_time'] = $md->start_time;
- $md_info['end_time'] = $md->end_time;
- } else {
- $store = Store::findOne(get_store_id());
- $md_info['name'] = $store->name;
- $md_info['mobile'] = $store->contact_tel;
- $md_info['address'] = $store->address;
- $md_info['province_name'] = District::findOne($store->province_id)->name;
- $md_info['city_name'] = District::findOne($store->city_id)->name;
- $md_info['district_name'] = District::findOne($store->district_id)->name;
- $md_info['cover_url'] = $store->logo;
- $md_info['open_status'] = $store->open_status;
- $md_info['shop_time_type'] = $store->shop_time_type;
- $md_info['latitude'] = '';
- $md_info['longitude'] = '';
- $coordinate = explode(',', $store->coordinate);
- if ($coordinate) {
- $md_info['latitude'] = $coordinate[0];
- $md_info['longitude'] = $coordinate[1];
- }
- $md_info['start_time'] = $store->s_time;
- $md_info['end_time'] = $store->e_time;
- }
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => $md_info
- ]);
- }
- public function actionGoodsDetail() {
- $goods = Goods::findOne(['store_id' => get_store_id(), 'is_delete' => 0, 'status' => 1, 'id' => get_params('id')]);
- if (!$goods) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '商品不存在'
- ]);
- }
- $feg = [];
- $goods_info = [
- 'goods_pic' => array_column(GoodsPic::find()->where(['goods_id' => $goods->id, 'is_delete' => 0])->select('pic_url')->asArray()->all(), 'pic_url'),
- 'detail' => $goods->detail,
- 'name' => $goods->name,
- 'desc' => $goods->key_word,
- 'price' => $goods->price,
- 'original_price' => $goods->original_price,
- 'id' => $goods->id,
- 'sales' => $goods->virtual_sales,
- 'attr_group_list' => $goods->getAttrGroupList(),
- 'attr' => $goods->attr,
- 'food_ext_goods' => FoodExtGoods::getAttr($goods['food_ext_goods_id'], $goods['store_id'], $goods['md_food_id'], $feg),
- 'food_ext_goods_model' => $feg,
- 'use_attr' => $goods->use_attr,
- 'num' => $goods->getNum(),
- ];
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => $goods_info
- ]);
- }
- //初始化商城购物车
- public function actionInitGoodsCart() {
- try {
- $table_num = get_params('table_num');
- $md_id = (int)get_params('md_id');
- $flag_id = 0;
- if ($table_num) {
- $food_flag = FoodFlag::findOne(['store_id' => get_store_id(), 'mch_id' => intval(get_mch_id()), 'md_id' => $md_id, 'table_num' => $table_num, 'status' => 0, 'type' => 1]);
- if (!$food_flag) {
- $food_flag = new FoodFlag();
- $food_flag->md_id = $md_id;
- $food_flag->store_id = get_store_id();
- get_mch_id() && $food_flag->mch_id = intval(get_mch_id());
- $food_flag->table_num = $table_num;
- $food_flag->type = 1;
- $food_flag->user_id = get_user_id();
- $food_flag->is_parent = 1;
- $food_flag->save();
- } else {
- if ($food_flag->created_at < (time() - 60 * 60 * 2)) {
- FoodFlag::updateAll(['status' => 1], [
- 'store_id' => get_store_id(),
- 'mch_id' => intval(get_mch_id()),
- 'md_id' => $md_id > 0 ? $md_id : [0, -1],
- 'table_num' => $table_num,
- 'status' => 0,
- 'type' => 1
- ]);
- $food_flag = new FoodFlag();
- $food_flag->md_id = $md_id;
- $food_flag->store_id = get_store_id();
- get_mch_id() && $food_flag->mch_id = intval(get_mch_id());
- $food_flag->table_num = $table_num;
- $food_flag->type = 1;
- $food_flag->user_id = get_user_id();
- $food_flag->is_parent = 1;
- $food_flag->save();
- }
- }
- $flag_id = $food_flag->id;
- }
- $userInfo = User::findOne(['id' => $food_flag->user_id]);
- return $this->asJson([
- 'code' => 0,
- 'msg' => '获取成功',
- 'data' => [
- 'flag_id' => $flag_id,
- 'avatar_url' => $userInfo->avatar_url,
- 'nickname' => $userInfo->nickname,
- 'is_parent' => $food_flag->user_id == get_user_id() ? 1 : 0,
- ]
- ]);
- } catch (\Exception $e) {
- return $this->asJson([
- 'code' => 0,
- 'msg' => $e->getMessage(),
- 'data' => [
- 'flag_id' => 0
- ]
- ]);
- }
- }
- /**
- * 添加购物车
- */
- public function actionAddCart() {
- $mch_id = intval(get_mch_id());
- $post = post_params();
- $md_id = get_md_id() ?: -1;
- $form = new FoodAddCartForm();
- $form->store_id = get_store_id();
- $form->user_id = get_user_id();
- $form->md_id = $md_id;
- if (isset($post['flag_id']) && !empty($post['flag_id'])) {
- $form->flag_id = $post['flag_id'];
- } else if (isset($post['table_num']) && !empty($post['table_num'])) {
- $food_flag = FoodFlag::findOne(['store_id' => get_store_id(), 'mch_id' => intval($mch_id), 'md_id' => $md_id, 'table_num' => $post['table_num'], 'status' => 0, 'type' => 1]);
- if ($food_flag) {
- $form->flag_id = $food_flag->id;
- } else {
- $food_flag = new FoodFlag();
- $food_flag->md_id = $md_id;
- $food_flag->store_id = get_store_id();
- $food_flag->table_num = $post['table_num'];
- $food_flag->type = 1;
- $food_flag->user_id = get_user_id();
- $food_flag->is_parent = 1;
- $food_flag->save();
- $form->flag_id = $food_flag->id;
- }
- } else {
- $food_flag = new FoodFlag();
- $food_flag->md_id = $md_id;
- $food_flag->store_id = get_store_id();
- $food_flag->table_num = 0;
- $food_flag->type = 0;
- $food_flag->user_id = get_user_id();
- $food_flag->is_parent = 1;
- $food_flag->save();
- $form->flag_id = $food_flag->id;
- }
- if (isset($post['attr_list']) && !empty($post['attr_list'])) {
- $attr_list = Json::decode($post['attr_list']);
- $form->goods_id = $post['goods_id'];
- $error = 0;
- foreach ($attr_list as $value){
- $form->attr = Json::encode($value['attr_list']);
- $form->num = $value['number'];
- $status = $form->save();
- if($status['code'] != 0){
- $error++;
- }
- }
- if ($error > 0) {
- return $this->asJson([
- 'code' => 0,
- 'data' => [
- 'flag_id' => $form->flag_id
- ],
- 'msg' => '添加成功,' . $error . "个失败",
- ]);
- } else {
- return $this->asJson([
- 'code' => 0,
- 'data' => [
- 'flag_id' => $form->flag_id
- ],
- 'msg' => '添加成功'
- ]);
- }
- } else {
- $form->attributes = post_params();
- return $this->asJson($form->save());
- }
- }
- public function actionQueryGoods() {$arr = [];
- if(get_mch_id()){
- $arr['mch'] = 1;
- $arr['mch_id'] = intval(get_mch_id());
- }
- $flag_id = get_params('flag_id');
- $form = new FoodCartListForm();
- $form->store_id = get_store_id();
- $form->table_num = get_params('table_num', 0);
- $form->flag_id = $flag_id;
- return $this->asJson($form->search($arr));
- }
- /**
- * 购物车详情
- */
- public function actionUpdateNum()
- {
- $cart = FoodCart::findOne(['id' => post_params('cart_id', 0), 'is_delete' => 0]);
- if (empty($cart)) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '参数错误'
- ]);
- }
- $cart->num = (int)post_params('num');
- if ($cart->save()) {
- if ($cart->num == 0) {
- $cart->is_delete = 1;
- $cart->save();
- }
- return $this->asJson([
- 'code' => 0,
- 'msg' => '保存成功'
- ]);
- } else {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '保存失败'
- ]);
- }
- }
- public function actionClearCart() {
- $flag_id = post_params('flag_id');
- $table_num = get_params('table_num');
- if (empty($flag_id)) {
- $food_flag = FoodFlag::findOne(['store_id' => get_store_id(), 'table_num' => $table_num, 'md_id' => get_md_id(), 'status' => 0]);
- $flag_id = $food_flag->id;
- } else {
- $food_flag = FoodFlag::findOne(['store_id' => get_store_id(), 'id' => $flag_id, 'status' => 0]);
- }
- if (empty($flag_id)) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '参数异常'
- ]);
- }
- if (!$food_flag) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '数据异常'
- ]);
- }
- $user_id = post_params('user_id', 0);
- $params = [
- 'flag_id' => $flag_id,
- 'is_delete' => 0
- ];
- if (!empty($user_id)) {
- $params['user_id'] = $user_id;
- }
- FoodCart::updateAll(['is_delete' => 1], $params);
- return $this->asJson([
- 'code' => 0,
- 'msg' => '清空成功'
- ]);
- }
- public function actionClose() {
- $flag_id = post_params('flag_id');
- $user_id = get_user_id();
- $food_flag = FoodFlag::findOne(['id' => $flag_id, 'status' => 0, 'md_id' => get_md_id(), 'store_id' => get_store_id()]);
- if ($food_flag->user_id != $user_id) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '只有发起人才能清空购物车'
- ]);
- }
- if (empty($flag_id)) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '参数异常'
- ]);
- }
- FoodCart::updateAll(['is_delete' => 1], ['flag_id' => $flag_id]);
- FoodFlag::updateAll(['status' => 1], ['id' => $flag_id]);
- return $this->asJson([
- 'code' => 0,
- 'msg' => '关单成功'
- ]);
- }
- public function actionUserComplete() {
- $flag_id = post_params('flag_id');
- $user_id = get_user_id();
- $food_flag = FoodFlag::findOne(['id' => $flag_id, 'status' => 0, 'md_id' => get_md_id(), 'store_id' => get_store_id()]);
- if (!$food_flag) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '数据异常'
- ]);
- }
- if (empty($flag_id)) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '参数异常'
- ]);
- }
- FoodCart::updateAll(['status' => 1], ['flag_id' => $flag_id, 'user_id' => $user_id, 'is_delete' => 0]);
- return $this->asJson([
- 'code' => 0,
- 'msg' => '成功'
- ]);
- }
- public function actionCompleteStatus() {
- $flag_id = get_params('flag_id');
- $user_id = get_user_id();
- $food_cart = FoodCart::findOne(['flag_id' => $flag_id, 'user_id' => $user_id, 'is_delete' => 0]);
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => [
- 'status' => $food_cart->status
- ]
- ]);
- }
- public function actionFlag() {
- $mch_id = intval(get_mch_id());
- $food_flag = new FoodFlag();
- $food_flag->md_id = get_md_id() ?: -1;
- $mch_id && $food_flag->mch_id = $mch_id;
- $food_flag->store_id = get_store_id();
- $food_flag->table_num = 0;
- $food_flag->type = 0;
- $food_flag->status = 0;
- $food_flag->user_id = get_user_id();
- $food_flag->is_parent = 1;
- $food_flag->save();
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => [
- 'flag_id' => $food_flag->id
- ]
- ]);
- }
- public function actionStatus() {
- $flag_id = get_params('flag_id');
- $store_id = get_store_id();
- $md_id = get_md_id() ?: [0,-1];
- $food_flag = FoodFlag::findOne(['id' => $flag_id, 'store_id' => $store_id, 'md_id' => $md_id]);
- if (!$food_flag) {
- return $this->asJson([
- 'code' => 1,
- 'msg' => '未找到数据'
- ]);
- }
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'success',
- 'data' => [
- 'table_num' => $food_flag->table_num,
- 'type' => $food_flag->type,
- 'order_id' => $food_flag->order_id,
- 'user_id' => $food_flag->user_id,
- 'status' => $food_flag->status
- ]
- ]);
- }
- //通过平台点餐二维码获取门店以及桌号信息
- public function actionGetQrcodeInfo() {
- $qrcode_id = post_params('qrcode_id');
- $qrcode = MdFoodsQrcode::findOne(['id' => $qrcode_id, 'is_delete' => 0, 'store_id' => get_store_id()]);
- $data = [
- 'md_id' => -1,
- 'food_table_num' => null,
- 'status' => 0
- ];
- if ($qrcode) {
- $data['status'] = 1;
- if ($qrcode->table_num || $qrcode->md_id) {
- $data['md_id'] = $qrcode->md_id ?: -1;
- if ($qrcode->table_num) {
- $table_num = FoodTableNumber::find()->where(['id' => $qrcode->table_num])->select('num')->asArray()->one();
- if ($table_num) {
- $data['food_table_num'] = $table_num['num'];
- }
- }
- }
- }
- return $this->asJson([
- 'code' => 0,
- 'msg' => '获取成功',
- 'data' => $data
- ]);
- }
- }
|