瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
3.2 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="详情" />
  4. <view class="works">
  5. <userHeadItem :item="detail"/>
  6. <daynamicInfo :item="detail"/>
  7. <view class="bottom">
  8. <view class="browse">
  9. {{ detail.isBrowse }}浏览
  10. </view>
  11. <view class="browse">
  12. {{ detail.isComment }}条评论
  13. </view>
  14. <!-- <view class="Leavingamessage"
  15. @click="openLocation(detail.latitude, detail.longitude)"
  16. v-if="detail.latitude && detail.longitude">
  17. <uv-icon size="40rpx" name="map"></uv-icon>
  18. 导航
  19. </view> -->
  20. <callPhone
  21. style="margin-left: auto;"
  22. :phone="item.phone"
  23. :sexName="item.sex"/>
  24. </view>
  25. </view>
  26. <commentList
  27. @getData="getData"
  28. :list="list"
  29. :params="params"
  30. />
  31. </view>
  32. </template>
  33. <script>
  34. import mixinsSex from '@/mixins/sex.js'
  35. import mixinsList from '@/mixins/list.js'
  36. import commentList from '../components/list/comment/commentList.vue'
  37. import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
  38. import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
  39. export default {
  40. mixins: [mixinsSex, mixinsList],
  41. components: {
  42. commentList,
  43. userHeadItem,
  44. daynamicInfo,
  45. },
  46. data() {
  47. return {
  48. detail: {},
  49. mixinsListApi : 'getCommentPage',
  50. params : {
  51. type : '0',
  52. orderId : '',
  53. name : '',
  54. },
  55. id : 0,
  56. }
  57. },
  58. onLoad(options) {
  59. // this.$route.query的参数
  60. console.log(options)
  61. this.id = options.id
  62. this.queryParams.type = this.params.type
  63. this.queryParams.orderId = options.id
  64. this.params.orderId = options.id
  65. },
  66. onShareAppMessage(res) {
  67. return {
  68. title: this.detail.title,
  69. path: '/pages_order/post/postDetail?id=' + this.id
  70. }
  71. },
  72. onPullDownRefresh() {
  73. this.getDetail()
  74. },
  75. onShow() {
  76. this.getDetail()
  77. },
  78. onShareAppMessage(res) {
  79. // return {
  80. // title: this.item.title,
  81. // desc: this.item.content && this.item.content.slice(0, 30),
  82. // path: '/pages/publish/postDetail?id=' + this.id
  83. // }
  84. },
  85. methods: {
  86. getDetail() {
  87. this.$api('getPostDetail', {
  88. id: this.id
  89. }, res => {
  90. uni.stopPullDownRefresh()
  91. if (res.code == 200) {
  92. this.params.name = res.result.userName
  93. this.detail = res.result
  94. }
  95. })
  96. },
  97. callPhone(){
  98. uni.makePhoneCall({
  99. phoneNumber: this.detail.phone,
  100. success() {
  101. console.log('安卓拨打成功');
  102. },
  103. fail() {
  104. console.log('安卓拨打失败');
  105. }
  106. })
  107. },
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. .postDetail {
  113. padding-bottom: env(safe-area-inset-bottom);
  114. .works {
  115. background-color: #fff;
  116. padding: 40rpx;
  117. border-radius: 20rpx;
  118. .bottom {
  119. display: flex;
  120. margin-top: 20rpx;
  121. font-size: 24rpx;
  122. .browse {
  123. margin: 0rpx 30rpx;
  124. color: rgb(132, 132, 132);
  125. }
  126. .Leavingamessage {
  127. margin-left: auto;
  128. display: flex;
  129. align-items: center;
  130. }
  131. .phone{
  132. background-color: rgba($uni-color, 0.2);
  133. color: $uni-color;
  134. padding: 8rpx 16rpx;
  135. border-radius: 10rpx;
  136. margin-left: auto;
  137. image{
  138. width: 20rpx;
  139. height: 20rpx;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. </style>