logistics.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="logistics dir-left-nowrap main-between cross-center" @click="routeGo()">
  3. <view class="font" v-if="send_type != 1 && is_send == 1 && express_no" >
  4. <view class="item margin">
  5. <text class="gray">快递公司:</text>
  6. <text class="black">{{express}}</text>
  7. </view>
  8. <view class="item">
  9. <text class="gray">物流单号:</text>
  10. <text class="black">{{express_no}}</text>
  11. </view>
  12. </view>
  13. <view class="font" v-else-if="send_type == 1">
  14. <view class="item margin">
  15. <text class="gray">门店名称:</text>
  16. <text class="black">{{store.name}}</text>
  17. </view>
  18. <view class="item margin">
  19. <text class="gray">联系电话:</text>
  20. <text class="black">{{store.mobile}}</text>
  21. </view>
  22. <view class="item">
  23. <text class="gray">门店地址:</text>
  24. <text class="black">{{store.address}}</text>
  25. </view>
  26. </view>
  27. <image class="icon" src="/static/image/icon/arrow-right.png"></image>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'logistics',
  33. props: [`send_type`, `store`, `is_send`, `express`, `express_no`, `customer_name`, `cover_pic`],
  34. methods: {
  35. routeGo() {
  36. if (this.send_type != 1 && this.is_send == 1 && this.express_no) {
  37. uni.navigateTo({
  38. url: `/pages/order/express-detail/express-detail?express=${this.express}&express_no=${this.express_no}&customer_name=${this.customer_name}&cover_pic=${this.cover_pic}`
  39. })
  40. } else {
  41. uni.openLocation({
  42. latitude: parseFloat(this.store.latitude),
  43. longitude: parseFloat(this.store.longitude),
  44. address: this.store.address,
  45. name: this.store.name,
  46. })
  47. }
  48. },
  49. }
  50. }
  51. </script>
  52. <style scoped lang="scss">
  53. .logistics {
  54. width: 100%;
  55. background-color: #ffffff;
  56. padding: #{28upx 24upx};
  57. .icon {
  58. width: #{12upx};
  59. height: #{20upx};
  60. }
  61. .font {
  62. font-size: #{24upx};
  63. }
  64. .margin {
  65. margin-bottom: #{15upx};
  66. }
  67. }
  68. </style>