diff --git a/App.vue b/App.vue index 23aa96d..e080a22 100644 --- a/App.vue +++ b/App.vue @@ -6,7 +6,7 @@ version } from './package.json' import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'; - import { USERKEY } from "@/store/actionKey" + import { USERKEY, COMMONKEY } from "@/store/actionKey" export default { globalData: { @@ -14,6 +14,7 @@ }, onLaunch: function() { this.$store.dispatch(USERKEY.GETUSERINFO) + this.$store.dispatch(COMMONKEY.GETDIST) // #ifdef H5 console.log( diff --git a/common/api/common.js b/common/api/common.js index bec02a1..bd98cd6 100644 --- a/common/api/common.js +++ b/common/api/common.js @@ -7,4 +7,19 @@ export const getEmisCountry = (data = {})=> { export const getEmisRegion = (data = {})=> { return coreRequest(url.getEmisRegion, data, {}, 'GET') -} \ No newline at end of file +} + +export const getDicDataJson = (data = {})=> { + return coreRequest(url.getDicDataJson, data, {}, 'GET') +} + + +export const getTransLineList = (data = {})=> { + return coreRequest(url.getTransLineList, data, {}, 'GET') +} + + +export const getTransProductList = (data = {})=> { + return coreRequest(url.getTransProductList, data, {}, 'GET') +} + diff --git a/common/api/url.js b/common/api/url.js index 5bd07b7..f6567b3 100644 --- a/common/api/url.js +++ b/common/api/url.js @@ -2,9 +2,21 @@ export const host = 'http://47.102.220.189:58089/api/bizsvr' export default { - loginByApp: `/loginByApp`, - getInfoByApp: `/getInfoByApp`, - getEmisCountry: `/emis/emisCountry/list`, - getEmisRegion: `/emis/emisRegion/list`, + loginByApp: `/loginByApp`, // 登录 + getInfoByApp: `/getInfoByApp`,// 获取用户基本信息 + getEmisCountry: `/emis/emisCountry/list`, // 获取国家列表 + getEmisRegion: `/emis/emisRegion/list`,// 获取省市区列表 + getDicDataJson: `/common/getDicDataJson`, // 获取枚举字段 + + getTransLineList: `/emis/emisTransLine/listSimple`, // 获取路线列表 + getTransProductList: `/emis/emisTransLine/listSimple`, // 获取产品列表 + + createOrderNo: `/emis/common/realMatchWaybill`, // 创建运单号 + submitOrder: `/emis/emisWaybill/realSubmitOrder`, // 提交订单 + getCustomerUserList: `/emis/emisCustomerUser/listSimple`, // 获取网点客户列表 + getCustomerUserAddressList: `/emis/emisCustomerAddress/listSimple`, // 获取客户地址列表 + getPickStaffList: `/emis/emisStaff/getPickStaffList`, // 获取取件员用户列表 + getGoodsList: `/emis/emisGoods/listSimple`, // 获取货物列表 + } diff --git a/store/actionKey.js b/store/actionKey.js index 9178910..5fb575d 100644 --- a/store/actionKey.js +++ b/store/actionKey.js @@ -2,4 +2,9 @@ export const USERKEY = { LOGIN: "LOGIN", GETUSERINFO: "GETUSERINFO", LOGOUT: "LOGOUT", +} + + +export const COMMONKEY = { + GETDIST: 'GETDIST' } \ No newline at end of file diff --git a/store/index.js b/store/index.js index 5c2551f..44cf76e 100644 --- a/store/index.js +++ b/store/index.js @@ -1,4 +1,5 @@ import user from "./modules/user" +import common from "./modules/common" // #ifndef VUE3 import Vue from 'vue' @@ -12,7 +13,8 @@ import { createStore } from 'vuex' const store = createStore({ // #endif modules: { - user + user, + common }, state: { hasLogin: false,