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

240 lines
4.5 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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>
  17. <view class="Times">
  18. <view class="TimeMonth">
  19. 营业时间{{ detail.workTime }}
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- <view class="dynamics" v-html="$utils.stringFormatHtml(detail.title)">
  25. </view> -->
  26. <view class="Artworkimages">
  27. <view class="wrokimg" @click.stop="previewImage(detail.detailsImage, i)" :key="i"
  28. v-for="(img, i) in detail.detailsImage">
  29. <image :src="img" mode="aspectFill"></image>
  30. </view>
  31. </view>
  32. <addressSpot
  33. :address="detail.address"
  34. :latitude="detail.latitude"
  35. :longitude="detail.longitude"
  36. />
  37. <view class="bottom">
  38. <view class="browse">
  39. {{ detail.isBrowse }}浏览
  40. </view>
  41. <view class="browse">
  42. {{ detail.isComment }}条评论
  43. </view>
  44. </view>
  45. </view>
  46. <commentList
  47. @getData="getData"
  48. :list="list"
  49. :params="params"
  50. />
  51. </view>
  52. </template>
  53. <script>
  54. import mixinsSex from '@/mixins/sex.js'
  55. import mixinsList from '@/mixins/list.js'
  56. import commentList from '../components/list/comment/commentList.vue'
  57. export default {
  58. mixins: [mixinsSex, mixinsList],
  59. components: {
  60. commentList
  61. },
  62. data() {
  63. return {
  64. detail: {},
  65. mixinsListApi : 'getCommentPage',
  66. params : {
  67. type : '4',
  68. orderId : '',
  69. name : '',
  70. },
  71. id : 0,
  72. }
  73. },
  74. onLoad(options) {
  75. // this.$route.query的参数
  76. console.log(options)
  77. this.id = options.id
  78. this.queryParams.type = this.params.type
  79. this.queryParams.orderId = options.id
  80. this.params.orderId = options.id
  81. },
  82. onShareAppMessage(res) {
  83. return {
  84. title: this.detail.title,
  85. path: '/pages_order/gourmet/gourmetDetail?id=' + this.id
  86. }
  87. },
  88. onPullDownRefresh() {
  89. this.getDetail()
  90. },
  91. onShow() {
  92. this.getDetail()
  93. },
  94. onShareAppMessage(res) {
  95. // return {
  96. // title: this.item.title,
  97. // desc: this.item.content && this.item.content.slice(0, 30),
  98. // path: '/pages/publish/postDetail?id=' + this.id
  99. // }
  100. },
  101. methods: {
  102. getDetail() {
  103. this.$api('getStoreDetail', {
  104. id: this.id
  105. }, res => {
  106. uni.stopPullDownRefresh()
  107. if (res.code == 200) {
  108. this.params.name = res.result.title
  109. // res.result.image =
  110. // res.result.image ?
  111. // res.result.image.split(',') : [],
  112. res.result.detailsImage =
  113. res.result.detailsImage ?
  114. res.result.detailsImage.split(',') : [],
  115. // res.result.details =
  116. // res.result.details ?
  117. // res.result.details.split(',') : []
  118. this.detail = res.result
  119. }
  120. })
  121. },
  122. }
  123. }
  124. </script>
  125. <style lang="scss" scoped>
  126. .postDetail {
  127. padding-bottom: env(safe-area-inset-bottom);
  128. .works {
  129. background-color: #fff;
  130. padding: 40rpx;
  131. border-radius: 20rpx;
  132. .box {
  133. display: flex;
  134. align-items: center;
  135. .headPortraitimg {
  136. width: 100rpx;
  137. height: 100rpx;
  138. border-radius: 15rpx;
  139. overflow: hidden;
  140. image {
  141. width: 100%;
  142. height: 100%;
  143. }
  144. }
  145. .YaoduUniversalWall {
  146. padding: 0rpx 10rpx;
  147. .Times {
  148. display: flex;
  149. padding: 5rpx 0rpx;
  150. font-size: 20rpx;
  151. margin-top: 10rpx;
  152. .Month {
  153. margin: 0rpx 15rpx;
  154. }
  155. }
  156. }
  157. }
  158. .personalInformation {
  159. display: flex;
  160. .inde {
  161. font-size: 25rpx;
  162. padding: 0rpx 8rpx;
  163. }
  164. .authentication {
  165. font-size: 25rpx;
  166. }
  167. }
  168. .dynamics {
  169. margin-top: 20rpx;
  170. font-size: 28rpx;
  171. // font-weight: bold;
  172. // line-height: 35rpx;
  173. letter-spacing: 3rpx;
  174. }
  175. .Artworkimages {
  176. display: flex;
  177. flex-wrap: wrap;
  178. .wrokimg {
  179. margin: 10rpx;
  180. image {
  181. height: 190rpx;
  182. width: 190rpx;
  183. border-radius: 20rpx;
  184. }
  185. }
  186. }
  187. .bottom {
  188. display: flex;
  189. margin-top: 20rpx;
  190. font-size: 24rpx;
  191. .browse {
  192. margin: 0rpx 30rpx;
  193. color: rgb(132, 132, 132);
  194. }
  195. .Leavingamessage {
  196. margin-left: auto;
  197. display: flex;
  198. align-items: center;
  199. }
  200. }
  201. }
  202. }
  203. </style>