index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <view class="index-data">
  3. <view class="index-top">
  4. <top-head></top-head>
  5. <view class="top-text">
  6. <view class="text-item">{{$t('index.index.top.one')}}</view>
  7. <view class="text-item">{{$t('index.index.top.two')}}</view>
  8. <view class="text-item">{{$t('index.index.top.three')}}</view>
  9. <view class="text-item">{{$t('index.index.top.four')}}</view>
  10. </view>
  11. <view class="top-but">
  12. <button @click="goToUrl(1)">{{$t('index.index.investment')}}</button>
  13. </view>
  14. <view class="top-bottom">
  15. <image class="bottom-img" src="@/static/img/index/dagou.svg" mode="aspectFill"></image>
  16. <text class="bottom-text">{{$t('index.index.top.five')}}</text>
  17. <text class="bottom-text">{{$t('index.index.top.six')}}</text>
  18. </view>
  19. </view>
  20. <view class="index-list">
  21. <view class="list-title">
  22. <view class="title-img">
  23. <image src="@/static/img/index/bnb2.png" mode="aspectFill"></image>
  24. </view>
  25. <view class="title-text">{{$t('index.index.list.title')}}(100)</view>
  26. </view>
  27. <division></division>
  28. <earning-list></earning-list>
  29. </view>
  30. <view class="index-bottom"></view>
  31. </view>
  32. </template>
  33. <script>
  34. import {getInvestData, setInvest} from "@/api/contract";
  35. import tools from "@/common/js/tools";
  36. import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
  37. import {getMemberInfo} from "@/api/member";
  38. import Division from "@/pages/index/components/division";
  39. import TopHead from "@/pages/index/components/top-head";
  40. import EarningList from "@/pages/index/components/earning-list";
  41. export default {
  42. components: {EarningList, TopHead, Division},
  43. data() {
  44. return {
  45. applicationLocale: '',
  46. systemLocale: '',
  47. showLang: false,
  48. isAjax: false,
  49. langList: [{'name': 'zh-Hans', 'value': '简体中文'}, {'name': 'en', 'value': 'English'}, {
  50. 'name': 'ja',
  51. 'value': '日本語'
  52. }, {'name': 'ko', 'value': '한국어'}],
  53. tabNum: 0,
  54. investData: {
  55. id: 1,
  56. invest_money: '',
  57. sysAddress: "",
  58. sendNum: "",
  59. },
  60. memberData: {
  61. "id": 30,
  62. "address": "",
  63. "invite_code": "72592982",
  64. "level_id": 0,
  65. "levelName": "V0",
  66. "recommendNum": 0,
  67. "teamNum": 0
  68. },
  69. bnbNum: 0,
  70. babAddress: ''
  71. }
  72. },
  73. watch: {},
  74. async onLoad(query) {
  75. this.getMyData()
  76. },
  77. mounted() {
  78. },
  79. methods: {
  80. goToUrl(type) {
  81. switch (type) {
  82. case 1:
  83. uni.navigateTo({
  84. 'url': 'pages/index/contract'
  85. })
  86. break
  87. case 2:
  88. uni.navigateTo({
  89. 'url': 'pages/index/contract'
  90. })
  91. break
  92. case 3:
  93. uni.navigateTo({
  94. 'url': 'pages/index/contract'
  95. })
  96. break
  97. }
  98. },
  99. setShowLang() {
  100. this.showLang = !this.showLang
  101. },
  102. setTabNum(tabNum) {
  103. if (tabNum !== this.tabNum) {
  104. this.tabNum = tabNum
  105. }
  106. },
  107. getMyData() {
  108. this.babAddress = tokenpocketBnb.getMyAddress()
  109. getMemberInfo().then((res) => {
  110. if (res.code === 1) {
  111. this.memberData = res.data
  112. }
  113. })
  114. },
  115. },
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. //@import "/static/css/common.css";
  120. .index-data {
  121. .index-top {
  122. box-shadow: 0 0 24rpx 0 #000;
  123. box-sizing: border-box;
  124. overflow: hidden;
  125. padding: 40rpx 0;
  126. width: 100%;
  127. background: linear-gradient(0deg, rgb(64, 74, 96) 0%, rgb(9, 21, 36) 100%);
  128. .top-head {
  129. display: flex;
  130. justify-content: space-between;
  131. height: 84rpx;
  132. padding-left: 20rpx;
  133. .head-item {
  134. display: flex;
  135. justify-content: left;
  136. }
  137. .head-left {
  138. .left-img {
  139. margin-top: 1rpx;
  140. image {
  141. width: 80rpx;
  142. height: 80rpx;
  143. }
  144. }
  145. .left-text {
  146. padding-top: 5px;
  147. margin-left: 10px;
  148. .item-item {
  149. font-size: 22rpx;
  150. color: #fff;
  151. }
  152. .item-item:nth-of-type(1) {
  153. font-size: 32rpx;
  154. font-weight: bold;
  155. }
  156. }
  157. }
  158. .head-right {
  159. justify-content: right;
  160. .right-img {
  161. width: 70rpx;
  162. height: 70rpx;
  163. image {
  164. width: 70rpx;
  165. height: 70rpx;
  166. }
  167. }
  168. .right-text {
  169. margin-left: 20rpx;
  170. height: 70rpx;
  171. line-height: 70rpx;
  172. width: 200rpx;
  173. overflow: hidden;
  174. text-overflow: ellipsis;
  175. color: rgb(116, 132, 164);
  176. }
  177. }
  178. }
  179. .top-text {
  180. clear: both;
  181. padding: 40rpx;
  182. margin-top: 40rpx;
  183. .text-item {
  184. color: #fff;
  185. font-size: 50rpx;
  186. font-weight: bold;
  187. }
  188. }
  189. .top-but {
  190. width: 80%;
  191. margin: 60rpx auto 0;
  192. button {
  193. height: 90rpx;
  194. line-height: 90rpx;
  195. text-align: center;
  196. background: rgb(0, 87, 255);
  197. color: #fff;
  198. border-radius: 20rpx;
  199. font-weight: bold;
  200. }
  201. }
  202. .top-bottom {
  203. padding: 40rpx;
  204. .bottom-img {
  205. display: inline-block;
  206. width: 24rpx;
  207. height: 24rpx;
  208. margin-right: 10rpx;
  209. }
  210. .bottom-text {
  211. font-size: 24rpx;
  212. color: #7484a4;
  213. }
  214. .bottom-text:nth-of-type(2) {
  215. margin-left: 0.5em;
  216. text-decoration: underline;
  217. }
  218. }
  219. }
  220. .index-list {
  221. background: #fff;
  222. width: 90%;
  223. margin: 40rpx auto;
  224. border-radius: 10px;
  225. padding: 20px 10px;
  226. overflow: hidden;
  227. font-size: 13px;
  228. box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.08);
  229. .list-title {
  230. display: flex;
  231. justify-content: left;
  232. .title-img {
  233. background: rgb(0, 87, 255);
  234. padding: 10rpx;
  235. border-radius: 20rpx;
  236. image {
  237. width: 80rpx;
  238. height: 80rpx;
  239. }
  240. }
  241. .title-text {
  242. margin-left: 20rpx;
  243. line-height: 100rpx;
  244. font-size: 34rpx;
  245. font-weight: bold;
  246. }
  247. }
  248. }
  249. .index-bottom {
  250. height: 50rpx;
  251. }
  252. }
  253. </style>