hjyd
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.

331 lines
9.9 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="wrap">
  3. <div class="empty" v-if="showEmpty"></div>
  4. <div class="flex_center" id="case_detail_container_flex_center">
  5. <div class="case_detail_container" id="case_detail_container">
  6. <div class="content">
  7. <Tabs :isCase="true" />
  8. <Trumbs :isCase="true" />
  9. <div class="content_detail">
  10. <div class="left_swiper">
  11. <div class="header_intro">
  12. <p>
  13. {{
  14. case_detail_list[industry_id] &&
  15. case_detail_list[industry_id][example_id]?.title
  16. }}
  17. </p>
  18. </div>
  19. <div class="case_swiper_wrap">
  20. <swiper
  21. :pagination="true"
  22. :modules="modules"
  23. :autoHeight="true"
  24. class="case_detail_swiper"
  25. >
  26. <swiper-slide
  27. v-for="item in case_detail_list[industry_id] &&
  28. case_detail_list[industry_id][example_id]?.swiperList"
  29. :key="item.id"
  30. >
  31. <div class="swiper_div_wrap">
  32. <img :src="item.picUrl" class="img_swiper" alt="" />
  33. </div>
  34. </swiper-slide>
  35. </swiper>
  36. </div>
  37. </div>
  38. <div class="placeholder">
  39. <div
  40. class="right_detail"
  41. v-on:mouseover="mouseover"
  42. v-on:mouseleave="mouseleave"
  43. @scroll="handleScroll"
  44. >
  45. <div class="detail_header">
  46. <div>详情页</div>
  47. <div class="right">
  48. <p class="en">DETAILS PAGE</p>
  49. </div>
  50. </div>
  51. <div class="article">
  52. <Paragraph
  53. :text="
  54. case_detail_list[industry_id] &&
  55. case_detail_list[industry_id][example_id]?.detailList
  56. ?.topText
  57. "
  58. :isHtml="
  59. case_detail_list[industry_id] &&
  60. case_detail_list[industry_id][example_id]?.detailList
  61. ?.isHtml
  62. "
  63. />
  64. <div
  65. class="card_container"
  66. v-for="(item, index) in case_detail_list[industry_id] &&
  67. case_detail_list[industry_id][example_id]?.detailList?.card"
  68. :key="index"
  69. >
  70. <CardTitle
  71. :title="item?.cardTitle"
  72. :blue_title="item?.cardBlueTitle"
  73. :en="item?.en"
  74. />
  75. <IMG
  76. :double="item?.isDouble"
  77. :pic1="item?.pic1"
  78. :pic2="item?.pic2"
  79. />
  80. <Paragraph
  81. :isHtml="item.isHtml"
  82. v-if="item?.cardText"
  83. :text="item?.cardText"
  84. />
  85. <Intro
  86. v-if="item?.cardIntro"
  87. :cardIntro="item?.cardIntro"
  88. />
  89. <video
  90. v-if="item?.video"
  91. controls
  92. style="width: 100%; height: auto; object-fit: fill"
  93. controlslist="nodownload"
  94. >
  95. <source :src="item?.video" />
  96. </video>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </template>
  107. <script setup>
  108. import { ref, onMounted } from 'vue'
  109. import { handleScreenAuto, handleScreenToFlexCenter } from '@/common/utils'
  110. // Import Swiper Vue.js components
  111. import { Swiper, SwiperSlide } from 'swiper/vue'
  112. import { Pagination } from 'swiper'
  113. import { case_detail_list } from '@/mock/case'
  114. import { useDetailStore, useSwiperStore } from '@/store'
  115. import { storeToRefs } from 'pinia'
  116. import Video from 'cpns/Video'
  117. import 'swiper/css'
  118. import 'swiper/css/pagination'
  119. import Paragraph from 'cpns/Paragraph'
  120. import IMG from 'cpns/Img'
  121. import CardTitle from 'cpns/CardTitle'
  122. import Tabs from 'cpns/Tabs'
  123. import Trumbs from 'cpns/Trumbs'
  124. import Intro from 'cpns/Intro'
  125. const showEmpty = ref(true)
  126. const modules = ref([Pagination])
  127. const detailStore = useDetailStore()
  128. const swiperStore = useSwiperStore()
  129. const { industry_id, example_id } = storeToRefs(detailStore)
  130. onMounted(() => {
  131. const func = () => {
  132. handleScreenAuto('#case_detail_container')
  133. handleScreenToFlexCenter(
  134. '#case_detail_container',
  135. '#case_detail_container_flex_center',
  136. )
  137. }
  138. func()
  139. window.onresize = func
  140. })
  141. const mouseover = function () {
  142. swiperStore.swiper.disable()
  143. }
  144. const mouseleave = function () {
  145. swiperStore.swiper.enable()
  146. }
  147. const handleScroll = e => {
  148. const { scrollTop, clientHeight, scrollHeight } = e.target
  149. if (scrollTop == 0) {
  150. swiperStore.swiper.enable()
  151. }
  152. if (scrollTop + clientHeight === scrollHeight) {
  153. swiperStore.swiper.enable()
  154. }
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. .wrap {
  159. width: 100vw;
  160. height: 100vh;
  161. background: $common_bg;
  162. position: relative;
  163. display: flex;
  164. align-items: center;
  165. justify-content: center;
  166. flex-direction: column;
  167. padding-bottom: 50px;
  168. ::-webkit-scrollbar {
  169. width: 25px;
  170. background-color: #f1f1f1;
  171. }
  172. ::-webkit-scrollbar-thumb {
  173. background-color: #c1c1c1;
  174. }
  175. ::-webkit-scrollbar-button:vertical:end:increment {
  176. width: 25px;
  177. height: 25px;
  178. background: url(../../../../assets/img/scroll/bottom.png) no-repeat;
  179. background-size: 100% 100%;
  180. }
  181. ::-webkit-scrollbar-button:vertical:start:decrement {
  182. width: 25px;
  183. height: 25px;
  184. background: url(../../../../assets/img/scroll/top.png) no-repeat;
  185. background-size: 100% 100%;
  186. }
  187. ::-webkit-scrollbar-button:vertical:end:increment,
  188. ::-webkit-scrollbar-button:vertical:start:decrement {
  189. display: block;
  190. }
  191. .empty {
  192. width: 100%;
  193. min-height: 90px;
  194. }
  195. .flex_center {
  196. flex: 1;
  197. overflow: hidden;
  198. display: flex;
  199. align-items: center;
  200. justify-content: center;
  201. .case_detail_container {
  202. max-width: 100vw;
  203. height: 100%;
  204. .content {
  205. box-sizing: border-box;
  206. width: 100%;
  207. height: 100%;
  208. padding: 40px 153px 0 153px;
  209. display: flex;
  210. justify-content: space-between;
  211. flex-direction: column;
  212. .content_detail {
  213. flex: 1;
  214. box-sizing: border-box;
  215. margin-top: 30px;
  216. display: flex;
  217. justify-content: space-between;
  218. position: relative;
  219. .left_swiper {
  220. width: 1024px;
  221. position: relative;
  222. flex: 1;
  223. display: flex;
  224. // justify-content: space-between;
  225. flex-direction: column;
  226. .case_swiper_wrap {
  227. // flex: 1;
  228. }
  229. .swiper_div_wrap {
  230. // width: 1024px;
  231. width: 100%;
  232. // height: 576px;
  233. overflow: hidden;
  234. .img_swiper {
  235. width: 1024px;
  236. height: 576px;
  237. object-fit: cover;
  238. }
  239. }
  240. .header_intro {
  241. height: 80px;
  242. padding: 0 43px;
  243. display: flex;
  244. justify-content: space-between;
  245. align-items: center;
  246. font-size: 28px;
  247. font-family: DFPYuanW7-GB;
  248. box-sizing: border-box;
  249. font-weight: 400;
  250. z-index: 333;
  251. background: linear-gradient(90deg, #283fe7, #4b17e1);
  252. color: #fafafa;
  253. .p_text {
  254. font-size: 22px;
  255. font-family: 'ZonaPro';
  256. font-weight: 800;
  257. }
  258. }
  259. }
  260. .placeholder {
  261. flex: 1;
  262. position: relative;
  263. height: 656px;
  264. z-index: 999;
  265. .right_detail {
  266. transition-property: all;
  267. transition-duration: 0.1s;
  268. animation-fill-mode: forwards;
  269. position: absolute;
  270. top: 0;
  271. right: 0;
  272. flex: 1;
  273. z-index: 999;
  274. overflow: scroll;
  275. z-index: 100;
  276. height: 100%;
  277. width: 100%;
  278. scrollbar-width: none; /* firefox */
  279. overflow-x: auto;
  280. .detail_header {
  281. position: sticky;
  282. top: 0;
  283. left: 0;
  284. right: 0;
  285. width: 100%;
  286. padding: 0 25px;
  287. height: 80px;
  288. background: linear-gradient(90deg, #283fe7, #4b17e1);
  289. font-size: 20px;
  290. font-family: DFPYuanW7-GB;
  291. font-weight: 400;
  292. color: #ffffff;
  293. display: flex;
  294. justify-content: space-between;
  295. align-items: center;
  296. box-sizing: border-box;
  297. .right {
  298. display: flex;
  299. align-items: center;
  300. font-size: 18px;
  301. font-family: Alibaba PuHuiTi;
  302. .en {
  303. font-size: 10px;
  304. font-family: ' ZonaPro';
  305. }
  306. }
  307. }
  308. .article {
  309. min-height: 100%;
  310. background: #fff;
  311. z-index: 222;
  312. .card_container {
  313. background: linear-gradient(#f9f9f9, #fff);
  314. }
  315. }
  316. }
  317. .right_detail:hover {
  318. z-index: 120;
  319. width: 160%;
  320. }
  321. }
  322. }
  323. }
  324. }
  325. }
  326. }
  327. </style>