@ -1,46 +1,53 @@
|
||||
<template>
|
||||
<view class="background">
|
||||
<!-- fit journey 文字说明-->
|
||||
<image class="fit_journey_text" src="@/static/transition/page1/pictures/fit_journey_text.png"></image>
|
||||
|
||||
<!--按钮-->
|
||||
<image class="button" @click="click" src="@/static/transition/page1/pictures/button.png"></image>
|
||||
<view class="page1">
|
||||
<!-- 设置图片渐变的效果显示 -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isTransitioning: false, // 控制渐变效果
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.startTransition(); // 在组件加载时开始渐变
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/transition/page2/page2' // 跳转到 page2
|
||||
});
|
||||
}
|
||||
startTransition() {
|
||||
this.isTransitioning = true;
|
||||
// 2秒后跳转到 page2
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/transition/page2/page2'
|
||||
});
|
||||
}, 4000); // 2000毫秒后跳转
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.background {
|
||||
background-image: url('@/static/transition/page1/pictures/background.png');
|
||||
.page1 {
|
||||
background-image: url('@/static/transition/page1/pictures/page1.png');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column; /* 纵向排列 */
|
||||
align-items: center; /* 水平居中 */
|
||||
justify-content: center; /* 垂直居中 */
|
||||
opacity: 0; /* 初始透明度 */
|
||||
animation: fadeIn 2s forwards; /* 添加渐变动画 */
|
||||
}
|
||||
|
||||
.fit_journey_text {
|
||||
position: absolute;
|
||||
width: 285px;
|
||||
height: 167px;
|
||||
left: calc(50% - 285px / 2 + 0.5px);
|
||||
top: 292px;
|
||||
}
|
||||
|
||||
.button {
|
||||
position: absolute;
|
||||
width: 315px;
|
||||
height: 60px;
|
||||
left: calc(50% - 315px / 2 + 0.5px);
|
||||
top: 772px;
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0; /* 起始透明度 */
|
||||
}
|
||||
to {
|
||||
opacity: 1; /* 结束透明度 */
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,17 +1,42 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="background">
|
||||
<!--按钮-->
|
||||
<image class="button" @click="click" src="@/static/transition/page2/pictures/button.png"></image>
|
||||
<!--按钮-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
methods: {
|
||||
click() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/transition/page3/page3' // 跳转到 page3
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.background {
|
||||
background-image: url("@/static/transition/page2/pictures/background.png");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column; /* 纵向排列 */
|
||||
align-items: center; /* 水平居中 */
|
||||
justify-content: flex-end; /* 使内容向底部对齐 */
|
||||
position: relative; /* 为绝对定位子元素提供相对定位的上下文 */
|
||||
}
|
||||
|
||||
.button {
|
||||
position: absolute; /* 绝对定位 */
|
||||
width: 315px;
|
||||
height: 60px;
|
||||
bottom: 20%; /* 距离底部 20% 的位置 */
|
||||
left: 50%; /* 水平居中 */
|
||||
transform: translateX(-50%); /* 通过 translateX 使其居中 */
|
||||
}
|
||||
</style>
|
||||
|
@ -1,17 +1,103 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="background">
|
||||
<!-- 人物 -->
|
||||
<image class="human" src="/static/transition/page3/pictures/human.png"></image>
|
||||
<!-- 文字 -->
|
||||
<image class="text" src="/static/transition/page3/pictures/text.png"></image>
|
||||
<!-- 按钮 -->
|
||||
<image class="button" @click="goToPage3" src="/static/transition/page3/pictures/button.png"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
methods: {
|
||||
goToPage3() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/transition/page3/page3' // 跳转到 page3
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.background {
|
||||
background-image: url("/static/transition/page3/pictures/background.png");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Human 动画,从页面中部向上移动 */
|
||||
.human {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 48%;
|
||||
|
||||
object-fit: contain; /* 保持图片比例 */
|
||||
animation: moveUp 2s ease forwards;
|
||||
top: 50%; /* 起始位置 */
|
||||
transform: translateY(-50%); /* 垂直居中 */
|
||||
}
|
||||
|
||||
/* Text 延迟显示 */
|
||||
.text {
|
||||
position: absolute;
|
||||
width: 90%;
|
||||
height: 17%;
|
||||
|
||||
object-fit: contain; /* 保持图片比例 */
|
||||
animation: fadeIn 1s ease 2s forwards; /* 2秒后显示 */
|
||||
opacity: 0;
|
||||
top: 50%; /* 根据需要调整位置 */
|
||||
}
|
||||
|
||||
/* Button 延迟显示并加缩放特效,放在右下角 */
|
||||
.button {
|
||||
position: absolute;
|
||||
height: 10vh;
|
||||
width: 22vw;
|
||||
animation: fadeInScale 1s ease 2.5s forwards; /* 2.5秒后显示并缩放 */
|
||||
opacity: 0;
|
||||
right: 5%; /* 距右边 5% */
|
||||
bottom: 3%; /* 距底部 5% */
|
||||
}
|
||||
|
||||
/* 定义 human 上移动画 */
|
||||
@keyframes moveUp {
|
||||
from {
|
||||
top: 50%;
|
||||
}
|
||||
to {
|
||||
top: 20%; /* 移动到页面顶部 10% */
|
||||
}
|
||||
}
|
||||
|
||||
/* Text 和 Button 的渐入动画 */
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Button 的缩放渐入动画 */
|
||||
@keyframes fadeInScale {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.8);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 234 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 326 KiB |
After Width: | Height: | Size: 360 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 520 KiB |
After Width: | Height: | Size: 55 KiB |
@ -1,22 +1,9 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/homepages",
|
||||
"pages/phone_code_login/phone_code_login",
|
||||
"pages/phone_login/phone_login",
|
||||
"pages/account_login/account_login",
|
||||
"pages/register/register",
|
||||
"pages/information/information/information",
|
||||
"pages/homepages/self_information/self_information",
|
||||
"pages/homepages/puppy_chat/puppy_chat",
|
||||
"pages/homepages/community/community",
|
||||
"pages/homepages/main/main",
|
||||
"static/homepages/main/main"
|
||||
"pages/transition/page1/page1",
|
||||
"pages/transition/page2/page2",
|
||||
"pages/transition/page3/page3",
|
||||
"pages/transition/page4/page4"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,3 +1 @@
|
||||
|
||||
/*每个页面公共css */
|
||||
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}
|
@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
const _imports_0 = "/static/transition/page1/pictures/button.png";
|
||||
exports._imports_0 = _imports_0;
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<view></view>
|
@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<view></view>
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<view></view>
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
methods: {
|
||||
click() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/transition/page2/page2"
|
||||
// 跳转到 page2
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.click && $options.click(...args)),
|
||||
b: common_assets._imports_0
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<view class="background"><image class="button" bindtap="{{a}}" src="{{b}}"></image></view>
|
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
methods: {
|
||||
click() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/transition/page3/page3"
|
||||
// 跳转到 page2
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o((...args) => $options.click && $options.click(...args)),
|
||||
b: common_assets._imports_0
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<view class="background"><image class="button" bindtap="{{a}}" src="{{b}}"></image></view>
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<view></view>
|
After Width: | Height: | Size: 326 KiB |
After Width: | Height: | Size: 360 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 360 KiB |
After Width: | Height: | Size: 12 KiB |