index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126
  1. <template>
  2. <view class="content">
  3. <view class="tip">
  4. <image src="../../static/img/kp-tip.png" mode="widthFix"></image>
  5. </view>
  6. <view class="top-time flex">
  7. <view class="item flex jl" v-if="new_time">
  8. <!-- <image src="../../static/img/dingwei.png" mode="widthFix"></image>
  9. <view class="">
  10. {{new_address || '定位获取中'}}
  11. </view> -->
  12. </view>
  13. <view class="item flex jr" v-if="new_time">
  14. <image src="../../static/icon/rl.png" mode="widthFix"></image>
  15. <view class="">
  16. {{new_time}}
  17. </view>
  18. </view>
  19. </view>
  20. <view class="kp-wrap">
  21. <swiper class="kp-wrap" @change="change" :current="current" disable-touch :autoplay='videoAuto' >
  22. <swiper-item v-for="(item,index) of science" :key="item.id">
  23. <videoPlayer ref="player" :video="item" @goNext="nextV" @errorVideo='errvideo(item,index)' @playVideoSuccess='videoPlaySuccess(item,index)' :current="index"></videoPlayer>
  24. </swiper-item>
  25. </swiper>
  26. <!-- <zg-swiper :list="science"></zg-swiper> -->
  27. </view>
  28. <!-- <view class="kp-wrap">
  29. <swiper class="kp-wrap" :current="current" @change="stopv" >
  30. <swiper-item v-for="(item,index) in science" class="kp-wrap">
  31. <video :id="'myvideo' + index" :src="item.src"
  32. @error="videoErrorCallback" controls class="kp-wrap" :poster="item.poster"
  33. :autoplay="true" @ended="nextV"></video>
  34. </swiper-item>
  35. </swiper>
  36. </view> -->
  37. <view class="tip tip2">
  38. <image src="../../static/img/more-g.png" mode="widthFix"></image>
  39. </view>
  40. <view class="function-list flex">
  41. <template v-if="showTools">
  42. <view class="fun1" @click="showCard()">
  43. <image src="../../static/img/about-us.png" mode="widthFix"></image>
  44. </view>
  45. <view class="fun1" @click="navto('/pages/applic/appliSystem')">
  46. <!-- <view class="fun1" @click="openQr"> -->
  47. <image src="../../static/img/zxgxb.png" mode="widthFix"></image>
  48. </view>
  49. <view class="fun1" @click="openQr('yiti')">
  50. <image src="../../static/img/ytqgjx.png" mode="widthFix"></image>
  51. </view>
  52. <view class="fun1" @click="openQr('peixun')">
  53. <image src="../../static/img/jhpxbm.png" mode="widthFix"></image>
  54. </view>
  55. <view class="fun1" @click="openQr('huiyuan')">
  56. <image src="../../static/img/hszhydj.png" mode="widthFix"></image>
  57. </view>
  58. <view class="fun1" @click="openQr('zyz')">
  59. <image src="../../static/img/zyzdj.png" mode="widthFix"></image>
  60. </view>
  61. <view class="fun2" @click="openAx()">
  62. <image src="../../static/img/axjk.png" mode="heightFix"></image>
  63. </view>
  64. <view class="fun2" @click="showMap('jc')">
  65. <image src="../../static/img/fjjg.png" mode="heightFix"></image>
  66. </view>
  67. <view class="fun2" @click="showMap('yz')">
  68. <image src="../../static/img/fjdaed.png" mode="heightFix"></image>
  69. </view>
  70. <view class="fun2" @click="showMap('jhz')">
  71. <image src="../../static/img/jhz.png" mode="heightFix"></image>
  72. </view>
  73. <!-- <view class="fun2 fun3" @click="">
  74. <image src="../../static/img/fjdaed.png" mode="widthFix" @click="showMap('yz')"></image>
  75. <image src="../../static/img/jhz.png" mode="widthFix" @click="showMap('jhz')"></image>
  76. </view> -->
  77. </template>
  78. <template v-else>
  79. <view class="map">
  80. <map @updated='mapChange' id="map_1" ref='map_1' style="width:100%; height: 100%"
  81. latitude="31.616834" longitude="113.833979"
  82. :markers="mark_type == 'yz'? yz_mark: jhz_mark"></map>
  83. </view>
  84. <view class="mark-list">
  85. <scroll-view scroll-y="true" class="mark-list flex">
  86. <view class="mark" v-for="item in show_list">
  87. <view class="mark-name clamp">
  88. {{item.name}}
  89. </view>
  90. <view class="mark-address clamp2">
  91. {{item.address || ''}}{{item.install_address || ''}}
  92. </view>
  93. </view>
  94. </scroll-view>
  95. </view>
  96. <view class="back flex" @click="backTools">
  97. <image src="../../static/icon/back.png" mode="" class="back-lo" v-if="!showTools"></image>
  98. <view class="">
  99. 返回
  100. </view>
  101. </view>
  102. </template>
  103. </view>
  104. <view class="tip tip3">
  105. <image src="../../static/img/redfc.png" mode="widthFix"></image>
  106. </view>
  107. <swiper class="fc-wrap" :autoplay="true" >
  108. <swiper-item v-for="fcitem in fc" class="fc" >
  109. <image :src="'https://red.liuniu946.com' + fcitem" mode="scaleToFill" ></image>
  110. </swiper-item>
  111. </swiper>
  112. <uni-popup ref="qrwrap" type="center">
  113. <view class="qro-wrap">
  114. <image src="../../static/img/ewm-wrap.png" mode="" class="qro-bg"></image>
  115. <view class="tit">
  116. 请使用微信扫描二维码
  117. </view>
  118. <view class="qr-wrap flex">
  119. <image :src="'../../static/ewm/'+showType+'.png'" mode=""></image>
  120. </view>
  121. <view class="qr-btn" @click="closeQr">
  122. 知道了
  123. </view>
  124. </view>
  125. </uni-popup>
  126. <uni-popup ref="showcard" type="center">
  127. <view class="showcard">
  128. <view class="bg">
  129. <image class="imgBox" src="../../static/img/test_bg.png" mode="scaleToFill"></image>
  130. </view>
  131. <view class="top flex">
  132. <image src="../../static/img/top_bg.png" mode="aspectFill"></image>
  133. <view class="china-font">广水市红十字会</view>
  134. <view class="english-font">Red Cross Society of China Guangshui Branch</view>
  135. <view class="fgx"></view>
  136. </view>
  137. <view class="buttom flex">
  138. <view class="item flex">
  139. <image class="home_img" src="../../static/img/test_home.png" mode="aspectFill"></image>
  140. <view class="text"><text>湖北省随州市广水市<br>应山办事处广安路16号</text></view>
  141. </view>
  142. <view class="item flex">
  143. <image class="home_img" src="../../static/img/test_phone.png" mode="aspectFill"></image>
  144. <view class="text">0722-6696066</view>
  145. </view>
  146. <view class="map">
  147. <!-- <image class="map-box" src="../../static/img/baseaddr.png"></image> -->
  148. <view class="map-font flex">
  149. <view class="font-left">广水市红十字会</view>
  150. <!-- <view @click="navigation()" class="font-right">
  151. <image src="../../static/img/btn.png" mode="aspectFill"></image>
  152. </view> -->
  153. </view>
  154. </view>
  155. <view class="qrcode">
  156. <image src="../../static/icon/erweima.jpg" mode="aspectFill"></image>
  157. </view>
  158. </view>
  159. <image src="../../static/icon/closepop.png" mode="" class="close-show" @click="closeShow"></image>
  160. </view>
  161. </uni-popup>
  162. <uni-popup ref="aixmap" type="center">
  163. <view class=" aixin-wrap">
  164. <image src="../../static/ewm/axjk.png" mode="" class="aixin"></image>
  165. <image src="../../static/icon/closepop.png" mode="" class="close-aixin" @click="closeAx"></image>
  166. </view>
  167. </uni-popup>
  168. </view>
  169. </template>
  170. <script>
  171. import ZgSwiper from '@/components/zhuge-swiper/zhuge-swiper';
  172. import videoPlayer from './videoPlayer.vue'
  173. import {
  174. mapState,
  175. mapMutations
  176. } from 'vuex';
  177. import {
  178. getMechanismList,
  179. getAed,
  180. getAidList,
  181. geocoder
  182. } from '@/api/category'
  183. import {
  184. getdis,
  185. tocall,
  186. getListMechanism,
  187. getDistance
  188. } from '@/api/index.js';
  189. import {
  190. bannerlist
  191. } from '@/api/index.js';
  192. import {
  193. login,
  194. getUserInfo
  195. } from '@/api/login.js';
  196. import {
  197. details,
  198. deconstructArticle
  199. } from '@/api/info.js';
  200. var time = null
  201. export default {
  202. components: {
  203. videoPlayer,
  204. ZgSwiper,
  205. },
  206. data() {
  207. return {
  208. showV: true,
  209. swiperList: [],
  210. list4: [{
  211. url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
  212. title: '昨夜星辰昨夜风,画楼西畔桂堂东',
  213. poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
  214. }, {
  215. url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  216. title: '身无彩凤双飞翼,心有灵犀一点通'
  217. }, {
  218. url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  219. title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
  220. }],
  221. address: [
  222. // {
  223. // name: '',
  224. // latitude: '',
  225. // longitude: ''
  226. // }
  227. ],
  228. new_address: '',
  229. is_play: false,
  230. current: 0,
  231. mark_type: 'yz',
  232. show_list: [],
  233. showTools: true,
  234. scale: 18,
  235. latitude: 31.616834,
  236. longitude: 113.833979,
  237. covers: [],
  238. science: [],
  239. new_time: '',
  240. fc: [],
  241. timer: '',
  242. showType: '',
  243. marker: [],
  244. yz_mark: [],
  245. yz_list: [],
  246. jhz_mark: [],
  247. jhz_list: [],
  248. pageStartY: 0,
  249. pageEndY: 0,
  250. maxheight: '',
  251. videoAuto:false,//是否自动播放
  252. }
  253. },
  254. async onLoad(opt) {
  255. console.log(opt);
  256. await this.goLogin()
  257. // 获取顶部轮播视频
  258. this.getKpList()
  259. // this.getNewTime()
  260. // 获取底部风采图片
  261. this.getFc()
  262. // 获取定位
  263. this.getDy()
  264. },
  265. onShow() {
  266. // 每秒更新时间
  267. // if(this.timer)
  268. // this.getListMechanism()
  269. clearInterval(this.timer)
  270. this.timer = setInterval(() => {
  271. this.getNewTime();
  272. }, 1000);
  273. },
  274. computed: {
  275. ...mapState('user', ['userInfo', 'baseURL', 'hasLogin'])
  276. },
  277. onHide() {
  278. clearInterval(this.timer)
  279. },
  280. onReady() {
  281. var that = this;
  282. },
  283. methods: {
  284. ...mapMutations('user', ['setUserInfo', 'login']),
  285. getMechanismList(type) {
  286. let that = this
  287. getMechanismList({
  288. page: 1,
  289. limit: 1000
  290. }).then(res => {
  291. let arr = [];
  292. arr = res.data.map(item => ({
  293. latitude: item.latitude,
  294. longitude: item.longitude,
  295. iconPath: '/static/icon/jzsb.png',
  296. width: '35',
  297. height: '35',
  298. id: item.id,
  299. address: item.address
  300. }));
  301. that.jc_mark = that.marker.concat(arr)
  302. that.jc_list = res.data
  303. if (type == 'show') {
  304. that.show_list = that.jc_list
  305. that.showTools = false
  306. }
  307. })
  308. },
  309. // 视频错误处理
  310. errvideo(item,index){
  311. item.videoerro=true;
  312. },
  313. //视频播放成功
  314. videoPlaySuccess(item,index){
  315. item.videoerro=false;
  316. this.videoAuto = false
  317. },
  318. //
  319. nextV() {
  320. if (this.current == this.science.length - 1) {
  321. this.current = 0
  322. } else {
  323. console.log('++');
  324. this.current++
  325. }
  326. },
  327. change(res) {
  328. this.current = res.detail.current;
  329. if(this.science[this.current].videoerro){
  330. this.videoAuto = true
  331. }else{
  332. this.videoAuto = false
  333. this.$refs.player[this.current].playVideo(this.current)
  334. }
  335. },
  336. openAx() {
  337. this.$refs.aixmap.open()
  338. },
  339. closeAx() {
  340. this.$refs.aixmap.close()
  341. },
  342. closeShow() {
  343. this.$refs.showcard.close()
  344. },
  345. stopv(res) {
  346. console.log(res);
  347. this.current = res.detail.current
  348. this.showV = false
  349. // console.log(this.current, 'this.current');
  350. let video = uni.createVideoContext('myvideo', this)
  351. video.pause()
  352. this.showV = true
  353. },
  354. //附近aed
  355. getListMechanism(type) {
  356. let that = this
  357. getAed({
  358. page: 1,
  359. limit: 1000
  360. }).then(res => {
  361. console.log(res);
  362. let arr = [];
  363. arr = res.data.map(item => ({
  364. latitude: item.latitude,
  365. longitude: item.longitude,
  366. iconPath: '/static/icon/aed.png',
  367. width: '35',
  368. height: '35',
  369. id: item.id,
  370. address: item.install_address
  371. }));
  372. that.yz_mark = that.marker.concat(arr)
  373. that.yz_list = res.data
  374. if (type == 'show') {
  375. that.show_list = that.yz_list
  376. that.showTools = false
  377. }
  378. })
  379. },
  380. mapChange() {},
  381. showMap(type) {
  382. // this.$refs.map.open()
  383. // console.log('type',type);
  384. if (type === 'yz') {
  385. this.mark_type = 'yz'
  386. if (this.yz_list && this.yz_list.length > 0) {
  387. this.show_list = this.yz_list
  388. this.showTools = false
  389. } else {
  390. this.getListMechanism('show')
  391. // this.show_list = this.yz_list
  392. // this.showTools = false
  393. }
  394. } else if (type === 'jhz') {
  395. this.mark_type = 'jhz'
  396. if (this.jhz_list && this.jhz_list.length > 0) {
  397. this.show_list = this.jhz_list
  398. this.showTools = false
  399. } else {
  400. this.getJhz('show')
  401. }
  402. } else if(type == 'jc') {
  403. this.mark_type = 'jc'
  404. if (this.jc_list && this.jc_list.length > 0) {
  405. this.show_list = this.jc_list
  406. this.showTools = false
  407. } else {
  408. this.getMechanismList('show')
  409. }
  410. }
  411. },
  412. backTools() {
  413. this.showTools = true
  414. },
  415. showCard() {
  416. this.$refs.showcard.open()
  417. },
  418. openQr(type) {
  419. this.showType = type
  420. this.$refs.qrwrap.open()
  421. },
  422. closeQr() {
  423. this.$refs.qrwrap.close()
  424. },
  425. getDy() {
  426. let that = this
  427. try {
  428. uni.getLocation({
  429. type: 'gcj02',
  430. success: function(res) {
  431. // console.log('当前定位', res);
  432. that.setDy(res.latitude, res.longitude)
  433. that.getWhere(res.latitude, res.longitude)
  434. },
  435. fail() {
  436. that.setDy()
  437. }
  438. });
  439. } catch (e) {
  440. that.setDy()
  441. }
  442. },
  443. getWhere(lat, lon) {
  444. if (this.address && this.address.length > 0) {
  445. this.address = this.address.map(item => {
  446. item.sapce = this.sapce(lat, lon, item.latitude, item.longitude)
  447. })
  448. const sortedPeople = this.address.sort((a, b) => a.space - b.space);
  449. this.new_address = sortedPeople[0].name
  450. }
  451. },
  452. space(lat1, lng1, lat2, lng2) {
  453. console.log(lat1, lng1, lat2, lng2);
  454. var radLat1 = (lat1 * Math.PI) / 180.0;
  455. var radLat2 = (lat2 * Math.PI) / 180.0;
  456. var a = radLat1 - radLat2;
  457. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  458. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  459. .pow(Math.sin(b / 2), 2)));
  460. s = s * 6378.137;
  461. s = Math.round(s * 10000) / 10000;
  462. return s * 1000; // 单位米
  463. },
  464. setDy(lat = 30.353495, lon = 114.316738) {
  465. let that = this
  466. that.longitude = lon
  467. that.latitude = lat
  468. that.marker = [{
  469. latitude: that.latitude,
  470. longitude: that.longitude,
  471. iconPath: '/static/img/img19.png',
  472. width: '45',
  473. height: '45',
  474. }, ]
  475. that.getJhz();
  476. },
  477. getJhz(type) {
  478. let that = this
  479. that.getMechanismList()
  480. getAidList({
  481. page: 1,
  482. limit: 1000,
  483. latitude: that.latitude,
  484. longitude: that.longitude,
  485. }).then(res => {
  486. console.log(res, 'jhz');
  487. let boai = [],
  488. jhz = [],
  489. arr = [];
  490. res.data.forEach(item => {
  491. // if (item.introduction.indexOf('驿站') !== -1) {
  492. // boai.push(item)
  493. // } else {
  494. jhz.push(item)
  495. // }
  496. })
  497. // boai = boai.sort((a, b) => a.introduction.localeCompare(b.introduction));
  498. arr = res.data.map(item => ({
  499. latitude: item.latitude,
  500. longitude: item.longitude,
  501. iconPath: '/static/icon/jhz.png',
  502. width: '35',
  503. height: '35',
  504. id: item.id,
  505. address: item.address
  506. }));
  507. that.jhz_mark = that.marker.concat(arr)
  508. console.log('jhzisst', that.jhz_mark);
  509. that.jhz_list = boai.concat(jhz)
  510. if (type == 'show') {
  511. that.show_list = that.jhz_list
  512. that.showTools = false
  513. }
  514. })
  515. },
  516. navto(url) {
  517. let that = this
  518. if (this.hasLogin) {
  519. uni.navigateTo({
  520. url,
  521. fail() {
  522. uni.switchTab({
  523. url
  524. })
  525. }
  526. })
  527. } else {
  528. login({
  529. account: '13245678911',
  530. password: '153624'
  531. })
  532. .then(function(e) {
  533. uni.setStorageSync('token', e.data.userinfo.token);
  534. getUserInfo({}).then((e) => {
  535. that.login();
  536. // 保存返回用户数据
  537. that.setUserInfo(e.data);
  538. uni.navigateTo({
  539. url,
  540. fail() {
  541. uni.switchTab({
  542. url
  543. })
  544. }
  545. })
  546. })
  547. })
  548. .catch(function(e) {
  549. console.log(e);
  550. });
  551. }
  552. },
  553. goLogin() {
  554. login({
  555. account: '13245678911',
  556. password: '153624'
  557. })
  558. .then(function(e) {
  559. uni.setStorageSync('token', e.data.userinfo.token);
  560. })
  561. .catch(function(e) {
  562. console.log(e);
  563. });
  564. },
  565. getNewTime() {
  566. // 获取当前日期对象
  567. const currentDate = new Date();
  568. // 获取当前年份
  569. const currentYear = currentDate.getFullYear();
  570. // 获取当前月份(注意:月份从 0 开始,所以需要加 1)
  571. const currentMonth = currentDate.getMonth() + 1;
  572. // 获取当前日期
  573. const currentDay = currentDate.getDate();
  574. this.new_time = currentYear + '年' + (currentMonth > 9 ? currentMonth : ('0' + currentMonth)) + '月' + (
  575. currentDay > 9 ? currentDay : ('0' + currentDay)) + '日'
  576. // console.log(this.new_time);
  577. },
  578. videoErrorCallback(err) {
  579. console.log(err);
  580. },
  581. getKpList() {
  582. let that = this
  583. bannerlist({
  584. ifyid: 72,
  585. page: 1,
  586. limit: 10
  587. }).then(({
  588. data
  589. }) => {
  590. that.science = data.list.map(item => {
  591. item.is_play = false
  592. //处理当前视频是否加载错误
  593. item.videoerro = false
  594. return item
  595. });
  596. that.science.forEach((item,index) => {
  597. let regex = /http.*\.mp4/g; // 匹配以 "http" 开头,以 ".mp4" 结尾的字符串
  598. let matches = item.content.match(regex)[0]; // 使用正则表达式匹配字符串
  599. console.log(matches,'matches')
  600. that.$set(item, 'src', matches)
  601. that.$set(item, 'type', 'video')
  602. that.$set(item, 'poster', item.image)
  603. /*
  604. details({}, item.id).then(res => {
  605. let regex = /http.*\.mp4/g; // 匹配以 "http" 开头,以 ".mp4" 结尾的字符串
  606. let matches = res.data.content.match(regex)[0]; // 使用正则表达式匹配字符串
  607. that.$set(item, 'src', matches)
  608. that.$set(item, 'type', 'video')
  609. that.$set(item, 'poster', item.image_input[0])
  610. })
  611. */
  612. })
  613. try {
  614. that.$nextTick(
  615. () => {
  616. that.$refs.player[that.current].playVideo(that.current)
  617. }
  618. )
  619. } catch (e) {
  620. //TODO handle the exception
  621. // uni.showModal({
  622. // content: JSON.stringify()
  623. // })
  624. }
  625. });
  626. },
  627. getFc() {
  628. details({
  629. id: 332
  630. }).then(res => {
  631. // const regex = /http.*\.(png|jpg)/g;
  632. // this.fc = res.data.content.match(regex);
  633. // console.log(this.fc,'fc+++++++++');
  634. function extractImageUrls(text) {
  635. const regex = /\/uploads?[^\s]+?\.(jpg|jpeg|png|gif)/gi;
  636. const matches = text.match(regex);
  637. return matches || [];
  638. }
  639. this.fc = extractImageUrls(res.data.content);
  640. console.log(this.fc,'this.fc++++++++++')
  641. })
  642. }
  643. }
  644. }
  645. </script>
  646. <style lang="scss" scoped>
  647. page {
  648. background-color: #fff;
  649. .content{
  650. height: 100%;
  651. }
  652. }
  653. $bl: 10.8;
  654. $lg: 1.5;
  655. .top-time {
  656. padding: 0 (15vw/$bl);
  657. font-size: (17vw/$bl);
  658. font-weight: bold;
  659. color: #666666;
  660. // background-color: red;
  661. // padding-top: (20vw/$bl);
  662. position: absolute;
  663. top: 0;
  664. width: 100%;
  665. .item {
  666. width: 50%;
  667. }
  668. height: (42vw/$bl);
  669. display: flex;
  670. image {
  671. width: (22.8vw/$bl);
  672. margin-right: (10vw/$bl);
  673. }
  674. .jr {
  675. justify-content: flex-end;
  676. align-items: center;
  677. }
  678. .jl {
  679. justify-content: flex-start;
  680. align-items: center;
  681. }
  682. }
  683. .tip {
  684. width: (450vw/$bl);
  685. height: (43vw/$bl);
  686. image {
  687. width: 100%;
  688. }
  689. margin:0 auto (5vw/$bl);
  690. }
  691. .tip2 {
  692. width: (415vw/$bl);
  693. margin: (5vw/$bl) auto (5vw/$bl);
  694. }
  695. .tip3 {
  696. width: (586vw/$bl);
  697. margin: (5vw/$bl) auto (5vw/$bl);
  698. position: relative;
  699. top: -(5vw/$bl);
  700. }
  701. .kp-wrap {
  702. width: (1080vw/$bl);
  703. height: (540vw/$bl);
  704. // background-color: red;
  705. }
  706. .function-list {
  707. width: 100vw;
  708. padding: 0 (75vw/$bl);
  709. height: (536vw/$bl);
  710. justify-content: space-between;
  711. align-items: center;
  712. flex-wrap: wrap;
  713. position: relative;
  714. .back {
  715. position: absolute;
  716. right: (70vw/$bl);
  717. font-size: (30vw/$bl);
  718. top: (-60vw/$bl);
  719. align-items: center;
  720. .back-lo {
  721. width: (20vw/$bl);
  722. height: (22vw/$bl);
  723. margin-right: (10vw/$bl);
  724. }
  725. }
  726. .map {
  727. height: 100%;
  728. width: (450vw/$bl);
  729. }
  730. .mark-list {
  731. height: 100%;
  732. width: (450vw/$bl);
  733. .mark {
  734. background-color: #fff;
  735. width: (450vw/$bl);
  736. padding: (20vw/$bl);
  737. margin: 0 auto (20vw/$bl);
  738. display: flex;
  739. flex-direction: column;
  740. justify-content: center;
  741. border-radius: (20vw/$bl);
  742. &::first-of-type {
  743. margin-top: 0;
  744. }
  745. .mark-name {
  746. font-size: (32vw/$bl);
  747. margin-bottom: (20vw/$bl);
  748. font-weight: bold;
  749. }
  750. .mark-address {
  751. font-size: (26vw/$bl);
  752. }
  753. }
  754. }
  755. .fun1 {
  756. width: (292vw/$bl);
  757. height: (125vw/$bl);
  758. // background-color: red;
  759. image {
  760. width: 100%;
  761. height: 100%;
  762. }
  763. }
  764. .fun2 {
  765. // width: (443vw/$bl);
  766. height: (240vw/$bl);
  767. image {
  768. width: 100%;
  769. height: 100%;
  770. }
  771. }
  772. .fun3 {
  773. display: flex;
  774. flex-direction: column;
  775. justify-content: space-between;
  776. image {
  777. width: (454vw/$bl);
  778. height: (115vw/$bl);
  779. }
  780. }
  781. }
  782. .fc-wrap {
  783. width: (1080vw/$bl);
  784. height:35.9vh;
  785. .fc {
  786. width: 100%;
  787. height: 100%;
  788. display: flex;
  789. justify-content: center;
  790. align-items: center;
  791. }
  792. image {
  793. width: 100%;
  794. height: 100%;
  795. }
  796. }
  797. .qro-wrap {
  798. // width: ;
  799. width: (580vw/$bl/$lg);
  800. height: (750vw/$bl/$lg);
  801. font-size: (40vw/$bl/$lg);
  802. font-weight: 500;
  803. color: #333333;
  804. position: relative;
  805. z-index: 999;
  806. .qro-bg {
  807. width: (580vw/$bl/$lg);
  808. height: (750vw/$bl/$lg);
  809. }
  810. .tit {
  811. text-align: center;
  812. position: absolute;
  813. left: 0;
  814. right: 0;
  815. bottom: (633vw/$bl/$lg);
  816. margin: auto;
  817. }
  818. .qr-wrap {
  819. width: (362vw/$bl/$lg);
  820. height: (362vw/$bl/$lg);
  821. border: (6vw/$bl/$lg) solid #2D2E39;
  822. border-radius: (15vw/$bl/$lg);
  823. position: absolute;
  824. left: 0;
  825. right: 0;
  826. bottom: (211vw/$bl/$lg);
  827. margin: auto;
  828. justify-content: center;
  829. align-items: center;
  830. image {
  831. width: (300vw/$bl/$lg);
  832. height: (300vw/$bl/$lg);
  833. }
  834. }
  835. .qr-btn {
  836. text-align: center;
  837. width: (433vw/$bl/$lg);
  838. line-height: (86vw/$bl/$lg);
  839. background: #ffe6b7;
  840. border-radius: (43vw/$bl/$lg);
  841. font-size: (35vw/$bl/$lg);
  842. font-weight: 800;
  843. color: #ad5224;
  844. position: absolute;
  845. left: 0;
  846. right: 0;
  847. bottom: (63vw/$bl/$lg);
  848. margin: auto;
  849. }
  850. }
  851. .aixin-wrap {
  852. width: (524vw/$bl);
  853. height: (560vw/$bl);
  854. position: relative;
  855. .aixin {
  856. width: 100%;
  857. height: 100%;
  858. }
  859. }
  860. .showcard {
  861. position: relative;
  862. .close-show {
  863. width: (52vw/$bl);
  864. height: (52vw/$bl);
  865. position: absolute;
  866. left: 0;
  867. right: 0;
  868. bottom: (-82vw/$bl);
  869. margin: auto;
  870. }
  871. .flex {
  872. display: flex;
  873. justify-content: space-between;
  874. align-items: center;
  875. }
  876. width: (610vw/$bl);
  877. background-color: #fff;
  878. min-height: (100vw/$bl);
  879. // border-radius: (20vw/$bl);
  880. border: (6vw/$bl) solid #e01a1c;
  881. position: relative;
  882. .bg {
  883. width: 100%;
  884. height: 100%;
  885. position: absolute;
  886. left: 0;
  887. top: 0;
  888. padding: 20rpx;
  889. .imgBox {
  890. width: 100%;
  891. }
  892. }
  893. .top {
  894. flex-direction: column;
  895. width: 100%;
  896. image {
  897. width: (312vw/3*2/$bl);
  898. height: (312vw/3*2/$bl);
  899. border-color: linear-gradient(0deg, #e01a1c, #e01a1c);
  900. border-radius: 50%;
  901. margin-top: (85vw/3*2/$bl);
  902. }
  903. .china-font {
  904. z-index: 0;
  905. width: 100%;
  906. font-size: (56vw/3*2/$bl);
  907. padding-left: (20vw/3*2/$bl);
  908. letter-spacing: 15rpx;
  909. font-family: Swei Fist Leg CJK SC;
  910. font-weight: bold;
  911. color: #e01a1c;
  912. line-height: 1;
  913. margin-top: (19vw/3*2/$bl);
  914. text-align: center;
  915. }
  916. .english-font {
  917. margin-top: (14vw/3*2/$bl);
  918. z-index: 0;
  919. letter-spacing: (-1.9vw/3*2/$bl);
  920. width: 100%;
  921. font-size: (20vw/3*2/$bl);
  922. font-weight: bold;
  923. color: #e01a1c;
  924. text-align: center;
  925. }
  926. .fgx {
  927. margin-top: (25vw/3*2/$bl);
  928. z-index: 0;
  929. width: (625vw/3*2/$bl);
  930. border-bottom: 1rpx dashed #e01a1c;
  931. }
  932. }
  933. .buttom {
  934. flex-direction: column;
  935. .item {
  936. z-index: 0;
  937. margin: 0 auto;
  938. margin-top: 20rpx;
  939. width: (532vw/3*2/$bl);
  940. border: 1rpx solid #e01a1c;
  941. border-radius: (38vw/3*2/$bl);
  942. justify-content: flex-start;
  943. .home_img {
  944. height: (58vw/3*2/$bl);
  945. width: (58vw/3*2/$bl);
  946. margin: 8rpx 13rpx;
  947. flex-shrink: 0;
  948. }
  949. .text {
  950. display: inline-block;
  951. // padding-left: 75rpx;
  952. padding-right: (38vw/3*2/$bl);
  953. letter-spacing: 1.2rpx;
  954. font-size: (25vw/3*2/$bl);
  955. font-weight: bold;
  956. text-align: center;
  957. flex-grow: 1;
  958. .text1 {
  959. padding-left: (60vw/3*2/$bl);
  960. }
  961. }
  962. }
  963. .map {
  964. margin-top: (25vw/3*2/$bl);
  965. background-color: #ffffff;
  966. z-index: 0;
  967. width: (517vw/3*2/$bl);
  968. border: 2rpx solid #ea3638;
  969. line-height: 0;
  970. .map-box {
  971. width: (513vw/3*2/$bl);
  972. height: (286vw/3*2/$bl);
  973. background: #ffffff;
  974. }
  975. .map-font {
  976. height: (90vw/3*2/$bl);
  977. padding: 0 (20vw/3*2/$bl);
  978. justify-content: center;
  979. .font-left {
  980. font-family: PingFang SC;
  981. font-weight: bold;
  982. font-size: (29vw/3*2/$bl);
  983. color: #333333;
  984. line-height: 1;
  985. }
  986. .font-right {
  987. border-radius: 10rpx;
  988. overflow: hidden;
  989. background-color: #1593ff;
  990. image {
  991. width: (120vw/3*2/$bl);
  992. height: (45vw/3*2/$bl);
  993. }
  994. }
  995. }
  996. }
  997. .qrcode {
  998. width: (517vw/3*2/$bl);
  999. image {
  1000. width: (517vw/3*2/$bl);
  1001. height: (517vw/3*2/$bl);
  1002. margin: (20vw/3*2/$bl) 0 (36vw/3*2/$bl);
  1003. }
  1004. }
  1005. }
  1006. }
  1007. .map-wrap {
  1008. background-color: #fff;
  1009. position: relative;
  1010. // top: (120vw/$bl);
  1011. .map {
  1012. height: 100%;
  1013. width: (450vw/$bl);
  1014. background-color: red;
  1015. }
  1016. }
  1017. .clamp2 {
  1018. overflow: hidden;
  1019. text-overflow: ellipsis;
  1020. display: -webkit-box;
  1021. -webkit-line-clamp: 2;
  1022. -webkit-box-orient: vertical;
  1023. }
  1024. .close-aixin {
  1025. width: (52vw/$bl);
  1026. height: (52vw/$bl);
  1027. position: absolute;
  1028. left: 0;
  1029. right: 0;
  1030. bottom: (-82vw/$bl);
  1031. margin: auto;
  1032. }
  1033. /* 一行显示 */
  1034. .clamp {
  1035. overflow: hidden;
  1036. text-overflow: ellipsis;
  1037. white-space: nowrap;
  1038. display: block;
  1039. }
  1040. </style>