guo %!s(int64=2) %!d(string=hai) anos
pai
achega
9ad8c7c196
Modificáronse 6 ficheiros con 277 adicións e 107 borrados
  1. 10 9
      common/request.js
  2. 9 10
      pages.json
  3. 0 67
      pages/index/index.vue
  4. 8 19
      pages/mobile/OemSearch.vue
  5. 4 2
      pages/mobile/group.vue
  6. 246 0
      pages/mobile/homePage.vue

+ 10 - 9
common/request.js

@@ -4,20 +4,21 @@ const burl2='http://api.dms.66km.com.cn/'
 import md5 from './MD5.js'
 var token=getHashQuery('token')
 console.log(token)
-
+var uid=getHashQuery('uid')
+console.log(uid)
 
 const http = (url = '', date = {}, type = 'POST', header = {
 }) => {
     return new Promise((resolve, reject) => {
 		header={};
-		// const logodata = uni.getStorageSync("logodata");
-		// if(logodata){
-		// 	header['token']=logodata.token;
-		// 	header['uid']=logodata.uid; 
-		// }else{
-		// 	header['token']='';
-		// 	header['uid']=''; 
-		// }
+		
+		if(token){
+			header['token']=token;
+			header['uid']=uid; 
+		}else{
+			header['token']='';
+			header['uid']=''; 
+		}
 		
 		//header['token']='98A9FED8814B457288166BDF623F33D1';
 		//header['uid']='795957B6-8F4B-4E7F-96FE-1F26E5BA21A1'; 

+ 9 - 10
pages.json

@@ -1,17 +1,15 @@
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/index/index",
-			"style": {
-				"navigationBarTitleText": "uni-app"
-			}
-		},
-		{
-			"path": "pages/pc/index",
-			"style": {
-				"navigationBarTitleText": "uni-app"
-			}
+		    "path" : "pages/mobile/homePage",
+		    "style" :                                                                                    
+		    {
+		        
+		       "navigationStyle": "custom"
+		    }
+		    
 		},
+		
 		{
 			"path": "pages/mobile/index",
 			"style": {
@@ -138,6 +136,7 @@
 				"enablePullDownRefresh": true
 			}
 		}
+        
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 0 - 67
pages/index/index.vue

@@ -1,67 +0,0 @@
-<template>
-	<view class="content">
-		<image class="logo" src="/static/logo.png"></image>
-		<view class="text-area">
-			<text class="title">{{title}}</text>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				title: 'Hello'
-			}
-		},
-		onLoad() {
-            if(navigator.userAgent.indexOf('UCBrowser') > -1) {
-            			uni.navigateTo({
-            				url:'../mobile/index'
-            			})
-            }
-            if (navigator.userAgent.indexOf('Mobile') === -1) {  
-              console.log("PC")
-            			uni.navigateTo({
-            				url:'../pc/index'
-            			})
-            }  else{
-            			  console.log("移动端")
-            			  uni.navigateTo({
-							url:'../mobile/index'
-            			  })
-            }
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style scoped>
-	.content {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.logo {
-		height: 200rpx;
-		width: 200rpx;
-		margin-top: 200rpx;
-		margin-left: auto;
-		margin-right: auto;
-		margin-bottom: 50rpx;
-	}
-
-	.text-area {
-		display: flex;
-		justify-content: center;
-	}
-
-	.title {
-		font-size: 36rpx;
-		color: #8f8f94;
-	}
-</style>

+ 8 - 19
pages/mobile/OemSearch.vue

@@ -51,15 +51,18 @@
 				itemData: {},
 				itemList: [],
 				brandList: [],
-				brand: '本田',
+				brand: '',
 				epc_id: '1014',
 				page: 1,
 				total_page: 1
 			}
 		},
