deliveryInformation.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view style="position: relative;">
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view :style="{marginTop:navH}"></view>
  6. <view v-if="projectForm == 1">
  7. <view class="address">
  8. <view class="address_icon">
  9. <image style="width: 50rpx;height: 50rpx;" :src="picture.icon_loc" mode="">
  10. </image>
  11. </view>
  12. <view style="width: 70%;">
  13. <view style="display: flex;">
  14. <p class='ipon' style="padding-right: 100rpx;">{{address.receiver_name}}</p>
  15. <p class='ipon'>{{address.phone_number}}</p>
  16. </view>
  17. <p class='ipon'>{{address.full_detail_addr}}</p>
  18. </view>
  19. </view>
  20. <view class="logistics1">
  21. <view>
  22. <p style="margin-bottom: 10rpx;">物流公司:{{logistics.company_name}}</p>
  23. <p>物流单号:{{logistics.logistics_number}}
  24. <image :src="picture.icon_copy" mode="" class="copy-img"
  25. @click="handleCopy(logistics.logistics_number)" />
  26. </p>
  27. </view>
  28. </view>
  29. </view>
  30. <view v-if="projectForm == 2" class="logistics1" style="margin: 0;">
  31. <view>
  32. <p>券码信息:{{logistics.coupon_code_information}}
  33. <image :src="picture.icon_copy" mode="" class="copy-img"
  34. @click="handleCopy(logistics.coupon_code_information)" />
  35. </p>
  36. </view>
  37. </view>
  38. <view v-if="projectForm == 3" class="logistics1" style="margin: 0;">
  39. <view>
  40. <p style="margin-bottom: 30rpx;">探店时间</p>
  41. <p>{{logistics.explorestore_starttime}} &nbsp;&nbsp;至&nbsp;&nbsp;{{logistics.explorestore_endtime}}</p>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import mvBar from "@/components/mys_navBar/mysNavBar";
  48. export default {
  49. components: {
  50. mvBar,
  51. },
  52. data() {
  53. return {
  54. navH: getApp().globalData.navHeight,
  55. picture: getApp().globalData.picture,
  56. address: {},
  57. taskId: "",
  58. projectForm: "",
  59. logistics: {
  60. company_name: "",
  61. logistics_number: "",
  62. coupon_code_information: "",
  63. explorestore_starttime: "",
  64. explorestore_endtime: ""
  65. },
  66. mysNavConfig: {
  67. /* 开启单页显示首页图标 */
  68. isHome: false,
  69. /* 固定导航 */
  70. navFixed: true,
  71. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  72. navTitle: {
  73. text: "物流信息",
  74. color: "",
  75. fontSize: "32rpx", // px upx rpx
  76. fontWeight: "normal", // 100 - 700
  77. },
  78. btnType: "type2",
  79. onLeftClick: '',
  80. /* type2 按钮 */
  81. type2Config: {
  82. // 左图标
  83. leftPath: "/static/img/png2.png",
  84. // 右图标
  85. rightPath: "/static/img/png4.png",
  86. // 圆角
  87. radius: "40rpx",
  88. },
  89. },
  90. }
  91. },
  92. onLoad(options) {
  93. let data = options.textObj.replace(/""/g, "");
  94. data = JSON.parse(decodeURIComponent(data))
  95. this.address = data.address
  96. this.taskId = data.taskId
  97. this.projectForm = data.projectForm
  98. uni.showLoading({
  99. title: '加载中'
  100. });
  101. this.getLogisticsInfo()
  102. },
  103. methods: {
  104. handleCopy(content) {
  105. wx.setClipboardData({
  106. data: content,
  107. success: function(res) {
  108. console.log("复制成功");
  109. }
  110. });
  111. },
  112. getLogisticsInfo() {
  113. this.$https.get('/youngee/c/t/g/get-task-logistics-info' +
  114. "?" +
  115. "task_id" +
  116. "=" +
  117. this.taskId
  118. ).then(res => {
  119. this.logistics = res.data.data
  120. this.logistics.explorestore_starttime = this.logistics.explorestore_starttime.slice(0, 16)
  121. this.logistics.explorestore_endtime = this.logistics.explorestore_endtime.slice(0, 16)
  122. this.loading = false;
  123. uni.hideLoading();
  124. })
  125. },
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. p {
  131. font-size: 30rpx;
  132. }
  133. .address {
  134. display: flex;
  135. margin: 20rpx 0;
  136. // padding: 20rpx 20rpx;
  137. background-color: #FFFFFF;
  138. justify-content: space-around;
  139. align-items: center;
  140. .address_icon {
  141. width: 15%;
  142. vertical-align: middle;
  143. display: flex;
  144. justify-content: center;
  145. }
  146. .address_edit {
  147. width: 15%;
  148. }
  149. .address_edit image {
  150. vertical-align: middle;
  151. width: 50rpx;
  152. height: 50rpx;
  153. display: inline-block;
  154. padding-right: 14rpx;
  155. }
  156. .ipon {
  157. color: #333333;
  158. font-size: 30rpx;
  159. font-weight: 500;
  160. margin-bottom: 10rpx;
  161. }
  162. }
  163. .logistics1 {
  164. margin-top: 50rpx;
  165. display: flex;
  166. flex-flow: column;
  167. align-items: center;
  168. justify-content: center;
  169. }
  170. </style>