banner、登录等完善

dev_2020-03-03
yujialong 3 years ago
parent 2bb7d4c753
commit 595115160c
  1. 13
      src/layouts/header/index.vue
  2. 26
      src/pages/account/login/index.vue
  3. 6
      src/pages/ass/list/index.vue
  4. 2
      src/pages/course/details/index.vue
  5. 2
      src/pages/index/list/index.vue
  6. 8
      src/pages/record/details/index.vue
  7. 2
      src/pages/record/list/practice.vue
  8. 5
      src/pages/setting/person/index.vue
  9. 19
      src/pages/setting/person/info.vue
  10. 20
      src/store/modules/user.js

@ -3,7 +3,7 @@
<a class="logo" @click="toIndex">
<img v-if="isIndex" src="@/assets/img/logo.png" alt="">
<template v-else>
<img :src="logoUrl" width="50" height="50" />
<img :src="logoUrl" height="50" />
<span class="title">{{title}}</span>
</template>
</a>
@ -13,7 +13,7 @@
<template v-if="token">
<div class="user" @click="toPersonal">
<el-avatar :size="35" :src="avatar"></el-avatar>
<span class="username">{{ userName }}</span>
<span class="username">{{ customerName || userName }}</span>
</div>
<el-divider direction="vertical"></el-divider>
<a class="logout" @click="logout">退出</a>
@ -43,7 +43,7 @@ export default {
},
computed: {
...mapState("user", [
"title", "logoUrl", "avatar", "userName"
"title", "logoUrl", "avatar", "userName", 'customerName'
])
},
mounted() {
@ -72,7 +72,7 @@ export default {
}).catch(err => {})
},
toPersonal() {
this.$router.push("/setting/person");
this.customerName || this.$router.push("/setting/person")
},
toIndex() {
this.$refs.nav.jump({
@ -106,7 +106,7 @@ $height: 64px;
.logo{
position: absolute;
top: 0;
left: 80px;
left: 40px;
font-size: 28px;
color: #568DF2;
line-height: $height;
@ -166,9 +166,6 @@ $height: 64px;
.inner {
padding-right: 20px;
}
.logo {
left: 40px;
}
}
}
</style>

@ -86,7 +86,7 @@
<script>
import vFooter from "@/layouts/footer";
import { mapActions } from "vuex";
import { mapMutations, mapActions } from "vuex";
import util from "@/libs/util";
import Setting from "@/setting";
import axios from "axios"
@ -143,6 +143,9 @@ export default {
});
},
methods: {
...mapMutations("user", [
'SET_CUSTOMERNAME'
]),
...mapActions("user", [
"setInfo"
]),
@ -168,9 +171,12 @@ export default {
if (valid) {
this.form.distinguish = Number(this.form.distinguish);
this.$post(this.api.logins, this.form).then((res) => {
if (res.status == 200) {
if (res && res.status == 30001) {
this.phoneVisible = true
this.getVerImg()
this.form.code = ''
} else if (res.status == 200) {
this.token = res.data.token
console.log(11, res)
//
axios.get(this.api.isClient, {
headers: {
@ -179,6 +185,7 @@ export default {
}).then(res => {
//
if (res.data.customer) {
this.SET_CUSTOMERNAME(res.data.customerName)
this.selectVisible = true
} else {
this.setLogin()
@ -188,10 +195,7 @@ export default {
util.errorMsg(res.message)
}
}).catch(res => {
if (res && res.status == 30001) {
this.phoneVisible = true;
}
this.getVerImg();
this.getVerImg()
this.form.code = ''
})
}
@ -305,8 +309,12 @@ export default {
right: 0;
}
.login{
z-index: 4;
position: absolute;
top: calc((100vh - 611px) / 2);
left: 50%;
width: 436px;
margin: 188px auto 150px;
transform: translateX(-50%);
.form{
padding: 38px 38px 60px;
border-radius: 6px;
@ -435,7 +443,7 @@ export default {
&:hover img {
opacity: .9;
}
&.active p {
&.active p, &:hover p {
background-color: #9278ff;
}
}

@ -77,9 +77,9 @@
<el-table-column prop="className" label="实验班级" align="center"></el-table-column>
<el-table-column prop="experimentalNum" width="90" label="实验人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" width="90" label="考试时长" align="center"></el-table-column>
<el-table-column prop="createTime" width="140" label="创建时间" align="center"></el-table-column>
<el-table-column prop="startTime" width="140" label="起始时间" align="center"></el-table-column>
<el-table-column prop="stopTime" width="140" label="结束时间" align="center"></el-table-column>
<el-table-column prop="createTime" width="160" label="创建时间" align="center"></el-table-column>
<el-table-column prop="startTime" width="160" label="起始时间" align="center"></el-table-column>
<el-table-column prop="stopTime" width="160" label="结束时间" align="center"></el-table-column>
<el-table-column label="倒计时" width="90" align="center">
<template slot-scope="scope">
<span>{{ timeFilter(scope.row) }}</span>

@ -122,7 +122,7 @@ export default {
let res = await this.$get(`${this.api.getCourseById}/${this.id}`)
this.courseName = res.course.name
this.description = res.course.description
this.coverUrl = res.course.coverUrl
this.coverUrl = res.course.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220224/png/1496735335294984192.png'
this.$refs.breadcrumb.update('课程学习/' + this.courseName)
},
async getChapter(){

@ -185,7 +185,7 @@ export default {
.text {
position: absolute;
top: 130px;
left: 180px;
left: 400px;
}
h6 {
margin-bottom: 30px;

@ -30,8 +30,8 @@
{{ scope.row.timeSum }}min
</template>
</el-table-column>
<el-table-column prop="startTime" width="140" label="起始时间" align="center"></el-table-column>
<el-table-column prop="submitTime" width="140" label="结束时间" align="center"></el-table-column>
<el-table-column prop="startTime" width="160" label="起始时间" align="center"></el-table-column>
<el-table-column prop="submitTime" width="160" label="结束时间" align="center"></el-table-column>
<el-table-column width="100" label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验报告</el-button>
@ -134,5 +134,7 @@ export default {
</script>
<style scoped>
.wrap {
padding: 12px 100px 20px;
}
</style>

@ -7,7 +7,7 @@
<el-table-column prop="hightScore" width="120" label="实验最高得分" align="center"></el-table-column>
<el-table-column prop="practiceNum" label="练习次数" width="80" align="center"></el-table-column>
<el-table-column prop="duration" width="140" label="累计实验时长(小时)" align="center"></el-table-column>
<el-table-column prop="lastTime" width="140" label="最近实验时间" align="center"></el-table-column>
<el-table-column prop="lastTime" width="160" label="最近实验时间" align="center"></el-table-column>
<el-table-column prop="creationTime" width="90" label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toDetails(scope.row)">实验情况</el-button>

@ -81,9 +81,10 @@ export default {
</script>
<style lang="scss" scoped>
.wrap{
.main .wrap{
display: flex;
padding-bottom: 0;
width: $min-width;
padding: 12px 0 0;
.left{
margin-right: 12px;
background-color: #fff;

@ -84,25 +84,27 @@
</el-select>
</li>
<li>
<label>国家</label>
<label>国家</label>
<el-select size="small" v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label" :value="item.label" ></el-option>
</el-select>
</li>
</div>
<div class="line">
<li>
<label>学校名称</label>
<el-select size="small" v-model="archive.schoolId" filterable placeholder="选择学校" @change="id => getSchoolName(id,index)">
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select>
</li>
</div>
<div class="line" style="margin-bottom: 0">
<li>
<label>专业学科</label>
<el-select size="small" v-model="archive.disciplineId" placeholder="选择专业学科" @change="id => getItemProfessionalClass(id,index)" @clear="() => clearItemClass(index)">
<el-option v-for="item in subjectList" :key="item.value" :label="item.disciplineName" :value="item.disciplineId"></el-option>
</el-select>
</li>
</div>
<div class="line" style="margin-bottom: 0">
<li>
<label>专业类</label>
<el-select size="small" v-model="archive.professionalClassId" placeholder="选择专业类" :disabled="archive.disciplineId ? false : true" @change="id => getItemProfessional(id,index)" @clear="() => clearItemProfess(index)">
@ -884,19 +886,22 @@ export default {
}
.archives{
position: relative;
width: 862px;
padding: 16px 0;
margin-bottom: 6px;
border-radius: 4px;
background-color: #FAFAFA;
.del{
position: absolute;
top: 48px;
right: 16px;
top: 80px;
right: 19px;
cursor: pointer;
}
.line {
justify-content: space-between;
}
li{
width: 30%;
margin-right: 32px;
margin-right: 60px;
}
.el-select{
flex: 1;

@ -11,15 +11,16 @@ export default {
namespaced: true,
state: {
activeTab: "/station/list", // 当前激活菜单
title: "",
logoUrl: "",
title: '',
logoUrl: '',
avatar: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
userId: "",
studentId: "",
userName: "",
schoolId: "",
roleId: "",
dataTime: ""
userId: '',
studentId: '',
userName: '',
customerName: '',
schoolId: '',
roleId: '',
dataTime: ''
},
mutations: {
SET_INFO: (state, info) => {
@ -43,6 +44,9 @@ export default {
SET_USERNAME: (state, userName) => {
state.userName = userName;
},
SET_CUSTOMERNAME: (state, customerName) => {
state.customerName = customerName;
},
SET_ACTIVE_TAB: (state, activeTab) => {
state.activeTab = activeTab;
},

Loading…
Cancel
Save