
/**
 * 手太欠
 * 愿这世界都如故事里一样 美好而动人~
 */

import request from '../request.js'

// 活动权益内容
const activity = (data) => {
    return request({
        url: 'home',
        data: data
    })
}

// 钻石+白金权益内容
const index = (data) => {
    return request({
        url: 'home/group',
        data: data
    })
}

// 周五福利日订阅
const subscribe = (subscribe) => {
    return request({
        url: 'wechat/' + subscribe + "/welfare_subscribe",
        method: "POST"
    })
}

// 所有城市-最新无字母
const newCity = () => {
    return request({
        url: 'ajax/all_right_citys'
    })
}

// 市区选择-最新无字母
const newidxCity = (data) => {
    return request({
        url: 'ajax/all_right_children',
        data: data
    })
}

// h5掉起微信授权的前置获取相关的签名信息前置
const subscribeUrl = (data) => {
    return request({
        url: 'auth/jssdk',
        data: data
    })
}

const subscribeH5 = (subscribe, channel) => {
    return request({
        url: "wechat/" + subscribe + "/welfare_subscribe",
        method: "POST",
        data: {
            channel: 'h5'
        }
    })
}

// 营业厅列表
const hallsIndex = (data) => {
    return request({
        url: "halls",
        data: data
    })
}


export {
    activity,
    index,
    subscribe,
    newCity,
    newidxCity,
    subscribeUrl,
    subscribeH5,
	hallsIndex
}