| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- import {
- http
- } from './service.js'
- const uploadFileUrl = '/blade-resource/oss/endpoint/put-file'
- //文件上传
- const uploadFile = (p) => http.upload(uploadFileUrl, {
- name: 'file',
- filePath: p
- })
- //手机验证码
- const sms={
- send:p => http.post('/sms/sendSms'+p)
- }
- const notice = {
- detail: p => http.get('sing_active/activenotice/detail', {
- params: p
- }),
- list: p => http.get('sing_active/activenotice/list', {
- params: p
- }),
- //从缓存中获取
- getDetail: p => http.get('app/active/notice/getNotice', {
- params: p
- }),
- }
- const platform = {
- setting: p => http.get('blade-system/param/detail', {
- params: p
- }),
- getPlatformParams: p => http.get('/app/platformsetting/getPlatformValueByList', {
- params: p
- }),
- getPlatformValue: p => http.get('/app/platformsetting/getPlatformValue', {
- params: p
- }),
- }
- const activity = {
- getPromoteNum: p => http.get('app/active/help', {
- params: p
- }),
- getWorksList: p => http.get('/app/active/product/sortList', {
- params: p
- }),
- sortListQuery: p => http.get('/app/active/product/sortListQuery', {
- params: p
- }),
- indexList: p => http.get('app/active/product/list', {
- params: p
- }),
- searchWork: p => http.get('/app/active/product/search', {
- params: p
- }),
- getWorksDetail: id => http.get('/sing_active/activeproductrecord/detail', {
- params: {
- id
- }
- }),
- list: p => http.get('/sing_active/activeproductrecord/list', {
- params: p
- }),
- // getGiftList: p => http.get('/sing_goods/helpgoods/list', {
- // params: p
- // }),
- getGiftList: p => http.get('app/help/goods/getHelpGoodsList', {
- params: p
- }),
- getMyTotalHeat: p => http.get('/sing_active/activeproductrecord/getMyTotalHeat', {
- params: p
- }),
- submitForm: p => http.post('/sing_active/activeproductrecord/submit', p),
- mediaSave: p => http.post('/sing_active/activeproductrecord/save', {
- params: p
- }),
- }
- //微信api
- const wxApp = {
- getOpenId: p => http.get('/wx-app/getOpenId', {
- params: p
- }),
- getOpenData: p => http.post('/wx-app/getOpenData', p),
- getGenerateScheme: p => http.get('/wx-app/getGenerateScheme', {
- params: p
- }),
- getWxShareData: p => http.get('/wxOfficial/getShareData', {
- params: p
- }),
- getH5WxAuth: p => http.get('/user/login/getH5WeixinAuthorizeUrl', {
- params: p
- }),
- getH5WxUserInfo: p => http.get('/user/login/getWeiXinH5UserInfo', {
- params: p
- }),
- }
- //字典
- const dict = {
- list: p => http.get('/blade-system/dict-biz/dictionary', {
- params: p
- }),
- parentList: p => http.get('/blade-system/dict-biz/parent-list', {
- params: p
- }),
- dictionaryTree: p => http.get('/blade-system/dict-biz/dictionary-tree', {
- params: p
- }),
- }
- const loginUser = {
- list: p => http.get('ldt_user/loginuser/list', {
- params: p
- }),
- submit: p => http.post('sing_user/loginuser/submit', p),
- updateInfo: p => http.post('sing_user/loginuser/updateInfo', p),
- login: p => http.post('/user/login/login', p),
- h5Login: p => http.post('/user/login/h5Login', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- updatePhone: p => http.post('/user/login/updatePhone', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- savePhone: p => http.post('/user/login/savePhone', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- detail: p => http.get('sing_user/loginuser/detail', {
- params: p
- }),
- userHeatValueAndPufaPoint: p => http.get('/user/login/userHeatValueAndPufaPoint', {
- params: p
- }),
- }
- const CMCC = {
- isCMCC: p => http.get('/user/login/isCMCC', {
- params: p
- }),
- h5IsCMCC: p => http.get('/user/login/h5IsCMCC', {
- params: p
- }),
- queryCmccPoint: p => http.post('app/cmcc/queryCmccPoint' + p),
- }
- const points = {
- list: p => http.get('sing_point/pointrecord/list', {
- params: p
- }),
- }
- //我的助力
- const help = {
- list: p => http.get('sing_active/activehelprecord/list', {
- params: p
- }),
- }
- //热力明细
- const heatrecord = {
- list: p => http.get('sing_heat_value/heatrecord/list', {
- params: p
- }),
- }
- /**
- * 积分商城
- */
- const pointgoods = {
- list: p => http.get('sing_goods/pointgoods/list', {
- params: p
- }),
- detail: p => http.get('sing_goods/pointgoods/detail', {
- params: p
- }),
- queryList: p => http.get('sing_goods/pointgoods/queryList', {
- params: p
- }),
- queryLogistics: p => http.post('app/point/queryLogistics', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- exchange: p => http.post('app/point/exchange', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- }
- /**
- * 兑换记录
- */
- const goodsorder = {
- list: p => http.get('sing_goods/goodsorder/list', {
- params: p
- }),
- detail: p => http.get('sing_goods/goodsorder/detail', {
- params: p
- }),
- submit: p => http.post('sing_goods/goodsorder/submit', p),
- }
- /**
- * 道具
- */
- const order = {
- sendCmccSms: p => http.post('/app/help/goods/sendCmccSms', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- create: p => http.post('/app/help/goods/createPropsOrder', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- exchange: p => http.post('/app/help/goods/exchangeProps', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- cashExchange: p => http.post('/app/help/goods/createCashPropsOrder', p, {
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- orderDetail: p => http.get('/sing_yeepay/yeepayorder/detail', {
- params: p
- }),
- verificationCode: p => http.get('/app/help/goods/createPropsVerificationCode', {
- params: p
- })
- }
- /**
- * 用户地址
- */
- const address = {
- list: p => http.get("sing_user/useraddress/list", {
- params: p
- }),
- detail: p => http.get("sing_user/useraddress/detail", {
- params: p
- }),
- submit: p => http.post('sing_user/useraddress/submitAddress', p),
- //获取地址信息
- getLocation: p => http.get("sing_user/useraddress/getLocation", {
- params: p
- }),
- }
- /**
- * 字典地址
- */
- const area = {
- province: p => http.get('blade-system/region/lazy-tree?parentCode=00', {
- params: p
- }),
- list: p => http.get('blade-system/region/lazy-tree', {
- params: p
- }),
- }
- const census = {
- online: p => http.get('app/index/census/online', {
- params: p
- }),
- offline: p => http.get('app/index/census/offline', {
- params: p
- }),
- }
- //活动列表
- const activerecord = {
- list: p => http.get('sing_active/activerecord/list', {
- params: p
- }),
- detail: p => http.get('sing_active/activerecord/detail', {
- params: p
- }),
- }
- //海报配置
- const poster={
- list: p => http.get('sing_active/activeposter/list', {
- params: p
- }),
- detail: p => http.get('sing_active/activeposter/detail', {
- params: p
- })
- }
- //易宝支付
- const yeepay={
- saveOrderUrlAndColor: p => http.post('app/yeepay/saveOrderUrlAndColor', p ,{
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded'
- }
- }),
- getOrderUrlAndColor: p => http.get('app/yeepay/getOrderUrlAndColor', {
- params: p
- })
- }
- export const api = {
- uploadFileUrl,
- sms,
- uploadFile,
- dict,
- wxApp,
- loginUser,
- activity,
- platform,
- points,
- help,
- heatrecord,
- CMCC,
- pointgoods,
- goodsorder,
- order,
- address,
- notice,
- area,
- census,
- activerecord,
- poster,
- yeepay,
- }
|