You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
305 lines
4.2 KiB
305 lines
4.2 KiB
import request from "@/utils/request.js"; |
|
let host ="http://h5-api.cstheone.com/api"; |
|
|
|
/** |
|
* 获取验证码 |
|
* @param {Object} data |
|
*/ |
|
export function sendcode(data) { |
|
return request({ |
|
url: `${host}/send-code`, |
|
method: "get", |
|
data |
|
}); |
|
} |
|
|
|
/** |
|
* 注册 |
|
* @param {Object} data |
|
*/ |
|
export function register(data) { |
|
return request({ |
|
url: `${host}/register`, |
|
method: "post", |
|
data |
|
}); |
|
} |
|
|
|
/** |
|
* 密码登录 |
|
* @param {Object} data |
|
*/ |
|
export function loginpwd(data) { |
|
return request({ |
|
url: `${host}/login-pwd`, |
|
method: "post", |
|
data |
|
}); |
|
} |
|
|
|
/** |
|
* 验证码登录 |
|
* @param {Object} data |
|
*/ |
|
export function logincode(data) { |
|
return request({ |
|
url: `${host}/login-code`, |
|
method: "post", |
|
data |
|
}); |
|
} |
|
|
|
|
|
/** |
|
* 实名认证 |
|
* @param {Object} data |
|
*/ |
|
export function userverified(data) { |
|
return request({ |
|
url: `${host}/user-verified`, |
|
method: "post", |
|
data, |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 获取认证信息 |
|
* @param {Object} data |
|
*/ |
|
export function usergetverified(data) { |
|
return request({ |
|
url: `${host}/user-get-verified`, |
|
method: "get", |
|
data, |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 首页信息 |
|
* @param {Object} data |
|
*/ |
|
export function getindex(data) { |
|
return request({ |
|
url: `${host}/index`, |
|
data, |
|
method: "get", |
|
}); |
|
} |
|
|
|
/** |
|
* 基本信息 |
|
* @param {Object} data |
|
*/ |
|
export function getbase(data) { |
|
return request({ |
|
url: `${host}/get-base`, |
|
data, |
|
method: "get", |
|
}); |
|
} |
|
|
|
/** |
|
* 作品列表 |
|
* @param {Object} data |
|
*/ |
|
export function workslists(data) { |
|
return request({ |
|
url: `${host}/works-lists`, |
|
data, |
|
method: "get", |
|
}); |
|
} |
|
/** |
|
* 作品列表 |
|
* @param {Object} data |
|
*/ |
|
export function myworks(data) { |
|
return request({ |
|
url: `${host}/my-works`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 作品详情 |
|
* @param {Object} data |
|
*/ |
|
export function worksdetail(data) { |
|
return request({ |
|
url: `${host}/works-detail`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 用户信息 |
|
* @param {Object} data |
|
*/ |
|
export function userinfo(data) { |
|
return request({ |
|
url: `${host}/user-info`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 下单 |
|
* @param {Object} data |
|
*/ |
|
export function orderplace(data) { |
|
return request({ |
|
url: `${host}/order-place`, |
|
data, |
|
method: "post", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
|
|
/** |
|
* 支付 |
|
* @param {Object} data |
|
*/ |
|
export function orderpayment(data) { |
|
return request({ |
|
url: `${host}/order-payment-new`, |
|
data, |
|
method: "post", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
|
|
|
|
/** |
|
* 订单列表 |
|
* @param {Object} data |
|
*/ |
|
export function orderlist(data) { |
|
return request({ |
|
url: `${host}/order-list`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 订单详情 |
|
* @param {Object} data |
|
*/ |
|
export function orderdetail(data) { |
|
return request({ |
|
url: `${host}/order-detail`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 取消订单 |
|
* @param {Object} data |
|
*/ |
|
export function ordercancel(data) { |
|
return request({ |
|
url: `${host}/order-cancel`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 查询订单状态 |
|
* @param {Object} data |
|
*/ |
|
export function orderquerypay(data) { |
|
return request({ |
|
url: `${host}/order-query-pay`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 修改用户资料 |
|
* @param {Object} data |
|
*/ |
|
export function modifyuserinfo(data) { |
|
return request({ |
|
url: `${host}/modify-userinfo`, |
|
data, |
|
method: "POST", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
|
|
/** |
|
* 用户充值 |
|
* @param {Object} data |
|
*/ |
|
export function userrecharge(data) { |
|
return request({ |
|
url: `${host}/user-recharge`, |
|
data, |
|
method: "post", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 用户提现 |
|
* @param {Object} data |
|
*/ |
|
export function userwithdraw(data) { |
|
return request({ |
|
url: `${host}/user-withdraw`, |
|
data, |
|
method: "post", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
|
|
/** |
|
* 余额支付 |
|
* @param {Object} data |
|
*/ |
|
export function orderbalancepay(data) { |
|
return request({ |
|
url: `${host}/order-balance-pay`, |
|
data, |
|
method: "post", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
/** |
|
* 余额记录 |
|
* @param {Object} data |
|
*/ |
|
export function userbalancerecord(data) { |
|
return request({ |
|
url: `${host}/user-balance-record`, |
|
data, |
|
method: "get", |
|
isAuthorization:true |
|
}); |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|