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}} {{course.name}}
</view> </view>
<view class="course-text"> <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>
<view class="course-type"> <view class="course-type">
<text class="type-index" v-if="sysTypeName(course.sysType1) != ''">{{sysTypeName(course.sysType1)}}</text> <text class="type-index" v-if="sysTypeName(course.sysType1) != ''">{{sysTypeName(course.sysType1)}}</text>

View File

@@ -84,11 +84,16 @@
}, },
watch:{ watch:{
data(newVal,oldVal){ data(newVal,oldVal){
console.log(newVal,'newVal')
if(newVal && newVal.id!=''){ if(newVal && newVal.id!=''){
this.checkHas(); this.checkHas();
} }
} }
}, },
mounted() {
this.checkHas();
// this.loadUser();
},
computed:{ computed:{
...mapGetters(['userInfo']), ...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-icon"><image style="width:34upx;height: 31upx;" src="/static/images/icon/comment.png" alt=""></view>
<view class="interact-bar-txt">{{data.answers}}</view> <view class="interact-bar-txt">{{data.answers}}</view>
</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 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-icon"><image style="width:40upx;height: 40upx;" src="/static/images/icon/comment.png" alt=""></view>
<!-- <view class="interact-bar-txt">{{data.comments}}</view> --> <!-- <view class="interact-bar-txt">{{data.comments}}</view> -->
@@ -317,7 +317,7 @@ export default {
} }
apiComment.add(cdata).then(res=>{ apiComment.add(cdata).then(res=>{
if(res.status==200){ if(res.status==200){
this.$refs.interactToast.show({message:'发布成功',type:'success'}); // this.$refs.interactToast.show({message:'发布成功',type:'success'});
this.inputValue=''; this.inputValue='';
this.data.comments++; this.data.comments++;
this.toUserDig.chooseUserId=''; this.toUserDig.chooseUserId='';

View File

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

View File

@@ -26,7 +26,7 @@
<view class="list-box"> <view class="list-box">
<view class="list-box-index"> <view class="list-box-index">
<view class="list-box-title course-bg-info"> <view class="list-box-title course-bg-info">
课程排行榜 热门课程排行榜
</view> </view>
<view class="list-box-text" v-for="(cou,index) in courseRankingList" @click="toCourseDetail(cou)"> <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> <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>
<view class="articl-box"> <view class="articl-box">
<view class="articl-box-index" v-for="ar in arlDataList" @click="toArticleDetail(ar)"> <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 style="width: 560upx;height: 314upx;border-radius: 24upx 24upx 0 0;" :src="fileUrl+ar.coverurl" mode=""></image>
<image v-else 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">
<view class="box-index-title" style="height:90upx"> <view class="box-index-title" style="height:90upx">
{{ar.title}} {{ar.title}}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -57,9 +57,9 @@
</u-empty> </u-empty>
</view> </view>
<view v-else > <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> <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> <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> <author-info :avatar="item.avatar" :name="item.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info>
<view class="artical_text_bottom"> <view class="artical_text_bottom">
<text class="item-time">收藏时间{{ item.time }}</text> <text class="item-time">收藏时间{{ item.time }}</text>
@@ -88,8 +88,8 @@
<text v-html="$keywordActiveShow(item.question.title, query.keyword)"></text> <text v-html="$keywordActiveShow(item.question.title, query.keyword)"></text>
</view> </view>
<author-info :avatar="item.avatar" :name="item.question.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info> <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-bottom" @click="toQaDetail(item.question)" v-html="$keywordActiveShow(item.question.content, query.keyword)"></view>
<view class="qa-answers" v-if="item.question.isResolve"> <view class="qa-answers" @click="toQaDetail(item.question)" v-if="item.question.isResolve">
<view style=" <view style="
word-break:break-all; word-break:break-all;
width: 100%; width: 100%;
@@ -766,8 +766,11 @@ export default {
.qa-bottom { .qa-bottom {
margin-top: 22upx; margin-top: 22upx;
word-wrap: break-word;
word-break:break-all; word-break:break-all;
font-size: 14px; font-size: 14px;
text-overflow:ellipsis;
// white-space:pre-wrap;
color: #7f7f7f; color: #7f7f7f;
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;

View File

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

View File

@@ -1,7 +1,11 @@
<template> <template>
<view class="my-qa-page"> <view class="my-qa-page">
<u-toast ref="articleToast"></u-toast> <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 class="top-content">
<view> <view>
<u-search <u-search

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -411,8 +411,6 @@
toScore:toScore, toScore:toScore,
formatUserNumber:formatUserNumber, formatUserNumber:formatUserNumber,
getConType:getContentType, getConType:getContentType,
isPlaying:false,
onplay:false, onplay:false,
touchNum : 0, touchNum : 0,
playerBoxShow:false, playerBoxShow:false,
@@ -430,7 +428,6 @@
sectionList:[], sectionList:[],
contentList:[], contentList:[],
videoScore:3, videoScore:3,
videoPlayer:null,
videoPlayingTime:0, videoPlayingTime:0,
speedListShow:false, speedListShow:false,
speedList:["2.0", "1.5", "1.25", "1.0", "0.75", "0.5"], speedList:["2.0", "1.5", "1.25", "1.0", "0.75", "0.5"],
@@ -518,12 +515,15 @@
//实时渲染当前的播放状态 //实时渲染当前的播放状态
}, },
onReady() { onReady() {
this.videoPlayer=uni.createVideoContext("myVideo", this);
}, },
onHide(){ onHide(){
//清除定时任务 //清除定时任务
this.clearTimeHandle(); this.clearTimeHandle();
}, },
destroyed() {
this.clearTimeHandle();
},
methods:{ methods:{
...mapActions({ ...mapActions({
// getResOwnerTree:'resOwner/getResOwnerTree', // getResOwnerTree:'resOwner/getResOwnerTree',
@@ -783,10 +783,6 @@
this.articleMore=true; this.articleMore=true;
this.clearTimeHandle(); this.clearTimeHandle();
// console.log(con,'con'); // console.log(con,'con');
if(this.videoPlayer){
//console.log('切换视频');
this.videoPlayer.stop();
}
this.playerBoxShow=false; this.playerBoxShow=false;
if(con.contentType==40){ if(con.contentType==40){
//如果是文档需要再次加载pdf //如果是文档需要再次加载pdf
@@ -1255,22 +1251,6 @@
$this.appendStudyOtherTime(); $this.appendStudyOtherTime();
}, 1000*60); }, 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(){ saveStudyItem(){
@@ -1323,32 +1303,8 @@
//console.log(e,'e'); //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(){ onPlayerPause(){
this.isPlaying = false;
this.videoPlayer.pause();
this.stopStudyTime(); this.stopStudyTime();
}, },
onPlayerEnded(){ onPlayerEnded(){
@@ -1358,35 +1314,6 @@
this.finishStudyItem(); 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){ onPlayerPlaying(e){
//console.log("当前播放11",itme); //console.log("当前播放11",itme);
//console.log("当前播放11"+itme); //console.log("当前播放11"+itme);
@@ -1557,6 +1484,9 @@
display: none; display: none;
} }
} }
/deep/ .field-right{
margin-right: 60upx;
}
} }
body{ body{
background-color: #fff; background-color: #fff;
@@ -1880,6 +1810,9 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
.catalog-con:last-child{
border: none;
}
.catalog-con{ .catalog-con{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

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