Files
my-h5/App.vue

68 lines
1.3 KiB
Vue
Raw Permalink Normal View History

2025-09-26 14:50:30 +08:00
<script>
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','')
});
},
}
}
</script>
<style lang="scss">
@import '@/static/public.css';
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
body {
background-color: transparent !important;
}
// 设置整个项目的背景色
page {
background-color: transparent !important;
font-family: Source Han Sans CN, Source Han Sans CN;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
// 定制
:root {
--primary-color: #FC7285;
--sub-color: #F0EEF7;
--subs-color: #FC7285;
--subss-color: #333333;
--warn-color:#F69627;
--font-button-color:#fff;
--font-flowbg-color:#fff;
--font-button-size:24rpx;
--font-button-size-p:28rpx;
/* tab图标 */
--tab-url:url('https://myh5.qixing2.top/image/tabline.png');
}
</style>