瀏覽代碼

bug修改

twt 3 年之前
父節點
當前提交
263af08907
共有 4 個文件被更改,包括 38 次插入8 次删除
  1. 4 4
      common/request.js
  2. 1 1
      components/pcNav/pcNav.vue
  3. 16 3
      pages/pc/indexNew.vue
  4. 17 0
      pages/pc/newDetail.vue

+ 4 - 4
common/request.js

@@ -2,11 +2,11 @@
 /* const baseURL = 'http://api.dms.66km.com.cn/' 
  const burl2='http://api.dms.66km.com.cn/' */
 //66正式
-/* const baseURL = 'https://api.dms.66km.com/' 
- const burl2='https://api.dms.66km.com/' */
+ const baseURL = 'https://api.dms.66km.com/' 
+ const burl2='https://api.dms.66km.com/' 
 //欧洲维修
- const baseURL = 'http://edms.eurorepar.cn/' 
- const burl2='http://edms.eurorepar.cn/ ' 
+/* const baseURL = 'http://edms.eurorepar.cn/' 
+ const burl2='http://edms.eurorepar.cn/ ' */
 // import md5 from './MD5.js'
 
 

+ 1 - 1
components/pcNav/pcNav.vue

@@ -3,7 +3,7 @@
 		<view class="nav">
 			<view class="navCont">
 				<view class="logo">
-					<image :src="info.logo" mode="" class="logoImg euroreparIMg"></image><!-- euroreparIMg -->
+					<image :src="info.logo" mode="" class="logoImg "></image><!-- euroreparIMg -->
 				</view>
 				<view class="navTitle">{{info.title}}</view>
 				<view class="indexNav" :class="{'indexActive':data=='index'}" @click="goIndex">首页</view>

+ 16 - 3
pages/pc/indexNew.vue

@@ -139,7 +139,7 @@
 			<image src="../../static/pcimg/btn_top@2x.png" mode="" class="gotopImg"></image>
 		</view>
 		<view>
-			<newDetail v-show="newDetailShow" :newid='newDetailID' :data="newDetailItem" @getIndexList="getIndexList"></newDetail>
+			<newDetail ref="newDetailV" v-show="newDetailShow" :newid='newDetailID' :data="newDetailItem" @getIndexList="getIndexList"></newDetail>
 			<newgroupingList @getIndexList="getIndexList"
 			 @getChildList="getChildList" @goDetail="goDetail"
 			 v-show="newgroupingListShow" :newcode="newgroupingcode" :data="newgroupingdata"></newgroupingList>
@@ -189,8 +189,19 @@
 				newgroupingdata:'',
 			}
 		},
-		onLoad() {
-          
+		onLoad(opt) {
+           if(opt.id){
+			   this.newDetailID=opt.id;
+			   var item={
+				   categoryName:opt.topName,
+				   comment:opt.comment,
+				   parentCode:'',
+				   twoName:'',
+				   id:opt.id
+			   }
+			   console.log(item)
+			   this.goDetail(item)
+		   }
 		   this.getindexData()
 		},
 		created(){
@@ -251,6 +262,8 @@
 				this.newsearchShow=false;
 				this.newDetailID=item.id;
 				this.newDetailItem=item;
+				//this.$refs.newDetailV.test()
+				//this.$refs.newDetailV.newidfn()
 				/* uni.navigateTo({
 					url:'detail?id='+item.id+'&topName='+item.categoryName+"&comment="+item.comment+'&parentCode='+item.code
 				}) */

+ 17 - 0
pages/pc/newDetail.vue

@@ -76,7 +76,24 @@
 			// 	title: this.topName
 			// })
 		},
+		created() {
+			this.newidfn()
+		},
 		methods: {
+			newidfn(){
+				this.id = this.data.id
+				this.topName=this.data.categoryName;
+				this.twoName=this.data.twoName;
+				this.comment=this.data.comment;
+				this.parentCode=this.data.code
+				this.getDetailData() 
+				uni.pageScrollTo({
+				   scrollTop: 0, duration: 100 
+				}); 
+			},
+			test(){
+				console.log(55)
+			},
 			gofile(url){
 				window.location.href=url
 			},