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.
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
|
|
|
|
|
@import "uview-ui/index.scss";
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import util from "@/utils/util.js"
|
|
|
|
|
|
export default {
|
|
|
|
|
|
onLaunch: function() {
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
util.getOpenidInfo(function(res) {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
}, true);
|
|
|
|
|
|
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>
|
|
|
|
|
|
@import '@/static/css/common.css';
|
|
|
|
|
|
@import "@/static/css/iconfont.css";
|
|
|
|
|
|
|
|
|
|
|
|
/*每个页面公共css */
|
|
|
|
|
|
.flex_end {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mpopup {
|
|
|
|
|
|
margin-top: 60rpx;
|
|
|
|
|
|
min-height: 600rpx;
|
|
|
|
|
|
min-width: 540rpx;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mpopup-title {
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
color: #351C1B;
|
|
|
|
|
|
line-height: 40rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
padding: 0rpx 42rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.u-popup__content {
|
|
|
|
|
|
|
|
|
|
|
|
background: linear-gradient(0deg, #ffffff 85%, #044ed7);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mpopup-content {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
padding: 71rpx 0rpx;
|
|
|
|
|
|
padding: 0rpx 42rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.mpopup-footer {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
padding: 0rpx 42rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.orderBoxInfoRowTxt {
|
|
|
|
|
|
font-size: 28rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|