feiYiShiPin.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <view class="body">
  3. <view class="header">
  4. <view class="tit">湖里文化遗产保护中心</view>
  5. <view class="thumbnail_1">
  6. <image style="width: 100%; height: 100%" src="/static/img/img_seal@2x.png"></image>
  7. </view>
  8. </view>
  9. <!-- -->
  10. <view class="" style="position: relative">
  11. <view class="fybk_zc">
  12. <view class="fybk_tit">
  13. <image style="width: 120rpx; height: 860rpx" src="/static/img/img_sp.png"></image>
  14. </view>
  15. <view class="fybk_tab">科普·系列片</view>
  16. </view>
  17. </view>
  18. <view class="banner">
  19. <!-- 中间音频 -->
  20. <view class="aa" style="display: flex; justify-content: space-between; width: 2400rpx; align-items: center">
  21. <view class="" :class="{ bianda1: index === middleIndex }" @click="vidoBtn(index)" v-for="(item, index) in videoList" :key="item.id">
  22. <view class="" :class="{ bianda2: index === middleIndex }">
  23. <view class="biank_3" :class="{ bianda3: index === middleIndex }">
  24. <view class="biank_4" :class="{ bianda4: index === middleIndex }">
  25. <view class="section_2" :class="{ bianda5: index === middleIndex }">
  26. <image class="img_center" :src="item.image"></image>
  27. <view class="image-wrapper_2">
  28. <image
  29. class="label_2"
  30. referrerpolicy="no-referrer"
  31. src="https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNGfcafc88f2aa1bada5e71071780734be8.png"
  32. />
  33. </view>
  34. <view class=""></view>
  35. </view>
  36. </view>
  37. <view class="" style="position: relative">
  38. <view class="potit">非物质文化遗产</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <u-popup mode="center" :show="detailsShow">
  46. <view class="details_box">
  47. <view @click="detailsShow = false" style="position: absolute; top: 70rpx; left: 80rpx; z-index: 5" class="">
  48. <image style="width: 80rpx; height: 80rpx" src="/static/img/icon_back@2x.png"></image>
  49. </view>
  50. <view class="details_box2">
  51. <view class="details_tit_box">
  52. <view class="details_tit">{{ title }}</view>
  53. </view>
  54. <view class="box_vido">
  55. <video style="width: 100%; height: 100%" id="myVideo" :src="vidourl" autopla loop="true" @error="videoErrorCallback" controls></video>
  56. </view>
  57. </view>
  58. </view>
  59. </u-popup>
  60. <!-- 切换按钮 -->
  61. <view class="anNiu">
  62. <view class="anNiu_item" @click="leftBtn">
  63. <image style="width: 120rpx; height: 120rpx" src="/static/img/Group 834@2x.png"></image>
  64. <view class="dd_1"></view>
  65. <view class="dd_2"></view>
  66. <view class="dd_3"></view>
  67. <view class="dd_4"></view>
  68. </view>
  69. <view class="anNiu_item" @click="righrBtn">
  70. <view class="dd_2"></view>
  71. <view class="dd_3"></view>
  72. <view class="dd_4"></view>
  73. <view class="dd_1"></view>
  74. <image style="width: 120rpx; height: 120rpx" src="/static/img/Group 834@2x(1).png"></image>
  75. </view>
  76. </view>
  77. <!-- 菜单按钮 -->
  78. <view class="caidan" @click="navBtn">
  79. <image class="img" src="../../../static/img/icon_menu@2x.png"></image>
  80. <view class="dh">导航</view>
  81. </view>
  82. <!-- 菜单弹层 -->
  83. <u-popup :show="show" @close="close" mode="left" bgColor="#f8efe1" customStyle="width:500rpx">
  84. <LeftNav></LeftNav>
  85. </u-popup>
  86. </view>
  87. </template>
  88. <script>
  89. let that;
  90. var md5 = require('@/GraceUI5/js/md5.js');
  91. export default {
  92. data() {
  93. return {
  94. middleIndex: 1,
  95. vidourl: '',
  96. title: '',
  97. show: false,
  98. list: [],
  99. videoList: [],
  100. detailsShow: false,
  101. j: 0
  102. };
  103. },
  104. onLoad() {
  105. that = this;
  106. this.getIchVideoLists();
  107. },
  108. mounted() {
  109. // this.list.forEach((item, index) => {
  110. // const box = this.$refs[`box${index}`]; // 通过ref获取DOM元素实例
  111. // if (index === this.middleIndex) {
  112. // // 如果是中间的盒子,添加动态类名
  113. // box.classList.add('bianda1'); // 添加动态类名,可以根据需要替换成其他类名
  114. // }
  115. // });
  116. },
  117. methods: {
  118. navBtn() {
  119. this.show = true;
  120. },
  121. close() {
  122. this.show = false;
  123. // console.log('close');
  124. },
  125. getIchVideoLists() {
  126. let randomStr = that.randomString(6);
  127. let timeStamp = parseInt(Date.now() / 1000);
  128. let secretKey = '101001010011';
  129. let sign = md5.md5(btoa('randomStr=' + randomStr + '&timeStamp=' + timeStamp + '&secretKey=' + secretKey));
  130. that.$api.getIchVideoLists(
  131. {
  132. randomStr: randomStr,
  133. timeStamp: timeStamp,
  134. sign: sign
  135. },
  136. (data) => {
  137. // console.log(data, 'data');
  138. that.list = data.data;
  139. // console.log(that.list, 'that.list');
  140. for (let i = 0; i < 3; i++) {
  141. that.videoList.push(data.data[that.j]);
  142. that.j++;
  143. }
  144. }
  145. );
  146. },
  147. leftBtn() {
  148. this.j = this.j - 4;
  149. if (this.j < 0) {
  150. uni.showToast({
  151. title: '没有更多了',
  152. icon: 'error'
  153. });
  154. this.j = this.j + 4;
  155. return;
  156. }
  157. this.getIchVideoLists();
  158. that.videoList = [];
  159. },
  160. righrBtn() {
  161. console.log(that.videoList, 'videoList');
  162. this.j = this.j - 2;
  163. if (this.j == that.list.length - 2) {
  164. uni.showToast({
  165. title: '没有更多了',
  166. icon: 'error'
  167. });
  168. return;
  169. }
  170. this.getIchVideoLists();
  171. that.videoList = [];
  172. // console.log(that.videoList, 65465);
  173. },
  174. // 点击视频
  175. vidoBtn(index) {
  176. this.vidourl = this.videoList[index].video;
  177. this.title = this.videoList[index].title;
  178. this.detailsShow = true;
  179. },
  180. randomString(len) {
  181. len = len || 32;
  182. var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
  183. var maxPos = $chars.length;
  184. var pwd = '';
  185. for (var i = 0; i < len; i++) {
  186. pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  187. }
  188. return pwd;
  189. },
  190. videoErrorCallback: function (e) {
  191. uni.showModal({
  192. content: e.target.errMsg,
  193. showCancel: false
  194. });
  195. },
  196. close() {
  197. this.show = false;
  198. this.detailsShow = false;
  199. }
  200. }
  201. };
  202. </script>
  203. <style>
  204. /deep/.uni-video-container {
  205. background-color: transparent !important;
  206. }
  207. /deep/.uni-video-cover {
  208. background-color: transparent !important;
  209. }
  210. .body {
  211. padding-top: 100rpx;
  212. height: 1825rpx;
  213. }
  214. .header {
  215. margin-left: 10%;
  216. width: 960rpx;
  217. height: 96rpx;
  218. align-items: center;
  219. display: flex;
  220. }
  221. .box_vido {
  222. width: 100%;
  223. height: 80%;
  224. }
  225. .details_box2 {
  226. width: 1980rpx;
  227. height: 1180rpx;
  228. margin: auto;
  229. margin-top: 10rpx;
  230. padding: 0 60rpx 0 60rpx;
  231. background-color: #f8efe1;
  232. box-sizing: border-box;
  233. }
  234. .details_tit_box {
  235. position: sticky;
  236. top: 0;
  237. z-index: 2;
  238. background-color: #f8efe1;
  239. width: 100%;
  240. height: 200rpx;
  241. border-bottom: 1px solid #ddd7d6;
  242. display: flex;
  243. align-items: center;
  244. }
  245. .details_tit {
  246. width: 100%;
  247. text-align: center;
  248. font-size: 48rpx;
  249. letter-spacing: 0.3em;
  250. -webkit-background-clip: text;
  251. -webkit-text-fill-color: transparent;
  252. background-image: linear-gradient(270deg, rgba(188, 95, 41, 1) 0, rgba(91, 60, 41, 1) 100%);
  253. }
  254. .tit {
  255. background-image: linear-gradient(270deg, rgba(188, 95, 41, 1) 0, rgba(91, 60, 41, 1) 100%);
  256. height: 96rpx;
  257. font-size: 48rpx;
  258. letter-spacing: 0.3em;
  259. font-weight: NaN;
  260. text-align: left;
  261. white-space: nowrap;
  262. line-height: 100rpx;
  263. -webkit-background-clip: text;
  264. -webkit-text-fill-color: transparent;
  265. }
  266. .thumbnail_1 {
  267. width: 16rpx;
  268. height: 60rpx;
  269. }
  270. .fybk_tit {
  271. width: 200rpx;
  272. height: 530rpx;
  273. text-align: center;
  274. }
  275. .fybk_tit {
  276. width: 120rpx;
  277. height: 530rpx;
  278. text-align: center;
  279. }
  280. .fybk_tab {
  281. height: 380rpx;
  282. margin-top: 10%;
  283. padding-right: 20rpx;
  284. font-size: 42rpx;
  285. color: #563530;
  286. border-right: 1px solid #563530;
  287. writing-mode: vertical-rl;
  288. text-align: center;
  289. letter-spacing: 0.3em;
  290. margin-left: 20rpx;
  291. }
  292. .fybk_zc {
  293. left: 10%;
  294. top: 220rpx;
  295. display: flex;
  296. position: absolute;
  297. }
  298. .caidan {
  299. margin-left: 10%;
  300. margin-top: 2%;
  301. display: flex;
  302. width: 180rpx;
  303. align-items: center;
  304. }
  305. .img {
  306. width: 80rpx;
  307. height: 80rpx;
  308. }
  309. .dh {
  310. margin-left: 10rpx;
  311. font-size: 36rpx;
  312. color: #563530;
  313. }
  314. .banner {
  315. display: flex;
  316. align-items: center;
  317. justify-content: space-around;
  318. /* width: 2400rpx; */
  319. height: 1200rpx;
  320. /* margin-left: 18%; */
  321. }
  322. .bianda1 {
  323. border-radius: 50% !important;
  324. height: 800rpx !important;
  325. /* display: flex; */
  326. border: 1px solid rgba(86, 53, 48, 0.5) !important;
  327. width: 800rpx !important;
  328. margin: 24rpx 0 0 100rpx !important;
  329. }
  330. .bianda2 {
  331. border-radius: 50% !important;
  332. margin: 24rpx 0 0 24rpx !important;
  333. height: 760rpx !important;
  334. border: 1px solid #ded1c5 !important;
  335. width: 760rpx !important;
  336. margin: 20rpx 0 0 20rpx !important;
  337. }
  338. .bianda3 {
  339. border-radius: 50% !important;
  340. height: 656rpx !important;
  341. border: 1px solid rgba(86, 53, 48, 0.5) !important;
  342. width: 656rpx !important;
  343. margin: 48rpx 0 0 48rpx !important;
  344. }
  345. .bianda4 {
  346. border-radius: 50% !important;
  347. height: 600rpx !important;
  348. border: 2.4000000953674316px solid rgba(86, 53, 48, 1) !important;
  349. width: 600rpx !important;
  350. margin: 24rpx 0 0 24rpx !important;
  351. }
  352. .bianda5 {
  353. position: relative !important;
  354. border-radius: 960rpx !important;
  355. height: 520rpx !important;
  356. width: 520rpx !important;
  357. margin: 24rpx 0 0 28rpx !important;
  358. }
  359. .biank_1 {
  360. border-radius: 50%;
  361. height: 600rpx;
  362. /* display: flex; */
  363. border: 1px solid rgba(86, 53, 48, 0.5);
  364. width: 600rpx;
  365. margin: 24rpx 0 0 100rpx;
  366. }
  367. .biank_2 {
  368. border-radius: 50%;
  369. margin: 24rpx 0 0 24rpx;
  370. height: 540rpx;
  371. border: 1px solid #ded1c5;
  372. width: 540rpx;
  373. margin: 20rpx 0 0 20rpx;
  374. }
  375. .biank_3 {
  376. border-radius: 50%;
  377. height: 540rpx;
  378. border: 1px solid rgba(86, 53, 48, 0.5);
  379. width: 540rpx;
  380. margin: 48rpx 0 0 48rpx;
  381. }
  382. .biank_4 {
  383. border-radius: 50%;
  384. height: 500rpx;
  385. border: 2.4000000953674316px solid rgba(86, 53, 48, 1);
  386. width: 500rpx;
  387. margin: 16rpx 0 0 16rpx;
  388. }
  389. .section_2 {
  390. position: relative;
  391. border-radius: 960rpx;
  392. height: 420rpx;
  393. width: 420rpx;
  394. margin: 24rpx 0 0 28rpx;
  395. }
  396. .image-wrapper_2 {
  397. position: absolute;
  398. top: 38%;
  399. left: 40%;
  400. height: 118rpx;
  401. background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNGc178b30cb277add6394c32395832ff03.png) 100% no-repeat;
  402. background-size: 100% 100%;
  403. width: 120rpx;
  404. }
  405. .image-wrapper_3 {
  406. position: absolute;
  407. top: 30%;
  408. left: 30%;
  409. height: 118rpx;
  410. background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNGc178b30cb277add6394c32395832ff03.png) 100% no-repeat;
  411. background-size: 100% 100%;
  412. width: 120rpx;
  413. }
  414. .label_2 {
  415. width: 58rpx;
  416. height: 58rpx;
  417. margin: 30rpx 0 0 30rpx;
  418. }
  419. .potit {
  420. position: absolute;
  421. top: -720rpx;
  422. left: 100%;
  423. display: flex;
  424. align-items: center;
  425. font-size: 40rpx;
  426. color: #563530;
  427. width: 80rpx;
  428. /* height: 360rpx; */
  429. letter-spacing: 0.3em;
  430. padding-top: 20rpx;
  431. writing-mode: vertical-rl;
  432. border: 1px solid rgba(86, 53, 48, 1);
  433. background-color: #fff9ec;
  434. }
  435. .img_center {
  436. width: 100%;
  437. height: 100%;
  438. border-radius: 50%;
  439. margin: 14rpx 0 0 12rpx;
  440. }
  441. .y_img {
  442. height: 450rpx;
  443. width: 450rpx;
  444. border-radius: 50%;
  445. margin: 0 0 0 -2rpx;
  446. }
  447. .anNiu {
  448. display: flex;
  449. justify-content: space-between;
  450. width: 680rpx;
  451. margin-left: 42%;
  452. }
  453. .anNiu_item {
  454. display: flex;
  455. align-items: center;
  456. justify-content: space-between;
  457. width: 200rpx;
  458. }
  459. .dd_1 {
  460. width: 20rpx;
  461. height: 20rpx;
  462. background-color: #8a7d6d;
  463. border-radius: 50%;
  464. }
  465. .dd_2 {
  466. width: 10rpx;
  467. height: 10rpx;
  468. background-color: #8a7d6d;
  469. border-radius: 50%;
  470. }
  471. .dd_3 {
  472. width: 10rpx;
  473. height: 10rpx;
  474. background-color: #8a7d6d;
  475. border-radius: 50%;
  476. }
  477. .dd_4 {
  478. width: 10rpx;
  479. height: 10rpx;
  480. background-color: #8a7d6d;
  481. border-radius: 50%;
  482. }
  483. </style>