Commit 2d15892b by GiottoMaster

'init'

parents
src/uni_modules
\ No newline at end of file
module.exports = {
env: {
browser: true,
es2021: true
},
extends: ['plugin:vue/vue3-recommended', 'standard', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
plugins: ['vue', '@typescript-eslint'],
rules: {
'vue/multi-word-component-names': 'off',
camelcase: 'off',
'@typescript-eslist/camelcase': 0
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
uni: 'readonly'
}
}
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
module.exports = {
// 根据自己项目需要
printWidth: 200, //单行长度
tabWidth: 2, //缩进长度
semi: false, //句末使用分号
singleQuote: true, //使用单引号
endOfLine: 'auto', //自动检测并保留行尾符号(如 \n 或 \r\n)
bracketSpacing: true, // 在对象的大括号之间添加空格 { foo: bar }。
trailingComma: 'none', // 句末逗号
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="./static/logo.svg"/>
<meta charset="UTF-8" />
<meta name="google" content="notranslate" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />'
)
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/src/main.ts"></script>
</body>
<script>
window.onload = function() {
// 阻止双击放大
var lastTouchEnd = 0;
document.addEventListener('touchstart', function(event) {
if (event.touches.length > 1) { event.preventDefault(); }
});
document.addEventListener('touchend', function(event) {
var now = (new Date()).getTime();
if (now - lastTouchEnd <= 300) { event.preventDefault(); }
lastTouchEnd = now;
}, false);
// 阻止双指放大
document.addEventListener('gesturestart', function(event) {
event.preventDefault();
});
}
</script>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "japan",
"version": "0.0.0",
"scripts": {
"dev:app": "uni -p app",
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
"dev:mp-baidu": "uni -p mp-baidu",
"dev:mp-kuaishou": "uni -p mp-kuaishou",
"dev:mp-lark": "uni -p mp-lark",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:app": "uni build -p app",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-kuaishou": "uni build -p mp-kuaishou",
"build:mp-lark": "uni build -p mp-lark",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union",
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx --fix"
},
"dependencies": {
"@dcloudio/uni-app": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-app-plus": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-components": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-h5": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-alipay": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-baidu": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-kuaishou": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-lark": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-qq": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-toutiao": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-mp-weixin": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-quickapp-webview": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-ui": "^1.4.12",
"animate.css": "^4.1.1",
"axios": "^1.7.4",
"font-awesome": "^4.7.0",
"install": "^0.13.0",
"klinecharts": "^9.8.10",
"npm": "^10.9.0",
"pinia": "^2.0.12",
"vant": "^4.9.8",
"vue": "^3.2.31",
"vue-i18n": "^9.14.0"
},
"devDependencies": {
"@dcloudio/types": "^2.5.18",
"@dcloudio/uni-automator": "^3.0.0-alpha-3040220220310005",
"@dcloudio/uni-cli-shared": "^3.0.0-alpha-3040220220310005",
"@dcloudio/vite-plugin-uni": "^3.0.0-alpha-3040220220310005",
"@types/node": "^17.0.23",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"autoprefixer": "^10.4.20",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.2.0",
"eslint-plugin-vue": "^8.5.0",
"postcss": "^8.4.41",
"prettier": "^2.6.1",
"sass": "^1.49.9",
"sass-loader": "^16.0.2",
"tailwindcss": "^3.4.10",
"typescript": "^4.6.2",
"vite": "^2.8.6",
"vite-plugin-eslint": "^1.3.0"
}
}
<script setup lang="ts">
import { useCounterStore } from '@/store/counterStore'
import { onLaunch } from '@dcloudio/uni-app'
const counterStore = useCounterStore()
counterStore.getSystemInfo()
counterStore.getUserInfo()
const i = 'orientationchange' in window ? 'orientationchange' : 'resize'
const setViewHeight = () => {
const windowVH = window.innerHeight / 100
document.documentElement.style.setProperty('--vh', windowVH + 'px')
}
document.addEventListener('DOMContentLoaded', setViewHeight)
window.addEventListener(i, setViewHeight)
onLaunch(() => {})
</script>
<style lang="scss">
body,
#app {
overflow-x: hidden;
background: #1f1f1f;
}
// 定义自定义字体
@font-face {
font-family: 'PretendardVariable';
src: url('static/font/PretendardVariable.woff2') format('woff2'); // 优先使用woff2格式,因为它是现代浏览器的最佳实践
font-weight: normal; // 设置字体的粗细
font-style: normal; // 设置字体的样式(正常或斜体)
}
* {
font-family: PretendardVariable;
box-sizing: border-box;
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
* {
font-family: inherit;
}
}
.flex {
display: flex;
}
</style>
import request from '@/utils/http.ts'
import config from '@/utils/config.ts'
// // 購買紅利股
// export function buyHongliApi(data: buyHongliType) {
// return request({
// url: `${config.baseURL}/index/add_discount_gupiao`,
// method: 'post',
// data
// })
// }
// 注册
export function registerApi(data) {
return request({
url: `${config.baseURL}/register`,
method: 'post',
data
})
}
// 登录
export function loginApi(data) {
return request({
url: `${config.baseURL}/login`,
method: 'post',
data
})
}
// 质押列表
export function getStakingListApi() {
return request({
url: `${config.baseURL}/index/product`,
method: 'get'
})
}
// 个人信息
export function getUserInfoApi() {
return request({
url: `${config.baseURL}/my`,
method: 'get'
})
}
// 我的质押商品
export function getMyStakingApi() {
return request({
url: `${config.baseURL}/my/staking`,
method: 'get'
})
}
// 我的质押商品
export function getLiushuiApi() {
return request({
url: `${config.baseURL}/money/history`,
method: 'get'
})
}
// 充值
export function rechargeApi(data) {
return request({
url: `${config.baseURL}/recharge`,
method: 'post',
data
})
}
// 取消充值
export function cancenRechargeApi(data) {
return request({
url: `${config.baseURL}/recharge_cancel`,
method: 'post',
data
})
}
// 体现
export function withdrawApi(data) {
return request({
url: `${config.baseURL}/withdraw`,
method: 'post',
data
})
}
// 生成钱包地址
export function createAddressApi(data) {
return request({
url: `${config.baseURL}/make/currency_address`,
method: 'post',
data
})
}
// 获取虚拟币价格
export function getCoinPriceApi(data) {
return request({
url: `${config.priceUrl}/${data}`,
method: 'get'
})
}
// https://api.bithumb.com/public/ticker
export interface getGupiaoType {
code: string
}
export interface getTickerKType {
id: string
interval: number | string
}
export interface idType {
id: string
}
export interface listType {
page: number
}
export interface buyGupiaoType {
buytype: number
fangxiang: string
price: number
pro_id: any
shuliang: number
type: number
}
export interface buyHongliType {
dividend_id: string
num: number
}
export interface buyGendanType {
follow_id: number
money: number | null
}
export interface buyDadanType {
monitoring_id: string
num: number
}
export interface searchType {
code: string
}
export interface withdrawType {
bankcard_id: number
money: string
pass: string
user_id: number
}
export interface rechagreType {
money: string
user_id: number
}
export interface liushuiType {
page: number
type: number
}
export interface buyDepositType {
deposits_id: number
buy_in_num: number
}
export interface sellDepositType {
deposits_order_id: number
}
export interface gendanIdType {
follow_id: number
}
// 前往下一个页面
export function goPage(e: string) {
uni.navigateTo({
url: e
})
}
// 返回下一个页面
export function goBack(delta: number = 1) {
uni.navigateBack({
delta
})
}
// 删除当前页并前往下一个页面
export function reLaunch(e: string) {
uni.reLaunch({
url: e
})
}
// 跳转到tabbar
export function switchTab(e: string) {
uni.switchTab({
url: e
})
}
// 时间戳转换
export const timestempToDate = (timestemp: number, n: string = '-') => {
const date = new Date(timestemp)
const year = date.getFullYear()
const month = date.getMonth() + 1 < 10 ? `0${Number(date.getMonth()) + 1}` : Number(date.getMonth()) + 1
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()
const hour = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours()
const minute = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes()
const r = `${year}${n}${month}${n}${day} ${hour}:${minute}`
return r
}
export function timestampToDate2(timestamp: number) {
const date = new Date(timestamp) // 时间戳转换成Date对象
const year = date.getFullYear() // 获取年份
let month = date.getMonth() + 1 // 获取月份,需要+1因为月份从0开始
let day = date.getDate() // 获取日
let hours = date.getHours() // 获取小时
let minutes = date.getMinutes() // 获取分钟
let seconds = date.getSeconds() // 获取秒钟
// 格式化月份、日期、小时、分钟和秒
month = month < 10 ? '0' + month : month
day = day < 10 ? '0' + day : day
hours = hours < 10 ? '0' + hours : hours
minutes = minutes < 10 ? '0' + minutes : minutes
seconds = seconds < 10 ? '0' + seconds : seconds
// 组合成日期时间字符串
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
}
// 获取股票颜色
export const getColor = (item: any, type: boolean = false) => {
if (type && item.zhangdiebaifenbi > 0) {
return 'up rotate'
}
const num = Number(item.zhangdiebaifenbi)
return num > 0 ? 'text_red' : num === 0 ? 'text_ping' : 'text_green'
}
// 获取股票颜色
export const getColor2 = (item: any, unit: boolean = false) => {
console.log(Number(item))
return Number(item) > 0 ? 'text_red' : Number(item) === 0 ? 'text_ping' : 'text_green'
}
// 获取股票颜色
export const getColor3 = (item: any, unit: boolean = false) => {
console.log(Number(item))
return Number(item) > 0 ? 'text_red' : Number(item) === 0 ? 'text_ping' : 'text_green3'
}
// 验证输入框内容是否为空
interface checkType {
key: string
message: string
}
interface dataType {
[key: string]: string | null
}
export function checkInput(checkArr: Array<checkType>, data: dataType) {
for (const i in checkArr) {
if (!data[checkArr[i].key]) {
uni.showToast({
title: checkArr[i].message,
icon: 'none'
})
return false
}
}
return true
}
// 價格转换(加逗号)
export const changeMoney = (money: any) => {
if (isNaN(Number(money))) {
return '-'
}
money = Number(money).toFixed(2) + ''
const x = money.split('.')
let x1 = x[0]
const x2 = x.length > 1 ? '.' + x[1] : ''
const reg = /(\d+)(\d{3})/
while (reg.test(x1)) {
x1 = x1.replace(reg, '$1' + ',' + '$2')
}
return x1 + x2
}
// 價格转换(涨跌百分比专用)
export const changeMoney2 = (money: any) => {
if (isNaN(Number(money))) {
return '-'
}
money = Number(money) + ''
const x = money.split('.')
let x1 = x[0]
const x2 = x.length > 1 ? '.' + x[1] : ''
const reg = /(\d+)(\d{3})/
while (reg.test(x1)) {
x1 = x1.replace(reg, '$1' + ',' + '$2')
}
return x1 + x2
}
let socketOpen = false
function sendSocketMessage(msg) {
if (socketOpen) {
uni.sendSocketMessage({
data: JSON.stringify(msg[0]),
success(res) {
console.log('发送成功:', res, JSON.stringify(msg[0]))
}
})
}
}
function reciveSocketMessage(callback) {
console.log(socketOpen)
if (socketOpen) {
uni.onSocketMessage(function (res) {
// console.log('收到服务器内容:' + res);
callback && callback(res.data)
})
}
}
function openSocket(sendMsg = [], callback) {
if (!socketOpen) {
uni.connectSocket({
url: 'wss://dshgjhssg.lonlnvips.com'
})
}
uni.onSocketOpen(function (res) {
console.log('ws已打开')
socketOpen = true
if (socketOpen) {
if (sendMsg.length > 0) {
console.log('ws已链接')
sendSocketMessage(sendMsg)
}
reciveSocketMessage(callback)
}
})
}
function closeSocket() {
uni.closeSocket({})
socketOpen = false
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!')
socketOpen = false
})
}
export { openSocket, closeSocket }
<template>
<footer>
<img src="/static/image/index/footer_bg.png" class="bg" mode="widthFix" />
<div class="wrap">
<div class="top">
<div class="image">
<img src="/static/image/index/footer.png" mode="widthFix" />
</div>
<div class="label">
<text>Terms of Service</text>
<text class="gun"></text>
<text>Privacy Policy</text>
</div>
</div>
<div class="bottom">
<span
>면책 조항:이 콘텐츠는 정보 제공 목적으로만 제공되며 법률,세금 투자,재정 또는 기타 조언이 아닙니다. 귀하는 여기에 포함된 정보 또는 블로그 게시물,데이터,기사,제3자 콘텐츠 링크,디스코드
콘텐츠,뉴스 등 당사가 언제든지 제공하는 기타 정보를 기반으로 어떤 조치를 취하거나 삼가해서는 안 됩니다.피드,튜토리얼,트윗,비디오.재정적,법적,기술적 또는 기타 결정을 내리기 전에 해당 조언이
적절한 분야의 면허를 소지하고 자격을 갖춘 개인으로부터 독립적인 전문 조언을 구해야합니다. 이정보는 포괄적이거나 kaia wallet 또는 해당 제품의 모든 측면을 다루기 위한 것이아닙니다.</span
>
<br />
<br />
<span
>kaia wallet은 IP 주소에 관계없이 미국인과 미국 또는 kaia wallet을 사용하는 국가에 위치,조직,설립 또는 일반적으로 거주하는 미국인을 대신하여 직간접적으로 행동하는 사용자에게 엄격히
금지됩니다.kaia wallet 계약의 사용이 불법이거나 금지되거나 승인이나 라이센스가 필요한 모든 국가(금전 금지를 포함하여 해당 법률 및 규정을 위반하는 사용자를 포함하되 이에 국한되지 않음)
테러리스트 또는 테러 조직의 구성원인 사용자를 포함하되 이에 국한되지 않은 kaia wallet 의 고객 계약에 따라 금지된 사용자. 또한 가상 사설망(VPN)과 같이 귀하의 거주지 및 위치를 숨기는 방법의
사용을 엄격히 금지합니다. 이 제품을 사용하려면 모든 사용자는 자신을 대신하여 고지 사항을 읽고 이해하고 동의해야 합니다.사용자가 허위로 동의하여 본제품을 사용할 경우 발생하는 모든 법적
불이익에 대한 책임은 전적으로 사용자에게 있으며,kaia wallet은 어떠한 책임도 되지 않습니다.</span
>
</div>
</div>
</footer>
</template>
<script lang="ts" setup></script>
<style scoped lang="scss">
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
footer {
// max-width: 87.5rem;
// margin: 5rem auto 0rem;
max-width: 100% !important;
.bg {
left: 0 !important;
width: 100%;
}
}
}
footer {
padding: 1rem 1rem 2.5rem;
margin-top: 5rem;
position: relative;
width: 87.5rem;
margin: 5rem auto 0;
.bg {
position: absolute;
width: 100vw !important;
object-fit: fill !important;
height: 70vh;
left: calc((100vw - 87.5rem) / 2 * -1);
// left: 0;
bottom: 0;
z-index: 0;
}
.wrap {
position: relative;
}
.top {
padding: 1rem 0;
display: flex;
align-items: center;
img {
width: 9.38rem;
display: block;
margin-right: 0.63rem;
}
text {
font-size: 0.75rem;
}
.gun {
margin: 0 0.31rem;
}
.label {
color: #fff;
}
}
.bottom {
font-size: 0.69rem;
margin-top: 0.75rem;
line-height: 0.88rem;
color: #888;
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
footer {
.top {
img {
width: 8.2rem;
display: block;
margin-right: 0.63rem;
}
}
}
}
</style>
<template>
<header>
<img src="/static/image/index/header_bg.png" class="bg" mode="widthFix" />
<div class="pc">
<div class="image">
<img src="/static/image/index/header.png" mode="widthFix" @click="goPage('/pages/index/index')" />
</div>
<div v-if="store.token" class="buttons">
<div class="text_button" :class="{ active: currentPage === 'staking' }" @click="goPage('/pages/staking/staking')">스테이킹</div>
<div class="text_button" :class="{ active: currentPage === 'account' }" @click="goPage('/pages/account/account')">마이페이지</div>
<div class="button primary" @click="logout">Log out</div>
</div>
<div v-else class="buttons">
<div class="button" @click="goPage('/pages/login/login')">Sign in</div>
<div class="button primary" @click="goPage('/pages/register/register')">Sign up</div>
</div>
</div>
<div class="mobile" :class="{ open: menuShow }">
<div class="warp">
<div class="left">
<img src="/static/image/index/header.png" mode="widthFix" />
<i v-if="!menuShow" class="fa fa-bars" @click="menuShow = true"></i>
<i v-else class="fa fa-close" @click="menuShow = false"></i>
</div>
<div class="right">
<div v-if="store.token" class="button" @click="logout">Log Out</div>
<div v-else class="button" @click="goPage('/pages/login/login')">Log In</div>
</div>
</div>
<div v-if="menuShow" class="row" @click="goPage('/pages/index/index')">Home</div>
<div v-if="menuShow" class="row" @click="goPage('/pages/staking/staking')">스테이킹</div>
<div v-if="menuShow" class="row" @click="goPage('/pages/account/account')">마이페이지</div>
<!-- <div v-if="menuShow" class="row" @click="logout">Log Out</div> -->
<div v-if="menuShow" class="row" @click="goPage('/pages/register/register')">Register</div>
</div>
</header>
</template>
<script lang="ts" setup>
import { goPage } from '@/common/common'
import { useCounterStore } from '@/store/counterStore'
import { onShow } from '@dcloudio/uni-app'
import { ref } from 'vue'
const store = useCounterStore()
const currentPage = ref('')
const menuShow = ref(false)
onShow(() => {
console.log(store)
const href = window.location.href
if (href.indexOf('staking') >= 0) {
currentPage.value = 'staking'
} else if (href.indexOf('account') >= 0) {
currentPage.value = 'account'
}
})
const logout = () => {
uni.removeStorageSync('token')
goPage('/pages/login/login')
}
</script>
<style scoped lang="scss">
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
.pc {
display: none !important;
}
.mobile {
height: 4rem;
box-sizing: border-box;
background: #1f1f1f;
justify-content: space-between;
display: block !important;
position: fixed;
top: 0;
width: 100%;
overflow-y: hidden;
z-index: 10000;
.left {
width: 8.75rem;
display: flex;
justify-content: space-between;
padding: 0.25rem 0;
img {
width: 6.25rem;
object-fit: contain;
}
i {
font-size: 1.5rem;
margin-left: 0.38rem;
}
}
.row {
font-size: 1rem;
height: 2.75rem;
padding: 0.75rem 1.25rem;
color: #fff;
}
.warp {
display: flex !important;
width: 100%;
justify-content: space-between;
// height: 1.75rem;
padding: 1rem 1.25rem;
i {
color: #fff;
}
}
.button {
background: #bff009;
padding: 0 0.75rem;
border-radius: 1.75rem;
font-size: 0.75rem !important;
height: 1.75rem;
line-height: 1.75rem;
color: #1f1f1f;
}
}
.open {
height: calc(var(--vh) * 100) !important;
}
header {
padding: 0 !important;
}
}
header {
padding: 0.75rem 2.5rem;
position: relative;
.bg {
position: absolute;
width: 100vw !important;
object-fit: fill !important;
height: 50vh;
left: 0;
top: 0;
}
.pc {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
img {
width: 10.06rem;
display: block;
object-fit: contain;
}
.buttons {
display: flex;
justify-content: space-between;
align-items: center;
}
.text_button {
padding: 1.5rem 1.25rem;
cursor: pointer;
font-size: 1.13rem;
font-family: initial;
color: #fff;
}
.active {
background: #ffffff10;
}
.button {
width: 5.5rem;
height: 2.5rem;
line-height: 2.5rem;
text-align: center;
font-size: 0.94rem;
font-weight: 600;
color: #fff;
cursor: pointer;
margin-left: 1.25rem;
}
.primary {
background: #bff009;
color: #000;
border-radius: 1.25rem;
}
}
.mobile {
display: none;
}
}
</style>
<template>
<view class="navigator" :style="{ background: bg }">
<view v-if="porps.isShowBack" class="back" @click="goBack">
<image src="@/static/image/components/arrow-left.png" mode="heightFix"></image>
</view>
<view v-if="!porps.hideTitle" class="title" :style="{ color: color }">{{ porps.title }}</view>
<slot name="left"></slot>
<slot name="title"></slot>
<slot name="right"></slot>
</view>
</template>
<script lang="ts" setup>
const porps = defineProps({
title: {
type: String,
default: ''
},
isShowBack: {
type: Boolean,
default: true
},
hideTitle: {
type: Boolean,
default: false
},
bg: {
type: String,
default: '#18191b'
},
color: {
type: String,
default: '#fff'
}
})
const goBack = () => {
uni.navigateBack({})
}
</script>
<style lang="scss" scoped>
.navigator {
height: 3.06rem;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.back {
position: absolute;
left: 0;
height: 100%;
padding: 0 0.94rem;
display: flex;
align-items: center;
image {
height: 1rem;
}
}
.title {
font-size: $text-size-32;
color: $text-color-white;
font-weight: 500;
}
</style>
<template>
<view class="NoData">
<div class="imgWrap">
<img src="/static/image/components/nodata2.png" />
</div>
<div class="label">{{ porps.label }}</div>
</view>
</template>
<script lang="ts" setup>
const porps = defineProps({
label: {
type: String,
default: '暫無數據'
}
})
</script>
<style lang="scss" scoped>
.NoData {
height: 17.75rem;
padding: 3.13rem 0;
.imgWrap {
display: flex;
justify-content: center;
img {
width: 7.25rem;
}
}
.label {
width: 100%;
text-align: center;
color: $text-color-green;
font-size: $text-size-30;
margin-top: 1rem;
}
}
</style>
<template>
<view class="Nomore">沒有更多了</view>
</template>
<style lang="scss" scoped>
.Nomore {
height: 3.13rem;
line-height: 3.13rem;
text-align: center;
color: #969799;
font-size: $text-size-28;
}
</style>
/// <reference types="vite/client" />
declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
import { createSSRApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import 'vant/lib/index.css'
import Vant, { ConfigProvider } from 'vant'
import 'font-awesome/css/font-awesome.min.css'
const pinia = createPinia()
export function createApp() {
const app = createSSRApp(App).use(pinia).use(Vant).use(ConfigProvider)
return {
app
}
}
{
"name" : "kaia-wallet",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"template" : "index.html",
"router" : {
"mode" : "hash",
"base" : "/"
},
"title" : "kaia-wallet"
}
}
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/login/login",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/register/register",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/staking/staking",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/account/account",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/recharge/recharge",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/withdraw/withdraw",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/liushui/liushui",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/deposit/deposit",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/deposit/depositDetail",
"style": {
"navigationStyle": "custom"
}
}
],
"tabBar": {
"custom": true
},
"globalStyle": {
"navigationBarTitleText": "kaia-wallet"
},
"easycom": {
"autoscan": true,
"custom": {
// uni-ui 规则如下配置
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
}
}
<template>
<Header />
<main>
<div class="bg">
<img class="pc2" src="/static/image/index/pc_bg2.png" mode="widthFix" />
</div>
<div class="title">Deposit</div>
<div class="outside">
<div class="table_wrap">
<div class="table">
<div class="thead">
<th>코인</th>
<th>보유</th>
<th>보유가치</th>
<th>누적 보상</th>
</div>
<div class="tbody">
<div v-for="(item, index) in userInfo?.wallet_list || []" :key="index" class="tr" @click="goPage(`/pages/deposit/depositDetail?symbool=${item.symbol}`)">
<div class="td">
<img :src="item.logo" alt="" />
<span>{{ item.symbol }}</span>
</div>
<div class="td">{{ item.coin }}</div>
<div class="td">{{ changeMoney2(item.price) }}</div>
<div class="td">{{ changeMoney(item.reward) }}KRW</div>
</div>
</div>
</div>
</div>
</div>
</main>
<Footer />
</template>
<script lang="ts" setup>
import Header from '@/components/Header/Header.vue'
import Footer from '@/components/Footer/Footer.vue'
import { getUserInfoApi, getCoinPriceApi } from '@/api/index'
import { onShow } from '@dcloudio/uni-app'
import { changeMoney, changeMoney2, goPage } from '@/common/common'
import { ref } from 'vue'
onShow(() => {
getStakingList()
})
const userInfo = ref({})
const total = ref(0)
const getStakingList = async () => {
let t = 0
const res = await getUserInfoApi()
// 处理数据
const wallet_list = []
let s = 0
for (const i in res.data.wallet_list) {
wallet_list[s] = res.data.wallet_list[i]
s++
}
for (const i in wallet_list) {
for (const s in res.data.my_wallet) {
if (wallet_list[i].symbol === res.data.my_wallet[s].symbol) {
wallet_list[i].coin = res.data.my_wallet[s].coin
break
}
}
}
userInfo.value = res.data
for (const i in wallet_list) {
const price = await getCoinPriceApi(`${wallet_list[i].symbol}_KRW`)
if (!price.data.closing_price) {
// console.log('第三方无返回', Number(wallet_list[i].coin), wallet_list[i].symbol)
const map = new Map([
['BTC', 126090370],
['ETH', 2926221.2],
['USDT', 1464.72],
['KAIA', 160],
['SOL', 197376.07]
])
price.data.closing_price = map.get(wallet_list[i].symbol)
}
wallet_list[i].price = Number(price.data.closing_price) * Number(wallet_list[i].coin)
t += wallet_list[i].price
}
userInfo.value.wallet_list = wallet_list
total.value = t
}
// const goPage = (e) => {
// console.log(e)
// }
</script>
<style scoped lang="scss">
main {
width: 69.38rem;
margin: 0 auto;
.bg {
width: 100%;
position: absolute;
height: 50vh;
top: 20vh;
z-index: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.title {
font-size: 3rem;
margin-bottom: 1rem;
color: #fff;
padding: 0 0.94rem;
line-height: 3rem;
}
.outside {
position: relative;
z-index: 10;
}
margin-top: 5.63rem;
min-height: calc(var(--vh) * 100 - 6.13rem - 5.63rem - 14.5rem - 5rem);
position: relative;
z-index: 1;
.table {
width: 69.38rem;
margin: 0 auto 1rem;
.thead {
width: 100%;
display: flex;
height: 2rem;
background: #0e0e0e;
th {
flex: 1;
line-height: 2rem;
padding: 0 0.63rem;
font-size: 0.88rem;
color: #fff;
text-align: left;
}
}
.tbody {
.tr {
height: 3.13rem;
background: #1a1b1c;
display: flex;
align-items: center;
padding: 0.31rem;
cursor: pointer;
.td {
display: flex;
align-items: center;
flex: 1;
padding: 0.31rem;
font-size: 0.75rem;
color: #fff;
}
img {
width: 2rem;
height: 2rem;
margin-right: 1rem;
border-radius: 50%;
}
}
}
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
main {
margin-top: 4rem;
.outside {
padding: 0 0.94rem;
> ._title {
margin: 2rem 0 1.5rem;
font-size: 1.5rem;
}
}
.title {
font-size: 1.25rem;
margin-bottom: 0.63rem;
}
.table_wrap {
overflow: scroll;
width: 100vw !important;
}
.table {
width: 33.13rem;
.thead {
th {
font-size: 0.81rem;
}
}
}
}
}
</style>
<template>
<Header />
<main>
<div class="bg">
<img class="pc2" src="/static/image/index/pc_bg2.png" mode="widthFix" />
</div>
<div class="outside">
<div class="title">{{ symbol }} 입금하기</div>
<div class="label">
<p>업비트에 등록되지 않은 거래소 혹은 개인지갑에서</p>
<p>입금되는 경우 입금 반영이 되지 않을 수 있습니다.</p>
</div>
<div class="title2">{{ symbol }} 입금 주소</div>
<div v-if="showCode" class="walletWrap">
<div class="row">
<div class="block">{{ walletCode[0] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[1] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[2] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[3] }}</div>
</div>
<div class="row">
<div class="block">{{ walletCode[4] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[5] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[6] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[7] }}</div>
</div>
<div class="row">
<div class="block">{{ walletCode[8] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[9] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[10] }}</div>
<div class="line"></div>
<div class="block">{{ walletCode[11] }}</div>
</div>
<div class="button" @click="submitCode">가입완료</div>
</div>
<div v-else class="plus_wrap" @click="createCode">
<div class="puls">
<van-icon name="plus" color="#bff009" size="2rem" />
</div>
</div>
<div class="label title3">버튼을 클릭하세요!</div>
<div class="label">회원님 고유의 {{ symbol }} 입금주소가 발급됩니다.</div>
<div class="tip">자금 세탁 행위 예방 및 전기통신금융 사기 피해 방지를 위해 계정당 첫 디지털 자산 입금 후 72시간 동안 KRW의 출금이 제한됩니다.</div>
<div class="tip">위 주소로는 {{ symbol }} 입금가능합니다. 해당 주소로 다른 디지털 자산을 입금 시도할 경우에 발생할 수 있는 오류/손실은 복구 불가능합니다.</div>
<div class="tip">36번의 confirmation이 발생한 이후,입금 프로세스를 거쳐 잔고에 반영됩니다.입금 프로세스는 자동으로 진행되며 네트워크 상황에 따라 소요 시간이 달라질 수 있습니다.</div>
<div class="tip">10 {{ symbol }}(최소입금금액)이상 입금해야만 잔고에 반영됩니다. 최소입금금액 미만 입금 시에는 잔고 반영 및 입금 취소가 불가능합니다.</div>
</div>
</main>
<Footer />
</template>
<script lang="ts" setup>
import Header from '@/components/Header/Header.vue'
import Footer from '@/components/Footer/Footer.vue'
import { getUserInfoApi } from '@/api/index'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { closeToast, showLoadingToast } from 'vant'
import en from '@/static/json/en.json'
onLoad((e) => {
console.log(en)
for (let i = 0; i <= 12; i++) {
const word = en[parseInt(Math.random() * 3000)].word
walletCode.value[i] = word
}
symbol.value = e.symbool
getUserInfo()
})
const userInfo = ref({})
const symbol = ref(null)
const walletInfo = ref({})
const walletCode = ref([])
const showCode = ref(false)
const getUserInfo = async () => {
const res = await getUserInfoApi()
userInfo.value = res.data
for (const i in res.data.wallet_list) {
if (i === symbol.value) {
walletInfo.value = res.data.wallet_list[i]
console.log(walletInfo.value)
break
}
}
}
const createCode = () => {
console.log(walletInfo.value.address)
if (walletInfo.value.address) {
alert(`회원님 고유의 ${symbol.value} 입금주소는 5월11일 발급 될 예정입니다.`)
} else {
showLoadingToast({})
setTimeout(() => {
closeToast()
showCode.value = true
}, 1500)
}
}
const submitCode = async () => {
alert(`회원님 고유의 ${symbol.value} 입금주소는 5월11일 발급 될 예정입니다.`)
}
</script>
<style scoped lang="scss">
main {
width: 69.38rem;
margin: 0 auto;
margin-top: 5.63rem;
min-height: calc(var(--vh) * 100 - 6.13rem - 5.63rem - 14.5rem - 5rem);
position: relative;
z-index: 1;
.bg {
width: 100%;
position: absolute;
height: 50vh;
top: 20vh;
z-index: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.outside {
position: relative;
z-index: 10;
.title {
font-size: 2rem;
color: #ffffff;
margin-bottom: 1.25rem;
}
.title2 {
font-size: 1.5rem;
color: #ccc;
margin: 1.25rem 0;
}
.label {
color: #ccc;
margin-top: 1.25rem;
font-size: 1.25rem;
}
p {
color: #ccc;
font-size: 1rem;
}
.tip {
color: #888;
font-size: 0.9rem;
margin-top: 0.8rem;
position: relative;
left: 0.8rem;
&::before {
content: '';
width: 0.31rem;
height: 0.31rem;
position: absolute;
left: -0.8rem;
background: #888;
top: 0.4rem;
border-radius: 50%;
}
}
.plus_wrap {
border: 0.06rem solid #bff009;
width: 7.5rem;
height: 7.5rem;
margin: 1.25rem 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
&:hover {
background: #bff00909;
}
}
}
.walletWrap {
.row {
display: flex;
margin-top: 2rem;
align-items: center;
.block {
background: #fff;
width: 8rem;
height: 2rem;
line-height: 2rem;
text-align: center;
border-radius: 0.25rem;
// margin-right: 2rem;
// color: #fff;
text-align: center;
font-weight: bold;
}
.line {
width: 2rem;
margin: 0.5rem;
background: #ccc;
height: 0.15rem;
border-radius: 0.19rem;
}
}
}
.button {
height: 3rem;
width: 41rem;
line-height: 3rem;
border-radius: 0.3rem;
background: #1f1f1f;
border: 0.1rem solid #bff009;
cursor: pointer;
text-align: center;
color: #bff009;
margin-top: 1.5rem;
&:hover {
background: #bff009;
color: #333;
font-weight: 500;
}
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
main {
margin-top: 4rem;
.outside {
padding: 0 0.94rem;
width: 100vw;
}
.title2,
.title3 {
text-align: center;
}
.plus_wrap {
margin: 1.25rem auto !important;
}
.button {
width: 100% !important;
}
}
}
</style>
<template>
<Header />
<main>
<div class="bg">
<img class="pc2" src="/static/image/index/pc_bg2.png" mode="widthFix" />
</div>
<div class="wrap">
<div class="title">입출금 현황</div>
<div class="card">
<div v-for="(item, index) in liushuiList" :key="index" class="row">
<div class="left">
<span>{{ item.type_text }}</span>
<span>{{ changeMoney2(item.money) }}</span>
<span>|</span>
<span>{{ item.created_at }}</span>
</div>
<div class="right">
<span>{{ item.state_text }}</span>
<div v-if="item.state == 1 && item.type === 'in'" class="button" @click="cancel(item)">취소</div>
</div>
</div>
</div>
</div>
</main>
<Footer />
</template>
<script lang="ts" setup>
import Header from '@/components/Header/Header.vue'
import Footer from '@/components/Footer/Footer.vue'
import { getLiushuiApi, cancenRechargeApi } from '@/api/index'
import { ref } from 'vue'
import { changeMoney2 } from '@/common/common'
import { onShow } from '@dcloudio/uni-app'
import { closeToast, showLoadingToast } from 'vant'
onShow(() => {
getLiushui()
})
const liushuiList = ref({})
const getLiushui = async () => {
const res = await getLiushuiApi()
liushuiList.value = res.data
}
const cancel = async (e: any) => {
const dep = await window.confirm('암거나 조작 하지마여 ~')
if (dep) {
showLoadingToast({})
const res = await cancenRechargeApi({ id: e.id })
if (res.code === 200) {
getLiushui()
alert(res.msg)
}
closeToast()
}
}
</script>
<style scoped lang="scss">
main {
position: relative;
z-index: 1;
.bg {
width: 100%;
position: absolute;
height: 50vh;
top: 20vh;
z-index: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
}
.wrap {
width: 69.38rem;
margin: 0 auto;
min-height: calc(var(--vh) * 100 - 6.13rem - 14.4rem - 5rem - 2rem);
position: relative;
z-index: 10;
.title {
font-size: 1.5rem;
margin-bottom: 1.5rem;
margin-top: 2rem;
color: #fff;
}
.card {
.row {
display: flex;
justify-content: space-between;
background: #1b1c1a;
border-radius: 0.25rem;
padding: 1rem 1.5rem;
box-shadow: 0 0.13rem 0.5rem #516a9214;
border-radius: 0.5rem;
margin-bottom: 1rem;
color: #fff;
.left {
font-size: 0.88rem;
display: flex;
gap: 0.5rem;
}
.right {
font-size: 0.88rem;
color: #bff009;
display: flex;
gap: 20px;
.button {
color: red;
cursor: pointer;
}
}
}
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
main {
.wrap {
width: 100%;
padding: 0 0.94rem;
height: inherit !important;
margin-top: 4rem;
padding-top: 1.88rem;
}
.row {
padding: 1rem 0.5rem !important;
.left,
.right {
font-size: 0.75rem !important;
}
}
.title {
margin-top: 0 !important;
font-size: 1.25rem !important;
}
}
}
</style>
<template>
<div class="container">
<div class="left">
<div class="bg">
<div class="inside"></div>
</div>
<img class="logo" src="/static/image/login/logo2.png" />
<!-- <div class="message">
<div class="label">KAIA Exchange</div>
<div class="label">MORE THAN JUST ASSET SECURITY</div>
<div class="line"></div>
</div> -->
<div class="tip">© 2024 KAIA All rights reserved.</div>
</div>
<div class="right">
<div class="top">
<div class="row">
<text> 계정이 없으신가요? </text>
<text class="btn" @click="goPage('/pages/register/register')">회원가입하기</text>
</div>
</div>
<img class="logo" src="/static/image/login/bg-nomore.png" />
<div class="center">
<div class="title">Login to KAIA</div>
<div class="label">아이디</div>
<div class="input_wrap" :class="{ active: accountFocus }">
<input v-model="params.username" type="text" placeholder="아이디" @focus="accountFocus = true" @blur="accountFocus = false" />
</div>
<div class="label">비밀번호</div>
<div class="input_wrap" :class="{ active: passwordFocus }">
<input v-model="params.password" :type="showPassword ? 'text' : 'password'" placeholder="비밀번호" @focus="passwordFocus = true" @blur="passwordFocus = false" />
<uni-icons :type="showPassword ? 'eye-filled' : 'eye-slash-filled'" size="20" color="#ffffff99" @click="showPassword = !showPassword" />
</div>
<div class="button" @click="login">로그인</div>
<div class="text_button" @click="goPage('/pages/register/register')">Create Account</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { goPage } from '@/common/common'
import { loginApi } from '@/api/index'
import { useCounterStore } from '@/store/counterStore'
const counterStore = useCounterStore()
const showPassword = ref(false)
const accountFocus = ref(false)
const passwordFocus = ref(false)
const params = ref({
username: '',
password: ''
})
const login = async () => {
let device = false
for (const i in params.value) {
if (params.value[i] === '') {
device = '모든 항목을 입력해주세요.'
break
}
}
if (device) {
window.alert(device)
return
}
const res = await loginApi(params.value)
if (res.code === 200) {
uni.setStorageSync('token', res.data.token)
counterStore.getUserInfo()
goPage('/pages/index/index')
}
}
</script>
<style scoped lang="scss">
.container {
display: flex;
height: calc(var(--vh) * 100);
.left {
flex: 5;
position: relative;
.bg,
.inside {
position: absolute;
top: 0 !important;
right: 0;
bottom: 0;
left: 0;
}
.bg {
background-image: url('/static/image/login/bg-wenli.png');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.inside {
// background: #00000073;
}
.logo {
width: 7.5rem;
// height: 1.5rem;
margin-top: 3.56rem;
margin-left: 3.5rem;
cursor: pointer;
outline: none;
}
img {
position: relative;
}
.message {
position: absolute;
bottom: 12.44rem;
left: 5rem;
.label {
font-size: 3rem;
color: #fff;
margin-bottom: 1.5rem;
}
.line {
width: 3rem;
height: 0.25rem;
background: #fff;
border-radius: 0.25rem;
}
}
.tip {
position: absolute;
bottom: 6.5rem;
left: 4.94rem;
color: #fff;
font-size: 0.88rem;
font-weight: 400;
line-height: 1.38rem;
}
}
.right {
flex: 5;
position: relative;
display: flex;
flex-direction: column;
overflow-y: auto;
img {
display: none;
}
.top {
min-height: 7.5rem;
flex: 1;
position: relative;
.row {
position: absolute;
top: 3.25rem;
right: 4.38rem;
color: #fff;
font-size: 0.88rem;
.btn {
color: #bff009;
cursor: pointer;
}
}
}
.center {
min-width: 25rem;
margin: 0 auto;
flex: 2.2;
.title {
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 2rem;
color: #fff;
}
.label {
font-size: 0.88rem;
margin-bottom: 0.5rem;
color: #ffffff99;
}
.input_wrap {
height: 3rem;
background: #0a150c;
margin-bottom: 1rem;
border-radius: 0.3rem;
border: 0.1rem solid #0a150c;
display: flex;
align-items: center;
padding: 0 0.75rem;
input {
height: 3rem;
line-height: 3rem;
font-size: 0.88rem;
flex: 1;
color: #fff;
}
}
.active {
border-color: #bff009;
}
.button {
height: 3rem;
line-height: 3rem;
border-radius: 0.3rem;
background: #bff009;
background: #1f1f1f;
border: 0.1rem solid #bff009;
cursor: pointer;
text-align: center;
color: #bff009;
margin-top: 4.38rem;
&:hover {
background: #bff009;
color: #333;
font-weight: 500;
}
}
.text_button {
color: #bff009;
margin-top: 1.2rem;
display: none;
}
}
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
.container {
.left {
display: none;
.message,
.tip {
display: none;
}
}
.right {
background-color: #000;
img {
display: block;
margin: -40% 0 -20%;
}
.top {
position: relative;
z-index: 10000;
flex: 0.5;
}
.center {
min-width: 0;
width: 100%;
padding: 0 1.5rem;
flex: 2;
position: relative;
z-index: 10000;
.text_button {
display: block;
}
}
}
}
}
</style>
<template>
<Header />
<main>
<div class="bg">
<img class="pc2" src="/static/image/index/pc_bg2.png" mode="widthFix" />
</div>
<div class="wrap">
<div class="title">입금하기</div>
<div class="card">
<div class="label">입금 금액</div>
<div class="number">{{ changeMoney2(money) }}</div>
<div class="row">
<div class="block" @click="money += 10000">10,000</div>
<div class="block" @click="money += 100000">100,000</div>
<div class="block" @click="money += 1000000">1,000,000</div>
<div class="block" @click="money += 10000000">10,000,000</div>
</div>
<div class="row">
<div class="block" @click="money += 50000000">50,000,000</div>
<div class="block" @click="money += 100000000">100,000,000</div>
<div class="block" @click="money += 500000000">500,000,000</div>
<div class="block" @click="money += 1000000000">1,000,000,000</div>
</div>
</div>
<div class="button primary" @click="recharge">입금 신청</div>
<div class="button gray" @click="goPage('/pages/liushui/liushui')">신청내역</div>
</div>
</main>
<Footer />
</template>
<script lang="ts" setup>
import Header from '@/components/Header/Header.vue'
import Footer from '@/components/Footer/Footer.vue'
import { rechargeApi } from '@/api/index'
import { ref } from 'vue'
import { changeMoney2, goPage } from '@/common/common'
const money = ref(0)
const recharge = async () => {
if (money.value === 0) {
alert('입금 금액을 선택해주세요.')
return
}
const dep = await window.confirm('입금 신청완료 입니다.')
if (dep) {
const res = await rechargeApi({ money: money.value })
if (res.code === 200) {
alert('입금신청이 완료되었습니다.')
money.value = 0
}
}
}
</script>
<style scoped lang="scss">
main {
position: relative;
z-index: 10;
.bg {
width: 100%;
position: absolute;
height: 50vh;
top: 20vh;
z-index: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
}
.wrap {
width: 69.38rem;
margin: 0 auto;
min-height: calc(var(--vh) * 100 - 6.13rem - 14.4rem - 5rem - 2rem);
position: relative;
z-index: 10;
.title {
font-size: 1.5rem;
margin-bottom: 1.5rem;
margin-top: 2rem;
color: #fff;
}
.card {
background: #1b1c1a;
border-radius: 0.25rem;
padding: 0.63rem 0.63rem 1.56rem;
.label {
font-size: 0.88rem;
color: #fff;
}
.number {
line-height: 2.75rem;
color: #fff;
}
.row {
display: flex;
gap: 0.38rem;
}
.block {
width: 25%;
display: inline-block;
margin-top: 0.69rem;
text-align: center;
background: #363c32;
height: 1.56rem;
line-height: 1.56rem;
cursor: pointer;
color: #fff;
}
}
.button {
height: 2.5rem;
line-height: 2.5rem;
text-align: center;
color: #fff;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.88rem;
}
.primary {
background: #bff009;
color: #1b1c1a;
margin-top: 0.63rem;
}
.gray {
background: #888;
margin-top: 0.63rem;
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
main {
.wrap {
width: 100%;
padding: 0 0.94rem;
height: inherit !important;
margin-top: 4rem;
padding-top: 1.88rem;
}
.title {
margin-top: 0 !important;
font-size: 1.25rem !important;
}
.label {
font-size: 0.69rem !important;
}
.block {
font-size: 0.69rem !important;
}
.button {
height: 2rem !important;
line-height: 2rem !important;
}
}
}
</style>
<template>
<Header />
<main>
<div class="bg">
<img class="pc2" src="/static/image/index/pc_bg2.png" mode="widthFix" />
</div>
<div class="title">Staking</div>
<div class="label">최고의 스테이킹 경험에 접근할 수 있는 분산되고 안전한 방법입니다.</div>
<div class="table">
<div class="thead">
<div class="th">Name</div>
<div class="th">Network</div>
<div class="th">
<span>일/이자수익</span>
<i class="fa fa-question-circle"></i>
</div>
<div class="th">
<span>Rewards</span>
<i class="fa fa-question-circle"></i>
</div>
<div class="th"></div>
</div>
<div class="tbody">
<div v-for="(item, index) in stakingList" :key="index" class="tr">
<div class="td">
<img :src="item.logo" alt="" class="logo" />
<div>
<div class="title">
<span>{{ item.name }}</span>
<img src="/static/image/index/tip1.svg" alt="" />
<img src="/static/image/index/tip2.svg" alt="" />
</div>
<div class="symbol">{{ item.name }}</div>
</div>
</div>
<div class="td">{{ item.network }}</div>
<div class="td">{{ item.daily_odds }}%</div>
<div class="td">0</div>
<div class="td">-</div>
</div>
</div>
</div>
<div class="table2">
<div class="tbody">
<div v-for="(item, index) in stakingList" :key="index" class="tr">
<div class="head">
<img :src="item.logo" alt="" class="logo" />
<div>
<div class="title">
<span>{{ item.name }}</span>
<img src="/static/image/index/tip1.svg" alt="" />
<img src="/static/image/index/tip2.svg" alt="" />
</div>
<div class="symbol">{{ item.name }}</div>
</div>
</div>
<div class="row">
<div class="label">Network</div>
<div class="value">{{ item.network }}</div>
</div>
<div class="row">
<div class="label">일/이자수익</div>
<div class="value blue">{{ item.daily_odds }}%</div>
</div>
<div class="row">
<div class="label">Rewards</div>
<div class="value">0</div>
</div>
<div class="row">
<div class="label">-</div>
</div>
</div>
</div>
</div>
</main>
<Footer />
</template>
<script lang="ts" setup>
import Header from '@/components/Header/Header.vue'
import Footer from '@/components/Footer/Footer.vue'
import { getMyStakingApi } from '@/api/index'
import { onShow } from '@dcloudio/uni-app'
import { ref } from 'vue'
onShow(() => {
getStakingList()
})
const stakingList = ref([])
const getStakingList = async () => {
const res = await getMyStakingApi()
stakingList.value = res.data
}
</script>
<style scoped lang="scss">
main {
.bg {
width: 100%;
position: absolute;
height: 50vh;
top: 20vh;
z-index: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
width: 87.5rem;
padding: 7.25rem 1.25rem 5.63rem;
margin: 0 auto;
margin-top: 5.63rem;
min-height: calc(var(--vh) * 100 - 6.13rem - 5.63rem - 14.5rem - 5rem);
position: relative;
z-index: 10;
.title {
font-size: 3rem;
margin-bottom: 1rem;
color: #fff;
}
.label {
font-size: 1.25rem;
color: #6f7980;
}
.table {
width: 100%;
background: #1a1b1c;
// border: 0.06rem solid rgb(219, 225, 230);
border-radius: 0.75rem;
margin-top: 1.75rem;
position: relative;
z-index: 10;
.thead {
// border-bottom: 0.06rem solid rgb(219, 225, 230);
background: #0e0e0e;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 1rem 1.5rem;
gap: 0.75rem;
.th {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 0.88rem;
color: #fff;
&:nth-child(1) {
flex: 1;
justify-content: flex-start;
}
&:nth-child(2) {
width: 8.13rem;
}
&:nth-child(3) {
width: 8.13rem;
}
&:nth-child(4) {
width: 5rem;
}
&:nth-child(5) {
width: 14.38rem;
}
i {
color: #6f7980;
margin-left: 0.25rem;
}
}
}
.tbody {
.tr {
padding: 0.88rem 1.5rem;
display: flex;
gap: 0.75rem;
.td {
font-size: 1rem;
display: flex;
gap: 0.75rem;
align-items: center;
justify-content: flex-end;
color: #fff;
&:nth-child(1) {
flex: 1;
justify-content: flex-start;
}
&:nth-child(2) {
width: 8.13rem;
}
&:nth-child(3) {
width: 8.13rem;
color: #bff009;
}
&:nth-child(4) {
width: 5rem;
}
&:nth-child(5) {
width: 14.38rem;
}
.title {
font-size: 1rem;
display: flex;
align-items: center;
gap: 0.38rem;
margin: 0;
height: 1.5rem;
}
.symbol {
font-size: 0.81rem;
}
}
img {
width: 1.25rem;
height: 1.25rem;
}
.logo {
width: 1.75rem;
height: 1.75rem;
border-radius: 50%;
}
}
}
}
.table2 {
display: none;
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
main {
width: 100%;
padding: 1.25rem 0.75rem 5.63rem;
margin-top: 4rem;
.title {
font-size: 1.25rem;
margin-bottom: 0.63rem;
}
.label {
font-size: 0.88rem;
color: #6f7980;
}
.table {
display: none;
}
.table2 {
display: flex;
flex-direction: row;
padding: 0.75rem;
background: #1a1b1c;
// border: 0.06rem solid rgb(219, 225, 230);
border-radius: 0.75rem;
gap: 2.5rem;
margin-top: 1.56rem;
position: relative;
z-index: 10;
.tbody {
width: 100%;
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.tr {
width: 100%;
}
img {
width: 1.13rem;
height: 1.13rem;
}
.logo {
width: 1.75rem;
height: 1.75rem;
border-radius: 50%;
}
.head {
font-size: 1rem;
display: flex;
gap: 0.75rem;
align-items: center;
.title {
font-size: 0.88rem;
display: flex;
align-items: center;
gap: 0.38rem;
margin: 0;
height: 1.5rem;
}
.symbol {
font-size: 0.71rem;
color: #ffffff99;
}
}
.row {
margin-top: 0.25rem;
display: flex;
justify-content: space-between;
align-items: center;
height: 1.18rem;
.label {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.71rem;
color: #ccc;
}
.value {
font-size: 0.71rem;
color: #fff;
}
.blue {
color: #bff009;
}
}
}
}
}
</style>
<template>
<Header />
<main>
<div class="bg">
<img class="pc2" src="/static/image/index/pc_bg2.png" mode="widthFix" />
</div>
<div class="wrap">
<div class="title">출금하기</div>
<div class="card">
<div class="label">
<span>출금신청 금액</span>
<span>
<span>출금가능금액 </span>
<span class="price">{{ changeMoney2(userInfo.balance) }}</span>
</span>
</div>
<div class="number">
<div class="input_wrap">
<van-field v-model="money" type="digit" />
</div>
</div>
<div class="row">
<div class="block" @click="plus(10000)">10,000</div>
<div class="block" @click="plus(100000)">100,000</div>
<div class="block" @click="plus(1000000)">1,000,000</div>
<div class="block" @click="plus(10000000)">10,000,000</div>
</div>
<div class="row">
<div class="block" @click="plus(50000000)">50,000,000</div>
<div class="block" @click="plus(100000000)">100,000,000</div>
<div class="block" @click="plus(500000000)">500,000,000</div>
<div class="block" @click="plus(1000000000)">1,000,000,000</div>
</div>
</div>
<div class="button primary" @click="withdraw">출금신청</div>
<div class="button gray" @click="goPage('/pages/liushui/liushui')">신청내역</div>
</div>
</main>
<Footer />
</template>
<script lang="ts" setup>
import Header from '@/components/Header/Header.vue'
import Footer from '@/components/Footer/Footer.vue'
import { withdrawApi, getUserInfoApi } from '@/api/index'
import { ref } from 'vue'
import { changeMoney2, goPage } from '@/common/common'
import { onShow } from '@dcloudio/uni-app'
const money = ref(0)
const plus = (num: number) => {
money.value = Number(money.value) + num
}
const withdraw = async () => {
if (money.value === 0 || !money.value) {
alert('츨금 금액을 입력후 재신청 바랍니다.')
return
} else if (money.value < 10000) {
alert('출금 금액은 1만원 이상부터 가능합니다.')
return
}
const res = await withdrawApi({ money: money.value })
if (res.code === 200) {
alert('출금 신청 완료되었습니다.')
money.value = 0
}
}
onShow(() => {
getUserInfo()
})
const userInfo = ref({})
const getUserInfo = async () => {
const res = await getUserInfoApi()
userInfo.value = res.data
}
</script>
<style scoped lang="scss">
::v-deep .van-field {
padding: 0 !important;
background: transparent !important;
}
::v-deep .van-field__control {
color: #fff !important;
}
main {
position: relative;
z-index: 10;
.bg {
width: 100%;
position: absolute;
height: 50vh;
top: 20vh;
z-index: 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
}
.wrap {
width: 69.38rem;
margin: 0 auto;
min-height: calc(var(--vh) * 100 - 6.13rem - 14.4rem - 5rem - 2rem);
position: relative;
z-index: 10;
.title {
font-size: 1.5rem;
margin-bottom: 1.5rem;
margin-top: 2rem;
color: #fff;
}
.card {
background: #1b1c1a;
border-radius: 0.25rem;
padding: 0.63rem 0.63rem 1.56rem;
.label {
font-size: 0.88rem;
display: flex;
justify-content: space-between;
color: #fff;
.price {
color: #bff009;
}
}
.number {
line-height: 2.75rem;
color: #fff;
.input_wrap {
height: 2.5rem;
background: #0a150c;
margin-bottom: 1rem;
border-radius: 0.3rem;
border: 0.1rem solid #0a150c;
display: flex;
align-items: center;
padding: 0 0.75rem;
margin: 0.63rem 0;
width: 30%;
input {
height: 2.5rem;
line-height: 2.5rem;
font-size: 0.88rem;
flex: 1;
color: #fff;
}
}
}
.row {
display: flex;
gap: 0.38rem;
}
.block {
width: 25%;
display: inline-block;
margin-top: 0.69rem;
text-align: center;
background: #363c32;
height: 1.56rem;
line-height: 1.56rem;
cursor: pointer;
color: #fff;
}
}
.button {
height: 2.5rem;
line-height: 2.5rem;
text-align: center;
color: #fff;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.88rem;
}
.primary {
background: #bff009;
color: #1b1c1a;
margin-top: 0.63rem;
}
.gray {
background: #888;
margin-top: 0.63rem;
}
}
@media (max-width: 23.44rem), screen and (max-width: 26.88rem) {
main {
.wrap {
width: 100%;
padding: 0 0.94rem;
height: inherit !important;
margin-top: 4rem;
padding-top: 1.88rem;
}
.title {
margin-top: 0 !important;
font-size: 1.25rem !important;
}
.label {
font-size: 0.69rem !important;
}
.block {
font-size: 0.69rem !important;
}
.button {
height: 2rem !important;
line-height: 2rem !important;
}
}
}
</style>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="ic/ic_membership">
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M11.2694 2.41148C10.4871 1.95138 9.5169 1.95138 8.73461 2.41148L6.41033 3.77846L4.06435 5.10785C3.27475 5.55529 2.78965 6.3955 2.79696 7.30304L2.81866 9.99941L2.79696 12.6958C2.78965 13.6033 3.27475 14.4435 4.06435 14.891L6.41033 16.2204L8.73461 17.5874C9.5169 18.0474 10.4871 18.0474 11.2694 17.5874L13.5937 16.2204L15.9397 14.891C16.7292 14.4435 17.2143 13.6033 17.207 12.6958L17.1853 9.99941L17.207 7.30304C17.2143 6.39551 16.7292 5.55529 15.9397 5.10785L13.5937 3.77846L11.2694 2.41148ZM6.21586 8.48534L6.57703 8.41374C6.63212 8.41374 6.67293 8.43363 6.69945 8.47341C6.72598 8.51319 6.73924 8.59276 6.73924 8.7121C6.73924 8.83145 6.6617 9.07511 6.50663 9.4431C6.3536 9.81108 6.18322 10.2099 5.9955 10.6395C5.80981 11.0672 5.69963 11.3546 5.66494 11.5018C5.63025 11.649 5.61291 11.7624 5.61291 11.842C5.61291 11.9195 5.62413 11.9772 5.64658 12.015C5.69555 12.0906 5.83328 12.1284 6.05977 12.1284L7.19528 12.1105C7.27078 12.1105 7.34322 12.0926 7.41259 12.0568C7.48197 12.021 7.51666 11.9722 7.51666 11.9106L7.50747 11.7137C7.50747 11.5287 7.57685 11.2512 7.7156 10.8812C7.85639 10.5112 8.02065 10.1015 8.20837 9.65195C8.39813 9.20043 8.5277 8.84637 8.59708 8.58977C8.91131 8.41871 9.18065 8.33318 9.4051 8.33318C9.62955 8.33318 9.74178 8.42368 9.74178 8.60469C9.74178 8.76183 9.58874 9.15965 9.28267 9.79815C9.16025 10.0508 9.03068 10.3481 8.89397 10.6903C8.7593 11.0304 8.6685 11.2959 8.62157 11.4869C8.57463 11.6778 8.55117 11.8061 8.55117 11.8718C8.55117 11.9374 8.56239 11.9872 8.58484 12.021C8.63381 12.0926 8.76746 12.1284 8.98579 12.1284L10.2284 12.1105C10.2815 12.1105 10.3243 12.0886 10.357 12.0448C10.3917 12.0011 10.411 11.9464 10.4151 11.8807C10.4274 11.654 10.4825 11.3835 10.5804 11.0692C10.6783 10.7529 10.8416 10.3302 11.0701 9.80113C11.2986 9.27004 11.4527 8.85333 11.5323 8.55098C11.8179 8.40777 12.0536 8.33616 12.2393 8.33616C12.3454 8.33616 12.4229 8.36202 12.4719 8.41374C12.5229 8.46545 12.5484 8.53308 12.5484 8.61663C12.5484 8.84338 12.3862 9.29391 12.0618 9.96822C11.9394 10.2208 11.8271 10.4953 11.7251 10.7917C11.6231 11.0861 11.5721 11.3317 11.5721 11.5287C11.5721 11.9722 11.8781 12.194 12.4903 12.194C12.9514 12.194 13.3391 12.1413 13.6533 12.0359C13.9696 11.9305 14.1277 11.8071 14.1277 11.6659C14.1277 11.6082 14.0951 11.5675 14.0298 11.5436C13.9951 11.5297 13.9635 11.5197 13.9349 11.5137C13.9084 11.5058 13.8502 11.4949 13.7605 11.4809C13.6707 11.465 13.585 11.4193 13.5034 11.3437C13.4217 11.2661 13.3809 11.1607 13.3809 11.0274C13.3809 10.8186 13.5483 10.3929 13.8829 9.75041C14.0074 9.51172 14.1216 9.2412 14.2257 8.93886C14.3318 8.63652 14.3848 8.36898 14.3848 8.13626C14.3848 7.90154 14.2981 7.71556 14.1247 7.57832C13.9512 7.43908 13.7135 7.36946 13.4115 7.36946C12.879 7.36946 12.275 7.62605 11.5996 8.13924V8.11239C11.5996 7.87569 11.5241 7.69269 11.3731 7.5634C11.2221 7.43411 11.0007 7.36946 10.709 7.36946C10.0887 7.36946 9.40816 7.65987 8.66748 8.24068C8.67564 8.16908 8.67972 8.11836 8.67972 8.08852C8.67972 7.85579 8.63279 7.68871 8.53893 7.58727C8.44507 7.48383 8.26959 7.43212 8.01249 7.43212C7.75743 7.43212 7.4636 7.49477 7.13101 7.62009C6.79842 7.74341 6.5403 7.88364 6.35666 8.04078C6.17301 8.19593 6.08119 8.30931 6.08119 8.38092C6.08119 8.42667 6.09242 8.45551 6.11486 8.46744C6.13731 8.47938 6.17097 8.48534 6.21586 8.48534Z" fill="#2CC7FB"/>
</g>
</svg>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="ic/ic_membership">
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M11.2694 2.41148C10.4871 1.95138 9.5169 1.95138 8.73461 2.41148L6.41033 3.77846L4.06435 5.10785C3.27475 5.55529 2.78965 6.3955 2.79696 7.30304L2.81866 9.99941L2.79696 12.6958C2.78965 13.6033 3.27475 14.4435 4.06435 14.891L6.41033 16.2204L8.73461 17.5874C9.5169 18.0474 10.4871 18.0474 11.2694 17.5874L13.5937 16.2204L15.9397 14.891C16.7292 14.4435 17.2143 13.6033 17.207 12.6958L17.1853 9.99941L17.207 7.30304C17.2143 6.39551 16.7292 5.55529 15.9397 5.10785L13.5937 3.77846L11.2694 2.41148ZM6.21586 8.48534L6.57703 8.41374C6.63212 8.41374 6.67293 8.43363 6.69945 8.47341C6.72598 8.51319 6.73924 8.59276 6.73924 8.7121C6.73924 8.83145 6.6617 9.07511 6.50663 9.4431C6.3536 9.81108 6.18322 10.2099 5.9955 10.6395C5.80981 11.0672 5.69963 11.3546 5.66494 11.5018C5.63025 11.649 5.61291 11.7624 5.61291 11.842C5.61291 11.9195 5.62413 11.9772 5.64658 12.015C5.69555 12.0906 5.83328 12.1284 6.05977 12.1284L7.19528 12.1105C7.27078 12.1105 7.34322 12.0926 7.41259 12.0568C7.48197 12.021 7.51666 11.9722 7.51666 11.9106L7.50747 11.7137C7.50747 11.5287 7.57685 11.2512 7.7156 10.8812C7.85639 10.5112 8.02065 10.1015 8.20837 9.65195C8.39813 9.20043 8.5277 8.84637 8.59708 8.58977C8.91131 8.41871 9.18065 8.33318 9.4051 8.33318C9.62955 8.33318 9.74178 8.42368 9.74178 8.60469C9.74178 8.76183 9.58874 9.15965 9.28267 9.79815C9.16025 10.0508 9.03068 10.3481 8.89397 10.6903C8.7593 11.0304 8.6685 11.2959 8.62157 11.4869C8.57463 11.6778 8.55117 11.8061 8.55117 11.8718C8.55117 11.9374 8.56239 11.9872 8.58484 12.021C8.63381 12.0926 8.76746 12.1284 8.98579 12.1284L10.2284 12.1105C10.2815 12.1105 10.3243 12.0886 10.357 12.0448C10.3917 12.0011 10.411 11.9464 10.4151 11.8807C10.4274 11.654 10.4825 11.3835 10.5804 11.0692C10.6783 10.7529 10.8416 10.3302 11.0701 9.80113C11.2986 9.27004 11.4527 8.85333 11.5323 8.55098C11.8179 8.40777 12.0536 8.33616 12.2393 8.33616C12.3454 8.33616 12.4229 8.36202 12.4719 8.41374C12.5229 8.46545 12.5484 8.53308 12.5484 8.61663C12.5484 8.84338 12.3862 9.29391 12.0618 9.96822C11.9394 10.2208 11.8271 10.4953 11.7251 10.7917C11.6231 11.0861 11.5721 11.3317 11.5721 11.5287C11.5721 11.9722 11.8781 12.194 12.4903 12.194C12.9514 12.194 13.3391 12.1413 13.6533 12.0359C13.9696 11.9305 14.1277 11.8071 14.1277 11.6659C14.1277 11.6082 14.0951 11.5675 14.0298 11.5436C13.9951 11.5297 13.9635 11.5197 13.9349 11.5137C13.9084 11.5058 13.8502 11.4949 13.7605 11.4809C13.6707 11.465 13.585 11.4193 13.5034 11.3437C13.4217 11.2661 13.3809 11.1607 13.3809 11.0274C13.3809 10.8186 13.5483 10.3929 13.8829 9.75041C14.0074 9.51172 14.1216 9.2412 14.2257 8.93886C14.3318 8.63652 14.3848 8.36898 14.3848 8.13626C14.3848 7.90154 14.2981 7.71556 14.1247 7.57832C13.9512 7.43908 13.7135 7.36946 13.4115 7.36946C12.879 7.36946 12.275 7.62605 11.5996 8.13924V8.11239C11.5996 7.87569 11.5241 7.69269 11.3731 7.5634C11.2221 7.43411 11.0007 7.36946 10.709 7.36946C10.0887 7.36946 9.40816 7.65987 8.66748 8.24068C8.67564 8.16908 8.67972 8.11836 8.67972 8.08852C8.67972 7.85579 8.63279 7.68871 8.53893 7.58727C8.44507 7.48383 8.26959 7.43212 8.01249 7.43212C7.75743 7.43212 7.4636 7.49477 7.13101 7.62009C6.79842 7.74341 6.5403 7.88364 6.35666 8.04078C6.17301 8.19593 6.08119 8.30931 6.08119 8.38092C6.08119 8.42667 6.09242 8.45551 6.11486 8.46744C6.13731 8.47938 6.17097 8.48534 6.21586 8.48534Z" fill="#2CC7FB"/>
</g>
</svg>
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.3456 5.88939C21.3297 5.83095 21.3297 5.77252 21.3031 5.71408L20.7586 4.54533C20.2034 3.35798 19.218 2.45486 17.9775 2.0033C16.7397 1.55439 15.4036 1.61017 14.2136 2.16267L7.62344 5.23861C7.37375 5.35548 7.19844 5.56267 7.11344 5.80173H6.70704C3.99235 5.80173 1.78235 8.01173 1.78235 10.7264V20.5731C1.78235 23.2878 3.99235 25.4978 6.70704 25.4978H20.493C23.2077 25.4978 25.4177 23.2878 25.4177 20.5731V10.7238C25.415 8.30392 23.6539 6.2958 21.3456 5.88939ZM15.0477 3.95033C15.7595 3.6183 16.5591 3.58642 17.3055 3.85736C18.0492 4.1283 18.6416 4.67017 18.9736 5.37939L19.1702 5.80173H11.0766L15.0477 3.95033ZM23.4467 18.6049H19.1967C17.5684 18.6049 16.243 17.2794 16.243 15.6511C16.243 14.0228 17.5684 12.6974 19.1967 12.6974H23.4467V18.6049ZM19.1967 10.7264C16.482 10.7264 14.272 12.9364 14.272 15.6511C14.272 18.3658 16.482 20.5758 19.1967 20.5758H23.4467C23.4467 22.2041 22.1213 23.5295 20.493 23.5295H6.70704C5.07875 23.5295 3.75329 22.2041 3.75329 20.5758V10.7264C3.75329 9.09814 5.07875 7.77267 6.70704 7.77267H20.493C22.1213 7.77267 23.4467 9.09814 23.4467 10.7264H19.1967Z" fill="#888888"/>
<path d="M17.4569 15.6499C17.4569 16.1719 17.6643 16.6726 18.0334 17.0417C18.4025 17.4108 18.9032 17.6182 19.4252 17.6182C19.9472 17.6182 20.4479 17.4108 20.817 17.0417C21.1861 16.6726 21.3935 16.1719 21.3935 15.6499C21.3935 15.1279 21.1861 14.6273 20.817 14.2581C20.4479 13.889 19.9472 13.6816 19.4252 13.6816C18.9032 13.6816 18.4025 13.889 18.0334 14.2581C17.6643 14.6273 17.4569 15.1279 17.4569 15.6499Z" fill="#888888"/>
</svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_25_319)">
<circle cx="256" cy="256" r="256" fill="#1F1F1F"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M266.666 199.11H344.888V389.344H291.555V375.122C273.777 391.11 251.022 395.389 216.888 391.122C174.222 385.789 149.333 341.333 151.111 296.9C152.888 252.467 174.222 222.222 206.222 209.777C200.888 202.666 193.777 176 202.666 152.889C211.555 128 240 110.222 256 110.232C273.777 110.225 296.888 110.229 307.555 110.232V163.555C307.555 163.555 273.777 163.555 266.666 163.555C259.555 165.333 248.888 168.888 248.888 181.333C248.888 193.777 261.333 199.11 266.666 199.11ZM241.777 248.889H295.11V305.778C295.11 320 282.666 344.889 248.888 344.889C215.11 344.889 199.11 320 199.11 298.666C199.11 277.333 216.888 248.889 241.777 248.889Z" fill="#BFF009"/>
</g>
<defs>
<clipPath id="clip0_25_319">
<rect width="512" height="512" fill="white"/>
</clipPath>
</defs>
</svg>
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
state: () => {
return {
token: null,
tabbarHeight: 0,
pageHeight: 0
}
},
actions: {
async getUserInfo() {
// 调用获取个人信息接口 来判断是否需要跳转登录页
this.token = uni.getStorageSync('token')
},
getSystemInfo() {
this.tabbarHeight = 'calc(var(--vh) * 100 - 4.38rem)'
this.pageHeight = 'calc(var(--vh) * 100 - 3.06rem)'
}
}
})
import { defineStore } from 'pinia'
import { userInfoType } from './storeType'
// import { ref } from 'vue'
interface userState {
token: null | string
userInfo: null | userInfoType
}
export const useCounterStore = defineStore('counter', {
state: (): userState => ({
token: null,
userInfo: null
})
})
export interface userInfoType {
birthday: any
avatar: string
bio: string
change_mini_price: string
createtime: number
email: string
gender: number
group_id: number
id: number
is_auth: number
joinip: string
jointime: number
level: number
loginfailure: number
loginip: string
logintime: number
maxsuccessions: number
mobile: string
money: string | number
nickname: string
password: string
prevtime: string | number
salt: string
score: number
shizhi: string
status: string
successions: number
sxf: string
sxfzdi: string
token: string
total: string
true_name: string
updatetime: number
username: string
verification: string
}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$color-primary: #F25133;
/* 文字基本颜色 */
$text-color:#121312;
$text-color-primary:#F25133;
$text-color-black:#121312;
$text-color-gray:#B7BBBF;
$text-color-gray2:#8F8F8F;
$text-color-blue:#0E85FE;
$text-color-red:#FF5677;
$text-color-green:#8DFD97;
$text-color-green2:#00ECC2;
$text-color-white:#fff;
$text-color-white80:#ffffff80;
$text-color-white50:#ffffff50;
$text-color-white30:#ffffff30;
$text-color-yellow:#CDA159;
$text-color-yellow2:#674B20;
/* 背景颜色 */
$bg-color:#18191b;
$card-color:#22242b;
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$text-size-40: 1.25rem;
$text-size-38: 1.19rem;
$text-size-36: 1.13rem;
$text-size-34: 1.06rem;
$text-size-32: 1.00rem;
$text-size-30: 0.94rem;
$text-size-28: 0.88rem;
$text-size-26: 0.81rem;
$text-size-24: 0.75rem;
$text-size-22: 0.69rem;
$text-size-20: 0.63rem;
/* 图片尺寸 */
$uni-img-size-sm:40rpx;
$uni-img-size-base:52rpx;
$uni-img-size-lg:80rpx;
/* Border Radius */
$uni-border-radius-sm: 4rpx;
$uni-border-radius-base: 6rpx;
$uni-border-radius-lg: 12rpx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 0.31rem;
$uni-spacing-row-base: 20rpx;
$uni-spacing-row-lg: 30rpx;
/* 垂直间距 */
$uni-spacing-col-sm: 8rpx;
$uni-spacing-col-base: 16rpx;
$uni-spacing-col-lg: 24rpx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40rpx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30rpx;
// eslint-disable-next-line camelcase
const baseURL = 'https://api.kaiawellet.com/api'
const priceUrl = 'https://api.bithumb.com/public/ticker'
export default {
/* 服务器地址 */
baseURL,
priceUrl
}
import axios from 'axios'
// 创建axios实例
const service = axios.create({
timeout: 20000 // 请求超时时间
})
// 请求拦截器
service.interceptors.request.use(
(config) => {
// 可以在这里添加请求头等信息
const token = localStorage.getItem('token')
config.headers.Authorization = `Bearer ${token}`
return config
},
(error) => {
// 请求错误处理
console.log(error) // for debug
Promise.reject(error)
}
)
// 响应拦截器
service.interceptors.response.use(
(response) => {
// 对响应数据做处理,例如只返回data部分
const res = response.data
// 根据业务判断是否需要进行错误处理
if (res.code !== 200 && res.status !== '0000' && res.status !== 999) {
window.alert(res.msg)
return res
}
return res
},
(error) => {
const res = error.response.data
const status = error.response.status
// token 过期处理
if (res.code === 401 || status === 401) {
// 清除token 以及用户信息
uni.setStorageSync('token', null)
setTimeout(() => {
// 跳转登录
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
return Promise.reject(error)
}
return Promise.reject(error)
}
)
export default service
{
"compilerOptions": {
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["@dcloudio/types"],
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
}
},
"include": ["src/**/*.ts", "src/**/*.js", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import { resolve } from 'path'
import eslintPlugin from 'vite-plugin-eslint'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
uni(),
eslintPlugin({
cache: false
})
],
server: {
host: '0.0.0.0',
port: 8080, // 端口号
open: false, // 启动后是否自动打开浏览器 server: {
proxy: {
'^/api': {
target: 'http://43.132.115.215:8580/', // 目标源,目标服务器,真实请求地址
changeOrigin: true, // 支持跨域
rewrite: (path) => path.replace(/^\/api/, '/api') // 重写真实路径,替换/api
}
}
},
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment