Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-09-20 18:20:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
552ccf031e259a82f60c8bd66e4e923ba143bea5
552ccf03
1 parent
b75b8777
fix 细节调整
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
src/route.js
src/views/bieyuan/info.vue
src/route.js
View file @
552ccf0
/*
* @Date: 2023-05-29 11:10:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-20 17:
29:12
* @LastEditTime: 2024-09-20 17:
54:57
* @FilePath: /map-demo/src/route.js
* @Description: 文件描述
*/
...
...
@@ -64,7 +64,7 @@ export default [
},
{
path
:
'/bieyuan/info'
,
component
:
()
=>
import
(
'@/views/bieyuan/info
_w
.vue'
),
component
:
()
=>
import
(
'@/views/bieyuan/info.vue'
),
meta
:
{
title
:
'详情页'
,
},
...
...
src/views/bieyuan/info.vue
View file @
552ccf0
<!--
* @Date: 2024-09-15 22:08:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-20 1
7:35:46
* @LastEditTime: 2024-09-20 1
8:19:58
* @FilePath: /map-demo/src/views/bieyuan/info.vue
* @Description: 文件描述
-->
<template>
<div class="info-page">
<div>
<div
style="position: relative;"
>
<van-config-provider :theme-vars="themeVars">
<van-swipe class="my-swipe" indicator-color="#DD7850" lazy-render :autoplay="5000">
<van-swipe-item v-for="image in images" :key="image">
...
...
@@ -15,7 +15,9 @@
</van-swipe-item>
</van-swipe>
</van-config-provider>
<div style="position: absolute; bottom: -13px; left: 0; right: 0; width: 100%; height: 1rem; box-shadow: rgba(241, 242, 248, 0.8) 0px -3px 20px 12px"></div>
</div>
<div style=" position: absolute; top: 12.5rem;">
<div class="info-content-wrapper">
<div class="info-header">
<div>
...
...
@@ -73,14 +75,14 @@
</div>
<div class="van-hairline--bottom" style="margin: 0 1rem;"></div>
</div>
<!--
<div class="audio-wrapper">
<div class="audio-wrapper">
<div :class="['audio-item', play_audio_index === index ? 'click' : '']" v-for="(item, index) in audioList" :key="index">
<div>{{ item.text }}</div>
<!~~ <div :class="['audio-icon', play_audio_index === index ? 'click' : '']"></div> ~~
>
<!-- <div :class="['audio-icon', play_audio_index === index ? 'click' : '']"></div> --
>
<van-icon @click="stopAudio(item, index)" v-if="item.play" size="2rem" name="stop-circle-o" color="#DD7850" />
<van-icon v-else @click="playAudio(item, index)" size="2rem" name="https://cdn.ipadbiz.cn/bieyuan/map/icon/audio_icon.png" />
</div>
</div>--
>
</div
>
<div style="padding: 0 1rem;">
<img src="https://cdn.ipadbiz.cn/bieyuan/map/xcx.png" style="width: 100%;">
</div>
...
...
@@ -97,6 +99,7 @@
/>
</div>
</div>
</div>
</template>
<script setup>
...
...
@@ -114,6 +117,7 @@ const $router = useRouter();
const themeVars = ref({
swipeIndicatorInactiveBackground: '#fff',
swipeIndicatorMargin: '1.5rem'
});
const images = ref([
...
...
@@ -150,8 +154,8 @@ const playAudio = (item, index) => {
console.warn('success');
item.play = true;
// 存放到pinia里面控制
store.changeAudioSrc(audio.value.src);
store.changeAudioStatus('play');
//
store.changeAudioSrc(audio.value.src);
//
store.changeAudioStatus('play');
}).catch((e) => {
// 失败
console.log('Operation is too fast, audio play fails')
...
...
@@ -174,10 +178,10 @@ onMounted(() => {
}
})
//
onUnmounted(() => {
//
audio.value.pause();
//
store.changeAudioStatus('pause');
//
})
onUnmounted(() => {
audio.value.pause();
store.changeAudioStatus('pause');
})
const audio_play = (src, index) => {
audio.value.src = src;
...
...
@@ -233,8 +237,7 @@ defineExpose({
overflow: scroll;
position: relative;
.info-content-wrapper {
// position: absolute;
// top: 14.9rem;
box-shadow: 0px -3px 6px 0 rgba(241, 242, 248, 0.8);
margin: 1rem;
margin-top: 0;
// padding: 1rem;
...
...
Please
register
or
login
to post a comment