From 52379f54d0d07cad8d6481da1798a6f47554d513 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Tue, 19 Dec 2023 18:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E6=B2=B9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/components/map/imgUpload.vue | 43 +++++++++++++++---- .../src/views/staff/storeInfo/index.vue | 31 ++++++------- gasStation-uni/pages/index/index.vue | 7 +++ gasStation-uni/pages/my/my.vue | 10 +++-- gasStation-uni/pages/refuel/refuel.vue | 3 +- .../pagesRefuel/orderDetail/index.vue | 4 +- 6 files changed, 65 insertions(+), 33 deletions(-) diff --git a/fuintAdmin/src/components/map/imgUpload.vue b/fuintAdmin/src/components/map/imgUpload.vue index 5a3daf29c..53870c0e0 100644 --- a/fuintAdmin/src/components/map/imgUpload.vue +++ b/fuintAdmin/src/components/map/imgUpload.vue @@ -17,11 +17,21 @@ :on-preview="handlePictureCardPreview" :class="{hide: this.fileList.length >= this.limit}" > - - + + + + + + + + + + + @@ -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; }, // 对象转成指定字符串分隔 diff --git a/fuintAdmin/src/views/staff/storeInfo/index.vue b/fuintAdmin/src/views/staff/storeInfo/index.vue index 6dc9d6b53..ecc2eeea2 100644 --- a/fuintAdmin/src/views/staff/storeInfo/index.vue +++ b/fuintAdmin/src/views/staff/storeInfo/index.vue @@ -7,12 +7,12 @@
店铺logo: - +
门头照: - +
@@ -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; }) }, diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 674ab6fdc..1753e0357 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -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 diff --git a/gasStation-uni/pages/my/my.vue b/gasStation-uni/pages/my/my.vue index 11c1a125f..e1f8055ee 100644 --- a/gasStation-uni/pages/my/my.vue +++ b/gasStation-uni/pages/my/my.vue @@ -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 } }) diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index f82e57553..fb5038d53 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -8,7 +8,8 @@ - + + {{store.name}}{{store.description ? "("+store.description+")" : ""}} diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index e6e2b481f..e4cff2853 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -285,8 +285,8 @@ } }, onLoad(e) { - // this.orderNo = e.orderNo - this.orderNo = "20231201114800ebe24b" + this.orderNo = e.orderNo + // this.orderNo = "2345202312191043054f3328" }, onShow() { this.getOilOrder();