task.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="">
  3. <view class="top-wrap">
  4. <view class="user-calling">
  5. <view class="calling">
  6. <!-- <image src="../../static/img/calling.png" mode="" class="calling-img"></image> -->
  7. </view>
  8. </view>
  9. </view>
  10. <view class="flex banne">
  11. <image src="../../static/img/jfc.png" mode="" @click="navto('/pages/zero/task')"></image>
  12. <image src="../../static/img/scjf.png" mode="" @click="navto('/pages/zero/task')"></image>
  13. </view>
  14. <view class="gg-wrap flex">
  15. <image src="../../static/icon/jiang.png" mode=""></image>
  16. <view class="gg-tit">
  17. <view class="tit">
  18. 观看视频赚阅读积分
  19. </view>
  20. <view class="">
  21. 观看可获得阅读积分
  22. </view>
  23. </view>
  24. <view class="gg-btn">
  25. 去观看
  26. </view>
  27. </view>
  28. <view class="bottom-list" v-for="key in navList">
  29. <view class="flex list-item">
  30. <view class="logo-wrap" :style="{'background-color': key.bgc}">
  31. <image :src="key.img" mode="" class="logo"></image>
  32. </view>
  33. <view class="much">
  34. <view class="">
  35. {{key.name}}
  36. </view>
  37. <view class="val">
  38. 余额:{{userInfo[key.val]*1 || '0'}}
  39. </view>
  40. </view>
  41. <view class="btn" v-if="key.agent" @click="goft">
  42. 复投
  43. </view>
  44. <view class="more" @click="navto('/pages/user/sz?type=' + key.type)">
  45. 查看明细
  46. </view>
  47. <image src="../../static/icon/back.png" mode="" class="black"></image>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. mapState,
  55. mapMutations
  56. } from 'vuex';
  57. export default {
  58. data() {
  59. return {
  60. navList: [{
  61. name: '阅读积分',
  62. val: 'resumption',
  63. type: 1,
  64. agent: true,
  65. img: '../../static/icon/task1.png',
  66. bgc: '#fef2f2'
  67. },
  68. {
  69. name: '通证',
  70. val: 'brokerage_price',
  71. type: 2,
  72. agent: false,
  73. img: '../../static/icon/task2.png',
  74. bgc: '#fcf7e3'
  75. },
  76. {
  77. name: '商场积分',
  78. val: 'max_pool',
  79. type: 3,
  80. agent: false,
  81. img: '../../static/icon/task3.png',
  82. bgc: '#f7ecfc'
  83. },
  84. ]
  85. }
  86. },
  87. computed: {
  88. ...mapState('user', ['userInfo', 'hasLogin'])
  89. },
  90. methods: {
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. page {
  96. background-color: #fff;
  97. min-height: 100%;
  98. }
  99. .top-wrap {
  100. // height: 260rpx;
  101. padding-top: 220rpx;
  102. background-color: #282623;
  103. }
  104. .user-calling {
  105. height: 115rpx;
  106. border-radius: 50rpx 50rpx 0 0;
  107. background-color: #fff;
  108. position: relative;
  109. }
  110. .calling {
  111. width: 720rpx;
  112. height: 190rpx;
  113. position: absolute;
  114. left: 0;
  115. right: 0;
  116. top: -110rpx;
  117. background-image: url('../../static/img/calling.png');
  118. background-size: contain;
  119. margin: auto;
  120. // .calling-img {
  121. // width: 100%;
  122. // height: 100%;
  123. // }
  124. }
  125. .banne {
  126. justify-content: center;
  127. padding: 20rpx 0;
  128. background-color: #fff;
  129. image {
  130. width: 340rpx;
  131. height: 204rpx;
  132. margin: 0 8rpx;
  133. }
  134. }
  135. .bottom-list {
  136. .list-item {
  137. width: 670rpx;
  138. height: 131rpx;
  139. // background-color: red;
  140. border-bottom: 1px solid #E8E8E8;
  141. margin: auto;
  142. .logo-wrap {
  143. width: 81rpx;
  144. height: 81rpx;
  145. border-radius: 50%;
  146. display: flex;
  147. justify-content: center;
  148. align-items: center;
  149. .logo {
  150. width: 40rpx;
  151. height: 40rpx;
  152. }
  153. }
  154. .much {
  155. padding-left: 14rpx;
  156. flex-grow: 1;
  157. font-size: 30rpx;
  158. font-weight: bold;
  159. color: #333333;
  160. .val {
  161. padding-top: 15rpx;
  162. font-size: 22rpx;
  163. font-weight: 500;
  164. color: #999999;
  165. }
  166. }
  167. .btn {
  168. width: 127rpx;
  169. height: 52rpx;
  170. border: 2px solid #ff5050;
  171. border-radius: 26rpx;
  172. display: flex;
  173. justify-content: center;
  174. align-items: center;
  175. font-size: 26rpx;
  176. font-weight: 500;
  177. color: #ff5050;
  178. margin-right: 24rpx;
  179. }
  180. .more {
  181. font-size: 24rpx;
  182. font-weight: 500;
  183. color: #999999;
  184. padding-right: 14rpx;
  185. }
  186. .black {
  187. width: 16rpx;
  188. height: 27rpx;
  189. }
  190. }
  191. }
  192. .gg-wrap {
  193. width: 702rpx;
  194. height: 140rpx;
  195. background: #FEFEFE;
  196. box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(231,71,68,0.09);
  197. border-radius: 4rpx;
  198. margin: 20rpx auto;
  199. padding: 30rpx 40rpx 40rpx 90rpx;
  200. position: relative;
  201. image {
  202. position: absolute;
  203. top: 0;
  204. left: 26rpx;
  205. width: 45rpx;
  206. height: 60rpx;
  207. }
  208. .gg-tit {
  209. font-size: 24rpx;
  210. font-weight: 500;
  211. color: #999999;
  212. .tit {
  213. padding-bottom: 20rpx;
  214. font-size: 32rpx;
  215. font-weight: bold;
  216. color: #333333;
  217. }
  218. }
  219. .gg-btn {
  220. width: 125rpx;
  221. height: 46rpx;
  222. background: linear-gradient(60deg, #FF8F3B, #FF3106);
  223. border-radius: 23rpx;
  224. font-size: 24rpx;
  225. font-weight: 500;
  226. color: #FFFFFF;
  227. text-align: center;
  228. line-height: 45rpx;
  229. }
  230. }
  231. </style>