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
3d1ad0e6
Commit
3d1ad0e6
authored
Oct 11, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:商户详情门头图片爱山东sdk拍照上传功能修改
parent
dde796b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
3 deletions
+112
-3
_shanghu_detail-edit.html
src/_shanghu_detail-edit.html
+16
-2
_shanghu_detail-edit.js
src/_shanghu_detail-edit.js
+96
-1
No files found.
src/_shanghu_detail-edit.html
View file @
3d1ad0e6
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
<span></span>
<span></span>
</h5>
</h5>
<!-- 详情模式 -->
<!-- 详情模式 -->
<div
class=
"img-wrapper"
style=
"display: flex;gap:.16rem;"
>
<
!-- <
div class="img-wrapper" style="display: flex;gap:.16rem;">
<div style="position: relative;" v-for="(imgItem, index) in formData.floorPlanPhotos">
<div style="position: relative;" v-for="(imgItem, index) in formData.floorPlanPhotos">
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage(formData.floorPlanPhotos, index)" />
@click="showImage(formData.floorPlanPhotos, index)" />
...
@@ -217,7 +217,21 @@
...
@@ -217,7 +217,21 @@
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
<img src="../image/code/upload.png" style="width:1.6rem;height: 1.6rem;" alt="" srcset="">
</van-uploader>
</van-uploader>
</div>
</div>
</div>
</div> -->
<div
class=
"img-wrapper"
>
<div
style=
"position: relative;width:1.6rem;float: left;margin-right: .1rem;"
v-for=
"(imgItem, index) in formData.floorPlanPhotos"
>
<img
:src=
"previewUrl + imgItem"
style=
"width: 1.6rem; height: 1.6rem;"
@
click=
"showImage(formData.floorPlanPhotos, index)"
/>
<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<6 && flag=='XG' "
>
<img
src=
"../image/code/upload.png"
style=
"width:1.6rem;height: 1.6rem;"
alt=
""
srcset=
""
@
click=
"paizhao('floorPlan',4)"
>
</div>
</div>
</div>
</div>
<div>
<div>
<h5
class=
"imager-item-title"
>
<h5
class=
"imager-item-title"
>
...
...
src/_shanghu_detail-edit.js
View file @
3d1ad0e6
...
@@ -49,6 +49,11 @@ window.addEventListener('load', function () {
...
@@ -49,6 +49,11 @@ window.addEventListener('load', function () {
businessHours
:
''
,
businessHours
:
''
,
type
:
''
,
// 新增类型字段
type
:
''
,
// 新增类型字段
photos
:
[],
// 新增图片数组字段
photos
:
[],
// 新增图片数组字段
floorPlanPhotos
:[],
businessLicensePhotos
:[],
storefrontPhotos
:[],
floorEvacuationPlan
:[],
},
},
dict4changhsuoType
:
[],
dict4changhsuoType
:
[],
dict4fangwuType
:
[],
dict4fangwuType
:
[],
...
@@ -106,6 +111,88 @@ window.addEventListener('load', function () {
...
@@ -106,6 +111,88 @@ window.addEventListener('load', function () {
}
}
},
},
methods
:
{
methods
:
{
paizhao
(
photosType
,
maxSelectNum
)
{
VUE
.
photosType
=
photosType
var
data
=
[
"
相册
"
,
"
相机
"
];
lightAppJssdk
.
notification
.
showMediaAlert
({
arg0
:
data
,
success
:
function
(
data
)
{
console
.
log
(
'
选择菜单的数据
'
,
data
,
photosType
,
maxSelectNum
)
// formData.append('file', file.file); // 通过FormData构建要上传的文件数据
// alert(data);
var
pam1
=
{
"
url
"
:
BASE_URL
+
'
/common/uploads
'
,
// url:'sdfsdfsd',
"
fileKey
"
:
"
files
"
,
// "fileKey": "files",
"
params
"
:
{
},
"
header
"
:
{
'
Authorization
'
:
gemhoUtil
.
getCookie
(
'
token
'
),
},
"
chooseType
"
:
"
chooseFileUpload
"
,
"
transmissionType
"
:
0
,
//1-base64 0-图片地址"maxSize": 10, "maxSelectNum": 9,
"
maxSize
"
:
10
,
"
maxSelectNum
"
:
maxSelectNum
,
}
if
(
data
.
index
==
0
)
{
pam1
.
chooseType
=
"
chooseImageUpload
"
// pam1.fileKey = "file"
}
else
if
(
data
.
index
==
1
)
{
pam1
.
chooseType
=
"
takingPicturesUpload
"
// pam1.fileKey = "picfile"
}
console
.
log
(
'
请求接口i偶路径
'
,
pam1
)
chooseFileUploadTest
(
pam1
)
// setTimeout('onHidePreloaders()', 2000);
},
fail
:
function
(
data
)
{
console
.
log
(
data
);
}
});
function
chooseFileUploadTest
(
pam
)
{
lightAppJssdk
.
uploadFile
.
chooseFileUpload
({
arg0
:
pam
,
success
:
function
(
value
)
{
console
.
log
(
'
chooseFileUpload方法
'
,
value
)
var
photosVar
=
[]
// 根据选择的图片不同进行区分设置
if
(
VUE
.
photosType
===
'
floorPlan
'
){
photosVar
=
VUE
.
formData
.
floorPlanPhotos
}
else
if
(
VUE
.
photosType
===
'
license
'
){
photosVar
=
VUE
.
formData
.
businessLicensePhotos
}
else
if
(
VUE
.
photosType
===
'
storeFront
'
){
photosVar
=
VUE
.
formData
.
storefrontPhotos
}
else
if
(
VUE
.
photosType
===
'
floorEvacuationPlan
'
){
photosVar
=
VUE
.
formData
.
floorEvacuationPlan
}
if
(
!
photosVar
){
// 如果为空字符串则手动重置为[]
photosVar
=
[]
}
console
.
log
(
'
photsVar方法
'
,
JSON
.
stringify
(
photosVar
))
if
(
value
)
{
// VUE.formData.attachmentFile.push(...JSON.parse(value).fileNames)
if
(
gemhoUtil
.
isIOSStrict
()){
// ios直接返回对象
photosVar
.
push
(...
value
.
fileNames
)
}
else
{
// 俺安卓机 返回字符串
photosVar
.
push
(...
JSON
.
parse
(
value
).
fileNames
)
}
if
(
photosVar
.
length
>
maxSelectNum
)
{
const
result
=
photosVar
.
slice
(
0
,
maxSelectNum
)
photosVar
=
result
}
}
},
fail
:
function
(
data1
)
{
console
.
log
(
data1
);
}
});
};
},
// 添加脱敏处理函数
// 添加脱敏处理函数
desensitize
(
value
,
type
)
{
desensitize
(
value
,
type
)
{
if
(
!
value
)
return
''
;
if
(
!
value
)
return
''
;
...
@@ -155,7 +242,7 @@ window.addEventListener('load', function () {
...
@@ -155,7 +242,7 @@ window.addEventListener('load', function () {
}
else
if
(
type
===
'
storeFront
'
){
}
else
if
(
type
===
'
storeFront
'
){
this
.
formData
.
storefrontPhotos
.
splice
(
index
,
1
);
this
.
formData
.
storefrontPhotos
.
splice
(
index
,
1
);
}
else
if
(
type
===
'
floorEvacuationPlan
'
){
}
else
if
(
type
===
'
floorEvacuationPlan
'
){
this
.
formData
.
storefrontPhotos
.
splice
(
index
,
1
);
this
.
formData
.
floorEvacuationPlan
.
splice
(
index
,
1
);
}
}
},
},
beforeRead
(
file
)
{
beforeRead
(
file
)
{
...
@@ -671,15 +758,23 @@ window.addEventListener('load', function () {
...
@@ -671,15 +758,23 @@ window.addEventListener('load', function () {
let
tempData
=
result
.
data
let
tempData
=
result
.
data
if
(
tempData
[
'
businessLicensePhotos
'
]){
if
(
tempData
[
'
businessLicensePhotos
'
]){
tempData
[
'
businessLicensePhotos
'
]
=
tempData
[
'
businessLicensePhotos
'
].
split
(
'
,
'
)
tempData
[
'
businessLicensePhotos
'
]
=
tempData
[
'
businessLicensePhotos
'
].
split
(
'
,
'
)
}
else
{
tempData
[
'
businessLicensePhotos
'
]
=
[]
}
}
if
(
tempData
[
'
floorPlanPhotos
'
]){
if
(
tempData
[
'
floorPlanPhotos
'
]){
tempData
[
'
floorPlanPhotos
'
]
=
tempData
[
'
floorPlanPhotos
'
].
split
(
'
,
'
)
tempData
[
'
floorPlanPhotos
'
]
=
tempData
[
'
floorPlanPhotos
'
].
split
(
'
,
'
)
}
else
{
tempData
[
'
floorPlanPhotos
'
]
=
[]
}
}
if
(
tempData
[
'
storefrontPhotos
'
]){
if
(
tempData
[
'
storefrontPhotos
'
]){
tempData
[
'
storefrontPhotos
'
]
=
tempData
[
'
storefrontPhotos
'
].
split
(
'
,
'
)
tempData
[
'
storefrontPhotos
'
]
=
tempData
[
'
storefrontPhotos
'
].
split
(
'
,
'
)
}
else
{
tempData
[
'
storefrontPhotos
'
]
=
[]
}
}
if
(
tempData
[
'
floorEvacuationPlan
'
]){
if
(
tempData
[
'
floorEvacuationPlan
'
]){
tempData
[
'
floorEvacuationPlan
'
]
=
tempData
[
'
floorEvacuationPlan
'
].
split
(
'
,
'
)
tempData
[
'
floorEvacuationPlan
'
]
=
tempData
[
'
floorEvacuationPlan
'
].
split
(
'
,
'
)
}
else
{
tempData
[
'
floorEvacuationPlan
'
]
=
[]
}
}
this
.
formData
=
tempData
this
.
formData
=
tempData
...
...
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