This commit is contained in:
zhaofang
2022-09-20 11:02:00 +08:00
parent 596410abef
commit 2626fe7fa2
6 changed files with 95 additions and 65 deletions

View File

@@ -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() {
return ajax.get(baseURL,'/xboe/m/stat/medalinfo/list');
return ajax.get(baseURL,'/xboe/m/stat/medal/config');
}
export default {
sendEvent,
userTotal,

View File

@@ -505,7 +505,7 @@
title: "发表评论",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "每发表一个评论",//事件的内容
objId: this.resolveId,//关联的id
objId: this.objId,//关联的id
objType: this.objType,//关联的类型
objInfo: "评论",
aid: this.userInfo.aid, //当前登录人的id

View File

@@ -349,6 +349,19 @@ export default {
// }
this.isPraise=true;
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{
console.log('点赞失败:'+res.message);
}

View File

@@ -18,7 +18,11 @@
<h6><router-link to="/homePage"> {{userInfo.name}}</router-link>
</h6>
<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 class="content-bottom">
<div class="medal">
@@ -27,9 +31,10 @@
<img src="../../../public/images/grade.png" alt="">
</div>
<el-button class="medalbutt" type="text">更多 <i class="el-icon-d-arrow-right"></i> </el-button>
<div class="grade">
<div>LV.1</div>
<span>经验值367</span>
<div style="margin-top:10px">
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
<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>
@@ -227,8 +232,9 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
}
.content-bottom{
margin-top: 30px;
display: flex;
.medal{
float: left;
// float: left;
img{
width: 36px;
height: 40px;
@@ -240,32 +246,12 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
.medalbutt{
color: #333333;
font-size: 14px;
float: left;
margin-top: 10px;
margin-right: 40px;
// 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{
flex: 1;
@@ -289,6 +275,24 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
.content-top{
margin-top: 15px;
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{
color: #333333;
font-size: 26px;
@@ -302,10 +306,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
margin-right: 24px;
}
.editbutt{
width: 97px;
height: 30px;
line-height: 10px;
border-radius: 4px;
border: 1px solid #387DF7;
font-size: 14px;
color: #333333;
color: #387DF7;
}
}
}
@@ -341,16 +348,20 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
}
.identity{
padding: 5px 10px;
border: 1px solid #fcfcfc;
border-radius: 8px;
width: 76px;
height: 30px;
// border: 1px solid #fcfcfc;
border-radius: 4px;
cursor: pointer;
background-color: #ffffff;
font-size: 14px;
color: #9D6110;;
background-color: rgba($color: #FFECC7, $alpha: 0.54);
margin: 5px;
}
.active{
background-color: #ffb30f;
background-color: #F99000;
color: #FFFFFF;
border: 1px solid #ffb30f;
// border: 1px solid #ffb30f;
}
.uc-alert{
margin: 10px;

View File

@@ -33,27 +33,29 @@
</el-steps>
</div>
<el-table
:data="tableData"
:data="rules"
style="width: 100%;height:200px;overflow-y: auto;">
<el-table-column
prop="name" angin="center"
label="勋章"
width="180">
width="80">
<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>
</el-table-column>
<el-table-column
prop="level" angin="center"
label="等级"
width="180">
width="80">
<template slot-scope="scope">LV{{scope.row.level}}</template>
</el-table-column>
<el-table-column
prop="remark" angin="center"
label="获得条件">
</el-table-column>
<el-table-column
prop="num" angin="center"
prop="num" angin="center" width="120"
label="获得人数">
</el-table-column>
</el-table>
@@ -99,32 +101,30 @@
dialogVisible:false,
medalList:[],
medal:{},
tableData:[]
tableData:[],
medalConfig:[],
rules:[],
}
},
mounted() {
this.getMedal()
this.getMedal();
this.getConfig();
},
methods:{
getConfig() {// 获取勋章配置
apiStat.userMedalConfig().then(res=>{
if(res.status == 200) {
this.medalConfig = res.result;
}
})
},
goView(item) {
this.dialogVisible = true;
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() {
apiStat.userMedal(this.userInfo.aid).then(res=>{
@@ -192,6 +192,9 @@
background-color: #387DF7;
margin-top: 7px;
}
.el-step__line{
background-color: #387DF7;
}
}
::v-deep .el-step__title.is-finish{

View File

@@ -494,7 +494,7 @@ export default {
title: "完成课程评分",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "给课程评分",//事件的内容
objId: this.resolveId,//关联的id
objId: this.courseInfo.id,//关联的id
objType: 1,//关联的类型
objInfo: this.courseInfo.name,
aid: this.userInfo.aid, //当前登录人的id