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

296 lines
5.9 KiB

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.logoImage"
  8. @click.stop="previewImage([item.logoImage])"
  9. mode="aspectFill"></image>
  10. </view>
  11. <view class="YaoduUniversalWall">
  12. <view class="heide">
  13. <view class="username text-ellipsis">
  14. {{ detail.title }}
  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.address">
  25. <!-- 地址 -->
  26. {{ detail.address }}
  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. 营业时间{{ detail.workTime }}
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- <view class="dynamics" v-html="$utils.stringFormatHtml(detail.title)">
  41. </view> -->
  42. <view class="dynamics">
  43. 地址{{ detail.address }}
  44. </view>
  45. <view class="Artworkimages">
  46. <view class="wrokimg" @click.stop="previewImage(detail.detailsImage, i)" :key="i"
  47. v-for="(img, i) in detail.detailsImage">
  48. <image :src="img" mode="aspectFill"></image>
  49. </view>
  50. </view>
  51. <view class="bottom">
  52. <view class="browse">
  53. {{ detail.isBrowse }}浏览
  54. </view>
  55. <view class="browse">
  56. {{ detail.isComment }}条评论
  57. </view>
  58. <view class="Leavingamessage"
  59. @click="openLocation(detail.latitude, detail.longitude)"
  60. v-if="detail.latitude && detail.longitude">
  61. <uv-icon size="40rpx" name="map"></uv-icon>
  62. 导航
  63. </view>
  64. </view>
  65. </view>
  66. <commentList
  67. @getData="getData"
  68. :list="list"
  69. :params="params"
  70. />
  71. </view>
  72. </template>
  73. <script>
  74. import mixinsSex from '@/mixins/sex.js'
  75. import mixinsList from '@/mixins/list.js'
  76. import commentList from '../components/list/comment/commentList.vue'
  77. export default {
  78. mixins: [mixinsSex, mixinsList],
  79. components: {
  80. commentList
  81. },
  82. data() {
  83. return {
  84. detail: {},
  85. mixinsListApi : 'getCommentPage',
  86. params : {
  87. type : '4',
  88. orderId : '',
  89. name : '',
  90. },
  91. id : 0,
  92. }
  93. },
  94. onLoad(options) {
  95. // this.$route.query的参数
  96. console.log(options)
  97. this.id = options.id
  98. this.queryParams.type = this.params.type
  99. this.queryParams.orderId = options.id
  100. this.params.orderId = options.id
  101. },
  102. onShareAppMessage(res) {
  103. return {
  104. title: this.detail.title,
  105. path: '/pages_order/gourmet/gourmetDetail?id=' + this.id
  106. }
  107. },
  108. onPullDownRefresh() {
  109. this.getDetail()
  110. },
  111. onShow() {
  112. this.getDetail()
  113. },
  114. onShareAppMessage(res) {
  115. // return {
  116. // title: this.item.title,
  117. // desc: this.item.content && this.item.content.slice(0, 30),
  118. // path: '/pages/publish/postDetail?id=' + this.id
  119. // }
  120. },
  121. methods: {
  122. getDetail() {
  123. this.$api('getStoreDetail', {
  124. id: this.id
  125. }, res => {
  126. uni.stopPullDownRefresh()
  127. if (res.code == 200) {
  128. this.params.name = res.result.title
  129. // res.result.image =
  130. // res.result.image ?
  131. // res.result.image.split(',') : [],
  132. res.result.detailsImage =
  133. res.result.detailsImage ?
  134. res.result.detailsImage.split(',') : [],
  135. // res.result.details =
  136. // res.result.details ?
  137. // res.result.details.split(',') : []
  138. this.detail = res.result
  139. }
  140. })
  141. },
  142. }
  143. }
  144. </script>
  145. <style lang="scss" scoped>
  146. .postDetail {
  147. padding-bottom: env(safe-area-inset-bottom);
  148. .works {
  149. background-color: #fff;
  150. padding: 40rpx;
  151. border-radius: 20rpx;
  152. .box {
  153. display: flex;
  154. align-items: center;
  155. .headPortraitimg {
  156. width: 100rpx;
  157. height: 100rpx;
  158. border-radius: 15rpx;
  159. overflow: hidden;
  160. image {
  161. width: 100%;
  162. height: 100%;
  163. }
  164. }
  165. .YaoduUniversalWall {
  166. padding: 0rpx 10rpx;
  167. .username {
  168. max-width: 200rpx;
  169. }
  170. .heide {
  171. display: flex;
  172. align-items: center;
  173. }
  174. .inde {
  175. display: flex;
  176. justify-content: center;
  177. align-items: center;
  178. padding: 0rpx 10rpx;
  179. margin: 0rpx 5rpx;
  180. font-size: 20rpx;
  181. height: 30rpx;
  182. color: white;
  183. // background-color: rgb(124, 136, 242);
  184. background-color: var(--sexcolor);
  185. border-radius: 7rpx;
  186. flex-shrink: 0;
  187. }
  188. .authentication {
  189. display: flex;
  190. justify-content: center;
  191. align-items: center;
  192. padding: 0rpx 10rpx;
  193. margin: 0rpx 5rpx;
  194. font-size: 20rpx;
  195. height: 34rpx;
  196. padding: 0rpx 10rpx;
  197. color: white;
  198. background-color: #ffd036;
  199. border-radius: 7rpx;
  200. flex-shrink: 0;
  201. }
  202. .Times {
  203. display: flex;
  204. padding: 5rpx 0rpx;
  205. font-size: 20rpx;
  206. margin-top: 10rpx;
  207. .Month {
  208. margin: 0rpx 15rpx;
  209. }
  210. }
  211. }
  212. }
  213. .personalInformation {
  214. display: flex;
  215. .inde {
  216. font-size: 25rpx;
  217. padding: 0rpx 8rpx;
  218. }
  219. .authentication {
  220. font-size: 25rpx;
  221. }
  222. }
  223. .dynamics {
  224. margin-top: 20rpx;
  225. font-size: 28rpx;
  226. // font-weight: bold;
  227. // line-height: 35rpx;
  228. letter-spacing: 3rpx;
  229. }
  230. .Artworkimages {
  231. display: flex;
  232. flex-wrap: wrap;
  233. .wrokimg {
  234. margin: 10rpx;
  235. image {
  236. height: 190rpx;
  237. width: 190rpx;
  238. border-radius: 20rpx;
  239. }
  240. }
  241. }
  242. .bottom {
  243. display: flex;
  244. margin-top: 20rpx;
  245. font-size: 24rpx;
  246. .browse {
  247. margin: 0rpx 30rpx;
  248. color: rgb(132, 132, 132);
  249. }
  250. .Leavingamessage {
  251. margin-left: auto;
  252. display: flex;
  253. align-items: center;
  254. }
  255. }
  256. }
  257. }
  258. </style>