detail.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view>
  3. <view class="product_detail">
  4. <!-- <image src="../../../static/news.jpg" mode="widthFix" class="pic"></image> -->
  5. <view class="box">
  6. <view class="title">{{ item.goodsName }}</view>
  7. <view class="clear"></view>
  8. <u-divider text="规格参数"></u-divider>
  9. <view class="item">
  10. <text class="desc">上架金额:</text>
  11. <text>¥ {{ item.resalePrice }}</text>
  12. <view class="clear"></view>
  13. </view>
  14. <view class="item">
  15. <text class="desc">计价单位:</text>
  16. <text>{{ item.goodsUnit }}</text>
  17. </view>
  18. <view class="item">
  19. <text class="desc">商品重量:</text>
  20. <text>{{ item.netWet }}</text>
  21. </view>
  22. <view class="item">
  23. <text class="desc">单价:</text>
  24. <text>{{ item.singlePrice }}</text>
  25. </view>
  26. <view class="item">
  27. <text class="desc">车牌号:</text>
  28. <text>{{ item.veNo }}</text>
  29. <view class="clear"></view>
  30. </view>
  31. <view class="item">
  32. <text class="desc">发布商:</text>
  33. <text>{{ item.leaderName }}</text>
  34. </view>
  35. <view class="item">
  36. <text class="desc">联系号码:</text>
  37. <text>{{item.leaderPhone}}</text>
  38. </view>
  39. <view class="item">
  40. <text class="desc">互市区:</text>
  41. <text>{{ item.tradeAreaName }}</text>
  42. <view class="clear"></view>
  43. </view>
  44. <view class="item" style="padding-top: 0px">
  45. <text class="desc">订单编号:</text>
  46. <text>{{ item.orderNo }}</text>
  47. </view>
  48. <view class="item">
  49. <text class="desc">发布时间:</text>
  50. <text>{{ item.createTime }}</text>
  51. <view class="clear"></view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="mfooter">
  56. <view class="flex">
  57. <view class="f">
  58. <button class="btn" v-if="user.userType == 3" @click="pay()">立即购买</button>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. data() {
  67. return {
  68. user: this.getUser(),
  69. item: {},
  70. orderIds: ''
  71. };
  72. },
  73. onLoad(e) {
  74. if (e.orderId) {
  75. this.orderIds = e.orderId;
  76. this.http.request({
  77. url: '/level-two-server/app/TbOrders/getDetailById',
  78. method: 'POST',
  79. data: { ids: this.orderIds},
  80. success: res => {
  81. let data = res.data.data;
  82. this.item = data[0];
  83. }
  84. });
  85. }
  86. },
  87. methods: {
  88. pay() {
  89. uni.showModal({
  90. title: '提示',
  91. content: '我已核对订单信息无误',
  92. success: res => {
  93. if (res.confirm) {
  94. this.http.request({
  95. url: '/level-two-server/app/TbOrders/purchaserBuy',
  96. method: 'POST',
  97. data: { ids: this.orderIds},
  98. success: res => {
  99. uni.navigateTo({ url: '/pages/market/two/leader/success' });
  100. }
  101. });
  102. }
  103. }
  104. });
  105. }
  106. }
  107. };
  108. </script>
  109. <style lang="scss">
  110. page {
  111. background-color: $pg;
  112. }
  113. </style>