123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- import request from '../utils/request.js'
- class WelfareMall extends request {
- /**
- * 获取订单
- */
- static getOrder(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/get`, params);
- }
- /**
- * 取消订单
- */
- static cancelOrder(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/cancel`, params);
- }
- /**
- * 订单列表
- */
- static getOrderList(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/list`, params);
- }
- /**
- * 订单退款
- */
- static orderRefund(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/refund`, params);
- }
- /**
- * 获得订单支付参数
- */
- static getPayParams(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/activity/get-pay-params`, params);
- }
- /**
- * 获取订单的退款单信息
- */
- static getRefundOrderList(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/get-refund-order-list`, params);
- }
- /**
- * 获取订单的退款单状态
- */
- static getRefundOrderStatus(params) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/order/get-refund-order-status`, params);
- }
- /**
- * 获取首页信息
- */
- static getIndexList(params ={}) {
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/homepage-data`, params);
- }
- /**
- * 获取活动列表
- */
- static getActivityList(type,page,pageSize) {
- let params={
- type:type,
- page:page,
- pageSize:pageSize,
- }
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/activity/list`, params);
- }
- /**
- * 获取活动详情
- */
- static getActivityDetail(activityId) {
- let params={
- activityId:activityId
- }
- return this.postRequest(`${this.BASE_URL}open/welfare-mall/activity/detail`, params);
- }
-
- /**
- * 创建订单
- */
- static createOrder(mobile,activityId,num,shopId="") {
- let params = {
- activityId:activityId,
- memberMobile:mobile,
- num:num,
- shopId:shopId
- };
- return this.postRequest(`${this.BASE_URL}open/activity/create-order`, params);
- }
- //获取支付参数
- static getOrderParams(orderSn,openId) {
- let params = {
- orderSn:orderSn,
- source: "WX_MINI_APP",
- thirdPartyName: 'coupon-activity',
- payCode: "HSAY-SHARE",
- openId: openId
- };
- return this.postRequest(`${this.BASE_URL}open/activity/get-order-params`, params);
- }
-
-
- }
- export default WelfareMall
|