2022-03-22 10:15:22 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<status-nav :navBarTitle="ifPlanFault" returnColor="#c2c2c2"></status-nav>
|
|
|
|
|
<container-subgroup>
|
|
|
|
|
<view slot="content" style="margin: 0 -16rpx;" class="fon28">
|
2022-04-08 10:43:32 +00:00
|
|
|
|
<view @tap="goDetail(item.id)" class="bacf radius10 pad-s30 mar-x10 pad-x10 animated fadeIn" v-for="(item,index) in dataList" :key="index">
|
2022-03-22 10:15:22 +00:00
|
|
|
|
<view class=" pad-zy10 disjbac">
|
2022-03-24 08:34:50 +00:00
|
|
|
|
<image :src="item.cover_img" mode="aspectFill" lazy-load class="flexs mar-y20" style="width: 240rpx;height: 174rpx;border-radius: 6rpx;"></image>
|
2022-03-22 10:15:22 +00:00
|
|
|
|
<view style="height: 174rpx;" class="width100 disjb fc fon24 posir">
|
|
|
|
|
<view>
|
2022-03-24 08:34:50 +00:00
|
|
|
|
<view class="clips1 fon28 bold col0 pad-y50">{{item.title}}</view>
|
|
|
|
|
<view class="col9 clips2 line-h40">{{item.summary}}</view>
|
2022-03-22 10:15:22 +00:00
|
|
|
|
</view>
|
|
|
|
|
<view class="disjbac col9">
|
|
|
|
|
<view class="disac">
|
2022-03-24 08:34:50 +00:00
|
|
|
|
热度:<rate :size="32" :gutter="10" :readonly="true" v-model="item.hot*1"></rate>
|
2022-03-22 10:15:22 +00:00
|
|
|
|
</view>
|
2022-03-24 08:34:50 +00:00
|
|
|
|
<view>{{item.reading}}人已查阅</view>
|
2022-03-22 10:15:22 +00:00
|
|
|
|
</view>
|
|
|
|
|
<image src="/static/public/icon-plan-fire.png" mode="widthFix" style="width: 29rpx;height: 43rpx;position: absolute;right: 10rpx;top: -6rpx;"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="bbot mar-s20"></view>
|
|
|
|
|
</view>
|
2022-04-08 10:43:32 +00:00
|
|
|
|
<pitera v-if="total==dataList.length && dataList.length" textStr="暂无更多列表数据"></pitera>
|
2022-03-22 10:15:22 +00:00
|
|
|
|
</view>
|
|
|
|
|
</container-subgroup>
|
2022-04-06 03:24:55 +00:00
|
|
|
|
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据"></nothing-page>
|
2022-03-22 10:15:22 +00:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import rate from '@/components/rate.vue';
|
2022-04-08 10:43:32 +00:00
|
|
|
|
import pitera from '@/components/nothing/pitera.vue';
|
2022-03-22 10:15:22 +00:00
|
|
|
|
export default {
|
|
|
|
|
components:{
|
2022-04-08 10:43:32 +00:00
|
|
|
|
rate,
|
|
|
|
|
pitera
|
2022-03-22 10:15:22 +00:00
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
rateNum:5,
|
|
|
|
|
ifPlanFault:'',
|
2022-03-24 08:34:50 +00:00
|
|
|
|
current:'',
|
2022-04-08 10:43:32 +00:00
|
|
|
|
size:20,
|
2022-03-24 08:34:50 +00:00
|
|
|
|
page:1,
|
|
|
|
|
total:0,
|
2022-04-06 03:24:55 +00:00
|
|
|
|
type_id:'',//解决方案类型id
|
2022-03-24 08:34:50 +00:00
|
|
|
|
dataList:[]
|
2022-03-22 10:15:22 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2022-04-08 10:43:32 +00:00
|
|
|
|
onReachBottom() {
|
|
|
|
|
if(this.total != this.dataList.length) {
|
|
|
|
|
this.page++;
|
|
|
|
|
this.getPlanFault();
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-03-22 10:15:22 +00:00
|
|
|
|
onLoad(op) {
|
|
|
|
|
this.ifPlanFault = `${['解决方案','常见故障'][op.index*1]}`;
|
|
|
|
|
this.current = op.index*1;
|
2022-04-06 03:24:55 +00:00
|
|
|
|
if(op.type_id!=undefined) this.type_id = op.type_id;
|
2022-03-24 08:34:50 +00:00
|
|
|
|
this.getPlanFault();
|
2022-03-22 10:15:22 +00:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 去新产品详情
|
2022-03-24 08:34:50 +00:00
|
|
|
|
goDetail(id){
|
2022-03-22 10:15:22 +00:00
|
|
|
|
uni.navigateTo({
|
2022-03-24 08:34:50 +00:00
|
|
|
|
url:`/pagesB/plan-fault-product-detail/detail?index=${this.current}&id=${id}`
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 查询常见故障、解决方案列表
|
|
|
|
|
getPlanFault(){
|
|
|
|
|
let url = [
|
|
|
|
|
'/universal/api.solution/solution_list',
|
|
|
|
|
'/universal/api.question/question_list'
|
|
|
|
|
];
|
|
|
|
|
let params = [
|
|
|
|
|
{
|
2022-04-08 10:43:32 +00:00
|
|
|
|
is_recommend:0,
|
2022-03-24 08:34:50 +00:00
|
|
|
|
list_rows:this.size,
|
|
|
|
|
page:this.page
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
list_rows:this.size,
|
|
|
|
|
page:this.page
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
// 常见故障
|
|
|
|
|
this.$requst.get(url[this.current],params[this.current]).then(res=>{
|
|
|
|
|
if(res.code==1) {
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
res.data.data.forEach(item=>{
|
|
|
|
|
let obj = {
|
|
|
|
|
id:item.id,
|
2022-04-08 10:43:32 +00:00
|
|
|
|
cover_img: item.cover_img,
|
2022-03-24 08:34:50 +00:00
|
|
|
|
title:item.title,//标题
|
|
|
|
|
summary:item.summary,//描述
|
|
|
|
|
hot:item.hot,//热度
|
|
|
|
|
reading:item.reading//查阅
|
|
|
|
|
}
|
|
|
|
|
this.dataList.push(obj);
|
|
|
|
|
})
|
|
|
|
|
}
|
2022-03-22 10:15:22 +00:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
</style>
|