twt 3 months ago
parent
commit
35892860b3

+ 16 - 16
common/request.js

@@ -1,24 +1,24 @@
  //测试地址
- const baseURL = 'http://api.dms.66km.com.cn/' 
- const burl2='http://api.dms.66km.com.cn/' 
-/* const baseURL = 'http://192.168.0.132:20189/'
- const burl2='http://192.168.0.132:20189/' */
+/* const baseURL = 'http://dms.66km.com.cn/' 
+ const burl2='http://dms.66km.com.cn/' */
+ /* const baseURL = 'http://192.168.1.26:20187/'
+ const burl2='http://192.168.1.26:20187/' */
 //66正式
-/* const baseURL = 'https://apidms.66km.com/' 
- const burl2='https://apidms.66km.com/' */
+ const baseURL = 'https://apidms.66km.com/' 
+ const burl2='https://apidms.66km.com/' 
 //欧洲维修
-/* const baseURL = 'https://edms.eurorepar.cn/' 
- const burl2='https://edms.eurorepar.cn/ ' */
+ /* const baseURL = 'https://edms.eurorepar.cn/' 
+ const burl2='https://edms.eurorepar.cn/' */
  //京猫虎
   /* const baseURL = 'http://apidms.jcatt.cn/'
-  const burl2='http://apidms.jcatt.cn/' */
+  const burl2='http://apidms.jcatt.cn/' */ 
  //安徒生
 /* const baseURL = 'http://dms-api.lhrhy.cn/'
  const burl2='http://dms-api.lhrhy.cn/' */
 /* const baseURL = 'http://store-api.qdbtl.cn/'
  const burl2='http://store-api.qdbtl.cn/' */
-/* const baseURL = 'https://store-api.qdbtl.cn/'
- const burl2='https://store-api.qdbtl.cn/' */
+ /* const baseURL = 'https://store-api.qdbtl.cn/'
+ const burl2='https://store-api.qdbtl.cn/' */ 
 /* const baseURL = '//store-api.qdbtl.cn/'
  const burl2='//store-api.qdbtl.cn/' */
 // import md5 from './MD5.js'
@@ -28,14 +28,14 @@
  const burl2='http://dms.shoupeiyun.com/' */
  //驰湃
 /* const baseURL = 'http://chipaiapidms.betterchain.com.cn/'
- const burl2='http://chipaiapidms.betterchain.com.cn/' */
+ const burl2='http://chipaiapidms.betterchain.com.cn/' */ 
  //宝顺
-/*  const baseURL = 'http://dmsapi.baoshuncar.com/'
- const burl2='http://dmsapi.baoshuncar.com/' */
- 
+/* const baseURL = 'http://dmsapi.baoshuncar.com/'
+ const burl2='http://dmsapi.baoshuncar.com/' 
+ */
  
  // 欧洲维修申请
- const europeUrl='http://api.dms.66km.com.cn/' 
+ const europeUrl='https://edms.eurorepar.cn/' 
  
 const fetchPost = (url = '', params = {}, header = {
 }) => {

+ 17 - 0
components/pcNav/pcNav.vue

@@ -24,6 +24,9 @@
 				<view class="navSs" @click="gosearchlist">
 					<image src="../../static/pcimg/icon_search@2x.png" mode="widthFix" class="navSsimg"></image>
 				</view>
+				<view>
+					<image src="../../static/pcimg/tc.png" @click="exitFn" mode="" class="exitIcon"></image>
+				</view>
 			</view>
 		</view>
 
@@ -55,6 +58,12 @@
 				}) */
 				this.$emit("gosearchlist",1);
 			},
