feiYiShiPin.vue 12 KB

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