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

336 lines
6.6 KiB

4 months ago
4 months ago
4 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 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. <addressSpot
  25. :address="detail.address"
  26. :latitude="detail.latitude"
  27. :longitude="detail.longitude"
  28. />
  29. <view class="bottom">
  30. <view class="browse">
  31. {{ detail.isBrowse }}浏览
  32. </view>
  33. <view class="browse">
  34. {{ detail.isComment }}条评论
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 分类 -->
  39. <view class="LabelOptions">
  40. <uv-tabs :list="category"
  41. :activeStyle="{color : '#000', fontWeight : 900}"
  42. lineColor="#5baaff"
  43. lineHeight="8rpx"
  44. lineWidth="50rpx"
  45. :scrollable="false"
  46. @click="tabsClick"></uv-tabs>
  47. </view>
  48. <!-- 商城美食 -->
  49. <view class="goodList"
  50. v-if="tagIndex == 0">
  51. <productSelectList
  52. @getData="getData"
  53. :list="list"/>
  54. </view>
  55. <!-- 店铺介绍 -->
  56. <view class="goodInfo"
  57. v-if="tagIndex == 1">
  58. <view class="box" :style="{'--sexcolor' : sex[detail.sex].color}">
  59. <view class="headPortraitimg"
  60. v-if="detail.shopImage">
  61. <image :src="detail.shopImage"
  62. @click.stop="previewImage([item.shopImage])"
  63. mode="aspectFill"></image>
  64. </view>
  65. <view class="YaoduUniversalWall">
  66. <view class="heide"
  67. v-if="detail.shopName">
  68. <view class="username text-ellipsis">
  69. {{ detail.shopName }}
  70. </view>
  71. </view>
  72. <callPhone
  73. :phone="detail.shopPhone"
  74. type="3"
  75. :phoneTitle="detail.title"
  76. :pid="detail.id"
  77. title="联系店家" />
  78. </view>
  79. </view>
  80. <view class="dynamics"
  81. v-html="$utils.stringFormatHtml(detail.title)">
  82. </view>
  83. <view class="Artworkimages">
  84. <view class="wrokimg" @click.stop="previewImage(detail.detailsImage, i)" :key="i"
  85. v-for="(img, i) in detail.detailsImage">
  86. <image :src="img" mode="aspectFill"></image>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 评论组件 -->
  91. <commentList
  92. v-if="tagIndex == 2"
  93. @getData="getData"
  94. :list="list"
  95. :params="params"
  96. />
  97. </view>
  98. </template>
  99. <script>
  100. import mixinsSex from '@/mixins/sex.js'
  101. import mixinsList from '@/mixins/list.js'
  102. import commentList from '../components/list/comment/commentList.vue'
  103. // import goodList from '../components/list/gourmet/goodList.vue'
  104. import productSelectList from '../components/list/gourmet/productSelectList.vue'
  105. export default {
  106. mixins: [mixinsSex, mixinsList],
  107. components: {
  108. commentList,
  109. productSelectList,
  110. },
  111. data() {
  112. return {
  113. category : [
  114. {
  115. name : '美食商城',
  116. value : 0,
  117. },
  118. {
  119. name : '店铺介绍',
  120. value : 1,
  121. },
  122. {
  123. name : '店铺评论',
  124. value : 2,
  125. },
  126. ],
  127. detail: {},
  128. // mixinsListApi : 'getCommentPage',//评论
  129. mixinsListApi : 'getGoodsList',//美食
  130. params : {
  131. type : '4',
  132. orderId : '',
  133. name : '',
  134. },
  135. id : 0,
  136. tagIndex : 0,
  137. }
  138. },
  139. onLoad(options) {
  140. // this.$route.query的参数
  141. console.log(options)
  142. this.id = options.id
  143. this.queryParams.type = this.params.type
  144. this.queryParams.orderId = options.id
  145. this.params.orderId = options.id
  146. this.queryParams.shopId = options.id
  147. },
  148. onShareAppMessage(res) {
  149. return {
  150. title: this.detail.title,
  151. path: '/pages_order/gourmet/gourmetDetail?id=' + this.id
  152. }
  153. },
  154. onPullDownRefresh() {
  155. this.getDetail()
  156. },
  157. onShow() {
  158. this.getDetail()
  159. },
  160. onShareAppMessage(res) {
  161. // return {
  162. // title: this.item.title,
  163. // desc: this.item.content && this.item.content.slice(0, 30),
  164. // path: '/pages/publish/postDetail?id=' + this.id
  165. // }
  166. },
  167. methods: {
  168. tabsClick(item) {
  169. this.tagIndex = item.value
  170. if(this.tagIndex == 0){
  171. this.list = []
  172. this.mixinsListApi = 'getGoodsList'
  173. }else if(this.tagIndex == 2){
  174. this.list = []
  175. this.mixinsListApi = 'getCommentPage'
  176. }
  177. this.getData()
  178. },
  179. getDetail() {
  180. this.$api('getStoreDetail', {
  181. id: this.id
  182. }, res => {
  183. uni.stopPullDownRefresh()
  184. if (res.code == 200) {
  185. this.params.name = res.result.title
  186. // res.result.image =
  187. // res.result.image ?
  188. // res.result.image.split(',') : [],
  189. res.result.detailsImage =
  190. res.result.detailsImage ?
  191. res.result.detailsImage.split(',') : [],
  192. // res.result.details =
  193. // res.result.details ?
  194. // res.result.details.split(',') : []
  195. this.detail = res.result
  196. }
  197. })
  198. },
  199. }
  200. }
  201. </script>
  202. <style lang="scss" scoped>
  203. .postDetail {
  204. padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx);
  205. .box {
  206. display: flex;
  207. align-items: center;
  208. .headPortraitimg {
  209. width: 100rpx;
  210. height: 100rpx;
  211. border-radius: 15rpx;
  212. overflow: hidden;
  213. image {
  214. width: 100%;
  215. height: 100%;
  216. }
  217. }
  218. .YaoduUniversalWall {
  219. padding: 0rpx 10rpx;
  220. .Times {
  221. display: flex;
  222. padding: 5rpx 0rpx;
  223. font-size: 20rpx;
  224. margin-top: 10rpx;
  225. .Month {
  226. margin: 0rpx 15rpx;
  227. }
  228. }
  229. }
  230. }
  231. .works {
  232. background-color: #fff;
  233. padding: 40rpx;
  234. border-radius: 20rpx;
  235. .personalInformation {
  236. display: flex;
  237. .inde {
  238. font-size: 25rpx;
  239. padding: 0rpx 8rpx;
  240. }
  241. .authentication {
  242. font-size: 25rpx;
  243. }
  244. }
  245. .bottom {
  246. display: flex;
  247. margin-top: 20rpx;
  248. font-size: 24rpx;
  249. .browse {
  250. margin: 0rpx 30rpx;
  251. color: rgb(132, 132, 132);
  252. }
  253. .Leavingamessage {
  254. margin-left: auto;
  255. display: flex;
  256. align-items: center;
  257. }
  258. }
  259. }
  260. .LabelOptions{
  261. background-color: #fff;
  262. }
  263. .goodList{
  264. // padding: 0 20rpx;
  265. }
  266. .goodInfo{
  267. margin: 20rpx;
  268. padding: 20rpx;
  269. background-color: #fff;
  270. border-radius: 30rpx;
  271. .dynamics {
  272. margin-top: 20rpx;
  273. font-size: 28rpx;
  274. letter-spacing: 3rpx;
  275. }
  276. .Artworkimages {
  277. display: flex;
  278. flex-wrap: wrap;
  279. .wrokimg {
  280. margin: 10rpx;
  281. image {
  282. height: 190rpx;
  283. width: 190rpx;
  284. border-radius: 20rpx;
  285. }
  286. }
  287. }
  288. }
  289. }
  290. </style>