public.js
1.0 KB
import axios from '../axios'
import qs from 'qs';
const midBase = process.env.VUE_APP_MID_REQUEST_BASE_URL
const businessBase = process.env.VUE_APP_BUSINESS_REQUEST_BASE_URL
export default {
// 登录
login (headers, params) {
return axios.get(`${midBase}/ms-signin/glory/web-api/login`, {
headers,
params
})
},
// 根据token获取用户绑定信息
getMe (token) {
return axios.get(`${midBase}/ms-signin/glory/web-api/getMe`, { headers: { token } })
},
// 红包提现
withdraw (data, gameId, token) {
return axios.post(`${midBase}/ms-signin/glory/web-api/${gameId}/withdraw`, { ...data }, { headers: { token } })
},
// 获取积分信息
cashbackGetScore (data) {
return axios.post(`${businessBase}cashbackGetScore`, qs.stringify(data), {
"Content-Type": "application/x-www-form-urlencoded"
})
},
// 兑换钻石
cashbackExchange (data) {
return axios.post(`${businessBase}cashbackExchange`, qs.stringify(data), {
"Content-Type": "application/x-www-form-urlencoded"
})
},
}