gsell.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="center">
  3. <view class="main">
  4. <view class="main-font">购买价格(元)</view>
  5. <view class="main-input">{{ (buy * 1).toFixed(2) * 1 }}</view>
  6. </view>
  7. <view class="center"><calendar class="sign-date-box" :checks="signList" checksClass="" :checkTextShow="true" :nextMounth="next"></calendar></view>
  8. <view class="title">今日最高限价{{ (price * 1).toFixed(2) * 1 }}</view>
  9. <view class="main">
  10. <view class="main-font">挂售日期</view>
  11. <view class="main-input">{{ deta }}</view>
  12. </view>
  13. <view class="main">
  14. <view class="main-font">挂售价格(元)</view>
  15. <view class="main-input">{{ (price * 1).toFixed(2) * 1 }}</view>
  16. </view>
  17. <view class="money">服务费{{ (fwprice * 1).toFixed(2) * 1 }}易趣卷</view>
  18. <view class="btn" @click="sall()">确定</view>
  19. </view>
  20. </template>
  21. <script>
  22. import { gsxq, hanging_sale } from '@/api/hall.js';
  23. import calendar from '../../components/ss-calendar/ss-calendar.vue';
  24. export default {
  25. components: {
  26. calendar
  27. },
  28. data() {
  29. return {
  30. signList: [],
  31. id: '',
  32. price: '', //挂售价格
  33. buy: '', //购买价格
  34. deta: '', //挂售日期
  35. fwprice: '', //服务费
  36. next: false
  37. };
  38. },
  39. onLoad(option) {
  40. this.id = option.id;
  41. this.loadData();
  42. },
  43. methods: {
  44. loadData() {
  45. gsxq({ id: this.id }).then(e => {
  46. console.log(e);
  47. this.buy = e.data.price;
  48. this.price = e.data.hanging_price;
  49. this.fwprice = e.data.anticipate;
  50. let arr = e.data.gs_time.split(' ');
  51. let brr = arr[0].split('-');
  52. // this.signList.push(brr[2] * 1)
  53. this.signList.push(brr[2] * 1);
  54. let month = new Date().getMonth() + 1;
  55. console.log(month, '1234568797321896');
  56. if (brr[1] * 1 == month) {
  57. this.next = false;
  58. } else {
  59. this.next = true;
  60. }
  61. console.log(this.signList);
  62. this.deta = brr[1] + '月' + brr[2] + '日';
  63. console.log(brr);
  64. });
  65. },
  66. sall() {
  67. hanging_sale({ id: this.id }).then(e => {
  68. uni.navigateTo({
  69. url: '/pages/money/success?type=2'
  70. });
  71. });
  72. }
  73. }
  74. };
  75. </script>
  76. <style lang="scss">
  77. .center,
  78. page {
  79. height: auto;
  80. background: #ffffff;
  81. min-height: 100%;
  82. }
  83. .title {
  84. margin-top: 50rpx;
  85. text-align: center;
  86. font-size: 30rpx;
  87. font-family: PingFang SC;
  88. font-weight: 500;
  89. color: #fd3b39;
  90. margin-bottom: 60rpx;
  91. }
  92. .main {
  93. margin-top: 40rpx;
  94. padding: 0 66rpx 0 60rpx;
  95. display: flex;
  96. justify-content: space-between;
  97. align-items: center;
  98. .main-font {
  99. font-size: 32rpx;
  100. font-family: PingFang SC;
  101. font-weight: bold;
  102. color: #333333;
  103. }
  104. .main-input {
  105. width: 404rpx;
  106. height: 88rpx;
  107. background: #f4f4f4;
  108. border-radius: 10rpx;
  109. font-size: 32rpx;
  110. font-family: PingFang SC;
  111. font-weight: 500;
  112. color: #333333;
  113. line-height: 88rpx;
  114. text-align: center;
  115. }
  116. }
  117. .money {
  118. margin-top: 74rpx;
  119. text-align: center;
  120. font-size: 32rpx;
  121. font-family: PingFang SC;
  122. font-weight: bold;
  123. color: #fd3b39;
  124. }
  125. .btn {
  126. width: 560rpx;
  127. height: 80rpx;
  128. background: #fc5b62;
  129. border-radius: 40rpx;
  130. margin: 96rpx auto 0;
  131. font-size: 30rpx;
  132. font-family: PingFangSC;
  133. font-weight: 500;
  134. color: #ffffff;
  135. line-height: 80rpx;
  136. text-align: center;
  137. }
  138. </style>