MemberCenterService.php 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: win 10
  5. * Date: 2019/7/16
  6. * Time: 14:41
  7. */
  8. namespace app\common\services\member;
  9. use app\common\facades\Setting;
  10. use app\common\helpers\Client;
  11. use app\common\models\MemberShopInfo;
  12. use app\common\services\popularize\PortType;
  13. use Yunshop\AggregationCps\models\EquityGoodsSkuModel;
  14. use Yunshop\AlipayOnekeyLogin\models\MemberAlipay;
  15. use Yunshop\AlipayOnekeyLogin\services\SynchronousUserInfo;
  16. use Yunshop\Assemble\Common\Services\EntryService;
  17. use Yunshop\Channel\model\StockLog;
  18. use Yunshop\CommissionActivity\common\services\CommonService;
  19. use Yunshop\Auction\models\AuctioneerModel;
  20. use Yunshop\CommissionStatistics\common\model\Agents;
  21. use Yunshop\CouponStore\services\SettingService;
  22. use Yunshop\Decorate\models\DecorateDefaultTemplateModel;
  23. use Yunshop\Designer\models\ViewSet;
  24. use Yunshop\Kingtimes\common\models\Distributor;
  25. use Yunshop\Kingtimes\common\models\Provider;
  26. use Yunshop\LawyerPlatform\common\models\LawyerSet;
  27. use Yunshop\OwnerOrderImport\common\services\OwnerService;
  28. use Yunshop\PackageDeliver\model\Deliver;
  29. use Yunshop\TeamDividend\models\TeamDividendAgencyModel;
  30. class MemberCenterService
  31. {
  32. public function getMemberData($memberId)
  33. {
  34. $filter = [
  35. 'conference',
  36. //'store-cashier',
  37. 'recharge-code',
  38. ];
  39. $diyarr = [
  40. 'tool' => [
  41. 'separate', 'elive', 'member_code', 'member_pay_code', 'signIndex', 'converge_pay',
  42. 'room-aide', 'contractListPlu', 'findpwd', 'instation-message', 'applicationMarket', 'marketSub', 'lower-footprint', 'kefu',
  43. 'flight-collect', 'yee-pay', 'group-develop-user', 'signContractLock', 'qq-advertise', 'diy-form-prove', 'invoiceCenter',
  44. 'WorkerWithdraw', 'silver-point-pay','high-light','eplus-pay',
  45. ],
  46. 'asset_equity' => ['integral', 'credit', 'asset', 'love', 'coin', 'froze', 'extension', 'dragon_deposit', 'warehouse'],
  47. 'merchant' => [
  48. 'supplier', 'kingtimes', 'hotel', 'store-cashier', 'cashier', 'micro', 'delivery_station',
  49. 'service_station', 'voice-goods', 'staging_buy_car', 'package_deliver', 'appointment',
  50. 'room-apply', 'subsidiary', 'auction', 'auctionApply', 'promotion-assistant', 'activity-apply', 'supply-demand', 'cloud_warehouse',
  51. 'skin-check', 'StoreVerification', 'ad-serving', 'shop-assistant', 'supplier-driver-distribution', 'reserve-simple',
  52. 'public-fund','CouponStoreApply','CouponStoreManage','TikTokOrder','store_applyfor'
  53. ],
  54. 'market' => [
  55. 'ranking', 'article', 'clock_in', 'conference', 'video_demand', 'enter_goods',
  56. 'universal_card', 'recharge_code', 'my-friend', 'business_card', 'net_car', 'pickUpCardOrderList', 'pickUpCardOrderListOne',
  57. 'fight_groups', 'material-center', 'help-center', 'sign', 'courier',
  58. 'declaration', 'distribution-order', 'video-share', 'pending_order',
  59. 'channel', 'commission-activity', 'elite-award', 'team-sales', 'coupon-qr',
  60. 'micro-communities', 'bonus-pool', 'advert-market', 'room', 'easy-refuel',
  61. 'energy_cabin', 'energy_cabin_dealer', 'questionnaire', 'group-code', 'health-assessment', 'group-code',
  62. 'love-ranking', 'assemble', 'worker_apply', 'exchange', 'agent-enquiry', 'together-purchase', 'TeamDistributions', 'sales-report', 'snatch-regiment',
  63. 'oil_station', 'school-company', 'store-community', 'journal', 'live_install', 'live_install_worker', 'kart', 'flyers_advertise',
  64. 'case-library', 'star-spell', 'agent_qa', 'store-card', 'luck-draw', 'aggregation-cps', 'agency', 'upgrade-code', 'customer-development', 'commission-ranking', 'blind-box',
  65. 'room-code', 'circle', 'new-retail', 'store-business-alliance', 'my-snatch-regiment', 'consumer-reward', 'credit-inventory', 'free-lottery', 'owner-order-import',
  66. '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',
  67. 'ywmFightGroups', 'lawyer_platform', 'team_analysis','agentEarnings','activityRanking', 'love-speed-pool-statistic', 'equity-points','health-check',
  68. 'crowdfunding', 'share-value','lspWalletSite','staffAudit','stock-service','task-package', 'link-move', 'consignment','support-center'
  69. ],
  70. ];
  71. //默认
  72. $data = [
  73. [
  74. 'name' => 'findpwd',
  75. 'title' => '忘记密码',
  76. 'class' => 'icon-fontclass-wangjimima2',
  77. 'url' => 'findpwd',
  78. 'image' => 'member_a(124).png',
  79. 'mini_url' => '/packageE/findpwd/findpwd',
  80. ],
  81. ];
  82. collect(app('plugins')->getPlugins())->filter(function ($item) use ($filter) {
  83. if (1 == $item->isEnabled()) {
  84. $info = $item->toArray();
  85. if (in_array($info['name'], $filter)) {
  86. return $item;
  87. }
  88. }
  89. })->each(function ($item) use (&$data) {
  90. $info = $item->toArray();
  91. $name = $info['name'];
  92. //todo 门店暂时不传
  93. if ($info['name'] == "store-cashier") {
  94. $name = 'store_cashier';
  95. } elseif ($info['name'] == 'recharge-code') {
  96. $name = 'recharge_code';
  97. $class = 'icon-member-recharge1';
  98. $url = 'rechargeCode';
  99. $image = 'member_a(3).png';
  100. $mini_url = '/packageA/member/rechargeCode/rechargeCode';
  101. } elseif ($info['name'] == 'conference') {
  102. $name = 'conference';
  103. $class = 'icon-member-act-signup1';
  104. $url = 'conferenceList';
  105. $image = 'member_a(15).png';
  106. $mini_url = '/packageA/member/conferenceList/conferenceList';
  107. }
  108. $data[] = [
  109. 'name' => $name,
  110. 'title' => $info['title'],
  111. 'class' => $class,
  112. 'url' => $url,
  113. 'image' => $image,
  114. 'mini_url' => $mini_url,
  115. ];
  116. });
  117. if (app('plugins')->isEnabled('asset') && ((new \Yunshop\Asset\Common\Services\IncomeDigitizationService)->memberPermission() || $this->isBackendRoute())) {
  118. $data[] = [
  119. 'name' => 'asset',
  120. 'title' => PLUGIN_ASSET_NAME,
  121. 'class' => 'icon-number_assets',
  122. 'url' => 'TransHome',
  123. 'image' => 'member_a(69).png',
  124. 'mini_url' => '',
  125. ];
  126. }
  127. if (\Setting::getByGroup('coupon')['exchange_center'] == 1) {
  128. $data[] = [
  129. 'name' => 'exchange',
  130. 'title' => '兑换中心',
  131. 'class' => 'icon-member_changer_centre',
  132. 'url' => 'CouponExchange',
  133. 'image' => 'member_a(74).png',
  134. 'mini_url' => '/packageC/CouponExchange/index',
  135. ];
  136. }
  137. if (app('plugins')->isEnabled('sales-report')) {
  138. $sales_report_set = array_pluck(Setting::getAllByGroup('sales-report')->toArray(), 'value', 'key');
  139. if ($sales_report_set['is_open'] == 1 && app('plugins')->isEnabled('team-dividend') && app('plugins')->isEnabled('shareholder-dividend')) {
  140. $data[] = [
  141. 'name' => 'sales-report',
  142. 'title' => $sales_report_set['plugin_name'] ?: "销售报表",
  143. 'class' => 'icon-fontclass-xiaoshoubaobiao',
  144. 'url' => 'salesTable',
  145. 'image' => 'member_a(128).png',
  146. 'mini_url' => '',
  147. ];
  148. }
  149. }
  150. if (PortType::popularizeShow(\YunShop::request()->type)) {
  151. $data[] = [
  152. 'name' => 'extension',
  153. 'title' => '推广中心',
  154. 'class' => 'icon-member-extension1',
  155. 'url' => 'extension',
  156. 'image' => 'member_a(38).png',
  157. 'mini_url' => '/pages/member/extension/extension',
  158. ];
  159. }
  160. if (app('plugins')->isEnabled('business-card')) {
  161. $is_open = Setting::get('business-card.is_open');
  162. if ($is_open == 1) {
  163. $data[] = [
  164. 'name' => 'business_card',
  165. 'title' => '名片',
  166. 'class' => 'icon-member_card1',
  167. 'url' => 'CardCenter',
  168. 'image' => 'member_a(58).png',
  169. 'mini_url' => '/packageB/member/business_card/CardCenter/CardCenter',
  170. ];
  171. }
  172. }
  173. if (app('plugins')->isEnabled('customer-development')) {
  174. $is_open = Setting::get('customer-development.is_open');
  175. if ($is_open == 1) {
  176. $data[] = [
  177. 'name' => 'customer-development',
  178. 'title' => \Yunshop\CustomerDevelopment\Common\services\SetService::getPluginName(),
  179. 'class' => 'icon-fontclass-tuoke',
  180. 'url' => 'memberTokerCard',
  181. 'image' => 'member_a(136).png',
  182. 'mini_url' => '/packageH/toker/memberTokerCard/memberTokerCard',
  183. ];
  184. }
  185. }
  186. if (app('plugins')->isEnabled('agent-enquiry')) {
  187. $is_open = Setting::get('agent-enquiry.is_open');
  188. if ($is_open == 1) {
  189. if (app('plugins')->isEnabled('area-dividend')) {
  190. $data[] = [
  191. 'name' => 'agent-enquiry',
  192. 'title' => '区域代理查询',
  193. 'class' => 'icon-member_area_search',
  194. 'url' => 'regionalAgent',
  195. 'image' => 'member_a(121).png',
  196. 'mini_url' => '',
  197. ];
  198. }
  199. }
  200. }
  201. if (app('plugins')->isEnabled('prize-pool')) {
  202. $prize_set = array_pluck(Setting::getAllByGroup('prize-pool')->toArray(), 'value', 'key');
  203. if ($prize_set['is_open'] == 1) {
  204. $data[] = [
  205. 'name' => 'prize_pool',
  206. 'title' => '奖金池',
  207. 'class' => 'icon-member-prizePool',
  208. 'url' => 'prizePool',
  209. 'image' => 'member_a(173).png',
  210. 'mini_url' => '/packageI/prizePool/prizePool',
  211. ];
  212. }
  213. }
  214. if (app('plugins')->isEnabled('tiktok-cps')&&app('plugins')->isEnabled('yz-supply')) {
  215. $data[] = [
  216. 'name' => 'TikTokOrder',
  217. 'title' => '抖音CPS',
  218. 'class' => 'icon-member-tiktokcps',
  219. 'url' => 'TikTokOrder',
  220. 'image' => 'member_a(203).png',
  221. 'mini_url' => '/packageF/cps/order/order',
  222. ];
  223. }
  224. if (\YunShop::request()->type != 2 && app('plugins')->isEnabled('channel')) {
  225. $channelSetting = Setting::get('plugin.channel');
  226. if ($channelSetting['is_open_channel'] == 1) {
  227. $pluginName = $channelSetting['plugin_name'] ?: '代理商';
  228. // 订单未读数量
  229. $readCount = StockLog::select('id')
  230. ->where('parent_uid', $memberId)
  231. ->where('is_read', 1)
  232. ->count();
  233. $data[] = [
  234. 'name' => 'channel',
  235. 'title' => $pluginName,
  236. 'class' => 'icon-member_distributors',
  237. 'url' => 'distributorIndex',
  238. 'image' => 'member_a(94).png',
  239. 'mini_url' => '',
  240. 'total' => $readCount,
  241. ];
  242. }
  243. }
  244. if (app('plugins')->isEnabled('commission-activity')) {
  245. $name = \Yunshop\CommissionActivity\common\services\CommonService::getName();
  246. $data[] = [
  247. 'name' => 'commission-activity',
  248. 'title' => $name,
  249. 'class' => 'icon-member_active',
  250. 'url' => 'DistributionIndex',
  251. 'image' => 'member_a(100).png',
  252. 'mini_url' => '/packageB/member/distribution_queue/DistributionIndex/DistributionIndex',
  253. ];
  254. $data[] = [
  255. 'name' => 'commission-activity',
  256. 'title' => $name . '查询',
  257. 'class' => 'icon-member_active_search',
  258. 'url' => 'DistributionStatistics',
  259. 'image' => 'member_a(99).png',
  260. 'mini_url' => '/packageB/member/distribution_queue/DistributionStatistics/DistributionStatistics',
  261. ];
  262. }
  263. if (app('plugins')->isEnabled('team-sales')) {
  264. $name = \Yunshop\TeamSales\common\services\CommonService::getSet()['name'];
  265. $data[] = [
  266. 'name' => 'team-sales',
  267. 'title' => $name,
  268. 'class' => 'icon-member_team_salereturn',
  269. 'url' => 'teamSell',
  270. 'image' => 'member_a(87).png',
  271. 'mini_url' => '',
  272. ];
  273. }
  274. if (app('plugins')->isEnabled('declaration')) {
  275. if (Setting::get('plugin.declaration.switch')) {
  276. $data[] = [
  277. 'name' => 'declaration',
  278. 'title' => DECLARATION_NAME,
  279. 'class' => 'icon-declaration_system',
  280. 'url' => 'DeclarationApply',
  281. 'image' => 'member_a (66).png',
  282. 'mini_url' => '',
  283. ];
  284. }
  285. }
  286. //配送站
  287. if (app('plugins')->isEnabled('delivery-station')) {
  288. $delivery_station_setting = Setting::get('plugin.delivery_station');
  289. $delivery_station = \Yunshop\DeliveryStation\models\DeliveryStation::memberId($memberId)->first();
  290. if (($delivery_station && $delivery_station_setting['is_open']) || $this->isBackendRoute()) {
  291. $data[] = [
  292. 'name' => 'delivery_station',
  293. 'title' => '配送站',
  294. 'class' => 'icon-delivery_order',
  295. 'url' => 'deliveryStation',
  296. 'mini_url' => '',
  297. ];
  298. }
  299. }
  300. //服务站
  301. if (app('plugins')->isEnabled('service-station')) {
  302. $service_station = \Yunshop\ServiceStation\models\ServiceStation::isBlack()->memberId($memberId)->first();
  303. if ($service_station || $this->isBackendRoute()) {
  304. $data[] = [
  305. 'name' => 'service_station',
  306. 'title' => '服务站',
  307. 'class' => 'icon-service_station',
  308. 'url' => 'serviceStation',
  309. 'mini_url' => '',
  310. ];
  311. }
  312. }
  313. if (app('plugins')->isEnabled('material-center')) {
  314. $data[] = [
  315. 'name' => 'material-center',
  316. 'title' => '素材中心',
  317. 'class' => 'icon-member_material',
  318. 'url' => 'materialCenter',
  319. 'image' => 'member_a(65).png',
  320. 'mini_url' => '/packageA/others/materialCenter/materialCenter',
  321. ];
  322. }
  323. if (app('plugins')->isEnabled('distribution-order')) {
  324. $disorder_setting = Setting::get('plugins.distribution-order');
  325. if ($disorder_setting && 1 == $disorder_setting['is_open']) {
  326. $data[] = [
  327. 'name' => 'distribution-order',
  328. 'title' => $disorder_setting['title'] ?: '分销订单统计',
  329. 'class' => 'icon-order_system',
  330. 'url' => 'DistributionOrders',
  331. 'image' => 'member_a(70).png',
  332. 'mini_url' => '/packageA/member/DistributionOrders/DistributionOrders',
  333. ];
  334. }
  335. }
  336. if (app('plugins')->isEnabled('credit')) {
  337. $credit_setting = Setting::get('plugin.credit');
  338. if ($credit_setting && 1 == $credit_setting['is_credit']) {
  339. $data[] = [
  340. 'name' => 'credit',
  341. 'title' => '信用值',
  342. 'class' => 'icon-member-credit01',
  343. 'url' => 'creditInfo',
  344. 'image' => 'member_a(44).png',
  345. 'mini_url' => '/packageB/member/creditInfo/creditInfo',
  346. ];
  347. }
  348. }
  349. if (app('plugins')->isEnabled('ranking')) {
  350. $ranking_setting = Setting::get('plugin.ranking');
  351. if ($ranking_setting && 1 == $ranking_setting['is_ranking']) {
  352. $data[] = [
  353. 'name' => 'ranking',
  354. 'title' => '排行榜',
  355. 'class' => 'icon-member-bank-list1',
  356. 'url' => 'rankingIndex',
  357. 'image' => 'member_a(29).png',
  358. 'mini_url' => '/packageE/Rankings/Rankings',
  359. ];
  360. }
  361. }
  362. if (app('plugins')->isEnabled('micro')) {
  363. $micro_set = \Setting::get('plugin.micro');
  364. if ($micro_set['is_open_miceo'] == 1) {
  365. $micro_shop = \Yunshop\Micro\common\models\MicroShop::getMicroShopByMemberId($memberId);
  366. if ($micro_shop || $this->isBackendRoute()) {
  367. $data[] = [
  368. 'name' => 'micro',
  369. 'title' => MICRO_PLUGIN_NAME . '中心',
  370. 'class' => 'icon-member-mendian1',
  371. 'url' => 'microShop_home',
  372. 'image' => 'member_a(40).png',
  373. 'mini_url' => '/packageC/microshop/microShop_home/microShop_home',
  374. ];
  375. }else{
  376. $data[] = [
  377. 'name' => 'micro',
  378. 'title' => '我要开店',
  379. 'class' => 'icon-member-mendian1',
  380. 'url' => 'microShop_apply',
  381. 'image' => 'member_a(40).png',
  382. 'mini_url' => '/packageC/microshop/microShop_apply/microShop_apply',
  383. ];
  384. }
  385. }
  386. }
  387. if (app('plugins')->isEnabled('help-center')) {
  388. $status = \Setting::get('help-center.status') ? true : false;
  389. if ($status) {
  390. $data[] = [
  391. 'name' => 'help-center',
  392. 'title' => '帮助中心',
  393. 'class' => 'icon-member-help',
  394. 'url' => 'helpcenter',
  395. 'image' => 'member_a(2).png',
  396. 'mini_url' => '/packageB/member/helpcenter/helpcenter',
  397. ];
  398. }
  399. }
  400. if (app('plugins')->isEnabled('love')) {
  401. $data[] = [
  402. 'name' => 'love',
  403. 'title' => \Yunshop\Love\Common\Services\SetService::getLoveName() ?: '爱心值',
  404. 'class' => 'icon-member-exchange1',
  405. 'url' => 'love_index',
  406. 'image' => 'member_a(1).png',
  407. 'mini_url' => '/packageB/member/love/Love_index/Love_index',
  408. ];
  409. }
  410. if (app('plugins')->isEnabled('store-card')) {
  411. $data[] = [
  412. 'name' => 'store-card',
  413. 'title' => '门店消费卡',
  414. 'class' => 'icon-fontclass-mendianxaiofeika1',
  415. 'url' => 'storeConsumeIndex',
  416. 'image' => 'member_a(137).png',
  417. 'mini_url' => '/packageH/o2o/storeConsumeIncme/storeConsumeIncme',
  418. ];
  419. }
  420. if (app('plugins')->isEnabled('assemble') && request()->input('type') != 2) {
  421. $data[] = [
  422. 'name' => 'assemble',
  423. 'title' => Setting::get('plugin.assemble.assemble_name') ?: '安装服务',
  424. 'class' => 'icon-member_installserver',
  425. 'url' => 'userOrderlist',
  426. 'image' => 'member_a(114).png',
  427. 'mini_url' => '',
  428. ];
  429. //如果会员是安装师傅、或者区域代理显示安装师傅,否则显示安装师傅申请
  430. if ((new EntryService())->isShow()) {
  431. $data[] = [
  432. 'name' => 'worker_apply',
  433. 'title' => Setting::get('plugin.assemble.assemble_worker_name') ?: '安装师傅',
  434. 'class' => 'icon-member_installserverapply',
  435. 'url' => 'workerOrderlist',
  436. 'image' => 'member_a(113).png',
  437. 'mini_url' => '',
  438. ];
  439. }else{
  440. $workerName = Setting::get('plugin.assemble.assemble_worker_name');
  441. $data[] = [
  442. 'name' => 'worker_apply',
  443. 'title' => $workerName ? $workerName . '申请' : '安装师傅申请',
  444. 'class' => 'icon-member_installserverapply',
  445. 'url' => 'workerApply',
  446. 'image' => 'member_a(113).png',
  447. 'mini_url' => '',
  448. ];
  449. }
  450. }
  451. //寄售商品
  452. if(\Setting::get('plugin.consignment')['is_open'] && app('plugins')->isEnabled('consignment')){
  453. $data[] = [
  454. 'name' => 'consignment',
  455. 'title' => CONSIGNMENT_PLUGIN_NAME,
  456. 'class' => 'icon-member-consignment',
  457. 'url' => 'member_exchange_bond',
  458. 'image' => 'member_a(211).png',
  459. 'mini_url' => '/packageI/exchange_bond/member/member',
  460. ];
  461. }
  462. if (app('plugins')->isEnabled('owner-order-import')) {
  463. $ownerService = new OwnerService();
  464. if ($ownerService->isShow()) {
  465. if ($ownerService->isRegister()) {
  466. $data[] = [
  467. 'name' => 'owner-order-import',
  468. 'title' => '跨境店主',
  469. 'class' => 'icon-fontclass-kuajing',
  470. 'url' => 'orderImportIndex',
  471. 'image' => 'member_a(167).png',
  472. 'mini_url' => '/packageH/orderImport/orderImportIndex/orderImportIndex',
  473. ];
  474. }else{
  475. $data[] = [
  476. 'name' => 'owner-order-import',
  477. 'title' => '跨境店主申请',
  478. 'class' => 'icon-fontclass-dianzhushenqing',
  479. 'url' => 'orderImportApply',
  480. 'image' => 'member_a(166).png',
  481. 'mini_url' => '/packageH/orderImport/orderImportApply/orderImportApply',
  482. ];
  483. }
  484. }
  485. }
  486. if (app('plugins')->isEnabled('love-ranking')) {
  487. if (app('plugins')->isEnabled('love')) {
  488. $title = \Yunshop\Love\Common\Services\SetService::getLoveName() ?: '爱心值';
  489. $data[] = [
  490. 'name' => 'love-ranking',
  491. 'title' => $title . '排行榜',
  492. 'class' => ' icon-member_reward_ranking',
  493. 'url' => 'loveRanking',
  494. 'image' => 'member_a(116).png ',
  495. 'mini_url' => '/packageE/loveRanking/loveRanking',
  496. ];
  497. }
  498. }
  499. if (app('plugins')->isEnabled('froze')) {
  500. $data[] = [
  501. 'name' => 'froze',
  502. 'title' => \Yunshop\Froze\Common\Services\SetService::getFrozeName() ?: '冻结币',
  503. 'class' => 'icon-member-frozen1',
  504. 'url' => 'FrozenCoin',
  505. 'image' => 'member_a(7).png',
  506. 'mini_url' => '/packageB/member/FrozenCoin/FrozenCoin',
  507. ];
  508. }
  509. if (app('plugins')->isEnabled('coin')) {
  510. $data[] = [
  511. 'name' => 'coin',
  512. 'title' => \Yunshop\Coin\Common\Services\SetService::getCoinName() ?: '华侨币',
  513. 'class' => 'icon-member-currency1',
  514. 'url' => 'overseas_index',
  515. 'image' => 'member_a(14).png',
  516. 'mini_url' => '/packageB/member/overseas_index/overseas_index',
  517. ];
  518. }
  519. if (app('plugins')->isEnabled('elive')) {
  520. $data[] = [
  521. 'name' => 'elive',
  522. 'title' => '生活缴费',
  523. 'class' => 'icon-shenghuojiaofei',
  524. 'url' => 'lifeService',
  525. 'image' => 'member_a(49).png',
  526. 'mini_url' => '',
  527. ];
  528. }
  529. if (app('plugins')->isEnabled('sign')) {
  530. $data[] = [
  531. 'name' => 'sign',
  532. 'title' => trans('Yunshop\Sign::sign.plugin_name') ?: '签到',
  533. 'class' => 'icon-member-clock1',
  534. 'url' => 'sign',
  535. 'image' => 'member_a(30).png',
  536. 'mini_url' => '/packageA/member/sign/sign',
  537. ];
  538. }
  539. if (app('plugins')->isEnabled('courier')) {
  540. //快递单
  541. $status = \Setting::get('courier.courier.radio');
  542. if ($status) {
  543. $data[] = [
  544. 'name' => 'courier',
  545. 'title' => '快递',
  546. 'image' => 'member_a(68).png',
  547. 'mini_url' => '/packageA/member/CourseManage/CourseManage',
  548. ];
  549. }
  550. }
  551. if (app('plugins')->isEnabled('voice-goods')) {
  552. $set = \Setting::get('plugin.voice-goods');
  553. if ($set['is_open_voice'] == 1) {
  554. $data[] = [
  555. 'name' => 'voice-goods',
  556. 'title' => $set['voice_name'],
  557. 'class' => 'icon-member_voice_center',
  558. 'url' => 'MyVoices',
  559. 'image' => 'member_a(75).png',
  560. 'mini_url' => '/packageC/voice_shop/my_voices/my_voices',
  561. ];
  562. }
  563. }
  564. if (app('plugins')->isEnabled('my-friend')) {
  565. $data[] = [
  566. 'name' => 'my-friend',
  567. 'title' => MY_FRIEND_NAME,
  568. 'class' => 'icon-member_my-friend',
  569. 'url' => 'MyFriendApply',
  570. 'image' => 'member_a(63).png',
  571. 'mini_url' => '/packageD/MyFriendApply/myfriends',
  572. ];
  573. }
  574. if (app('plugins')->isEnabled('article')) {
  575. $article_setting = Setting::get('plugin.article');
  576. if ($article_setting) {
  577. $data[] = [
  578. 'name' => 'article',
  579. 'title' => $article_setting['center'] ?: '文章中心',
  580. 'class' => 'icon-member-collect1',
  581. 'url' => 'notice',
  582. 'param' => 0,
  583. 'image' => 'member_a(41).png',
  584. 'mini_url' => '/packageA/member/notice/notice',
  585. ];
  586. }
  587. }
  588. if (app('plugins')->isEnabled('clock-in')) {
  589. $clockInService = new \Yunshop\ClockIn\services\ClockInService();
  590. $pluginName = $clockInService->get('plugin_name');
  591. $clock_in_setting = Setting::get('plugin.clock_in');
  592. if ($clock_in_setting && 1 == $clock_in_setting['is_clock_in']) {
  593. $data[] = [
  594. 'name' => 'clock_in',
  595. 'title' => $pluginName,
  596. 'class' => 'icon-member-get-up',
  597. 'url' => 'ClockPunch',
  598. 'image' => 'member_a(47).png',
  599. 'mini_url' => '/packageA/member/ClockPunch/ClockPunch',
  600. ];
  601. }
  602. }
  603. if (app('plugins')->isEnabled('powder-value')) {
  604. $powderValueSet = \Yunshop\PowderValue\services\BaseSetService::getSet();
  605. if ($powderValueSet['plugin_enable']) {
  606. $data[] = [
  607. 'name' => 'americanFans',
  608. 'title' => $powderValueSet['diy_name'],
  609. 'class' => 'icon-americanFans',
  610. 'url' => 'americanFans',
  611. 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/extension/extension(117).png',
  612. 'mini_url' => '/packageI/american_fans/index',
  613. ];
  614. }
  615. }
  616. if (app('plugins')->isEnabled('video-demand')) {
  617. $video_demand_setting = Setting::get('plugin.video_demand');
  618. if ($video_demand_setting && $video_demand_setting['is_video_demand']) {
  619. $data[] = [
  620. 'name' => 'video_demand',
  621. 'title' => '课程中心',
  622. 'class' => 'icon-member-course3',
  623. 'url' => 'CourseManage',
  624. 'image' => 'member_a(22).png',
  625. 'mini_url' => '/packageA/member/CourseManage/CourseManage',
  626. ];
  627. }
  628. }
  629. if (app('plugins')->isEnabled('help-center')) {
  630. $help_center_setting = Setting::get('plugin.help_center');
  631. if ($help_center_setting && 1 == $help_center_setting['status']) {
  632. $data[] = [
  633. 'name' => 'help_center',
  634. 'title' => '帮助中心',
  635. 'class' => 'icon-member-help',
  636. 'url' => 'helpcenter',
  637. 'mini_url' => '/packageB/member/helpcenter/helpcenter',
  638. ];
  639. }
  640. }
  641. //商米D2使用的
  642. $data[] = [
  643. 'name' => 'member_code',
  644. 'title' => '会员卡号 ',
  645. 'class' => 'icon-member_posvip_cardnum',
  646. 'url' => 'uidCode',
  647. 'image' => 'member_a(83).png',
  648. 'mini_url' => '',
  649. ];
  650. $data[] = [
  651. 'name' => 'member_pay_code',
  652. 'title' => '动态验证码',
  653. 'class' => 'icon-member_pospay_validation',
  654. 'url' => 'codePage',
  655. 'image' => 'member_a(82).png',
  656. 'mini_url' => '/packageI/dynamic_code/code/code',
  657. ];
  658. if (app('plugins')->isEnabled('store-cashier')) {
  659. $store = \Yunshop\StoreCashier\common\models\Store::getStoreByUid($memberId)->first();
  660. if ($this->isBackendRoute() || !$store) {
  661. $data[] = [
  662. 'name' => 'store-cashier',
  663. 'title' => '门店申请',
  664. 'class' => 'icon-member-store-apply1',
  665. 'url' => 'storeApply',
  666. 'image' => 'member_a(26).png',
  667. 'mini_url' => '/packageA/member/storeApply/storeApply',
  668. ];
  669. }
  670. if ($this->isBackendRoute() || ($store && $store->is_black != 1)) {
  671. $data[] = [
  672. 'name' => 'store-cashier',
  673. 'title' => '门店管理',
  674. 'class' => 'icon-member_store',
  675. 'url' => 'storeManage',
  676. 'image' => 'member_a(26).png',
  677. 'mini_url' => '/packageC/o2o/storeManage/storeManage',
  678. ];
  679. if ($this->isBackendRoute() || ($store->hasOneCashier->hasOneCashierGoods->is_open == 1)) {
  680. $data[] = [
  681. 'name' => 'cashier',
  682. 'title' => '收银台',
  683. 'class' => 'icon-member-cashier',
  684. 'url' => 'cashier',
  685. 'api' => 'plugin.store-cashier.frontend.cashier.center.index',
  686. 'image' => 'member_a(34).png',
  687. 'mini_url' => '/packageC/cashier/cashier/cashier',
  688. ];
  689. }
  690. }
  691. }
  692. if (app('plugins')->isEnabled('supplier')) {
  693. $supplier_setting = Setting::get('plugin.supplier');
  694. $supplier = \Yunshop\Supplier\common\models\Supplier::getSupplierByMemberId($memberId, 1);
  695. if (!$supplier) {
  696. $data[] = [
  697. 'name' => 'supplier',
  698. 'title' => '供应商申请',
  699. 'class' => 'icon-member-apply1',
  700. 'url' => 'supplier',
  701. 'api' => 'plugin.supplier.supplier.controllers.apply.supplier-apply.apply',
  702. 'image' => 'member_a(53).png',
  703. 'mini_url' => '/packageA/member/supplier/supplier',
  704. ];
  705. }
  706. if ($supplier_setting && ($supplier_setting['status'] == 1) && $supplier) {
  707. $data[] = [
  708. 'name' => 'supplier',
  709. 'title' => $supplier_setting['name'] ?: '供应商管理',
  710. 'class' => 'icon-member-supplier',
  711. 'url' => 'SupplierCenter',
  712. 'image' => 'member_a(53).png',
  713. 'mini_url' => '/packageA/member/SupplierCenter/SupplierCenter',
  714. ];
  715. }
  716. }
  717. if (app('plugins')->isEnabled('kingtimes')) {
  718. $provider = Provider::select(['id', 'uid', 'status'])->where('uid',
  719. $memberId)->first();
  720. $distributor = Distributor::select(['id', 'uid', 'status'])->where('uid',
  721. $memberId)->first();
  722. if ($provider && $provider->status == 1) {
  723. $data[] = [
  724. 'name' => 'kingtimes',
  725. 'title' => '补货商中心',
  726. 'class' => 'icon-member-replenishment',
  727. 'url' => 'ReplenishmentApply',
  728. 'image' => 'member_a(67).png',
  729. 'mini_url' => '',
  730. ];
  731. }else{
  732. $data[] = [
  733. 'name' => 'kingtimes',
  734. 'title' => '补货商申请',
  735. 'class' => 'icon-member-replenishment',
  736. 'url' => 'ReplenishmentApply',
  737. 'image' => 'member_a(67).png',
  738. 'mini_url' => '',
  739. ];
  740. }
  741. if ($distributor && $distributor->status == 1) {
  742. $data[] = [
  743. 'name' => 'kingtimes',
  744. 'title' => '配送站中心',
  745. 'class' => 'icon-member-express-list',
  746. 'url' => 'DeliveryTerminalApply',
  747. 'image' => 'member_a(54).png',
  748. 'mini_url' => '',
  749. ];
  750. }else {
  751. $data[] = [
  752. 'name' => 'kingtimes',
  753. 'title' => '配送站申请',
  754. 'class' => 'icon-member-express-list',
  755. 'url' => 'DeliveryTerminalApply',
  756. 'image' => 'member_a(54).png',
  757. 'mini_url' => '',
  758. ];
  759. }
  760. // dd($data);
  761. }
  762. if (app('plugins')->isEnabled('enter-goods')) {
  763. $data[] = [
  764. 'name' => 'enter_goods',
  765. 'title' => '用户入驻',
  766. 'class' => 'icon-member_goods',
  767. 'url' => 'EnterShop',
  768. 'image' => 'member_a(52).png',
  769. 'mini_url' => '',
  770. ];
  771. }
  772. if (app('plugins')->isEnabled('integral')) {
  773. $status = \Yunshop\Integral\Common\Services\SetService::getIntegralSet();
  774. if ($status['member_show']) {
  775. $data[] = [
  776. 'name' => 'integral',
  777. 'title' => $status['plugin_name'] ?: '消费积分',
  778. 'class' => 'icon-member_integral',
  779. 'url' => 'Integral_love',
  780. 'image' => 'member_a(55).png',
  781. 'mini_url' => '/packageB/member/Integral_love/Integral_love',
  782. ];
  783. }
  784. }
  785. //直播
  786. if (app('plugins')->isEnabled('room')) {
  787. $set = \Setting::get('plugin.room_set_basic');
  788. if ($set && $set['is_open_room'] == 1) {
  789. $data[] = [
  790. 'name' => 'room',
  791. 'title' => $set['plugin_name'] ?: '直播',
  792. 'class' => 'icon-member_live_normal',
  793. 'url' => 'liveList',
  794. 'image' => 'member_a(92).png',
  795. 'mini_url' => '/packageD/directSeeding/liveList/liveList',
  796. ];
  797. }
  798. $anchor = \Yunshop\Room\models\Anchor::getAnchorByMemberId($memberId)->first();
  799. if (!$anchor || $this->isBackendRoute()) {
  800. $data[] = [
  801. 'name' => 'room-apply',
  802. 'title' => '主播申请',
  803. 'class' => 'icon-member_host_application',
  804. 'url' => 'anchorApply',
  805. 'image' => 'member_a(91).png',
  806. 'mini_url' => '/packageD/directSeeding/anchorApply/anchorApply',
  807. ];
  808. }
  809. if ($anchor || empty($memberId) || $this->isBackendRoute()) {
  810. $data[] = [
  811. 'name' => 'room-aide',
  812. 'title' => '主播助手',
  813. 'class' => 'icon-member_vj_asistant',
  814. 'url' => 'helperLiveList',
  815. 'image' => 'member_a(102).png',
  816. 'mini_url' => '/packageD/directSeeding/helperLiveList/helperLiveList',
  817. ];
  818. }
  819. $code_set = \Setting::get('plugin.room_code_basic');
  820. if ($code_set['open_code'] && $code_set['front_show']) {
  821. $data[] = [
  822. 'name' => 'room-code',
  823. 'title' => '直播授权码',
  824. 'class' => 'icon-fontclass-shouquanma-01',
  825. 'url' => 'liveAuthorization',
  826. 'image' => 'member_a(148).png',
  827. 'mini_url' => '/packageH/liveAuthorization/liveAuthorization/liveAuthorization',
  828. ];
  829. }
  830. }
  831. // 一卡通
  832. if (app('plugins')->isEnabled('universal-card')) {
  833. $set = \Yunshop\UniversalCard\services\CommonService::getSet();
  834. //判断插件开关
  835. if ($set['switch']) {
  836. $shopSet = \Setting::get('shop.member');
  837. //判断商城升级条件是否为指定商品 非购买指定商品升级的不走一卡通插件
  838. if ($shopSet['level_type'] == 2) {
  839. $data[] = [
  840. 'name' => 'universal_card',
  841. 'title' => $set['name'],
  842. 'class' => 'icon-card',
  843. 'url' => 'CardIndex',
  844. 'image' => 'member_a(57).png',
  845. 'mini_url' => '/packageB/member/CardIndex/CardIndex',
  846. ];
  847. }
  848. }
  849. }
  850. if (app('plugins')->isEnabled('separate')) {
  851. $setting = \Setting::get('plugin.separate');
  852. if ($setting && 1 == $setting['separate_status']) {
  853. $data[] = [
  854. 'name' => 'separate',
  855. 'title' => '绑定银行卡',
  856. 'class' => 'icon-yinhangqia',
  857. 'url' => 'BankCard',
  858. 'image' => 'tool_a(10).png',
  859. 'mini_url' => '',
  860. ];
  861. }
  862. }
  863. if (app('plugins')->isEnabled('upgrade-code') && app('plugins')->isEnabled('team-dividend')) {
  864. $code_open = Setting::get('upgrade-code.is_open');
  865. if ($code_open == 1) {
  866. $data[] = [
  867. 'name' => 'upgrade-code',
  868. 'title' => '升级码',
  869. 'class' => 'icon-fontclass-shengjima',
  870. 'url' => 'MemberUpgradeCode',
  871. 'image' => 'member_a(141).png',
  872. 'mini_url' => '/packageH/member/upgrade_code/index/index',
  873. ];
  874. }
  875. }
  876. if (app('plugins')->isEnabled('credit-inventory')) {
  877. $credit_open = Setting::get('credit-inventory.is_open');
  878. if ($credit_open == 1) {
  879. $data[] = [
  880. 'name' => 'credit-inventory',
  881. 'title' => '信用值',
  882. 'class' => 'icon-fontclass-xinyongzhi',
  883. 'url' => 'creditValeuIndex',
  884. 'image' => 'member_a(159).png',
  885. 'mini_url' => '/packageH/credit_value/created_value_index/created_value_index',
  886. ];
  887. }
  888. }
  889. if (app('plugins')->isEnabled('share-value')) {
  890. $share_open = array_pluck(\Setting::getAllByGroup('share-value')->toArray(), 'value', 'key');
  891. if ($share_open['is_open'] == 1) {
  892. $data[] = [
  893. 'name' => 'share-value',
  894. 'title' => SHRAE_VALUE_NAME,
  895. 'class' => 'icon-member-share-value',
  896. 'url' => 'shareValue',
  897. 'image' => 'member_a(199).png',
  898. 'mini_url' => '/packageI/share_value/index',
  899. ];
  900. }
  901. }
  902. if (app('plugins')->isEnabled('stock-service')) {
  903. $stock_open = array_pluck(\Setting::getAllByGroup('stock-service')->toArray(), 'value', 'key');
  904. if ($stock_open['is_open'] == 1) {
  905. $data[] = [
  906. 'name' => 'stock-service',
  907. 'title' => STOCK_SERVICE_NAME,
  908. 'class' => 'icon-member-stock-service',
  909. 'url' => 'stockService',
  910. 'image' => '',
  911. 'mini_url' => '/packageF/stockService/index',
  912. ];
  913. }
  914. }
  915. if (app('plugins')->isEnabled('hotel')) {
  916. $hotel = \Yunshop\Hotel\common\models\Hotel::getHotelByUid($memberId)->first();
  917. if ($hotel) {
  918. $data[] = [
  919. 'name' => 'hotel',
  920. 'title' => HOTEL_NAME . '管理',
  921. 'class' => 'icon-member_hotel',
  922. 'url' => 'HotelManage',
  923. 'image' => 'member_a(56).png',
  924. 'mini_url' => '/packageA/hotel/HotelManage/HotelManage',
  925. ];
  926. }else{
  927. $data[] = [
  928. 'name' => 'hotel',
  929. 'title' => HOTEL_NAME . '申请',
  930. 'class' => 'icon-member-hotel-apply',
  931. 'url' => 'hotelApply',
  932. 'image' => 'member_a(56).png',
  933. 'mini_url' => '/packageA/member/storeApply/storeApply?name=hotelApply',
  934. ];
  935. }
  936. //酒店自定义字段
  937. $set = \Setting::get('plugin.hotel');
  938. $arr['hotel'] = [
  939. 'hotel_home_page' => $set['hotel_home_page'] ?: '酒店主页',
  940. 'check_the_room' => $set['check_the_room'] ?: '查看房型',
  941. 'hotel_intro' => $set['hotel_intro'] ?: '酒店简介',
  942. 'goods_details' => $set['goods_details'] ?: '商品详情',
  943. 'goods_presentation' => $set['goods_presentation'] ?: '商品介绍',
  944. 'goods_parameters' => $set['goods_parameters'] ?: '商品参数',
  945. 'user_evaluation' => $set['user_evaluation'] ?: '用户评价',
  946. 'hotels' => $set['hotels'] ?: '酒店',
  947. 'hotel_first_page' => $set['hotel_first_page'] ?: '酒店首页',
  948. 'hotel_find' => $set['hotel_find'] ?: '查找酒店',
  949. 'hotel_find_name' => $set['hotel_find_name'] ?: '酒店名',
  950. ];
  951. }
  952. //网约车插件开启关闭
  953. if (app('plugins')->isEnabled('net-car')) {
  954. $video_demand_setting = Setting::get('plugin.net_car');
  955. if ($video_demand_setting && $video_demand_setting['net_car_open']) {
  956. $data[] = [
  957. 'name' => 'net_car',
  958. 'title' => '网约车',
  959. 'class' => 'icon-member_my-card',
  960. 'url' => 'online_car',
  961. 'image' => 'member_a(64).png',
  962. 'mini_url' => '',
  963. ];
  964. }
  965. }
  966. //拼团插件开启关闭
  967. if (app('plugins')->isEnabled('fight-groups')) {
  968. $data[] = [
  969. 'name' => 'fight_groups',
  970. 'title' => '我的拼团',
  971. 'class' => 'icon-member_mygroup',
  972. 'url' => 'MyGroups',
  973. 'image' => 'member_a(72).png',
  974. 'mini_url' => '/packageB/member/group/MyGroups/MyGroups',
  975. ];
  976. }
  977. //自提点
  978. if (app('plugins')->isEnabled('package-deliver')) {
  979. $is_package = \Setting::get('plugin.package_deliver.is_package');
  980. $community_group = \Setting::get('plugin.package_deliver.community_group');
  981. if ($is_package) {
  982. $deliver = Deliver::uniacid()->where('uid', $memberId)->first();
  983. if (!$deliver) {
  984. $data[] = [
  985. 'name' => 'package_deliver',
  986. 'title' => \Yunshop\PackageDeliver\service\CustomizeNameService::getName() . '申请',
  987. 'class' => 'icon-member_place_apply',
  988. 'url' => 'SelfCarryApply',
  989. 'image' => 'member_a(77).png',
  990. 'mini_url' => '/packageC/selfCarry/selfCarryApply/selfCarryApply',
  991. ];
  992. } // else if ($community_group)
  993. else {
  994. $data[] = [
  995. 'name' => 'package_deliver',
  996. 'title' => \Yunshop\PackageDeliver\service\CustomizeNameService::getName(),
  997. 'class' => 'icon-fontclass-zitidian',
  998. 'url' => 'communityBuyIndex',
  999. 'image' => 'member_a(130).png',
  1000. 'mini_url' => '/packageE/community_buying/index/index',
  1001. ];
  1002. }
  1003. }
  1004. }
  1005. //发现视频
  1006. if (app('plugins')->isEnabled('video-share')) {
  1007. $set = \Setting::get('plugin.video-share');
  1008. if ($set['is_open']) {
  1009. $data[] = [
  1010. 'name' => 'video-share',
  1011. 'title' => '发现视频',
  1012. 'class' => 'icon-extension_video',
  1013. 'url' => $set['list_style'] == 2 ? 'VideoDetail' : 'VideoList',
  1014. 'image' => 'member_a(73).png',
  1015. 'mini_url' => $set['list_style'] == 2 ? '/packageC/video_goods/VideoDetail/VideoDetail' : '/packageC/video_goods/VideoList/VideoList',
  1016. ];
  1017. }
  1018. }
  1019. //微社区
  1020. if (app('plugins')->isEnabled('micro-communities')) {
  1021. $set = \Setting::get('plugin.micro-communities');
  1022. if ($set && $set['is_open_micro'] == 1) {
  1023. $data[] = [
  1024. 'name' => 'micro-communities',
  1025. 'title' => '微社区',
  1026. 'class' => 'icon-member_community',
  1027. 'url' => 'MicroHome',
  1028. 'image' => 'member_a(174).png',
  1029. 'mini_url' => '/packageC/micro_communities/microIndex/microIndex',
  1030. ];
  1031. }
  1032. }
  1033. //商品挂单
  1034. if (app('plugins')->isEnabled('pending-order')) {
  1035. $set = \Setting::get('plugin.pending_order');
  1036. if ($set['whether_open']) {
  1037. $data[] = [
  1038. 'name' => 'pending_order',
  1039. 'title' => \Yunshop\PendingOrder\services\PendingOrderService::PendingOrderName(),
  1040. 'class' => 'icon-extension_goods_order',
  1041. 'url' => 'EntryVolume',
  1042. 'image' => 'member_a(59).png',
  1043. 'mini_url' => '/packageC/entry_orders/entry_volume/entry_volume',
  1044. ];
  1045. }
  1046. }
  1047. //分期购车
  1048. if (app('plugins')->isEnabled('staging-buy-car')) {
  1049. $set = \Setting::get('plugin.staging_buy_car');
  1050. if ($set['staging_buy_car_open'] != '1') {
  1051. $data[] = ['name' => 'staging_buy_car', 'title' => '分期购车', 'class' => 'icon-member_installment_buycar', 'url' => 'hireCarManage', 'image' => 'member_a(80).png'];
  1052. }
  1053. }
  1054. if (app('plugins')->isEnabled('advert-market')) {
  1055. $data[] = [
  1056. 'name' => 'advert-market',
  1057. 'title' => '广告市场',
  1058. 'class' => 'icon-member_advertise_market',
  1059. 'url' => 'admarketHome',
  1060. 'image' => 'member_a(84).png',
  1061. 'mini_url' => '',
  1062. ];
  1063. }
  1064. //龙存管插件开启
  1065. if (app('plugins')->isEnabled('dragon-deposit')) {
  1066. $data[] = [
  1067. 'name' => 'dragon_deposit',
  1068. 'title' => '龙存管',
  1069. 'class' => 'icon-member_construction_deposit',
  1070. 'url' => 'myWallet',
  1071. 'image' => 'member_a(76).png',
  1072. 'mini_url' => '',
  1073. ];
  1074. }
  1075. if (app('plugins')->isEnabled('bonus-pool')) {
  1076. $pluginName = Setting::get('plugin.bonus_pool')['bonus_pool_name'];
  1077. $data[] = [
  1078. 'name' => 'bonus-pool',
  1079. 'title' => $pluginName ?: '奖金池',
  1080. 'class' => 'icon-member_bonus_pools',
  1081. 'url' => 'Bonus',
  1082. 'image' => 'member_a(81).png',
  1083. 'mini_url' => '',
  1084. ];
  1085. }
  1086. //预约
  1087. if (app('plugins')->isEnabled('appointment')) {
  1088. $data[] = [
  1089. 'name' => 'appointment',
  1090. 'title' => '预约',
  1091. 'class' => 'icon-member_appointment',
  1092. 'url' => 'Appointment',
  1093. 'image' => 'member_a(85).png',
  1094. 'mini_url' => '/packageE/appointment/appointment_index',
  1095. ];
  1096. }
  1097. //门店审核
  1098. if (app('plugins')->isEnabled('store-cashier')) {
  1099. $apply_set = \Setting::get('plugin.store');
  1100. if($apply_set['administrator_review'] == 1){
  1101. $data[] = [
  1102. 'name' => 'store_applyfor',
  1103. 'title' => '门店审核',
  1104. 'class' => 'icon-fontclass-cashier',
  1105. 'url' => 'store_applyfor',
  1106. 'image' => 'member_a(209).png',
  1107. 'mini_url' => '/packageI/store_audit/index/index',
  1108. ];
  1109. }
  1110. }
  1111. //供需发布
  1112. if (app('plugins')->isEnabled('supply-demand')) {
  1113. $pluginName = Setting::get('plugin.supply-demand')['custom_name'];
  1114. $data[] = [
  1115. 'name' => 'supply-demand',
  1116. 'title' => $pluginName ?: '供需信息发布',
  1117. 'class' => 'icon-member_information_release',
  1118. 'url' => 'publish_manage',
  1119. 'image' => 'member_a(90).png',
  1120. 'mini_url' => '',
  1121. ];
  1122. }
  1123. //汇聚支付插件
  1124. if (app('plugins')->isEnabled('converge_pay')) {
  1125. $data[] = [
  1126. 'name' => 'converge_pay',
  1127. 'title' => '汇聚支付',
  1128. 'class' => 'icon-member_quickpay',
  1129. 'url' => 'quickIndex',
  1130. 'image' => 'member_a(95).png',
  1131. 'mini_url' => '/packageD/quickPay/quick_index/quick_index',
  1132. ];
  1133. }
  1134. //电子合同
  1135. if (app('plugins')->isEnabled('yun-sign')) {
  1136. $data[] = [
  1137. 'name' => 'signIndex',
  1138. 'title' => '电子合同',
  1139. 'class' => 'icon-member-cloud-object',
  1140. 'url' => 'signIndex',
  1141. 'image' => 'member_a(93).png',
  1142. 'mini_url' => '/packageH/signPage/signIndex/signIndex',
  1143. ];
  1144. }
  1145. //商城电子合同
  1146. if (app('plugins')->isEnabled('shop-esign')) {
  1147. $data[] = [
  1148. 'name' => 'contractListPlu',
  1149. 'title' => '商城电子合同',
  1150. 'class' => 'icon-member_mycontract',
  1151. 'url' => 'signIndexPlu',
  1152. 'image' => 'member_a(89).png',
  1153. 'mini_url' => '/packageH/signIndexPlu/signIndex/signIndex',
  1154. ];
  1155. }
  1156. //电子签约
  1157. if (app('plugins')->isEnabled('yun-contract-lock')) {
  1158. $data[] = [
  1159. 'name' => 'signContractLock',
  1160. 'title' => '电子签约',
  1161. 'class' => 'icon-member_mycontract',
  1162. 'url' => 'signContractLock',
  1163. 'image' => 'member_a(89).png',
  1164. 'mini_url' => '',
  1165. ];
  1166. }
  1167. //拍卖
  1168. if (app('plugins')->isEnabled('auction')) {
  1169. if (\Setting::get('plugin.auction.is_open_auction') == 1) {
  1170. $auction = AuctioneerModel::where('member_id', $memberId)->first();
  1171. if (!$auction || $auction->type == 0 || $auction->type == 2 || $this->isBackendRoute()) {
  1172. $data[] = [
  1173. 'name' => 'auctionApply',
  1174. 'title' => '拍卖官申请',
  1175. 'class' => 'icon-member_auctionofficer_apply',
  1176. 'url' => 'auctionApply',
  1177. 'image' => 'member_a(96).png',
  1178. 'mini_url' => '/packageD/auction/auction-apply/auction-apply/auction-apply',
  1179. ];
  1180. }
  1181. $data[] = [
  1182. 'name' => 'auction',
  1183. 'title' => '拍卖管理',
  1184. 'class' => 'icon-member_auctionofficer_admin',
  1185. 'url' => 'auctioneer',
  1186. 'image' => 'member_a(97).png',
  1187. 'mini_url' => '/packageD/auction/auctioneer-manage/auctioneer/auctioneer',
  1188. ];
  1189. $data[] = [
  1190. 'name' => 'auction',
  1191. 'title' => '拍卖',
  1192. 'class' => 'icon-member_auctionofficer_index',
  1193. 'url' => 'auctionIndex',
  1194. 'image' => 'member_a(98).png',
  1195. 'info' => 'get',
  1196. 'mini_url' => '/packageD/auction/auction/auction_index/auction_index',
  1197. ];
  1198. }
  1199. }
  1200. if (app('plugins')->isEnabled('together-purchase')) {
  1201. $data[] = [
  1202. 'name' => 'together-purchase',
  1203. 'title' => '我的拼购',
  1204. 'class' => 'icon-member_my_buy',
  1205. 'url' => 'myGroupBuy',
  1206. 'image' => 'member_a(119).png',
  1207. 'mini_url' => '/packageB/member/group_buy/my_group_buy/my_group_buy',
  1208. ];
  1209. $data[] = [
  1210. 'name' => 'together-purchase',
  1211. 'title' => '拼购列表',
  1212. 'class' => 'icon-member_buygroup_orderlist',
  1213. 'url' => 'GroupBuyList',
  1214. 'image' => 'member_a(118).png',
  1215. 'mini_url' => '/packageB/member/group_buy/group_buy_list/group_buy_list',
  1216. // 'info' => 'get'
  1217. ];
  1218. }
  1219. if (app('plugins')->isEnabled('snatch-regiment')) {
  1220. $data[] = [
  1221. 'name' => 'my-snatch-regiment',
  1222. 'title' => '我的抢团',
  1223. 'class' => 'icon-member_mygroupbuy',
  1224. 'url' => 'grab_group_my',
  1225. 'image' => 'member_a(122).png',
  1226. 'mini_url' => '/packageE/grab_group/grab_group_my/grab_group_my',
  1227. ];
  1228. $data[] = [
  1229. 'name' => 'snatch-regiment',
  1230. 'title' => '抢团',
  1231. 'class' => 'icon-member_groupbuy',
  1232. 'url' => 'grab_group_home',
  1233. 'image' => 'member_a(123).png',
  1234. 'mini_url' => '/packageE/grab_group/grab_group_home/grab_group_home',
  1235. ];
  1236. }
  1237. if (app('plugins')->isEnabled('star-spell')) {
  1238. $data[] = [
  1239. 'name' => 'star-spell',
  1240. 'title' => '我的星拼乐',
  1241. 'class' => 'icon-fontclass-xingpinle',
  1242. 'url' => 'starMusicIndex',
  1243. 'image' => 'member_a(133).png',
  1244. 'mini_url' => '/packageH/starMusic/starMusicIndex/starMusicIndex',
  1245. ];
  1246. }
  1247. if (app('plugins')->isEnabled('luck-draw')) {
  1248. $set = \Setting::get('plugin.luck-draw');
  1249. if ($set['is_show'] == 1) {
  1250. $data[] = [
  1251. 'name' => 'luck-draw',
  1252. 'title' => '抽奖活动',
  1253. 'class' => 'icon-fontclass-choujianghuodong',
  1254. 'url' => 'luckyDraw',
  1255. 'image' => 'member_a(138).png',
  1256. 'mini_url' => '/packageH/newDraw/luckyDraw/luckyDraw',
  1257. ];
  1258. }
  1259. }
  1260. if (app('plugins')->isEnabled('new-retail')) {
  1261. $set = \Setting::get('plugin.new-retail');
  1262. $retail_name = empty($set['new_name']) ? "新零售" : $set['new_name'];
  1263. if ($set['is_open_retail'] == 1) {
  1264. $data[] = [
  1265. 'name' => 'new-retail',
  1266. 'title' => $retail_name,
  1267. 'class' => 'icon-fontclass-lingshou',
  1268. 'url' => 'newRetailIndex',
  1269. 'image' => 'member_a(152).png',
  1270. 'mini_url' => '/packageH/newRetail/newRetailIndex/newRetailIndex',
  1271. ];
  1272. }
  1273. }
  1274. //分公司
  1275. if (app('plugins')->isEnabled('subsidiary')) {
  1276. $data[] = [
  1277. 'name' => 'subsidiary',
  1278. 'title' => '分公司管理',
  1279. 'class' => 'icon-member_branch',
  1280. 'url' => 'subsidiary',
  1281. 'image' => 'member_a(101).png',
  1282. 'mini_url' => '/packageA/member/myOrder_v2/myOrder_v2?status=0&orderType=subsidiary',
  1283. ];
  1284. }
  1285. //易加油
  1286. if (app('plugins')->isEnabled('easy-refuel')) {
  1287. $data[] = [
  1288. 'name' => 'easy-refuel',
  1289. 'title' => '易加油',
  1290. 'class' => 'icon-member_ejiayou',
  1291. 'url' => 'easyRefuel',
  1292. 'image' => 'member_a(103).png',
  1293. 'mini_url' => '/packageD/easyRefuel/easyRefuel',
  1294. ];
  1295. }
  1296. if (app('plugins')->isEnabled('activity-apply')) {
  1297. $data[] = [
  1298. 'name' => 'activity-apply',
  1299. 'title' => '活动报名',
  1300. 'class' => 'icon-member_meeting_active',
  1301. 'url' => 'activityHome',
  1302. 'image' => 'member_a(88).png',
  1303. 'mini_url' => '/packageC/Myshaky/activityHome/activityHome',
  1304. ];
  1305. }
  1306. //推广小助手
  1307. if (app('plugins')->isEnabled('promotion-assistant')) {
  1308. $set = \Setting::get('promotion-assistant.data');
  1309. if ($set['is_open'] == 1) {
  1310. $title = empty($set['plugin_name']) ? '推广小助手' : $set['plugin_name'];
  1311. $data[] = [
  1312. 'name' => 'promotion-assistant',
  1313. 'title' => $title,
  1314. 'class' => 'icon-member_promoteassitant',
  1315. 'url' => 'extendHelper',
  1316. 'image' => 'member_a(90).png',
  1317. 'mini_url' => '',
  1318. ];
  1319. }
  1320. }
  1321. //问卷功能
  1322. if (app('plugins')->isEnabled('questionnaire')) {
  1323. $type = request()->get('type');
  1324. if (empty($type) || $type == 1 || $type == 5 || $type == 2) {
  1325. $questionnaire = Setting::get('plugin.questionnaire');
  1326. if ($questionnaire['is_open'] == 1) {
  1327. $pluginName = $questionnaire['title'];
  1328. $data[] = [
  1329. 'name' => 'questionnaire',
  1330. 'title' => $pluginName ?: '问卷分析',
  1331. 'class' => 'icon-member_questionsurvey',
  1332. 'url' => 'questionnaireIndex',
  1333. 'image' => 'member_a(111).png',
  1334. 'mini_url' => '/packageE/questionnaire/questionnaireIndex/questionnaireIndex',
  1335. ];
  1336. }
  1337. }
  1338. }
  1339. //优惠券二维码
  1340. if (app('plugins')->isEnabled('coupon-qr')) {
  1341. $data[] = [
  1342. 'name' => 'coupon-qr',
  1343. 'title' => '优惠券二维码',
  1344. 'class' => 'icon-member_coupons_qrcode',
  1345. 'url' => 'coupons_qrcode',
  1346. 'image' => 'member_a(109).png',
  1347. 'mini_url' => '/packageC/couponList/couponList',
  1348. ];
  1349. }
  1350. if (app('plugins')->isEnabled('elite-award')) {
  1351. $is_open = \Setting::get('plugin.elite_award.is_show');
  1352. if ($is_open == 1) {
  1353. $data[] = [
  1354. 'name' => 'elite-award',
  1355. 'title' => '精英奖',
  1356. 'class' => 'icon-member_elitecenter',
  1357. 'url' => 'eliteAwardHome',
  1358. 'image' => 'member_a(105).png',
  1359. 'mini_url' => '',
  1360. ];
  1361. }
  1362. }
  1363. if (app('plugins')->isEnabled('health-assessment')) {
  1364. $type = request()->get("type");
  1365. if (empty($type) || $type == 2) {
  1366. $health_set = \Setting::get('plugin.health-assessment');
  1367. if ($health_set['is_open_health'] == 1) {
  1368. $health_name = empty($health_set['health_name']) ? "健康测评" : $health_set['health_name'];
  1369. $data[] = [
  1370. 'name' => 'health-assessment',
  1371. 'title' => $health_name,
  1372. 'class' => 'icon-member_healthtest',
  1373. 'url' => 'healthyIndex',
  1374. 'image' => 'member_a(112).png',
  1375. 'mini_url' => '/packageE/healthy/healthyIndex/healthyIndex',
  1376. ];
  1377. }
  1378. }
  1379. }
  1380. //能量舱
  1381. if (app('plugins')->isEnabled('energy-cabin')) {
  1382. $is_package = \Setting::get('plugin.energy_cabin.is_open');
  1383. if ($is_package) {
  1384. $data[] = [
  1385. 'name' => 'energy_cabin',
  1386. 'title' => \Yunshop\EnergyCabin\common\EnergyCabinSet::getName(),
  1387. 'class' => 'icon-member_chamber',
  1388. 'url' => 'memberCard',
  1389. 'image' => 'member_a(106).png',
  1390. 'mini_url' => '/packageE/energy/userCard/userCard',
  1391. ];
  1392. }
  1393. }
  1394. //能量舱经销商
  1395. if (app('plugins')->isEnabled('energy-cabin') && app('plugins')->isEnabled('team-dividend')) {
  1396. $energy_cabin_dealer = \Yunshop\TeamDividend\models\TeamDividendAgencyModel::getAgentByUidId($memberId)->first();
  1397. $is_package = \Setting::get('plugin.energy_cabin.is_open');
  1398. if ($is_package && ($energy_cabin_dealer || $this->isBackendRoute())) {
  1399. $data[] = [
  1400. 'name' => 'energy_cabin_dealer',
  1401. 'title' => \Yunshop\EnergyCabin\common\EnergyCabinSet::getName() . '经销商',
  1402. 'class' => 'icon-member_chamber_dealer',
  1403. 'url' => 'powerSell',
  1404. 'image' => 'member_a(107).png',
  1405. 'mini_url' => '/packageE/energy/powerSell/powerSell',
  1406. ];
  1407. }
  1408. }
  1409. //群活码
  1410. if (app('plugins')->isEnabled('group-code')) {
  1411. $is_open = \Setting::get('plugin.group-code.is_open');
  1412. if ($is_open == 1) {
  1413. $data[] = [
  1414. 'name' => 'group-code',
  1415. 'title' => '群活码',
  1416. 'class' => 'icon-member_group_livecode',
  1417. 'url' => 'groupCode',
  1418. 'image' => 'member_a(110).png',
  1419. 'mini_url' => '/packageE/groupCode/groupCode',
  1420. ];
  1421. }
  1422. }
  1423. //站内消息
  1424. if (app('plugins')->isEnabled('instation-message')) {
  1425. $is_open = \Setting::get('plugin.instation-message.is_open');
  1426. if ($is_open == 1) {
  1427. $data[] = [
  1428. 'name' => 'instation-message',
  1429. 'title' => '消息',
  1430. 'class' => 'icon-member_massage_remind',
  1431. 'url' => 'stationNotice',
  1432. 'image' => 'member_a(115).png',
  1433. 'mini_url' => '/packageE/stationNotice/stationNotice',
  1434. ];
  1435. }
  1436. }
  1437. //云仓
  1438. if (app('plugins')->isEnabled('cloud-warehouse')) {
  1439. $is_open = \Setting::get('plugin.cloud_warehouse.is_open');
  1440. if ($is_open) {
  1441. $data[] = [
  1442. 'name' => 'cloud_warehouse',
  1443. 'title' => '云仓',
  1444. 'class' => 'icon-fontclass-yuncang',
  1445. 'url' => 'cloudIndex',
  1446. 'image' => 'member_a(125).png',
  1447. 'mini_url' => '',
  1448. ];
  1449. }
  1450. }
  1451. //圈仓G
  1452. if (app('plugins')->isEnabled('warehouse')) {
  1453. $warehouse_open = \Setting::get('warehouse.is_open');
  1454. if ($warehouse_open == 1) {
  1455. $data[] = [
  1456. 'name' => 'warehouse',
  1457. 'title' => '圈仓',
  1458. 'class' => 'icon-member_warehouse',
  1459. 'url' => 'warehouseFarmInventory',
  1460. 'image' => 'member_a(178).png',
  1461. 'mini_url' => '/packageI/warehouseFarm/warehouseFarmInventory/warehouseFarmInventory',
  1462. ];
  1463. }
  1464. }
  1465. if (app('plugins')->isEnabled('commission-statistics')) {
  1466. $isAgent = Agents::getAgentByUidId($memberId)->first();
  1467. if ($isAgent || \YunShop::isWeb()) {
  1468. $data[] = [
  1469. 'name' => 'TeamDistributions',
  1470. 'title' => '团队分销',
  1471. 'class' => 'icon-fontclass-tuanduifenxiaoshang',
  1472. 'url' => 'TeamDistribution',
  1473. 'image' => 'member_a(126).png',
  1474. 'mini_url' => '/packageE/TeamDistribution/TeamDistribution',
  1475. ];
  1476. }
  1477. }
  1478. //AI智能测肤
  1479. if (app('plugins')->isEnabled('skin-check')) {
  1480. $is_open = \Yunshop\SkinCheck\service\SetService::getPluginStatus();
  1481. if ($is_open) {
  1482. $data[] = [
  1483. 'name' => 'skin-check',
  1484. 'title' => \Yunshop\SkinCheck\service\SetService::getCustomizeName(),
  1485. 'class' => 'icon-fontclass-cefu',
  1486. 'url' => 'skinHome',
  1487. 'mini_url' => '/packageE/others/skin/skin',
  1488. 'image' => 'member_a(129).png',
  1489. ];
  1490. }
  1491. }
  1492. if (app('plugins')->isEnabled('product-market')) {
  1493. $data[] = [
  1494. 'name' => 'applicationMarket',
  1495. 'title' => '应用市场',
  1496. 'class' => 'icon-fontclass-yiingyongguanli',
  1497. 'url' => 'applicationMarket',
  1498. 'mini_url' => '/packageE/others/application_market/application_market',
  1499. 'image' => 'member_a(131).png',
  1500. ];
  1501. }
  1502. if (app('plugins')->isEnabled('market-sub')) {
  1503. $data[] = [
  1504. 'name' => 'marketSub',
  1505. 'title' => '应用市场',
  1506. 'class' => 'icon-fontclass-yiingyongguanli',
  1507. 'url' => 'marketSub',
  1508. 'mini_url' => '/packageE/others/application_market/application_market?marketSub=1',
  1509. 'image' => 'member_a(131).png',
  1510. ];
  1511. }
  1512. //提货卡
  1513. if (app('plugins')->isEnabled('picking-card')) {
  1514. $settings = Setting::get("card_setting");
  1515. if ($settings["switch"] == 1) {
  1516. $data[] = [
  1517. 'name' => 'pickUpCardOrderList',
  1518. 'title' => '旅游卡',
  1519. 'class' => 'icon-fontclass-tihuoka',
  1520. 'url' => 'pickUpCardOrderList',
  1521. 'mini_url' => '/packageA/member/pick_up_card_order/pick_up_card_order',
  1522. 'image' => 'member_a(127).png',
  1523. ];
  1524. }
  1525. }
  1526. //提货卡
  1527. if (app('plugins')->isEnabled('picking-card-one')) {
  1528. $settings = Setting::get("card_one_setting");
  1529. if ($settings["switch"] == 1) {
  1530. $data[] = [
  1531. 'name' => 'pickUpCardOrderListOne',
  1532. 'title' => '提货卡',
  1533. 'class' => 'icon-fontclass-tihuoka',
  1534. 'url' => 'pickUpCardOrderListOne',
  1535. 'mini_url' => '/packageA/member/pick_up_card_order/pick_up_card_order?plugin=one',
  1536. 'image' => 'member_a(127).png',
  1537. ];
  1538. }
  1539. }
  1540. //下级足迹
  1541. if (app('plugins')->isEnabled('lower-footprint')) {
  1542. $is_open = \Yunshop\LowerFootprint\services\SetService::getPluginStatus();
  1543. if ($is_open) {
  1544. $data[] = [
  1545. 'name' => 'lower-footprint',
  1546. 'title' => '下级足迹',
  1547. 'class' => 'icon-fontclass-xiajizuji',
  1548. 'url' => 'footprintMember',
  1549. 'image' => 'member_a(142).png',
  1550. ];
  1551. }
  1552. }
  1553. if (app('plugins')->isEnabled('case-library')) {
  1554. $data[] = [
  1555. 'name' => 'case-library',
  1556. 'title' => \Yunshop\CaseLibrary\service\SetService::getCustomizeName(),
  1557. 'class' => 'icon-fontclass-anliku',
  1558. 'url' => 'caseLibraryHome',
  1559. 'mini_url' => '/packageE/others/case_library/home/caseLibraryHome',
  1560. 'image' => 'member_a(132).png',
  1561. ];
  1562. }
  1563. //推广员视频答题
  1564. if (app('plugins')->isEnabled('agent-qa')) {
  1565. $set = \Setting::get('plugin.agent_qa');
  1566. if ($set['is_open']) {
  1567. $data[] = [
  1568. 'name' => 'agent_qa',
  1569. 'title' => $set['name'] != '' ? $set['name'] : "推广员视频&答题",
  1570. 'class' => 'icon-fontclass-shipindati',
  1571. 'url' => 'videoQuestion',
  1572. 'image' => 'member_a(133).png',
  1573. 'mini_url' => '/packageE/video_question/video_question',
  1574. ];
  1575. }
  1576. }
  1577. //全国油站
  1578. if (app('plugins')->isEnabled('oil-station')) {
  1579. $oil_setting = \Setting::get('plugin.oil_station');
  1580. if ($oil_setting['open_state']) {
  1581. $data[] = [
  1582. 'name' => 'oil_station',
  1583. 'title' => '全国油站',
  1584. 'class' => 'icon-fontclass-quanguojiayou',
  1585. 'url' => 'oilStation',
  1586. 'image' => 'member_a(151).png',
  1587. 'mini_url' => '',
  1588. ];
  1589. }
  1590. }
  1591. //圈子
  1592. if (app('plugins')->isEnabled('circle')) {
  1593. $circle_set = \Setting::get('circle.data');
  1594. $data[] = [
  1595. 'name' => 'circle',
  1596. 'title' => empty($circle_set['plugin_name']) ? '圈子' : $circle_set['plugin_name'],
  1597. 'class' => 'icon-fontclass-quanzi2',
  1598. 'url' => 'circleIndex',
  1599. 'image' => 'extension(81).png',
  1600. 'mini_url' => '/packageH/circleCommunity/circleIndex/circleIndex',
  1601. ];
  1602. }
  1603. //分润系统会员同步
  1604. if (app('plugins')->isEnabled('member-synchron')) {
  1605. $data[] = [
  1606. 'name' => 'member-synchron',
  1607. 'title' => '合伙人分润',
  1608. 'class' => 'icon-member_shareProfit',
  1609. 'url' => 'shareProfit',
  1610. 'image' => 'member_a(188).png',
  1611. 'mini_url' => '/packageH/shareProfit/shareProfit',
  1612. ];
  1613. }
  1614. //上门安装
  1615. if (app('plugins')->isEnabled('live-install')) {
  1616. $another_name = \Yunshop\LiveInstall\services\SettingService::getAnotherName();
  1617. $data[] = [
  1618. 'name' => 'live_install',
  1619. 'title' => $another_name['plugin_name'],
  1620. 'class' => 'icon-fontclass-anzhuangfuwuhy',
  1621. 'url' => 'installationSeverMemberHome',
  1622. 'image' => 'member_a(144).png',
  1623. 'mini_url' => '/packageH/installationSever/installationSeverMemberHome/installationSeverMemberHome',
  1624. ];
  1625. $live_install_worker_data = [
  1626. 'name' => 'live_install_worker',
  1627. 'title' => $another_name['worker_name'] . '申请',
  1628. 'class' => 'icon-fontclass-anzhuangshifu1',
  1629. 'url' => 'installationSeverApply',
  1630. 'image' => 'member_a(145).png',
  1631. 'mini_url' => '/packageH/installationSever/installationSeverApply/installationSeverApply',
  1632. ];
  1633. if (\Yunshop\LiveInstall\services\SettingService::checkIsWorker()) {
  1634. $live_install_worker_data['class'] = 'icon-fontclass-anzhuangshifu1';
  1635. $live_install_worker_data['title'] = $another_name['worker_name'];
  1636. $live_install_worker_data['url'] = 'installationSeverHome';
  1637. $live_install_worker_data['image'] = 'member_a(145).png';
  1638. $live_install_worker_data['mini_url'] = '/packageH/installationSever/installationSeverHome/installationSeverHome';
  1639. }
  1640. $data[] = $live_install_worker_data;
  1641. }
  1642. if (app('plugins')->isEnabled('parking-pay') && \Yunshop\ParkingPay\services\SettingService::getSetting()['open_state']) {
  1643. $data[] = [
  1644. 'name' => 'parking-pay',
  1645. 'title' => '停车缴费',
  1646. 'class' => 'icon-member-parking-pay',
  1647. 'url' => '',
  1648. 'image' => 'member_a(186).png',
  1649. 'mini_url' => '/packageI/parkCouponFree/index/index',
  1650. ];
  1651. }
  1652. if (app('plugins')->isEnabled('debt-shop')) {
  1653. $data[] = [
  1654. 'name' => 'debt-shop',
  1655. 'title' => '置换亿栈',
  1656. 'class' => 'icon-fontclass-debt',
  1657. 'url' => 'debtindex',
  1658. 'image' => 'member_a(189).png',
  1659. 'mini_url' => '/packageF/debt/debtindex/debtindex',
  1660. ];
  1661. }
  1662. if (app('plugins')->isEnabled('worker-withdraw') && \Yunshop\WorkerWithdraw\services\SettingService::usable()) {
  1663. $data[] = [
  1664. 'name' => 'WorkerWithdraw',
  1665. 'title' => '好灵工提现',
  1666. 'class' => 'icon-member_worker_withdraw',
  1667. 'url' => 'WorkerWithdrawType',
  1668. 'image' => 'member_a(193).png',
  1669. 'mini_url' => '/packageI/worker/type/type',
  1670. ];
  1671. }
  1672. if (app('plugins')->isEnabled('coupon-store')
  1673. && \Yunshop\CouponStore\services\SettingService::is_open()
  1674. && SettingService::getSetting()['page_status']['store_apply']
  1675. ) {
  1676. $data[] = [
  1677. 'name' => 'CouponStoreApply',
  1678. 'title' => '商户申请',
  1679. // 'title' => (defined('COUPON_STORE_PLUGIN_NAME') ? COUPON_STORE_PLUGIN_NAME : '消费券联盟').'商户申请',
  1680. 'class' => 'icon-merchants-apply',
  1681. 'url' => 'merchantsIn',
  1682. 'image' => 'member_a(197).png',
  1683. 'mini_url' => '/packageF/consumption/merchantsIn/merchantsIn',
  1684. ];
  1685. }
  1686. if (app('plugins')->isEnabled('eplus-pay')
  1687. && \Yunshop\EplusPay\services\SettingService::usable()
  1688. ) {
  1689. $data[] = [
  1690. 'name' => 'eplus-pay',
  1691. 'title' => '智E+',
  1692. 'class' => 'icon-fontclass_eplus-pay',
  1693. 'url' => 'SilverBankList/wisdom',
  1694. 'image' => 'member_a(202).png',
  1695. 'mini_url' => '/packageF/silverPointPay/SilverBankList/SilverBankList?option=wisdom',
  1696. ];
  1697. }
  1698. if (app('plugins')->isEnabled('coupon-store')
  1699. && \Yunshop\CouponStore\services\SettingService::is_open()
  1700. && (\Yunshop\CouponStore\services\SettingService::isStoreManager(\YunShop::app()->getMemberId()) || !\YunShop::isApi() || (strpos(request()->route, 'plugin.decorate.admin') !== false))
  1701. && SettingService::getSetting()['page_status']['store_manage']
  1702. ) {
  1703. $data[] = [
  1704. 'name' => 'CouponStoreManage',
  1705. 'title' => '商户助手',
  1706. // 'title' => (defined('COUPON_STORE_PLUGIN_NAME') ? COUPON_STORE_PLUGIN_NAME : '消费券联盟').'商户助手',
  1707. 'class' => 'icon-business-assistant',
  1708. 'url' => 'business',
  1709. 'image' => 'member_a(198).png',
  1710. 'mini_url' => '/packageF/consumption/business/business',
  1711. ];
  1712. }
  1713. if (app('plugins')->isEnabled('flyers-advertise')) {
  1714. $setting = \Yunshop\FlyersAdvertise\services\SettingService::getMiniSetting();
  1715. if ($setting['open_state']) {
  1716. $data[] = [
  1717. 'name' => 'flyers_advertise',
  1718. 'title' => '广告任务',
  1719. 'class' => 'icon-flyers-advertise',
  1720. 'url' => '',
  1721. 'image' => 'member_a(182).png',
  1722. 'mini_url' => '/packageI/AdBright/AdBrightIndex/AdBrightIndex',
  1723. ];
  1724. }
  1725. }
  1726. if (app('plugins')->isEnabled('team-analysis') && app('plugins')->isEnabled('team-dividend') && \Yunshop\TeamAnalysis\services\SettingService::getSetting()['open_state']) {
  1727. $team_agent = TeamDividendAgencyModel::uniacid()->where('uid', \YunShop::app()->getMemberId())->first();
  1728. if ($team_agent || !\YunShop::app()->getMemberId() || $this->isBackendRoute()) {
  1729. $data[] = [
  1730. 'name' => 'team_analysis',
  1731. 'title' => '好物官市场中心',
  1732. 'class' => 'icon-team-analysis',
  1733. 'url' => '',
  1734. 'image' => 'member_a(196).png',
  1735. 'mini_url' => '/packageF/stats/stats',
  1736. ];
  1737. }
  1738. }
  1739. // 云库存
  1740. if (app('plugins')->isEnabled('agency')) {
  1741. $set = \Setting::get('plugin.agency');
  1742. if ($set['enabled']) {
  1743. $data[] = [
  1744. 'name' => 'agency',
  1745. 'title' => "云库存",
  1746. 'class' => 'icon-fontclass-yunkucun',
  1747. 'url' => 'StockIndex',
  1748. 'image' => 'member_a(140).png',
  1749. 'mini_url' => '/packageH/stock/index/index',
  1750. ];
  1751. }
  1752. }
  1753. //聚合CPS-卡券
  1754. if (app('plugins')->isEnabled('aggregation-cps')) {
  1755. if (!EquityGoodsSkuModel::get()->isEmpty()) {
  1756. $data[] = [
  1757. 'name' => 'aggregation-cps',
  1758. 'title' => '卡券',
  1759. 'class' => 'icon-fontclass-huiyuankaquanrukou',
  1760. 'url' => 'cpsCard',
  1761. 'image' => 'member_a(143).png',
  1762. 'mini_url' => '/packageH/cpsCard/cpsCard',
  1763. ];
  1764. }
  1765. }
  1766. //推客排行榜
  1767. if (app('plugins')->isEnabled('commission-ranking') && \YunShop::request()->type == 2) {
  1768. $data[] = [
  1769. 'name' => 'commission-ranking',
  1770. 'title' => \Setting::get('plugin.commission_ranking.plugin_name') ?: '推客排行榜',
  1771. 'class' => 'icon-fontclass-paihang',
  1772. 'url' => '',
  1773. 'image' => 'member_a(144).png',
  1774. 'mini_url' => '/packageE/ranking_2/index/index',
  1775. ];
  1776. }
  1777. //盲盒
  1778. if (app('plugins')->isEnabled('blind-box')) {
  1779. $is_open = \Yunshop\BlindBox\service\SetService::getPluginStatus();
  1780. if ($is_open) {
  1781. $data[] = [
  1782. 'name' => 'blind-box',
  1783. 'title' => '盲盒',
  1784. 'class' => 'icon-fontclass-manghe',
  1785. 'url' => 'blindBoxIndex',
  1786. 'mini_url' => '/packageH/blindBox/blindBoxIndex/blindBoxIndex',
  1787. 'image' => 'member_a(139).png',
  1788. ];
  1789. }
  1790. }
  1791. //一校一企
  1792. if (app('plugins')->isEnabled('school-company')) {
  1793. $schoolSetting = \Yunshop\SchoolCompany\services\CommonService::getSet();
  1794. if ($schoolSetting['switch']) {
  1795. $data[] = [
  1796. 'name' => 'school-company',
  1797. 'title' => '一校一企',
  1798. 'class' => 'icon-fontclass-yixiaoyiqi',
  1799. 'url' => '',
  1800. 'mini_url' => '/packageH/schoolCompany/schoolCompanyIndex/schoolCompanyIndex',
  1801. 'image' => 'member_a(150).png',
  1802. ];
  1803. }
  1804. }
  1805. //期刊杂志
  1806. if (app('plugins')->isEnabled('journal')) {
  1807. $is_open = \Yunshop\Journal\services\SetConfigService::getSetConfig('is_open');
  1808. if ($is_open) {
  1809. $data[] = [
  1810. 'name' => 'journal',
  1811. 'title' => '期刊杂志',
  1812. 'class' => 'icon-fontclass-waikan',
  1813. 'url' => 'periodicalIndex',
  1814. 'mini_url' => '/packageH/article/periodicalIndex/periodicalIndex',
  1815. 'image' => 'member_a(153).png',
  1816. ];
  1817. }
  1818. }
  1819. //消费奖励
  1820. if (app('plugins')->isEnabled('consumer-reward')) {
  1821. $set = \Setting::get('plugin.consumer_reward');
  1822. if ($set['is_display']) {
  1823. $data[] = [
  1824. 'name' => 'consumer-reward',
  1825. 'title' => $set['name'] ?: '消费奖励',
  1826. 'class' => 'icon-fontclass-xiaofeijiangli',
  1827. 'url' => 'consumerRewardIndex',
  1828. 'mini_url' => '/packageH/consumerReward/consumerRewardIndex/consumerRewardIndex',
  1829. 'image' => 'member_a(153).png',
  1830. ];
  1831. }
  1832. }
  1833. //车场
  1834. if (app('plugins')->isEnabled('kart')) {
  1835. $data[] = [
  1836. 'name' => 'kart',
  1837. 'title' => '车场计时',
  1838. 'class' => 'icon-fontclass-cehchang',
  1839. 'url' => '',
  1840. 'mini_url' => '/packageH/turmaroundTime/turmaroundMy/turmaroundMy',
  1841. 'image' => 'image member_a(157).png',
  1842. ];
  1843. }
  1844. //客服
  1845. if (app('plugins')->isEnabled('yun-chat')) {
  1846. $data[] = [
  1847. 'name' => 'kefu',
  1848. 'title' => '客服',
  1849. 'class' => 'icon-member_kefu',
  1850. 'url' => 'chatList',
  1851. 'mini_url' => '/packageH/chitchat/chatList/chatList',
  1852. 'image' => 'tool_a(11).png',
  1853. ];
  1854. }
  1855. //航班信息收集
  1856. if (app('plugins')->isEnabled('flight-collect')) {
  1857. $flight_switch = \Setting::get('plugin.flight-collect.switch');
  1858. if ($flight_switch) {
  1859. $data[] = [
  1860. 'name' => 'flight-collect',
  1861. 'title' => '航班信息',
  1862. 'class' => 'icon-fontclass-hangbanxinxi',
  1863. 'url' => 'flightInformation',
  1864. 'mini_url' => '/packageH/flightInformation/flightInformation',
  1865. 'image' => 'member_a(156).png',
  1866. ];
  1867. }
  1868. }
  1869. //店商联盟
  1870. if (app('plugins')->isEnabled('store-business-alliance')) {
  1871. $is_open = \Setting::get('plugin.store-business-alliance.is_open');
  1872. if ($is_open) {
  1873. $data[] = [
  1874. 'name' => 'store-business-alliance',
  1875. 'title' => '店商联盟',
  1876. 'class' => 'icon-fontclass-dianshanglianmeng',
  1877. 'url' => 'leagueStoreIndex',
  1878. 'mini_url' => '',
  1879. 'image' => 'member_a(154).png',
  1880. ];
  1881. }
  1882. }
  1883. //群拓客
  1884. if (app('plugins')->isEnabled('group-develop-user')) {
  1885. $data[] = [
  1886. 'name' => 'group-develop-user',
  1887. 'title' => '群拓客',
  1888. 'class' => 'icon-fontclass-quntuoke',
  1889. 'url' => 'gduIndex',
  1890. 'image' => 'member_a(158).png',
  1891. 'mini_url' => '',
  1892. ];
  1893. }
  1894. //珍惠拼
  1895. if (app('plugins')->isEnabled('zhp-group-lottery')) {
  1896. $setting = \Yunshop\ZhpGroupLottery\models\ZhpSettingModel::getAll();
  1897. if ($setting['is_open'] == 1) {
  1898. $data[] = [
  1899. 'name' => 'zhp-group-lottery',
  1900. 'title' => '珍惠拼',
  1901. 'class' => 'icon-fontclass-huizhenpin',
  1902. 'url' => 'zhpGroupList',
  1903. 'image' => 'member_a(160).png',
  1904. 'mini_url' => '/packageB/member/group/GroupList/GroupList?types=zhpGroup',
  1905. ];
  1906. }
  1907. }
  1908. //新媒体
  1909. if (app('plugins')->isEnabled('new-media-advertising')) {
  1910. $is_open = \Setting::get('new_media_advertising.data.is_open');
  1911. if ($is_open) {
  1912. $data[] = [
  1913. 'name' => 'new-media-advertising',
  1914. 'title' => '新媒体',
  1915. 'class' => 'icon-member-newMedia',
  1916. 'url' => 'newMediaGuide',
  1917. 'image' => 'member_a(171).png',
  1918. 'mini_url' => '/packageI/newMedia/newMediaGuide/newMediaGuide',
  1919. ];
  1920. }
  1921. }
  1922. if (app('plugins')->isEnabled('yee-pay')) {
  1923. $is_open = \Yunshop\YeePay\services\SetService::getStatus();
  1924. if ($is_open) {
  1925. $data[] = [
  1926. 'name' => 'yee-pay',
  1927. 'title' => '易宝代付签约',
  1928. 'class' => 'icon-fontclass-yibaodaifu',
  1929. 'url' => 'YeePay',
  1930. 'image' => 'member_a(161).png',
  1931. 'mini_url' => '',
  1932. ];
  1933. }
  1934. }
  1935. //投放广告视频
  1936. if (app('plugins')->isEnabled('ad-serving')) {
  1937. $advertiser = \Yunshop\AdServing\models\AdServingAdvertisersModel::getAdvertisersByMemberId($memberId);
  1938. $is_open = \Yunshop\AdServing\services\SetConfigService::getSetConfig('is_open');
  1939. if ($is_open) {
  1940. if (!$advertiser) {
  1941. $data[] = [
  1942. 'name' => 'ad-serving',
  1943. 'title' => '广告主申请',
  1944. 'class' => 'icon-fontclass-guanggaozhushenqing',
  1945. 'url' => 'advertisingApply',
  1946. 'image' => 'member_a(163).png',
  1947. 'mini_url' => '/packageH/Advertising/advertisingApply/advertisingApply',
  1948. ];
  1949. } else {
  1950. $data[] = [
  1951. 'name' => 'ad-serving',
  1952. 'title' => '广告主',
  1953. 'class' => 'icon-fontclass-guanggaozhu',
  1954. 'url' => 'advertisingAdvertisers',
  1955. 'image' => 'member_a(164).png',
  1956. 'mini_url' => '/packageH/Advertising/advertisingAdvertisers/advertisingAdvertisers',
  1957. ];
  1958. }
  1959. }
  1960. }
  1961. //商品免单
  1962. if (app('plugins')->isEnabled('free-lottery')) {
  1963. $is_open = \Yunshop\FreeLottery\services\FreeLotteryService::config('open');
  1964. if ($is_open) {
  1965. $data[] = [
  1966. 'name' => 'free-lottery',
  1967. 'title' => \Yunshop\FreeLottery\services\FreeLotteryService::name(),
  1968. 'class' => 'icon-fontclass-miandan',
  1969. 'url' => 'FreeRecord',
  1970. 'image' => 'member_a(165).png',
  1971. 'mini_url' => '/packageH/free_of_charge/FreeRecord/FreeRecord',
  1972. ];
  1973. }
  1974. }
  1975. //多门店核销
  1976. if (app('plugins')->isEnabled('store-projects')) {
  1977. $langService = new \Yunshop\StoreProjects\common\services\LangService;
  1978. $data[] = [
  1979. 'name' => 'StoreVerification',
  1980. 'title' => '我的' . $langService->getLangSetting()['project'],
  1981. 'class' => 'icon-fontclass-mendianhexiao',
  1982. 'url' => 'StoreVerification',
  1983. 'image' => 'member_a(162).png',
  1984. 'mini_url' => '/packageH/project_verification/StoreVerification/StoreVerification',
  1985. ];
  1986. }
  1987. //满额赠送
  1988. if (app('plugins')->isEnabled('full-return')) {
  1989. $is_open = \Setting::get('plugin.full-return');
  1990. if ($is_open['is_open_return'] && !empty($is_open['is_show_total'])) {
  1991. $data[] = [
  1992. 'name' => 'full-return',
  1993. 'title' => \Yunshop\FullReturn\admin\SetController::getSet()['full_return_name'] ?: '满额赠送',
  1994. 'class' => 'icon-fontclass-miandan',
  1995. 'url' => 'interestsGive',
  1996. 'image' => 'member_a(170).png',
  1997. 'mini_url' => '/packageH/interests_give/interests_give',
  1998. ];
  1999. }
  2000. }
  2001. //0.1元拼团
  2002. if (app('plugins')->isEnabled('group-work')) {
  2003. $is_open = \Setting::get('plugin.group_work');
  2004. if ($is_open['plugin_switch'] == 1) {
  2005. $data[] = [
  2006. 'name' => 'group-work',
  2007. 'title' => $is_open['plugin_name'] ? $is_open['plugin_name'] : '0.1元拼',
  2008. 'class' => 'icon-member_groupWork',
  2009. 'url' => 'groupWorkMy',
  2010. 'image' => 'member_a(172).png',
  2011. 'mini_url' => '/packageI/groupWork/groupWorkMy/groupWorkMy',
  2012. ];
  2013. }
  2014. }
  2015. //捐赠项目
  2016. if (app('plugins')->isEnabled('present-project')) {
  2017. $is_open = \Setting::get('plugin.present_project');
  2018. if (!isset($is_open['is_open']) || $is_open['is_open']) {
  2019. $data[] = [
  2020. 'name' => 'present-project',
  2021. 'title' => '捐赠项目',
  2022. 'class' => 'icon-member_donationProject',
  2023. 'url' => 'donationProjectIndex',
  2024. 'image' => 'member_a(175).png',
  2025. 'mini_url' => '/packageI/donation_project/donationProjectIndex/donationProjectIndex',
  2026. ];
  2027. }
  2028. }
  2029. //店铺助手
  2030. if (app('plugins')->isEnabled('shop-assistant')) {
  2031. if (\Yunshop\ShopAssistant\services\SetService::pluginIsOpen()) {
  2032. if (\Yunshop\ShopAssistant\services\CommonService::checkoutAuth($memberId) || $memberId === 0 || $this->isBackendRoute()) {
  2033. $data[] = [
  2034. 'name' => 'shop-assistant',
  2035. 'title' => '店铺助手',
  2036. 'class' => 'icon-member-storeManage',
  2037. 'url' => 'storeManagementIndex',
  2038. 'image' => 'member_a(179).png',
  2039. 'mini_url' => '/packageF/storeManagement/storeManagementIndex/storeManagementIndex',
  2040. ];
  2041. }
  2042. }
  2043. }
  2044. //优量汇广告
  2045. if (app('plugins')->isEnabled('qq-advertise')) {
  2046. $is_open = \Setting::get('plugin.qq-advertise');
  2047. if (!isset($is_open['open']) || $is_open['open']) {
  2048. $member_advertise = MemberShopInfo::where('member_id', \Yunshop::app()->getMemberId())->value('access_token_2');
  2049. if (!$member_advertise) {
  2050. $member_advertise = Client::create_token('yz');
  2051. MemberShopInfo::where('member_id', \Yunshop::app()->getMemberId())->update(['access_token_2' => $member_advertise]);
  2052. }
  2053. $data[] = [
  2054. 'name' => 'qq-advertise',
  2055. 'title' => '广告电商',
  2056. 'member_token' => $member_advertise,
  2057. 'class' => 'icon-member_qq-advertise',
  2058. 'url' => 'qq-advertise',
  2059. 'image' => 'member_a(177).png',
  2060. 'mini_url' => '',
  2061. ];
  2062. }
  2063. }
  2064. //平台配送(司机)
  2065. if (app('plugins')->isEnabled('supplier-driver-distribution')) {
  2066. $is_open = \Yunshop\SupplierDriverDistribution\models\ConfigModel::getConfig('is_open');
  2067. $is_driver = \Yunshop\SupplierDriverDistribution\models\DriverModel::uniacid()->selectRaw('1')->where('member_id', \YunShop::app()->getMemberId())->where('status', 1)->first();
  2068. if (($is_driver || $this->isBackendRoute()) && $is_open) {
  2069. $data[] = [
  2070. 'name' => 'supplier-driver-distribution',
  2071. 'title' => '配送入口',
  2072. 'class' => 'icon-fontclass_supplierDist',
  2073. 'url' => 'distributionEntrance',
  2074. 'image' => 'member_a(176).png',
  2075. 'mini_url' => '/packageG/supplierDist/distributionEntrance/distributionEntrance',
  2076. ];
  2077. }
  2078. }
  2079. //存货订单
  2080. if (app('plugins')->isEnabled('order-inventory')) {
  2081. $is_open = \Yunshop\OrderInventory\services\SetService::pluginIsOpen();
  2082. if ($is_open) {
  2083. $data[] = [
  2084. 'name' => 'order-inventory',
  2085. 'title' => '存货订单',
  2086. 'class' => 'icon-fontclassStock',
  2087. 'url' => 'stockorderList/stock',
  2088. 'image' => 'member_a(184).png',
  2089. 'mini_url' => '/packageA/member/myOrder_v2/myOrder_v2?orderType=stock',
  2090. ];
  2091. }
  2092. }
  2093. //自定义表单核销
  2094. if (app('plugins')->isEnabled('diy-form-prove')) {
  2095. $is_open = \Setting::get('plugin.diy_form_prove.is_open');
  2096. if ($is_open) {
  2097. $data[] = [
  2098. 'name' => 'diy-form-prove',
  2099. 'title' => '表单核销',
  2100. 'class' => 'icon-member_diyRormProve',
  2101. 'url' => 'diyRormProveIndex',
  2102. 'image' => 'member_a(180).png',
  2103. 'mini_url' => '/packageI/diyRormProve/diyRormProveIndex/diyRormProveIndex',
  2104. ];
  2105. }
  2106. }
  2107. // 发票
  2108. if (app('plugins')->isEnabled('invoice')) {
  2109. $is_open = \Setting::get('plugin.invoice.is_open');
  2110. if ($is_open) {
  2111. $data[] = [
  2112. 'name' => 'invoiceCenter',
  2113. 'title' => '发票中心',
  2114. 'class' => 'icon-member-invoice',
  2115. 'url' => 'invoiceCenter',
  2116. 'image' => 'member_a(183).png',
  2117. 'mini_url' => '/packageI/invoice/invoiceCenter/invoiceCenter',
  2118. ];
  2119. }
  2120. }
  2121. //分时预约
  2122. if (app('plugins')->isEnabled('reserve-simple')) {
  2123. $data[] = [
  2124. 'name' => 'reserve-simple',
  2125. 'title' => '分时预约',
  2126. 'class' => 'icon-fontclass_timeApp',
  2127. 'url' => 'timeAppointmentMy',
  2128. 'image' => 'member_a(187).png',
  2129. 'mini_url' => '/packageF/timeAppointment/timeAppointmentMy/timeAppointmentMy',
  2130. ];
  2131. }
  2132. //公益基金
  2133. if (app('plugins')->isEnabled('public-fund')) {
  2134. $data[] = [
  2135. 'name' => 'publicWelfare',
  2136. 'title' => '爱心公益',
  2137. 'class' => 'icon-public-fund',
  2138. 'url' => 'publicWelfare',
  2139. 'image' => 'extension(111).png',
  2140. 'mini_url' => '/packageI/public_welfare_fund/publicWelfare/publicWelfare',
  2141. ];
  2142. }
  2143. // 加速池钱包
  2144. if (app('plugins')->isEnabled('love-speed-pool')) {
  2145. $walletSetting = Setting::get('plugin.love_speed_pool_wallet');
  2146. if ($walletSetting['member_entrance'] == 1) {
  2147. $walletDiyName = $walletSetting['member_entrance_name'] ?: "钱包";
  2148. $data[] = [
  2149. 'name' => 'love-speed-pool-wallet',
  2150. 'title' => $walletDiyName,
  2151. 'class' => 'icon-fontclass-Throughpay',
  2152. 'url' => 'Throughpay',
  2153. 'image' => "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(190).png",
  2154. 'mini_url' => '/packageF/Throughpay/Throughpay',
  2155. ];
  2156. }
  2157. $poolSetting = Setting::get('plugin.love_speed_pool');
  2158. $capitalDiyName = $poolSetting['diy_capital_name'] ?: "资金池";
  2159. $data[] = [
  2160. 'name' => 'love-speed-pool-center',
  2161. 'title' => $capitalDiyName,
  2162. 'class' => 'icon-member-capital',
  2163. 'url' => 'price_pool',
  2164. 'image' => "extension(191).png",
  2165. 'mini_url' => '/packageA/member/price_pool/price_pool',
  2166. ];
  2167. // love-speed-pool-statistic
  2168. $data[] = [
  2169. 'name' => 'love-speed-pool-statistic',
  2170. 'title' => '数据统计',
  2171. 'class' => 'icon-member-zzy',
  2172. 'url' => 'dataStatistics',
  2173. 'image' => "extension(191).png",
  2174. 'mini_url' => '/packageF/data_statistics/data_statistics',
  2175. ];
  2176. }
  2177. //新拼团(ywm)
  2178. if (app('plugins')->isEnabled('ywm-fight-groups')) {
  2179. $data[] = [
  2180. 'name' => 'ywmFightGroups',
  2181. 'title' => '超级拼团',
  2182. 'class' => 'icon-ywm-fight-groups',
  2183. 'url' => 'ywmGroupsMyGroups',
  2184. 'image' => 'member_a(192).png',
  2185. 'mini_url' => '/packageB/member/group/ywmGroupsMyGroups/ywmGroupsMyGroups',
  2186. ];
  2187. }
  2188. // 律师平台
  2189. if (app('plugins')->isEnabled('lawyer-platform')) {
  2190. $lawyer_set = LawyerSet::uniacid()->first();
  2191. if (!$lawyer_set || $lawyer_set['status']) {
  2192. $lawyer_diy_name = $lawyer_set['diy_name'] ?: "律师平台";
  2193. $data[] = [
  2194. 'name' => 'lawyer_platform',
  2195. 'title' => $lawyer_diy_name,
  2196. 'class' => 'icon-member_lawyer_platform',
  2197. 'url' => 'lawyerPlatform',
  2198. 'image' => "member_a(194).png",
  2199. 'mini_url' => '/packageI/lawyerPlatform/lawyerPlatform_index/index',
  2200. ];
  2201. }
  2202. }
  2203. //代理商收益管理
  2204. if (app('plugins')->isEnabled('agent-earnings')) {
  2205. $agent_earnings_config = \Yunshop\AgentEarnings\models\AgentEarningsConfigModel::getConfig('is_open');
  2206. if ($agent_earnings_config) {
  2207. $data[] = [
  2208. 'name' => 'agentEarnings',
  2209. 'title' => '团队销售额',
  2210. 'class' => 'icon-member-agent-earnings',
  2211. 'url' => 'group_sales',
  2212. 'image' => 'member_a(195).png',
  2213. 'mini_url' => '/packageI/group_sales/group_sales',
  2214. ];
  2215. }
  2216. }
  2217. //活动排行榜
  2218. if (app('plugins')->isEnabled('activity-ranking')) {
  2219. $activity_ranking_config = \Yunshop\ActivityRanking\models\ActivityRankingConfigModel::getConfig('is_open');
  2220. if ($activity_ranking_config) {
  2221. $data[] = [
  2222. 'name' => 'activityRanking',
  2223. 'title' => '个人额度',
  2224. 'class' => 'icon-fontclass-personalCredit',
  2225. 'url' => 'personalCredit',
  2226. 'image' => 'member_a(200).png',
  2227. 'mini_url' => '/packageI/personalCredit/personalCredit',
  2228. ];
  2229. }
  2230. }
  2231. // 众筹活动
  2232. if (app('plugins')->isEnabled('crowdfunding') && \Setting::get('crowdfunding.set.plugin_enable')) {
  2233. $data[] = [
  2234. 'name' => 'crowdfunding',
  2235. 'title' => '众筹活动',
  2236. 'class' => 'icon-fontclass_crowd_activity',
  2237. 'url' => 'crowd_activity',
  2238. 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(201).png',
  2239. 'mini_url' => '/packageF/crowd_activity/index/index',
  2240. ];
  2241. }
  2242. // 银典支付
  2243. if (app('plugins')->isEnabled('silver-point-pay') && \Setting::get('silver-point-pay.set.plugin_enable') && in_array(request()->input('type'), [5, 7])) {
  2244. $data[] = [
  2245. 'name' => 'silver-point-pay',
  2246. 'title' => '银典支付',
  2247. 'class' => 'icon-fontclass_crowd_activity',
  2248. 'url' => 'silver_point_pay',
  2249. 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(201).png',
  2250. 'mini_url' => '/packageF/silverPointPay/index/index',
  2251. ];
  2252. }
  2253. // 权益积分
  2254. if (app('plugins')->isEnabled('equity-points') && \Setting::get('plugin.equity_points.is_open')) {
  2255. $data[] = [
  2256. 'name' => 'equity-points',
  2257. 'title' => '权益积分',
  2258. 'class' => 'icon-fontclass-equityPoints',
  2259. 'url' => 'equityPoints',
  2260. 'image' => 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/member/member_a(202).png',
  2261. 'mini_url' => '/packageF/equityPoints/equityPoints',
  2262. ];
  2263. }
  2264. //高灯
  2265. if (request()->type != 2 && app('plugins')->isEnabled('high-light') && \Yunshop\HighLight\services\SetService::getStatus()) {
  2266. $data[] = [
  2267. 'name' => 'high-light',
  2268. 'title' => \Yunshop\HighLight\services\SetService::getDiyName(),
  2269. 'class' => 'icon-highLight-edit',
  2270. 'url' => 'HighLight',
  2271. 'image' => 'member_a(203).png',
  2272. 'mini_url' => '',
  2273. ];
  2274. }
  2275. //钱包地址
  2276. if (app('plugins')->isEnabled('love-speed-pool')) {
  2277. $data[] = [
  2278. 'name' => 'lspWalletSite',
  2279. 'title' => '钱包地址',
  2280. 'class' => 'icon-walletSite-edit',
  2281. 'url' => 'walletSiteBind',
  2282. 'image' => 'member_a(205).png',
  2283. 'mini_url' => '/packageI/walletSiteBind/walletSiteBind',
  2284. ];
  2285. }
  2286. //员工审批
  2287. if (app('plugins')->isEnabled('staff-audit') && app('plugins')->isEnabled('work-wechat-platform')) {
  2288. $data[] = [
  2289. 'name' => 'staffAudit',
  2290. 'title' => '员工审批',
  2291. 'class' => 'icon-staff-approval',
  2292. 'url' => 'StaffApproval',
  2293. 'image' => 'member_a(206).png',
  2294. 'mini_url' => '',
  2295. ];
  2296. }
  2297. //任务包
  2298. if (app('plugins')->isEnabled('task-package') && \Yunshop\TaskPackage\services\SettingService::pluginSwitch()) {
  2299. $data[] = [
  2300. 'name' => 'task-package',
  2301. 'title' => '任务包',
  2302. 'class' => 'icon-member-taskPackage',
  2303. 'url' => 'taskPackageIndex',
  2304. 'image' => 'member_a(207).png',
  2305. 'mini_url' => '/packageI/taskPackage/taskPackageIndex/taskPackageIndex',
  2306. ];
  2307. }
  2308. //健康检测
  2309. if (app('plugins')->isEnabled('health-check') && \Yunshop\HealthCheck\services\SettingService::getSetting()['open_state']) {
  2310. $data[] = [
  2311. 'name' => 'health-check',
  2312. 'title' => '健康检测',
  2313. 'class' => 'icon-member-checkout',
  2314. 'url' => 'health-check',
  2315. 'image' => 'member_a(208).png',
  2316. 'mini_url' => '/packageI/checkout-equipment/index/index',
  2317. ];
  2318. }
  2319. if (app('plugins')->isEnabled('link-move')) {
  2320. $data[] = [
  2321. 'name' => 'link-move',
  2322. 'title' => \Yunshop\LinkMove\common\LinkMoveSet::instance()->getPluginName(),
  2323. 'class' => 'icon-member-chaining',
  2324. 'url' => 'chaining',
  2325. 'image' => 'member_a(210).png',
  2326. 'mini_url' => '/packageF/chaining/index',
  2327. ];
  2328. }
  2329. //帮扶中心
  2330. if (app('plugins')->isEnabled('support-center')) {
  2331. $data[] = [
  2332. 'name' => 'support-center',
  2333. 'title' => SUPPORT_CENTER_NAME,
  2334. 'class' => 'icon-member-supportCenter',
  2335. 'url' => 'supportCenterIndex',
  2336. 'image' => 'icon_help1@2x.png',
  2337. 'mini_url' => '/packageJ/supportCenter/supportCenterIndex/supportCenterIndex',
  2338. ];
  2339. }
  2340. foreach ($data as $k => $v) {
  2341. if (in_array($v['name'], $diyarr['tool'])) {
  2342. $arr['tool'][] = $v;
  2343. }
  2344. if (in_array($v['name'], $diyarr['asset_equity'])) {
  2345. $arr['asset_equity'][] = $v;
  2346. }
  2347. if (in_array($v['name'], $diyarr['merchant'])) {
  2348. $arr['merchant'][] = $v;
  2349. }
  2350. if (in_array($v['name'], $diyarr['market'])) {
  2351. $arr['market'][] = $v;
  2352. }
  2353. }
  2354. $arr['ViewSet'] = [];
  2355. if (app('plugins')->isEnabled('designer')) {
  2356. //获取所有模板
  2357. $sets = ViewSet::uniacid()->select('names', 'type')->get()->toArray();
  2358. foreach ($sets as $k => $v) {
  2359. $arr['ViewSet'][$v['type']]['name'] = $v['names'];
  2360. $arr['ViewSet'][$v['type']]['name'] = $v['names'];
  2361. }
  2362. }
  2363. $arr['is_open'] = [
  2364. 'is_open_hotel' => app('plugins')->isEnabled('hotel') ? 1 : 0,
  2365. 'is_open_net_car' => app('plugins')->isEnabled('net-car') ? 1 : 0,
  2366. 'is_open_fight_groups' => app('plugins')->isEnabled('fight-groups') ? 1 : 0,
  2367. 'is_open_lease_toy' => \app\common\services\plugin\leasetoy\LeaseToySet::whetherEnabled(), //租赁订单列表是否开启
  2368. 'is_open_converge_pay' => app('plugins')->isEnabled('converge_pay') ? 1 : 0,
  2369. 'is_open_snatch_regiment' => app('plugins')->isEnabled('snatch-regiment') ? 1 : 0,
  2370. 'is_open_live_install' => app('plugins')->isEnabled('live-install') ? 1 : 0,
  2371. 'is_open_live_install_worker' => app('plugins')->isEnabled('live-install') ? 1 : 0,
  2372. 'is_open_aggregation_cps' => app('plugins')->isEnabled('aggregation-cps') ? 1 : 0,
  2373. 'is_open_group_work' => app('plugins')->isEnabled('group-work') ? 1 : 0,
  2374. 'is_open_ys_system' => app('plugins')->isEnabled('ys-system') ? 1 : 0,
  2375. 'is_store' => $store && $store->is_black != 1 ? 1 : 0,
  2376. 'is_open_ywmgroups' => app('plugins')->isEnabled('ywm-fight-groups') ? 1 : 0,
  2377. 'is_open_coupon_store' => app('plugins')->isEnabled('coupon-store') && \Yunshop\CouponStore\services\SettingService::is_open() ? 1 : 0,
  2378. 'is_open_yz_supply_cake' => app('plugins')->isEnabled('yz-supply-cake') ? 1 : 0,
  2379. 'is_open_tiktok_cps' => app('plugins')->isEnabled('tiktok-cps')?1:0,
  2380. ];
  2381. return $arr;
  2382. }
  2383. public function morePluginData()
  2384. {
  2385. $arr = [
  2386. [
  2387. 'name' => '必备工具',
  2388. 'plugin' => [
  2389. 'm-collection', 'm-footprint', 'm-address', 'm-info', 'findpwd', 'member_code', 'member_pay_code', 'm-guanxi', 'ranking', 'material-center',
  2390. 'm-coupon', 'instation-message', 'applicationMarket', 'marketSub', 'converge_pay', 'group-develop-user', 'lower-footprint', 'aggregation-cps',
  2391. 'group-code', 'my-friend', 'commission-ranking', 'diy-form-prove', 'invoiceCenter', 'silver-point-pay'
  2392. ],
  2393. ],
  2394. [
  2395. 'name' => '便捷服务',
  2396. 'plugin' => [
  2397. 'recharge_code', 'exchange', 'help-center', 'article', 'video_demand', 'easy-refuel', 'room-aide', 'promotion-assistant', 'oil_station',
  2398. 'case-library', 'order-inventory','WorkerWithdraw','journal','high-light','eplus-pay'
  2399. ],
  2400. ],
  2401. [
  2402. 'name' => '互动参与',
  2403. 'plugin' => [
  2404. 'm-erweima', 'm-pinglun', 'clock_in', 'conference', 'sign', 'fight_groups', 'video-share', 'micro-communities', 'luck-draw', 'my-snatch-regiment', 'crowdfunding',
  2405. 'snatch-regiment', 'star-spell', 'activity-apply', 'kefu', 'customer-development', 'circle', 'questionnaire', 'blind-box', 'agent_qa', 'new-media-advertising',
  2406. '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',
  2407. 'lspWalletSite','TikTokOrder','staffAudit','full-return','task-package', 'link-move', 'consignment','support-center'
  2408. ],
  2409. ],
  2410. [
  2411. 'name' => '特色业务',
  2412. 'plugin' => [
  2413. 'business_card', 'skin-check', 'appointment', 'auction', 'contractListPlu', 'room-apply', 'pending_order', 'room', 'room-code', 'micro', 'new-retail',
  2414. 'pickUpCardOrderList', 'pickUpCardOrderListOne', 'assemble', 'worker_apply', 'live_install', 'live_install_worker', 'StoreVerification', 'signIndex',
  2415. 'flyers_advertise', 'parking-pay', 'debt-shop', 'lawyer_platform','health-check',
  2416. ],
  2417. ],
  2418. [
  2419. 'name' => '商家合作',
  2420. 'plugin' => [
  2421. 'store-cashier', 'cashier', 'supplier', 'hotel', 'package_deliver', 'subsidiary', 'channel', 'advert-market',
  2422. 'school-company', 'ad-serving', 'universal_card', 'shop-assistant', 'public-fund','CouponStoreApply','CouponStoreManage',
  2423. 'supplier-driver-distribution','store_applyfor'
  2424. ],
  2425. ],
  2426. [
  2427. 'name' => '我的资产',
  2428. 'plugin' => [
  2429. 'extension', 'credit', 'love', 'integral', 'froze', 'agency', 'consumer-reward', 'upgrade-code', 'credit-inventory', 'warehouse', 'member-synchron',
  2430. ],
  2431. ],
  2432. ];
  2433. return $arr;
  2434. }
  2435. public
  2436. function defaultPluginData($memberId)
  2437. {
  2438. //安装了客户中心插件 && 开启客户中心
  2439. $customer_center_enabled = app('plugins')->isEnabled('customer-center') && \Setting::get("plugin.customer-center.is_open");
  2440. $arr = [
  2441. [
  2442. 'class' => 'icon-fontclass-pinglun',
  2443. 'id' => '111111116',
  2444. 'image' => $this->handlePluginImage('tool_a(4).png'),
  2445. 'is_open' => true,
  2446. 'mini_url' => "/packageD/member/myEvaluation/myEvaluation",
  2447. 'name' => "m-pinglun",
  2448. 'title' => "评论",
  2449. 'url' => "myEvaluation",
  2450. ],
  2451. [
  2452. 'class' => 'icon-fontclass-kehu',
  2453. 'id' => '111111114',
  2454. 'image' => $this->handlePluginImage('tool_a(3).png'),
  2455. 'is_open' => true,
  2456. 'mini_url' => $customer_center_enabled ? "/packageF/others/customerCenter/customerCenterIndex/customerCenterIndex" : "/packageD/member/myRelationship/myRelationship",
  2457. 'name' => "m-guanxi",
  2458. 'title' => "客户",
  2459. 'url' => $customer_center_enabled ? "customerCenterIndex" : "myRelationship",
  2460. ],
  2461. [
  2462. 'class' => 'icon-fontclass-1',
  2463. 'id' => '111111110',
  2464. 'image' => $this->handlePluginImage('tool_a(6).png'),
  2465. 'is_open' => true,
  2466. 'mini_url' => "/packageD/member/collection/collection",
  2467. 'name' => "m-collection",
  2468. 'title' => "收藏",
  2469. 'url' => "collection",
  2470. ],
  2471. [
  2472. 'class' => 'icon-fontclass-zuji2',
  2473. 'id' => '111111111',
  2474. 'image' => $this->handlePluginImage('tool_a(8).png'),
  2475. 'is_open' => true,
  2476. 'mini_url' => "/packageD/member/footprint/footprint",
  2477. 'name' => "m-footprin",
  2478. 'title' => "足迹",
  2479. 'url' => "footprint",
  2480. ],
  2481. [
  2482. 'class' => 'icon-fontclass-dizhi',
  2483. 'id' => '111111112',
  2484. 'image' => $this->handlePluginImage('tool_a(1).png'),
  2485. 'is_open' => true,
  2486. 'mini_url' => "/packageD/member/addressList/addressList",
  2487. 'name' => "m-address",
  2488. 'title' => "地址管理",
  2489. 'url' => "address",
  2490. ],
  2491. [
  2492. 'class' => 'icon-fontclass-shezhi',
  2493. 'id' => '111111113',
  2494. 'image' => $this->handlePluginImage('tool_a(5).png'),
  2495. 'is_open' => true,
  2496. 'mini_url' => "/packageA/member/info/info",
  2497. 'name' => "m-info",
  2498. 'title' => "设置",
  2499. 'url' => "info",
  2500. ],
  2501. [
  2502. 'class' => 'icon-fontclass-youhuiquan',
  2503. 'id' => '111111114',
  2504. 'image' => $this->handlePluginImage('tool_a(7).png'),
  2505. 'is_open' => true,
  2506. 'mini_url' => "/packageA/member/coupon_v2/coupon_v2",
  2507. 'name' => "m-coupon",
  2508. 'title' => "优惠券",
  2509. 'url' => "coupon",
  2510. ],
  2511. ];
  2512. $isAgent = MemberShopInfo::uniacid()->select('is_agent')->where('member_id', $memberId)->first();
  2513. if ($this->isBackendRoute() || $isAgent->is_agent == 1) {
  2514. $poster_center_set = Setting::get('plugin.poster_center');
  2515. if (app('plugins')->isEnabled('poster-center')&&$poster_center_set['is_open']&&$poster_center_set['is_replace']) {
  2516. $arr[] = [
  2517. 'class' => 'icon-fontclass-posterCenter',
  2518. 'id' => '111111115',
  2519. 'image' => $this->handlePluginImage('tool_a(12).png'),
  2520. 'is_open' => true,
  2521. 'name' => "m-erweima",
  2522. 'url' => 'm-erweima',
  2523. 'title' => "海报中心",
  2524. ];
  2525. } else {
  2526. $arr[] = [
  2527. 'class' => 'icon-fontclass-erweima',
  2528. 'id' => '111111115',
  2529. 'image' => $this->handlePluginImage('tool_a(2).png'),
  2530. 'is_open' => true,
  2531. 'name' => "m-erweima",
  2532. 'url' => 'm-erweima',
  2533. 'title' => "二维码",
  2534. ];
  2535. }
  2536. }
  2537. return $arr;
  2538. }
  2539. /**
  2540. * 新会员中心模板01:需要在会员中心页面显示的推荐插件
  2541. *
  2542. */
  2543. public
  2544. function sortPluginData()
  2545. {
  2546. //键值即排序
  2547. $plugin = [
  2548. 'm-erweima', 'm-pinglun', 'm-guanxi', 'member_code', 'member_pay_code', 'fight_groups', 'video-share', 'micro-communities', 'StoreVerification', 'business_card',
  2549. 'room', 'article', 'ranking', 'sign', 'clock_in', 'material-center', 'video_demand', 'group-develop-user', 'circle', 'activity-apply', 'blind-box',
  2550. 'store-cashier', 'cashier', 'supplier', 'oil_station', 'case-library', 'micro', 'exchange', 'help-center', 'room-aide', 'universal_card', 'warehouse','ywmFightGroups'
  2551. ];
  2552. if (app('plugins')->isEnabled('decorate') && Setting::get('plugin.decorate.is_open') && Setting::get('decorate.mc_one_default.open_state')) {
  2553. $plugin = DecorateDefaultTemplateModel::uniacid()->templateKey(DecorateDefaultTemplateModel::TEMPLTAE_KEY['mc_one_default'])->status(1)->orderBy('sort', 'ASC')->orderBy('id', 'ASC')->limit(19)->pluck('key')->toArray();
  2554. $plugin = array_values(array_unique($plugin));
  2555. }
  2556. return $plugin;
  2557. }
  2558. private
  2559. function handlePluginImage($image)
  2560. {
  2561. if (config('app.framework') == 'platform') {
  2562. $dir = '/';
  2563. } else {
  2564. $dir = '/addons/yun_shop/';
  2565. }
  2566. return $dir . 'static/yunshop/designer/images/' . $image;
  2567. }
  2568. public function isBackendRoute()
  2569. {
  2570. return \YunShop::isWeb();
  2571. return request()->isBackendRoute ? 1 : 0;
  2572. }
  2573. }