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
6d9bf509
Commit
6d9bf509
authored
Jun 04, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:消费者登录角色判断,商户图片合并冲突处理
parent
6d47689f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
400 additions
and
517 deletions
+400
-517
index.js
sdk/jssdk2/index.js
+2
-1
_shanghu_detail-edit.html
src/_shanghu_detail-edit.html
+326
-436
_shanghu_detail-edit.js
src/_shanghu_detail-edit.js
+72
-80
No files found.
sdk/jssdk2/index.js
View file @
6d9bf509
...
@@ -123,7 +123,8 @@ function getUserInfo() {
...
@@ -123,7 +123,8 @@ function getUserInfo() {
gemhoUtil
.
setCookie
(
'
token
'
,
result
.
token
,
1
)
// 存储1天后过期
gemhoUtil
.
setCookie
(
'
token
'
,
result
.
token
,
1
)
// 存储1天后过期
// 2025-5-30 08:54:47 新增消费者判断逻辑
// 2025-5-30 08:54:47 新增消费者判断逻辑
gemhoUtil
.
setCookie
(
'
userType
'
,
'
consumers
'
)
// 存储1天后过期
// gemhoUtil.setCookie('userType', 'consumers') // 存储1天后过期
gemhoUtil
.
setCookie
(
'
userType
'
,
result
.
userType
)
// 存储1天后过期
if
(
gemhoUtil
.
getCookie
(
'
userType
'
)
==
'
consumers
'
){
if
(
gemhoUtil
.
getCookie
(
'
userType
'
)
==
'
consumers
'
){
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
let
merId
=
gemhoUtil
.
getParameter
(
'
merId
'
)
...
...
src/_shanghu_detail-edit.html
View file @
6d9bf509
This diff is collapsed.
Click to expand it.
src/_shanghu_detail-edit.js
View file @
6d9bf509
...
@@ -63,20 +63,19 @@ window.addEventListener('load', function () {
...
@@ -63,20 +63,19 @@ window.addEventListener('load', function () {
mounted
()
{
mounted
()
{
// 详情编辑权限控制
// 详情编辑权限控制
const
userType
=
gemhoUtil
.
getCookie
(
'
userType
'
)
const
userType
=
gemhoUtil
.
getCookie
(
'
userType
'
)
if
(
userType
==
'
wgy
'
){
if
(
userType
!
==
'
wgy
'
){
this
.
flag
=
'
XG
'
this
.
flag
=
'
XG
'
}
else
{
}
else
{
this
.
flag
=
'
XQ
'
this
.
flag
=
'
XQ
'
}
}
this
.
detail
()
this
.
detail
()
this
.
getDict4changhsuoType
()
this
.
getDict4fangwuType
()
this
.
getDict4fangwuType
()
this
.
getDict4fangwuyongtuType
()
this
.
getDict4fangwuyongtuType
()
this
.
getDict4businessType
()
this
.
getDict4businessType
()
this
.
getDict4community
()
this
.
getDict4community
()
this
.
getDict4industryType
()
this
.
getDict4industryType
()
// this.getDict4changhsuoType()
},
},
methods
:
{
methods
:
{
viewDetail
(
item
)
{
viewDetail
(
item
)
{
...
@@ -125,7 +124,7 @@ window.addEventListener('load', function () {
...
@@ -125,7 +124,7 @@ window.addEventListener('load', function () {
}
}
})
})
},
},
getDict4
industryType
(
){
getDict4
changhsuoType
(
param
){
http2
.
post
({
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
...
@@ -133,61 +132,38 @@ window.addEventListener('load', function () {
...
@@ -133,61 +132,38 @@ window.addEventListener('load', function () {
reqParams
:
{
reqParams
:
{
page
:
1
,
page
:
1
,
size
:
9999
,
size
:
9999
,
sign
:
20
,
// 行业类型列表
sign
:
21
,
// 场所类型=>行业类别
...
param
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getDict4
industry
Type
()
this
.
getDict4
changhsuo
Type
()
},
0
);
},
0
);
return
return
}
}
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
-行业类型
'
,
JSON
.
parse
(
res
))
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
})
})
},
0
);
},
0
);
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
this
.
dict4
industry
Type
=
result
.
data
.
body
.
data
this
.
dict4
changhsuo
Type
=
result
.
data
.
body
.
data
}
}
})
})
},
},
getDict4community
(){
handleIndustryChange
(
val
){
http2
.
post
({
// 选择后晴空下级下拉框值
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
this
.
dict4changhsuoType
=
[]
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
this
.
getDict4changhsuoType
({
interfacePrivateKey
:
API_KEY_MAP
[
"
page
"
][
"
privateKey
"
],
industryId
:
this
.
formData
.
industryType
reqParams
:
{
page
:
1
,
size
:
9999
,
sign
:
22
,
}
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
getDict4community
()
},
0
);
return
}
if
(
res
)
{
console
.
log
(
'
接口回调数据=所属社区
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
);
var
result
=
JSON
.
parse
(
res
)
this
.
dict4community
=
result
.
data
}
})
})
},
},
getDict4
business
Type
(){
getDict4
industry
Type
(){
http2
.
post
({
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
...
@@ -195,31 +171,30 @@ window.addEventListener('load', function () {
...
@@ -195,31 +171,30 @@ window.addEventListener('load', function () {
reqParams
:
{
reqParams
:
{
page
:
1
,
page
:
1
,
size
:
9999
,
size
:
9999
,
sign
:
15
,
sign
:
20
,
// 行业类型列表
dictType
:
'
business_type
'
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getDict4
business
Type
()
this
.
getDict4
industry
Type
()
},
0
);
},
0
);
return
return
}
}
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
=生产经营
类型
'
,
JSON
.
parse
(
res
))
console
.
log
(
'
接口回调数据
-行业
类型
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
})
})
},
0
);
},
0
);
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
this
.
dict4
businessType
=
result
.
rows
this
.
dict4
industryType
=
result
.
data
.
body
.
data
}
}
})
})
},
},
getDict4c
hanghsuoType
(){
getDict4c
ommunity
(){
http2
.
post
({
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
...
@@ -227,30 +202,30 @@ window.addEventListener('load', function () {
...
@@ -227,30 +202,30 @@ window.addEventListener('load', function () {
reqParams
:
{
reqParams
:
{
page
:
1
,
page
:
1
,
size
:
9999
,
size
:
9999
,
sign
:
2
1
,
// 场所类型=>行业类别
sign
:
2
2
,
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getDict4c
hanghsuoType
()
this
.
getDict4c
ommunity
()
},
0
);
},
0
);
return
return
}
}
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
console
.
log
(
'
接口回调数据
=所属社区
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
})
})
},
0
);
},
0
);
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
this
.
dict4c
hanghsuoType
=
result
.
rows
this
.
dict4c
ommunity
=
result
.
data
}
}
})
})
},
},
getDict4
changhsuo
Type
(){
getDict4
business
Type
(){
http2
.
post
({
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
interfacePublicKey
:
API_KEY_MAP
[
"
page
"
][
"
publicKey
"
],
...
@@ -259,29 +234,30 @@ window.addEventListener('load', function () {
...
@@ -259,29 +234,30 @@ window.addEventListener('load', function () {
page
:
1
,
page
:
1
,
size
:
9999
,
size
:
9999
,
sign
:
15
,
sign
:
15
,
dictType
:
'
sys_nineplaces_json
'
dictType
:
'
business_type
'
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getDict4
changhsuo
Type
()
this
.
getDict4
business
Type
()
},
0
);
},
0
);
return
return
}
}
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
console
.
log
(
'
接口回调数据
=生产经营类型
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
vant
.
Toast
.
clear
()
})
})
},
0
);
},
0
);
var
result
=
JSON
.
parse
(
res
)
var
result
=
JSON
.
parse
(
res
)
this
.
dict4
changhsuo
Type
=
result
.
rows
this
.
dict4
business
Type
=
result
.
rows
}
}
})
})
},
},
getDict4fangwuType
(){
getDict4fangwuType
(){
http2
.
post
({
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
serviceId
:
API_KEY_MAP
[
"
page
"
][
'
id
'
],
...
@@ -354,6 +330,31 @@ window.addEventListener('load', function () {
...
@@ -354,6 +330,31 @@ window.addEventListener('load', function () {
});
});
var
reqParam
=
{...
this
.
formData
}
// var url = "/gq/checkRecord/safeCheckRecord"
var
reqParam
=
{...
this
.
formData
}
// var url = "/gq/checkRecord/safeCheckRecord"
if
(
!
reqParam
.
unitName
){
vant
.
Toast
({
message
:
'
商家名称不能为空
'
,
})
return
}
if
(
!
reqParam
.
area
){
vant
.
Toast
({
message
:
'
建筑不能为空
'
,
})
return
}
if
(
!
reqParam
.
merchantName
){
vant
.
Toast
({
message
:
'
负责人不能为空
'
,
})
return
}
if
(
!
reqParam
.
deptId
){
vant
.
Toast
({
message
:
'
所属社区不能为空
'
,
})
return
}
http3
.
put
(
'
/gq/merchant
'
,
reqParam
).
then
((
res
)
=>
{
http3
.
put
(
'
/gq/merchant
'
,
reqParam
).
then
((
res
)
=>
{
console
.
log
(
'
添加结果
'
,
res
)
console
.
log
(
'
添加结果
'
,
res
)
vant
.
Toast
({
vant
.
Toast
({
...
@@ -380,6 +381,23 @@ window.addEventListener('load', function () {
...
@@ -380,6 +381,23 @@ window.addEventListener('load', function () {
}
}
// this.showDeadlinePicker = false;
// this.showDeadlinePicker = false;
},
},
saveCanvas
()
{
vant
.
Toast
.
loading
({
message
:
'
图片保存中...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
lightAppJssdk
.
media
.
savePhoto
({
arg
:
VUE
.
formData
.
qrCodeUrl
,
success
:
function
(
data
)
{
vant
.
Toast
(
'
保存成功
'
);
},
fail
:
function
(
data
)
{
vant
.
Toast
(
'
保存失败
'
);
},
})
},
detail
(
id
)
{
detail
(
id
)
{
vant
.
Toast
.
loading
({
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
message
:
'
正在加载...
'
,
...
@@ -433,32 +451,6 @@ window.addEventListener('load', function () {
...
@@ -433,32 +451,6 @@ window.addEventListener('load', function () {
})
})
})
})
function
saveCanvas
()
{
vant
.
Toast
.
loading
({
message
:
'
图片保存中...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
lightAppJssdk
.
media
.
savePhoto
({
arg
:
VUE
.
formData
.
qrCodeUrl
,
success
:
function
(
data
)
{
// vant.Toast.clear()
// alert(JSON.stringify(data))
// vant.Dialog.alert({
// message: '保存成功',
// })
vant
.
Toast
(
'
保存成功
'
);
},
fail
:
function
(
data
)
{
// vant.Toast.clear()
// alert('保存失败')
// vant.Dialog.alert({
// message: '保存失败',
// })
vant
.
Toast
(
'
保存失败
'
);
},
})
}
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