更改项目
This commit is contained in:
72
App.vue
72
App.vue
@@ -1,38 +1,54 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
// console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
|
||||
console.log('App Launch')
|
||||
import http from '@/until/http.js';
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
this.getInfo()
|
||||
},
|
||||
onHide: function () {
|
||||
uni.removeStorageSync('Theme_Data')
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
http.get('/api/Theme/get_theme_data').then(response => {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
if(code) {
|
||||
if(data) {
|
||||
uni.setStorageSync('Theme_Data',JSON.stringify(data))
|
||||
} else {
|
||||
uni.setStorageSync('Theme_Data','')
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.setStorageSync('Theme_Data','')
|
||||
});
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '@/static/public.css';
|
||||
/*每个页面公共css */
|
||||
@import '@/uni_modules/uni-scss/index.scss';
|
||||
/* #ifndef APP-NVUE */
|
||||
@import '@/static/customicons.css';
|
||||
@import '@/static/public.css';
|
||||
/*每个页面公共css */
|
||||
@import '@/uni_modules/uni-scss/index.scss';
|
||||
/* #ifndef APP-NVUE */
|
||||
@import '@/static/customicons.css';
|
||||
|
||||
body {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
body {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
// 设置整个项目的背景色
|
||||
page {
|
||||
background-color: transparent !important;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
// 设置整个项目的背景色
|
||||
page {
|
||||
background-color: transparent !important;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user