index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <template>
  2. <view class="index-data">
  3. <view class="index-top">
  4. <view class="top-logo">
  5. <view class="logo-img">
  6. <image src="/static/img/index/index-logo.png" mode="aspectFit"></image>
  7. </view>
  8. <view class="logo-lang">
  9. <image src="/static/img/index/en.svg" mode="aspectFit"></image>
  10. </view>
  11. </view>
  12. <view class="top-name">
  13. <image src="/static/img/index/name.svg" mode="widthFix"></image>
  14. </view>
  15. <view class="top-bg"></view>
  16. </view>
  17. <view class="index-from">
  18. <view class="from-data">
  19. <view class="from-tab">
  20. <view class="tab-item" @click="setOptionType(1)" :class="{'option-tab':optionNum===1}" >
  21. <view class="item-content">{{$t('index.index.investment')}}</view>
  22. <view class="item-img img-left">
  23. <image src="/static/img/index/left.png" mode="heightFix"></image>
  24. </view>
  25. </view>
  26. <view class="tab-item" @click="setOptionType(2)" :class="{'option-tab':optionNum===2}" >
  27. <view class="item-content">{{$t('index.index.after')}}</view>
  28. <view class="item-img img-right">
  29. <image src="/static/img/index/right.png" mode="heightFix"></image>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="from-data">
  34. <view class="from-icon">
  35. <view class="icon-img">
  36. <image src="/static/img/index/USDT(ERC20).png" mode="aspectFill"></image>
  37. </view>
  38. <view class="icon-name">USDT(TRC20)</view>
  39. <view class="icon-icon">
  40. <image src="/static/img/index/select.svg" mode="aspectFill"></image>
  41. </view>
  42. </view>
  43. <view class="from-between"></view>
  44. <view class="from-input">
  45. <view class="input-data">
  46. <view class="data-money">{{$t('index.index.money')}}:0</view>
  47. <view class="data-input">
  48. <view>
  49. <input type="number">
  50. </view>
  51. <view> <button>MAX</button></view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="from-but">
  56. <button>{{$t('index.index.affirm')}}</button>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="index-list">
  62. <view class="list-title">
  63. <view class="title-data">
  64. <view><image class="title-img" mode="aspectFit" src="/static/img/index/a.png"></image></view>
  65. <view class="title-str">{{$t('index.index.transaction')}}</view>
  66. </view>
  67. <view class="title-all">{{$t('index.index.affirm')}}>></view>
  68. </view>
  69. <view class="list-tab">
  70. <view class="tab-items">
  71. <view class="tab-item" @click="setListTab(1)" :class="{'option-tab':listTab===1}">NFT</view>
  72. <view class="tab-item" @click="setListTab(2)" :class="{'option-tab':listTab===2}">{{$t('index.index.team')}}</view>
  73. <view class="tab-item" @click="setListTab(3)" :class="{'option-tab':listTab===3}">{{$t('index.index.code')}}</view>
  74. </view>
  75. <view class="tab-item-bg" :class="{'bg-location-1':listTab===1,'bg-location-2':listTab===2,'bg-location-3':listTab===3}"></view>
  76. </view>
  77. <view class="list-data">
  78. <view class="contract-list"></view>
  79. <view class="team-list"></view>
  80. <view class="recommend-code"></view>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. export default {
  87. components: {
  88. },
  89. data() {
  90. return {
  91. systemLocale:'',
  92. applicationLocale: '',
  93. optionNum:1,
  94. listTab:1
  95. }
  96. },
  97. watch: {
  98. },
  99. onLoad(query) {
  100. },
  101. mounted() {
  102. },
  103. methods: {
  104. onLocaleChange(){
  105. },
  106. setOptionType(optionNum){
  107. if(this.optionNum!==optionNum){
  108. this.optionNum=optionNum
  109. }
  110. },
  111. setListTab(listTab){
  112. if(this.listTab!==listTab){
  113. this.listTab=listTab
  114. }
  115. },
  116. goToUrl(type){
  117. switch (type) {
  118. case 1:
  119. uni.navigateTo({
  120. 'url':'pages/contract/add'
  121. })
  122. }
  123. }
  124. },
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .index-data{
  129. min-height: 100vh;
  130. .index-top{
  131. height: 120px;
  132. .top-logo{
  133. height: 35px;
  134. padding:10px 16px;
  135. display: flex;
  136. justify-content: space-between;
  137. .logo-img{
  138. width: 68px;
  139. image{
  140. width: 68px;
  141. height: 29px;
  142. }
  143. }
  144. .logo-lang{
  145. height: 35px;
  146. background: rgba(241,134,134,.04);
  147. border-radius: 12px;
  148. border: 1px solid hsla(0,0%,100%,.2);
  149. image{
  150. margin: 0 5px;
  151. height: 35px;
  152. width: 32px;
  153. }
  154. }
  155. }
  156. .top-name{
  157. image{
  158. width: 100vw;
  159. }
  160. }
  161. .top-bg{
  162. height: 270px;
  163. width: 100%;
  164. position: absolute;
  165. left: 0;
  166. top: 0;
  167. overflow: hidden;
  168. z-index: -99;
  169. background: #277ffa!important;
  170. }
  171. }
  172. .index-from{
  173. padding: 6px;
  174. .from-data{
  175. background: #fff;
  176. border-radius: 30px;
  177. width: calc(100vw - 12px);
  178. .from-tab{
  179. position: relative;
  180. width: calc(100vw - 12px);
  181. border-radius: 30px 30px 0 0;
  182. background: #f7f8fa;
  183. height: 38px;
  184. display: flex;
  185. justify-content: space-between;
  186. .tab-item{
  187. width: 50%;
  188. z-index: 1;
  189. .item-content{
  190. height: 38px;
  191. line-height: 38px;
  192. color: #9197a5;
  193. font-size: 16px;
  194. cursor: pointer;
  195. text-align: center;
  196. }
  197. .item-img{
  198. display: none;
  199. z-index: -1;
  200. position: absolute;
  201. top: -2px;
  202. image{
  203. height: 38px;
  204. }
  205. }
  206. .img-left{
  207. left: 0;
  208. }
  209. .img-right{
  210. right: 0;
  211. }
  212. }
  213. .option-tab{
  214. z-index: 3;
  215. .item-content{
  216. color: #000;
  217. z-index: 5;
  218. }
  219. .item-img{
  220. display: block;
  221. }
  222. }
  223. }
  224. .from-data{
  225. border-radius: 0 0 30px 30px;
  226. padding: 20px;
  227. box-sizing: border-box;
  228. .from-icon{
  229. position: relative;
  230. height: 46px;
  231. display: flex;
  232. justify-content: left;
  233. .icon-img{
  234. margin-right: 10px;
  235. image{
  236. height: 46px;
  237. width: 46px;
  238. }
  239. }
  240. .icon-name{
  241. height: 46px;
  242. line-height: 46px;
  243. font-size: 18px;
  244. }
  245. .icon-icon{
  246. position: absolute;
  247. right: 22px;
  248. top: 13px;
  249. image{
  250. width: 20px;
  251. height: 20px;
  252. }
  253. }
  254. }
  255. .from-between{
  256. margin: 18px 0;
  257. height: 2px;
  258. background: #fbfbfd;
  259. }
  260. .from-input{
  261. box-sizing: border-box;
  262. width: 100%;
  263. height: 45px;
  264. border-radius: 17px;
  265. border: 1px solid #f2f5fa;
  266. margin-bottom: 55px;
  267. .input-data{
  268. width: calc(100% - 20px);
  269. height: 45px;
  270. padding: 10px;
  271. background: #f7f8fa;
  272. border-radius: 16px;
  273. .data-money{
  274. height: 20px;
  275. color: #6b6c70;
  276. font-size: 12px;
  277. }
  278. .data-input{
  279. display: flex;
  280. justify-content: space-between;
  281. input{
  282. height: 25px;
  283. width: 100%;
  284. border: none;
  285. font-size: 18px;
  286. background: #f7f8fa;
  287. padding: 1px 2px;
  288. }
  289. button{
  290. font-size: 12px;
  291. -webkit-text-size-adjust: none;
  292. font-weight: 800;
  293. color: #fff;
  294. width: 38px;
  295. height: 18px;
  296. padding: 2px;
  297. border-radius: 5px;
  298. line-height: 15px;
  299. margin-top: 4px;
  300. cursor: pointer;
  301. background: #277ffa;
  302. }
  303. }
  304. }
  305. }
  306. .from-but{
  307. margin-top: 18px;
  308. height: 64px;
  309. button{
  310. height: 64px;
  311. line-height: 64px;
  312. font-size: 24px;
  313. background: #277ffa;
  314. border-radius: 17px;
  315. color: #fff;
  316. }
  317. }
  318. }
  319. }
  320. }
  321. .index-list{
  322. padding:6px 16px;
  323. .list-title{
  324. display: flex;
  325. justify-content: space-between;
  326. .title-data{
  327. display: flex;
  328. justify-content: left;
  329. .title-img{
  330. width: 24px;
  331. height: 24px;
  332. }
  333. .title-str{
  334. font-size: 16px;
  335. line-height: 24px;
  336. color: #292929;
  337. margin-left: 3px;
  338. }
  339. }
  340. .title-all{
  341. font-size: 15px;
  342. font-weight: 400;
  343. color: #3184fa;
  344. cursor: pointer;
  345. padding: 5px 10px;
  346. }
  347. }
  348. .list-tab{
  349. height: 100%;
  350. background: #eaf2ff;
  351. border-radius: 36px;
  352. cursor: pointer;
  353. position: relative;
  354. .tab-items{
  355. z-index: 10;
  356. display: flex;
  357. justify-content: space-between;
  358. border-radius: 36px;
  359. .tab-item{
  360. z-index: 10;
  361. width: calc(100% / 3);
  362. font-size: 13px;
  363. color: #adbad0;
  364. display: block;
  365. height: 32px;
  366. line-height: 32px;
  367. text-align: center;
  368. }
  369. .option-tab{
  370. color: #292929;
  371. }
  372. }
  373. .tab-item-bg{
  374. position: absolute;
  375. border-radius: 36px;
  376. background: #fff;
  377. transition: .5s ease;
  378. height: 32px;
  379. width: calc(100% / 3);
  380. top: 0;
  381. }
  382. .bg-location-1{
  383. left: 0;
  384. transition: .5s ease;
  385. }
  386. .bg-location-2{
  387. left: 33.33%;
  388. transition: .5s ease;
  389. }
  390. .bg-location-3{
  391. left: 66.66%;
  392. transition: .5s ease;
  393. }
  394. }
  395. }
  396. }
  397. </style>