Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
GaoQuYingJiH5-ASD
Commits
937d9ca1
Commit
937d9ca1
authored
Jun 11, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 图片显示自定义url格式 修改
parent
b487ed54
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
24 deletions
+82
-24
axios_http.js
sdk/axios_http.js
+4
-4
axios_http3.js
sdk/axios_http3.js
+2
-2
_shanghu_detail-edit.html
src/_shanghu_detail-edit.html
+54
-9
_shanghu_detail-edit.js
src/_shanghu_detail-edit.js
+22
-9
No files found.
sdk/axios_http.js
View file @
937d9ca1
...
...
@@ -17,12 +17,12 @@ axios.defaults.headers.post['Content-Type'] = 'application/json'
// 商户token
axios
.
defaults
.
headers
.
common
[
'
Authorization
'
]
=
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxNTcyMTAzMTg4NiIsImxvZ2luX3VzZXJfa2V5IjoiNGJjY2JjYzUtNmY0Yy00ZDhlLWJiYzEtZjYzMzVlZDBlZTgwIn0.j3jEfHzeu3kklm60kKCirwwyKaWD51ABicOzxEnuFOfGe63FFqYOQ122ojAhukbInnKj4try3DjrST6wNDVjVQ
'
//
axios.defaults.headers.common['Authorization'] =
//
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxNTcyMTAzMTg4NiIsImxvZ2luX3VzZXJfa2V5IjoiNGJjY2JjYzUtNmY0Yy00ZDhlLWJiYzEtZjYzMzVlZDBlZTgwIn0.j3jEfHzeu3kklm60kKCirwwyKaWD51ABicOzxEnuFOfGe63FFqYOQ122ojAhukbInnKj4try3DjrST6wNDVjVQ'
// admin账号token
//
axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNTljMWVhMTMtODNmYy00OWI2LWI5YzMtM2VkNzliODFhZjg4In0.XHl0IpagNwLJBqW_s2n6Kzhs9eY-TrMUBfAO8oeikYRUH72eshEXwMsTyTWgVnX_okY4tuB4U124AeF6EO_qiQ
'
axios
.
defaults
.
headers
.
common
[
'
Authorization
'
]
=
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiOTEyODc0N2ItNGE4NC00MWRjLTg0ZGUtZTY1ODNkMzBiNDcwIn0.w_JRlifng-sUQqvGnuRFH5-wiL-1tfwI1cF7E97gjaOZ37bvRQld3120Myf9MYqLtVHUVX_vhlcBj7Kmg9exZw
'
// 请求拦截器
...
...
sdk/axios_http3.js
View file @
937d9ca1
...
...
@@ -16,8 +16,8 @@ if (window.env == 'dev') {
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6IjNjMmRiMWFiLWIyZGMtNDBjYi04YjM5LWRiNTJmM2VmYzNkYyJ9.sfZyPP-COShNCjwxKR26zGDsPHXss97gu7JEpaMapIZyMQEsxzMigVickcqdhaqDwTRcfr0IxAj64vnrriS9Cw
'
// admin账号token
//
axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNTljMWVhMTMtODNmYy00OWI2LWI5YzMtM2VkNzliODFhZjg4In0.XHl0IpagNwLJBqW_s2n6Kzhs9eY-TrMUBfAO8oeikYRUH72eshEXwMsTyTWgVnX_okY4tuB4U124AeF6EO_qiQ
'
axios
.
defaults
.
headers
.
common
[
'
Authorization
'
]
=
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiOTEyODc0N2ItNGE4NC00MWRjLTg0ZGUtZTY1ODNkMzBiNDcwIn0.w_JRlifng-sUQqvGnuRFH5-wiL-1tfwI1cF7E97gjaOZ37bvRQld3120Myf9MYqLtVHUVX_vhlcBj7Kmg9exZw
'
}
else
{
axios
.
defaults
.
baseURL
=
'
https://gqyjpt.weihai.cn/prod-api
'
...
...
src/_shanghu_detail-edit.html
View file @
937d9ca1
...
...
@@ -73,7 +73,7 @@
<div
class=
"form-input-wrap"
>
<input
type=
"text"
v-model=
"formData.
owner
"
v-model=
"formData.
merchantName
"
class=
"form-input"
:disabled=
"flag=='XQ'"
/>
...
...
@@ -230,16 +230,15 @@
<div
style=
"position: relative;"
v-for=
"(imgItem, index) in formData.floorPlanPhotos"
>
<img
:src=
"previewUrl + imgItem"
alt=
"平面图"
style=
"width: 1.6rem; height: 1.6rem;"
@
click=
"showImage(formData.floorPlanPhotos, index)"
/>
<div
class=
"van-uploader__preview-delete"
@
click=
"handleDeleteFloorPlan(index)"
><i
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
>
<!----
>
</i></div>
<div
v-if=
"flag=='XG'"
class=
"van-uploader__preview-delete"
@
click=
"handleDeleteFloorPlan(index, 'floorPlan')"
><i
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
<div
v-if=
"formData.floorPlanPhotos.length<4"
>
<div
v-if=
"formData.floorPlanPhotos.length<4
&& flag=='XG'
"
>
<van-uploader
:before-read=
"beforeRead"
:after-read=
"
afterRead
"
:after-read=
"
(file) => afterRead(file, 'floorPlan')
"
class=
"uploader-wrapper"
:deletable=
"false"
:preview-image=
"false"
...
...
@@ -257,7 +256,31 @@
<span
class=
"form-label"
>
营业执照
</span>
<span></span>
</h5>
<div
v-if=
"flag=='XG'"
>
<!-- 详情模式 -->
<div
class=
"img-wrapper"
style=
"display: flex;gap:.16rem;"
>
<div
style=
"position: relative;"
v-for=
"(imgItem, index) in formData.businessLicensePhotos"
>
<img
:src=
"previewUrl + imgItem"
style=
"width: 1.6rem; height: 1.6rem;"
@
click=
"showImage(formData.businessLicensePhotos, index)"
/>
<div
v-if=
"flag=='XG'"
class=
"van-uploader__preview-delete"
@
click=
"handleDeleteFloorPlan(index, 'license')"
><i
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
<div
v-if=
"formData.businessLicensePhotos.length<1 && flag=='XG' "
>
<van-uploader
:before-read=
"beforeRead"
:after-read=
"(file) => afterRead(file, 'license')"
class=
"uploader-wrapper"
:deletable=
"false"
:preview-image=
"false"
>
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
>
</van-uploader>
</div>
</div>
<!-- <div v-if="flag=='XG'">
<van-uploader
v-model="formData.businessLicensePhotosH5"
:max-count="1"
...
...
@@ -274,14 +297,36 @@
@click="showImage(formData.businessLicensePhotos,subIndex)"
/>
</div>
</div>
</div>
-->
<div>
<h5
class=
"imager-item-title"
>
<span
class=
"form-label"
>
门头图
</span>
<span></span>
</h5>
<div
v-if=
"flag=='XG'"
>
<!-- 详情模式 -->
<div
class=
"img-wrapper"
style=
"display: flex;gap:.16rem;"
>
<div
style=
"position: relative;"
v-for=
"(imgItem, index) in formData.storefrontPhotos"
>
<img
:src=
"previewUrl + imgItem"
style=
"width: 1.6rem; height: 1.6rem;"
@
click=
"showImage(formData.storefrontPhotos, index)"
/>
<div
v-if=
"flag=='XG'"
class=
"van-uploader__preview-delete"
@
click=
"handleDeleteFloorPlan(index, 'storeFront')"
><i
class=
"van-icon van-icon-cross van-uploader__preview-delete-icon"
></i></div>
</div>
<div
v-if=
"formData.storefrontPhotos.length<1 && flag=='XG' "
>
<van-uploader
:before-read=
"beforeRead"
:after-read=
"(file) => afterRead(file, 'storeFront')"
class=
"uploader-wrapper"
:deletable=
"false"
:preview-image=
"false"
>
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
>
</van-uploader>
</div>
</div>
<!-- <div v-if="flag=='XG'">
<van-uploader
v-model="formData.storefrontPhotosH5"
:max-count="1"
...
...
@@ -297,7 +342,7 @@
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
@click="showImage(formData.storefrontPhotos,subIndex)"
/>
</div>
</div>
-->
</div>
<button
...
...
src/_shanghu_detail-edit.js
View file @
937d9ca1
...
...
@@ -64,7 +64,7 @@ window.addEventListener('load', function () {
mounted
()
{
// 详情编辑权限控制
const
userType
=
gemhoUtil
.
getCookie
(
'
userType
'
)
if
(
userType
!
==
'
wgy
'
)
{
if
(
userType
==
'
wgy
'
)
{
this
.
flag
=
'
XG
'
}
else
{
this
.
flag
=
'
XQ
'
...
...
@@ -104,8 +104,14 @@ window.addEventListener('load', function () {
});
},
// 处理平面图删除
handleDeleteFloorPlan
(
index
)
{
handleDeleteFloorPlan
(
index
,
type
)
{
if
(
type
===
'
floorPlan
'
){
this
.
formData
.
floorPlanPhotos
.
splice
(
index
,
1
);
}
else
if
(
type
===
'
license
'
){
this
.
formData
.
businessLicensePhotos
.
splice
(
index
,
1
);
}
else
if
(
type
===
'
storeFront
'
){
this
.
formData
.
storefrontPhotos
.
splice
(
index
,
1
);
}
},
beforeRead
(
file
)
{
if
(
!
[
'
image/png
'
,
'
image/jpeg
'
,
'
image/jpg
'
].
includes
(
file
.
type
)){
...
...
@@ -124,7 +130,8 @@ window.addEventListener('load', function () {
}
return
true
;
},
afterRead
(
file
)
{
// 调用爱山东中台系统,将数据流传递过去
afterRead
(
file
,
type
)
{
// 调用爱山东中台系统,将数据流传递过去
alert
(
type
)
vant
.
Toast
.
loading
({
message
:
'
正在处理...
'
,
forbidClick
:
true
,
...
...
@@ -152,7 +159,13 @@ window.addEventListener('load', function () {
.
then
(
value
=>
{
console
.
log
(
value
,
'
value图片上********
'
);
// 处理后端返回的数据
if
(
value
){
// 返回信息不为空,则进行解密操作
if
(
type
===
'
floorPlan
'
){
this
.
formData
.
floorPlanPhotos
.
push
(
value
.
fileName
)
}
else
if
(
type
===
'
license
'
){
this
.
formData
.
businessLicensePhotos
.
push
(
value
.
fileName
)
}
else
if
(
type
===
'
storeFront
'
){
this
.
formData
.
storefrontPhotos
.
push
(
value
.
fileName
)
}
// 可根据后端返回的数据做进一步处理,如显示上传成功信息等
setTimeout
(()
=>
{
vant
.
Toast
.
clear
()
...
...
@@ -463,10 +476,10 @@ window.addEventListener('load', function () {
})
return
}
// 删除对应参数
delete
reqParam
[
'
floorPlanPhotosH5
'
]
delete
reqParam
[
'
businessLicensePhotosH5
'
]
delete
reqParam
[
'
storefrontPhotosH5
'
]
reqParam
.
floorPlanPhotos
=
this
.
formData
.
floorPlanPhotos
.
join
(
'
,
'
)
reqParam
.
businessLicensePhotos
=
this
.
formData
.
businessLicensePhotos
.
join
(
'
,
'
)
reqParam
.
storefrontPhotos
=
this
.
formData
.
storefrontPhotos
.
join
(
'
,
'
)
http3
.
put
(
'
/gq/merchant
'
,
reqParam
).
then
((
res
)
=>
{
console
.
log
(
'
添加结果
'
,
res
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment