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

367 lines
7.4 KiB

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