lsw 10 maanden geleden
bovenliggende
commit
23656189e8

+ 1 - 1
app/App.vue

@@ -30,7 +30,7 @@ button::after {
 /**挂载iconfont字体图标*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4507607_ch9z9m4p6f.ttf?t=1718331025322') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4507607_i7dnujjm0kj.ttf?t=1718351208557') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 8 - 2
app/common/common.scss

@@ -82,6 +82,7 @@
 		border-radius: 5px;
 		margin-top: 12px;
 		position: relative;
+		background-color: white;
 		.input {
 			border: 0px;
 			width: 75%;
@@ -91,6 +92,7 @@
 			position: absolute;
 			right: 10px;
 			top: 9px;
+			color: $main-color;
 		}
 	}
 	.avatar {
@@ -134,7 +136,7 @@
 		text-align: left;
 	}
 	.hor {
-		flex:0.7;
+		flex: 0.7;
 		text-align: center;
 		padding-top: 5px;
 	}
@@ -176,6 +178,10 @@
 					padding-top: 5px;
 				}
 			}
+			.share {
+				background-color: white;
+				line-height: 19px;
+			}
 		}
 	}
 }
@@ -310,7 +316,7 @@
 	}
 	.btn {
 		width: 80%;
-		.icon{
+		.icon {
 			padding-right: 5px;
 		}
 	}

+ 3 - 3
app/manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "国医瑾明",
+    "name" : "爱就业咨询服务平台",
     "appid" : "__UNI__6E1FB4F",
     "description" : "",
-    "versionName" : "1.0.3",
-    "versionCode" : 103,
+    "versionName" : "1.0.0",
+    "versionCode" : 100,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 7 - 0
app/pages.json

@@ -210,6 +210,13 @@
 			{
 				"navigationBarTitleText" : "查看简历"
 			}
+		},
+		{
+			"path" : "pages/other/setting",
+			"style" : 
+			{
+				"navigationBarTitleText" : "设置"
+			}
 		}
 	],
 	"tabBar": {

+ 34 - 0
app/pages/other/setting.vue

@@ -0,0 +1,34 @@
+<template>
+	<view class="main pt0">
+		<button class="btn" @click="exit()">退出登陆</button>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	methods: {
+		exit() {
+			uni.showModal({
+				title: '提示',
+				content: '确定退出登陆?',
+				success: (res) => {
+					if (res.confirm) {
+						this.http.request({
+							url: '/app/user/exit',
+							success: (res) => {
+								uni.removeStorageSync('user');
+								uni.navigateBack();
+							}
+						});
+					}
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss"></style>

+ 3 - 2
app/pages/user/enterprise/index.vue

@@ -34,10 +34,11 @@
 		</view>
 		<view class="form_group">
 			<view class="lable re">企业地址</view>
-			<view class="bgm">
-				<input type="text" placeholder="请输入详细地址" v-model="item.address" :disabled="item.state == 1" class="input" />
+			<view class="bgm" v-if="item.state != 1">
+				<input type="text" placeholder="请输入详细地址" v-model="item.address" :disabled="item.state == 1" class="input"/>
 				<view class="msg" @click="select()">选择</view>
 			</view>
+			<input v-else v-model="item.address" :disabled="item.state == 1" />
 		</view>
 		<view class="form_group" style="border: 0px">
 			<view class="lable re">企业简介</view>

+ 20 - 30
app/pages/user/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="main">
 		<view class="user" @click="go('info')">
-			<image :src="user.avatarUrl ? user.avatarUrl : '../../../static/favicon.png'" class="head"></image>
+			<image :src="user.avatarUrl ? user.avatarUrl : '../../static/favicon.png'" class="head"></image>
 			<view class="con" v-if="user.id">
 				<view class="nickName">微信用户</view>
 				<view class="welcome">欢迎使用爱就业咨询服务平台</view>
@@ -132,26 +132,26 @@
 		</view>
 		<view class="mtt">更多服务</view>
 		<view class="menu">
-			<view class="cd" @click="go('index')">
+			<view class="cd" @click="go('/pages/statement/index/index')">
 				<view class="out">
 					<view class="int">
-						<view class="icon" style="background-color: #ffc107">&#xe725;</view>
+						<view class="icon" style="background-color: #ffc107">&#xe63c;</view>
 						<view class="title">结算广场</view>
 					</view>
 				</view>
 			</view>
 			<view class="cd">
 				<view class="out">
-					<view class="int">
-						<view class="icon" style="background-color: #ff5722">&#xe616;</view>
-						<view class="title">分享有利</view>
-					</view>
+					<button class="int share" open-type="share" hover-class="none">
+						<view class="icon" style="background-color: #ff5722">&#xe637;</view>
+						<view class="title">分享应用</view>
+					</button>
 				</view>
 			</view>
-			<view class="cd">
+			<view class="cd" @click="go('/pages/other/setting')">
 				<view class="out">
 					<view class="int">
-						<view class="icon" style="background-color: #2196f3">&#xe680;</view>
+						<view class="icon" style="background-color: #9e9e9e">&#xe63a;</view>
 						<view class="title">设置</view>
 					</view>
 				</view>
@@ -174,6 +174,8 @@ export default {
 			uni.setStorageSync('user', this.user); */
 		if (this.hasLogin()) {
 			this.getUserInfo();
+		} else {
+			this.user = {};
 		}
 	},
 	methods: {
@@ -194,28 +196,16 @@ export default {
 			} else {
 				uni.navigateTo({ url: '/pages/user/login' });
 			}
-		},
-		//退出登录
-		exit(url) {
-			uni.showModal({
-				title: '提示',
-				content: '确定退出登录?',
-				success: (res) => {
-					if (res.confirm) {
-						this.http.request({
-							url: this.http.urls.logout,
-							success: (res) => {
-								uni.removeStorageSync('user');
-								uni.$emit('top');
-								uni.switchTab({
-									url: '/pages/index/index'
-								});
-							}
-						});
-					}
-				}
-			});
 		}
