wkyy 3 anni fa
parent
commit
88dfc51414
4 ha cambiato i file con 52 aggiunte e 13 eliminazioni
  1. 7 0
      apis/login.js
  2. 9 1
      pages/friend/index.vue
  3. 8 1
      pages/praise/index.vue
  4. 28 11
      pages/user/index.vue

+ 7 - 0
apis/login.js

@@ -118,3 +118,10 @@ export function orgList(data) {
 		url: '/mobile/regUser/orgList'
 	})
 } 
+
+export function signout(id) {
+	return request({
+		method: 'get',
+		url: '/mobile/regUser/signout?id=' + id
+	})
+}

+ 9 - 1
pages/friend/index.vue

@@ -422,6 +422,10 @@
 					this.xlList = res.data.xlList;
 					this.hyqkList = res.data.hyqkList;
 					this.znqkList = res.data.znqkList;
+					
+					this.xlList.splice(0,0,{id: '1',name:'不限',value:''});
+					this.hyqkList.splice(0,0,{id: '1',name:'不限',value:''});
+					this.znqkList.splice(0,0,{id: '1',name:'不限',value:''});
 					uni.hideLoading();
 				}).catch(error => {
 					uni.showToast({
@@ -439,7 +443,11 @@
 </style>
 <style lang="scss" scoped>
 	.screenCon-btn{
-		padding: 15px;
+		padding: 15px;
+		position: sticky;
+		bottom: 0;
+		background-color: white;
+		box-shadow: 0px -4px 2px #FAFAFA;
 	}
 	.screenCon-slider{
 		height: 24px;

+ 8 - 1
pages/praise/index.vue

@@ -58,7 +58,14 @@
 			}
 		},
 		onShow() {
-			this.getHomePage(true);
+			if(this.carhelp.getPersonInfo().id != null) {
+				this.getHomePage(true);
+			} else {
+				uni.showToast({
+					title: "请用户先登录再浏览本页面",
+					icon: "none"
+				})
+			}
 		},		
 		methods: {
 			toIPraise() {

+ 28 - 11
pages/user/index.vue

@@ -106,6 +106,8 @@
 </template>
 
 <script>
+	import * as loginApi from '@/apis/login.js'
+	
 	let _self;
 	export default {
 		data() {
@@ -153,18 +155,33 @@
 				})
 			},
 			logout(){
-				if(!_self.logined)
-					return;
-				var openId=this.carhelp.getOpenId()
-				console.log('openId1'+openId)
-				this.carhelp.logoff()
-				openId=this.carhelp.getOpenId()
-				console.log('openId2'+openId)
-				_self.logined = false;
-				_self.personalInfo = {};
+				// if(!_self.logined)
+				// 	return;
+				// var openId=this.carhelp.getOpenId()
+				// console.log('openId1'+openId)
+				// this.carhelp.logoff()
+				// openId=this.carhelp.getOpenId()
+				// console.log('openId2'+openId)
+				// _self.logined = false;
+				// _self.personalInfo = {};
 				
-				uni.navigateTo({
-					url:'../../pagesA/pages/login/index'
+				if(this.carhelp.getPersonInfo().id != null) {
+					var id = this.carhelp.getPersonInfo().id
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				loginApi.signout(id).then((res) => {
+					this.carhelp.logoff();
+					uni.navigateTo({
+						url:'../../pagesA/pages/login/index'
+					})
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
 				})
 			},
 			viewPersonalInfo(){