import { defineComponent, reactive, computed, toRef } from "vue"; import styles from "./index.module.less" import { headImg } from "../image"; import { headTopData } from "../index" import { Switch, showToast, Field, Popup, Slider } from "vant"; import state, { refreshMusicSvg, IPlatform, checkMoveNoSave } from "/src/state" import { api_closeCamera, api_openCamera, api_savePicture } from "/src/helpers/communication"; import { smoothAnimationState} from "/src/page-instrument/view-detail/smoothAnimation" import Recommendation from "../../custom-plugins/helper-model/recommendation"; import { resetRenderMusicScore } from "/src/view/music-score"; import ScreenModel from "../../custom-plugins/helper-model/screen-model"; import { getQuery } from "/src/utils/queryString"; import { reCheckDelay } from "/src/page-instrument/evaluat-model" import { audioData, changeMingSongType } from "/src/view/audio-list" import useDrag from "/src/view/plugins/useDrag/index"; import Dragbom from "/src/view/plugins/useDrag/dragbom"; import { storeData } from "/src/store"; import { getGuidance, setGuidance } from "../../custom-plugins/guide-page/api"; import { handleLoadBeatMusic } from "/src/view/audio-list" export default defineComponent({ name: "settting", setup() { const query = getQuery(); const helperData = reactive({ screenModelShow: false, // 投屏帮助 recommendationShow: false, // 建议 }); const zoomList = [{name:'0.5x',value: 0.5},{name:'0.75x',value: 0.65},{name:'1x',value: 0.8},{name:'1.25x',value: 1.25},{name:'1.5x',value: 1.5},{name:'1.75x',value: 1.75},{name:'2x',value: 2},{name:'2.25x',value: 2.25}] const parentClassName = "recommenBoxClass_drag"; const userId = storeData.user?.id ? String(storeData.user?.id) : ""; const positionInfo = state.platform !== IPlatform.PC ? { styleDrag: { value: null }, } : useDrag([`${parentClassName} .top_draging`, `${parentClassName} .bom_drag`], parentClassName, toRef(helperData, "recommendationShow"), userId); // 完成拖动弹窗引导页 const handleGuide = async () => { state.guideInfo.teacherDrag = true; try { const res = await setGuidance({ guideTag: "guideInfo", guideValue: JSON.stringify(state.guideInfo) }); } catch (e) { console.log(e); } }; // 加减评测频率 const operateHz = (type: number) => { const minFrequency = state.baseFrequency - 10, maxFrequency = state.baseFrequency + 10 let currentFrequency = state.setting.frequency if (type === 1) { if (currentFrequency - 1 < minFrequency) return showToast({ message: `最低标准音高${minFrequency}HZ` }) currentFrequency = currentFrequency - 1 } else { if (currentFrequency + 1 > maxFrequency) return showToast({ message: `最高标准音高${maxFrequency}HZ` }) currentFrequency = currentFrequency + 1 } state.setting.frequency = currentFrequency >= 0 ? currentFrequency : 0 } const formatterTimeMs = (value: any) => value = String(Math.min(3000, value)); const notationList = computed(() => { const list = state.enableNotation ? [{name:'五线谱',value:'staff'},{name:'首调',value:'firstTone'},{name:'固定调',value:'fixedTone'}] : [{name:'首调',value:'firstTone'},{name:'固定调',value:'fixedTone'}]; return list; }); return () => (