zhengkaixin 2 年之前
父节点
当前提交
ab0bcb5014
共有 9 个文件被更改,包括 53 次插入67 次删除
  1. 0 34
      apis/index.js
  2. 3 1
      apis/utils/init.js
  3. 1 1
      apis/utils/mixin.js
  4. 1 1
      apis/utils/request.js
  5. 6 5
      components/Tabbar.vue
  6. 1 1
      pages/index/index.vue
  7. 37 18
      pages/mine/issue.vue
  8. 2 4
      pages/mine/mine.vue
  9. 2 2
      pages/staffHome/filesonic.vue

+ 0 - 34
apis/index.js

@@ -4,41 +4,7 @@ import Qs from 'qs';
  import  carhelp from '@/apis/utils/mixin.js'
  import  carhelp from '@/apis/utils/mixin.js'
  
  
 export function codeOperation(url) {
 export function codeOperation(url) {
-	//http://localhost:8080/#/?jpcode=jp_team51_charge_id:A_111
-	var res=url
 	
 	
-	
-	if(url&&url.indexOf("#/?jpcode=")>-1){
-		res=url.split("#/?jpcode=")[1]
-	}
-	if(url&&url.indexOf("#/?gunId=")>-1){
-		var gunId=url.split("#/?gunId=")[1]
-		res="jp_team51_charge_id:A_"+gunId
-	}
-	
-	
-	if(res&&res.length>22){
-		
-	}else if(res == 'toLogin') {
-		return	'/pages/login/login'
-	}else{
-		return false
-	}
-	var str1 = res.slice(0,19);
-	var str2 = res.slice(20,21);
-	var id = res.slice(22);
-	
-	if(str1 == 'jp_team51_charge_id') {
-		if(str2 == 'A') {
-			//carhelp.setGunId(id)
-			return	 '/pages/searchPile/stationAndPile/chargingPileDetails?id=' + id	
-		}
-		if(str2 == 'B') {
-			return	'/pages/user/finance/rechargeRes?id=' + id
-		}
-	} else {
-		return false;
-	}
 }
 }
 export function scanCode(res) {
 export function scanCode(res) {
 	var url=codeOperation(res);
 	var url=codeOperation(res);

+ 3 - 1
apis/utils/init.js

@@ -67,7 +67,9 @@ var app = {
 		 		
 		 		
 		 		carhelp.setToken(token);
 		 		carhelp.setToken(token);
 		 	 
 		 	 
-		 	} 
+		 	}else{
+				carhelp.logoff();
+			}
 		 }).catch(error => {
 		 }).catch(error => {
 		 	
 		 	
 		 	
 		 	

+ 1 - 1
apis/utils/mixin.js

@@ -79,7 +79,7 @@ var app = {
 		uni.removeStorageSync(prefix + 'token')
 		uni.removeStorageSync(prefix + 'token')
 		uni.removeStorageSync(prefix  + 'personInfo');
 		uni.removeStorageSync(prefix  + 'personInfo');
 		uni.removeStorageSync(prefix + 'personInfoPlus');
 		uni.removeStorageSync(prefix + 'personInfoPlus');
-		uni.removeStorageSync(prefix + 'getElderModeClass');
+	//	uni.removeStorageSync(prefix + 'getElderModeClass');
 		//uni.removeStorageSync(prefix+'wx_openId');
 		//uni.removeStorageSync(prefix+'wx_openId');
 		
 		
 	},
 	},

+ 1 - 1
apis/utils/request.js

@@ -66,7 +66,7 @@ const request = (options) => {
 			
 			
 				console.log("没有免登陆 ----------------"+options.url)
 				console.log("没有免登陆 ----------------"+options.url)
 				//var url="/pages/login/index?message=请登录&back="+ url+"&phone="+options.data.phone
 				//var url="/pages/login/index?message=请登录&back="+ url+"&phone="+options.data.phone
-				var thisurl='/pages/login/login';
+				var thisurl='/pages/login/index';
 				
 				
 				if(options&&options.data&&options.data.jpcode){
 				if(options&&options.data&&options.data.jpcode){
 					thisurl+="?jpcode="+options.data.jpcode
 					thisurl+="?jpcode="+options.data.jpcode

+ 6 - 5
components/Tabbar.vue

@@ -52,7 +52,7 @@
 			},
 			},
 			beforeSwitch(index){
 			beforeSwitch(index){
 			
 			
-				
+				var bl=false
 				if(index==this.current){
 				if(index==this.current){
 					return false
 					return false
 				}
 				}
@@ -64,7 +64,7 @@
 						
 						
 					}else{
 					}else{
 						url="/pages/login/index"
 						url="/pages/login/index"
-							
+						bl=true	
 					}
 					}
 					
 					
 				}
 				}
@@ -72,8 +72,8 @@
 					url: url
 					url: url
 				})
 				})
 				
 				
