From 93153b6d02fed5f1eef5d84a40148a74a733df82 Mon Sep 17 00:00:00 2001 From: vguanyiwgd Date: Tue, 2 Apr 2024 17:29:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0tb=5Fmeal=5Ftype=E7=9A=84?= =?UTF-8?q?=E5=A4=87=E6=B3=A8notes=EF=BC=8C=E5=86=8D=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I967e6a9bb3d2095ad07d9ff82515929618d98226 --- backstage/application/api/controllers/api/Dishes.php | 5 ++++- m/js/main.js | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backstage/application/api/controllers/api/Dishes.php b/backstage/application/api/controllers/api/Dishes.php index 3204b09..c9cb803 100644 --- a/backstage/application/api/controllers/api/Dishes.php +++ b/backstage/application/api/controllers/api/Dishes.php @@ -1137,10 +1137,13 @@ class Dishes extends REST_Controller $month = date('n', $date); $day = date('j', $date); $date_text = $month . '月' . $day . '日' . '(周' . cnWeek($date) . ')'; + + $dc_type_info = $this->Common_model->get_meal_type_by_id($cd->dc_type); $result[$cd->dining_hall_id]['data'][$cd->dc_date]['date_name'] = $date_text; $result[$cd->dining_hall_id]['data'][$cd->dc_date]['data'][$cd->dc_type]['type'] = $cd->type; $result[$cd->dining_hall_id]['data'][$cd->dc_date]['data'][$cd->dc_type]['date_id'] = $cd->date_id; - $result[$cd->dining_hall_id]['data'][$cd->dc_date]['data'][$cd->dc_type]['meal_name'] = $this->Common_model->get_meal_type_by_id($cd->dc_type)->name; + $result[$cd->dining_hall_id]['data'][$cd->dc_date]['data'][$cd->dc_type]['meal_name'] = $dc_type_info->name; + $result[$cd->dining_hall_id]['data'][$cd->dc_date]['data'][$cd->dc_type]['notes'] = $dc_type_info->notes; $dishes = $this->Dishes_model->get_dishes_by_dishes_id($cd->dish_id); $cd->dish_name = $dishes->dish_name; $result[$cd->dining_hall_id]['data'][$cd->dc_date]['data'][$cd->dc_type]['data'][] = $cd; diff --git a/m/js/main.js b/m/js/main.js index ca50c64..011dd94 100644 --- a/m/js/main.js +++ b/m/js/main.js @@ -8753,6 +8753,13 @@ $(function () { meal.rise_info.rise_tip + '

'; } + if(meal.notes){ + var notes = JSON.parse(meal.notes); + cartHtml += + '
  • 备注:' + + notes.text + + '

  • '; + } cartHtml += ''; }); });