<!--
 * @Descripttion: 
 * @version: 0.0.0
 * @Author: genglw
 * @Date: 2022-01-29 16:40:40
 * @LastEditors: genglw
 * @LastEditTime: 2022-02-18 14:06:28
-->
<template>
	<view :style="vuex_theme">
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	import {themeList} from './common/theme.js'
	export default {
		// 此处globalData为了演示其作用,不是uView框架的一部分
		globalData: {
			username: ''
		},
		
		data() {
			return {
				themeList,
			}
		},

		onLaunch() {
			let colorObj = this.themeList[this.vuex_appId].value
			let styles = ''
			for (let i in colorObj) {
				styles += colorObj[i].name + ':' + colorObj[i].value + ';' 
			}
			
			this.$u.vuex('vuex_theme', styles);
			this.$u.vuex('vuex_baseImgUrl', this.themeList[this.vuex_appId].imagePath);
			// console.log('vuex_theme----', this.vuex_theme)
			
			uni.setTabBarStyle({
			  selectedColor: this.themeList[this.vuex_appId].mainColor,
			})
		},

		onShow() {
			console.log("App onshow")
		},

		methods: {

		},

	}
</script>

<style lang="scss">
	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
	@import "@/uni_modules/uview-ui/index.scss";
	@import '@/static/css/icon.css';
</style>