index.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <view class="container">
  3. <view class="top flex">
  4. <view class="icon1 flex">
  5. <image src="/static/image/img01.png" style="width: 139rpx;" mode="widthFix"></image>
  6. <view class="myName">我的</view>
  7. </view>
  8. <view class="flex">
  9. <image src="/static/image/img03.png" style="width: 39rpx;margin-right: 38rpx;" mode="widthFix"></image>
  10. <image src="/static/image/img02.png" style="width: 39rpx;" mode="widthFix"></image>
  11. </view>
  12. </view>
  13. <view class="swiper-box">
  14. <u-swiper :list="swiperList" indicator indicatorMode="line" height="280rpx" circular></u-swiper>
  15. </view>
  16. <view class="flex noteBox">
  17. <view class="flex_item noteTpl">
  18. <image src="/static/image/img04.png" style="width: 42rpx;" mode="widthFix"></image>
  19. <view class="clamp textTpl">上线活动的公告等等公告内容上线活动的公告等等公告内容等上线活动的公告等等公告内容等</view>
  20. </view>
  21. <view class="tip"></view>
  22. </view>
  23. <view class="flex navList">
  24. <view class="navTpl" @click="openurl('')">
  25. <image src="/static/image/img06.png" style="width: 123rpx;" mode="widthFix"></image>
  26. <view class="navName">充值</view>
  27. </view>
  28. <view class="navTpl" @click="openurl('')">
  29. <image src="/static/image/img07.png" style="width: 123rpx;" mode="widthFix"></image>
  30. <view class="navName">实名认证</view>
  31. </view>
  32. <view class="navTpl" @click="openurl('')">
  33. <image src="/static/image/img08.png" style="width: 123rpx;" mode="widthFix"></image>
  34. <view class="navName">交易密码</view>
  35. </view>
  36. <view class="navTpl" @click="openurl('')">
  37. <image src="/static/image/img09.png" style="width: 123rpx;" mode="widthFix"></image>
  38. <view class="navName">收款信息</view>
  39. </view>
  40. <view class="navTpl" @click="openurl('')">
  41. <image src="/static/image/img10.png" style="width: 123rpx;" mode="widthFix"></image>
  42. <view class="navName">联系客服</view>
  43. </view>
  44. </view>
  45. <view class="starBox flex">
  46. <view class="starTpl flex_item">
  47. <image src="/static/image/img12.png" style="width: 75rpx;" mode="widthFix"></image>
  48. <view class="starText">
  49. <view class="name">okx(欧易)</view>
  50. <view class="num">7.21</view>
  51. </view>
  52. </view>
  53. <view class="starTpl flex_item">
  54. <image src="/static/image/img13.png" style="width: 75rpx;" mode="widthFix"></image>
  55. <view class="starText">
  56. <view class="name">STAR(星空)</view>
  57. <view class="num">7.21</view>
  58. </view>
  59. </view>
  60. </view>
  61. <image src="/static/image/img11.png" style="width: 692rpx;padding-top: 31rpx;" mode="widthFix"></image>
  62. <view class="titleBox">
  63. <view class="titleTip">累计成交量</view>
  64. </view>
  65. <view class="flex totalBox">
  66. <view class="totalTpl">
  67. <view class="totalNum">10,910,000<text>USDT</text></view>
  68. <view class="totalName">累计买入</view>
  69. </view>
  70. <view class="totalTpl">
  71. <view class="totalNum">10,910,000<text>USDT</text></view>
  72. <view class="totalName">累计卖出</view>
  73. </view>
  74. </view>
  75. <view class="titleBox">
  76. <view class="titleTip">平台优势</view>
  77. </view>
  78. <view class="advantageBox flex">
  79. <view class="advantageTpl">
  80. <image src="/static/image/img16.png" style="width:149rpx;" mode="widthFix"></image>
  81. <view class="advantageName">简单</view>
  82. </view>
  83. <view class="advantageTpl">
  84. <image src="/static/image/img15.png" style="width:149rpx;" mode="widthFix"></image>
  85. <view class="advantageName">安全</view>
  86. </view>
  87. <view class="advantageTpl">
  88. <image src="/static/image/img14.png" style="width:149rpx;" mode="widthFix"></image>
  89. <view class="advantageName">省心</view>
  90. </view>
  91. <view class="advantageTpl">
  92. <image src="/static/image/img17.png" style="width:149rpx;" mode="widthFix"></image>
  93. <view class="advantageName">极速</view>
  94. </view>
  95. </view>
  96. </view>
  97. </template>
  98. <script>
  99. import {
  100. getIndex
  101. } from '@/api/index.js';
  102. import {
  103. getGameList,
  104. } from "@/api/game.js";
  105. import {
  106. mapState,
  107. mapActions,
  108. mapMutations
  109. } from "vuex";
  110. export default {
  111. data() {
  112. return {
  113. gameList: [],
  114. active_user: '0',
  115. swiperList:['/static/image/img05.png']
  116. }
  117. },
  118. computed: {
  119. ...mapState({
  120. langList: "langList",
  121. lang: "lang",
  122. }),
  123. ...mapState('user', ['userInfo']),
  124. label() {
  125. const label = this.langList.find((item) => {
  126. console.log(this.lang, item.value);
  127. return item.value == this.lang
  128. }).label;
  129. return label
  130. }
  131. },
  132. onLoad(option) {
  133. // #ifndef MP
  134. if (option.spread) {
  135. // 存储其他邀请人
  136. uni.setStorageSync('spread', option.spread);
  137. }
  138. // #endif
  139. // #ifdef MP
  140. if (option.scene) {
  141. // 存储小程序邀请人
  142. uni.setStorage({
  143. key: 'spread_code',
  144. data: option.scene
  145. });
  146. }
  147. // #endif
  148. },
  149. onShow() {
  150. this.getGameList();
  151. this.loadData();
  152. },
  153. methods: {
  154. ...mapMutations('user', ['setUserInfo', 'login']),
  155. ...mapActions({
  156. setLang: "setLang",
  157. }),
  158. openurl(url){
  159. uni.navigateTo({
  160. url: url,
  161. fail: (err) => {
  162. uni.showModal({
  163. title: '错误',
  164. content: err,
  165. showCancel: false,
  166. });
  167. }
  168. });
  169. },
  170. // 请求载入数据
  171. async loadData() {
  172. getIndex({})
  173. .then(({
  174. data
  175. }) => {
  176. this.active_user = data.active_user
  177. console.log(data);
  178. })
  179. .catch(e => {});
  180. },
  181. selectLang(value) {
  182. this.setLang(this.langList[value.detail.value].value);
  183. },
  184. getGameList() {
  185. getGameList().then((res) => {
  186. this.gameList = res.data.list;
  187. if (this.gameList.length > 2) {
  188. this.gameList = this.gameList.slice(0, 2)
  189. }
  190. })
  191. },
  192. },
  193. }
  194. </script>
  195. <style lang="scss">
  196. .container {
  197. width: 100%;
  198. background-color: #051137;
  199. padding: 0rpx 30rpx;
  200. padding-top: calc(60px + var(--status-bar-height));
  201. padding-bottom: 50rpx;
  202. }
  203. .top {
  204. font-weight: 500;
  205. padding: 40rpx 30rpx 24rpx 30rpx;
  206. line-height: 1;
  207. position: fixed;
  208. top: 0;
  209. left: 0;
  210. width: 100%;
  211. background: #051137;
  212. z-index: 99;
  213. .icon1 {
  214. line-height: 0;
  215. position: relative;
  216. .myName{
  217. position: absolute;
  218. right: 22rpx;
  219. font-weight: 500;
  220. font-size: 24rpx;
  221. color: #2884FF;
  222. }
  223. }
  224. }
  225. .noteBox{
  226. padding: 46rpx 0rpx;
  227. .noteTpl{
  228. color: #fff;
  229. width: 85%;
  230. .textTpl{
  231. width: calc(100% - 42rpx);
  232. font-family: PingFang SC;
  233. font-weight: 500;
  234. font-size: 26rpx;
  235. color: #FFFFFF;
  236. padding-left: 30rpx;
  237. }
  238. }
  239. .tip{
  240. width: 12rpx;
  241. height: 12rpx;
  242. background: #F7453D;
  243. border-radius: 100%;
  244. }
  245. }
  246. .navList{
  247. text-align: center;
  248. padding:15rpx 0rpx;
  249. .navTpl{
  250. .navName{
  251. padding-top: 23rpx;
  252. font-family: PingFang SC;
  253. font-weight: 500;
  254. font-size: 26rpx;
  255. color: #FFFFFF;
  256. }
  257. }
  258. }
  259. .starBox{
  260. padding-top: 43rpx;
  261. .starTpl{
  262. width: 48%;
  263. background: #1F2A4A;
  264. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50,50,52,0.06);
  265. border-radius: 20rpx;
  266. padding: 20rpx 18rpx;
  267. .starText{
  268. padding-left: 25rpx;
  269. .name{
  270. font-family: PingFang SC;
  271. font-weight: 500;
  272. font-size: 22rpx;
  273. color: #FFFFFF;
  274. line-height: 24rpx;
  275. }
  276. .num{
  277. padding-top: 15rpx;
  278. font-family: PingFang SC;
  279. font-weight: bold;
  280. font-size: 30rpx;
  281. color: #FFA235;
  282. line-height: 24rpx;
  283. }
  284. }
  285. }
  286. }
  287. .titleBox{
  288. text-align: center;
  289. padding: 45rpx 0rpx;
  290. .titleTip{
  291. flex: 1;
  292. display: flex;
  293. justify-content: center;
  294. align-items: center;
  295. height: 100%;
  296. position: relative;
  297. font-weight: bold;
  298. font-size: 42rpx;
  299. color: #FFFFFF;
  300. line-height: 110rpx;
  301. &:after {
  302. content: '';
  303. position: absolute;
  304. left: 50%;
  305. bottom: 0;
  306. transform: translateX(-50%);
  307. width: 44px;
  308. height: 0;
  309. border-bottom: 3px solid #FFFFFF;
  310. border-radius: 25rpx;
  311. }
  312. }
  313. }
  314. .totalBox{
  315. padding-top: 30rpx;
  316. .totalTpl{
  317. width: 45%;
  318. background: url('../../static/image/img18.png') no-repeat;
  319. background-size: 100% 100%;
  320. text-align: center;
  321. padding: 45rpx 0rpx;
  322. .totalNum{
  323. font-family: FZCuHeiSongS-B-GB;
  324. font-weight: 400;
  325. font-size: 39rpx;
  326. color: #66FFFF;
  327. text{
  328. font-family: PingFang SC;
  329. font-weight: 500;
  330. font-size: 22rpx;
  331. color: #66FFFF;
  332. }
  333. }
  334. .totalName{
  335. padding-top: 20rpx;
  336. font-family: Source Han Sans CN;
  337. font-weight: bold;
  338. font-size: 26rpx;
  339. color: #FFFFFF;
  340. }
  341. }
  342. }
  343. .advantageBox{
  344. padding-top: 50rpx;
  345. .advantageTpl{
  346. text-align: center;
  347. .advantageName{
  348. padding-top: 25rpx;
  349. font-family: PingFang SC;
  350. font-weight: 500;
  351. font-size: 28rpx;
  352. color: #FFFFFF;
  353. }
  354. }
  355. }
  356. </style>