first commit
This commit is contained in:
189
App.vue
Normal file
189
App.vue
Normal file
@@ -0,0 +1,189 @@
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
async onLaunch () {
|
||||
console.log(1)
|
||||
uni.onMemoryWarning((res) => {
|
||||
console.log(res)
|
||||
console.log('内存溢出:' + JSON.stringify(res))
|
||||
})
|
||||
|
||||
let info = await this.$http.getConfigData()
|
||||
uni.setStorageSync('configData', info.data)
|
||||
Vue.prototype.$paddingTop = this.$u.getPx("44px") + this.$u.sys().statusBarHeight;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
// 获取屏幕可用高度
|
||||
Vue.prototype.$screenHeight = res.windowHeight;
|
||||
// 获取底部安全区域的高度
|
||||
Vue.prototype.$safeAreaBottom = res.screenHeight - res.safeArea.bottom;
|
||||
}
|
||||
});
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(res => {
|
||||
if (res && res.hasUpdate) {
|
||||
uni.showLoading({ title: '小程序更新中' });
|
||||
}
|
||||
})
|
||||
updateManager.onUpdateReady((res) => {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success(res) {
|
||||
if (res.confirm) updateManager.applyUpdate();
|
||||
}
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed((res) => {
|
||||
uni.hideLoading();
|
||||
})
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/*每个页面公共css */
|
||||
@import "@/uni_modules/uview-ui/index.scss";
|
||||
page{ background: #F6F6F6; min-height: 100%; }
|
||||
image{ width: 100%; height: 100%; vertical-align: top }
|
||||
.navbar_title{ color: #333; font-size: 36rpx; font-weight: 500; }
|
||||
|
||||
.popup-content {
|
||||
position: relative;
|
||||
.bgImg {
|
||||
width: 595rpx;
|
||||
height: 397rpx;
|
||||
}
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 510rpx;
|
||||
top: 64rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
.title {
|
||||
font-weight: 800;
|
||||
font-size: 40rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
}
|
||||
.text {
|
||||
margin-top: 32rpx;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.btn-box {
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
.close {
|
||||
width: 236rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 10rpx;
|
||||
border: 2rpx solid #666666;
|
||||
line-height: 77rpx;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.save {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
background: #03AE80;
|
||||
border-radius: 10rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-tourist{
|
||||
width: 100%; background: #FBFBFB; border-radius: 20rpx 20rpx 0 0; padding: 40rpx 32rpx 42rpx; box-sizing: border-box;
|
||||
.title{
|
||||
width: 100%; text-align: center; line-height: 48rpx; position: relative; color: #333; font-size: 34rpx; font-weight: 500;
|
||||
.close{ position: absolute; right: 2rpx; top: 50%; transform: translateY(-50%); }
|
||||
}
|
||||
.form{
|
||||
width: 100%; margin-top: 48rpx;
|
||||
.list{
|
||||
border-bottom: 1rpx solid rgba(0,0,0,0.1); padding-left: 192rpx; position: relative; box-sizing: border-box;
|
||||
&:last-child{ border-bottom: 0; }
|
||||
.label{ color: #333; font-size: 28rpx; font-weight: 500; position: absolute; left: 0; top: 50%;transform: translateY(-50%); }
|
||||
input{ width: 100%; height: 100%; color: #333; font-size: 28rpx; display: inline-block; }
|
||||
/deep/.input-placeholder {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.name-box {
|
||||
padding: 0 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
.list {
|
||||
height: 106rpx;
|
||||
line-height: 106rpx;
|
||||
}
|
||||
}
|
||||
.num-box {
|
||||
margin-top: 20rpx;
|
||||
padding: 0 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
.list {
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn{ height: 90rpx; background: linear-gradient( 141deg, #54C76E 0%, #03AE80 100%); border-radius: 100rpx; color: #F6F9FF; text-align: center; line-height: 90rpx; font-size: 32rpx; font-weight: 500; margin: 40rpx auto 0; }
|
||||
.content{ width: 100%; margin-top: 80rpx; font-size: 26rpx; color: #333333; line-height: 42rpx; max-height: 800rpx; overflow: scroll;}
|
||||
}
|
||||
.popup-notice {
|
||||
.popup-content {
|
||||
padding: 25rpx 32rpx 60rpx; border-radius: 30rpx 30rpx 0 0; background: #fff;
|
||||
.head {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 4rpx;
|
||||
right: 2rpx;
|
||||
.uniui-closeempty {
|
||||
font-size: 40rpx !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup-box {
|
||||
margin-top: 60rpx;
|
||||
.con {
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user