putSalt.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <style lang="scss">
  2. page{background: #fff;}
  3. .main{
  4. margin-top: 20px;
  5. padding: 0 34px 0 31px;
  6. display: flex;
  7. justify-content: space-between;
  8. align-items: center;
  9. .main-font {
  10. font-size: 16px;
  11. font-family: PingFang SC;
  12. font-weight: 700;
  13. color: #333;
  14. }
  15. .main-input{
  16. width: calc(100% - 120px);
  17. height: 45px;
  18. background: #f4f4f4;
  19. border-radius: 5px;
  20. font-size: 16px;
  21. font-family: PingFang SC;
  22. font-weight: 500;
  23. color: #333;
  24. line-height: 45px;
  25. text-align: center;
  26. }
  27. }
  28. .main-price {
  29. margin-top: 26px;
  30. text-align: center;
  31. font-size: 15px;
  32. font-family: PingFang SC;
  33. font-weight: 500;
  34. color: #fd3b39;
  35. margin-bottom: 31px;
  36. }
  37. .money{
  38. margin-top: 38px;
  39. text-align: center;
  40. font-size: 16px;
  41. font-family: PingFang SC;
  42. font-weight: 700;
  43. color: #fd3b39;
  44. }
  45. .btn{
  46. width: 291px;
  47. height: 41px;
  48. background: #fc5b62;
  49. border-radius: 20px;
  50. margin: 49px auto 0;
  51. font-size: 15px;
  52. font-family: PingFangSC;
  53. font-weight: 500;
  54. color: #fff;
  55. line-height: 41px;
  56. text-align: center;
  57. }
  58. </style>
  59. <template>
  60. <view class="app">
  61. <view class="main">
  62. <view class="main-font">购买价格(元)</view>
  63. <view class="main-input">{{ data.buy_money || "" }}</view>
  64. </view>
  65. <view class="calendar">
  66. <zeng-calen :actDay="actDay" :chooseDay="chooseDay" ></zeng-calen>
  67. </view>
  68. <view class="money">符合{{ data.mentor_name || '' }}</view>
  69. <view class="main">
  70. <view class="main-font">挂售日期</view>
  71. <view class="main-input">{{ data.next_time_str || "" }}</view>
  72. </view>
  73. <view class="main">
  74. <view class="main-font">挂售价格(元)</view>
  75. <view class="main-input">{{ data.next_hanging_price || 0 }}</view>
  76. </view>
  77. <view class="money">
  78. 服务费{{ data.anticipate || '' }}易趣卷
  79. </view>
  80. <view class="btn" @tap="tapSumbit">确定</view>
  81. </view>
  82. </template>
  83. <script>
  84. import {mapState,mapMutations } from 'vuex';
  85. export default {
  86. computed: mapState(['user']),
  87. data() {
  88. return {
  89. statusBarHeight : 20,
  90. orderId : 0,
  91. actDay:[],
  92. chooseDay:[],
  93. data : {}
  94. }
  95. },
  96. onLoad(options) {
  97. this.orderId = options.id || 0;
  98. this.initView();
  99. },
  100. methods: {
  101. /**
  102. * 加载基础配置
  103. */
  104. initView:function(){
  105. uni.showLoading({ title: '获取数据中..' });
  106. var post = {};
  107. post.id = this.orderId;
  108. this
  109. .request
  110. .post("auctionHangingSale",post)
  111. .then(res => {
  112. uni.hideLoading();
  113. if(res.code == 200) {
  114. res.data.anticipate = res.data.anticipate.toFixed(2)
  115. this.data = res.data;
  116. this.actDay = [res.data.next_time];
  117. } else {
  118. this.utils.Tip(res.msg);
  119. }
  120. })
  121. .catch(res=>{
  122. uni.hideLoading();
  123. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  124. });
  125. },
  126. /**
  127. *
  128. */
  129. tapSumbit:function(){
  130. uni.showLoading({ title: '提交中..' });
  131. this
  132. .request
  133. .post("auctionHangingSaleSub",{id : this.orderId })
  134. .then(res => {
  135. uni.hideLoading();
  136. if(res.code == 200) {
  137. uni.redirectTo({ url:"./putSalt_ok" });
  138. } else {
  139. this.utils.Tip(res.msg);
  140. }
  141. })
  142. .catch(res=>{
  143. uni.hideLoading();
  144. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  145. });
  146. }
  147. }
  148. }
  149. </script>