diff --git a/ce_client/src/assets/background.jpg b/ce_client/src/assets/background.jpg new file mode 100644 index 0000000..8a89eb8 Binary files /dev/null and b/ce_client/src/assets/background.jpg differ diff --git a/ce_client/src/router/index.js b/ce_client/src/router/index.js index 64cd587..9080274 100644 --- a/ce_client/src/router/index.js +++ b/ce_client/src/router/index.js @@ -82,11 +82,18 @@ export const asyncRoutes = [ path: '/search', component: Layout, redirect: '/search', + meta: { title: '专家检索', icon: 'search' }, children: [{ path: 'search', name: 'Search', component: () => import('@/views/search/index'), - meta: { title: '专家检索', icon: 'search' } + meta: { title: '专家检索(卡片)', icon: 'search' } + }, + { + path: 'search2', + name: 'Search2', + component: () => import('@/views/search/index2'), + meta: { title: '专家检索(列表)', icon: 'search' } }] }, { diff --git a/ce_client/src/views/login/index.vue b/ce_client/src/views/login/index.vue index be45b75..4600476 100644 --- a/ce_client/src/views/login/index.vue +++ b/ce_client/src/views/login/index.vue @@ -1,11 +1,19 @@ @@ -56,7 +71,7 @@ // import { validUsername } from '@/utils/validate' export default { - name: 'Login', + name: "Login", data() { // const validateUsername = (rule, value, callback) => { // if (!validUsername(value)) { @@ -67,78 +82,82 @@ export default { // } const validatePassword = (rule, value, callback) => { if (value.length < 4) { - callback(new Error('密码长度小于4位!')) + callback(new Error("密码长度小于4位!")); } else { - callback() + callback(); } - } + }; return { loginForm: { - username: '', - password: '' + username: "", + password: "", }, loginRules: { - username: [{ required: true, trigger: 'blur', message: '请输入账户' }], - password: [{ required: true, trigger: 'blur', validator: validatePassword, message: '请输入密码' }] + username: [{ required: true, trigger: "blur", message: "请输入账户" }], + password: [ + { + required: true, + trigger: "blur", + validator: validatePassword, + message: "请输入密码", + }, + ], }, loading: false, - passwordType: 'password', - redirect: undefined - } + passwordType: "password", + redirect: undefined, + }; }, watch: { $route: { - handler: function(route) { - this.redirect = route.query && route.query.redirect + handler: function (route) { + this.redirect = route.query && route.query.redirect; }, - immediate: true - } + immediate: true, + }, }, methods: { showPwd() { - if (this.passwordType === 'password') { - this.passwordType = '' + if (this.passwordType === "password") { + this.passwordType = ""; } else { - this.passwordType = 'password' + this.passwordType = "password"; } this.$nextTick(() => { - this.$refs.password.focus() - }) + this.$refs.password.focus(); + }); }, handleLogin() { - this.$refs.loginForm.validate(valid => { + this.$refs.loginForm.validate((valid) => { if (valid) { - this.loading = true - this.$store.dispatch('user/login', this.loginForm).then(() => { - this.$router.push({ path: this.redirect || '/' }) - this.loading = false - }).catch(() => { - this.loading = false - }) + this.loading = true; + this.$store + .dispatch("user/login", this.loginForm) + .then(() => { + this.$router.push({ path: this.redirect || "/crm/consumer" }); + this.loading = false; + }) + .catch(() => { + this.loading = false; + }); } else { - console.log('error submit!!') - return false + console.log("error submit!!"); + return false; } - }) - } - } -} + }); + }, + }, +}; \ No newline at end of file diff --git a/ce_server/apps/expert/models.py b/ce_server/apps/expert/models.py index 3e561aa..74abf72 100644 --- a/ce_server/apps/expert/models.py +++ b/ce_server/apps/expert/models.py @@ -23,7 +23,7 @@ class Expert(CommonBModel): idnumber = models.CharField(verbose_name="身份证号", max_length=40) paddress = models.TextField(verbose_name="通讯地址") photo = models.CharField(verbose_name="证件照", max_length=100, null=True, blank=True) - hdegree = models.CharField(verbose_name="最高学历",choices=gender_choices, default='本科', max_length=10) + hdegree = models.CharField(verbose_name="最高学历",choices=degree_choices, default='本科', max_length=10) class Meta: verbose_name = '专家信息'