index.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. export const USER_ID = 'USER_MOCK';
  2. export function createId() {
  3. return Array.from({ length: 16 })
  4. .map(() => Math.floor(Math.random() * 16).toString(16))
  5. .join('');
  6. }
  7. export const SPU = [
  8. {
  9. owner: '1856254275343773698',
  10. priority: 1,
  11. swiper_images: ['https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png'],
  12. createdAt: 1731488370922,
  13. createBy: '1856254275343773698',
  14. updateBy: '1856254275343773698',
  15. _openid: '1856254275343773698',
  16. name: '腾讯QQ正版铜工艺品太空鹅全铜摆件',
  17. detail:
  18. '<p style="text-align: center"><span style="font-size: 32px"><strong><span style="color: #45818e"><i><span style="text-decoration: underline">腾讯QQ正版铜工艺品太空鹅全铜摆件</span></i></span></strong></span></p><p style="text-align: center"><span class="exeditor-picture"><img src="https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png" width="356" height="356"></span></p><p style="text-align: center">企鹅企鹅企鹅</p><p style="text-align: center"><span style="font-family: STKaiti, 华文楷体, serif">帅!</span></p>',
  19. cover_image: 'https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png',
  20. _id: 'P4_prod',
  21. updatedAt: 1731488370922,
  22. status: 'ENABLED',
  23. },
  24. {
  25. owner: '1856254275343773698',
  26. priority: 2,
  27. swiper_images: ['https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png'],
  28. createdAt: 1731488370775,
  29. createBy: '1856254275343773698',
  30. updateBy: '1856254275343773698',
  31. _openid: '1856254275343773698',
  32. name: '软底一脚蹬小白鞋女鞋休闲棉加绒显脚瘦',
  33. detail:
  34. '<p style="text-align: center"><span style="font-size: 32px"><span style="background-color: #00ff00"><strong><span style="color: #ea9999"><i>软底一脚蹬小白鞋女鞋休闲棉加绒显脚瘦</i></span></strong></span></span></p><p style="text-align: center"><span class="exeditor-picture"><img src="https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png" width="356" height="356"></span></p><p style="text-align: center">好穿</p>',
  35. cover_image: 'https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png',
  36. _id: 'P3_prod',
  37. updatedAt: 1731488370775,
  38. status: 'ENABLED',
  39. },
  40. {
  41. owner: '1856254275343773698',
  42. priority: 1,
  43. swiper_images: ['https://qcloudimg.tencent-cloud.cn/raw/7b2c975b21d24c43f1609e0b0328dccf.png'],
  44. createdAt: 1731488370653,
  45. createBy: '1856254275343773698',
  46. updateBy: '1856254275343773698',
  47. _openid: '1856254275343773698',
  48. name: '随身蓝牙无线音箱小型便携式迷你户外',
  49. detail:
  50. '<p style="text-align: center"><span style="font-size: 32px"><strong><span style="color: #ff9900"><i>随身蓝牙无线音箱小型便携式迷你户外</i></span></strong></span></p><p style="text-align: center"><span class="exeditor-picture"><img src="https://qcloudimg.tencent-cloud.cn/raw/7b2c975b21d24c43f1609e0b0328dccf.png" width="356" height="356"></span></p><p style="text-align: center">非常劲爆的音乐。</p>',
  51. cover_image: 'https://qcloudimg.tencent-cloud.cn/raw/7b2c975b21d24c43f1609e0b0328dccf.png',
  52. _id: 'P2_prod',
  53. updatedAt: 1731488370653,
  54. status: 'ENABLED',
  55. },
  56. {
  57. owner: '1856254275343773698',
  58. priority: 1,
  59. swiper_images: ['https://qcloudimg.tencent-cloud.cn/raw/ac3c9a255cae575661323fdcb8cae468.png'],
  60. createdAt: 1731488370507,
  61. createBy: '1856254275343773698',
  62. updateBy: '1856254275343773698',
  63. _openid: '1856254275343773698',
  64. name: '正版腾讯生肖祥龙Q版包包龙抬头',
  65. detail:
  66. '<p style="text-align: right"><span style="font-size: 32px"><span style="background-color: #434343"><strong><span style="color: #ffffff"><i><span style="text-decoration: underline">龙龙龙</span></i></span></strong></span></span></p><p style="text-align: right"><span class="exeditor-picture"><img src="https://qcloudimg.tencent-cloud.cn/raw/ac3c9a255cae575661323fdcb8cae468.png" width="356" height="356"></span></p><p style="text-align: right">每天带龙去上班。</p>',
  67. cover_image: 'https://qcloudimg.tencent-cloud.cn/raw/ac3c9a255cae575661323fdcb8cae468.png',
  68. _id: 'P1_prod',
  69. updatedAt: 1731488370507,
  70. status: 'ENABLED',
  71. },
  72. ];
  73. export const SKU = [
  74. {
  75. owner: '1856254275343773698',
  76. image: 'https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png',
  77. createdAt: 1731488370290,
  78. createBy: '1856254275343773698',
  79. updateBy: '1856254275343773698',
  80. price: 190,
  81. _openid: '1856254275343773698',
  82. count: 100,
  83. description: '2 个太空鹅',
  84. spu: { _id: 'P4_prod' },
  85. _id: 'K6_prod',
  86. updatedAt: 1731488370290,
  87. },
  88. {
  89. owner: '1856254275343773698',
  90. image: 'https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png',
  91. createdAt: 1731488370145,
  92. createBy: '1856254275343773698',
  93. updateBy: '1856254275343773698',
  94. price: 100,
  95. _openid: '1856254275343773698',
  96. count: 100,
  97. description: '1 个太空鹅',
  98. spu: { _id: 'P4_prod' },
  99. _id: 'K5_prod',
  100. updatedAt: 1731488370145,
  101. },
  102. {
  103. owner: '1856254275343773698',
  104. image: 'https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png',
  105. createdAt: 1731488369981,
  106. createBy: '1856254275343773698',
  107. updateBy: '1856254275343773698',
  108. price: 300,
  109. _openid: '1856254275343773698',
  110. count: 100,
  111. description: '34 码小白鞋',
  112. spu: { _id: 'P3_prod' },
  113. _id: 'K4_prod',
  114. updatedAt: 1731488369981,
  115. },
  116. {
  117. owner: '1856254275343773698',
  118. image: 'https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png',
  119. createdAt: 1731488369817,
  120. createBy: '1856254275343773698',
  121. updateBy: '1856254275343773698',
  122. price: 300,
  123. _openid: '1856254275343773698',
  124. count: 95,
  125. description: '33 码小白鞋',
  126. spu: { _id: 'P3_prod' },
  127. _id: 'K3_prod',
  128. updatedAt: 1731488629039,
  129. },
  130. {
  131. owner: '1856254275343773698',
  132. image: 'https://qcloudimg.tencent-cloud.cn/raw/7b2c975b21d24c43f1609e0b0328dccf.png',
  133. createdAt: 1731488369644,
  134. createBy: '1856254275343773698',
  135. updateBy: '1856254275343773698',
  136. price: 100,
  137. _openid: '1856254275343773698',
  138. count: 100,
  139. description: '普通音箱',
  140. spu: { _id: 'P2_prod' },
  141. _id: 'K2_prod',
  142. updatedAt: 1731488369644,
  143. },
  144. {
  145. owner: '1856254275343773698',
  146. image: 'https://qcloudimg.tencent-cloud.cn/raw/ac3c9a255cae575661323fdcb8cae468.png',
  147. createdAt: 1731488369320,
  148. createBy: '1856254275343773698',
  149. updateBy: '1856254275343773698',
  150. price: 90,
  151. _openid: '1856254275343773698',
  152. count: 100,
  153. description: '普通斜挎包',
  154. spu: { _id: 'P1_prod' },
  155. _id: 'K1_prod',
  156. updatedAt: 1731488369320,
  157. },
  158. ];
  159. export const HOME_SWIPER = [
  160. {
  161. images: ['https://qcloudimg.tencent-cloud.cn/raw/1e793c70bb4f521fe277b2c207ab81b4.png'],
  162. _id: 'A3QFLT6UVN',
  163. },
  164. ];
  165. export const CATEGORY = [
  166. {
  167. owner: '1856254275343773698',
  168. createdAt: 1731488367747,
  169. createBy: '1856254275343773698',
  170. updateBy: '1856254275343773698',
  171. _openid: '1856254275343773698',
  172. name: '数码',
  173. spu: [],
  174. _id: 'C3_prod',
  175. child_cate: [
  176. {
  177. image: 'https://qcloudimg.tencent-cloud.cn/raw/7b2c975b21d24c43f1609e0b0328dccf.png',
  178. name: '音箱',
  179. _id: 'ACGNME9W2U',
  180. },
  181. ],
  182. updatedAt: 1731488367747,
  183. },
  184. {
  185. owner: '1856254275343773698',
  186. createdAt: 1731488367429,
  187. createBy: '1856254275343773698',
  188. updateBy: '1856254275343773698',
  189. _openid: '1856254275343773698',
  190. name: '周边',
  191. spu: [],
  192. _id: 'C2_prod',
  193. child_cate: [
  194. {
  195. image: 'https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png',
  196. name: '摆件',
  197. _id: 'ACGNMD7TRS',
  198. },
  199. ],
  200. updatedAt: 1731488367429,
  201. },
  202. {
  203. owner: '1856254275343773698',
  204. createdAt: 1731488366964,
  205. createBy: '1856254275343773698',
  206. updateBy: '1856254275343773698',
  207. _openid: '1856254275343773698',
  208. name: '服饰',
  209. spu: [],
  210. _id: 'C1_prod',
  211. child_cate: [
  212. {
  213. image: 'https://qcloudimg.tencent-cloud.cn/raw/ac3c9a255cae575661323fdcb8cae468.png',
  214. name: '箱包',
  215. _id: 'ACGNMBTP4L',
  216. },
  217. {
  218. image: 'https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png',
  219. name: '鞋子',
  220. _id: 'ACGNMCB9N8',
  221. },
  222. ],
  223. updatedAt: 1731488366964,
  224. },
  225. {
  226. owner: '1856254275343773698',
  227. image: 'https://qcloudimg.tencent-cloud.cn/raw/7b2c975b21d24c43f1609e0b0328dccf.png',
  228. createdAt: 1731488367913,
  229. createBy: '1856254275343773698',
  230. updateBy: '1856254275343773698',
  231. _openid: '1856254275343773698',
  232. name: '音箱',
  233. spu: [{ _id: 'P2_prod' }],
  234. _id: 'ACGNME9W2U',
  235. child_cate: [],
  236. updatedAt: 1731488367913,
  237. },
  238. {
  239. owner: '1856254275343773698',
  240. image: 'https://qcloudimg.tencent-cloud.cn/raw/063123361b3a397f4ba6894591c3a006.png',
  241. createdAt: 1731488367571,
  242. createBy: '1856254275343773698',
  243. updateBy: '1856254275343773698',
  244. _openid: '1856254275343773698',
  245. name: '摆件',
  246. spu: [{ _id: 'P4_prod' }],
  247. _id: 'ACGNMD7TRS',
  248. child_cate: [],
  249. updatedAt: 1731488367571,
  250. },
  251. {
  252. owner: '1856254275343773698',
  253. image: 'https://qcloudimg.tencent-cloud.cn/raw/62eb1d8d8ea3b05302c199636f787438.png',
  254. createdAt: 1731488367273,
  255. createBy: '1856254275343773698',
  256. updateBy: '1856254275343773698',
  257. _openid: '1856254275343773698',
  258. name: '鞋子',
  259. spu: [{ _id: 'P3_prod' }],
  260. _id: 'ACGNMCB9N8',
  261. child_cate: [],
  262. updatedAt: 1731488367273,
  263. },
  264. {
  265. owner: '1856254275343773698',
  266. image: 'https://qcloudimg.tencent-cloud.cn/raw/ac3c9a255cae575661323fdcb8cae468.png',
  267. createdAt: 1731488367108,
  268. createBy: '1856254275343773698',
  269. updateBy: '1856254275343773698',
  270. _openid: '1856254275343773698',
  271. name: '箱包',
  272. spu: [{ _id: 'P1_prod' }],
  273. _id: 'ACGNMBTP4L',
  274. child_cate: [],
  275. updatedAt: 1731488367108,
  276. },
  277. ];
  278. export const ATTR_VALUE = [
  279. {
  280. owner: '1856254275343773698',
  281. createdAt: 1731488369101,
  282. createBy: '1856254275343773698',
  283. updateBy: '1856254275343773698',
  284. attr_name: { name: '数量', _id: 'N2_prod' },
  285. _openid: '1856254275343773698',
  286. _id: 'V4_prod',
  287. sku: [{ _id: 'K6_prod' }],
  288. value: '2 个',
  289. updatedAt: 1731488369101,
  290. },
  291. {
  292. owner: '1856254275343773698',
  293. createdAt: 1731488368972,
  294. createBy: '1856254275343773698',
  295. updateBy: '1856254275343773698',
  296. attr_name: { name: '数量', _id: 'N2_prod' },
  297. _openid: '1856254275343773698',
  298. _id: 'V3_prod',
  299. sku: [{ _id: 'K5_prod' }],
  300. value: '1 个',
  301. updatedAt: 1731488368972,
  302. },
  303. {
  304. owner: '1856254275343773698',
  305. createdAt: 1731488368836,
  306. createBy: '1856254275343773698',
  307. updateBy: '1856254275343773698',
  308. attr_name: { name: '尺码', _id: 'N1_prod' },
  309. _openid: '1856254275343773698',
  310. _id: 'V2_prod',
  311. sku: [{ _id: 'K4_prod' }],
  312. value: '34 码',
  313. updatedAt: 1731488368836,
  314. },
  315. {
  316. owner: '1856254275343773698',
  317. createdAt: 1731488368490,
  318. createBy: '1856254275343773698',
  319. updateBy: '1856254275343773698',
  320. attr_name: { name: '尺码', _id: 'N1_prod' },
  321. _openid: '1856254275343773698',
  322. _id: 'V1_prod',
  323. sku: [{ _id: 'K3_prod' }],
  324. value: '33 码',
  325. updatedAt: 1731488368490,
  326. },
  327. ];
  328. export const COMMENTS = [
  329. {
  330. owner: '1788891669799862274',
  331. createdAt: 1728899184779,
  332. createBy: '1788891669799862274',
  333. updateBy: '1788891669799862274',
  334. order_item: {
  335. _id: 'A6JRQ0YB2G',
  336. },
  337. spu: {
  338. _id: 'A3QFLUSAK2',
  339. },
  340. _openid: '1788891669799862274',
  341. rating: 5,
  342. _id: 'A6JRGRT6U8',
  343. reply: '',
  344. content: '好好好',
  345. updatedAt: 1728899339993,
  346. },
  347. ];
  348. COMMENTS.pop(); // 默认没数据,先塞后清是为了有编辑器提示
  349. export const CART_ITEM = [
  350. {
  351. count: 8,
  352. _id: 'A6JQYSJJSL',
  353. sku: {
  354. _id: 'A3QFLRCZFW',
  355. },
  356. },
  357. ];
  358. CART_ITEM.pop();
  359. export const DELIVERY_INFO = [
  360. {
  361. name: '客人a',
  362. address: '深圳湾一号',
  363. _id: 'A6JRPE3NYG',
  364. phone: '13858585858',
  365. },
  366. ];
  367. DELIVERY_INFO.pop();
  368. export const ORDER = [
  369. {
  370. status: '',
  371. delivery_info: { _id: '' },
  372. _id: '',
  373. },
  374. ];
  375. ORDER.pop();
  376. export const ORDER_ITEM = [
  377. {
  378. count: 0,
  379. sku: {
  380. _id: '',
  381. },
  382. order: {
  383. _id: '',
  384. },
  385. _id: '',
  386. },
  387. ];
  388. ORDER_ITEM.pop();