diff --git a/src/components/dialog/FromBottomDialog.vue b/src/components/dialog/FromBottomDialog.vue
index 97570ad..6d9094c 100644
--- a/src/components/dialog/FromBottomDialog.vue
+++ b/src/components/dialog/FromBottomDialog.vue
@@ -170,7 +170,7 @@ export default {
this.$setCss(this.$refs.dialog, 'transition-duration', `250ms`)
if (Math.abs(this.moveYDistance) > clientHeight / 2) {
this.$setCss(this.$refs.dialog, 'transform', `translate3d(0,${clientHeight}px,0)`)
- bus.emit('dialogEnd', {tag: this.tag, isClose: true})
+ bus.emit(EVENT_KEY.DIALOG_END, {tag: this.tag, isClose: true})
setTimeout(this.hide, 250)
} else {
this.$setCss(this.$refs.dialog, 'transform', `translate3d(0,0,0)`)
diff --git a/src/components/slide/BVideo.vue b/src/components/slide/BVideo.vue
index 890e86d..235a12c 100644
--- a/src/components/slide/BVideo.vue
+++ b/src/components/slide/BVideo.vue
@@ -13,7 +13,7 @@
-
+
-
+
+
+
+
+
+

+
美食
+
+
+

+
休闲娱乐
+
+
+

+
游玩
+
+
+

+
丽人/美发
+
+
+

+
住宿
+
+
+

+
游玩
+
+
+

+
丽人/美发
+
+
+

+
住宿
+
+
+
+
+ 附近吃喝玩乐
+
@@ -70,9 +116,10 @@ import Comment from "../../components/Comment";
import IndicatorHome from "../slide/IndicatorHome";
import resource from "../../assets/data/resource.js";
-import {onMounted, onUnmounted, provide, reactive} from "vue";
+import {onMounted, onUnmounted, provide, reactive, ref} from "vue";
import bus, {EVENT_KEY} from "../../utils/bus";
import {useNav} from "../../utils/hooks/useNav";
+import Utils from "@/utils";
const nav = useNav()
@@ -81,6 +128,12 @@ const videos = resource.videos.slice(0, 16).map(v => {
return v
})
+function stop(e) {
+ e.stopPropagation()
+}
+
+
+const subTypeRef = ref(null)
const state = reactive({
baseIndex: 0,
navIndex: 4,
@@ -97,7 +150,6 @@ const state = reactive({
...videos
],
- isCommenting: false,
isSharing: false,
canMove: true,
loading: false,
@@ -118,16 +170,40 @@ const state = reactive({
commentVisible: false,
fullScreen: false,
- style: '100%'
+ subType: -1,
+ //用于改变zindex的层级到上层,反正比slide高就行。不然摸不到subType.
+ subTypeIsTop: false,
})
+function showSubType(e) {
+ Utils.$stopPropagation(e)
+ console.log('subTypeRef',)
+ state.subType = 0
+ setTimeout(() => {
+ state.subTypeIsTop = true
+ }, 300)
+ bus.emit(EVENT_KEY.OPEN_SUB_TYPE, {
+ index: 0,
+ height: subTypeRef.value.getBoundingClientRect().height
+ })
+}
+
+function pageClick(e) {
+ if (state.subType !== -1) {
+ state.subType = -1
+ state.subTypeIsTop = false
+ bus.emit(EVENT_KEY.CLOSE_SUB_TYPE, {index: 0,})
+ Utils.$stopPropagation(e)
+ }
+}
+
onMounted(() => {
bus.on('singleClick', () => {
let id = ''
- if (state.navIndex === 5) {
+ if (state.navIndex === 4) {
id = state.recommendVideos[state.itemIndex].id
}
- bus.emit('singleClickBroadcast', id)
+ bus.emit(EVENT_KEY.SINGLE_CLICK_BROADCAST, id)
})
bus.on('update:item', val => {
const {baseIndex, navIndex, itemIndex} = val.position
@@ -210,16 +286,74 @@ function render(item, itemIndex, play, position) {