From ee56311842fc6e9918b8c935a5f796e0e1080fa9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 31 Jul 2023 11:09:43 +0800 Subject: [PATCH] 1 --- doc/_common.py | 2 +- webapp/mt/ShopGoods.php | 5 +++++ webapp/services/ShopService.php | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/_common.py b/doc/_common.py index 6e42be03..d040513a 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -405,7 +405,7 @@ class Goods(object): def __init__(self): self.fields = [ ['goods_id', 0, '商品唯一id'], - ['!goods_meta', GoodsInfo(), '商品元信息(配置表数据)'], + ['goods_meta', GoodsInfo(), '商品元信息(配置表数据)'], ['bought_times', 0, '已购买次数'], ['free_num', 0, '免费次数'], ] diff --git a/webapp/mt/ShopGoods.php b/webapp/mt/ShopGoods.php index 010dca95..789656c9 100644 --- a/webapp/mt/ShopGoods.php +++ b/webapp/mt/ShopGoods.php @@ -69,6 +69,11 @@ class ShopGoods { if (!self::$metaList) { self::$metaList = getMetaTable('shopGoods@shopGoods.php'); + foreach (self::$metaList as &$meta) { + $meta['item_id'] = $meta['goods_id']; + $meta['item_num'] = $meta['goods_num']; + $meta['goods_id'] = $meta['id']; + } } return self::$metaList; } diff --git a/webapp/services/ShopService.php b/webapp/services/ShopService.php index 4655667f..0ea34c6b 100644 --- a/webapp/services/ShopService.php +++ b/webapp/services/ShopService.php @@ -10,6 +10,7 @@ require_once('models/Hero.php'); require_once('models/HeroSkin.php'); require_once('models/GunSkin.php'); +use mt; use phpcommon; use models\ShopBuyRecord; use models\Hero;