Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b6ff8d26
authored
Jan 16, 2025
by
huyue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复编辑省编辑不了的问题
1 parent
a82ab81a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
19 deletions
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/edit.html
html/merchant/map.html
html/merchant/add.html
View file @
b6ff8d2
...
...
@@ -1170,15 +1170,15 @@
cityIdx
=
merchantForm
.
cityName
provincecode
=
merchantForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
if
(
municipality
)
{
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
}
}
//
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
//
var municipality = municipalities.find(item => item == provinceIdx)
//
if (municipality) {
// //
cityIdx = cityIdx.slice(0, 2) + '城区'
//
if (municipality === '重庆市') {
//
provincecode = provincecode.slice(0, 4)
//
provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县')
//
}
//
}
// 判断省市是否匹配
// if (merchantForm.provinceName) {
// if (merchantForm.provinceName !== provinceIdx || merchantForm.cityName !== cityIdx) {
...
...
html/merchant/addSubMerchant.html
View file @
b6ff8d2
...
...
@@ -1124,15 +1124,15 @@
// 获取省市
var
provinceIdx
=
fullAddress
.
province
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
if
(
municipality
)
{
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
}
}
//
const municipalities = ['北京市', '天津市', '上海市', '重庆市']
//
var municipality = municipalities.find(item => item == provinceIdx)
//
if (municipality) {
//
cityIdx = cityIdx.slice(0, 2) + '城区'
//
if (municipality === '重庆市') {
//
provincecode = provincecode.slice(0, 4)
//
provincecode == 5001 ? (cityIdx = cityIdx.slice(0, 2) + '城区') : (cityIdx = cityIdx.slice(0, 2) + '郊县')
//
}
//
}
// 判断省市是否匹配
// if (merchantForm.provinceName) {
// if (merchantForm.provinceName !== provinceIdx || merchantForm.cityName !== cityIdx) {
...
...
html/merchant/edit.html
View file @
b6ff8d2
This diff is collapsed.
Click to expand it.
html/merchant/map.html
View file @
b6ff8d2
...
...
@@ -276,8 +276,11 @@
console
.
log
(
res
)
if
(
res
)
{
mapData
.
merchantAddress
=
res
.
surroundingPois
.
length
?
res
.
surroundingPois
[
0
].
address
:
res
.
address
modelVal
(
'merchantAddress'
,
mapData
.
merchantAddress
)
$
(
'#merchantAddress'
).
val
(
mapData
.
merchantAddress
)
// modelVal('merchantAddress', mapData.merchantAddress)
mapData
.
geocoderAddress
=
res
mapData
.
lat
=
res
.
point
.
lat
mapData
.
lng
=
res
.
point
.
lng
}
})
// geocoder.getAddress(marker.getPosition(), function (status, result) {
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment