You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.1 KiB

<script>
export default {
onLaunch: function() {
console.log('App Launch')
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) {
console.log(res.hasUpdate)
if (res.hasUpdate) {
updateManager.onUpdateReady(function() {
uni.showModal({
title: "更新提示",
content: "新版本已经准备好,是否重启应用?",
success(res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate();
}
}
});
});
updateManager.onUpdateFailed(function() {
// 新的版本下载失败
uni.showModal({
title: "已经有新版本了哟~",
content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~"
});
});
}
});
updateManager.onUpdateFailed(function(res) {
// 新的版本下载失败
});
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
page {
background-color: #F4F5F9;
}
.u-navbar {
border-radius: 0 0 40rpx 40rpx !important;
}
// 待护理
.icon1 {
width: 16rpx;
height: 16rpx;
background: #FDB030;
border-radius: 100%;
margin-right: 14rpx;
}
//已完成
.icon2 {
width: 16rpx;
height: 16rpx;
background: #1173FF;
border-radius: 100%;
margin-right: 14rpx;
}
//进行中
.icon3 {
width: 12rpx;
height: 12rpx;
background: #2EC28B;
border-radius: 100%;
margin-right: 14rpx;
position: relative;
&::after {
content: '';
width: 16rpx;
height: 16rpx;
border: 2rpx solid #2EC28B;
box-sizing: border-box;
border-radius: 100%;
animation: icon-scale 3s linear infinite;
position: absolute;
top: -2rpx;
left: -2rpx;
}
@keyframes icon-scale {
0%,
30%,
100%,
40% {
transform: scale(1.5, 1.5);
}
70% {
transform: scale(1, 1);
}
}
}
</style>