Commit 3813da0c authored by lei's avatar lei

Merge branch 'gaoqucodecheck' of...

Merge branch 'gaoqucodecheck' of http://h.gemho.cn:7099/zhaojunbao/gaoquyingjih5-asd into gaoqucodecheck
parents 4e51edf5 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')
......
This diff is collapsed.
...@@ -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 () {
} }
}) })
}, },
getDict4industryType(){ getDict4changhsuoType(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.getDict4industryType() this.getDict4changhsuoType()
}, 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.dict4industryType = result.data.body.data this.dict4changhsuoType = 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
}
}) })
}, },
getDict4businessType(){ getDict4industryType(){
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.getDict4businessType() this.getDict4industryType()
}, 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.dict4businessType = result.rows this.dict4industryType = result.data.body.data
} }
}) })
}, },
getDict4changhsuoType(){ getDict4community(){
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: 21, // 场所类型=>行业类别 sign: 22,
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
setTimeout(() => { setTimeout(() => {
this.getDict4changhsuoType() this.getDict4community()
}, 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.dict4changhsuoType = result.rows this.dict4community = result.data
} }
}) })
}, },
getDict4changhsuoType(){ getDict4businessType(){
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.getDict4changhsuoType() this.getDict4businessType()
}, 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.dict4changhsuoType = result.rows this.dict4businessType = 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('保存失败');
},
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment