微信小店联盟带货小程序

index.wxml 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <!--pages/distribution/index.wxml-->
  2. <view class="container">
  3. <!-- 头部信息 -->
  4. <view class="header">
  5. <view class="user-info">
  6. <view class="avatar-wrap">
  7. <image class="avatar" src="{{userInfo.avatarUrl}}"></image>
  8. <view class="level">{{userInfo.level}}</view>
  9. </view>
  10. <view class="info">
  11. <view class="nickname">{{userInfo.nickName}}</view>
  12. <view class="id">推广ID:{{userInfo.distributionId}}</view>
  13. </view>
  14. </view>
  15. <view class="level-progress">
  16. <view class="progress-info">
  17. <text>距离升级还差{{userInfo.upgradeNeed}}元</text>
  18. <text>{{userInfo.currentAmount}}/{{userInfo.targetAmount}}元</text>
  19. </view>
  20. <view class="progress-bar">
  21. <view class="progress" style="width: {{userInfo.progress}}%"></view>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- 收益数据 -->
  26. <view class="earnings-panel">
  27. <view class="total-earnings">
  28. <view class="amount">{{earnings.total}}</view>
  29. <view class="label">累计收益(元)</view>
  30. </view>
  31. <view class="earnings-grid">
  32. <view class="grid-item">
  33. <view class="amount">{{earnings.today}}</view>
  34. <view class="label">今日预估(元)</view>
  35. </view>
  36. <view class="grid-item">
  37. <view class="amount">{{earnings.yesterday}}</view>
  38. <view class="label">昨日收益(元)</view>
  39. </view>
  40. <view class="grid-item">
  41. <view class="amount">{{earnings.month}}</view>
  42. <view class="label">本月收益(元)</view>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 推广数据 -->
  47. <view class="promotion-panel">
  48. <view class="panel-title">推广数据</view>
  49. <view class="promotion-grid">
  50. <view class="grid-row">
  51. <view class="grid-item">
  52. <view class="item-main">
  53. <text class="amount highlight">{{promotion.orderCount}}</text>
  54. </view>
  55. <text class="label">今日推广订单</text>
  56. <view class="compare-line">
  57. <text class="compare">较昨日</text>
  58. <view class="trend {{promotion.orderTrend > 0 ? 'up' : 'down'}}">
  59. <text class="trend-icon"></text>
  60. <text>{{promotion.orderTrend}}%</text>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="grid-item">
  65. <view class="item-main">
  66. <text class="amount highlight">{{promotion.teamCount}}</text>
  67. </view>
  68. <text class="label">今日新增团队</text>
  69. <view class="compare-line">
  70. <text class="compare">较昨日</text>
  71. <view class="trend {{promotion.teamTrend > 0 ? 'up' : 'down'}}">
  72. <text class="trend-icon"></text>
  73. <text>{{promotion.teamTrend}}%</text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="grid-row">
  79. <view class="grid-item">
  80. <view class="item-main">
  81. <text class="amount highlight">{{promotion.visitCount}}</text>
  82. </view>
  83. <text class="label">今日访问</text>
  84. <view class="compare-line">
  85. <text class="compare">较昨日</text>
  86. <view class="trend {{promotion.visitTrend > 0 ? 'up' : 'down'}}">
  87. <text class="trend-icon"></text>
  88. <text>{{promotion.visitTrend}}%</text>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="grid-item">
  93. <view class="item-main">
  94. <text class="amount highlight">{{promotion.convertRate}}%</text>
  95. </view>
  96. <text class="label">转化率</text>
  97. <view class="compare-line">
  98. <text class="compare">较昨日</text>
  99. <view class="trend {{promotion.convertTrend > 0 ? 'up' : 'down'}}">
  100. <text class="trend-icon"></text>
  101. <text>{{promotion.convertTrend}}%</text>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <!-- 数据趋势图表 -->
  108. <view class="chart-tabs">
  109. <view
  110. class="tab-item {{currentChart === 'earnings' ? 'active' : ''}}"
  111. data-type="earnings"
  112. bindtap="switchChart"
  113. >佣金收入</view>
  114. <view
  115. class="tab-item {{currentChart === 'orders' ? 'active' : ''}}"
  116. data-type="orders"
  117. bindtap="switchChart"
  118. >推广订单</view>
  119. <view
  120. class="tab-item {{currentChart === 'team' ? 'active' : ''}}"
  121. data-type="team"
  122. bindtap="switchChart"
  123. >团队成员</view>
  124. </view>
  125. <view class="chart-container">
  126. <ec-canvas id="trend-chart" canvas-id="trend-chart" ec="{{ ec }}"></ec-canvas>
  127. </view>
  128. </view>
  129. <!-- 推广工具 -->
  130. <view class="tools-panel">
  131. <view class="panel-title">推广工具</view>
  132. <view class="tools-grid">
  133. <view class="tool-item" bindtap="navigateToPromotion">
  134. <image class="tool-icon" src="/static/images/poster.png"></image>
  135. <text>推广海报</text>
  136. </view>
  137. <view class="tool-item" bindtap="navigateToQrcode">
  138. <image class="tool-icon" src="/static/images/qrcode.png"></image>
  139. <text>推广二维码</text>
  140. </view>
  141. <view class="tool-item" bindtap="copyLink">
  142. <image class="tool-icon" src="/static/images/link.png"></image>
  143. <text>复制链接</text>
  144. </view>
  145. <view class="tool-item" bindtap="navigateToRules">
  146. <image class="tool-icon" src="/static/images/rules.png"></image>
  147. <text>分销规则</text>
  148. </view>
  149. </view>
  150. </view>
  151. <!-- 等级说明 -->
  152. <view class="level-panel">
  153. <view class="panel-header">
  154. <text class="title">等级说明</text>
  155. <view class="more" bindtap="showLevelDetail">
  156. <text>查看详情</text>
  157. <text class="iconfont icon-right"></text>
  158. </view>
  159. </view>
  160. <view class="level-list">
  161. <view class="level-item {{userInfo.level === item.name ? 'current' : ''}}"
  162. wx:for="{{levelList}}"
  163. wx:key="name">
  164. <view class="level-name">
  165. <text class="name">{{item.name}}</text>
  166. <text class="tag" wx:if="{{userInfo.level === item.name}}">当前</text>
  167. </view>
  168. <view class="level-info">
  169. <text>佣金比例{{item.commission}}%</text>
  170. <text class="divider">|</text>
  171. <text>团队佣金{{item.teamCommission}}%</text>
  172. </view>
  173. <view class="requirement">
  174. 升级条件:月销售额≥{{item.requirement}}元
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. </view>