mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
提交
This commit is contained in:
@@ -69,11 +69,14 @@ const userCoinList = function(aid,days) {
|
|||||||
* 勋章信息
|
* 勋章信息
|
||||||
* 页面上不能修改,删除
|
* 页面上不能修改,删除
|
||||||
*/
|
*/
|
||||||
|
// const userMedalConfig = function() {
|
||||||
|
// return ajax.get(baseURL,'/xboe/m/stat/medalinfo/config');
|
||||||
|
// }
|
||||||
|
// get 获取勋章配置,返回的是列表
|
||||||
const userMedalConfig = function() {
|
const userMedalConfig = function() {
|
||||||
return ajax.get(baseURL,'/xboe/m/stat/medalinfo/list');
|
return ajax.get(baseURL,'/xboe/m/stat/medal/config');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
sendEvent,
|
sendEvent,
|
||||||
userTotal,
|
userTotal,
|
||||||
|
|||||||
@@ -505,7 +505,7 @@
|
|||||||
title: "发表评论",//事件的标题
|
title: "发表评论",//事件的标题
|
||||||
parameters:"",//用户自定义参数 name:value,name:value
|
parameters:"",//用户自定义参数 name:value,name:value
|
||||||
content: "每发表一个评论",//事件的内容
|
content: "每发表一个评论",//事件的内容
|
||||||
objId: this.resolveId,//关联的id
|
objId: this.objId,//关联的id
|
||||||
objType: this.objType,//关联的类型
|
objType: this.objType,//关联的类型
|
||||||
objInfo: "评论",
|
objInfo: "评论",
|
||||||
aid: this.userInfo.aid, //当前登录人的id
|
aid: this.userInfo.aid, //当前登录人的id
|
||||||
|
|||||||
@@ -349,6 +349,19 @@ export default {
|
|||||||
// }
|
// }
|
||||||
this.isPraise=true;
|
this.isPraise=true;
|
||||||
this.$message({message:'点赞成功',type:'success'})
|
this.$message({message:'点赞成功',type:'success'})
|
||||||
|
let event = {
|
||||||
|
key: "Praise",//后台的事件key 发布文章且审核通过
|
||||||
|
title: "点赞",//事件的标题
|
||||||
|
parameters:"",//用户自定义参数 name:value,name:value
|
||||||
|
content: "点赞"+this.data.title,//事件的内容
|
||||||
|
objId: this.data.id,//关联的id
|
||||||
|
objType: this.type,//关联的类型
|
||||||
|
objInfo: this.data.title,
|
||||||
|
aid: this.userInfo.aid, //当前登录人的id
|
||||||
|
aname: this.userInfo.name,//当前人的姓名
|
||||||
|
status: 1 //状态,直接写1
|
||||||
|
}
|
||||||
|
this.$store.dispatch("userTrigger", event);
|
||||||
}else{
|
}else{
|
||||||
console.log('点赞失败:'+res.message);
|
console.log('点赞失败:'+res.message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,11 @@
|
|||||||
<h6><router-link to="/homePage"> {{userInfo.name}}</router-link>
|
<h6><router-link to="/homePage"> {{userInfo.name}}</router-link>
|
||||||
</h6>
|
</h6>
|
||||||
<span>{{orgInfo}}</span>
|
<span>{{orgInfo}}</span>
|
||||||
<el-link @click="toPage('/user/Setting')" type="info" :underline="false"> <el-button class="editbutt" icon="el-icon-edit" type="text">编辑资料</el-button></el-link>
|
<div class="grade">
|
||||||
|
<div>LV.1</div>
|
||||||
|
<span>经验值:367</span>
|
||||||
|
</div>
|
||||||
|
<el-link @click="toPage('/user/Setting')" type="info" :underline="false"> <el-button class="editbutt">编辑资料</el-button></el-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-bottom">
|
<div class="content-bottom">
|
||||||
<div class="medal">
|
<div class="medal">
|
||||||
@@ -27,9 +31,10 @@
|
|||||||
<img src="../../../public/images/grade.png" alt="">
|
<img src="../../../public/images/grade.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<el-button class="medalbutt" type="text">更多 <i class="el-icon-d-arrow-right"></i> </el-button>
|
<el-button class="medalbutt" type="text">更多 <i class="el-icon-d-arrow-right"></i> </el-button>
|
||||||
<div class="grade">
|
<div style="margin-top:10px">
|
||||||
<div>LV.1</div>
|
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
||||||
<span>经验值:367</span>
|
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
||||||
|
<router-link to="/manager/index"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span></router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -227,8 +232,9 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
}
|
}
|
||||||
.content-bottom{
|
.content-bottom{
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
|
display: flex;
|
||||||
.medal{
|
.medal{
|
||||||
float: left;
|
// float: left;
|
||||||
img{
|
img{
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -240,32 +246,12 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
.medalbutt{
|
.medalbutt{
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
float: left;
|
margin-right: 40px;
|
||||||
margin-top: 10px;
|
// float: left;
|
||||||
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
.grade{
|
|
||||||
float: left;
|
|
||||||
margin-top: 10px;
|
|
||||||
div{
|
|
||||||
margin-left: 22px;
|
|
||||||
font-weight: 600;
|
|
||||||
float: left;
|
|
||||||
width: 70px;
|
|
||||||
height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 30px;
|
|
||||||
color: #9D6110 ;
|
|
||||||
background: url('../../../public/images/lvbg.png') no-repeat;
|
|
||||||
}
|
|
||||||
span{
|
|
||||||
font-size: 14px;
|
|
||||||
color: #A3680A;
|
|
||||||
line-height: 32px;
|
|
||||||
margin-left: 13px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
.personalData{
|
.personalData{
|
||||||
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -289,6 +275,24 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
.content-top{
|
.content-top{
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
|
.grade{
|
||||||
|
display: inline-block;
|
||||||
|
div{
|
||||||
|
font-weight: 600;
|
||||||
|
float: left;
|
||||||
|
width: 58px;
|
||||||
|
height: 24px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 34px;
|
||||||
|
color: #9D6110 ;
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
font-size: 14px;
|
||||||
|
color: #A3680A;
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
h6{
|
h6{
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
@@ -302,10 +306,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
}
|
}
|
||||||
.editbutt{
|
.editbutt{
|
||||||
|
width: 97px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #387DF7;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333333;
|
color: #387DF7;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -341,16 +348,20 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
|||||||
}
|
}
|
||||||
.identity{
|
.identity{
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
border: 1px solid #fcfcfc;
|
width: 76px;
|
||||||
border-radius: 8px;
|
height: 30px;
|
||||||
|
// border: 1px solid #fcfcfc;
|
||||||
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #ffffff;
|
font-size: 14px;
|
||||||
|
color: #9D6110;;
|
||||||
|
background-color: rgba($color: #FFECC7, $alpha: 0.54);
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
.active{
|
.active{
|
||||||
background-color: #ffb30f;
|
background-color: #F99000;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
border: 1px solid #ffb30f;
|
// border: 1px solid #ffb30f;
|
||||||
}
|
}
|
||||||
.uc-alert{
|
.uc-alert{
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
|||||||
@@ -33,27 +33,29 @@
|
|||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="rules"
|
||||||
style="width: 100%;height:200px;overflow-y: auto;">
|
style="width: 100%;height:200px;overflow-y: auto;">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name" angin="center"
|
prop="name" angin="center"
|
||||||
label="勋章"
|
label="勋章"
|
||||||
width="180">
|
width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<medal-img class="table-medal" style="width:46px;height:52px" :item="medal"></medal-img>
|
<img style="width:40px;height:40px" src="/images/medal.png" alt="" srcset="">
|
||||||
|
<!-- <medal-img class="table-medal" style="width:46px;height:52px" :item="medal"></medal-img> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="level" angin="center"
|
prop="level" angin="center"
|
||||||
label="等级"
|
label="等级"
|
||||||
width="180">
|
width="80">
|
||||||
|
<template slot-scope="scope">LV{{scope.row.level}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="remark" angin="center"
|
prop="remark" angin="center"
|
||||||
label="获得条件">
|
label="获得条件">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="num" angin="center"
|
prop="num" angin="center" width="120"
|
||||||
label="获得人数">
|
label="获得人数">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -99,32 +101,30 @@
|
|||||||
dialogVisible:false,
|
dialogVisible:false,
|
||||||
medalList:[],
|
medalList:[],
|
||||||
medal:{},
|
medal:{},
|
||||||
tableData:[]
|
tableData:[],
|
||||||
|
medalConfig:[],
|
||||||
|
rules:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getMedal()
|
this.getMedal();
|
||||||
|
this.getConfig();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getConfig() {// 获取勋章配置
|
||||||
|
apiStat.userMedalConfig().then(res=>{
|
||||||
|
if(res.status == 200) {
|
||||||
|
this.medalConfig = res.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
goView(item) {
|
goView(item) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.medal = item;
|
this.medal = item;
|
||||||
apiStat.userMedalConfig().then(res=>{
|
|
||||||
if(res.status == 200) {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
for (let index = 0; index < item.medalLevel; index++) {
|
|
||||||
this.tableData.push({
|
|
||||||
medalIcon:item.medalIcon,
|
|
||||||
medalLevel:index,
|
|
||||||
medalName:item.medalName,
|
|
||||||
level:index,
|
|
||||||
remark:item.requirement,
|
|
||||||
num:'todo'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
let data = this.medalConfig.find(it=>it.id ==item.medalId);
|
||||||
|
this.rules = JSON.parse(data.rules);
|
||||||
|
console.log(data,'data');
|
||||||
},
|
},
|
||||||
getMedal() {
|
getMedal() {
|
||||||
apiStat.userMedal(this.userInfo.aid).then(res=>{
|
apiStat.userMedal(this.userInfo.aid).then(res=>{
|
||||||
@@ -192,6 +192,9 @@
|
|||||||
background-color: #387DF7;
|
background-color: #387DF7;
|
||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
}
|
}
|
||||||
|
.el-step__line{
|
||||||
|
background-color: #387DF7;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
::v-deep .el-step__title.is-finish{
|
::v-deep .el-step__title.is-finish{
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ export default {
|
|||||||
title: "完成课程评分",//事件的标题
|
title: "完成课程评分",//事件的标题
|
||||||
parameters:"",//用户自定义参数 name:value,name:value
|
parameters:"",//用户自定义参数 name:value,name:value
|
||||||
content: "给课程评分",//事件的内容
|
content: "给课程评分",//事件的内容
|
||||||
objId: this.resolveId,//关联的id
|
objId: this.courseInfo.id,//关联的id
|
||||||
objType: 1,//关联的类型
|
objType: 1,//关联的类型
|
||||||
objInfo: this.courseInfo.name,
|
objInfo: this.courseInfo.name,
|
||||||
aid: this.userInfo.aid, //当前登录人的id
|
aid: this.userInfo.aid, //当前登录人的id
|
||||||
|
|||||||
Reference in New Issue
Block a user