
/**
 * Web唐明明
 * 匆匆数载恍如梦，岁月迢迢华发增。
 * 碌碌无为枉半生，一朝惊醒万事空。
 * moduleName: 会员
 */

import { request } from '../index'

// 会员身份信息
const identities = () => {
	return request({
		url: 'user/identities'
	})
}

// 开通会员
const vipOrder = (id, data) =>{
	return request({
		url		: 'user/identities/create/' + id,
		method	: 'POST',
        data    : data
	})
}

// 开通会员微信支付
const vipWechatPay = id => {
	return request({
		url		: 'user/identities/pay/' + id + '/wechat'
	})
}

// 开通身份内容
const vipCont = (id, data) =>{
	return request({
		url		: 'user/identities/create/' + id,
        data    : data
	})
}

// 会员开通协议
const userAgree = () =>{
	return request({
		url		: 'articles/agreement/openvip'
	})
}

export {
	identities,
	vipOrder,
	vipWechatPay,
    vipCont,
    userAgree
}
