revenue.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view>
  3. <scroll-view scroll-y="true" class="scroll-content" :enhanced="true" :bounces="false" :show-scrollbar="false" @scroll="pageScroll">
  4. <cu-custom bgColor="bg-bluev-head">
  5. <block slot="content">收益</block>
  6. </cu-custom>
  7. <view class="revenue-body">
  8. <view class="header">
  9. <view class="header-mid">
  10. <view class="mid-body">
  11. <view class="mid-item"><text>待结算</text>231.09</view>
  12. <view class="mid-item"><text>结算中</text>231.09</view>
  13. </view>
  14. <view class="header-foot">
  15. <view class="foot-money">
  16. <view class="m-left">
  17. <view class="m-name">可提现(元)</view>
  18. <view class="m-money">
  19. <view class="num">9083.09</view>
  20. <view class="num-log">提现记录<text class="cuIcon-right"></text></view>
  21. </view>
  22. </view>
  23. <view class="m-right">立即提现</view>
  24. </view>
  25. <view class="foot-money-total">
  26. <view class="money-item">
  27. <view class="name">总收益</view>
  28. <view class="num">9083.09</view>
  29. </view>
  30. <view class="money-item">
  31. <view class="name">今日收益</view>
  32. <view class="num">9083.09</view>
  33. </view>
  34. <view class="money-item">
  35. <view class="name">本月收益</view>
  36. <view class="num">9083.09</view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="panel">
  43. <view class="title">
  44. <view class="name">
  45. <text>收益趋势</text>
  46. <image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/tab-active-badge.png"></image>
  47. </view>
  48. <view class="more-day">
  49. <view class="day-item active">近7天</view>
  50. <view class="day-item">近30天</view>
  51. </view>
  52. </view>
  53. <view style="width: 100%; height: 320rpx;">
  54. <qiun-data-charts type="area" :opts="opts" :chartData="option" />
  55. </view>
  56. </view>
  57. <view class="panel">
  58. <view class="title">
  59. <view class="name">
  60. <text>收益记录</text>
  61. <image src="https://blue-data.oss-cn-guangzhou.aliyuncs.com/star/tab-active-badge.png"></image>
  62. </view>
  63. </view>
  64. <view class="panel-log">
  65. <view class="log-item">
  66. <view class="icon"><image src="/static/image/douyin.svg"></image></view>
  67. <view class="name">
  68. <view class="name-title">【官方正品】金纺柔顺剂宝宝衣物适用0漂白剂抗静电蓬松不僵硬CW-星川任务-202</view>
  69. <view class="time">2026/04/14 12:33:42</view>
  70. </view>
  71. <view class="money">+66.00</view>
  72. </view>
  73. <view class="log-item">
  74. <view class="icon"><image src="/static/image/douyin.svg"></image></view>
  75. <view class="name">
  76. <view class="name-title">申请提现</view>
  77. <view class="time">2026/04/14 12:33:42</view>
  78. </view>
  79. <view class="money red">-66.00</view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </scroll-view>
  85. </view>
  86. </template>
  87. <script>
  88. var app;
  89. export default {
  90. data() {
  91. return {
  92. scrollHeight:0,
  93. chartInstance: null,
  94. opts:{
  95. color:['#87E0FF'],
  96. padding: [15,0,0,0],
  97. legend:{
  98. show:false
  99. },
  100. enableScroll: false,
  101. xAxis: {
  102. gridType: "solid",
  103. dashLength: 1,
  104. disableGrid: false
  105. },
  106. yAxis: {
  107. gridType: "dash",
  108. dashLength: 1,
  109. },
  110. extra: {
  111. area: {
  112. type: "curve",
  113. opacity: 0.2,
  114. addLine: true,
  115. width: 2,
  116. gradient: false,
  117. activeType: "solid"
  118. }
  119. }
  120. },
  121. option: {
  122. categories: ["2016","2017","2018","2019","2020","2021"],
  123. series: [
  124. {
  125. name: "收益",
  126. data: [50,45,22,453,34,45],
  127. legendShape:"none"
  128. }
  129. ]
  130. }
  131. }
  132. },
  133. onLoad() {
  134. app = this;
  135. },
  136. methods: {
  137. // 初始化图表
  138. async initChart() {
  139. console.log('asdas')
  140. if (!this.$refs.chartRef) return
  141. try {
  142. this.chartInstance = await this.$refs.chartRef.init(echarts)
  143. this.chartInstance.setOption(this.option)
  144. } catch (error) {
  145. console.error('图表初始化失败:', error)
  146. }
  147. },
  148. pageScroll(event) {
  149. var scrollHeight = event.detail.scrollTop;
  150. app.scrollHeight = scrollHeight;
  151. },
  152. }
  153. }
  154. </script>
  155. <style>
  156. page{background-color: #f8f8f8;}
  157. .revenue-body{margin: 20rpx;}
  158. .panel {background-color: #fff;border-radius: 20rpx;margin-top: 20rpx;padding: 20rpx;}
  159. .panel .title{display: flex;align-items: center;justify-content: space-between;padding: 20rpx 0;}
  160. .panel .title .more-day{display: flex;align-items: center;gap: 20rpx;}
  161. .panel .title .more-day .day-item {background-color: rgba(244, 246, 248, 1);color: rgba(33, 34, 38, 1);font-size: 24rpx;padding: 10rpx 20rpx;border-radius: 20rpx;border: 4rpx solid rgba(244, 246, 248, 1);}
  162. .panel .title .more-day .day-item.active{background-color: #fff;color: #212226;font-weight: 800;}
  163. .panel .title .name{font-size: 32rpx;color: #000;font-weight: 800;position: relative;}
  164. .panel .title .name text{position: relative;z-index: 999;font-family: "bluevBold";}
  165. .panel .title .name image{width: 82rpx;height: 52rpx;position: absolute;right: -20rpx;bottom: 0;z-index: 99;}
  166. .panel .panel-log{}
  167. .panel .panel-log .log-item{display: flex;align-items: center;gap: 20rpx;overflow: hidden;padding-top: 20rpx;}
  168. .panel .panel-log .log-item .name{flex: 1;overflow: hidden;}
  169. .panel .panel-log .log-item .money{margin-left: auto;margin-right: 0;color: rgba(33, 34, 38, 1);}
  170. .panel .panel-log .log-item .money.red{color: rgba(255, 39, 65, 1);}
  171. .panel .panel-log .log-item .time{color: rgba(140, 140, 140, 1);font-size: 24rpx;line-height: 40rpx;}
  172. .panel .panel-log .log-item .name-title{
  173. display: block;
  174. font-size: 28rpx;
  175. font-weight: 700;
  176. color: #212226;
  177. overflow: hidden;
  178. text-overflow: ellipsis;
  179. white-space: nowrap;
  180. }
  181. .panel .panel-log .log-item image{width: 60rpx;height: 60rpx;border-radius: 100%;}
  182. .header-foot .foot-money-total{display: flex;align-items: center;background-color: rgba(244, 246, 248, 1);border-radius: 20rpx;margin-top: 20rpx;padding: 20rpx;}
  183. .header-foot .foot-money-total .money-item{flex: 1;}
  184. .header-foot .foot-money-total .name{font-size: 24rpx;color: rgba(140, 140, 140, 1);margin-bottom: 10rpx;}
  185. .header-foot .foot-money-total .num{font-weight: bold;font-size: 32rpx;color: rgba(33, 34, 38, 1);}
  186. .header-foot .foot-money{display: flex;align-items: center;justify-content: space-between;padding-top: 20rpx;}
  187. .header-foot .foot-money .m-left{}
  188. .header-foot .foot-money .m-left .m-name{color: rgba(89, 91, 98, 1);font-size: 28rpx;line-height: 2;}
  189. .header-foot .foot-money .m-left .m-money{display: flex;align-items: center;gap: 20rpx;}
  190. .header-foot .foot-money .m-left .num{font-weight: bold;font-size: 44rpx;color: rgba(33, 34, 38, 1);}
  191. .header-foot .foot-money .m-left .num-log{font-size: 24rpx;color: rgba(89, 91, 98, 1);margin-left: 40rpx;}
  192. .header-foot .foot-money .m-right{background-color: rgba(135, 224, 255, 1);color: rgba(33, 34, 38, 1);font-size: 28rpx;font-weight: 800;padding: 10rpx 30rpx;border-radius: 40rpx;}
  193. .revenue-body .header{background-color: #fff;padding: 4rpx;border-radius: 20rpx;}
  194. .revenue-body .header .header-mid{background: linear-gradient(180deg, rgba(137, 225, 255, 0.5) 0%, rgba(173, 235, 255, 0.5) 31.47%);border-radius: 20rpx;}
  195. .revenue-body .header .header-mid .mid-body{display: flex;align-items: center;gap: 20rpx;padding: 20rpx;}
  196. .revenue-body .header .header-mid .mid-body .mid-item{color: rgba(33, 34, 38, 1);font-size: 28rpx;}
  197. .revenue-body .header .header-mid .mid-body .mid-item text{color: rgba(140, 140, 140, 1);margin-right: 10rpx;}
  198. .revenue-body .header .header-foot{background: linear-gradient(180deg, #E7F5FD 0%, #FFFFFF 71.85%);border-radius: 40rpx 40rpx 20rpx 20rpx;padding: 20rpx 20rpx 10rpx 20rpx;}
  199. </style>