| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813 |
- <?php
- /**
- * Created by PhpStorm.
- * User: win 10
- * Date: 2019/7/16
- * Time: 14:41
- */
- namespace app\common\services\member;
- use app\common\facades\Setting;
- use app\common\helpers\Client;
- use app\common\models\MemberShopInfo;
- use app\common\services\popularize\PortType;
- use Yunshop\AggregationCps\models\EquityGoodsSkuModel;
- use Yunshop\AlipayOnekeyLogin\models\MemberAlipay;
- use Yunshop\AlipayOnekeyLogin\services\SynchronousUserInfo;
- use Yunshop\Assemble\Common\Services\EntryService;
- use Yunshop\Channel\model\StockLog;
- use Yunshop\CommissionActivity\common\services\CommonService;
- use Yunshop\Auction\models\AuctioneerModel;
- use Yunshop\CommissionStatistics\common\model\Agents;
- use Yunshop\CouponStore\services\SettingService;
- use Yunshop\Decorate\models\DecorateDefaultTemplateModel;
- use Yunshop\Designer\models\ViewSet;
- use Yunshop\Kingtimes\common\models\Distributor;
- use Yunshop\Kingtimes\common\models\Provider;
- use Yunshop\LawyerPlatform\common\models\LawyerSet;
- use Yunshop\OwnerOrderImport\common\services\OwnerService;
- use Yunshop\PackageDeliver\model\Deliver;
- use Yunshop\TeamDividend\models\TeamDividendAgencyModel;
- class MemberCenterService
- {
- public function getMemberData($memberId)
- {
- $filter = [
- 'conference',
- //'store-cashier',
- 'recharge-code',
- ];
- $diyarr = [
- 'tool' => [
- 'separate', 'elive', 'member_code', 'member_pay_code', 'signIndex', 'converge_pay',
- 'room-aide', 'contractListPlu', 'findpwd', 'instation-message', 'applicationMarket', 'marketSub', 'lower-footprint', 'kefu',
- 'flight-collect', 'yee-pay', 'group-develop-user', 'signContractLock', 'qq-advertise', 'diy-form-prove', 'invoiceCenter',
- 'WorkerWithdraw', 'silver-point-pay','high-light','eplus-pay',
- ],
- 'asset_equity' => ['integral', 'credit', 'asset', 'love', 'coin', 'froze', 'extension', 'dragon_deposit', 'warehouse'],
- 'merchant' => [
- 'supplier', 'kingtimes', 'hotel', 'store-cashier', 'cashier', 'micro', 'delivery_station',
- 'service_station', 'voice-goods', 'staging_buy_car', 'package_deliver', 'appointment',
- 'room-apply', 'subsidiary', 'auction', 'auctionApply', 'promotion-assistant', 'activity-apply', 'supply-demand', 'cloud_warehouse',
- 'skin-check', 'StoreVerification', 'ad-serving', 'shop-assistant', 'supplier-driver-distribution', 'reserve-simple',
- 'public-fund','CouponStoreApply','CouponStoreManage','TikTokOrder','store_applyfor'
- ],
- 'market' => [
- 'ranking', 'article', 'clock_in', 'conference', 'video_demand', 'enter_goods',
- 'universal_card', 'recharge_code', 'my-friend', 'business_card', 'net_car', 'pickUpCardOrderList', 'pickUpCardOrderListOne',
- 'fight_groups', 'material-center', 'help-center', 'sign', 'courier',
- 'declaration', 'distribution-order', 'video-share', 'pending_order',
- 'channel', 'commission-activity', 'elite-award', 'team-sales', 'coupon-qr',
- 'micro-communities', 'bonus-pool', 'advert-market', 'room', 'easy-refuel',
- 'energy_cabin', 'energy_cabin_dealer', 'questionnaire', 'group-code', 'health-assessment', 'group-code',
- 'love-ranking', 'assemble', 'worker_apply', 'exchange', 'agent-enquiry', 'together-purchase', 'TeamDistributions', 'sales-report', 'snatch-regiment',
- 'oil_station', 'school-company', 'store-community', 'journal', 'live_install', 'live_install_worker', 'kart', 'flyers_advertise',
- 'case-library', 'star-spell', 'agent_qa', 'store-card', 'luck-draw', 'aggregation-cps', 'agency', 'upgrade-code', 'customer-development', 'commission-ranking', 'blind-box',
- 'room-code', 'circle', 'new-retail', 'store-business-alliance', 'my-snatch-regiment', 'consumer-reward', 'credit-inventory', 'free-lottery', 'owner-order-import',
- 'zhp-group-lottery', 'full-return', 'new-media-advertising', 'group-work', 'prize_pool', 'present-project', 'qq-advertise', 'order-inventory', 'parking-pay', 'debt-shop', 'member-synchron', 'love-speed-pool-wallet', 'love-speed-pool-center',
- 'ywmFightGroups', 'lawyer_platform', 'team_analysis','agentEarnings','activityRanking', 'love-speed-pool-statistic', 'equity-points','health-check',
- 'crowdfunding', 'share-value','lspWalletSite','staffAudit','stock-service','task-package', 'link-move', 'consignment','support-center'
- ],
- ];
- //默认
- $data = [
- [
- 'name' => 'findpwd',
- 'title' => '忘记密码',
- 'class' => 'icon-fontclass-wangjimima2',
- 'url' => 'findpwd',
- 'image' => 'member_a(124).png',
- 'mini_url' => '/packageE/findpwd/findpwd',
- ],
- ];
- collect(app('plugins')->getPlugins())->filter(function ($item) use ($filter) {
- if (1 == $item->isEnabled()) {
- $info = $item->toArray();
- if (in_array($info['name'], $filter)) {
- return $item;
- }
- }
- })->each(function ($item) use (&$data) {
- $info = $item->toArray();
- $name = $info['name'];
- //todo 门店暂时不传
- if ($info['name'] == "store-cashier") {
- $name = 'store_cashier';
- } elseif ($info['name'] == 'recharge-code') {
- $name = 'recharge_code';
- $class = 'icon-member-recharge1';
- $url = 'rechargeCode';
- $image = 'member_a(3).png';
- $mini_url = '/packageA/member/rechargeCode/rechargeCode';
- } elseif ($info['name'] == 'conference') {
- $name = 'conference';
- $class = 'icon-member-act-signup1';
- $url = 'conferenceList';
- $image = 'member_a(15).png';
- $mini_url = '/packageA/member/conferenceList/conferenceList';
- }
- $data[] = [
- 'name' => $name,
- 'title' => $info['title'],
- 'class' => $class,
- 'url' => $url,
- 'image' => $image,
- 'mini_url' => $mini_url,
- ];
- });
- if (app('plugins')->isEnabled('asset') && ((new \Yunshop\Asset\Common\Services\IncomeDigitizationService)->memberPermission() || $this->isBackendRoute())) {
- $data[] = [
- 'name' => 'asset',
- 'title' => PLUGIN_ASSET_NAME,
- 'class' => 'icon-number_assets',
- 'url' => 'TransHome',
- 'image' => 'member_a(69).png',
- 'mini_url' => '',
- ];
- }
- if (\Setting::getByGroup('coupon')['exchange_center'] == 1) {
- $data[] = [
- 'name' => 'exchange',
- 'title' => '兑换中心',
- 'class' => 'icon-member_changer_centre',
- 'url' => 'CouponExchange',
- 'image' => 'member_a(74).png',
- 'mini_url' => '/packageC/CouponExchange/index',
- ];
- }
- if (app('plugins')->isEnabled('sales-report')) {
- $sales_report_set = array_pluck(Setting::getAllByGroup('sales-report')->toArray(), 'value', 'key');
- if ($sales_report_set['is_open'] == 1 && app('plugins')->isEnabled('team-dividend') && app('plugins')->isEnabled('shareholder-dividend')) {
- $data[] = [
- 'name' => 'sales-report',
- 'title' => $sales_report_set['plugin_name'] ?: "销售报表",
- 'class' => 'icon-fontclass-xiaoshoubaobiao',
- 'url' => 'salesTable',
- 'image' => 'member_a(128).png',
- 'mini_url' => '',
- ];
- }
- }
- if (PortType::popularizeShow(\YunShop::request()->type)) {
- $data[] = [
- 'name' => 'extension',
- 'title' => '推广中心',
- 'class' => 'icon-member-extension1',
- 'url' => 'extension',
- 'image' => 'member_a(38).png',
- 'mini_url' => '/pages/member/extension/extension',
- ];
- }
- if (app('plugins')->isEnabled('business-card')) {
- $is_open = Setting::get('business-card.is_open');
- if ($is_open == 1) {
- $data[] = [
- 'name' => 'business_card',
- 'title' => '名片',
- 'class' => 'icon-member_card1',
- 'url' => 'CardCenter',
- 'image' => 'member_a(58).png',
- 'mini_url' => '/packageB/member/business_card/CardCenter/CardCenter',
- ];
- }
- }
- if (app('plugins')->isEnabled('customer-development')) {
- $is_open = Setting::get('customer-development.is_open');
- if ($is_open == 1) {
- $data[] = [
- 'name' => 'customer-development',
- 'title' => \Yunshop\CustomerDevelopment\Common\services\SetService::getPluginName(),
- 'class' => 'icon-fontclass-tuoke',
- 'url' => 'memberTokerCard',
- 'image' => 'member_a(136).png',
- 'mini_url' => '/packageH/toker/memberTokerCard/memberTokerCard',
- ];
- }
- }
- if (app('plugins')->isEnabled('agent-enquiry')) {
- $is_open = Setting::get('agent-enquiry.is_open');
- if ($is_open == 1) {
- if (app('plugins')->isEnabled('area-dividend')) {
- $data[] = [
- 'name' => 'agent-enquiry',
- 'title' => '区域代理查询',
- 'class' => 'icon-member_area_search',
- 'url' => 'regionalAgent',
- 'image' => 'member_a(121).png',
- 'mini_url' => '',
- ];
- }
- }
- }
- if (app('plugins')->isEnabled('prize-pool')) {
- $prize_set = array_pluck(Setting::getAllByGroup('prize-pool')->toArray(), 'value', 'key');
- if ($prize_set['is_open'] == 1) {
- $data[] = [
- 'name' => 'prize_pool',
- 'title' => '奖金池',
- 'class' => 'icon-member-prizePool',
- 'url' => 'prizePool',
- 'image' => 'member_a(173).png',
- 'mini_url' => '/packageI/prizePool/prizePool',
- ];
- }
- }
- if (app('plugins')->isEnabled('tiktok-cps')&&app('plugins')->isEnabled('yz-supply')) {
- $data[] = [
- 'name' => 'TikTokOrder',
- 'title' => '抖音CPS',
- 'class' => 'icon-member-tiktokcps',
- 'url' => 'TikTokOrder',
- 'image' => 'member_a(203).png',
- 'mini_url' => '/packageF/cps/order/order',
- ];
- }
- if (\YunShop::request()->type != 2 && app('plugins')->isEnabled('channel')) {
- $channelSetting = Setting::get('plugin.channel');
- if ($channelSetting['is_open_channel'] == 1) {
- $pluginName = $channelSetting['plugin_name'] ?: '代理商';
- // 订单未读数量
- $readCount = StockLog::select('id')
- ->where('parent_uid', $memberId)
- ->where('is_read', 1)
- ->count();
- $data[] = [
- 'name' => 'channel',
- 'title' => $pluginName,
- 'class' => 'icon-member_distributors',
- 'url' => 'distributorIndex',
- 'image' => 'member_a(94).png',
- 'mini_url' => '',
- 'total' => $readCount,
- ];
- }
- }
- if (app('plugins')->isEnabled('commission-activity')) {
- $name = \Yunshop\CommissionActivity\common\services\CommonService::getName();
- $data[] = [
- 'name' => 'commission-activity',
- 'title' => $name,
- 'class' => 'icon-member_active',
- 'url' => 'DistributionIndex',
- 'image' => 'member_a(100).png',
- 'mini_url' => '/packageB/member/distribution_queue/DistributionIndex/DistributionIndex',
- ];
- $data[] = [
- 'name' => 'commission-activity',
- 'title' => $name . '查询',
- 'class' => 'icon-member_active_search',
- 'url' => 'DistributionStatistics',
- 'image' => 'member_a(99).png',
- 'mini_url' => '/packageB/member/distribution_queue/DistributionStatistics/DistributionStatistics',
- ];
- }
- if (app('plugins')->isEnabled('team-sales')) {
- $name = \Yunshop\TeamSales\common\services\CommonService::getSet()['name'];
- $data[] = [
- 'name' => 'team-sales',
- 'title' => $name,
- 'class' => 'icon-member_team_salereturn',
- 'url' => 'teamSell',
- 'image' => 'member_a(87).png',
- 'mini_url' => '',
- ];
- }
- if (app('plugins')->isEnabled('declaration')) {
- if (Setting::get('plugin.declaration.switch')) {
- $data[] = [
- 'name' => 'declaration',
- 'title' => DECLARATION_NAME,
- 'class' => 'icon-declaration_system',
- 'url' => 'DeclarationApply',
- 'image' => 'member_a (66).png',
- 'mini_url' => '',
- ];
- }
- }
- //配送站
- if (app('plugins')->isEnabled('delivery-station')) {
- $delivery_station_setting = Setting::get('plugin.delivery_station');
- $delivery_station = \Yunshop\DeliveryStation\models\DeliveryStation::memberId($memberId)->first();
- if (($delivery_station && $delivery_station_setting['is_open']) || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'delivery_station',
- 'title' => '配送站',
- 'class' => 'icon-delivery_order',
- 'url' => 'deliveryStation',
- 'mini_url' => '',
- ];
- }
- }
- //服务站
- if (app('plugins')->isEnabled('service-station')) {
- $service_station = \Yunshop\ServiceStation\models\ServiceStation::isBlack()->memberId($memberId)->first();
- if ($service_station || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'service_station',
- 'title' => '服务站',
- 'class' => 'icon-service_station',
- 'url' => 'serviceStation',
- 'mini_url' => '',
- ];
- }
- }
- if (app('plugins')->isEnabled('material-center')) {
- $data[] = [
- 'name' => 'material-center',
- 'title' => '素材中心',
- 'class' => 'icon-member_material',
- 'url' => 'materialCenter',
- 'image' => 'member_a(65).png',
- 'mini_url' => '/packageA/others/materialCenter/materialCenter',
- ];
- }
- if (app('plugins')->isEnabled('distribution-order')) {
- $disorder_setting = Setting::get('plugins.distribution-order');
- if ($disorder_setting && 1 == $disorder_setting['is_open']) {
- $data[] = [
- 'name' => 'distribution-order',
- 'title' => $disorder_setting['title'] ?: '分销订单统计',
- 'class' => 'icon-order_system',
- 'url' => 'DistributionOrders',
- 'image' => 'member_a(70).png',
- 'mini_url' => '/packageA/member/DistributionOrders/DistributionOrders',
- ];
- }
- }
- if (app('plugins')->isEnabled('credit')) {
- $credit_setting = Setting::get('plugin.credit');
- if ($credit_setting && 1 == $credit_setting['is_credit']) {
- $data[] = [
- 'name' => 'credit',
- 'title' => '信用值',
- 'class' => 'icon-member-credit01',
- 'url' => 'creditInfo',
- 'image' => 'member_a(44).png',
- 'mini_url' => '/packageB/member/creditInfo/creditInfo',
- ];
- }
- }
- if (app('plugins')->isEnabled('ranking')) {
- $ranking_setting = Setting::get('plugin.ranking');
- if ($ranking_setting && 1 == $ranking_setting['is_ranking']) {
- $data[] = [
- 'name' => 'ranking',
- 'title' => '排行榜',
- 'class' => 'icon-member-bank-list1',
- 'url' => 'rankingIndex',
- 'image' => 'member_a(29).png',
- 'mini_url' => '/packageE/Rankings/Rankings',
- ];
- }
- }
- if (app('plugins')->isEnabled('micro')) {
- $micro_set = \Setting::get('plugin.micro');
- if ($micro_set['is_open_miceo'] == 1) {
- $micro_shop = \Yunshop\Micro\common\models\MicroShop::getMicroShopByMemberId($memberId);
- if ($micro_shop || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'micro',
- 'title' => MICRO_PLUGIN_NAME . '中心',
- 'class' => 'icon-member-mendian1',
- 'url' => 'microShop_home',
- 'image' => 'member_a(40).png',
- 'mini_url' => '/packageC/microshop/microShop_home/microShop_home',
- ];
- }else{
- $data[] = [
- 'name' => 'micro',
- 'title' => '我要开店',
- 'class' => 'icon-member-mendian1',
- 'url' => 'microShop_apply',
- 'image' => 'member_a(40).png',
- 'mini_url' => '/packageC/microshop/microShop_apply/microShop_apply',
- ];
- }
- }
- }
- if (app('plugins')->isEnabled('help-center')) {
- $status = \Setting::get('help-center.status') ? true : false;
- if ($status) {
- $data[] = [
- 'name' => 'help-center',
- 'title' => '帮助中心',
- 'class' => 'icon-member-help',
- 'url' => 'helpcenter',
- 'image' => 'member_a(2).png',
- 'mini_url' => '/packageB/member/helpcenter/helpcenter',
- ];
- }
- }
- if (app('plugins')->isEnabled('love')) {
- $data[] = [
- 'name' => 'love',
- 'title' => \Yunshop\Love\Common\Services\SetService::getLoveName() ?: '爱心值',
- 'class' => 'icon-member-exchange1',
- 'url' => 'love_index',
- 'image' => 'member_a(1).png',
- 'mini_url' => '/packageB/member/love/Love_index/Love_index',
- ];
- }
- if (app('plugins')->isEnabled('store-card')) {
- $data[] = [
- 'name' => 'store-card',
- 'title' => '门店消费卡',
- 'class' => 'icon-fontclass-mendianxaiofeika1',
- 'url' => 'storeConsumeIndex',
- 'image' => 'member_a(137).png',
- 'mini_url' => '/packageH/o2o/storeConsumeIncme/storeConsumeIncme',
- ];
- }
- if (app('plugins')->isEnabled('assemble') && request()->input('type') != 2) {
- $data[] = [
- 'name' => 'assemble',
- 'title' => Setting::get('plugin.assemble.assemble_name') ?: '安装服务',
- 'class' => 'icon-member_installserver',
- 'url' => 'userOrderlist',
- 'image' => 'member_a(114).png',
- 'mini_url' => '',
- ];
- //如果会员是安装师傅、或者区域代理显示安装师傅,否则显示安装师傅申请
- if ((new EntryService())->isShow()) {
- $data[] = [
- 'name' => 'worker_apply',
- 'title' => Setting::get('plugin.assemble.assemble_worker_name') ?: '安装师傅',
- 'class' => 'icon-member_installserverapply',
- 'url' => 'workerOrderlist',
- 'image' => 'member_a(113).png',
- 'mini_url' => '',
- ];
- }else{
- $workerName = Setting::get('plugin.assemble.assemble_worker_name');
- $data[] = [
- 'name' => 'worker_apply',
- 'title' => $workerName ? $workerName . '申请' : '安装师傅申请',
- 'class' => 'icon-member_installserverapply',
- 'url' => 'workerApply',
- 'image' => 'member_a(113).png',
- 'mini_url' => '',
- ];
- }
- }
- //寄售商品
- if(\Setting::get('plugin.consignment')['is_open'] && app('plugins')->isEnabled('consignment')){
- $data[] = [
- 'name' => 'consignment',
- 'title' => CONSIGNMENT_PLUGIN_NAME,
- 'class' => 'icon-member-consignment',
- 'url' => 'member_exchange_bond',
- 'image' => 'member_a(211).png',
- 'mini_url' => '/packageI/exchange_bond/member/member',
- ];
- }
- if (app('plugins')->isEnabled('owner-order-import')) {
- $ownerService = new OwnerService();
- if ($ownerService->isShow()) {
- if ($ownerService->isRegister()) {
- $data[] = [
- 'name' => 'owner-order-import',
- 'title' => '跨境店主',
- 'class' => 'icon-fontclass-kuajing',
- 'url' => 'orderImportIndex',
- 'image' => 'member_a(167).png',
- 'mini_url' => '/packageH/orderImport/orderImportIndex/orderImportIndex',
- ];
- }else{
- $data[] = [
- 'name' => 'owner-order-import',
- 'title' => '跨境店主申请',
- 'class' => 'icon-fontclass-dianzhushenqing',
- 'url' => 'orderImportApply',
- 'image' => 'member_a(166).png',
- 'mini_url' => '/packageH/orderImport/orderImportApply/orderImportApply',
- ];
- }
- }
- }
- if (app('plugins')->isEnabled('love-ranking')) {
- if (app('plugins')->isEnabled('love')) {
- $title = \Yunshop\Love\Common\Services\SetService::getLoveName() ?: '爱心值';
- $data[] = [
- 'name' => 'love-ranking',
- 'title' => $title . '排行榜',
- 'class' => ' icon-member_reward_ranking',
- 'url' => 'loveRanking',
- 'image' => 'member_a(116).png ',
- 'mini_url' => '/packageE/loveRanking/loveRanking',
- ];
- }
- }
- if (app('plugins')->isEnabled('froze')) {
- $data[] = [
- 'name' => 'froze',
- 'title' => \Yunshop\Froze\Common\Services\SetService::getFrozeName() ?: '冻结币',
- 'class' => 'icon-member-frozen1',
- 'url' => 'FrozenCoin',
- 'image' => 'member_a(7).png',
- 'mini_url' => '/packageB/member/FrozenCoin/FrozenCoin',
- ];
- }
- if (app('plugins')->isEnabled('coin')) {
- $data[] = [
- 'name' => 'coin',
- 'title' => \Yunshop\Coin\Common\Services\SetService::getCoinName() ?: '华侨币',
- 'class' => 'icon-member-currency1',
- 'url' => 'overseas_index',
- 'image' => 'member_a(14).png',
- 'mini_url' => '/packageB/member/overseas_index/overseas_index',
- ];
- }
- if (app('plugins')->isEnabled('elive')) {
- $data[] = [
- 'name' => 'elive',
- 'title' => '生活缴费',
- 'class' => 'icon-shenghuojiaofei',
- 'url' => 'lifeService',
- 'image' => 'member_a(49).png',
- 'mini_url' => '',
- ];
- }
- if (app('plugins')->isEnabled('sign')) {
- $data[] = [
- 'name' => 'sign',
- 'title' => trans('Yunshop\Sign::sign.plugin_name') ?: '签到',
- 'class' => 'icon-member-clock1',
- 'url' => 'sign',
- 'image' => 'member_a(30).png',
- 'mini_url' => '/packageA/member/sign/sign',
- ];
- }
- if (app('plugins')->isEnabled('courier')) {
- //快递单
- $status = \Setting::get('courier.courier.radio');
- if ($status) {
- $data[] = [
- 'name' => 'courier',
- 'title' => '快递',
- 'image' => 'member_a(68).png',
- 'mini_url' => '/packageA/member/CourseManage/CourseManage',
- ];
- }
- }
- if (app('plugins')->isEnabled('voice-goods')) {
- $set = \Setting::get('plugin.voice-goods');
- if ($set['is_open_voice'] == 1) {
- $data[] = [
- 'name' => 'voice-goods',
- 'title' => $set['voice_name'],
- 'class' => 'icon-member_voice_center',
- 'url' => 'MyVoices',
- 'image' => 'member_a(75).png',
- 'mini_url' => '/packageC/voice_shop/my_voices/my_voices',
- ];
- }
- }
- if (app('plugins')->isEnabled('my-friend')) {
- $data[] = [
- 'name' => 'my-friend',
- 'title' => MY_FRIEND_NAME,
- 'class' => 'icon-member_my-friend',
- 'url' => 'MyFriendApply',
- 'image' => 'member_a(63).png',
- 'mini_url' => '/packageD/MyFriendApply/myfriends',
- ];
- }
- if (app('plugins')->isEnabled('article')) {
- $article_setting = Setting::get('plugin.article');
- if ($article_setting) {
- $data[] = [
- 'name' => 'article',
- 'title' => $article_setting['center'] ?: '文章中心',
- 'class' => 'icon-member-collect1',
- 'url' => 'notice',
- 'param' => 0,
- 'image' => 'member_a(41).png',
- 'mini_url' => '/packageA/member/notice/notice',
- ];
- }
- }
- if (app('plugins')->isEnabled('clock-in')) {
- $clockInService = new \Yunshop\ClockIn\services\ClockInService();
- $pluginName = $clockInService->get('plugin_name');
- $clock_in_setting = Setting::get('plugin.clock_in');
- if ($clock_in_setting && 1 == $clock_in_setting['is_clock_in']) {
- $data[] = [
- 'name' => 'clock_in',
- 'title' => $pluginName,
- 'class' => 'icon-member-get-up',
- 'url' => 'ClockPunch',
- 'image' => 'member_a(47).png',
- 'mini_url' => '/packageA/member/ClockPunch/ClockPunch',
- ];
- }
- }
- if (app('plugins')->isEnabled('powder-value')) {
- $powderValueSet = \Yunshop\PowderValue\services\BaseSetService::getSet();
- if ($powderValueSet['plugin_enable']) {
- $data[] = [
- 'name' => 'americanFans',
- 'title' => $powderValueSet['diy_name'],
- 'class' => 'icon-americanFans',
- 'url' => 'americanFans',
- 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/extension/extension(117).png',
- 'mini_url' => '/packageI/american_fans/index',
- ];
- }
- }
- if (app('plugins')->isEnabled('video-demand')) {
- $video_demand_setting = Setting::get('plugin.video_demand');
- if ($video_demand_setting && $video_demand_setting['is_video_demand']) {
- $data[] = [
- 'name' => 'video_demand',
- 'title' => '课程中心',
- 'class' => 'icon-member-course3',
- 'url' => 'CourseManage',
- 'image' => 'member_a(22).png',
- 'mini_url' => '/packageA/member/CourseManage/CourseManage',
- ];
- }
- }
- if (app('plugins')->isEnabled('help-center')) {
- $help_center_setting = Setting::get('plugin.help_center');
- if ($help_center_setting && 1 == $help_center_setting['status']) {
- $data[] = [
- 'name' => 'help_center',
- 'title' => '帮助中心',
- 'class' => 'icon-member-help',
- 'url' => 'helpcenter',
- 'mini_url' => '/packageB/member/helpcenter/helpcenter',
- ];
- }
- }
- //商米D2使用的
- $data[] = [
- 'name' => 'member_code',
- 'title' => '会员卡号 ',
- 'class' => 'icon-member_posvip_cardnum',
- 'url' => 'uidCode',
- 'image' => 'member_a(83).png',
- 'mini_url' => '',
- ];
- $data[] = [
- 'name' => 'member_pay_code',
- 'title' => '动态验证码',
- 'class' => 'icon-member_pospay_validation',
- 'url' => 'codePage',
- 'image' => 'member_a(82).png',
- 'mini_url' => '/packageI/dynamic_code/code/code',
- ];
- if (app('plugins')->isEnabled('store-cashier')) {
- $store = \Yunshop\StoreCashier\common\models\Store::getStoreByUid($memberId)->first();
- if ($this->isBackendRoute() || !$store) {
- $data[] = [
- 'name' => 'store-cashier',
- 'title' => '门店申请',
- 'class' => 'icon-member-store-apply1',
- 'url' => 'storeApply',
- 'image' => 'member_a(26).png',
- 'mini_url' => '/packageA/member/storeApply/storeApply',
- ];
- }
- if ($this->isBackendRoute() || ($store && $store->is_black != 1)) {
- $data[] = [
- 'name' => 'store-cashier',
- 'title' => '门店管理',
- 'class' => 'icon-member_store',
- 'url' => 'storeManage',
- 'image' => 'member_a(26).png',
- 'mini_url' => '/packageC/o2o/storeManage/storeManage',
- ];
- if ($this->isBackendRoute() || ($store->hasOneCashier->hasOneCashierGoods->is_open == 1)) {
- $data[] = [
- 'name' => 'cashier',
- 'title' => '收银台',
- 'class' => 'icon-member-cashier',
- 'url' => 'cashier',
- 'api' => 'plugin.store-cashier.frontend.cashier.center.index',
- 'image' => 'member_a(34).png',
- 'mini_url' => '/packageC/cashier/cashier/cashier',
- ];
- }
- }
- }
- if (app('plugins')->isEnabled('supplier')) {
- $supplier_setting = Setting::get('plugin.supplier');
- $supplier = \Yunshop\Supplier\common\models\Supplier::getSupplierByMemberId($memberId, 1);
- if (!$supplier) {
- $data[] = [
- 'name' => 'supplier',
- 'title' => '供应商申请',
- 'class' => 'icon-member-apply1',
- 'url' => 'supplier',
- 'api' => 'plugin.supplier.supplier.controllers.apply.supplier-apply.apply',
- 'image' => 'member_a(53).png',
- 'mini_url' => '/packageA/member/supplier/supplier',
- ];
- }
- if ($supplier_setting && ($supplier_setting['status'] == 1) && $supplier) {
- $data[] = [
- 'name' => 'supplier',
- 'title' => $supplier_setting['name'] ?: '供应商管理',
- 'class' => 'icon-member-supplier',
- 'url' => 'SupplierCenter',
- 'image' => 'member_a(53).png',
- 'mini_url' => '/packageA/member/SupplierCenter/SupplierCenter',
- ];
- }
- }
- if (app('plugins')->isEnabled('kingtimes')) {
- $provider = Provider::select(['id', 'uid', 'status'])->where('uid',
- $memberId)->first();
- $distributor = Distributor::select(['id', 'uid', 'status'])->where('uid',
- $memberId)->first();
- if ($provider && $provider->status == 1) {
- $data[] = [
- 'name' => 'kingtimes',
- 'title' => '补货商中心',
- 'class' => 'icon-member-replenishment',
- 'url' => 'ReplenishmentApply',
- 'image' => 'member_a(67).png',
- 'mini_url' => '',
- ];
- }else{
- $data[] = [
- 'name' => 'kingtimes',
- 'title' => '补货商申请',
- 'class' => 'icon-member-replenishment',
- 'url' => 'ReplenishmentApply',
- 'image' => 'member_a(67).png',
- 'mini_url' => '',
- ];
- }
- if ($distributor && $distributor->status == 1) {
- $data[] = [
- 'name' => 'kingtimes',
- 'title' => '配送站中心',
- 'class' => 'icon-member-express-list',
- 'url' => 'DeliveryTerminalApply',
- 'image' => 'member_a(54).png',
- 'mini_url' => '',
- ];
- }else {
- $data[] = [
- 'name' => 'kingtimes',
- 'title' => '配送站申请',
- 'class' => 'icon-member-express-list',
- 'url' => 'DeliveryTerminalApply',
- 'image' => 'member_a(54).png',
- 'mini_url' => '',
- ];
- }
- // dd($data);
- }
- if (app('plugins')->isEnabled('enter-goods')) {
- $data[] = [
- 'name' => 'enter_goods',
- 'title' => '用户入驻',
- 'class' => 'icon-member_goods',
- 'url' => 'EnterShop',
- 'image' => 'member_a(52).png',
- 'mini_url' => '',
- ];
- }
- if (app('plugins')->isEnabled('integral')) {
- $status = \Yunshop\Integral\Common\Services\SetService::getIntegralSet();
- if ($status['member_show']) {
- $data[] = [
- 'name' => 'integral',
- 'title' => $status['plugin_name'] ?: '消费积分',
- 'class' => 'icon-member_integral',
- 'url' => 'Integral_love',
- 'image' => 'member_a(55).png',
- 'mini_url' => '/packageB/member/Integral_love/Integral_love',
- ];
- }
- }
- //直播
- if (app('plugins')->isEnabled('room')) {
- $set = \Setting::get('plugin.room_set_basic');
- if ($set && $set['is_open_room'] == 1) {
- $data[] = [
- 'name' => 'room',
- 'title' => $set['plugin_name'] ?: '直播',
- 'class' => 'icon-member_live_normal',
- 'url' => 'liveList',
- 'image' => 'member_a(92).png',
- 'mini_url' => '/packageD/directSeeding/liveList/liveList',
- ];
- }
- $anchor = \Yunshop\Room\models\Anchor::getAnchorByMemberId($memberId)->first();
- if (!$anchor || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'room-apply',
- 'title' => '主播申请',
- 'class' => 'icon-member_host_application',
- 'url' => 'anchorApply',
- 'image' => 'member_a(91).png',
- 'mini_url' => '/packageD/directSeeding/anchorApply/anchorApply',
- ];
- }
- if ($anchor || empty($memberId) || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'room-aide',
- 'title' => '主播助手',
- 'class' => 'icon-member_vj_asistant',
- 'url' => 'helperLiveList',
- 'image' => 'member_a(102).png',
- 'mini_url' => '/packageD/directSeeding/helperLiveList/helperLiveList',
- ];
- }
- $code_set = \Setting::get('plugin.room_code_basic');
- if ($code_set['open_code'] && $code_set['front_show']) {
- $data[] = [
- 'name' => 'room-code',
- 'title' => '直播授权码',
- 'class' => 'icon-fontclass-shouquanma-01',
- 'url' => 'liveAuthorization',
- 'image' => 'member_a(148).png',
- 'mini_url' => '/packageH/liveAuthorization/liveAuthorization/liveAuthorization',
- ];
- }
- }
- // 一卡通
- if (app('plugins')->isEnabled('universal-card')) {
- $set = \Yunshop\UniversalCard\services\CommonService::getSet();
- //判断插件开关
- if ($set['switch']) {
- $shopSet = \Setting::get('shop.member');
- //判断商城升级条件是否为指定商品 非购买指定商品升级的不走一卡通插件
- if ($shopSet['level_type'] == 2) {
- $data[] = [
- 'name' => 'universal_card',
- 'title' => $set['name'],
- 'class' => 'icon-card',
- 'url' => 'CardIndex',
- 'image' => 'member_a(57).png',
- 'mini_url' => '/packageB/member/CardIndex/CardIndex',
- ];
- }
- }
- }
- if (app('plugins')->isEnabled('separate')) {
- $setting = \Setting::get('plugin.separate');
- if ($setting && 1 == $setting['separate_status']) {
- $data[] = [
- 'name' => 'separate',
- 'title' => '绑定银行卡',
- 'class' => 'icon-yinhangqia',
- 'url' => 'BankCard',
- 'image' => 'tool_a(10).png',
- 'mini_url' => '',
- ];
- }
- }
- if (app('plugins')->isEnabled('upgrade-code') && app('plugins')->isEnabled('team-dividend')) {
- $code_open = Setting::get('upgrade-code.is_open');
- if ($code_open == 1) {
- $data[] = [
- 'name' => 'upgrade-code',
- 'title' => '升级码',
- 'class' => 'icon-fontclass-shengjima',
- 'url' => 'MemberUpgradeCode',
- 'image' => 'member_a(141).png',
- 'mini_url' => '/packageH/member/upgrade_code/index/index',
- ];
- }
- }
- if (app('plugins')->isEnabled('credit-inventory')) {
- $credit_open = Setting::get('credit-inventory.is_open');
- if ($credit_open == 1) {
- $data[] = [
- 'name' => 'credit-inventory',
- 'title' => '信用值',
- 'class' => 'icon-fontclass-xinyongzhi',
- 'url' => 'creditValeuIndex',
- 'image' => 'member_a(159).png',
- 'mini_url' => '/packageH/credit_value/created_value_index/created_value_index',
- ];
- }
- }
- if (app('plugins')->isEnabled('share-value')) {
- $share_open = array_pluck(\Setting::getAllByGroup('share-value')->toArray(), 'value', 'key');
- if ($share_open['is_open'] == 1) {
- $data[] = [
- 'name' => 'share-value',
- 'title' => SHRAE_VALUE_NAME,
- 'class' => 'icon-member-share-value',
- 'url' => 'shareValue',
- 'image' => 'member_a(199).png',
- 'mini_url' => '/packageI/share_value/index',
- ];
- }
- }
- if (app('plugins')->isEnabled('stock-service')) {
- $stock_open = array_pluck(\Setting::getAllByGroup('stock-service')->toArray(), 'value', 'key');
- if ($stock_open['is_open'] == 1) {
- $data[] = [
- 'name' => 'stock-service',
- 'title' => STOCK_SERVICE_NAME,
- 'class' => 'icon-member-stock-service',
- 'url' => 'stockService',
- 'image' => '',
- 'mini_url' => '/packageF/stockService/index',
- ];
- }
- }
- if (app('plugins')->isEnabled('hotel')) {
- $hotel = \Yunshop\Hotel\common\models\Hotel::getHotelByUid($memberId)->first();
- if ($hotel) {
- $data[] = [
- 'name' => 'hotel',
- 'title' => HOTEL_NAME . '管理',
- 'class' => 'icon-member_hotel',
- 'url' => 'HotelManage',
- 'image' => 'member_a(56).png',
- 'mini_url' => '/packageA/hotel/HotelManage/HotelManage',
- ];
- }else{
- $data[] = [
- 'name' => 'hotel',
- 'title' => HOTEL_NAME . '申请',
- 'class' => 'icon-member-hotel-apply',
- 'url' => 'hotelApply',
- 'image' => 'member_a(56).png',
- 'mini_url' => '/packageA/member/storeApply/storeApply?name=hotelApply',
- ];
- }
- //酒店自定义字段
- $set = \Setting::get('plugin.hotel');
- $arr['hotel'] = [
- 'hotel_home_page' => $set['hotel_home_page'] ?: '酒店主页',
- 'check_the_room' => $set['check_the_room'] ?: '查看房型',
- 'hotel_intro' => $set['hotel_intro'] ?: '酒店简介',
- 'goods_details' => $set['goods_details'] ?: '商品详情',
- 'goods_presentation' => $set['goods_presentation'] ?: '商品介绍',
- 'goods_parameters' => $set['goods_parameters'] ?: '商品参数',
- 'user_evaluation' => $set['user_evaluation'] ?: '用户评价',
- 'hotels' => $set['hotels'] ?: '酒店',
- 'hotel_first_page' => $set['hotel_first_page'] ?: '酒店首页',
- 'hotel_find' => $set['hotel_find'] ?: '查找酒店',
- 'hotel_find_name' => $set['hotel_find_name'] ?: '酒店名',
- ];
- }
- //网约车插件开启关闭
- if (app('plugins')->isEnabled('net-car')) {
- $video_demand_setting = Setting::get('plugin.net_car');
- if ($video_demand_setting && $video_demand_setting['net_car_open']) {
- $data[] = [
- 'name' => 'net_car',
- 'title' => '网约车',
- 'class' => 'icon-member_my-card',
- 'url' => 'online_car',
- 'image' => 'member_a(64).png',
- 'mini_url' => '',
- ];
- }
- }
- //拼团插件开启关闭
- if (app('plugins')->isEnabled('fight-groups')) {
- $data[] = [
- 'name' => 'fight_groups',
- 'title' => '我的拼团',
- 'class' => 'icon-member_mygroup',
- 'url' => 'MyGroups',
- 'image' => 'member_a(72).png',
- 'mini_url' => '/packageB/member/group/MyGroups/MyGroups',
- ];
- }
- //自提点
- if (app('plugins')->isEnabled('package-deliver')) {
- $is_package = \Setting::get('plugin.package_deliver.is_package');
- $community_group = \Setting::get('plugin.package_deliver.community_group');
- if ($is_package) {
- $deliver = Deliver::uniacid()->where('uid', $memberId)->first();
- if (!$deliver) {
- $data[] = [
- 'name' => 'package_deliver',
- 'title' => \Yunshop\PackageDeliver\service\CustomizeNameService::getName() . '申请',
- 'class' => 'icon-member_place_apply',
- 'url' => 'SelfCarryApply',
- 'image' => 'member_a(77).png',
- 'mini_url' => '/packageC/selfCarry/selfCarryApply/selfCarryApply',
- ];
- } // else if ($community_group)
- else {
- $data[] = [
- 'name' => 'package_deliver',
- 'title' => \Yunshop\PackageDeliver\service\CustomizeNameService::getName(),
- 'class' => 'icon-fontclass-zitidian',
- 'url' => 'communityBuyIndex',
- 'image' => 'member_a(130).png',
- 'mini_url' => '/packageE/community_buying/index/index',
- ];
- }
- }
- }
- //发现视频
- if (app('plugins')->isEnabled('video-share')) {
- $set = \Setting::get('plugin.video-share');
- if ($set['is_open']) {
- $data[] = [
- 'name' => 'video-share',
- 'title' => '发现视频',
- 'class' => 'icon-extension_video',
- 'url' => $set['list_style'] == 2 ? 'VideoDetail' : 'VideoList',
- 'image' => 'member_a(73).png',
- 'mini_url' => $set['list_style'] == 2 ? '/packageC/video_goods/VideoDetail/VideoDetail' : '/packageC/video_goods/VideoList/VideoList',
- ];
- }
- }
- //微社区
- if (app('plugins')->isEnabled('micro-communities')) {
- $set = \Setting::get('plugin.micro-communities');
- if ($set && $set['is_open_micro'] == 1) {
- $data[] = [
- 'name' => 'micro-communities',
- 'title' => '微社区',
- 'class' => 'icon-member_community',
- 'url' => 'MicroHome',
- 'image' => 'member_a(174).png',
- 'mini_url' => '/packageC/micro_communities/microIndex/microIndex',
- ];
- }
- }
- //商品挂单
- if (app('plugins')->isEnabled('pending-order')) {
- $set = \Setting::get('plugin.pending_order');
- if ($set['whether_open']) {
- $data[] = [
- 'name' => 'pending_order',
- 'title' => \Yunshop\PendingOrder\services\PendingOrderService::PendingOrderName(),
- 'class' => 'icon-extension_goods_order',
- 'url' => 'EntryVolume',
- 'image' => 'member_a(59).png',
- 'mini_url' => '/packageC/entry_orders/entry_volume/entry_volume',
- ];
- }
- }
- //分期购车
- if (app('plugins')->isEnabled('staging-buy-car')) {
- $set = \Setting::get('plugin.staging_buy_car');
- if ($set['staging_buy_car_open'] != '1') {
- $data[] = ['name' => 'staging_buy_car', 'title' => '分期购车', 'class' => 'icon-member_installment_buycar', 'url' => 'hireCarManage', 'image' => 'member_a(80).png'];
- }
- }
- if (app('plugins')->isEnabled('advert-market')) {
- $data[] = [
- 'name' => 'advert-market',
- 'title' => '广告市场',
- 'class' => 'icon-member_advertise_market',
- 'url' => 'admarketHome',
- 'image' => 'member_a(84).png',
- 'mini_url' => '',
- ];
- }
- //龙存管插件开启
- if (app('plugins')->isEnabled('dragon-deposit')) {
- $data[] = [
- 'name' => 'dragon_deposit',
- 'title' => '龙存管',
- 'class' => 'icon-member_construction_deposit',
- 'url' => 'myWallet',
- 'image' => 'member_a(76).png',
- 'mini_url' => '',
- ];
- }
- if (app('plugins')->isEnabled('bonus-pool')) {
- $pluginName = Setting::get('plugin.bonus_pool')['bonus_pool_name'];
- $data[] = [
- 'name' => 'bonus-pool',
- 'title' => $pluginName ?: '奖金池',
- 'class' => 'icon-member_bonus_pools',
- 'url' => 'Bonus',
- 'image' => 'member_a(81).png',
- 'mini_url' => '',
- ];
- }
- //预约
- if (app('plugins')->isEnabled('appointment')) {
- $data[] = [
- 'name' => 'appointment',
- 'title' => '预约',
- 'class' => 'icon-member_appointment',
- 'url' => 'Appointment',
- 'image' => 'member_a(85).png',
- 'mini_url' => '/packageE/appointment/appointment_index',
- ];
- }
- //门店审核
- if (app('plugins')->isEnabled('store-cashier')) {
- $apply_set = \Setting::get('plugin.store');
- if($apply_set['administrator_review'] == 1){
- $data[] = [
- 'name' => 'store_applyfor',
- 'title' => '门店审核',
- 'class' => 'icon-fontclass-cashier',
- 'url' => 'store_applyfor',
- 'image' => 'member_a(209).png',
- 'mini_url' => '/packageI/store_audit/index/index',
- ];
- }
- }
- //供需发布
- if (app('plugins')->isEnabled('supply-demand')) {
- $pluginName = Setting::get('plugin.supply-demand')['custom_name'];
- $data[] = [
- 'name' => 'supply-demand',
- 'title' => $pluginName ?: '供需信息发布',
- 'class' => 'icon-member_information_release',
- 'url' => 'publish_manage',
- 'image' => 'member_a(90).png',
- 'mini_url' => '',
- ];
- }
- //汇聚支付插件
- if (app('plugins')->isEnabled('converge_pay')) {
- $data[] = [
- 'name' => 'converge_pay',
- 'title' => '汇聚支付',
- 'class' => 'icon-member_quickpay',
- 'url' => 'quickIndex',
- 'image' => 'member_a(95).png',
- 'mini_url' => '/packageD/quickPay/quick_index/quick_index',
- ];
- }
- //电子合同
- if (app('plugins')->isEnabled('yun-sign')) {
- $data[] = [
- 'name' => 'signIndex',
- 'title' => '电子合同',
- 'class' => 'icon-member-cloud-object',
- 'url' => 'signIndex',
- 'image' => 'member_a(93).png',
- 'mini_url' => '/packageH/signPage/signIndex/signIndex',
- ];
- }
- //商城电子合同
- if (app('plugins')->isEnabled('shop-esign')) {
- $data[] = [
- 'name' => 'contractListPlu',
- 'title' => '商城电子合同',
- 'class' => 'icon-member_mycontract',
- 'url' => 'signIndexPlu',
- 'image' => 'member_a(89).png',
- 'mini_url' => '/packageH/signIndexPlu/signIndex/signIndex',
- ];
- }
- //电子签约
- if (app('plugins')->isEnabled('yun-contract-lock')) {
- $data[] = [
- 'name' => 'signContractLock',
- 'title' => '电子签约',
- 'class' => 'icon-member_mycontract',
- 'url' => 'signContractLock',
- 'image' => 'member_a(89).png',
- 'mini_url' => '',
- ];
- }
- //拍卖
- if (app('plugins')->isEnabled('auction')) {
- if (\Setting::get('plugin.auction.is_open_auction') == 1) {
- $auction = AuctioneerModel::where('member_id', $memberId)->first();
- if (!$auction || $auction->type == 0 || $auction->type == 2 || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'auctionApply',
- 'title' => '拍卖官申请',
- 'class' => 'icon-member_auctionofficer_apply',
- 'url' => 'auctionApply',
- 'image' => 'member_a(96).png',
- 'mini_url' => '/packageD/auction/auction-apply/auction-apply/auction-apply',
- ];
- }
- $data[] = [
- 'name' => 'auction',
- 'title' => '拍卖管理',
- 'class' => 'icon-member_auctionofficer_admin',
- 'url' => 'auctioneer',
- 'image' => 'member_a(97).png',
- 'mini_url' => '/packageD/auction/auctioneer-manage/auctioneer/auctioneer',
- ];
- $data[] = [
- 'name' => 'auction',
- 'title' => '拍卖',
- 'class' => 'icon-member_auctionofficer_index',
- 'url' => 'auctionIndex',
- 'image' => 'member_a(98).png',
- 'info' => 'get',
- 'mini_url' => '/packageD/auction/auction/auction_index/auction_index',
- ];
- }
- }
- if (app('plugins')->isEnabled('together-purchase')) {
- $data[] = [
- 'name' => 'together-purchase',
- 'title' => '我的拼购',
- 'class' => 'icon-member_my_buy',
- 'url' => 'myGroupBuy',
- 'image' => 'member_a(119).png',
- 'mini_url' => '/packageB/member/group_buy/my_group_buy/my_group_buy',
- ];
- $data[] = [
- 'name' => 'together-purchase',
- 'title' => '拼购列表',
- 'class' => 'icon-member_buygroup_orderlist',
- 'url' => 'GroupBuyList',
- 'image' => 'member_a(118).png',
- 'mini_url' => '/packageB/member/group_buy/group_buy_list/group_buy_list',
- // 'info' => 'get'
- ];
- }
- if (app('plugins')->isEnabled('snatch-regiment')) {
- $data[] = [
- 'name' => 'my-snatch-regiment',
- 'title' => '我的抢团',
- 'class' => 'icon-member_mygroupbuy',
- 'url' => 'grab_group_my',
- 'image' => 'member_a(122).png',
- 'mini_url' => '/packageE/grab_group/grab_group_my/grab_group_my',
- ];
- $data[] = [
- 'name' => 'snatch-regiment',
- 'title' => '抢团',
- 'class' => 'icon-member_groupbuy',
- 'url' => 'grab_group_home',
- 'image' => 'member_a(123).png',
- 'mini_url' => '/packageE/grab_group/grab_group_home/grab_group_home',
- ];
- }
- if (app('plugins')->isEnabled('star-spell')) {
- $data[] = [
- 'name' => 'star-spell',
- 'title' => '我的星拼乐',
- 'class' => 'icon-fontclass-xingpinle',
- 'url' => 'starMusicIndex',
- 'image' => 'member_a(133).png',
- 'mini_url' => '/packageH/starMusic/starMusicIndex/starMusicIndex',
- ];
- }
- if (app('plugins')->isEnabled('luck-draw')) {
- $set = \Setting::get('plugin.luck-draw');
- if ($set['is_show'] == 1) {
- $data[] = [
- 'name' => 'luck-draw',
- 'title' => '抽奖活动',
- 'class' => 'icon-fontclass-choujianghuodong',
- 'url' => 'luckyDraw',
- 'image' => 'member_a(138).png',
- 'mini_url' => '/packageH/newDraw/luckyDraw/luckyDraw',
- ];
- }
- }
- if (app('plugins')->isEnabled('new-retail')) {
- $set = \Setting::get('plugin.new-retail');
- $retail_name = empty($set['new_name']) ? "新零售" : $set['new_name'];
- if ($set['is_open_retail'] == 1) {
- $data[] = [
- 'name' => 'new-retail',
- 'title' => $retail_name,
- 'class' => 'icon-fontclass-lingshou',
- 'url' => 'newRetailIndex',
- 'image' => 'member_a(152).png',
- 'mini_url' => '/packageH/newRetail/newRetailIndex/newRetailIndex',
- ];
- }
- }
- //分公司
- if (app('plugins')->isEnabled('subsidiary')) {
- $data[] = [
- 'name' => 'subsidiary',
- 'title' => '分公司管理',
- 'class' => 'icon-member_branch',
- 'url' => 'subsidiary',
- 'image' => 'member_a(101).png',
- 'mini_url' => '/packageA/member/myOrder_v2/myOrder_v2?status=0&orderType=subsidiary',
- ];
- }
- //易加油
- if (app('plugins')->isEnabled('easy-refuel')) {
- $data[] = [
- 'name' => 'easy-refuel',
- 'title' => '易加油',
- 'class' => 'icon-member_ejiayou',
- 'url' => 'easyRefuel',
- 'image' => 'member_a(103).png',
- 'mini_url' => '/packageD/easyRefuel/easyRefuel',
- ];
- }
- if (app('plugins')->isEnabled('activity-apply')) {
- $data[] = [
- 'name' => 'activity-apply',
- 'title' => '活动报名',
- 'class' => 'icon-member_meeting_active',
- 'url' => 'activityHome',
- 'image' => 'member_a(88).png',
- 'mini_url' => '/packageC/Myshaky/activityHome/activityHome',
- ];
- }
- //推广小助手
- if (app('plugins')->isEnabled('promotion-assistant')) {
- $set = \Setting::get('promotion-assistant.data');
- if ($set['is_open'] == 1) {
- $title = empty($set['plugin_name']) ? '推广小助手' : $set['plugin_name'];
- $data[] = [
- 'name' => 'promotion-assistant',
- 'title' => $title,
- 'class' => 'icon-member_promoteassitant',
- 'url' => 'extendHelper',
- 'image' => 'member_a(90).png',
- 'mini_url' => '',
- ];
- }
- }
- //问卷功能
- if (app('plugins')->isEnabled('questionnaire')) {
- $type = request()->get('type');
- if (empty($type) || $type == 1 || $type == 5 || $type == 2) {
- $questionnaire = Setting::get('plugin.questionnaire');
- if ($questionnaire['is_open'] == 1) {
- $pluginName = $questionnaire['title'];
- $data[] = [
- 'name' => 'questionnaire',
- 'title' => $pluginName ?: '问卷分析',
- 'class' => 'icon-member_questionsurvey',
- 'url' => 'questionnaireIndex',
- 'image' => 'member_a(111).png',
- 'mini_url' => '/packageE/questionnaire/questionnaireIndex/questionnaireIndex',
- ];
- }
- }
- }
- //优惠券二维码
- if (app('plugins')->isEnabled('coupon-qr')) {
- $data[] = [
- 'name' => 'coupon-qr',
- 'title' => '优惠券二维码',
- 'class' => 'icon-member_coupons_qrcode',
- 'url' => 'coupons_qrcode',
- 'image' => 'member_a(109).png',
- 'mini_url' => '/packageC/couponList/couponList',
- ];
- }
- if (app('plugins')->isEnabled('elite-award')) {
- $is_open = \Setting::get('plugin.elite_award.is_show');
- if ($is_open == 1) {
- $data[] = [
- 'name' => 'elite-award',
- 'title' => '精英奖',
- 'class' => 'icon-member_elitecenter',
- 'url' => 'eliteAwardHome',
- 'image' => 'member_a(105).png',
- 'mini_url' => '',
- ];
- }
- }
- if (app('plugins')->isEnabled('health-assessment')) {
- $type = request()->get("type");
- if (empty($type) || $type == 2) {
- $health_set = \Setting::get('plugin.health-assessment');
- if ($health_set['is_open_health'] == 1) {
- $health_name = empty($health_set['health_name']) ? "健康测评" : $health_set['health_name'];
- $data[] = [
- 'name' => 'health-assessment',
- 'title' => $health_name,
- 'class' => 'icon-member_healthtest',
- 'url' => 'healthyIndex',
- 'image' => 'member_a(112).png',
- 'mini_url' => '/packageE/healthy/healthyIndex/healthyIndex',
- ];
- }
- }
- }
- //能量舱
- if (app('plugins')->isEnabled('energy-cabin')) {
- $is_package = \Setting::get('plugin.energy_cabin.is_open');
- if ($is_package) {
- $data[] = [
- 'name' => 'energy_cabin',
- 'title' => \Yunshop\EnergyCabin\common\EnergyCabinSet::getName(),
- 'class' => 'icon-member_chamber',
- 'url' => 'memberCard',
- 'image' => 'member_a(106).png',
- 'mini_url' => '/packageE/energy/userCard/userCard',
- ];
- }
- }
- //能量舱经销商
- if (app('plugins')->isEnabled('energy-cabin') && app('plugins')->isEnabled('team-dividend')) {
- $energy_cabin_dealer = \Yunshop\TeamDividend\models\TeamDividendAgencyModel::getAgentByUidId($memberId)->first();
- $is_package = \Setting::get('plugin.energy_cabin.is_open');
- if ($is_package && ($energy_cabin_dealer || $this->isBackendRoute())) {
- $data[] = [
- 'name' => 'energy_cabin_dealer',
- 'title' => \Yunshop\EnergyCabin\common\EnergyCabinSet::getName() . '经销商',
- 'class' => 'icon-member_chamber_dealer',
- 'url' => 'powerSell',
- 'image' => 'member_a(107).png',
- 'mini_url' => '/packageE/energy/powerSell/powerSell',
- ];
- }
- }
- //群活码
- if (app('plugins')->isEnabled('group-code')) {
- $is_open = \Setting::get('plugin.group-code.is_open');
- if ($is_open == 1) {
- $data[] = [
- 'name' => 'group-code',
- 'title' => '群活码',
- 'class' => 'icon-member_group_livecode',
- 'url' => 'groupCode',
- 'image' => 'member_a(110).png',
- 'mini_url' => '/packageE/groupCode/groupCode',
- ];
- }
- }
- //站内消息
- if (app('plugins')->isEnabled('instation-message')) {
- $is_open = \Setting::get('plugin.instation-message.is_open');
- if ($is_open == 1) {
- $data[] = [
- 'name' => 'instation-message',
- 'title' => '消息',
- 'class' => 'icon-member_massage_remind',
- 'url' => 'stationNotice',
- 'image' => 'member_a(115).png',
- 'mini_url' => '/packageE/stationNotice/stationNotice',
- ];
- }
- }
- //云仓
- if (app('plugins')->isEnabled('cloud-warehouse')) {
- $is_open = \Setting::get('plugin.cloud_warehouse.is_open');
- if ($is_open) {
- $data[] = [
- 'name' => 'cloud_warehouse',
- 'title' => '云仓',
- 'class' => 'icon-fontclass-yuncang',
- 'url' => 'cloudIndex',
- 'image' => 'member_a(125).png',
- 'mini_url' => '',
- ];
- }
- }
- //圈仓G
- if (app('plugins')->isEnabled('warehouse')) {
- $warehouse_open = \Setting::get('warehouse.is_open');
- if ($warehouse_open == 1) {
- $data[] = [
- 'name' => 'warehouse',
- 'title' => '圈仓',
- 'class' => 'icon-member_warehouse',
- 'url' => 'warehouseFarmInventory',
- 'image' => 'member_a(178).png',
- 'mini_url' => '/packageI/warehouseFarm/warehouseFarmInventory/warehouseFarmInventory',
- ];
- }
- }
- if (app('plugins')->isEnabled('commission-statistics')) {
- $isAgent = Agents::getAgentByUidId($memberId)->first();
- if ($isAgent || \YunShop::isWeb()) {
- $data[] = [
- 'name' => 'TeamDistributions',
- 'title' => '团队分销',
- 'class' => 'icon-fontclass-tuanduifenxiaoshang',
- 'url' => 'TeamDistribution',
- 'image' => 'member_a(126).png',
- 'mini_url' => '/packageE/TeamDistribution/TeamDistribution',
- ];
- }
- }
- //AI智能测肤
- if (app('plugins')->isEnabled('skin-check')) {
- $is_open = \Yunshop\SkinCheck\service\SetService::getPluginStatus();
- if ($is_open) {
- $data[] = [
- 'name' => 'skin-check',
- 'title' => \Yunshop\SkinCheck\service\SetService::getCustomizeName(),
- 'class' => 'icon-fontclass-cefu',
- 'url' => 'skinHome',
- 'mini_url' => '/packageE/others/skin/skin',
- 'image' => 'member_a(129).png',
- ];
- }
- }
- if (app('plugins')->isEnabled('product-market')) {
- $data[] = [
- 'name' => 'applicationMarket',
- 'title' => '应用市场',
- 'class' => 'icon-fontclass-yiingyongguanli',
- 'url' => 'applicationMarket',
- 'mini_url' => '/packageE/others/application_market/application_market',
- 'image' => 'member_a(131).png',
- ];
- }
- if (app('plugins')->isEnabled('market-sub')) {
- $data[] = [
- 'name' => 'marketSub',
- 'title' => '应用市场',
- 'class' => 'icon-fontclass-yiingyongguanli',
- 'url' => 'marketSub',
- 'mini_url' => '/packageE/others/application_market/application_market?marketSub=1',
- 'image' => 'member_a(131).png',
- ];
- }
- //提货卡
- if (app('plugins')->isEnabled('picking-card')) {
- $settings = Setting::get("card_setting");
- if ($settings["switch"] == 1) {
- $data[] = [
- 'name' => 'pickUpCardOrderList',
- 'title' => '旅游卡',
- 'class' => 'icon-fontclass-tihuoka',
- 'url' => 'pickUpCardOrderList',
- 'mini_url' => '/packageA/member/pick_up_card_order/pick_up_card_order',
- 'image' => 'member_a(127).png',
- ];
- }
- }
- //提货卡
- if (app('plugins')->isEnabled('picking-card-one')) {
- $settings = Setting::get("card_one_setting");
- if ($settings["switch"] == 1) {
- $data[] = [
- 'name' => 'pickUpCardOrderListOne',
- 'title' => '提货卡',
- 'class' => 'icon-fontclass-tihuoka',
- 'url' => 'pickUpCardOrderListOne',
- 'mini_url' => '/packageA/member/pick_up_card_order/pick_up_card_order?plugin=one',
- 'image' => 'member_a(127).png',
- ];
- }
- }
- //下级足迹
- if (app('plugins')->isEnabled('lower-footprint')) {
- $is_open = \Yunshop\LowerFootprint\services\SetService::getPluginStatus();
- if ($is_open) {
- $data[] = [
- 'name' => 'lower-footprint',
- 'title' => '下级足迹',
- 'class' => 'icon-fontclass-xiajizuji',
- 'url' => 'footprintMember',
- 'image' => 'member_a(142).png',
- ];
- }
- }
- if (app('plugins')->isEnabled('case-library')) {
- $data[] = [
- 'name' => 'case-library',
- 'title' => \Yunshop\CaseLibrary\service\SetService::getCustomizeName(),
- 'class' => 'icon-fontclass-anliku',
- 'url' => 'caseLibraryHome',
- 'mini_url' => '/packageE/others/case_library/home/caseLibraryHome',
- 'image' => 'member_a(132).png',
- ];
- }
- //推广员视频答题
- if (app('plugins')->isEnabled('agent-qa')) {
- $set = \Setting::get('plugin.agent_qa');
- if ($set['is_open']) {
- $data[] = [
- 'name' => 'agent_qa',
- 'title' => $set['name'] != '' ? $set['name'] : "推广员视频&答题",
- 'class' => 'icon-fontclass-shipindati',
- 'url' => 'videoQuestion',
- 'image' => 'member_a(133).png',
- 'mini_url' => '/packageE/video_question/video_question',
- ];
- }
- }
- //全国油站
- if (app('plugins')->isEnabled('oil-station')) {
- $oil_setting = \Setting::get('plugin.oil_station');
- if ($oil_setting['open_state']) {
- $data[] = [
- 'name' => 'oil_station',
- 'title' => '全国油站',
- 'class' => 'icon-fontclass-quanguojiayou',
- 'url' => 'oilStation',
- 'image' => 'member_a(151).png',
- 'mini_url' => '',
- ];
- }
- }
- //圈子
- if (app('plugins')->isEnabled('circle')) {
- $circle_set = \Setting::get('circle.data');
- $data[] = [
- 'name' => 'circle',
- 'title' => empty($circle_set['plugin_name']) ? '圈子' : $circle_set['plugin_name'],
- 'class' => 'icon-fontclass-quanzi2',
- 'url' => 'circleIndex',
- 'image' => 'extension(81).png',
- 'mini_url' => '/packageH/circleCommunity/circleIndex/circleIndex',
- ];
- }
- //分润系统会员同步
- if (app('plugins')->isEnabled('member-synchron')) {
- $data[] = [
- 'name' => 'member-synchron',
- 'title' => '合伙人分润',
- 'class' => 'icon-member_shareProfit',
- 'url' => 'shareProfit',
- 'image' => 'member_a(188).png',
- 'mini_url' => '/packageH/shareProfit/shareProfit',
- ];
- }
- //上门安装
- if (app('plugins')->isEnabled('live-install')) {
- $another_name = \Yunshop\LiveInstall\services\SettingService::getAnotherName();
- $data[] = [
- 'name' => 'live_install',
- 'title' => $another_name['plugin_name'],
- 'class' => 'icon-fontclass-anzhuangfuwuhy',
- 'url' => 'installationSeverMemberHome',
- 'image' => 'member_a(144).png',
- 'mini_url' => '/packageH/installationSever/installationSeverMemberHome/installationSeverMemberHome',
- ];
- $live_install_worker_data = [
- 'name' => 'live_install_worker',
- 'title' => $another_name['worker_name'] . '申请',
- 'class' => 'icon-fontclass-anzhuangshifu1',
- 'url' => 'installationSeverApply',
- 'image' => 'member_a(145).png',
- 'mini_url' => '/packageH/installationSever/installationSeverApply/installationSeverApply',
- ];
- if (\Yunshop\LiveInstall\services\SettingService::checkIsWorker()) {
- $live_install_worker_data['class'] = 'icon-fontclass-anzhuangshifu1';
- $live_install_worker_data['title'] = $another_name['worker_name'];
- $live_install_worker_data['url'] = 'installationSeverHome';
- $live_install_worker_data['image'] = 'member_a(145).png';
- $live_install_worker_data['mini_url'] = '/packageH/installationSever/installationSeverHome/installationSeverHome';
- }
- $data[] = $live_install_worker_data;
- }
- if (app('plugins')->isEnabled('parking-pay') && \Yunshop\ParkingPay\services\SettingService::getSetting()['open_state']) {
- $data[] = [
- 'name' => 'parking-pay',
- 'title' => '停车缴费',
- 'class' => 'icon-member-parking-pay',
- 'url' => '',
- 'image' => 'member_a(186).png',
- 'mini_url' => '/packageI/parkCouponFree/index/index',
- ];
- }
- if (app('plugins')->isEnabled('debt-shop')) {
- $data[] = [
- 'name' => 'debt-shop',
- 'title' => '置换亿栈',
- 'class' => 'icon-fontclass-debt',
- 'url' => 'debtindex',
- 'image' => 'member_a(189).png',
- 'mini_url' => '/packageF/debt/debtindex/debtindex',
- ];
- }
- if (app('plugins')->isEnabled('worker-withdraw') && \Yunshop\WorkerWithdraw\services\SettingService::usable()) {
- $data[] = [
- 'name' => 'WorkerWithdraw',
- 'title' => '好灵工提现',
- 'class' => 'icon-member_worker_withdraw',
- 'url' => 'WorkerWithdrawType',
- 'image' => 'member_a(193).png',
- 'mini_url' => '/packageI/worker/type/type',
- ];
- }
- if (app('plugins')->isEnabled('coupon-store')
- && \Yunshop\CouponStore\services\SettingService::is_open()
- && SettingService::getSetting()['page_status']['store_apply']
- ) {
- $data[] = [
- 'name' => 'CouponStoreApply',
- 'title' => '商户申请',
- // 'title' => (defined('COUPON_STORE_PLUGIN_NAME') ? COUPON_STORE_PLUGIN_NAME : '消费券联盟').'商户申请',
- 'class' => 'icon-merchants-apply',
- 'url' => 'merchantsIn',
- 'image' => 'member_a(197).png',
- 'mini_url' => '/packageF/consumption/merchantsIn/merchantsIn',
- ];
- }
- if (app('plugins')->isEnabled('eplus-pay')
- && \Yunshop\EplusPay\services\SettingService::usable()
- ) {
- $data[] = [
- 'name' => 'eplus-pay',
- 'title' => '智E+',
- 'class' => 'icon-fontclass_eplus-pay',
- 'url' => 'SilverBankList/wisdom',
- 'image' => 'member_a(202).png',
- 'mini_url' => '/packageF/silverPointPay/SilverBankList/SilverBankList?option=wisdom',
- ];
- }
- if (app('plugins')->isEnabled('coupon-store')
- && \Yunshop\CouponStore\services\SettingService::is_open()
- && (\Yunshop\CouponStore\services\SettingService::isStoreManager(\YunShop::app()->getMemberId()) || !\YunShop::isApi() || (strpos(request()->route, 'plugin.decorate.admin') !== false))
- && SettingService::getSetting()['page_status']['store_manage']
- ) {
- $data[] = [
- 'name' => 'CouponStoreManage',
- 'title' => '商户助手',
- // 'title' => (defined('COUPON_STORE_PLUGIN_NAME') ? COUPON_STORE_PLUGIN_NAME : '消费券联盟').'商户助手',
- 'class' => 'icon-business-assistant',
- 'url' => 'business',
- 'image' => 'member_a(198).png',
- 'mini_url' => '/packageF/consumption/business/business',
- ];
- }
- if (app('plugins')->isEnabled('flyers-advertise')) {
- $setting = \Yunshop\FlyersAdvertise\services\SettingService::getMiniSetting();
- if ($setting['open_state']) {
- $data[] = [
- 'name' => 'flyers_advertise',
- 'title' => '广告任务',
- 'class' => 'icon-flyers-advertise',
- 'url' => '',
- 'image' => 'member_a(182).png',
- 'mini_url' => '/packageI/AdBright/AdBrightIndex/AdBrightIndex',
- ];
- }
- }
- if (app('plugins')->isEnabled('team-analysis') && app('plugins')->isEnabled('team-dividend') && \Yunshop\TeamAnalysis\services\SettingService::getSetting()['open_state']) {
- $team_agent = TeamDividendAgencyModel::uniacid()->where('uid', \YunShop::app()->getMemberId())->first();
- if ($team_agent || !\YunShop::app()->getMemberId() || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'team_analysis',
- 'title' => '好物官市场中心',
- 'class' => 'icon-team-analysis',
- 'url' => '',
- 'image' => 'member_a(196).png',
- 'mini_url' => '/packageF/stats/stats',
- ];
- }
- }
- // 云库存
- if (app('plugins')->isEnabled('agency')) {
- $set = \Setting::get('plugin.agency');
- if ($set['enabled']) {
- $data[] = [
- 'name' => 'agency',
- 'title' => "云库存",
- 'class' => 'icon-fontclass-yunkucun',
- 'url' => 'StockIndex',
- 'image' => 'member_a(140).png',
- 'mini_url' => '/packageH/stock/index/index',
- ];
- }
- }
- //聚合CPS-卡券
- if (app('plugins')->isEnabled('aggregation-cps')) {
- if (!EquityGoodsSkuModel::get()->isEmpty()) {
- $data[] = [
- 'name' => 'aggregation-cps',
- 'title' => '卡券',
- 'class' => 'icon-fontclass-huiyuankaquanrukou',
- 'url' => 'cpsCard',
- 'image' => 'member_a(143).png',
- 'mini_url' => '/packageH/cpsCard/cpsCard',
- ];
- }
- }
- //推客排行榜
- if (app('plugins')->isEnabled('commission-ranking') && \YunShop::request()->type == 2) {
- $data[] = [
- 'name' => 'commission-ranking',
- 'title' => \Setting::get('plugin.commission_ranking.plugin_name') ?: '推客排行榜',
- 'class' => 'icon-fontclass-paihang',
- 'url' => '',
- 'image' => 'member_a(144).png',
- 'mini_url' => '/packageE/ranking_2/index/index',
- ];
- }
- //盲盒
- if (app('plugins')->isEnabled('blind-box')) {
- $is_open = \Yunshop\BlindBox\service\SetService::getPluginStatus();
- if ($is_open) {
- $data[] = [
- 'name' => 'blind-box',
- 'title' => '盲盒',
- 'class' => 'icon-fontclass-manghe',
- 'url' => 'blindBoxIndex',
- 'mini_url' => '/packageH/blindBox/blindBoxIndex/blindBoxIndex',
- 'image' => 'member_a(139).png',
- ];
- }
- }
- //一校一企
- if (app('plugins')->isEnabled('school-company')) {
- $schoolSetting = \Yunshop\SchoolCompany\services\CommonService::getSet();
- if ($schoolSetting['switch']) {
- $data[] = [
- 'name' => 'school-company',
- 'title' => '一校一企',
- 'class' => 'icon-fontclass-yixiaoyiqi',
- 'url' => '',
- 'mini_url' => '/packageH/schoolCompany/schoolCompanyIndex/schoolCompanyIndex',
- 'image' => 'member_a(150).png',
- ];
- }
- }
- //期刊杂志
- if (app('plugins')->isEnabled('journal')) {
- $is_open = \Yunshop\Journal\services\SetConfigService::getSetConfig('is_open');
- if ($is_open) {
- $data[] = [
- 'name' => 'journal',
- 'title' => '期刊杂志',
- 'class' => 'icon-fontclass-waikan',
- 'url' => 'periodicalIndex',
- 'mini_url' => '/packageH/article/periodicalIndex/periodicalIndex',
- 'image' => 'member_a(153).png',
- ];
- }
- }
- //消费奖励
- if (app('plugins')->isEnabled('consumer-reward')) {
- $set = \Setting::get('plugin.consumer_reward');
- if ($set['is_display']) {
- $data[] = [
- 'name' => 'consumer-reward',
- 'title' => $set['name'] ?: '消费奖励',
- 'class' => 'icon-fontclass-xiaofeijiangli',
- 'url' => 'consumerRewardIndex',
- 'mini_url' => '/packageH/consumerReward/consumerRewardIndex/consumerRewardIndex',
- 'image' => 'member_a(153).png',
- ];
- }
- }
- //车场
- if (app('plugins')->isEnabled('kart')) {
- $data[] = [
- 'name' => 'kart',
- 'title' => '车场计时',
- 'class' => 'icon-fontclass-cehchang',
- 'url' => '',
- 'mini_url' => '/packageH/turmaroundTime/turmaroundMy/turmaroundMy',
- 'image' => 'image member_a(157).png',
- ];
- }
- //客服
- if (app('plugins')->isEnabled('yun-chat')) {
- $data[] = [
- 'name' => 'kefu',
- 'title' => '客服',
- 'class' => 'icon-member_kefu',
- 'url' => 'chatList',
- 'mini_url' => '/packageH/chitchat/chatList/chatList',
- 'image' => 'tool_a(11).png',
- ];
- }
- //航班信息收集
- if (app('plugins')->isEnabled('flight-collect')) {
- $flight_switch = \Setting::get('plugin.flight-collect.switch');
- if ($flight_switch) {
- $data[] = [
- 'name' => 'flight-collect',
- 'title' => '航班信息',
- 'class' => 'icon-fontclass-hangbanxinxi',
- 'url' => 'flightInformation',
- 'mini_url' => '/packageH/flightInformation/flightInformation',
- 'image' => 'member_a(156).png',
- ];
- }
- }
- //店商联盟
- if (app('plugins')->isEnabled('store-business-alliance')) {
- $is_open = \Setting::get('plugin.store-business-alliance.is_open');
- if ($is_open) {
- $data[] = [
- 'name' => 'store-business-alliance',
- 'title' => '店商联盟',
- 'class' => 'icon-fontclass-dianshanglianmeng',
- 'url' => 'leagueStoreIndex',
- 'mini_url' => '',
- 'image' => 'member_a(154).png',
- ];
- }
- }
- //群拓客
- if (app('plugins')->isEnabled('group-develop-user')) {
- $data[] = [
- 'name' => 'group-develop-user',
- 'title' => '群拓客',
- 'class' => 'icon-fontclass-quntuoke',
- 'url' => 'gduIndex',
- 'image' => 'member_a(158).png',
- 'mini_url' => '',
- ];
- }
- //珍惠拼
- if (app('plugins')->isEnabled('zhp-group-lottery')) {
- $setting = \Yunshop\ZhpGroupLottery\models\ZhpSettingModel::getAll();
- if ($setting['is_open'] == 1) {
- $data[] = [
- 'name' => 'zhp-group-lottery',
- 'title' => '珍惠拼',
- 'class' => 'icon-fontclass-huizhenpin',
- 'url' => 'zhpGroupList',
- 'image' => 'member_a(160).png',
- 'mini_url' => '/packageB/member/group/GroupList/GroupList?types=zhpGroup',
- ];
- }
- }
- //新媒体
- if (app('plugins')->isEnabled('new-media-advertising')) {
- $is_open = \Setting::get('new_media_advertising.data.is_open');
- if ($is_open) {
- $data[] = [
- 'name' => 'new-media-advertising',
- 'title' => '新媒体',
- 'class' => 'icon-member-newMedia',
- 'url' => 'newMediaGuide',
- 'image' => 'member_a(171).png',
- 'mini_url' => '/packageI/newMedia/newMediaGuide/newMediaGuide',
- ];
- }
- }
- if (app('plugins')->isEnabled('yee-pay')) {
- $is_open = \Yunshop\YeePay\services\SetService::getStatus();
- if ($is_open) {
- $data[] = [
- 'name' => 'yee-pay',
- 'title' => '易宝代付签约',
- 'class' => 'icon-fontclass-yibaodaifu',
- 'url' => 'YeePay',
- 'image' => 'member_a(161).png',
- 'mini_url' => '',
- ];
- }
- }
- //投放广告视频
- if (app('plugins')->isEnabled('ad-serving')) {
- $advertiser = \Yunshop\AdServing\models\AdServingAdvertisersModel::getAdvertisersByMemberId($memberId);
- $is_open = \Yunshop\AdServing\services\SetConfigService::getSetConfig('is_open');
- if ($is_open) {
- if (!$advertiser) {
- $data[] = [
- 'name' => 'ad-serving',
- 'title' => '广告主申请',
- 'class' => 'icon-fontclass-guanggaozhushenqing',
- 'url' => 'advertisingApply',
- 'image' => 'member_a(163).png',
- 'mini_url' => '/packageH/Advertising/advertisingApply/advertisingApply',
- ];
- } else {
- $data[] = [
- 'name' => 'ad-serving',
- 'title' => '广告主',
- 'class' => 'icon-fontclass-guanggaozhu',
- 'url' => 'advertisingAdvertisers',
- 'image' => 'member_a(164).png',
- 'mini_url' => '/packageH/Advertising/advertisingAdvertisers/advertisingAdvertisers',
- ];
- }
- }
- }
- //商品免单
- if (app('plugins')->isEnabled('free-lottery')) {
- $is_open = \Yunshop\FreeLottery\services\FreeLotteryService::config('open');
- if ($is_open) {
- $data[] = [
- 'name' => 'free-lottery',
- 'title' => \Yunshop\FreeLottery\services\FreeLotteryService::name(),
- 'class' => 'icon-fontclass-miandan',
- 'url' => 'FreeRecord',
- 'image' => 'member_a(165).png',
- 'mini_url' => '/packageH/free_of_charge/FreeRecord/FreeRecord',
- ];
- }
- }
- //多门店核销
- if (app('plugins')->isEnabled('store-projects')) {
- $langService = new \Yunshop\StoreProjects\common\services\LangService;
- $data[] = [
- 'name' => 'StoreVerification',
- 'title' => '我的' . $langService->getLangSetting()['project'],
- 'class' => 'icon-fontclass-mendianhexiao',
- 'url' => 'StoreVerification',
- 'image' => 'member_a(162).png',
- 'mini_url' => '/packageH/project_verification/StoreVerification/StoreVerification',
- ];
- }
- //满额赠送
- if (app('plugins')->isEnabled('full-return')) {
- $is_open = \Setting::get('plugin.full-return');
- if ($is_open['is_open_return'] && !empty($is_open['is_show_total'])) {
- $data[] = [
- 'name' => 'full-return',
- 'title' => \Yunshop\FullReturn\admin\SetController::getSet()['full_return_name'] ?: '满额赠送',
- 'class' => 'icon-fontclass-miandan',
- 'url' => 'interestsGive',
- 'image' => 'member_a(170).png',
- 'mini_url' => '/packageH/interests_give/interests_give',
- ];
- }
- }
- //0.1元拼团
- if (app('plugins')->isEnabled('group-work')) {
- $is_open = \Setting::get('plugin.group_work');
- if ($is_open['plugin_switch'] == 1) {
- $data[] = [
- 'name' => 'group-work',
- 'title' => $is_open['plugin_name'] ? $is_open['plugin_name'] : '0.1元拼',
- 'class' => 'icon-member_groupWork',
- 'url' => 'groupWorkMy',
- 'image' => 'member_a(172).png',
- 'mini_url' => '/packageI/groupWork/groupWorkMy/groupWorkMy',
- ];
- }
- }
- //捐赠项目
- if (app('plugins')->isEnabled('present-project')) {
- $is_open = \Setting::get('plugin.present_project');
- if (!isset($is_open['is_open']) || $is_open['is_open']) {
- $data[] = [
- 'name' => 'present-project',
- 'title' => '捐赠项目',
- 'class' => 'icon-member_donationProject',
- 'url' => 'donationProjectIndex',
- 'image' => 'member_a(175).png',
- 'mini_url' => '/packageI/donation_project/donationProjectIndex/donationProjectIndex',
- ];
- }
- }
- //店铺助手
- if (app('plugins')->isEnabled('shop-assistant')) {
- if (\Yunshop\ShopAssistant\services\SetService::pluginIsOpen()) {
- if (\Yunshop\ShopAssistant\services\CommonService::checkoutAuth($memberId) || $memberId === 0 || $this->isBackendRoute()) {
- $data[] = [
- 'name' => 'shop-assistant',
- 'title' => '店铺助手',
- 'class' => 'icon-member-storeManage',
- 'url' => 'storeManagementIndex',
- 'image' => 'member_a(179).png',
- 'mini_url' => '/packageF/storeManagement/storeManagementIndex/storeManagementIndex',
- ];
- }
- }
- }
- //优量汇广告
- if (app('plugins')->isEnabled('qq-advertise')) {
- $is_open = \Setting::get('plugin.qq-advertise');
- if (!isset($is_open['open']) || $is_open['open']) {
- $member_advertise = MemberShopInfo::where('member_id', \Yunshop::app()->getMemberId())->value('access_token_2');
- if (!$member_advertise) {
- $member_advertise = Client::create_token('yz');
- MemberShopInfo::where('member_id', \Yunshop::app()->getMemberId())->update(['access_token_2' => $member_advertise]);
- }
- $data[] = [
- 'name' => 'qq-advertise',
- 'title' => '广告电商',
- 'member_token' => $member_advertise,
- 'class' => 'icon-member_qq-advertise',
- 'url' => 'qq-advertise',
- 'image' => 'member_a(177).png',
- 'mini_url' => '',
- ];
- }
- }
- //平台配送(司机)
- if (app('plugins')->isEnabled('supplier-driver-distribution')) {
- $is_open = \Yunshop\SupplierDriverDistribution\models\ConfigModel::getConfig('is_open');
- $is_driver = \Yunshop\SupplierDriverDistribution\models\DriverModel::uniacid()->selectRaw('1')->where('member_id', \YunShop::app()->getMemberId())->where('status', 1)->first();
- if (($is_driver || $this->isBackendRoute()) && $is_open) {
- $data[] = [
- 'name' => 'supplier-driver-distribution',
- 'title' => '配送入口',
- 'class' => 'icon-fontclass_supplierDist',
- 'url' => 'distributionEntrance',
- 'image' => 'member_a(176).png',
- 'mini_url' => '/packageG/supplierDist/distributionEntrance/distributionEntrance',
- ];
- }
- }
- //存货订单
- if (app('plugins')->isEnabled('order-inventory')) {
- $is_open = \Yunshop\OrderInventory\services\SetService::pluginIsOpen();
- if ($is_open) {
- $data[] = [
- 'name' => 'order-inventory',
- 'title' => '存货订单',
- 'class' => 'icon-fontclassStock',
- 'url' => 'stockorderList/stock',
- 'image' => 'member_a(184).png',
- 'mini_url' => '/packageA/member/myOrder_v2/myOrder_v2?orderType=stock',
- ];
- }
- }
- //自定义表单核销
- if (app('plugins')->isEnabled('diy-form-prove')) {
- $is_open = \Setting::get('plugin.diy_form_prove.is_open');
- if ($is_open) {
- $data[] = [
- 'name' => 'diy-form-prove',
- 'title' => '表单核销',
- 'class' => 'icon-member_diyRormProve',
- 'url' => 'diyRormProveIndex',
- 'image' => 'member_a(180).png',
- 'mini_url' => '/packageI/diyRormProve/diyRormProveIndex/diyRormProveIndex',
- ];
- }
- }
- // 发票
- if (app('plugins')->isEnabled('invoice')) {
- $is_open = \Setting::get('plugin.invoice.is_open');
- if ($is_open) {
- $data[] = [
- 'name' => 'invoiceCenter',
- 'title' => '发票中心',
- 'class' => 'icon-member-invoice',
- 'url' => 'invoiceCenter',
- 'image' => 'member_a(183).png',
- 'mini_url' => '/packageI/invoice/invoiceCenter/invoiceCenter',
- ];
- }
- }
- //分时预约
- if (app('plugins')->isEnabled('reserve-simple')) {
- $data[] = [
- 'name' => 'reserve-simple',
- 'title' => '分时预约',
- 'class' => 'icon-fontclass_timeApp',
- 'url' => 'timeAppointmentMy',
- 'image' => 'member_a(187).png',
- 'mini_url' => '/packageF/timeAppointment/timeAppointmentMy/timeAppointmentMy',
- ];
- }
- //公益基金
- if (app('plugins')->isEnabled('public-fund')) {
- $data[] = [
- 'name' => 'publicWelfare',
- 'title' => '爱心公益',
- 'class' => 'icon-public-fund',
- 'url' => 'publicWelfare',
- 'image' => 'extension(111).png',
- 'mini_url' => '/packageI/public_welfare_fund/publicWelfare/publicWelfare',
- ];
- }
- // 加速池钱包
- if (app('plugins')->isEnabled('love-speed-pool')) {
- $walletSetting = Setting::get('plugin.love_speed_pool_wallet');
- if ($walletSetting['member_entrance'] == 1) {
- $walletDiyName = $walletSetting['member_entrance_name'] ?: "钱包";
- $data[] = [
- 'name' => 'love-speed-pool-wallet',
- 'title' => $walletDiyName,
- 'class' => 'icon-fontclass-Throughpay',
- 'url' => 'Throughpay',
- 'image' => "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(190).png",
- 'mini_url' => '/packageF/Throughpay/Throughpay',
- ];
- }
- $poolSetting = Setting::get('plugin.love_speed_pool');
- $capitalDiyName = $poolSetting['diy_capital_name'] ?: "资金池";
- $data[] = [
- 'name' => 'love-speed-pool-center',
- 'title' => $capitalDiyName,
- 'class' => 'icon-member-capital',
- 'url' => 'price_pool',
- 'image' => "extension(191).png",
- 'mini_url' => '/packageA/member/price_pool/price_pool',
- ];
- // love-speed-pool-statistic
- $data[] = [
- 'name' => 'love-speed-pool-statistic',
- 'title' => '数据统计',
- 'class' => 'icon-member-zzy',
- 'url' => 'dataStatistics',
- 'image' => "extension(191).png",
- 'mini_url' => '/packageF/data_statistics/data_statistics',
- ];
- }
- //新拼团(ywm)
- if (app('plugins')->isEnabled('ywm-fight-groups')) {
- $data[] = [
- 'name' => 'ywmFightGroups',
- 'title' => '超级拼团',
- 'class' => 'icon-ywm-fight-groups',
- 'url' => 'ywmGroupsMyGroups',
- 'image' => 'member_a(192).png',
- 'mini_url' => '/packageB/member/group/ywmGroupsMyGroups/ywmGroupsMyGroups',
- ];
- }
- // 律师平台
- if (app('plugins')->isEnabled('lawyer-platform')) {
- $lawyer_set = LawyerSet::uniacid()->first();
- if (!$lawyer_set || $lawyer_set['status']) {
- $lawyer_diy_name = $lawyer_set['diy_name'] ?: "律师平台";
- $data[] = [
- 'name' => 'lawyer_platform',
- 'title' => $lawyer_diy_name,
- 'class' => 'icon-member_lawyer_platform',
- 'url' => 'lawyerPlatform',
- 'image' => "member_a(194).png",
- 'mini_url' => '/packageI/lawyerPlatform/lawyerPlatform_index/index',
- ];
- }
- }
- //代理商收益管理
- if (app('plugins')->isEnabled('agent-earnings')) {
- $agent_earnings_config = \Yunshop\AgentEarnings\models\AgentEarningsConfigModel::getConfig('is_open');
- if ($agent_earnings_config) {
- $data[] = [
- 'name' => 'agentEarnings',
- 'title' => '团队销售额',
- 'class' => 'icon-member-agent-earnings',
- 'url' => 'group_sales',
- 'image' => 'member_a(195).png',
- 'mini_url' => '/packageI/group_sales/group_sales',
- ];
- }
- }
- //活动排行榜
- if (app('plugins')->isEnabled('activity-ranking')) {
- $activity_ranking_config = \Yunshop\ActivityRanking\models\ActivityRankingConfigModel::getConfig('is_open');
- if ($activity_ranking_config) {
- $data[] = [
- 'name' => 'activityRanking',
- 'title' => '个人额度',
- 'class' => 'icon-fontclass-personalCredit',
- 'url' => 'personalCredit',
- 'image' => 'member_a(200).png',
- 'mini_url' => '/packageI/personalCredit/personalCredit',
- ];
- }
- }
- // 众筹活动
- if (app('plugins')->isEnabled('crowdfunding') && \Setting::get('crowdfunding.set.plugin_enable')) {
- $data[] = [
- 'name' => 'crowdfunding',
- 'title' => '众筹活动',
- 'class' => 'icon-fontclass_crowd_activity',
- 'url' => 'crowd_activity',
- 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(201).png',
- 'mini_url' => '/packageF/crowd_activity/index/index',
- ];
- }
- // 银典支付
- if (app('plugins')->isEnabled('silver-point-pay') && \Setting::get('silver-point-pay.set.plugin_enable') && in_array(request()->input('type'), [5, 7])) {
- $data[] = [
- 'name' => 'silver-point-pay',
- 'title' => '银典支付',
- 'class' => 'icon-fontclass_crowd_activity',
- 'url' => 'silver_point_pay',
- 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(201).png',
- 'mini_url' => '/packageF/silverPointPay/index/index',
- ];
- }
- // 权益积分
- if (app('plugins')->isEnabled('equity-points') && \Setting::get('plugin.equity_points.is_open')) {
- $data[] = [
- 'name' => 'equity-points',
- 'title' => '权益积分',
- 'class' => 'icon-fontclass-equityPoints',
- 'url' => 'equityPoints',
- 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(202).png',
- 'mini_url' => '/packageF/equityPoints/equityPoints',
- ];
- }
- //高灯
- if (request()->type != 2 && app('plugins')->isEnabled('high-light') && \Yunshop\HighLight\services\SetService::getStatus()) {
- $data[] = [
- 'name' => 'high-light',
- 'title' => \Yunshop\HighLight\services\SetService::getDiyName(),
- 'class' => 'icon-highLight-edit',
- 'url' => 'HighLight',
- 'image' => 'member_a(203).png',
- 'mini_url' => '',
- ];
- }
- //钱包地址
- if (app('plugins')->isEnabled('love-speed-pool')) {
- $data[] = [
- 'name' => 'lspWalletSite',
- 'title' => '钱包地址',
- 'class' => 'icon-walletSite-edit',
- 'url' => 'walletSiteBind',
- 'image' => 'member_a(205).png',
- 'mini_url' => '/packageI/walletSiteBind/walletSiteBind',
- ];
- }
- //员工审批
- if (app('plugins')->isEnabled('staff-audit') && app('plugins')->isEnabled('work-wechat-platform')) {
- $data[] = [
- 'name' => 'staffAudit',
- 'title' => '员工审批',
- 'class' => 'icon-staff-approval',
- 'url' => 'StaffApproval',
- 'image' => 'member_a(206).png',
- 'mini_url' => '',
- ];
- }
- //任务包
- if (app('plugins')->isEnabled('task-package') && \Yunshop\TaskPackage\services\SettingService::pluginSwitch()) {
- $data[] = [
- 'name' => 'task-package',
- 'title' => '任务包',
- 'class' => 'icon-member-taskPackage',
- 'url' => 'taskPackageIndex',
- 'image' => 'member_a(207).png',
- 'mini_url' => '/packageI/taskPackage/taskPackageIndex/taskPackageIndex',
- ];
- }
- //健康检测
- if (app('plugins')->isEnabled('health-check') && \Yunshop\HealthCheck\services\SettingService::getSetting()['open_state']) {
- $data[] = [
- 'name' => 'health-check',
- 'title' => '健康检测',
- 'class' => 'icon-member-checkout',
- 'url' => 'health-check',
- 'image' => 'member_a(208).png',
- 'mini_url' => '/packageI/checkout-equipment/index/index',
- ];
- }
- if (app('plugins')->isEnabled('link-move')) {
- $data[] = [
- 'name' => 'link-move',
- 'title' => \Yunshop\LinkMove\common\LinkMoveSet::instance()->getPluginName(),
- 'class' => 'icon-member-chaining',
- 'url' => 'chaining',
- 'image' => 'member_a(210).png',
- 'mini_url' => '/packageF/chaining/index',
- ];
- }
- //帮扶中心
- if (app('plugins')->isEnabled('support-center')) {
- $data[] = [
- 'name' => 'support-center',
- 'title' => SUPPORT_CENTER_NAME,
- 'class' => 'icon-member-supportCenter',
- 'url' => 'supportCenterIndex',
- 'image' => 'icon_help1@2x.png',
- 'mini_url' => '/packageJ/supportCenter/supportCenterIndex/supportCenterIndex',
- ];
- }
- foreach ($data as $k => $v) {
- if (in_array($v['name'], $diyarr['tool'])) {
- $arr['tool'][] = $v;
- }
- if (in_array($v['name'], $diyarr['asset_equity'])) {
- $arr['asset_equity'][] = $v;
- }
- if (in_array($v['name'], $diyarr['merchant'])) {
- $arr['merchant'][] = $v;
- }
- if (in_array($v['name'], $diyarr['market'])) {
- $arr['market'][] = $v;
- }
- }
- $arr['ViewSet'] = [];
- if (app('plugins')->isEnabled('designer')) {
- //获取所有模板
- $sets = ViewSet::uniacid()->select('names', 'type')->get()->toArray();
- foreach ($sets as $k => $v) {
- $arr['ViewSet'][$v['type']]['name'] = $v['names'];
- $arr['ViewSet'][$v['type']]['name'] = $v['names'];
- }
- }
- $arr['is_open'] = [
- 'is_open_hotel' => app('plugins')->isEnabled('hotel') ? 1 : 0,
- 'is_open_net_car' => app('plugins')->isEnabled('net-car') ? 1 : 0,
- 'is_open_fight_groups' => app('plugins')->isEnabled('fight-groups') ? 1 : 0,
- 'is_open_lease_toy' => \app\common\services\plugin\leasetoy\LeaseToySet::whetherEnabled(), //租赁订单列表是否开启
- 'is_open_converge_pay' => app('plugins')->isEnabled('converge_pay') ? 1 : 0,
- 'is_open_snatch_regiment' => app('plugins')->isEnabled('snatch-regiment') ? 1 : 0,
- 'is_open_live_install' => app('plugins')->isEnabled('live-install') ? 1 : 0,
- 'is_open_live_install_worker' => app('plugins')->isEnabled('live-install') ? 1 : 0,
- 'is_open_aggregation_cps' => app('plugins')->isEnabled('aggregation-cps') ? 1 : 0,
- 'is_open_group_work' => app('plugins')->isEnabled('group-work') ? 1 : 0,
- 'is_open_ys_system' => app('plugins')->isEnabled('ys-system') ? 1 : 0,
- 'is_store' => $store && $store->is_black != 1 ? 1 : 0,
- 'is_open_ywmgroups' => app('plugins')->isEnabled('ywm-fight-groups') ? 1 : 0,
- 'is_open_coupon_store' => app('plugins')->isEnabled('coupon-store') && \Yunshop\CouponStore\services\SettingService::is_open() ? 1 : 0,
- 'is_open_yz_supply_cake' => app('plugins')->isEnabled('yz-supply-cake') ? 1 : 0,
- 'is_open_tiktok_cps' => app('plugins')->isEnabled('tiktok-cps')?1:0,
- ];
- return $arr;
- }
- public function morePluginData()
- {
- $arr = [
- [
- 'name' => '必备工具',
- 'plugin' => [
- 'm-collection', 'm-footprint', 'm-address', 'm-info', 'findpwd', 'member_code', 'member_pay_code', 'm-guanxi', 'ranking', 'material-center',
- 'm-coupon', 'instation-message', 'applicationMarket', 'marketSub', 'converge_pay', 'group-develop-user', 'lower-footprint', 'aggregation-cps',
- 'group-code', 'my-friend', 'commission-ranking', 'diy-form-prove', 'invoiceCenter', 'silver-point-pay'
- ],
- ],
- [
- 'name' => '便捷服务',
- 'plugin' => [
- 'recharge_code', 'exchange', 'help-center', 'article', 'video_demand', 'easy-refuel', 'room-aide', 'promotion-assistant', 'oil_station',
- 'case-library', 'order-inventory','WorkerWithdraw','journal','high-light','eplus-pay'
- ],
- ],
- [
- 'name' => '互动参与',
- 'plugin' => [
- 'm-erweima', 'm-pinglun', 'clock_in', 'conference', 'sign', 'fight_groups', 'video-share', 'micro-communities', 'luck-draw', 'my-snatch-regiment', 'crowdfunding',
- 'snatch-regiment', 'star-spell', 'activity-apply', 'kefu', 'customer-development', 'circle', 'questionnaire', 'blind-box', 'agent_qa', 'new-media-advertising',
- 'group-work', 'prize_pool', 'coupon-qr', 'reserve-simple', 'love-speed-pool-wallet', 'love-speed-pool-center','ywmFightGroups','team_analysis','activityRanking', 'love-speed-pool-statistic', 'equity-points', 'share-value','stock-service',
- 'lspWalletSite','TikTokOrder','staffAudit','full-return','task-package', 'link-move', 'consignment','support-center'
- ],
- ],
- [
- 'name' => '特色业务',
- 'plugin' => [
- 'business_card', 'skin-check', 'appointment', 'auction', 'contractListPlu', 'room-apply', 'pending_order', 'room', 'room-code', 'micro', 'new-retail',
- 'pickUpCardOrderList', 'pickUpCardOrderListOne', 'assemble', 'worker_apply', 'live_install', 'live_install_worker', 'StoreVerification', 'signIndex',
- 'flyers_advertise', 'parking-pay', 'debt-shop', 'lawyer_platform','health-check',
- ],
- ],
- [
- 'name' => '商家合作',
- 'plugin' => [
- 'store-cashier', 'cashier', 'supplier', 'hotel', 'package_deliver', 'subsidiary', 'channel', 'advert-market',
- 'school-company', 'ad-serving', 'universal_card', 'shop-assistant', 'public-fund','CouponStoreApply','CouponStoreManage',
- 'supplier-driver-distribution','store_applyfor'
- ],
- ],
- [
- 'name' => '我的资产',
- 'plugin' => [
- 'extension', 'credit', 'love', 'integral', 'froze', 'agency', 'consumer-reward', 'upgrade-code', 'credit-inventory', 'warehouse', 'member-synchron',
- ],
- ],
- ];
- return $arr;
- }
- public
- function defaultPluginData($memberId)
- {
- //安装了客户中心插件 && 开启客户中心
- $customer_center_enabled = app('plugins')->isEnabled('customer-center') && \Setting::get("plugin.customer-center.is_open");
- $arr = [
- [
- 'class' => 'icon-fontclass-pinglun',
- 'id' => '111111116',
- 'image' => $this->handlePluginImage('tool_a(4).png'),
- 'is_open' => true,
- 'mini_url' => "/packageD/member/myEvaluation/myEvaluation",
- 'name' => "m-pinglun",
- 'title' => "评论",
- 'url' => "myEvaluation",
- ],
- [
- 'class' => 'icon-fontclass-kehu',
- 'id' => '111111114',
- 'image' => $this->handlePluginImage('tool_a(3).png'),
- 'is_open' => true,
- 'mini_url' => $customer_center_enabled ? "/packageF/others/customerCenter/customerCenterIndex/customerCenterIndex" : "/packageD/member/myRelationship/myRelationship",
- 'name' => "m-guanxi",
- 'title' => "客户",
- 'url' => $customer_center_enabled ? "customerCenterIndex" : "myRelationship",
- ],
- [
- 'class' => 'icon-fontclass-1',
- 'id' => '111111110',
- 'image' => $this->handlePluginImage('tool_a(6).png'),
- 'is_open' => true,
- 'mini_url' => "/packageD/member/collection/collection",
- 'name' => "m-collection",
- 'title' => "收藏",
- 'url' => "collection",
- ],
- [
- 'class' => 'icon-fontclass-zuji2',
- 'id' => '111111111',
- 'image' => $this->handlePluginImage('tool_a(8).png'),
- 'is_open' => true,
- 'mini_url' => "/packageD/member/footprint/footprint",
- 'name' => "m-footprin",
- 'title' => "足迹",
- 'url' => "footprint",
- ],
- [
- 'class' => 'icon-fontclass-dizhi',
- 'id' => '111111112',
- 'image' => $this->handlePluginImage('tool_a(1).png'),
- 'is_open' => true,
- 'mini_url' => "/packageD/member/addressList/addressList",
- 'name' => "m-address",
- 'title' => "地址管理",
- 'url' => "address",
- ],
- [
- 'class' => 'icon-fontclass-shezhi',
- 'id' => '111111113',
- 'image' => $this->handlePluginImage('tool_a(5).png'),
- 'is_open' => true,
- 'mini_url' => "/packageA/member/info/info",
- 'name' => "m-info",
- 'title' => "设置",
- 'url' => "info",
- ],
- [
- 'class' => 'icon-fontclass-youhuiquan',
- 'id' => '111111114',
- 'image' => $this->handlePluginImage('tool_a(7).png'),
- 'is_open' => true,
- 'mini_url' => "/packageA/member/coupon_v2/coupon_v2",
- 'name' => "m-coupon",
- 'title' => "优惠券",
- 'url' => "coupon",
- ],
- ];
- $isAgent = MemberShopInfo::uniacid()->select('is_agent')->where('member_id', $memberId)->first();
- if ($this->isBackendRoute() || $isAgent->is_agent == 1) {
- $poster_center_set = Setting::get('plugin.poster_center');
- if (app('plugins')->isEnabled('poster-center')&&$poster_center_set['is_open']&&$poster_center_set['is_replace']) {
- $arr[] = [
- 'class' => 'icon-fontclass-posterCenter',
- 'id' => '111111115',
- 'image' => $this->handlePluginImage('tool_a(12).png'),
- 'is_open' => true,
- 'name' => "m-erweima",
- 'url' => 'm-erweima',
- 'title' => "海报中心",
- ];
- } else {
- $arr[] = [
- 'class' => 'icon-fontclass-erweima',
- 'id' => '111111115',
- 'image' => $this->handlePluginImage('tool_a(2).png'),
- 'is_open' => true,
- 'name' => "m-erweima",
- 'url' => 'm-erweima',
- 'title' => "二维码",
- ];
- }
- }
- return $arr;
- }
- /**
- * 新会员中心模板01:需要在会员中心页面显示的推荐插件
- *
- */
- public
- function sortPluginData()
- {
- //键值即排序
- $plugin = [
- 'm-erweima', 'm-pinglun', 'm-guanxi', 'member_code', 'member_pay_code', 'fight_groups', 'video-share', 'micro-communities', 'StoreVerification', 'business_card',
- 'room', 'article', 'ranking', 'sign', 'clock_in', 'material-center', 'video_demand', 'group-develop-user', 'circle', 'activity-apply', 'blind-box',
- 'store-cashier', 'cashier', 'supplier', 'oil_station', 'case-library', 'micro', 'exchange', 'help-center', 'room-aide', 'universal_card', 'warehouse','ywmFightGroups'
- ];
- if (app('plugins')->isEnabled('decorate') && Setting::get('plugin.decorate.is_open') && Setting::get('decorate.mc_one_default.open_state')) {
- $plugin = DecorateDefaultTemplateModel::uniacid()->templateKey(DecorateDefaultTemplateModel::TEMPLTAE_KEY['mc_one_default'])->status(1)->orderBy('sort', 'ASC')->orderBy('id', 'ASC')->limit(19)->pluck('key')->toArray();
- $plugin = array_values(array_unique($plugin));
- }
- return $plugin;
- }
- private
- function handlePluginImage($image)
- {
- if (config('app.framework') == 'platform') {
- $dir = '/';
- } else {
- $dir = '/addons/yun_shop/';
- }
- return $dir . 'static/yunshop/designer/images/' . $image;
- }
- public function isBackendRoute()
- {
- return \YunShop::isWeb();
- return request()->isBackendRoute ? 1 : 0;
- }
- }
|