contract.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <view class="contract-box">
  3. <view class="contract-top">
  4. <top-head :top-type="2"></top-head>
  5. </view>
  6. <view class="contract-data">
  7. <view class="data-input">
  8. <view class="input-item">
  9. <view class="item-detail">{{$t('index.contract.num')}}</view>
  10. <view class="item-detail">{{$t('index.contract.money')}}</view>
  11. </view>
  12. <view class="input-item">
  13. <view class="item-detail">100</view>
  14. <view class="item-detail item-img">
  15. <view class="text-img">
  16. <image src="@/static/img/index/bnb.png"></image>
  17. </view>
  18. <view class="text">BNB</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="data-but">
  23. <button>定金</button>
  24. </view>
  25. <view class="data-button">
  26. <image src="@/static/img/index/msg.svg"></image>
  27. <view>{{$t('index.contract.word')}}>></view>
  28. </view>
  29. </view>
  30. <view class="contract-list">
  31. <view class="list-title">
  32. <view class="title-img">
  33. <image src="@/static/img/index/bnb2.png" mode="aspectFill"></image>
  34. </view>
  35. <view class="title-text">{{$t('index.contract.list.title')}}({{total}})</view>
  36. </view>
  37. <division></division>
  38. <contract-list @setTotal="setTotal"></contract-list>
  39. </view>
  40. <view class="contract-bottom"></view>
  41. </view>
  42. </template>
  43. <script>
  44. import TopHead from "@/pages/index/components/top-head";
  45. import Division from "@/pages/index/components/division";
  46. import ContractList from "@/pages/index/components/contract-list";
  47. export default {
  48. name: "contract",
  49. components: { ContractList, Division, TopHead},
  50. props: {},
  51. data() {
  52. return {
  53. total:0
  54. }
  55. },
  56. watch: {},
  57. mounted() {
  58. },
  59. methods: {
  60. setTotal(total){
  61. this.total=total
  62. },
  63. goToUrl(type) {
  64. switch (type) {
  65. case 1:
  66. uni.navigateTo({
  67. 'url': 'pages/index/contract'
  68. })
  69. break
  70. case 2:
  71. uni.navigateTo({
  72. 'url': 'pages/index/contract'
  73. })
  74. break
  75. case 3:
  76. uni.navigateTo({
  77. 'url': 'pages/index/contract'
  78. })
  79. break
  80. }
  81. },
  82. }
  83. }
  84. </script>
  85. <style scoped lang="scss">
  86. .contract-box {
  87. box-shadow: 0 0 24rpx 0 rgba(0, 0, 0, 0.16);
  88. .contract-top {
  89. padding: 20rpx 0;
  90. background: #fff;
  91. }
  92. .contract-data {
  93. background: #fff;
  94. width: 90%;
  95. margin: 60rpx auto 0;
  96. border-radius: 20rpx;
  97. padding: 40rpx 20rpx;
  98. font-size: 36rpx;
  99. box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.08);
  100. .data-input {
  101. border: 1rpx solid #000;
  102. overflow: hidden;
  103. border-radius: 10rpx;
  104. padding: 20rpx;
  105. .input-item {
  106. display: flex;
  107. justify-content: space-between;
  108. .item-detail {
  109. font-size: 26rpx;
  110. }
  111. }
  112. .item-img {
  113. display: flex;
  114. justify-content: right;
  115. .text-img {
  116. display: inline-block;
  117. border-radius: 50%;
  118. height: 60rpx;
  119. width: 60rpx;
  120. box-sizing: border-box;
  121. margin-right: 10rpx;
  122. image {
  123. width: 60rpx;
  124. height: 60rpx;
  125. z-index: 100;
  126. }
  127. }
  128. .text {
  129. line-height: 60rpx;
  130. }
  131. }
  132. .input-item:first-child {
  133. margin-bottom: 40rpx;
  134. }
  135. .input-item:last-child {
  136. height: 60rpx;
  137. .item-detail {
  138. font-size: 32rpx;
  139. line-height: 60rpx;
  140. }
  141. }
  142. }
  143. .data-but {
  144. border-radius: 20rpx;
  145. margin-top: 60rpx;
  146. button {
  147. height: 90rpx;
  148. line-height: 90rpx;
  149. text-align: center;
  150. background: rgb(0, 87, 255);
  151. color: #fff;
  152. font-size: 26rpx;
  153. }
  154. }
  155. .data-button {
  156. margin-top: 40rpx;
  157. display: flex;
  158. justify-content: right;
  159. image {
  160. width: 40rpx;
  161. height: 40rpx;
  162. }
  163. view {
  164. font-size: 26rpx;
  165. margin-left: 10rpx;
  166. color: rgb(0, 87, 255);
  167. line-height: 40rpx;
  168. }
  169. }
  170. }
  171. .contract-list {
  172. background: #fff;
  173. width: 90%;
  174. margin: 40rpx auto;
  175. border-radius: 10px;
  176. padding: 20px 10px;
  177. overflow: hidden;
  178. font-size: 13px;
  179. box-shadow: 0 8rpx 16rpx 0 rgba(0, 0, 0, 0.08);
  180. .list-title {
  181. display: flex;
  182. justify-content: left;
  183. .title-img {
  184. background: rgb(0, 87, 255);
  185. padding: 10rpx;
  186. border-radius: 20rpx;
  187. image {
  188. width: 80rpx;
  189. height: 80rpx;
  190. }
  191. }
  192. .title-text {
  193. margin-left: 20rpx;
  194. line-height: 100rpx;
  195. font-size: 34rpx;
  196. font-weight: bold;
  197. }
  198. }
  199. }
  200. .contract-bottom {
  201. height: 50rpx;
  202. }
  203. }
  204. </style>