zyXingqing.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <view class="all">
  3. <view class="shang padding-v-30 padding-c-30 position-relative">
  4. <image class="img" src="../../static/img/xq6.png" mode="scaleToFill"></image>
  5. <view class="tz padding-b-30">{{base.name}}</view>
  6. <view class="sy flex-start padding-b-10">
  7. <view class="syl">{{$t('zy.m0')}}:{{base.day_get}}%</view>
  8. </view>
  9. <view class="sj flex margin-t-30 position-relative">
  10. <view class="sj1">
  11. <view class="sz">{{base.single_time_max*1}}</view>
  12. <view class="wz">{{$t('zy.m1')}}</view>
  13. </view>
  14. <view class="sj1">
  15. <view class="sz">{{base.single_time_max*1}}</view>
  16. <view class="wz">{{$t('zy.m3')}}</view>
  17. </view>
  18. <view class="sj1">
  19. <view class="sz">{{base.day}}</view>
  20. <view class="wz">{{$t('zy.m2')}}</view>
  21. </view>
  22. <view class="sj1">
  23. <view class="sz">{{base.single_time_min*1}}</view>
  24. <view class="wz">{{$t('zy.m4')}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="sygc margin-t-20 padding-v-30 padding-c-30">
  29. <view class="gc padding-b-30">{{$t('zy.m5')}}</view>
  30. <view class="an flex padding-c-30">
  31. <view class="an1"></view>
  32. <view class="xian"></view>
  33. <view class="an1"></view>
  34. <view class="xian"></view>
  35. <view class="an1"></view>
  36. </view>
  37. <view class="wenben padding-t-30 flex padding-c-30">
  38. <view class="wb">
  39. <view class="wen">{{$t('zy.m6')}}</view>
  40. <view class="wen padding-t-10">{{$t('zy.m7')}}</view>
  41. </view>
  42. <view class="wb">
  43. <view class="wen text-center">{{$t('zy.m8')}}</view>
  44. <view class="wen padding-t-10 text-center">{{$t('zy.m9')}}</view>
  45. </view>
  46. <view class="wb">
  47. <view class="wen text-right">{{$t('zy.m10')}}</view>
  48. <view class="wen padding-t-10 text-right">{{$t('zy.m11')}}</view>
  49. </view>
  50. </view>
  51. <view class="icon-box padding-t-30">
  52. <view class="icon flex-start">
  53. <image class="ic" src="../../static/img/xq1.png" mode=""></image>
  54. <view class="jiaru">{{$t('zy.m12')}}</view>
  55. </view>
  56. <view class="icon flex-start">
  57. <image class="ic" src="../../static/img/xq4.png" mode=""></image>
  58. <view class="jiaru">{{$t('zy.m13')}}</view>
  59. </view>
  60. <view class="icon flex-start">
  61. <image class="ic" src="../../static/img/xq3.png" mode=""></image>
  62. <view class="jiaru">
  63. {{$t('zy.m14')}}:{{base.single_time_max*1}}*({{base.day_get}}%+100%)*{{base.day}}</view>
  64. </view>
  65. <view class="icon flex-start">
  66. <image class="ic" src="../../static/img/xq2.png" mode=""></image>
  67. <view class="jiaru">{{$t('zy.m15')}}:{{allMoney}}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="jine margin-t-20">
  72. <view class="je">{{$t('zy.m16')}}</view>
  73. <view class="jes margin-t-30">{{base.join*1}}U</view>
  74. </view>
  75. <view class="yue flex margin-t-20">
  76. <view class="flex">
  77. <image class="qianbao" src="../../static/img/xq5.png" mode=""></image>
  78. <view class="ye padding-l-20">{{$t('zy.m17')}}</view>
  79. </view>
  80. <view class="flex">
  81. <view class="dangqian">{{$t('zy.m18')}}:</view>
  82. <view class="dqs">{{userWallet}}</view>
  83. </view>
  84. </view>
  85. <view class="aaa"></view>
  86. <view class="liji">
  87. <view class="jr" @click="joinLock">
  88. <view class="jia">{{$t('zy.m19')}}</view>
  89. </view>
  90. </view>
  91. <uni-popup type="bottom" ref="popup">
  92. <inputPassword @commit='KeyInfo'></inputPassword>
  93. </uni-popup>
  94. </view>
  95. </template>
  96. <script>
  97. import {
  98. lockDetail,
  99. lockJoin
  100. } from "@/api/mypledge.js"
  101. import {
  102. gameWallet
  103. } from "@/api/game.js";
  104. import inputPassword from "@/components/input-password/input-password.vue";
  105. export default {
  106. components: {
  107. inputPassword
  108. },
  109. data() {
  110. return {
  111. id: '',
  112. base: {},
  113. userWallet: '',
  114. allMoney: '',
  115. // 保存支付密码
  116. password: '',
  117. //购买的数量
  118. num: '',
  119. };
  120. },
  121. onLoad(option) {
  122. this.id = option.id;
  123. uni.setNavigationBarTitle({
  124. title: this.$t("tab.b5"),
  125. });
  126. // 加载数据
  127. this.lockDetail();
  128. this.gameWallet();
  129. },
  130. methods: {
  131. // 关闭支付弹窗
  132. colsePayPassword() {
  133. this.$refs.popup.close();
  134. },
  135. KeyInfo(val) {
  136. this.password = val;
  137. this.colsePayPassword();
  138. this.joinLock();
  139. },
  140. // 购买数量
  141. joinNum() {
  142. },
  143. // 购买质押
  144. joinLock() {
  145. lockJoin({
  146. id: this.id,
  147. number: this.num,
  148. trade_password: this.password
  149. }).then(
  150. (res) => {
  151. console.log(res);
  152. }
  153. ).then(
  154. () => {
  155. }
  156. )
  157. },
  158. gameWallet() {
  159. gameWallet().then((res) => {
  160. this.userWallet = +res.data.back.USDT.money.money
  161. })
  162. },
  163. lockDetail() {
  164. const that = this;
  165. lockDetail({
  166. id: that.id
  167. }).then(
  168. (res) => {
  169. that.base = res.data.data;
  170. that.allMoney = that.base.single_time_max * (that.base.day_get * 1 + 100) * that.base.day /
  171. 100;
  172. }
  173. ).catch(
  174. (res) => {
  175. console.log(res);
  176. }
  177. )
  178. }
  179. }
  180. }
  181. </script>
  182. <style lang="scss">
  183. page {
  184. background-color: #191a1f;
  185. }
  186. .all {
  187. line-height: 1;
  188. padding-bottom: 190rpx;
  189. }
  190. .shang {
  191. font-weight: 800;
  192. background-color: $page-color-base;
  193. .tz {
  194. font-size: 33rpx;
  195. color: #FFFFFF;
  196. }
  197. .sy {
  198. .syl {
  199. background: #FEB041;
  200. border-radius: 10rpx;
  201. font-size: 21rpx;
  202. color: #000000;
  203. padding: 10rpx;
  204. }
  205. }
  206. .sj {
  207. font-weight: 800;
  208. text-align: center;
  209. .sj1 {
  210. width: 25%;
  211. .sz {
  212. font-size: 40rpx;
  213. color: #FFFFFF;
  214. }
  215. .wz {
  216. margin-top: 20rpx;
  217. font-size: 22rpx;
  218. color: #999999;
  219. padding-bottom: 20rpx;
  220. }
  221. }
  222. }
  223. .img {
  224. position: absolute;
  225. width: 325rpx;
  226. height: 285rpx;
  227. top: 0rpx;
  228. right: 40rpx;
  229. }
  230. }
  231. .sygc {
  232. background-color: $page-color-base;
  233. .gc {
  234. font-size: 28rpx;
  235. font-weight: 800;
  236. color: #FFFFFF;
  237. }
  238. .an {
  239. .an1 {
  240. width: 24rpx;
  241. height: 24rpx;
  242. border: 4px solid #FEB041;
  243. border-radius: 12rpx;
  244. }
  245. .xian {
  246. flex-grow: 1;
  247. height: 1rpx;
  248. background: #fff;
  249. }
  250. }
  251. }
  252. .wenben {
  253. background-color: $page-color-base;
  254. .wb {
  255. width: 33.3%;
  256. .wen {
  257. font-size: 22rpx;
  258. font-weight: 500;
  259. color: #999999;
  260. }
  261. }
  262. }
  263. .icon-box {
  264. background-color: $page-color-base;
  265. .icon:nth-child(2n-1) {
  266. background: #161616;
  267. }
  268. .icon {
  269. margin: 0 30rpx;
  270. border-radius: 10rpx;
  271. padding: 20rpx;
  272. .ic {
  273. width: 38rpx;
  274. height: 36rpx;
  275. }
  276. .jiaru {
  277. padding-left: 20rpx;
  278. height: 23rpx;
  279. font-size: 24rpx;
  280. color: #FFFFFF;
  281. }
  282. }
  283. }
  284. .jine {
  285. background-color: $page-color-base;
  286. font-weight: 800;
  287. padding: 30rpx;
  288. .je {
  289. font-size: 28rpx;
  290. color: #999999;
  291. }
  292. .jes {
  293. font-size: 74rpx;
  294. color: #FEB041;
  295. }
  296. }
  297. .yue {
  298. background-color: $page-color-base;
  299. width: 750rpx;
  300. color: #FFFFFF;
  301. font-size: 29rpx;
  302. padding: 30rpx;
  303. .qianbao {
  304. width: 80rpx;
  305. height: 64rpx;
  306. }
  307. .ye {}
  308. .dangqian {}
  309. .dqs {
  310. color: #FEB041;
  311. }
  312. }
  313. .liji {
  314. padding: 40rpx 30rpx;
  315. position: fixed;
  316. bottom: 0;
  317. left: 0;
  318. right: 0;
  319. background-color: $page-color-base;
  320. box-shadow: 0rpx 0rpx 20rpx #FFF;
  321. .jr {
  322. background: linear-gradient(90deg, #feb041 0%, #feb041 100%);
  323. border-radius: 10rpx;
  324. padding: 30rpx;
  325. text-align: center;
  326. }
  327. .jia {
  328. font-size: 32rpx;
  329. font-weight: bold;
  330. color: #040404;
  331. }
  332. }
  333. </style>