瑶都万能墙
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.

335 lines
6.7 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="postDetail">
  3. <navbar leftClick @leftClick="$utils.navigateBack" title="详情" />
  4. <view class="works" @click="$emit('click')">
  5. <view class="box" :style="{'--sexcolor' : sex[detail.sex].color}">
  6. <view class="headPortraitimg">
  7. <image :src="detail.userImage"
  8. @click.stop="previewImage([item.userImage])"
  9. mode="aspectFill"></image>
  10. </view>
  11. <view class="YaoduUniversalWall">
  12. <view class="heide">
  13. <view class="username text-ellipsis">
  14. {{ detail.userName }}
  15. </view>
  16. <view class="inde" v-if="detail.sex">
  17. <!-- 性别 -->
  18. {{ detail.sex }}
  19. </view>
  20. <view class="inde" v-if="detail.yearDate">
  21. <!-- 年份 -->
  22. {{ detail.yearDate }}
  23. </view>
  24. <view class="inde" v-if="detail.addId">
  25. <!-- 地址 -->
  26. {{ detail.addId }}
  27. </view>
  28. <view class="authentication" v-if="detail.isContent">
  29. <!-- 个人认证 -->
  30. {{ detail.isContent }}
  31. </view>
  32. </view>
  33. <view class="Times">
  34. <view class="TimeMonth">
  35. <!-- 10-08 -->
  36. {{ detail.createTime }}发布
  37. </view>
  38. <!-- <view class="Month">
  39. 12:34
  40. </view> -->
  41. </view>
  42. </view>
  43. </view>
  44. <view class="dynamics" v-html="$utils.stringFormatHtml(detail.title)">
  45. </view>
  46. <view class="address"
  47. @click="openLocation(detail.latitude, detail.longitude)"
  48. v-if="detail.address">
  49. <uv-icon size="30rpx" name="map"></uv-icon>
  50. <view class="text-ellipsis">
  51. {{ detail.address }}
  52. </view>
  53. </view>
  54. <view class="Artworkimages">
  55. <view class="wrokimg" @click.stop="previewImage(detail.image, i)" :key="i"
  56. v-for="(img, i) in detail.image">
  57. <image :src="img" mode="aspectFill"></image>
  58. </view>
  59. </view>
  60. <view class="bottom">
  61. <view class="browse">
  62. {{ detail.isBrowse }}浏览
  63. </view>
  64. <view class="browse">
  65. {{ detail.isComment }}条评论
  66. </view>
  67. <!-- <view class="Leavingamessage"
  68. @click="openLocation(detail.latitude, detail.longitude)"
  69. v-if="detail.latitude && detail.longitude">
  70. <uv-icon size="40rpx" name="map"></uv-icon>
  71. 导航
  72. </view> -->
  73. <view class="phone"
  74. v-if="detail.phone"
  75. @click.stop="callPhone">
  76. <image src="/static/image/home/phone.png" mode=""></image>
  77. 联系{{ ta[detail.sex] }}
  78. </view>
  79. </view>
  80. </view>
  81. <commentList
  82. @getData="getData"
  83. :list="list"
  84. :params="params"
  85. />
  86. </view>
  87. </template>
  88. <script>
  89. import mixinsSex from '@/mixins/sex.js'
  90. import mixinsList from '@/mixins/list.js'
  91. import commentList from '../components/list/comment/commentList.vue'
  92. export default {
  93. mixins: [mixinsSex, mixinsList],
  94. components: {
  95. commentList
  96. },
  97. data() {
  98. return {
  99. detail: {},
  100. mixinsListApi : 'getCommentPage',
  101. params : {
  102. type : '0',
  103. orderId : '',
  104. name : '',
  105. },
  106. id : 0,
  107. }
  108. },
  109. onLoad(options) {
  110. // this.$route.query的参数
  111. console.log(options)
  112. this.id = options.id
  113. this.queryParams.type = this.params.type
  114. this.queryParams.orderId = options.id
  115. this.params.orderId = options.id
  116. },
  117. onShareAppMessage(res) {
  118. return {
  119. title: this.detail.title,
  120. path: '/pages_order/post/postDetail?id=' + this.id
  121. }
  122. },
  123. onPullDownRefresh() {
  124. this.getDetail()
  125. },
  126. onShow() {
  127. this.getDetail()
  128. },
  129. onShareAppMessage(res) {
  130. // return {
  131. // title: this.item.title,
  132. // desc: this.item.content && this.item.content.slice(0, 30),
  133. // path: '/pages/publish/postDetail?id=' + this.id
  134. // }
  135. },
  136. methods: {
  137. getDetail() {
  138. this.$api('getPostDetail', {
  139. id: this.id
  140. }, res => {
  141. uni.stopPullDownRefresh()
  142. if (res.code == 200) {
  143. this.params.name = res.result.userName
  144. res.result.image =
  145. res.result.image ?
  146. res.result.image.split(',') : [],
  147. this.detail = res.result
  148. }
  149. })
  150. },
  151. callPhone(){
  152. uni.makePhoneCall({
  153. phoneNumber: this.detail.phone,
  154. success() {
  155. console.log('安卓拨打成功');
  156. },
  157. fail() {
  158. console.log('安卓拨打失败');
  159. }
  160. })
  161. },
  162. }
  163. }
  164. </script>
  165. <style lang="scss" scoped>
  166. .postDetail {
  167. padding-bottom: env(safe-area-inset-bottom);
  168. .works {
  169. background-color: #fff;
  170. padding: 40rpx;
  171. border-radius: 20rpx;
  172. .box {
  173. display: flex;
  174. align-items: center;
  175. .headPortraitimg {
  176. width: 100rpx;
  177. height: 100rpx;
  178. border-radius: 15rpx;
  179. overflow: hidden;
  180. image {
  181. width: 100%;
  182. height: 100%;
  183. }
  184. }
  185. .YaoduUniversalWall {
  186. padding: 0rpx 10rpx;
  187. .username {
  188. max-width: 200rpx;
  189. }
  190. .heide {
  191. display: flex;
  192. justify-content: center;
  193. align-items: center;
  194. }
  195. .inde {
  196. display: flex;
  197. justify-content: center;
  198. align-items: center;
  199. padding: 0rpx 10rpx;
  200. margin: 0rpx 5rpx;
  201. font-size: 20rpx;
  202. height: 30rpx;
  203. color: white;
  204. // background-color: rgb(124, 136, 242);
  205. background-color: var(--sexcolor);
  206. border-radius: 7rpx;
  207. flex-shrink: 0;
  208. }
  209. .authentication {
  210. display: flex;
  211. justify-content: center;
  212. align-items: center;
  213. padding: 0rpx 10rpx;
  214. margin: 0rpx 5rpx;
  215. font-size: 20rpx;
  216. height: 34rpx;
  217. padding: 0rpx 10rpx;
  218. color: white;
  219. background-color: #ffd036;
  220. border-radius: 7rpx;
  221. flex-shrink: 0;
  222. }
  223. .Times {
  224. display: flex;
  225. padding: 5rpx 0rpx;
  226. font-size: 20rpx;
  227. margin-top: 10rpx;
  228. .Month {
  229. margin: 0rpx 15rpx;
  230. }
  231. }
  232. }
  233. }
  234. .personalInformation {
  235. display: flex;
  236. .inde {
  237. font-size: 25rpx;
  238. padding: 0rpx 8rpx;
  239. }
  240. .authentication {
  241. font-size: 25rpx;
  242. }
  243. }
  244. .dynamics {
  245. margin-top: 20rpx;
  246. font-size: 28rpx;
  247. // font-weight: bold;
  248. // line-height: 35rpx;
  249. letter-spacing: 3rpx;
  250. }
  251. .address{
  252. font-size: 24rpx;
  253. margin-top: 20rpx;
  254. display: flex;
  255. align-items: center;
  256. }
  257. .Artworkimages {
  258. display: flex;
  259. flex-wrap: wrap;
  260. .wrokimg {
  261. margin: 10rpx;
  262. image {
  263. height: 190rpx;
  264. width: 190rpx;
  265. border-radius: 20rpx;
  266. }
  267. }
  268. }
  269. .bottom {
  270. display: flex;
  271. margin-top: 20rpx;
  272. font-size: 24rpx;
  273. .browse {
  274. margin: 0rpx 30rpx;
  275. color: rgb(132, 132, 132);
  276. }
  277. .Leavingamessage {
  278. margin-left: auto;
  279. display: flex;
  280. align-items: center;
  281. }
  282. .phone{
  283. background-color: rgba($uni-color, 0.2);
  284. color: $uni-color;
  285. padding: 8rpx 16rpx;
  286. border-radius: 10rpx;
  287. margin-left: auto;
  288. image{
  289. width: 20rpx;
  290. height: 20rpx;
  291. }
  292. }
  293. }
  294. }
  295. }
  296. </style>