array (size=3) ‘幸运抽奖‘ => array (size=4) ‘开宝箱‘ => string ‘http://baidu.com‘ (length=16) ‘大转盘‘ => string ‘‘ (length=0) ‘砸金蛋‘ => string ‘‘ (length=0) ‘刮刮乐‘ => string ‘‘ (length=0) ‘积分兑换‘ => array (size=4) ‘兑换砖石‘ => string ‘‘ (length=0) ‘兑换体力‘ => string ‘‘ (length=0) ‘兑换金币‘ => string ‘‘ (length=0) ‘兑换VIP卡‘ => string ‘‘ (length=0) ‘个人中心‘ => array (size=5) ‘我的订单‘ => string ‘‘ (length=0) ‘我的积分‘ => string ‘‘ (length=0) ‘积分排名‘ => string ‘‘ (length=0) ‘兑换记录‘ => string ‘‘ (length=0) ‘商城主页‘ => string ‘‘ (length=0) /** * 商城底部菜单 */ public function bottom(){ $map["status"]="1"; $map["praent_id"]="0"; $praent_data=M("wx_shop_menu")->where($map)->select(); $shop_menu_data=array(); foreach ($praent_data as $key => $val){ $shop_menu_data[$val[‘menu_name‘]]=$this->menu_childs($val[‘id‘]); } $this->assign("shop_menu_data",$shop_menu_data); $this->display(); } /** * 获取子类 */ public function menu_childs($praent_id){ $map["praent_id"] = $praent_id; $data = M("wx_shop_menu")->where($map)->select(); $childs_data = array(); foreach ($data as $key => $val){ $childs_data[$val[‘menu_name‘]] = $val[‘url‘]; } return $childs_data; }
时间: 2024-10-12 04:00:01