Browse Source

首页皮肤

twt 2 years ago
parent
commit
5798ec476e
4 changed files with 38 additions and 12 deletions
  1. 1 0
      pages/activity/jkDetail.vue
  2. 22 9
      pages/index/index.vue
  3. 3 0
      pages/integral/integralConfirm.vue
  4. 12 3
      pages/shop/shop.vue

+ 1 - 0
pages/activity/jkDetail.vue

@@ -414,6 +414,7 @@
 				this.useShopShow=true;
 			},
 			submitOrder(){
+				uni.hideKeyboard()
 				var jsonArray={
 					itemId:this.collectingID,
 					itemName:this.info.activityName,

+ 22 - 9
pages/index/index.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="content">
-		<view class="indexTop">
+		<view class="indexTop" :style="{background:'#'+themeColor}" v-if="getwxLoing">
 			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 			<view class="indexnav">{{wxOpenData.unionName}}</view>
 		</view>
 		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
 		<view style="height: 43px;"></view>
-		<view class="topBox"></view>
-		<view class="yuanhu"></view>
+		<view class="topBox" :style="{background:'#'+themeColor}" v-if="getwxLoing"></view>
+		<view class="yuanhu" :style="{background:'#'+themeColor}" v-if="getwxLoing"></view>
 		<view class="shoptopbox2"  v-if="!carInfo">
 		  <view class="carinfoBox2">
 		    <view class="carinfoBoxNocar" @click="addCar">
@@ -93,7 +93,7 @@
 				<img v-if="managerInfo.avatar" :src="managerInfo.avatar" alt="" class="advisertx">
 				<img v-else src="../../static/timg/pic_def_ava@2x.png" alt="" class="advisertx">
 				<view class="adviserNema">{{managerInfo.name}}</view>
-				<view class="adviserms">服务顾问</view>
+				<view class="adviserms" :style="{border:'1px solid #'+themeColor,color:'#'+themeColor}">服务顾问</view>
 			</view>
 			<img src="../../static/timg/icon_arrow_right.png" alt="" class="adviserJt">
 		</view>
@@ -109,7 +109,7 @@
 		
 		<view class="advertisement" v-if="homeCardList.ad1.length>0">
 			<swiper class="swiper2" circular  :autoplay="true" :interval="interval"
-							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
+							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
 				<swiper-item v-for="(item,index) in homeCardList.ad1">
 					<view class="swiper-item2" @click="goRoter(item)">
 						<image class="swiper-item2Img" :src="item.icon" mode=""></image>
@@ -119,7 +119,7 @@
 		</view>
 		<view class="advertisement" v-if="homeCardList.ad2.length>0">
 			<swiper class="swiper2" circular  :autoplay="true" :interval="interval"
-							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
+							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
 				<swiper-item v-for="(item,index) in homeCardList.ad2">
 					<view class="swiper-item2" @click="goRoter(item)">
 						<image class="swiper-item2Img" :src="item.icon" mode=""></image>
@@ -129,7 +129,7 @@
 		</view>
 		<view class="advertisement" v-if="homeCardList.ad3.length>0">
 			<swiper class="swiper2" circular  :autoplay="true" :interval="interval"
-							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
+							:duration="duration" :indicator-dots="true" indicator-color="#CCCCCC" :indicator-active-color="'#'+themeColor">
 				<swiper-item v-for="(item,index) in homeCardList.ad3">
 					<view class="swiper-item2" @click="goRoter(item)">
 						<image class="swiper-item2Img" :src="item.icon" mode=""></image>
@@ -141,7 +141,7 @@
 		<view class="Hot">
 			<view class="hotTop">
 				<view class="hotLeft">
-					<view class="hotSx"></view>
+					<view class="hotSx" :style="{background:'#'+themeColor}"></view>
 					<view class="hottitle">热门活动</view>
 				</view>
 				<view class="hotRight" @click="moreJk">
@@ -169,7 +169,7 @@
 			<view class="Hot" v-if="homeCardList.openMGoods.showType==1">
 				<view class="hotTop">
 					<view class="hotLeft">
-						<view class="hotSx"></view>
+						<view class="hotSx" :style="{background:'#'+themeColor}"></view>
 						<view class="hottitle">热门车型</view>
 					</view>
 					<view class="hotRight" @click="goShop">
@@ -246,6 +246,8 @@
 				InsuranceExpireDate:'',
 				NextCareDate:'',
 				NextAuditDate:'',
+				themeColor:'',
+				getwxLoing:false,
 			}
 		},
 		onLoad() {
@@ -507,6 +509,9 @@
 				   unionId:this.unionId
 				  },'GET').then(res => {
 				 	this.wxOpenData=res.data;
+					this.themeColor=res.data.themeColor
+					//this.themeColor='FFFFFF'
+					this.getwxLoing=true;
 					uni.setNavigationBarTitle({
 					  title:this.wxOpenData.miniAppName
 					})
@@ -522,6 +527,14 @@
 						 
 						 }
 					}); 
+					uni.setStorage({
+						key: 'themeColor',
+						data: that.themeColor,
+						 success: function () {
+						    // that.uniLogin()
+						 
+						 }
+					}); 
 					if(this.wxOpenData.loginInfo){
 						this.$store.commit('mutationsuserInfo', that.wxOpenData.loginInfo.openUser)
 						this.userInfo=that.wxOpenData.loginInfo.openUser

+ 3 - 0
pages/integral/integralConfirm.vue

@@ -73,6 +73,9 @@
 								icon: 'none',
 								duration: 3000
 							});
+							uni.redirectTo({
+								url:'recordDetail?id='+res.data
+							})
 						}else{
 							uni.showToast({
 								title: res.msg,

+ 12 - 3
pages/shop/shop.vue

@@ -193,10 +193,19 @@
 			}
 		},
 		methods: {
+			onPageScroll(e){
+				//console.log(e)
+				//this.scrollTop=e.scrollTop
+			},
 			btnTop(){
-				this.$nextTick(function() {
-						this.scrollTop = 0
-				});
+				uni.pageScrollTo({
+				    scrollTop: 0, 
+				}); 
+				// console.log(this.scrollTop)
+				// this.$nextTick(function() {
+						
+				// 		this.scrollTop = 0
+				// });
 			},
 			onscroll(e){
 				//console.log(e)