微信小店联盟带货小程序

poster.wxml 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <view class="container">
  2. <!-- 海报预览区域 -->
  3. <view class="poster-preview">
  4. <view class="preview-title">海报预览</view>
  5. <view class="preview-area">
  6. <image class="poster-image" src="{{currentPoster.url}}" mode="widthFix"></image>
  7. </view>
  8. </view>
  9. <!-- 海报模板选择 -->
  10. <view class="template-select">
  11. <view class="section-title">选择模板</view>
  12. <scroll-view class="template-list" scroll-x="true">
  13. <view
  14. class="template-item {{currentPoster.id === item.id ? 'active' : ''}}"
  15. wx:for="{{posterList}}"
  16. wx:key="id"
  17. bindtap="selectTemplate"
  18. data-id="{{item.id}}"
  19. >
  20. <image class="template-image" src="{{item.url}}" mode="aspectFill"></image>
  21. </view>
  22. </scroll-view>
  23. </view>
  24. <!-- 商品选择 -->
  25. <view class="goods-select" wx:if="{{showGoodsSelect}}">
  26. <view class="section-title">选择商品</view>
  27. <scroll-view class="goods-list" scroll-x="true">
  28. <view
  29. class="goods-item {{currentGoods.id === item.id ? 'active' : ''}}"
  30. wx:for="{{goodsList}}"
  31. wx:key="id"
  32. bindtap="selectGoods"
  33. data-id="{{item.id}}"
  34. >
  35. <image class="goods-image" src="{{item.image}}" mode="aspectFill"></image>
  36. <view class="goods-info">
  37. <view class="goods-name">{{item.name}}</view>
  38. <view class="goods-price">¥{{item.price}}</view>
  39. </view>
  40. </view>
  41. </scroll-view>
  42. </view>
  43. <!-- 自定义文案 -->
  44. <view class="custom-text" wx:if="{{showCustomText}}">
  45. <view class="section-title">自定义文案</view>
  46. <view class="text-input">
  47. <textarea
  48. value="{{customText}}"
  49. placeholder="请输入自定义文案"
  50. maxlength="100"
  51. bindinput="onTextChange"
  52. ></textarea>
  53. <view class="text-counter">{{customText.length}}/100</view>
  54. </view>
  55. </view>
  56. <!-- 操作按钮 -->
  57. <view class="action-buttons">
  58. <button class="btn btn-preview" bindtap="previewPoster">
  59. <text class="iconfont icon-preview"></text>
  60. <text>预览</text>
  61. </button>
  62. <button class="btn btn-save" bindtap="savePoster">
  63. <text class="iconfont icon-save"></text>
  64. <text>保存到相册</text>
  65. </button>
  66. <button class="btn btn-share" open-type="share">
  67. <text class="iconfont icon-share"></text>
  68. <text>分享</text>
  69. </button>
  70. </view>
  71. <!-- 生成中遮罩 -->
  72. <view class="generating-mask" wx:if="{{generating}}">
  73. <view class="generating-content">
  74. <view class="loading-icon"></view>
  75. <text>海报生成中...</text>
  76. </view>
  77. </view>
  78. </view>