detail.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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.goodsQuantity }}</text>
  12. <view class="clear"></view>
  13. </view>
  14. <view class="item">
  15. <text class="desc">计量单位:</text>
  16. <text>{{ item.goodsUnit }}</text>
  17. <view class="clear"></view>
  18. </view>
  19. <view class="item">
  20. <text class="desc">商户:</text>
  21. <text>{{ item.createName }}</text>
  22. <view class="clear"></view>
  23. </view>
  24. <view class="item">
  25. <text class="desc">互市区:</text>
  26. <text>{{ item.tradeAreaName }}</text>
  27. <view class="clear"></view>
  28. </view>
  29. <view class="item">
  30. <text class="desc">发布时间:</text>
  31. <text>{{ item.createTime }}</text>
  32. <view class="clear"></view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="mfooter">
  37. <view class="flex">
  38. <view class="f">
  39. <button class="btn" v-if="user.userType == 2" @click="pay()">立即接单</button>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. user: this.getUser(),
  50. item: {}
  51. };
  52. },
  53. onLoad(e) {
  54. if (e.id) {
  55. this.http.request({
  56. url: '/level-two-server/app/TbGoodsDemand/getById?id=' + e.id,
  57. success: res => {
  58. this.item = res.data.data;
  59. }
  60. });
  61. }
  62. },
  63. methods: {
  64. pay() {
  65. uni.navigateTo({ url: '/pages/market/two/leader/confirm?item=' + JSON.stringify(this.item) });
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang="scss">
  71. page {
  72. background-color: $pg;
  73. }
  74. </style>