import {http} from './service.js' //文件上传 const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {name:'file',filePath:p}) //字典 const dict=p => http.get('/blade-system/dict-biz/dictionary', {params:p}) //手机验证码 const sms={ send:p => http.post('huawei/sms/sendSms'+p), validCode:(p)=> http.post('huawei/sms/validCode'+p) } const mall={ //获取商场列表 list:p => http.get('cyzh-ldt/mall/list',{params:p}), //获取商场区域 getMallAreaByMallId:p => http.get('cyzh-ldt/app/mall/getMallAreaByMallId?mallId='+p), //获取标签 getShopLabelByMallId:p => http.get("cyzh-ldt/app/mall/getShopLabelByMallId?mallId="+p), //全部标签 getShopLabelAll:p => http.get("cyzh-ldt/gxlabel/list",{params:p}), } //商户管理 const shop={ //获取商户列表 list:p => http.get('cyzh-ldt/shop/list',{params:p}), detail:p => http.get('cyzh-ldt/shop/detail',{params:p}), submit:(p)=> http.post('cyzh-ldt/shop/submit',p), statistic:p => http.get('cyzh-ldt/app/shop/statistic?shopId='+p), payBefore:p => http.post('cyzh-ldt/loginuser/payBeforeNew',p), yingshouPage:p => http.get('cyzh-ldt/app/shop/getYingShouPage',{params:p}), remainDetailPage:p => http.get('cyzh-ldt/app/shop/getRemainDetailPage',{params:p}), //支付策略 getPointPayType:p => http.post('cyzh-ldt/loginuser/getPointPayType',p), } const memberCenter={ list:p => http.get('cyzh-ldt/app/shop/getMembersByShopId',{params:p}), create:(p)=> http.post('cyzh-ldt/app/shop/createMemberCenter',p), update:(p)=> http.post('cyzh-ldt/app/shop/updateMemberCenter',p), billList:(p)=> http.get('cyzh-ldt/app/shop/getMemberBillRecord',{params:p}) } const activity={ publish:(p)=> http.post('/cyzh-ldt/activity/submit',p), list:p => http.get("cyzh-ldt/app/shop/getActivity", {params:p}), //结束活动 stop:(p)=> http.post('/cyzh-ldt/activity/updateBatch',p), //退出活动 exit:(p)=> http.post('cyzh-ldt/activityjoinrecord/exitBatch',p), //参加活动 join:(p)=> http.post('cyzh-ldt/activityjoinrecord/submit',p), //活动详情 detail:p => http.get("/cyzh-ldt/activity/detail", {params:p}), } //用户银行 const userBank={ detail:p => http.get('cyzh-ldt/userbank/detail',{params:p}), list:p => http.get('cyzh-ldt/userbank/list',{params:p}), appList:p => http.get('cyzh-ldt/userbank/appList',{params:p}), submit:p => http.post('cyzh-ldt/userbank/submit', p), remove:p => http.post('cyzh-ldt/userbank/remove?ids='+p), } //accout const accout={ register:p => http.post('cyzh-ldt/appaccount/shop/register',p), login:p => http.post('cyzh-ldt/appaccount/login',p), modifPaw:p => http.post('cyzh-ldt/appaccount/setPassword',p), forgetPaw:p => http.post('cyzh-ldt/appaccount/forgetPassword',p), } //webSocket const webSocket={ sendInfo:p => http.post('cyzh-ldt/webSocket/sendInfo',p), } //提现 const withdraw={ //提交申请 submit:p => http.post('cyzh-ldt/withdrawrecord/withdraw',p), yeeWithdraw:p => http.get('/payment/payOrder/YEE_PAY/USER_WITHDRAW',{params:p}), } export const api={ uploadFile, dict, sms, mall, shop, memberCenter, activity, userBank, accout, webSocket, withdraw }