tbdetail.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view class="content">
  3. <view class="vheight"></view>
  4. <view class="top flex">
  5. <image @click="back()" class="top-icon1" src="../../static/img/cb2.png" mode=""></image>
  6. <image @click="navTo('/pages/user/tbRecord')" class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
  7. </view>
  8. <view class="title">{{ $t('tb.tb') }}</view>
  9. <view class="type flex" @click="navTo('/pages/transaction/tblist')">
  10. <view class="type-left">{{ $t('tb.bz') }}</view>
  11. <view class="type-right">
  12. <view class="type-name">{{ info.title }}</view>
  13. <image class="type-icon" src="../../static/icon/user-back.png" mode=""></image>
  14. </view>
  15. </view>
  16. <view class="main">
  17. <view class="main-title">{{ $t('tb.tbwl') }}</view>
  18. <view class="main-list">{{ info.czline }}</view>
  19. <view class="main-title" style="margin-top: 20rpx;">{{ $t('tb.tbdz') }}</view>
  20. <view class="sr-input"><input :placeholder="$t('tb.qsrtbdz')" type="text" v-model="address" /></view>
  21. <view class="sr-sl flex">
  22. <view class="sr-title">{{ $t('tb.tbsl') }}</view>
  23. <view class="sr-num" v-if="info">{{ $t('tb.ky') }} {{ money }} {{ info.name.toLocaleUpperCase() }}</view>
  24. </view>
  25. <view class="sr-input flex">
  26. <input :placeholder="$t('tb.qsrtbsl')" type="number" v-model="num" />
  27. <view class="main-type-box">
  28. <view class="main-type" v-if="info">{{ info.name.toLocaleUpperCase() }}</view>
  29. <view class="all" @click="qb()">{{ $t('tb.qb') }}</view>
  30. </view>
  31. </view>
  32. <view class="sr-btn" @click="submit()">{{ $t('tb.tj') }}</view>
  33. <view class="sr-tip flex" v-if="num">
  34. <view class="sr-tip-item">{{ $t('tb.sjdz') }}</view>
  35. <view class="sr-tip-item" v-if="info.sxftype == 1">{{ num * 1 * (1 - (info.txsxf * 1) / 100) }}</view>
  36. <view class="sr-tip-item" v-if="info.sxftype == 2">{{ num * 1 - info.txsxf_n * 1 }}</view>
  37. </view>
  38. </view>
  39. <view class="info">
  40. <view class="info-item red">
  41. {{ $t('tb.tbkc') }}5USDT{{ $t('tb.sxfsxt') }}:10USDT
  42. <!-- {{ $t('tb.tbkc') }}{{ info.sxftype == 1 ? info.txsxf + '%' : info.txsxf_n + info.title }}{{ $t('tb.sxfsxt') }}:{{ info.txminnum }} -->
  43. </view>
  44. <view class="info-item">{{ $t('tb.wbzzjaq') }}</view>
  45. <view class="info-item">{{ $t('cb.qwbqrdn') }}</view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import { txpage, tbhandle } from '@/api/wallet.js';
  51. import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
  52. import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
  53. export default {
  54. data() {
  55. return {
  56. id: '',
  57. info: '',
  58. address: '',
  59. num: '',
  60. money: ''
  61. };
  62. },
  63. onLoad(opt) {
  64. uni.setNavigationBarTitle({ title: this.$t('tb.tbxq') });
  65. this.id = opt.type;
  66. this.loadData();
  67. },
  68. onShow() {},
  69. onReachBottom() {},
  70. onReady() {},
  71. methods: {
  72. loadData() {
  73. txpage({ id: this.id }).then(({ data }) => {
  74. this.info = data.info;
  75. this.money = data.money;
  76. });
  77. },
  78. qrR(res) {
  79. console.log(res, '123456');
  80. },
  81. back() {
  82. uni.navigateBack();
  83. },
  84. qb() {
  85. this.num = this.money;
  86. },
  87. navTo(url) {
  88. uni.navigateTo({
  89. url
  90. });
  91. },
  92. submit() {
  93. console.log(222);
  94. if (this.num < 0) {
  95. return this.$api.msg(this.$t('tbslbnw'));
  96. }
  97. if (!this.address) {
  98. return this.$api.msg(this.$t('qsrscdz'));
  99. }
  100. tbhandle({ id: this.id, num: this.num, address: this.address }).then(e => {
  101. this.num = '';
  102. this.image = '';
  103. return this.$api.msg(this.$t('cb.tjsqcg'));
  104. });
  105. }
  106. }
  107. };
  108. </script>
  109. <style lang="scss">
  110. page,
  111. .content {
  112. min-height: 100%;
  113. height: auto;
  114. background: #f5f5f5;
  115. }
  116. .vheight {
  117. height: var(--status-bar-height);
  118. }
  119. .top {
  120. padding: 20rpx 40rpx;
  121. .top-icon1 {
  122. width: 52rpx;
  123. height: 36rpx;
  124. }
  125. .top-icon2 {
  126. width: 48rpx;
  127. height: 48rpx;
  128. }
  129. }
  130. .title {
  131. padding: 20rpx 20rpx 0;
  132. font-size: 52rpx;
  133. font-weight: 500;
  134. }
  135. .type {
  136. margin: 20rpx auto 0;
  137. width: 690rpx;
  138. background: #ffffff;
  139. border-radius: 20rpx;
  140. padding: 30rpx 20rpx;
  141. .type-left {
  142. font-size: 32rpx;
  143. color: #000;
  144. }
  145. .type-right {
  146. display: flex;
  147. align-items: center;
  148. .type-name {
  149. font-size: 36rpx;
  150. font-weight: bold;
  151. color: #fcd535;
  152. margin-right: 10rpx;
  153. }
  154. .type-icon {
  155. width: 24rpx;
  156. height: 24rpx;
  157. }
  158. }
  159. }
  160. .main {
  161. margin: 20rpx auto 0;
  162. width: 690rpx;
  163. background: #ffffff;
  164. border-radius: 20rpx;
  165. padding: 30rpx 20rpx;
  166. .main-title {
  167. font-size: 32rpx;
  168. color: #000;
  169. }
  170. .main-list {
  171. margin-top: 20rpx;
  172. width: 200rpx;
  173. height: 70rpx;
  174. line-height: 70rpx;
  175. text-align: center;
  176. border: 2px solid #fcd535;
  177. border-radius: 10rpx;
  178. font-size: 28rpx;
  179. color: #fcd535;
  180. }
  181. .sr-input {
  182. margin-top: 20rpx;
  183. display: flex;
  184. align-items: center;
  185. width: 100%;
  186. height: 80rpx;
  187. line-height: 80rpx;
  188. background: #f5f5f5;
  189. border-radius: 20rpx;
  190. padding: 0rpx 30rpx;
  191. input {
  192. width: 292rpx;
  193. font-size: 28rpx;
  194. padding-left: 30rpx;
  195. background: #f5f5f5;
  196. }
  197. }
  198. .sr-sl {
  199. margin-top: 20rpx;
  200. .sr-num {
  201. color: #707a8a;
  202. font-size: 24rpx;
  203. }
  204. }
  205. .main-type-box {
  206. display: flex;
  207. align-items: center;
  208. .main-type {
  209. font-size: 28rpx;
  210. color: #707a8a;
  211. margin-right: 20rpx;
  212. }
  213. .all {
  214. font-size: 28rpx;
  215. color: #707a8a;
  216. }
  217. }
  218. .sr-btn {
  219. width: 100%;
  220. height: 80rpx;
  221. line-height: 80rpx;
  222. text-align: center;
  223. border-radius: 10rpx;
  224. margin: 20rpx auto 0;
  225. background: linear-gradient(to left, #eeb80d, #ffe35b);
  226. font-size: 28rpx;
  227. color: #000;
  228. }
  229. .sr-tip {
  230. margin-top: 20rpx;
  231. .sr-tip-item {
  232. font-size: 24rpx;
  233. color: #707a8a;
  234. }
  235. }
  236. }
  237. .info {
  238. margin: 20rpx auto 0;
  239. width: 690rpx;
  240. background: #ffffff;
  241. border-radius: 20rpx;
  242. padding: 30rpx 20rpx;
  243. .info-item {
  244. font-size: 24rpx;
  245. color: #000;
  246. margin-bottom: 20rpx;
  247. }
  248. .red {
  249. color: red;
  250. }
  251. }
  252. </style>