+			exitFn(){
+				  uni.removeStorageSync('helpToken');
+				  uni.navigateTo({
+				  	url:'/pages/login/login'
+				  })
+			},
 			goItem(item){
 				/* var pages = getCurrentPages() ;
 				var  currentRoute  = pages[pages.length-1].route;
@@ -201,6 +210,14 @@
 		width: 20px;
 		height: 20px;
 	}
+	.exitIcon{
+		width: 20px;
+		height: 20px;
+		position: absolute;
+		top: 23px;
+		right: -50px;
+		cursor: pointer;
+	}
 	.navSs{
 		position: absolute;
 		cursor: pointer;

+ 7 - 1
pages.json

@@ -252,11 +252,17 @@
 				// "navigationBarTitleText": "欧洲维修DMS系统体验申请" 
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/login/login",
+			"style": {
+				"navigationStyle": "custom"
+			}
 		}
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "门店学院",
+		"navigationBarTitleText": "",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#FFFFFF"
 	}

+ 12 - 4
pages/index/europeShop.vue

@@ -22,7 +22,7 @@
 					</view>
 					<view class="lineInputBox">
 						<image src="../../static/img/name.png" mode="" class="lineImg"></image>
-						<input v-model="contactor" type="text" class="lineInput" placeholder="请填写联系人姓名"/>
+						<input v-model="contactor" type="text" class="lineInput" placeholder="请填写姓名"/>
 					</view>
 				</view>
 				<view class="line">
@@ -32,7 +32,7 @@
 					</view>
 					<view class="lineInputBox">
 						<image src="../../static/img/call.png" mode="" class="lineImg"></image>
-						<input v-model="contactorPhone" type="number" maxlength="11" class="lineInput" placeholder="请填写联系人电话"/>
+						<input v-model="contactorPhone" type="number" maxlength="11" class="lineInput" placeholder="请填写手机号"/>
 					</view>
 				</view>
 				<view class="line" @click="open">
@@ -51,7 +51,7 @@
 					</view>
 					<view class="lineInputBox">
 						<image src="../../static/img/adress.png" mode="" class="lineImg"></image>
-						<input v-model="address" type="text" class="lineInput" placeholder="请填写详情地址"/>
+						<input v-model="address" type="text" class="lineInput" placeholder="请填写地址"/>
 					</view>
 				</view>
 				<view class="BtnBox">
@@ -147,7 +147,15 @@
 				}
 				if(!this.contactorPhone){
 					uni.showToast({
-						title:'电话必填',
+						title:'手机号必填',
+						icon: 'none',
+						duration: 3000
+					}); 
+					return false
+				}
+				if(this.contactorPhone.length!=11){
+					uni.showToast({
+						title:'请输入正确的手机号',
 						icon: 'none',
 						duration: 3000
 					}); 

+ 6 - 1
pages/mobile/detail.vue

@@ -116,7 +116,12 @@
 				this.$http(url, params, 'GET').then(res => {
 					uni.hideLoading();
 					var data = res.data
-
+                    if(data.linkType==1){
+						 uni.navigateBack({
+						
+						}) 
+						 window.location.href =data.linkUrl
+					}
 
 					// 处理 undefined和null转为空白字符串
 

+ 9 - 3
pages/mobile/index.vue

@@ -157,9 +157,15 @@
 				this.showSift = false
 			},
 			goDetail(item) {
-				uni.navigateTo({
-					url: 'detail?id=' + item.id
-				})
+				if(item.linkType==1){
+					
+					 window.location.href =item.linkUrl
+				}else{
+					uni.navigateTo({
+						url: 'detail?id=' + item.id
+					})
+				}
+				
 			},
 			goTuijianTab(item) {
 

+ 6 - 0
pages/mobile/search.vue

@@ -80,9 +80,15 @@
 				});
 			},
 			goDetail(item) {
+				if(item.linkType==1){
+					
+					 window.location.href =item.linkUrl
+				}else{
 				uni.navigateTo({
 					url: 'detail?id=' + item.ID
 				})
+				}
+				
 			},
 			back() {
 				uni.navigateBack({

+ 10 - 2
pages/mobile/topTab.vue

@@ -123,9 +123,17 @@
 					})
 				}
 				if (item.Type == 2) {
-					uni.navigateTo({
+					if(item.linkType==1){
+						
+						 window.location.href =item.linkUrl
+					}else{
+						uni.navigateTo({
+							url: 'detail?id=' + item.ID
+						})
+					}
+					/* uni.navigateTo({
 						url: 'detail?id=' + item.ID
-					})
+					}) */
 				}
 			},
 			getItemData() {

+ 64 - 2
pages/pc/indexNew.vue

@@ -159,7 +159,7 @@
 				
 			</view>
 			<view class="pageView" v-show="TotalSize">
-				<page-pagination :pageSize="pageSize" :size="'small'" :total="TotalSize" :numAround="true" @change="pageChange"></page-pagination>
+				<page-pagination :pageSize="pageSize" :currentPage="page" :size="'small'" :total="TotalSize" :numAround="true" @change="pageChange"></page-pagination>
 			</view>
 			
 		</view>
@@ -219,6 +219,9 @@
 			}
 		},
 		onLoad(opt) {
+			uni.setNavigationBarTitle({
+			    title: '门店学院' // 设定新标题
+			  });
            if(opt.id){
 			   this.newDetailID=opt.id;
 			   var item={
@@ -231,12 +234,50 @@
 			   console.log(item)
 			   this.goDetail(item)
 		   }
+		   var helpToken=opt.helpToken
+		   if(helpToken){
+			   //登录 除了安徒生没有 其他的都有
+		   }else{
+			 
+			   var that=this
+			   uni.getStorage({
+			           key: "helpToken",
+			           success: function(res) {
+			               const currentTime = Date.now();
+			               const expiration = res.data.expiration;
+			               if (currentTime < expiration) {
+			                   // 数据未过期,使用数据
+			                  // console.log('数据有效,值为:', res.data.value);
+							  var helpToken=res.data.value
+							  if(helpToken){
+							  				   
+							  }else{
+							  	that.login()
+							  }
+			               } else {
+							   that.login()
+			                   uni.removeStorageSync('helpToken');
+			               }
+			           },
+			           fail: function() {
+			               console.log('获取数据失败');
+						   that.login()
+			           }
+			       });
+		   }
+		   
+		  
 		   this.getindexData()
 		},
 		created(){
 			//this.getindexData()
 		},
 		methods: {
+			login(){
+				 uni.navigateTo({
+					url:'../login/login?index=1'
+				}) 
+			},
 			getIndexList(){
 				this.indexShow=true;
 				this.listShow=false;
@@ -263,6 +304,7 @@
 					this.comment=item.comment;
 					this.topCode=item.code;
 					this.parentCode=item.code;
+					this.page=1;
 					//this.parentCode='';
 					this.getcategoryPageData();
 					uni.setNavigationBarTitle({
@@ -286,6 +328,10 @@
 				}) */
 			},
 			goDetail(item){
+				if(item.linkType==1){
+					window.open(item.linkUrl, '_blank');
+					return false
+				}
 				console.log(item)
 				this.indexShow=false;
 				this.listShow=false;
@@ -324,6 +370,10 @@
 					this.newsearchShow=false;
 					this.newgroupingdata=newgroupingdata
 				}else{
+					if(wz.linkType==1){
+						window.open(wz.linkUrl, '_blank');
+						return false
+					}
 					this.indexShow=false;
 					this.listShow=false;
 					this.newDetailShow=true;
@@ -344,6 +394,7 @@
 				}) */
 			},
 			goDetail3(wz){
+			
 				// 1分类2文章
 				if (wz.Type == 1) {
 					/* uni.navigateTo({
@@ -365,7 +416,12 @@
 					this.newsearchShow=false;
 					this.newgroupingdata=newgroupingdata
 				}else{
-					//console.log(wz)
+					
+					if(wz.linkType==1){
+						window.open(wz.linkUrl, '_blank');
+						return false
+					}
+					
 					this.indexShow=false;
 					this.listShow=false;
 					this.newDetailShow=true;
@@ -386,6 +442,7 @@
 				//console.log(wz)
 			},
 			goDetail4(item){
+				
 				this.newgroupingcode=item.Code;
 				var newgroupingdata={
 					parentCode:item.parentCode,
@@ -404,6 +461,10 @@
 			},
 			goDetailswp(item){
 				//console.log(itme)
+				if(item.linkType==1){
+					window.open(item.linkUrl, '_blank');
+					return false
+				}
 				this.indexShow=false;
 				this.listShow=false;
 				this.newDetailShow=true;
@@ -469,6 +530,7 @@
 					this.tabIndex=index;
 					console.log(item)
 					this.parentCode=item.code;
+					this.page=1;
 					this.getcategoryPageData()
 				},
 				pageChange(e){

+ 3 - 0
pages/pc/newDetail.vue

@@ -126,6 +126,9 @@
 				this.$http(url, params, 'GET').then(res => {
 					uni.hideLoading();
 					var data = res.data
+					if(data.linkType==1){
+						window.location.href=data.linkUrl
+					}
 					// 处理 undefined和null转为空白字符串
 					for (const key in data) {
 						data[key] = this.$praseStrEmpty(data[key])

+ 9 - 1
pages/pc/newsearchlist.vue

@@ -111,8 +111,16 @@
 				}else{
 					var item={
 						id:wz.ID,
-						topName:'',twoName:''
+						topName:'',twoName:'',
+						linkType:'',
+						linkUrl:'',
 					}
+					console.log(wz)
+					if(wz.LinkType==1){
+					  item.linkType=wz.LinkType
+					  item.linkUrl=wz.LinkUrl
+					}
+					console.log(item)
 					this.$emit("goDetail",item)
 					/* uni.navigateTo({
 						url:'detail?id='+wz.ID+'&topName=&twoName='

+ 41 - 1
pages/pcLh/indexNew.vue

@@ -159,7 +159,7 @@
 				
 			</view>
 			<view class="pageView" v-show="TotalSize">
-				<page-pagination :pageSize="pageSize" :size="'small'" :total="TotalSize" :numAround="true" @change="pageChange"></page-pagination>
+				<page-pagination :pageSize="pageSize" :currentPage="page" :size="'small'" :total="TotalSize" :numAround="true" @change="pageChange"></page-pagination>
 			</view>
 			
 		</view>
@@ -219,6 +219,9 @@
 			}
 		},
 		onLoad(opt) {
+			uni.setNavigationBarTitle({
+			    title: '门店学院' // 设定新标题
+			});
            if(opt.id){
 			   this.newDetailID=opt.id;
 			   var item={
@@ -232,11 +235,46 @@
 			   this.goDetail(item)
 		   }
 		   this.getindexData()
+		/*   var helpToken=opt.helpToken
+		   if(helpToken){
+		   			   
+		   }else{
+			  var that=this
+			  uni.getStorage({
+			          key: "helpToken",
+			          success: function(res) {
+			              const currentTime = Date.now();
+			              const expiration = res.data.expiration;
+			              if (currentTime < expiration) {
+			                  // 数据未过期,使用数据
+			                 // console.log('数据有效,值为:', res.data.value);
+							  var helpToken=res.data.value
+							  if(helpToken){
+											   
+							  }else{
+								that.login()
+							  }
+			              } else {
+			  				  that.login()
+			                  uni.removeStorageSync('helpToken');
+			              }
+			          },
+			          fail: function() {
+			              console.log('获取数据失败');
+			  						   that.login()
+			          }
+			      });
+		   } */
 		},
 		created(){
 			//this.getindexData()
 		},
 		methods: {
+			login(){
+				uni.navigateTo({
+					url:'../login/login?index=2'
+				})
+			},
 			getIndexList(){
 				this.indexShow=true;
 				this.listShow=false;
@@ -263,6 +301,7 @@
 					this.comment=item.comment;
 					this.topCode=item.code;
 					this.parentCode=item.code;
+					this.page=1;
 					//this.parentCode='';
 					this.getcategoryPageData();
 					uni.setNavigationBarTitle({
@@ -468,6 +507,7 @@
 				tabBtn(index,item){
 					this.tabIndex=index;
 					console.log(item)
+					this.page=1;
 					this.parentCode=item.code;
 					this.getcategoryPageData()
 				},