no message
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import { client } from '@/utils/client'
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录
|
||||
export function login(data: Record<string, any>) {
|
||||
const inviterCode = uni.getStorageSync('invite_code') || ''
|
||||
return request.post({
|
||||
url: '/login/account',
|
||||
data: { ...data, terminal: client, inviter_code: inviterCode }
|
||||
})
|
||||
}
|
||||
|
||||
//注册
|
||||
export function register(data: Record<string, any>) {
|
||||
const inviterCode = uni.getStorageSync('invite_code') || ''
|
||||
return request.post({
|
||||
url: '/login/register',
|
||||
data: { ...data, channel: client, inviter_code: inviterCode }
|
||||
})
|
||||
}
|
||||
|
||||
//向微信请求code的链接
|
||||
export function getWxCodeUrl(data: Record<string, any>) {
|
||||
return request.get({ url: '/login/codeUrl', data })
|
||||
}
|
||||
|
||||
export function OALogin(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/oaLogin', data })
|
||||
}
|
||||
|
||||
export function mnpLogin(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/mnpLogin', data })
|
||||
}
|
||||
|
||||
//更新微信小程序头像昵称
|
||||
export function updateUser(data: Record<string, any>, header: any) {
|
||||
return request.post({ url: '/login/updateUser', data, header })
|
||||
}
|
||||
|
||||
//小程序绑定微信
|
||||
export function mnpAuthBind(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/mnpAuthBind', data })
|
||||
}
|
||||
|
||||
//公众号绑定微信
|
||||
export function oaAuthBind(data: Record<string, any>) {
|
||||
return request.post({ url: '/login/oaAuthBind', data })
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
|
||||
/**
|
||||
* @description 赛事AI预测(完整)
|
||||
*/
|
||||
export function getMatchPredict(data: { match_id: number }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/ai/matchPredict', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 赛事AI预测 - 分段请求
|
||||
*/
|
||||
export function getMatchPredictSection(data: { match_id: number; section: string }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/ai/matchPredictSection', data }), AI_REQUEST_CONFIG)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 资讯AI分析
|
||||
*/
|
||||
export function getArticleAnalysis(data: { article_id: number }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/ai/articleAnalysis', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 查询比赛解锁状态
|
||||
*/
|
||||
export function checkAiUnlock(data: { match_id: number }) {
|
||||
return request.get({ url: '/ai/checkUnlock', data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 用户可信度分析
|
||||
*/
|
||||
export function getUserCredibility(data: { user_id: number }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/ai/userCredibility', data }), AI_REQUEST_CONFIG)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 彩票概率分析
|
||||
*/
|
||||
export function getLotteryAnalysis(data: { type: string }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/ai/lotteryAnalysis', data }), AI_REQUEST_CONFIG)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export const AI_REQUEST_TIMEOUT = 5 * 60 * 1000
|
||||
|
||||
export const AI_REQUEST_CONFIG = {
|
||||
retryCount: 0,
|
||||
ignoreCancel: true
|
||||
}
|
||||
|
||||
export function withAiRequestTimeout<T extends Record<string, any>>(options: T): T & { timeout: number } {
|
||||
return {
|
||||
...options,
|
||||
timeout: AI_REQUEST_TIMEOUT
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//发送短信
|
||||
export function smsSend(data: any) {
|
||||
return request.post({ url: '/sms/sendCode', data: data })
|
||||
}
|
||||
|
||||
//获取短信验证信息(接收手机号+随机码)
|
||||
export function getVerifyInfo(data: any) {
|
||||
return request.post({ url: '/sms/getVerifyInfo', data: data })
|
||||
}
|
||||
|
||||
export function getConfig() {
|
||||
return request.get({ url: '/index/config' })
|
||||
}
|
||||
|
||||
export function getPolicy(data: any) {
|
||||
return request.get({ url: '/index/policy', data: data })
|
||||
}
|
||||
|
||||
export function uploadImage(file: any, token?: string) {
|
||||
return request.uploadFile({
|
||||
url: '/upload/image',
|
||||
filePath: file,
|
||||
name: 'file',
|
||||
header: {
|
||||
token
|
||||
},
|
||||
fileType: 'image'
|
||||
})
|
||||
}
|
||||
|
||||
export function wxJsConfig(data: any) {
|
||||
return request.get({ url: '/wechat/jsConfig', data })
|
||||
}
|
||||
|
||||
// APP 版本检查
|
||||
export function checkAppVersion(data: {
|
||||
platform: number
|
||||
version_code: number
|
||||
package_type?: number
|
||||
}) {
|
||||
return request.get({ url: '/appVersion/check', data })
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
|
||||
export interface AssistantSource {
|
||||
type: string
|
||||
title: string
|
||||
summary: string
|
||||
path: string
|
||||
source_id: number
|
||||
}
|
||||
|
||||
export interface AssistantMessage {
|
||||
id: number
|
||||
session_id: number
|
||||
role: 'user' | 'assistant'
|
||||
content: string
|
||||
sources?: AssistantSource[]
|
||||
status?: number
|
||||
error_msg?: string
|
||||
create_time?: string
|
||||
pending?: boolean
|
||||
}
|
||||
|
||||
export interface AssistantSession {
|
||||
id: number
|
||||
title: string
|
||||
last_message: string
|
||||
last_answer: string
|
||||
message_count: number
|
||||
last_active_time: string
|
||||
create_time: string
|
||||
}
|
||||
|
||||
export function assistantChat(data: { message: string; client_id: string; session_id?: number }) {
|
||||
return request.post(
|
||||
withAiRequestTimeout({ url: '/assistant/chat', data }),
|
||||
{ ...AI_REQUEST_CONFIG, retryCount: 0 }
|
||||
)
|
||||
}
|
||||
|
||||
export function assistantSessions(data: { client_id: string }) {
|
||||
return request.get({ url: '/assistant/sessions', data })
|
||||
}
|
||||
|
||||
export function assistantMessages(data: { client_id: string; session_id: number }) {
|
||||
return request.get({ url: '/assistant/messages', data })
|
||||
}
|
||||
|
||||
export function assistantClear(data: { client_id: string; session_id?: number }) {
|
||||
return request.post({ url: '/assistant/clear', data })
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export type PrivateChatMessageType = 'text' | 'image'
|
||||
|
||||
export interface PrivateChatRelationship {
|
||||
is_followed_by_me: boolean
|
||||
is_following_me: boolean
|
||||
is_mutual: boolean
|
||||
relationship_text: string
|
||||
}
|
||||
|
||||
export interface PrivateChatUser {
|
||||
id: number
|
||||
sn?: string
|
||||
nickname?: string
|
||||
avatar?: string
|
||||
}
|
||||
|
||||
export interface PrivateChatSession {
|
||||
id: number
|
||||
target_user_id: number
|
||||
target_user: PrivateChatUser | null
|
||||
last_message_id: number
|
||||
last_message_type: PrivateChatMessageType
|
||||
last_message_content: string
|
||||
last_sender_id: number
|
||||
unread_count: number
|
||||
last_active_time: string | number
|
||||
create_time: string | number
|
||||
relationship: PrivateChatRelationship
|
||||
}
|
||||
|
||||
export interface PrivateChatMessage {
|
||||
id: number
|
||||
session_id: number
|
||||
sender_id: number
|
||||
receiver_id: number
|
||||
message_type: PrivateChatMessageType
|
||||
content: string
|
||||
is_self: boolean
|
||||
read_time: number
|
||||
create_time: string | number
|
||||
}
|
||||
|
||||
export function getChatSessions(data?: { page_no?: number; page_size?: number }) {
|
||||
return request.get<{
|
||||
lists: PrivateChatSession[]
|
||||
page_no: number
|
||||
page_size: number
|
||||
count: number
|
||||
}>({ url: '/chat/sessions', data })
|
||||
}
|
||||
|
||||
export function openChat(data: { target_user_id: number }) {
|
||||
return request.post<PrivateChatSession>({ url: '/chat/open', data })
|
||||
}
|
||||
|
||||
export function getChatMessages(data: {
|
||||
session_id: number
|
||||
after_id?: number
|
||||
page_no?: number
|
||||
page_size?: number
|
||||
}) {
|
||||
return request.get<{
|
||||
session: PrivateChatSession
|
||||
lists: PrivateChatMessage[]
|
||||
page_no: number
|
||||
page_size: number
|
||||
}>({ url: '/chat/messages', data })
|
||||
}
|
||||
|
||||
export function sendChatMessage(data: {
|
||||
session_id: number
|
||||
message_type: PrivateChatMessageType
|
||||
content: string
|
||||
}) {
|
||||
return request.post<PrivateChatMessage>({ url: '/chat/send', data })
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
|
||||
// 帖子列表
|
||||
export function getCommunityPosts(data?: Record<string, any>) {
|
||||
return request.get({ url: '/community/postLists', data })
|
||||
}
|
||||
|
||||
// 帖子详情
|
||||
export function getCommunityPostDetail(data: { id: number }) {
|
||||
return request.get({ url: '/community/postDetail', data })
|
||||
}
|
||||
|
||||
// 发帖
|
||||
export function publishPost(data: Record<string, any>) {
|
||||
return request.post({ url: '/community/publish', data })
|
||||
}
|
||||
|
||||
// 评论列表
|
||||
export function getCommentLists(data: { post_id: number; page_no?: number; page_size?: number }) {
|
||||
return request.get({ url: '/community/commentLists', data })
|
||||
}
|
||||
|
||||
// 发评论
|
||||
export function addComment(data: {
|
||||
post_id: number
|
||||
content: string
|
||||
parent_id?: number
|
||||
reply_user_id?: number
|
||||
}) {
|
||||
return request.post({ url: '/community/addComment', data })
|
||||
}
|
||||
|
||||
// 删除评论
|
||||
export function deleteComment(data: { comment_id: number }) {
|
||||
return request.post({ url: '/community/deleteComment', data })
|
||||
}
|
||||
|
||||
// 删除帖子
|
||||
export function deletePost(data: { post_id: number }) {
|
||||
return request.post({ url: '/community/deletePost', data })
|
||||
}
|
||||
|
||||
// 点赞/取消
|
||||
export function toggleLike(data: { target_id: number; target_type: number }) {
|
||||
return request.post({ url: '/community/like', data })
|
||||
}
|
||||
|
||||
// 关注/取消
|
||||
export function toggleFollow(data: { follow_user_id: number }) {
|
||||
return request.post({ url: '/community/follow', data })
|
||||
}
|
||||
|
||||
// 标签列表
|
||||
export function getTagLists() {
|
||||
return request.get({ url: '/community/tagLists' })
|
||||
}
|
||||
|
||||
// 购买帖子
|
||||
export function purchasePost(data: { post_id: number; confirm?: number }) {
|
||||
return request.post({ url: '/community/purchasePost', data })
|
||||
}
|
||||
|
||||
// AI翻译帖子
|
||||
export function translatePost(data: { post_id: number; confirm?: number }) {
|
||||
return request.post({ url: '/community/translatePost', data })
|
||||
}
|
||||
|
||||
// 帖子AI分析
|
||||
export function getCommunityPostAiAnalysis(data: { post_id: number; force?: number }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/community/aiAnalysis', data }), AI_REQUEST_CONFIG)
|
||||
}
|
||||
|
||||
// 帖子AI分析结果轮询,只查缓存,不触发新的模型分析
|
||||
export function getCommunityPostAiAnalysisResult(data: { post_id: number }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/community/aiAnalysisResult', data }), AI_REQUEST_CONFIG)
|
||||
}
|
||||
|
||||
// 用户主页
|
||||
export function getUserProfile(data: { user_id: number }) {
|
||||
return request.get({ url: '/community/userProfile', data })
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
import appConfig from '@/config'
|
||||
|
||||
const PROXY_BASE = `${appConfig.baseUrl}${appConfig.urlPrefix}/crypto/proxy`
|
||||
|
||||
export type CoinMeta = { name: string; icon: string; color: string }
|
||||
|
||||
const DEFAULT_COIN_CONFIG: Record<string, CoinMeta> = {
|
||||
BTC: { name: 'Bitcoin', icon: '₿', color: '#f7931a' },
|
||||
ETH: { name: 'Ethereum', icon: 'Ξ', color: '#627eea' },
|
||||
BNB: { name: 'BNB', icon: 'B', color: '#f3ba2f' },
|
||||
SOL: { name: 'Solana', icon: '◎', color: '#9945ff' },
|
||||
XRP: { name: 'Ripple', icon: 'X', color: '#00aae4' },
|
||||
ADA: { name: 'Cardano', icon: 'A', color: '#0d3349' },
|
||||
DOGE: { name: 'Dogecoin', icon: 'Ð', color: '#c2a633' },
|
||||
TRX: { name: 'TRON', icon: 'T', color: '#eb0029' },
|
||||
AVAX: { name: 'Avalanche', icon: 'A', color: '#e84142' },
|
||||
LINK: { name: 'Chainlink', icon: '⬡', color: '#2a5ada' },
|
||||
TON: { name: 'Toncoin', icon: 'T', color: '#0088cc' },
|
||||
SHIB: { name: 'Shiba Inu', icon: 'S', color: '#ffa409' },
|
||||
DOT: { name: 'Polkadot', icon: '●', color: '#e6007a' },
|
||||
SUI: { name: 'Sui', icon: 'S', color: '#6fbcf0' },
|
||||
NEAR: { name: 'NEAR', icon: 'N', color: '#00ec97' },
|
||||
LTC: { name: 'Litecoin', icon: 'Ł', color: '#bfbbbb' },
|
||||
APT: { name: 'Aptos', icon: 'A', color: '#4cd9c0' },
|
||||
UNI: { name: 'Uniswap', icon: 'U', color: '#ff007a' },
|
||||
PEPE: { name: 'Pepe', icon: 'P', color: '#479f53' },
|
||||
ICP: { name: 'Internet Computer', icon: 'I', color: '#29abe2' },
|
||||
FET: { name: 'Fetch.ai', icon: 'F', color: '#1b1464' },
|
||||
RENDER: { name: 'Render', icon: 'R', color: '#00e1ff' },
|
||||
ETC: { name: 'Ethereum Classic', icon: 'E', color: '#328332' },
|
||||
ATOM: { name: 'Cosmos', icon: 'A', color: '#2e3148' },
|
||||
FIL: { name: 'Filecoin', icon: 'F', color: '#0090ff' },
|
||||
ARB: { name: 'Arbitrum', icon: 'A', color: '#28a0f0' },
|
||||
OP: { name: 'Optimism', icon: 'O', color: '#ff0420' },
|
||||
IMX: { name: 'Immutable', icon: 'I', color: '#00b2ff' },
|
||||
INJ: { name: 'Injective', icon: 'I', color: '#00f2fe' },
|
||||
SEI: { name: 'Sei', icon: 'S', color: '#9b1c1c' },
|
||||
WLD: { name: 'Worldcoin', icon: 'W', color: '#000000' },
|
||||
TIA: { name: 'Celestia', icon: 'T', color: '#7b2bf9' },
|
||||
STX: { name: 'Stacks', icon: 'S', color: '#5546ff' },
|
||||
GRT: { name: 'The Graph', icon: 'G', color: '#6747ed' },
|
||||
AAVE: { name: 'Aave', icon: 'A', color: '#b6509e' },
|
||||
MKR: { name: 'Maker', icon: 'M', color: '#1aab9b' },
|
||||
ALGO: { name: 'Algorand', icon: 'A', color: '#000000' },
|
||||
SAND: { name: 'Sandbox', icon: 'S', color: '#04adef' },
|
||||
MANA: { name: 'Decentraland', icon: 'M', color: '#ff2d55' },
|
||||
AXS: { name: 'Axie Infinity', icon: 'A', color: '#0055d5' },
|
||||
THETA: { name: 'Theta', icon: 'θ', color: '#2ab8e6' },
|
||||
FTM: { name: 'Fantom', icon: 'F', color: '#1969ff' },
|
||||
VET: { name: 'VeChain', icon: 'V', color: '#15bdff' },
|
||||
EGLD: { name: 'MultiversX', icon: 'E', color: '#23f7dd' },
|
||||
FLOW: { name: 'Flow', icon: 'F', color: '#00ef8b' },
|
||||
XTZ: { name: 'Tezos', icon: 'T', color: '#2c7df7' },
|
||||
EOS: { name: 'EOS', icon: 'E', color: '#000000' },
|
||||
IOTA: { name: 'IOTA', icon: 'I', color: '#131f37' },
|
||||
NEO: { name: 'Neo', icon: 'N', color: '#00e599' },
|
||||
KAVA: { name: 'Kava', icon: 'K', color: '#ff564f' },
|
||||
CFX: { name: 'Conflux', icon: 'C', color: '#1a1a2e' },
|
||||
CAKE: { name: 'PancakeSwap', icon: 'C', color: '#d1884f' },
|
||||
CRV: { name: 'Curve', icon: 'C', color: '#f9d200' },
|
||||
SNX: { name: 'Synthetix', icon: 'S', color: '#00d1ff' },
|
||||
LDO: { name: 'Lido DAO', icon: 'L', color: '#00a3ff' },
|
||||
COMP: { name: 'Compound', icon: 'C', color: '#00d395' },
|
||||
ZIL: { name: 'Zilliqa', icon: 'Z', color: '#49c1bf' },
|
||||
ENJ: { name: 'Enjin Coin', icon: 'E', color: '#7866d5' },
|
||||
DYDX: { name: 'dYdX', icon: 'D', color: '#6966ff' },
|
||||
CHZ: { name: 'Chiliz', icon: 'C', color: '#cd0124' },
|
||||
GALA: { name: 'Gala', icon: 'G', color: '#000000' },
|
||||
APE: { name: 'ApeCoin', icon: 'A', color: '#0054f7' },
|
||||
GMT: { name: 'GMT', icon: 'G', color: '#e8d24a' },
|
||||
MASK: { name: 'Mask Network', icon: 'M', color: '#1c68f3' },
|
||||
ROSE: { name: 'Oasis', icon: 'R', color: '#0092f6' },
|
||||
ZEC: { name: 'Zcash', icon: 'Z', color: '#ecb244' },
|
||||
MINA: { name: 'Mina', icon: 'M', color: '#e39844' },
|
||||
CELO: { name: 'Celo', icon: 'C', color: '#35d07f' },
|
||||
ENS: { name: 'ENS', icon: 'E', color: '#5298ff' },
|
||||
BAT: { name: 'Basic Attention', icon: 'B', color: '#ff5000' },
|
||||
YFI: { name: 'yearn.finance', icon: 'Y', color: '#006ae3' },
|
||||
SUSHI: { name: 'SushiSwap', icon: 'S', color: '#d65aff' },
|
||||
BAL: { name: 'Balancer', icon: 'B', color: '#1e1e1e' },
|
||||
ANKR: { name: 'Ankr', icon: 'A', color: '#2e6bf6' },
|
||||
JASMY: { name: 'JasmyCoin', icon: 'J', color: '#f7931a' },
|
||||
RSR: { name: 'Reserve Rights', icon: 'R', color: '#000000' },
|
||||
LRC: { name: 'Loopring', icon: 'L', color: '#2ab6f6' },
|
||||
STORJ: { name: 'Storj', icon: 'S', color: '#2683ff' },
|
||||
ICX: { name: 'ICON', icon: 'I', color: '#1fc5c9' },
|
||||
SKL: { name: 'SKALE', icon: 'S', color: '#000000' },
|
||||
HBAR: { name: 'Hedera', icon: 'H', color: '#000000' },
|
||||
XLM: { name: 'Stellar', icon: 'X', color: '#000000' },
|
||||
BCH: { name: 'Bitcoin Cash', icon: 'B', color: '#8dc351' },
|
||||
MATIC: { name: 'Polygon', icon: 'M', color: '#8247e5' },
|
||||
TAO: { name: 'Bittensor', icon: 'T', color: '#000000' },
|
||||
JUP: { name: 'Jupiter', icon: 'J', color: '#00bfa5' },
|
||||
WIF: { name: 'dogwifhat', icon: 'W', color: '#a0522d' },
|
||||
BONK: { name: 'Bonk', icon: 'B', color: '#f9a825' },
|
||||
FLOKI: { name: 'Floki', icon: 'F', color: '#d4a843' },
|
||||
NOT: { name: 'Notcoin', icon: 'N', color: '#000000' },
|
||||
ORDI: { name: 'ORDI', icon: 'O', color: '#f7931a' },
|
||||
PENDLE: { name: 'Pendle', icon: 'P', color: '#0052ff' },
|
||||
'1000SATS': { name: '1000SATS', icon: 'S', color: '#f7931a' },
|
||||
WOO: { name: 'WOO', icon: 'W', color: '#2b2b3d' },
|
||||
BLUR: { name: 'Blur', icon: 'B', color: '#ff6b00' },
|
||||
PIXEL: { name: 'Pixels', icon: 'P', color: '#7b61ff' },
|
||||
STRK: { name: 'Starknet', icon: 'S', color: '#0c0c4f' },
|
||||
ACE: { name: 'Fusionist', icon: 'A', color: '#6c5ce7' },
|
||||
AI: { name: 'Sleepless AI', icon: 'A', color: '#00d2ff' },
|
||||
XAI: { name: 'Xai', icon: 'X', color: '#f44336' },
|
||||
MANTA: { name: 'Manta', icon: 'M', color: '#1e88e5' },
|
||||
ALT: { name: 'AltLayer', icon: 'A', color: '#000000' },
|
||||
PYTH: { name: 'Pyth Network', icon: 'P', color: '#6b4ce6' },
|
||||
JTO: { name: 'Jito', icon: 'J', color: '#59c995' },
|
||||
NTRN: { name: 'Neutron', icon: 'N', color: '#000000' },
|
||||
ONDO: { name: 'Ondo', icon: 'O', color: '#1a73e8' }
|
||||
}
|
||||
|
||||
let activeCoinConfig: Record<string, CoinMeta> = { ...DEFAULT_COIN_CONFIG }
|
||||
|
||||
export function getCoinConfig() {
|
||||
return activeCoinConfig
|
||||
}
|
||||
|
||||
export function loadCoinConfig(): Promise<void> {
|
||||
return new Promise((resolve) => {
|
||||
uni.request({
|
||||
url: `${import.meta.env.VITE_API_BASE_URL || ''}/api/crypto/coin-config`,
|
||||
method: 'GET',
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200 && res.data) {
|
||||
const data = res.data as any
|
||||
const list = data?.data || data
|
||||
if (list && typeof list === 'object' && !Array.isArray(list)) {
|
||||
activeCoinConfig = list as Record<string, CoinMeta>
|
||||
} else if (Array.isArray(list)) {
|
||||
const map: Record<string, CoinMeta> = {}
|
||||
list.forEach((item: any) => {
|
||||
if (item.symbol) {
|
||||
map[item.symbol] = {
|
||||
name: item.name || item.symbol,
|
||||
icon: item.icon || item.symbol.charAt(0),
|
||||
color: item.color || '#666666'
|
||||
}
|
||||
}
|
||||
})
|
||||
if (Object.keys(map).length > 0) activeCoinConfig = map
|
||||
}
|
||||
}
|
||||
resolve()
|
||||
},
|
||||
fail: () => resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export interface CoinTicker {
|
||||
symbol: string
|
||||
name: string
|
||||
icon: string
|
||||
color: string
|
||||
price: string
|
||||
priceRaw: number
|
||||
change: number
|
||||
volume: string
|
||||
mcap: string
|
||||
highPrice: string
|
||||
lowPrice: string
|
||||
}
|
||||
|
||||
export function formatPrice(price: string | number): string {
|
||||
const p = typeof price === 'string' ? parseFloat(price) : price
|
||||
if (isNaN(p)) return '0.00'
|
||||
if (p >= 10000) return p.toLocaleString('en-US', { maximumFractionDigits: 0 })
|
||||
if (p >= 100) return p.toLocaleString('en-US', { maximumFractionDigits: 1 })
|
||||
if (p >= 1) return p.toLocaleString('en-US', { maximumFractionDigits: 2 })
|
||||
if (p >= 0.01) return p.toFixed(4)
|
||||
return p.toFixed(6)
|
||||
}
|
||||
|
||||
export function formatVolume(vol: string | number): string {
|
||||
const v = typeof vol === 'string' ? parseFloat(vol) : vol
|
||||
if (isNaN(v)) return '$0'
|
||||
if (v >= 1e12) return '$' + (v / 1e12).toFixed(2) + 'T'
|
||||
if (v >= 1e9) return '$' + (v / 1e9).toFixed(1) + 'B'
|
||||
if (v >= 1e6) return '$' + (v / 1e6).toFixed(1) + 'M'
|
||||
if (v >= 1e3) return '$' + (v / 1e3).toFixed(1) + 'K'
|
||||
return '$' + v.toFixed(0)
|
||||
}
|
||||
|
||||
export function parseBinanceTicker(ticker: any): CoinTicker | null {
|
||||
const rawSymbol = ticker.symbol.replace('USDT', '')
|
||||
const config = activeCoinConfig[rawSymbol]
|
||||
if (!config) return null
|
||||
return {
|
||||
symbol: rawSymbol,
|
||||
name: config.name,
|
||||
icon: config.icon,
|
||||
color: config.color,
|
||||
price: formatPrice(ticker.lastPrice),
|
||||
priceRaw: parseFloat(ticker.lastPrice),
|
||||
change: parseFloat(parseFloat(ticker.priceChangePercent).toFixed(2)),
|
||||
volume: formatVolume(ticker.quoteVolume),
|
||||
mcap: formatVolume(ticker.quoteVolume),
|
||||
highPrice: formatPrice(ticker.highPrice),
|
||||
lowPrice: formatPrice(ticker.lowPrice)
|
||||
}
|
||||
}
|
||||
|
||||
export interface KlinePoint {
|
||||
time: number
|
||||
open: number
|
||||
high: number
|
||||
low: number
|
||||
close: number
|
||||
volume: number
|
||||
}
|
||||
|
||||
export function getBinanceKline(
|
||||
symbol: string,
|
||||
interval = '1h',
|
||||
limit = 24
|
||||
): Promise<KlinePoint[]> {
|
||||
return binanceRequest(
|
||||
`/api/v3/klines?symbol=${symbol}USDT&interval=${interval}&limit=${limit}`,
|
||||
(data) => {
|
||||
if (!Array.isArray(data)) throw new Error('Kline API error')
|
||||
return (data as any[]).map((k) => ({
|
||||
time: k[0],
|
||||
open: parseFloat(k[1]),
|
||||
high: parseFloat(k[2]),
|
||||
low: parseFloat(k[3]),
|
||||
close: parseFloat(k[4]),
|
||||
volume: parseFloat(k[5])
|
||||
}))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export function getBinanceSingleTicker(symbol: string): Promise<CoinTicker | null> {
|
||||
return binanceRequest(`/api/v3/ticker/24hr?symbol=${symbol}USDT`, (data) =>
|
||||
parseBinanceTicker(data)
|
||||
)
|
||||
}
|
||||
|
||||
export function getBinanceTickers(): Promise<CoinTicker[]> {
|
||||
const watchSymbols = Object.keys(activeCoinConfig)
|
||||
const symbols = watchSymbols.map((s) => `"${s}USDT"`)
|
||||
return binanceRequest(`/api/v3/ticker/24hr?symbols=[${symbols.join(',')}]`, (data) => {
|
||||
if (!Array.isArray(data)) throw new Error('Binance API error')
|
||||
const parsed = (data as any[]).map(parseBinanceTicker).filter(Boolean) as CoinTicker[]
|
||||
const order = Object.keys(activeCoinConfig)
|
||||
parsed.sort((a, b) => order.indexOf(a.symbol) - order.indexOf(b.symbol))
|
||||
return parsed
|
||||
})
|
||||
}
|
||||
|
||||
function binanceRequest<T>(apiPath: string, transform: (data: any) => T): Promise<T> {
|
||||
const idx = apiPath.indexOf('?')
|
||||
const path = idx >= 0 ? apiPath.substring(0, idx) : apiPath
|
||||
const query = idx >= 0 ? apiPath.substring(idx + 1) : ''
|
||||
const proxyUrl = `${PROXY_BASE}?path=${path}${query ? '&' + query : ''}`
|
||||
|
||||
console.log('[CryptoProxy] request =>', proxyUrl)
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: proxyUrl,
|
||||
method: 'GET',
|
||||
success: (res) => {
|
||||
console.log('[CryptoProxy] response status =>', res.statusCode)
|
||||
if (res.statusCode === 200 && res.data) {
|
||||
try {
|
||||
resolve(transform(res.data))
|
||||
} catch (e) {
|
||||
console.error('[CryptoProxy] transform error =>', e)
|
||||
reject(e)
|
||||
}
|
||||
} else {
|
||||
console.error('[CryptoProxy] error status =>', res.statusCode, res.data)
|
||||
reject(new Error('Proxy API error: ' + res.statusCode))
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('[CryptoProxy] request fail =>', err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export interface DeviceRegisterPayload {
|
||||
device_id: string
|
||||
platform?: string
|
||||
system?: string
|
||||
model?: string
|
||||
brand?: string
|
||||
app_version?: string
|
||||
app_version_code?: number
|
||||
screen_width?: number
|
||||
screen_height?: number
|
||||
network_type?: string
|
||||
language?: string
|
||||
timezone?: string
|
||||
push_cid?: string
|
||||
extra?: string
|
||||
}
|
||||
|
||||
export function registerDevice(data: DeviceRegisterPayload) {
|
||||
return request.post({ url: '/device/register', data }, { withToken: false })
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export interface DistTeamItem {
|
||||
id: number
|
||||
sn?: number
|
||||
nickname: string
|
||||
avatar: string
|
||||
create_time: string
|
||||
}
|
||||
|
||||
export interface DistTeamResult {
|
||||
list: DistTeamItem[]
|
||||
total: number
|
||||
page: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface ShareInfo {
|
||||
invite_code: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
h5_domain: string
|
||||
team_count?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分享/邀请信息
|
||||
*/
|
||||
export function getShareInfo() {
|
||||
return request.get<ShareInfo>({ url: '/share/getShareInfo' })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取邀请列表(团队成员)
|
||||
*/
|
||||
export function getInviteList(data: { page?: number; size?: number; level?: number }) {
|
||||
return request.get<DistTeamResult>({ url: '/share/getInviteList', data })
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
|
||||
/**
|
||||
* @description 开奖列表
|
||||
*/
|
||||
export function getLotteryDrawList(data: {
|
||||
category_id?: number
|
||||
page_no?: number
|
||||
page_size?: number
|
||||
}) {
|
||||
return request.get({ url: '/lottery/drawList', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 开奖详情
|
||||
*/
|
||||
export function getLotteryDrawDetail(data: { id: number }) {
|
||||
return request.get({ url: '/lottery/drawDetail', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 各彩种最新开奖
|
||||
*/
|
||||
export function getLatestDraw(data?: { category_id?: number }) {
|
||||
return request.get({ url: '/lottery/latestDraw', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 彩种游戏列表(一级分类+二级彩种)
|
||||
*/
|
||||
export function getLotteryGameList() {
|
||||
return request.get({ url: '/lottery/gameList' }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 各彩种最新开奖(新表 draw_result)
|
||||
*/
|
||||
export function getLatestDrawResult(data?: { code?: string }) {
|
||||
return request.get({ url: '/lottery/latestDrawResult', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 开奖历史列表(新表 draw_result)
|
||||
*/
|
||||
export function getDrawResultList(data: { code: string; page_no?: number; page_size?: number }) {
|
||||
return request.get({ url: '/lottery/drawResultList', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI预测分析
|
||||
*/
|
||||
export function getLotteryAiPredict(data: { category_id?: number; code?: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiPredict', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 历史开奖数据
|
||||
*/
|
||||
export function getLotteryAiHistory(data: { code: string }) {
|
||||
return request.get({ url: '/lottery/aiHistory', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 热冷号
|
||||
*/
|
||||
export function getLotteryAiHotCold(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiHotCold', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 趋势+推荐组合
|
||||
*/
|
||||
export function getLotteryAiTrend(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiTrend', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 统计数据
|
||||
*/
|
||||
export function getLotteryAiStats(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiStats', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 波色+生肖(六合彩专属)
|
||||
*/
|
||||
export function getLotteryAiColorZodiac(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiColorZodiac', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析历史记录(按彩种+期号查询)
|
||||
*/
|
||||
export function getLotteryAiAnalysisHistory(data: { code: string; issue: string }) {
|
||||
return request.get({ url: '/lottery/aiAnalysisHistory', data }, { withToken: false })
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getMatchList(data?: Record<string, any>) {
|
||||
return request.get({ url: '/match/lists', data: data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getMatchDetail(data: { id: number }) {
|
||||
return request.get({ url: '/match/detail', data: data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getSportTypes() {
|
||||
return request.get({ url: '/match/sportTypes' }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getMatchLeagues(data?: { sport_type?: number }) {
|
||||
return request.get({ url: '/match/leagues', data: data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getMatchLiveText(data: { match_id: number; last_msg_id?: number }) {
|
||||
return request.get({ url: '/match/liveText', data: data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getMatchLineup(data: { match_id: number }) {
|
||||
return request.get({ url: '/match/lineup', data: data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getWorldCupStandings() {
|
||||
return request.get({ url: '/match/worldCupStandings' }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getWorldCupRankings(data: { type: 'goals' | 'assists' }) {
|
||||
return request.get({ url: '/match/worldCupRankings', data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function getWorldCupSchedule() {
|
||||
return request.get({ url: '/match/worldCupSchedule' }, { withToken: false })
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* @description 获取文章分类
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getArticleCate() {
|
||||
return request.get({ url: '/article/cate' }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取文章列表
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getArticleList(data: Record<string, any>) {
|
||||
return request.get({ url: '/article/lists', data: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取文章详情
|
||||
* @param { number } id
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getArticleDetail(data: { id: number }) {
|
||||
return request.get({ url: '/article/detail', data: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 文章AI翻译
|
||||
*/
|
||||
export function translateArticle(data: { article_id: number; confirm?: number }) {
|
||||
return request.post({ url: '/article/translate', data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 加入收藏
|
||||
* @param { number } id
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function addCollect(data: { id: number }) {
|
||||
return request.post({ url: '/article/addCollect', data: data }, { isAuth: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 取消收藏
|
||||
* @param { number } id
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function cancelCollect(data: { id: number }) {
|
||||
return request.post({ url: '/article/cancelCollect', data: data }, { isAuth: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取收藏列表
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getCollect() {
|
||||
return request.get({ url: '/article/collect' })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取评论列表
|
||||
*/
|
||||
export function getCommentList(data: Record<string, any>) {
|
||||
return request.get({ url: '/article/commentList', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 发布评论
|
||||
*/
|
||||
export function addComment(data: Record<string, any>) {
|
||||
return request.post({ url: '/article/addComment', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 点赞/踩
|
||||
*/
|
||||
export function articleVote(data: { article_id: number; vote_type: number }) {
|
||||
return request.post({ url: '/article/vote', data }, { isAuth: true })
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//支付方式
|
||||
export function getPayWay(data: any) {
|
||||
return request.get({ url: '/pay/payWay', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 预支付
|
||||
export function prepay(data: any) {
|
||||
return request.post({ url: '/pay/prepay', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 预支付
|
||||
export function getPayResult(data: any) {
|
||||
return request.get({ url: '/pay/payStatus', data }, { isAuth: true })
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function pointsProducts() {
|
||||
return request.get({ url: '/points_order/products' }, { isAuth: true })
|
||||
}
|
||||
|
||||
export function pointsPreOrder(data: any) {
|
||||
return request.post({ url: '/points_order/preOrder', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
export function pointsCreateOrder(data: any) {
|
||||
return request.post({ url: '/points_order/createOrder', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
export function pointsOrderDetail(data: any) {
|
||||
return request.get({ url: '/points_order/detail', data }, { isAuth: true })
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export interface PagePopupItem {
|
||||
id: number
|
||||
name: string
|
||||
popup_type: number // 1=图片 2=文字 3=图文混合
|
||||
image: string
|
||||
title: string
|
||||
content: string
|
||||
link_type: number // 0=不跳转 1=站内 2=外部H5 3=电话
|
||||
link_url: string
|
||||
frequency: number // 1=每次 2=每会话一次 3=每天一次 4=仅一次
|
||||
delay_seconds: number
|
||||
auto_close_seconds: number
|
||||
is_closable: number // 1=可手动关闭 0=不可手动关闭
|
||||
sort: number
|
||||
}
|
||||
|
||||
export function getPopupList(data: { page_path: string; platform: string }) {
|
||||
return request.get({ url: '/popup/list', data }, { withToken: false })
|
||||
}
|
||||
|
||||
export function reportPopupAction(data: {
|
||||
popup_id: number
|
||||
action: 1 | 2 | 3 // 1=show 2=click 3=close
|
||||
page_path: string
|
||||
device_id?: string
|
||||
platform?: string
|
||||
}) {
|
||||
return request.post({ url: '/popup/report', data }, { withToken: false })
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//充值
|
||||
export function recharge(data: any) {
|
||||
return request.post({ url: '/recharge/recharge', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
//充值记录
|
||||
export function rechargeRecord(data: any) {
|
||||
return request.get({ url: '/recharge/lists', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 充值配置
|
||||
export function rechargeConfig() {
|
||||
return request.get({ url: '/recharge/config' }, { isAuth: true })
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* @description 获取分享信息
|
||||
*/
|
||||
export function getShareInfo() {
|
||||
return request.get({ url: '/share/getShareInfo' }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 创建短链接
|
||||
*/
|
||||
export function createShortLink(data: {
|
||||
page_type: string
|
||||
page_id?: number | string
|
||||
path?: string
|
||||
invite_code?: string
|
||||
title?: string
|
||||
description?: string
|
||||
}) {
|
||||
return request.post({ url: '/shortLink/create', data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 解析短链接并上报指纹
|
||||
*/
|
||||
export function resolveShortLink(data: { code: string; fingerprint: string; referer?: string }) {
|
||||
return request.post({ url: '/shortLink/resolve', data }, { withToken: false })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取邀请列表
|
||||
*/
|
||||
export function getInviteList(data: { page?: number; size?: number }) {
|
||||
return request.get({ url: '/share/getInviteList', data })
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//首页数据
|
||||
export function getIndex() {
|
||||
return request.get({ url: '/index/index' })
|
||||
}
|
||||
|
||||
// 装修页面
|
||||
export function getDecorate(data: any) {
|
||||
return request.get({ url: '/index/decorate', data }, { ignoreCancel: true })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 热门搜索
|
||||
* @return { Promise }
|
||||
*/
|
||||
export function getHotSearch() {
|
||||
return request.get({ url: '/search/hotLists' })
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getUserCenter(header?: any) {
|
||||
return request.get({ url: '/user/center', header }, { ignoreCancel: true })
|
||||
}
|
||||
|
||||
// 个人信息
|
||||
export function getUserInfo() {
|
||||
return request.get({ url: '/user/info' }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 个人编辑
|
||||
export function userEdit(data: any) {
|
||||
return request.post({ url: '/user/setInfo', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 绑定手机
|
||||
export function userBindMobile(data: any, header?: any) {
|
||||
return request.post({ url: '/user/bindMobile', data, header }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 微信电话
|
||||
export function userMnpMobile(data: any) {
|
||||
return request.post({ url: '/user/getMobileByMnp', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 更改手机号
|
||||
export function userChangePwd(data: any) {
|
||||
return request.post({ url: '/user/changePassword', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
//忘记密码
|
||||
export function forgotPassword(data: Record<string, any>) {
|
||||
return request.post({ url: '/user/resetPassword', data })
|
||||
}
|
||||
|
||||
//余额明细
|
||||
export function accountLog(data: any) {
|
||||
return request.get({ url: '/account_log/lists', data })
|
||||
}
|
||||
|
||||
// 获取用户频道配置
|
||||
export function getUserChannels() {
|
||||
return request.get({ url: '/user/getChannels' }, { isAuth: true })
|
||||
}
|
||||
|
||||
// 保存用户频道配置
|
||||
export function setUserChannels(data: { channel_ids: any[] }) {
|
||||
return request.post({ url: '/user/setChannels', data }, { isAuth: true })
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function vipLevels() {
|
||||
return request.get({ url: '/vip_order/levels' }, { isAuth: true })
|
||||
}
|
||||
|
||||
export function vipCreateOrder(data: any) {
|
||||
return request.post({ url: '/vip_order/createOrder', data }, { isAuth: true })
|
||||
}
|
||||
|
||||
export function vipOrderDetail(data: any) {
|
||||
return request.get({ url: '/vip_order/detail', data }, { isAuth: true })
|
||||
}
|
||||
Reference in New Issue
Block a user