template.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <?php
  2. return [
  3. [
  4. "name" => "商品模板", // 海报模板名称
  5. 'type' => 'shop_goods', // 海报类型
  6. "data" => [
  7. "global" => [
  8. "bgType" => "color",
  9. "bgColor" => "#ffffff",
  10. "bgUrl" => "",
  11. "width" => 720,
  12. "height" => 1280
  13. ],
  14. "value" => [
  15. [
  16. "id" => "2v1nc497xhc0",
  17. "componentName" => "GoodsImage",
  18. "componentTitle" => "商品图片",
  19. "type" => "image",
  20. "path" => "goods-image",
  21. "uses" => 1,
  22. "relate" => "goods_img",
  23. "value" => "",
  24. "width" => 720,
  25. "height" => 720,
  26. "minWidth" => 60,
  27. "minHeight" => 60,
  28. "x" => 0,
  29. "y" => 0,
  30. "angle" => 0,
  31. "zIndex" => 1
  32. ],
  33. [
  34. "id" => "29f3czpuw134",
  35. "componentName" => "GoodsName",
  36. "componentTitle" => "商品名称",
  37. "type" => "text",
  38. "path" => "goods-name",
  39. "uses" => 1,
  40. "relate" => "goods_name",
  41. "value" => "",
  42. "width" => 640,
  43. "height" => 94,
  44. "minWidth" => 120,
  45. "minHeight" => 44,
  46. "x" => 40,
  47. "y" => 760,
  48. "angle" => 0,
  49. "zIndex" => 2,
  50. "fontFamily" => "",
  51. "fontSize" => 44,
  52. "weight" => false,
  53. "space" => 0,
  54. "lineHeight" => 1,
  55. "fontColor" => "#303133"
  56. ],
  57. [
  58. "id" => "2vmf9ovhene0",
  59. "componentName" => "GoodsPrice",
  60. "componentTitle" => "商品价格",
  61. "type" => "text",
  62. "path" => "goods-price",
  63. "uses" => 1,
  64. "relate" => "goods_price",
  65. "value" => "",
  66. "width" => 330,
  67. "height" => 60,
  68. "minWidth" => 120,
  69. "minHeight" => 44,
  70. "x" => 40,
  71. "y" => 940,
  72. "weight" => false,
  73. "space" => 0,
  74. "lineHeight" => 0,
  75. "angle" => 0,
  76. "zIndex" => 3,
  77. "fontFamily" => "static/font/price.ttf",
  78. "fontSize" => 44,
  79. "fontColor" => "#E4163F"
  80. ],
  81. [
  82. "id" => "2vef9ovhene9",
  83. "componentName" => "GoodsMarketPrice",
  84. "componentTitle" => "划线价",
  85. "type" => "text",
  86. 'path' => "goods-market-price",
  87. "uses" => 1,
  88. 'relate' => 'goods_market_price',
  89. "value" => "",
  90. "width" => 330,
  91. "height" => 54,
  92. "minWidth" => 120,
  93. "minHeight" => 44,
  94. "x" => 40,
  95. "y" => 1040,
  96. "angle" => 0,
  97. "zIndex" => 4,
  98. "fontFamily" => "static/font/price.ttf",
  99. "fontSize" => 36,
  100. "weight" => false,
  101. "space" => 0,
  102. "lineHeight" => 0,
  103. "fontColor" => "#999999"
  104. ],
  105. [
  106. "id" => "2rlojy3o60i0",
  107. "componentName" => "Qrcode",
  108. "componentTitle" => "二维码",
  109. "type" => "qrcode",
  110. "path" => "qrcode",
  111. "uses" => 1,
  112. "relate" => "url",
  113. "value" => "",
  114. "width" => 200,
  115. "height" => 200,
  116. "minWidth" => 60,
  117. "minHeight" => 60,
  118. "x" => 480,
  119. "y" => 940,
  120. "angle" => 0,
  121. "zIndex" => 5
  122. ],
  123. [
  124. "id" => "7a18udv7t950",
  125. "componentName" => "draw",
  126. "componentTitle" => "绘画",
  127. "type" => "draw",
  128. "path" => "draw",
  129. "uses" => 1,
  130. "relate" => "draw",
  131. "value" => "",
  132. "width" => 720,
  133. "height" => 70,
  134. "minWidth" => 60,
  135. "minHeight" => 60,
  136. "x" => 0,
  137. "y" => 1206,
  138. "angle" => 0,
  139. "zIndex" => 6,
  140. "drawType" => "Polygon",
  141. "bgColor" => "#eeeeee",
  142. "points" => [
  143. [
  144. 0,
  145. 1206
  146. ],
  147. [
  148. 720,
  149. 1206
  150. ],
  151. [
  152. 720,
  153. 1280
  154. ],
  155. [
  156. 0,
  157. 1280
  158. ]
  159. ]
  160. ],
  161. [
  162. "id" => "6hlj5l3as0w0",
  163. "componentName" => "Text",
  164. "componentTitle" => "文本",
  165. "type" => "text",
  166. "path" => "text",
  167. "uses" => 0,
  168. "relate" => "",
  169. "value" => "长按识别图中的二维码查看商品详情",
  170. "width" => 512,
  171. "height" => 48,
  172. "minWidth" => 120,
  173. "minHeight" => 44,
  174. "x" => 110,
  175. "y" => 1230,
  176. "angle" => 0,
  177. "zIndex" => 7,
  178. "weight" => false,
  179. "space" => 0,
  180. "lineHeight" => 0,
  181. "fontFamily" => "",
  182. "fontSize" => 32,
  183. "fontColor" => "#666666"
  184. ],
  185. ]
  186. ]
  187. ]
  188. ];