Compare commits
No commits in common. "d63756e6be2f14a4a610ea9849472394d9ad79fc" and "8ccf1e586033e4dd5f018eb5a88102eaf4a18c9b" have entirely different histories.
d63756e6be
...
8ccf1e5860
|
@ -1,9 +1,4 @@
|
||||||
import request from './requst.js';
|
import request from './requst.js';
|
||||||
// 共用图片上传接口
|
|
||||||
export function uploadImg(data) {
|
export function uploadImg(data) {
|
||||||
return request.upload("/universal/api.upload/upload", data);
|
return request.upload("/universal/api.upload/upload", data);
|
||||||
}
|
|
||||||
// 解决方案列表接口
|
|
||||||
export function getPlanType(data) {
|
|
||||||
return request.get("/universal/api.solution/solution_list", data);
|
|
||||||
}
|
}
|
|
@ -92,7 +92,6 @@
|
||||||
// 底部组件
|
// 底部组件
|
||||||
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
||||||
import arprogress from '@/components/ar-circle-progress/index.vue'
|
import arprogress from '@/components/ar-circle-progress/index.vue'
|
||||||
import { uploadImg } from '@/jsFile/public-api.js';
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
statusNavSlot,
|
statusNavSlot,
|
||||||
|
@ -187,12 +186,6 @@
|
||||||
sourceType:['album','camera'],
|
sourceType:['album','camera'],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
this.userInfo.avatar = res.tempFilePaths[0];
|
this.userInfo.avatar = res.tempFilePaths[0];
|
||||||
// this.$requst.upload('/universal/api.user/avatar',{path:this.userInfo.avatar}).then(res=>{
|
|
||||||
// if(res.code) {
|
|
||||||
// // 查询用户信息
|
|
||||||
// this.checkInfo();
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -233,7 +233,6 @@
|
||||||
import noticeOne from '@/components/notices/notice-one/notice-one.vue';
|
import noticeOne from '@/components/notices/notice-one/notice-one.vue';
|
||||||
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
||||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||||
import {getPlanType} from '@/jsFile/public-api.js';
|
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
|
@ -323,7 +322,7 @@
|
||||||
// 获取当前页面url
|
// 获取当前页面url
|
||||||
this.$toolAll.tools.obtainUrl();
|
this.$toolAll.tools.obtainUrl();
|
||||||
// 调用解决方案类型事件
|
// 调用解决方案类型事件
|
||||||
this.getPlanTypeEv();
|
this.getPlanType();
|
||||||
// 调用增值服务类型
|
// 调用增值服务类型
|
||||||
this.getIncrementServiceType();
|
this.getIncrementServiceType();
|
||||||
// 调用获取常见故障列表事件
|
// 调用获取常见故障列表事件
|
||||||
|
@ -366,6 +365,23 @@
|
||||||
url:`/pages/dataQuery/queryFunction?index=${index}`
|
url:`/pages/dataQuery/queryFunction?index=${index}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 查询解决方案类型
|
||||||
|
getPlanType(){
|
||||||
|
this.$requst.get('/universal/api.solution/solution',{page:1,list_rows:20}).then(res=>{
|
||||||
|
if(res.code) {
|
||||||
|
this.solutionList = [];
|
||||||
|
res.data.data.forEach(item=>{
|
||||||
|
let obj = {
|
||||||
|
id:item.id,
|
||||||
|
title:item.name,
|
||||||
|
imgsrc: app.globalData.hostapi + '/' + item.cover_img,
|
||||||
|
}
|
||||||
|
this.solutionList.push(obj);
|
||||||
|
})
|
||||||
|
// console.log(this.solutionList,340);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 故障报修分类下的点击事件
|
// 故障报修分类下的点击事件
|
||||||
goFaultRepair(index){
|
goFaultRepair(index){
|
||||||
if(index!=2) {
|
if(index!=2) {
|
||||||
|
@ -380,27 +396,6 @@
|
||||||
this.$toolAll.tools.showToast('已催单成功')
|
this.$toolAll.tools.showToast('已催单成功')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询解决方案的推荐方案
|
|
||||||
getPlanTypeEv(){
|
|
||||||
let params = {
|
|
||||||
is_recommend:1,
|
|
||||||
list_rows:200,
|
|
||||||
page:1
|
|
||||||
}
|
|
||||||
getPlanType(params).then(res=>{
|
|
||||||
if(res.code) {
|
|
||||||
this.solutionList = [];
|
|
||||||
res.data.data.forEach(item=>{
|
|
||||||
let obj = {
|
|
||||||
id:item.id,
|
|
||||||
title:item.title,
|
|
||||||
imgsrc: item.cover_img,
|
|
||||||
}
|
|
||||||
this.solutionList.push(obj);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取常见故障推荐列表
|
// 获取常见故障推荐列表
|
||||||
getFaultsList(){
|
getFaultsList(){
|
||||||
this.$requst.post('/universal/api.question/question').then(res=>{
|
this.$requst.post('/universal/api.question/question').then(res=>{
|
||||||
|
@ -409,7 +404,7 @@
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
title:item.title,
|
title:item.title,
|
||||||
imgsrc: item.cover_img,
|
imgsrc: app.globalData.hostapi + '/' + item.cover_img,
|
||||||
content:item.summary,
|
content:item.summary,
|
||||||
views:item.reading
|
views:item.reading
|
||||||
}
|
}
|
||||||
|
@ -418,18 +413,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 前往解决方案、常见故障列表
|
|
||||||
goPlant(index){
|
|
||||||
uni.navigateTo({
|
|
||||||
url:`/pagesB/plan-fault/plan-fault?index=${index}`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 前往解决方案详情、常见故障详情
|
|
||||||
goDetail(index,id) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url:`/pagesB/plan-fault-product-detail/detail?index=${index}&id=${id}`
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 其他分类下的点击事件
|
// 其他分类下的点击事件
|
||||||
otherEv(index) {
|
otherEv(index) {
|
||||||
let otherUrls = [
|
let otherUrls = [
|
||||||
|
@ -441,6 +424,21 @@
|
||||||
url:otherUrls[index]
|
url:otherUrls[index]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 前往解决方案、常见故障列表
|
||||||
|
goPlant(index){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pagesB/plan-fault/plan-fault?index=${index}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 前往解决方案详情、常见故障详情
|
||||||
|
goDetail(index,id) {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url:`/pagesB/plan-fault-product-detail/detail?index=${index}&id=${id}`
|
||||||
|
// })
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pagesB/plan-fault/plan-fault?index=${index}&type_id=${id}`
|
||||||
|
})
|
||||||
|
},
|
||||||
// 前往消息列表页面
|
// 前往消息列表页面
|
||||||
goMessage(){
|
goMessage(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
// 日期转换
|
// 日期转换
|
||||||
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
||||||
// 封面图
|
// 封面图
|
||||||
this.dataObj.cover_img = this.dataObj.cover_img,
|
this.dataObj.cover_img = app.globalData.hostapi + '/' + this.dataObj.cover_img,
|
||||||
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<status-nav :navBarTitle="ifPlanFault" returnColor="#c2c2c2"></status-nav>
|
<status-nav :navBarTitle="ifPlanFault" returnColor="#c2c2c2"></status-nav>
|
||||||
<container-subgroup>
|
<container-subgroup>
|
||||||
<view slot="content" style="margin: 0 -16rpx;" class="fon28">
|
<view slot="content" style="margin: 0 -16rpx;" class="fon28">
|
||||||
<view @tap="goDetail(item.id)" class="bacf radius10 pad-s30 mar-x10 pad-x10 animated fadeIn" v-for="(item,index) in dataList" :key="index">
|
<view @tap="goDetail(item.id)" class="bacf radius10 pad-s30 mar-x10 pad-x10" v-for="(item,index) in dataList" :key="index">
|
||||||
<view class=" pad-zy10 disjbac">
|
<view class=" pad-zy10 disjbac">
|
||||||
<image :src="item.cover_img" mode="aspectFill" lazy-load class="flexs mar-y20" style="width: 240rpx;height: 174rpx;border-radius: 6rpx;"></image>
|
<image :src="item.cover_img" mode="aspectFill" lazy-load class="flexs mar-y20" style="width: 240rpx;height: 174rpx;border-radius: 6rpx;"></image>
|
||||||
<view style="height: 174rpx;" class="width100 disjb fc fon24 posir">
|
<view style="height: 174rpx;" class="width100 disjb fc fon24 posir">
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="bbot mar-s20"></view>
|
<view class="bbot mar-s20"></view>
|
||||||
</view>
|
</view>
|
||||||
<pitera v-if="total==dataList.length && dataList.length" textStr="暂无更多列表数据"></pitera>
|
|
||||||
</view>
|
</view>
|
||||||
</container-subgroup>
|
</container-subgroup>
|
||||||
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据"></nothing-page>
|
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据"></nothing-page>
|
||||||
|
@ -31,30 +30,23 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import rate from '@/components/rate.vue';
|
import rate from '@/components/rate.vue';
|
||||||
import pitera from '@/components/nothing/pitera.vue';
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
rate,
|
rate
|
||||||
pitera
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
rateNum:5,
|
rateNum:5,
|
||||||
ifPlanFault:'',
|
ifPlanFault:'',
|
||||||
current:'',
|
current:'',
|
||||||
size:20,
|
size:10,
|
||||||
page:1,
|
page:1,
|
||||||
total:0,
|
total:0,
|
||||||
type_id:'',//解决方案类型id
|
type_id:'',//解决方案类型id
|
||||||
dataList:[]
|
dataList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
|
||||||
if(this.total != this.dataList.length) {
|
|
||||||
this.page++;
|
|
||||||
this.getPlanFault();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
this.ifPlanFault = `${['解决方案','常见故障'][op.index*1]}`;
|
this.ifPlanFault = `${['解决方案','常见故障'][op.index*1]}`;
|
||||||
this.current = op.index*1;
|
this.current = op.index*1;
|
||||||
|
@ -76,7 +68,7 @@
|
||||||
];
|
];
|
||||||
let params = [
|
let params = [
|
||||||
{
|
{
|
||||||
is_recommend:0,
|
type_id:this.type_id,
|
||||||
list_rows:this.size,
|
list_rows:this.size,
|
||||||
page:this.page
|
page:this.page
|
||||||
},
|
},
|
||||||
|
@ -92,7 +84,7 @@
|
||||||
res.data.data.forEach(item=>{
|
res.data.data.forEach(item=>{
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
cover_img: item.cover_img,
|
cover_img: app.globalData.hostapi + '/' + item.cover_img,
|
||||||
title:item.title,//标题
|
title:item.title,//标题
|
||||||
summary:item.summary,//描述
|
summary:item.summary,//描述
|
||||||
hot:item.hot,//热度
|
hot:item.hot,//热度
|
||||||
|
@ -100,6 +92,7 @@
|
||||||
}
|
}
|
||||||
this.dataList.push(obj);
|
this.dataList.push(obj);
|
||||||
})
|
})
|
||||||
|
console.log(this.dataList);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue