/*
|
* @Descripttion:该文件用于组织服务器请求,添加请求函数时注意 函数重名!
|
* @Author: TM丶
|
* @LastEditors: 小明丶
|
* @Date: 2019-03-30 08:27:46
|
* @LastEditTime: 2021-01-04 09:34:57
|
*/
|
|
import $http from './config';
|
import oldapi from './oldapi';
|
|
|
const api = {
|
...oldapi,
|
// 获取微信配置
|
getTokenInfo(data) {
|
data.apploading = 1;
|
return $http.post('/wechat/getSign', data);
|
},
|
// 获取微信token
|
getWeChatUserInfo(data) {
|
return $http.post('/wechat/userInfo', data);
|
},
|
setUserOpenId(data) {
|
return Service.post('/wechat/binding', data);
|
},
|
//token登陆
|
loginByToken(data) {
|
return $http.post('/login/loginByToken', data);
|
},
|
loginByMerToken(data){
|
return $http.post('/login/loginByMerToken',data);
|
},
|
//登陆
|
login(data) {
|
return $http.post('/login/login', data);
|
},
|
//登出
|
logout(data) {
|
return $http.post('/login/logout', data);
|
},
|
// 获取角色列表
|
getRole(data) {
|
return $http.post('/user/getUserMgrInfo', data);
|
},
|
getAgencyMerList(data){
|
return $http.post('/user/getAgencyMerList',data)
|
},
|
// 获取用户信息
|
getPowerInfo(mgrId) {
|
return $http.post('/user/mgr/powerInfo', {
|
mgrId
|
});
|
},
|
// 账户管理——获取用户信息
|
getUserDetail(mgrId) {
|
return $http.post('/user/mgr/detail', {
|
mgrId
|
});
|
},
|
//修改密码
|
userUpdatePwd(data) {
|
return $http.post('/user/updatePwd', data);
|
},
|
//获取验证码
|
userSendMsg(data) {
|
return $http.post('/user/sendMsg', data);
|
},
|
//忘记密码
|
userForgetPwd(data) {
|
return $http.post('/user/forgetPwd', data);
|
},
|
|
|
|
// 获取地区列表
|
getArea() {
|
let data = {
|
apploading:1
|
};
|
return $http.post('/public/areaList',data);
|
},
|
|
// 获取机构拥有的地区列表
|
getOrgAreaInfo(orgType) {
|
let data = {
|
apploading:1,
|
orgType
|
};
|
return $http.post('/public/getOrgAreaInfo', data);
|
},
|
/**
|
* 渠道相关
|
*/
|
//列表
|
getChannel() {
|
return $http.post('/chan/chanList');
|
},
|
//添加
|
addChan(data) {
|
return $http.post('/chan/addChan', data);
|
},
|
//切换状态
|
channSwitchStatus(data) {
|
return $http.post('/chan/switchStatus', data);
|
},
|
//更新渠道详细信息
|
updateChan(data) {
|
return $http.post('/chan/updateChan', data);
|
},
|
//查看/加载渠道详细信息
|
getChannelInfo(chanId) {
|
return $http.post('/chan/viewChanInf', {chanId});
|
},
|
|
// 获取审批列表
|
getAuditList(data) {
|
return $http.post('/merchant/auditList', data);
|
},
|
//审批商户
|
merAudit(data){
|
return $http.post('/merchant/audit', data);
|
},
|
|
// /merchant/auditList
|
|
getAuditType(data){
|
return $http.post('/merchant/auditType', data);
|
},
|
setAuditType(data){
|
return $http.post('/merchant/setAuditType', data);
|
},
|
|
|
/**
|
* 门店管理相关
|
*/
|
//门店列表
|
storeStoreList(data) {
|
return $http.post('/store/storeList', data);
|
},
|
storeStorePersonList(data) {
|
return $http.post('/agency/userList', data);
|
},
|
//门店详情
|
storeDtl(data) {
|
return $http.post('/store/dtl', data);
|
},
|
//编辑门店
|
storeEdit(data) {
|
return $http.post('/store/edit', data);
|
},
|
//添加门店
|
storeAdd(data) {
|
return $http.post('/store/add', data);
|
},
|
agencyAddUser(data){
|
return $http.post('/agency/addUser', data);
|
},
|
|
|
|
|
|
|
|
|
|
// 数据查询相关
|
//获取产品列表
|
getProductList(data) {
|
return $http.post('/prod/typeList', data);
|
},
|
|
// 获取订单初始化数据
|
getOrderInit(data) {
|
return $http.post('/order/init', data);
|
},
|
|
|
|
|
|
// 账号管理——列表
|
getMgrList(data) {
|
return $http.post('/user/getMgrList', data);
|
},
|
// 账户管理——冻结账户
|
userFreezeMgr(mgrId){
|
return $http.post('/user/freezeMgr', {mgrId});
|
},
|
// 账户管理——增加账户
|
userAdd(data){
|
return $http.post('/user/add', data);
|
},
|
// 账户管理——更新账户信息
|
userUpdate(data){
|
return $http.post('/user/update', data);
|
},
|
|
// 花呗订单列表
|
getHBList(data){
|
return $http.post('/order/hbList', data);
|
},
|
// 获取花呗订单详情
|
getHBDetail(orderId){
|
return $http.post('/order/hbOrderDtl', {orderId});
|
},
|
// 花呗订单——退款
|
hbOrderRefund(data){
|
return $http.post('/hbOrder/refund', data);
|
},
|
// 花呗——订单导出
|
hbExport(data){
|
return $http.post('/order/hbExport', data);
|
},
|
// 获取产品订单金额统计
|
getAmtReport(prodId){
|
return $http.post('/order/amtReport', {prodId});
|
},
|
//获取周次商户统计
|
getMerWeeksReport(){
|
return $http.post('/merchant/weeksReport');
|
},
|
// 商户统计
|
getMerReport(data){
|
return $http.post('/merchant/report',data);
|
},
|
// 获取订单统计
|
getOrderReport(data){
|
return $http.post('/order/report',data);
|
},
|
|
|
|
|
|
|
//获取商户列表
|
merList(data) {
|
return $http.post('/merchant/list', data);
|
},
|
//商户详情
|
merDetail(data) {
|
return $http.post('/merchant/merDetail', data);
|
},
|
//商户照片信息
|
merFile(data) {
|
return $http.post('/merchant/file', data);
|
},
|
//商户列表导出
|
merExport(data) {
|
return $http.post('/merchant/export', data);
|
},
|
getUnAuditNb(data){
|
return $http.post('/merchant/unAuditNb',data);
|
},
|
// 信用卡分期订单
|
getCreditOrderList(data){
|
return $http.post('/order/list', data);
|
},
|
// 信用卡分期 导出
|
creditExport(data){
|
return $http.post('/order/export', data);
|
},
|
// 信用卡分期 详情
|
getCreditDetail(orderId){
|
return $http.post('/order/orderDtl', {orderId});
|
},
|
|
|
|
|
|
//商户注册
|
merRegist(data) {
|
return $http.post('/user/regist', data);
|
},
|
// 商户筛选条件初始化
|
merInitFilter(data){
|
return $http.post('/merchant/initFilter', data);
|
},
|
|
// 模板列表
|
getTempList(data){
|
return $http.post('/temp/tempList', data);
|
},
|
// 模板 初始化数据
|
// getTempInit(){
|
// return $http.post('/temp/init');
|
// },
|
getTempInit(data){
|
return $http.post('/tempManager/init',data);
|
},
|
// 模板详情
|
// getTempDetail(tempId){
|
// return $http.post('/temp/detail',{tempId});
|
// },
|
getTempDetail(tempId){
|
return $http.post('/tempManager/detail',{tempId});
|
},
|
//模板——保存
|
// tempSave(data){
|
// return $http.post('/temp/save',data);
|
// },
|
tempSave(data){
|
return $http.post('/tempManager/save',data);
|
},
|
tempManagerUpdate(data){
|
return $http.post('/tempManager/update',data)
|
},
|
//模板——商户保存
|
tempSaveMerTemp(data){
|
return $http.post('/temp/saveMerTemp',data);
|
},
|
getTempMerRef(data){
|
return $http.post('/temp/getTempMerRef',data);
|
},
|
tempGetMerRef(data){
|
return $http.post('/temp/getMerRef',data);
|
},
|
//模板——商户列表
|
getTempMerList(data){
|
return $http.post('/temp/tempMerList',data);
|
},
|
//模板 保存商户分配模板
|
saveMerListTemp(data){
|
return $http.post('/temp/saveMerListTemp',data);
|
},
|
|
// 微信扫码登录
|
loginByOpenId(data){
|
return $http.post('/login/loginByOpenId',data)
|
},//openid登录
|
checkOpenIdIsBind(data){
|
return $http.post('/user/checkOpenIdIsBind',data)
|
},//判断是否绑定openId
|
userAddStoreManager(data){
|
return $http.post('/user/addStoreManager',data)
|
},//资料补充
|
|
|
}
|
|
export default {
|
install(Vue, opt) {
|
Vue.prototype.$api = api;
|
}
|
}
|