detail.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template>
  2. <view class="exhibitor-detail">
  3. <nav-bar title="展商详情" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view>
  5. <view class="main-container">
  6. <view class="exhibitor-main">
  7. <view class="exhibitor-logo">
  8. <image src="https://oss.starify.cn/prod/starify/up/0001018678/20241108/672da70c02212.png?x-oss-process=image/resize,w_200" mode="aspectFit" />
  9. </view>
  10. <view class="exhibitor-title">
  11. <view class="exhibitor-title-1">
  12. {{ exhibitor.name_zh_cn }}
  13. </view>
  14. <view class="exhibitor-title-2">
  15. {{ exhibitor.name_en_us }}
  16. </view>
  17. <view class="exhibitor-title-3">
  18. {{ exhibitor.country }}
  19. </view>
  20. </view>
  21. <view class="exhibitor-number">
  22. <view class="exhibitor-number-label">展位号:</view>
  23. <view class="exhibitor-number-text">{{ exhibitor.hall_booth_no }}</view>
  24. </view>
  25. </view>
  26. <view class="exhibitor-desc">
  27. {{ exhibitor.introduce_zh_cn }}
  28. </view>
  29. <view class="exhibitor-tags">
  30. <view class="exhibitor-tags-category">产品分类:</view>
  31. <view class="exhibitor-tags-list">
  32. <view class="exhibitor-tag" v-for="(item) in exhibitor.product_cate_names">{{ item }}</view>
  33. </view>
  34. </view>
  35. <view class="exhibitor-tags">
  36. <view class="exhibitor-tags-category">应用领域:</view>
  37. <view class="exhibitor-tags-list">
  38. <view class="exhibitor-tag" v-for="(item) in exhibitor.application_areas_names">{{ item }}</view>
  39. </view>
  40. </view>
  41. <view class="exhibitor-operation">
  42. <view class="exhibitor-views">浏览:{{ exhibitor.pv }}</view>
  43. <view class="exhibitor-action">
  44. <view>
  45. <view class="iconfont icon-xiaochengxu-renqiicon"></view>
  46. <view>人气:{{ exhibitor.poll_count }}</view>
  47. </view>
  48. <view>
  49. <button :plain="true" @click.stop="onShare()">
  50. <view>
  51. <view class="iconfont icon-zhuanfa"></view>
  52. <view>分享</view>
  53. </view>
  54. </button>
  55. </view>
  56. <view>
  57. <view v-if="exhibitor.is_collect" class="iconfont icon-favourites-filled-star-symbol active"></view>
  58. <view v-else class="iconfont icon-Favourites-Add-Large"></view>
  59. <view>收藏</view>
  60. </view>
  61. <view>
  62. <view v-if="exhibitor.is_like" class="iconfont icon-aixin active"></view>
  63. <view v-else class="iconfont icon-heart1"></view>
  64. <view>点赞</view>
  65. </view>
  66. <view>
  67. <view v-if="exhibitor.is_poll" class="iconfont icon-Ticket1 active"></view>
  68. <view v-else class="iconfont icon-xiaochengxu-toupiaoicon"></view>
  69. <view>投票</view>
  70. </view>
  71. </view>
  72. </view>
  73. <u-panel title="展品资料">
  74. <exhibit-recommend :limit="exhibitRecommendLimit" :exhibitorId="exhibitorId"/>
  75. </u-panel>
  76. <u-panel title="展商新闻">
  77. <news-recommend recommend-type="detail" :exhibitorId="exhibitorId" />
  78. </u-panel>
  79. <u-panel title="展商活动">
  80. <activity-recommend recommend-type="detail" :exhibitorId="exhibitorId" />
  81. </u-panel>
  82. <view class="click-more"><van-button type="primary" @click="navigateTo('/pages/exhibitor/index')">点击查看更多展商信息</van-button></view>
  83. </view>
  84. </u-scroll-view>
  85. <u-share-action-sheet :show.sync="showShare" :show-info="shareInfo" />
  86. </view>
  87. </template>
  88. <script>
  89. import NavBar from '@/components/layout/nav-bar'
  90. import UScrollView from '@/components/common/u-scroll-view'
  91. import UShareActionSheet from '@/components/common/u-share-action-sheet'
  92. import UPanel from '@/components/common/u-panel'
  93. import ExhibitRecommend from '@/pages/exhibitor/components/exhibit-recommend.vue'
  94. import NewsRecommend from '@/pages/news/components/news-recommend.vue'
  95. import ActivityRecommend from '@/pages/activity/components/activity-recommend.vue'
  96. import { exhibitorsInfo } from '@/api/exhibitor'
  97. export default {
  98. options: {
  99. // styleIsolation: 'shared'
  100. },
  101. components: {
  102. NavBar,
  103. UScrollView,
  104. UShareActionSheet,
  105. UPanel,
  106. ExhibitRecommend,
  107. ActivityRecommend,
  108. NewsRecommend
  109. },
  110. computed: {
  111. },
  112. onLoad(options) {
  113. this.exhibitorId = options.id
  114. this.getExhibitorsInfo()
  115. },
  116. data() {
  117. return {
  118. showExhibitMore: true,
  119. showShare: false,
  120. shareInfo: null,
  121. exhibitRecommendLimit: 4,
  122. exhibitor: {
  123. name_zh_cn: '',
  124. name_en_us: '',
  125. country: '',
  126. hall_booth_no: '',
  127. product_cate_names: [],
  128. application_areas_names: [],
  129. pv: 0,
  130. poll_count: 0
  131. },
  132. exhibitorId: 0
  133. }
  134. },
  135. created() {
  136. this.loadFontFace('Poppins')
  137. },
  138. methods: {
  139. getExhibitorsInfo() {
  140. exhibitorsInfo({id: this.exhibitorId}).then(res => {
  141. if (res.code === 0) {
  142. this.exhibitor = res.data
  143. }
  144. })
  145. },
  146. onShareAppMessage(ops) {
  147. return {
  148. title: '科世达(上海)连接器有限公司',
  149. path: `/pages/exhibitor/detail`,
  150. imageUrl: this.exhibitor.logo + '?x-oss-process=image/resize,w_600,h_600,limit_0,m_pad'
  151. }
  152. },
  153. onShare(item) {
  154. this.shareInfo = {
  155. title: this.exhibitor.name_zh_cn,
  156. path: `/pages/exhibitor/detail?id=` + this.exhibitor.id,
  157. imageUrl: this.exhibitor.logo + '?x-oss-process=image/resize,w_600,h_600,limit_0,m_pad'
  158. }
  159. this.showShare = true
  160. }
  161. }
  162. }
  163. </script>
  164. <style lang="scss">
  165. @import "@/static/style/pages/exhibitor-detail.scss";
  166. .exhibitor-detail{
  167. .exhibitor-main{
  168. display: flex;
  169. }
  170. .exhibitor-logo{
  171. width: 166rpx;
  172. height: 166rpx;
  173. background: #FFFFFF;
  174. border: 1rpx solid #D9D9D9;
  175. image{
  176. width: 100%;
  177. height: 100%;
  178. }
  179. }
  180. .u-panel{
  181. background-color: #FFFFFF;
  182. }
  183. .exhibitor-title{
  184. font-family: Poppins, Poppins;
  185. font-size: 30rpx;
  186. color: #000000;
  187. line-height: 40rpx;
  188. padding-left: 19rpx;
  189. padding-right: 24rpx;
  190. .exhibitor-title-1{
  191. font-weight: bold;
  192. }
  193. .exhibitor-title-2 {
  194. font-size: 28rpx;
  195. }
  196. .exhibitor-title-3 {
  197. font-size: $fontSize0;
  198. color: #333333;
  199. line-height: 20rpx;
  200. margin-top: 10rpx;
  201. }
  202. }
  203. .exhibitor-number{
  204. flex-shrink: 0;
  205. justify-content: flex-end;
  206. margin-top: 12rpx;
  207. }
  208. .exhibitor-number-label{
  209. font-size: $fontSize0;
  210. color: #555555;
  211. }
  212. .exhibitor-number-text{
  213. font-family: Poppins, Poppins;
  214. font-weight: bold;
  215. font-size: $fontSize6;
  216. color: #E57519;
  217. letter-spacing: 2rpx;
  218. }
  219. .exhibitor-desc{
  220. font-family: Poppins, Poppins;
  221. font-size: $fontSize2;
  222. color: #333333;
  223. line-height: 35rpx;
  224. margin-top: 30rpx;
  225. margin-bottom: 12rpx;
  226. }
  227. .u-panel{
  228. margin-top: 40rpx;
  229. }
  230. .click-more{
  231. display: flex;
  232. justify-content: center;
  233. margin-top: 49rpx;
  234. @include link-button;
  235. }
  236. }
  237. </style>