浏览代码

主题色

twt 2 年之前
父节点
当前提交
b1139be0b8

+ 26 - 1
pages/activity/activity.vue

@@ -50,6 +50,7 @@
 				itemData: [],
 				itemData: [],
 				noMoreShow: false,
 				noMoreShow: false,
 				ext:'',
 				ext:'',
+				themeColor:'',
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
@@ -58,7 +59,31 @@
 			
 			
 			this.ext=this.$common.getExtStoreId();
 			this.ext=this.$common.getExtStoreId();
 			this.page = 1
 			this.page = 1
-			this.myOrderCoupon()
+			this.myOrderCoupon();
+			this.themeColor = uni.getStorageSync("themeColor");
+			if(this.themeColor){
+				if(this.themeColor=='6F2BE8'){
+					var backgroundImage='/static/tabimg/activty6F2BE8.png'
+				}
+				if(this.themeColor=='1677FF'){
+					var backgroundImage='/static/tabimg/activty1677FF.png'
+				}
+				if(this.themeColor=='FF4F00'){
+					var backgroundImage='/static/tabimg/activtyFF4F00.png'
+				}
+				if(this.themeColor=='D53533'){
+					var backgroundImage='/static/tabimg/activity1.png'
+				}
+				uni.setTabBarStyle({
+				  // color: '#FF0000',
+				  selectedColor: '#'+this.themeColor,
+				})
+				uni.setTabBarItem({
+				  index: 2,
+				  text: '活动',
+				   selectedIconPath: backgroundImage
+				})
+			}
 		},
 		},
 
 
 		methods: {
 		methods: {

+ 21 - 1
pages/index/index.vue

@@ -520,7 +520,27 @@
 					uni.setNavigationBarTitle({
 					uni.setNavigationBarTitle({
 					  title:this.wxOpenData.miniAppName
 					  title:this.wxOpenData.miniAppName
 					})
 					})
-					
+					if(this.themeColor=='6F2BE8'){
+						var backgroundImage='/static/tabimg/index6F2BE8.png'
+					}
+					if(this.themeColor=='1677FF'){
+						var backgroundImage='/static/tabimg/index1677FF.png'
+					}
+					if(this.themeColor=='FF4F00'){
+						var backgroundImage='/static/tabimg/indexFF4F00.png'
+					}
+					if(this.themeColor=='D53533'){
+						var backgroundImage='/static/tabimg/index1.png'
+					}
+					uni.setTabBarStyle({
+					  // color: '#FF0000',
+					  selectedColor: '#'+this.themeColor,
+					})
+					uni.setTabBarItem({
+					  index: 0,
+					  text: '首页',
+					   selectedIconPath: backgroundImage
+					})
 					that.queryHomeCardList()
 					that.queryHomeCardList()
 					//that.wxPhoneLogin()
 					//that.wxPhoneLogin()
 					this.$store.commit('mutationswxOpenData', that.wxOpenData)
 					this.$store.commit('mutationswxOpenData', that.wxOpenData)

+ 23 - 0
pages/shop/shop.vue

@@ -162,6 +162,29 @@
 			this.userInfo=this.$store.state.userInfo;
 			this.userInfo=this.$store.state.userInfo;
 			this.wxOpenData=this.$store.state.wxOpenData;
 			this.wxOpenData=this.$store.state.wxOpenData;
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.themeColor = uni.getStorageSync("themeColor");
+			if(this.themeColor){
+				if(this.themeColor=='6F2BE8'){
+					var backgroundImage='/static/tabimg/shop6F2BE8.png'
+				}
+				if(this.themeColor=='1677FF'){
+					var backgroundImage='/static/tabimg/shop1677FF.png'
+				}
+				if(this.themeColor=='FF4F00'){
+					var backgroundImage='/static/tabimg/shopFF4F00.png'
+				}
+				if(this.themeColor=='D53533'){
+					var backgroundImage='/static/tabimg/shop1.png'
+				}
+				uni.setTabBarStyle({
+				  // color: '#FF0000',
+				  selectedColor: '#'+this.themeColor,
+				})
+				uni.setTabBarItem({
+				  index: 1,
+				  text: '商城',
+				   selectedIconPath: backgroundImage
+				})
+			}
 			this.ext=this.$common.getExtStoreId();
 			this.ext=this.$common.getExtStoreId();
 			this.getcategoryList();
 			this.getcategoryList();
 			this.getlistOpenGoodsPage();
 			this.getlistOpenGoodsPage();

+ 23 - 1
pages/user/user.vue

@@ -222,7 +222,29 @@
 			
 			
             this.ext=this.$common.getExtStoreId();
             this.ext=this.$common.getExtStoreId();
 			 this.themeColor = uni.getStorageSync("themeColor");
 			 this.themeColor = uni.getStorageSync("themeColor");
-			
+			if(this.themeColor){
+				if(this.themeColor=='6F2BE8'){
+					var backgroundImage='/static/tabimg/me6F2BE8.png'
+				}
+				if(this.themeColor=='1677FF'){
+					var backgroundImage='/static/tabimg/me1677FF.png'
+				}
+				if(this.themeColor=='FF4F00'){
+					var backgroundImage='/static/tabimg/meFF4F00.png'
+				}
+				if(this.themeColor=='D53533'){
+					var backgroundImage='/static/tabimg/me1.png'
+				}
+				uni.setTabBarStyle({
+				  // color: '#FF0000',
+				  selectedColor: '#'+this.themeColor,
+				})
+				uni.setTabBarItem({
+				  index: 3,
+				  text: '我的',
+				   selectedIconPath: backgroundImage
+				})
+			}
 			uni.setNavigationBarColor({
 			uni.setNavigationBarColor({
 				frontColor: "#ffffff",
 				frontColor: "#ffffff",
 				backgroundColor:'#'+ this.themeColor
 				backgroundColor:'#'+ this.themeColor

二进制
static/tabimg/activty1677FF.png


二进制
static/tabimg/activty6F2BE8.png


二进制
static/tabimg/activtyFF4F00.png


二进制
static/tabimg/index1677FF.png


二进制
static/tabimg/index6F2BE8.png


二进制
static/tabimg/indexFF4F00.png


二进制
static/tabimg/me1677FF.png


二进制
static/tabimg/me6F2BE8.png


二进制
static/tabimg/meFF4F00.png


二进制
static/tabimg/shop1677FF.png


二进制
static/tabimg/shop6F2BE8.png


二进制
static/tabimg/shopFF4F00.png