index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view class="statistics" :style="{background:'url('+ bannerImage +')'}">
  3. <view><nav-bar title="none" icon="none" background="transparent" border-color="transparent"
  4. ></nav-bar></view>
  5. <view class="logo"><re-image imgSrc="/retail/main/img_logo.png" width="300" height="56"></re-image></view>
  6. <view class="content">
  7. <view class="news">
  8. <view class="info flex">
  9. <re-image imgSrc="/" width="104" height="104"></re-image>
  10. <view class="info-text flex-column jcsa">
  11. <view class="info-top flex">
  12. <view class="name">王安安</view>
  13. <view class="level flex aic">
  14. <re-image imgSrc="/retail/main/ic_chuji.png" width="40" height="44"></re-image>
  15. <view class="level-text">初级</view>
  16. </view>
  17. </view>
  18. <view class="phone">13630639549</view>
  19. </view>
  20. </view>
  21. <view class="news-total flex jcsa">
  22. <view class="total-item">
  23. <view class="item-num">156</view>
  24. <view class="item-text">总销订单</view>
  25. </view>
  26. <view class="total-item">
  27. <view class="item-num">156</view>
  28. <view class="item-text">总销游戏币</view>
  29. </view>
  30. <view class="total-item">
  31. <view class="item-num orange">¥156</view>
  32. <view class="item-text">预估总收益</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="performance">
  37. <view class="per-top flex jcsb">
  38. <view class="left flex">
  39. <re-image width="40" height="40" imgSrc="/retail/statistics/ic_yeji.png"></re-image><text style="margin-left: 16rpx">分销业绩</text>
  40. </view>
  41. <view class="right flex aic" @click="show = true">
  42. <text>{{date}}</text><re-icon name="icon-xiala" :customStyle="{ fontSize: '10rpx',marginLeft:'10rpx'}"></re-icon>
  43. </view>
  44. </view>
  45. <view class="per-con flex">
  46. <view class="con-item flex">
  47. <re-image imgSrc="/retail/statistics/ic_dell.png" width="56" height="56"></re-image>
  48. <view class="con-new">
  49. <view class="new-text">总销订单</view>
  50. <view class="new-num">25</view>
  51. </view>
  52. </view>
  53. <view class="con-item flex">
  54. <re-image imgSrc="/retail/statistics/ic_youxibi.png" width="56" height="56"></re-image>
  55. <view class="con-new">
  56. <view class="new-text">总销游戏币</view>
  57. <view class="new-num">25</view>
  58. </view>
  59. </view>
  60. <view class="con-item con-btom flex">
  61. <re-image imgSrc="/retail/statistics/ic_money.png" width="56" height="56"></re-image>
  62. <view class="con-new">
  63. <view class="new-text">总充值金额</view>
  64. <view class="new-num"><text style="font-size:24rpx">¥</text>25</view>
  65. </view>
  66. </view>
  67. <view class="con-item con-btom flex">
  68. <re-image imgSrc="/retail/statistics/ic_money.png" width="56" height="56"></re-image>
  69. <view class="con-new">
  70. <view class="new-text">预估总收益</view>
  71. <view class="new-num"><text style="font-size:24rpx">¥</text>25</view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="grade">
  77. <view class="per-top flex jcsb">
  78. <view class="left flex aic">
  79. <re-image width="40" height="40" imgSrc="/retail/statistics/ic_yeji.png"></re-image><text style="margin-left: 16rpx">分销等级说明</text>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <u-picker ref="uPicker" :show="show" :columns="columns" keyName="label" :closeOnClickOverlay="true" @confirm="confirm" @change="changeHandler" @close="show = false" @cancel="show = false"></u-picker>
  85. </view>
  86. </template>
  87. <script>
  88. import {
  89. toRpx
  90. } from '@/utils/calculate.js'
  91. import defaultConfig from '@/config/default.js'
  92. export default {
  93. components: {},
  94. computed: {
  95. statusBarHeight() {
  96. return this.$store.state.info.systemInfo?.statusBarHeight
  97. },
  98. },
  99. data() {
  100. return {
  101. show:false,
  102. date:'今日',
  103. columns:[
  104. [{
  105. label:'昨日',
  106. id:1
  107. },{
  108. label:'今日',
  109. id:2
  110. },{
  111. label:'近一周',
  112. id:3,
  113. },{
  114. label:'近一月',
  115. id:4,
  116. },{
  117. label:'近一年',
  118. id:5,
  119. }]
  120. ],
  121. bannerImage: defaultConfig.ossImgUrl + '/retail/main/img_bgtop.png',
  122. navBarHeight: uni.getStorageSync('navBarHeight')
  123. }
  124. },
  125. onLoad() {
  126. },
  127. methods: {
  128. changeHandler(e) {
  129. console.log(e,'e');
  130. const {
  131. columnIndex,
  132. value,
  133. values, // values为当前变化列的数组内容
  134. index,
  135. // 微信小程序无法将picker实例传出来,只能通过ref操作
  136. picker = this.$refs.uPicker
  137. } = e
  138. // 当第一列值发生变化时,变化第二列(后一列)对应的选项
  139. // if (columnIndex === 0) {
  140. // // picker为选择器this实例,变化第二列对应的选项
  141. // picker.setColumnValues(1, this.columnData[index])
  142. // }
  143. },
  144. // 回调参数为包含columnIndex、value、values
  145. confirm(e) {
  146. console.log('confirm', e)
  147. this.show = false
  148. this.date = e.value[0].label
  149. }
  150. },
  151. mounted() {
  152. },
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. .statistics {
  157. background-repeat: no-repeat !important;
  158. background-size: contain !important;
  159. // background-position: top;
  160. width: 100%;
  161. position: absolute;
  162. top: 0;
  163. bottom: 0;
  164. .logo {
  165. margin-top: 16rpx;
  166. margin-left: 24rpx;
  167. }
  168. .content {
  169. padding: 0 32rpx;
  170. .news {
  171. background: #FFFFFF;
  172. box-shadow: 0rpx 6rpx 16rpx 0rpx #E3E6F2;
  173. border-radius: 24rpx;
  174. margin-top: 48rpx;
  175. padding: 40rpx;
  176. .info {
  177. .info-text {
  178. .info-top {
  179. .name {
  180. font-weight: 500;
  181. font-size: 32rpx;
  182. color: #363531;
  183. }
  184. .level {
  185. margin-left: 12rpx;
  186. .level-text {
  187. width: 80rpx;
  188. height: 36rpx;
  189. padding: 6rpx 12rpx 6rpx 20rpx;
  190. background: linear-gradient(130deg, #FFB873 0%, #FEC287 0%, #E69349 100%);
  191. border-radius: 0rpx 18rpx 18rpx 0rpx;
  192. font-weight: 500;
  193. font-size: 24rpx;
  194. color: #FFFFFF;
  195. line-height: 24rpx;
  196. margin-left: -12rpx;
  197. // text-align: left;
  198. }
  199. }
  200. }
  201. }
  202. .phone {
  203. font-weight: 400;
  204. font-size: 28rpx;
  205. color: #989897;
  206. }
  207. }
  208. .news-total {
  209. margin-top: 44rpx;
  210. .item-num {
  211. font-weight: bold;
  212. font-size: 40rpx;
  213. color: #363531;
  214. }
  215. .orange {
  216. color: #FF6400;
  217. }
  218. .item-text {
  219. font-weight: 400;
  220. font-size: 28rpx;
  221. color: #9598A6;
  222. }
  223. }
  224. }
  225. .performance{
  226. background: #fff;
  227. padding: 32rpx 32rpx 52rpx;
  228. box-shadow: 0rpx 4rpx 12rpx 0rpx #EBECF1;
  229. border-radius: 24rpx;
  230. margin-top: 22rpx;
  231. .per-top{
  232. .right{
  233. // width: 112rpx;
  234. // height: 48rpx;
  235. background: #FFD370;
  236. border-radius: 8rpx;
  237. font-weight: 500;
  238. font-size: 28rpx;
  239. color: #2A200A;
  240. line-height: 48rpx;
  241. padding: 0 16rpx;
  242. white-space: nowrap;
  243. }
  244. }
  245. .per-con{
  246. margin-top: 44rpx;
  247. flex-wrap: wrap;
  248. .con-item{
  249. width: 50%;
  250. .con-new{
  251. margin-left: 20rpx;
  252. .new-text{
  253. font-weight: 400;
  254. font-size: 28rpx;
  255. color: #9598A6;
  256. }
  257. .new-num{
  258. margin-top: 20rpx;
  259. font-weight: bold;
  260. font-size: 40rpx;
  261. color: #363531;
  262. line-height: 40rpx;
  263. }
  264. }
  265. }
  266. .con-btom{
  267. margin-top: 44rpx;
  268. }
  269. }
  270. }
  271. .grade{
  272. padding: 32rpx;
  273. background: linear-gradient( 135deg, #FFDFDF 0%, #FFE4A4 100%);
  274. border-radius: 24rpx;
  275. margin-top: 22rpx;
  276. }
  277. }
  278. }
  279. </style>