重构学习任务1
This commit is contained in:
+7
-5
@@ -6,7 +6,7 @@ ENV = 'development'
|
||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.78:9786'
|
||||
|
||||
# DEV
|
||||
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
# app入口
|
||||
#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
@@ -19,23 +19,25 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.16.122.65:7001'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.21:9786'
|
||||
|
||||
|
||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
||||
|
||||
|
||||
# dev
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
# sit
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
|
||||
# UAT
|
||||
# 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_TRASTUDY = 'http://25.64.16.130:9602'
|
||||
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'
|
||||
# 张建成
|
||||
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.16.144:9605'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.16.144:9602'
|
||||
# 王洋洋
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.16.140:9604'
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<view v-bind="$attrs">
|
||||
<image :src="imgUrlShow" fit="cover" :mode="mode" @click="showDetail" style="width: 100%;height: 100%;"></image>
|
||||
<uv-overlay :show="showModel" opacity=".6" @click="showModel = false">
|
||||
<view class="overlay-box">
|
||||
<!-- <uv-overlay :show="showModel" opacity=".6" @click="showModel = false"> -->
|
||||
<uni-popup ref="PopupRef" class="popup">
|
||||
<view class="overlay-box" @click="closePopup">
|
||||
<image class="detail-img" :src="imgUrlShow" :mode="mode"></image>
|
||||
</view>
|
||||
</uv-overlay>
|
||||
</uni-popup>
|
||||
<!-- </uv-overlay> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -90,9 +92,16 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closePopup(){
|
||||
this.showModel = false
|
||||
this.storageStore.setTouchBtnZIndex(9)
|
||||
this.$refs.PopupRef.close()
|
||||
},
|
||||
showDetail(){
|
||||
if(!!this.previewDetail){
|
||||
this.showModel = true
|
||||
this.storageStore.setTouchBtnZIndex(-1)
|
||||
this.$refs.PopupRef.open()
|
||||
}
|
||||
},
|
||||
getPreviewUrlBlob(id) {
|
||||
@@ -151,7 +160,8 @@
|
||||
<style lang="scss" scoped>
|
||||
.overlay-box{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
.detail-img{
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="video-view-box" @click="showModel = true">
|
||||
<view class="video-view-box" @click="showModelNow">
|
||||
|
||||
<view class="img-box">
|
||||
<image
|
||||
class="icon"
|
||||
@@ -7,8 +8,9 @@
|
||||
style="width: 100%;height: 100%;"
|
||||
></image>
|
||||
</view>
|
||||
<uv-overlay :show="showModel" opacity=".6" @click.stop="showModel = false">
|
||||
<view class="overlay-box" @click.stop="showModel = false">
|
||||
<!-- <uv-overlay :show="showModel" opacity=".6" @click.stop="showModel = false"> -->
|
||||
<uni-popup ref="PopupRef" class="popup" mask-background-color="rgba(0,0,0,.9)">
|
||||
<view class="overlay-box" @click="playEnded">
|
||||
<video class="video-cont-center"
|
||||
:id="`video`+ fileId"
|
||||
ref="playerRef"
|
||||
@@ -19,7 +21,7 @@
|
||||
@ended="playEnded"
|
||||
object-fit="contain"></video>
|
||||
</view>
|
||||
</uv-overlay>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -66,15 +68,17 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showModelNow(){
|
||||
this.storageStore.setTouchBtnZIndex(-1)
|
||||
this.$refs.PopupRef.open()
|
||||
this.showModel = true
|
||||
},
|
||||
playError(info){
|
||||
console.log('err:',info)
|
||||
console.log(this.$refs.playerRef)
|
||||
console.log(this.videoContext)
|
||||
// this.$refs.playerRef.stop();
|
||||
},
|
||||
playEnded(){
|
||||
// let _newDate = new Date().getTime()
|
||||
// this.fileUrlShow = getPreviewFileUrl(this.fileId)+'?t=' + _newDate
|
||||
this.storageStore.setTouchBtnZIndex(9)
|
||||
this.$refs.PopupRef.close()
|
||||
this.showModel = false
|
||||
},
|
||||
getPreviewUrlBlob(id) {
|
||||
@@ -144,8 +148,11 @@
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.overlay-box{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
@@ -118,11 +118,11 @@
|
||||
<image class="icon icon-iamge" src="@/static/images/course/goon.png" ></image></view>
|
||||
</view>
|
||||
<!-- 简答鼓励信息 -->
|
||||
<view class="talking-cont last-cont" v-if=" [5].indexOf(type) >= 0 && !dataInfo.isLoading">
|
||||
<!-- <view class="talking-cont last-cont" v-if=" [5].indexOf(type) >= 0 && !dataInfo.isLoading">
|
||||
<view class="talking-text">
|
||||
{{ changeBr(dataInfo.suggestContent || '--') }}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- ai回答 -->
|
||||
@@ -507,19 +507,24 @@
|
||||
setVoiceTime(0)
|
||||
},100)
|
||||
}
|
||||
// else{
|
||||
// setTimeout(()=>{
|
||||
// initVoice(readType, item, isplay)
|
||||
// },200)
|
||||
// }
|
||||
}
|
||||
const setVoiceTime = (sum) => {
|
||||
sum += 1
|
||||
if(talkVoiceObj.value.duration){
|
||||
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
|
||||
}else{
|
||||
if(sum === 10) {
|
||||
if(sum === 100) {
|
||||
voiceTime.value = 0 + 's'
|
||||
return
|
||||
}
|
||||
setTimeout(()=>{
|
||||
setVoiceTime(sum)
|
||||
},200)
|
||||
},300)
|
||||
}
|
||||
}
|
||||
const playQnsVoice = (readType = 'qns', item) =>{
|
||||
|
||||
@@ -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()
|
||||
storageStore.setTouchBtnZIndex(9)
|
||||
const btnZindex = computed(()=> storageStore.getTouchBtnZIndex)
|
||||
|
||||
watch(() => showTalkingModel.value, (val) => val ? talkModelRef.value.open() : talkModelRef.value.close())
|
||||
watch(() => props.isLoading, () => {}, {
|
||||
deep: true,
|
||||
@@ -397,7 +403,11 @@
|
||||
background-color: #fff;
|
||||
padding: 25rpx 30rpx 0;
|
||||
position: relative;
|
||||
<<<<<<< HEAD
|
||||
z-index: 0;
|
||||
=======
|
||||
z-index: v-bind(btnZindex);
|
||||
>>>>>>> f86f24557b7e788fae333d20384f03331112cbd5
|
||||
.touch-btn {
|
||||
height: 92rpx;
|
||||
box-shadow: 0 8rpx 20rpx 0 rgba(0, 0, 0, .06);
|
||||
|
||||
@@ -562,6 +562,7 @@ const nextQuestionSuccess = (info, type = 'next') => {
|
||||
processType: 'NEW-ANSER', //NEW-KNOW
|
||||
requestBody: JSON.stringify({
|
||||
stdyId: unref(stdyId),
|
||||
stdyPgrphId: info.stdyPgrphId,
|
||||
qnsId: info.qnsId
|
||||
})
|
||||
}).then(res => {
|
||||
|
||||
@@ -5,7 +5,8 @@ export const useStorageStore = defineStore('storageStore',{
|
||||
state:()=>({
|
||||
imgObjStr: '{}',
|
||||
videoObjStr: '{}',
|
||||
audioObjStr: '{}'
|
||||
audioObjStr: '{}',
|
||||
touchBtnZIndex: 9
|
||||
}),
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user