加油信息
This commit is contained in:
parent
4641b04b65
commit
52379f54d0
@ -17,11 +17,21 @@
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:class="{hide: this.fileList.length >= this.limit}"
|
||||
>
|
||||
<img
|
||||
:src="dialogImageUrl"
|
||||
style="display: block; max-width: 100%; margin: 0 auto;height: 100%"
|
||||
/>
|
||||
<i class="el-icon-plus"></i>
|
||||
<!-- <div style="display: flex;height: 100%;">-->
|
||||
<!-- <img v-if="doorList!=[]"-->
|
||||
<!-- v-for="(item,index) in doorList"-->
|
||||
<!-- :src="item"-->
|
||||
<!-- style="display: block; max-width: 100%; margin: 0 auto;margin-right: 20px"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- <div v-else>-->
|
||||
<img
|
||||
v-if="dialogImageUrl"
|
||||
:src="dialogImageUrl"
|
||||
style="display: block; max-width: 100%; margin: 0 auto;height: 100%"
|
||||
/>
|
||||
<i v-else class="el-icon-plus"></i>
|
||||
<!-- </div>-->
|
||||
</el-upload>
|
||||
|
||||
<!-- 上传提示 -->
|
||||
@ -72,7 +82,8 @@ export default {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
imgUrl:""
|
||||
imgUrl:"",
|
||||
doorUrl:"",
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -86,7 +97,8 @@ export default {
|
||||
headers: {
|
||||
"Access-Token" : getToken(),
|
||||
},
|
||||
fileList: []
|
||||
fileList: [],
|
||||
doorList:[],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -118,6 +130,7 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// this.dialogImageUrl = this.baseUrl + this.imgUrl;
|
||||
this.handlePictureCardPreview();
|
||||
},
|
||||
methods: {
|
||||
@ -194,7 +207,6 @@ export default {
|
||||
},
|
||||
// 预览
|
||||
handlePictureCardPreview(file) {
|
||||
// console.log(file,this.baseUrl , this.imgUrl)
|
||||
if (this.imgUrl != "" && this.imgUrl != undefined){
|
||||
this.dialogImageUrl = this.baseUrl + this.imgUrl;
|
||||
}else {
|
||||
@ -202,6 +214,21 @@ export default {
|
||||
this.dialogImageUrl = file.url;
|
||||
}
|
||||
}
|
||||
if (this.doorUrl != "" && this.doorUrl != undefined && this.doorUrl != []){
|
||||
let list = JSON.parse(this.doorUrl)
|
||||
list.forEach(item => {
|
||||
let data = {name:"",url:""}
|
||||
data.name = item.split("/")[item.split("/").length-1]
|
||||
data.url = this.baseUrl + item
|
||||
this.fileList.push(data)
|
||||
// this.dialogImageUrl = this.baseUrl + item;
|
||||
// this.doorList.push(this.baseUrl + item);
|
||||
})
|
||||
}else {
|
||||
if (file!=undefined){
|
||||
this.dialogImageUrl = file.url;
|
||||
}
|
||||
}
|
||||
// this.dialogVisible = true;
|
||||
},
|
||||
// 对象转成指定字符串分隔
|
||||
|
@ -7,12 +7,12 @@
|
||||
<!-- 上传图片-->
|
||||
<div style="display: flex">
|
||||
<span>店铺logo:</span>
|
||||
<imgUpload1 :imgUrl="store.logo" :limit="1" @input="getImgUrl"></imgUpload1>
|
||||
<imgUpload1 v-if="flag" :imgUrl="store.logo" :limit="1" @input="getImgUrl"></imgUpload1>
|
||||
</div>
|
||||
<!-- 上传图片-->
|
||||
<div style="display: flex">
|
||||
<span>门头照:</span>
|
||||
<imgUpload1 :limit="1" @input="getDoorImgUrl"></imgUpload1>
|
||||
<imgUpload1 v-if="flag" :doorUrl="store.doorstepPhoto" @input="getDoorImgUrl"></imgUpload1>
|
||||
</div>
|
||||
|
||||
<map-componment :pform="form" ref="mapRef" @pform="getForm"></map-componment>
|
||||
@ -62,7 +62,6 @@ import {listQRCode} from "@/api/staff/qrcode";
|
||||
import {ljStoreInfo, updateStore} from "@/api/staff/store";
|
||||
import mapComponment from "@/components/map/mapComponent.vue";
|
||||
import imgUpload from "@/components/ImageUpload/index.vue"
|
||||
import { getToken } from '@/utils/auth'
|
||||
import imgUpload1 from "@/components/map/imgUpload.vue"
|
||||
|
||||
export default {
|
||||
@ -80,15 +79,7 @@ export default {
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
testImgUrl:"",
|
||||
// 图片根目录
|
||||
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||
dataForm:{},
|
||||
// 上传地址
|
||||
uploadAction: process.env.VUE_APP_SERVER_URL + 'backendApi/file/upload',
|
||||
uploadHeader: { 'Access-Token' : getToken() },
|
||||
// 隐藏上传
|
||||
hideUpload: false,
|
||||
flag:false,
|
||||
// 上传文件列表
|
||||
uploadFiles: [
|
||||
{name:"nihao",
|
||||
@ -138,15 +129,17 @@ export default {
|
||||
getImgUrl(val){
|
||||
let list = val.split("/static")
|
||||
this.store.logo = "/static"+list[list.length-1]
|
||||
// this.store.logo = val
|
||||
console.log(this.store.logo)
|
||||
},
|
||||
// 获取图片url地址
|
||||
getDoorImgUrl(val){
|
||||
// console.log(val)
|
||||
// let list = val.split("/")
|
||||
// this.form.logo = list[list.length-1]
|
||||
this.store.doorstepPhoto = val
|
||||
let list = val.split(",")
|
||||
let doorUrl = []
|
||||
list.forEach(item => {
|
||||
doorUrl.push("/static"+item.split("/static")[1])
|
||||
})
|
||||
// console.log(list,doorUrl)
|
||||
this.store.doorstepPhoto = JSON.stringify(doorUrl)
|
||||
// this.store.doorstepPhoto = val
|
||||
},
|
||||
getForm(data){
|
||||
if (data != undefined){
|
||||
@ -160,6 +153,7 @@ export default {
|
||||
ljStoreInfo().then(response => {
|
||||
this.store = response.data
|
||||
console.log(response.data)
|
||||
this.$emit("getUrl",this.store)
|
||||
this.form.lat = this.store.latitude;
|
||||
this.form.lng = this.store.longitude;
|
||||
this.form.address = this.store.address;
|
||||
@ -167,6 +161,7 @@ export default {
|
||||
this.welfare = this.store.welfare.split(",")
|
||||
}
|
||||
this.$refs.mapRef.initAMap();
|
||||
this.flag = true;
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -243,6 +243,13 @@
|
||||
_this.welfare.push(response.data.welfare)
|
||||
}
|
||||
}
|
||||
if (response.data.doorstepPhoto != undefined && response.data.doorstepPhoto != null && response.data.doorstepPhoto != ""){
|
||||
let list = JSON.parse(response.data.doorstepPhoto)
|
||||
_this.list3 = [];
|
||||
list.forEach(item => {
|
||||
_this.list3.push(_this.baseUrl + item)
|
||||
})
|
||||
}
|
||||
}).catch((res) => {
|
||||
uni.showLoading({
|
||||
title: res + "---" + 1
|
||||
|
@ -263,10 +263,12 @@
|
||||
url: '/business/userManager/user/getUserBalance',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
// console.log(res,111222)
|
||||
if (res.code == 200) {
|
||||
this.cardBalance = res.data.cardBalance,
|
||||
if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
|
||||
this.refuelMoney = JSON.parse(res.data.refuelMoney);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -276,7 +278,7 @@
|
||||
method: 'get',
|
||||
params: this.query
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.cardsList = res.data.records
|
||||
}
|
||||
@ -285,13 +287,13 @@
|
||||
// 查询我的积分
|
||||
getUserInfoList() {
|
||||
request({
|
||||
url: '/business/userManager/user/getByUniApp',
|
||||
url: 'business/userManager/user/getByUniApp',
|
||||
method: 'get',
|
||||
params: {
|
||||
chainStoreId: this.chainStoreId
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.code == 200 && res.data!=null) {
|
||||
this.myPoints = res.data.points
|
||||
}
|
||||
})
|
||||
|
@ -8,7 +8,8 @@
|
||||
<view class="top-box">
|
||||
<view class="dis">
|
||||
<view class="top-img">
|
||||
<image src="../../static/logo.png" mode=""></image>
|
||||
<image v-if="store.logo==''||store.logo==null||store.logo==undefined" src="../../static/logo.png" mode=""></image>
|
||||
<image v-else :src="baseUrl+store.logo" mode=""></image>
|
||||
</view>
|
||||
<view style="width: 80%;">
|
||||
<view class="top-title">{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
|
@ -285,8 +285,8 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
// this.orderNo = e.orderNo
|
||||
this.orderNo = "20231201114800ebe24b"
|
||||
this.orderNo = e.orderNo
|
||||
// this.orderNo = "2345202312191043054f3328"
|
||||
},
|
||||
onShow() {
|
||||
this.getOilOrder();
|
||||
|
Loading…
Reference in New Issue
Block a user