详情调用

master
吃肉的饺子 2022-07-31 16:44:43 +08:00
parent 4ba0cbcccb
commit fe6faae0cf
2 changed files with 37 additions and 21 deletions

View File

@ -141,7 +141,6 @@ const request = (method, url, options) => {
// 上传文件 封装请求
const uploadFile = (url, options, type) => {
let tempData = options || {}
console.log(type,7777);
return new Promise((resolve, reject) => {
uni.uploadFile({
url: `${getApp().globalData.hostapi}${url}`,

View File

@ -3,38 +3,40 @@
<view class="pad-zy20 fon24">
<view class="disjbac fon30 bbot pad-sx30">
<view class="colb bold flexs">序号</view>
<view class="col9">LH20220729130234</view>
<view class="col9">{{detail.coding}}</view>
</view>
<view class="disjbac fon30 bbot pad-sx30">
<view class="colb bold flexs">审核状态</view>
<view class="col9">待审核</view>
<view class="col9">{{detail.state_text}}</view>
</view>
<view class="disjbac bbot pad-sx20">
<view class="disjbac bbot pad-sx20" v-if="detail.u_name">
<view class="fon30 colb bold flexs">真实姓名</view>
<view class="col9">测试村</view>
<view class="col9">{{detail.u_name}}</view>
</view>
<view class="disjbac bbot pad-sx20">
<view class="disjbac bbot pad-sx20" v-if="detail.u_name">
<view class="fon30 colb bold flexs">联系方式</view>
<view class="col9">测试村</view>
<view class="col9">{{detail.u_phone}}</view>
</view>
<view class="disjbac fon30 bbot pad-sx30">
<view class="colb bold flexs">社区</view>
<view class="col9">新华社区</view>
<view class="col9">{{detail.community.name}}</view>
</view>
<view class="disjbac fon30 bbot pad-sx30">
<view class="colb bold flexs"></view>
<view class="col9">测试村</view>
<view class="col9">{{detail.village.name}}</view>
</view>
<view class="dis fon30 bbot pad-sx30">
<view class="colb bold flexs">图片</view>
<view class="disac width100 fe">
<image src="" mode="aspectFill" class="width155 radius30 mar-z20"></image>
<view class="disac width100 fe" v-if="detail.images">
<image :src="item" v-for="(item,index) in detail.images.split(',')" :key="index" @tap="preVedio(index,0)" mode="aspectFill" class="width155 radius30 mar-z20"></image>
</view>
</view>
<view class="dis fon30 bbot pad-sx30">
<view class="colb bold flexs">视频</view>
<view class="disac width100 fe">
<image src="" mode="aspectFill" class="width155 radius30 mar-z20"></image>
<view class="disac width100 fe" v-if="detail.videos">
<view class="width155 radius30 mar-z20" v-for="(item,index) in detail.videos.split(',')" :key="index" style="overflow: hidden;" @tap="preVedio(index,1)">
<video :src="item" :controls="false" class="width155 radius30"></video>
</view>
</view>
</view>
<view class="disjb bbot pad-sx20">
@ -99,21 +101,38 @@
data() {
return {
audioText:'',
detail:{}, //
detail:'', //
ifManager:0, //
id:0, //id
}
},
onLoad(op) {
if(op.manager) this.ifManager = op.manager;
if(op.id) this.id = op.id;
//
this.getDetailEv();
this.getDetailEv(op.id);
},
onHide() {
innerAudioContext.stop();
},
methods: {
//
preVedio(index,num){
let arr = [];
let tempArr = [this.detail.images.split(','),this.detail.videos.split(',')][num];
if(tempArr.length){
tempArr.forEach(item=>{
let obj = {
url:item,
type:['image','video'][num]
}
arr.push(obj);
})
}
uni.previewMedia({
current:index,
sources:arr
})
},
//
playVoice() {
if (this.audioText) {
@ -121,13 +140,11 @@
innerAudioContext.play();
}
},
//
getDetailEv(){
this.$requst.post('user/opinionInfo',{id:this.id}).then(res => {
getDetailEv(id){
this.$requst.post('user/opinionInfo',{id}).then(res => {
if(res.code==0){
console.log(res,'社区工单详情');
this.detail = res.data;
this.detail = res.data.opinion;
} else {
this.$toolAll.tools.showToast(res.msg);
}