mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 03:16:45 +08:00
提交修改
This commit is contained in:
@@ -18,7 +18,12 @@
|
||||
<view v-if="users.length>0" style="overflow-x: auto;height: 160upx;white-space: nowrap;overflow-y: hidden;">
|
||||
<view style="line-height: 60upx;display: inline-block;margin: 10upx;" v-for="(su,suidx) in users" :key="suidx" @click="confirmShare(su)">
|
||||
<view style="text-align: center;"><!--用户头像-->
|
||||
<image src="/static/images/man.png" shape="circle" style="width: 80upx;height: 80upx;"></image>
|
||||
<view v-if="su.avatar"><image :src="su.avatar" shape="circle" style="width: 80upx;height: 80upx;"></image></view>
|
||||
<view v-else>
|
||||
<image v-if="su.sex === 1 " shape="circle" src="../../static/images/man.png" style="width: 80upx;height: 80upx;" alt=""></image>
|
||||
<image v-else shape="circle" src="../../static/images/woman.png" style="width: 80upx;height: 80upx;" alt=""></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="text-align: center;font-size: 22upx;">{{su.name}}({{su.code}})</view>
|
||||
</view>
|
||||
@@ -80,6 +85,8 @@
|
||||
refId,
|
||||
refType:this.type,
|
||||
sendName,
|
||||
pageType:this.type,
|
||||
pageParams:this.data.id,
|
||||
acceptName,
|
||||
acceptId,
|
||||
title:'系统消息',
|
||||
@@ -111,8 +118,9 @@
|
||||
apiUser.getByLoginName(name).then(rs=>{
|
||||
if(rs.status==200){
|
||||
//因为根据工号查询,只会是一个人,所有会有null情况,而json会返回空字符串
|
||||
if(rs.result!=''){
|
||||
if(rs.result){
|
||||
$this.users=[rs.result];
|
||||
$this.loadAuthorInfo($this.users,rs.result.aid);
|
||||
}else{
|
||||
$this.$refs.messager.show({message:"无此用户",type:'warning'});
|
||||
}
|
||||
@@ -128,6 +136,19 @@
|
||||
//uni.showToast({title: rs.message,icon: 'none'});
|
||||
this.$refs.messager.show({message:rs.message,type:'error'});
|
||||
}else{
|
||||
let ids=[];
|
||||
rs.result.forEach(item=>{
|
||||
// if(item.avatar){
|
||||
// item.avatar=this.$config.fileUrl + item.avatar;
|
||||
// }else{
|
||||
// item.sex=1;
|
||||
// ids.push(item.aid);
|
||||
// }
|
||||
item.avatar='';
|
||||
item.sex=1;
|
||||
ids.push(item.aid);
|
||||
});
|
||||
this.loadAuthorInfo(rs.result,ids);
|
||||
this.users=rs.result;
|
||||
}
|
||||
}else{
|
||||
@@ -170,7 +191,7 @@
|
||||
apiShares.save(postData).then(rs=>{
|
||||
if(rs.status==200){
|
||||
if(rs.result){
|
||||
this.shareInfo.show=false;
|
||||
this.show=false;
|
||||
this.$refs.messager.show({message:'分享成功',type:'success'});
|
||||
let event = {
|
||||
key: "Share",//分享
|
||||
@@ -194,7 +215,7 @@
|
||||
this.messageSave(this.data.id,this.data.title,this.userInfo.name,u.name,u.aid,'分享给我的');
|
||||
}
|
||||
}
|
||||
this.show=false;
|
||||
|
||||
}else{
|
||||
this.$refs.messager.show({message:'已分享过,不能再分享',type:'warning'});
|
||||
}
|
||||
@@ -206,6 +227,36 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
loadAuthorInfo(list, ids) {
|
||||
//加载作者信息,头像,机构信息
|
||||
if (ids.length == 0) {
|
||||
return;
|
||||
}
|
||||
apiUser.getByIds(ids).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.teacherId) {
|
||||
item.name= author.name;
|
||||
item.orgInfo=cutOrgNamePath(author.orgInfo);
|
||||
item.avatar= author.avatar;
|
||||
item.code= author.code;
|
||||
item.sex=author.sex;
|
||||
if(author.avatar != '') {
|
||||
item.avatar=this.$config.fileUrl + author.avatar;
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
console.log('获取用户信息失败:'+res.error);
|
||||
//this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,19 +53,19 @@
|
||||
<view style="color:#fff;cursor: pointer;">踩</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!scoreInfo.has" class="player-rate">
|
||||
<!--以下部分,已经移到下面了-->
|
||||
<!-- <view v-if="!scoreInfo.has" class="player-rate">
|
||||
<u-rate v-model="scoreInfo.score" active-color="#f7ba2a" text-color="#ff9900" score-template="{value}" void-color="#fff" @change="addScore"></u-rate>
|
||||
</view>
|
||||
<view v-if="scoreInfo.has" style="padding-top: 5px;display: flex;">
|
||||
<view class="player-rate" style="padding-left: 5px;">
|
||||
<!-- <u-rate active-color="#f7ba2a" readonly v-model="courseInfo.score" :allow-half="true" ></u-rate> -->
|
||||
<u-rate readonly :count="5" active-color="#f7ba2a" v-model="scoreInfo.score"></u-rate>
|
||||
</view>
|
||||
<view class="score-text" style="margin-top:20px">
|
||||
<text style="color:#ffb30f;">{{ toScore(scoreInfo.score) }}</text>
|
||||
<text style="font-size: 12px;color: #fff">分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -889,7 +889,6 @@
|
||||
this.$refs.comments.loadData(false);
|
||||
},
|
||||
openShare(){
|
||||
this.$refs.messager.show({message:'打开分享',type:'success'});
|
||||
//console.log(this.$refs.fiexdbar,'this.$refs.fiexdbar');
|
||||
//因为开始是v-if控制的,所以这里获取不到,必须显示时才会获取到,所以需要单独的弄一个分享组件
|
||||
this.$refs.comShare.openShare();
|
||||
@@ -1347,6 +1346,39 @@
|
||||
padding: 34upx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.player-box{
|
||||
position: absolute;
|
||||
// top: 62px;
|
||||
// left: 184px;
|
||||
width: 200px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
height: 147px;
|
||||
background:#a9abb3;
|
||||
opacity: 0.8;
|
||||
border-radius: 33px;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
image{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
.player-praise{
|
||||
margin-top: 5px;
|
||||
display: flex;
|
||||
// justify-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.player-rate{
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
.tabrow{
|
||||
display: flex;
|
||||
border-bottom:1px solid #999999;
|
||||
|
||||
Reference in New Issue
Block a user