Merge branch 'stat' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/mobile into stat

This commit is contained in:
weinan2087
2022-11-23 19:48:37 +08:00
24 changed files with 173 additions and 144 deletions

View File

@@ -12,7 +12,7 @@
{{course.name}}
</view>
<view class="course-text">
{{course.teacher}} | {{formatUserNumber(course.studys || course.studies)}}人已学
<text style="margin-right: 6upx;" v-if="course.teacher">{{course.teacher}} |</text> {{formatUserNumber(course.studys || course.studies)}}人已学
</view>
<view class="course-type">
<text class="type-index" v-if="sysTypeName(course.sysType1) != ''">{{sysTypeName(course.sysType1)}}</text>

View File

@@ -84,11 +84,16 @@
},
watch:{
data(newVal,oldVal){
console.log(newVal,'newVal')
if(newVal && newVal.id!=''){
this.checkHas();
}
}
},
mounted() {
this.checkHas();
// this.loadUser();
},
computed:{
...mapGetters(['userInfo']),
},

View File

@@ -15,7 +15,7 @@
<view class="interact-bar-icon"><image style="width:34upx;height: 31upx;" src="/static/images/icon/comment.png" alt=""></view>
<view class="interact-bar-txt">{{data.answers}}</view>
</view> -->
<view class="" style="display:flex;width: 50%;justify-content: flex-end;padding-right: 20rpx;margin-top: 16upx;">
<view class="field-right" style="display:flex;width: 50%;justify-content: flex-end;padding-right: 20rpx;margin-top: 16upx;">
<view v-if="comments" class="interact-bar-item" @click="handleComment()">
<view class="interact-bar-icon"><image style="width:40upx;height: 40upx;" src="/static/images/icon/comment.png" alt=""></view>
<!-- <view class="interact-bar-txt">{{data.comments}}</view> -->
@@ -317,7 +317,7 @@ export default {
}
apiComment.add(cdata).then(res=>{
if(res.status==200){
this.$refs.interactToast.show({message:'发布成功',type:'success'});
// this.$refs.interactToast.show({message:'发布成功',type:'success'});
this.inputValue='';
this.data.comments++;
this.toUserDig.chooseUserId='';

View File

@@ -1,7 +1,7 @@
<template>
<view class="top">
<view v-show="showBack" class="top-back" @click="toBack()">
<u-icon name="arrow-left"></u-icon>
<u-icon color="#333" size="20" name="arrow-left"></u-icon>
</view>
<view class="top-title"><slot></slot></view>
<view @click="topgae()" style="color: #387DF7;">
@@ -71,23 +71,20 @@
<style lang="scss" scoped>
.top{
height: 40px;
// display: none;
// background:linear-gradient(to bottom,#6BA0FC, #6297FD);
background-color: #fff;
display: flex;
justify-content: space-between;
.top-back{
// float: left;
color: #000;
padding-top:6px;
color: #333;
padding-top:10px;
height: 40px;
line-height: 40px;
// padding-left: 15px;
padding-left: 15px;
}
.top-title{
text-align: center;
font-size: 16px;
color: #000;
color: #333;
height: 40px;
text-align: center;
width: 80%;

View File

@@ -26,7 +26,7 @@
<view class="list-box">
<view class="list-box-index">
<view class="list-box-title course-bg-info">
课程排行榜
热门课程排行榜
</view>
<view class="list-box-text" v-for="(cou,index) in courseRankingList" @click="toCourseDetail(cou)">
<image v-if="index == 0" style="width:50upx;height: 50upx;vertical-align: middle;" src="../../static/images/ranking/listblue01.png" mode=""></image>
@@ -67,8 +67,7 @@
</view>
<view class="articl-box">
<view class="articl-box-index" v-for="ar in arlDataList" @click="toArticleDetail(ar)">
<image v-if="ar.coverurl == ''" style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" src="../../static/images/course.png" mode=""></image>
<image v-else style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" :src="fileUrl+ar.coverurl" mode=""></image>
<image style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" :src="fileUrl+ar.coverurl" mode=""></image>
<view class="box-index">
<view class="box-index-title" style="height:90upx">
{{ar.title}}

View File

@@ -102,6 +102,7 @@
delfirm() {
this.isAll = 1;
this.modalShow = true;
this.content ='确认删所选信息吗?';
},
confirm() {
if(this.isAll == 0) {
@@ -160,6 +161,7 @@
})
},
allRead(){
this.flag = false;
if(this.items.length == 0) {
return
}
@@ -208,7 +210,7 @@
color: #007DFF;
font-size: 120px;
position: absolute;
top: -30%;
top: -45%;
left: 50%;
transform: translate(-50%,-48%) scale(.73);
-webkit-transform: translate(-50%,-48%) scale(.73);

View File

@@ -5,7 +5,7 @@
:controls="false"
:enable-play-gesture="false"
:initial-time="initPlayingTime"
@error="onError"
@error="error"
@touchend="onTouchend"
@play="onPlay"
@pause="onPause"
@@ -236,7 +236,7 @@
// this.fullScreenFlag ? this.bool=true : this.bool=false;
//this.fullScreenFlag=!this.fullScreenFlag;
},
onError(e){
error(e){
console.log(e,'播放错误');
this.$emit('error',e);
},

View File

@@ -13,7 +13,7 @@ Vue.prototype.$keywordActiveShow=function(str,keyword){
if(!str||str.indexOf(keyword)===-1||keyword==''){
return str
}
return str.replace(keyword,`<span style="color:#FF8E00">${keyword}</span>`)
return str.replace(keyword,`<span style="color:#387DF7 ">${keyword}</span>`)
}

View File

@@ -549,10 +549,18 @@
})
},
toSearch(){
let pageUrl='/pages/resource/search';
if(this.conType == 0){
let pageUrl='/pages/resource/search?type=' + 1;
uni.navigateTo({
url:pageUrl
})
}else{
let pageUrl='/pages/resource/search?type=' + this.conType;
uni.navigateTo({
url:pageUrl
})
}
},
changeList(){
this.dataName='list'+this.tabIndex+this.conType;
@@ -564,6 +572,8 @@
this.findArticleData();
} else if(this.conType == 4) {// 问答
this.findQaData();
}else if(this.conType == 0) {// 推荐默认课程
this.findCourseData();
}
}else{
if(this.conType== 1) {//课程
@@ -572,6 +582,8 @@
this.articleList=curData.list;
} else if(this.conType == 4) {// 问答
this.qaList=curData.list;
}else if(this.conType == 0) {// 推荐默认课程
this.courseList=curData.list;
}
}
},
@@ -581,6 +593,7 @@
this.noDataList= true,//判断接口是否还有数据
this.changeList();
},
changeConType(item) {
console.log(item)
this.conType = item.type;
this.changeList();

View File

@@ -1,5 +1,6 @@
<template>
<view class="follow-info-page">
<page-title :showBack="true">关注列表</page-title>
<u-toast ref="messager"></u-toast>
<view class="ub-content">
<view>
@@ -109,18 +110,18 @@
onReachBottom() {
if(this.tab == 1 && this.followMe.list.length<this.followMe.count) {//关注我的
this.followMe.pageIndex ++;
this.getMyPage();
this.getMyPage(false);
} else if(this.tab == 2 && this.follow.list.length<this.follow.count){//我关注的
this.follow.pageIndex ++;
this.getPage();
this.getPage(false);
}
},
onLoad(options) {
this.tab = options.type;
this.$store.dispatch('GetUserInfo').then(rs => {
this.userInfo = rs;
this.getMyPage();
this.getPage();
this.getMyPage(true);
this.getPage(true);
});
},
@@ -146,7 +147,9 @@
this.show = false;
if(this.cancelIdx == 1) {
$this.followMe.list[this.cancelIndex].has = false;
this.getPage(true);
} else {
this.getMyPage(true)
$this.follow.list.splice(this.cancelIndex,1);
}
uni.showToast({
@@ -157,24 +160,24 @@
})
},
toFollow(item,index) {
console.log(item,'item')
let $this=this;
apiFollow.save(item.userFollow.aid).then(res=>{
if(res.status == 200) {
$this.followMe.list[index].has = true;
// 手动把关注成功的数据push进我关注的列表
let data = {
has:true,
userFollow:{
aid:res.result.aid,
followId:res.result.followId,
followTime:res.result.followTime,
id:res.result.id,
authorInfo:item.userFollow.authorInfo,
}
this.getPage(true);
// let data = {
// has:true,
// userFollow:{
// aid:res.result.aid,
// followId:res.result.followId,
// followTime:res.result.followTime,
// id:res.result.id,
// authorInfo:item.userFollow.authorInfo,
// }
}
$this.follow.list.push(data);
// }
// // $this.follow.list.push(data);
} else {
// this.$message.error(res.message);
}
@@ -183,7 +186,11 @@
ubtab(num){
this.tab = num;
},
getMyPage() {//关注我的,关注他的
getMyPage(flag) {//关注我的,关注他的
if(flag) {
this.followMe.pageIndex =1;
this.followMe.list = [];
}
this.followMe.aid = this.userInfo.aid;
let $this=this;
uni.showLoading({title:'加载中...'});
@@ -201,7 +208,11 @@
}
})
},
getPage() { //我关注的,他关注的
getPage(falg) { //我关注的,他关注的
if(falg) {
this.follow.pageIndex = 1;
this.follow.list = [];
}
this.follow.aid = this.userInfo.aid;
let $this=this;
uni.showLoading({title:'加载中...'});

View File

@@ -3,8 +3,9 @@
<view class="article">
<u-toast ref="articleToast"></u-toast>
<page-title :showBack="true" goPgae="/pages/plus/addArticle">
我的文章
<template #right>
<p>去发表</p>
<p style="width: 100upx;margin-top: 18upx;">去发表</p>
</template>
</page-title>
<view class="top-filter">
@@ -83,7 +84,7 @@
</view>
</view>
</view>
<uni-load-more v-show="this.articleList.count>articleList.pageSize" :status="loadStatus"></uni-load-more>
<uni-load-more v-show="articleList.count>0" :status="loadStatus"></uni-load-more>
</view>
</template>
@@ -165,8 +166,8 @@ export default {
this.flagLoading = false;
uni.hideLoading();
if (rs.status == 200) {
if (rs.result.list.length != 0) {
this.articleList.count = rs.result.count;
if (rs.result.list.length != 0) {
let userIds = [];
rs.result.list.forEach(item => {
item.name=''
@@ -224,7 +225,6 @@ export default {
});
},
chooseStatus(e) {
console.log(e,'e')
if(this.flagLoading) {
return;
}

View File

@@ -28,7 +28,7 @@
</view>
</view>
</view>
<view>
<view style="margin-top: 60upx;margin: 0 auto;">
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>

View File

@@ -57,7 +57,7 @@
</u-empty>
</view>
<view v-else >
<view class="article_one" v-for="(item, idx) in articleList" :key="idx">
<view class="article_one" v-for="(item, idx) in articleList" :key="idx" @click="toArticleDetail(item)" >
<view class="articla_tit" @click="toArticleDetail(item)" v-html="$keywordActiveShow(item.title, query.keyword)"></view>
<text class="articla_text" v-html="$keywordActiveShow(item.summary, query.keyword)"></text>
<author-info :avatar="item.avatar" :name="item.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
@@ -88,8 +88,8 @@
<text v-html="$keywordActiveShow(item.question.title, query.keyword)"></text>
</view>
<author-info :avatar="item.avatar" :name="item.question.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="qa-bottom" v-html="$keywordActiveShow(item.question.content, query.keyword)"></view>
<view class="qa-answers" v-if="item.question.isResolve">
<view class="qa-bottom" @click="toQaDetail(item.question)" v-html="$keywordActiveShow(item.question.content, query.keyword)"></view>
<view class="qa-answers" @click="toQaDetail(item.question)" v-if="item.question.isResolve">
<view style="
word-break:break-all;
width: 100%;
@@ -766,8 +766,11 @@ export default {
.qa-bottom {
margin-top: 22upx;
word-wrap: break-word;
word-break:break-all;
font-size: 14px;
text-overflow:ellipsis;
// white-space:pre-wrap;
color: #7f7f7f;
display: -webkit-box;
overflow: hidden;

View File

@@ -1,5 +1,8 @@
<template>
<view class="my-medal">
<view class="back-icon" @click="back()">
<u-icon name="arrow-left"></u-icon>
</view>
<view class="medal-img">
<u-avatar style="margin: 0 auto;" v-if="userInfo.avatar && userInfo.avatar!=''" shape="circle" :size="76" :src="userInfo.avatar" ></u-avatar>
<view v-else>
@@ -87,6 +90,9 @@
this.getConfig();
},
methods:{
back(){
uni.navigateBack();
},
getConfig() {// 获取勋章配置
apiStat.userMedalConfig().then(res=>{
if(res.status == 200) {
@@ -116,11 +122,19 @@
.my-medal{
background: url(../../static/images/me-bg.png) no-repeat 100% / 100%;
background-position: 0 0;
position: relative;
padding-top: 220upx;
/deep/ .u-popup__content{
border-radius: 16upx;
}
.back-icon{
position: absolute;
top:110upx;
left:40upx;
/deep/ .uicon-arrow-left{
color: #fff !important;
}
}
.medel-show-box{
position: relative;
background: url(../../static/images/show-bg.png) no-repeat 100% / 100%;

View File

@@ -1,7 +1,11 @@
<template>
<view class="my-qa-page">
<u-toast ref="articleToast"></u-toast>
<page-title :showBack="true">我的问答</page-title>
<page-title :showBack="true" goPgae="/pages/plus/addQuestion">我的问答
<template #right>
<p style="width: 100upx;margin-top: 18upx;">去提问</p>
</template>
</page-title>
<view class="top-content">
<view>
<u-search

View File

@@ -1,6 +1,6 @@
<template>
<view>
<!-- <page-title :showBack="true">分享</page-title> -->
<page-title :showBack="true">我分享</page-title>
<view v-for="(item,index) in dataList.list" :key="index">
<view v-if="item.type == 1">
<view class="course_box">
@@ -42,7 +42,7 @@
<text style="font-size: 24upx;color: #999;margin-right: 35upx;">分享给{{item.toAname}}</text>
</view>
<view class="rowbtn-right">
<view class="withdraw" v-if="item.isRead" @click.stop="withdraw(item)">
<view class="withdraw" v-if="!item.isRead" @click.stop="withdraw(item)">
<image src="../../static/images/icon/withdrawnew.png" mode=""></image>撤回
</view>
<view v-if="item.isRead" class="Viewed">
@@ -298,7 +298,7 @@ export default {
},
toArticleDetail(item) {
uni.navigateTo({
url: '/pages/resource/articeDetail?id=' + item.objId
url: '/pages/resource/articeDetail?id=' + item.id
});
},
toQaDetail(item) {

View File

@@ -1,5 +1,8 @@
<template>
<view style="background: #F9F9F9;">
<view style="background: #F9F9F9;position: relative;">
<view class="back-icon" >
<u-icon name="arrow-left" @click="goBack"></u-icon>
</view>
<view class="ubtop" style="background-color: #fff;">
<view class="ub-heard">
我的u币
@@ -55,6 +58,9 @@
this.getLevel()
},
methods: {
goBack(){
uni.navigateBack();
},
jumrules(){
uni.navigateTo({
url:'/pages/my/myubrules'
@@ -62,7 +68,6 @@
},
getlist() {
apiStat.userCoinList(this.userInfo.aid, 7).then(res => {
console.log(res);
if (res.status == 200) {
this.uCoinRecord = [];
for (let key in res.result.uCoinRecord) {
@@ -88,6 +93,14 @@
</script>
<style lang="scss" scoped>
.back-icon{
position: absolute;
top:110upx;
left:40upx;
/deep/ .uicon-arrow-left{
color: #fff !important;
}
}
.ub-list {
height: 100%;
padding: 32upx 36upx;

View File

@@ -1,5 +1,8 @@
<template>
<view style="background: #F0D8B0;width: 100%;">
<view style="background: #F0D8B0;width: 100%;position: relative;">
<view class="back-icon" >
<u-icon name="arrow-left" @click="goBack"></u-icon>
</view>
<view class="myub-top">
<view class="ub-content">
<view class="ub-heard">
@@ -235,6 +238,9 @@
this.ubtab(1);
},
methods: {
goBack(){
uni.navigateBack();
},
ubtab(num){
this.tab = num;
if(num == 1){
@@ -251,6 +257,11 @@
</script>
<style lang="scss" scoped>
.back-icon{
position: absolute;
top:110upx;
left:40upx;
}
.lsitbox-info{
display:flex ;
width: 100%;

View File

@@ -1,5 +1,8 @@
<template>
<view class="ranking-list-info">
<view class="back-icon" @click="back()">
<u-icon name="arrow-left"></u-icon>
</view>
<view class="ranking-list-box">
<u-tabs :list="tabList" @click="clickTabs"
lineColor="#007DFF"
@@ -208,6 +211,9 @@
},
methods:{
back(){
uni.navigateBack();
},
clickTabs(item) {
this.activeTab = item.index;
},
@@ -337,6 +343,15 @@
padding-top: 376upx;
background: url(../../static/images/ranking-list.png) no-repeat 100% / 100%;
background-position: 0 0;
position: relative;
.back-icon{
position: absolute;
top:110upx;
left:40upx;
/deep/ .uicon-arrow-left{
color: #fff !important;
}
}
.ranking-list-box{
padding: 34upx 40upx;
border-radius: 40upx 40upx 0 0;

View File

@@ -1,6 +1,6 @@
<template>
<view>
<!-- <page-title :showBack="true">分享给我的</page-title> -->
<page-title :showBack="true">分享给我的</page-title>
<view v-for="(item,index) in dataList.list" :key="index">
<view v-if="item.type == 1">
<view class="course_box">
@@ -38,7 +38,7 @@
<text style="font-size: 24upx;color: #999;margin-right: 35upx;">{{ item.sysCreateBy }}分享给我</text>
</view>
<view class="rowbtn-right">
<view v-if="!item.isRead" class="Viewed">
<view v-if="item.isRead" class="Viewed">
已查看
</view>
<view v-else class="notViewed">
@@ -149,6 +149,7 @@ export default {
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
item.question.shareId=item.shareId;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
@@ -253,6 +254,7 @@ export default {
if(res.status==200){
}
})
citem.isRead = true;
}
uni.navigateTo({
url: '/pages/study/courseStudy?id=' + citem.id
@@ -268,11 +270,13 @@ export default {
// }
},
toArticleDetail(item) {
console.log(item,'item')
if(!item.isRead){
apiShares.updateIsRead(item.id).then(res=>{
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
}
})
item.isRead = true;
}
uni.navigateTo({
url: '/pages/resource/articeDetail?id=' + item.id
@@ -280,10 +284,11 @@ export default {
},
toQaDetail(item) {
if(!item.isRead){
apiShares.updateIsRead(item.id).then(res=>{
apiShares.updateIsRead(item.shareId).then(res=>{
if(res.status==200){
}
})
}
uni.navigateTo({
url: '/pages/resource/qaDetail?id=' + item.id

View File

@@ -150,6 +150,10 @@
goSubmit() {
let $this=this;
let images=[];
if(this.qa.title == '') {
$this.$refs.messager.show({message:'请填写标题',type:'error'});
return
}
this.fileList.forEach(file=>{
images.push(file.path);
})

View File

@@ -2,7 +2,7 @@
<!--搜索页-->
<view style="background-color: #fff;height: 100vh;">
<u-toast ref="messager"></u-toast>
<view style="margin:30upx 30upx; display: flex;">
<view style="padding-top: 30upx; margin: 0upx 30upx; display: flex;">
<u-icon @click="back()" name="arrow-left" color="#383838" size="22" style="margin-right: 10upx;"></u-icon>
<u-search
bgColor="#F2F5F7"

View File

@@ -411,8 +411,6 @@
toScore:toScore,
formatUserNumber:formatUserNumber,
getConType:getContentType,
isPlaying:false,
onplay:false,
touchNum : 0,
playerBoxShow:false,
@@ -430,7 +428,6 @@
sectionList:[],
contentList:[],
videoScore:3,
videoPlayer:null,
videoPlayingTime:0,
speedListShow:false,
speedList:["2.0", "1.5", "1.25", "1.0", "0.75", "0.5"],
@@ -518,12 +515,15 @@
//实时渲染当前的播放状态
},
onReady() {
this.videoPlayer=uni.createVideoContext("myVideo", this);
},
onHide(){
//清除定时任务
this.clearTimeHandle();
},
destroyed() {
this.clearTimeHandle();
},
methods:{
...mapActions({
// getResOwnerTree:'resOwner/getResOwnerTree',
@@ -783,10 +783,6 @@
this.articleMore=true;
this.clearTimeHandle();
// console.log(con,'con');
if(this.videoPlayer){
//console.log('切换视频');
this.videoPlayer.stop();
}
this.playerBoxShow=false;
if(con.contentType==40){
//如果是文档需要再次加载pdf
@@ -1255,22 +1251,6 @@
$this.appendStudyOtherTime();
}, 1000*60);
},
doubleClickVideo(e){
// this.onPlayerPause()
this.touchNum ++
setTimeout(()=>{
if(this.touchNum == 1){
// console.log('单击')
}else if(this.touchNum >= 2){
if(this.isPlaying){
this.onPlayerPause()
} else {
this.onPlayerPlay()
}
}
this.touchNum = 0
},250)
},
//先保存学习的内容,针对于音视频的内容
saveStudyItem(){
@@ -1323,32 +1303,8 @@
//console.log(e,'e');
},
onPlayerPlay(){
this.isPlaying = true;
this.videoPlayingTime=0;
// console.log("开始播放");
this.playerBoxShow=false;
this.isAppendTime=true;//可以追加学习时长
this.videoSpeed=studyUtil.getVideoSpeed();
this.videoPlayer.playbackRate(this.videoSpeed);
this.videoPlayer.play();
this.appendStudyTime();//开始追加学习时长
let $this=this;
if(this.curContent.status<9){
let completeType=this.curriculumData.completeSetup;
//console.log(completeType,'completeType');
if(completeType==0){
//默认5秒后学习完成.
//$this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
}else{
//先记录进行中的学习内容
this.saveStudyItem();
}
}
},
onPlayerPause(){
this.isPlaying = false;
this.videoPlayer.pause();
this.stopStudyTime();
},
onPlayerEnded(){
@@ -1358,35 +1314,6 @@
this.finishStudyItem();
}
},
changeSpeed(e) {
// 获取选择的倍速
let value = e;
this.videoSpeed = Number(value);
this.videoPlayer.playbackRate(this.videoSpeed);
studyUtil.setVideoSpeed(this.videoSpeed);
this.speedListShow=false;
},
showSpeedCtrl(){
if(this.speedListShow){
this.speedListShow=false;
}else{
this.speedListShow=true;
}
},
formatSeconds(a) {
var hh = parseInt(a/3600);
var mm = parseInt((a-hh*3600)/60);
if(mm<10) mm = "0" + mm;
var ss = parseInt((a-hh*3600)%60);
if(ss<10) ss = "0" + ss;
if(hh<10) hh = hh == 0?'':`0${hh}:`;
var length = hh + mm + ":" + ss;
if(a>=0){
return length;
}else{
return "00:00";
}
},
onPlayerPlaying(e){
//console.log("当前播放11",itme);
//console.log("当前播放11"+itme);
@@ -1557,6 +1484,9 @@
display: none;
}
}
/deep/ .field-right{
margin-right: 60upx;
}
}
body{
background-color: #fff;
@@ -1880,6 +1810,9 @@
text-overflow: ellipsis;
}
}
.catalog-con:last-child{
border: none;
}
.catalog-con{
display: flex;
justify-content: space-between;

View File

@@ -335,7 +335,7 @@
{name: '已完成',value: 2}
],
autonomyStatustList: [
{name: '全部',value: ''},
{name: '全部',value: 0},
{name: '未开始',value: 1},
{name: '进行中',value: 2},
{name: '已完成',value: 9}