top.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="center">
  3. <view class="box-top">
  4. <view class="bg3" @click="test()"><image src="../../static/index/img14.png" mode=""></image></view>
  5. <view class="bg3 two"><image src="../../static/index/img08.png" mode=""></image></view>
  6. </view>
  7. <u-popup v-model="show" mode="left" width="565rpx" border-radius="14">
  8. <view class="popup">
  9. <view class="title">
  10. <view class="title-img"><image src="../../static/img/logo.png" mode=""></image></view>
  11. <view class="text">恒星币</view>
  12. </view>
  13. <view class="hx"></view>
  14. <view class="box-left" v-for="(item, index) in cdList" @click="navTo(item.url)">
  15. <view class="box-box">
  16. <view class="box-img"><image :src="item.image" mode=""></image></view>
  17. <view class="box-title">{{ item.title }}</view>
  18. <view class="box-right"><image :src="item.right" mode=""></image></view>
  19. </view>
  20. <view class="hx1"></view>
  21. </view>
  22. </view>
  23. </u-popup>
  24. </view>
  25. </template>
  26. <script>
  27. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  28. export default {
  29. data() {
  30. return {
  31. show: false,
  32. cdList: [
  33. {
  34. image: '../../static/img/cd1.png',
  35. title: '首页 ',
  36. right: '../../static/img/right.png',
  37. url: '/pages/index/index'
  38. },
  39. {
  40. image: '../../static/img/cd2.png',
  41. title: '恒星私募',
  42. right: '../../static/img/right.png',
  43. url: '/pages/private/private'
  44. },
  45. {
  46. image: '../../static/img/cd5.png',
  47. title: 'DIFI挖矿',
  48. right: '../../static/img/right.png',
  49. url: '/pages/index/Expect'
  50. },
  51. {
  52. image: '../../static/img/cd4.png',
  53. title: '我的推荐',
  54. right: '../../static/img/right.png',
  55. url: '/pages/index/share'
  56. },
  57. {
  58. image: '../../static/img/cd3.png',
  59. title: '超级节点',
  60. right: '../../static/img/right.png',
  61. url: '/pages/index/Expect'
  62. },
  63. {
  64. image: '../../static/img/cd6.png',
  65. title: '游戏版块',
  66. right: '../../static/img/right.png',
  67. url: '/pages/index/Expect'
  68. },
  69. {
  70. image: '../../static/img/cd7.png',
  71. title: '好友加速明细',
  72. right: '../../static/img/right.png',
  73. url: '/pages/index/Expect'
  74. },
  75. {
  76. image: '../../static/img/cd8.png',
  77. title: '算力奖励明细',
  78. right: '../../static/img/right.png',
  79. url: '/pages/index/Expect'
  80. },
  81. {
  82. image: '../../static/img/cd9.png',
  83. title: '社群奖励明细',
  84. right: '../../static/img/right.png',
  85. url: '/pages/index/Expect'
  86. },
  87. {
  88. image: '../../static/img/cd10.png',
  89. title: '公会奖励明细',
  90. right: '../../static/img/right.png',
  91. url: '/pages/index/Expect'
  92. }
  93. ]
  94. };
  95. },
  96. methods: {
  97. addShow() {
  98. this.$refs.popup.open();
  99. },
  100. navTo(url) {
  101. uni.navigateTo({
  102. url
  103. });
  104. },
  105. test() {
  106. this.show = true;
  107. console.log(this.show);
  108. }
  109. }
  110. };
  111. </script>
  112. <style lang="less">
  113. .box-top {
  114. display: flex;
  115. padding: 36rpx 41rpx 72rpx 41rpx;
  116. }
  117. image {
  118. width: 100%;
  119. height: 100%;
  120. }
  121. .bg3 {
  122. width: 56rpx;
  123. height: 62rpx;
  124. }
  125. .two {
  126. margin-left: 36rpx;
  127. }
  128. .popup {
  129. display: flex;
  130. flex-direction: column;
  131. background: linear-gradient(180deg, #00143b 0%, #000309 100%);
  132. height: 100%;
  133. .box-left {
  134. width: 530rpx;
  135. display: flex;
  136. flex-direction: column;
  137. .box-box {
  138. position: relative;
  139. display: flex;
  140. align-items: center;
  141. justify-content: flex-start;
  142. margin-left: 30rpx;
  143. }
  144. .box-img {
  145. z-index: 999;
  146. width: 35rpx;
  147. height: 35rpx;
  148. }
  149. .box-title {
  150. margin-left: 20rpx;
  151. font-size: 30rpx;
  152. font-family: PingFang SC;
  153. // font-weight: bold;
  154. color: #ffffff;
  155. line-height: 78rpx;
  156. }
  157. .box-right {
  158. position: absolute;
  159. right: 0;
  160. z-index: 999;
  161. width: 17rpx;
  162. height: 32rpx;
  163. }
  164. }
  165. .title {
  166. margin: 40rpx 190rpx;
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. .title-img {
  171. width: 186rpx;
  172. height: 193rpx;
  173. }
  174. .text {
  175. display: flex;
  176. font-size: 41rpx;
  177. font-family: zihun100hao-fangfangxianfengti;
  178. font-weight: 400;
  179. color: #ffffff;
  180. line-height: 38rpx;
  181. }
  182. }
  183. .hx {
  184. width: 565rpx;
  185. height: 12rpx;
  186. background: #ffffff;
  187. opacity: 0.23;
  188. }
  189. .hx1 {
  190. width: 565rpx;
  191. height: 2rpx;
  192. background: #ffffff;
  193. opacity: 0.1;
  194. }
  195. }
  196. </style>