Subscription.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. <template>
  2. <!-- 申购和赎回 -->
  3. <div class="subscription">
  4. <div class="apply-mask" @click="emits('subscriptionClose')"></div>
  5. <div class="apply-content">
  6. <div class="slide-line"></div>
  7. <div class="notifi-classifi">
  8. <div
  9. class="classifi-item"
  10. :class="currentTab == 0 ? 'current-classifi' : 'pf600 fs14 fcA8A8A8'"
  11. @click="currentTab = 0">
  12. 申购
  13. <div class="active-line" v-if="currentTab == 0"></div>
  14. </div>
  15. <div
  16. class="classifi-item"
  17. :class="currentTab == 1 ? 'current-classifi' : 'pf600 fs14 fcA8A8A8'"
  18. @click="currentTab = 1">
  19. 赎回
  20. <div class="active-line" v-if="currentTab == 1"></div>
  21. </div>
  22. </div>
  23. <div class="subscription-area" v-if="currentTab == 0">
  24. <div class="from">
  25. <div class="text pf600 fs14 fc333333">从</div>
  26. <div class="number-input">
  27. <div class="text pf400 fs14 fc999999">合约账户申购</div>
  28. <div class="all pf500 fs14 fc333333">
  29. USDT <span class="fcDF384C">全部</span>
  30. </div>
  31. </div>
  32. <div class="use-number pf400 fs12 fc333333">
  33. 可用余额&nbsp; 215.0508 USDT
  34. <img src="@/assets/icon/bitcoin/qianbao1.svg" alt="" class="qianbao" />
  35. </div>
  36. <div class="use-number pf400 fs12 fc333333">剩余可够&nbsp; 215.0508 HXUSDT</div>
  37. </div>
  38. <div class="to margin-top25">
  39. <div class="text pf600 fs14 fc333333">到</div>
  40. <div class="number-input">
  41. <div class="text pf400 fs14 fc999999">合约账户</div>
  42. <div class="all pf500 fs14 fc333333">HXUSDT</div>
  43. </div>
  44. </div>
  45. <div class="sure-btn pf600 fs14 fcFFFFFF">确认</div>
  46. </div>
  47. <div class="redemption-area" v-if="currentTab == 1">
  48. <div class="from">
  49. <div class="text pf600 fs14 fc333333">从</div>
  50. <div class="number-input">
  51. <div class="text pf400 fs14 fc999999">合约账户赎回</div>
  52. <div class="all pf500 fs14 fc333333">
  53. HXUSDT <span class="fcDF384C">全部</span>
  54. </div>
  55. </div>
  56. <div class="use-number pf400 fs12 fc333333">
  57. 最大可赎回数量&nbsp; 215.0508 HXUSDT
  58. </div>
  59. </div>
  60. <div class="to margin-top25">
  61. <div class="text pf600 fs14 fc333333">到</div>
  62. <div class="number-input">
  63. <div class="text pf400 fs14 fc999999">合约账户</div>
  64. <div class="all pf500 fs14 fc333333">USDT</div>
  65. </div>
  66. </div>
  67. <div class="time pf600 fs14 fc333333">
  68. <div>赎回周期</div>
  69. <div>0天</div>
  70. </div>
  71. <div class="initiate-redemption">
  72. <div class="redemption-left">
  73. <div class="circle"></div>
  74. <div class="line"></div>
  75. <div class="circle"></div>
  76. </div>
  77. <div class="redemption-right">
  78. <div class="faqi1 pf500 fs12 fc333333">
  79. <div class="text1">发起赎回</div>
  80. <div class="time2">2025-11-04, 16:30</div>
  81. </div>
  82. <div class="faqi1 margin-top12 pf500 fs12 fc333333">
  83. <div class="text1">USDT到账日期</div>
  84. <div class="time2">2025-11-04, 16:30</div>
  85. </div>
  86. </div>
  87. </div>
  88. <div
  89. class="sure-btn margin-top22 pf600 fs14 fcFFFFFF"
  90. @click="redemptionNotFlag = true">
  91. 确认
  92. </div>
  93. </div>
  94. </div>
  95. <RedemptionNot
  96. v-show="redemptionNotFlag"
  97. @redemptionNotClose="redemptionNotClose"></RedemptionNot>
  98. </div>
  99. </template>
  100. <script setup>
  101. import RedemptionNot from "../dialog/RedemptionNot.vue";
  102. import { ref } from "vue";
  103. const emits = defineEmits(["subscriptionClose"]);
  104. const currentTab = ref(0);
  105. const redemptionNotFlag = ref(false);
  106. const redemptionNotClose = () => {
  107. redemptionNotFlag.value = false;
  108. };
  109. </script>
  110. <style lang="less" scoped>
  111. .subscription {
  112. position: fixed;
  113. left: 0;
  114. top: 0;
  115. z-index: 1;
  116. display: flex;
  117. flex-direction: column;
  118. justify-content: flex-end;
  119. width: 100%;
  120. min-height: 100vh;
  121. .apply-mask {
  122. position: fixed;
  123. left: 0;
  124. top: 0;
  125. z-index: -1;
  126. width: 100%;
  127. min-height: 100vh;
  128. background: rgba(0, 0, 0, 0.5);
  129. }
  130. .apply-content {
  131. display: flex;
  132. flex-direction: column;
  133. justify-content: flex-start;
  134. align-items: center;
  135. width: 375px;
  136. height: 528px;
  137. background: #ffffff;
  138. border-radius: 24px 24px 0px 0px;
  139. .slide-line {
  140. margin-top: 12px;
  141. width: 32px;
  142. height: 4px;
  143. border-radius: 2px;
  144. opacity: 0.4;
  145. background: rgba(0, 0, 0, 0.5);
  146. }
  147. .notifi-classifi {
  148. display: flex;
  149. flex-direction: row;
  150. justify-content: flex-start;
  151. align-items: flex-end;
  152. margin-top: 14px;
  153. width: 345px;
  154. height: 24px;
  155. .classifi-item {
  156. position: relative;
  157. margin-left: 43px;
  158. .active-line {
  159. position: absolute;
  160. bottom: -6px;
  161. left: 50%;
  162. transform: translateX(-50%);
  163. width: 20px;
  164. height: 3px;
  165. background-color: #323233;
  166. border-radius: 2px;
  167. }
  168. &:first-child {
  169. margin-left: 0;
  170. }
  171. }
  172. .current-classifi {
  173. font-family: "PingFang SC";
  174. font-style: normal;
  175. font-weight: 600;
  176. font-size: 18px;
  177. color: #121212;
  178. transition: color 0.3s, font-size 0.3s;
  179. }
  180. }
  181. .sure-btn {
  182. margin: 0 auto;
  183. margin-top: 69px;
  184. width: 311px;
  185. height: 40px;
  186. line-height: 40px;
  187. text-align: center;
  188. border-radius: 100px;
  189. background: #df384c;
  190. }
  191. .subscription-area {
  192. margin-top: 14px;
  193. width: 345px;
  194. .margin-top25 {
  195. margin-top: 25px;
  196. }
  197. .from,
  198. .to {
  199. width: 100%;
  200. .text {
  201. height: 24px;
  202. line-height: 24px;
  203. }
  204. .number-input {
  205. display: flex;
  206. flex-direction: row;
  207. justify-content: space-between;
  208. align-items: center;
  209. padding: 0 11px;
  210. margin-top: 5px;
  211. width: 345px;
  212. height: 45px;
  213. border-radius: 6px;
  214. background: #f5f5f5;
  215. box-sizing: border-box;
  216. }
  217. .use-number {
  218. display: flex;
  219. flex-direction: row;
  220. justify-content: flex-start;
  221. align-items: center;
  222. margin-top: 7px;
  223. width: 345px;
  224. height: 18px;
  225. .qianbao {
  226. margin-left: 8px;
  227. width: 14px;
  228. height: 14px;
  229. }
  230. }
  231. }
  232. }
  233. .redemption-area {
  234. margin-top: 14px;
  235. width: 345px;
  236. .margin-top25 {
  237. margin-top: 25px;
  238. }
  239. .from,
  240. .to {
  241. width: 100%;
  242. .text {
  243. height: 24px;
  244. line-height: 24px;
  245. }
  246. .number-input {
  247. display: flex;
  248. flex-direction: row;
  249. justify-content: space-between;
  250. align-items: center;
  251. padding: 0 11px;
  252. margin-top: 5px;
  253. width: 345px;
  254. height: 45px;
  255. border-radius: 6px;
  256. background: #f5f5f5;
  257. box-sizing: border-box;
  258. }
  259. .use-number {
  260. display: flex;
  261. flex-direction: row;
  262. justify-content: flex-start;
  263. align-items: center;
  264. margin-top: 7px;
  265. width: 345px;
  266. height: 18px;
  267. .qianbao {
  268. margin-left: 8px;
  269. width: 14px;
  270. height: 14px;
  271. }
  272. }
  273. }
  274. .time {
  275. display: flex;
  276. flex-direction: row;
  277. justify-content: space-between;
  278. align-items: center;
  279. margin-top: 9px;
  280. width: 345px;
  281. height: 24px;
  282. }
  283. .initiate-redemption {
  284. display: flex;
  285. flex-direction: row;
  286. justify-content: flex-start;
  287. align-items: center;
  288. margin-top: 16px;
  289. width: 345px;
  290. height: 112px;
  291. border-radius: 8px;
  292. border: 1px solid #ebebeb;
  293. .redemption-left {
  294. display: flex;
  295. flex-direction: column;
  296. justify-content: center;
  297. align-items: center;
  298. margin-left: 17px;
  299. width: 10px;
  300. height: 65px;
  301. .circle {
  302. width: 10px;
  303. height: 10px;
  304. border-radius: 50%;
  305. background: #df384c;
  306. }
  307. .line {
  308. width: 1px;
  309. height: 54px;
  310. background: repeating-linear-gradient(
  311. to bottom,
  312. #df384c,
  313. #df384c 1px,
  314. transparent 2px,
  315. transparent 3px
  316. );
  317. }
  318. }
  319. .redemption-right {
  320. margin-left: 13px;
  321. .margin-top12 {
  322. margin-top: 12px;
  323. }
  324. .faqi1 {
  325. .text1 {
  326. height: 24px;
  327. line-height: 24px;
  328. }
  329. .time2 {
  330. height: 18px;
  331. line-height: 18px;
  332. }
  333. }
  334. }
  335. }
  336. .sure-btn {
  337. margin: 0 auto;
  338. margin-top: 22px;
  339. width: 311px;
  340. height: 40px;
  341. line-height: 40px;
  342. text-align: center;
  343. border-radius: 100px;
  344. background: #df384c;
  345. }
  346. }
  347. }
  348. }
  349. </style>