|
@@ -1,9 +1,9 @@
|
|
|
-import { defineComponent, reactive, computed } from "vue";
|
|
|
+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 } from "/src/state"
|
|
|
+import state, { refreshMusicSvg, IPlatform } 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";
|
|
@@ -12,6 +12,10 @@ 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";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "settting",
|
|
@@ -21,6 +25,25 @@ export default defineComponent({
|
|
|
screenModelShow: false, // 投屏帮助
|
|
|
recommendationShow: false, // 建议
|
|
|
});
|
|
|
+ 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_drag`, `${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
|
|
@@ -236,12 +259,14 @@ export default defineComponent({
|
|
|
transition="van-scale"
|
|
|
teleport="body"
|
|
|
overlay-style={{background:'rgba(0, 0, 0, 0.3)'}}
|
|
|
+ style={positionInfo.styleDrag.value}
|
|
|
>
|
|
|
<Recommendation
|
|
|
onClose={() => {
|
|
|
helperData.recommendationShow = false;
|
|
|
}}
|
|
|
/>
|
|
|
+ {state.platform === IPlatform.PC && <Dragbom showGuide={!state.guideInfo?.teacherDrag} onGuideDone={handleGuide} />}
|
|
|
</Popup>
|
|
|
<Popup
|
|
|
class={["popup-custom"]}
|