Commit 1f233203 by wkliang

fix

parent cdafd4ae
...@@ -11,6 +11,16 @@ class FblicenseService extends AppServiceBase { ...@@ -11,6 +11,16 @@ class FblicenseService extends AppServiceBase {
// 精确查找 (首页) // 精确查找 (首页)
async exactSearch (id) { async exactSearch (id) {
try { try {
if (!(id)) {
return {
code: 0,
msg: "success",
data: [],
count: 0,
page: 1,
pagesize: 10
}
}
let param = { name: id } let param = { name: id }
let url = `${this.fbqurl}/gsb/licence_search_index` let url = `${this.fbqurl}/gsb/licence_search_index`
let result = await this.restClient.execPost(param, url) let result = await this.restClient.execPost(param, url)
...@@ -35,6 +45,13 @@ class FblicenseService extends AppServiceBase { ...@@ -35,6 +45,13 @@ class FblicenseService extends AppServiceBase {
// 获取详情 // 获取详情
async getDetail (id) { async getDetail (id) {
try { try {
if (!id) {
return {
"msg": "success",
"code": 0,
"data": null
}
}
let param = { name: id } let param = { name: id }
let url = `${this.fbqurl}/gsb/licence_search_index` let url = `${this.fbqurl}/gsb/licence_search_index`
let result = await this.restClient.execPost(param, url) let result = await this.restClient.execPost(param, url)
...@@ -56,8 +73,12 @@ class FblicenseService extends AppServiceBase { ...@@ -56,8 +73,12 @@ class FblicenseService extends AppServiceBase {
async getList (data) { async getList (data) {
if (!(data.company_name || data.license_no)) { if (!(data.company_name || data.license_no)) {
return { return {
code: -1, code: 0,
msg: "必须含有经营者名称 或者 许可证编号 的其中之一" msg: "success",
data: [],
count: 0,
page: 1,
pagesize: 10
} }
} }
try { try {
......
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