+	},
+	onShareAppMessage: function (res) {
+		return {
+			title: '爱就业咨询服务平台',
+			path: '/pages/index/index',
+			imageUrl: '../../static/favicon.png',
+			success: (res) => {},
+			fail: (res) => {}
+		};
 	}
 };
 </script>

+ 7 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_UserController.java

@@ -45,7 +45,13 @@ public class Api_UserController extends BaseController {
 
     @PostMapping("/choice")
     public AjaxResult choice(@Validated @RequestBody ChoiceDto dto) {
-         return userService.choice(dto);
+        return userService.choice(dto);
+    }
+
+
+    @GetMapping("/exit")
+    public AjaxResult exit() {
+        return userService.exit();
     }
 
 }

+ 32 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/IUserService.java

@@ -14,14 +14,45 @@ import java.util.List;
  * @author lsw
  * @date 2024-04-15
  */
-public interface IUserService extends IService<User>{
+public interface IUserService extends IService<User> {
     List<User> selectList(User user);
 
+    /**
+     * 微信登陆
+     *
+     * @param dto
+     * @return
+     */
     AjaxResult login(LoginDto dto);
 
+    /**
+     * 实名认证
+     *
+     * @param dto
+     * @return
+     */
     AjaxResult auth(AuthDto dto);
 
+    /**
+     * 编辑用户信息
+     *
+     * @param dto
+     * @return
+     */
     AjaxResult edit(UserDto dto);
 
+    /**
+     * 选择用户类型 0个人用户 1企业用户
+     *
+     * @param dto
+     * @return
+     */
     AjaxResult choice(ChoiceDto dto);
+
+    /**
+     * 退出登陆
+     *
+     * @return
+     */
+    AjaxResult exit();
 }

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/UserServiceImpl.java

@@ -105,4 +105,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         }
         return AjaxResult.success();
     }
+
+    @Override
+    public AjaxResult exit() {
+        try {
+            tokenService.delLoginUser(AppUtil.getUser().getToken());
+            return AjaxResult.success();
+        } catch (Exception e) {
+            return AjaxResult.error("退出登录失败");
+        }
+    }
 }