初始化
This commit is contained in:
31
pages/system/welcome/index.js
Normal file
31
pages/system/welcome/index.js
Normal file
@@ -0,0 +1,31 @@
|
||||
Page({
|
||||
data: {
|
||||
key: "is_first",
|
||||
loading: true,
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.init()
|
||||
},
|
||||
|
||||
init() {
|
||||
let state = wx.getStorageSync(this.data.key);
|
||||
if (state) {
|
||||
wx.redirectTo({
|
||||
url: "/pages/joinFlow/access/index",
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
handNext() {
|
||||
wx.setStorageSync(this.data.key, true)
|
||||
wx.redirectTo({
|
||||
url: "/pages/home/index",
|
||||
})
|
||||
}
|
||||
})
|
||||
4
pages/system/welcome/index.json
Normal file
4
pages/system/welcome/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
38
pages/system/welcome/index.scss
Normal file
38
pages/system/welcome/index.scss
Normal file
@@ -0,0 +1,38 @@
|
||||
.page {
|
||||
background-image: linear-gradient(135deg, rgba(0, 33, 33, 1), rgba(0, 106, 106, 1), );
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.j-1 {
|
||||
color: white;
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
height: min-content;
|
||||
inset: 0;
|
||||
text-align: center;
|
||||
|
||||
.text-1 {
|
||||
font-size: 60rpx;
|
||||
font-weight: 700;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.text-2 {
|
||||
line-height: 50rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
right: 40rpx;
|
||||
bottom: 60rpx;
|
||||
|
||||
.btn {
|
||||
width: 100% !important;
|
||||
padding: 30rpx 0;
|
||||
color: rgba(0, 106, 106, 1);
|
||||
}
|
||||
}
|
||||
13
pages/system/welcome/index.wxml
Normal file
13
pages/system/welcome/index.wxml
Normal file
@@ -0,0 +1,13 @@
|
||||
<view wx:if="{{!loading}}" class="page">
|
||||
|
||||
<view class="j-1">
|
||||
<view class="text-1">欢迎使用术极守护</view>
|
||||
<view class="text-2">您的贴身康复管家</view>
|
||||
<view class="text-2">为您的术后康复之路保驾护航</view>
|
||||
</view>
|
||||
|
||||
<view class="footer">
|
||||
<button class="btn"
|
||||
bind:tap="handNext"> 下一步</button>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user