InitDataDict.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace addon\mall\app\dict\init;
  12. /**
  13. * 初始化数据
  14. * Class WebInitDataDict
  15. * @package app\dict\web
  16. */
  17. class InitDataDict
  18. {
  19. public static function getInitData($params = [])
  20. {
  21. $site_id = $params['site_id'] ?? request()->defaultSiteId();
  22. $init_data = [
  23. //物流公司
  24. 'company_list' => [
  25. [
  26. 'site_id' => $site_id,
  27. 'create_time' => time(),
  28. 'company_name' => '邮政EMS',
  29. 'logo' => 'addon/mall/express/ems.jpg',
  30. 'url' => 'https://www.ems.com.cn',
  31. 'express_no' => 'EMS',
  32. 'express_no_electronic_sheet' => 'EMS',
  33. 'electronic_sheet_switch' => 1,
  34. 'print_style' => [
  35. [
  36. 'template_name' => '一联130 76*130',
  37. 'template_size' => '130',
  38. ],
  39. [
  40. 'template_name' => '一联130新 76*130',
  41. 'template_size' => '1301',
  42. ],
  43. [
  44. 'template_name' => '二联180 100*180',
  45. 'template_size' => '180',
  46. ],
  47. [
  48. 'template_name' => '二联180新 100*180',
  49. 'template_size' => '1801',
  50. ],
  51. [
  52. 'template_name' => '二联150 100*150',
  53. 'template_size' => '0',
  54. ],
  55. [
  56. 'template_name' => '二联150新 100*150',
  57. 'template_size' => '1501',
  58. ]
  59. ],
  60. 'exp_type' => [
  61. [
  62. 'text' => '特快专递',
  63. 'value' => 1
  64. ],
  65. [
  66. 'text' => '代收到付',
  67. 'value' => 8
  68. ],
  69. [
  70. 'text' => '快递包裹',
  71. 'value' => 9
  72. ],
  73. [
  74. 'text' => '电商标快',
  75. 'value' => 10
  76. ],
  77. [
  78. 'text' => '国内标快',
  79. 'value' => 11
  80. ]
  81. ]
  82. ],
  83. [
  84. 'site_id' => $site_id,
  85. 'create_time' => time(),
  86. 'company_name' => '邮政快递包裹',
  87. 'logo' => 'addon/mall/express/youzhengkd.png',
  88. 'url' => 'https://www.ems.com.cn',
  89. 'express_no' => 'YZPY',
  90. 'express_no_electronic_sheet' => 'YZPY',
  91. 'electronic_sheet_switch' => 1,
  92. 'print_style' => [
  93. [
  94. 'template_name' => '一联130 76*130',
  95. 'template_size' => '130',
  96. ],
  97. [
  98. 'template_name' => '一联130新 76*130',
  99. 'template_size' => '1301',
  100. ],
  101. [
  102. 'template_name' => '二联1801 100*180',
  103. 'template_size' => '1801',
  104. ],
  105. [
  106. 'template_name' => '二联180 100*180',
  107. 'template_size' => '0',
  108. ],
  109. [
  110. 'template_name' => '二联180新 100*180',
  111. 'template_size' => '180',
  112. ],
  113. [
  114. 'template_name' => '二联150 100*150',
  115. 'template_size' => '150',
  116. ],
  117. [
  118. 'template_name' => '二联150新 100*150',
  119. 'template_size' => '1501',
  120. ]
  121. ],
  122. 'exp_type' => [
  123. [
  124. 'text' => '标准快递',
  125. 'value' => 1
  126. ]
  127. ]
  128. ],
  129. [
  130. 'site_id' => $site_id,
  131. 'create_time' => time(),
  132. 'company_name' => '顺丰速运',
  133. 'logo' => 'addon/mall/express/shunfeng.png',
  134. 'url' => 'https://www.sf-express.com/chn/sc',
  135. 'express_no' => 'SF',
  136. 'express_no_electronic_sheet' => 'SF',
  137. 'electronic_sheet_switch' => 1,
  138. 'print_style' => [
  139. [
  140. 'template_name' => '一联130新 76*130',
  141. 'template_size' => '1301',
  142. ],
  143. [
  144. 'template_name' => '二联150新 100*150',
  145. 'template_size' => '0',
  146. ],
  147. [
  148. 'template_name' => '二联180新 100*180',
  149. 'template_size' => '180',
  150. ],
  151. [
  152. 'template_name' => '三联210新 100*210',
  153. 'template_size' => '210',
  154. ]
  155. ],
  156. 'exp_type' => [
  157. [
  158. 'text' => '顺丰特快',
  159. 'value' => 1
  160. ],
  161. [
  162. 'text' => '顺丰标快',
  163. 'value' => 2
  164. ],
  165. [
  166. 'text' => '顺丰即日',
  167. 'value' => 6
  168. ],
  169. [
  170. 'text' => '冷运标快',
  171. 'value' => 201
  172. ],
  173. [
  174. 'text' => '顺丰微小件',
  175. 'value' => 202
  176. ]
  177. ]
  178. ],
  179. [
  180. 'site_id' => $site_id,
  181. 'create_time' => time(),
  182. 'company_name' => '中通快递',
  183. 'logo' => 'addon/mall/express/zhongtong.png',
  184. 'url' => 'https://www.zto.com',
  185. 'express_no' => 'ZTO',
  186. 'express_no_electronic_sheet' => 'ZTO',
  187. 'electronic_sheet_switch' => 1,
  188. 'print_style' => [
  189. [
  190. 'template_name' => '一联130 76*130',
  191. 'template_size' => '130',
  192. ],
  193. [
  194. 'template_name' => '二联180 100*180',
  195. 'template_size' => '0',
  196. ],
  197. [
  198. 'template_name' => '二联180新 100*180',
  199. 'template_size' => '180',
  200. ]
  201. ],
  202. 'exp_type' => []
  203. ],
  204. [
  205. 'site_id' => $site_id,
  206. 'create_time' => time(),
  207. 'company_name' => '圆通速递',
  208. 'logo' => 'addon/mall/express/yuantong.png',
  209. 'url' => 'https://www.yto.net.cn',
  210. 'express_no' => 'YTO',
  211. 'express_no_electronic_sheet' => 'YTO',
  212. 'electronic_sheet_switch' => 1,
  213. 'print_style' => [
  214. [
  215. 'template_name' => '一联130 76*130',
  216. 'template_size' => '130',
  217. ],
  218. [
  219. 'template_name' => '一联130新 76*130',
  220. 'template_size' => '1301',
  221. ],
  222. [
  223. 'template_name' => '二联180 100*180',
  224. 'template_size' => '0',
  225. ],
  226. [
  227. 'template_name' => '三联180 100*180',
  228. 'template_size' => '180',
  229. ],
  230. [
  231. 'template_name' => '二联180新 100*180',
  232. 'template_size' => '1801',
  233. ]
  234. ],
  235. 'exp_type' => [
  236. [
  237. 'text' => '标准快递',
  238. 'value' => 1
  239. ],
  240. [
  241. 'text' => '圆准达',
  242. 'value' => 2
  243. ]
  244. ]
  245. ],
  246. [
  247. 'site_id' => $site_id,
  248. 'create_time' => time(),
  249. 'company_name' => '申通快递',
  250. 'logo' => 'addon/mall/express/shentong.png',
  251. 'url' => 'https://www.sto.cn/pc',
  252. 'express_no' => 'STO',
  253. 'express_no_electronic_sheet' => 'STO',
  254. 'electronic_sheet_switch' => 1,
  255. 'print_style' => [
  256. [
  257. 'template_name' => '一联130 76*130',
  258. 'template_size' => '130',
  259. ],
  260. [
  261. 'template_name' => '一联130新 76*130',
  262. 'template_size' => '1301',
  263. ],
  264. [
  265. 'template_name' => '二联180 100*180',
  266. 'template_size' => '0',
  267. ],
  268. [
  269. 'template_name' => '二联180新 100*180',
  270. 'template_size' => '180',
  271. ],
  272. [
  273. 'template_name' => '三联180新 100*180',
  274. 'template_size' => '1803',
  275. ],
  276. [
  277. 'template_name' => '二联150 100*150',
  278. 'template_size' => '150',
  279. ]
  280. ],
  281. 'exp_type' => [
  282. [
  283. 'text' => '标准快递',
  284. 'value' => 1
  285. ],
  286. ]
  287. ],
  288. [
  289. 'site_id' => $site_id,
  290. 'create_time' => time(),
  291. 'company_name' => '韵达速递',
  292. 'logo' => 'addon/mall/express/yunda.png',
  293. 'url' => 'http://www.yundaex.com/cn',
  294. 'express_no' => 'YD',
  295. 'express_no_electronic_sheet' => 'YD',
  296. 'electronic_sheet_switch' => 1,
  297. 'print_style' => [
  298. [
  299. 'template_name' => '一联130 100*130',
  300. 'template_size' => '130',
  301. ],
  302. [
  303. 'template_name' => '二联180 100*180',
  304. 'template_size' => '180',
  305. ],
  306. [
  307. 'template_name' => '二联203 100*203',
  308. 'template_size' => '0',
  309. ]
  310. ],
  311. 'exp_type' => []
  312. ],
  313. [
  314. 'site_id' => $site_id,
  315. 'create_time' => time(),
  316. 'company_name' => '极兔速递',
  317. 'logo' => 'addon/mall/express/jitu.png',
  318. 'url' => 'https://www.jtexpress.cn',
  319. 'express_no' => 'JTSD',
  320. 'express_no_electronic_sheet' => 'JTSD',
  321. 'electronic_sheet_switch' => 1,
  322. 'print_style' => [
  323. [
  324. 'template_name' => '一联130 100*130',
  325. 'template_size' => '130',
  326. ],
  327. [
  328. 'template_name' => '二联180 100*180',
  329. 'template_size' => '0',
  330. ]
  331. ],
  332. 'exp_type' => [
  333. [
  334. 'text' => '标准快递',
  335. 'value' => 1
  336. ],
  337. [
  338. 'text' => '兔优达',
  339. 'value' => 2
  340. ]
  341. ]
  342. ],
  343. [
  344. 'site_id' => $site_id,
  345. 'create_time' => time(),
  346. 'company_name' => '菜鸟速递',
  347. 'logo' => 'addon/mall/express/cainiao.jpg',
  348. 'url' => 'https://express.cainiao.com/',
  349. 'express_no' => 'CNSD',
  350. 'express_no_electronic_sheet' => 'CNSD',
  351. 'electronic_sheet_switch' => 1,
  352. 'print_style' => [
  353. [
  354. 'template_name' => '一联130 100*130',
  355. 'template_size' => '0',
  356. ]
  357. ],
  358. 'exp_type' => [
  359. [
  360. 'text' => '当日达',
  361. 'value' => 1
  362. ],
  363. [
  364. 'text' => '次日达',
  365. 'value' => 2
  366. ],
  367. [
  368. 'text' => '预约配送',
  369. 'value' => 3
  370. ],
  371. [
  372. 'text' => '当日下午达',
  373. 'value' => 4
  374. ],
  375. [
  376. 'text' => '当日夜间达',
  377. 'value' => 5
  378. ],
  379. [
  380. 'text' => '次日上午达',
  381. 'value' => 6
  382. ]
  383. ]
  384. ],
  385. [
  386. 'site_id' => $site_id,
  387. 'create_time' => time(),
  388. 'company_name' => '京东快递',
  389. 'logo' => 'addon/mall/express/jingdong.jpg',
  390. 'url' => 'https://www.jdl.com',
  391. 'express_no' => 'JD',
  392. 'express_no_electronic_sheet' => 'JD',
  393. 'electronic_sheet_switch' => 1,
  394. 'print_style' => [
  395. [
  396. 'template_name' => '一联130新 76*130',
  397. 'template_size' => '130',
  398. ],
  399. [
  400. 'template_name' => '二联110 100*110',
  401. 'template_size' => '0',
  402. ],
  403. [
  404. 'template_name' => '二联110新 100*110',
  405. 'template_size' => '110',
  406. ]
  407. ],
  408. 'exp_type' => []
  409. ]
  410. ],
  411. //商品标签
  412. 'label_list' => [
  413. [
  414. 'site_id' => $site_id,
  415. 'label_name' => '热卖',
  416. 'style_type' => 'diy',
  417. 'color_json' => [
  418. 'text_color' => 'rgba(255, 255, 255, 1)',
  419. 'bg_color' => 'rgba(250, 35, 28, 1)',
  420. 'border_color' => ''
  421. ],
  422. 'icon' => '',
  423. 'status' => 1,
  424. 'sort' => 0,
  425. 'create_time' => time()
  426. ],
  427. [
  428. 'site_id' => $site_id,
  429. 'label_name' => '新品推荐',
  430. 'style_type' => 'diy',
  431. 'color_json' => [
  432. 'text_color' => 'rgba(255, 255, 255, 1)',
  433. 'bg_color' => 'rgba(250, 35, 28, 1)',
  434. 'border_color' => ''
  435. ],
  436. 'icon' => '',
  437. 'status' => 1,
  438. 'sort' => 1,
  439. 'create_time' => time()
  440. ],
  441. [
  442. 'site_id' => $site_id,
  443. 'label_name' => '甄选优品',
  444. 'style_type' => 'diy',
  445. 'color_json' => [
  446. 'text_color' => 'rgba(255, 255, 255, 1)',
  447. 'bg_color' => 'rgba(250, 35, 28, 1)',
  448. 'border_color' => ''
  449. ],
  450. 'icon' => '',
  451. 'status' => 1,
  452. 'sort' => 2,
  453. 'create_time' => time()
  454. ],
  455. [
  456. 'site_id' => $site_id,
  457. 'label_name' => '百亿补贴',
  458. 'style_type' => 'icon',
  459. 'color_json' => [
  460. 'text_color' => 'rgba(255, 255, 255, 1)',
  461. 'bg_color' => 'rgba(250, 35, 28, 1)',
  462. 'border_color' => ''
  463. ],
  464. 'icon' => 'addon/mall/goods/label/icon1.png',
  465. 'status' => 1,
  466. 'sort' => 3,
  467. 'create_time' => time()
  468. ],
  469. [
  470. 'site_id' => $site_id,
  471. 'label_name' => '双11',
  472. 'style_type' => 'icon',
  473. 'color_json' => [
  474. 'text_color' => 'rgba(255, 255, 255, 1)',
  475. 'bg_color' => 'rgba(250, 35, 28, 1)',
  476. 'border_color' => ''
  477. ],
  478. 'icon' => 'addon/mall/goods/label/icon2.png',
  479. 'status' => 1,
  480. 'sort' => 4,
  481. 'create_time' => time()
  482. ],
  483. [
  484. 'site_id' => $site_id,
  485. 'label_name' => '双12',
  486. 'style_type' => 'icon',
  487. 'color_json' => [
  488. 'text_color' => 'rgba(255, 255, 255, 1)',
  489. 'bg_color' => 'rgba(250, 35, 28, 1)',
  490. 'border_color' => ''
  491. ],
  492. 'icon' => 'addon/mall/goods/label/icon3.png',
  493. 'status' => 1,
  494. 'sort' => 5,
  495. 'create_time' => time()
  496. ]
  497. ],
  498. //商品服务
  499. 'service_list' => [
  500. [
  501. 'site_id' => $site_id,
  502. 'service_name' => '品类齐全 轻松购物',
  503. 'image' => 'addon/mall/web/footer-01.png',
  504. 'desc' => '',
  505. 'create_time' => time()
  506. ],
  507. [
  508. 'site_id' => $site_id,
  509. 'service_name' => '正品行货 精致服务',
  510. 'image' => 'addon/mall/web/footer-02.png',
  511. 'desc' => '',
  512. 'create_time' => time()
  513. ],
  514. [
  515. 'site_id' => $site_id,
  516. 'service_name' => '天天低价 畅选无忧',
  517. 'image' => 'addon/mall/web/footer-03.png',
  518. 'desc' => '',
  519. 'create_time' => time()
  520. ],
  521. [
  522. 'site_id' => $site_id,
  523. 'service_name' => '多仓直发 极速配送',
  524. 'image' => 'addon/mall/web/footer-04.png',
  525. 'desc' => '',
  526. 'create_time' => time()
  527. ]
  528. ],
  529. //首页楼层
  530. 'floor_list' => [
  531. [
  532. 'floor_name' => '美妆护肤',
  533. 'temp' => 'default',
  534. 'sort' => 1,
  535. 'create_time' => time(),
  536. 'config' => [
  537. 'title' => '美妆护肤',
  538. 'sub_title' => '打造完美肌肤的秘密',
  539. 'goods_ids' => [],
  540. 'adv_img1' => 'addon/mall/web/floor_01.png',
  541. 'adv_img2' => 'addon/mall/web/floor_02.png',
  542. 'url' => [
  543. 'name' => ''
  544. ]
  545. ]
  546. ],
  547. [
  548. 'floor_name' => '潮流穿搭',
  549. 'temp' => 'default',
  550. 'sort' => 2,
  551. 'create_time' => time(),
  552. 'config' => [
  553. 'title' => '潮流穿搭',
  554. 'sub_title' => '时尚达人',
  555. 'goods_ids' => [],
  556. 'adv_img1' => 'addon/mall/web/floor_01.png',
  557. 'adv_img2' => 'addon/mall/web/floor_02.png',
  558. 'url' => [
  559. 'name' => ''
  560. ]
  561. ]
  562. ]
  563. ],
  564. ];
  565. return $init_data;
  566. }
  567. }