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

337 lines
6.6 KiB

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