request->getHostName(); $list = [ [ 'name' => '首页', 'link' => '/pages/home/home', 'open_type' => "switchtab", 'params' => [] ], [ 'name' => '新版本DIY', 'link' => '/diy/diyNew/index', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '平台首页', 'link' => '/pages/union/home/index', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '分类', 'link' => '/pages/cat/cat', 'open_type' => "switchtab", 'params' => [ [ 'key' => "cat_id", 'value' => "", 'desc' => "cat_id请填写在商品分类中相关分类的ID" ] ] ], [ 'name' => '购物车', 'link' => '/pages/shoppingcart/shoppingcart', 'open_type' => "switchtab", 'params' => [] ], [ 'name' => '当面付', 'link' => '/face-pay/face-pay/pay', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '点餐', 'link' => '/alipay-order/orderMeal/orderMeal', 'open_type' => "navigate", 'params' => [ [ 'key' => "food_table_num", 'value' => "", 'desc' => "桌号" ] ] ], [ 'name' => '点餐预约', 'link' => '/alipay-order/appointment/appointment', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '点餐订单列表', 'link' => '/alipay-order/order/list', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '福利中心', 'link' => '/integral/integral/integral', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '我的核销码', 'link' => '/face-pay/face-pay/member', 'open_type' => 'navigate', 'params' => [], ], [ 'name' => '会员中心', 'link' => '/user/member/member_center', 'open_type' => "navigate", 'params' => [] ], [ 'name' => '用户中心', 'link' => '/pages/my/my', 'id' => 375, 'open_type' => "switchtab", 'params' => [] ], [ 'name' => '商品列表', 'link' => '/other/list/list', 'open_type' => "navigate", 'params' => [ [ 'key' => "cat_id", 'value' => "", 'desc' => "cat_id请填写在商品分类中相关分类的ID" ] ] ], [ 'name' => "专题", 'link' => "/other/special/special", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "充值", 'link' => "/user/balance/recharge", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "领券中心", 'link' => "/other/coupon_center/coupon_center", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "分销中心", 'link' => "/user/share/index", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "搜索", 'link' => "/pages/search/search", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "附近门店", 'link' => "/pages/shop-nearby/shop-nearby", 'open_type' => "navigate", 'params' => [] ], [ 'name' => '一键拨号', 'link' => 'tel', 'open_type' => 'tel', 'params' => [ [ 'key' => "tel", 'value' => "", 'desc' => "请填写联系电话" ] ], ], [ 'name' => '小程序', 'link' => 'wxapp', 'open_type' => 'wxapp', 'params' => [ [ 'key' => "appid", 'value' => "", 'desc' => "请填写小程序appid" ], [ 'key' => "path", 'value' => "", 'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”" ], ], ], [ 'name' => '客服', 'link' => 'contact', 'open_type' => 'contact', 'params' => [] ], [ 'name' => "溯源专区", 'link' => "/source/index/index", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "我的溯源", 'link' => "/source/mySource/mySource", 'open_type' => "navigate", 'params' => [] ], // [ // 'name' => '外链', // 'link' => 'web', // 'open_type' => 'web', // 'params' => [ // [ // 'key' => "web", // 'value' => "", // 'desc' => "打开的网页链接(注:域名必须已在微信官方小程序平台设置业务域名)" // ] // ], // ], ]; $template = NewDiyTemplate::find()->where([ 'store_id' => get_store_id(), 'is_delete' => 0, 'name' => 'DIY', ])->all(); foreach($template as $item) { $info = Json::decode($item->template); $list[] = [ 'name' => $info['page_name'], 'link' => "/pages/diy/diy?id=".$item->id, 'open_type' => "navigate", 'params' => [] ]; } return $list; } /** * 入住商店铺装修导航链接 * @return array */ public static function mchLink() { $list = [ [ 'name' => "商城首页", 'link' => "/pages/home/home", 'open_type' => "switchtab", 'params' => [] ], [ 'name' => "分类", 'link' => "/pages/cat/cat", 'open_type' => "switchtab", 'params' => [ [ 'key' => "cat_id", 'value' => "", 'desc' => "cat_id请填写在商品分类中相关分类的ID" ] ] ], [ 'name' => "购物车", 'link' => "/pages/shoppingcart/shoppingcart", 'open_type' => "switchtab", 'params' => [] ], [ 'name' => "会员中心", 'link' => "/user/member/member_center", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "用户中心", 'link' => "/pages/my/my", 'open_type' => "switchtab", 'params' => [] ], [ 'name' => "商品列表", 'link' => "/other/list/list", 'open_type' => "navigate", 'params' => [ [ 'key' => "cat_id", 'value' => "", 'desc' => "cat_id请填写在商品分类中相关分类的ID" ] ] ], [ 'name' => "商品详情", 'link' => "/goods/goods/goods", 'open_type' => "navigate", 'params' => [ [ 'key' => "id", 'value' => "", 'desc' => "id请填写在商品列表中相关商品的ID" ] ] ], [ 'name' => "所有订单", 'link' => "/pages/order/order?status=-1", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "待付款订单", 'link' => "/pages/order/order?status=0", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "待发货订单", 'link' => "/pages/order/order?status=1", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "待收货订单", 'link' => "/pages/order/order?status=2", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "已完成订单", 'link' => "/pages/order/order?status=3", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "售后订单", 'link' => "/pages/order/order?status=4", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "我的订单", 'link' => "/pages/order/order", 'open_type' => "navigate", 'params' => [ [ 'key' => "status", 'value' => 0, 'desc' => "status 请填写订单列表状态, 为空则跳转为 待付款", ] ], ], [ 'name' => "店铺商品分类", 'link' => "/mch/shop/shop", 'open_type' => "navigate", 'params' => [ [ 'key' => "cat_id", 'value' => "", 'desc' => "cat_id请填写在店铺商品分类中相关分类的ID" ], [ 'key' => "tab", 'value' => "2", 'desc' => "tab该数据为默认数据,请勿修改" ] ] ], [ 'name' => "店铺首页", 'link' => "/mch/shop/shop?tab=1", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "店铺全部商品", 'link' => "/mch/shop/shop?tab=2", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "店铺新品上架", 'link' => "/mch/shop/shop?tab=3", 'open_type' => "navigate", 'params' => [] ], [ 'name' => "店铺商品分类", 'link' => "/mch/shop-cat/shop-cat", 'open_type' => "navigate", 'params' => [ [ 'key' => "cat_id", 'value' => "", 'desc' => "cat_id请填写在店铺商品分类中相关分类的ID" ] ] ], ]; foreach($list as $k => $v) { if ($v['open_type'] == 'mch' || $v['open_type'] == 'mch_nav') { $list[$k]['params'][] = [ 'key' => "mch_id", 'value' => get_mch_id(), 'desc' => "mch_id为本商户id,请勿修改" ]; } } return $list; } }