deliveryInformation.vue 4.4 KB

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