附件回显相关

This commit is contained in:
ChuShiZ 2024-09-20 17:00:33 +08:00
parent 212d8ece1f
commit e30a907fa7
6 changed files with 78 additions and 70 deletions

View File

@ -2,6 +2,8 @@ import App from './App'
import config from '@/config'
const baseUrl = config.baseUrl
Vue.prototype.$baseUrl = baseUrl;
const baseImageUrl = config.baseImageUrl
Vue.prototype.$baseImageUrl = baseImageUrl
const wsUrl = config.wsUrl
Vue.prototype.$wsUrl = wsUrl;
@ -93,4 +95,4 @@ export function createApp() {
app
}
}
// #endif
// #endif

View File

@ -9,7 +9,7 @@
</view> -->
<view class="touxiang">
<image :src=" baseUrl + uesrInfo.avatar" mode=""></image>
<image :src="baseImageUrl + uesrInfo.avatar" mode=""></image>
</view>
<view>
<view class="t-zi1">{{uesrInfo.realName || '用户昵称'}}</view>
@ -226,6 +226,7 @@
id: '',
value5: '',
baseUrl: this.$baseUrl,
baseImageUrl: this.$baseImageUrl,
fileList1: [],
uesrInfo: {},
show: false,

View File

@ -6,7 +6,7 @@
<view class="t-left">
<view class="touxiang" >
<u-upload
:fileList="fileList6"
@afterRead="afterRead"
@delete="deletePic"
@ -16,7 +16,7 @@
width="60"
height="60"
>
<image :src=" baseUrl + userInfo.avatar " v-if="userInfo.avatar != '' " style="width: 60px; height: 60px; border-radius: 50%; z-index: 99;" mode="" ></image>
<image :src="baseImageUrl + userInfo.avatar " v-if="userInfo.avatar != '' " style="width: 60px; height: 60px; border-radius: 50%; z-index: 99;" mode="" ></image>
</u-upload>
</view>
<view >
@ -30,14 +30,14 @@
<!-- <view class="t-biao">5.0 <uni-icons type="star-filled" size="18" color="#fffff"></uni-icons> </view> -->
</view>
</view>
</view>
<view class="t-bottom">
<view class="top-box">
<view class="t-lan">300</view>
<view class="t-hui">累计完成()</view>
</view>
<view class="top-box" style="border: none;">
<view class="t-lan">5.0</view>
<view class="t-hui">当前星级</view>
@ -45,9 +45,9 @@
</view>
</view>
<view class="t-ybr">
</view>
<view class="hui-content">
<view class="">
<view class="dix">
@ -107,7 +107,7 @@
</view>
</view>
</view>
<!-- <view class="anniu" @click="getnaiv()">
<view class="">测试页</view>
</view> -->
@ -134,6 +134,7 @@
{text:'已完成',id:3}
],
baseUrl:this.$baseUrl,
baseImageUrl: this.$baseImageUrl,
userInfo:{},
tabindex:0,
title: 'user',
@ -158,7 +159,7 @@
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
})
})
for (let i = 0; i < lists.length; i++) {
@ -189,18 +190,18 @@
});
},
async getUserinfo(){
let res = await request({
url: '/rescue/getRescueDriverInfo',
method: 'get',
})
console.log('司机13',res);
if(res.code == 200){
uni.setStorageSync('userinfo',res.data.user)
this.userInfo = res.data.user
}
},
gorefuel(){
uni.navigateTo({
@ -240,13 +241,13 @@
display: flex;
align-items: center;
}
.htzit{
display: flex;
align-items: center;
font-size: 15px;
color: #999999;
}
.yey{
font-size: 24px;
@ -323,7 +324,7 @@
padding-bottom: 15px;
border-bottom: 1px solid #EEEEEE;
}
.dis-tt{
display: flex;
align-items: center;
@ -356,7 +357,7 @@
border-radius: 50%;
overflow: hidden;
// background-color: #E3E3E3;
border:1px solid white;
border:1px solid white;
margin-right: 15px;
}
}
@ -375,7 +376,7 @@
text-align: center;
}
.t-right{
}
.t-zi2{
font-size: 14px;
@ -398,7 +399,7 @@
height: 100%;
border-right: 1px solid #EEEEEE;
text-align: center;
}
.t-lan{
font-size: 28px;
@ -418,7 +419,7 @@
padding-top: 90px;
display: flex;
justify-content: space-around;
}
.anniu{
width: 95%;
@ -462,7 +463,7 @@
justify-content: space-between;
box-sizing: border-box;
padding: 15px;
}
.right-box{
width: 85%;
@ -476,7 +477,7 @@
.ddis{
display: flex;
margin-top: 10px;
}
.hui-twotwo{
width: 90%;
@ -487,10 +488,10 @@
margin: 10px auto;
border-radius: 8px;
margin-top: 0px;
box-sizing: border-box;
padding: 15px;
}
.content-box{
width: 100%;
@ -518,9 +519,9 @@
font-weight: 400;
color: #FFFFFF;
}
.hui-zi{
font-size: 14px;
font-weight: 400;
color: #AAAAAA;

View File

@ -143,7 +143,7 @@
filePath: url,
}).then((res) => {
console.log('images', res.fileName);
this.showImage = res.fileName
this.showImage = this.$baseImageUrl + res.data.url
})
},
@ -379,4 +379,4 @@
border-radius: 4px;
margin-top: 20px;
}
</style>
</style>

