|
@@ -1,7 +1,12 @@
|
|
|
<template>
|
|
|
<div style="width: 100%; overflow: hidden">
|
|
|
<transition name="fade">
|
|
|
- <img v-if="step === 5" src="../../../assets/img/next.png" class="next" />
|
|
|
+ <img
|
|
|
+ v-if="step === 5"
|
|
|
+ @click="nextPage"
|
|
|
+ src="../../../assets/img/next.png"
|
|
|
+ class="next"
|
|
|
+ />
|
|
|
</transition>
|
|
|
<div class="sex" :style="'background-image: url(' + bgimg + ')'">
|
|
|
<img
|
|
@@ -71,7 +76,7 @@
|
|
|
<transition name="fade">
|
|
|
<div class="model" v-if="showImg !== undefined">
|
|
|
<div class="gs">
|
|
|
- <img :src="bgimg" style="width:100%;height: 100%;" alt="">
|
|
|
+ <img :src="bgimg" style="width: 100%; height: 100%" alt="" />
|
|
|
</div>
|
|
|
<van-icon
|
|
|
color="#fff"
|
|
@@ -89,7 +94,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { ref, reactive } from "vue";
|
|
|
+import { ref, reactive, defineEmits } from "vue";
|
|
|
import data from "../data/data.json";
|
|
|
// import { onMounted, reactive } from "vue";
|
|
|
// import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
|
|
@@ -98,6 +103,7 @@ import data from "../data/data.json";
|
|
|
* window.$originData.orginParames.parameters 固定参数值
|
|
|
* window.$originData.urlParames url参数
|
|
|
*/
|
|
|
+const emits = defineEmits(["changePage"]);
|
|
|
const showImg = ref(undefined);
|
|
|
let width = window.$originData.orginParames.availWidth * 0.7;
|
|
|
const type = Math.floor(Math.random() * 12 + 1);
|
|
@@ -137,6 +143,12 @@ let t = setTimeout(() => {
|
|
|
}, 2000);
|
|
|
}, 200);
|
|
|
|
|
|
+function nextPage() {
|
|
|
+ console.log(step.value, step.value !== 5)
|
|
|
+ if (step.value !== 5) return
|
|
|
+ emits("changePage", "seven");
|
|
|
+}
|
|
|
+
|
|
|
function changeNextStep() {
|
|
|
nextStep.value += 1;
|
|
|
}
|
|
@@ -144,12 +156,7 @@ function changeNextStep() {
|
|
|
function autoStep() {
|
|
|
t = setInterval(() => {
|
|
|
nextStep.value === 2 && (step.value += 1);
|
|
|
- if (step.value === 5) {
|
|
|
- clearInterval(t);
|
|
|
- t = setTimeout(() => {
|
|
|
- // 跳转下一页
|
|
|
- }, 2000);
|
|
|
- }
|
|
|
+ if (step.value === 5) clearInterval(t);
|
|
|
}, 3000);
|
|
|
}
|
|
|
|