mall.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import {
  2. i18n
  3. } from '@/lang'
  4. function formatNum (num) {
  5. return (num.toFixed(0) + '').replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
  6. }
  7. let cameraName = {
  8. 7: `四维看看 三脚架套装`,
  9. 1: `四维看看 Lite二目相机`,
  10. 4: `四维看看 Pro八目相机`
  11. }
  12. let cameraNameEn = {
  13. 7: `4D KanKan Pro Tripod Set`,
  14. 1: `四维看看 Lite二目相机`,
  15. 4: `4DKanKan Pro Camera`
  16. }
  17. let detail = {
  18. 7: ['四维看看 三脚架套装(标准色)'],
  19. 1: [
  20. '四维看看 Lite二目相机(静谧黑)',
  21. '容量套餐(5G)',
  22. '四维看看 Lite专用三脚架(标准色)'
  23. ],
  24. 4: ['四维看看 Pro八目相机(静谧黑)', '容量套餐(10G)']
  25. }
  26. let detailEn = {
  27. 7: ['4D KanKan Pro Tripod Set (Standard)'],
  28. 1: [
  29. '四维看看 Lite二目相机(静谧黑)',
  30. '容量套餐(5G)',
  31. '四维看看 Lite专用三脚架(标准色)'
  32. ],
  33. 4: ['4DKanKan Pro Camera (Night Sky Black)', 'Storage Plan (10G)']
  34. }
  35. const price = 12800
  36. const zhijiaPrice = 899
  37. const goodsMap = {
  38. 4: {
  39. name: i18n.t('mall.kankanPro'),
  40. img: `${window.$app.$cdn}images/banner_pro.png`,
  41. detail: [`${i18n.t('mall.kankanPro')}(${i18n.t('mall.blackColor')})`, i18n.t('mall.voice')],
  42. price: price,
  43. skuSn: 'U15609161635760015'
  44. },
  45. 7: {
  46. name: i18n.t('mall.jiaojia'),
  47. img: `${window.$app.$cdn}images/zhijia.png`,
  48. detail: [`${i18n.t('mall.jiaojia')}(${i18n.t('mall.zhijiaColor')})`],
  49. price: zhijiaPrice,
  50. skuSn: 'U15604134406280073'
  51. }
  52. }
  53. export default {
  54. formatNum,
  55. price,
  56. zhijiaPrice,
  57. showPrice: formatNum(price),
  58. goodsMap
  59. }