附件回显相关

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' import config from '@/config'
const baseUrl = config.baseUrl const baseUrl = config.baseUrl
Vue.prototype.$baseUrl = baseUrl; Vue.prototype.$baseUrl = baseUrl;
const baseImageUrl = config.baseImageUrl
Vue.prototype.$baseImageUrl = baseImageUrl
const wsUrl = config.wsUrl const wsUrl = config.wsUrl
Vue.prototype.$wsUrl = wsUrl; Vue.prototype.$wsUrl = wsUrl;
@ -93,4 +95,4 @@ export function createApp() {
app app
} }
} }
// #endif // #endif

View File

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

View File

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

View File

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

View File

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

View File

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