diff --git a/common/api/common.js b/common/api/common.js new file mode 100644 index 0000000..bec02a1 --- /dev/null +++ b/common/api/common.js @@ -0,0 +1,10 @@ +import { coreRequest } from '@/common/request' +import url from "./url" + +export const getEmisCountry = (data = {})=> { + return coreRequest(url.getEmisCountry, data, {}, 'GET') +} + +export const getEmisRegion = (data = {})=> { + return coreRequest(url.getEmisRegion, data, {}, 'GET') +} \ No newline at end of file diff --git a/common/api/index.js b/common/api/index.js index 0f42eb5..a19bd40 100644 --- a/common/api/index.js +++ b/common/api/index.js @@ -1,5 +1,6 @@ import apiUrls, { host } from "./url" export * from "./user" +export * from "./common" export { apiUrls, diff --git a/common/api/url.js b/common/api/url.js index e82b2bc..5bd07b7 100644 --- a/common/api/url.js +++ b/common/api/url.js @@ -3,6 +3,8 @@ export const host = 'http://47.102.220.189:58089/api/bizsvr' export default { loginByApp: `/loginByApp`, - getInfoByApp: `/getInfoByApp` + getInfoByApp: `/getInfoByApp`, + getEmisCountry: `/emis/emisCountry/list`, + getEmisRegion: `/emis/emisRegion/list`, } diff --git a/common/api/user.js b/common/api/user.js index 964a8b4..be981b8 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -1,10 +1,10 @@ -import { corePost } from '@/common/request' +import { coreRequest } from '@/common/request' import url from "./url" export const loginByApp = (data = {})=> { - return corePost(url.loginByApp, data) + return coreRequest(url.loginByApp, data) } export const getInfoByApp = (data = {})=> { - return corePost(url.getInfoByApp, data, {}, 'GET') + return coreRequest(url.getInfoByApp, data, {}, 'GET') } \ No newline at end of file diff --git a/common/request.js b/common/request.js index 95f08d4..f6b11cd 100644 --- a/common/request.js +++ b/common/request.js @@ -8,7 +8,7 @@ import { host } from "./api" import { getSessionXToken } from "@/session" -const corePostBase = (url, reqParams, options = {}, methodType = "POST") => { +const coreRequestBase = (url, reqParams, options = {}, methodType = "POST") => { const xToken = getSessionXToken() return new Promise((resolve, reject) => { @@ -32,14 +32,14 @@ const corePostBase = (url, reqParams, options = {}, methodType = "POST") => { const BaseParam = {} // 请求处理 -let corePost = function(url, params = {}, options = {}, methodType) { +let coreRequest = function(url, params = {}, options = {}, methodType) { // 统一把emo转unicode // emoUnicode(params) const reqParams = { ...BaseParam, ...params, } - return dealRequest(corePostBase(url, reqParams, options, methodType)).then(res => { + return dealRequest(coreRequestBase(url, reqParams, options, methodType)).then(res => { // 解析unicode // emoUnicode(res, 2) return res @@ -47,5 +47,5 @@ let corePost = function(url, params = {}, options = {}, methodType) { } export { - corePost + coreRequest } \ No newline at end of file diff --git a/mixins/index.js b/mixins/index.js index 232cdf0..ec80ff5 100644 --- a/mixins/index.js +++ b/mixins/index.js @@ -1,6 +1,6 @@ import getCdnUrl from "@/common/getCdnUrl" import * as untools from "@/common/untool" -import { corePost } from "@/common/request" +import { coreRequest } from "@/common/request" export const mixins = { data() { @@ -17,7 +17,7 @@ export const mixins = { // }, methods: { ...untools, - corePost, + coreRequest, getCdnUrl }, } \ No newline at end of file diff --git a/pages/address/edit.vue b/pages/address/edit.vue index 0b0a069..806db2e 100644 --- a/pages/address/edit.vue +++ b/pages/address/edit.vue @@ -12,11 +12,7 @@ - - - - + @@ -32,7 +28,7 @@ -