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

365 lines
7.2 KiB

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