pledge.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <view class="all">
  3. <view class="navList flex">
  4. <view v-for="(item, index) in navList" :key="index" class="navItem"
  5. :class="{ activeItem: tabCurrentIndex === index,tip:index == 0 }" @click="tabClick(index)">{{ item }}</view>
  6. </view>
  7. <view style="padding-top: 44px;" v-if="tabCurrentIndex == 0">
  8. <view class="listBox">
  9. <view class="titleTetx">数量</view>
  10. <view class="flex listTpl">
  11. <input type="number" class="inputBox" v-model="number" placeholder="请输入数量"/>
  12. <view class="flex_item">
  13. <view class="listTip">USDT</view>
  14. <view class="listAll">全部</view>
  15. </view>
  16. </view>
  17. <view class="flex tipBox">
  18. <view class="tip1">可用余额2.12USDT</view>
  19. <view class="tip1">限额10个</view>
  20. </view>
  21. </view>
  22. <view class="listBox" style="padding-top: 0rpx;">
  23. <view class="listTpl">
  24. <input type="number" class="inputBox" v-model="price" placeholder="请输入单价"/>
  25. </view>
  26. <view class="flex tipBox">
  27. <view class="tip1">单价不得大于参考汇率</view>
  28. </view>
  29. </view>
  30. <view class="submission">
  31. <button class="golden" type="golden" hover-class="none" @click="submission">一键卖币</button>
  32. </view>
  33. <view class="tips">*参考汇率7:23</view>
  34. </view>
  35. <view class="listItemBox" v-if="tabCurrentIndex == 1">
  36. <view class="listItem" v-for="item,index in list" :key="index">
  37. <view class="itemInfo flex">
  38. <view class="flex_item">
  39. <image src="/static/image/img20.png" style="width: 55rpx;" mode="widthFix"></image>
  40. <view class="name">李丹丹</view>
  41. </view>
  42. <image src="/static/image/img21.png" style="width: 40rpx;" mode="widthFix"></image>
  43. </view>
  44. <view class="itemTpl">7.11</view>
  45. <view class="itemTip flex">
  46. <view class="tipBox">
  47. <view class="tipText">数量:36212.00</view>
  48. <view class="tipText">2023.06.10 12:03:02</view>
  49. </view>
  50. <view class="tipBtn">买入</view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import {
  58. getsell
  59. } from '@/api/game.js';
  60. import {
  61. mapState
  62. } from 'vuex';
  63. export default {
  64. computed: {
  65. ...mapState('user', ['hasLogin'])
  66. },
  67. data() {
  68. return {
  69. tabCurrentIndex: 1,
  70. navList: ['卖出','买入'],
  71. number:'',
  72. price:'',
  73. pages:1,
  74. limit:10,
  75. list:[{},{},{},{},{},{},{},{},{},{},{},{}]
  76. }
  77. },
  78. onNavigationBarButtonTap(res){
  79. console.log(res,['res']);
  80. },
  81. onLoad() {
  82. },
  83. methods: {
  84. tabClick(index) {
  85. this.tabCurrentIndex = index;
  86. },
  87. }
  88. };
  89. </script>
  90. <style lang="scss">
  91. .all {
  92. width: 750rpx;
  93. height: 100%;
  94. background-color: #051137;
  95. padding-top: var(--status-bar-height);
  96. color: #fff;
  97. }
  98. .navBar{
  99. width: 100%;
  100. position: fixed;
  101. top: 0;
  102. /* #ifdef H5 */
  103. padding-top: calc(44px + env(safe-area-inset-top));
  104. /* #endif */
  105. /* #ifdef APP ||MP */
  106. padding-top: calc(0px + env(safe-area-inset-top));
  107. /* #endif */
  108. background: #fff;
  109. z-index: 99;
  110. .searchBox{
  111. padding: 25rpx 25rpx;
  112. }
  113. }
  114. .navList{
  115. padding: 30rpx 50rpx 20rpx 50rpx;
  116. background: #1F2A4A;
  117. position: fixed;
  118. top: 44px;
  119. left: 0;
  120. width: 100%;
  121. z-index: 9;
  122. .navItem{
  123. color: #fff;
  124. font-size: 30rpx;
  125. text-align: center;
  126. width: 50%;
  127. &.activeItem{
  128. color: #0C5AFA;
  129. position: relative;
  130. &:after {
  131. content: '';
  132. position: absolute;
  133. left:36%;
  134. bottom: -20rpx;
  135. width: 30%;
  136. height: 8rpx;
  137. // transform: translateX(-50%);
  138. border-bottom: 4rpx solid #0C5AFA;
  139. border-radius: 0rpx 20rpx 0rpx 0rpx;
  140. }
  141. }
  142. &.tip{
  143. border-right: 1rpx solid #333D5B;
  144. }
  145. }
  146. }
  147. .listBox{
  148. padding: 62rpx 32rpx;
  149. .titleTetx{
  150. font-weight: bold;
  151. font-size: 24rpx;
  152. color: #FFFFFF;
  153. padding-bottom: 25rpx;
  154. }
  155. .tipBox{
  156. padding-top: 15rpx;
  157. font-size: 24rpx;
  158. }
  159. }
  160. .listTpl{
  161. border-bottom: 1rpx solid #6A7288;
  162. padding-bottom: 25rpx;
  163. .inputBox{
  164. font-size: 35rpx;
  165. color: #FFFFFF;
  166. }
  167. .listTip{
  168. }
  169. .listAll{
  170. padding-left: 30rpx;
  171. font-size: 24rpx;
  172. color: #0C5AFA;
  173. }
  174. }
  175. .submission{
  176. padding: 80rpx 25rpx;
  177. padding-bottom: 25rpx;
  178. .golden{
  179. background: #0C5AFA;
  180. color: #ffffff;
  181. }
  182. }
  183. .tips{
  184. text-align: center;
  185. }
  186. .listItemBox{
  187. padding-top: 44px;
  188. .listItem{
  189. padding: 34rpx 34rpx;
  190. border-bottom: 1rpx solid #6A7288;
  191. .name{
  192. font-family: PingFang SC;
  193. font-weight: bold;
  194. font-size: 30rpx;
  195. color: #FFFFFF;
  196. padding-left: 25rpx;
  197. }
  198. .itemTpl{
  199. font-family: PingFang SC;
  200. font-weight: bold;
  201. font-size: 36rpx;
  202. color: #0C5AFA;
  203. padding-top: 25rpx;
  204. }
  205. .itemTip{
  206. .tipText{
  207. font-family: PingFang SC;
  208. font-weight: 500;
  209. font-size: 24rpx;
  210. color: #C1C1C1;
  211. padding-top: 15rpx;
  212. }
  213. .tipBtn{
  214. font-family: PingFang SC;
  215. font-weight: bold;
  216. font-size: 24rpx;
  217. color: #FFFFFF;
  218. background: linear-gradient(90deg, #0C5AFA, #1356FF);
  219. border-radius: 7rpx;
  220. padding: 15rpx 35rpx;
  221. }
  222. }
  223. }
  224. }
  225. </style>