/*
 * @Author: wenjie 1454560336@qq.com
 * @Date: 2024-04-03 14:45:20
 * @LastEditors: wenjie 1454560336@qq.com
 * @LastEditTime: 2024-04-11 10:22:39
 * @FilePath: \merchant\src\api\activity.js
 * @Description: 
 * 
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved. 
 */
import request from '@/utils/request'

// 活动列表
export function activityList(params) {
  return request({
    url: '/zswl-cloud-shop/activitySignup/search',
    method: 'get',
    params
  })
}

// 活动详情
export function activityDetail(params) {
    return request({
        url: '/zswl-cloud-shop/activitySignup/detail',
        method: 'get',
        params
    })
}

// 活动停止
export function activityStop(params) {
    return request({
        url: '/zswl-cloud-shop/activitySignup/stop',
        method: 'get',
        params
    })
}

// 活动删除
export function activityDel(params) {
    return request({
        url: '/zswl-cloud-shop/activitySignup/del',
        method: 'get',
        params
    })
}

// 活动添加编辑
export function activityAddOrUpdate(data) {
    return request({
        url: '/zswl-cloud-shop/activitySignup/addOrUpdate',
        method: 'post',
        data
    })
}

// 活动报名数据
export function getSignUpData(params) {
    return request({
        url: '/zswl-cloud-shop/activitySignupOrder/get',
        method: 'get',
        params
    })
}

// 模板列表
export function dataTemplate(params) {
    return request({
        url: '/zswl-cloud-shop/dataTemplate/search',
        method: 'get',
        params
    })
}

// 模板操作
export function operate(params) {
    return request({
        url: '/zswl-cloud-shop/dataTemplate/operate',
        method: 'get',
        params
    })
}


// 模板详情
export function dataTemplateDetail(params) {
    return request({
        url: '/zswl-cloud-shop/dataTemplate/detail',
        method: 'get',
        params
    })
}
// 模板添加编辑
export function dataTemplateAddOrUpdate(data) {
    return request({
        url: '/zswl-cloud-shop/dataTemplate/addOrUpdate',
        method: 'post',
        data
    })
}

// 模板下拉选择
export function getDataTemplate(params) {
    return request({
        url: '/zswl-cloud-shop/dataTemplate/get',
        method: 'get',
        params
    })
}

// 获取商户下的已完成签约列表
export function finishComplexList(data) {
    return request({
      url: '/paymentserver/signature/finishComplexList',
      method: 'post',
      data
    })
  }

// 活动退款
export function refund(data) {
    return request({
        url: `/paymentserver/activity/refund/${data.orderNo}/${data.id}`,
        data
    })
}

// 活动核销
export function verification(data) {
    return request({
        url: `/paymentserver/activity/verification/${data.orderNo}/${data.id}`,
        data
    })
}