-		onLoad() {
-			this.getBrandData();
-			this.getItemData();
+		onLoad(opt) {
+			console.log('opt+',opt);
+			this.brand = opt.brand;
+			this.epc_id = opt.epc_id;
+			
+			
 		},
 		methods: {
 			goCarModelList(partnum) {
@@ -76,21 +79,7 @@
 				this.page = 1;
 				this.getItemData();
 			},
-			getBrandData() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				this.$http('advancedEpc/getBrands', {
-
-				}, 'GET').then(res => {
-					uni.hideLoading();
-
-					this.brandList = res.data.result.list;
-					console.log(this.brandList);
-
-
-				});
-			},
+			
 			// 配件查询
 			getItemData() {
 				uni.showLoading({

+ 4 - 2
pages/mobile/group.vue

@@ -11,7 +11,7 @@
 		
 				</view>
 				<view class="zdyNavTitle">车型件</view>
-				<view class="zdyNavRight" @click="goOemSearch">OEM搜索</view>
+				<view class="zdyNavRight" @click="goOemSearch()">OEM搜索</view>
 				<!-- <view style="width: 10rpx;"></view> -->
 			</view>
 		</view>
@@ -73,6 +73,7 @@
 				groupShow:false,
 				param:'',
 				token:'',
+				epc_id:''
 			}
 		},
 		onLoad(opt) {
@@ -95,6 +96,7 @@
 					     this.brand_name=res.data.result.brand_name;
 					     this.access_time=res.data.result.access_time;
 						 this.caption=res.data.result.caption
+						 this.epc_id = res.data.result.epc_id;
 					     if(res.data.result.restrains.length>0){
 					       this.restrains=res.data.result.restrains;
 					       this.restrainShow=true;
@@ -162,7 +164,7 @@
 			},
 			goOemSearch(){
 				uni.navigateTo({
-					url:'OemSearch'
+					url:'OemSearch?brand='+ this.brand_name + '&epc_id=' + this.epc_id
 				})
 			},
 			goback(){

+ 246 - 0
pages/mobile/homePage.vue

@@ -0,0 +1,246 @@
+<template>
+	<view class="box">
+		<!-- 自定义导航 -->
+		<view class="zdyNavBox">
+			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+			<view class="zdyNav">
+				<view class="zdyNavLeft">
+					<image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback">
+					</image>
+
+				</view>
+				<view class="zdyNavTitle">车型件</view>
+				<!-- <view class="zdyNavRight"></view> -->
+				<!-- <view style="width: 10rpx;"></view> -->
+			</view>
+		</view>
+		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+		<view style="height: 44px;"></view>
+
+		<view class="top">{{title}}</view>
+
+
+		<view class="mainBox">
+			
+			
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import searchBox from '@/components/searchBox/searchBox.vue'
+	export default {
+		components: {
+			searchBox
+		},
+		data() {
+			return {
+				title: '大众 > 迈腾 > 2022 > 市场一',
+				iStatusBarHeight: '',
+				cangList: [1,2,3,4,5,6,7,8],
+				sonTitle: '发动机',
+				searchValue: '',
+			}
+		},
+		onLoad() {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
+
+		},
+		methods: {
+			search(val) {
+				// console.log(val);
+				this.searchValue = val
+			
+			},
+			gomodelThree() {
+				uni.navigateTo({
+					url: 'modelThree'
+				})
+			},
+			goOemSearch() {
+				uni.navigateTo({
+					url: 'OemSearch'
+				})
+			},
+			blueBack(){
+				uni.navigateBack({})
+			},
+			goback() {
+				console.log('返回');
+				uni.navigateBack({})
+			},
+		}
+	}
+</script>
+
+<style>
+	.box {
+		min-height: 100vh;
+		background: #ffffff;
+	}
+
+	.zdyNavBox {
+		width: 100vw;
+		background: #FFFFFF;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 9999999;
+
+
+	}
+
+	.zdyNav {
+		height: 44px;
+		display: flex;
+		justify-content: space-between;
+
+		align-items: center;
+
+	}
+
+	.backImg {
+		width: 44rpx;
+		height: 44rpx;
+		margin-left: 10rpx;
+		margin-right: 20rpx;
+	}
+
+	.homeImg {
+		width: 44rpx;
+		height: 44rpx;
+
+	}
+
+	.zdyNavLeft {
+		display: flex;
+		align-items: center;
+	}
+
+	.zdyNavTitle {
+
+		height: 44px;
+		background: #FFFFFF;
+		text-align: center;
+		font-size: 34rpx;
+		line-height: 44px;
+	}
+
+	.zdyNavRight {
+		height: 44px;
+		background: #FFFFFF;
+		text-align: center;
+		font-size: 28rpx;
+		line-height: 44px;
+		color: #3F90F7;
+		margin-right: 24rpx;
+	}
+
+	.top {
+		color: #FFFFFF;
+		font-size: 28rpx;
+		padding: 24rpx;
+
+		background: linear-gradient(110deg, #48B9F9 0%, #3F90F7 100%);
+	}
+
+	.mainBox {
+		background: #FFFFFF;
+	}
+
+	.maintitle {
+		font-size: 28rpx;
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 500;
+		color: #333333;
+		text-align: center;
+		line-height: 88rpx;
+		border-bottom: 1px solid #EEEEEE;
+		position: relative;
+	}
+
+	.blueBackImg {
+		width: 25rpx;
+		height: 24rpx;
+		margin-top: 4rpx;
+	}
+
+	.backBox {
+		display: flex;
+		position: absolute;
+		left: 23rpx;
+		top: 28rpx;
+	}
+
+	.backTxt {
+		color: #3F90F7;
+		font-weight: 400;
+		font-size: 24rpx;
+		line-height: 33rpx;
+	}
+
+	.mainLineJt {
+		width: 25rpx;
+		height: 24rpx;
+		margin-top: 8rpx;
+	}
+
+	.mainLine {
+		display: flex;
+
+		border-bottom: 1px solid #EEEEEE;
+		padding: 29rpx 24rpx;
+	}
+
+	.lineName {
+		font-size: 26rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 500;
+		color: #333333;
+		line-height: 40rpx;
+		width: 570rpx;
+		word-wrap: break-word;
+		/*强制换行*/
+		overflow: hidden;
+		/*超出隐藏*/
+		text-overflow: ellipsis;
+		/*隐藏后添加省略号*/
+		white-space: nowrap;
+		/*强制不换行*/
+	}
+
+	.lineIMg {
+		width: 110rpx;
+		height: 110rpx;
+	}
+
+	.lineRIght {
+		padding-left: 20rpx;
+	}
+
+	.lineBm {
+		font-size: 24rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #999999;
+		padding: 10rpx 0;
+	}
+
+	.linejs {
+		font-size: 24rpx;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #999999;
+		width: 570rpx;
+		word-wrap: break-word;
+		/*强制换行*/
+		overflow: hidden;
+		/*超出隐藏*/
+		text-overflow: ellipsis;
+		/*隐藏后添加省略号*/
+		white-space: nowrap;
+		/*强制不换行*/
+	}
+</style>