37 lines
863 B
Vue
37 lines
863 B
Vue
<template>
|
|
<view class="welcome-container">
|
|
<!-- #ifdef H5 -->
|
|
<WelcomeAnimation @complete="onComplete" @skip="onComplete" />
|
|
<!-- #endif -->
|
|
|
|
<!-- #ifdef APP -->
|
|
<WelcomeAnimationWebview @complete="onComplete" @skip="onComplete" />
|
|
<!-- #endif -->
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import WelcomeAnimation from '../components/WelcomeAnimation.vue';
|
|
import WelcomeAnimationWebview from '../components/WelcomeAnimationWebview.vue'
|
|
const onComplete = () => {
|
|
// 标记已看过开场动画
|
|
uni.setStorageSync('has_seen_welcome', true);
|
|
// 标记新用户注册完成(用于触发新手引导)
|
|
uni.setStorageSync('is_new_user', true);
|
|
|
|
uni.reLaunch({
|
|
url: '/pages/square/square'
|
|
});
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.welcome-container {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 9999;
|
|
}
|
|
</style> |