From 0b1bf84d5e918e5a8edc46dc99b2d73e0d8a951d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Wed, 5 Jan 2022 09:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=AE=A1=E6=89=B9=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 70 +++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/assets/api.js b/src/assets/api.js index 4f5b5cac..f9a268a9 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -281,12 +281,12 @@ export const handelResponse = (res, cb, errCb) => { } //营销计划列表 export const getPlanList = (params) => { - return req('get', "http://192.168.6.165:8080" + "/plan", params) + return req('get', baseurl + "/plan", params) } //获取key批次列表 export const getKeyList = (params) => { - return req('get', "http://192.168.6.165:8080" + "/keys", params) + return req('get', baseurl + "/keys", params) } //获取分销商下拉菜单 export const getReSellerOption = (params) => { @@ -304,60 +304,60 @@ export const addPlanStep = (id, params) => { let str = id ? "/"+id :"" if(str) { - return req('put',"http://192.168.6.165:8080" + "/plan/step" + str, params) + return req('put',baseurl + "/plan/step" + str, params) } - return req('post', "http://192.168.6.165:8080" + "/plan/step" + str, params) + return req('post', baseurl + "/plan/step" + str, params) } //获取营销计划草稿信息 export const getDraftInfo = (id, params) => { - return req('get', "http://192.168.6.165:8080" + "/plan/draft/" + id, params) + return req('get', baseurl + "/plan/draft/" + id, params) } //启用停用 营销计划 export const startOrStopPlan = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/plan/status/" + id, params) + return req('put', baseurl + "/plan/status/" + id, params) } //创建key批次信息 export const addKeysBatchInfo = (id, params) => { - return req('post', "http://192.168.6.165:8080" + "/plan/" + id + "/keys", params) + return req('post', baseurl + "/plan/" + id + "/keys", params) } //编辑修改 export const putPlanStep = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/plan/edit/"+id,params) + return req('put', baseurl + "/plan/edit/"+id,params) } //获取key批次信息 export const getKeysBatchInfo = (id, params) => { - return req('get', "http://192.168.6.165:8080" + "/keys", params) + return req('get', baseurl + "/keys", params) } //启用停用key批次信息 export const startOrStopKeybatch = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/keys/status/" + id, params) + return req('put', baseurl + "/keys/status/" + id, params) } //获取key批次详细信息 export const getKeyBatchDetail = (id, params) => { - return req('get', "http://192.168.6.165:8080" + "/keys/" + id, params) + return req('get', baseurl + "/keys/" + id, params) } //更新key批次详细信息 export const putKeyBatchDetail = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/keys/" + id, params) + return req('put', baseurl + "/keys/" + id, params) } //发送key批次压缩包和压缩包密码 export const planSend = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/plan/send/" + id, params) + return req('put', baseurl + "/plan/send/" + id, params) } //是否已经发送过邮件 export const planIsSend = (id) => { - return req('get', "http://192.168.6.165:8080" + "/plan/is_send/" + id) + return req('get', baseurl + "/plan/is_send/" + id) } @@ -366,39 +366,39 @@ export const planIsSend = (id) => { //重新修改手机号邮箱 export const planReceive = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/plan/receive/" + id, params) + return req('put', baseurl + "/plan/receive/" + id, params) } //重新发送key批次压缩包和压缩包密码 export const planResend = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/plan/resend/" + id, params) + return req('put', baseurl + "/plan/resend/" + id, params) } export const keysIsSend = (id, params) => { - return req('get', "http://192.168.6.165:8080" + "/keys/is_send/" + id, params) + return req('get', baseurl + "/keys/is_send/" + id, params) } //作废key批次 export const cancelKey = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/keys/cancel/" + id, params) + return req('put', baseurl + "/keys/cancel/" + id, params) } //发送密钥邮件 export const postKeyEmail = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/keys/send/" + id, params) + return req('put', baseurl + "/keys/send/" + id, params) } //修改密钥邮件 export const putKeyEmail = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/keys/receive/" + id, params) + return req('put', baseurl + "/keys/receive/" + id, params) } export const resKeyEmail = (id, params) => { - return req('put', "http://192.168.6.165:8080" + "/keys/resend/" + id, params) + return req('put', baseurl + "/keys/resend/" + id, params) } @@ -406,17 +406,17 @@ export const resKeyEmail = (id, params) => { // 兑换码管理 //兑换码管理列表 export const getCodesList = (params) => { - return getData('get', "http://192.168.6.165:8080" + "/codes", params) + return getData('get', baseurl + "/codes", params) } //获取兑换码明细 export const getCodesDetail = (id) => { - return req('get', "http://192.168.6.165:8080" + "/codes/"+id) + return req('get', baseurl + "/codes/"+id) } //修改兑换码批次 export const putCodesBatch = (id,params) => { - return req('put', "http://192.168.6.165:8080" + "/codes/edit/"+id,params) + return req('put', baseurl + "/codes/edit/"+id,params) } @@ -425,39 +425,39 @@ export const putCodesBatch = (id,params) => { //更新兑换码 export const putCodes = (id,params) => { - return req('put', "http://192.168.6.165:8080" + "/codes/"+id,params) + return req('put', baseurl + "/codes/"+id,params) } //作废本批次兑换码 export const delCode = (id) => { - return req('delete', "http://192.168.6.165:8080" + "/codes/discard/"+id) + return req('delete', baseurl + "/codes/discard/"+id) } //作废本批次兑换码 export const putCodeStatus = (id,params) => { - return req('put', "http://192.168.6.165:8080" + "/codes/status/"+id,params) + return req('put', baseurl + "/codes/status/"+id,params) } //兑换码商品列表 export const getCodeProductList = (params) => { - return req('get', "http://192.168.6.165:8080" + "/codes/products",params) + return req('get', baseurl + "/codes/products",params) } //删除商品库存信息 export const delCodeProduct = (batch_id,id) => { - return req('delete', "http://192.168.6.165:8080" + "/codes/products/"+batch_id+"/"+id) + return req('delete', baseurl + "/codes/products/"+batch_id+"/"+id) } //更新单个商品信息 export const putCodeProduct = (batch_id,id,params) => { - return req('put', "http://192.168.6.165:8080" + "/codes/products/"+batch_id+"/"+id,params) + return req('put', baseurl + "/codes/products/"+batch_id+"/"+id,params) } //获取商品库存明细 export const getCodeProduct = (batch_id,id) => { - return req('get', "http://192.168.6.165:8080" + "/codes/products/"+batch_id+"/"+id) + return req('get', baseurl + "/codes/products/"+batch_id+"/"+id) } @@ -842,22 +842,22 @@ export const getkeyDetailList= (id,data) => { //提交审核 export const approvals= (id,data) => { - return req('post', "http://192.168.6.165:8080" + "/plan/"+id+"/approvals",data) + return req('post', baseurl + "/plan/"+id+"/approvals",data) } export const getApprovalsInfo= (id,data) => { - return req('get', "http://192.168.6.165:8080" + "/approvals/"+id+"/market_approval_data",data) + return req('get', baseurl + "/approvals/"+id+"/market_approval_data",data) } export const terminateApprovals= (id,data) => { - return req('put', "http://192.168.6.165:8080" + "/approvals/"+id+"/terminate",data) + return req('put', baseurl + "/approvals/"+id+"/terminate",data) } export const getApprovalsStatus= (id,data) => { - return req('get', "http://192.168.6.165:8080" + "/approvals/"+id+"/status") + return req('get', baseurl + "/approvals/"+id+"/status") }