twt před 2 roky
rodič
revize
23557d6c4b
3 změnil soubory, kde provedl 57 přidání a 9 odebrání
  1. 1 1
      pages.json
  2. 33 3
      pages/index/index.vue
  3. 23 5
      pages/user/addCar/addCar.vue

+ 1 - 1
pages.json

@@ -5,7 +5,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "uni-app"
+				"navigationStyle": "custom"
 			}
 		},
 		{

+ 33 - 3
pages/index/index.vue

@@ -1,5 +1,11 @@
 <template>
 	<view class="content">
+		<view class="indexTop">
+			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+			<view class="indexnav">首页</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="shoptopbox2"  v-if="!carInfo">
@@ -95,7 +101,7 @@
 					<img src="../../static/timg/icon_arrow_right.png" alt="" class="hotMoreJt">
 				</view>
 			</view>
-			<view class="hotLine">
+			<view class="hotLine" @click="goRoter('paint')">
 				<view class="hotLineTop">
 					<image class="hotLineTopImg" src="http://phone.66km.cn:8088/thFiles/C678448A-C874-4B42-9EAE-4F8F21D71D27.jpg" mode=""></image>
 				    <view class="hotlineTimebox">
@@ -181,9 +187,11 @@
 				homeCardList:'',
 				authorizShow:false,
 				miniAppName:'',
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad() {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			var that=this;
 			 this.$common.getExtStoreId()
 			 var ext=this.$common.getExtStoreId();
@@ -212,7 +220,14 @@
 			
 		},
 		onShow() {
-			this.carInfo=this.$store.state.carInfo
+		    var indexaddcar = uni.getStorageSync("indexaddcar")
+			if(indexaddcar==1){
+				uni.removeStorageSync('indexaddcar');
+				this.getCarList();
+			}else{
+				this.carInfo=this.$store.state.carInfo
+			}
+			
 		},
 		methods: {
 			addCar(){
@@ -220,7 +235,7 @@
 					this.authorizShow=true;
 				}else{
 					uni.navigateTo({
-						url:'../user/addCar/addCar'
+						url:'../user/addCar/addCar?type=1'
 					})
 				}
 			},
@@ -372,6 +387,21 @@
 </script>
 
 <style scoped>
+	.indexTop{
+		background: #D53533;
+		width: 750rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 11;
+	}
+	.indexnav{
+		height: 44px;
+		line-height: 44px;
+		text-align: center;
+		font-size: 36rpx;
+		color: #FFFFFF;
+	}
 	.authorizBox{
 		width: 100vw;
 		height: 100vh;

+ 23 - 5
pages/user/addCar/addCar.vue

@@ -88,6 +88,7 @@
 					"value": "ids"
 				},
 				vin: '',
+				type:'',
 			}
 		},
 		onLoad(opt) {
@@ -96,6 +97,7 @@
 			this.getNowFormatDate();
 
 			console.log(opt);
+			this.type=opt.type
 			this.isEditCar = opt.isEditCar
 			this.carId = opt.id
 			if (this.isEditCar == 'true') {
@@ -309,11 +311,27 @@
 							duration: 3000
 						});
 						uni.removeStorageSync('carModelInfo');
-						setTimeout(function() {
-							uni.navigateBack({
-
-							})
-						}, 3000);
+						if(this.type==1){
+							uni.setStorage({
+								key: 'indexaddcar',
+								data: '1',
+								 success: function () {
+								    setTimeout(function() {
+								    	uni.navigateBack({
+								    
+								    	})
+								    }, 3000);
+								 
+								 }
+							}); 
+						}else{
+							setTimeout(function() {
+								uni.navigateBack({
+							
+								})
+							}, 3000);
+						}
+						
 
 					} else {
 						uni.showToast({