templateData.js 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987
  1. // 模板数据
  2. export const templates = [
  3. {
  4. id: 'social-promo-1',
  5. name: '社交促销模板1',
  6. category: 'promotion',
  7. thumbnail: 'https://images.unsplash.com/photo-1607082349566-187342175e2f?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  8. fields: [
  9. { name: 'mainImage', type: 'image', label: '主图', default: 'https://images.unsplash.com/photo-1607082349566-187342175e2f?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  10. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ff5e62' },
  11. { name: 'textColor', type: 'color', label: '文字颜色', default: '#ffffff' },
  12. { name: 'title', type: 'text', label: '标题', default: '限时优惠' },
  13. { name: 'subtitle', type: 'text', label: '副标题', default: '全场商品5折起' },
  14. { name: 'date', type: 'text', label: '日期', default: '2023年12月1日-12月31日' },
  15. { name: 'footerText', type: 'text', label: '底部提示文字', default: '扫码或长按识别二维码' },
  16. { name: 'footerSubText', type: 'text', label: '底部副提示文字', default: '了解更多详情' }
  17. ],
  18. template: (data) => `
  19. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; color: ${data.textColor}; padding: 30px; font-family: Arial, sans-serif; position: relative; overflow: hidden;">
  20. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 40%; overflow: hidden;">
  21. <img src="${data.mainImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="主图">
  22. </div>
  23. <div style="position: absolute; bottom: 0; left: 0; width: 100%; height: 65%; background: linear-gradient(to bottom, rgba(0,0,0,0), ${data.bgColor} 20%); padding: 30px; display: flex; flex-direction: column; justify-content: flex-end;">
  24. <h1 style="font-size: 36px; margin-bottom: 15px; font-weight: 800; text-shadow: 2px 2px 4px rgba(0,0,0,0.3);">${data.title}</h1>
  25. <h2 style="font-size: 24px; margin-bottom: 20px; font-weight: 600;">${data.subtitle}</h2>
  26. <p style="font-size: 18px; margin-bottom: 30px;">${data.date}</p>
  27. <div style="width: 60px; height: 5px; background-color: ${data.textColor}; margin-bottom: 20px;"></div>
  28. <p style="font-size: 16px; font-style: italic;">${data.footerText}<br>${data.footerSubText}</p>
  29. </div>
  30. </div>
  31. `
  32. },
  33. {
  34. id: 'event-invitation-1',
  35. name: '活动邀请模板1',
  36. category: 'event',
  37. thumbnail: 'https://images.unsplash.com/photo-1492684223066-81342ee5ff30?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  38. fields: [
  39. { name: 'mainImage', type: 'image', label: '主图', default: 'https://images.unsplash.com/photo-1492684223066-81342ee5ff30?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  40. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#1a2a6c' },
  41. { name: 'accentColor', type: 'color', label: '强调色', default: '#fdbb2d' },
  42. { name: 'eventName', type: 'text', label: '活动名称', default: '新品发布会' },
  43. { name: 'eventDate', type: 'text', label: '活动日期', default: '2023年12月15日 14:00' },
  44. { name: 'eventLocation', type: 'text', label: '活动地点', default: '上海市浦东新区XX大厦' },
  45. { name: 'buttonText', type: 'text', label: '按钮文字', default: '诚挚邀请' },
  46. { name: 'footerText', type: 'text', label: '底部文字', default: '扫描二维码报名参加' }
  47. ],
  48. template: (data) => `
  49. <div style="width: 100%; height: 100%; background: linear-gradient(to bottom, ${data.bgColor}, #000000); color: white; font-family: 'Helvetica', sans-serif; position: relative; overflow: hidden;">
  50. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 50%; overflow: hidden;">
  51. <img src="${data.mainImage}" style="width: 100%; height: 100%; object-fit: cover; opacity: 0.8;" alt="活动图片">
  52. </div>
  53. <div style="position: absolute; top: 50%; left: 0; width: 100%; height: 50%; padding: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;">
  54. <h1 style="font-size: 32px; margin-bottom: 20px; color: ${data.accentColor}; text-transform: uppercase; letter-spacing: 2px;">${data.eventName}</h1>
  55. <div style="width: 50px; height: 3px; background-color: ${data.accentColor}; margin-bottom: 20px;"></div>
  56. <p style="font-size: 18px; margin-bottom: 10px;"><i class="fas fa-calendar-alt" style="margin-right: 10px; color: ${data.accentColor};"></i> ${data.eventDate}</p>
  57. <p style="font-size: 18px; margin-bottom: 30px;"><i class="fas fa-map-marker-alt" style="margin-right: 10px; color: ${data.accentColor};"></i> ${data.eventLocation}</p>
  58. <div style="padding: 15px 30px; background-color: ${data.accentColor}; color: #000; font-size: 18px; font-weight: bold; border-radius: 30px;">${data.buttonText}</div>
  59. </div>
  60. <div style="position: absolute; bottom: 10px; width: 100%; text-align: center; font-size: 14px; opacity: 0.7;">
  61. <p>${data.footerText}</p>
  62. </div>
  63. </div>
  64. `
  65. },
  66. {
  67. id: 'product-launch-1',
  68. name: '产品发布模板1',
  69. category: 'product',
  70. thumbnail: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  71. fields: [
  72. { name: 'productImage', type: 'image', label: '产品图片', default: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  73. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#f6f6f6' },
  74. { name: 'accentColor', type: 'color', label: '强调色', default: '#ff6b6b' },
  75. { name: 'productName', type: 'text', label: '产品名称', default: '智能手表 Pro' },
  76. { name: 'tagline', type: 'text', label: '产品标语', default: '科技引领未来' },
  77. { name: 'price', type: 'text', label: '产品价格', default: '¥1999' }
  78. ],
  79. template: (data) => `
  80. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'Arial', sans-serif; position: relative; overflow: hidden;">
  81. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 40%; background-color: ${data.accentColor}; border-bottom-right-radius: 50%; border-bottom-left-radius: 50%;"></div>
  82. <div style="position: absolute; top: 50px; left: 0; width: 100%; text-align: center; color: white;">
  83. <h1 style="font-size: 28px; font-weight: 700; margin-bottom: 10px;">${data.productName}</h1>
  84. <p style="font-size: 16px; font-style: italic;">${data.tagline}</p>
  85. </div>
  86. <div style="position: absolute; top: 180px; left: 50%; transform: translateX(-50%); width: 250px; height: 250px; border-radius: 50%; background-color: white; display: flex; justify-content: center; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1);">
  87. <img src="${data.productImage}" style="max-width: 80%; max-height: 80%; object-fit: contain;" alt="产品图片">
  88. </div>
  89. <div style="position: absolute; bottom: 100px; left: 0; width: 100%; text-align: center;">
  90. <p style="font-size: 16px; color: #666; margin-bottom: 15px;">限时特惠价</p>
  91. <h2 style="font-size: 36px; color: ${data.accentColor}; font-weight: 700; margin-bottom: 20px;">${data.price}</h2>
  92. <div style="padding: 12px 30px; background-color: ${data.accentColor}; color: white; font-size: 18px; font-weight: bold; border-radius: 30px; display: inline-block;">立即购买</div>
  93. </div>
  94. <div style="position: absolute; bottom: 30px; width: 100%; text-align: center; font-size: 14px; color: #666;">
  95. <p>长按识别二维码了解更多</p>
  96. </div>
  97. </div>
  98. `
  99. },
  100. {
  101. id: 'quote-1',
  102. name: '名言分享模板1',
  103. category: 'social',
  104. thumbnail: 'https://images.unsplash.com/photo-1507608616759-54f48f0af0ee?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  105. fields: [
  106. { name: 'bgImage', type: 'image', label: '背景图片', default: 'https://images.unsplash.com/photo-1507608616759-54f48f0af0ee?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  107. { name: 'overlayColor', type: 'color', label: '遮罩颜色', default: 'rgba(0, 0, 0, 0.4)' },
  108. { name: 'textColor', type: 'color', label: '文字颜色', default: '#ffffff' },
  109. { name: 'quote', type: 'textarea', label: '名言内容', default: '生活不是等待风暴过去,而是学会在雨中翩翩起舞。' },
  110. { name: 'author', type: 'text', label: '作者', default: '佚名' },
  111. ],
  112. template: (data) => `
  113. <div style="width: 100%; height: 100%; position: relative; font-family: 'Georgia', serif; overflow: hidden;">
  114. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
  115. <img src="${data.bgImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="背景图片">
  116. </div>
  117. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: ${data.overlayColor};"></div>
  118. <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; text-align: center; color: ${data.textColor};">
  119. <div style="font-size: 30px; margin-bottom: 20px;">"</div>
  120. <p style="font-size: 24px; line-height: 1.5; margin-bottom: 20px;">${data.quote}</p>
  121. <div style="font-size: 30px; margin-bottom: 20px;">"</div>
  122. <div style="width: 50px; height: 2px; background-color: ${data.textColor}; margin: 0 auto 20px;"></div>
  123. <p style="font-size: 18px; font-style: italic;">— ${data.author}</p>
  124. </div>
  125. <div style="position: absolute; bottom: 30px; width: 100%; text-align: center; color: ${data.textColor}; font-size: 14px;">
  126. <p>分享你的感悟</p>
  127. </div>
  128. </div>
  129. `
  130. },
  131. {
  132. id: 'food-recipe-1',
  133. name: '美食菜谱模板1',
  134. category: 'food',
  135. thumbnail: 'https://images.unsplash.com/photo-1476224203421-9ac39bcb3327?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  136. fields: [
  137. { name: 'foodImage', type: 'image', label: '菜品图片', default: 'https://images.unsplash.com/photo-1476224203421-9ac39bcb3327?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  138. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ffffff' },
  139. { name: 'accentColor', type: 'color', label: '强调色', default: '#ff9a3c' },
  140. { name: 'dishName', type: 'text', label: '菜品名称', default: '香煎三文鱼' },
  141. { name: 'description', type: 'textarea', label: '简短描述', default: '鲜嫩多汁,营养丰富的美味佳肴' },
  142. { name: 'cookTime', type: 'text', label: '烹饪时间', default: '25分钟' },
  143. ],
  144. template: (data) => `
  145. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'Montserrat', sans-serif; position: relative; overflow: hidden;">
  146. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 60%; overflow: hidden;">
  147. <img src="${data.foodImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="菜品图片">
  148. </div>
  149. <div style="position: absolute; top: 60%; left: 0; width: 100%; height: 40%; padding: 30px;">
  150. <div style="width: 60px; height: 5px; background-color: ${data.accentColor}; margin-bottom: 15px;"></div>
  151. <h1 style="font-size: 28px; color: #333; margin-bottom: 10px; font-weight: 700;">${data.dishName}</h1>
  152. <p style="font-size: 16px; color: #666; margin-bottom: 20px; line-height: 1.5;">${data.description}</p>
  153. <div style="display: flex; align-items: center; margin-bottom: 20px;">
  154. <div style="display: flex; align-items: center; margin-right: 20px;">
  155. <i class="fas fa-clock" style="color: ${data.accentColor}; margin-right: 8px;"></i>
  156. <span style="color: #666;">${data.cookTime}</span>
  157. </div>
  158. <div style="display: flex; align-items: center;">
  159. <i class="fas fa-utensils" style="color: ${data.accentColor}; margin-right: 8px;"></i>
  160. <span style="color: #666;">2人份</span>
  161. </div>
  162. </div>
  163. <div style="padding: 10px 20px; background-color: ${data.accentColor}; color: white; font-size: 16px; font-weight: 600; border-radius: 30px; display: inline-block;">查看完整食谱</div>
  164. </div>
  165. <div style="position: absolute; bottom: 20px; right: 20px; background-color: white; border-radius: 50%; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 8px rgba(0,0,0,0.1);">
  166. <i class="fas fa-qrcode" style="font-size: 30px; color: ${data.accentColor};"></i>
  167. </div>
  168. </div>
  169. `
  170. },
  171. {
  172. id: 'travel-1',
  173. name: '旅行分享模板1',
  174. category: 'travel',
  175. thumbnail: 'https://images.unsplash.com/photo-1519451241324-20b4ea2c4220?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  176. fields: [
  177. { name: 'travelImage', type: 'image', label: '旅行图片', default: 'https://images.unsplash.com/photo-1519451241324-20b4ea2c4220?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  178. { name: 'overlayColor', type: 'color', label: '遮罩颜色', default: 'rgba(0, 0, 0, 0.3)' },
  179. { name: 'accentColor', type: 'color', label: '强调色', default: '#4ecdc4' },
  180. { name: 'location', type: 'text', label: '地点名称', default: '巴厘岛' },
  181. { name: 'tagline', type: 'text', label: '标语', default: '遇见天堂般的美景' },
  182. { name: 'date', type: 'text', label: '日期', default: '2023年夏' },
  183. ],
  184. template: (data) => `
  185. <div style="width: 100%; height: 100%; position: relative; font-family: 'Roboto', sans-serif; overflow: hidden;">
  186. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
  187. <img src="${data.travelImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="旅行图片">
  188. </div>
  189. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, ${data.overlayColor}, rgba(0,0,0,0.7));"></div>
  190. <div style="position: absolute; bottom: 80px; left: 30px; color: white;">
  191. <p style="font-size: 18px; margin-bottom: 10px; letter-spacing: 2px;">${data.date}</p>
  192. <h1 style="font-size: 42px; font-weight: 700; margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);">${data.location}</h1>
  193. <div style="width: 60px; height: 4px; background-color: ${data.accentColor}; margin-bottom: 15px;"></div>
  194. <p style="font-size: 20px; font-style: italic; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);">${data.tagline}</p>
  195. </div>
  196. <div style="position: absolute; bottom: 30px; left: 30px; display: flex; align-items: center;">
  197. <div style="width: 40px; height: 40px; border-radius: 50%; background-color: ${data.accentColor}; display: flex; justify-content: center; align-items: center; margin-right: 15px;">
  198. <i class="fas fa-map-marker-alt" style="color: white; font-size: 20px;"></i>
  199. </div>
  200. <p style="color: white; font-size: 16px;">查看我的旅行攻略</p>
  201. </div>
  202. </div>
  203. `
  204. }
  205. ];
  206. // 添加更多模板...
  207. // 小红书风格模板
  208. export const xiaohongshuTemplates = [
  209. {
  210. id: 'xiaohongshu-1',
  211. name: '小红书风格1',
  212. category: 'xiaohongshu',
  213. thumbnail: 'https://images.unsplash.com/photo-1487412720507-e7ab37603c6f?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  214. fields: [
  215. { name: 'mainImage', type: 'image', label: '主图', default: 'https://images.unsplash.com/photo-1487412720507-e7ab37603c6f?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  216. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ffffff' },
  217. { name: 'accentColor', type: 'color', label: '强调色', default: '#ff4757' },
  218. { name: 'title', type: 'text', label: '标题', default: '这家店也太好吃了吧!绝对五星推荐!' },
  219. { name: 'content', type: 'textarea', label: '内容', default: '无意中发现的宝藏小店,环境超级好,菜品颜值和口味都很赞,价格也很实惠,强烈推荐大家来打卡!' },
  220. { name: 'tags', type: 'text', label: '标签', default: '#美食探店 #宝藏餐厅 #推荐' },
  221. ],
  222. template: (data) => `
  223. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden;">
  224. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 60%; overflow: hidden;">
  225. <img src="${data.mainImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="主图">
  226. </div>
  227. <div style="position: absolute; top: 60%; left: 0; width: 100%; height: 40%; padding: 20px; background-color: white; border-top-left-radius: 20px; border-top-right-radius: 20px; box-shadow: 0 -5px 15px rgba(0,0,0,0.05);">
  228. <h1 style="font-size: 20px; font-weight: 600; color: #333; margin-bottom: 15px; line-height: 1.4;">${data.title}</h1>
  229. <p style="font-size: 15px; color: #666; margin-bottom: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;">${data.content}</p>
  230. <p style="font-size: 14px; color: ${data.accentColor}; margin-bottom: 15px;">${data.tags}</p>
  231. <div style="display: flex; align-items: center; justify-content: space-between;">
  232. <div style="display: flex; align-items: center;">
  233. <div style="width: 30px; height: 30px; border-radius: 50%; background-color: #f5f5f5; margin-right: 10px; overflow: hidden;">
  234. <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&auto=format&fit=crop&w=60&h=60&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  235. </div>
  236. <span style="font-size: 14px; color: #333;">小红薯123</span>
  237. </div>
  238. <div style="display: flex; align-items: center;">
  239. <div style="display: flex; align-items: center; margin-right: 15px;">
  240. <i class="fas fa-heart" style="color: ${data.accentColor}; margin-right: 5px; font-size: 14px;"></i>
  241. <span style="font-size: 12px; color: #999;">258</span>
  242. </div>
  243. <div style="display: flex; align-items: center;">
  244. <i class="fas fa-comment" style="color: #999; margin-right: 5px; font-size: 14px;"></i>
  245. <span style="font-size: 12px; color: #999;">36</span>
  246. </div>
  247. </div>
  248. </div>
  249. </div>
  250. </div>
  251. `
  252. },
  253. {
  254. id: 'xiaohongshu-2',
  255. name: '小红书风格2',
  256. category: 'xiaohongshu',
  257. thumbnail: 'https://images.unsplash.com/photo-1469594292607-7bd90f8d3ba4?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  258. fields: [
  259. { name: 'mainImage', type: 'image', label: '主图', default: 'https://images.unsplash.com/photo-1469594292607-7bd90f8d3ba4?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  260. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#f9f9f9' },
  261. { name: 'accentColor', type: 'color', label: '强调色', default: '#ff4757' },
  262. { name: 'title', type: 'text', label: '标题', default: '超治愈的周末旅行,放空自己的绝佳去处' },
  263. { name: 'content', type: 'textarea', label: '内容', default: '周末和闺蜜一起去了这个小众景点,环境超级好,人也不多,拍照很出片,完全治愈了工作的疲惫~' },
  264. { name: 'tags', type: 'text', label: '标签', default: '#周末出行 #小众景点 #旅行 #治愈系' },
  265. ],
  266. template: (data) => `
  267. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 15px;">
  268. <div style="background-color: white; border-radius: 15px; overflow: hidden; height: 100%; box-shadow: 0 5px 15px rgba(0,0,0,0.05);">
  269. <div style="height: 55%; overflow: hidden;">
  270. <img src="${data.mainImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="主图">
  271. </div>
  272. <div style="padding: 20px; height: 45%; overflow: hidden;">
  273. <h1 style="font-size: 18px; font-weight: 600; color: #333; margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;">${data.title}</h1>
  274. <p style="font-size: 14px; color: #666; margin-bottom: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;">${data.content}</p>
  275. <p style="font-size: 13px; color: ${data.accentColor}; margin-bottom: 15px;">${data.tags}</p>
  276. <div style="display: flex; align-items: center; justify-content: space-between;">
  277. <div style="display: flex; align-items: center;">
  278. <div style="width: 28px; height: 28px; border-radius: 50%; background-color: #f5f5f5; margin-right: 8px; overflow: hidden;">
  279. <img src="https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-4.0.3&auto=format&fit=crop&w=60&h=60&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  280. </div>
  281. <span style="font-size: 13px; color: #333;">旅行达人</span>
  282. </div>
  283. <div style="display: flex; align-items: center;">
  284. <i class="fas fa-heart" style="color: ${data.accentColor}; margin-right: 3px; font-size: 13px;"></i>
  285. <span style="font-size: 12px; color: #999; margin-right: 10px;">462</span>
  286. <i class="fas fa-bookmark" style="color: #999; margin-right: 3px; font-size: 13px;"></i>
  287. <span style="font-size: 12px; color: #999;">89</span>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. `
  294. }
  295. ];
  296. // 朋友圈风格模板
  297. export const wechatMomentsTemplates = [
  298. {
  299. id: 'wechat-moments-1',
  300. name: '朋友圈风格1',
  301. category: 'wechat',
  302. thumbnail: 'https://images.unsplash.com/photo-1504674900247-0877df9cc836?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  303. fields: [
  304. { name: 'mainImage', type: 'image', label: '主图', default: 'https://images.unsplash.com/photo-1504674900247-0877df9cc836?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  305. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#f7f7f7' },
  306. { name: 'textColor', type: 'color', label: '文字颜色', default: '#333333' },
  307. { name: 'content', type: 'textarea', label: '内容', default: '今天的晚餐,色香味俱全,自己做的就是香!#美食 #晚餐' },
  308. { name: 'location', type: 'text', label: '位置', default: '家里的小厨房' },
  309. ],
  310. template: (data) => `
  311. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 20px;">
  312. <div style="background-color: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 15px;">
  313. <div style="display: flex; align-items: center; margin-bottom: 15px;">
  314. <div style="width: 40px; height: 40px; border-radius: 50%; background-color: #f5f5f5; margin-right: 10px; overflow: hidden;">
  315. <img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  316. </div>
  317. <div>
  318. <p style="font-size: 15px; font-weight: 600; color: ${data.textColor}; margin-bottom: 3px;">美食达人</p>
  319. <p style="font-size: 12px; color: #999;">2小时前</p>
  320. </div>
  321. </div>
  322. <p style="font-size: 15px; color: ${data.textColor}; margin-bottom: 15px; line-height: 1.5;">${data.content}</p>
  323. <div style="border-radius: 8px; overflow: hidden; margin-bottom: 12px;">
  324. <img src="${data.mainImage}" style="width: 100%; object-fit: cover;" alt="分享图片">
  325. </div>
  326. <div style="display: flex; align-items: center; margin-bottom: 12px;">
  327. <i class="fas fa-map-marker-alt" style="color: #999; margin-right: 5px; font-size: 12px;"></i>
  328. <span style="font-size: 12px; color: #576b95;">${data.location}</span>
  329. </div>
  330. <div style="display: flex; justify-content: flex-end; border-top: 1px solid #f0f0f0; padding-top: 12px;">
  331. <div style="display: flex; align-items: center; margin-right: 20px;">
  332. <i class="far fa-thumbs-up" style="color: #576b95; margin-right: 5px; font-size: 16px;"></i>
  333. <span style="font-size: 14px; color: #576b95;">赞</span>
  334. </div>
  335. <div style="display: flex; align-items: center;">
  336. <i class="far fa-comment" style="color: #576b95; margin-right: 5px; font-size: 16px;"></i>
  337. <span style="font-size: 14px; color: #576b95;">评论</span>
  338. </div>
  339. </div>
  340. </div>
  341. <div style="position: absolute; bottom: 20px; width: 100%; text-align: center; left: 0; font-size: 12px; color: #999;">
  342. <p>长按图片保存,发朋友圈</p>
  343. </div>
  344. </div>
  345. `
  346. },
  347. {
  348. id: 'wechat-moments-2',
  349. name: '朋友圈风格2',
  350. category: 'wechat',
  351. thumbnail: 'https://images.unsplash.com/photo-1529156069898-49953e39b3ac?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  352. fields: [
  353. { name: 'mainImage', type: 'image', label: '主图', default: 'https://images.unsplash.com/photo-1529156069898-49953e39b3ac?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  354. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#f7f7f7' },
  355. { name: 'accentColor', type: 'color', label: '强调色', default: '#576b95' },
  356. { name: 'content', type: 'textarea', label: '内容', default: '和好友共度美好时光,感恩遇见 🙏' },
  357. { name: 'time', type: 'text', label: '时间', default: '昨天 20:30' },
  358. ],
  359. template: (data) => `
  360. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 20px;">
  361. <div style="margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center;">
  362. <div style="display: flex; align-items: center;">
  363. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #f5f5f5; margin-right: 10px; overflow: hidden;">
  364. <img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  365. </div>
  366. <p style="font-size: 15px; font-weight: 600; color: #333;">生活记录者</p>
  367. </div>
  368. <p style="font-size: 12px; color: #999;">${data.time}</p>
  369. </div>
  370. <div style="background-color: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 15px;">
  371. <p style="font-size: 15px; color: #333; margin-bottom: 15px; line-height: 1.5;">${data.content}</p>
  372. <div style="border-radius: 8px; overflow: hidden; margin-bottom: 15px;">
  373. <img src="${data.mainImage}" style="width: 100%; object-fit: cover;" alt="分享图片">
  374. </div>
  375. <div style="display: flex; align-items: center; margin-top: 10px;">
  376. <div style="display: flex; align-items: center; margin-right: 15px;">
  377. <i class="fas fa-heart" style="color: ${data.accentColor}; margin-right: 5px; font-size: 14px;"></i>
  378. <span style="font-size: 14px; color: ${data.accentColor};">25</span>
  379. </div>
  380. <div style="height: 14px; width: 1px; background-color: #e0e0e0; margin-right: 15px;"></div>
  381. <div style="display: flex; align-items: center;">
  382. <i class="fas fa-comment" style="color: ${data.accentColor}; margin-right: 5px; font-size: 14px;"></i>
  383. <span style="font-size: 14px; color: ${data.accentColor};">8</span>
  384. </div>
  385. </div>
  386. </div>
  387. <div style="margin-top: 15px; background-color: white; border-radius: 8px; padding: 12px 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);">
  388. <div style="display: flex; margin-bottom: 8px;">
  389. <span style="font-size: 14px; color: ${data.accentColor}; font-weight: 500; margin-right: 5px;">张三:</span>
  390. <span style="font-size: 14px; color: #333;">真羡慕你们!下次带上我~</span>
  391. </div>
  392. <div style="display: flex;">
  393. <span style="font-size: 14px; color: ${data.accentColor}; font-weight: 500; margin-right: 5px;">李四:</span>
  394. <span style="font-size: 14px; color: #333;">看起来很开心,地点在哪里?</span>
  395. </div>
  396. </div>
  397. <div style="position: absolute; bottom: 20px; width: 100%; text-align: center; left: 0; font-size: 12px; color: #999;">
  398. <p>长按图片保存,发朋友圈</p>
  399. </div>
  400. </div>
  401. `
  402. }
  403. ];
  404. // 工作群分享模板
  405. export const workGroupTemplates = [
  406. {
  407. id: 'work-group-1',
  408. name: '工作群分享1',
  409. category: 'work',
  410. thumbnail: 'https://images.unsplash.com/photo-1542744173-8e7e53415bb0?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  411. fields: [
  412. { name: 'chartImage', type: 'image', label: '图表图片', default: 'https://images.unsplash.com/photo-1542744173-8e7e53415bb0?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  413. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ffffff' },
  414. { name: 'accentColor', type: 'color', label: '强调色', default: '#2c3e50' },
  415. { name: 'title', type: 'text', label: '标题', default: '本周业绩回顾与下周计划' },
  416. { name: 'content', type: 'textarea', label: '内容', default: '团队本周超额完成销售目标,达成率120%。下周将重点关注新产品推广和客户回访工作。' },
  417. { name: 'date', type: 'text', label: '日期', default: '2023年12月15日' },
  418. { name: 'targetValue', type: 'text', label: '目标达成率', default: '120%' },
  419. { name: 'growthValue', type: 'text', label: '同比增长率', default: '+15%' },
  420. { name: 'satisfactionValue', type: 'text', label: '客户满意度', default: '89%' },
  421. { name: 'authorTitle', type: 'text', label: '作者职位', default: '销售总监' },
  422. { name: 'authorRole', type: 'text', label: '作者角色', default: '团队负责人' },
  423. { name: 'buttonText', type: 'text', label: '按钮文字', default: '查看详情' }
  424. ],
  425. template: (data) => `
  426. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 20px;">
  427. <div style="background-color: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); height: calc(100% - 0px);">
  428. <div style="background-color: ${data.accentColor}; color: white; padding: 20px; position: relative;">
  429. <h1 style="font-size: 22px; font-weight: 600; margin-bottom: 10px;">${data.title}</h1>
  430. <p style="font-size: 14px;">${data.date}</p>
  431. <div style="position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background-color: rgba(255,255,255,0.2); display: flex; justify-content: center; align-items: center;">
  432. <i class="fas fa-chart-line" style="color: white; font-size: 20px;"></i>
  433. </div>
  434. </div>
  435. <div style="padding: 20px;">
  436. <p style="font-size: 16px; color: #333; margin-bottom: 20px; line-height: 1.6;">${data.content}</p>
  437. <div style="border-radius: 8px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
  438. <img src="${data.chartImage}" style="width: 100%; object-fit: cover;" alt="图表">
  439. </div>
  440. <div style="display: flex; justify-content: space-between; margin-top: 30px;">
  441. <div style="text-align: center; flex: 1;">
  442. <div style="font-size: 24px; font-weight: 600; color: ${data.accentColor}; margin-bottom: 5px;">${data.targetValue}</div>
  443. <p style="font-size: 14px; color: #666;">目标达成</p>
  444. </div>
  445. <div style="width: 1px; background-color: #e0e0e0;"></div>
  446. <div style="text-align: center; flex: 1;">
  447. <div style="font-size: 24px; font-weight: 600; color: ${data.accentColor}; margin-bottom: 5px;">${data.growthValue}</div>
  448. <p style="font-size: 14px; color: #666;">同比增长</p>
  449. </div>
  450. <div style="width: 1px; background-color: #e0e0e0;"></div>
  451. <div style="text-align: center; flex: 1;">
  452. <div style="font-size: 24px; font-weight: 600; color: ${data.accentColor}; margin-bottom: 5px;">${data.satisfactionValue}</div>
  453. <p style="font-size: 14px; color: #666;">客户满意度</p>
  454. </div>
  455. </div>
  456. </div>
  457. <div style="padding: 15px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center;">
  458. <div style="display: flex; align-items: center;">
  459. <div style="width: 32px; height: 32px; border-radius: 50%; background-color: #f5f5f5; margin-right: 10px; overflow: hidden;">
  460. <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  461. </div>
  462. <div>
  463. <p style="font-size: 14px; font-weight: 500; color: #333; margin-bottom: 2px;">${data.authorTitle}</p>
  464. <p style="font-size: 12px; color: #999;">${data.authorRole}</p>
  465. </div>
  466. </div>
  467. <div style="padding: 8px 15px; background-color: ${data.accentColor}; color: white; font-size: 14px; border-radius: 20px;">
  468. ${data.buttonText}
  469. </div>
  470. </div>
  471. </div>
  472. </div>
  473. `
  474. },
  475. {
  476. id: 'work-group-2',
  477. name: '工作群分享2',
  478. category: 'work',
  479. thumbnail: 'https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  480. fields: [
  481. { name: 'projectImage', type: 'image', label: '项目图片', default: 'https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  482. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#f8f9fa' },
  483. { name: 'accentColor', type: 'color', label: '强调色', default: '#3498db' },
  484. { name: 'title', type: 'text', label: '标题', default: '项目进度报告' },
  485. { name: 'projectName', type: 'text', label: '项目名称', default: '新零售系统升级' },
  486. { name: 'progress', type: 'text', label: '进度百分比', default: '75' },
  487. { name: 'startDate', type: 'text', label: '开始日期', default: '2023年10月15日' },
  488. { name: 'deadline', type: 'text', label: '截止日期', default: '2023年12月31日' },
  489. { name: 'teamMemberCount', type: 'text', label: '额外团队成员数', default: '+3' },
  490. { name: 'reportLinkText', type: 'text', label: '报告链接文字', default: '查看详细报告' },
  491. { name: 'shareLinkText', type: 'text', label: '分享链接文字', default: '分享' },
  492. { name: 'teamMembersLabel', type: 'text', label: '团队成员标签', default: '团队成员' },
  493. { name: 'progressLabel', type: 'text', label: '进度标签', default: '项目进度' },
  494. { name: 'startDateLabel', type: 'text', label: '开始日期标签', default: '开始日期' },
  495. { name: 'deadlineLabel', type: 'text', label: '截止日期标签', default: '截止日期' }
  496. ],
  497. template: (data) => `
  498. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 20px;">
  499. <div style="background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); height: calc(100% - 40px);">
  500. <div style="height: 40%; overflow: hidden; position: relative;">
  501. <img src="${data.projectImage}" style="width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85);" alt="项目图片">
  502. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6)); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;">
  503. <h1 style="font-size: 24px; font-weight: 600; color: white; margin-bottom: 10px;">${data.title}</h1>
  504. <div style="display: flex; align-items: center;">
  505. <div style="width: 10px; height: 10px; border-radius: 50%; background-color: #2ecc71; margin-right: 8px;"></div>
  506. <p style="font-size: 14px; color: white;">${data.projectName}</p>
  507. </div>
  508. </div>
  509. </div>
  510. <div style="padding: 25px;">
  511. <div style="margin-bottom: 25px;">
  512. <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
  513. <p style="font-size: 16px; color: #333; font-weight: 500;">${data.progressLabel}</p>
  514. <p style="font-size: 16px; font-weight: 600; color: ${data.accentColor};">${data.progress}%</p>
  515. </div>
  516. <div style="width: 100%; height: 8px; background-color: #e0e0e0; border-radius: 4px; overflow: hidden;">
  517. <div style="width: ${data.progress}%; height: 100%; background-color: ${data.accentColor};"></div>
  518. </div>
  519. </div>
  520. <div style="display: flex; margin-bottom: 25px;">
  521. <div style="flex: 1; border-right: 1px solid #e0e0e0; padding-right: 15px;">
  522. <p style="font-size: 13px; color: #666; margin-bottom: 5px;">${data.startDateLabel}</p>
  523. <p style="font-size: 15px; color: #333; font-weight: 500;">${data.startDate}</p>
  524. </div>
  525. <div style="flex: 1; padding-left: 15px;">
  526. <p style="font-size: 13px; color: #666; margin-bottom: 5px;">${data.deadlineLabel}</p>
  527. <p style="font-size: 15px; color: #333; font-weight: 500;">${data.deadline}</p>
  528. </div>
  529. </div>
  530. <div style="margin-bottom: 25px;">
  531. <p style="font-size: 16px; color: #333; font-weight: 500; margin-bottom: 10px;">${data.teamMembersLabel}</p>
  532. <div style="display: flex;">
  533. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #f5f5f5; border: 2px solid white; overflow: hidden; margin-right: -10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
  534. <img src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="成员1">
  535. </div>
  536. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #f5f5f5; border: 2px solid white; overflow: hidden; margin-right: -10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
  537. <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="成员2">
  538. </div>
  539. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #f5f5f5; border: 2px solid white; overflow: hidden; margin-right: -10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
  540. <img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="成员3">
  541. </div>
  542. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: ${data.accentColor}; border: 2px solid white; overflow: hidden; display: flex; justify-content: center; align-items: center; color: white; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
  543. ${data.teamMemberCount}
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. <div style="padding: 15px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between;">
  549. <div style="display: flex; align-items: center; color: ${data.accentColor}; font-size: 14px;">
  550. <i class="fas fa-file-alt" style="margin-right: 8px;"></i>
  551. <span>${data.reportLinkText}</span>
  552. </div>
  553. <div style="display: flex; align-items: center; color: ${data.accentColor}; font-size: 14px;">
  554. <i class="fas fa-share-alt" style="margin-right: 8px;"></i>
  555. <span>${data.shareLinkText}</span>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. `
  561. }
  562. ];
  563. // 技术团队模板
  564. export const techTemplates = [
  565. {
  566. id: 'tech-report-1',
  567. name: '技术周报模板',
  568. category: 'tech',
  569. thumbnail: 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  570. fields: [
  571. { name: 'bgImage', type: 'image', label: '背景图片', default: 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  572. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#1e272e' },
  573. { name: 'accentColor', type: 'color', label: '强调色', default: '#0984e3' },
  574. { name: 'title', type: 'text', label: '标题', default: '技术团队周报' },
  575. { name: 'week', type: 'text', label: '周期', default: '2023年第48周' },
  576. { name: 'achievements', type: 'textarea', label: '主要成果', default: '1. 完成用户中心重构\n2. 修复了5个关键性Bug\n3. 性能优化提升30%' },
  577. { name: 'nextWeek', type: 'textarea', label: '下周计划', default: '1. 开始新功能开发\n2. 进行代码审查\n3. 优化CI/CD流程' },
  578. { name: 'bugFixCount', type: 'text', label: 'Bug修复数量', default: '5' },
  579. { name: 'newFeatureCount', type: 'text', label: '新功能数量', default: '2' },
  580. { name: 'performanceImprovement', type: 'text', label: '性能提升', default: '30%' },
  581. { name: 'bugFixLabel', type: 'text', label: 'Bug修复标签', default: 'Bug修复' },
  582. { name: 'newFeatureLabel', type: 'text', label: '新功能标签', default: '新功能' },
  583. { name: 'performanceLabel', type: 'text', label: '性能标签', default: '性能提升' },
  584. { name: 'achievementsTitle', type: 'text', label: '成果标题', default: '本周成果' },
  585. { name: 'nextWeekTitle', type: 'text', label: '计划标题', default: '下周计划' },
  586. { name: 'footerText', type: 'text', label: '页脚文本', default: '技术团队 © 2023' }
  587. ],
  588. template: (data) => `
  589. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'Roboto', 'PingFang SC', sans-serif; position: relative; overflow: hidden; padding: 20px; color: white;">
  590. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 30%; opacity: 0.2;">
  591. <img src="${data.bgImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="背景图片">
  592. </div>
  593. <div style="position: relative; z-index: 2; padding: 15px;">
  594. <h1 style="font-size: 28px; font-weight: 700; margin-bottom: 10px; color: white;">${data.title}</h1>
  595. <div style="width: 50px; height: 4px; background-color: ${data.accentColor}; margin-bottom: 15px;"></div>
  596. <p style="font-size: 16px; margin-bottom: 25px; color: #dfe6e9;">${data.week}</p>
  597. <div style="margin-bottom: 25px;">
  598. <h2 style="font-size: 18px; font-weight: 600; margin-bottom: 15px; color: ${data.accentColor};">${data.achievementsTitle}</h2>
  599. <div style="background-color: rgba(0, 0, 0, 0.2); border-radius: 8px; padding: 15px;">
  600. <p style="font-size: 15px; line-height: 1.6; white-space: pre-line;">${data.achievements}</p>
  601. </div>
  602. </div>
  603. <div style="margin-bottom: 25px;">
  604. <h2 style="font-size: 18px; font-weight: 600; margin-bottom: 15px; color: ${data.accentColor};">${data.nextWeekTitle}</h2>
  605. <div style="background-color: rgba(0, 0, 0, 0.2); border-radius: 8px; padding: 15px;">
  606. <p style="font-size: 15px; line-height: 1.6; white-space: pre-line;">${data.nextWeek}</p>
  607. </div>
  608. </div>
  609. <div style="display: flex; justify-content: space-between; margin-top: 30px;">
  610. <div style="text-align: center; background-color: rgba(0, 0, 0, 0.3); padding: 10px; border-radius: 8px; flex: 1; margin-right: 10px;">
  611. <p style="font-size: 24px; font-weight: 700; color: ${data.accentColor};">${data.bugFixCount}</p>
  612. <p style="font-size: 14px; color: #dfe6e9;">${data.bugFixLabel}</p>
  613. </div>
  614. <div style="text-align: center; background-color: rgba(0, 0, 0, 0.3); padding: 10px; border-radius: 8px; flex: 1; margin-right: 10px;">
  615. <p style="font-size: 24px; font-weight: 700; color: ${data.accentColor};">${data.newFeatureCount}</p>
  616. <p style="font-size: 14px; color: #dfe6e9;">${data.newFeatureLabel}</p>
  617. </div>
  618. <div style="text-align: center; background-color: rgba(0, 0, 0, 0.3); padding: 10px; border-radius: 8px; flex: 1;">
  619. <p style="font-size: 24px; font-weight: 700; color: ${data.accentColor};">${data.performanceImprovement}</p>
  620. <p style="font-size: 14px; color: #dfe6e9;">${data.performanceLabel}</p>
  621. </div>
  622. </div>
  623. </div>
  624. <div style="position: absolute; bottom: 20px; right: 20px; font-size: 14px; color: #dfe6e9;">
  625. <p>${data.footerText}</p>
  626. </div>
  627. </div>
  628. `
  629. },
  630. {
  631. id: 'code-share-1',
  632. name: '代码分享模板',
  633. category: 'tech',
  634. thumbnail: 'https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  635. fields: [
  636. { name: 'codeImage', type: 'image', label: '代码截图', default: 'https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  637. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#282c34' },
  638. { name: 'accentColor', type: 'color', label: '强调色', default: '#61dafb' },
  639. { name: 'title', type: 'text', label: '标题', default: '优雅的代码解决方案' },
  640. { name: 'language', type: 'text', label: '编程语言', default: 'JavaScript' },
  641. { name: 'description', type: 'textarea', label: '描述', default: '这个优化方案将原本O(n²)的算法复杂度降低到了O(n),大幅提升了性能。' },
  642. ],
  643. template: (data) => `
  644. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'Fira Code', 'Source Code Pro', monospace; position: relative; overflow: hidden; padding: 20px; color: #abb2bf;">
  645. <div style="position: relative; z-index: 2;">
  646. <div style="display: flex; align-items: center; margin-bottom: 20px;">
  647. <div style="width: 12px; height: 12px; border-radius: 50%; background-color: #ff5f56; margin-right: 8px;"></div>
  648. <div style="width: 12px; height: 12px; border-radius: 50%; background-color: #ffbd2e; margin-right: 8px;"></div>
  649. <div style="width: 12px; height: 12px; border-radius: 50%; background-color: #27c93f; margin-right: 15px;"></div>
  650. <p style="font-size: 14px; color: #dfe6e9;">${data.language} - Code Snippet</p>
  651. </div>
  652. <h1 style="font-size: 24px; font-weight: 600; margin-bottom: 15px; color: ${data.accentColor};">${data.title}</h1>
  653. <div style="background-color: rgba(0, 0, 0, 0.3); border-radius: 8px; padding: 15px; margin-bottom: 20px; max-height: 300px; overflow: hidden;">
  654. <img src="${data.codeImage}" style="width: 100%; object-fit: contain;" alt="代码截图">
  655. </div>
  656. <div style="background-color: rgba(0, 0, 0, 0.2); border-radius: 8px; padding: 15px; margin-bottom: 20px;">
  657. <p style="font-size: 15px; line-height: 1.6;">${data.description}</p>
  658. </div>
  659. <div style="display: flex; justify-content: space-between; margin-top: 30px;">
  660. <div style="display: flex; align-items: center;">
  661. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #2d3436; margin-right: 10px; overflow: hidden;">
  662. <img src="https://images.unsplash.com/photo-1531427186611-ecfd6d936c79?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  663. </div>
  664. <div>
  665. <p style="font-size: 14px; color: white; margin-bottom: 2px;">高级开发工程师</p>
  666. <p style="font-size: 12px; color: #dfe6e9;">技术架构组</p>
  667. </div>
  668. </div>
  669. <div style="display: flex; align-items: center;">
  670. <div style="padding: 8px 15px; background-color: ${data.accentColor}; color: ${data.bgColor}; font-size: 14px; border-radius: 4px; font-weight: 600;">
  671. 查看完整代码
  672. </div>
  673. </div>
  674. </div>
  675. </div>
  676. </div>
  677. `
  678. }
  679. ];
  680. // 产品团队模板
  681. export const productTemplates = [
  682. {
  683. id: 'product-roadmap-1',
  684. name: '产品路线图',
  685. category: 'product',
  686. thumbnail: 'https://images.unsplash.com/photo-1572177812156-58036aae439c?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  687. fields: [
  688. { name: 'productImage', type: 'image', label: '产品图片', default: 'https://images.unsplash.com/photo-1572177812156-58036aae439c?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  689. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ffffff' },
  690. { name: 'accentColor', type: 'color', label: '强调色', default: '#6c5ce7' },
  691. { name: 'title', type: 'text', label: '标题', default: '2024年产品路线图' },
  692. { name: 'q1Goals', type: 'textarea', label: 'Q1目标', default: '用户体验优化\n核心功能重构\n新用户引导流程' },
  693. { name: 'q2Goals', type: 'textarea', label: 'Q2目标', default: '数据分析平台\n企业版功能\nAPI升级' },
  694. ],
  695. template: (data) => `
  696. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden;">
  697. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 40%; overflow: hidden;">
  698. <img src="${data.productImage}" style="width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9);" alt="产品图片">
  699. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0), ${data.bgColor});"></div>
  700. </div>
  701. <div style="position: absolute; top: 30px; left: 30px; right: 30px;">
  702. <h1 style="font-size: 28px; font-weight: 700; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.3);">${data.title}</h1>
  703. </div>
  704. <div style="position: absolute; top: 35%; left: 0; width: 100%; padding: 30px;">
  705. <div style="display: flex; margin-bottom: 30px;">
  706. <div style="flex: 1; margin-right: 20px;">
  707. <div style="display: flex; align-items: center; margin: 15px 0;">
  708. <div style="width: 30px; height: 30px; border-radius: 50%; background-color: ${data.accentColor}; color: white; display: flex; justify-content: center; align-items: center; margin-right: 10px; font-weight: 600;">Q1</div>
  709. <h2 style="font-size: 18px; font-weight: 600; color: #333;">1-3月</h2>
  710. </div>
  711. <div style="background-color: #f5f7fa; border-radius: 8px; padding: 15px; border-left: 4px solid ${data.accentColor};">
  712. <p style="font-size: 15px; line-height: 1.6; color: #333; white-space: pre-line;">${data.q1Goals}</p>
  713. </div>
  714. </div>
  715. <div style="flex: 1;">
  716. <div style="display: flex; align-items: center; margin: 15px 0; ">
  717. <div style="width: 30px; height: 30px; border-radius: 50%; background-color: ${data.accentColor}; color: white; display: flex; justify-content: center; align-items: center; margin-right: 10px; font-weight: 600;">Q2</div>
  718. <h2 style="font-size: 18px; font-weight: 600; color: #333;">4-6月</h2>
  719. </div>
  720. <div style="background-color: #f5f7fa; border-radius: 8px; padding: 15px; border-left: 4px solid ${data.accentColor};">
  721. <p style="font-size: 15px; line-height: 1.6; color: #333; white-space: pre-line;">${data.q2Goals}</p>
  722. </div>
  723. </div>
  724. </div>
  725. <div style="background-color: ${data.accentColor}; border-radius: 8px; padding: 20px; color: white;">
  726. <h3 style="font-size: 18px; font-weight: 600; margin-bottom: 10px;">关键指标</h3>
  727. <div style="display: flex; justify-content: space-between;">
  728. <div style="text-align: center; flex: 1;">
  729. <p style="font-size: 24px; font-weight: 700; margin-bottom: 5px;">+30%</p>
  730. <p style="font-size: 14px;">用户增长</p>
  731. </div>
  732. <div style="text-align: center; flex: 1;">
  733. <p style="font-size: 24px; font-weight: 700; margin-bottom: 5px;">-25%</p>
  734. <p style="font-size: 14px;">流失率</p>
  735. </div>
  736. <div style="text-align: center; flex: 1;">
  737. <p style="font-size: 24px; font-weight: 700; margin-bottom: 5px;">+45%</p>
  738. <p style="font-size: 14px;">转化率</p>
  739. </div>
  740. </div>
  741. </div>
  742. </div>
  743. <div style="position: absolute; bottom: 20px; right: 30px; display: flex; align-items: center;">
  744. <p style="font-size: 14px; color: #666; margin-right: 10px;">由产品团队制作</p>
  745. <div style="width: 30px; height: 30px; border-radius: 50%; background-color: ${data.accentColor}; display: flex; justify-content: center; align-items: center;">
  746. <i class="fas fa-rocket" style="color: white; font-size: 14px;"></i>
  747. </div>
  748. </div>
  749. </div>
  750. `
  751. },
  752. {
  753. id: 'user-research-1',
  754. name: '用户研究报告',
  755. category: 'product',
  756. thumbnail: 'https://images.unsplash.com/photo-1551836022-d5d88e9218df?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  757. fields: [
  758. { name: 'researchImage', type: 'image', label: '研究图片', default: 'https://images.unsplash.com/photo-1551836022-d5d88e9218df?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  759. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#f5f7fa' },
  760. { name: 'accentColor', type: 'color', label: '强调色', default: '#00b894' },
  761. { name: 'title', type: 'text', label: '标题', default: '用户研究报告' },
  762. { name: 'subtitle', type: 'text', label: '副标题', default: '核心用户行为分析' },
  763. { name: 'findings', type: 'textarea', label: '主要发现', default: '1. 80%的用户在首次使用时遇到了导航困难\n2. 核心功能的使用频率低于预期\n3. 用户对新功能的接受度高' },
  764. { name: 'recommendations', type: 'textarea', label: '改进建议', default: '1. 优化首页导航结构\n2. 增强核心功能的引导\n3. 加快新功能的迭代速度' },
  765. ],
  766. template: (data) => `
  767. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 25px;">
  768. <div style="background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); height: calc(100% - 50px);">
  769. <div style="padding: 25px;">
  770. <div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;">
  771. <div>
  772. <h1 style="font-size: 24px; font-weight: 700; color: #333; margin-bottom: 8px;">${data.title}</h1>
  773. <p style="font-size: 16px; color: #666;">${data.subtitle}</p>
  774. </div>
  775. <div style="width: 50px; height: 50px; border-radius: 50%; background-color: ${data.accentColor}; display: flex; justify-content: center; align-items: center;">
  776. <i class="fas fa-user-check" style="color: white; font-size: 20px;"></i>
  777. </div>
  778. </div>
  779. <div style="display: flex; gap: 20px; margin-bottom: 25px;">
  780. <div style="flex: 1;">
  781. <img src="${data.researchImage}" style="width: 100%; height: 180px; object-fit: cover; border-radius: 8px;" alt="研究图片">
  782. </div>
  783. <div style="flex: 1; display: flex; flex-direction: column; justify-content: space-between;">
  784. <div style="background-color: ${data.accentColor}; border-radius: 8px; padding: 15px; color: white; margin-bottom: 10px;">
  785. <p style="font-size: 14px; margin-bottom: 5px;">参与用户</p>
  786. <p style="font-size: 28px; font-weight: 700;">120</p>
  787. </div>
  788. <div style="display: flex; gap: 10px;">
  789. <div style="flex: 1; background-color: #f5f7fa; border-radius: 8px; padding: 15px;">
  790. <p style="font-size: 14px; color: #666; margin-bottom: 5px;">满意度</p>
  791. <p style="font-size: 22px; font-weight: 600; color: #333;">78%</p>
  792. </div>
  793. <div style="flex: 1; background-color: #f5f7fa; border-radius: 8px; padding: 15px;">
  794. <p style="font-size: 14px; color: #666; margin-bottom: 5px;">完成率</p>
  795. <p style="font-size: 22px; font-weight: 600; color: #333;">65%</p>
  796. </div>
  797. </div>
  798. </div>
  799. </div>
  800. <div style="margin-bottom: 25px;">
  801. <h2 style="font-size: 18px; font-weight: 600; color: #333; margin-bottom: 12px; display: flex; align-items: center;">
  802. <i class="fas fa-lightbulb" style="color: ${data.accentColor}; margin-right: 8px;"></i>
  803. 主要发现
  804. </h2>
  805. <div style="background-color: #f5f7fa; border-radius: 8px; padding: 15px;">
  806. <p style="font-size: 15px; line-height: 1.6; color: #333; white-space: pre-line;">${data.findings}</p>
  807. </div>
  808. </div>
  809. <div>
  810. <h2 style="font-size: 18px; font-weight: 600; color: #333; margin-bottom: 12px; display: flex; align-items: center;">
  811. <i class="fas fa-clipboard-check" style="color: ${data.accentColor}; margin-right: 8px;"></i>
  812. 改进建议
  813. </h2>
  814. <div style="background-color: #f5f7fa; border-radius: 8px; padding: 15px;">
  815. <p style="font-size: 15px; line-height: 1.6; color: #333; white-space: pre-line;">${data.recommendations}</p>
  816. </div>
  817. </div>
  818. </div>
  819. <div style="padding: 15px 25px; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center;">
  820. <div style="display: flex; align-items: center;">
  821. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #f5f7fa; margin-right: 10px; overflow: hidden;">
  822. <img src="https://images.unsplash.com/photo-1573497019940-1c28c88b4f3e?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  823. </div>
  824. <div>
  825. <p style="font-size: 14px; font-weight: 500; color: #333; margin-bottom: 2px;">用户体验设计师</p>
  826. <p style="font-size: 12px; color: #999;">产品团队</p>
  827. </div>
  828. </div>
  829. <p style="font-size: 14px; color: #999;">2023年12月</p>
  830. </div>
  831. </div>
  832. </div>
  833. `
  834. }
  835. ];
  836. // 运营团队模板
  837. export const operationTemplates = [
  838. {
  839. id: 'data-report-1',
  840. name: '数据分析报告',
  841. category: 'operation',
  842. thumbnail: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  843. fields: [
  844. { name: 'chartImage', type: 'image', label: '图表图片', default: 'https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  845. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ffffff' },
  846. { name: 'accentColor', type: 'color', label: '强调色', default: '#fd79a8' },
  847. { name: 'title', type: 'text', label: '标题', default: '11月营销活动分析报告' },
  848. { name: 'highlights', type: 'textarea', label: '亮点', default: '1. 新用户增长率达到35%,超过目标25%\n2. 活动转化率提升40%\n3. 社交媒体互动量增长60%' },
  849. { name: 'nextSteps', type: 'textarea', label: '下一步计划', default: '1. 扩大社交媒体投放\n2. 优化转化漏斗\n3. 增加会员专属活动' },
  850. ],
  851. template: (data) => `
  852. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden; padding: 20px;">
  853. <div style="background: linear-gradient(135deg, ${data.accentColor}, #a29bfe); border-radius: 15px 15px 0 0; padding: 25px; color: white;">
  854. <h1 style="font-size: 24px; font-weight: 700; margin-bottom: 10px;">${data.title}</h1>
  855. <p style="font-size: 14px; opacity: 0.9;">运营数据分析 · 2023年11月</p>
  856. </div>
  857. <div style="background-color: white; border-radius: 0 0 15px 15px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.05);">
  858. <div style="margin-bottom: 25px;">
  859. <img src="${data.chartImage}" style="width: 100%; height: 200px; object-fit: cover; border-radius: 8px;" alt="数据图表">
  860. </div>
  861. <div style="display: flex; justify-content: space-between; margin-bottom: 25px;">
  862. <div style="text-align: center; flex: 1; padding: 15px; border-radius: 8px; background-color: #f8f9fa;">
  863. <p style="font-size: 28px; font-weight: 700; color: ${data.accentColor}; margin-bottom: 5px;">35%</p>
  864. <p style="font-size: 14px; color: #666;">新用户增长</p>
  865. </div>
  866. <div style="text-align: center; flex: 1; padding: 15px; border-radius: 8px; background-color: #f8f9fa; margin: 0 15px;">
  867. <p style="font-size: 28px; font-weight: 700; color: ${data.accentColor}; margin-bottom: 5px;">40%</p>
  868. <p style="font-size: 14px; color: #666;">转化率提升</p>
  869. </div>
  870. <div style="text-align: center; flex: 1; padding: 15px; border-radius: 8px; background-color: #f8f9fa;">
  871. <p style="font-size: 28px; font-weight: 700; color: ${data.accentColor}; margin-bottom: 5px;">60%</p>
  872. <p style="font-size: 14px; color: #666;">互动量增长</p>
  873. </div>
  874. </div>
  875. <div style="margin-bottom: 25px;">
  876. <h2 style="font-size: 18px; font-weight: 600; color: #333; margin-bottom: 12px; display: flex; align-items: center;">
  877. <i class="fas fa-chart-line" style="color: ${data.accentColor}; margin-right: 8px;"></i>
  878. 活动亮点
  879. </h2>
  880. <div style="background-color: #f8f9fa; border-radius: 8px; padding: 15px;">
  881. <p style="font-size: 15px; line-height: 1.6; color: #333; white-space: pre-line;">${data.highlights}</p>
  882. </div>
  883. </div>
  884. <div>
  885. <h2 style="font-size: 18px; font-weight: 600; color: #333; margin-bottom: 12px; display: flex; align-items: center;">
  886. <i class="fas fa-tasks" style="color: ${data.accentColor}; margin-right: 8px;"></i>
  887. 下一步计划
  888. </h2>
  889. <div style="background-color: #f8f9fa; border-radius: 8px; padding: 15px;">
  890. <p style="font-size: 15px; line-height: 1.6; color: #333; white-space: pre-line;">${data.nextSteps}</p>
  891. </div>
  892. </div>
  893. </div>
  894. <div style="position: absolute; bottom: 30px; right: 30px; display: flex; align-items: center;">
  895. <div style="width: 36px; height: 36px; border-radius: 50%; background-color: #f5f7fa; margin-right: 10px; overflow: hidden;">
  896. <img src="https://images.unsplash.com/photo-1573497019940-1c28c88b4f3e?ixlib=rb-4.0.3&auto=format&fit=crop&w=80&h=80&q=80" style="width: 100%; height: 100%; object-fit: cover;" alt="用户头像">
  897. </div>
  898. <div>
  899. <p style="font-size: 14px; font-weight: 500; color: #333; margin-bottom: 2px;">增长运营专家</p>
  900. <p style="font-size: 12px; color: #999;">运营团队</p>
  901. </div>
  902. </div>
  903. </div>
  904. `
  905. },
  906. {
  907. id: 'campaign-1',
  908. name: '营销活动海报',
  909. category: 'operation',
  910. thumbnail: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=240&h=240&q=80',
  911. fields: [
  912. { name: 'campaignImage', type: 'image', label: '活动图片', default: 'https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80' },
  913. { name: 'bgColor', type: 'color', label: '背景颜色', default: '#ffeaa7' },
  914. { name: 'accentColor', type: 'color', label: '强调色', default: '#d63031' },
  915. { name: 'title', type: 'text', label: '活动标题', default: '年末狂欢购物节' },
  916. { name: 'subtitle', type: 'text', label: '副标题', default: '全场低至5折,多重好礼等你拿' },
  917. { name: 'period', type: 'text', label: '活动时间', default: '12月18日-12月31日' },
  918. { name: 'highlights', type: 'textarea', label: '活动亮点', default: '1. 爆品限时秒杀\n2. 满300减100\n3. 新用户专享券\n4. 会员额外95折' },
  919. ],
  920. template: (data) => `
  921. <div style="width: 100%; height: 100%; background-color: ${data.bgColor}; font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; position: relative; overflow: hidden;">
  922. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 50%; overflow: hidden;">
  923. <img src="${data.campaignImage}" style="width: 100%; height: 100%; object-fit: cover;" alt="活动图片">
  924. <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));"></div>
  925. </div>
  926. <div style="position: absolute; top: 30px; right: 30px; background-color: ${data.accentColor}; color: white; padding: 8px 15px; border-radius: 20px; font-size: 14px; font-weight: 600; transform: rotate(5deg); box-shadow: 0 3px 10px rgba(0,0,0,0.2);">
  927. 限时活动
  928. </div>
  929. <div style="position: absolute; top: 50%; left: 0; width: 100%; transform: translateY(-50%); padding: 0 30px; text-align: center;">
  930. <h1 style="font-size: 36px; font-weight: 800; color: white; margin-bottom: 10px; text-shadow: 0 2px 5px rgba(0,0,0,0.3);">${data.title}</h1>
  931. <p style="font-size: 18px; color: white; margin-bottom: 5px; text-shadow: 0 1px 3px rgba(0,0,0,0.3);">${data.subtitle}</p>
  932. </div>
  933. <div style="position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background-color: white; border-top-left-radius: 30px; border-top-right-radius: 30px; padding: 30px; box-shadow: 0 -5px 20px rgba(0,0,0,0.1);">
  934. <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
  935. <h2 style="font-size: 20px; font-weight: 600; color: #333;">活动详情</h2>
  936. <div style="padding: 5px 12px; background-color: #f8f9fa; border-radius: 15px; font-size: 14px; color: #666;">${data.period}</div>
  937. </div>
  938. <div style="margin-bottom: 25px;">
  939. <div style="background-color: #f8f9fa; border-radius: 12px; padding: 15px;">
  940. <p style="font-size: 15px; line-height: 1.8; color: #333; white-space: pre-line;">${data.highlights}</p>
  941. </div>
  942. </div>
  943. <div style="display: flex; justify-content: center; margin-top: 20px;">
  944. <div style="padding: 12px 30px; background-color: ${data.accentColor}; color: white; font-size: 16px; font-weight: 600; border-radius: 25px; box-shadow: 0 4px 10px rgba(214, 48, 49, 0.3);">
  945. 立即参与
  946. </div>
  947. </div>
  948. </div>
  949. </div>
  950. `
  951. }
  952. ];
  953. // 合并所有模板
  954. templates.push(...xiaohongshuTemplates, ...wechatMomentsTemplates, ...workGroupTemplates, ...techTemplates, ...productTemplates, ...operationTemplates);