Commit bb361cd9 by 姜雷

整理api

parent 1d6bda84
...@@ -19,3 +19,8 @@ VUE_APP_BASE_SERVER_URL=http://ex-dev-dcxy-base-manage.168cad.top ...@@ -19,3 +19,8 @@ VUE_APP_BASE_SERVER_URL=http://ex-dev-dcxy-base-manage.168cad.top
VUE_APP_BASE_SERVER_URL_APP=http://ex-dev-dcxy-base-app.168cad.top VUE_APP_BASE_SERVER_URL_APP=http://ex-dev-dcxy-base-app.168cad.top
VUE_APP_STATISTICS_SERVER_URL=http://ex-dev-dcxy-statistics-manage.168cad.top VUE_APP_STATISTICS_SERVER_URL=http://ex-dev-dcxy-statistics-manage.168cad.top
VUE_APP_DEVICE_SERVER_URL=http://in-dev-device-management-api.168cad.top VUE_APP_DEVICE_SERVER_URL=http://in-dev-device-management-api.168cad.top
VUE_APP_SHOWER_SERVER_URL=http://ex-shower-manager-server.168cad.top
VUE_APP_DISPENSER_SERVER_URL=http://ex-dev-gx-manager.168cad.top
VUE_APP_BLOWER_SERVER_URL=http://ex-dev-blower-manager.168cad.top
VUE_APP_METER_DEVICE_SERVER_URL=http://ex-dev-device3-manager.168cad.top
VUE_APP_SMAPRO_SERVER_URL=http://ex-dev-dcxy-smapro-manage.168cad.top
const fetch = manageShell.default.createBaseFetch({ import { deviceFetch as fetch } from '../fetch';
baseURL: process.env.VUE_APP_METER_DEVICE_SERVER_URL,
timeout: 10000,
});
export default fetch; export default fetch;
import fetch from './fetch'; import { smaproFetch as fetch } from './fetch';
//基础地址 //基础地址
const path = process.env.VUE_APP_SMAPRO_SERVER_URL; const path = process.env.VUE_APP_SMAPRO_SERVER_URL;
......
import fetch from './fetch'; import { smaproFetch as fetch } from './fetch';
//基础地址 //基础地址
const path = process.env.VUE_APP_SMAPRO_SERVER_URL; const path = process.env.VUE_APP_SMAPRO_SERVER_URL;
......
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const fetchBeanInfoByUser = req => export const fetchBeanInfoByUser = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getRechargeInfo = req => export const getRechargeInfo = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getRefundInfo = req => export const getRefundInfo = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchAdminArea = req => export const fetchAdminArea = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchAdminFunctionList = req => export const fetchAdminFunctionList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchAppReportList = req => export const fetchAppReportList = req =>
fetch({ fetch({
......
const fetch = manageShell.default.createBaseFetch({ import createBaseFetch from '@/lib/Api';
const fetch = createBaseFetch({
baseURL: process.env.VUE_APP_SMAPRO_SERVER_URL, baseURL: process.env.VUE_APP_SMAPRO_SERVER_URL,
timeout: 10000, timeout: 10000,
}); });
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
//基础地址 //基础地址
const path = process.env.VUE_APP_BASE_SERVER_URL; const path = process.env.VUE_APP_BASE_SERVER_URL;
...@@ -21,20 +21,21 @@ export const update4Lock = req => ...@@ -21,20 +21,21 @@ export const update4Lock = req =>
...req, ...req,
}); });
/**保存配置 */
/**保存配置 */
export const addEntity = req => export const addEntity = req =>
fetch({ fetch({
url: path + areaRechargePath + '/areaRecharge', url: path + areaRechargePath + '/areaRecharge',
method: 'POST', method: 'POST',
...req, ...req,
}); });
/**查询选中的配置 */ /**查询选中的配置 */
export const queryById = req => export const queryById = req =>
fetch({ fetch({
url: path + areaRechargePath + `/areaRecharge/${req.params.areaId}/${req.params.operateId}`, url:
path +
areaRechargePath +
`/areaRecharge/${req.params.areaId}/${req.params.operateId}`,
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const AREA_SMS = '/dcxy/area/sms'; const AREA_SMS = '/dcxy/area/sms';
export const addRelations = req => export const addRelations = req =>
fetch({ fetch({
url: AREA_SMS + '/relation', url: AREA_SMS + '/relation',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getRelations = req => export const getRelations = req =>
fetch({ fetch({
url: AREA_SMS + '/relation', url: AREA_SMS + '/relation',
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
const path = process.env.VUE_APP_CUSTOMER_SERVER_URL;
export const fetchUserBaseInfo = entity => export const fetchUserBaseInfo = entity =>
fetch({ fetch({
url: path + '/dcxy/customerInfo/baseInfo', url: '/dcxy/customerInfo/baseInfo',
params: entity, params: entity,
}); });
export const fetchUserBaseInfoByPhone = entity => export const fetchUserBaseInfoByPhone = entity =>
fetch({ fetch({
url: path + '/dcxy/customerInfo/baseCustomer', url: '/dcxy/customerInfo/baseCustomer',
params: entity, params: entity,
}); });
export const fetchUserAccount = entity => export const fetchUserAccount = entity =>
fetch({ fetch({
url: path + '/dcxy/customerInfo/queryAccount', url: '/dcxy/customerInfo/queryAccount',
params: entity, params: entity,
}); });
import fetch from '../fetch'; import { baseAppFetch as fetch } from '../fetch';
const path = process.env.VUE_APP_BASE_SERVER_URL_APP;
export const getUploadImgToken = req => export const getUploadImgToken = req =>
fetch({ fetch({
url: path + '/common/getQNToken', url: '/common/getQNToken',
...req, ...req,
}); });
export const getDelImgToken = req => export const getDelImgToken = req =>
fetch({ fetch({
url: path + '/common/deleteFiles', url: '/common/deleteFiles',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const getBaseArea = req => export const getBaseArea = req =>
fetch({ fetch({
url: '/dcxy/baseArea/queryList', url: '/dcxy/baseArea/queryList',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getEditArea = req => export const getEditArea = req =>
fetch({ fetch({
url: '/dcxy/baseArea/updateArea', url: '/dcxy/baseArea/updateArea',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
export const getAddBaseArea = req => export const getAddBaseArea = req =>
fetch({ fetch({
url: '/dcxy/baseArea/addArea', url: '/dcxy/baseArea/addArea',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getConfigArea = req => export const getConfigArea = req =>
fetch({ fetch({
url: '/dcxy/baseArea/queryService', url: '/dcxy/baseArea/queryService',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const getAddOrUpdate = req =>
export const getAddOrUpdate = req =>
fetch({ fetch({
url: '/dcxy/baseArea/addService', url: '/dcxy/baseArea/addService',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getRemoveService = req =>
export const getRemoveService = req =>
fetch({ fetch({
url: '/dcxy/baseArea/deleteService', url: '/dcxy/baseArea/deleteService',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const getDetail = req => export const getDetail = req =>
fetch({ fetch({
url: '/dcxy/baseArea/areaInfo', url: '/dcxy/baseArea/areaInfo',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const updateState = req => export const updateState = req =>
fetch({ fetch({
url: '/dcxy/baseArea/updateConsult', url: '/dcxy/baseArea/updateConsult',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const updateStore= req => export const updateStore = req =>
fetch({ fetch({
url: '/dcxy/baseArea/updateStore', url: '/dcxy/baseArea/updateStore',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const updateType= req => export const updateType = req =>
fetch({ fetch({
url: '/dcxy/baseArea/updateType', url: '/dcxy/baseArea/updateType',
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const getAreaBusiness = req => export const getAreaBusiness = req =>
fetch({ fetch({
url: '/dcxy/areaBusiness/queryList', url: '/dcxy/areaBusiness/queryList',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getRemoveAreaBusiness = req => export const getRemoveAreaBusiness = req =>
fetch({ fetch({
url: '/dcxy/areaBusiness/deleteAreaBusiness', url: '/dcxy/areaBusiness/deleteAreaBusiness',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const getAddAreaBusiness = req => export const getAddAreaBusiness = req =>
fetch({ fetch({
url: '/dcxy/areaBusiness/addAreaBusiness', url: '/dcxy/areaBusiness/addAreaBusiness',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const updateState = req => export const updateState = req =>
fetch({ fetch({
url: '/dcxy/areaBusiness/updateState', url: '/dcxy/areaBusiness/updateState',
method: 'GET', method: 'GET',
...req, ...req,
});
});
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const OPER_PAY_PATH = '/dcxy/api/base/operateAreaPay'; const OPER_PAY_PATH = '/dcxy/api/base/operateAreaPay';
const customer_path = process.env.VUE_APP_CUSTOMER_SERVER_URL; const customer_path = process.env.VUE_APP_CUSTOMER_SERVER_URL;
export const getCustomerInfo = req => export const getCustomerInfo = req =>
fetch({ fetch({
url: customer_path +'/dcxy/customerInfo/customer/forpic', url: customer_path + '/dcxy/customerInfo/customer/forpic',
method: 'get', method: 'get',
...req, ...req,
}); });
...@@ -16,16 +16,16 @@ export const getOperPayConfig = req => ...@@ -16,16 +16,16 @@ export const getOperPayConfig = req =>
...req, ...req,
}); });
export const updateOpConf = req => export const updateOpConf = req =>
fetch({ fetch({
url: OPER_PAY_PATH + '/change/payconf', url: OPER_PAY_PATH + '/change/payconf',
method: 'post', method: 'post',
...req, ...req,
}); });
export const abilityBeUsed = req => export const abilityBeUsed = req =>
fetch({ fetch({
url: OPER_PAY_PATH + '/ability/beused', url: OPER_PAY_PATH + '/ability/beused',
method: 'post', method: 'post',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
import operDetail from '../operDetail'; import operDetail from '../operDetail';
export const getBaseOperator = req => export const getBaseOperator = req =>
...@@ -17,7 +17,6 @@ export const updateState = req => { ...@@ -17,7 +17,6 @@ export const updateState = req => {
}); });
}; };
export const getAddOper = req => export const getAddOper = req =>
fetch({ fetch({
url: '/dcxy/baseOperator/addOperator', url: '/dcxy/baseOperator/addOperator',
...@@ -25,24 +24,23 @@ export const getAddOper = req => ...@@ -25,24 +24,23 @@ export const getAddOper = req =>
...req, ...req,
}); });
export const getEditOper = req => export const getEditOper = req =>
fetch({ fetch({
url: '/dcxy/baseOperator/updateOperator', url: '/dcxy/baseOperator/updateOperator',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getDetail = req => export const getDetail = req =>
fetch({ fetch({
url: '/dcxy/baseOperator/queryOpertor', url: '/dcxy/baseOperator/queryOpertor',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const getOperCount = req => export const getOperCount = req =>
operDetail({ operDetail({
url: '/admin/admin', url: '/admin/admin',
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const OPER_PAY_PATH = '/dcxy/api/base/operateAreaPay'; const OPER_PAY_PATH = '/dcxy/api/base/operateAreaPay';
export const getOperPayInfo = req => export const getOperPayInfo = req =>
fetch({ fetch({
...@@ -21,7 +21,6 @@ export const checkBinding = req => ...@@ -21,7 +21,6 @@ export const checkBinding = req =>
...req, ...req,
}); });
//支付能力新增接口 //支付能力新增接口
export const addOperPayInfo = req => export const addOperPayInfo = req =>
fetch({ fetch({
...@@ -38,20 +37,36 @@ export const updateOperPayInfo = req => ...@@ -38,20 +37,36 @@ export const updateOperPayInfo = req =>
...req, ...req,
}); });
export const deleteOperPayInfo = req => export const deleteOperPayInfo = req =>
fetch({ fetch({
url: OPER_PAY_PATH+'/service/pay/'+req.id +'/'+req.operateId+'/'+req.payType, url:
OPER_PAY_PATH +
'/service/pay/' +
req.id +
'/' +
req.operateId +
'/' +
req.payType,
method: 'delete', method: 'delete',
...req, ...req,
}); });
//支付能力关闭/开启接口 //支付能力关闭/开启接口
export const isCloseOperPay = req => export const isCloseOperPay = req =>
fetch({ fetch({
url: OPER_PAY_PATH+'/isclose/'+req.isClose+'/'+req.id+'/'+req.operateId+'/'+req.payType, url:
method: 'put', OPER_PAY_PATH +
...req, '/isclose/' +
}); req.isClose +
'/' +
req.id +
'/' +
req.operateId +
'/' +
req.payType,
method: 'put',
...req,
});
//查询是否存在开启的 //查询是否存在开启的
export const checkBeOn = req => export const checkBeOn = req =>
...@@ -60,12 +75,9 @@ export const checkBeOn = req => ...@@ -60,12 +75,9 @@ export const checkBeOn = req =>
method: 'get', method: 'get',
...req, ...req,
}); });
export const getOpenedPaytype = req => export const getOpenedPaytype = req =>
fetch({ fetch({
url: OPER_PAY_PATH + '/opened/paytype', url: OPER_PAY_PATH + '/opened/paytype',
method: 'get', method: 'get',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const getPageData = req => export const getPageData = req =>
fetch({ fetch({
...@@ -16,7 +16,6 @@ export const addData = req => { ...@@ -16,7 +16,6 @@ export const addData = req => {
}); });
}; };
export const updateData = req => export const updateData = req =>
fetch({ fetch({
url: '/recharge/contorl/for/change', url: '/recharge/contorl/for/change',
...@@ -24,18 +23,16 @@ export const updateData = req => ...@@ -24,18 +23,16 @@ export const updateData = req =>
...req, ...req,
}); });
export const deleteData = req => export const deleteData = req =>
fetch( fetch({
{ url: '/recharge/contorl/for/remove/' + req.id + '/' + req.updater,
url: '/recharge/contorl/for/remove/'+req.id+'/'+req.updater, method: 'DELETE',
method: 'DELETE', ...req,
...req, });
});
export const getDetailData = req => export const getDetailData = req =>
fetch({ fetch({
url: '/recharge/contorl/for/detail/'+req.controlId, url: '/recharge/contorl/for/detail/' + req.controlId,
method: 'GET', method: 'GET',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchCreditMarginList = req => export const fetchCreditMarginList = req =>
fetch({ fetch({
...@@ -47,4 +47,4 @@ export const fetchCreditMarginConfDetail = req => ...@@ -47,4 +47,4 @@ export const fetchCreditMarginConfDetail = req =>
method: 'get', method: 'get',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchEquipmentList = req => export const fetchEquipmentList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchOperationalModeList = req => export const fetchOperationalModeList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchActivityList = req => export const fetchActivityList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchPaywayList = req => export const fetchPaywayList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchEquipmentList = req => export const fetchEquipmentList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchActivityList = req => export const fetchActivityList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchPaywayList = req => export const fetchPaywayList = req =>
fetch({ fetch({
......
import fetch from './fetch'; import { smaproFetch as fetch } from './fetch';
export const getPageCustomer = req => export const getPageCustomer = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const pageRecords = req => export const pageRecords = req =>
fetch({ fetch({
url: '/dcxy/area/switch/page/records', url: '/dcxy/area/switch/page/records',
method: 'POST', method: 'POST',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getCustomerInfo = req => export const getCustomerInfo = req =>
fetch({ fetch({
...@@ -7,63 +7,52 @@ export const getCustomerInfo = req => ...@@ -7,63 +7,52 @@ export const getCustomerInfo = req =>
...req, ...req,
}); });
export const fetchDetail = req => export const fetchDetail = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/queryCustomer', url: '/dcxy/customerInfo/queryCustomer',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const getaddCustomer = req =>
export const getaddCustomer = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/addCustomer', url: '/dcxy/customerInfo/addCustomer',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const updateState = req => export const updateState = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/updateState', url: '/dcxy/customerInfo/updateState',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
export const updateBase = req => export const updateBase = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/updateBase', url: '/dcxy/customerInfo/updateBase',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
export const fetchAccount = req =>
export const fetchAccount = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/queryAccount', url: '/dcxy/customerInfo/queryAccount',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const fetchAccountLessThanZero = req => export const fetchAccountLessThanZero = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/lessthan/zero', url: '/dcxy/customerInfo/lessthan/zero',
method: 'GET', method: 'GET',
...req, ...req,
}); });
//电话或者会员ID查询 //电话或者会员ID查询
export const fetchUserInfo = req => export const fetchUserInfo = req =>
fetch({ fetch({
url: '/dcxy/customerInfo/baseCustomer', url: '/dcxy/customerInfo/baseCustomer',
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getSwitch = req => export const getSwitch = req =>
fetch({ fetch({
...@@ -7,10 +7,9 @@ export const getSwitch = req => ...@@ -7,10 +7,9 @@ export const getSwitch = req =>
...req, ...req,
}); });
export const updateSwitch = req => export const updateSwitch = req =>
fetch({ fetch({
url: '/dcxy/customerSwitch/updateSwitch', url: '/dcxy/customerSwitch/updateSwitch',
method: 'POST', method: 'POST',
...req, ...req,
}); });
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getPassword = req => export const getPassword = req =>
fetch({ fetch({
...@@ -7,22 +7,21 @@ export const getPassword = req => ...@@ -7,22 +7,21 @@ export const getPassword = req =>
...req, ...req,
}); });
export const resetApp = req => export const resetApp = req =>
fetch({ fetch({
url: '/dcxy/password/restApp', url: '/dcxy/password/restApp',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
export const restHardware = req => export const restHardware = req =>
fetch({ fetch({
url: '/dcxy/password/restHardware', url: '/dcxy/password/restHardware',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
export const queryRest = req =>
export const queryRest = req =>
fetch({ fetch({
url: '/dcxy/password/queryRest', url: '/dcxy/password/queryRest',
method: 'GET', method: 'GET',
......
const fetch = manageShell.default.createBaseFetch({ import { deviceFetch as fetch } from '../fetch';
baseURL: process.env.VUE_APP_DEVICE_SERVER_URL,
timeout: 10000,
});
export default fetch; export default fetch;
import createBaseFetch from '../../lib/Api';
const fetch = manageShell.default.createBaseFetch({ const fetch = createBaseFetch({
baseURL: process.env.VUE_APP_DISPENSER_SERVER_URL+ '/dcxy/construction/gx/manager/manager', baseURL:
process.env.VUE_APP_DISPENSER_SERVER_URL +
'/dcxy/construction/gx/manager/manager',
timeout: 10000, timeout: 10000,
}); });
......
const fetch = manageShell.default.createBaseFetch({ import { deviceFetch as fetch } from '../fetch';
baseURL: process.env.VUE_APP_DEVICE_SERVER_URL,
timeout: 10000,
});
export default fetch; export default fetch;
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
//列表 //列表
export const getFeedbackById = req => export const getFeedbackById = req =>
...@@ -24,11 +24,10 @@ export const saveFeedback = req => ...@@ -24,11 +24,10 @@ export const saveFeedback = req =>
...req, ...req,
}); });
//记录 //记录
export const getFeedbackRecord = req => export const getFeedbackRecord = req =>
fetch({ fetch({
url: `/feedback/get/feedbackRecord/${req.params.id}`, url: `/feedback/get/feedbackRecord/${req.params.id}`,
method: 'GET', method: 'GET',
...req, ...req,
}); });
import createBaseFetch from '../lib/Api'; import createBaseFetch from '../lib/Api';
const fetch = createBaseFetch({ export const systemFetch = createBaseFetch({
baseURL: process.env.VUE_APP_SYSTEM_SERVER_URL, baseURL: process.env.VUE_APP_SYSTEM_SERVER_URL,
timeout: 10000, timeout: 10000,
}); });
...@@ -8,5 +8,25 @@ export const customFetch = createBaseFetch({ ...@@ -8,5 +8,25 @@ export const customFetch = createBaseFetch({
baseURL: process.env.VUE_APP_CUSTOMER_SERVER_URL, baseURL: process.env.VUE_APP_CUSTOMER_SERVER_URL,
timeout: 10000, timeout: 10000,
}); });
export const baseFetch = createBaseFetch({
baseURL: process.env.VUE_APP_BASE_SERVER_URL,
timeout: 10000,
});
export const baseAppFetch = createBaseFetch({
baseURL: process.env.VUE_APP_BASE_SERVER_URL_APP,
timeout: 10000,
});
export const statisticsFetch = createBaseFetch({
baseURL: process.env.VUE_APP_STATISTICS_SERVER_URL,
timeout: 10000,
});
export const deviceFetch = createBaseFetch({
baseURL: process.env.VUE_APP_DEVICE_SERVER_URL,
timeout: 10000,
});
export const smaproFetch = createBaseFetch({
baseURL: process.env.VUE_APP_SMAPRO_SERVER_URL,
timeout: 10000,
});
export default fetch; export default systemFetch;
import fetch from './fetch'; import { smaproFetch as fetch } from './fetch';
export const getPageOrderMoney = req => export const getPageOrderMoney = req =>
fetch({ fetch({
url: '/platform/toll/income/page/money', url: '/platform/toll/income/page/money',
method: 'POST', method: 'POST',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const APP_SECTION = '/app/section'; const APP_SECTION = '/app/section';
export const getRelations = req => export const getRelations = req =>
fetch({ fetch({
url: APP_SECTION + '/relation', url: APP_SECTION + '/relation',
...@@ -11,10 +9,9 @@ export const getRelations = req => ...@@ -11,10 +9,9 @@ export const getRelations = req =>
...req, ...req,
}); });
export const addRelations = req => export const addRelations = req =>
fetch({ fetch({
url: APP_SECTION + '/build/relation', url: APP_SECTION + '/build/relation',
method: 'POST', method: 'POST',
...req, ...req,
}); });
const fetch = manageShell.default.createBaseFetch({ import createBaseFetch from '../../lib/Api';
const fetch = createBaseFetch({
baseURL: baseURL:
process.env.VUE_APP_BLOWER_SERVER_URL + process.env.VUE_APP_BLOWER_SERVER_URL +
'/dcxy/construction/blower/manager/manager', '/dcxy/construction/blower/manager/manager',
......
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchInterfaceList = req => export const fetchInterfaceList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchInterfaceList = req => export const fetchInterfaceList = req =>
fetch({ fetch({
......
import fetch from '@/api/fetch'; import { systemFetch as fetch } from '../fetch';
const path = process.env.VUE_APP_SYSTEM_SERVER_URL;
export const fetchCollectList = req => export const fetchCollectList = req =>
fetch({ fetch({
url: path + '/adminChange/queryCollect', url: '/adminChange/queryCollect',
timeout: 30000, timeout: 30000,
...req, ...req,
}); });
export const addCollect = req => export const addCollect = req =>
fetch({ fetch({
url: path + '/adminChange/saveCollect', url: '/adminChange/saveCollect',
method: 'post', method: 'post',
...req, ...req,
}); });
export const delCollect = req => export const delCollect = req =>
fetch({ fetch({
url: path + '/adminChange/delteCollect', url: '/adminChange/delteCollect',
...req, ...req,
}); });
export const fetchMenuTree = req => export const fetchMenuTree = req =>
fetch({ fetch({
url: path + '/menu/menu/list', url: '/menu/menu/list',
method: 'post', method: 'post',
...req, ...req,
}); });
export const addMenuNode = req => export const addMenuNode = req =>
fetch({ fetch({
url: path + '/menu/menu', url: '/menu/menu',
method: 'post', method: 'post',
...req, ...req,
}); });
export const fetchEditMenuDetail = req => export const fetchEditMenuDetail = req =>
fetch({ fetch({
url: path + `/menu/menuButton/${req.data.id}`, url: `/menu/menuButton/${req.data.id}`,
method: 'get', method: 'get',
...req, ...req,
}); });
export const updateMenuNode = req => export const updateMenuNode = req =>
fetch({ fetch({
url: path + '/menu/menu', url: '/menu/menu',
method: 'put', method: 'put',
...req, ...req,
}); });
export const moveMenuNode = req => export const moveMenuNode = req =>
fetch({ fetch({
url: path + `/menu/menu/${req.data.id}`, url: `/menu/menu/${req.data.id}`,
method: 'put', method: 'put',
...req, ...req,
}); });
export const deleteMenuNode = req => export const deleteMenuNode = req =>
fetch({ fetch({
url: path + `/menu/menu/${req.data.id}`, url: `/menu/menu/${req.data.id}`,
method: 'delete', method: 'delete',
...req, ...req,
}); });
export const toggleMenuNodeState = req => export const toggleMenuNodeState = req =>
fetch({ fetch({
url: path + '/menu/menu/lock', url: '/menu/menu/lock',
method: 'post', method: 'post',
...req, ...req,
}); });
export const fetchMenuNodeButton = req => export const fetchMenuNodeButton = req =>
fetch({ fetch({
url: path + `/menu/menuButton/${req.data.id}`, url: `/menu/menuButton/${req.data.id}`,
method: 'post', method: 'post',
...req, ...req,
}); });
export const fetchMenuUseState = req => export const fetchMenuUseState = req =>
fetch({ fetch({
url: path + `/menu/menu/isUse/${req.data.id}`, url: `/menu/menu/isUse/${req.data.id}`,
method: 'get', method: 'get',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const APP_OPEN_ADVERT = '/app/open/advert'; const APP_OPEN_ADVERT = '/app/open/advert';
...@@ -7,8 +6,7 @@ const COMMON = '/dcxy/common'; ...@@ -7,8 +6,7 @@ const COMMON = '/dcxy/common';
const ADVERT_CAMPUS = '/app/advertise/campus'; const ADVERT_CAMPUS = '/app/advertise/campus';
const ADVERT_OPERATE ='/advertise/operate'; const ADVERT_OPERATE = '/advertise/operate';
export const pageAppOpenAdvertInfos = req => export const pageAppOpenAdvertInfos = req =>
fetch({ fetch({
...@@ -17,74 +15,71 @@ export const pageAppOpenAdvertInfos = req => ...@@ -17,74 +15,71 @@ export const pageAppOpenAdvertInfos = req =>
...req, ...req,
}); });
export const addAppOpenAdvertInfo = req => export const addAppOpenAdvertInfo = req =>
fetch({ fetch({
url: APP_OPEN_ADVERT + '/gain', url: APP_OPEN_ADVERT + '/gain',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const updateAppOpenAdvertInfo = req => export const updateAppOpenAdvertInfo = req =>
fetch({ fetch({
url: APP_OPEN_ADVERT + '/modify', url: APP_OPEN_ADVERT + '/modify',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const getEditInfo = req => export const getEditInfo = req =>
fetch({ fetch({
url: APP_OPEN_ADVERT + '/edit/info', url: APP_OPEN_ADVERT + '/edit/info',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const updateState = req => export const updateState = req =>
fetch({ fetch({
url: APP_OPEN_ADVERT + '/state', url: APP_OPEN_ADVERT + '/state',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
//----------------------------------------- //-----------------------------------------
export const getUploadImgToken = req => export const getUploadImgToken = req =>
fetch({ fetch({
url: COMMON + '/qiniu/token', url: COMMON + '/qiniu/token',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const getDelImgToken = req => export const getDelImgToken = req =>
fetch({ fetch({
url: COMMON + '/del/pic', url: COMMON + '/del/pic',
method: 'GET', method: 'GET',
...req, ...req,
}); });
//----------------------------- //-----------------------------
export const addAdvertiseRelations = req => export const addAdvertiseRelations = req =>
fetch({ fetch({
url: ADVERT_CAMPUS + '/relation', url: ADVERT_CAMPUS + '/relation',
method: 'POST', method: 'POST',
...req, ...req,
}); });
export const listSectionRelations = req => export const listSectionRelations = req =>
fetch({ fetch({
url: ADVERT_CAMPUS + '/relations', url: ADVERT_CAMPUS + '/relations',
method: 'GET', method: 'GET',
...req, ...req,
}); });
//----------------------------------- //-----------------------------------
export const getOperateRecords = req => export const getOperateRecords = req =>
fetch({ fetch({
url: ADVERT_OPERATE + '/record', url: ADVERT_OPERATE + '/record',
method: 'GET', method: 'GET',
...req, ...req,
}); });
//------------------------------------ //------------------------------------
\ No newline at end of file
const operDetail = manageShell.default.createBaseFetch({ import { systemFetch as operDetail } from './fetch';
baseURL: process.env.VUE_APP_SYSTEM_SERVER_URL,
timeout: 10000, export default operDetail;
});
export default operDetail;
\ No newline at end of file
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchOperLogList = req => export const fetchOperLogList = req =>
fetch({ fetch({
......
import fetch from './fetch'; import { smaproFetch as fetch } from './fetch';
export const getPageOrderMoney = req => export const getPageOrderMoney = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
//基础地址 //基础地址
const path = process.env.VUE_APP_BASE_SERVER_URL; const path = process.env.VUE_APP_BASE_SERVER_URL;
......
import fetch from '../statistics'; import { customFetch as fetch } from '../fetch';
//列表 //列表
export const getConsume = req => export const getConsume = req =>
...@@ -10,12 +10,10 @@ export const getConsume = req => ...@@ -10,12 +10,10 @@ export const getConsume = req =>
timeout: 20000, timeout: 20000,
}); });
//详情
//详情
export const getConsumeDetail = req => export const getConsumeDetail = req =>
fetch({ fetch({
url: `/consume/get/consume/${req.params.id}`, url: `/consume/get/consume/${req.params.id}`,
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../statistics'; import { customFetch as fetch } from '../fetch';
export const fetchConsumeOrder = req => export const fetchConsumeOrder = req =>
fetch({ fetch({
...@@ -7,21 +7,16 @@ export const fetchConsumeOrder = req => ...@@ -7,21 +7,16 @@ export const fetchConsumeOrder = req =>
...req, ...req,
}); });
export const getKindBean = req => export const getKindBean = req =>
fetch({ fetch({
url: '/dcxy/order/kind/bean', url: '/dcxy/order/kind/bean',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const query4ThirdTradeInfo = req => export const query4ThirdTradeInfo = req =>
fetch({ fetch({
url: '/dcxy/order/consume/order', url: '/dcxy/order/consume/order',
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getFailedOrder = req => export const getFailedOrder = req =>
fetch({ fetch({
...@@ -6,8 +6,3 @@ export const getFailedOrder = req => ...@@ -6,8 +6,3 @@ export const getFailedOrder = req =>
method: 'POST', method: 'POST',
...req, ...req,
}); });
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
//列表 //列表
export const getGiveBean = req => export const getGiveBean = req =>
......
import fetch from '../statistics'; import { customFetch as fetch } from '../fetch';
//列表 //列表
export const getPaymentConsume = req => export const getPaymentConsume = req =>
......
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
// const path = 'http://localhost:8888/dcxy/api/customer/rechargeOrder'; // const path = 'http://localhost:8888/dcxy/api/customer/rechargeOrder';
...@@ -63,8 +63,3 @@ export const getPageAndTotalMoney = req => ...@@ -63,8 +63,3 @@ export const getPageAndTotalMoney = req =>
method: 'POST', method: 'POST',
...req, ...req,
}); });
import fetch from '../fetch'; import { customFetch as fetch } from '../fetch';
export const getPageRefund = req => export const getPageRefund = req =>
fetch({ fetch({
url: '/dcxy/api/customer/refundOrder/page/refund', url: '/dcxy/api/customer/refundOrder/page/refund',
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchOrderMergeRuleList = req => export const fetchOrderMergeRuleList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
// 版本配置API // 版本配置API
const PVersion_PATH = '/dcxy/api/payment/version'; const PVersion_PATH = '/dcxy/api/payment/version';
//支付管理API //支付管理API
...@@ -34,7 +34,7 @@ export const closeOrOpen = req => ...@@ -34,7 +34,7 @@ export const closeOrOpen = req =>
url: PAYMENT_PATH + '/open/close/' + req.id + '/' + req.isEnable, url: PAYMENT_PATH + '/open/close/' + req.id + '/' + req.isEnable,
method: 'put', method: 'put',
// ...req, // ...req,
}) });
// 版本配置API // 版本配置API
export const getPaymentVersion = req => export const getPaymentVersion = req =>
fetch({ fetch({
...@@ -61,7 +61,7 @@ export const upAndDown = req => ...@@ -61,7 +61,7 @@ export const upAndDown = req =>
method: 'put', method: 'put',
// ...req, // ...req,
}); });
export const deleteVersion = req => export const deleteVersion = req =>
fetch({ fetch({
url: PVersion_PATH + '/paymeny/version/' + req.id, url: PVersion_PATH + '/paymeny/version/' + req.id,
method: 'delete', method: 'delete',
...@@ -79,40 +79,37 @@ export const getPVRecord = req => ...@@ -79,40 +79,37 @@ export const getPVRecord = req =>
method: 'get', method: 'get',
...req, ...req,
}); });
export const checkVBeUsed = req => export const checkVBeUsed = req =>
fetch({ fetch({
url: PAYMENT_PATH + '/check/beBind', url: PAYMENT_PATH + '/check/beBind',
method: 'get', method: 'get',
...req, ...req,
}); });
//true存在 //true存在
export const checkExist = req => export const checkExist = req =>
fetch({ fetch({
url: PVersion_PATH + '/check/exist/'+req.payType+'/'+req.versionName, url: PVersion_PATH + '/check/exist/' + req.payType + '/' + req.versionName,
method: 'get', method: 'get',
// ...req, // ...req,
}); });
export const checkPaymentExist = req => export const checkPaymentExist = req =>
fetch({ fetch({
url: PAYMENT_PATH + '/check/payment/exist', url: PAYMENT_PATH + '/check/payment/exist',
method: 'get', method: 'get',
...req, ...req,
}); });
export const getAllPayment = req => export const getAllPayment = req =>
fetch({ fetch({
url: PAYMENT_PATH + '/all/opened/payment', url: PAYMENT_PATH + '/all/opened/payment',
method: 'get', method: 'get',
...req, ...req,
}); });
export const getOpenedAbility = req => export const getOpenedAbility = req =>
fetch({ fetch({
url: PAYMENT_PATH + '/opened/ability', url: PAYMENT_PATH + '/opened/ability',
method: 'get', method: 'get',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const path = process.env.VUE_APP_BASE_SERVER_URL;
const prepaidModelPath = '/dcxy/api/prepaidModel'; const prepaidModelPath = '/dcxy/api/prepaidModel';
export const query4Page = req => export const query4Page = req =>
fetch({ fetch({
url: path + prepaidModelPath + '/prepaidModel/list', url: prepaidModelPath + '/prepaidModel/list',
method: 'POST', method: 'POST',
...req, ...req,
}); });
...@@ -11,7 +10,7 @@ export const query4Page = req => ...@@ -11,7 +10,7 @@ export const query4Page = req =>
/**新增 */ /**新增 */
export const addEntity = req => export const addEntity = req =>
fetch({ fetch({
url: path + prepaidModelPath + '/prepaidModel', url: prepaidModelPath + '/prepaidModel',
method: 'POST', method: 'POST',
...req, ...req,
}); });
...@@ -19,7 +18,7 @@ export const addEntity = req => ...@@ -19,7 +18,7 @@ export const addEntity = req =>
/**修改 */ /**修改 */
export const updateEntity = req => export const updateEntity = req =>
fetch({ fetch({
url: path + prepaidModelPath + '/prepaidModel', url: prepaidModelPath + '/prepaidModel',
method: 'PUT', method: 'PUT',
...req, ...req,
}); });
...@@ -27,7 +26,7 @@ export const updateEntity = req => ...@@ -27,7 +26,7 @@ export const updateEntity = req =>
/**删除 */ /**删除 */
export const deleteEntity = req => export const deleteEntity = req =>
fetch({ fetch({
url: path + prepaidModelPath + '/prepaidModel', url: prepaidModelPath + '/prepaidModel',
method: 'DELETE', method: 'DELETE',
...req, ...req,
}); });
...@@ -35,16 +34,15 @@ export const deleteEntity = req => ...@@ -35,16 +34,15 @@ export const deleteEntity = req =>
/**详情 */ /**详情 */
export const getEntityById = req => export const getEntityById = req =>
fetch({ fetch({
url: path + prepaidModelPath + '/prepaidModel', url: prepaidModelPath + '/prepaidModel',
method: 'GET', method: 'GET',
...req, ...req,
}); });
/**详情 */
/**详情 */
export const queryServiceByAreaId = req => export const queryServiceByAreaId = req =>
fetch({ fetch({
url: path + '/dcxy/api/base/service/queryServiceByAreaId', url: '/dcxy/api/base/service/queryServiceByAreaId',
method: 'GET', method: 'GET',
...req, ...req,
}); });
import fetch from './fetch'; import { smaproFetch as fetch } from './fetch';
export const getPageOrderMoney = req => export const getPageOrderMoney = req =>
fetch({ fetch({
...@@ -19,4 +19,4 @@ export const getRefundInfo = req => ...@@ -19,4 +19,4 @@ export const getRefundInfo = req =>
url: '/smpro/prepay/order/for/refund', url: '/smpro/prepay/order/for/refund',
method: 'POST', method: 'POST',
...req, ...req,
}); });
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const downloadUrl = manageShell.default.utils.downloadFiles; const downloadUrl = manageShell.default.utils.downloadFiles;
export const fetchEquList = req => export const fetchEquList = req =>
...@@ -7,7 +7,7 @@ export const fetchEquList = req => ...@@ -7,7 +7,7 @@ export const fetchEquList = req =>
method: 'post', method: 'post',
...req, ...req,
}); });
export const getbatchNumber = req => export const getbatchNumber = req =>
fetch({ fetch({
url: '/dcxy/purchasingOrder/findBatchNumber', url: '/dcxy/purchasingOrder/findBatchNumber',
...@@ -61,5 +61,5 @@ fetch({ ...@@ -61,5 +61,5 @@ fetch({
headers: { headers: {
'Content-type': 'multipart/form-data', 'Content-type': 'multipart/form-data',
}, },
}); });
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
export const fetchOrderList = req => export const fetchOrderList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { statisticsFetch as fetch } from '../fetch';
const path = process.env.VUE_APP_BASE_SERVER_URL; const path = process.env.VUE_APP_BASE_SERVER_URL;
//获取所有支付方式 //获取所有支付方式
export const fetchPaymentList = req => export const fetchPaymentList = req =>
fetch({ fetch({
url: path + '/dcxy/api/payment/all/payments', url: path + '/dcxy/api/payment/all/payments',
method: 'get', method: 'get',
...req, ...req,
}); });
\ No newline at end of file
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchRoleList = req => export const fetchRoleList = req =>
fetch({ fetch({
......
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const SERVICE_PATH = '/dcxy/api/base/service'; const SERVICE_PATH = '/dcxy/api/base/service';
const RECORD_PATH = '/dcxy/api/base/record'; const RECORD_PATH = '/dcxy/api/base/record';
......
const appoint = manageShell.default.createBaseFetch({ import createBaseFetch from '../../lib/Api';
baseURL:
process.env.VUE_APP_SHOWER_SERVER_URL + const appoint = createBaseFetch({
'/dcxy/showeAppointment', baseURL: process.env.VUE_APP_SHOWER_SERVER_URL + '/dcxy/showeAppointment',
timeout: 10000, timeout: 10000,
}); });
export default appoint; export default appoint;
const base = manageShell.default.createBaseFetch({ import { baseFetch as base } from '../fetch';
baseURL:
process.env.VUE_APP_BASE_SERVER_URL, export default base;
timeout: 10000,
});
export default base;
\ No newline at end of file
const config = manageShell.default.createBaseFetch({ import createBaseFetch from '../../lib/Api';
baseURL:
process.env.VUE_APP_SHOWER_SERVER_URL + const config = createBaseFetch({
'/dcxy/shower', baseURL: process.env.VUE_APP_SHOWER_SERVER_URL + '/dcxy/shower',
timeout: 10000, timeout: 10000,
}); });
export default config; export default config;
const fetch = manageShell.default.createBaseFetch({ import createBaseFetch from '../../lib/Api';
const fetch = createBaseFetch({
baseURL: baseURL:
process.env.VUE_APP_SHOWER_SERVER_URL + process.env.VUE_APP_SHOWER_SERVER_URL +
'/dcxy/construction/shower/manager/manager', '/dcxy/construction/shower/manager/manager',
......
const showerBase = manageShell.default.createBaseFetch({ import createBaseFetch from '../../lib/Api';
baseURL:
process.env.VUE_APP_SHOWER_SERVER_URL, const showerBase = createBaseFetch({
timeout: 10000, baseURL: process.env.VUE_APP_SHOWER_SERVER_URL,
}); timeout: 10000,
});
export default showerBase;
export default showerBase;
\ No newline at end of file
import fetch from '../fetch'; import { baseFetch as fetch } from '../fetch';
const SMS = '/dcxy/sms/platform'; const SMS = '/dcxy/sms/platform';
export const listPlatform = req => export const listPlatform = req =>
fetch({ fetch({
url: SMS + '/list', url: SMS + '/list',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const addPlatform = req => export const addPlatform = req =>
fetch({ fetch({
url: SMS + '/increase', url: SMS + '/increase',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const updatePlatform = req => export const updatePlatform = req =>
fetch({ fetch({
url: SMS + '/edit', url: SMS + '/edit',
method: 'GET', method: 'GET',
...req, ...req,
}); });
export const threeRecord = req => export const threeRecord = req =>
fetch({ fetch({
url: SMS + '/record', url: SMS + '/record',
method: 'GET', method: 'GET',
...req, ...req,
}); });
const statistics = manageShell.default.createBaseFetch({ import { statisticsFetch as statistics } from './fetch';
baseURL: process.env.VUE_APP_STATISTICS_SERVER_URL,
timeout: 10000, export default statistics;
});
export default statistics;
\ No newline at end of file
import fetch from '../fetch'; import { systemFetch as fetch } from '../fetch';
export const fetchUserList = req => export const fetchUserList = req =>
fetch({ fetch({
......
import fetch from '@/api/fetch'; import { systemFetch as fetch } from '../fetch';
// 登录 // 登录
export const login = req => export const login = req =>
......
import fetch from '@/api/fetch'; import { systemFetch as fetch } from '../fetch';
export const updateUserinfo = req => export const updateUserinfo = req =>
fetch({ fetch({
......
const pagination = manageShell.default.storeModule.pagination;
import { import {
queryPage, queryPage,
addEntity, addEntity,
...@@ -7,9 +6,13 @@ import { ...@@ -7,9 +6,13 @@ import {
getDetail, getDetail,
lockEntity, lockEntity,
} from '../../api/SmaproPrepayConfig.js'; } from '../../api/SmaproPrepayConfig.js';
const initFiltersStore = manageShell.default.storeModule.filter;
const getFilters = manageShell.default.utils.getFilters; import storeModule from '../../lib/storeModule';
const formatDate = manageShell.default.utils.formatDate; import utils from '../../lib/utils';
const pagination = storeModule.pagination;
const initFiltersStore = storeModule.filter;
const getFilters = utils.getFilters;
const formatDate = utils.formatDate;
const GET_ROLE_LIST = 'GET_ROLE_LIST'; const GET_ROLE_LIST = 'GET_ROLE_LIST';
const DETAIL_OPER_RECORD = 'DETAIL_OPER_RECORD'; //操作记录 const DETAIL_OPER_RECORD = 'DETAIL_OPER_RECORD'; //操作记录
...@@ -19,15 +22,11 @@ const initFilters = () => ({ ...@@ -19,15 +22,11 @@ const initFilters = () => ({
operateId: null, operateId: null,
serviceId: null, serviceId: null,
timeRange: [], timeRange: [],
isOpen:null, isOpen: null,
operator:'', operator: '',
}); });
const filtersStore = initFiltersStore(initFilters); const filtersStore = initFiltersStore(initFilters);
const state = () => ({ const state = () => ({
list: [], list: [],
detailOperRecord: [], detailOperRecord: [],
...@@ -41,8 +40,8 @@ const getters = { ...@@ -41,8 +40,8 @@ const getters = {
}; };
const actions = { const actions = {
fetchLists({ state, commit, dispatch,getters }, entity) { fetchLists({ state, commit, dispatch, getters }, entity) {
// let filters = getFilters(getters.filters); // let filters = getFilters(getters.filters);
const { timeRange, ...filters } = getFilters(getters.filters); const { timeRange, ...filters } = getFilters(getters.filters);
if (timeRange) { if (timeRange) {
const [fromDate, toDate] = timeRange; const [fromDate, toDate] = timeRange;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
size="big" size="big"
> >
<date-range-picker <date-range-picker
:value="storeFilters.timeRange" :value="storeFilters.timeRange"
@input="val => updateFilters({ timeRange: val })" @input="val => updateFilters({ timeRange: val })"
clearable clearable
/> />
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<search-item label="是否开启"> <search-item label="是否开启">
<el-select <el-select
:value="storeFilters.isOpen" :value="storeFilters.isOpen"
@input="val => updateFilters({ isOpen: val })" @input="val => updateFilters({ isOpen: val })"
clearable clearable
> >
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<search-item label="更新人"> <search-item label="更新人">
<el-input <el-input
:value="storeFilters.operator" :value="storeFilters.operator"
@input="val => updateFilters({ operator: val })" @input="val => updateFilters({ operator: val })"
clearable clearable
/> />
...@@ -117,10 +117,11 @@ ...@@ -117,10 +117,11 @@
</template> </template>
<script> <script>
const ListMixin = manageShell.default.mixinModule.ListPage; import mixinModule from '../../lib/mixins';
const opMixin = manageShell.default.mixinModule.Input.OperatorOptions; const ListMixin = mixinModule.ListPage;
const serMixin = manageShell.default.mixinModule.Input.ServiceType; const opMixin = mixinModule.Input.OperatorOptions;
const baseDataMixin = manageShell.default.mixinModule.Input.BaseData; const serMixin = mixinModule.Input.ServiceType;
const baseDataMixin = mixinModule.Input.BaseData;
import { mapGetters, mapActions } from 'vuex'; import { mapGetters, mapActions } from 'vuex';
import Table from './components/Table'; import Table from './components/Table';
import EditDialog from './components/EditDialog'; import EditDialog from './components/EditDialog';
...@@ -242,8 +243,8 @@ export default { ...@@ -242,8 +243,8 @@ export default {
entity.operateId = entity.operateId =
this.userInfo.operateId != 3 ? this.userInfo.operateId : null; this.userInfo.operateId != 3 ? this.userInfo.operateId : null;
} }
if(this.storeFilters.operateId){ if (this.storeFilters.operateId) {
entity.operateId =this.storeFilters.operateId; entity.operateId = this.storeFilters.operateId;
} }
this.fetchLists(entity); this.fetchLists(entity);
}, },
......
<template> <template>
<normal-dialog :visible="visible" :before-close="resetAddDialog" @update:visible="updateVisibleHandle" class="addClass-smproPrepayConfig"> <normal-dialog
:visible="visible"
:before-close="resetAddDialog"
@update:visible="updateVisibleHandle"
class="addClass-smproPrepayConfig"
>
<template slot="title"> <template slot="title">
新增 新增
</template> </template>
...@@ -7,10 +12,17 @@ ...@@ -7,10 +12,17 @@
<div class="giveserviceClass"> <div class="giveserviceClass">
<el-form label-width="180px"> <el-form label-width="180px">
<el-form-item label="运营商"> <el-form-item label="运营商">
<operator-select v-model="selected.operateId" :disabled="opdisabled"/> <operator-select
v-model="selected.operateId"
:disabled="opdisabled"
/>
</el-form-item> </el-form-item>
<el-form-item label="服务"> <el-form-item label="服务">
<service-select v-model="selected.serviceId" :ServiceType="1" :isAll="1"/> <service-select
v-model="selected.serviceId"
:ServiceType="1"
:isAll="1"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -19,21 +31,48 @@ ...@@ -19,21 +31,48 @@
<div class="udpate-titile-class backage">预付金额</div> <div class="udpate-titile-class backage">预付金额</div>
<div class="udpate-titile-class backage">操作</div> <div class="udpate-titile-class backage">操作</div>
<div v-for="item in selected.listSpcdv" :key="item.id"> <div
v-for="item in selected.listSpcdv"
:key="item.id"
>
<div class="udpate-titile-class"> <div class="udpate-titile-class">
<el-input v-model="item.sortId" type="number" placeholder="请输入数字" max="1000" /> <el-input
v-model="item.sortId"
type="number"
placeholder="请输入数字"
max="1000"
/>
</div> </div>
<div class="udpate-titile-class"> <div class="udpate-titile-class">
<el-input v-model="item.prepayMoney" type="number" placeholder="请输入数字" max="1000" /> <el-input
v-model="item.prepayMoney"
type="number"
placeholder="请输入数字"
max="1000"
/>
</div> </div>
<el-button class="udpate-titile-class" v-if="item.type === 2" type="primary" @click="deleteEntity(item.id)">删除</el-button> <el-button
<el-button class="udpate-titile-class" v-else type="primary" @click="addEntity">+</el-button> class="udpate-titile-class"
v-if="item.type === 2"
type="primary"
@click="deleteEntity(item.id)"
>删除</el-button>
<el-button
class="udpate-titile-class"
v-else
type="primary"
@click="addEntity"
>+</el-button>
</div> </div>
</div> </div>
<div slot="footer"> <div slot="footer">
<el-button type="primary" @click="submitUpdateHandle" :disabled="loading">确定</el-button> <el-button
type="primary"
@click="submitUpdateHandle"
:disabled="loading"
>确定</el-button>
<el-button @click="closeDialog">取消</el-button> <el-button @click="closeDialog">取消</el-button>
</div> </div>
...@@ -41,8 +80,9 @@ ...@@ -41,8 +80,9 @@
</template> </template>
<script> <script>
const dialogMixin = manageShell.default.mixinModule.Dialog; import mixinModule from '../../../lib/mixins';
const serviceMixin = manageShell.default.mixinModule.Input.ServiceType; const dialogMixin = mixinModule.Dialog;
const serviceMixin = mixinModule.Input.ServiceType;
//default.mixinModule.Input.ServiceType //default.mixinModule.Input.ServiceType
export default { export default {
...@@ -62,15 +102,15 @@ export default { ...@@ -62,15 +102,15 @@ export default {
closeDialog: { closeDialog: {
type: Function, type: Function,
}, },
selected:Object, selected: Object,
opdisabled:Boolean, opdisabled: Boolean,
}, },
mixins: [dialogMixin, serviceMixin], mixins: [dialogMixin, serviceMixin],
data() { data() {
return { return {
services: [], services: [],
bugeidian:false, bugeidian: false,
// this.fetchServiceTypeList, // this.fetchServiceTypeList,
}; };
}, },
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</form-area> </form-area>
</div> </div>
<div class="udpate-class"> <div class="udpate-class">
<form-area label-width="180px" title="操作记录"> <form-area label-width="180px" title="操作记录">
<div v-for="item in selected.opRecord" :key="item.id"> <div v-for="item in selected.opRecord" :key="item.id">
<div class="udpate-titile-class"> <div class="udpate-titile-class">
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
</template> </template>
<script> <script>
const dialogMixin = manageShell.default.mixinModule.Dialog; import mixinModule from '../../../lib/mixins'
const dialogMixin = mixinModule.Dialog;
export default { export default {
props: { props: {
......
<template> <template>
<normal-dialog :visible="visible" :before-close="resetAddDialog" @update:visible="updateVisibleHandle" class="edit_smp"> <normal-dialog
:visible="visible"
:before-close="resetAddDialog"
@update:visible="updateVisibleHandle"
class="edit_smp"
>
<template slot="title"> <template slot="title">
编辑 编辑
</template> </template>
...@@ -20,21 +25,48 @@ ...@@ -20,21 +25,48 @@
<div class="udpate-titile-class backage">预付金额</div> <div class="udpate-titile-class backage">预付金额</div>
<div class="udpate-titile-class backage">操作</div> <div class="udpate-titile-class backage">操作</div>
<div v-for="item in selected.listSpcdv" :key="item.id"> <div
v-for="item in selected.listSpcdv"
:key="item.id"
>
<div class="udpate-titile-class"> <div class="udpate-titile-class">
<el-input v-model="item.sortId" type="number" placeholder="请输入数字" max="1000" /> <el-input
v-model="item.sortId"
type="number"
placeholder="请输入数字"
max="1000"
/>
</div> </div>
<div class="udpate-titile-class"> <div class="udpate-titile-class">
<el-input v-model="item.prepayMoney" type="number" placeholder="请输入数字" max="1000" /> <el-input
v-model="item.prepayMoney"
type="number"
placeholder="请输入数字"
max="1000"
/>
</div> </div>
<el-button class="udpate-titile-class" v-if="item.type === 2" type="primary" @click="deleteEntity(item.id)">删除</el-button> <el-button
<el-button class="udpate-titile-class" v-else type="primary" @click="addEntity">+</el-button> class="udpate-titile-class"
v-if="item.type === 2"
type="primary"
@click="deleteEntity(item.id)"
>删除</el-button>
<el-button
class="udpate-titile-class"
v-else
type="primary"
@click="addEntity"
>+</el-button>
</div> </div>
</div> </div>
<div slot="footer"> <div slot="footer">
<el-button type="primary" @click="submitUpdateHandle" :disabled="loading">确定</el-button> <el-button
type="primary"
@click="submitUpdateHandle"
:disabled="loading"
>确定</el-button>
<el-button @click="closeDialog">取消</el-button> <el-button @click="closeDialog">取消</el-button>
</div> </div>
...@@ -42,7 +74,8 @@ ...@@ -42,7 +74,8 @@
</template> </template>
<script> <script>
const dialogMixin = manageShell.default.mixinModule.Dialog; import mixinModule from '../../../lib/mixins';
const dialogMixin = mixinModule.Dialog;
export default { export default {
props: { props: {
......
import CreatSystem from '../lib/main'; import { createSystem } from '../lib/main';
import asyncRouterMap from '../router/asyncRoutes'; import asyncRouterMap from '../router/asyncRoutes';
import utils from '../lib/utils';
window.manageShell = { default: CreatSystem };
window.allAasyncRouterMap = [...asyncRouterMap];
let constantRouter = [ let constantRouter = [
{ {
...@@ -15,7 +13,7 @@ let constantRouter = [ ...@@ -15,7 +13,7 @@ let constantRouter = [
]; ];
const routeFilter = (routes, allRoute) => { const routeFilter = (routes, allRoute) => {
if (allRoute && allRoute.length) { if (allRoute && allRoute.length) {
let addRoute = manageShell.default.utils.route.formatRouteLink(allRoute); let addRoute = utils.route.formatRouteLink(allRoute);
for (let index = 0; index < addRoute.length; index++) { for (let index = 0; index < addRoute.length; index++) {
const element = addRoute[index]; const element = addRoute[index];
if (element.children) { if (element.children) {
...@@ -32,14 +30,15 @@ const routeFilter = (routes, allRoute) => { ...@@ -32,14 +30,15 @@ const routeFilter = (routes, allRoute) => {
routes, routes,
}; };
}; };
const script = document.createElement('script'); createSystem({
script.text = ` basePath: process.env.VUE_APP_BASE_URL,
manageShell.default.createSystem({ routers: asyncRouterMap,
basePath: '${process.env.VUE_APP_BASE_URL}', constantRouter: constantRouter,
routers: allAasyncRouterMap, whiteList: '/asd',
constantRouter: ${JSON.stringify(constantRouter)}, routeFilter: routeFilter,
whiteList: '/asd', });
routeFilter: ${routeFilter.toString()},
}) // const script = document.createElement('script');
`; // script.text = `
document.body.appendChild(script); // `;
// document.body.appendChild(script);
...@@ -25,52 +25,57 @@ class SystemShell { ...@@ -25,52 +25,57 @@ class SystemShell {
this.utils = utilsModule; this.utils = utilsModule;
this.createBaseFetch = createBaseFetch; this.createBaseFetch = createBaseFetch;
} }
createSystem = ({ }
basePath = '/',
routers,
routeFilter,
constantRouter,
whiteList,
}) => {
const router = new VueRouter({
mode: 'history',
base: basePath,
scrollBehavior: () => ({ y: 0 }),
routes:
constantRouter && constantRouter instanceof Array
? [...constantRouterMap, ...constantRouter]
: constantRouterMap,
});
routeStore.install(store);
extendCom(Vue);
const allWhiteList =
whiteList && typeof whiteList === 'string'
? [
...process.env.VUE_APP_WHITE_LIST.split(','),
...whiteList.split(','),
]
: process.env.VUE_APP_WHITE_LIST.split(','); // 不重定向白名单
store.dispatch('getWhiteList', allWhiteList); export const createSystem = ({
configRoutePermission(router, store, routers, allWhiteList); basePath = '/',
Vue.config.productionTip = false; routers,
routeFilter,
constantRouter,
whiteList,
}) => {
const router = new VueRouter({
mode: 'history',
base: basePath,
scrollBehavior: () => ({ y: 0 }),
routes:
constantRouter && constantRouter instanceof Array
? [...constantRouterMap, ...constantRouter]
: constantRouterMap,
});
routeStore.install(store);
extendCom(Vue);
const allWhiteList =
whiteList && typeof whiteList === 'string'
? [...process.env.VUE_APP_WHITE_LIST.split(','), ...whiteList.split(',')]
: process.env.VUE_APP_WHITE_LIST.split(','); // 不重定向白名单
let app = new Vue({ store.dispatch('getWhiteList', allWhiteList);
el: '#app', configRoutePermission(router, store, routers, allWhiteList);
router, Vue.config.productionTip = false;
store,
render: h => { let app = new Vue({
let routes = [...constantRouterMap]; el: '#app',
let allRoute = store.getters.asyncRoutes; router,
if (typeof routeFilter === 'function') { store,
const data = routeFilter(routes, allRoute); render: h => {
routes = data.routes; let routes = [...constantRouterMap];
allRoute = data.allRoute; let allRoute = store.getters.asyncRoutes;
} if (typeof routeFilter === 'function') {
return <App route={routes} allRoutes={allRoute} />; const data = routeFilter(routes, allRoute);
}, routes = data.routes;
}); allRoute = data.allRoute;
return app; }
}; return <App route={routes} allRoutes={allRoute} />;
} },
export default new SystemShell(); });
return app;
};
export default {
Api: fetch,
storeModule: storeModule,
mixinModule: mixinModule,
utils: utilsModule,
createBaseFetch: createBaseFetch,
};
import _import from './_import'; import _import from './_import';
import HomeIcon from '@/assets/images/menu/home.png'; import HomeIcon from '@/assets/images/menu/home.png';
// import subSystemRoutes from './asyncRoutes/index'; import subSystemRoutes from './asyncRoutes/index';
export default [ export default [
{ {
...@@ -25,5 +25,5 @@ export default [ ...@@ -25,5 +25,5 @@ export default [
component: _import('Dashboard/Dashboard'), component: _import('Dashboard/Dashboard'),
hidden: true, hidden: true,
}, },
// ...subSystemRoutes, ...subSystemRoutes,
]; ];
import operatorRoutes from './operator'; // import operatorRoutes from './operator';
import rechargeRoutes from './recharge'; // import rechargeRoutes from './recharge';
import SmaproPrepayConfigRoute from './SmaproPrepayConfig'; import SmaproPrepayConfigRoute from './SmaproPrepayConfig';
import SmaproRefundOrderStore from './SmaproRefundOrder'; // import SmaproRefundOrderStore from './SmaproRefundOrder';
import CustomerRoute from './customer'; // import CustomerRoute from './customer';
import PrepayOrderRoute from './prepayOrder'; // import PrepayOrderRoute from './prepayOrder';
import OperateOrderRoute from './operateOrder'; // import OperateOrderRoute from './operateOrder';
import FlatformTollRoute from './flatformToll'; // import FlatformTollRoute from './flatformToll';
import appRoutes from './appRoutes'; // import appRoutes from './appRoutes';
import consumeReportRouter from './consumeReport'; // import consumeReportRouter from './consumeReport';
import consumeOrderallRouter from './consumeOrderAll'; // import consumeOrderallRouter from './consumeOrderAll';
import showerRoute from './shower'; // import showerRoute from './shower';
import deviceManageRoute from './deviceManage'; // import deviceManageRoute from './deviceManage';
import hairDryerRoute from './hairDryer'; // import hairDryerRoute from './hairDryer';
import dispenserRoute from './waterDispenser'; // import dispenserRoute from './waterDispenser';
import equipmentParamsRoute from './equipmentParamsManagement'; // import equipmentParamsRoute from './equipmentParamsManagement';
import deviceParamsRoute from './deviceParamsConfig'; // import deviceParamsRoute from './deviceParamsConfig';
import equipmentManagementRoute from './device3'; // import equipmentManagementRoute from './device3';
import systemUserRoute from './systemUser'; // import systemUserRoute from './systemUser';
import operLogRoute from './operLog'; // import operLogRoute from './operLog';
import menuRoute from './menu'; // import menuRoute from './menu';
import roleRoute from './role'; // import roleRoute from './role';
import adminFunction from './adminFunction'; // import adminFunction from './adminFunction';
import adminArea from './adminArea'; // import adminArea from './adminArea';
import interfaceRoute from './interface'; // import interfaceRoute from './interface';
import reportRoute from './appReportLog'; // import reportRoute from './appReportLog';
import StateRoute from './state'; // import StateRoute from './state';
import CMBRoute from './cmb'; // import CMBRoute from './cmb';
import AREARoute from './area'; // import AREARoute from './area';
import serviceRoute from './selfservice'; // import serviceRoute from './selfservice';
import OPERRoute from './operator'; // import OPERRoute from './operator';
import paymentRoute from './payment'; // import paymentRoute from './payment';
import operationManagementRoute from './operationManagement'; // import operationManagementRoute from './operationManagement';
import areaRechargeRoute from './areaRecharge'; // import areaRechargeRoute from './areaRecharge';
import controlRoute from './rechargeControl'; // import controlRoute from './rechargeControl';
import purchasingRoute from './purchasingOrder'; // import purchasingRoute from './purchasingOrder';
import prepaidModelRoute from './prepaidModel'; // import prepaidModelRoute from './prepaidModel';
import areaSmsRoute from './areaSms'; // import areaSmsRoute from './areaSms';
import accountRouter from './account'; // import accountRouter from './account';
import customerInfoList from './customerInfo'; // import customerInfoList from './customerInfo';
import customerOrder from './order'; // import customerOrder from './order';
export default [ export default [
...operatorRoutes, // ...operatorRoutes,
...rechargeRoutes, // ...rechargeRoutes,
...SmaproPrepayConfigRoute, ...SmaproPrepayConfigRoute,
...CustomerRoute, // ...CustomerRoute,
...PrepayOrderRoute, // ...PrepayOrderRoute,
...OperateOrderRoute, // ...OperateOrderRoute,
...FlatformTollRoute, // ...FlatformTollRoute,
...SmaproRefundOrderStore, // ...SmaproRefundOrderStore,
...appRoutes, // ...appRoutes,
...consumeReportRouter, // ...consumeReportRouter,
...consumeOrderallRouter, // ...consumeOrderallRouter,
...showerRoute, // ...showerRoute,
...deviceManageRoute, // ...deviceManageRoute,
...hairDryerRoute, // ...hairDryerRoute,
...dispenserRoute, // ...dispenserRoute,
...equipmentParamsRoute, // ...equipmentParamsRoute,
...deviceParamsRoute, // ...deviceParamsRoute,
...equipmentManagementRoute, // ...equipmentManagementRoute,
...systemUserRoute, // ...systemUserRoute,
...operLogRoute, // ...operLogRoute,
...menuRoute, // ...menuRoute,
...roleRoute, // ...roleRoute,
...adminFunction, // ...adminFunction,
...adminArea, // ...adminArea,
...interfaceRoute, // ...interfaceRoute,
...reportRoute, // ...reportRoute,
...StateRoute, // ...StateRoute,
...CMBRoute, // ...CMBRoute,
...AREARoute, // ...AREARoute,
...serviceRoute, // ...serviceRoute,
...OPERRoute, // ...OPERRoute,
...paymentRoute, // ...paymentRoute,
...operationManagementRoute, // ...operationManagementRoute,
...areaRechargeRoute, // ...areaRechargeRoute,
...controlRoute, // ...controlRoute,
...purchasingRoute, // ...purchasingRoute,
...prepaidModelRoute, // ...prepaidModelRoute,
...areaSmsRoute, // ...areaSmsRoute,
...accountRouter, // ...accountRouter,
...customerInfoList, // ...customerInfoList,
...customerOrder, // ...customerOrder,
]; ];
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