mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
提交
This commit is contained in:
@@ -189,15 +189,18 @@
|
||||
url: '/pages/study/studydetail?id='+citem.id+'&type='+citem.type
|
||||
});
|
||||
} else {
|
||||
if (citem.type == 10) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/resource/microDetail?id=' + citem.id
|
||||
});
|
||||
} else if (citem.type == 20) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/resource/courseDetail?id=' +citem.id
|
||||
});
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/study/courseStudy?id=' + citem.id
|
||||
});
|
||||
// if (citem.type == 10) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/resource/microDetail?id=' + citem.id
|
||||
// });
|
||||
// } else if (citem.type == 20) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/resource/courseDetail?id=' +citem.id
|
||||
// });
|
||||
// }
|
||||
}
|
||||
},
|
||||
...mapActions({
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="news-page-list">
|
||||
<view class="list-index" v-for="item in items" :key="item.id" @click="returnRouter(item)">
|
||||
<view style="margin-top: 16upx;margin-right: 20upx;">
|
||||
<radio v-show="flag" @click="changeChecked(item)" :checked="item.checked"/>
|
||||
<radio v-show="flag" @click.stop="changeChecked(item)" :checked="item.checked"/>
|
||||
</view>
|
||||
<view class="list-index-img">
|
||||
<u-badge :isDot="!item.isRead" type="error" :absolute="true" :offset="[0,-2]"></u-badge>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<view v-if="detailData.isResolve">
|
||||
<text v-if="an.isBest" style="color:#FFB30F;">最佳答案</text>
|
||||
</view>
|
||||
<view class="set-good-an" v-if="userInfo.aid==detailData.sysCreateAid && !detailData.isResolve && an.id && an.clevel==1" @click="setBest()">设置为最佳答案</view>
|
||||
<view class="set-good-an" v-if="userInfo.aid==detailData.sysCreateAid && !detailData.isResolve && an.id && an.clevel==1" @click="setBest(an)">设置为最佳答案</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -362,6 +362,8 @@ export default {
|
||||
uni.showLoading({title:'加载中...'})
|
||||
let $this=this;
|
||||
apiQa.detail(id).then(res => {
|
||||
console.log(res,'res')
|
||||
setTimeout(function(){ uni.hideLoading() },100);
|
||||
if (res.status == 200) {
|
||||
//处理图片
|
||||
let imgArray=[];
|
||||
@@ -377,6 +379,7 @@ export default {
|
||||
this.getAnswerList(id);
|
||||
this.autoCheck(res.result.sysCreateAid);
|
||||
apiUser.getByIds([res.result.sysCreateAid]).then(rs=>{
|
||||
|
||||
setTimeout(function(){ uni.hideLoading() },100);
|
||||
if(rs.status==200){
|
||||
if(rs.result!='' && rs.result.length>0){
|
||||
@@ -396,7 +399,6 @@ export default {
|
||||
$this.detailData = res.result;
|
||||
}
|
||||
})
|
||||
setTimeout(function(){ uni.hideLoading() },100);
|
||||
let event = {
|
||||
key: "ReadQuestion",//后台的事件key 发布文章且审核通过
|
||||
title: "阅读问题",//事件的标题
|
||||
@@ -411,9 +413,15 @@ export default {
|
||||
source:2,
|
||||
}
|
||||
apiStat.sendEvent(event);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
title:res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
setTimeout(function(){ uni.hideLoading() },100);
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title:"获取数据失败"
|
||||
@@ -533,9 +541,9 @@ export default {
|
||||
})
|
||||
},
|
||||
//设置最佳答案接口
|
||||
setBest() {
|
||||
setBest(an) {
|
||||
//userInfo.aid == an.sysCreateAid因为身份信息为空,所以为了接接口没有加这个判断,但是实际上要加的
|
||||
apiQa.isBest(this.curItem.id).then(res => {
|
||||
apiQa.isBest(an.id).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.$set(this.detailData, 'isResolve', true);
|
||||
uni.showToast({title:"设置成功" ,duration: 2000})
|
||||
@@ -546,9 +554,9 @@ export default {
|
||||
let event = {
|
||||
key: "AnswerBest",//设置为最佳答案
|
||||
title: "回答被选为最佳答案",//
|
||||
parameters:"author:"+this.curItem.sysCreateAid,//内容的作者
|
||||
parameters:"author:"+an.sysCreateAid,//内容的作者
|
||||
content: '回答被选为最佳答案',//事件的内容
|
||||
objId: this.curItem.id,//关联的id
|
||||
objId: an.id,//关联的id
|
||||
objType: '5',//关联的类型
|
||||
objInfo: '设置最佳答案',
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
:focus="true"
|
||||
shape="round"
|
||||
@clear="clearSearch"
|
||||
@search="searchList"
|
||||
@search="searchList"
|
||||
@custom="searchList"
|
||||
search-icon="search"
|
||||
:showAction="true"
|
||||
actionText="搜索"
|
||||
@@ -182,7 +183,11 @@
|
||||
</div>
|
||||
</view>
|
||||
<view v-if="article.list.length==0 && article.loadStatus=='noMore'" class="empty">
|
||||
<u-empty icon="search" text=""></u-empty>
|
||||
<!-- <u-empty icon="search" text=""></u-empty>
|
||||
<view class="agreeTip">抱歉暂时没有找到相关内容,</view>
|
||||
<view class="agreeTip">
|
||||
是否要去<text class="productAgree" @click="toProductAgree">“提个意见”</text>呢
|
||||
</view> -->
|
||||
<u-empty
|
||||
text="没有查找到相关内容"
|
||||
icon="../../static/images/seach-empt.png">
|
||||
@@ -233,11 +238,15 @@
|
||||
<view style="margin-top: 10px;">
|
||||
<interact-bar :comments="false" :answers="true" :data="item"></interact-bar>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="qa.list.length==0 && qa.loadStatus=='noMore'" class="empty">
|
||||
<u-empty icon="search" text=""></u-empty>
|
||||
<!-- <u-empty icon="search" text=""></u-empty>
|
||||
<view class="agreeTip">抱歉暂时没有找到相关内容,</view>
|
||||
<view class="agreeTip">
|
||||
是否要去<text class="productAgree" @click="toProductAgree">“提个意见”</text>呢
|
||||
</view> -->
|
||||
<u-empty
|
||||
text="没有查找到相关内容"
|
||||
icon="../../static/images/seach-empt.png">
|
||||
|
||||
Reference in New Issue
Block a user