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

import { req } from "../request"

// 会员开通-前置
const openSee = (identity) => req({
    url: "user/identities/" + identity
})

// 会员开通-取可开通身份内容
const identitieSee = (identity_id) => req({
    url: "user/identities/create/" + identity_id
})

// 会员开通-提交
const openIndex = (identity_id, data) => req({
    url: "user/identities/create/" + identity_id,
    method: 'POST',
    data: data
})

// 会员开通-展示
const openModel = () => req({
    url: "user/identities"
})

// 会员开通-获取升级单信息
const orderSee = (order_id) => req({
    url: "user/identities/order/" + order_id
})

// 会员开通-编辑凭证
const orderSubmit = (order_id, data) => req({
    url: "user/identities/order/" + order_id,
    method: 'POST',
    data: data
})

// 获取小程序openid
const openid = (data) => req({
    url: "user/auth/mini_openid",
    data: data
})

// 微信支付-商品
const wechatPay = (order_no, data) => req({
    url: "mall/pay/" + order_no + "/wechat",
    data: data
})

export default ({
    openSee,
    identitieSee,
    openIndex,
    openModel,
    orderSee,
    orderSubmit,
    openid,
    wechatPay
})