🍅选题推荐——以防找不到我们,点击上方订阅专栏✌✌\
👇🏻文末获取源码联系👇🏻
一、项目介绍
1.1 课题背景
互联网发展至今,无论是其理论还是技术都已经成熟,而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播,搭配信息管理工具可以很好地为人们提供服务。所以各行业,尤其是规模较大的企业和学校等都开始借助互联网和软件工具管理信息,传播信息,共享信息等等,以此可以增强自身实力,提高在同行业当中的竞争能力,并从各种激烈的竞争中获取发展的机会。针对房屋租售信息管理混乱,出错率高,信息安全性差,劳动强度大,费时费力等问题,经过分析和考虑,在目前的情况下,可以引进一款房屋租售网站这样的现代化管理工具,这个工具就是解决上述问题的最好的解决方案。它不仅可以实时完成信息处理,还缩短房屋租售信息管理流程,使其系统化和规范化。同时还可以减少工作量,节约房屋租售信息管理需要的人力和资金。所以房屋租售网站是信息管理环节中不可缺少的工具,它对管理者来说非常重要。
1.2 课题意义
现如今,信息种类变得越来越多,信息的容量也变得越来越大,这就是信息时代的标志。近些年,计算机科学发展得也越来越快,而且软件开发技术也越来越成熟,因此,在生活中的各个领域,只要存在信息管理,几乎都有计算机的影子,可以说很多行业都采用计算机的方式管理信息。信息计算机化处理相比手工操作,有着保密性强,效率高,存储空间大,成本低等诸多优点。针对房屋租售信息管理,采用房屋租售网站可以有效管理,使信息管理能够更加科学和规范。
总之,在实际中使用房屋租售网站,其意义如下:
第一点:房屋租售网站的实际运用,可以帮助管理人员在短时间内完成信息处理工作;
第二点:通过系统页面的合理排版布局,可以更加直观的展示系统的内容,并且使用者可以随时阅读页面信息,随时操作系统提供的功能;
第三点:可以实现信息管理计算机化;
第四点:可以降低信息管理成本;
二、功能介绍
4.2 功能结构设计
在前面分析的管理员功能的基础上,进行接下来的设计工作,最终展示设计的管理员结构图(见下图)。管理员管理房东与用户,管理房屋出租出售,管理房屋的租赁与购买的订单,管理留言板与轮播图。
三、拦截器代码
package com.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import com.interceptor.AuthorizationInterceptor;
@Configuration
public class InterceptorConfig extends WebMvcConfigurationSupport{
@Bean
public AuthorizationInterceptor getAuthorizationInterceptor() {
return new AuthorizationInterceptor();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(getAuthorizationInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**");
super.addInterceptors(registry);
}
/**
* springboot 2.0配置WebMvcConfigurationSupport之后,会导致默认配置被覆盖,要访问静态资源需要重写addResourceHandlers方法
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/resources/")
.addResourceLocations("classpath:/static/")
.addResourceLocations("classpath:/admin/")
.addResourceLocations("classpath:/front/")
.addResourceLocations("classpath:/public/");
super.addResourceHandlers(registry);
}
}
个人中心代码
<template>
<div>
<el-form
class="detail-form-content"
ref="ruleForm"
:model="ruleForm"
label-width="80px"
>
<el-row>
<el-col :span="12">
<el-form-item v-if="flag=='yonghu'" label='用户姓名' prop="yonghuName">
<el-input v-model="ruleForm.yonghuName" placeholder='用户姓名' clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="flag=='yonghu'" label='用户手机号' prop="yonghuPhone">
<el-input v-model="ruleForm.yonghuPhone" placeholder='用户手机号' clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="flag=='yonghu'" label='用户身份证号' prop="yonghuIdNumber">
<el-input v-model="ruleForm.yonghuIdNumber" placeholder='用户身份证号' clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="flag=='yonghu'" label='用户头像' prop="yonghuPhoto">
<file-upload
tip="点击上传照片"
action="file/upload"
:limit="3"
:multiple="true"
:fileUrls="ruleForm.yonghuPhoto?$base.url+ruleForm.yonghuPhoto:''"
@change="yonghuPhotoUploadChange"
></file-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="flag=='yonghu'" label='电子邮箱' prop="yonghuEmail">
<el-input v-model="ruleForm.yonghuEmail" placeholder='电子邮箱' clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="flag=='yonghu'" label='积分' prop="newMoney">
<el-input v-model="ruleForm.newMoney" placeholder='积分' disabled style="width: 100px"></el-input>
<!--<a id="btn-recharge" @click="chongzhi" href="javascript:void(0)">点我充值</a>-->
</el-form-item>
</el-col>
<el-form-item v-if="flag=='users'" label="用户名" prop="username">
<el-input v-model="ruleForm.username"
placeholder="用户名"></el-input>
</el-form-item>
<el-col :span="12">
<el-form-item v-if="flag!='users'" label="性别" prop="sexTypes">
<el-select v-model="ruleForm.sexTypes" placeholder="请选择性别">
<el-option
v-for="(item,index) in sexTypesOptions"
v-bind:key="item.codeIndex"
:label="item.indexName"
:value="item.codeIndex">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item>
<el-button type="primary" @click="onUpdateHandler">修 改</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
// 数字,邮件,手机,url,身份证校验
import { isNumber,isIntNumer,isEmail,isMobile,isPhone,isURL,checkIdCard } from "@/utils/validate";
export default {
data() {
return {
ruleForm: {},
flag: '',
usersFlag: false,
// sexTypesOptions : [],
// 注册表 用户
// 注册的类型字段 用户
// 性别
sexTypesOptions : [],
};
},
mounted() {
//获取当前登录用户的信息
var table = this.$storage.get("sessionTable");
this.sessionTable = this.$storage.get("sessionTable");
this.role = this.$storage.get("role");
if (this.role != "管理员"){
}
this.flag = table;
this.$http({
url: `${this.$storage.get("sessionTable")}/session`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
this.ruleForm = data.data;
// 注册表 用户
} else {
this.$message.error(data.msg);
}
});
// 注册表 用户 的级联表
this.$http({
url: `dictionary/page?page=1&limit=100&sort=&order=&dicCode=sex_types`,
method: "get"
}).then(({ data }) => {
if (data && data.code === 0) {
this.sexTypesOptions = data.data.list;
} else {
this.$message.error(data.msg);
}
});
},
methods: {
chongzhi() {
this.$router.replace({ path: "/pay" });
},
yonghuPhotoUploadChange(fileUrls) {
this.ruleForm.yonghuPhoto = fileUrls;
},
onUpdateHandler() {
if((!this.ruleForm.yonghuName)&& 'yonghu'==this.flag){
this.$message.error('用户姓名不能为空');
return
}
if( 'yonghu' ==this.flag && this.ruleForm.yonghuPhone&&(!isMobile(this.ruleForm.yonghuPhone))){
this.$message.error(`手机应输入手机格式`);
return
}
if((!this.ruleForm.yonghuIdNumber)&& 'yonghu'==this.flag){
this.$message.error('用户身份证号不能为空');
return
}
if((!this.ruleForm.yonghuPhoto)&& 'yonghu'==this.flag){
this.$message.error('用户头像不能为空');
return
}
if( 'yonghu' ==this.flag && this.ruleForm.yonghuEmail&&(!isEmail(this.ruleForm.yonghuEmail))){
this.$message.error(`邮箱应输入邮箱格式`);
return
}
if((!this.ruleForm.sexTypes) && this.flag!='users'){
this.$message.error('性别不能为空');
return
}
if('users'==this.flag && this.ruleForm.username.trim().length<1) {
this.$message.error(`用户名不能为空`);
return
}
this.$http({
url: `${this.$storage.get("sessionTable")}/update`,
method: "post",
data: this.ruleForm
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "修改信息成功",
type: "success",
duration: 1500,
onClose: () => {
}
});
} else {
this.$message.error(data.msg);
}
});
}
}
};
</script>
<style lang="scss" scoped>
</style>
四、相关案例
🍅源码获取:大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