|
@@ -16,6 +16,7 @@ import Welcomeimg from "@/assets/img/home/welcome.png";
|
|
|
|
|
|
import Bg from "@/assets/img/home/bg.png";
|
|
|
import BgM from "@/assets/img/home/bgM.png";
|
|
|
+import { useStore } from "@/store/index";
|
|
|
|
|
|
const allBg = computed(() => {
|
|
|
return screenWidth.value > 480 ? `url(${Bg})` : `url(${BgM})`;
|
|
@@ -25,9 +26,10 @@ const router = useRouter();
|
|
|
|
|
|
const moduleIndex = ref(0);
|
|
|
const screenWidth = ref();
|
|
|
+const store = useStore();
|
|
|
|
|
|
watch(moduleIndex, (newValue: number) => {
|
|
|
- // console.log(moduleIndex.value);
|
|
|
+ store.moduleIndex = newValue;
|
|
|
if (newValue === 3) {
|
|
|
router.push({
|
|
|
path: "/product",
|
|
@@ -36,7 +38,11 @@ watch(moduleIndex, (newValue: number) => {
|
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
|
- moduleIndex.value = 0;
|
|
|
+ if (store.moduleIndex == 2) {
|
|
|
+ moduleIndex.value = 2;
|
|
|
+ } else {
|
|
|
+ moduleIndex.value = 0;
|
|
|
+ }
|
|
|
screenWidth.value = window.innerWidth;
|
|
|
window.onresize = () => {
|
|
|
screenWidth.value = window.innerWidth;
|
|
@@ -125,8 +131,6 @@ onMounted(() => {
|
|
|
"
|
|
|
/>
|
|
|
|
|
|
- <!-- -->
|
|
|
-
|
|
|
<img class="wave" :src="screenWidth > 480 ? Bolang : BolangM" alt="" />
|
|
|
|
|
|
<!-- title -->
|
|
@@ -169,6 +173,8 @@ onMounted(() => {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
+ position: relative;
|
|
|
+ z-index: 2;
|
|
|
img {
|
|
|
width: 90%;
|
|
|
}
|