<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Shop\Core; use Illuminate\Events\Dispatcher; use Illuminate\Support\ServiceProvider; use ModStart\Admin\Config\AdminMenu; use ModStart\Admin\Widget\DashboardItemA; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\TreeUtil; use ModStart\Layout\Row; use Module\Ad\Biz\AdPositionBiz; use Module\Banner\Biz\BannerPositionBiz; use Module\Member\Config\MemberMenu; use Module\Partner\Biz\PartnerPositionBiz; use Module\Shop\Listener\ShopOrderPayListener; use Module\Shop\Provider\OrderExpireScheduleProvider; use Module\Shop\Provider\ShopHomePageProvider; use Module\Vendor\Admin\Widget\AdminWidgetDashboard; use Module\Vendor\Admin\Widget\AdminWidgetLink; use Module\Vendor\Provider\HomePage\HomePageProvider; use Module\Vendor\Provider\Notifier\NotifierBiz; use Module\Vendor\Provider\Schedule\ScheduleProvider; use Module\Voucher\Biz\VoucherBiz; class ModuleServiceProvider extends ServiceProvider { public function boot(Dispatcher $sWXb7) { goto DvCX5; tj8uq: ScheduleProvider::register(OrderExpireScheduleProvider::class); goto Oj1y3; Z9Ak_: AdminWidgetDashboard::registerIcon(function (Row $Kqhka) { $Kqhka->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-details', ModelUtil::count('goods'), '商品数量', modstart_admin_url('goods'))); $Kqhka->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-list', ModelUtil::count('order'), '订单数量', modstart_admin_url('order/list'))); }); goto qq4PL; v4G8E: if (modstart_module_enabled('Banner')) { BannerPositionBiz::registerQuick('shopHome', '商城首页'); } goto vwWo_; qq4PL: NotifierBiz::registerQuick('Shop_NewOrderPayed', '商城-新订单已支付'); goto tj8uq; DvCX5: $sWXb7->subscribe(ShopOrderPayListener::class); goto qUeDE; LalWe: if (modstart_module_enabled('Voucher')) { VoucherBiz::register(ShopVoucherBiz::class); } goto Z9Ak_; Oj1y3: AdminMenu::register(function () { return array(array('title' => '商城系统', 'icon' => 'cart', 'sort' => 150, 'children' => array(array('title' => '商品订单', 'children' => array(array('title' => '全部订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@index'), array('title' => '待付款订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@listWaitPay'), array('title' => '待发货订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@listWaitShipping'), array('title' => '待确认订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@listWaitConfirm'), array('title' => '已完成订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@listCompleted'), array('title' => '已过期订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@listCancelExpired'), array('title' => '已取消订单', 'url' => '\\Module\\Shop\\Admin\\Controller\\OrderController@listCancel'))), array('title' => '商品管理', 'children' => array(array('title' => '商品分类', 'url' => '\\Module\\Shop\\Admin\\Controller\\GoodsCategoryController@index'), array('title' => '商品管理', 'url' => '\\Module\\Shop\\Admin\\Controller\\GoodsController@index'), array('title' => '商城设置', 'url' => '\\Module\\Shop\\Admin\\Controller\\ConfigController@index'))), modstart_module_enabled('Voucher') ? array('title' => '优惠券', 'children' => array(array('title' => '优惠券管理', 'url' => '\\Module\\Shop\\Admin\\Controller\\VoucherController@index'), array('title' => '发放记录', 'url' => '\\Module\\Shop\\Admin\\Controller\\VoucherItemController@index'))) : null))); }); goto bZhQW; bZhQW: MemberMenu::register(function () { return array(array('title' => '商城', 'icon' => 'cart', 'sort' => 150, 'children' => array(array('title' => '我的订单', 'url' => modstart_web_url('shop_order_member'))))); }); goto kUd_D; vwWo_: if (modstart_module_enabled('Partner')) { PartnerPositionBiz::registerQuick('shopHome', '商城首页'); } goto noi0h; kUd_D: AdminWidgetLink::register(function () { $jSsIt = array(); $g8_Ju = TreeUtil::modelToTree('goods_category', array('title' => 'title')); $VM7cz = TreeUtil::treeToListWithIndent($g8_Ju, 'id', 'title'); $jSsIt = array_merge($jSsIt, array_map(function ($lLaeU) { return array('分类:' . $lLaeU['title'], modstart_web_url("goods?categoryId={$lLaeU['id']}")); }, $VM7cz)); return AdminWidgetLink::build('商城', $jSsIt); }); goto u5oZH; noi0h: if (modstart_module_enabled('Ad')) { AdPositionBiz::registerQuick('shopHome', '商城首页'); } goto LalWe; qUeDE: HomePageProvider::register(ShopHomePageProvider::class); goto v4G8E; u5oZH: } public function register() { } }