-				if(index==1){
-					this.myCurrent=this.oldindex;
+				if(bl){
+					this.myCurrent=0;
 					return false;
 					return false;
 				}else{
 				}else{
 					return true;
 					return true;
@@ -81,7 +81,8 @@
 				
 				
 			},
 			},
 			
 			
-		},mounted(){
+		},
+		mounted(){
 			
 			
 		},destroyed(){
 		},destroyed(){
 			
 			

+ 1 - 1
pages/index/index.vue

@@ -57,7 +57,7 @@
 					date:new Date().getTime()
 					date:new Date().getTime()
 				})
 				})
 				uni.redirectTo({
 				uni.redirectTo({
-					url:'/pages/login/login'
+					url:'/pages/login/index'
 				})
 				})
 					//this.onReadyIng()
 					//this.onReadyIng()
 			}else  if(op.gunId){
 			}else  if(op.gunId){

+ 37 - 18
pages/mine/issue.vue

@@ -58,6 +58,7 @@
 				header:{
 				header:{
 					
 					
 				},
 				},
+				nic:0,
 				listForm:{
 				listForm:{
 					pageIndex:1,
 					pageIndex:1,
 					pageSize:50,
 					pageSize:50,
@@ -92,6 +93,9 @@
 				this.itemshare.id=op.id;
 				this.itemshare.id=op.id;
 				this.itemshare.index=-1;
 				this.itemshare.index=-1;
 			}
 			}
+			if(op.nic){
+				this.nic=op.nic;
+			}
 			this.getShareList()
 			this.getShareList()
 		},
 		},
 		methods:{
 		methods:{
@@ -167,25 +171,40 @@
 				API_share.addShare(this.subForm).then((res) => {
 				API_share.addShare(this.subForm).then((res) => {
 					
 					
 					uni.hideLoading();
 					uni.hideLoading();
-					uni.showModal({
-					
-						 title:"提示",
-						content:"操作成功",
-						confirmText:"前往分享空间",
-						cancelText:"返回",
-						success: res1 => {
-							this.carhelp.set("addShare",1);
-							if (res1.confirm) {
-								uni.redirectTo({
-									url:"/pages/staffHome/filesonic"
-								})
-							}else{
-								this.$refs.refNavbar.goBack()
-							}
+					if(this.nic){
+						uni.showModal({
+							showCancel:false,
+							 title:"提示",
+							content:"操作成功",
 							
 							
-							
-							
-						}})
+							cancelText:"确定",
+							success: res1 => {
+								this.carhelp.set("addShare",1);
+								this.$refs.refNavbar.goBack()
+								
+							}})
+					}else{
+						uni.showModal({
+						
+							 title:"提示",
+							content:"操作成功",
+							confirmText:"前往分享空间",
+							cancelText:"返回",
+							success: res1 => {
+								this.carhelp.set("addShare",1);
+								if (res1.confirm) {
+									uni.redirectTo({
+										url:"/pages/staffHome/filesonic"
+									})
+								}else{
+									this.$refs.refNavbar.goBack()
+								}
+								
+								
+								
+							}})
+					}
+					
 					
 					
 				}).catch(error => {
 				}).catch(error => {
 					uni.showToast({
 					uni.showToast({

+ 2 - 4
pages/mine/mine.vue

@@ -242,10 +242,8 @@
 				};
 				};
 				 
 				 
 				API.logout(data).then((res) => {
 				API.logout(data).then((res) => {
-					this.carhelp.setToken("",);
-					this.carhelp.set("token_tdate","")
-					this.carhelp.setPersonInfo("");
-					this.carhelp.setPersonInfoPlus(""  )
+					this.carhelp.logoff();
+				
 					
 					
 					uni.reLaunch({
 					uni.reLaunch({
 						url:"/"
 						url:"/"

+ 2 - 2
pages/staffHome/filesonic.vue

@@ -29,7 +29,7 @@
 					{{item.synopsis}}
 					{{item.synopsis}}
 				</view>
 				</view>
 				<view class="pictures" >
 				<view class="pictures" >
-					<template v-for="(pic,i2) in item.listShareFiles" >
+					<template v-for="(pic,i2) in item.listShareFiles"  v-if="pic.url">
 						<img   v-if="pic.isPic" :key="i2"
 						<img   v-if="pic.isPic" :key="i2"
 						@click="previewImage(item.listShareFiles,i2)"
 						@click="previewImage(item.listShareFiles,i2)"
 						:src="pic.url" alt="">
 						:src="pic.url" alt="">
@@ -55,7 +55,7 @@
 		</view>
 		</view>
 		<u-divider  :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
 		<u-divider  :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
 		
 		
-		 <view class="bottom"  @click="gotoUrl('pages/mine/issue')" >
+		 <view class="bottom"  @click="gotoUrl('pages/mine/issue?nic=1')" >
 		 	<img src="../../assets/img/riFill-camera-fill@2x.png">
 		 	<img src="../../assets/img/riFill-camera-fill@2x.png">
 		 </view>
 		 </view>
 	</view>
 	</view>