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