临时
This commit is contained in:
parent
804f4f3a16
commit
2c43f1f969
50
app.js
50
app.js
@ -11,31 +11,31 @@ App({
|
||||
* 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
|
||||
*/
|
||||
onLaunch: function() {
|
||||
var dbPost = new DBPost();
|
||||
var loginTime = dbPost.getloginTimeData(); //获取上次登陆时间,没有记录为0
|
||||
if (loginTime) {
|
||||
var timestamp = +new Date();
|
||||
timestamp = timestamp / 1000;
|
||||
timestamp = parseInt(timestamp);
|
||||
var difference = timestamp - loginTime; //两次时间差
|
||||
if (difference >= 86400) {
|
||||
wx.clearStorageSync();
|
||||
wx.redirectTo({
|
||||
url: 'welcome/login/login'
|
||||
})
|
||||
console.log("登录超时")
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url: 'pages/post/post'
|
||||
})
|
||||
console.log("校验通过")
|
||||
}
|
||||
} else {
|
||||
wx.redirectTo({
|
||||
url: 'welcome/login/login'
|
||||
})
|
||||
console.log("无登录记录")
|
||||
}
|
||||
// var dbPost = new DBPost();
|
||||
// var loginTime = dbPost.getloginTimeData(); //获取上次登陆时间,没有记录为0
|
||||
// if (loginTime) {
|
||||
// var timestamp = +new Date();
|
||||
// timestamp = timestamp / 1000;
|
||||
// timestamp = parseInt(timestamp);
|
||||
// var difference = timestamp - loginTime; //两次时间差
|
||||
// if (difference >= 86400) {
|
||||
// wx.clearStorageSync();
|
||||
// wx.redirectTo({
|
||||
// url: 'welcome/login/login'
|
||||
// })
|
||||
// console.log("登录超时")
|
||||
// } else {
|
||||
// wx.switchTab({
|
||||
// url: 'pages/post/post'
|
||||
// })
|
||||
// console.log("校验通过")
|
||||
// }
|
||||
// } else {
|
||||
// wx.redirectTo({
|
||||
// url: 'welcome/login/login'
|
||||
// })
|
||||
// console.log("无登录记录")
|
||||
// }
|
||||
},
|
||||
|
||||
/**
|
||||
|
2
app.json
2
app.json
@ -1,5 +1,6 @@
|
||||
{
|
||||
"pages": [
|
||||
"welcome/welcome/welcome",
|
||||
"welcome/login/login",
|
||||
"pages/post/post",
|
||||
"pages/feedBack/feedBack",
|
||||
@ -11,6 +12,7 @@
|
||||
"pages/post/QRcode/QRcode",
|
||||
"pages/user/xinxi/xinxi",
|
||||
"welcome/signin/signin",
|
||||
|
||||
"pages/user/guanyu/guanyu",
|
||||
"pages/user/user"
|
||||
],
|
||||
|
BIN
images/welcome.png
Normal file
BIN
images/welcome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 132 KiB |
66
welcome/welcome/welcome.js
Normal file
66
welcome/welcome/welcome.js
Normal file
@ -0,0 +1,66 @@
|
||||
// welcome/welcome/welcome.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
3
welcome/welcome/welcome.json
Normal file
3
welcome/welcome/welcome.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarBackgroundColor": "#3e1c54"
|
||||
}
|
13
welcome/welcome/welcome.wxml
Normal file
13
welcome/welcome/welcome.wxml
Normal file
@ -0,0 +1,13 @@
|
||||
<!--welcome/welcome/welcome.wxml-->
|
||||
<view class='text_1'>欢迎来到RCS</view>
|
||||
<view class='big'>
|
||||
<view class='box'>
|
||||
<view class='item'>让</view>
|
||||
<view class='item'>查</view>
|
||||
<view class='item'>课</view>
|
||||
<view class='item'>更</view>
|
||||
<view class='item'>高</view>
|
||||
<view class='item'>效</view>
|
||||
</view>
|
||||
</view>
|
||||
<image src='../../images/welcome.png' class='welcome'></image>
|
47
welcome/welcome/welcome.wxss
Normal file
47
welcome/welcome/welcome.wxss
Normal file
@ -0,0 +1,47 @@
|
||||
/* welcome/welcome/welcome.wxss */
|
||||
|
||||
.welcome {
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.text_1 {
|
||||
color: #fff;
|
||||
font-size: 60rpx;
|
||||
font-weight: lighter;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 350rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
font-weight: lighter;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.big {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #3e1c54;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user