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

import { req, upload } from "../request"


// 是否可以检测
const analyze = () => req({
    url: "ai/skin/analyze"
})

// 创建检测订单
const skinOrder = () => req({
    url : "ai/skin/order",
    method: "POST",
})

// 检测订单支付
const skinPay = (order_id, data) => req({
    url : "ai/pay/" + order_id + "/wechat",
    data: data,
})

// 皮肤检测
const skinEnter = (data, path) => {
    return upload({
        url     : "ai/skin/analyze",
        key     : "image",
        path    : path,
        data    : data,
        method  : "POST",
    })
}

export default ({
    analyze,
    skinOrder,
    skinPay,
    skinEnter
})