View File

@ -179,7 +179,7 @@
</view>
<view class="img-boxs">
<view class="g-img" v-for="(item,index) in detailsData.rescueSceneImageList" :key="index">
<image :src=" baseUrl + item " mode=""></image>
<image :src="baseImageUrl + item " mode=""></image>
</view>
</view>
@ -203,7 +203,7 @@
<view class="wrap-box" style="margin-left: 20px;" v-if="item.images">
<view class="img-box" v-for="(items,index) in item.images.split(',') "
@click="lookimg(index,item.images.split(','))" :key="index">
<image :src="baseUrl + items " mode=""></image>
<image :src="baseImageUrl + items " mode=""></image>
</view>
</view>
</view>
@ -256,6 +256,7 @@
rescueDetail: '',
id: 0,
baseUrl: this.$baseUrl,
baseImageUrl: this.$baseImageUrl,
type: 'center',
msgType: 'success',
imageList: [],
@ -394,7 +395,7 @@
let resList = [];
tmpList.forEach(it => {
resList.push(this.baseUrl + it)
resList.push(this.baseImageUrl + it)
})
uni.previewImage({
@ -437,7 +438,7 @@
console.log('fee_type', res);
this.qdList = res.data
})
request({
url: '/rescue/dict/data/type/rescue_car_type',
method: 'get',
@ -445,7 +446,7 @@
this.carList = res.data
console.log('rescue_car_type', res);
})
},
getcarindex(index) {
this.carindex = index
@ -1052,4 +1053,4 @@
background: #0D2E8D !important;
color: white;
}
</style>
</style>

View File

@ -81,7 +81,7 @@
</view>
</view>
</view>
<view class="tinput">
<view class="text1"> <text class="hong1">*</text> 备注</view>
<view class="you">
@ -92,7 +92,7 @@
<view class="text1"> <text class="hong1">*</text> 现场图片</view>
<view class="you">
<input type="text" placeholder="请输入现场图片">
</view>
</view>
</view>
<!-- 上传图片 -->
<u-upload
@ -103,14 +103,14 @@
multiple
:maxCount="10"
></u-upload>
<view class="anniu">
<text>发起</text>
</view>
<view style="width: 100%; height: 60px;"></view>
</view>
<tabBar></tabBar>
</view>
</template>
@ -124,9 +124,9 @@
data(){
return{
fileList1: [],
id:1,
carzhi:0,
carzhi:0,
car:[
{text:'大'},
{text:'中'},
@ -136,7 +136,7 @@
manei:[
{text:'现金'},
{text:'签单'},
],
province:'',
city:'',
@ -146,7 +146,7 @@
city1:'',
area1:'',
four1:'',
}
},
onLoad(option) {
@ -168,7 +168,7 @@
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
})
})
for (let i = 0; i < lists.length; i++) {
@ -184,15 +184,18 @@
},
uploadFilePromise(url) {
console.log(url);
upload({
url:'/common/upload',
filePath: url,
}).then((res)=>{
console.log(res);
})
return new Promise(resolve => {
upload({
url:'/common/upload',
filePath: url,
}).then((res)=>{
console.log(res);
resolve(this.$baseImageUrl + res.data.url)
})
})
// return new Promise((resolve, reject) => {
// let a = uni.uploadFile({
// url: 'http://192.168.1.2:8080/common/upload', //
@ -203,14 +206,14 @@
// },
// success: (res) => {
// setTimeout(() => {
// resolve(res.data.data)
// resolve(this.$baseImageUrl + res.data.url)
// }, 1000)
// }
// });
// })
},
//
getmap(){
let that =this
uni.chooseLocation({
@ -238,10 +241,10 @@
that.four = address.replace(that.province,'').replace(that.city,'').replace(that.area,'');
};
console.log(that.four);
}
});
},
getmap1(){
let that =this
@ -252,8 +255,8 @@
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
console.log(res)
var address = res.address;
var reg = /.+?(省|市|自治区|自治州|县|区)/g;
let addressList=address.match(reg).toString().split(",");
@ -269,15 +272,15 @@
that.four1 = address.replace(that.province,'').replace(that.city,'').replace(that.area,'');
};
console.log(that.four1);
}
});
},
getback(){
uni.navigateBack({
delta:1,
})
})
},
getzhi(index){
this.carzhi = index
@ -286,16 +289,16 @@
this.maneizhi = index
},
//
//
//
//
}
}
</script>
@ -370,7 +373,7 @@
margin-top: 5px;
font-size: 12px;
font-weight: 400;
}
.tinput{
width: 100%;
@ -425,4 +428,4 @@
border-radius: 4px;
margin-top: 20px;
}
</style>
</style>