diff --git a/.env.development b/.env.development index 239cbf5d..d340daff 100644 --- a/.env.development +++ b/.env.development @@ -30,7 +30,7 @@ VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # 任东 -VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' +# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.16.130:9601' VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.130:9602' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604' diff --git a/src/components/image-preview/image-preview.vue b/src/components/image-preview/image-preview.vue index 65e3e547..a443695b 100644 --- a/src/components/image-preview/image-preview.vue +++ b/src/components/image-preview/image-preview.vue @@ -94,11 +94,13 @@ methods: { closePopup(){ this.showModel = false + this.storageStore.setTouchBtnZIndex(1) this.$refs.PopupRef.close() }, showDetail(){ if(!!this.previewDetail){ this.showModel = true + this.storageStore.setTouchBtnZIndex(-1) this.$refs.PopupRef.open() } }, diff --git a/src/components/image-preview/video-preview.vue b/src/components/image-preview/video-preview.vue index f844c833..4fc8e46f 100644 --- a/src/components/image-preview/video-preview.vue +++ b/src/components/image-preview/video-preview.vue @@ -69,6 +69,7 @@ }, methods: { showModelNow(){ + this.storageStore.setTouchBtnZIndex(-1) this.$refs.PopupRef.open() this.showModel = true }, @@ -76,6 +77,7 @@ console.log('err:',info) }, playEnded(){ + this.storageStore.setTouchBtnZIndex(1) this.$refs.PopupRef.close() this.showModel = false }, diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index b1ac4d71..d7cfba2a 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -56,6 +56,9 @@ import { getPhoneEnvBool } from '@/common/common.js' + import { useStorageStore } from "@/store/storage.js" + + const storageStore = useStorageStore() const proxy = getCurrentInstance() const emit = defineEmits(['uploadVoice', 'submitAnswer', 'startRecord']) const props = defineProps({ @@ -102,6 +105,9 @@ const showTalkingModel = ref(false) const keyboardIsShow = ref(false) const talkModelRef= ref() + + const btnZindex = computed(()=> storageStore.getTouchBtnZIndex) + console.log(storageStore) watch(() => showTalkingModel.value, (val) => val ? talkModelRef.value.open() : talkModelRef.value.close()) watch(() => props.isLoading, () => {}, { deep: true, @@ -397,7 +403,7 @@ background-color: #fff; padding: 25rpx 30rpx 0; position: relative; - + z-index: v-bind(btnZindex); .touch-btn { height: 92rpx; box-shadow: 0 8rpx 20rpx 0 rgba(0, 0, 0, .06); diff --git a/src/store/storage.js b/src/store/storage.js index c0ae35ff..92b3833d 100644 --- a/src/store/storage.js +++ b/src/store/storage.js @@ -5,7 +5,8 @@ export const useStorageStore = defineStore('storageStore',{ state:()=>({ imgObjStr: '{}', videoObjStr: '{}', - audioObjStr: '{}' + audioObjStr: '{}', + touchBtnZIndex: 1 }), getters:{ imgObj(state){ @@ -16,9 +17,15 @@ export const useStorageStore = defineStore('storageStore',{ }, audioObj(state){ return JSON.parse(state.audioObjStr) + }, + getTouchBtnZIndex(state){ + return state.touchBtnZIndex } }, actions:{ + setTouchBtnZIndex(index = 1){ + this.touchBtnZIndex = index + }, setStorage(type, id, url) { if(type === 'image'){ let _obj = JSON.parse(this.imgObjStr)