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() {
gemhoUtil.setCookie('token', result.token, 1) // 存储1天后过期
// 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'){
let merId = gemhoUtil.getParameter('merId')
......
This diff is collapsed.
......@@ -63,20 +63,19 @@ window.addEventListener('load', function () {
mounted() {
// 详情编辑权限控制
const userType = gemhoUtil.getCookie('userType')
if(userType == 'wgy'){
if(userType !== 'wgy'){
this.flag = 'XG'
}else{
this.flag = 'XQ'
}
this.detail()
this.getDict4changhsuoType()
this.getDict4fangwuType()
this.getDict4fangwuyongtuType()
this.getDict4businessType()
this.getDict4community()
this.getDict4industryType()
// this.getDict4changhsuoType()
},
methods: {
viewDetail(item) {
......@@ -125,7 +124,7 @@ window.addEventListener('load', function () {
}
})
},
getDict4industryType(){
getDict4changhsuoType(param){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
......@@ -133,61 +132,38 @@ window.addEventListener('load', function () {
reqParams: {
page:1,
size: 9999,
sign: 20, // 行业类型列表
sign: 21, // 场所类型=>行业类别
...param
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4industryType()
this.getDict4changhsuoType()
}, 0);
return
}
if (res) {
console.log('接口回调数据-行业类型', JSON.parse(res))
console.log('接口回调数据', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4industryType = result.data.body.data
this.dict4changhsuoType = result.data.body.data
}
})
},
getDict4community(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
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
}
handleIndustryChange(val){
// 选择后晴空下级下拉框值
this.dict4changhsuoType = []
this.getDict4changhsuoType({
industryId: this.formData.industryType
})
},
getDict4businessType(){
getDict4industryType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
......@@ -195,31 +171,30 @@ window.addEventListener('load', function () {
reqParams: {
page:1,
size: 9999,
sign: 15,
dictType: 'business_type'
sign: 20, // 行业类型列表
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4businessType()
this.getDict4industryType()
}, 0);
return
}
if (res) {
console.log('接口回调数据=生产经营类型', JSON.parse(res))
console.log('接口回调数据-行业类型', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4businessType = result.rows
this.dict4industryType = result.data.body.data
}
})
},
getDict4changhsuoType(){
getDict4community(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
......@@ -227,30 +202,30 @@ window.addEventListener('load', function () {
reqParams: {
page:1,
size: 9999,
sign: 21, // 场所类型=>行业类别
sign: 22,
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4changhsuoType()
this.getDict4community()
}, 0);
return
}
if (res) {
console.log('接口回调数据', JSON.parse(res))
console.log('接口回调数据=所属社区', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4changhsuoType = result.rows
this.dict4community = result.data
}
})
},
getDict4changhsuoType(){
getDict4businessType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
......@@ -259,29 +234,30 @@ window.addEventListener('load', function () {
page:1,
size: 9999,
sign: 15,
dictType: 'sys_nineplaces_json'
dictType: 'business_type'
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4changhsuoType()
this.getDict4businessType()
}, 0);
return
}
if (res) {
console.log('接口回调数据', JSON.parse(res))
console.log('接口回调数据=生产经营类型', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4changhsuoType = result.rows
this.dict4businessType = result.rows
}
})
},
getDict4fangwuType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
......@@ -354,6 +330,31 @@ window.addEventListener('load', function () {
});
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) => {
console.log('添加结果', res)
vant.Toast({
......@@ -380,6 +381,23 @@ window.addEventListener('load', function () {
}
// 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) {
vant.Toast.loading({
message: '正在加载...',
......@@ -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