api.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. // const DOMAIN_PREFIX = 'http://127.0.0.1:9007'
  2. // const DOMAIN_PREFIX = 'http://192.168.0.91:9007' // 本地
  3. const DOMAIN_PREFIX = 'https://nsappapi.tuanfengkeji.cn' // 生产
  4. const SETTLE_PREFIX = 'https://nsh51.tuanfengkeji.cn' // 入驻
  5. // #ifdef H5
  6. // const WX_API_BASE = '/api' // h5
  7. const WX_API_BASE = DOMAIN_PREFIX // app
  8. const TERMINAL = 2
  9. // #endif
  10. // #ifdef APP || APP-NVUE
  11. const TERMINAL = 3
  12. // #endif
  13. // #ifdef MP
  14. const TERMINAL = 1
  15. // #endif
  16. module.exports = {
  17. DOMAIN_PREFIX,
  18. terminal: TERMINAL, // 画布设备 1 小程序,2 H5,3 App 4 电脑
  19. SettledMerchantPrefix: SETTLE_PREFIX, //商家入驻链接
  20. // shareLink: DOMAIN_PREFIX + '/h5', // 分享地址
  21. shareLink: 'https://tuanfengkeji.com/h5', // 分享地址
  22. //登录注册
  23. // Verify: WX_API_BASE + '/app/getCode', // 获取短信验证码
  24. Login: WX_API_BASE + '/app/login', // 手机号验证码登录、注册
  25. // WxLogin: WX_API_BASE + '/app/wxLogin', // 微信登录
  26. AlipayLogin: WX_API_BASE + '/app/alipayLogin', // 支付宝登录
  27. GetSessionKey: WX_API_BASE + '/app/getSessionKey', // 获取微信手机号绑定
  28. SetWxPhone: WX_API_BASE + '/app/setWxPhone', // 获取微信手机号绑定
  29. UpdateWxPhone: WX_API_BASE + '/app/updateWxPhone', // 获取微信手机号绑定
  30. UpdateAliPhone: WX_API_BASE + '/app/updateAliPhone', // 获取支付宝小程序手机号绑定
  31. delUser: WX_API_BASE + '/user/delUser/',//账户注销
  32. // 查询直播间列表
  33. LiveRoomes: WX_API_BASE + '/canvas/selectLiveList',
  34. SubScribeLive: WX_API_BASE + '/live/subscribeLive',
  35. // 小程序客服查询
  36. CustomerService: WX_API_BASE + '/kf/getAppletKf',
  37. //分类
  38. FindCategoryListByDepth: WX_API_BASE + '/classify/getFirstClassify', // 查询N级类目和查询子级类目
  39. // 查询热搜词
  40. SelectHotSearch: WX_API_BASE + '/app/selectHotSearch' , //获取搜索栏的热门搜索
  41. //商品相关接口
  42. GetClaasifyProducts: WX_API_BASE + '/classify/getClaasifyProducts', // 商品分类到商品列表
  43. SearchHistory: WX_API_BASE + '/app/getHistory', // 查询最近的N条历史记录
  44. GgetSearchProducts: WX_API_BASE + '/app/getSearchProducts', // 商品搜索查询
  45. DeleteSearch: WX_API_BASE + '/app/deleteSearch', // 删除搜索记录
  46. Getindexdata: WX_API_BASE + '/app/index', // 首页数据查询
  47. GetremenList: WX_API_BASE + '/product/getRandomSortProduct', // 获取热门推荐
  48. QueryProductDetail: WX_API_BASE + '/product/getById', // 查询商品详情
  49. QueryProductSku: WX_API_BASE + '/product/getProducts', // 查询商品sku详情
  50. getCouponProducts: WX_API_BASE + '/coupon/getCouponProducts', // 优惠券商品列表查询
  51. QueryMemberAddres: WX_API_BASE + '/receive/getAll', // 查询用户所有收货地址
  52. AddresAdd: WX_API_BASE + '/receive/save', // 保存收货地址
  53. AddresDelete: WX_API_BASE + '/receive/delete', // 删除收货地址
  54. AddresUpdate: WX_API_BASE + '/receive/update', // 更新收货地址
  55. receiveGetInfo: WX_API_BASE + '/receive/getById', // 修改收货地址查询
  56. // 评价
  57. Comment: WX_API_BASE + '/order/addComment', // 评价
  58. AdditionalComment: WX_API_BASE + '/order/addToComment', // 追评接口
  59. MyCommentList: WX_API_BASE + '/comment/getAll', // 查看我的评论列表
  60. LikeOrUnLikeComment: WX_API_BASE + '/comment/like', // 点赞或取消点赞某个评论
  61. //我的
  62. // GetDistributor: WX_API_BASE + '/distributor/getDistributor', // 我的账户信息查询
  63. FindCouponList: WX_API_BASE + '/coupon/getCoupons', // 我的卡券列表查询
  64. MemberAccountWithdraw: WX_API_BASE + '/distributor/save', // 提现申请
  65. GetUser: WX_API_BASE + '/user/getUser', // 个人系信息查询
  66. UpdateUser: WX_API_BASE + '/user/update', // 个人系信息查询
  67. // 店铺服务
  68. GetStore: WX_API_BASE + '/shop/getShopProducts', // 根据id查询店铺
  69. GetStoreShopClassify: WX_API_BASE + '/shop/getShopClassify', // 查询店铺分类
  70. GetShopBanner: WX_API_BASE + '/shop/getShopBanner', // 查询店铺banner
  71. getShopIndex: WX_API_BASE + '/shop/getIndex', // 查询店铺首页
  72. AddBusinessBuyerUser: WX_API_BASE + '/shop/addBusinessBuyerUser', // 成为商家的客户
  73. getShopSeckillIndex: WX_API_BASE + '/seckill/getIndex', // 查询店铺秒杀
  74. // http://127.0.0.1:9007/seckill/getIndex?shopSeckillId=78&page=1&pageSize=10
  75. //用户银行卡相关接口
  76. QueryBankcardList: WX_API_BASE + '/bank/getAll', // 查询用户所有银行卡
  77. SaveBankcard: WX_API_BASE + '/bank/save', // 添加银行卡
  78. UpdateBankcard: WX_API_BASE + '/bank/update', // 修改银行卡
  79. DelMemberBankcard: WX_API_BASE + '/bank/delete', // 删除用户银行卡
  80. GetByIdBankcard: WX_API_BASE + '/bank/getById', // 根据银行卡ID查询信息
  81. // 订单相关接口
  82. FindOrderList: WX_API_BASE + '/order/getAll', // 查询订单列表
  83. Settlement: WX_API_BASE + '/order/getSettlement', // 结算查询
  84. PlaceOrder: WX_API_BASE + '/order/submit', // 提交订单
  85. // GetOrderDetail: WX_API_BASE + '/order/getById', // 订单详情查询
  86. CancelOrder: WX_API_BASE + '/order/cancel', // 取消订单
  87. DelOrder: WX_API_BASE + '/order/delete', // 删除订单
  88. ShippingTrace: WX_API_BASE + '/order/getDilevery', // 物流信息查询
  89. payOrder: WX_API_BASE + '/order/pay', // 支付成功业务处理接口
  90. // gotoPay: WX_API_BASE + '/order/gotoPay', // 小程序支付
  91. // paySuccess: WX_API_BASE + '/order/paySuccess', // 小程序支付成功
  92. // gotoAppPay: WX_API_BASE + '/order/gotoAppPay', // APP立即支付
  93. // gotoH5Pay: WX_API_BASE + '/order/gotoH5Pay', // H5支付
  94. ConfirmReceive: WX_API_BASE + '/order/confirm', // 确认收货
  95. Orderrefund: WX_API_BASE + '/order/refund', // 申请退款
  96. ReasonEnums: WX_API_BASE + '/after/getReasonSelect', // 选择退款原因查询
  97. ApplyReturnMoney: WX_API_BASE + '/after/submit', // 申请售后
  98. // GetHuabeiConfig: WX_API_BASE + '/order/getHuabeiConfig', //查询花呗手续费配置
  99. GetRefundMoney:WX_API_BASE + '/after/getReturnPrice',// 获取退款金额
  100. //购物车
  101. ShoppingaddCart: WX_API_BASE + '/cart/addCart', // 加入购物车
  102. ShoppingCart: WX_API_BASE + '/cart/getCart', // 购物车列表
  103. UpdateNumberCart: WX_API_BASE + '/cart/updateNumber', // 修改购物车商品数量
  104. DeleteCart: WX_API_BASE + '/cart/delete', // 删除购物车商品
  105. SelectedCart: WX_API_BASE + '/cart/selected', // 选中商品
  106. UpdateSkuCart: WX_API_BASE + '/cart/updateSku', // 购物车更换商品规格
  107. //优惠券
  108. getCoupons: WX_API_BASE + '/canvas/getCoupons', // 优惠券查询
  109. ReceiveCoupon: WX_API_BASE + '/coupon/takeCoupon', // 领取优惠券
  110. buildParam4Plug: WX_API_BASE + '/coupon/buildParam4Plug', // 领取优惠券
  111. //分销中心
  112. FindSaleStoreList: WX_API_BASE + '/distributor/getDistributorAll', // 分销中心列表查询
  113. QuerySalesMainInfo: WX_API_BASE + '/distributor/getShopDistributor', // 店铺分销数据查询
  114. FindSalesOrderPage: WX_API_BASE + '/distributor/getReward', // 累计奖励查询
  115. GetNotReward: WX_API_BASE + '/distributor/getNotReward', // 累计未结算奖励查询
  116. FindSalesCustomerList: WX_API_BASE + '/distributor/getBuyers', // 累计客户查询
  117. FindSubordinateSalesList: WX_API_BASE + '/distributor/getDistributors', // 累计分销员查询
  118. FindSalesPromConfig: WX_API_BASE + '/distributor/getShopExtension', // 店铺推广数据查询
  119. StoreProductList: WX_API_BASE + '/distributor/getExtensionProduct', // 推广商品查询
  120. FindMySalesPage: WX_API_BASE + '/distributor/getDistributorOrder', // 分销订单查询
  121. HasApply: WX_API_BASE + '/distributor/check', // 验证当前客户是否为分销员
  122. BindSalesCustomer: WX_API_BASE + '/distributor/bind', // 绑定关系
  123. getSharePic: WX_API_BASE + '/product/getSharePic', // 分享
  124. getShareProductParam: WX_API_BASE + '/product/getShareProductParam', // 查询分享所需的参数
  125. shopGetSharePic: WX_API_BASE + '/shop/getSharePic', // 推广店铺
  126. //售后
  127. FindReturnList: WX_API_BASE + '/after/getAll', // 售后列表查询
  128. CancelRefund: WX_API_BASE + '/after/returnRefund', // 撤销退款
  129. ReturnDetail: WX_API_BASE + '/after/getById', // 售后详情查询
  130. CancelReturnGoods: WX_API_BASE + '/after/returnGoods', // 撤销退货
  131. ShippingCompany: WX_API_BASE + '/order/getExpressSelect', // 选择快递公司查询
  132. SendReturnGoods: WX_API_BASE + '/order/returnExpress', // 填写退货物流单
  133. deleteAfter: WX_API_BASE + '/after/deleteAfter', // 删除售后记录
  134. //申请分销员
  135. Apply: WX_API_BASE + '/distributor/addDistributor', // 申请分销员
  136. // 画布模块
  137. getProducts: WX_API_BASE + '/canvas/getProducts', // 选择商品查询
  138. getProductsV2: WX_API_BASE + '/canvas/getProducts2', // 选择商品查询
  139. // //服务协议
  140. // Query: WX_API_BASE + '/dict/getByName', // 查询分类层级
  141. DeleteAllSearch: WX_API_BASE + '/product/deleteAllSearch', // 清空历史搜索记录
  142. //消息
  143. getMessage: WX_API_BASE + '/notice/getAll', //消息列表查询
  144. getMessageDateils: WX_API_BASE + '/notice/getById', //消息详情
  145. readNotice: WX_API_BASE + '/notice/readNotice', // 消息已读
  146. getNotice: WX_API_BASE + '/notice/getGongGaoAll', //公告
  147. delMessage: WX_API_BASE + '/notice/removeById', //删除消息
  148. allMessage: WX_API_BASE + '/notice/readAll', //全部已读
  149. //我的收藏
  150. getProductCollect: WX_API_BASE + '/collect/getAllProduct', //收藏商品查询
  151. getStoreCollect: WX_API_BASE + '/collect/getAllShop', //收藏店铺查询
  152. cancelCollect: WX_API_BASE + '/collect/cancel', //取消收藏
  153. collect: WX_API_BASE + '/collect/collect', //收藏商品、店铺
  154. deleteCollect: WX_API_BASE + '/collect/delete', //批量删除收藏商品、店铺
  155. //秒杀专区
  156. addAnswer: WX_API_BASE + '/seckill/addAnswer', //回答
  157. addProblem: WX_API_BASE + '/seckill/addProblem', //提问
  158. getSeckillList: WX_API_BASE + '/seckill/getIndex', //秒杀专区首页数据查询
  159. getProblems: WX_API_BASE + '/seckill/getProblems', //商品问答数据查询
  160. getProblemDetail: WX_API_BASE + '/seckill/getProblemDetail', //问答详情查询
  161. getQueryPlatformSeckillList: WX_API_BASE + '/platform-seckill/queryPlatformSeckillList', //平台秒杀列表
  162. getPlatformSeckills: WX_API_BASE + '/canvas/getPlatformSeckills', //根据seckillId查询对应的秒杀商品列表
  163. //拼团专区
  164. getGroupSettlement: WX_API_BASE + '/work/getSettlement', //拼团单结算查询
  165. getGroupBuyList: WX_API_BASE + '/work/getIndex', //拼团专区首页数据查询
  166. getInviteSpell: WX_API_BASE + '/work/getInvite', //邀请好友拼单查询
  167. //限时折扣
  168. getDiscountList: WX_API_BASE + '/discount/getIndex', //专区首页数据查询
  169. //浏览足迹
  170. getFootprintList: WX_API_BASE + '/footprint/getAll', //我的足迹查询
  171. deleteFootprint: WX_API_BASE + '/footprint/delete', //删除足迹
  172. //我的问答
  173. getProblemList: WX_API_BASE + '/seckill/getProblem', //我的提问
  174. getAnswerList: WX_API_BASE + '/seckill/getAnswer', //我的回答
  175. deleteProblem: WX_API_BASE + '/seckill/deleteProblem', //批量删除提问
  176. deleteAnswer: WX_API_BASE + '/seckill/deleteAnswer', //批量删除回答
  177. //分享
  178. getShare: WX_API_BASE + '/work/getShare', //获取二维码和小程序码
  179. platform: WX_API_BASE + '/after/platform', // 申请平台介入
  180. UploadUrl: WX_API_BASE + '/file/upload', // 申请平台介入
  181. // 会员信息
  182. // getMemberShipList: WX_API_BASE + '/member/getMemberShipList', //会员权益查询
  183. // 会员专区
  184. getMemberProducts: WX_API_BASE + '/canvas/getMemberProducts', //查询会员商品数据
  185. memberList: WX_API_BASE + '/member/getAllMemberLevelInfo', //查询会员所有等级
  186. // 会员中心
  187. getMemberShipList: WX_API_BASE + '/member/getMemberShipList', //会员权益查询
  188. selectSigninHistory: WX_API_BASE + '/member/selectSigninHistory', // 查询签到明细
  189. selectSigninRecordList: WX_API_BASE + '/member/selectSigninRecordList', // 查询签到列表
  190. signIn: WX_API_BASE + '/member/signIn', // 签到
  191. welfareProductList: WX_API_BASE + '/member/welfareProductList', // 会员专区
  192. getMemberByMemberLevel: WX_API_BASE + '/member/getMemberByMemberLevelId', // 会员图标
  193. // 组合套餐
  194. selectCompose: WX_API_BASE + '/product/selectCompose', // 查询组合套餐
  195. // 平台折扣
  196. queryPlatformDiscount: WX_API_BASE + '/platform-discount/queryPlatformDiscount',
  197. queryPlatformDiscountProductList: WX_API_BASE + '/platform-discount/queryPlatformDiscountProductList',
  198. // 平台秒杀
  199. queryProductListBySession: WX_API_BASE + '/platform-seckill/queryProductListBySession', // 根据场次时间查询商品列表
  200. querySession: WX_API_BASE + '/platform-seckill/querySession', // 平台秒杀查询今日场次
  201. // 定价捆绑
  202. selectByPriceId: WX_API_BASE + '/price/selectByPriceId', // 定价捆绑规则查询
  203. selectProductListByPriceId: WX_API_BASE + '/product/selectProductListByPriceId', // 捆绑商品查询
  204. // queryProductListBySession: WX_API_BASE + '/platform-seckill/queryProductListBySession' // 根据场次时间查询商品列表 /order/getOrderPolite
  205. // 支付有礼
  206. getOrderPolite: WX_API_BASE + '/order/getOrderPolite', // 支付有礼
  207. // 积分签到
  208. creditSignIn: WX_API_BASE + '/credit/signIn', // 积分签到
  209. exchangeCoupon: WX_API_BASE + '/credit/exchangeCoupon', // 积分兑换优惠券
  210. selectByMonth: WX_API_BASE + '/credit/selectByMonth', // 根据月份查询签到记录
  211. selectCreditCouponList: WX_API_BASE + '/credit/selectCreditCouponList', // 查询可以积分兑换的优惠券
  212. selectCreditRecord: WX_API_BASE + '/credit/selectCreditRecord', // 查询积分记录
  213. // 首页广告
  214. GetAd: WX_API_BASE + '/advert/selectByCondition', // 获取首页广告
  215. adClose: WX_API_BASE + '/advert/closeAdvert', // 关闭首页广告
  216. takeBatchCoupon: WX_API_BASE + '/coupon/takeBatchCoupon', // 批量领取优惠券
  217. // 渠道优惠券
  218. getChannelCoupon: WX_API_BASE + '/coupon/getChannelCouponDetail', // 获取渠道优惠券
  219. getChannelProduct: WX_API_BASE + '/credit/signIn', // 获取渠道优惠券推荐产品
  220. getRandomProduct: WX_API_BASE + '/product/getRandomSortProduct', // 查询随机排序的商品
  221. // 埋点
  222. doPointer:WX_API_BASE+'/user/trackReport'
  223. }