Commit 3d00a528 by lanse

init

parents
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="jp" translate="no">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<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>Squarepoint</title>
<!--preload-links-->
<!--app-context-->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
<meta name="format-detection" content="telephone=no, email=no" />
<meta name="renderer" content="webkit" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="HandheldFriendly" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-orientation" content="portrait" />
<meta name="full-screen" content="yes" />
<meta name="x5-fullscreen" content="true" />
<meta name="browsermode" content="application" />
<meta name="x5-page-mode" content="app" />
<meta name="msapplication-navbutton-color" content="#fff" />
<meta name="msapplication-TileColor" content="#fff" />
<meta name="theme-color" content="#fff" />
<meta name="apple-mobile-web-app-title" content="Squarepoint" />
<meta name="google" content="notranslate" />
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="./src/static/icon.png" />
<!-- Android Chrome Icons -->
<link rel="icon" type="image/png" sizes="192x192" href="./src/static/icon.png" />
<link rel="icon" type="image/png" sizes="512x512" href="./src/static/icon.png" />
<!-- Windows Tiles -->
<meta name="msapplication-TileImage" content="./src/static/icon.png" />
<meta name="msapplication-TileColor" content="#ffffff" />
<!-- General Icons -->
<link rel="icon" type="image/png" sizes="32x32" href="./src/static/icon.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./src/static/icon.png" />
<link rel="icon" type="image/x-icon" href="./src/static/icon.png" />
<link rel="icon" href="./src/static/icon.png" />
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
{
"name": "japan",
"version": "0.0.0",
"license": "MIT",
"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",
"@vitejs/plugin-vue": "2.3.3",
"animate.css": "^4.1.1",
"axios": "^1.7.4",
"echarts": "^5.5.1",
"klinecharts": "^9.8.10",
"pinia": "^2.0.12",
"vant": "^4.9.4",
"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": "13",
"tailwindcss": "^3.4.10",
"typescript": "^4.6.2",
"vite": "^5.4.10",
"vite-plugin-eslint": "^1.3.0"
},
"main": "index.js",
"repository": "http://27.124.4.157:9070/root/japan.git",
"author": "ran <gz@gz.com>"
}
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
'postcss-px-to-viewport-8-plugin': {
unitToConvert: 'px', // 要转化的单位
viewportWidth: 1920, // UI设计稿的宽度
unitPrecision: 6, // 转换后的精度,即小数点位数
propList: ['*'], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换
viewportUnit: 'vw', // 指定需要转换成的视窗单位,默认vw
fontViewportUnit: 'vw', // 指定字体需要转换成的视窗单位,默认vw
selectorBlackList: ['ignore-'], // 指定不转换为视窗单位的类名,
minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换
mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false
replace: true, // 是否转换后直接更换属性值
// exclude: [/node_modules/], // 设置忽略文件,用正则做目录名匹配
exclude: [],
landscape: false // 是否处理横屏情况
}
}
}
<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { useCounterStore } from '@/store/store'
import { useRouter } from 'vue-router'
const store = useCounterStore()
// store.getSystemInfo()
// store.getUserInfo()
onLaunch(() => {
store.token = uni.getStorageSync('token') || null
store.userId = uni.getStorageSync('userId') || null
store.userInfo = uni.getStorageSync('userInfo') || null
// show()
const router = useRouter()
router.beforeEach((to, from, next) => {
hide(next)
})
router.afterEach(() => {
setTimeout(() => show(), 10)
})
})
onShow(() => {})
onHide(() => {})
const hide = (callback) => {
const classList = document.querySelector('uni-page').classList
classList.add('animation-before', 'animation-leave')
classList.remove('animation-show')
setTimeout(() => {
classList.remove('animation-before', 'animation-leave')
callback && callback()
}, 300)
}
const show = () => {
const classList = document.querySelector('uni-page')?.classList
classList.add('animation-before')
setTimeout(() => {
classList.add('animation-enter', 'animation-after', 'animation-show')
setTimeout(() => {
classList.remove('animation-before', 'animation-after', 'animation-enter')
}, 300)
}, 20)
}
</script>
<style lang="scss">
.uni-input-input {
color: #fff;
}
.tabbar {
border-radius: 0.625rem 0.625rem 0px 0px;
// box-shadow: 0px 0px 5px 2px #f4f4f4;
}
body {
background: linear-gradient(168deg, #08182b 0.74%, #1b5191 99.61%);
// fill: linear-gradient(191deg, #f3e0eb 0.38%, #f2e7fd 10.66%, #fff 26.2%);
}
::v-deep .uni-toast__icon {
margin: 0.625rem auto 0 !important;
}
.uni-modal {
padding: 0 1.25rem 1.25rem 1.25rem;
border-radius: 0.625rem;
.uni-modal__ft:after {
display: none;
}
.uni-modal__btn:after {
display: none;
}
.uni-modal__btn_default {
width: 8.4375rem;
height: 3.0625rem;
border-radius: 1.5625rem;
background: #efefff;
color: #6a69e9 !important;
font-size: 1rem;
margin-right: 0.625rem;
}
.uni-modal__btn_primary {
width: 8.4375rem;
height: 3.0625rem;
border-radius: 1.5625rem;
background: #6a69e9;
font-size: 1rem;
color: #fff !important;
}
}
.up {
color: $uni-text-color-red;
}
.down {
color: $uni-text-color-green;
}
.ping {
color: $uni-text-color;
}
.rotate {
transform: rotate(180deg);
}
.nodata {
font-size: $uni-font-size-lg;
text-align: center;
margin-top: 25.6px;
}
uni-tabbar {
display: none;
}
/* #ifdef H5 */
uni-page {
opacity: 1;
transition: all 0.3s ease;
}
uni-page.animation-before {
/* 在页面上使用 transform 会导致页面内的 fixed 定位渲染为 absolute,需要在动画完成后移除 */
transform: translateY(0.625rem);
opacity: 0;
}
uni-page.animation-leave {
transition: all 0.3s ease;
}
uni-page.animation-enter {
transition: all 0.3s ease;
}
uni-page.animation-show {
opacity: 1;
}
uni-page.animation-after {
/* 在页面上使用 transform 会导致页面内的 fixed 定位渲染为 absolute,需要在动画完成后移除 */
transform: translateY(0);
}
/* #endif */
</style>
export interface BankInfoType {
bank_address: string
bank_card: string
bank_code: string
bank_name: string
shiming_name: string
}
import request from '@/utils/http'
import config from '@/utils/config'
import { BankInfoType } from './indexType'
// 获取银行卡列表
export function getBankListApi() {
return request({
url: `${config.baseURL}/index/withdrawal`,
method: 'get'
})
}
// 添加银行卡
export function addBankApi(data: BankInfoType) {
return request({
url: `${config.baseURL}/index/setUserInfo`,
method: 'post',
data
})
}
// 添加银行卡
export function delBankApi(id: number | string) {
return request({
url: `${config.baseURL}/index/bankcardDelete`,
method: 'get',
params: {
id
}
})
}
import request from '@/utils/http'
import config from '@/utils/config'
import { ChangePasswordParameterType } from './type'
// 修改登录密码
export function updatePasswordApi(data: ChangePasswordParameterType) {
return request({
url: `${config.baseURL}/user/updatePassword`,
method: 'post',
data
})
}
export interface ChangePasswordParameterType {
old_password: string
new_Password: string
repeat_new_password: string
}
import request from '@/utils/http'
import config from '@/utils/config'
import { getTickerKType, idType, buyGupiaoType, getJiaoyiDetailType, shengouType, buyDadanType, buyHongliType, buyGendanType, sellGendanType, rongziType } from './indexType'
// 热门股票
export function getXinguApplyApi() {
return request({
url: `${config.baseURL}/jiaoyi_list/xinguApply`,
method: 'get'
})
}
// 热门股票
export function getHotGupiaoApi() {
return request({
url: `${config.baseURL}/index/popular_product`,
method: 'get'
})
}
export function check_token() {
return request({
url: `${config.baseURL}/index/check_token`,
method: 'get'
})
}
// 股票K线
export function getTickerKApi(params: getTickerKType) {
return request({
url: `${config.baseURL}/product/getTickerK`,
method: 'get',
params
})
}
// 股票详情
export function getGupiaoDetailApi(params: idType) {
return request({
url: `${config.baseURL}/product/getGupiaoDetail`,
method: 'get',
params
})
}
// 收藏股票
export function collectApi(data: idType) {
return request({
url: `${config.baseURL}/index/addZixuan`,
method: 'post',
data
})
}
// 收藏股票详情
export function collectDetailApi(params: idType) {
return request({
url: `${config.baseURL}/index/isZixuan`,
method: 'get',
params
})
}
// 获取手续费
export function getUserMoneyApi() {
return request({
url: `${config.baseURL}/user/getUserMoney`,
method: 'post'
})
}
// 收藏股票
export function buyGupiaoApi(data: buyGupiaoType) {
return request({
url: `${config.baseURL}/index/buyGupiao`,
method: 'post',
data
})
}
// 交易列表
export function getJiaoyiListApi() {
return request({
url: `${config.baseURL}/jiaoyi_list/getList`,
method: 'get'
})
}
// 交易详情
export function getJiaoyiDetailApi(params: getJiaoyiDetailType) {
return request({
url: `${config.baseURL}/index/getOrderDetail`,
method: 'get',
params
})
}
// 賣出股票
export function sellGupiaoApi(data: getJiaoyiDetailType) {
return request({
url: `${config.baseURL}/index/PingCang`,
method: 'post',
data
})
}
// 撤单
export function cancelOrdeApi(data: getJiaoyiDetailType) {
return request({
url: `${config.baseURL}/index/cancel_order`,
method: 'post',
data
})
}
// 新股列表
export function getXinguListApi() {
return request({
url: `${config.baseURL}/index/getXingu`,
method: 'get'
})
}
// 申购股票
export function shengouApi(data: shengouType) {
return request({
url: `${config.baseURL}/index/shengouXingu`,
method: 'post',
data
})
}
// 大單監控
export function getDadanListApi() {
return request({
url: `${config.baseURL}/index/monitoring_list`,
method: 'get'
})
}
// 大單監控
export function getUserMonitoringApi() {
return request({
url: `${config.baseURL}/index/user_monitoring`,
method: 'get'
})
}
// 購買大單
export function buyDadanApi(data: buyDadanType) {
return request({
url: `${config.baseURL}/index/buy_monitoring`,
method: 'post',
data
})
}
// 紅利股票
export function getHongliListApi() {
return request({
url: `${config.baseURL}/index/get_discount_gupiao`,
method: 'get'
})
}
// 購買红利
export function buyHongliApi(data: buyHongliType) {
return request({
url: `${config.baseURL}/index/add_discount_gupiao`,
method: 'post',
data
})
}
// 智慧跟单
export function getGendanListApi() {
return request({
url: `${config.baseURL}/index/follow_list`,
method: 'get'
})
}
// 購買跟單
export function buyGendanApi(data: buyGendanType) {
return request({
url: `${config.baseURL}/index/follow_order`,
method: 'post',
data
})
}
// 智慧跟单記錄
export function getGendanRecordListApi() {
return request({
url: `${config.baseURL}/index/user_follow_record`,
method: 'get'
})
}
// 賣出跟單
export function sellGendanApi(data: sellGendanType) {
return request({
url: `${config.baseURL}/index/sell_follow_record`,
method: 'post',
data
})
}
// 融资状态
export function getRongziApi() {
return request({
url: `${config.baseURL}/index/applicationStatus`,
method: 'get'
})
}
// 申请融资
export function rongziApi(data: rongziType) {
return request({
url: `${config.baseURL}/index/saveCA`,
// url: `${config.baseURL}/CreditApplication/saveCA`,
method: 'post',
data
})
}
export interface getGupiaoType {
code: string
}
export interface getTickerKType {
id: number
kline_type: number
}
export interface idType {
id: string
}
export interface buyGupiaoType {
buytype: number
fangxiang: string
price: number
pro_id: number
shuliang: number
ganggan_ratio: number
}
export interface getJiaoyiDetailType {
id: string
type: string
}
export interface shengouType {
id: string
number: number
price: string
}
export interface buyDadanType {
monitoring_id: string
num: number
}
export interface buyHongliType {
dividend_id: number
num: number
}
export interface buyGendanType {
follow_id: number
money: number
}
export interface sellGendanType {
follow_id: number
}
export interface rongziType {
money: any
name: any
card: any
address: any
phone: any
mail: any
income: any
credit: any
qualifications: any
}
import request from '@/utils/http'
import config from '@/utils/config'
import { loginType, registerType, sendSmsType } from './loginType'
// 登录
export function loginApi(data: loginType) {
return request({
url: `${config.baseURL}/user/login`,
method: 'post',
data
})
}
// 注册
export function registerApi(data: registerType) {
return request({
url: `${config.baseURL}/user/register`,
method: 'post',
data
})
}
// 验证码
export function sendSmsApi(data: sendSmsType) {
return request({
url: `${config.baseURL}/sms/send`,
method: 'post',
data
})
}
export interface loginType {
account: string
password: string
}
export interface registerType {
account: string
password: string
verfiy_code: string
}
export interface sendSmsType {
mobile: string
event: string
}
import request from '@/utils/http'
import config from '@/utils/config'
import { getGupiaoListType } from './marketType'
// 股票列表
export function getGupiaoListApi(params: getGupiaoListType) {
return request({
url: `${config.baseURL}/product/get_stock_list`,
method: 'get',
params
})
}
// 获取收藏股票列表
export function getZixuanlApi() {
return request({
url: `${config.baseURL}/index/getZixuan`,
method: 'get'
})
}
export interface idType {
id: string
}
export interface getGupiaoListType {
page: number
}
import request from '@/utils/http'
import config from '@/utils/config'
// import { userInfoParameterType } from './indexType'
export function getUserMessageApi() {
return request({
url: `${config.baseURL}/index/get_user_message`,
method: 'get'
})
}
export function getUserMessageDetailApi() {
return request({
url: `${config.baseURL}/index/get_user_message_detail`,
method: 'get'
})
}
import request from '@/utils/http'
import config from '@/utils/config'
import { paramsType } from './indexType'
// 获取用户实名状态
export function getOrderDetailApi(params: paramsType) {
return request({
url: `${config.baseURL}/index/getOrderDetail`,
method: 'get',
params
})
}
export interface paramsType {
id: number | string
type: number | string
}
import request from '@/utils/http'
import config from '@/utils/config'
import { RealNameType } from './indexType'
// 获取用户实名状态
export function getRealnameApi() {
return request({
url: `${config.baseURL}/user/getRealname`,
method: 'get'
})
}
export function subRealnameApi(data: RealNameType) {
return request({
url: `${config.baseURL}/user/subRealname`,
method: 'post',
data
})
}
export interface RealNameType {
true_name: string
id_card: string
id_card_img_1: string
id_card_img_2: string
status_msg?: string
status: string | number
}
import request from '@/utils/http'
import config from '@/utils/config'
import { paramsType } from './recordType'
// 获取新闻列表
export function getNewsApi(params: paramsType) {
return request({
url: `${config.baseURL}/index/getNews`,
method: 'get',
params
})
}
// 获取新闻详情
export function getNewDetailApi(id: number | string) {
return request({
url: `${config.baseURL}/index/newsDetail`,
method: 'get',
params: { id }
})
}
export interface recordType {
account: string
password: string
}
export interface paramsType {
page: number
}
export interface newDetailType {
content: string
createtime: number | string
id: number | string
image: string
other_id: number
title: string
updatetime: number
}
import request from '@/utils/http'
import config from '@/utils/config'
import { SearchParameterType } from './indexType'
export function searchStock(data: SearchParameterType) {
return request({
url: `${config.baseURL}/index/Search`,
method: 'post',
data
})
}
export interface SearchParameterType {
code: string | number
}
export interface StockType {
name: string
id: number
price: number | string
shuzidaima: number | string
zhangdiebaifenbi: number | string
zhangdieshu: number | string
}
import request from '@/utils/http'
import config from '@/utils/config'
import { LiuShuiType } from './indexType'
export function getLiuShuiApi(params: LiuShuiType) {
return request({
url: `${config.baseURL}/index/getLiuShui`,
method: 'get',
params
})
}
export interface LiuShuiType {
type: number
page: number
}
export interface JyType {
detailed: string
createtime: string
agent_id: number
id: number
money: number | string
order_sn: string
product_name: string
status: number | string
updatetime: string | null
user_id: number
name: string
gpCode: string | number
gpName: string
}
export interface CzType {
beizhu: ?string
createtime: string
id: number
money: number | string
order_sn: string
remark: string
status: number | string
type: string | number
}
import request from '@/utils/http'
import config from '@/utils/config'
import { PayPasswordType } from './indexType'
export function setPayPasswordApi(data: PayPasswordType) {
return request({
url: `${config.baseURL}/index/setPayPassword`,
method: 'post',
data
})
}
export interface PayPasswordType {
new_pay_password: string
old_pay_password: string
re_pay_password: string
user_id: number
}
import request from '@/utils/http'
import config from '@/utils/config'
import { userInfoParameterType } from './indexType'
export function getUserInfoApi(params: userInfoParameterType) {
return request({
url: `${config.baseURL}/index/getUserInfo`,
method: 'get',
params
})
}
// 获取客服地址
export function getCzhiurlApi() {
return request({
url: `${config.baseURL}/index/getCzhiurl`,
method: 'get'
})
}
// 获取客服地址
export function getWithdrawal(user_id: number | null) {
return request({
url: `${config.baseURL}/index/withdrawal`,
method: 'get',
params: {
user_id
}
})
}
export interface userInfoParameterType {
user_id: number | string
}
import request from '@/utils/http'
import config from '@/utils/config'
import { WithdrawalType } from './indexType'
export function submitWithdrawalApi(data: WithdrawalType) {
return request({
url: `${config.baseURL}/index/submitWithdrawal`,
method: 'post',
data
})
}
export interface WithdrawalType {
bankcard_id: number | string
money: number | string
pass: number | string
user_id: number | string
}
// 前往下一个页面
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 = (timestamp: number, n: string = '-') => {
const date = new Date(timestamp + 3600000 * 9)
const year = date.getUTCFullYear()
const month = date.getUTCMonth() - 1 < 10 ? `0${date.getUTCMonth() - 1}` : date.getUTCMonth() - 1
const day = date.getUTCDate() < 10 ? `0${date.getUTCDate()}` : date.getUTCDate()
const hour = date.getUTCHours() < 10 ? `0${date.getUTCHours()}` : date.getUTCHours()
const minute = date.getUTCMinutes() < 10 ? `0${date.getUTCMinutes()}` : date.getUTCMinutes()
return `${year}${n}${month}${n}${day} ${hour}:${minute}`
}
export function timestampToDate2(timestamp: number) {
const date = new Date(timestamp + 3600000 * 9)
const year = date.getUTCFullYear() // 获取年份
let month = date.getUTCMonth() + 1 // 获取月份,需要+1因为月份从0开始
let day = date.getUTCDate() // 获取日
let hours = date.getUTCHours() // 获取小时
let minutes = date.getUTCMinutes() // 获取分钟
let seconds = date.getUTCSeconds() // 获取秒钟
// 格式化月份、日期、小时、分钟和秒
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'
}
return item.zhangdiebaifenbi > 0 ? 'up' : item.zhangdiebaifenbi === 0 ? 'ping' : 'down'
}
// 验证输入框内容是否为空
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) => {
money = Number(money).toFixed(1)
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
let id = null
function sendSocketMessage(msg: Object) {
if (socketOpen) {
uni.sendSocketMessage({
data: JSON.stringify(msg),
success(res) {
console.log('发送成功:', res, JSON.stringify(msg))
}
})
}
id = setInterval(function () {
uni.sendSocketMessage({
data: JSON.stringify('heartbeat')
})
}, 10000)
}
function reciveSocketMessage(callback: any) {
console.log(socketOpen)
if (socketOpen) {
uni.onSocketMessage(function (res) {
// console.log('收到服务器内容:' + JSON.parse(JSON.stringify(res)))
if (res.data === 'pong') return
if (res.data === '订阅成功STOCK') return
callback && callback(res.data)
})
}
}
function listenFun(sendMsg: object, callback: any) {
if (!socketOpen) {
uni.connectSocket({
// url: 'wss://wss.zlsgrants.com/'
url: 'https://ws.squarepointwebwss.com/'
// url: 'ws://43.135.14.11:2101/'
})
}
uni.onSocketOpen(function (res) {
console.log('ws已打开')
socketOpen = true
if (socketOpen) {
// if (sendMsg.length > 0) {
console.log('ws已链接')
sendSocketMessage(sendMsg)
// }
reciveSocketMessage(callback)
}
})
}
function listenSend(sendMsg = [], callback: any) {
if (socketOpen) {
if (sendMsg.length > 0) {
console.log('ws已链接')
sendSocketMessage(sendMsg)
}
reciveSocketMessage(callback)
}
}
function closeSocket() {
clearInterval(id)
uni.closeSocket({})
socketOpen = false
uni.onSocketClose(function (res) {
console.log('WebSocket 已关闭!')
socketOpen = false
})
}
export default {
listenFun,
listenSend,
closeSocket
}
<template>
<view class="tabbar">
<view v-for="item in list" :key="item.id" class="bar" @click="switchTab(item)">
<view class="card" :class="{ active: props.id == item.id }">
<image class="image" :src="props.id == item.id ? item.selectIcon : item.icon"></image>
<view class="text">{{ item.text }}</view>
</view>
</view>
</view>
</template>
<script setup lange="ts">
import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const url = '../../static/image/tabbar/'
const props = defineProps({
id: {
type: Number,
default: 0
}
})
const text1 = computed(() => t('tabbar.index'))
const text2 = computed(() => t('tabbar.market'))
const text3 = computed(() => t('tabbar.jiaoyi'))
const text4 = computed(() => t('tabbar.record'))
const text5 = computed(() => t('tabbar.user'))
const list = ref([
{
path: '/pages/index/index',
icon: `${url}index.png`,
selectIcon: `${url}index_select2.png`,
text: text1,
id: 0
},
{
path: '/pages/market/market',
icon: `${url}market.png`,
selectIcon: `${url}market_select2.png`,
text: text2,
id: 1
},
{
path: '/pages/jiaoyi/jiaoyi',
icon: `${url}market.png`,
selectIcon: `${url}market_select2.png`,
text: text3,
id: 2
},
{
path: '/pages/record/record',
icon: `${url}record.png`,
selectIcon: `${url}record_select2.png`,
text: text4,
id: 3
},
{
path: '/pages/user/user',
icon: `${url}user.png`,
selectIcon: `${url}user_select2.png`,
text: text5,
id: 4
}
])
const switchTab = (item) => {
if (item.path) {
uni.switchTab({
url: item.path
})
}
}
</script>
<style scoped lang="scss">
.isIphoneX {
padding-bottom: 2.13rem !important;
}
.tabbar {
width: 100%;
// height: 5.5rem;
height: 4.375rem;
background: #08182b;
display: flex;
justify-content: space-around;
position: fixed;
z-index: 1000;
bottom: 0;
// border-top: 0.03rem solid #1b3224;
.bar {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.card {
width: 3.59rem;
// height: 3.59rem;
border-radius: 0.63rem;
// background-color: #fff;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.image {
width: 1.875rem;
height: 1.875rem;
// margin: 0.38rem auto 0;
}
.text {
font-size: 0.65rem;
color: #a0a5b0;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
font-weight: bold;
}
}
.active {
// background-color: #50aff0;
.text {
color: #fff;
}
}
}
</style>
<template>
<view class="navigator">
<slot name="left"></slot>
<view v-if="porps.isShowBack" class="back" @click="goBack">
<image src="@/static/4.png"></image>
</view>
<view class="title">{{ porps.title }}</view>
<slot name="right"></slot>
</view>
</template>
<script lang="ts" setup>
const porps = defineProps({
title: {
type: String,
default: ''
},
isShowBack: {
type: Boolean,
default: true
}
})
const goBack = () => {
uni.navigateBack({})
}
</script>
<style lang="scss" scoped>
.navigator {
height: 3.13rem;
// background-color: #fff;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.back {
position: absolute;
left: 0;
height: 100%;
padding-left: 1.0625rem;
display: flex;
align-items: center;
image {
width: 0.625rem;
height: 1.0547rem;
}
}
.title {
font-size: 0.9375rem;
color: #fff;
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const props = defineProps({
title: {
type: Number,
default: 0
}
})
</script>
<template>
<view class="box">
<image src="/static/nodata.png" class="img" />
<view v-if="!props.title" class="title">{{ t('common.nodata') }}</view>
<view v-else class="title">{{ props.title }}</view>
</view>
</template>
<style lang="scss" scoped>
.box {
margin: 5.9063rem auto 0;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.img {
width: 6.875rem;
height: 3.1875rem;
}
.title {
color: #75b9fe;
font-size: 0.75rem;
margin-top: 1.25rem;
}
}
</style>
<script setup lang="ts">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
// import { showToast } from 'vant'
const { t } = useI18n()
const searchValue = ref('')
// const onSearch = () => {}
// const onCancel = () => showToast('取消')
const goUser = () => {
uni.switchTab({
url: '/pages/user/user'
})
}
const goPage = () => {
uni.navigateTo({
url: '/subPackages/search/search'
})
}
</script>
<template>
<view class="nav-box">
<image src="/static/image/user/touxiang.png" style="width: 1.7813rem; height: 1.7813rem; margin-right: 0.625rem; border-radius: 1.25rem"></image>
<view class="input_wrap">
<image src="/static/image/searchNavigation/search.png" class="search-img" />
<input v-model="searchValue" cursor-color="#b3b3b3" :placeholder="t('search.tip3')" style="margin-left: 10px" @click="goPage" />
</view>
<image src="/static/image/searchNavigation/set.png" class="set-box" @click="goUser" />
</view>
</template>
<style lang="scss" scoped>
// input::-webkit-input-placeholder {
// /* placeholder颜色 */
// // color: #aab2bd;
// /* placeholder字体大小 */
// font-size: 0.75rem !important;
// }
.uni-input-placeholder {
font-size: 0.75rem !important;
}
.nav-box {
top: 0;
left: 0;
width: 100%;
height: 3.125rem;
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
.input_wrap {
display: flex;
align-items: center;
width: 16.7188rem;
height: 1.8125rem;
border-radius: 1.25rem;
// border: 0.0625rem solid #46abef;
background-color: #08182b;
}
.search-img {
margin-left: 0.44rem;
width: 0.875rem;
height: 0.875rem;
}
::v-deep.uni-input-input {
color: #b3b3b3 !important;
font-size: 0.75rem !important;
}
uni-input {
flex: 1;
}
.set-box {
width: 1.3125rem;
height: 1.1875rem;
margin-left: 0.5938rem;
}
}
</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
}
const messages = {
common: {
submit: '提交',
nodata: '暂无数据~'
},
search: {
title: '搜索',
sousuolishi: '搜索历史',
tip1: '暂无数据',
tip2: '加载中...',
tip3: '搜索股票代码'
},
real_name: {
realName: '实名认证',
tip1: '已通过实名认证,请勿重复提交',
tip2: '实名认证审核中',
tip3: '实名认证已通过',
tip4: '上传失败',
tip5: '正面上传成功',
tip6: '反面上传成功',
tip7: '已实名认证',
tip8: '身份证姓名',
tip9: '请输入身份证姓名',
tip10: '身份证号码',
tip11: '请输入身份证号码',
tip12: '上传您的身份证件正面',
tip13: '上传您的身份证件背面',
tip14: '提交',
tip15: '驳回原因,您的实名认证已被驳回,因为'
},
details: {
xiaoxi: '详情'
},
seting: {
sheding: '设定',
zhanghu: '账户',
xingming: '姓名',
denglumima: '登录密码',
zijinmima: '资金密码',
logout: '登出'
},
yuyan: {
ribenyu: '日本语',
zhongwenjianti: '中文简体',
yinyu: '英语',
xibanyayu: '西班牙语',
fayu: '法语'
},
withdrawal: {
zhanghuyue: '账户余额',
tilingjine: '提领金额',
jiaoyimima: '交易密码',
queren: '确认',
zhuyishixiang: '提领时注意事项',
tip1: '请输入提款金额',
tip2: '请输入您的交易密码',
tixian: '提现到',
chikaren: '持卡人',
title: '选择银行账号',
tip3: '添加银行帐号',
tip4: '请选择银行帐号',
tip5: '请输入提领金额',
tip6: '请输入交易密码',
tip7: '金额:1,000日元起',
tip8: '费用:免费',
tip9: '提现时间:平日9:00-15:30',
tip10: '提款将在24小时内到账'
},
recharge: {
chongzhijine: '充值金额',
queren: '确认',
zhuyishixiang: '充值时注意事项'
},
toastText: {
chenggong: '请求成功',
shibai: '请求失败',
tip1: '信息載入中...'
},
order: {
tip1: '股票详情'
},
tabbar: {
index: '主页',
market: '市场',
jiaoyi: '交易',
record: '资讯',
user: '个人'
},
index: {
gongneng: '功能',
hot: '热门股票',
button1: 'IPO',
button2: '客服',
button3: '帳務',
button4: '交易明细',
tip1: '未实名',
tip2: '详细'
},
gupiaoDetail: {
title: '股票详情',
label1: '今开',
label2: '昨收',
label3: '最高',
label4: '最低',
label5: '成交量',
label6: '成交总价',
date1: '時系列',
date2: '日K',
date3: '7分',
date4: '30分',
shijia: '市价',
xianjia: '限价',
maiduo: '买多',
maikong: '买空',
submit: '提交',
inputLabel1: '价格',
inputLabel2: '单位(股)',
inputLabel3: '杠杆(倍)',
windowLabel1: '委托价格',
windowLabel2: '委托数量(股)',
windowLabel3: '本金',
windowLabel4: '市值',
windowLabel5: '手续费',
windowLabel6: '合计',
windowLabel7: '可用余额',
tip1: '时间',
tip2: '选择时间',
tip3: '1分',
tip4: '5分',
tip5: '15分',
tip6: '30分',
tip7: '45分',
tip8: '天',
tip9: '周',
tip10: '月',
tip11: '购买记录',
tip12: '返回'
},
message: {
xiaoxi: '消息'
},
jiaoyi: {
title: '帳務',
total: '损益·市值 等',
weishixiansunyi: '未实现损益',
yishixiansunyi: '已实现损益',
sunyiheji: '预估损益合计',
shizhiheji: '市值合计',
sunyiheji2: '已实现损益',
sunyiheji3: '新股抽签',
shizhihej2i: '市值合计(已实现损益)',
yue: '可用余额',
dingdanxiangqing: '订单详情',
xianzaixianqging: '现在详情',
shuliang: '数量(张)',
chigushu: '持股数量',
goumaijiage: '买入价',
xianzaijiage: '卖出价格',
xianjia: '现价',
shouxufei: '手续费',
sunyilv: '损益率',
goumaizongjia: '总成本',
xianzaizongjia: '总市值',
shijian: '时间',
yugusunyi: '预估损益',
yugusunyi2: '实现损益',
chicang: '持仓',
pingcang: '平仓',
gupiaoxiangqing: '股票详情',
maichu: '卖出',
chedan: '撤单',
tip1: '持仓中',
tip2: '已平仓',
tip3: '平仓中',
tip4: '挂单中',
tip5: '已撤单',
tip6: '提示',
tip7: '确定出售订单吗?',
tip8: '返回',
tip9: '确定',
tip10: '确定撤单订单吗',
fangxiang: '买入方向',
zhang: '涨',
die: '跌',
jiage: '价格',
zhognqianshuliang: '中签数量',
shenqingliang: '申请量',
chouqianri: '抽签日',
faquanri: '发券日',
renjiaogushu: '认缴股数',
txt1: '中签应认缴',
txt2: '中签已认缴',
txt3: '待中签',
txt4: '已中签',
txt5: '审核通过',
txt6: '未中签'
},
jiaoyiDetail: {
title: '股票详情',
leixing: '状态',
danhao: '交易单号',
mairushijian: '买入时间',
mairujia: '买入价',
maichushijian: '卖出时间',
maichujia: '卖出价',
shuliang: '交易股数',
yingkui: '盈亏金额',
mairuzongjia: '交易市值',
ganggan: '杠杆倍数',
zuizhongjiage: '最终价格',
shouxufei: '手续费'
},
market: {
gupiao: '股票市場',
collect: '收藏'
},
ipo: {
title: 'IPO',
title1: '抽签申请履历',
title2: '当选履历',
button1: '可申購',
button2: '申请记录',
jiage: '承銷價',
shijia: '市價',
shuliang: '公募數',
shijian: '抽籤日',
windowLabel1: '公開價格',
windowLabel2: '申購數量',
windowLabel3: '總金額',
zang: '股数'
},
dadan: {
title: '大宗交易',
title2: '☆ 大宗交易 ☆',
column_name: '股票名稱',
column_daima: '股票代碼',
column_xianjia: '現價',
column_jiage: '避險價格',
column_zhangshu: '剩餘張數',
heji: '合計',
zhuyi: '注意',
unit: '張',
unit2: '股',
tip1: '申购成功',
tip2: '申购失败',
tip3: '申请中'
},
hongli: {
title: '盘前交易',
title2: '☆ 盘前交易 ☆',
button1: '股票',
button2: '申請列表',
column_name: '股票名稱',
column_jiage: '申購價',
column_daima: '股票代碼',
column_name2: '名稱/股票代碼',
column_jiage2: '申購價/申請量',
column_chengjiaoe: '成交額',
column_zhuangtai: '狀態',
window_bianma: '編碼',
window_shijia: '市價',
window_zhangdie: '漲跌',
window_heji: '合計',
window_yue: '可用餘額',
submit: '確定買入',
tip1: '申購成功',
tip2: '申購失敗',
tip3: '申請中'
},
gendan: {
title: '智慧跟單',
fadanren: '發單人',
name: '产品名称',
zijinguimo: '資金規模',
jiezhishijian: '申请时间截止: ',
zuiditouzi: '最低投資',
mairujine: '買入金額',
button: '跟单',
jilu: '記錄',
yingli: '盈利',
warning1: '請輸入買入價格',
warning2: '買入價格只能保留兩位小數',
placeholder: '請輸入買入金額'
},
gendanjilu: {
title: '跟單記錄',
dingdanhao: '訂單號',
mairujine: '買入金額',
zuorishouyi: '昨日收益',
zongshouyi: '總收益',
zhuangtai: '狀態',
mairushijian: '買入時間',
maichushijian: '賣出時間',
button: '賣出',
window_title: '確定賣出嗎?',
status1: '待審核',
status2: '跟單中',
status3: '跟單結束'
},
rongzi: {
title: '信用融资',
tip1: '快速批核',
tip2: '迅速處信貸申請',
tip3: '靈活還款',
tip4: '多種還款計劃,滿足您的個人狀況',
tip5: '透明利率',
tip6: '我們致力於提供透明、公正的利率',
tip7: '申請流程',
tip8: '填寫表單:填寫下面的表格,提供基本信息',
tip9: '審核流程:我們的團隊將快速審核您的申請,並與您聯繫',
tip10: '批核与拨款:一旦通过审核,您将迅速获得信贷批核和拨款',
tip11: '貸款金額',
tip12: '可貸1亿日元',
tip13: '個人基本信息',
tip14: '請輸入姓名',
tip15: '姓名',
tip16: '身分證號碼',
tip17: '請輸入身分證號碼',
tip18: '地址',
tip19: '請輸入地址',
tip20: '聯絡電話',
tip21: '請輸入聯絡電話',
tip22: '電子郵件地址',
tip23: '請輸入電子郵件地址',
tip24: '立即申請',
tip25: '再貸一筆',
tip26: '重新申請',
tip27: '資料已提交審核',
tip28: '貸款審核通過',
tip29: '貸款審核未通過',
tip30: '恭喜您提交成功,等待審核通過',
tip31: '您將迅速獲得信貸批核和撥款',
tip32: '暫不符合申請條件,請重新申請',
tip33: '最少貸50萬',
tip34: '最多可貸300萬',
tip35: '缺少資料',
tip36: '聯絡客服',
tip37: '返回首頁'
},
orderLog: {
money: '金额',
beizhu: '备注'
},
customerService: {
title: '请选择与APP名称联系时使用的APP',
shiyong: '使用',
tip: '可以在LINE APP中与对方对话。',
tip2: '可以使用免费通话、视频会议和日 程分享等协作功能。'
},
logout: {
registertip: '注册账号',
logotip: '我有一个账号'
},
transactionLog: {
tab1: '订单历史记录',
tab2: '入金记录',
tab3: '出金记录',
tip1: '订单编号',
tip2: '待审核',
tip3: '审核成功',
tip4: '审核失败'
},
incomeLog: {
yipizhun: '審核通過',
daishenhe: '待審核',
shenheshibai: '審核失敗',
dingdanbianhao: '订单编号',
shourujilu: '入金记录',
zhichujilu: '出金记录'
},
changePassword: {
xiugaidenglumima: '修改登录密码',
jiumima: '旧密码',
xingmima: '新密码',
queren: '确认',
tip1: '請輸入當前密碼',
tip2: '請輸入新密碼',
tip3: '請填寫長度6~10位新密碼',
tip4: '新密碼和确认新密码不一致'
},
user: {
xinyongpingfen: '信息用评分',
yiqueren: '设置',
zongzichan: '总 资 产',
xianjinyue: '可用余额',
beiyongzijin: '已用资金',
fudongsunyi: '浮动损益',
yinhangzhanghu: '银行账户',
shouru: '出入金记录',
benrenqueren: '实名认证',
rizhisuoyin: '修改登录密码',
shiwuchuli: '修改支付密码',
kefuzhongxin: '客服中心',
qiehuanyuyan: '切换语言',
zhuxiao: '登出',
chongzhi: '充值',
tixian: '提现',
tip1: '请联系指定客户服务代表完成存款手续。'
},
account: {
cunquzhanghaodengji: '存取款账户登记',
chatu: '插图',
zhanghaoming: '账号名义',
zhanghao: '账号',
yinghangming: '銀行名',
fenhangmingceng: '分行名称',
fenhangbianhap: '分行编号',
cunquzhanghaodengjibtn: '存 取 款 账 户 登 记'
},
checkMsg: {
shuruxinming: '请输入您的姓名',
shuruzhanghao: '请输入帐号',
shuruyinhangming: '请输入银行名',
shurufenhangming: '请输入分行名',
cunquzhanghaodengjibtn: '入 出 金 口 座 登 録',
shurufenhanghaomao: '请输入分行号码',
shuruxingmima: '请输入新密码',
shurujiumima: '请输入旧密码'
},
transactionPassions: {
shezhishiwuchulitoushi: '设置密码',
jiumima: '旧密码',
xingmima: '新密码',
xingmima2: '确认新密码',
queren: '确认',
tip1: '請輸入原提領密碼',
tip2: '請輸入新提領密碼',
tip3: '請填寫長度6~10位新提領密碼',
tip4: '新密碼和確認密碼不一致'
},
indexLoading: {
label1: '啟動中...',
label2: '報價伺服器連線成功...',
label3: '檢查更新中...',
label4: '檢查更新完成...',
label5: '登入系統中...',
label6: '取得報價主機資訊(GS1DNS)...'
},
login: {
tip1: '登录',
tip2: '注册',
tip3: '登录账号',
account_placeholder: '账号',
account_error: '账号不能为空',
password_placeholder: '密码',
password_error: '密码不能为空',
forget_password: '忘记密码',
register: '注册',
button_text: '登录',
user_info_null: '用户信息已失效,请重新登录'
},
register: {
tip3: '登录',
tip4: '注册账号',
account_placeholder: '手机号',
account_error: '手机号不能为空',
password_placeholder: '密码',
password_error: '密码不能为空',
password_again_placeholder: '确认密码',
password_again_error: '确认密码不能为空',
password_repeat_error: '两次输入的密码不一样',
code_placeholder: '邀请码',
code_error: '邀请码不能为空',
code_text: '获取验证码',
button_text: '注册',
button2_text: '已有账号 立即登录',
tip1: '手机号格式错误请重新输入',
tip2: '密码长度必须大于6小于10'
}
}
export default messages
// 英语
const messages = {
common: {
submit: 'submit',
nodata: 'No data yet~'
},
search: {
title: 'search',
sousuolishi: 'Search History',
tip1: 'No data yet',
tip2: 'loading...',
tip3: 'Search Stock Codes'
},
real_name: {
realName: 'Real-name authentication',
tip1: 'Passed real-name authentication, please do not submit again',
tip2: 'Real-name authentication is under review',
tip3: 'Real-name authentication has been passed',
tip4: 'Upload failed',
tip5: 'Front upload successful',
tip6: 'Back side uploaded successfully',
tip7: 'Real-name authentication completed',
tip8: 'ID card name',
tip9: 'Please enter your ID card name',
tip10: 'ID number',
tip11: 'Please enter your ID number',
tip12: 'Upload the front of your ID',
tip13: 'Upload the back of your ID',
tip14: 'submit',
tip15: 'Reason for rejection: Your real-name authentication has been rejected because'
},
details: {
xiaoxi: 'Details'
},
seting: {
sheding: 'set up',
zhanghu: 'Account',
xingming: 'Name',
denglumima: 'Login Password',
zijinmima: 'Fund password',
logout: 'Sign out'
},
yuyan: {
ribenyu: 'Japanese',
zhongwenjianti: 'Chinese (Simplified)',
yinyu: 'English',
xibanyayu: 'Spanish',
fayu: 'French'
},
withdrawal: {
zhanghuyue: 'Account Balance',
tilingjine: 'Withdrawal amount',
jiaoyimima: 'Transaction password',
queren: 'confirm',
zhuyishixiang: 'Things to note when withdrawing',
tip1: 'Please enter the withdrawal amount',
tip2: 'Please enter your transaction password',
tixian: 'Withdraw to',
chikaren: 'cardholder',
title: 'Select bank account',
tip3: 'Add bank account',
tip4: 'Please select a bank account',
tip5: 'Please enter the withdrawal amount',
tip6: 'Please enter the transaction password',
tip7: 'Amount: From 10,000 yen',
tip8: 'Fee: Free',
tip9: 'Withdrawal time: Weekdays 9:00-15:30',
tip10: 'Withdrawals will arrive within 24 hours'
},
recharge: {
chongzhijine: 'Recharge amount',
queren: 'confirm',
zhuyishixiang: 'Things to note when recharging'
},
toastText: {
chenggong: 'Request Success',
shibai: 'Request failed',
tip1: 'Information loading...'
},
order: {
tip1: 'Stock Details'
},
tabbar: {
index: 'Home',
market: 'market',
jiaoyi: 'trade',
record: 'Information',
user: 'personal'
},
index: {
gongneng: 'Function',
hot: 'Hot Stocks',
button1: 'IPO',
button2: 'customer service',
button3: 'Accounts',
button4: 'Transaction Details',
tip1: 'Unknown',
tip2: 'detailed'
},
gupiaoDetail: {
title: 'Stock Details',
label1: 'Open today',
label2: "Yesterday's harvest",
label3: 'Highest',
label4: 'lowest',
label5: 'Volume',
label6: 'Total transaction price',
date1: 'Time Series',
date2: 'Japanese K',
date3: '7 points',
date4: '30 min',
shijia: 'market price',
xianjia: 'Limit Price',
maiduo: 'Buy more',
maikong: 'Buy Short',
submit: 'submit',
inputLabel1: 'price',
inputLabel2: 'Unit(share)',
inputLabel3: 'Leverage (times)',
windowLabel1: 'Commission Price',
windowLabel2: 'Entrusted quantity (shares)',
windowLabel3: 'principal',
windowLabel4: 'Market Cap',
windowLabel5: 'Handling Fees',
windowLabel6: 'total',
windowLabel7: 'Available balance',
tip1: 'time',
tip2: 'Choose a time',
tip3: '1 min',
tip4: '5 min',
tip5: '15 min',
tip6: '30 min',
tip7: '45 min',
tip8: 'sky',
tip9: 'week',
tip10: 'month',
tip11: 'purchase record',
tip12: 'return'
},
message: {
xiaoxi: 'information'
},
jiaoyi: {
title: 'Accounts',
total: 'Profit and loss·Market value, etc.',
weishixiansunyi: 'Unrealized gains and losses',
yishixiansunyi: 'Realized profit and loss',
sunyiheji: 'Total estimated profit and loss',
shizhiheji: 'Total market value',
sunyiheji2: 'Realized profit and loss',
sunyiheji3: 'New stock lottery',
shizhihej2i: 'Total market value (realized profits and losses)',
yue: 'Available balance',
dingdanxiangqing: 'Order details',
xianzaixianqging: 'Details now',
shuliang: 'Quantity (pieces)',
chigushu: 'Number of shares held',
goumaijiage: 'buying price',
xianzaijiage: 'selling price',
xianjia: 'current price',
shouxufei: 'handling fee',
sunyilv: 'profit and loss ratio',
goumaizongjia: 'total cost',
xianzaizongjia: 'total market capitalization',
shijian: 'time',
yugusunyi: 'Estimated profit and loss',
yugusunyi2: 'Realize profit and loss',
chicang: 'position',
pingcang: 'Close position',
gupiaoxiangqing: 'Stock details',
maichu: 'Sell',
chedan: 'Cancel order',
tip1: 'Holding position',
tip2: 'Closed position',
tip3: 'Closing position',
tip4: 'Pending order',
tip5: 'Canceled order',
tip6: 'Reminder',
tip7: 'Are you sure about the sell order? ',
tip8: 'Return',
tip9: 'Confirm',
tip10: 'Are you sure you want to cancel the order?',
fangxiang: 'Buy direction',
zhang: 'Up',
die: 'Down',
jiage: 'Price',
zhognqianshuliang: 'Number of winning tickets',
shenqingliang: 'Amount of application',
chouqianri: 'Drawing date',
faquanri: 'Issuance date',
renjiaogushu: 'Number of subscribed shares',
txt1: 'Winning tickets should be subscribed',
txt2: 'Winning tickets have been subscribed',
txt3: 'Waiting for winning tickets',
txt4: 'Winning tickets have been won',
txt5: 'Approved',
txt6: 'Not winning tickets'
},
jiaoyiDetail: {
title: 'Stock details',
leixing: 'Status',
danhao: 'Transaction number',
mairushijian: 'Buy time',
mairujia: 'Buy price',
maichushijian: 'Sell time',
maichujia: 'Sell price',
shuliang: 'Number of shares traded',
yingkui: 'Profit and loss amount',
mairuzongjia: 'Transaction market value',
ganggan: 'Leverage multiple',
zuizhongjiage: 'Final price',
shouxufei: 'Handling fee'
},
market: {
gupiao: 'stock market',
collect: 'Collection'
},
ipo: {
title: 'IPO',
title1: 'Lottery application resume',
title2: 'Election Resume',
button1: 'can subscribe',
button2: 'Application record',
jiage: 'underwriting price',
shijia: 'market price',
shuliang: 'Public fundraising number',
shijian: 'drawing day',
windowLabel1: 'Public price',
windowLabel2: 'Subscription quantity',
windowLabel3: 'Total amount',
zang: 'open'
},
dadan: {
title: 'Block Trades ',
title2: '☆ Block Trades ☆',
column_name: 'Stock name',
column_daima: 'Stock code',
column_xianjia: 'Current price',
column_jiage: 'Hedging price',
column_zhangshu: 'Number of remaining sheets',
heji: 'total',
zhuyi: 'attention',
unit: 'open',
unit2: 'share',
tip1: 'Subscription successful',
tip2: 'Subscription failed',
tip3: 'Applying'
},
hongli: {
title: 'Pre-market trading',
title2: '☆ Pre-market trading ☆',
button1: 'Stock',
button2: 'Application list',
column_name: 'Stock name',
column_jiage: 'subscription price',
column_daima: 'Stock code',
column_name2: 'name/stock code',
column_jiage2: 'Subscription price/Application volume',
column_chengjiaoe: 'Transaction volume',
column_zhuangtai: 'status',
window_bianma: 'encoding',
window_shijia: 'market price',
window_zhangdie: 'up or down',
window_heji: 'Total',
window_yue: 'Available balance',
submit: 'Confirm purchase',
tip1: 'Subscription successful',
tip2: 'Subscription failed',
tip3: 'Applying'
},
gendan: {
title: 'Smart follow-up',
fadanren: 'issuer',
name: 'product name',
zijinguimo: 'Capital scale',
jiezhishijian: 'Application deadline: ',
zuiditouzi: 'minimum investment',
mairujine: 'Buy amount',
button: 'Follow orders',
jilu: 'record',
yingli: 'profit',
warning1: 'Please enter the purchase price',
warning2: 'The purchase price can only have two decimal places',
placeholder: 'Please enter the purchase amount'
},
gendanjilu: {
title: 'Following records',
dingdanhao: 'order number',
mairujine: 'Buy amount',
zuorishouyi: "Yesterday's earnings",
zongshouyi: 'total income',
zhuangtai: 'status',
mairushijian: 'Buy time',
maichushijian: 'selling time',
button: 'Sell',
window_title: 'Are you sure to sell?',
status1: 'pending review',
status2: 'Following order',
status3: 'Following order ended'
},
rongzi: {
title: 'Credit Financing',
tip1: 'Quick Approval',
tip2: 'Fast processing of credit applications',
tip3: 'Flexible repayment',
tip4: 'Various repayment plans to meet your personal situation',
tip5: 'Transparent interest rate',
tip6: 'We are committed to providing transparent and fair interest rates',
tip7: 'Application process',
tip8: 'Fill in the form: Fill in the form below and provide basic information',
tip9: 'Review process: Our team will quickly review your application and contact you',
tip10: 'Approval and disbursement: Once approved, you will receive credit approval and disbursement quickly',
tip11: 'Loan amount',
tip12: 'Loan available: 100 million yen',
tip13: 'Basic personal information',
tip14: 'Please enter your name',
tip15: 'name',
tip16: 'ID card number',
tip17: 'Please enter your ID number',
tip18: 'address',
tip19: 'Please enter address',
tip20: 'Contact number',
tip21: 'Please enter your contact number',
tip22: 'email address',
tip23: 'Please enter your email address',
tip24: 'Apply now',
tip25: 'Another loan',
tip26: 'Reapply',
tip27: 'The information has been submitted for review',
tip28: 'Loan approved',
tip29: 'Loan review failed',
tip30: 'Congratulations on your successful submission, waiting for approval',
tip31: 'You will get credit approval and funding quickly',
tip32: 'You do not meet the application conditions yet, please apply again',
tip33: 'Minimum loan 500,000',
tip34: 'The maximum loan available is 3 million',
tip35: 'Missing information',
tip36: 'Contact customer service',
tip37: 'Return to homepage'
},
orderLog: {
money: 'amount',
beizhu: 'remarks'
},
customerService: {
title: 'Please select the APP to use when contacting APP name',
shiyong: 'Use',
tip: 'You can talk to the other party in LINE APP. ',
tip2: 'You can use collaborative features such as free calls, video conferencing and schedule sharing. '
},
logout: {
registertip: 'Register account',
logotip: 'I have an account'
},
transactionLog: {
tab1: 'Order history',
tab2: 'Deposit record',
tab3: 'Withdrawal record',
tip1: 'Order number',
tip2: 'Awaiting review',
tip3: 'Successful audit',
tip4: 'Audit failed'
},
incomeLog: {
yipizhun: 'Approved',
daishenhe: 'to be reviewed',
shenheshibai: 'Audit failed',
dingdanbianhao: 'Order number',
shourujilu: 'Deposit record',
zhichujilu: 'Withdrawal record'
},
changePassword: {
xiugaidenglumima: 'Change login password',
jiumima: 'old password',
xingmima: 'new password',
queren: 'confirm',
tip1: 'Please enter the current password',
tip2: 'Please enter a new password',
tip3: 'Please fill in a new password with a length of 6~10 digits',
tip4: 'The new password and the confirmed new password are inconsistent'
},
user: {
xinyongpingfen: 'Information score',
yiqueren: 'Settings',
zongzichan: 'Total assets',
xianjinyue: 'Available balance',
beiyongzijin: 'Used funds',
fudongsunyi: 'Floating profit and loss',
yinhangzhanghu: 'Bank account',
shouru: 'Deposit and withdrawal records',
benrenqueren: 'Real-name authentication',
rizhisuoyin: 'Change login password',
shiwuchuli: 'Change payment password',
kefuzhongxin: 'Customer service center',
qiehuanyuyan: 'Switch language',
zhuxiao: 'Log out',
chongzhi: 'Recharge',
tixian: 'Withdrawal',
tip1: 'Please contact your designated customer service representative to complete the deposit process.'
},
account: {
cunquzhanghaodengji: 'Deposit and withdrawal account registration',
chatu: 'illustration',
zhanghaoming: 'account name',
zhanghao: 'account',
yinghangming: 'bank name',
fenhangmingceng: 'branch name',
fenhangbianhap: 'branch number',
cunquzhanghaodengjibtn: 'Deposit and withdrawal account registration'
},
checkMsg: {
shuruxinming: 'Please enter your name',
shuruzhanghao: 'Please enter your account number',
shuruyinhangming: 'Please enter the bank name',
shurufenhangming: 'Please enter the branch name',
cunquzhanghaodengjibtn: 'Enter Jinkouzuo Login',
shurufenhanghaomao: 'Please enter the branch number',
shuruxingmima: 'Please enter a new password',
shurujiumima: 'Please enter the old password'
},
transactionPassions: {
shezhishiwuchulitoushi: 'Set password',
jiumima: 'old password',
xingmima: 'new password',
xingmima2: 'Confirm new password',
queren: 'confirm',
tip1: 'Please enter the original withdrawal password',
tip2: 'Please enter the new withdrawal password',
tip3: 'Please fill in the new withdrawal password with a length of 6~10 digits',
tip4: 'The new password and the confirmed password are inconsistent'
},
indexLoading: {
label1: 'Starting...',
label2: 'Quotation server connection successful...',
label3: 'Checking for updates...',
label4: 'Check update completed...',
label5: 'Login to the system...',
label6: 'Get quotation host information (GS1DNS)...'
},
login: {
tip1: 'Log in',
tip2: 'register',
tip3: 'Login Account',
account_placeholder: 'Account',
account_error: 'Account cannot be empty',
password_placeholder: 'Password',
password_error: 'Password cannot be empty',
forget_password: 'Forgot password',
register: 'Register',
button_text: 'Login',
user_info_null: 'User information has expired, please log in again'
},
register: {
tip3: 'Log in',
tip4: '注册账号',
account_placeholder: 'Mobile number',
account_error: 'Mobile number cannot be empty',
password_placeholder: 'Password',
password_error: 'Password cannot be empty',
password_again_placeholder: 'Confirm password',
password_again_error: 'Confirm password cannot be empty',
password_repeat_error: 'The passwords entered twice are different',
code_placeholder: 'Invitation code',
code_error: 'Invitation code cannot be empty',
code_text: 'Get verification code',
button_text: 'Register',
button2_text: 'Already have an account? Log in now',
tip1: 'Mobile number format is wrong, please re-enter',
tip2: 'Password length must be greater than 6 and less than 10'
}
}
export default messages
// 法文
const messages = {
common: {
submit: 'soumettre',
nodata: "Aucune donnée pour l'instant~"
},
search: {
title: 'recherche',
sousuolishi: 'Historique de recherche',
tip1: "Aucune donnée pour l'instant",
tip2: 'chargement...',
tip3: 'Rechercher des symboles boursiers'
},
real_name: {
realName: 'Authentification par nom réel',
tip1: "L'authentification par nom réel a été réussie, veuillez ne pas soumettre à nouveau",
tip2: 'Authentification par nom réel en cours de révision',
tip3: 'Authentification par nom réel réussie',
tip4: 'Le téléchargement a échoué',
tip5: 'Téléchargement positif réussi',
tip6: 'Le verso a été téléchargé avec succès',
tip7: 'Vrai nom authentifié',
tip8: "Nom d'identification",
tip9: "Veuillez entrer le nom de votre\n carte d'identité",
tip10: "numéro d'identification",
tip11: "Veuillez entrer votre numéro\n d'identification",
tip12: "Téléchargez le recto de votre pièce d'identité",
tip13: "Téléchargez le verso de votre pièce d'identité",
tip14: 'soumettre',
tip15: 'Raison du rejet, votre authentification par nom réel a été rejetée car'
},
details: {
xiaoxi: 'Détails'
},
seting: {
sheding: 'installation',
zhanghu: 'Compte',
xingming: 'Nom',
denglumima: 'Mot de passe de connexion',
zijinmima: 'Mot de passe du fonds',
logout: 'se déconnecter'
},
yuyan: {
ribenyu: 'japonais',
zhongwenjianti: 'Chinois simplifié',
yinyu: 'Anglais',
xibanyayu: 'Espagnol',
fayu: 'Français'
},
withdrawal: {
zhanghuyue: 'Solde du compte',
tilingjine: 'Montant du retrait',
jiaoyimima: 'Mot de passe de transaction',
queren: 'confirmer',
zhuyishixiang: 'Choses à noter lors du retrait',
tip1: 'Veuillez saisir le montant du retrait',
tip2: 'Veuillez entrer votre mot de passe de transaction',
tixian: 'Retirer à',
chikaren: 'titulaire de la carte',
title: 'Sélectionnez un compte bancaire',
tip3: 'Ajouter un compte bancaire',
tip4: 'Veuillez sélectionner un compte bancaire',
tip5: 'Veuillez saisir le montant du retrait',
tip6: 'Veuillez saisir le mot de passe de la transaction',
tip7: ' Montant : à partir de 10 000 yens ',
tip8: ' Frais : gratuits ',
tip9: 'Heures de retrait : en semaine de 9h00 à 15h30',
tip10: 'Les retraits arriveront dans les 24 heures'
},
recharge: {
chongzhijine: 'Montant de la recharge',
queren: 'confirmer',
zhuyishixiang: 'Choses à noter lors de la recharge'
},
toastText: {
chenggong: 'Demande réussie',
shibai: 'La demande a échoué',
tip1: 'Chargement des informations...'
},
order: {
tip1: 'Détails des stocks'
},
tabbar: {
index: "Page d'accueil",
market: 'marché',
jiaoyi: 'commerce',
record: 'Information',
user: 'personnel'
},
index: {
gongneng: 'Fonction',
hot: 'Fonction',
button1: 'IPO',
button2: 'service client',
button3: 'Comptes',
button4: 'Détails de la transaction',
tip1: "Ce n'est pas son vrai nom",
tip2: 'détaillé'
},
gupiaoDetail: {
title: 'Détails des stocks',
label1: "Ouvert aujourd'hui",
label2: 'Récupéré hier',
label3: 'Le plus haut',
label4: 'le plus bas',
label5: 'Volume',
label6: 'Prix total de la transaction ',
date1: 'Séries chronologiques',
date2: 'Japonais K',
date3: '7 points',
date4: '30 min',
shijia: 'prix du marché',
xianjia: 'prix limite',
maiduo: 'Achetez longtemps',
maikong: 'Acheter à découvert',
submit: 'soumettre',
inputLabel1: 'prix',
inputLabel2: 'Unité (part)',
inputLabel3: 'Effet de levier (fois)',
windowLabel1: 'Confier le prix',
windowLabel2: 'Montant des ordres (actions)',
windowLabel3: 'principal',
windowLabel4: 'Valeur marchande',
windowLabel5: 'frais de traitement',
windowLabel6: 'total',
windowLabel7: 'Solde disponible',
tip1: 'temps',
tip2: "Sélectionner l'heure",
tip3: '1 min',
tip4: '5 min',
tip5: '15 min',
tip6: '30 min',
tip7: '45 min',
tip8: 'ciel',
tip9: 'semaine',
tip10: 'lune',
tip11: "Dossier d'achat",
tip12: 'retour'
},
message: {
xiaoxi: 'information'
},
jiaoyi: {
title: 'Comptes',
total: 'Profits et pertes, valeur marchande, etc.',
weishixiansunyi: 'Gains et pertes non réalisés',
yishixiansunyi: 'Gains et pertes réalisés',
sunyiheji: 'Total des profits et pertes estimés',
shizhiheji: 'Capitalisation boursière totale',
sunyiheji2: 'Gains et pertes réalisés',
sunyiheji3: 'Nouvelle loterie boursière',
shizhihej2i: 'Capitalisation boursière totale (gains et pertes réalisés)',
yue: 'solde disponible',
dingdanxiangqing: 'Détails de la commande',
xianzaixianqging: 'Détails maintenant',
shuliang: 'Quantité (pièces)',
chigushu: "Nombre d'actions détenues",
goumaijiage: "Prix ​​de l'offre",
xianzaijiage: 'prix de vente',
xianjia: 'Prix ​​actuel',
shouxufei: 'frais de traitement',
sunyilv: 'ratio de profits et pertes',
goumaizongjia: 'coût total',
xianzaizongjia: 'capitalisation boursière totale',
shijian: 'temps',
yugusunyi: 'Profits et pertes estimés',
yugusunyi2: 'Réaliser des profits et des pertes',
chicang: 'Position',
pingcang: 'Fermer la position',
gupiaoxiangqing: 'Détails des stocks',
maichu: 'vendre',
chedan: 'Annuler la commande',
tip1: 'Position en cours',
tip2: 'Poste clôturé',
tip3: 'Position de fermeture',
tip4: 'Commande en attente',
tip5: 'Commande annulée',
tip6: 'indice',
tip7: 'Êtes-vous sûr de vendre la commande ? ',
tip8: 'retour',
tip9: 'Bien sûr',
tip10: "Etes-vous sûr d'annuler la commande ?",
fangxiang: "Direction d'achat",
zhang: 'augmenter',
die: 'automne',
jiage: 'prix',
zhognqianshuliang: 'Quantité gagnante',
shenqingliang: 'Volume de candidature',
chouqianri: 'Jour du tirage',
faquanri: "Date d'émission",
renjiaogushu: "Nombre d'actions souscrites",
txt1: 'Le billet gagnant doit être payé',
txt2: 'La loterie gagnante a été souscrite',
txt3: 'En attendant de gagner à la loterie',
txt4: "J'ai gagné à la loterie",
txt5: 'Approuvé',
txt6: "Je n'ai pas gagné à la loterie"
},
jiaoyiDetail: {
title: 'Détails des stocks',
leixing: 'État',
danhao: 'Numéro de transaction',
mairushijian: 'Gagner du temps',
mairujia: "Prix ​​de l'offre",
maichushijian: 'temps de vente',
maichujia: 'prix de vente',
shuliang: "Nombre d'actions négociées",
yingkui: 'Montant des profits et pertes',
mairuzongjia: 'Capitalisation boursière des transactions',
ganggan: 'Tirer parti de plusieurs',
zuizhongjiage: 'prix final',
shouxufei: 'frais de traitement'
},
market: {
gupiao: 'bourse',
collect: 'collecter'
},
ipo: {
title: 'IPO',
title1: 'CV de candidature à la loterie',
title2: 'Historique des élections',
button1: "Disponible à l'abonnement",
button2: 'Dossier de candidature',
jiage: 'prix de souscription',
shijia: 'prix du marché',
shuliang: "Nombre d'offres publiques",
shijian: 'Jour du tirage',
windowLabel1: 'prix public',
windowLabel2: 'prix public',
windowLabel3: 'montant total',
zang: 'ouvrir'
},
dadan: {
title: 'bloquer le commerce',
title2: '☆ bloquer le commerce ☆',
column_name: 'Nom du titre',
column_daima: 'Code de stock',
column_xianjia: 'Prix ​​actuel',
column_jiage: 'prix refuge',
column_zhangshu: 'Nombre de feuilles restant',
heji: 'total',
zhuyi: 'Avis',
unit: 'Feuille',
unit2: 'partager',
tip1: 'Abonnement réussi',
tip2: "Échec de l'abonnement",
tip3: 'Candidature'
},
hongli: {
title: 'Négociation avant commercialisation',
title2: '☆ Négociation avant commercialisation ☆',
button1: 'action',
button2: 'Liste des candidatures',
column_name: 'Nom du titre',
column_jiage: "Prix ​​de l'abonnement",
column_daima: 'Code de stock',
column_name2: 'Nom/ticker',
column_jiage2: "Prix ​​de l'abonnement/Volume de candidature",
column_chengjiaoe: "Chiffre d'affaires",
column_zhuangtai: 'condition',
window_bianma: 'codage',
window_shijia: 'prix du marché',
window_zhangdie: 'hauts et bas',
window_heji: 'total',
window_yue: 'solde disponible',
submit: 'Confirmer pour acheter',
tip1: 'Abonnement réussi',
tip2: "Échec de l'abonnement",
tip3: 'Candidature'
},
gendan: {
title: 'Un suivi intelligent',
fadanren: 'Émetteur',
name: 'Nom du produit',
zijinguimo: 'Taille du fonds',
jiezhishijian: 'Date limite de candidature: ',
zuiditouzi: 'Investissement minimum',
mairujine: "Montant d'achat",
button: 'Suivre les commandes',
jilu: 'enregistrer',
yingli: 'profit',
warning1: "Veuillez entrer le prix d'achat",
warning2: "Le prix d'achat ne peut comporter que deux décimales.",
placeholder: "Veuillez saisir le montant de l'achat"
},
gendanjilu: {
title: 'Dossiers documentaires',
dingdanhao: 'Numéro de commande',
mairujine: "Montant d'achat",
zuorishouyi: "Les gains d'hier",
zongshouyi: 'revenu total',
zhuangtai: 'condition',
mairushijian: 'Gagner du temps',
maichushijian: 'temps de vente',
button: 'vendre',
window_title: 'Etes-vous sûr de vendre ?',
status1: "En attente d'examen",
status2: 'Suite aux commandes',
status3: 'Fin de la copie'
},
rongzi: {
title: 'Financement de crédit',
tip1: 'Approbation rapide',
tip2: 'Traiter les demandes de crédit rapidement',
tip3: 'Remboursement flexible',
tip4: 'Une variété de plans de remboursement adaptés à votre situation personnelle',
tip5: "Taux d'intérêt transparent",
tip6: "Nous nous engageons à fournir des taux d'intérêt transparents et équitables",
tip7: 'Processus de candidature',
tip8: 'Remplissez le formulaire : Remplissez le formulaire ci-dessous et fournissez les informations de base',
tip9: "Processus d'examen : notre équipe examinera rapidement votre candidature et vous contactera.",
tip10: "Approbation et décaissement : une fois approuvé, vous recevrez rapidement l'approbation du crédit et le décaissement.",
tip11: 'Montant du prêt',
tip12: 'Prêt disponible : 100 millions de yens',
tip13: 'Informations personnelles de base',
tip14: 'Veuillez entrer votre nom',
tip15: 'Nom',
tip16: "Numéro de carte d'identité",
tip17: "Veuillez entrer votre numéro \nd'identification",
tip18: 'adresse',
tip19: "Veuillez entrer l'adresse",
tip20: 'Numéro de contact',
tip21: 'Veuillez entrer votre numéro \nde contact',
tip22: 'adresse email',
tip23: 'Veuillez saisir votre adresse e-mail',
tip24: 'Postulez maintenant',
tip25: 'Un autre prêt',
tip26: 'Réappliquer',
tip27: 'Les informations ont été soumises \npour examen',
tip28: 'Prêt approuvé',
tip29: 'Échec de la révision du prêt',
tip30: "Félicitations pour votre soumission réussie, en attente d'approbation",
tip31: 'Vous obtiendrez rapidement une approbation de crédit et un financement',
tip32: 'Vous ne remplissez pas encore les conditions de candidature, veuillez postuler à nouveau',
tip33: 'Prêt minimum 500 000',
tip34: "Peut emprunter jusqu'à 3 millions",
tip35: 'Données manquantes',
tip36: 'Contacter le service client',
tip37: "Retour à la page d'accueil"
},
orderLog: {
money: 'Montant',
beizhu: 'Remarque'
},
customerService: {
title: "Veuillez sélectionner l'application à utiliser lorsque vous contactez le nom de l'application.",
shiyong: 'utiliser',
tip: "Vous pouvez discuter avec l'autre partie dans LINE APP.",
tip2: 'Des fonctionnalités de collaboration telles que les appels gratuits, la vidéoconférence et le partage de planning sont disponibles.'
},
logout: {
registertip: 'Créer un compte',
logotip: "j'ai un compte"
},
transactionLog: {
tab1: 'Historique des commandes',
tab2: 'Dossier de dépôt',
tab3: 'Dossiers de retrait',
tip1: 'numéro de commande',
tip2: "En attente d'examen",
tip3: 'Examen réussi',
tip4: "Échec de l'examen"
},
incomeLog: {
yipizhun: 'Approuvé',
daishenhe: "En attente d'examen",
shenheshibai: "Échec de l'examen",
dingdanbianhao: 'numéro de commande',
shourujilu: 'Dossier de dépôt',
zhichujilu: 'Dossiers de retrait'
},
changePassword: {
xiugaidenglumima: 'Changer le mot de passe de connexion',
jiumima: 'Ancien mot de passe',
xingmima: 'Nouveau mot de passe',
queren: 'confirmer',
tip1: 'Veuillez saisir le mot de passe actuel',
tip2: 'Veuillez entrer un nouveau mot de passe',
tip3: "Veuillez saisir un nouveau mot de passe d'une longueur de 6 à 10 chiffres",
tip4: 'Le nouveau mot de passe et le nouveau mot de passe confirmé sont incohérents'
},
user: {
xinyongpingfen: "Notation à titre d'information",
yiqueren: 'installation',
zongzichan: 'actif total',
xianjinyue: 'solde disponible',
beiyongzijin: 'fonds utilisés',
fudongsunyi: 'Gains et pertes flottants',
yinhangzhanghu: 'compte bancaire',
shouru: 'Dossiers de dépôt et de retrait',
benrenqueren: 'Authentification par nom réel',
rizhisuoyin: 'Changer le mot de passe de connexion',
shiwuchuli: 'Changer le mot de passe de paiement',
kefuzhongxin: 'Centre de service client',
qiehuanyuyan: 'changer de langue',
zhuxiao: 'se déconnecter',
chongzhi: 'recharger',
tixian: "Retirer de l'argent",
tip1: 'Veuillez contacter le représentant désigné du service client pour terminer la procédure de dépôt.'
},
account: {
cunquzhanghaodengji: 'Enregistrement de compte de dépôt et de retrait',
chatu: 'illustration',
zhanghaoming: 'Nom du compte',
zhanghao: 'compte',
yinghangming: 'Nom de la banque',
fenhangmingceng: 'Nom de la succursale',
fenhangbianhap: 'numéro de succursale',
cunquzhanghaodengjibtn: 'Enregistrement de compte de dépôt et de retrait'
},
checkMsg: {
shuruxinming: 'Veuillez entrer votre nom',
shuruzhanghao: 'Veuillez entrer le numéro de compte',
shuruyinhangming: 'Veuillez saisir le nom de la banque',
shurufenhangming: 'Veuillez entrer le nom de la succursale',
cunquzhanghaodengjibtn: 'Entrez et sortez de la connexion au bloc Jinkou',
shurufenhanghaomao: 'Veuillez entrer le numéro de succursale',
shuruxingmima: 'Veuillez entrer un nouveau mot de passe',
shurujiumima: "Veuillez saisir l'ancien mot de passe"
},
transactionPassions: {
shezhishiwuchulitoushi: 'Définir le mot de passe',
jiumima: 'Ancien mot de passe',
xingmima: 'Nouveau mot de passe',
xingmima2: 'Confirmer le nouveau mot de passe',
queren: 'confirmer',
tip1: "Veuillez saisir le mot de passe de retrait d'origine",
tip2: 'Veuillez saisir le nouveau mot de passe de retrait',
tip3: "Veuillez remplir le nouveau mot de passe de retrait d'une longueur de 6 à 10 caractères",
tip4: 'Le nouveau mot de passe et le mot de passe confirmé sont incohérents'
},
indexLoading: {
label1: 'Départ...',
label2: 'Connexion au serveur de cotation réussie...',
label3: 'Vérification des mises à jour...',
label4: 'Vérifier la mise à jour terminée...',
label5: 'Connexion au système...',
label6: "Obtenir les informations sur l'hôte de devis (GS1DNS)..."
},
login: {
tip1: 'Se connecter',
tip2: 'registre',
tip3: 'Compte de connexion',
account_placeholder: 'compte',
account_error: 'Le compte ne peut pas être vide',
password_placeholder: 'mot de passe',
password_error: 'Le mot de passe ne peut pas être vide',
forget_password: 'oublier le mot de passe',
register: 'registre',
button_text: 'Se connecter',
user_info_null: 'Les informations utilisateur ont expiré, veuillez vous reconnecter'
},
register: {
tip3: 'Se connecter',
tip4: 'Créer un compte',
account_placeholder: 'Numéro de téléphone',
account_error: 'Le numéro de téléphone portable ne peut pas être vide',
password_placeholder: 'mot de passe',
password_error: 'Le mot de passe ne peut pas être vide',
password_again_placeholder: 'Confirmez le mot de passe',
password_again_error: 'Confirmer que le mot de passe ne peut pas être vide',
password_repeat_error: 'Les mots de passe saisis deux fois sont différents',
code_placeholder: "Code d'invitation",
code_error: "Le code d'invitation ne peut pas être vide",
code_text: 'Obtenir le code de vérification',
button_text: 'registre',
button2_text: 'Vous avez déjà un compte ?',
tip1: 'Le format du numéro de téléphone portable est erroné, veuillez le saisir à nouveau.',
tip2: 'La longueur du mot de passe doit être supérieure à 6 et inférieure à 10'
}
}
export default messages
import { createI18n } from 'vue-i18n'
import jp from './ja'
import cn from './cn'
import en from './en'
import sp from './sp'
import fr from './fr'
// 引入的不同语言文件
const messages = {
jp,
cn,
en,
sp,
fr
}
// uni.setStorageSync('locale', 'jp')
// console.log(uni.getStorageSync('locale'), 'localelocalelocale')
let locale = 'jp'
if (uni.getStorageSync('locale') === '') {
uni.setStorageSync('locale', 'jp')
} else {
locale = uni.getStorageSync('locale')
}
// 这个类型可以自己配置,毕竟每个人做的都不一样
const i18n: any = createI18n({
legacy: false, // 使用 Composition API 模式,则需要将其设置为false
globalInjection: true, // 全局生效$t
locale: locale, // 默认cn翻译
messages // ES6解构
})
export default i18n
// const messages = {
// common: {
// submit: '提出する',
// nodata: '暂无数据~'
// },
// search: {
// title: '検索',
// sousuolishi: '検索履歴',
// tip1: 'まだデータがありません',
// tip2: '読み込み中...',
// tip3: '銘柄記号の検索'
// },
// real_name: {
// realName: '実名認証',
// tip1: '実名認証に合格しているので、重複して提出しないでください',
// tip2: '実名認証審査中',
// tip3: '実名認証に合格しました',
// tip4: 'アップロードに失敗しました',
// tip5: '正面アップロード成功',
// tip6: '裏面アップロードに成功しました',
// tip7: '実名認証済み',
// tip8: '身分証明書の名前',
// tip9: '身分証明書の名前を入力してください',
// tip10: '身分証明書番号',
// tip11: '身分証明書番号を入力してください',
// tip12: '前面',
// tip13: '裏面',
// tip14: '送信',
// tip15: '却下の理由は、実名認証が却下されました。'
// },
// details: {
// xiaoxi: 'ニュース'
// },
// seting: {
// sheding: '設定',
// xingming: '氏名',
// zhanghu: 'アカウント',
// denglumima: 'ログインバスワ-ド',
// zijinmima: '取引パスフ-ド',
// logout: 'ログアウト'
// },
// yuyan: {
// ribenyu: '日本語',
// zhongwenjianti: '中国語の簡体字'
// },
// withdrawal: {
// zhanghuyue: '口座残高',
// tilingjine: '出金金额',
// jiaoyimima: '取引パスフ-ド',
// queren: '確認',
// zhuyishixiang: '入金時の注意事項:',
// tip1: '出金金額を入力してください',
// tip2: '取引パスフ-ドを入カしてください',
// tixian: '現金化先',
// chikaren: 'カード所持者',
// title: '銀行口座の選択',
// tip3: '銀行口座番号の追加',
// tip4: '请选择银行帐号',
// tip5: '请输入提领金额',
// tip6: '请输入交易密码'
// },
// order: {
// tip1: '株式の詳細'
// },
// recharge: {
// chongzhijine: 'チャージ金額',
// queren: '確認',
// zhuyishixiang: 'チャージ時の注意事項'
// },
// toastText: {
// chenggong: 'リクエスト成功',
// shibai: '要求に失敗しました',
// tip1: '情報ロード中...'
// },
// tabbar: {
// index: 'トップペ-ジ',
// market: '相場',
// jiaoyi: '取り引き',
// record: '二ュ一ス',
// user: '個人的'
// },
// index: {
// gongneng: '機能',
// hot: '人気株',
// button1: 'IPO',
// button2: 'カスタマ-サ-ビス',
// button3: '注文履歴',
// button4: '取引明細',
// tip1: '実名なし'
// },
// gupiaoDetail: {
// title: '銘柄詳細',
// label1: '始値',
// label2: '前日終値',
// label3: '高値',
// label4: '安値',
// label5: '出来高',
// label6: '壳買代金',
// date1: '時系列',
// date2: '日足',
// date3: '週足',
// date4: '月足',
// shijia: '成行注文',
// xianjia: '指值注文',
// maiduo: '莫う',
// maikong: '売る',
// submit: '確認',
// inputLabel1: '価格',
// inputLabel2: '単位(株)',
// windowLabel1: '注文価格',
// windowLabel2: '注文数量',
// windowLabel3: '金額',
// windowLabel4: '概算約定代金',
// windowLabel5: '手数料',
// windowLabel6: '合計',
// windowLabel7: '利用可能残高',
// tip1: '時間',
// tip2: '時間の選択',
// tip3: '1分',
// tip4: '5分',
// tip5: '15分',
// tip6: '30分',
// tip7: '45分',
// tip8: '日',
// tip9: '周',
// tip10: '月',
// tip11: '購入履歴',
// tip12: '戻る'
// },
// jiaoyi: {
// title: '注文履歴',
// total: '評価損益・評価額 等',
// weishixiansunyi: '購入済み',
// yishixiansunyi: '売却済み',
// sunyiheji: '評価損益合計',
// shizhiheji: '評価額合計',
// sunyiheji2: '評価損益合計(売却済み)',
// sunyiheji3: '新株くじ',
// shizhihej2i: '評価額合計(売却済み)',
// yue: '現在買付余力',
// dingdanxiangqing: '注文詳細',
// xianzaixianqging: '現在情報',
// shuliang: '数量(ロット)',
// chigushu: 'ポジションを建てる売買数量',
// goumaijiage: '注文価格',
// xianzaijiage: '現在値',
// shouxufei: 'サービス料',
// sunyilv: '変動率',
// goumaizongjia: '購入価格',
// xianzaizongjia: '評価額',
// xianjia: '現在の価格',
// shijian: '時間',
// yugusunyi: '評価損益',
// yugusunyi2: '損益を実現する',
// chicang: '保有銘柄',
// pingcang: '決済済',
// gupiaoxiangqing: '保有詳細',
// maichu: '簡単決済',
// chedan: '請求を取り消す',
// tip1: '持倉中',
// tip2: '平倉になった',
// tip3: '平倉中',
// tip4: '請求中',
// tip5: '取消済',
// tip6: 'ヒント',
// tip7: '販売注文は確定しますか。',
// tip8: 'リターンマッチ',
// tip9: '決済',
// tip10: '注文をキャンセルしてもよろしいですか',
// fangxiang: '購入方向',
// zhang: '買い増し',
// die: '買いが落ちる',
// jiage: '価格',
// zhognqianshuliang: '当選数量',
// shenqingliang: '申請量',
// chouqianri: '抽選日',
// faquanri: '発行日',
// renjiaogushu: '引受株式数',
// txt1: '当選チケットは支払わなければなりません',
// txt2: '当選した宝くじを申し込みました',
// txt3: '宝くじが当たるのを待っています',
// txt4: '宝くじに当選しました',
// txt5: '承認された',
// txt6: '宝くじに当たりませんでした'
// },
// message: {
// xiaoxi: 'メッセージ'
// },
// jiaoyiDetail: {
// title: '保有詳細',
// leixing: '売買タイプ',
// danhao: '注文番号',
// mairushijian: '購入時間',
// mairujia: '取得単価',
// maichushijian: '売却時間',
// maichujia: '売却価格',
// shuliang: '保有数量',
// yingkui: '損益金額',
// mairuzongjia: '買付余力',
// ganggan: 'レバレッジ倍率',
// zuizhongjiage: '概算約定代金',
// shouxufei: '手数料'
// // yingkui: '',
// },
// market: {
// gupiao: '株式市場',
// collect: 'お気に入り'
// },
// ipo: {
// title: 'IPO',
// title1: '抽選申込履歴',
// title2: '当選履歴',
// button1: '申し込み中',
// button2: '申し込み終了',
// jiage: '公開価格',
// shijia: 'リアルタイムマーケット',
// shuliang: '公募数',
// shijian: '抽選日',
// windowLabel1: '公開価格',
// windowLabel2: '想定金額',
// windowLabel3: '申込数量',
// zang: '開ける'
// },
// hongli: {
// title: 'ボーナスストック',
// title2: '☆ ボーナスストック ☆',
// button1: 'ストック',
// button2: 'アプリケーションリスト',
// column_name: '銘柄名',
// column_jiage: '定期購入価格',
// column_daima: '証券コード',
// column_name2: '名前/ティッカー',
// column_jiage2: '購読価格/申込数',
// column_chengjiaoe: 'ひっくり返す',
// column_zhuangtai: '州',
// window_bianma: 'コーディング',
// window_shijia: '市場価格',
// window_zhangdie: '浮き沈み',
// window_heji: '合計',
// window_yue: '利用可能残高',
// submit: '購入を確認する'
// },
// gendan: {
// title: 'スマートなフォローアップ',
// fadanren: '発行者',
// name: '製品名',
// zijinguimo: 'ファンドの規模',
// jiezhishijian: '応募締切: ',
// zuiditouzi: '最低投資額',
// mairujine: '買取金額',
// button: '命令に従う',
// jilu: '記録',
// yingli: '利益',
// warning1: '購入価格を入力してください',
// warning2: '購入価格には小数点第 2 位までしか入力できません。',
// placeholder: '購入金額を入力してください'
// },
// gendanjilu: {
// title: '文書記録',
// dingdanhao: '注文番号',
// mairujine: '買取金額',
// zuorishouyi: '昨日の収益',
// zongshouyi: '総収益',
// zhuangtai: '州',
// mairushijian: '時間を買う',
// maichushijian: '販売時間',
// button: '売る',
// window_title: '必ず販売しますか?',
// status1: '審査待ち',
// status2: '跟單中',
// status3: 'コピー終了'
// },
// rongzi: {
// title: '信用融資',
// tip1: '迅速な承認',
// tip2: 'クレジット申請を迅速に処理する',
// tip3: '柔軟な返済',
// tip4: 'お客さまの状況に合わせた多彩な返済プラン',
// tip5: '透明性の高い金利',
// tip6: '私たちは透明性のある公正な金利の提供に努めます',
// tip7: '申請の流れ',
// tip8: 'フォームに記入します: 以下のフォームに記入し、基本情報を提供します。',
// tip9: '審査プロセス: 私たちのチームがあなたの申請を迅速に審査し、あなたに連絡します。',
// tip10: '承認と支払い: 承認されると、すぐにクレジットの承認と支払いが行われます。',
// tip11: '融資額',
// tip12: '300万融資可能',
// tip13: '基本的な個人情報',
// tip14: '名前を入力してください',
// tip15: '名前',
// tip16: 'ID番号',
// tip17: 'ID番号を入力してください',
// tip18: '住所',
// tip19: '住所を入力してください',
// tip20: '連絡先番号',
// tip21: '連絡先番号を入力してください',
// tip22: '電子メールアドレス',
// tip23: 'メールアドレスを入力してください',
// tip24: '今すぐお申し込みください',
// tip25: '別の借金をする',
// tip26: '再申請',
// tip27: '情報は審査のために送信されました',
// tip28: '融資が承認されました',
// tip29: 'ローンの審査に落ちた',
// tip30: '提出が成功しました。審査と承認を待っています。',
// tip31: 'クレジットの承認と資金提供がすぐに得られます',
// tip32: '一時的に応募条件を満たしていない場合は、再度応募してください',
// tip33: '最低融資額 500,000',
// tip34: '融資可能額は最大300万円まで',
// tip35: 'データが欠落しています'
// },
// dadan: {
// title: '大量注文の監視',
// title2: '☆ 大量注文の監視と購入 ☆',
// column_name: '銘柄名',
// column_daima: '証券コード',
// column_xianjia: '現在の価格',
// column_jiage: '安全な避難所の価格',
// column_zhangshu: '残り枚数',
// heji: '合計',
// zhuyi: '知らせ',
// unit: '開ける',
// unit2: '共有'
// },
// logout: {
// registertip: 'ア力ウントの新規作成',
// logotip: 'アカウントを持っています'
// },
// orderLog: {
// money: '金額',
// beizhu: '備考'
// },
// customerService: {
// title: 'APP名に連絡する際に使用するAPPを選択してください',
// shiyong: '使用',
// tip: 'LINEアプリで相手と会話ができます。',
// tip2: '無料通話、ビデオ会議、スケジュール共有などの連携機能が利用できます。'
// },
// changePassword: {
// xiugaidenglumima: 'ログインパスワードの変更',
// jiumima: '以前のパスワード',
// xingmima: '新しいパスワード',
// queren: '確認する',
// tip1: '元の出金パスワードを入力してください',
// tip2: '新しい出金パスワードを入力してください',
// tip3: '新しい出金パスワードを6~10桁で入力してください。',
// tip4: '新しいパスワードと確認したパスワードが一致していません'
// },
// user: {
// xinyongpingfen: 'じょうほうようスコア',
// yiqueren: '確認済み',
// zongzichan: '総 資 産',
// xianjinyue: '現金残高',
// beiyongzijin: '待機資金',
// fudongsunyi: '浮動損益',
// yinhangzhanghu: '銀行口座',
// shouru: '入出金履歷',
// benrenqueren: '本人確認',
// rizhisuoyin: 'ログインパスフ-ド',
// shiwuchuli: '取引パスフ-ド',
// kefuzhongxin: 'カスタマ-サ-ビスセンタ-',
// qiehuanyuyan: '言語を切り替える',
// zhuxiao: 'ログアウト',
// chongzhi: '補充する',
// tixian: '現金を引き出す'
// },
// incomeLog: {
// yipizhun: 'レビューパス',
// daishenhe: 'レビュー保留中',
// shenheshibai: 'レビューに失敗しました',
// dingdanbianhao: '注文番号',
// shourujilu: '入金履歷',
// zhichujilu: '出金履歷'
// },
// transactionLog: {
// tab1: '注文履歴',
// tab2: '入金履歷',
// tab3: '出金履歷',
// tip1: '注文番号'
// },
// account: {
// cunquzhanghaodengji: '入出金口座登録',
// chatu: 'さしえ',
// zhanghaoming: '口座名義',
// zhanghao: '口座番号',
// yinghangming: '銀行名',
// fenhangmingceng: '支店名',
// fenhangbianhap: '支店番号',
// cunquzhanghaodengjibtn: '入出金口座の登録'
// },
// checkMsg: {
// shuruxinming: 'お名前を入カしてください',
// shuruzhanghao: '口座番号を入カしてください',
// shuruyinhangming: '銀行名を入カしてください',
// shurufenhangming: '支店名を入カしてください',
// shurufenhanghaomao: '支店番号を入カしてください',
// cunquzhanghaodengjibtn: '入 出 金 口 座 登 録',
// shuruxingmima: '新しいパスワードを入力してください',
// shurujiumima: '古いパスワードを入力してください'
// },
// transactionPassions: {
// shezhishiwuchulitoushi: '取引パスフ-ドを設定する',
// jiumima: '以前の パスフ-ド ',
// xingmima: '新しいパスフ-ド ',
// xingmima2: '新しいパスワードを確認します',
// queren: '確認',
// tip1: '元の出金パスワードを入力してください',
// tip2: '新しい出金パスワードを入力してください',
// tip3: '新しい出金パスワードを6~10桁で入力してください。',
// tip4: '新しいパスワードと確認したパスワードが一致していません'
// },
// indexLoading: {
// label1: '起動...',
// label2: '見積サーバー接続に成功しました...',
// label3: 'アップデートをチェックしています...',
// label4: 'アップデート完了の確認...',
// label5: 'システムにログインします...',
// label6: '見積ホスト情報の取得(GS1DNS)...'
// },
// login: {
// account_placeholder: 'アカウントです',
// account_error: 'アカウントを空にすることはできません',
// password_placeholder: 'パスワードです',
// password_error: 'パスワードは空にできません',
// forget_password: 'パスワードを忘れました',
// register: '登録します',
// button_text: 'ログインする',
// user_info_null: 'ユーザー情報が無効になりました。再ログインしてください'
// },
// register: {
// account_placeholder: '携帯電話番号です',
// account_error: '携帯番号を空にしてはいけません',
// password_placeholder: 'パスワードです',
// password_error: 'パスワードは空にできません。',
// password_again_placeholder: 'パスワードを確認します',
// password_again_error: 'パスワードが空にならないことを確認します。',
// password_repeat_error: '2回で入力したパスワードが違います',
// code_placeholder: '認証コード',
// code_error: '認証コードは空ではいけません',
// code_text: '認証コードを取得します',
// button_text: '登録します',
// button2_text: '今すぐ登録してください',
// tip1: '携帯番号のフォーマットが間違って再入力されました',
// tip2: 'パスワードの長さは6より10より大きくなければなりません'
// }
// }
const messages = {
common: {
submit: '送信',
nodata: 'データなし'
},
search: {
title: '検索',
sousuolishi: '検索履歴',
tip1: 'データなし',
tip2: '読み込み中...',
tip3: '銘柄コードを検索'
},
real_name: {
realName: 'ご本人確認',
tip1: 'ご本人確認に合格しました。再度送信しないでください',
tip2: 'ご本人確認が審査中',
tip3: 'ご本人確認に合格しました',
tip4: 'アップロードが失敗しました',
tip5: '正面のアップロードが完了しました',
tip6: '反面のアップロードが完了しました',
tip7: 'ご本人確認が完了しました',
tip8: 'フルネーム/本名',
tip9: 'IDカードの名前を入力してください',
tip10: 'IDカード番号',
tip11: 'IDカード番号を入力してください',
tip12: '身分証明書の前面をアップロードしてください',
tip13: '身分証明書の裏面をアップロードしてください',
tip14: '送信',
tip15: '拒否の理由、ご本人確認が拒否されました'
},
details: {
xiaoxi: '詳細'
},
seting: {
sheding: '設定',
zhanghu: 'アカウント',
xingming: 'お名前',
denglumima: 'ログインパスワード',
zijinmima: '取引パスワード',
logout: 'ログアウト'
},
yuyan: {
ribenyu: '日本語',
zhongwenjianti: '簡体字中国語',
yinyu: '英語',
xibanyayu: 'スペイン語',
fayu: 'フランス語'
},
withdrawal: {
zhanghuyue: '口座残高',
tilingjine: '出金金額',
jiaoyimima: '取引パスワード',
queren: '確認',
zhuyishixiang: '出金ルール',
tip1: '出金金額を入力してください',
tip2: '取引パスワードを入力してください',
tixian: '出金',
chikaren: 'アカウント所有者',
title: '銀行アカウント番号を選択',
tip3: '銀行アカウント番号を追加',
tip4: '銀行アカウント番号を選択してください',
tip5: '出金金額を入力してください',
tip6: '取引パスワードを入力してください',
tip7: '金額:1,000 円から',
tip8: '手数料:無料',
tip9: '出金できる時間帯:平日の9:00-15:30',
tip10: '出金は24時間内に着金します'
},
recharge: {
chongzhijine: '入金金額',
queren: '確認',
zhuyishixiang: '入金時の注意事項'
},
toastText: {
chenggong: '申請が完了しました',
shibai: '申請が失敗しました',
tip1: '情報を読み込み中...'
},
order: {
tip1: '銘柄詳細'
},
tabbar: {
index: 'ホーム',
market: '相場',
jiaoyi: '取引き',
record: 'ニュース',
user: '個人情報'
},
index: {
gongneng: 'オプション',
hot: '人気銘柄',
button1: 'IPO',
button2: 'カスタマーサービス',
button3: 'アカウント',
button4: '取引履歴',
tip1: 'ご本人確認が未完了',
tip2: '詳しい'
},
gupiaoDetail: {
title: '銘柄詳細',
label1: '始値',
label2: '終値',
label3: '高値',
label4: '安値',
label5: '出来高',
label6: '売買代金',
date1: '時間線',
date2: '日足',
date3: '7分',
date4: '30分',
shijia: '成行価格',
xianjia: '指値',
maiduo: '買い',
maikong: '売り',
submit: '送信',
inputLabel1: '価格',
inputLabel2: '単元(株)',
inputLabel3: 'レバレッジ(倍)',
windowLabel1: '委託価格',
windowLabel2: '委託数量(株)',
windowLabel3: '元金',
windowLabel4: '含み金額',
windowLabel5: '手数料',
windowLabel6: '合計金額',
windowLabel7: '使用可能金額',
tip1: '時間',
tip2: '時間を選択',
tip3: '1分',
tip4: '5分',
tip5: '15分',
tip6: '30分',
tip7: '45分',
tip8: '日',
tip9: '週',
tip10: '月',
tip11: '購入履歴',
tip12: '戻る'
},
message: {
xiaoxi: 'メッセージ'
},
jiaoyi: {
title: 'アカウント',
total: '損益·含み金額 など',
weishixiansunyi: 'ポジション',
yishixiansunyi: '注文照会',
sunyiheji: '推定損益総額',
shizhiheji: '時価総額',
sunyiheji2: '時価損益',
sunyiheji3: 'IPOの申込み',
shizhihej2i: '時価総額(利益額)',
yue: '使用可能な残高',
dingdanxiangqing: '注文の詳細',
xianzaixianqging: '保有株の詳細',
shuliang: '数量(株)',
chigushu: '保有株数量',
goumaijiage: '買い価格',
xianzaijiage: '売り価格',
xianjia: '成行価格',
shouxufei: '手数料',
sunyilv: '損益率',
goumaizongjia: '総コスト',
xianzaizongjia: '時価総額',
shijian: '時間',
yugusunyi: '推定損益',
yugusunyi2: '利益額',
chicang: '保有ポジション',
pingcang: '決済',
gupiaoxiangqing: '銘柄詳細',
maichu: '決済',
chedan: '注文を取り消し',
tip1: '保有中',
tip2: '決済済み',
tip3: '決済中',
tip4: '指値決済中',
tip5: '注文を取り消し',
tip6: 'コメント',
tip7: '注文の決済を実行しますか',
tip8: '戻る',
tip9: '確認',
tip10: '注文をキャンセルしますか',
fangxiang: '買い方向',
zhang: '上昇',
die: '下降',
jiage: '価格',
zhognqianshuliang: '当選数量',
shenqingliang: '申込み数量',
chouqianri: '抽選日',
faquanri: '発売日',
renjiaogushu: 'お支払い株数',
txt1: '当選済み数量',
txt2: '当選支払済数量',
txt3: '当選待ち',
txt4: '当選済み',
txt5: '審査済み',
txt6: '落選'
},
jiaoyiDetail: {
title: '銘柄詳細',
leixing: '状態',
danhao: '注文番号',
mairushijian: '購入時間',
mairujia: '買い価格',
maichushijian: '売り時間',
maichujia: '売り価格',
shuliang: '買い数量',
yingkui: '損益額',
mairuzongjia: '売却総時価',
ganggan: 'レバレッジ倍数',
zuizhongjiage: '最終価格',
shouxufei: '手数料'
},
market: {
gupiao: '相場',
collect: 'ウォッチリスト'
},
ipo: {
title: 'IPO',
title1: 'お申し込み履歴',
title2: '当選履歴',
button1: 'お申し込み可能数',
button2: '申請履歴',
jiage: '引受価格',
shijia: '成行価格',
shuliang: '公募数量',
shijian: '抽選日',
windowLabel1: '公開価格',
windowLabel2: 'お申し込み数量(ロット数)',
windowLabel3: '總金額',
zang: '単元株数'
},
dadan: {
title: ' ブロック取引',
title2: '☆ ブロック取引 ☆',
column_name: '銘柄名',
column_daima: '銘柄コード',
column_xianjia: '時価',
column_jiage: 'ヘッジ価格',
column_zhangshu: '残り枚数',
heji: '合計',
zhuyi: '注意',
unit: 'ロット数',
unit2: '株',
tip1: '購読が成功しました',
tip2: '購読に失敗しました',
tip3: '申請中'
},
hongli: {
title: '市場前取引',
title2: '☆ 市場前取引 ☆',
button1: '銘柄',
button2: '申請リスト',
column_name: '銘柄名',
column_jiage: 'お申し込み価格',
column_daima: '銘柄コード',
column_name2: '銘柄名/銘柄コード',
column_jiage2: '申込み価格/申込み数量',
column_chengjiaoe: '売買代金額',
column_zhuangtai: '狀態',
window_bianma: 'コード',
window_shijia: '時価',
window_zhangdie: '漲跌',
window_heji: '合計',
window_yue: '利用可能額',
submit: '購入を確認',
tip1: 'お申し込みが完了しました',
tip2: 'お申し込みに失敗しました',
tip3: '申請中'
},
gendan: {
title: 'スマートフォローアップ',
fadanren: '発行者',
name: '商品名',
zijinguimo: '資金量',
jiezhishijian: '申請期限: ',
zuiditouzi: '最小限投資額',
mairujine: '購入金額',
button: 'フォローアップ',
jilu: '履歴',
yingli: '利益',
warning1: '購入価格を入力してください',
warning2: '購入価格は小数点以下 2 桁まで保留',
placeholder: '購入金額を入力してください'
},
gendanjilu: {
title: 'フォローアップ履歴',
dingdanhao: '注文番号',
mairujine: '購入金額',
zuorishouyi: '昨日の収益',
zongshouyi: '総利益額',
zhuangtai: 'ステータス',
mairushijian: '買い時間',
maichushijian: '売り時間',
button: '決済',
window_title: '決済を確認しますか',
status1: '審査待ち',
status2: 'フォローアップ中',
status3: 'フォローアップ終了'
},
rongzi: {
title: '信用融資',
tip1: 'クイック承認',
tip2: 'クイック融資を申請',
tip3: '柔軟返済',
tip4: 'あなたの状況に合わせたさまざまな返済プラン',
tip5: '透明性のある金利',
tip6: '弊社は透明性のある公正な金利を提供することに尽力しています',
tip7: '申請プロセス',
tip8: 'フォームに記入: 以下のフォームに記入し、基本情報を提供してください',
tip9: '審査プロセス: 弊社の担当がをご申請を迅速に審査後、ご連絡します',
tip10: '承認完了と支払い: 承認されると、融資の承認と支払いがすぐ獲得できます',
tip11: '融資金額',
tip12: '融資可能金額1億円',
tip13: '基本的な個人情報',
tip14: 'お名前を入力してください',
tip15: 'お名前',
tip16: 'IDカード番号',
tip17: 'ID 番号を入力してください',
tip18: '住所',
tip19: '住所を入力してください',
tip20: '連絡先番号',
tip21: '連絡先番号を入力してください',
tip22: 'メールアドレス',
tip23: 'メールアドレスを入力してください',
tip24: '今すぐ申請します',
tip25: 'もう一回融資を申請',
tip26: 'さらに融資します',
tip27: '申請資料を審査に提出します',
tip28: '融資が承認されました',
tip29: '融資の承認が失敗しました',
tip30: '融資申請の提出が完了、承認の結果待ち',
tip31: 'もうすぐ融資の承認結果と資金が獲得できます',
tip32: 'まだ融資条件を満たしていないため、もう一度申請してください',
tip33: '最低融資額 500,000円',
tip34: '融資可能な最大額は300万円',
tip35: '情報が不足しています',
tip36: 'カスタマサービスセンターにお問い合わせください',
tip37: 'ホームへ戻る'
},
orderLog: {
money: '金額',
beizhu: 'コメント'
},
customerService: {
title: 'APP名に関連するAPPを選択してください',
shiyong: '利用します',
tip: 'LINEアプリで相手とトークすることができます',
tip2: '無料通話、ビデオ会議、スケジュール共有などのコラボレーション機能が利用できます'
},
logout: {
registertip: 'アカウントを登録',
logotip: 'アカウントを持っています'
},
transactionLog: {
tab1: '注文履歴',
tab2: '入金履歴',
tab3: '出金履歴',
tip1: '注文番号',
tip2: '審査中',
tip3: '審査完了',
tip4: '審査に失敗しました'
},
incomeLog: {
yipizhun: '承認が完了しました',
daishenhe: '審査待ち',
shenheshibai: '承認が失敗しました',
dingdanbianhao: '注文番号',
shourujilu: '入金履歴',
zhichujilu: '出金履歴'
},
changePassword: {
xiugaidenglumima: 'ログインパスワードを変更',
jiumima: '旧パスワード',
xingmima: '新パスワード',
queren: '確認',
tip1: '旧パスワードを入力してください',
tip2: '新しいパスワードを入力してください',
tip3: '新しいパスワードを6~10桁で入力してください',
tip4: '新しいパスワードと検証用の新しいパスワードが一致していません'
},
user: {
xinyongpingfen: '信用スコア',
yiqueren: '設定',
zongzichan: '総資産',
xianjinyue: '使用可能の残高',
beiyongzijin: '使用済金額',
fudongsunyi: '変動損益',
yinhangzhanghu: '銀行アカウント番号',
shouru: '入出金履歴',
benrenqueren: 'ご本人確認',
rizhisuoyin: 'ログインパスワードを変更',
shiwuchuli: '取引パスワード',
kefuzhongxin: 'カスタマーサービスセンター',
qiehuanyuyan: '言語を切り替え',
zhuxiao: 'ログアウトする',
chongzhi: '入金する',
tixian: '出金する',
tip1: '指定のカスタマーサービス窓口担当に連絡して入金手続きを行ってください。'
},
account: {
cunquzhanghaodengji: '入出金口座の登録',
chatu: '画像を添付する',
zhanghaoming: 'アカウント名',
zhanghao: 'アカウント',
yinghangming: '銀行名',
fenhangmingceng: '支店名',
fenhangbianhap: '支店番号',
cunquzhanghaodengjibtn: '入出金口座登録'
},
checkMsg: {
shuruxinming: '名前を入力してくださ',
shuruzhanghao: '口座番号を入力してください',
shuruyinhangming: '銀行名を入力してください',
shurufenhangming: '支店名を入力してください',
cunquzhanghaodengjibtn: '入出金講座を登録',
shurufenhanghaomao: '支店番号を入力してください',
shuruxingmima: '新しいパスワードを入力してください',
shurujiumima: '旧パスワードを入力してください'
},
transactionPassions: {
shezhishiwuchulitoushi: '取引パスワードを変更',
jiumima: '旧パスワード',
xingmima: '新しいパスワード',
xingmima2: '新しいパスワードを確認しますか',
queren: '確認します',
tip1: '元の出金パスワードを入力してください',
tip2: '新しい出金パスワードを入力してください',
tip3: '6〜10桁の新しい出金パスワードを入力してください',
tip4: '新しいパスワードと検証用のパスワードが一致していません'
},
indexLoading: {
label1: '起動中...',
label2: '見積サーバーに接続しました......',
label3: 'アップデートをチェックしています...',
label4: '更新の確認が完了しました...',
label5: 'システムにログイン...',
label6: '見積ホスト情報(GS1DNS)を取得...'
},
login: {
tip1: 'ログイン',
tip2: '登録する',
tip3: 'ログインアカウント',
account_placeholder: 'アカウント',
account_error: 'アカウントを空にすることはできません',
password_placeholder: 'パスワード',
password_error: 'パスワードを空にすることはできません',
forget_password: 'パスワードを忘れた',
register: 'アカウントがありませんか?',
button_text: 'ログイン',
user_info_null: 'ユーザー情報の有効期限が切れています。再度ログインしてください'
},
register: {
tip3: 'ログイン',
tip4: '登録アカウント',
account_placeholder: '携帯電話番号',
account_error: '携帯電話番号を空にすることはできません',
password_placeholder: 'パスワード',
password_error: 'パスワードを空にすることはできません',
password_again_placeholder: 'パスワードを検証します',
password_again_error: 'パスワードの検証は空にすることはできません',
password_repeat_error: '2回入力したパスワードは一致していません',
code_placeholder: '招待コード',
code_error: '招待コードを空にすることはできません',
code_text: '確認コードを取得',
button_text: '登録',
button2_text: 'すでにアカウントを持っています、今すぐログインします',
tip1: '携帯電話番号の形式が間違っています。再入力してください',
tip2: 'パスワードの長さは6~10桁以内に控えてください'
}
}
export default messages
// 西班牙语
const messages = {
common: {
submit: 'enviar',
nodata: 'Aún no hay datos~~'
},
search: {
title: 'Buscar',
sousuolishi: 'Historial de búsqueda',
tip1: 'Aún no hay datos',
tip2: 'Cargando...',
tip3: 'Buscar código de acciones'
},
real_name: {
realName: 'Autenticación de nombre real',
tip1: 'Se ha pasado la autenticación de nombre real, no vuelva a enviarla',
tip2: 'Autenticación de nombre real bajo revisión',
tip3: 'Se aprobó la autenticación de nombre real',
tip4: 'Error en la carga',
tip5: 'Carga positiva exitosa',
tip6: 'La parte posterior se cargó correctamente',
tip7: 'Nombre real autenticado',
tip8: 'Nombre de identificación',
tip9: 'Por favor ingrese el nombre\n de su tarjeta de identificación',
tip10: 'Número de identificación',
tip11: 'Por favor ingrese su número\n de identificación',
tip12: 'Sube el frente de tu identificación',
tip13: 'Sube el reverso de tu DNI',
tip14: 'entregar',
tip15: 'Motivo del rechazo, la autenticación de su nombre real ha sido rechazada porque'
},
details: {
xiaoxi: 'Detalles'
},
seting: {
sheding: 'configuración',
zhanghu: 'Cuenta',
xingming: 'Nombre',
denglumima: 'Contraseña de inicio de sesión',
zijinmima: 'Contraseña del fondo',
logout: 'desconectar'
},
yuyan: {
ribenyu: 'japonés',
zhongwenjianti: 'Chino simplificado',
yinyu: 'Inglés',
xibanyayu: 'español',
fayu: 'Francés'
},
withdrawal: {
zhanghuyue: 'Saldo de cuenta',
tilingjine: 'Monto del retiro',
jiaoyimima: 'Contraseña de transacción',
queren: 'confirmar',
zhuyishixiang: 'Cosas a tener en cuenta al retirar',
tip1: 'Cosas a tener en cuenta al retirar',
tip2: 'Por favor ingrese su contraseña de transacción',
tixian: 'Retraerse a',
chikaren: 'titular de la tarjeta',
title: 'Seleccionar cuenta bancaria',
tip3: 'Agregar cuenta bancaria',
tip4: 'Seleccione un número de cuenta bancaria',
tip5: 'Por favor ingrese el monto del retiro',
tip6: 'Por favor ingrese la contraseña de la transacción',
tip7: 'Cantidad: Desde 10.000 yenes',
tip8: 'Tarifas: Gratis',
tip9: 'Horario de retiro: días laborables de 9:00 a 15:30',
tip10: 'Los retiros llegarán dentro de las 24 horas'
},
recharge: {
chongzhijine: 'cantidad de recarga',
queren: 'confirmar',
zhuyishixiang: 'Cosas a tener en cuenta al recargar'
},
toastText: {
chenggong: 'Solicitud exitosa',
shibai: 'Solicitud fallida',
tip1: 'Carga de información...'
},
order: {
tip1: 'Detalles de stock'
},
tabbar: {
index: 'pagina de inicio',
market: 'mercado',
jiaoyi: 'comercio',
record: 'Información',
user: 'personal'
},
index: {
gongneng: 'Función',
hot: 'Acciones populares',
button1: 'IPO',
button2: 'servicio al cliente',
button3: 'Cuentas',
button4: 'Detalles de la transacción',
tip1: 'No es el nombre real',
tip2: 'detallado'
},
gupiaoDetail: {
title: 'Detalles de stock',
label1: 'Abierto hoy',
label2: 'Recogido ayer',
label3: 'más alto',
label4: 'más bajo',
label5: 'Volumen',
label6: 'Precio total de la transacción',
date1: 'Serie de tiempo',
date2: 'japonés k',
date3: '7 puntos',
date4: '30 min',
shijia: 'precio de mercado',
xianjia: 'límite de precio',
maiduo: 'comprar largo',
maikong: 'corto',
submit: 'entregar',
inputLabel1: 'precio',
inputLabel2: 'Unidad (compartir)',
inputLabel3: 'Apalancamiento (veces)',
windowLabel1: 'Precio de comisión',
windowLabel2: 'Cantidad de pedido (acciones)',
windowLabel3: 'principal',
windowLabel4: 'Valor comercial',
windowLabel5: 'tarifa de manejo',
windowLabel6: 'total',
windowLabel7: 'saldo disponible',
tip1: 'tiempo',
tip2: 'Seleccionar hora',
tip3: '1 min',
tip4: '5 min',
tip5: '15 min',
tip6: '30 min',
tip7: '45 min',
tip8: 'cielo',
tip9: 'semana',
tip10: 'luna',
tip11: 'Historial de compras',
tip12: 'devolver'
},
message: {
xiaoxi: 'información'
},
jiaoyi: {
title: 'Cuentas',
total: 'Pérdidas y ganancias, valor de mercado, etc.',
weishixiansunyi: 'Ganancias y pérdidas no realizadas',
yishixiansunyi: 'Ganancias y pérdidas realizadas',
sunyiheji: 'Ganancias y pérdidas totales estimadas',
shizhiheji: 'Capitalización de mercado total',
sunyiheji2: 'Ganancias y pérdidas realizadas',
sunyiheji3: 'Nueva lotería de acciones',
shizhihej2i: 'Capitalización de mercado total (ganancias y pérdidas realizadas)',
yue: 'saldo disponible',
dingdanxiangqing: 'Detalles del pedido',
xianzaixianqging: 'Detalles ahora',
shuliang: 'Cantidad (piezas)',
chigushu: 'Número de acciones poseídas',
goumaijiage: 'Precio de oferta',
xianzaijiage: 'precio de venta',
xianjia: 'Precio actual',
shouxufei: 'tarifa de manejo',
sunyilv: 'relación de pérdidas y ganancias',
goumaizongjia: 'costo total',
xianzaizongjia: 'capitalización de mercado total',
shijian: 'tiempo',
yugusunyi: 'Ganancias y pérdidas estimadas',
yugusunyi2: 'Obtener ganancias y pérdidas',
chicang: 'Posición',
pingcang: 'Posición cercana',
gupiaoxiangqing: 'Detalles de stock',
maichu: 'vender',
chedan: 'Cancelar pedido',
tip1: 'en posición',
tip2: 'Posición cerrada',
tip3: 'Cierre de posición',
tip4: 'orden pendiente',
tip5: 'Orden cancelada',
tip6: 'pista',
tip7: '¿Están confirmadas las órdenes de venta?',
tip8: 'devolver',
tip9: 'Seguro',
tip10: '¿Estás seguro de cancelar el pedido?',
fangxiang: 'Dirección de compra',
zhang: 'elevar',
die: 'caer',
jiage: 'precio',
zhognqianshuliang: 'Cantidad ganadora',
shenqingliang: 'Volumen de aplicación',
chouqianri: 'dia del sorteo',
faquanri: 'Fecha de asunto',
renjiaogushu: 'Número de acciones suscritas',
txt1: 'El boleto ganador debe ser pagado.',
txt2: 'Se ha suscrito la lotería ganadora.',
txt3: 'Esperando ganar la lotería',
txt4: 'ganó la lotería',
txt5: 'Aprobado',
txt6: 'no gano la loteria'
},
jiaoyiDetail: {
title: 'Detalles de stock',
leixing: 'estado',
danhao: 'Número de transacción',
mairushijian: 'ganando tiempo',
mairujia: 'Precio de oferta',
maichushijian: 'tiempo de venta',
maichujia: 'precio de venta',
shuliang: 'Número de acciones negociadas',
yingkui: 'Monto de pérdidas y ganancias',
mairuzongjia: 'Capitalización del mercado de transacciones',
ganggan: 'Aprovechar múltiples',
zuizhongjiage: 'precio final',
shouxufei: 'tarifa de manejo'
},
market: {
gupiao: 'mercado de valores',
collect: 'recolectar'
},
ipo: {
title: 'IPO',
title1: 'Currículum de solicitud de lotería',
title2: 'Historia electoral',
button1: 'Disponible para suscripción',
button2: 'Registro de solicitud',
jiage: 'precio de suscripción',
shijia: 'precio de mercado',
shuliang: 'Número de ofertas públicas',
shijian: 'dia del sorteo',
windowLabel1: 'precio publico',
windowLabel2: 'Cantidad de suscripción',
windowLabel3: 'suma global',
zang: 'abierto'
},
dadan: {
title: 'bloquear el comercio',
title2: '☆ bloquear el comercio ☆',
column_name: 'Nombre de la acción',
column_daima: 'Código de acciones',
column_xianjia: 'Precio actual',
column_jiage: 'precio de refugio seguro',
column_zhangshu: 'Número restante de hojas',
heji: 'total',
zhuyi: 'Aviso',
unit: 'abierto',
unit2: 'compartir',
tip1: 'Suscripción exitosa',
tip2: 'Suscripción fallida',
tip3: 'Aplicando'
},
hongli: {
title: 'negociación previa al mercado',
title2: '☆ negociación previa al mercado ☆',
button1: 'existencias',
button2: 'Lista de aplicaciones',
column_name: 'Nombre de la acción',
column_jiage: 'Precio de suscripción',
column_daima: 'Código de acciones',
column_name2: 'Nombre/ticker',
column_jiage2: 'Precio de suscripción/Volumen de solicitudes',
column_chengjiaoe: 'Volumen de negocios',
column_zhuangtai: 'estado',
window_bianma: 'codificación',
window_shijia: 'precio de mercado',
window_zhangdie: 'vaivenes',
window_heji: 'total',
window_yue: 'saldo disponible',
submit: 'Confirmar para comprar',
tip1: 'Suscripción exitosa',
tip2: 'Suscripción fallida',
tip3: 'Aplicando'
},
gendan: {
title: 'Seguimiento inteligente',
fadanren: 'Editor',
name: 'Nombre del producto',
zijinguimo: 'Tamaño del fondo',
jiezhishijian: 'Fecha límite de solicitud: ',
zuiditouzi: 'Inversión mínima',
mairujine: 'Monto de compra',
button: 'seguir ordenes',
jilu: 'registro',
yingli: 'ganancia',
warning1: 'Por favor ingrese el precio de compra',
warning2: 'El precio de compra sólo puede tener dos decimales.',
placeholder: 'Por favor ingresa el monto de la compra'
},
gendanjilu: {
title: 'Registros de documentación',
dingdanhao: 'Número de orden',
mairujine: 'Monto de compra',
zuorishouyi: 'Ganancias de ayer',
zongshouyi: 'ingresos totales',
zhuangtai: 'condición',
mairushijian: 'ganando tiempo',
maichushijian: 'tiempo de venta',
button: 'vender',
window_title: '¿Estás seguro de vender?',
status1: 'Pendiente de revisión',
status2: 'Siguiendo órdenes',
status3: 'Fin de la copia'
},
rongzi: {
title: 'financiación de crédito',
tip1: 'Aprobación rápida',
tip2: 'Procesar solicitudes de crédito rápidamente',
tip3: 'Pago flexible',
tip4: 'Varios planes de pago que se adaptan a su situación personal',
tip5: 'Tasas de interés transparentes',
tip6: 'Estamos comprometidos a ofrecer tasas de interés transparentes y justas.',
tip7: 'Proceso de solicitud',
tip8: 'Complete el formulario: Complete el siguiente formulario y proporcione información básica',
tip9: 'Proceso de revisión: nuestro equipo revisará rápidamente su solicitud y se comunicará con usted.',
tip10: 'Aprobación y desembolso: Una vez aprobado, recibirás la aprobación del crédito y el desembolso rápidamente',
tip11: 'monto del préstamo',
tip12: 'Préstamo disponible: 100 millones de yenes',
tip13: 'información personal básica',
tip14: 'Por favor ingrese el nombre',
tip15: 'Nombre',
tip16: 'número de identificación',
tip17: 'Por favor ingrese su número de \nidentificación',
tip18: 'DIRECCIÓN',
tip19: 'Por favor ingrese la dirección',
tip20: 'Número de contacto',
tip21: 'Por favor ingrese el número de \ncontacto',
tip22: 'dirección de correo electrónico',
tip23: 'Por favor ingrese la dirección \n de correo electrónico',
tip24: 'Aplicar ahora',
tip25: 'Otro préstamo',
tip26: 'Aplicar de nuevo',
tip27: 'La información ha sido enviada para su revisión',
tip28: 'Préstamo aprobado',
tip29: 'Error en la revisión del préstamo',
tip30: 'Felicitaciones por su envío exitoso, esperando aprobación',
tip31: 'Obtendrá aprobación de crédito y financiación rápidamente',
tip32: 'Aún no cumples con las condiciones de solicitud, por favor vuelve a presentar tu solicitud',
tip33: 'Préstamo mínimo 500.000',
tip34: 'Puede pedir prestado hasta 3 millones',
tip35: 'Datos faltantes',
tip36: 'Contactar con el servicio de atención al cliente',
tip37: 'Volver a la página de inicio'
},
orderLog: {
money: 'Cantidad',
beizhu: 'Observación'
},
customerService: {
title: 'Seleccione la APLICACIÓN que desea utilizar cuando se comunique con el nombre de la APLICACIÓN',
shiyong: 'usar',
tip: 'Puedes chatear con la otra parte en LINE APP.',
tip2: 'Se encuentran disponibles funciones de colaboración como llamadas gratuitas, videoconferencias y uso compartido de horarios.'
},
logout: {
registertip: 'Registrar una cuenta',
logotip: 'tengo una cuenta'
},
transactionLog: {
tab1: 'Historial de pedidos',
tab2: 'Registro de depósito',
tab3: 'Registros de retiro',
tip1: 'número de orden',
tip2: 'Pendiente de revisión',
tip3: 'Revisión exitosa',
tip4: 'Revisión fallida'
},
incomeLog: {
yipizhun: 'Aprobado',
daishenhe: 'Pendiente de revisión',
shenheshibai: 'Revisión fallida',
dingdanbianhao: 'número de orden',
shourujilu: 'Registro de depósito',
zhichujilu: 'Registros de retiro'
},
changePassword: {
xiugaidenglumima: 'Cambiar contraseña de inicio de sesión',
jiumima: 'Contraseña anterior',
xingmima: 'Nueva contraseña',
queren: 'confirmar',
tip1: 'Por favor ingrese la contraseña actual',
tip2: 'Por favor ingrese una nueva contraseña',
tip3: 'Por favor, introduzca una nueva contraseña con una longitud de entre 6 y 10 dígitos',
tip4: 'La nueva contraseña y la nueva contraseña confirmada son inconsistentes'
},
user: {
xinyongpingfen: 'Calificación para información',
yiqueren: 'configuración',
zongzichan: 'activos totales',
xianjinyue: 'saldo disponible',
beiyongzijin: 'fondos usados',
fudongsunyi: 'Pérdidas y ganancias flotantes',
yinhangzhanghu: 'cuenta bancaria',
shouru: 'Registros de depósitos y retiros',
benrenqueren: 'Autenticación de nombre real',
rizhisuoyin: 'Cambiar contraseña de inicio de sesión',
shiwuchuli: 'Cambiar contraseña de pago',
kefuzhongxin: 'centro de atención al cliente',
qiehuanyuyan: 'cambiar de idioma',
zhuxiao: 'desconectar',
chongzhi: 'completar',
tixian: 'retirar efectivo',
tip1: 'Comuníquese con el representante de servicio al cliente designado para completar el procedimiento de depósito.'
},
account: {
cunquzhanghaodengji: 'Registro de cuenta de depósito y retiro',
chatu: 'ilustración',
zhanghaoming: 'Nombre de cuenta',
zhanghao: 'cuenta',
yinghangming: 'nombre del banco',
fenhangmingceng: 'Nombre de la sucursal',
fenhangbianhap: 'número de sucursal',
cunquzhanghaodengjibtn: 'Registro de cuenta de depósito y retiro'
},
checkMsg: {
shuruxinming: 'Por favor ingresa tu nombre',
shuruzhanghao: 'Por favor ingrese el número de cuenta',
shuruyinhangming: 'Por favor ingrese el nombre del banco',
shurufenhangming: 'Por favor ingrese el nombre de la sucursal',
cunquzhanghaodengjibtn: 'Entrar y salir del Bloque Jinkou Iniciar sesión',
shurufenhanghaomao: 'Por favor ingrese el número de sucursal',
shuruxingmima: 'Por favor ingrese una nueva contraseña',
shurujiumima: 'Por favor ingrese la contraseña anterior'
},
transactionPassions: {
shezhishiwuchulitoushi: 'Establecer contraseña',
jiumima: 'Contraseña anterior',
xingmima: 'Nueva contraseña',
xingmima2: 'Confirmar nueva contraseña',
queren: 'confirmar',
tip1: 'Por favor ingrese la contraseña de retiro original',
tip2: 'Por favor ingrese la nueva contraseña de retiro',
tip3: 'Complete la nueva contraseña de retiro con una longitud de 6 a 10 caracteres',
tip4: 'La nueva contraseña y la contraseña confirmada son inconsistentes'
},
indexLoading: {
label1: 'A partir de...',
label2: 'Conexión exitosa al servidor de cotizaciones...',
label3: 'Buscando actualizaciones...',
label4: 'Verificación de actualización completada...',
label5: 'Iniciando sesión en el sistema...',
label6: 'Obtener información del host de cotización (GS1DNS)...'
},
login: {
tip1: 'Acceso',
tip2: 'registro',
tip3: 'Iniciar sesión en la cuenta',
account_placeholder: 'cuenta',
account_error: 'La cuenta no puede estar vacía',
password_placeholder: 'contraseña',
password_error: 'La contraseña no puede estar vacía',
forget_password: 'olvida la contraseña',
register: 'registro',
button_text: 'Acceso',
user_info_null: 'La información del usuario ha caducado, inicie sesión nuevamente'
},
register: {
tip3: 'Acceso',
tip4: 'Registrar una cuenta',
account_placeholder: 'Número de teléfono',
account_error: 'El número de teléfono móvil no puede estar vacío',
password_placeholder: 'contraseña',
password_error: 'La contraseña no puede estar vacía',
password_again_placeholder: 'confirmar Contraseña',
password_again_error: 'Confirmar contraseña no puede estar vacía',
password_repeat_error: 'Las contraseñas ingresadas dos veces son diferentes',
code_placeholder: 'Código de invitación',
code_error: 'El código de invitación no puede estar vacío',
code_text: 'Obtener código de verificación',
button_text: 'registro',
button2_text: '¿Ya tienes una cuenta? Iniciar sesión ahora',
tip1: 'El formato del número de teléfono móvil es incorrecto, vuelva a ingresarlo.',
tip2: 'La longitud de la contraseña debe ser mayor que 6 y menor que 10'
}
}
export default messages
import { createSSRApp } from 'vue'
import App from './App.vue'
// import '@/style/base/normalize/normalize.css'
import '@/style/index.scss'
import i18n from '@/langurage/index'
import NotData from '@/components/notData/index.vue'
import Navigater from '@/components/navigator/navigator.vue'
import { Switch, Dialog, Icon, Button, Field, Search, Loading, Popup, Stepper, Cell, CellGroup, Picker, Image as VanImage, Badge, TextEllipsis } from 'vant'
import 'vant/lib/index.css'
import 'animate.css/animate.min.css'
import './style/tailwind.scss'
import { createPinia } from 'pinia'
const pinia = createPinia()
// uni.setStorageSync('locale', 'jp')
export function createApp() {
const app = createSSRApp(App)
.use(pinia)
.use(i18n)
.use(Icon)
.use(Button)
.use(Field)
.use(Loading)
.use(Search)
.use(Popup)
.use(Stepper)
.use(Cell)
.use(CellGroup)
.use(Picker)
.use(VanImage)
.use(Badge)
.use(TextEllipsis)
.use(Dialog)
.use(Switch)
app.component('NotData', NotData)
app.component('Navigater', Navigater)
return {
app
}
}
{
"name": "",
"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": "/japan3/"
}
}
}
{
"pages": [
{
"path": "subPackages/indexLoading/indexLoading",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/market/market",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/jiaoyi/jiaoyi",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/record/record",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/user/user",
"style": {
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "subPackages/login",
"pages": [
{
"path": "login",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/order",
"pages": [
{
"path": "order",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/message",
"pages": [
{
"path": "message",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/index",
"pages": [
{
"path": "gupiaoDetail/gupiaoDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "ipo/ipo",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "dadan/dadan",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "hongli/hongli",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "gendan/gendan",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "gendan/record",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "rongzi/rongzi",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/jiaoyi",
"pages": [
{
"path": "jiaoyiDetail/jiaoyiDetail",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/bankAccount",
"pages": [
{
"path": "bankAccount",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/bankAccount",
"pages": [
{
"path": "accountLog",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/search",
"pages": [
{
"path": "search",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/webview",
"pages": [
{
"path": "webview",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/withdrawal",
"pages": [
{
"path": "withdrawal",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/real_name",
"pages": [
{
"path": "real_name",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/seting",
"pages": [
{
"path": "seting",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/details",
"pages": [
{
"path": "details",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/recharge",
"pages": [
{
"path": "recharge",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/transactionPassions",
"pages": [
{
"path": "transactionPassions",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/switchLanguage",
"pages": [
{
"path": "switchLanguage",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/confirm",
"pages": [
{
"path": "confirm",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/customerService",
"pages": [
{
"path": "customerService",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/changePassword",
"pages": [
{
"path": "changePassword",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/transactionLog",
"pages": [
{
"path": "transactionLog",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/logout",
"pages": [
{
"path": "logout",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "subPackages/register",
"pages": [
{
"path": "register",
"style": {
"navigationStyle": "custom"
}
}
]
}
],
"tabBar": {
"color": "rgb(0, 0, 0)",
"backgroundColor": "rgb(255, 255, 255)",
"selectedColor": "rgb(80, 175, 240)",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/image/tabbar/index.png",
"selectedIconPath": "static/image/tabbar/index_select.png",
"text": "首页"
},
{
"pagePath": "pages/market/market",
"iconPath": "static/image/tabbar/market.png",
"selectedIconPath": "static/image/tabbar/market_select.png",
"text": "市场"
},
{
"pagePath": "pages/jiaoyi/jiaoyi",
"iconPath": "static/image/tabbar/jiaoyi.png",
"selectedIconPath": "static/image/tabbar/jiaoyi_select.png",
"text": "交易"
},
{
"pagePath": "pages/record/record",
"iconPath": "static/image/tabbar/record_select.png",
"selectedIconPath": "static/image/tabbar/record.png",
"text": "资讯"
},
{
"pagePath": "pages/user/user",
"iconPath": "static/image/tabbar/user.png",
"selectedIconPath": "static/image/tabbar/user_select.png",
"text": "用户"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "Squarepoint",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"easycom": {
"autoscan": true,
"custom": {
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
},
"uniIdRouter": {}
}
<template>
<view id="indexChart" style="width: 100%; height: 154.206px"></view>
</template>
<script lang="ts" setup>
import { init, dispose } from 'klinecharts'
import { onMounted, onUnmounted, watch } from 'vue'
const props = defineProps({
value: {
type: Array,
default: () => []
}
})
let chart: any = null
watch(
() => props.value,
(newData) => {
chart?.applyNewData(newData)
},
{ deep: true }
)
const chartOption = {
// 蜡烛图
candle: {
type: 'candle_solid',
// 蜡烛柱
bar: {
upColor: '#ea3522',
downColor: '#78a386',
noChangeColor: '#888888',
upBorderColor: '#ea3522',
downBorderColor: '#78a386',
noChangeBorderColor: '#888888',
upWickColor: '#ea3522',
downWickColor: '#78a386',
noChangeWickColor: '#888888'
},
// 提示
tooltip: {
showRule: 'none'
}
},
// x轴
xAxis: {
show: true,
// x轴分割文字
tickText: {
color: '#fff'
}
},
// y轴
yAxis: {
// x轴分割文字
tickText: {
color: '#fff'
}
}
}
onMounted(() => {
chart = init('indexChart')
chart.setStyles(chartOption)
})
onUnmounted(() => {
dispose('chart')
})
// const chartOption = {
// // 网格线
// grid: {
// show: true,
// horizontal: {
// show: true,
// size: 1,
// color: '#333',
// style: 'dashed',
// dashedValue: [2, 2]
// },
// vertical: {
// show: true,
// size: 1,
// color: '#333',
// style: 'dashed',
// dashedValue: [2, 2]
// }
// },
// // x轴
// xAxis: {
// show: true,
// size: 'auto',
// // x轴线
// axisLine: {
// show: true,
// color: '#666',
// size: 1
// },
// // x轴分割文字
// tickText: {
// show: true,
// color: '#D9D9D9',
// family: 'Helvetica Neue',
// weight: 'normal',
// size: 12,
// marginStart: 4,
// marginEnd: 4
// },
// // x轴分割线
// tickLine: {
// show: true,
// size: 1,
// length: 3,
// color: '#666'
// }
// },
// // y轴
// yAxis: {
// show: true,
// size: 'auto',
// // 'left' | 'right'
// position: 'right',
// // 'normal' | 'percentage' | 'log'
// type: 'normal',
// inside: false,
// reverse: false,
// // y轴线
// axisLine: {
// show: true,
// color: '#666',
// size: 1
// },
// // x轴分割文字
// tickText: {
// show: true,
// color: '#D9D9D9',
// family: 'Helvetica Neue',
// weight: 'normal',
// size: 12,
// marginStart: 4,
// marginEnd: 4
// },
// // x轴分割线
// tickLine: {
// show: true,
// size: 1,
// length: 3,
// color: '#666'
// }
// },
// // 图表之间的分割线
// separator: {
// size: 1,
// color: '#666',
// fill: true,
// activeBackgroundColor: 'rgba(230, 230, 230, .15)'
// },
// crosshair: {
// show: true,
// // 十字光标水平线及文字
// horizontal: {
// show: true,
// line: {
// show: true,
// style: 'solid',
// size: 1,
// color: '#333'
// }
// },
// vertical: {
// show: true,
// line: {
// show: true,
// style: 'solid',
// size: 1,
// color: '#333'
// }
// }
// }
// }
</script>
<style scoped lang="scss"></style>
<template>
<view class="container" :style="{ height: pageHeight }">
<!-- 顶部 -->
<!-- <view class="nav">
<view class="header">
<view class="head">
<image src="/static/image/user/touxiang.png"></image>
</view>
<view class="info">
<view>{{ desensitization(store.userInfo?.mobile) }}</view>
<view>{{ store.userInfo?.true_name || t('index.tip1') }}</view>
</view>
</view>
<van-badge :dot="dot" style="display: flex">
<image src="/static/image/index/icon_9.png" style="margin-right: 0.63rem" class="w-[1.72rem] h-[1.63rem] block" @click="goWeb()"></image>
<image src="/static/image/index/1.png" class="w-[1.72rem] h-[1.63rem] block" @click="goPage('/subPackages/message/message')"></image>
</van-badge>
</view> -->
<!-- 检索栏 -->
<view class="search">
<image src="/static/image/user/touxiang.png" class="touxian"></image>
<view class="search-box" @click="goPage('/subPackages/search/search')">{{ t('search.tip3') }}</view>
<image src="/static/image/index/1.png" class="xiaoxi" @click="goPage('/subPackages/message/message')"></image>
<image src="/static/image/index/icon_9.png" class="kefu" @click="goWeb()"></image>
<!-- <SearchNavigation /> -->
</view>
<!-- 主体 -->
<view class="content" :style="{ height: `calc(-6.25rem + 100vh)` }">
<view class="content-cord">
<view class="select_wrap">
<view class="flex items-center">
<view class="t1">
<view :class="getColor(activeGupiao)">{{ activeGupiao?.zhangdieshu }}{{ `(${activeGupiao?.zhangdiebaifenbi})%` }} </view>
<view :class="getColor(activeGupiao)" style="font-size: 1.25rem; font-weight: 500">{{ activeGupiao.price }}</view>
</view>
<van-icon :color="getColor(activeGupiao) == 'up' ? '#EA3522' : '#31CC43'" name="play" :class="getColor(activeGupiao) == 'up' ? 'rotate2' : 'rotate1'" />
</view>
<view class="select" @click="openSelect">
<view>{{ activeGupiao?.name || '' }}</view>
<van-icon name="arrow-down" color="#6a69e9" size=".75rem" />
</view>
</view>
<GupiaoChart :value="chartValue" />
<!-- 功能 -->
<view class="wrap">
<view v-for="(item, index) in buttonList" :key="index" class="wrap-item" @click="goToNextPage(item)">
<view class="img-box">
<image :src="item.icon"></image>
</view>
<view class="text">{{ item.label.value }}</view>
</view>
</view>
<!-- <view class="wrap">
<view class="button_wrap">
<view v-for="(item, index) in buttonList" :key="index" class="button" @click="goPage(item.url, index === 1 ? true : false)">
<image :src="item.icon"></image>
<view>{{ item.label.value }}</view>
</view>
</view>
</view> -->
</view>
<!-- 股票 -->
<view class="scroll_list">
<view class="title-top" @click="switchTab('/pages/market/market')">
<view class="title">{{ t('index.hot') }}</view>
<view class="title-right">{{ t('index.tip2') }} <img src="@/static/rigth.png" /></view>
</view>
<view class="gupiao_wrap">
<view
v-for="(item, index) in hotGupiaoList"
:key="index"
:class="item.zhangdieshu <= 0 ? 'down-b' : 'up-b'"
class="gupiao"
@click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)"
>
<view class="flex items-center">
<view class="name">{{ item.name }}</view
>&nbsp;&nbsp;
<view class="daima">{{ item.shuzidaima }}</view>
</view>
<view class="flex items-center justify-between mt-[0.28rem]">
<view>
<div class="flex2">
<view class="text-base text-right" style="font-size: 0.875rem" :class="getColor(item)">{{ item.zhangdieshu }}</view>
<span v-if="item.zhangdiebaifenbi === 0"> - </span>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
</div>
<view class="text-base text-right" style="font-size: 0.875rem" :class="getColor(item)">{{ item.zhangdiebaifenbi }}%</view>
</view>
<view class="text-primary text-lg">
<span class="price" :class="getColor(item)">{{ item.price }}</span>
</view>
</view>
</view>
</view>
<!-- 热门股票 -->
<!-- <view class="wrap">
<view class="title">{{ t('index.hot') }}</view>
<view class="gupiao_wrap">
<view v-for="(item, index) in hotGupiaoList" :key="index" class="gupiao" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<view class="flex items-center justify-between">
<view class="text-primary text-base text_hied">{{ item.name }}</view>
<view class="text-gray text-sm">{{ item.shuzidaima }}</view>
</view>
<view class="flex items-center justify-between mt-[0.28rem]">
<view class="text-primary text-lg">
<text>{{ item.price }}</text>
<text v-if="item.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
</view>
<view>
<view class="text-base text-right" :class="getColor(item)">{{ item.zhangdieshu }}</view>
<view class="text-base text-right" :class="getColor(item)">{{ item.zhangdiebaifenbi }}%</view>
</view>
</view>
</view>
</view>
</view> -->
</view>
</view>
<van-popup v-model:show="selectShow" class="select_window" v-bind="windowOptions">
<view v-for="(item, index) in hotGupiaoList.slice(0, 3)" :key="index" class="title" @click="handleSelect(index)">{{ item.name }}</view>
</van-popup>
</view>
<CustomTabbar :id="0" />
</template>
<script lang="ts" setup>
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
import GupiaoChart from './components/gupiaoChart.vue'
// import SearchNavigation from '@/components/searchNavigation/searchNavigation.vue'
import { useCounterStore } from '@/store/store'
import { getTickerKApi, getHotGupiaoApi } from '@/api/index/index'
import { getUserMessageApi } from '@/api/message'
import { onHide, onShow } from '@dcloudio/uni-app'
import { ref, watch, computed } from 'vue'
import { getCzhiurlApi } from '@/api/user'
import { useI18n } from 'vue-i18n'
// import kefu from '@/static/image/index/icon_2.png'
import { goPage, getColor, switchTab } from '@/common/common'
const { t } = useI18n()
// 页面基础配置
const store = useCounterStore()
console.log(store)
const dot = ref(false)
// 获取消息
const getUserMessage = async () => {
const res = await getUserMessageApi()
if (res.code === 1) {
dot.value = res.data.data[0]?.is_read === '0'
}
}
const kefu_url = ref('')
const getCzhiurlFn = async () => {
const res = await getCzhiurlApi()
if (res.code === 1) {
kefu_url.value = res.data.kefu_url
}
}
const goWeb = () => {
window.open(kefu_url.value)
}
const goToNextPage = (item) => {
if (item.url) {
goPage(item.url)
} else {
goWeb()
}
}
// const desensitization = (str: string) => {
// return str
// .split('')
// .map((item, i) => {
// if (i >= 3 && i <= 6) {
// return '*'
// }
// return item
// })
// .join('')
// }
const pageHeight = `calc(100vh - ${store.tabbarHeight})`
// const contentHeight = `calc(100vh - ${store.tabbarHeight} - 4.28rem - 2.91rem)`
let inId: any = null
onShow(() => {
getHotGupiao()
getUserMessage()
getCzhiurlFn()
console.log(button1.value, 'button1')
inId = setInterval(() => {
// 获取热门股票
getHotGupiao()
getUserMessage()
}, 10000)
})
onHide(() => {
console.log(inId, 'iddd')
clearInterval(inId)
})
const button1 = computed(() => t('index.button1'))
const button2 = computed(() => t('dadan.title'))
const button4 = computed(() => t('index.button4'))
const button6 = computed(() => t('hongli.title'))
const button8 = computed(() => t('rongzi.title'))
const button7 = computed(() => t('index.button2'))
const buttonList = [
{ label: button1, icon: '/static/image/index/icon_1.png', url: '/subPackages/index/ipo/ipo' },
{ label: button6, icon: '/static/image/index/icon_6.png', url: '/subPackages/index/hongli/hongli' },
{ label: button2, icon: '/static/image/index/icon_5.png', url: '/subPackages/index/dadan/dadan' },
// { label: button2, icon: '/static/image/index/icon_2.png', url: '/subPackages/customerService/customerService' },
// { label: t('index.button3'), icon: '/static/image/index/icon_3.png', url: '/subPackages/index/jiaoyi/jiaoyi' },
{ label: button4, icon: '/static/image/index/icon_4.png', url: '/subPackages/transactionLog/transactionLog?isLs=1' },
{ label: button8, icon: '/static/image/index/icon_8.png', url: '/subPackages/index/rongzi/rongzi' },
{ label: button7, icon: '/static/image/index/icon7.png', url: null }
]
const gupiaoActive = ref(0)
const chartValue = ref({})
// 熱門股票
interface hotGupiaoType {
name: string
shuzidaima: string
price: string
zhangdiebaifenbi: number | string
zhangdieshu: number | string
id: number
}
const hotGupiaoList = ref<Array<hotGupiaoType>>([])
const activeGupiao = computed(() => {
return hotGupiaoList.value[gupiaoActive.value] || { zhangdiebaifenbi: 0 }
})
const getHotGupiao = async () => {
const res = await getHotGupiaoApi()
for (const i in res.data.result) {
res.data.result[i].zhangdieshu = Number(res.data.result[i].zhangdieshu).toFixed(1)
res.data.result[i].zhangdiebaifenbi = Number(res.data.result[i].zhangdiebaifenbi).toFixed(1)
res.data.result[i].price = Number(res.data.result[i].price).toFixed(1)
}
hotGupiaoList.value = res.data.result
}
// 股票chart
watch(
() => hotGupiaoList,
(newData) => {
resetChartData(newData.value[gupiaoActive.value])
},
{ deep: true }
)
const resetChartData = async (data: any) => {
console.log(111, data)
const params = {
id: data.id,
kline_type: 6,
type: 1
}
const res = await getTickerKApi(params)
const kLineList = res.data.map((item: any) => {
return {
close: item.c,
high: item.h,
low: item.l,
open: item.o,
timestamp: item.t * 1000,
volume: item.v
}
})
chartValue.value = kLineList
}
// 打开筛选框
const selectShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true
}
const openSelect = () => {
selectShow.value = true
}
const handleSelect = (index: number) => {
gupiaoActive.value = index
resetChartData(hotGupiaoList.value[gupiaoActive.value])
selectShow.value = false
}
</script>
<style scoped lang="scss">
.container {
background: #124b91;
}
.down-b {
background: #e8f7ef;
}
.up-b {
background: #fff3f5;
}
.nav {
height: 4.28rem;
display: flex;
background-color: #fff;
padding: 0 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
.header {
display: flex;
font-size: $uni-font-size-base;
.head {
width: 2.5rem;
height: 2.5rem;
background-color: #d0d0d0;
border-radius: 50%;
overflow: hidden;
margin-right: 0.56rem;
}
image {
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
display: block;
margin-right: 0.56rem;
}
.info {
display: flex;
flex-direction: column;
justify-content: center;
font-weight: bold;
}
}
}
.search {
width: 100%;
height: 3.125rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.625rem 0.9375rem 0.625rem 0.9375rem;
.touxian {
width: 1.7813rem;
height: 1.7813rem;
border-radius: 50%;
margin-right: 0.9375rem;
}
.search-box {
width: 14.375rem;
height: 2.125rem;
border-radius: 1.25rem;
background: #08182b;
margin-right: 1.5rem;
color: #fff;
padding: 0 0.63rem;
display: flex;
align-items: center;
font-size: 0.8rem;
}
.kefu {
width: 1rem;
height: 1rem;
}
.xiaoxi {
width: 1rem;
height: 1rem;
margin-right: 0.9375rem;
}
}
.content {
// background-color: #fff;
overflow-y: auto;
.content-cord {
width: 21.5625rem;
// height: 23.5313rem;
border-radius: 1.25rem;
background: rgba(13, 40, 71, 0.7);
margin: 0.625rem auto 0;
padding: 0.9375rem 0.9375rem 1.5rem 0.9375rem;
.wrap {
display: flex;
flex-flow: wrap;
// padding-left: 1.25rem;
.wrap-item {
width: calc((100%) / 3);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 0.875rem;
// margin-right: 2.6875rem;
.text {
color: #fff;
font-size: 0.6875rem;
font-weight: 400;
margin-top: 0.3438rem;
}
.img-box {
width: 3.75rem;
height: 3.75rem;
border-radius: 50%;
background: rgb(10, 32, 58, 0.7);
display: flex;
align-items: center;
justify-content: center;
image {
width: 1.5rem;
height: 1.375rem;
// margin-right: 0.47rem;
}
}
}
}
}
.scroll_list {
width: 100%;
background: rgba(14, 46, 82, 0.7);
border-top-left-radius: 1.5625rem;
border-top-right-radius: 1.5625rem;
margin-top: 2.5rem;
padding: 1.3125rem 0.9375rem;
.gupiao_wrap {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 0.625rem;
.gupiao {
width: 10.4688rem;
height: 6.1875rem;
border-radius: 0.625rem;
padding: 1rem 0.9375rem 1.0625rem 0.9375rem;
margin-bottom: 0.625rem;
.price {
font-size: 1.0625rem;
font-weight: 500;
}
.name {
color: #23262b;
font-size: 0.875rem;
font-weight: 500;
max-height: 6.25rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
}
.daima {
color: #23262b;
font-size: 0.875rem;
font-weight: 500;
}
}
.flex2 {
display: flex;
align-items: center;
}
}
.title-top {
display: flex;
align-items: center;
justify-content: space-between;
}
.title {
color: #fff;
font-size: 0.875rem;
font-weight: 400;
}
.title-right {
display: flex;
align-items: center;
color: #fff;
font-size: 0.875rem;
font-weight: 400;
img {
height: 0.7383rem;
width: 0.4375rem;
margin-left: 0.4063rem;
}
}
}
.wrap {
margin-top: 1.4063rem;
> .title {
height: 2.38rem;
padding-top: 1.06rem;
font-size: $uni-font-size-1;
font-weight: bold;
margin-left: 0.47rem;
}
.button_wrap {
// height: 8.4375rem;
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: 2.69rem 2.69rem 2.69rem 2.69rem;
row-gap: 0.25rem;
column-gap: 0.44rem;
.button {
background-color: #638daa;
border-radius: 0.56rem;
display: flex;
justify-content: center;
align-items: center;
image {
width: 0.94rem;
height: 0.94rem;
margin-right: 0.47rem;
}
view {
color: #fff;
width: 6.75rem;
font-size: 0.63rem;
}
}
}
.gupiao_wrap {
display: flex;
flex-wrap: wrap;
.gupiao {
width: calc((100% - 0.38rem) / 2);
height: 3.88rem;
background-color: #638daa;
border-radius: 0.56rem;
margin-bottom: 0.5rem;
padding: 0.75rem 0.56rem;
}
> :nth-of-type(2n) {
margin-left: 0.38rem;
}
}
}
.select_wrap {
padding: 1.13rem 0.56rem 0.56rem;
display: flex;
justify-content: space-between;
.t1 {
color: #aeb2bb;
font-size: 0.8125rem;
font-weight: 400;
}
.select {
width: 7.375rem;
height: 1.5625rem;
line-height: 1.5625rem;
background-color: #08182b;
border-radius: 0.56rem;
padding: 0 0.33rem;
font-size: 0.8125rem;
display: flex;
justify-content: space-between;
align-items: center;
view {
flex: 1;
text-align: center;
color: #ee2560;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
}
.rotate1 {
transform: rotate(90deg);
}
.rotate2 {
transform: rotate(270deg);
}
}
.select_window {
padding: 0.51rem 1rem 0.9rem;
.title {
height: 2.5rem;
line-height: 2.5rem;
font-size: $uni-font-size-lg;
padding: 0 1rem;
text-align: center;
border-bottom: 0.03rem solid #ccc;
}
}
</style>
<template>
<view class="header">
<Navigator :is-show-back="false" :title="t('tabbar.jiaoyi')" />
<!-- <view class="card">
<div class="left">
<view class="flex">
<view class="text-lg mr-[0.25rem]">{{ t('jiaoyi.total') }}</view>
<van-icon :name="!isHidden ? 'eye-o' : 'closed-eye'" color="#50aff0" size="1rem" @click="isHidden = !isHidden" />
</view>
<view>
<view v-if="isHidden">******</view>
<view v-else>{{ pageType == 0 ? changeMoney(userMoneyInfo.total || 0) : changeMoney(userMoneyInfo.tota2 || 0) }}</view>
</view>
</div>
<div class="right">
<view id="charts"></view>
</div>
</view> -->
<!-- <view class="card2">
<view class="row">
<view class="flex items-center">
<view class="li blue"></view>
<view v-if="pageType == 0 || pageType == 2">{{ t('jiaoyi.sunyiheji') }}</view>
<view v-if="pageType == 1">{{ t('jiaoyi.sunyiheji2') }}</view>
</view>
<view>
<view v-if="isHidden" @click="isHidden = !isHidden">******</view>
<view v-if="pageType == 0 || pageType == 1" :class="(pageType == 0 ? jiaoyiInfo?.my_losses?.count_losses : jiaoyiInfo?.my_realized_losses?.count_losses) > 0 ? 'txt-red' : 'txt-green'">{{
pageType == 0 ? changeMoney(jiaoyiInfo?.my_losses?.count_losses || 0) : changeMoney(jiaoyiInfo?.my_realized_losses?.count_losses || 0)
}}</view>
<view v-if="pageType == 2">{{ jiaoyiInfo?.xingu?.count_losses || 0 }}</view>
</view>
</view>
<view class="row">
<view class="flex items-center">
<view class="li green"></view>
<view v-if="pageType == 0 || pageType == 2">{{ t('jiaoyi.shizhiheji') }}</view>
<view v-if="pageType == 1">{{ t('jiaoyi.shizhihej2i') }}</view>
</view>
<view>
<view v-if="isHidden" @click="isHidden = !isHidden">******</view>
<view v-if="pageType == 1 || pageType == 0">{{
pageType == 0 ? changeMoney(jiaoyiInfo?.my_losses?.count_market || 0) : changeMoney(jiaoyiInfo?.my_realized_losses?.count_market || 0)
}}</view>
<view v-if="pageType == 2">{{ jiaoyiInfo?.xingu?.count_losses || 0 }}</view>
</view>
</view>
<view class="row">
<view class="flex items-center">
<view class="li purple"></view>
<view>{{ t('jiaoyi.yue') }}</view>
</view>
<view>
<view v-if="isHidden" @click="isHidden = !isHidden">******</view>
<view>{{ changeMoney(userMoneyInfo?.money || 0) }}</view>
</view>
</view>
</view> -->
</view>
<view class="button_wrap">
<view class="button" :class="{ active: pageType === 0 }" @click="changePageType(0)">{{ t('jiaoyi.weishixiansunyi') }}</view>
<view class="button" :class="{ active: pageType === 2 }" @click="changePageType(2)">{{ t('jiaoyi.sunyiheji3') }}</view>
<view class="button" :class="{ active: pageType === 1 }" @click="changePageType(1)">{{ t('jiaoyi.yishixiansunyi') }}</view>
</view>
<view class="content" :style="{ height: contentHeight }">
<view class="gupiao_list">
<view v-show="pageType === 0">
<NotData v-if="!weishixianList.length" />
<view v-for="(item, index) in weishixianList" :key="index" class="gupiao" @click="goPage(`../jiaoyiDetail/jiaoyiDetail?id=${item.id}&ismai=1`)">
<view class="flex items-center justify-between pb-[0.4rem]">
<view class="flex items-center" style="width: 60%">
<view class="font-bold text_hied text-primary">{{ item?.product?.name }}</view>
<view class="icon text-base">{{ item?.product?.shuzidaima }}</view>
<view class="icon text-base" :class="item.fangxiang_data === '1' ? 'red' : 'green'">{{ item.fangxiang_data === '1' ? t('jiaoyi.zhang') : t('jiaoyi.die') }}</view>
</view>
<view class="icon_primary">{{ getStatus(item) }}</view>
</view>
<view class="flex justify-between info-box">
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.dingdanxiangqing') }}</view> -->
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shuliang') }}</view>
<view class="value">{{ item.shuliang }}</view>
</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.chigushu') }}</view>
<view class="value">{{ item.shuliang }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.goumaijiage') }}</view>
<view class="value">{{ qfw(item.price) }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shouxufei') }}</view>
<view class="value"></view>
</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.goumaizongjia') }}</view>
<view class="value">{{ qfw(((item.price * item.shuliang) / Number(item.ganggan_ratio)).toFixed(1)) }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shijian') }}</view>
<view class="value">{{ timestempToDate(item.buytime * 1000) }}</view>
</view> -->
</view>
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.xianzaixianqging') }}</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.xianzaizongjia') }}</view>
<view class="value">{{ qfw(item.shizhi) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.yugusunyi') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ changeMoney(item?.yingkui) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.sunyilv') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ item?.yisun }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.xianjia') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ qfw(item?.product?.price) }}</view>
</view>
</view>
</view>
<view class="flex justify-between mt-[0.31rem]">
<view class="icon_primary" @click="goPage(`/subPackages/jiaoyi/jiaoyiDetail/jiaoyiDetail?id=${item.id}&ismai=1`)">{{ t('jiaoyi.gupiaoxiangqing') }}</view>
<view v-if="item.status !== '4'" class="icon_o" @click.stop="sell(item)">{{ t('jiaoyi.maichu') }}</view>
<view v-if="item.status === '4'" class="icon_o" @click.stop="cancelOrde(item)">{{ t('jiaoyi.chedan') }}</view>
</view>
</view>
</view>
<view v-show="pageType === 1">
<NotData v-if="!yishixianList.length" />
<view v-for="(item, index) in yishixianList" :key="index" class="gupiao">
<view class="flex items-center justify-between pb-[0.4rem]">
<view class="flex items-center" style="width: 60%">
<view class="font-bold text_hied text-primary">{{ item?.product?.name }}</view>
<view class="icon text-base">{{ item?.product?.shuzidaima }}</view>
<view class="icon text-base" :class="item.fangxiang_data === '1' ? 'red' : 'green'">{{ item.fangxiang_data === '1' ? t('jiaoyi.zhang') : t('jiaoyi.die') }}</view>
</view>
<view class="icon text-lg">{{ getStatus(item) }}</view>
</view>
<view class="flex justify-between">
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.dingdanxiangqing') }}</view> -->
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shuliang') }}</view>
<view class="value">{{ item.shuliang }}</view>
</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.chigushu') }}</view>
<view class="value">{{ item.shuliang }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.goumaijiage') }}</view>
<view class="value">{{ changeMoney(item.price) }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shouxufei') }}</view>
<view class="value"></view>
</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.goumaizongjia') }}</view>
<view class="value">{{ changeMoney(((item.price * item.shuliang) / Number(item.ganggan_ratio)).toFixed(1)) }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shijian') }}</view>
<view class="value">{{ timestempToDate(item.buytime * 1000) }}</view>
</view> -->
<view class="flex justify-between mt-[0.31rem]" style="margin-top: 50px">
<view class="icon_primary" @click="goPage(`/subPackages/jiaoyi/jiaoyiDetail/jiaoyiDetail?id=${item.id}&ismai=0`)">{{ t('jiaoyi.gupiaoxiangqing') }}</view>
<!-- <view class="icon_o" @click.stop="sell(item.id)">{{ t('jiaoyi.maichu') }}</view> -->
</view>
</view>
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.xianzaixianqging') }}</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.xianzaijiage') }}</view>
<view class="value">{{ qfw(item?.sellprice) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.xianzaizongjia') }}</view>
<view class="value">{{ qfw(item.shizhi) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.yugusunyi2') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ changeMoney(item?.yingkui) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.sunyilv') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ item?.yisun }}</view>
</view>
</view>
</view>
</view>
</view>
<view v-show="pageType === 2">
<NotData v-if="!apply.length" />
<view v-for="(item, index) in apply" :key="index" class="gupiao">
<view class="flex items-center justify-between pb-[0.4rem]">
<view class="flex items-center">
<view class="font-bold text-primary">{{ item?.product?.name }}</view>
<view class="icon text-base">{{ item?.product?.shuzidaima }}</view>
</view>
<view class="icon text-lg">{{ getText(item) }}</view>
</view>
<view class="flex justify-between">
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.dingdanxiangqing') }}</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.jiage') }}</view>
<view class="value">{{ changeMoney(item.price) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.shenqingliang') }}</view>
<view class="value">{{ item.shengoushuliang }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.chouqianri') }}</view>
<view class="value">{{ item?.product?.chouqiandate }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.faquanri') }}</view>
<view class="value">{{ item?.product?.faquan_date }}</view>
</view>
</view>
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.xianzaixianqging') }}</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.zhognqianshuliang') }}</view>
<view class="value">{{ item.zhongqianshu }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.renjiaogushu') }}</view>
<view class="value">{{ item.renjiaonum || 0 }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.txt1') }}</view>
<view class="value">{{ changeMoney(item.yingrenjiao) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.txt2') }}</view>
<view class="value">{{ changeMoney(item.yirenjiao) }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<CustomTabbar :id="2" />
</template>
<script setup lang="ts">
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
import { useI18n } from 'vue-i18n'
import { getJiaoyiListApi, getUserMoneyApi, sellGupiaoApi, cancelOrdeApi } from '@/api/index/index'
import { useCounterStore } from '@/store/store'
import { onHide, onLoad, onShow } from '@dcloudio/uni-app'
import Navigator from '@/components/navigator/navigator.vue'
import { changeMoney, goPage } from '@/common/common'
import * as echarts from 'echarts'
import { computed, ref } from 'vue'
import { showLoadingToast, showToast } from 'vant'
const { t } = useI18n()
// 页面基础配置
const store = useCounterStore()
console.log(store)
const contentHeight = `calc(100vh - ${store.tabbarHeight} - 6.5rem )`
console.log(contentHeight)
onLoad(async () => {
await getJiaoyiList()
InitChart()
})
const tip1 = computed(() => t('jiaoyi.tip1'))
const tip2 = computed(() => t('jiaoyi.tip2'))
const tip3 = computed(() => t('jiaoyi.tip3'))
const tip4 = computed(() => t('jiaoyi.tip4'))
const tip5 = computed(() => t('jiaoyi.tip5'))
const statusText = [tip1, tip2, tip3, tip4, tip5]
const getStatus = (item) => {
// 1=持仓中,2=已平仓,3=平仓中,4=挂单中,5=已撤单',
return statusText[item.status * 1 - 1].value
}
const getText = (item) => {
if (item.status === '0') {
return t('jiaoyi.txt3')
} else if (item.status === '1' && item.is_examine === 0) {
return t('jiaoyi.txt4')
} else if (item.status === '1' && item.is_examine === 1) {
return t('jiaoyi.txt5')
} else if (item.status === '1' && item.is_examine === 2) {
return t('jiaoyi.txt6')
} else if (item.status === '2') {
return t('jiaoyi.txt6')
}
}
let id: any = null
onShow(() => {
getUserMoney()
getJiaoyiList()
id = setInterval(() => {
getJiaoyiList()
}, 8000)
})
onHide(() => {
clearInterval(id)
})
// 获取交易列表
const weishixianList = ref([])
const yishixianList = ref([])
const pageType = ref(0)
const jiaoyiInfo = ref({
my_losses: {}
})
// 新股抽签
const apply = ref([])
const getJiaoyiList = async () => {
const res = await getJiaoyiListApi()
weishixianList.value = res.data.already
apply.value = res.data.apply
yishixianList.value = res.data.future
jiaoyiInfo.value = res.data
}
const changePageType = (e: number) => {
pageType.value = e
const data1 = [{ value: userMoneyInfo.value?.money || 0 }, { value: jiaoyiInfo.value?.my_losses?.count_market || 0 }, { value: jiaoyiInfo.value?.my_losses?.count_losses || 0 }]
const data2 = [{ value: userMoneyInfo.value?.money || 0 }, { value: jiaoyiInfo.value?.my_realized_losses?.count_market || 0 }, { value: jiaoyiInfo.value?.my_realized_losses?.count_losses || 0 }]
const option = {
series: {
data: e === 0 ? data1 : data2
}
}
myChart.value.setOption(option)
}
// 获取用户余额
const userMoneyInfo = ref({
total: 0,
total2: 0
})
// const isHidden = ref(true)
const getUserMoney = async () => {
const res = await getUserMoneyApi()
res.data.total = (Number(jiaoyiInfo.value?.my_losses?.count_market || 0) + Number(jiaoyiInfo.value?.my_losses?.count_losses || 0) + Number(res.data.money || 0)).toFixed(1)
res.data.tota2 = (Number(jiaoyiInfo.value?.my_realized_losses?.count_market || 0) + Number(jiaoyiInfo.value?.my_realized_losses?.count_losses || 0) + Number(res.data.money || 0)).toFixed(1)
userMoneyInfo.value = res.data
}
// 图表
const myChart = ref(null)
const InitChart = () => {
myChart.value = echarts.init(document.getElementById('charts'))
const option = {
series: {
type: 'pie',
radius: '80%',
label: {
show: false,
position: 'center'
},
avoidLabelOverlap: false,
color: ['#C850F0', '#50F0AA', '#50AFF0'],
data: [{ value: userMoneyInfo.value?.money || 0 }, { value: jiaoyiInfo.value?.my_losses?.count_market || 0 }, { value: jiaoyiInfo.value?.my_losses?.count_losses || 0 }]
}
}
option && myChart.value.setOption(option)
console.log(myChart)
}
const qfw = (num) => {
return Number(num).toLocaleString()
}
// 卖出
const sell = (item) => {
uni.showModal({
title: t('jiaoyi.tip6'),
content: t('jiaoyi.tip7'),
cancelText: t('jiaoyi.tip8'),
confirmText: t('jiaoyi.tip9'),
success: async (res) => {
if (res.confirm) {
showLoadingToast({ mask: true })
const res = await sellGupiaoApi({ id: item.id, type: '1' })
getUserMoney()
// closeToast()
showToast({
message: res.data.msg,
duration: 2000
})
getJiaoyiList()
}
}
})
}
// 撤单
const cancelOrde = (item) => {
uni.showModal({
title: t('jiaoyi.tip6'),
content: t('jiaoyi.tip10'),
cancelText: t('jiaoyi.tip8'),
confirmText: t('jiaoyi.tip9'),
success: async (res) => {
if (res.confirm) {
showLoadingToast({ mask: true })
const res = await cancelOrdeApi({ id: item.id, type: '1' })
getUserMoney()
showToast({
message: res.msg,
duration: 2000
})
getJiaoyiList()
}
}
})
}
</script>
<style lang="scss" scoped>
.red {
background: red !important;
}
.green {
background: #34e607 !important;
}
.txt-green {
color: #34e607 !important;
}
.txt-red {
color: #ff4545 !important;
}
.text-primary {
color: #fff;
}
.font-bold {
// max-width: 50%;
}
.header {
.card {
height: 3.75rem;
// border-radius: 0.94rem;
background-color: #fff;
margin-bottom: 0.25rem;
padding: 0.31rem 1.25rem;
display: flex;
justify-content: space-between;
.left {
height: 100%;
display: flex;
justify-content: space-around;
flex-direction: column;
}
.right {
view {
width: 3.13rem;
height: 3.13rem;
}
}
}
.card2 {
height: 4rem;
background-color: #fff;
margin-top: 0.25rem;
padding: 0.31rem 1.25rem;
border-bottom: 0.12rem solid #00000022;
.row {
display: flex;
justify-content: space-between;
.li {
width: 0.64rem;
height: 0.64rem;
border-radius: 50%;
margin-right: 0.38rem;
}
.blue {
background-color: #50aff0;
}
.green {
background-color: #50f0aa;
}
.purple {
background-color: #c850f0;
}
view {
font-size: $uni-font-size-lg;
}
}
}
}
.button_wrap {
padding: 0.81rem 0.88rem;
display: flex;
justify-content: space-around;
.button {
display: flex;
align-items: center;
justify-content: center;
width: 6.875rem;
height: 2.125rem;
padding: 0 0.5rem;
line-height: 1.25rem;
// line-height: $uni-font-size-lg;
text-align: center;
font-size: 0.875rem;
font-weight: 500;
// border: 0.03rem solid $uni-color-primary;
border-radius: 1.03rem;
margin-right: 0.94rem;
color: #fff;
background: rgb(8, 24, 43, 0.7);
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
}
.active {
background-color: $uni-color-primary;
color: #fff;
}
}
.content {
overflow-y: auto;
border-top-left-radius: 1.25rem;
border-top-right-radius: 1.25rem;
// box-shadow: 0px 0px 5px 2px #f4f4f4;
background: rgb(12, 36, 64);
.gupiao_list {
view {
}
.gupiao {
// background-color: #fff;
margin-bottom: 0.31rem;
padding: 1.25rem;
.info-box {
width: 20.9375rem;
// height: 4.9688rem;
background: #08182b;
border-radius: 0.625rem;
padding: 0.625rem 1.25rem;
}
.half {
width: 48%;
// display: flex;
// flex-direction: column;
// align-items: center;
// justify-content: center;
}
.row {
font-size: 0.8rem;
color: #0a0a0a;
display: flex;
align-items: center;
// padding: 0.21rem 0;
justify-content: space-between;
.value {
color: #fff;
}
view {
color: $uni-text-color-gray;
font-size: $uni-font-size-lg;
}
}
}
.icon {
background: #0575e6;
padding: 0.14rem 0.44rem;
border-radius: 0.31rem;
color: #fff;
margin-left: 1rem;
white-space: nowrap;
// font-size: $uni-font-size-base;
}
.icon_primary {
background: $uni-color-primary;
padding: 0.18rem 1rem;
border-radius: 0.31rem;
color: #fff;
font-size: $uni-font-size-lg;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
}
.icon_o {
background: #fff;
padding: 0.18rem 1rem;
border-radius: 0.31rem;
color: $uni-color-primary;
border: 0.03rem solid $uni-color-primary;
margin-left: 1rem;
font-size: $uni-font-size-lg;
}
}
}
</style>
<template>
<!-- 检索栏 -->
<view class="search">
<SearchNavigation />
</view>
<view class="box">
<!-- 類別 -->
<view class="button_wrap">
<view class="button" :class="{ active: buttonType === 'gupiao' }" @click="buttonType = 'gupiao'">{{ t('market.gupiao') }}</view>
<view class="button" :class="{ active: buttonType === 'collect' }" @click="buttonType = 'collect'">{{ t('market.collect') }}</view>
</view>
<!-- 主體 -->
<scroll-view scroll-y class="content" :style="{ height: contentHeight }" @scrolltolower="scrolltolower">
<!-- 股票 -->
<view v-show="buttonType === 'gupiao'">
<!-- 前6個股票 -->
<view class="hotlist">
<view class="hot_gupiao_wrap">
<view v-for="(item, index) in hotGupiaoList" :key="index" :class="getColor(item)" class="gupiao" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<view class="flex items-center justify-between">
<view class="title">{{ item.name }}</view>
<view>
<van-icon v-if="item.is_zixuan == 0" name="star-o" size=".8rem"></van-icon>
<van-icon v-else name="star" size=".8rem" color="#50B0F2"></van-icon>
</view>
</view>
<view class="flex justify-between">
<view class="text-sm">{{ item.shuzidaima }}</view>
<view class="text-sm" :class="getColor(item)">{{ item.price }}</view>
<view class="text-sm" :class="getColor(item)">{{ item.zhangdiebaifenbi }}%</view>
</view>
<view class="flex justify-center items-center">
<view class="text-[0.94rem]">{{ item.zhangdieshu }}</view>
<text v-if="item.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
<!-- <img src="" style="width: 70.847px; height: 30px" /> -->
</view>
</view>
</view>
<view v-if="gupiaoList.length > 3" class="hot_gupiao_wrap">
<view v-for="(item, index) in gupiaoList.slice(3, 6)" :key="index" :class="getColor(item)" class="gupiao" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<view class="flex items-center justify-between">
<view class="title">{{ item.name }}</view>
<view>
<van-icon v-if="item.is_zixuan == 0" name="star-o" size=".8rem"></van-icon>
<van-icon v-else name="star" size=".8rem" color="#50B0F2"></van-icon>
</view>
</view>
<view class="flex justify-between">
<view class="text-sm">{{ item.shuzidaima }}</view>
<view class="text-sm" :class="getColor(item)">{{ item.price }}</view>
<view class="text-sm" :class="getColor(item)">{{ item.zhangdiebaifenbi }}%</view>
</view>
<view class="flex justify-center items-center">
<view class="text-[0.94rem]">{{ item.zhangdieshu }}</view>
<text v-if="item.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
</view>
</view>
</view>
</view>
<!-- 所有股票 -->
<view class="gupiao_wrap">
<view v-for="(item, index) in gupiaoList" :key="index" :class="getColor(item)" class="gupiao" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<view class="mr-[0.63rem]">
<!-- <van-icon v-if="item.is_zixuan == 0" name="star-o" size=".8rem"></van-icon>
<van-icon v-else name="star" size=".8rem" color="#50B0F2"></van-icon> -->
<img v-if="item.is_zixuan == 0" :src="zixuan1" alt="" srcset="" class="zixuan" />
<img v-else :src="zixuan" alt="" srcset="" class="zixuan" />
</view>
<view class="flex flex-col justify-between h-full flex-1 overflow-hidden pr-[.5rem]">
<view class="title">{{ item.name }}</view>
<view class="code">{{ item.shuzidaima }}</view>
</view>
<view class="items-center h-full flex-1">
<view class="flex items-center h-full flex-1">
<img v-if="item.zhangdiebaifenbi > 0" :src="up" alt="" style="width: 0.5rem; height: 0.625rem; margin-right: 0.3438rem" />
<img v-if="item.zhangdiebaifenbi < 0" :src="down" alt="" style="width: 0.5rem; height: 0.625rem; margin-right: 0.3438rem" />
<view class="text-[1rem]" :class="getColor(item)" style="font-size: 1rem; font-weight: 600; line-height: 1.5rem">{{ item.zhangdieshu }}</view>
<text v-if="item.zhangdiebaifenbi === 0"> - </text>
<!-- <van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" /> -->
</view>
<view class="text-lg" :class="getColor(item)" style="font-size: 0.75rem; font-weight: 500">{{ item.zhangdiebaifenbi }}%</view>
</view>
<view class="text-right">
<view class="text-lg" :class="getColor(item)" style="font-size: 1rem; font-weight: 600">{{ item.price }}</view>
</view>
</view>
</view>
</view>
<!-- 收藏 -->
<view v-show="buttonType === 'collect'">
<!-- 前6個股票 -->
<view class="hotlist">
<view class="hot_gupiao_wrap">
<view v-for="(item, index) in ziXuanList" :key="index" :class="getColor(item)" class="gupiao" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<view class="flex items-center justify-between">
<view class="title">{{ item.name }}</view>
<view>
<van-icon v-if="item.is_zixuan == 0" name="star-o" size=".8rem"></van-icon>
<van-icon v-else name="star" size=".8rem" color="#50B0F2"></van-icon>
</view>
</view>
<view class="flex justify-between">
<view class="text-sm">{{ item.shuzidaima }}</view>
<view class="text-sm" :class="getColor(item)">{{ item.price }}</view>
<view class="text-sm" :class="getColor(item)">{{ item.zhangdiebaifenbi }}%</view>
</view>
<view class="flex justify-center items-center">
<view class="text-[0.94rem]">{{ item.zhangdieshu }}</view>
<text v-if="item.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
</view>
</view>
<view class="plus gupiao bg-[#fff]" @click="goPage('/subPackages/search/search')">
<van-icon name="plus" />
</view>
</view>
</view>
<NotData v-if="ziXuanList.length === 0" />
</view>
</scroll-view>
</view>
<CustomTabbar :id="1" />
</template>
<script lang="ts" setup>
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
import SearchNavigation from '@/components/searchNavigation/searchNavigation.vue'
import { useCounterStore } from '@/store/store'
import { getGupiaoListApi, getZixuanlApi } from '@/api/market/market'
import { getHotGupiaoApi } from '@/api/index/index'
import { onHide, onShow } from '@dcloudio/uni-app'
import { getColor, goPage } from '@/common/common'
import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import zixuan from '@/static/image/market/zixuan.png'
import up from '@/static/image/market/up1.png'
import down from '@/static/image/market/down1.png'
import zixuan1 from '@/static/image/market/zixuan1.png'
import socket from '@/common/socket'
const { t } = useI18n()
// 熱門股票
interface hotGupiaoType {
name: string
shuzidaima: string
price: string
zhangdiebaifenbi: number | string
zhangdieshu: number | string
id: number
}
const hotGupiaoList = ref<Array<hotGupiaoType>>([])
// let shuzidaima = []
// 获取热门股票
const getHotGupiao = async () => {
const res = await getHotGupiaoApi()
for (const i in res.data.result) {
res.data.result[i].zhangdieshu = Number(res.data.result[i].zhangdieshu).toFixed(1)
res.data.result[i].zhangdiebaifenbi = Number(res.data.result[i].zhangdiebaifenbi).toFixed(1)
res.data.result[i].price = Number(res.data.result[i].price).toFixed(1)
}
hotGupiaoList.value = mapGupiaoList(res.data.result.slice(0, 3))
console.log('hot', hotGupiaoList)
}
// 页面基础配置
const store = useCounterStore()
const contentHeight = `calc(100vh - ${store.tabbarHeight} - 3.13rem - 2.91rem)`
// let id: any = null
let page1 = 1
onShow(() => {
page1 = 1
getGupiaoList(true)
getHotGupiao()
getZixuanlFn()
})
onHide(() => {
// clearInterval(id)
socket.closeSocket()
})
const ziXuanList = ref([])
const getZixuanlFn = async () => {
const res = await getZixuanlApi()
if (res.code === 1) {
const list = res.data.map((item) => item?.product)
for (const i in list) {
list[i].zhangdieshu = Number(list[i].zhangdieshu).toFixed(1)
list[i].zhangdiebaifenbi = Number(list[i].zhangdiebaifenbi).toFixed(1)
list[i].price = Number(list[i].price).toFixed(1)
}
ziXuanList.value = list
}
console.log(res)
}
watch(ziXuanList, () => {
mapGupiaoList(gupiaoList.value)
})
const mapGupiaoList = (arr: Array<any>) => {
if (ziXuanList.value.length === 0) {
arr = arr.map((item) => {
item.is_zixuan = 0
return item
})
}
arr.forEach((element) => {
for (let i = 0; i < ziXuanList.value.length; i++) {
const item = ziXuanList.value[i]
if (item.shuzidaima === element.shuzidaima) {
element.is_zixuan = 1
return
} else {
element.is_zixuan = 0
}
// if (item?.is_zixuan !== 1) {
// item.is_zixuan = 0
// }
}
})
console.log(arr)
return arr
}
// 獲取股票列表
const gupiaoList = ref([])
const gupiaoInfo = ref({})
const pageLoading = ref(false)
const getGupiaoList = async (islun: boolean = false) => {
pageLoading.value = true
const res = await getGupiaoListApi(islun ? { page: 1, limit: 10 } : { page: page1, limit: 10 })
for (const i in res.data.data) {
res.data.data[i].zhangdieshu = Number(res.data.data[i].zhangdieshu).toFixed(1)
res.data.data[i].zhangdiebaifenbi = Number(res.data.data[i].zhangdiebaifenbi).toFixed(1)
res.data.data[i].price = Number(res.data.data[i].price).toFixed(1)
}
// if (!islun) {
page1++
// }
if (islun) {
gupiaoList.value = mapGupiaoList([...res?.data?.data])
} else {
gupiaoList.value = mapGupiaoList([...gupiaoList.value, ...res?.data?.data])
}
// shuzidaima = res.data.data.map((item) => item.shuzidaima)
// 开启socket
socket.listenFun({ type: 'sub', params: 'stock' }, (res) => {
res = JSON.parse(res)
for (let i = 0; i < gupiaoList.value.length; i++) {
if (res.Symbol === gupiaoList.value[i].shuzidaima) {
gupiaoList.value[i].price = res.Last
gupiaoList.value[i].zhangdieshu = res.Chg
gupiaoList.value[i].zhangdiebaifenbi = res.ChgPct
gupiaoList[i].zhangdieshu = Number(gupiaoList[i].zhangdieshu).toFixed(1)
gupiaoList[i].zhangdiebaifenbi = Number(gupiaoList[i].zhangdiebaifenbi).toFixed(1)
gupiaoList[i].price = Number(gupiaoList[i].price).toFixed(1)
// console.log(res, 'socket res')
// return
}
}
for (let i = 0; i < hotGupiaoList.value.length; i++) {
if (res.Symbol === hotGupiaoList.value[i].shuzidaima) {
hotGupiaoList.value[i].price = res.Last
hotGupiaoList.value[i].zhangdieshu = res.Chg
hotGupiaoList.value[i].zhangdiebaifenbi = res.ChgPct
// console.log(res, 'socket res')
// return
}
}
// gupiaoList.value.map((itme) => {
// if (res.Symbol === itme.shuzidaima) {
// return { ...itme, price: res.Last, zhangdieshu: res.Chg, zhangdiebaifenbi: res.ChgPct }
// }
// return itme
// })
// console.log(JSON.parse(res), 'socket res')
})
gupiaoInfo.value = res.data
// if (page === 1) {
// gupiaoList.value = [...res?.data?.data]
// } else {
// gupiaoList.value = [...gupiaoList.value, ...res?.data?.data]
// }
pageLoading.value = false
}
const scrolltolower = () => {
if (gupiaoInfo.value?.current_page < gupiaoInfo.value?.last_page && !pageLoading.value && buttonType.value === 'gupiao') {
getGupiaoList()
}
}
// 類別切換
const buttonType = ref('gupiao')
</script>
<style scoped lang="scss">
.search {
height: 2.91rem;
}
.box {
// background: rgb(13, 38, 67, 0.7);
margin-top: 0.9375rem;
border-radius: 1.5625rem 1.5625rem 0 0;
}
.button_wrap {
display: flex;
padding: 0.94rem 1.25rem;
.button {
width: 6.875rem;
height: 2.125rem;
color: #fff;
border-radius: 1.25rem;
margin-right: 0.88rem;
// padding: 0 0.5rem;
background: #08182b;
// width: 5.94rem;
// height: 1.25rem;
line-height: 2.125rem;
text-align: center;
font-size: 0.875rem;
}
.active {
background-color: $uni-color-primary;
color: #fff;
}
}
.content {
overflow-y: scroll;
.hotlist {
.hot_gupiao_wrap {
display: flex;
padding: 0.44rem 0.69rem 0;
// justify-content: space-between;
flex-wrap: wrap;
.gupiao {
width: 32%;
height: 4.56rem;
border-radius: 0.94rem;
// box-shadow: 0px 0px 5px 2px #f4f4f4;
padding: 0.09rem 0.19rem;
margin: 0 0.6667% 0.41rem;
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
> .up {
background-color: #fff3f5;
// background-image: url('/src/static/image/market/up.png');
border-radius: 0.625rem;
background-size: 100%;
background-repeat: no-repeat;
background-position: bottom;
}
> .down {
background-color: #e8f7ef;
border-radius: 0.625rem;
// background-image: url('/src/static/image/market/down.png');
background-size: 100%;
background-repeat: no-repeat;
background-position: bottom;
}
}
.hot_gupiao_wrap + .hot_gupiao_wrap {
padding-top: 0;
}
.plus {
border: 0.03rem solid #eceded;
margin: 0.16rem 0.06rem;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
}
.gupiao_wrap {
padding-top: 0.3rem;
padding: 0.3rem 0.9375rem 0;
.gupiao {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.6875rem 1rem 0.5625rem 0;
background-color: rgb(10, 31, 54, 0.8);
border-radius: 0.625rem;
margin-bottom: 0.31rem;
.zixuan {
width: 2.125rem;
height: 2.125rem;
}
.title {
color: #fff;
font-size: 0.875rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-weight: 500;
}
.code {
color: #a0a5b0;
font-size: 0.75rem;
}
}
}
}
</style>
<template>
<!-- <view class="bg-[#fff]">
<SearchNavigation />
</view> -->
<Navigator :title="t('tabbar.record')" :is-show-back="false" />
<scroll-view scroll-y :style="{ height: 'calc(100vh - 50px)' }" @scrolltolower="getNews">
<view class="box">
<!-- <image src="../../static/image/record/banner.png" /> -->
<view class="record-list">
<NotData v-if="!recordList.length" />
<view v-for="item in recordList" :key="item.id" class="record-item" @click="onPage(item.id)">
<view class="record-item-title"> {{ item.title }} </view>
<view class="record-item-time">{{ formatTimestamp(item.updatetime * 1000) }}</view>
</view>
</view>
</view>
</scroll-view>
<CustomTabbar :id="3" />
</template>
<script lang="ts" setup>
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
import Navigator from '@/components/navigator/navigator.vue'
import { useI18n } from 'vue-i18n'
// import SearchNavigation from '@/components/searchNavigation/searchNavigation.vue'
import { ref } from 'vue'
import { getNewsApi } from '@/api/record/record'
import { onLoad } from '@dcloudio/uni-app'
import type { Ref } from 'vue'
import { closeToast, showLoadingToast } from 'vant'
const { t } = useI18n()
interface recordType {
id: number
image: string
title: string
updateTime: number
}
const onPage = (id: number | string) => {
uni.navigateTo({
url: '/subPackages/details/details?id=' + id
})
}
// 格式化时间
function formatTimestamp(timestamp: number | string) {
const date = new Date(timestamp)
const year = date.getFullYear()
// 月份从0开始,所以我们需要加1
const month = ('0' + (date.getMonth() + 1)).slice(-2)
const day = ('0' + date.getDate()).slice(-2)
const hours = ('0' + date.getHours()).slice(-2)
const minutes = ('0' + date.getMinutes()).slice(-2)
return `${year}/${month}/${day} ${hours}:${minutes}`
}
const recordList: Ref[recordType] = ref([])
onLoad(() => {
page = 1
recordList.value = []
getNews()
})
let page = 1
const getNews = async () => {
showLoadingToast({
message: t('toastText.tip1'),
forbidClick: true,
overlay: true,
loadingType: 'spinner'
})
const res = await getNewsApi({ page })
if (res.code === 1) {
closeToast()
page++
// res.data.data.forEach((element) => {
// recordList.value.push(element)
// })
res.data.data.forEach((item) => {
recordList.value.push(item)
})
}
}
</script>
<style scoped lang="scss">
.box {
margin-top: 0.625rem;
// padding-top: 3.5313rem;
.record-list {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
// margin-top: 0.5625rem;
.record-item {
width: 21.5625rem;
height: 5rem;
background: rgb(8, 24, 43, 0.7);
border-radius: 0.9375rem;
padding: 0.625rem;
position: relative;
margin-bottom: 0.4688rem;
.record-item-title {
font-weight: 500;
font-size: 0.8125rem;
color: #fff;
}
.record-item-time {
font-weight: 500;
font-size: 0.8125rem;
color: #a2a2a2;
position: absolute;
bottom: 0.3125rem;
right: 0.75rem;
}
}
}
uni-image {
width: 100%;
height: 4.5938rem;
}
}
</style>
<template>
<view class="box" :style="{ backgroundImage: `url(${bg})`, backgroundRepeat: 'noRepeat', backgroundSize: '100% 100%' }">
<view class="top">
<view class="user-info-left">
<img class="headImg" src="/static/image/user/touxiang.png" alt="" />
<view class="user-info-box">
<view style="color: #fff; font-size: 1rem; font-weight: 500">{{ desensitization(store.$state.userInfo?.mobile) }}</view>
<view style="font-size: 0.8125rem; color: #a6a6a6">{{ store.$state.userInfo?.true_name || t('index.tip1') }}</view>
<!-- <span>{{ t('user.xinyongpingfen') }}{{ store.$state.userInfo?.score }}</span> -->
</view>
</view>
<view class="user-info-right" @click="goPage('/subPackages/seting/seting')">
<img :src="set" style="width: 1.0211rem; height: 0.875rem" />
</view>
<!-- <view class="user-info-bottom">
<view class="zichan-box">
<view style="display: flex; align-items: center">
<span class="zichan-box-title">{{ t('user.zongzichan') }}</span>
<van-icon v-if="!isShowInfo" name="closed-eye" color="#50aff0" size="20" class="showIcon" @click="isShowInfo = !isShowInfo" />
<van-icon v-else name="eye-o" color="#50aff0" size="20" class="showIcon" @click="isShowInfo = !isShowInfo" />
</view>
<span v-if="!isShowInfo" class="zichan-box-money">******</span>
<span v-else class="zichan-box-money" style="font-size: 0.8125rem; font-weight: 400">{{ Number(store.$state.userInfo?.total).toLocaleString() || 0 }}</span>
</view>
<view id="zichan-chart" class="zichan-chart"> </view>
</view> -->
</view>
<view class="user-info">
<view class="user-info-top">
<view class="user-info-top-left">
<view class="zichan-box">
<view style="display: flex; align-items: center">
<span class="zichan-box-title">{{ t('user.zongzichan') }}</span>
<van-icon v-if="!isShowInfo" name="closed-eye" color="#aeb2bb" size="20" class="showIcon" @click="isShowInfo = !isShowInfo" />
<van-icon v-else name="eye-o" color="#aeb2bb" size="20" class="showIcon" @click="isShowInfo = !isShowInfo" />
</view>
<span v-if="!isShowInfo" class="zichan-box-money">******</span>
<span v-else class="zichan-box-money">{{ Number(store.$state.userInfo?.total).toLocaleString() || 0 }}</span>
</view>
</view>
<view class="user-info-top-right">
<van-button class="chongzhi" type="primary" @click="goWeb">{{ t('user.chongzhi') }}</van-button>
<van-button type="primary" plain class="plain-btn" @click="goPage('/subPackages/withdrawal/withdrawal')">{{ t('user.tixian') }}</van-button>
</view>
</view>
<view class="user-info-buttom">
<view v-for="(item, i) in userAssetsInfo" :key="i" class="user-info-item" :style="i === 0 ? { textAlign: 'left' } : i === 1 ? { textAlign: 'center' } : { textAlign: 'right' }">
<view class="user-info-item-left">
<!-- <view class="user-info-item-tou" :style="{ background: item.tou }"></view> -->
<view class="user-info-item-t">{{ t(item.t) }}</view>
</view>
<view v-if="!isShowInfo" class="user-info-item-money">******</view>
<view v-else class="user-info-item-money">{{ item.num }}</view>
</view>
</view>
<!-- <view v-for="(item, i) in userAssetsInfo" :key="i" class="user-info-item">
<view class="user-info-item-left">
<view class="user-info-item-tou" :style="{ background: item.tou }"></view>
<view class="user-info-item-t">{{ t(item.t) }}</view>
</view>
<view v-if="!isShowInfo" class="user-info-item-money">******</view>
<view v-else class="user-info-item-money">{{ item.num }}</view>
</view> -->
<!-- <view class="user-info-btns">
<van-button class="chongzhi" type="primary" @click="goWeb">{{ t('user.chongzhi') }}</van-button>
<van-button type="primary" plain class="plain-btn" @click="goPage('/subPackages/withdrawal/withdrawal')">{{ t('user.tixian') }}</van-button>
</view> -->
</view>
<view class="page-list-box">
<view v-for="(item, i) in pageListArr" :key="i" class="page-list-item" @click="goPage(i === 6 ? store.clearState() : goPage(item.url, i == 5 ? true : false))">
<!-- <van-icon name></van-icon> -->
<view style="display: flex; align-items: center">
<image class="page-list-item-icon" :src="item.imgUrl" />
<view class="name">{{ t(item.name) }}</view>
</view>
<img :src="right" style="width: 0.4063rem; height: 0.75rem" />
</view>
<!-- <view class="page-list-item"></view> -->
</view>
</view>
<CustomTabbar :id="4" />
</template>
<script lang="ts" setup>
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
import * as echarts from 'echarts'
import { useI18n } from 'vue-i18n'
import { computed, onMounted, ref } from 'vue'
import { useCounterStore } from '@/store/store'
import { onShow } from '@dcloudio/uni-app'
import { getCzhiurlApi } from '@/api/user'
import { changeMoney } from '@/common/common'
import { showToast } from 'vant'
import bg from '@/static/bg.png'
import right from '@/static/rigth.png'
import set from '@/static/image/searchNavigation/set.png'
const store = useCounterStore()
// 基于准备好的dom,初始化echarts实例
const kefu_url = ref('')
const getCzhiurlFn = async () => {
const res = await getCzhiurlApi()
if (res.code === 1) {
kefu_url.value = res.data.kefu_url
}
}
// 手机号脱敏
const desensitization = (str: string) => {
return str
.split('')
.map((item, i) => {
if (i >= 3 && i <= 6) {
return '*'
}
return item
})
.join('')
}
const goWeb = () => {
showToast(t('user.tip1'))
// window.open(kefu_url.value)
}
onMounted(() => {
const myChart = echarts.init(document.getElementById('zichan-chart'))
const option = {
series: [
{
name: 'Access From',
type: 'pie',
radius: '80%',
avoidLabelOverlap: false,
itemStyle: {
borderColor: '#fff',
borderWidth: 0
},
label: {
show: false,
position: 'center'
},
color: ['#50AFF0', '#50F0AA'],
data: [
{ value: store.$state.userInfo?.money || 0, name: t('user.xianjinyue') },
{ value: store.$state.userInfo?.shizhi || 0, name: t('user.beiyongzijin') }
]
}
]
}
option && myChart.setOption(option)
})
onShow(() => {
getCzhiurlFn()
// setInterval(() => {
store.getUserInfo()
// }, 50000)
})
const goPage = (url: string, is = false) => {
if (is) {
goWeb()
return
}
uni.navigateTo({ url })
}
const { t } = useI18n()
const isShowInfo = ref(false)
const pageListArr = [
{
name: 'user.yinhangzhanghu',
imgUrl: '/static/image/user/2.png',
url: '/subPackages/bankAccount/bankAccount'
},
{
name: 'user.shouru',
imgUrl: '/static/image/user/1.png',
url: '/subPackages/transactionLog/transactionLog'
},
{
name: 'user.benrenqueren',
imgUrl: '/static/image/user/3.png',
url: '/subPackages/real_name/real_name'
},
{
name: 'user.rizhisuoyin',
imgUrl: '/static/image/user/4.png',
url: '/subPackages/changePassword/changePassword'
},
{
name: 'user.shiwuchuli',
imgUrl: '/static/image/user/5.png',
url: '/subPackages/transactionPassions/transactionPassions'
},
{
name: 'user.kefuzhongxin',
imgUrl: '/static/image/user/6.png',
url: '/subPackages/customerService/customerService'
},
// {
// name: 'user.qiehuanyuyan',
// imgUrl: '/static/image/user/7.png',
// url: '/subPackages/switchLanguage/switchLanguage'
// },
{
name: 'user.zhuxiao',
imgUrl: '/static/image/user/8.png',
url: '/subPackages/logout/logout'
}
]
const money = computed(() => {
return changeMoney(store.$state.userInfo?.money || 0) || 0
})
const count_market = computed(() => {
return changeMoney(store.$state.userInfo?.shizhi || 0) || 0
})
const count_losses = computed(() => {
return changeMoney(store.$state.userInfo?.my_losses?.count_losses || 0) || 0
})
const userAssetsInfo = ref([
{
t: 'user.xianjinyue',
num: money,
tou: '#50AFF0'
},
{
t: 'user.beiyongzijin',
num: count_market,
tou: '#50F0AA'
},
{
t: 'user.fudongsunyi',
num: count_losses,
tou: '#C850F0'
}
])
</script>
<style scoped lang="scss">
::v-deep .van-button--normal {
padding: 0;
}
uni-view {
box-sizing: border-box;
}
* {
font-weight: 500;
}
::v-deep .van-button {
width: 4.0625rem;
height: 1.5rem;
border-radius: 1.5625rem;
.van-button__text {
font-size: $uni-font-size-1;
}
}
.box {
.page-list-box {
margin-top: 0.75rem;
height: 30rem;
// background: #ffffffb2;
background: rgba(9, 40, 73, 0.5);
border-top-left-radius: 1.875rem;
border-top-right-radius: 1.875rem;
// fill: rgba(255, 255, 255, 0.7);
// background: #000;
// box-shadow: 0px 2px 0px 0px #fff inset;
// padding-bottom: 4.375rem;
// margin-bottom: 1.25rem;
// filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
.page-list-item {
width: 21.5625rem;
height: 3.6875rem;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 1.2813rem;
// border-bottom: solid #0e0e0e;
.page-list-item-icon {
width: 2.125rem;
height: 2.125rem;
margin-right: 0.625rem;
}
.name {
color: #fff;
font-size: 0.875rem;
}
}
}
.user-info {
width: 21.5625rem;
height: 8.9375rem;
border-radius: 1.25rem;
background: rgba(9, 40, 73, 0.5);
// box-shadow: 0px 2px 0px 0px #fff inset;
margin: 1.6875rem auto 0;
padding: 1rem 0.9375rem 1.0313rem 0.9375rem;
.user-info-buttom {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.9375rem;
}
.user-info-top {
display: flex;
justify-content: space-between;
align-items: center;
.user-info-top-left {
.zichan-box {
display: flex;
flex-direction: column;
// margin-top: 0.9375rem;
// margin-left: 1rem;
position: relative;
.showIcon {
margin-left: 0.625rem;
}
.zichan-box-title {
font-size: 0.8125rem;
color: #aeb2bb;
}
.zichan-box-money {
font-weight: 500;
font-size: 1.25rem;
color: #fff;
}
}
}
.user-info-top-right {
.chongzhi {
background: #08182b;
color: #fff;
margin-right: 0.625rem;
}
.plain-btn {
background: $uni-color-primary;
}
::v-deep .van-button--primary .van-button__text {
color: #fff;
}
::v-deep .van-button--primary.plain-btn .van-button__text {
color: #fff;
}
}
}
.user-info-btns {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1.2813rem;
::v-deep .van-button--primary .van-button__text {
color: #6a69e9;
}
::v-deep .van-button--primary.plain-btn .van-button__text {
color: #0e0c0c;
}
}
.user-info-item {
width: 100%;
display: flex;
flex-direction: column;
// align-items: center;
justify-content: space-between;
// padding: 0 1.2813rem;
margin-bottom: 0.5938rem;
.user-info-item-money {
line-height: 1rem;
font-size: 1rem;
font-weight: 500;
color: #fff;
margin-top: 0.3125rem;
}
.user-info-item-left {
// display: flex;
// align-items: center;
.user-info-item-t {
font-size: 0.875rem;
color: #aeb2bb;
}
.user-info-item-tou {
width: 0.4063rem;
height: 0.4063rem;
border-radius: 50%;
margin-right: 0.4375rem;
}
}
}
}
.top {
width: 100%;
height: 3.0625rem;
padding: 0.9375rem;
.user-info-bottom {
position: absolute;
top: 5.9063rem;
left: 0.6563rem;
width: 22.125rem;
height: 3.625rem;
// background: #f8fafc;
border-radius: 1.25rem;
display: flex;
justify-content: space-between;
.zichan-chart {
width: 2.875rem;
height: 2.875rem;
// background: #50aff0;
// border-radius: 50%;
margin-right: 1.0938rem;
margin-top: 0.3125rem;
}
}
.user-info-right {
position: absolute;
top: 2.0313rem;
right: 0.9375rem;
font-weight: 500;
font-size: $uni-font-size-1;
color: #50aff0;
display: flex;
justify-content: center;
align-items: center;
.icon-arrow {
width: 0.375rem;
height: 0.6563rem;
margin-top: 0.125rem;
// position: absolute;
// right: 0.75rem;
// top: 0.4375rem;
}
}
.user-info-left {
// margin: 0.6933rem 0 0 0.56rem;
display: flex;
align-items: center;
.user-info-box {
display: flex;
flex-direction: column;
justify-content: center;
// align-items: center;
font-weight: 500;
font-size: 1rem;
color: #161616;
// line-height: 2.0625rem;
span {
height: 0.625rem;
margin-bottom: 0.3125rem;
line-height: 0.625rem;
}
}
}
.headImg {
border-radius: 50%;
height: 2.4375rem;
width: 2.4375rem;
margin-right: 0.7813rem;
}
}
}
</style>
<svg width="288" height="69" viewBox="0 0 288 69" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1154_153)">
<path d="M138 15.1001H176.3V53.4001H138V15.1001Z" fill="#9FCBED"/>
<path d="M178.2 13.2V13.1H178.1V0H176.3V13.1H135.9V53.5H0V55.3H135.9V55.4H136V68.5H137.8V55.4H178.2V15H288V13.2H178.2ZM176.2 53.4H138V15.1H176.3V53.4H176.2ZM97.7 37.1H99.5L102.9 42.3H105.4L101.8 36.9C103.6 36.6 104.8 35 104.8 33.1C104.8 30.7 103.1 29.4 100 29.4H95.6V42.3H97.8L97.7 37.1ZM97.7 31.2H99.7C101.2 31.2 101.3 31.2 101.7 31.5C102.2 31.9 102.5 32.4 102.5 33.1C102.5 33.8 102.3 34.3 101.8 34.7C101.3 35.2 101 35.2 99.7 35.2H97.7V31.2ZM54.8 41.8C55.8 42.4 57.3 42.8 58.5 42.8C59.7 42.8 61.2 42.4 62.2 41.8C63.6 41 64.1 39.7 64.1 37.1V29.4H62V37.4C62 39.7 60.8 40.9 58.5 40.9C56.2 40.9 55 39.7 55 37.4V29.4H52.9V37.1C52.9 39.6 53.5 40.9 54.8 41.8ZM123.3 40.5H117.2V36.6H122.1V34.8H117.2V31.2H123.1V29.4H115V42.3H123.2L123.3 40.5ZM77 38.8H82.4L83.9 42.3H86L80.7 29H78.6L73.4 42.2V42.3H75.6L77 38.8ZM79.8 31.5L81.9 37H77.7L79.8 31.5ZM35.1 42.6C36.3 44 37 44.8 38 45.5C38.9 46.1 39.5 46.4 41 47L42.2 45.5H42.1C40.8 45 40.4 44.8 39.6 44.2C38.8 43.7 38.5 43.4 37.7 42.5C41.1 41.6 43.1 39.1 43.1 35.9C43.1 32 40.1 29.2 35.9 29.2C31.7 29.2 28.7 32 28.7 35.9C28.7 37.7 29.4 39.4 30.7 40.7C32.1 41.8 32.9 42.2 35.1 42.6ZM36.1 31C38.9 31 41 33.1 41 35.9C41 38.7 38.9 40.8 36.1 40.8C33.3 40.8 31.2 38.7 31.2 35.9C31.2 33.1 33.3 31 36.1 31ZM258.6 39.3C258.5 39 258.3 38.7 258.2 38.5L251 29.4H248.9V42.3H250.9V32.3C251 32.5 251.2 32.8 251.5 33.2L258.7 42.5H260.6V29.4H258.6V39.3ZM235.4 42.3H237.6V29.4H235.4V42.3ZM14.3 40.5C13.4 40.5 12.6 40.3 11.8 40C11.2 39.8 10.7 39.5 9.8 38.8L8.6 40.6C9.8 41.4 10.2 41.7 10.9 41.9C11.9 42.3 13 42.5 14.2 42.5C17.8 42.5 20.1 40.6 20.1 37.5C20.1 36.2 19.6 35 18.7 34.2C18.1 33.7 17.2 33.1 15.9 32.4C12.3 30.5 11.6 29.8 11.6 28.6C11.6 27.1 12.9 26.2 14.9 26.2C15.6 26.2 16.7 26.4 17.3 26.6C17.9 26.8 18.2 27 19.1 27.5L20.2 25.6C19.2 25 18.8 24.8 18 24.5C17.1 24.2 16.1 24.1 15 24.1C11.5 24.1 9.1 26 9.1 28.9C9.1 30.8 10.2 32.2 12.9 33.6C14.1 34.3 14.9 34.7 15.4 35C15.6 35.1 15.7 35.2 15.8 35.2C16.5 35.6 17 36.1 17.3 36.6C17.5 36.9 17.6 37.3 17.6 37.8C17.6 39.6 16.4 40.5 14.3 40.5ZM269.7 31.2H274.3V42.3H276.4V31.2H281V29.4H269.7V31.2ZM218 29.2C213.8 29.2 210.8 32 210.8 35.9C210.8 39.8 213.8 42.6 218 42.6C222.2 42.6 225.2 39.8 225.2 35.9C225.2 32 222.2 29.2 218 29.2ZM218 40.8C215.2 40.8 213.1 38.7 213.1 35.9C213.1 33.1 215.2 31 218 31C220.8 31 222.9 33.1 222.9 35.9C222.9 38.7 220.8 40.8 218 40.8ZM196.5 24.5H190.9V42.3H193.2V35.6H193.4C194.8 35.7 195.3 35.8 195.9 35.8C199.8 35.8 202.3 33.5 202.3 29.8C202.3 28.1 201.8 26.9 200.9 25.9C199.9 24.9 198.7 24.5 196.5 24.5ZM197.8 33.5C197.2 33.7 196.5 33.8 195.5 33.8C194.9 33.8 194.4 33.8 193.2 33.6V26.4H196.2C197.6 26.4 198.4 26.6 198.9 27.1C199.5 27.7 199.9 28.7 199.9 29.8C199.9 31.6 199.1 33 197.8 33.5Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0_1154_153">
<rect width="288" height="68.5" fill="white"/>
</clipPath>
</defs>
</svg>
<svg width="288" height="69" viewBox="0 0 288 69" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1154_159)">
<path d="M138 15.1001H176.3V53.4001H138V15.1001Z" fill="#9FCBED"/>
<path d="M178.2 13.2V13.1H178.1V0H176.3V13.1H135.9V53.5H0V55.3H135.9V55.4H136V68.5H137.8V55.4H178.2V15H288V13.2H178.2ZM176.2 53.4H138V15.1H176.3V53.4H176.2ZM97.7 37.1H99.5L102.9 42.3H105.4L101.8 36.9C103.6 36.6 104.8 35 104.8 33.1C104.8 30.7 103.1 29.4 100 29.4H95.6V42.3H97.8L97.7 37.1ZM97.7 31.2H99.7C101.2 31.2 101.3 31.2 101.7 31.5C102.2 31.9 102.5 32.4 102.5 33.1C102.5 33.8 102.3 34.3 101.8 34.7C101.3 35.2 101 35.2 99.7 35.2H97.7V31.2ZM54.8 41.8C55.8 42.4 57.3 42.8 58.5 42.8C59.7 42.8 61.2 42.4 62.2 41.8C63.6 41 64.1 39.7 64.1 37.1V29.4H62V37.4C62 39.7 60.8 40.9 58.5 40.9C56.2 40.9 55 39.7 55 37.4V29.4H52.9V37.1C52.9 39.6 53.5 40.9 54.8 41.8ZM123.3 40.5H117.2V36.6H122.1V34.8H117.2V31.2H123.1V29.4H115V42.3H123.2L123.3 40.5ZM77 38.8H82.4L83.9 42.3H86L80.7 29H78.6L73.4 42.2V42.3H75.6L77 38.8ZM79.8 31.5L81.9 37H77.7L79.8 31.5ZM35.1 42.6C36.3 44 37 44.8 38 45.5C38.9 46.1 39.5 46.4 41 47L42.2 45.5H42.1C40.8 45 40.4 44.8 39.6 44.2C38.8 43.7 38.5 43.4 37.7 42.5C41.1 41.6 43.1 39.1 43.1 35.9C43.1 32 40.1 29.2 35.9 29.2C31.7 29.2 28.7 32 28.7 35.9C28.7 37.7 29.4 39.4 30.7 40.7C32.1 41.8 32.9 42.2 35.1 42.6ZM36.1 31C38.9 31 41 33.1 41 35.9C41 38.7 38.9 40.8 36.1 40.8C33.3 40.8 31.2 38.7 31.2 35.9C31.2 33.1 33.3 31 36.1 31ZM258.6 39.3C258.5 39 258.3 38.7 258.2 38.5L251 29.4H248.9V42.3H250.9V32.3C251 32.5 251.2 32.8 251.5 33.2L258.7 42.5H260.6V29.4H258.6V39.3ZM235.4 42.3H237.6V29.4H235.4V42.3ZM14.3 40.5C13.4 40.5 12.6 40.3 11.8 40C11.2 39.8 10.7 39.5 9.8 38.8L8.6 40.6C9.8 41.4 10.2 41.7 10.9 41.9C11.9 42.3 13 42.5 14.2 42.5C17.8 42.5 20.1 40.6 20.1 37.5C20.1 36.2 19.6 35 18.7 34.2C18.1 33.7 17.2 33.1 15.9 32.4C12.3 30.5 11.6 29.8 11.6 28.6C11.6 27.1 12.9 26.2 14.9 26.2C15.6 26.2 16.7 26.4 17.3 26.6C17.9 26.8 18.2 27 19.1 27.5L20.2 25.6C19.2 25 18.8 24.8 18 24.5C17.1 24.2 16.1 24.1 15 24.1C11.5 24.1 9.1 26 9.1 28.9C9.1 30.8 10.2 32.2 12.9 33.6C14.1 34.3 14.9 34.7 15.4 35C15.6 35.1 15.7 35.2 15.8 35.2C16.5 35.6 17 36.1 17.3 36.6C17.5 36.9 17.6 37.3 17.6 37.8C17.6 39.6 16.4 40.5 14.3 40.5ZM269.7 31.2H274.3V42.3H276.4V31.2H281V29.4H269.7V31.2ZM218 29.2C213.8 29.2 210.8 32 210.8 35.9C210.8 39.8 213.8 42.6 218 42.6C222.2 42.6 225.2 39.8 225.2 35.9C225.2 32 222.2 29.2 218 29.2ZM218 40.8C215.2 40.8 213.1 38.7 213.1 35.9C213.1 33.1 215.2 31 218 31C220.8 31 222.9 33.1 222.9 35.9C222.9 38.7 220.8 40.8 218 40.8ZM196.5 24.5H190.9V42.3H193.2V35.6H193.4C194.8 35.7 195.3 35.8 195.9 35.8C199.8 35.8 202.3 33.5 202.3 29.8C202.3 28.1 201.8 26.9 200.9 25.9C199.9 24.9 198.7 24.5 196.5 24.5ZM197.8 33.5C197.2 33.7 196.5 33.8 195.5 33.8C194.9 33.8 194.4 33.8 193.2 33.6V26.4H196.2C197.6 26.4 198.4 26.6 198.9 27.1C199.5 27.7 199.9 28.7 199.9 29.8C199.9 31.6 199.1 33 197.8 33.5Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_1154_159">
<rect width="288" height="68.5" fill="white"/>
</clipPath>
</defs>
</svg>
import { defineStore } from 'pinia'
import { userInfoType } from './storeType'
import { getUserInfoApi } from '@/api/user'
interface userState {
token: null | string
userId: null | number
tabbarHeight: null | string
userInfo: null | userInfoType
navigaterHeight: null | string
}
export const useCounterStore = defineStore('counter', {
state: (): userState => ({
token: null,
userId: null,
userInfo: null,
tabbarHeight: '3.16rem',
navigaterHeight: '3.13rem'
}),
actions: {
async getUserInfo() {
// 调用获取个人信息接口 来判断是否需要跳转登录页
const res = await getUserInfoApi({ user_id: this.$state.userInfo?.user_id })
if (res.code === 1) {
uni.setStorageSync('userInfo', res.data)
this.$state.userInfo = res.data
}
},
// 清除个人信息
clearState() {
this.$state = {
token: null,
userId: null,
userInfo: null,
tabbarHeight: '5.503rem'
} as userState
uni.removeStorageSync('token')
uni.removeStorageSync('userId')
uni.removeStorageSync('userInfo')
uni.removeStorageSync('tabbarHeight')
this.getUserInfo()
}
}
})
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
}
* {
box-sizing: border-box;
color: $uni-text-color;
}
.van-toast__text {
color: #ffffff !important;
}
.van-toast__icon {
color: #ffffff !important;
}
.van-button {
font-family: var(--van-base-font) !important;
}
.van-haptics-feedback {
font-family: var(--van-base-font) !important;
}
.text_hied {
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; //溢出不换行
}
/*
! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: currentColor;
/* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
-webkit-tap-highlight-color: transparent;
/* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0;
/* 1 */
color: inherit;
/* 2 */
border-top-width: 1px;
/* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
/* 1 */
font-feature-settings: normal;
/* 2 */
font-variation-settings: normal;
/* 3 */
font-size: 1em;
/* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0;
/* 1 */
border-color: inherit;
/* 2 */
border-collapse: collapse;
/* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-feature-settings: inherit;
/* 1 */
font-variation-settings: inherit;
/* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
/* 1 */
line-height: inherit;
/* 1 */
letter-spacing: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
/* 2 */
background-image: none;
/* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder,
textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
input::placeholder,
textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role='button'] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
/* 1 */
vertical-align: middle;
/* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
display: none;
}
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
::backdrop {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
.container {
width: 100%;
}
@media (min-width: 640px) {
.container {
max-width: 640px;
}
}
@media (min-width: 768px) {
.container {
max-width: 768px;
}
}
@media (min-width: 1024px) {
.container {
max-width: 1024px;
}
}
@media (min-width: 1280px) {
.container {
max-width: 1280px;
}
}
@media (min-width: 1536px) {
.container {
max-width: 1536px;
}
}
.fixed {
position: fixed;
}
.absolute {
position: absolute;
}
.relative {
position: relative;
}
.mx-\[1\.88rem\] {
margin-left: 1.88rem;
margin-right: 1.88rem;
}
.my-\[\.8rem\] {
margin-top: 0.8rem;
margin-bottom: 0.8rem;
}
.ml-10 {
margin-left: 2.5rem;
}
.ml-\[0\.75rem\] {
margin-left: 0.75rem;
}
.mr-\[0\.16rem\] {
margin-right: 0.16rem;
}
.mr-\[0\.25rem\] {
margin-right: 0.25rem;
}
.mr-\[0\.63rem\] {
margin-right: 0.63rem;
}
.mt-10 {
margin-top: 2.5rem;
}
.mt-\[\.5rem\] {
margin-top: 0.5rem;
}
.mt-\[0\.31rem\] {
margin-top: 0.31rem;
}
.mt-\[0\.4rem\] {
margin-top: 0.4rem;
}
.mt-\[0\.78rem\] {
margin-top: 0.78rem;
}
.mt-\[1\.44rem\] {
margin-top: 1.44rem;
}
.mt-\[0\.48rem\] {
margin-top: 0.48rem;
}
.mt-\[0\.38rem\] {
margin-top: 0.38rem;
}
.mt-\[0\.28rem\] {
margin-top: 0.28rem;
}
.block {
display: block;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.list-item {
display: list-item;
}
.hidden {
display: none;
}
.h-\[1\.63rem\] {
height: 1.63rem;
}
.h-full {
height: 100%;
}
.w-\[1\.72rem\] {
width: 1.72rem;
}
.w-full {
width: 100%;
}
.flex-1 {
flex: 1 1 0%;
}
.flex-2 {
flex: 2 2 0%;
}
.transform {
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.flex-col {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.items-center {
align-items: center;
}
.justify-end {
justify-content: flex-end;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.overflow-hidden {
overflow: hidden;
}
.border {
border-width: 1px;
}
.bg-\[\#fff\] {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.bg-user {
--tw-bg-opacity: 1;
background-color: rgb(99 141 170 / var(--tw-bg-opacity));
}
.px-\[\.75rem\] {
padding-left: 0.75rem;
padding-right: 0.75rem;
}
.pb-\[0\.4rem\] {
padding-bottom: 0.4rem;
}
.pr-\[\.5rem\] {
padding-right: 0.5rem;
}
.pt-\[0\.4rem\] {
padding-top: 0.4rem;
}
.text-left {
text-align: left;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.text-\[0\.9375rem\] {
font-size: 0.9375rem;
}
.text-\[0\.94rem\] {
font-size: 0.94rem;
}
.text-\[1\.2rem\] {
font-size: 1.2rem;
}
.text-\[1rem\] {
font-size: 1rem;
}
.text-base {
font-size: 0.63rem;
}
.text-lg {
font-size: 0.75rem;
}
.text-mini {
font-size: 0.38rem;
}
.text-sm {
font-size: .5625rem;
}
.font-bold {
font-weight: 700;
}
.text-primary {
--tw-text-opacity: 1;
color: rgb(14 14 14 / var(--tw-text-opacity));
}
.text-red {
--tw-text-opacity: 1;
color: rgb(234 53 34 / var(--tw-text-opacity));
}
.filter {
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
@tailwind base;
@tailwind components;
@tailwind utilities;
\ No newline at end of file
<script setup lang="ts">
import { Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { BankInfoType } from '@/api/bankAccount/indexType'
import { addBankApi } from '@/api/bankAccount'
import { showSuccessToast } from 'vant'
const form: Ref<BankInfoType> = ref({
shiming_name: '',
bank_card: '',
bank_address: '',
bank_name: '',
bank_code: ''
})
const formList = [
{
label: 'account.zhanghaoming',
dataName: 'shiming_name',
msgName: 'checkMsg.shuruxinming'
},
{
label: 'account.zhanghao',
dataName: 'bank_card',
msgName: 'checkMsg.shuruzhanghao'
},
{
label: 'account.yinghangming',
dataName: 'bank_name',
msgName: 'checkMsg.shuruyinhangming'
},
{
label: 'account.fenhangmingceng',
dataName: 'bank_address',
msgName: 'checkMsg.shurufenhangming'
},
{
label: 'account.fenhangbianhap',
dataName: 'bank_code',
msgName: 'checkMsg.shurufenhanghaomao'
}
]
const { t } = useI18n()
// 提交表单
const submitFn = async () => {
const res = await addBankApi(form.value)
if (res.code === 1) {
showSuccessToast(res.data.msg)
uni.redirectTo({
url: '/subPackages/bankAccount/bankAccount'
})
}
}
</script>
<template>
<Navigater :title="t('account.cunquzhanghaodengji')"></Navigater>
<view class="Box">
<!-- <view class="box-top"> {{ t('account.chatu') }} </view> -->
<view class="box-form-card">
<view v-for="(item, i) in formList" :key="i" class="box-form-item">
<view class="box-form-item-label"> &nbsp;&nbsp;{{ t(item.label) }}</view>
<van-field v-model="form[item.dataName]" :placeholder="t(item.msgName)" />
</view>
<div class="btn" type="primary" @click="submitFn">{{ t('account.cunquzhanghaodengjibtn') }}</div>
</view>
</view>
</template>
<style lang="scss" scoped>
::v-deep .van-field__control {
height: 2rem;
border: none;
font-weight: 400;
font-size: 0.9375rem;
color: #fff;
}
::v-deep .van-field {
width: 20rem;
height: 3.375rem;
background: rgb(10, 30, 54, 0.5);
border-radius: 0.625rem;
}
::v-deep .van-field__body {
width: 20rem;
height: 3.375rem;
background: rgb(10, 30, 54, 0.5);
color: #fff;
border-radius: 0.9688rem;
padding: 1.0938rem 0.9375rem 0.9688rem 1.25rem;
.van-field__right-icon {
padding: 0;
margin-right: 0.625rem;
.van-icon__image {
width: 1.2813rem;
height: 1.375rem;
}
}
}
::v-deep .van-button {
margin-top: 2.6875rem;
width: 20.9375rem;
height: 2.75rem;
border-radius: 1.5625rem;
background: #ee2560;
}
::v-deep .van-button__text {
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
::v-deep .van-field {
padding: 0;
}
::v-deep uni-page {
// background: #fff;
}
::v-deep uni-page {
// background: #ffffff;
}
.Box {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
// padding-top: 1.75rem;
.box-form-card {
width: 23.4375rem;
height: 31.9688rem;
// margin-top: 2.375rem;
// background: #fdfefe;
// border-radius: 2.0938rem 2.0938rem 0 0;
// padding: 3.6563rem 0 0 2.25rem;
display: flex;
// justify-content: center;
flex-direction: column;
align-items: center;
.title {
font-weight: 500;
font-size: 1.1563rem;
color: #040404;
line-height: 1.1563rem;
margin-bottom: 1.875rem;
}
.btn {
margin-top: 2.6875rem;
width: 20.9375rem;
height: 2.75rem;
border-radius: 1.5625rem;
background: #6a69e9;
text-align: center;
line-height: 2.75rem;
color: #fff;
}
.box-form-item {
display: flex;
flex-direction: column;
margin-top: 0.9375rem;
position: relative;
.box-form-item-label {
height: 2.75rem;
display: flex;
align-items: center;
// margin-bottom: 0.5938rem;
font-weight: 500;
font-size: 0.875rem;
line-height: 0.75rem;
color: #fff;
}
}
}
.box-top {
width: 11.4688rem;
height: 11.4688rem;
background: #ffffff;
border-radius: 50%;
font-weight: 300;
font-size: 2.75rem;
color: #cbcccd;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
<template>
<Navigater :title="t('user.yinhangzhanghu')" />
<view class="inlet" @click="goPage">
{{ t('account.cunquzhanghaodengji') }}
</view>
<view class="account-card-list">
<NotData v-if="!bankList.length" />
<view v-for="(item, i) in bankList" :key="i" class="account-card">
<img src="@/static/image/bank/bg.png" class="bg" />
<view class="account-info">
<view class="bank-name"> {{ item.bank_name }} </view>
<view class="user-name"> {{ item.shiming_name }} </view>
</view>
<van-icon class="account-del-icon" name="delete-o" color="#fff" size="20" @click="delBank(item.id)" />
<view class="bank-account-number">{{ item.bank_num.slice(0, 4) }} **** **** **** </view>
</view>
</view>
</template>
<script setup lang="ts">
import { getBankListApi, delBankApi } from '@/api/bankAccount'
import { BankInfoType } from '@/api/bankAccount/indexType'
import { useI18n } from 'vue-i18n'
import { onMounted, Ref, ref } from 'vue'
import { showSuccessToast } from 'vant'
const { t } = useI18n()
type BankListType = [BankInfoType | never]
const bankList: Ref<BankListType> = ref([])
const delBank = async (id: number | string) => {
const res = await delBankApi(id)
if (res.code === 1) {
showSuccessToast(res.data.msg)
getBankLsit()
}
}
const getBankLsit = async () => {
const res = await getBankListApi()
if (res.code === 1) {
bankList.value = res.data.user_bankcard
// showSuccessToast(t('toastText.chenggong'))
}
console.log(res, 'bank')
}
onMounted(() => {
getBankLsit()
})
const goPage = () => {
uni.redirectTo({ url: '/subPackages/bankAccount/accountLog' })
}
</script>
<style lang="scss" scoped>
* {
font-weight: 500;
}
.bg {
width: 100%;
// height: 100%;
position: absolute;
top: 0;
left: 0;
}
.inlet {
width: 100%;
height: 3.9688rem;
background: $uni-color-primary;
border-radius: 0.9375rem;
margin-top: 0.8125rem;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: $uni-font-size-1;
color: #fff;
}
.account-card-list {
align-items: center;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
.account-card {
position: relative;
width: 20.8125rem;
height: 11.0313rem;
padding-top: 1.4063rem;
background: #ffffff;
border-radius: 0.9375rem;
margin-top: 0.8125rem;
display: flex;
justify-content: space-between;
position: relative;
.bank-account-number {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 3.1563rem;
background: #fff;
border-radius: 0 0 0.9375rem 0.9375rem;
font-weight: 300;
font-size: 1.3438rem;
color: #010101;
text-align: center;
line-height: 3.1563rem;
}
.account-del-icon {
margin-right: 1.0625rem;
width: 0.7813rem;
height: 0.9063rem;
}
.account-info {
margin-left: 1.0625rem;
z-index: 9;
.bank-name {
font-size: $uni-font-size-1;
color: #fff;
}
.user-name {
font-size: $uni-font-size-1;
color: #fff;
}
}
}
}
</style>
<script setup lang="ts">
import { reactive } from 'vue'
import { useI18n } from 'vue-i18n'
import { updatePasswordApi } from '@/api/changePassword'
import { showFailToast, showSuccessToast, showToast } from 'vant'
import icon1 from '@/static/1.png'
import icon2 from '@/static/2.png'
const form = reactive({
old_password: '',
new_Password: '',
repeat_new_password: ''
})
const formList = reactive([
{
label: 'transactionPassions.jiumima',
dataName: 'old_password',
msgName: 'checkMsg.shurujiumima',
isShow: false
},
{
label: 'transactionPassions.xingmima',
dataName: 'new_Password',
msgName: 'checkMsg.shuruxingmima',
isShow: false
},
{
label: 'transactionPassions.xingmima2',
dataName: 'repeat_new_password',
msgName: 'checkMsg.shuruxingmima',
isShow: false
}
])
const { t } = useI18n()
const submit = async () => {
if (form.old_password === '') {
return showToast(t('changePassword.tip1'))
}
if (form.new_Password === '') {
return showToast(t('changePassword.tip2'))
}
if (form.repeat_new_password === '') {
return showToast(t('changePassword.tip2'))
}
if (form.new_Password.length < 6 || form.new_Password.length > 10) {
return showToast(t('changePassword.tip3'))
}
if (form.new_Password !== form.repeat_new_password) {
return showToast(t('changePassword.tip4'))
}
const res = await updatePasswordApi(form)
if (res.code === 1) {
showSuccessToast(res.msg)
// 清除token 以及用户信息
uni.setStorageSync('token', null)
uni.setStorageSync('userId', null)
uni.setStorageSync('userInfo', null)
setTimeout(() => {
// 提示用户
showFailToast(t('login.user_info_null'))
setTimeout(() => {
// 跳转登录
uni.navigateTo({
url: '/subPackages/login/login'
})
}, 1500)
}, 1500)
}
}
const showPass = (i: number) => {
formList[i].isShow = !formList[i].isShow
}
</script>
<template>
<Navigater :title="t('user.rizhisuoyin')"></Navigater>
<view class="Box">
<!-- <view class="box-top"> </view> -->
<view class="box-form-card">
<!-- <view class="title">{{ t('changePassword.xiugaidenglumima') }}</view> -->
<view v-for="(item, i) in formList" :key="i" class="box-form-item">
<view class="box-form-item-label"> &nbsp;&nbsp;{{ t(item.label) }}</view>
<van-field v-model="form[item.dataName]" :right-icon="item.isShow ? icon1 : icon2" :type="item.isShow ? 'text' : 'password'" :placeholder="t(item.msgName)" @click-right-icon="showPass(i)" />
<!-- <img src="@/static/1.png" class="input-img" /> -->
</view>
<van-button class="btn" type="primary" @click="submit">{{ t('transactionPassions.queren') }}</van-button>
</view>
</view>
</template>
<style lang="scss" scoped>
::v-deep .van-field__control {
// width: 19.7813rem;
height: 2rem;
// padding-left: 1rem;
// border: 0.0313rem solid #50b0f2;
border: none;
font-weight: 400;
font-size: 0.9375rem;
color: #fff;
}
// ::v-deep uni-page {
// background: #fff;
// }
::v-deep .van-field {
width: 20rem;
height: 3.375rem;
background: rgb(10, 30, 54, 0.5);
border-radius: 0.625rem;
}
::v-deep .van-field__body {
width: 20rem;
height: 3.375rem;
background: rgb(10, 30, 54, 0.5);
color: #fff;
border-radius: 0.9688rem;
padding: 1.0938rem 0.9375rem 0.9688rem 1.25rem;
.van-field__right-icon {
padding: 0;
margin-right: 0.625rem;
.van-icon__image {
width: 1.2813rem;
height: 1.375rem;
}
}
}
::v-deep .van-button {
margin-top: 2.6875rem;
width: 20.9375rem;
height: 2.75rem;
border-radius: 1.5625rem;
background: #6a69e9;
}
::v-deep .van-button__text {
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
::v-deep .van-field {
padding: 0;
}
.Box {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
// padding-top: 1.75rem;
.box-form-card {
width: 23.4375rem;
height: 31.9688rem;
// margin-top: 2.375rem;
// background: #fdfefe;
// border-radius: 2.0938rem 2.0938rem 0 0;
// padding: 3.6563rem 0 0 2.25rem;
display: flex;
// justify-content: center;
flex-direction: column;
align-items: center;
.title {
font-weight: 500;
font-size: 1.1563rem;
color: #040404;
line-height: 1.1563rem;
margin-bottom: 1.875rem;
}
.btn {
margin-top: 2.6875rem;
width: 20.9375rem;
height: 2.75rem;
border-radius: 1.5625rem;
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
.box-form-item {
display: flex;
flex-direction: column;
margin-top: 0.9375rem;
position: relative;
.box-form-item-label {
height: 2.75rem;
display: flex;
align-items: center;
// margin-bottom: 0.5938rem;
font-weight: 500;
font-size: 0.875rem;
line-height: 0.75rem;
color: #fff;
}
}
}
.box-top {
width: 11.4688rem;
height: 11.4688rem;
background: transparent;
border-radius: 50%;
font-weight: 300;
font-size: 2.75rem;
color: #cbcccd;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
</script>
<template>
<Navigater :title="t('user.benrenqueren')" />
<view class="box">
<view class="chatu"> 插图 </view>
<view class="title"> 本人確認書類のご提出完了 </view>
<view class="box-box"> </view>
<view class="box-box"> </view>
</view>
</template>
<style lang="scss" scoped>
.box {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 1.1875rem;
.title {
font-weight: 300;
font-size: 0.8438rem;
color: #040404;
line-height: 2.0938rem;
margin-top: 1.0938rem;
margin-bottom: 0.3125rem;
}
.box-box {
width: 19.8125rem;
height: 2.5rem;
border-radius: 1.2188rem;
border: 0.0313rem solid #50aff0;
margin-top: 1.0938rem;
}
.chatu {
width: 21.75rem;
height: 12.3438rem;
font-weight: 300;
font-size: 5.5rem;
background: #fdfefe;
color: #d0d3d5;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.625rem;
}
}
</style>
<script setup lang="ts">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import Navigator from '@/components/navigator/navigator.vue'
const { t } = useI18n()
const appId = ref(1)
const appInfo = ref({
name: 'LINEAPP',
tip: ''
})
const checkApp = (id: number) => {
appId.value = id
}
</script>
<template>
<Navigator :title="t('user.kefuzhongxin')" />
<view class="box">
<view class="title"> {{ t('customerService.title') }} </view>
<view class="app-box">
<view class="app-logo">logo</view>
<view class="app-name">{{ appInfo.name }}</view>
<view class="app-title">WD TREE</view>
</view>
<view class="app-card-box">
<view class="app-card" @click="checkApp(1)">
<view class="app-card-logo" :class="appId == 1 ? 'active' : ''"></view>
<view class="app-card-tip">{{ t('customerService.shiyong') }}{{ appInfo.name }}</view>
<view class="app-card-t">{{ t('customerService.tip') }}</view>
<img src="@/static/image/customerService/right.png" class="app-card-right" />
</view>
<view class="app-card" @click="checkApp(2)">
<view class="app-card-logo" :class="appId == 2 ? 'active' : ''"></view>
<view class="app-card-tip">{{ t('customerService.shiyong') }}{{ appInfo.name }}</view>
<view class="app-card-t">{{ t('customerService.tip2') }}</view>
<img src="@/static/image/customerService/right.png" class="app-card-right" />
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
body {
background: #ffffff;
}
.box {
width: 100%;
padding-top: 8.9688rem;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 1.2813rem 0 1.2813rem;
.app-card-box {
margin-top: 3.6563rem;
// margin-bottom: 8.5938rem;
display: flex;
.app-card:nth-child(1) {
margin-right: 0.5938rem;
}
.app-card {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
width: 10.0313rem;
height: 14.1563rem;
background: #e9f4fc;
border-radius: 0.5938rem;
opacity: 0.66;
padding-top: 1.9063rem;
.app-card-logo.active {
background: #46abef;
}
.app-card-logo {
width: 4rem;
height: 4rem;
background: #dde8f0;
border-radius: 50%;
border: 0.0313rem solid #dde8f0;
}
.app-card-tip {
font-weight: 300;
font-size: 0.9375rem;
color: #050505;
margin-top: 0.8438rem;
}
.app-card-t {
font-weight: 300;
font-size: $uni-font-size-1;
color: #050505;
}
.app-card-right {
width: 1.4063rem;
// margin-top: 2.4063rem;
position: absolute;
bottom: 0.9375rem;
left: 4.5938rem;
}
}
}
.app-box {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 3.25rem;
.app-name {
font-weight: 300;
font-size: 1.25rem;
color: #050505;
font-size: 1.25rem;
margin-top: 1.25rem;
line-height: 1.25rem;
}
.app-title {
font-weight: 300;
font-size: 1rem;
color: #050505;
line-height: 1rem;
margin-top: 0.4375rem;
}
.app-logo {
width: 7.3438rem;
height: 7.3438rem;
background: #c6c8ca;
border-radius: 50%;
font-weight: 300;
font-size: 1.9063rem;
color: #050606;
display: flex;
justify-content: center;
align-items: center;
}
}
.title {
font-weight: 300;
font-size: 1.25rem;
color: #050606;
line-height: 2.0938rem;
span {
color: #46abef;
}
}
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { getNewDetailApi } from '@/api/record/record'
import { newDetailType } from '@/api/record/recordType'
import { onLoad } from '@dcloudio/uni-app'
import { ref, Ref } from 'vue'
const { t } = useI18n()
const newData: Ref<newDetailType> = ref({
content: '',
createtime: 0,
id: 0,
image: '',
other_id: 0,
title: '',
updatetime: 0
})
const loadding = ref(true)
const getNewDetailFn = async (id: number | string) => {
loadding.value = true
const res = await getNewDetailApi(id)
loadding.value = false
if (res.code === 1) {
newData.value = res.data
}
}
// 格式化时间
function formatTimestamp(timestamp: number | string) {
const date = new Date(timestamp)
const year = date.getFullYear()
// 月份从0开始,所以我们需要加1
const month = ('0' + (date.getMonth() + 1)).slice(-2)
const day = ('0' + date.getDate()).slice(-2)
const hours = ('0' + date.getHours()).slice(-2)
const minutes = ('0' + date.getMinutes()).slice(-2)
return `${year}/${month}/${day} ${hours}:${minutes}`
}
onLoad(({ id }) => {
if (id) {
getNewDetailFn(id)
}
})
</script>
<template>
<Navigater :title="t('details.xiaoxi')" />
<van-loading v-if="loadding" type="spinner" style="text-align: center; margin-top: 20px" />
<scroll-view v-else scroll-y :style="{ height: 'calc(100vh - 50px)' }">
<view class="box">
<view class="title-box">
<view class="title">
{{ newData.title }}
</view>
<view class="createtime">
{{ formatTimestamp(newData.createtime * 1000) }}
</view>
</view>
<view class="content-box">
<rich-text :nodes="newData.content" style="color: #fff"></rich-text>
<!-- <rech-text :nones="newData.content"></rech-text> -->
</view>
</view>
</scroll-view>
</template>
<style lang="scss" scoped>
::v-deep.ma__p {
color: #fff;
}
.box {
width: 100%;
display: flex;
// justify-content: center;
align-items: center;
flex-direction: column;
}
.content-box {
width: 100%;
padding: 1.375rem 0.7188rem 6.25rem 1.875rem;
// background: #ffffff;
font-size: 0.875rem;
color: #fff;
}
.title-box {
width: 20.9375rem;
height: 6.25rem;
padding: 1rem 0.625rem 0.9063rem 0.9375rem;
background: linear-gradient(168deg, #1b5191 0.74%, #09366b 49.68%, #1a4f8d 99.61%);
border-radius: 0.9375rem;
.title {
font-weight: 500;
font-size: 1rem;
color: #fff;
}
.createtime {
margin-top: 0.3125rem;
font-size: 0.875rem;
color: #abafb9;
}
}
</style>
<template>
<Navigater :title="t('dadan.title')" />
<view class="gupiao_list">
<view class="button_group">
<view class="button" :class="{ active: pageType === 0 }" @click="changePageType(0)">{{ t('hongli.button1') }}</view>
<view class="button" :class="{ active: pageType === 1 }" @click="changePageType(1)">{{ t('hongli.button2') }}</view>
</view>
<view v-show="pageType === 0" class="column flex">
<view class="text-center">{{ t('dadan.column_name') }}</view>
<view class="text-center">{{ t('dadan.column_daima') }}</view>
<view class="text-center">{{ t('dadan.column_xianjia') }}</view>
<view class="text-center">{{ t('dadan.column_jiage') }}</view>
<!-- <view class="text-right">{{ t('dadan.column_zhangshu') }}</view>+ -->
</view>
<view v-show="pageType === 1" class="column flex">
<view class="text-center">{{ t('hongli.column_name2') }}</view>
<view class="text-center">{{ t('hongli.column_jiage2') }}</view>
<view class="text-center">{{ t('hongli.column_chengjiaoe') }}</view>
<view class="text-center">{{ t('hongli.column_zhuangtai') }}</view>
</view>
<scroll-view scroll-y :style="{ height: 'calc(100vh - 9.375rem)' }">
<view v-for="(item, index) in dadanList" v-show="pageType === 0" :key="index" class="gupiao flex" @click="openWindow(item)">
<view class="text_ellipsis">{{ item.product_name }}</view>
<view class="text-center">{{ item.product_code }}</view>
<view class="text-center">{{ changeMoney(item.now_price) }}</view>
<view class="text-center">{{ changeMoney(item.hedging_price) }}</view>
<!-- <view class="text-right">{{ item.last_num }}</view> -->
</view>
<view v-show="pageType === 1">
<!-- <NotData v-if="shenqingList.length === 0" /> -->
<!-- <view v-if="shenqingList.length === 0" class="nodata">{{ t('common.nodata') }}</view> -->
<view v-for="(item, index) in shenqingList" :key="index" class="gupiao flex">
<view class="text_ellipsis flex1 flex justify-center items-center flex_direction">
<van-text-ellipsis :content="item?.product_name" style="color: #fff" />
<!-- <view>{{ item?.product_name }}</view> -->
<view style="color: #a6a6a6">{{ item?.product_code }}</view>
</view>
<view class="flex1 flex justify-center items-center flex_direction">
<view style="color: #ff0021">{{ changeMoney(item.buy_in_amount) }}</view>
<view v-if="item.status == '2' || item.status == '3' || item.status == '4'" style="color: #ff0021">
{{ Math.floor(item.buy_in_num * 100) }}
</view>
<view v-else-if="item.status == '1'" style="color: #ff0021">
{{ Math.floor(item.buy_in_num * 100) }}
</view>
</view>
<view class="flex1 flex justify-center items-center text-red" style="color: #ff0021">{{ changeMoney(Math.floor(item.buy_in_amount)) }}</view>
<view class="flex justify-center items-center flex1">
<view v-if="item.status == '2'" style="color: #0cd17c"> {{ t('dadan.tip1') }} </view>
<view v-if="item.status == '3'" class="text-red">{{ t('dadan.tip2') }} </view>
<view v-if="item.status == '1'" style="color: #fff">{{ t('dadan.tip3') }}</view>
</view>
</view>
</view>
<NotData v-if="(pageType === 0 && dadanList.length === 0) || (pageType === 1 && shenqingList.length === 0)" />
</scroll-view>
</view>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<view class="title">{{ t('dadan.title2') }}</view>
<view class="row_wrap">
<view class="row" style="width: 100%">
<view class="label">{{ t('dadan.column_name') }}</view>
<view class="value text_ellipsis">{{ windowDetail.product_name }}</view>
</view>
<view class="row">
<view class="label">{{ t('dadan.column_daima') }}</view>
<view class="value">{{ windowDetail.product_code }}</view>
</view>
<view class="row">
<view class="label">{{ t('dadan.column_jiage') }}</view>
<view class="value">{{ windowDetail.hedging_price }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('dadan.column_zhangshu') }}</view>
<view class="value">{{ windowDetail.last_num }}</view>
</view> -->
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shouxufei') }}</view>
<view class="value">{{ shouxufei.toFixed(1) }}</view>
</view> -->
<view class="row">
<view class="label">{{ t('dadan.heji') }}</view>
<view class="value">{{ changeMoney(totalPrice) }}</view>
</view>
<view class="row">
<view class="label" style="color: red">{{ t('dadan.zhuyi') }}</view>
<view class="value" style="color: red">{{ `1${t('dadan.unit')}=100${t('dadan.unit2')}` }}</view>
</view>
<view class="row" style="width: 100%">
<view class="label">{{ t('ipo.windowLabel2') }}</view>
<view class="value"
><view class="flex justify-center my-[.8rem]"> <van-stepper v-model="buyParams.num" input-width="100" button-size="2rem" integer /> </view
></view>
</view>
</view>
<view class="button" @click="buy">{{ t('gupiaoDetail.submit') }}</view>
</van-popup>
</template>
<script setup lang="ts">
import { getDadanListApi, buyDadanApi, getUserMoneyApi, getUserMonitoringApi } from '@/api/index/index'
import { onHide, onLoad, onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { ref, computed } from 'vue'
import { showToast } from 'vant'
import { changeMoney } from '@/common/common'
const { t } = useI18n()
onLoad(() => {
getUserMoney()
})
let id: any = null
onShow(() => {
getUserMonitoringFn()
getXinguList()
id = setInterval(() => {
getXinguList()
}, 20000)
})
onHide(() => {
clearInterval(id)
})
const pageType = ref(0)
const changePageType = async (e: number) => {
pageType.value = e
}
// 获取申请列表数据
const shenqingList = ref([])
const getUserMonitoringFn = async () => {
const res = await getUserMonitoringApi()
if (res.code === 1) {
shenqingList.value = res.data.data
}
console.log(shenqingList.value, 'shenqingList.value')
}
// 獲取新股列表
const dadanList = ref([])
const getXinguList = async () => {
const res = await getDadanListApi()
console.log(res)
dadanList.value = res.data
}
// 獲取手續費
const userMoneyInfo = ref({})
const getUserMoney = async () => {
const res = await getUserMoneyApi()
res.data.sxf = Number(res.data.sxf)
res.data.sxfzdi = Number(res.data.sxfzdi)
userMoneyInfo.value = res.data
}
// 彈窗
const gupiaoWindowShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true,
round: true
}
const windowDetail = ref({
hedging_price: 0
})
const openWindow = (e: any) => {
windowDetail.value = e
gupiaoWindowShow.value = true
}
const totalPrice = computed(() => {
return buyParams.value.num * 100 * Number(windowDetail.value.hedging_price)
})
// const shouxufei = computed(() => {
// const sxf = totalPrice.value * userMoneyInfo.value.sxf
// if (sxf > userMoneyInfo.value.sxfzdi) {
// return sxf
// }
// return userMoneyInfo.value.sxfzdi
// })
// 購買
const buyParams = ref({
monitoring_id: '',
num: 1
})
const buy = async () => {
buyParams.value.monitoring_id = windowDetail.value.id
const res = await buyDadanApi(buyParams.value)
gupiaoWindowShow.value = false
if (res.code === 1) {
getUserMonitoringFn()
showToast(res.msg)
}
}
</script>
<style scoped lang="scss">
uni-view {
text-align: center;
}
.flex_direction {
flex-direction: column;
}
.text-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex1 {
width: 25%;
}
.text_ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gupiao_list {
margin-bottom: 0.31rem;
.button_group {
width: 21.5625rem;
height: 2.75rem;
background: rgb(8, 24, 43, 0.7);
border-radius: 1.5625rem;
margin: 0 auto;
padding: 0.3125rem;
display: flex;
align-items: center;
justify-content: space-between;
.button {
width: 10.3125rem;
height: 2.125rem;
line-height: 2.125rem;
border-radius: 1.25rem;
text-align: center;
font-size: 0.875rem;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.active {
background: #45d9fd;
color: $uni-color-primary;
font-weight: 500;
font-size: 0.875rem;
}
}
// padding: 0.62rem;
.column,
.gupiao {
padding: 0.52rem 0.9rem;
display: flex;
background-color: rgb(11, 33, 59, 0.7);
border-radius: 0.3125rem;
margin-bottom: 0.625rem;
> view {
flex: 1;
color: #a0a5b0;
font-size: $uni-font-size-lg;
}
}
.column {
text-align: center;
// background-color: $uni-color-gray;
}
}
.buy_window {
background-color: #fff;
padding: 0 0.81rem 1.25rem 0.81rem;
.title {
text-align: center;
padding: 0.8rem 0 0.5rem;
font-size: 1rem;
}
.row_wrap {
display: flex;
flex-wrap: wrap;
.row {
display: flex;
align-items: center;
width: 50%;
padding: 0.24rem 0.56rem;
color: #fff;
view {
color: $uni-text-color;
font-size: 0.775rem;
}
}
}
.button {
height: 2.19rem;
line-height: 2.19rem;
width: 100%;
text-align: center;
border-radius: 1.03rem;
background-color: #6a69e9;
color: #fff;
font-size: 0.81rem;
margin-top: 1.25rem;
}
}
</style>
<template>
<Navigater :is-show-back="false" :title="t('gendan.title')" style="background: transparent; color: black">
<template #left>
<img class="back" src="/static/4.png" @click="goBack" />
<!-- <view class="record" @click="goPage('./record')">{{ t('gendan.jilu') }}</view> -->
</template>
<template #right>
<img class="record" src="/static/3.png" @click="goPage('./record')" />
<!-- <view class="record" @click="goPage('./record')">{{ t('gendan.jilu') }}</view> -->
</template>
</Navigater>
<NotData v-if="gupiaoList.length === 0"></NotData>
<scroll-view v-else scroll-y :style="{ height: 'calc(100vh - 60px)' }">
<view class="box_list">
<view v-for="(item, index) in gupiaoList" :key="index" class="box">
<view class="title-box">
<view class="title-box-left">{{ item.issuer }}</view>
<view class="title-box-right">{{ changeMoney(item.fund_size) }}</view>
</view>
<view class="info-box">
<view class="info-box-left">
<view class="name">{{ t('gendan.name') }}: {{ item.product_name }}</view>
<view class="money"
>{{ t('gendan.yingli') }} <span>{{ changeMoney(item.estimated_profit) }}%</span></view
>
</view>
<view class="info-box-right" @click="openWindow(item)">
{{ t('gendan.button') }}
</view>
</view>
<view class="time-box">
<view class="time"> {{ t('gendan.jiezhishijian') }}{{ item.end_time }} </view>
</view>
</view>
<!-- <view class="row">
<view class="info">
<view>
<view class="label">{{ t('gendan.fadanren') }}:</view>
<view>{{ item.issuer }}</view>
</view>
<view>
<view class="label">{{ t('gendan.name') }}:</view>
<view>{{ item.product_name }}</view>
</view>
<view>
<view class="label">{{ t('gendan.zijinguimo') }}:</view>
<view>{{ changeMoney(item.fund_size) }}</view>
</view>
<view>
<view class="label">{{ t('gendan.jiezhishijian') }}:</view>
<view>{{ item.end_time }}</view>
</view>
</view>
<view class="button" @click="openWindow(item)">{{ t('gendan.button') }}</view>
</view>
<view class="yingli">
<view class="label">{{ t('gendan.yingli') }}:</view>
<view class="text-red">{{ changeMoney(item.estimated_profit) }}%</view>
</view> -->
</view>
</scroll-view>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<view class="row_wrap">
<view class="row">
<view class="label">{{ t('gendan.fadanren') }}:</view>
<view class="value">{{ windowDetail.product_name }}</view>
</view>
<view class="row">
<view class="label">{{ t('gendan.zijinguimo') }}:</view>
<view class="value">{{ changeMoney(windowDetail.fund_size) }}</view>
</view>
<view class="row">
<view class="label">{{ t('gendan.zuiditouzi') }}:</view>
<view class="value">{{ changeMoney(windowDetail.mini_buy_in) }}</view>
</view>
<view class="row">
<view class="label">{{ t('gendan.mairujine') }}:</view>
<view class="value">
<van-field v-model="buyParams.money" type="number" :placeholder="t('gendan.placeholder')" />
</view>
</view>
</view>
<view class="button" @click="buy">{{ t('gupiaoDetail.submit') }}</view>
</van-popup>
</template>
<script setup lang="ts">
import { getGendanListApi, buyGendanApi } from '@/api/index/index'
import { onLoad } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { changeMoney, goPage } from '@/common/common'
import { ref } from 'vue'
import { showToast } from 'vant'
const { t } = useI18n()
onLoad(() => {
getGendanList()
})
const goBack = () => {
uni.navigateBack({})
}
// 獲取新股列表
const gupiaoList = ref([])
const getGendanList = async () => {
const res = await getGendanListApi()
gupiaoList.value = res.data.data
}
// 彈窗
const gupiaoWindowShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true,
round: true
}
const windowDetail = ref({
hedging_price: 0
})
const openWindow = (e: any) => {
windowDetail.value = e
gupiaoWindowShow.value = true
}
// 購買
const buyParams = ref({
follow_id: 0,
money: null
})
const buy = async () => {
if (!buyParams.value.money) {
gupiaoWindowShow.value = false
showToast(t('gendan.warning1'))
return
}
const reg = /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/
if (!reg.test(buyParams.value.money)) {
gupiaoWindowShow.value = false
showToast(t('gendan.warning2'))
return
}
buyParams.value.follow_id = windowDetail.value.id
const res = await buyGendanApi(buyParams.value)
gupiaoWindowShow.value = false
buyParams.value.money = null
getGendanList()
if (res.code === 1) {
showToast(res.msg)
}
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
background: linear-gradient(191deg, #c6dbff 0%, #f5f7fb 100%);
}
.box_list {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 0.3125rem;
}
.box {
width: 21.25rem;
height: 10.1875rem;
padding: 1.3125rem 1.25rem 0.9375rem;
background: #ffffff;
box-shadow: 0rem 0.25rem 0.625rem 0rem rgba(43, 80, 237, 0.06);
border-radius: 0.8125rem;
display: flex;
flex-direction: column;
// justify-content: center;
align-items: center;
margin-bottom: 0.9375rem;
.time-box {
width: 100%;
margin-top: 0.625rem;
}
.time {
text-align: left;
font-weight: 400;
font-size: 0.8125rem;
color: #a0aabb;
}
.info-box {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
// width: 18.75rem;
height: 4.0938rem;
background: #f5f5f5;
border-radius: 0.375rem;
border: 0.0313rem solid #f2f2f2;
margin-top: 0.6563rem;
padding: 0.625rem 0.9375rem 0.9375rem;
.info-box-right {
width: 3.75rem;
height: 1.6875rem;
line-height: 1.6875rem;
text-align: center;
background: #0c68ff;
border-radius: 0.8438rem;
font-weight: 500;
font-size: 0.8125rem;
color: #ffffff;
letter-spacing: 0.0625rem;
}
.info-box-left {
display: flex;
flex-direction: column;
justify-content: space-between;
// align-items: center;
.name {
font-weight: 500;
font-size: 30rpx;
color: #1e1f22;
line-height: 42rpx;
text-align: left;
font-style: normal;
}
.money {
font-weight: 400;
font-size: 26rpx;
color: #9ea0a0;
line-height: 37rpx;
text-align: left;
font-style: normal;
span {
color: #db503f;
}
}
}
}
.title-box {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title-box-left {
font-weight: 600;
font-size: 1rem;
color: #2a2a2a;
line-height: 1.4063rem;
text-align: left;
font-style: normal;
}
.title-box-right {
font-weight: 600;
font-size: 1.125rem;
color: #db503f;
line-height: 1.5625rem;
text-align: right;
font-style: normal;
}
}
}
.back {
position: absolute;
top: 1rem;
left: 1.0625rem;
width: 0.625rem;
height: 1.0625rem;
}
.record {
position: absolute;
// height: 100%;
width: 0.875rem;
height: 1rem;
// padding: 0 1rem;
top: 1.0313rem;
right: 0.9375rem;
}
.gupiao_list {
.gupiao {
margin: 0.52rem;
padding: 0.52rem 0.9rem;
border-radius: 0.62rem;
background-color: #fff;
text-align: center;
.row {
display: flex;
justify-content: space-between;
align-items: center;
.info {
> view {
text-align: left;
display: flex;
}
.label {
color: $uni-text-color-gray;
}
}
.button {
background-color: $uni-color-primary;
color: #fff;
height: 1.4rem;
line-height: 1.4rem;
padding: 0 0.7rem;
border-radius: 0.3rem;
}
}
.yingli {
display: flex;
justify-content: center;
border-top: 0.06rem solid $uni-text-color-gray;
padding-top: 0.3rem;
margin-top: 0.1rem;
}
}
}
.buy_window {
background-color: #fff;
padding: 0 0.81rem 1.25rem 0.81rem;
.title {
text-align: center;
padding: 0.8rem 0 0.5rem;
font-size: 1rem;
}
.row_wrap {
padding-top: 1rem;
.row {
display: flex;
justify-content: space-between;
padding: 0.24rem 0.56rem;
color: #fff;
view {
color: $uni-text-color;
font-size: 0.775rem;
}
::v-deep .van-cell {
padding: 0 !important;
}
::v-deep .van-field__control {
text-align: right;
}
}
}
.button {
height: 2.19rem;
line-height: 2.19rem;
width: 100%;
text-align: center;
border-radius: 1.03rem;
background-color: $uni-color-primary;
color: #fff;
font-size: 0.81rem;
margin-top: 0.75rem;
}
}
</style>
<template>
<Navigater :title="t('gendanjilu.title')" />
<scroll-view scroll-y :style="{ height: 'calc(100vh - 50px)' }">
<view class="gupiao_list">
<view v-for="(item, index) in gupiaoList" :key="index" class="gupiao">
<view class="flex justify-between items-center">
<view>
<view class="text-left text-[1rem]">{{ item.product_name }}</view>
<view class="text-lg">{{ t('gendanjilu.dingdanhao') }}{{ item.order_sn }}</view>
</view>
<view class="button" @click="sell(item)">{{ t('gendanjilu.button') }}</view>
</view>
<view class="flex justify-between mt-[.5rem]">
<view>
<view class="text-red">{{ changeMoney(item.buy_in_money) }}</view>
<view class="text-lg">{{ t('gendanjilu.mairujine') }}</view>
</view>
<view>
<view class="text-red">{{ changeMoney(item.yesterday_profit) }}</view>
<view class="text-lg">{{ t('gendanjilu.zuorishouyi') }}</view>
</view>
<view>
<view class="text-red">{{ changeMoney(item.total_profit) }}</view>
<view class="text-lg">{{ t('gendanjilu.zongshouyi') }}</view>
</view>
</view>
<view class="flex pt-[0.4rem] mt-[0.4rem] bt">
<view class="text-gray">{{ t('gendanjilu.zhuangtai') }}</view>
<view v-if="item.status === '1'">{{ t('gendanjilu.status1') }}</view>
<view v-else-if="item.status === '2'">{{ t('gendanjilu.status2') }}</view>
<view v-else-if="item.status === '3'">{{ t('gendanjilu.status3') }}</view>
</view>
<view class="block">
<view>{{ t('gendanjilu.mairushijian') }}{{ item.buying_time }}</view>
<view v-show="item.end_time">{{ t('gendanjilu.maichushijian') }}{{ item.end_time }}</view>
</view>
</view>
<view v-if="gupiaoList.length === 0" class="nodata">{{ t('common.nodata') }}</view>
</view>
</scroll-view>
</template>
<script setup lang="ts">
import { showConfirmDialog, showToast } from 'vant'
import { getGendanRecordListApi, sellGendanApi } from '@/api/index/index'
import { onLoad } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { changeMoney } from '@/common/common'
import { ref } from 'vue'
const { t } = useI18n()
onLoad(() => {
getGendanList()
})
// 獲取新股列表
const gupiaoList = ref([])
const getGendanList = async () => {
const res = await getGendanRecordListApi()
gupiaoList.value = res.data
}
// 賣出
const sell = async (e: any) => {
console.log(e)
showConfirmDialog({
message: t('gendanjilu.window_title')
}).then(async (res) => {
if (res) {
const res2 = await sellGendanApi({ follow_id: e.id })
if (res2.code === 1) {
showToast(res2.msg)
getGendanList()
}
}
})
// buyParams.value.money = null
// getGendanList()
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
}
</script>
<style scoped lang="scss">
.gupiao_list {
.gupiao {
margin: 0.52rem;
padding: 0.52rem 0.9rem;
border-radius: 0.62rem;
background-color: #fff;
text-align: center;
.button {
background-color: $uni-color-primary;
color: #fff;
height: 1.4rem;
line-height: 1.4rem;
padding: 0 0.7rem;
border-radius: 0.3rem;
}
.bt {
border-top: 0.03rem solid $uni-text-color-gray;
}
.block {
background-color: $uni-bg-color-gray2;
padding: 0.52rem;
margin-top: 0.22rem;
text-align: left;
border-radius: 0.22rem;
}
}
}
</style>
<template>
<view id="chart" style="width: 100%; height: 30.31rem"></view>
</template>
<script lang="ts" setup>
import { init, dispose } from 'klinecharts'
import { onMounted, onUnmounted, watch } from 'vue'
const props = defineProps({
value: {
type: Array,
default: () => []
}
})
let chart: any = null
watch(
() => props.value,
(newData) => {
chart?.applyNewData(newData)
},
{ deep: true }
)
const chartOption = {
// 蜡烛图
candle: {
type: 'candle_solid',
// 蜡烛柱
bar: {
upColor: '#ea3522',
downColor: '#78a386',
noChangeColor: '#888888',
upBorderColor: '#ea3522',
downBorderColor: '#78a386',
noChangeBorderColor: '#888888',
upWickColor: '#ea3522',
downWickColor: '#78a386',
noChangeWickColor: '#888888'
},
// 提示
tooltip: {
showRule: 'none'
}
},
// x轴
xAxis: {
show: true,
// x轴分割文字
tickText: {
color: '#fff'
}
},
// y轴
yAxis: {
// x轴分割文字
tickText: {
color: '#fff'
}
}
}
onMounted(() => {
chart = init('chart')
chart.setStyles(chartOption)
chart.createIndicator('MA', false, { id: 'candle_pane' })
chart.createIndicator('VOL')
chart.createIndicator('KDJ')
})
onUnmounted(() => {
dispose('chart')
})
</script>
<style scoped lang="scss"></style>
<template>
<Navigater :title="`${gupiaoDetail.name}(${gupiaoDetail.shuzidaima})`">
<template #right>
<view class="collect" @click="collect">
<van-icon v-if="collectInfo == 0" name="star-o" size="1rem" color="#f7ac33"></van-icon>
<van-icon v-else name="star" size="1rem" color="#f7ac33"></van-icon>
</view>
</template>
</Navigater>
<view class="content" :style="{ height: contentHeight }">
<view class="jiage">{{ gupiaoDetail.price }}</view>
<view class="zd">
<view class="text-primary text-lg">
<text v-if="gupiaoDetail.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(gupiaoDetail, true)" name="down" size=".75rem" />
</view>
<view class="text-lg" :class="getColor(gupiaoDetail)">({{ gupiaoDetail.zhangdiebaifenbi }}%)</view>
</view>
<!-- <view class="card">
<view class="flex justify-between">
<view class="flex-1">
<view class="text-lg font-bold">{{ gupiaoDetail.name }}</view>
<view class="text-lg">{{ gupiaoDetail.shuzidaima }}</view>
</view>
<view class="flex justify-end flex-1 items-center">
<view class="text-[1.2rem]">{{ gupiaoDetail.price }}</view>
<view class="text-primary text-lg">
<text v-if="gupiaoDetail.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(gupiaoDetail, true)" name="down" size=".75rem" />
</view>
<view class="text-lg" :class="getColor(gupiaoDetail)">({{ gupiaoDetail.zhangdiebaifenbi }}%)</view>
</view>
</view>
</view> -->
<view class="card">
<view class="flex justify-between">
<view class="flex flex-1 text-left">
<view class="text-lg text-gray">{{ t('gupiaoDetail.label1') }}:</view>
<view class="text-lg">{{ gupiaoDetail.open }}</view>
</view>
<view class="flex flex-1 text-left">
<view class="text-lg text-gray">{{ t('gupiaoDetail.label2') }}:</view>
<view class="text-lg">{{ gupiaoDetail.close }}</view>
</view>
</view>
<view class="flex justify-between">
<view class="flex flex-1 text-left">
<view class="text-lg text-gray">{{ t('gupiaoDetail.label3') }}:</view>
<view class="text-lg" style="color: #ff0021">{{ gupiaoDetail.high }}</view>
</view>
<view class="flex flex-1 text-left">
<view class="text-lg text-gray">{{ t('gupiaoDetail.label4') }}:</view>
<view class="text-lg">{{ gupiaoDetail.low }}</view>
</view>
</view>
<view class="flex justify-between">
<view class="flex flex-1 text-left">
<view class="text-lg text-gray">{{ t('gupiaoDetail.label5') }}:</view>
<view class="text-lg" style="color: #ff0021">{{ gupiaoDetail.vol }}</view>
</view>
<view class="flex flex-1 text-left">
<view class="text-lg text-gray">{{ t('gupiaoDetail.label6') }}:</view>
<view class="text-lg">{{ gupiaoDetail.totalMoney }}(億)</view>
</view>
</view>
</view>
<view class="date_wrap">
<view v-for="(item, index) in columns" :key="index" :class="{ active: item.value == dateActive }" class="date" @click="getChart(gupiaoDetail.id, item.value)">{{ item.label }}</view>
<!-- <van-field v-model="fieldValue" is-link readonly :label="t('gupiaoDetail.tip1')" :placeholder="t('gupiaoDetail.tip2')" style="padding: 0" @click="showPicker = true" /> -->
</view>
<view class="chart_wrap">
<GupiaoChart :value="chartValue" />
</view>
<view class="box">
<view class="button_wrap">
<view class="flex justify-between">
<view class="button" :class="{ active: buyGupiaoParams.buytype === 0 }" @click="buyGupiaoParams.buytype = 0">{{ t('gupiaoDetail.shijia') }}</view>
<view class="button" :class="{ active: buyGupiaoParams.buytype === 1 }" @click="buyGupiaoParams.buytype = 1">{{ t('gupiaoDetail.xianjia') }}</view>
</view>
</view>
<view class="submit_wrap">
<view v-show="buyGupiaoParams.buytype === 1" class="row">
<view class="text-lg title">{{ t('gupiaoDetail.inputLabel1') }}</view>
<view class="input_wrap">
<van-field v-model="price" type="number" :placeholder="buyGupiaoParams.price" @blur="priceChange" />
<!-- <input v-model="buyGupiaoParams.price" /> -->
</view>
</view>
<view class="row">
<view class="text-lg title">{{ t('gupiaoDetail.inputLabel2') }}</view>
<view class="input_wrap">
<van-field v-model="buyGupiaoParams.shuliang" type="digit" />
<!-- <input v-model="buyGupiaoParams.shuliang" /> -->
</view>
</view>
<view v-if="userMoneyInfo.peizi_data === '1'" class="row">
<view class="text-lg title">{{ t('gupiaoDetail.inputLabel3') }}</view>
<view class="input_wrap">
<van-field v-model="buyGupiaoParams.ganggan_ratio" type="digit" @update:model-value="changeganggan_ratio" />
<!-- <input v-model="buyGupiaoParams.shuliang" /> -->
</view>
</view>
<view class="button_wrap">
<view class="flex justify-between">
<view class="button" :class="{ active: buyGupiaoParams.fangxiang === 'duo' }" @click="buyGupiaoParams.fangxiang = 'duo'">{{ t('gupiaoDetail.maiduo') }}</view>
<view class="button" :class="{ active: buyGupiaoParams.fangxiang === 'kong' }" @click="buyGupiaoParams.fangxiang = 'kong'">{{ t('gupiaoDetail.maikong') }}</view>
</view>
<view class="button submit" @click="openWindow()">{{ t('gupiaoDetail.submit') }}</view>
</view>
</view>
</view>
</view>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<view class="title row">{{ gupiaoDetail.name }}/{{ gupiaoDetail.shuzidaima }}</view>
<view class="row">
<view>{{ t('gupiaoDetail.windowLabel1') }}</view>
<view v-if="buyGupiaoParams.buytype == 0">{{ gupiaoDetail.price ? changeMoney(gupiaoDetail.price) : '-' }}</view>
<view v-else>{{ price ? changeMoney(price) : gupiaoDetail.price ? changeMoney(gupiaoDetail.price) : '-' }}</view>
</view>
<view class="row">
<view>{{ t('gupiaoDetail.windowLabel2') }}</view>
<view>{{ buyGupiaoParams.shuliang }}</view>
</view>
<view class="row">
<view>{{ t('gupiaoDetail.windowLabel3') }}</view>
<view v-if="buyGupiaoParams.buytype == 0">{{
gupiaoDetail.price !== '-'
? userMoneyInfo.peizi_data === '1'
? changeMoney((gupiaoDetail.price * buyGupiaoParams.shuliang) / buyGupiaoParams.ganggan_ratio)
: changeMoney(gupiaoDetail.price * buyGupiaoParams.shuliang)
: '-'
}}</view>
<view v-else>{{
price !== ''
? buyGupiaoParams.price
? userMoneyInfo.peizi_data === '1'
? changeMoney((price * buyGupiaoParams.shuliang) / buyGupiaoParams.ganggan_ratio)
: changeMoney(price * buyGupiaoParams.shuliang)
: '-'
: gupiaoDetail.price !== '-'
? userMoneyInfo.peizi_data === '1'
? changeMoney((gupiaoDetail.price * buyGupiaoParams.shuliang) / buyGupiaoParams.ganggan_ratio)
: changeMoney(gupiaoDetail.price * buyGupiaoParams.shuliang)
: '-'
}}</view>
</view>
<view class="row">
<view>{{ t('gupiaoDetail.windowLabel4') }}</view>
<view>{{ gupiaoDetail.price !== '-' ? changeMoney(gupiaoDetail.price * buyGupiaoParams.shuliang) : '-' }}</view>
</view>
<view class="row">
<view>{{ t('gupiaoDetail.windowLabel6') }}</view>
<view v-if="buyGupiaoParams.buytype === 0">{{ userMoneyInfo.peizi_data === '1' ? changeMoney(heji / buyGupiaoParams.ganggan_ratio) : changeMoney(heji) }}</view>
<view v-else>{{
price === ''
? userMoneyInfo.peizi_data === '1'
? changeMoney((gupiaoDetail.price * (buyGupiaoParams.shuliang || 0)) / buyGupiaoParams.ganggan_ratio)
: changeMoney(gupiaoDetail.price * (buyGupiaoParams.shuliang || 0))
: userMoneyInfo.peizi_data === '1'
? changeMoney((price * (buyGupiaoParams.shuliang || 0)) / buyGupiaoParams.ganggan_ratio)
: changeMoney(price * (buyGupiaoParams.shuliang || 0))
}}</view>
</view>
<view class="row">
<view>{{ t('gupiaoDetail.windowLabel7') }}</view>
<view>{{ changeMoney(userMoneyInfo.money) }}</view>
</view>
<view class="button" @click="buyGupiao">{{ t('gupiaoDetail.submit') }}</view>
</van-popup>
<!-- <van-popup v-model:show="showPicker" round position="bottom">
<van-picker :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
</van-popup> -->
</template>
<script setup lang="ts">
import GupiaoChart from './components/gupiaoChart.vue'
import { useCounterStore } from '@/store/store'
import { useI18n } from 'vue-i18n'
import { getGupiaoDetailApi, getTickerKApi, collectApi, collectDetailApi, getUserMoneyApi, buyGupiaoApi } from '@/api/index/index'
import { timestempToDate, getColor, changeMoney } from '@/common/common'
import { onHide, onLoad, onShow } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { buyGupiaoType } from '@/api/index/indexType'
import { showConfirmDialog, showToast } from 'vant'
const { t } = useI18n()
// 页面基础配置
const store = useCounterStore()
console.log(store)
const contentHeight = `calc(100vh - ${store.navigaterHeight})`
onLoad(async (options) => {
getUserMoney()
buyGupiaoParams.value.pro_id = options?.id
})
const changeganggan_ratio = () => {
if (buyGupiaoParams.value.ganggan_ratio < 1) {
buyGupiaoParams.value.ganggan_ratio = 1
} else if (buyGupiaoParams.value.ganggan_ratio > 100) {
buyGupiaoParams.value.ganggan_ratio = 100
}
}
let gpdId: any = null
onShow(async () => {
await getGupiaoDetail(buyGupiaoParams.value.pro_id)
getChart(gupiaoDetail.value.id, dateActive.value)
gpdId = setInterval(async () => {
await getGupiaoDetail(buyGupiaoParams.value.pro_id)
await getChart(gupiaoDetail.value.id, dateActive.value)
}, 10000)
})
onHide(() => {
clearInterval(gpdId)
})
// 获取股票详情
const gupiaoDetail = ref({
is_zixuan: 0,
price: '-'
})
const price = ref('')
const getGupiaoDetail = async (id: any) => {
const res = await getGupiaoDetailApi({ id })
res.data.time = timestempToDate(res.data.updatetime * 1000, '/')
res.data.totalMoney = Math.floor(((res.data.vol * res.data.price * 1000) / 100000000) * 100) / 100
gupiaoDetail.value = res.data
collectInfo.value = res.data.is_zixuan
buyGupiaoParams.value.price = res.data.price
}
const columns = [
{ label: t('gupiaoDetail.tip3'), value: 1 },
{ label: t('gupiaoDetail.tip4'), value: 2 },
{ label: t('gupiaoDetail.tip5'), value: 3 },
{ label: t('gupiaoDetail.tip6'), value: 4 },
{ label: t('gupiaoDetail.tip7'), value: 5 },
{ label: t('gupiaoDetail.tip8'), value: 6 },
{ label: t('gupiaoDetail.tip9'), value: 7 },
{ label: t('gupiaoDetail.tip10'), value: 8 }
]
// const fieldValue = ref('1分钟')
// const showPicker = ref(false)
// const onConfirm = ({ selectedOptions }) => {
// showPicker.value = false
// fieldValue.value = selectedOptions[0].text
// getChart(gupiaoDetail.value.id, dateActive.value)
// }
// 股票K线
const dateActive = ref(1)
const chartValue = ref({})
const getChart = async (id: number, kline_type: number = 0) => {
dateActive.value = kline_type
const res = await getTickerKApi({ kline_type: dateActive.value, id })
const kLineList = res.data.map((item: any) => {
return {
close: item.c,
high: item.h,
low: item.l,
open: item.o,
timestamp: item.t * 1000,
volume: item.v
}
})
chartValue.value = kLineList
}
// 收藏股票
const collectInfo = ref(0)
const collect = async () => {
const res = await collectApi({ id: gupiaoDetail.value.id })
const info = await collectDetailApi({ id: gupiaoDetail.value.id })
collectInfo.value = info.data.msg === 'yes' ? 1 : 0
showToast(res.data.msg)
}
// 购买股票
const buyGupiaoParams = ref<buyGupiaoType>({
buytype: 0,
fangxiang: 'duo',
price: 0,
pro_id: 0,
shuliang: 1,
ganggan_ratio: 10
})
const gupiaoWindowShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true,
round: true
}
const heji = ref(0)
const openWindow = (e: string) => {
const price1 = buyGupiaoParams.value.buytype === 0 ? Number(gupiaoDetail.value.price) : Number(price.value)
const sxf = Number(parseFloat(userMoneyInfo.value.sxf * price1 * Number(buyGupiaoParams.value.shuliang)).toFixed(3))
if (sxf > userMoneyInfo.value.sxfzdi) {
shouxufei.value = sxf
} else {
shouxufei.value = Number(parseFloat(userMoneyInfo.value.sxfzdi).toFixed(3))
}
heji.value = (price1 || 0) * (buyGupiaoParams.value.shuliang || 0)
gupiaoWindowShow.value = true
}
const priceChange = () => {
if (price.value) {
price.value = Number(price.value).toFixed(1)
}
}
const buyGupiao = async () => {
const params = { ...buyGupiaoParams.value }
params.price = buyGupiaoParams.value.buytype === 0 ? Number(gupiaoDetail.value.price) : price.value !== '' ? Number(price.value) : Number(gupiaoDetail.value.price)
params.ganggan_ratio = userMoneyInfo.value.peizi_data === '1' ? buyGupiaoParams.value.ganggan_ratio : 1
const res = await buyGupiaoApi(params)
if (res.code === 1) {
getUserMoney()
// showSuccessToast(res.data.msg)
showConfirmDialog({
message: res.data.msg,
confirmButtonText: t('gupiaoDetail.tip11'),
cancelButtonText: t('gupiaoDetail.tip12')
})
.then(() => {
// on confirm
uni.switchTab({ url: '/pages/jiaoyi/jiaoyi' })
// uni.navigateTo({ url: '/subPackages/transactionLog/transactionLog?isLs=1' })
})
.catch(() => {
// on cancel
})
setTimeout(() => {
gupiaoWindowShow.value = false
}, 1500)
} else {
showToast({
message: res.msg,
// message: '您的餘額不足,請儲值\n2625000000.請儲值',
wordBreak: 'break-all'
})
}
}
// 获取手续费
const userMoneyInfo = ref({})
const shouxufei = ref(0)
const getUserMoney = async () => {
const res = await getUserMoneyApi()
res.data.sxf = Number(res.data.sxf)
res.data.sxfzdi = Number(res.data.sxfzdi)
userMoneyInfo.value = res.data
}
</script>
<style scoped lang="scss">
.collect {
position: absolute;
right: 0;
height: 100%;
padding: 0 1.5rem;
display: flex;
align-items: center;
image {
width: 1.31rem;
height: 1.31rem;
}
}
.text-left {
text-align: left;
}
button {
font-family: none;
}
.content {
overflow: auto;
padding-bottom: 16.1875rem;
.box {
position: fixed;
bottom: 0;
left: 0;
width: 23.4375rem;
height: 17.1875rem;
border-top-left-radius: 1.5625rem;
border-top-right-radius: 1.5625rem;
background: #fff;
z-index: 9;
}
.zd {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
.jiage {
margin-top: 0.7188rem;
text-align: center;
color: #fff;
font-size: 1.5rem;
font-weight: 500;
}
.card {
width: 21.5625rem;
height: 5.375rem;
margin: 0.5938rem auto 0;
padding: 0.6875rem 0.9375rem;
// height: 5rem;
border-radius: 1.03rem;
background-color: rgb(11, 32, 56, 0.7);
margin-top: 0.34rem;
text-align: left;
.text-lg {
color: #fff;
}
.text-gray {
color: #a6abb5;
}
}
.date_wrap {
width: 21.5625rem;
height: 2.75rem;
margin: 0.9375rem auto 0;
padding: 0.3125rem 0.2813rem;
background-color: rgb(11, 32, 56, 0.7);
border-radius: 1.5625rem;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.34rem;
.date {
width: 2.625rem;
height: 2.125rem;
border-radius: 1.5625rem;
line-height: 2.125rem;
font-size: 0.875rem;
text-align: center;
color: #a0a5b0;
}
.active {
background-color: #45d9fd;
color: $uni-color-primary;
}
}
.chart_wrap {
// background-color: #f1f3f4;
padding: 0.56rem 1.25rem 2.56rem;
// border-top-right-radius: 1.03rem;
// border-top-left-radius: 1.03rem;
margin-top: 0.34rem;
}
.button_wrap {
padding: 1.25rem 1.25rem 0.625rem;
justify-content: space-between;
.button {
width: 10rem;
height: 2.4375rem;
line-height: 2.4375rem;
text-align: center;
color: #fff;
font-size: 0.9375rem;
background: #08182b;
border-radius: 1.5625rem;
}
.submit {
height: 3.0625rem !important;
line-height: 3.0625rem !important;
width: 100% !important;
margin-top: 0.63rem !important;
background: #6a69e9 !important;
}
.active {
background-color: #45d9fd;
color: #fff;
}
}
.submit_wrap {
background-color: #fff;
border-radius: 1.03rem;
padding: 0 1.56rem 1.25rem;
.row {
display: flex;
align-items: center;
justify-content: space-between;
.title {
font-size: 0.8125rem;
color: #a6abb5;
}
}
.input_wrap {
// height: 1.91rem;
// display: flex;
// align-items: center;
// border-radius: 1.25rem;
// border: 0.03rem solid $uni-color-primary;
// padding: 0 0.88rem;
// margin-left: auto;
// margin-right: auto;
// font-size: 1rem;
// margin: 0.38rem 0 0.59rem;
.van-field {
width: 15.0625rem;
height: 2.0625rem;
display: flex;
align-items: center;
border-radius: 1.25rem;
border: 0.03rem solid #d2d2f8;
padding: 0 0.88rem;
margin-left: auto;
margin-right: auto;
font-size: 1rem;
margin: 0.38rem 0 0.59rem;
}
// input {
// flex: 1;
// text-align: left;
// color: $uni-color-primary;
// .uni-input-placeholder {
// color: $uni-color-primary;
// }
// }
}
.button_wrap {
padding: 0;
.button {
width: 10rem;
height: 2.4375rem;
line-height: 2.4375rem;
margin: 0;
background-color: #08182b;
color: #fff;
}
.active {
background-color: #45d9fd;
color: #fff;
}
}
}
}
.buy_window {
background-color: #4d5e69;
padding: 0 0.81rem 1.25rem 0.81rem;
.row {
display: flex;
justify-content: space-between;
padding: 0.94rem 0.56rem;
border-bottom: 0.03rem solid #27343c;
color: #fff;
view {
color: #fff;
font-size: 0.81rem;
}
}
.title {
justify-content: center;
}
.button {
height: 2.19rem;
line-height: 2.19rem;
width: 100%;
text-align: center;
border-radius: 1.03rem;
background-color: $uni-color-primary;
color: #fff;
font-size: 0.81rem;
margin-top: 1.25rem;
}
}
::v-deep .van-popup--round {
border-radius: 1.88rem !important;
}
</style>
<template>
<Navigater :title="t('hongli.title')" />
<view class="button_group">
<view class="button" :class="{ active: pageType === 0 }" @click="changePageType(0)">{{ t('hongli.button1') }}</view>
<view class="button" :class="{ active: pageType === 1 }" @click="changePageType(1)">{{ t('hongli.button2') }}</view>
</view>
<view v-show="pageType === 0" class="column flex">
<view>{{ t('hongli.column_name') }}</view>
<view>{{ t('hongli.column_jiage') }}</view>
<view>{{ t('hongli.column_daima') }}</view>
</view>
<view v-show="pageType === 1" class="column flex">
<view>{{ t('hongli.column_name2') }}</view>
<view>{{ t('hongli.column_jiage2') }}</view>
<view>{{ t('hongli.column_chengjiaoe') }}</view>
<view>{{ t('hongli.column_zhuangtai') }}</view>
</view>
<scroll-view scroll-y :style="{ height: 'calc(100vh - 130px)' }">
<view class="gupiao_list">
<view v-show="pageType === 0">
<view v-if="gupiaoList.length === 0" class="nodata">{{ t('common.nodata') }}</view>
<view v-for="(item, index) in gupiaoList" :key="index" class="gupiao flex" @click="openWindow(item)">
<view>{{ item?.product?.name }}</view>
<view>{{ changeMoney(item.buy_in_money) }}</view>
<view>{{ item?.product?.shuzidaima }}</view>
</view>
</view>
<view v-show="pageType === 1">
<view v-if="shenqingList.length === 0" class="nodata">{{ t('common.nodata') }}</view>
<view v-for="(item, index) in shenqingList" :key="index" class="gupiao flex">
<view style="display: flex; flex-direction: column">
<view class="text_ellipsis" style="color: #fff">{{ item?.product?.name }}</view>
<view style="color: #a6a6a6">{{ item?.product?.shuzidaima }}</view>
</view>
<view style="display: flex; flex-direction: column">
<view style="color: #ff0021">{{ changeMoney(item.buy_in_money) }}</view>
<view v-if="item.order_status == '2' || item.order_status == '3' || item.order_status == '4'" style="color: #ff0021">
{{ Math.floor(item.final_num) }}
</view>
<view v-else-if="item.order_status == '1'" style="color: #ff0021">
{{ Math.floor(item.buy_in_num) }}
</view>
</view>
<view class="flex1 flex justify-center items-center text-red" style="color: #ff0021">{{ changeMoney(Math.floor(item.buy_in_amount)) }}</view>
<view class="flex1 flex justify-center items-center">
<view v-if="item.status == '2'" style="color: #0cd17c"> {{ t('hongli.tip1') }} </view>
<view v-if="item.status == '3'" class="text-red">{{ t('hongli.tip2') }} </view>
<view v-if="item.status == '1'">{{ t('hongli.tip3') }}</view>
</view>
</view>
</view>
</view>
</scroll-view>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<view class="title">{{ t('hongli.title2') }}</view>
<view class="row_wrap">
<view class="row" style="width: 100%">
<view class="label">{{ t('hongli.column_name') }}</view>
<view class="value">{{ windowDetail.name }}</view>
</view>
<view class="row">
<view class="label">{{ t('hongli.column_daima') }}</view>
<view class="value">{{ windowDetail.shuzidaima }}</view>
</view>
<view class="row">
<view class="label">{{ t('hongli.window_shijia') }}</view>
<view class="value">{{ changeMoney(windowDetail.price) }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('hongli.window_bianma') }}</view>
<view class="value">{{ windowDetail.zimudaima }}</view>
</view> -->
<view class="row">
<view class="label">{{ t('hongli.window_zhangdie') }}</view>
<view class="value">{{ windowDetail.zhangdiebaifenbi }}%</view>
</view>
<view class="row">
<view class="label">{{ t('hongli.column_jiage') }}</view>
<view class="value">{{ changeMoney(windowDetail.buy_in_money) }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.shouxufei') }}</view>
<view class="value">{{ shouxufei.toFixed(1) }}</view>
</view> -->
<view class="row">
<view class="label">{{ t('hongli.window_heji') }}</view>
<view class="value">{{ changeMoney(totalPrice) }}</view>
</view>
<view class="row">
<view class="label">{{ t('hongli.window_yue') }}</view>
<view class="value">{{ changeMoney(userMoneyInfo.money) }}</view>
</view>
<view class="row" style="width: 100%">
<view class="label">{{ t('ipo.windowLabel2') }}</view>
<view class="value"
><view class="flex justify-center my-[.8rem] a"> <van-stepper v-model="buyParams.num" integer input-width="100" button-size="2rem" /> </view
></view>
</view>
</view>
<view class="button" @click="buy">{{ t('gupiaoDetail.submit') }}</view>
</van-popup>
</template>
<script setup lang="ts">
import { getHongliListApi, buyHongliApi, getUserMoneyApi } from '@/api/index/index'
import { onHide, onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { changeMoney } from '@/common/common'
import { ref, computed } from 'vue'
const { t } = useI18n()
let inId: any = null
onShow(() => {
getHongliList()
getUserMoney()
inId = setInterval(() => {
getHongliList()
getUserMoney()
}, 10000)
})
onHide(() => {
clearInterval(inId)
})
const pageType = ref(0)
const changePageType = async (e: number) => {
pageType.value = e
}
// 獲取新股列表
const gupiaoList = ref([])
const shenqingList = ref([])
const getHongliList = async () => {
const res = await getHongliListApi()
gupiaoList.value = res.data.pro_list
shenqingList.value = res.data.order_list
}
// 獲取手續費
const userMoneyInfo = ref({})
const getUserMoney = async () => {
const res = await getUserMoneyApi()
res.data.sxf = Number(res.data.sxf)
res.data.sxfzdi = Number(res.data.sxfzdi)
userMoneyInfo.value = res.data
}
// 彈窗
const gupiaoWindowShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true,
round: true
}
const windowDetail = ref({
hedging_price: 0
})
const openWindow = (e: any) => {
windowDetail.value = e
gupiaoWindowShow.value = true
}
// const shouxufei = computed(() => {
// const sxf = totalPrice.value * userMoneyInfo.value.sxf
// if (sxf > userMoneyInfo.value.sxfzdi) {
// return sxf
// }
// return userMoneyInfo.value.sxfzdi || 20
// })
const totalPrice = computed(() => {
return buyParams.value.num * 100 * Number(windowDetail.value.buy_in_money)
})
// 購買
const buyParams = ref({
dividend_id: 0,
num: 1
})
const buy = async () => {
buyParams.value.dividend_id = windowDetail.value.id
const res = await buyHongliApi(buyParams.value)
gupiaoWindowShow.value = false
getHongliList()
getUserMoney()
if (res.code === 1) {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
}
</script>
<style scoped lang="scss">
// .flex1 {
// width: 25%;
// }
.nodata {
color: #a0a5b0;
font-size: 0.75rem;
}
.column,
.gupiao {
padding: 0.52rem 0rem;
display: flex;
// background-color: #fff;
text-align: center;
> view {
flex: 1;
color: #a0a5b0;
font-size: 0.75rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.a {
align-items: center;
}
.column {
// background-color: $uni-color-gray;
}
.button_group {
width: 21.5625rem;
height: 2.75rem;
background: #08182b;
border-radius: 1.5625rem;
margin: 0 auto;
padding: 0.3125rem;
display: flex;
align-items: center;
justify-content: space-between;
.button {
width: 10.3125rem;
height: 2.125rem;
line-height: 2.125rem;
border-radius: 1.25rem;
text-align: center;
font-size: 0.875rem;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.active {
background: #45d9fd;
color: $uni-color-primary;
font-weight: 500;
font-size: 0.875rem;
}
}
.gupiao_list {
margin-bottom: 0.31rem;
display: flex;
align-items: center;
justify-content: center;
// padding: 0.62rem;
.column,
.gupiao {
width: 22.6563rem;
height: 3.5rem;
padding: 0.52rem 0rem;
display: flex;
background-color: rgb(10, 31, 55, 0.7);
border-radius: 0.3125rem;
text-align: center;
margin-bottom: 0.625rem;
> view {
flex: 1;
font-size: $uni-font-size-lg;
white-space: pre-wrap;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
// white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.column {
// background-color: $uni-color-gray;
}
.text_ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.buy_window {
background-color: #fff;
padding: 0 0.81rem 1.25rem 0.81rem;
.title {
text-align: center;
padding: 0.8rem 0 0.5rem;
font-size: 1rem;
}
.row_wrap {
display: flex;
flex-wrap: wrap;
.row {
display: flex;
width: 50%;
align-items: center;
padding: 0.24rem 0.56rem;
color: #fff;
view {
color: $uni-text-color;
font-size: 0.775rem;
}
}
}
.button {
height: 2.19rem;
line-height: 2.19rem;
width: 100%;
text-align: center;
border-radius: 1.03rem;
background-color: #6a69e9;
color: #fff;
font-size: 0.81rem;
margin-top: 1.25rem;
}
}
</style>
<template>
<Navigater :title="t('ipo.title')" />
<!-- <view class="ul">
<view class="li">
<view class="flex items-center">
<image src="/static/image/index/ipo/icon1.png"></image>
<text class="text-lg">{{ t('ipo.title1') }}</text>
</view>
<van-icon name="arrow" color="#50aff0" />
</view>
<view class="li">
<view class="flex items-center">
<image src="/static/image/index/ipo/icon2.png"></image>
<text class="text-lg">{{ t('ipo.title2') }}</text>
</view>
<van-icon name="arrow" color="#50aff0" />
</view>
</view> -->
<view class="button_group">
<view class="button" :class="{ active: pageType === 0 }" @click="changePageType(0)">{{ t('ipo.button1') }}</view>
<view class="button" :class="{ active: pageType === 1 }" @click="changePageType(1)">{{ t('ipo.button2') }}</view>
</view>
<scroll-view scroll-y :style="{ height: 'calc(100vh - 6.25rem)' }">
<view class="gupiao_list">
<view v-show="pageType === 0">
<view v-for="(item, index) in shengoulist" :key="index" class="gupiao" @click="openWindow(item)">
<view class="flex items-center justify-between pb-[0.4rem]">
<view>
<view class="flex items-center">
<view class="font-bold" style="color: #45d9fd; max-width: 5.625rem; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; word-break: break-all">{{ item?.name }}</view>
<view class="icon text-base">{{ item?.shuzidaima }}</view>
</view>
<view style="display: flex; align-items: center; font-size: 0.75rem; color: #fff; font-weight: 500">
<view class="label" style="color: #fff; font-size: 0.8125rem">{{ t('ipo.shijian') }}</view>
<view class="value" style="color: #fff; font-size: 0.8125rem">{{ item.chouqiandate }}</view>
</view>
</view>
<view class="icon_primary text-lg">{{ t('ipo.button1') }}</view>
</view>
<view class="info-box">
<view class="row">
<view class="label" style="color: #a6a6a6; font-size: 0.8125rem">{{ t('ipo.jiage') }}</view>
<view class="value" style="color: #fff; font-size: 0.8125rem">{{ changeMoney(item.chengxiaojia) }}</view>
</view>
<view class="row">
<view class="label" style="color: #a6a6a6; font-size: 0.8125rem">{{ t('ipo.shuliang') }}</view>
<view class="value" style="color: #fff; font-size: 0.8125rem">{{ item.zongshengou }}</view>
</view>
</view>
</view>
<NotData v-if="shengoulist.length === 0"></NotData>
</view>
<view v-show="pageType === 1">
<!-- <view v-for="(item, index) in jieshulist" :key="index" class="gupiao">
<view class="flex items-center justify-between pb-[0.4rem]">
<view class="flex items-center">
<view class="font-bold text-primary">{{ item?.name }}</view>
<view class="icon text-base">{{ item?.shuzidaima }}</view>
</view>
<view class="icon text-lg">{{ t('ipo.button2') }}</view>
</view>
<view class="flex justify-between">
<view class="half">
<view class="row">
<view class="label">{{ t('ipo.jiage') }}</view>
<view class="value">{{ changeMoney(item.chengxiaojia) }}</view>
</view>
<view class="row">
<view class="label">{{ t('ipo.shuliang') }}</view>
<view class="value">{{ item.zongshengou }}</view>
</view>
</view>
<view class="half">
<view class="row">
<view class="label">{{ t('ipo.shijian') }}</view>
<view class="value">{{ item.chouqiandate }}</view>
</view>
</view>
</view>
</view> -->
<NotData v-if="xinguApply.length === 0"></NotData>
<view v-for="(item, index) in xinguApply" :key="index" class="gupiao">
<view class="flex items-center justify-between pb-[0.4rem]">
<view class="flex items-center">
<view class="font-bold text-primary" style="color: #fff">{{ item?.product?.name }}</view>
<view class="icon text-base">{{ item?.product?.shuzidaima }}</view>
</view>
<view class="icon text-lg">{{ getText(item) }}</view>
</view>
<view class="flex justify-between">
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.dingdanxiangqing') }}</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.jiage') }}</view>
<view class="value">{{ changeMoney(item.price) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.shenqingliang') }}</view>
<view class="value">{{ item.shengoushuliang }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.chouqianri') }}</view>
<view class="value">{{ item?.product?.chouqiandate }}</view>
</view>
<!-- <view class="row">
<view class="label">{{ t('jiaoyi.faquanri') }}</view>
<view class="value">{{ item?.product?.faquan_date }}</view>
</view> -->
</view>
<view class="half">
<!-- <view class="row">{{ t('jiaoyi.xianzaixianqging') }}</view> -->
<view class="row">
<view class="label">{{ t('jiaoyi.zhognqianshuliang') }}</view>
<view class="value">{{ item.zhongqianshu }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.renjiaogushu') }}</view>
<view class="value">{{ item.renjiaonum || 0 }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.txt1') }}</view>
<view class="value">{{ changeMoney(item.yingrenjiao) }}</view>
</view>
<view class="row">
<view class="label">{{ t('jiaoyi.txt2') }}</view>
<view class="value">{{ changeMoney(item.yirenjiao) }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<view class="title">{{ windowDetail.name }}/{{ windowDetail.shuzidaima }}</view>
<view class="row">
<view class="label">{{ t('ipo.windowLabel1') }}</view>
<view class="value">{{ changeMoney(windowDetail.chengxiaojia) }}</view>
</view>
<view class="row">
<view class="label">{{ t('ipo.windowLabel2') }}</view>
<!-- <view class="value input_wrap"> -->
<van-field v-model="shengouParams.shuliang" type="digit" />
<!-- <span style="margin-left: 0.19rem; font-size: 0.88rem">{{ t('ipo.zang') }}</span> -->
<!-- <input v-model="shengouParams.number" type="number" /> -->
<!-- </view> -->
</view>
<!-- <view class="row">
<view class="label">{{ t('ipo.windowLabel3') }}</view>
<view class="value">{{ changeMoney(windowDetail.chengxiaojia * shengouParams.shuliang * 100) }}</view>
</view> -->
<view class="button" @click="shengou">{{ t('gupiaoDetail.submit') }}</view>
</van-popup>
</template>
<script setup lang="ts">
import { getXinguListApi, shengouApi, getXinguApplyApi } from '@/api/index/index'
import { onHide, onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { ref } from 'vue'
import { changeMoney } from '@/common/common'
const { t } = useI18n()
let id: any = null
onShow(() => {
getXinguList()
getXinguApply()
id = setInterval(() => {
getXinguApply()
}, 10000)
})
onHide(() => {
clearInterval(id)
})
const pageType = ref(0)
const changePageType = async (e: number) => {
pageType.value = e
}
const getText = (item) => {
if (item.status === '0') {
return t('jiaoyi.txt3')
} else if (item.status === '1' && item.is_examine === 0) {
return t('jiaoyi.txt4')
} else if (item.status === '1' && item.is_examine === 1) {
return t('jiaoyi.txt5')
} else if (item.status === '1' && item.is_examine === 2) {
return t('jiaoyi.txt6')
} else if (item.status === '2') {
return t('jiaoyi.txt6')
}
}
const shengoulist = ref([])
const jieshulist = ref([])
const xinguApply = ref([])
const getXinguApply = async () => {
const res = await getXinguApplyApi()
if (res.code === 1) {
xinguApply.value = res.data
console.log(res, 'res')
}
}
const getXinguList = async () => {
const res = await getXinguListApi()
shengoulist.value = res.data.data.filter((item: any) => item.status === '1')
jieshulist.value = res.data.data.filter((item: any) => item.status === '2')
console.log(jieshulist.value, 'jieshulist.value')
console.log(shengoulist.value)
}
const gupiaoWindowShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true,
round: true
}
const windowDetail = ref({})
const openWindow = (e: any) => {
windowDetail.value = e
console.log(windowDetail.value)
gupiaoWindowShow.value = true
}
const shengouParams = ref({
price: '',
shuliang: 100,
id: ''
})
const shengou = async () => {
shengouParams.value.id = windowDetail.value.id
shengouParams.value.price = windowDetail.value.chengxiaojia
const res = await shengouApi(shengouParams.value)
gupiaoWindowShow.value = false
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
</script>
<style scoped lang="scss">
.info-box {
display: flex;
width: 20.9375rem;
height: 2.3125rem;
border-radius: 0.1563rem;
background: rgb(11, 33, 58, 0.8);
padding-left: 0.625rem;
.row {
flex: 0.8;
align-items: end;
justify-content: flex-start;
}
}
.van-field {
width: 50%;
border: 0.03rem solid $uni-color-primary;
padding: 0.12rem 0.5rem;
border-radius: 0.16rem;
}
.ul {
background-color: #fff;
margin-top: 0.88rem;
.li {
height: 2rem;
padding: 0 1.09rem 0 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
image {
width: 0.94rem;
height: 0.94rem;
margin-right: 0.63rem;
}
}
.li + .li {
border-top: 0.03rem solid $uni-text-color;
}
}
.button_group {
width: 21.5625rem;
height: 2.75rem;
background: #08182b;
border-radius: 1.5625rem;
margin: 0 auto;
padding: 0.3125rem;
display: flex;
align-items: center;
justify-content: space-between;
.button {
width: 10.3125rem;
height: 2.125rem;
line-height: 2.125rem;
border-radius: 1.25rem;
text-align: center;
font-size: 0.875rem;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.active {
background: #45d9fd;
color: $uni-color-primary;
font-weight: 500;
font-size: 0.875rem;
}
}
.gupiao_list {
view {
}
.gupiao {
// background-color: #fff;
margin-bottom: 0.31rem;
padding: 0.62rem 1.25rem;
.half {
width: 48%;
}
.row {
font-size: 0.8rem;
color: #0a0a0a;
display: flex;
align-items: center;
padding: 0.21rem 0;
justify-content: flex-start;
gap: 0.63rem;
.value {
color: #fff;
}
view {
color: $uni-text-color-gray;
font-size: $uni-font-size-lg;
}
}
}
.icon {
background: #0575e6;
padding: 0.14rem 0.44rem;
border-radius: 0.31rem;
color: #fff;
font-size: 0.75rem;
margin-left: 1rem;
// font-size: $uni-font-size-base;
}
.icon_primary {
width: 7.5rem;
height: 2.125rem;
background: $uni-color-primary;
// padding: 0.18rem 1rem;
text-align: center;
line-height: 2.125rem;
border-radius: 1.5625rem;
color: #fff;
font-size: $uni-font-size-lg;
}
.icon_o {
background: #fff;
padding: 0.18rem 1rem;
border-radius: 0.31rem;
color: $uni-color-primary;
border: 0.03rem solid $uni-color-primary;
margin-left: 1rem;
font-size: $uni-font-size-lg;
}
}
.buy_window {
background-color: #fff;
padding: 0 0.81rem 1.25rem 0.81rem;
.row {
display: flex;
justify-content: start;
align-items: center;
padding: 0.44rem 0.56rem;
color: #fff;
view {
color: $uni-text-color;
font-size: 0.81rem;
flex: 1;
width: auto;
}
.label {
width: 6rem;
flex: 2;
}
.van-field {
width: 35%;
}
}
.title {
text-align: center;
padding: 1rem 0 0.5rem;
font-size: 1rem;
}
.button {
height: 2.19rem;
line-height: 2.19rem;
width: 100%;
text-align: center;
border-radius: 1.03rem;
background-color: #6a69e9;
color: #fff;
font-size: 0.81rem;
margin-top: 1.25rem;
}
.input_wrap {
border: 0.03rem solid $uni-color-primary;
padding: 0.12rem 0.5rem;
border-radius: 0.16rem;
}
}
</style>
<template>
<view class="">
<view v-if="state == -1">
<Navigater :title="t('rongzi.title')" />
<scroll-view scroll-y :style="{ height: 'calc(100vh - 3.125rem)' }">
<view class="money">
<view class="money-bg">
<image :src="`/static/image/index/rongzi/bg_${locale}.png`" class="top-bg"></image>
</view>
<view class="tab-flex">
<view class="tab-li">
<view>
<image src="/static/image/index/rongzi/sh.png" class="icon"></image>
</view>
<view class="desc">{{ t('rongzi.tip1') }}</view>
<view class="main">{{ t('rongzi.tip2') }}</view>
</view>
<view class="tab-li">
<view>
<image src="/static/image/index/rongzi/hk.png" class="icon"></image>
</view>
<view class="desc">{{ t('rongzi.tip3') }}</view>
<view class="main">{{ t('rongzi.tip4') }}</view>
</view>
<view class="tab-li">
<view>
<image src="/static/image/index/rongzi/lilv.png" class="icon"></image>
</view>
<view class="desc">{{ t('rongzi.tip5') }}</view>
<view class="main">{{ t('rongzi.tip6') }}</view>
</view>
</view>
<view class="sq-txt">{{ t('rongzi.tip7') }}</view>
<view class="color-gary">
<view>{{ t('rongzi.tip8') }}</view>
<view>{{ t('rongzi.tip9') }}</view>
<view>{{ t('rongzi.tip10') }}</view>
</view>
<view class="info-box">
<view>{{ t('rongzi.tip11') }}</view>
<view class="list">
<view style="width: auto"></view>
<input v-model="params.money" style="font-size: 1.3125rem" type="number" :placeholder="t('rongzi.tip12')" />
</view>
<view class="xian"></view>
</view>
<view class="info-box">
<view class="fs-16 list">{{ t('rongzi.tip13') }}</view>
<view class="xian"></view>
<view class="list">
<view class="list-title">{{ t('rongzi.tip15') }}</view>
<view>
<input v-model="params.name" :placeholder="t('rongzi.tip14')" class="info-input" />
</view>
</view>
<view class="xian"></view>
<view class="list">
<view class="list-title">{{ t('rongzi.tip16') }}</view>
<view>
<input v-model="params.card" :placeholder="t('rongzi.tip17')" class="info-input" />
</view>
</view>
<view class="xian"></view>
<view class="list">
<view class="list-title">{{ t('rongzi.tip18') }}</view>
<view>
<input v-model="params.address" :placeholder="t('rongzi.tip19')" class="info-input" />
</view>
</view>
<view class="xian"></view>
<view class="list">
<view class="list-title">{{ t('rongzi.tip20') }}</view>
<view>
<input v-model="params.phone" :placeholder="t('rongzi.tip21')" class="info-input" />
</view>
</view>
<view class="xian"></view>
<view class="list">
<view class="list-title">{{ t('rongzi.tip22') }}</view>
<view>
<input v-model="params.mail" :placeholder="t('rongzi.tip23')" class="info-input" />
</view>
</view>
<!-- <view class="xian"></view>
<view class="">
<view class="mt-10">財務信息</view>
<view class="c-79 mt-10"> 收入或相關資產證明職業和工作信息 </view>
<view class="upload-Image">
<view @click="uploadImage(1)">
<image v-if="!isUploading1" src="/static/image/index/rongzi/sc.png" class="file-box"></image>
<view v-else class="file-box u-flex u-row-center"> </view>
</view>
<view>
<image :src="id_card_img_1" class="file-box ml-10"></image>
</view>
</view>
</view>
<view class="xian"></view>
<view class="">
<view class="mt-10">信用信息</view>
<view class="c-79 mt-10"> 信用報告(可選,可有助于提高信貸批核機會) </view>
<view class="upload-Image">
<view @click="uploadImage(2)">
<image v-if="!isUploading2" src="/static/image/index/rongzi/sc.png" class="file-box"></image>
<view v-else class="file-box u-flex u-row-center"> </view>
</view>
<view>
<image :src="id_card_img_2" class="file-box ml-10"></image>
</view>
</view>
</view>
<view class="xian"></view>
<view class="">
<view class="mt-10">其他支持文件</view>
<view class="c-79 mt-10"> 證明文件(如身分證、居住證明)任何其他支持申請的資質文件 </view>
<view class="upload-Image">
<view @click="uploadImage(3)">
<image v-if="!isUploading3" src="/static/image/index/rongzi/sc.png" class="file-box"></image>
<view v-else class="file-box u-flex u-row-center"> </view>
</view>
<view>
<image :src="id_card_img_3" class="file-box ml-10"></image>
</view>
</view>
</view> -->
</view>
<view class="sumbit" @click="saveSumbit()">{{ t('rongzi.tip24') }}</view>
</view>
</scroll-view>
</view>
<view v-else class="state-container">
<image class="state-image" :src="imageUrl" />
<view class="tip1">{{ tip1 }}</view>
<view class="tip2">{{ tip2 }}</view>
<view class="but-box">
<view class="first" @click="goWeb()">{{ t('rongzi.tip36') }}</view>
<view v-if="state == 0" class="last" @click="switchTab('/pages/index/index')">{{ t('rongzi.tip37') }}</view>
<view v-else-if="state == 1" class="last" @click="state = -1">{{ t('rongzi.tip25') }}</view>
<view v-else-if="state == 2" class="last" @click="state = -1">{{ t('rongzi.tip26') }}</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { getRongziApi, rongziApi } from '@/api/index/index'
import { switchTab } from '@/common/common'
import { ref, computed } from 'vue'
import { getCzhiurlApi } from '@/api/user'
// import config from '@/utils/config'
const { t, locale } = useI18n()
// 页面基础配置
onShow(() => {
getRongziList()
getCzhiurlFn()
})
const kefu_url = ref('')
const getCzhiurlFn = async () => {
const res = await getCzhiurlApi()
if (res.code === 1) {
kefu_url.value = res.data.kefu_url
}
}
const goWeb = () => {
window.open(kefu_url.value)
}
// 獲取融资详情
const rongziInfo = ref({})
const getRongziList = async () => {
const res = await getRongziApi()
rongziInfo.value = res.data.data
console.log(res.data)
// state.value = res.data.state === 0 ? 0 : -1
if (res.data?.state === 0) {
state.value = 0
} else if (res.data?.state === 1) {
state.value = 1
} else if (res.data?.state === 2) {
state.value = 2
} else {
state.value = -1
}
state.value = -1
// state.value = 2
// console.log(state.value)
}
const state = ref(-1)
const tip1 = computed(() => {
const text = [t('rongzi.tip27'), t('rongzi.tip28'), t('rongzi.tip29')]
return text[state.value]
})
const tip2 = computed(() => {
const text2 = [t('rongzi.tip30'), t('rongzi.tip31'), t('rongzi.tip32')]
return text2[state.value]
})
const imageUrl = computed(() => {
const text2 = ['/static/image/index/rongzi/shenhezhong.png', '/static/image/index/rongzi/tongguo.png', '/static/image/index/rongzi/butongguo.png']
return text2[state.value] || ''
})
// const isUploading1 = ref(false)
// const isUploading2 = ref(false)
// const isUploading3 = ref(false)
// const id_card_img_1 = ref(null)
// const id_card_img_2 = ref(null)
// const id_card_img_3 = ref(null)
// const uploadImage = async (type: any) => {
// uni.chooseImage({
// success: async (chooseImageRes) => {
// switch (type) {
// case 1:
// if (isUploading1.value) {
// uni.showToast({
// title: '正在上傳中',
// icon: 'loading'
// })
// } else {
// isUploading1.value = true
// }
// break
// case 2:
// if (isUploading2.value) {
// uni.showToast({
// title: '正在上傳中',
// icon: 'loading'
// })
// } else {
// isUploading2.value = true
// }
// break
// case 3:
// if (isUploading3.value) {
// uni.showToast({
// title: '正在上傳中',
// icon: 'loading'
// })
// } else {
// isUploading3.value = true
// }
// break
// }
// const tempFilePaths = chooseImageRes.tempFilePaths
// uni.uploadFile({
// url: config.baseURL + '/common/upload', // 仅爲示例,非真实的接口地址
// filePath: tempFilePaths[0],
// name: 'file',
// header: {
// token: uni.getStorageSync('token')
// },
// success: (uploadFileRes) => {
// const resData = JSON.parse(uploadFileRes.data)
// if (resData.code !== 1) {
// uni.showToast({
// title: '上傳失敗',
// icon: 'error'
// })
// return
// }
// console.log(resData)
// switch (type) {
// case 1:
// id_card_img_1.value = resData.data.fullurl
// params.value.income = resData.data.url // 收入或资产证明
// isUploading1.value = false
// break
// case 2:
// id_card_img_2.value = resData.data.fullurl
// params.value.credit = resData.data.url // 信用报告
// isUploading2.value = false
// break
// case 3:
// id_card_img_3.value = resData.data.fullurl
// params.value.qualifications = resData.data.url // 任何其他支持申请的资质文件
// isUploading3.value = false
// break
// }
// },
// complete: () => {
// switch (type) {
// case 1:
// isUploading1.value = false
// break
// case 2:
// isUploading2.value = false
// break
// case 3:
// isUploading3.value = false
// break
// }
// }
// })
// }
// })
// }
const params = ref({
money: null,
name: null,
card: null,
address: null,
phone: null,
mail: null,
income: null,
credit: null,
qualifications: null
})
const saveSumbit = async () => {
if (params.value.money < 500000) {
return uni.showToast({
icon: 'none',
title: t('rongzi.tip33')
})
}
if (params.value.money > 3000000) {
return uni.showToast({
icon: 'none',
title: t('rongzi.tip34')
})
}
// if (isUploading1.value || isUploading2.value || isUploading3.value) {
// return uni.showToast({
// icon: 'none',
// title: '文件資料未上傳完成'
// })
// }
if (validInfo() === true) {
const res = await rongziApi(params.value)
if (res.code === 1) {
state.value = 0
}
}
}
const validInfo = () => {
if (params.value.name && params.value.card && params.value.address && params.value.phone && params.value.mail) {
// if (params.value.name && params.value.card && params.value.address && params.value.phone && params.value.mail && params.value.income && params.value.credit && params.value.qualifications) {
return true
} else {
uni.showToast({
icon: 'none',
title: t('rongzi.tip35')
})
return false
}
}
</script>
<style scoped lang="scss">
.uni-app--maxwidth {
overflow-x: hidden;
}
.money {
padding-bottom: 1.875rem;
background: #eff5ff !important;
}
.header {
position: fixed;
background: #ffffff;
width: 100%;
display: flex;
height: 3.125rem;
padding: 0.625rem;
z-index: 9;
display: flex;
justify-content: space-between;
.back {
width: 0.5rem;
height: 1rem;
}
.title {
margin-right: 2.5rem;
color: #000;
}
}
.money-bg {
// padding-top: 50px;
}
.top-bg {
width: 100%;
height: 18.75rem;
}
.tab-flex {
box-sizing: border-box;
display: flex;
justify-content: space-between;
// margin: 15.0016px 10px;
padding: 1.625rem 0.4688rem 0 0.4688rem;
width: 100%;
}
.tab-li {
text-align: center;
width: 33%;
.icon {
width: 2.5rem;
height: 2.375rem;
}
.desc {
color: #29a5ff;
margin-top: 0.3125rem;
}
.main {
color: #666666;
margin-top: 0.3125rem;
}
}
.sq-txt {
margin: 0.625rem;
color: #29a5ff;
}
.color-gary {
color: #666666;
margin: 0.3125rem 0.625rem;
}
.info-box {
margin: 1.25rem 0.625rem;
// background: #272a33;
background: #ffffff;
border-radius: 0.625rem;
padding: 0.625rem;
}
.fs-16 {
}
.xian {
border-bottom: 0.0625rem solid #36394225;
}
.list {
// height: 2.5rem;
line-height: 2.5rem;
display: flex;
align-items: center;
::v-deep .uni-input-input {
font-size: 0.875rem;
color: #141414;
}
::v-deep .uni-input-placeholder {
font-size: 0.875rem;
}
}
.list .list-title {
width: 6.4375rem;
line-height: 1.375rem;
}
.list > view {
width: 8.125rem;
font-size: 0.875rem;
}
.c-79 {
color: #797c84;
}
.mt-10 {
margin-top: 0.625rem;
}
input {
font-size: 1.125rem;
width: 15rem;
height: 1.875rem;
line-height: 0.9375rem;
color: #141414;
}
input::placeholder {
color: #251c16;
}
.file-box {
width: 6.25rem;
height: 6.25rem;
margin-top: 0.9375rem;
margin-bottom: 0.9375rem;
border-radius: 0.625rem;
}
.sumbit {
background: #29a5ff;
margin: 0.625rem;
color: #ffffff;
border-radius: 0.3125rem;
line-height: 3.125rem;
text-align: center;
}
.upload-Image {
display: flex;
align-items: center;
}
.ml-10 {
margin-left: 0.625rem;
}
.state-container {
text-align: center;
.state-image {
width: 7.5rem;
height: 7.5rem;
margin: 2.8125rem auto 1.5625rem auto;
display: block;
}
.tip1 {
font-size: 1.25rem;
font-weight: 600;
color: #fff;
}
.tip2 {
font-size: 1rem;
font-weight: 400;
color: #a6a6a6;
padding: 0.5rem 0 2.25rem 0;
}
.but-box {
display: flex;
justify-content: space-around;
view {
width: 9.5rem;
height: 2.9375rem;
line-height: 2.9375rem;
border-radius: 0.625rem;
}
.first {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
background: #08182b;
// border: 0.0625rem solid rgb(41, 165, 255);
color: #fff;
border-radius: 1.5625rem;
padding: 0 1.9375rem;
}
.last {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
background: rgb(69, 217, 253);
color: $uni-color-primary;
border-radius: 1.5625rem;
}
}
}
</style>
<template>
<view class="cardimg" :style="{ backgroundImage: `url(${bg})` }">
<view class="foot-bottom">
<view class="foot">
<view v-for="(item, index) in data" v-show="item.show" :key="index" class="foot-tip">{{ item.label }}</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { onHide, onShow } from '@dcloudio/uni-app'
import { reactive, Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { check_token } from '@/api/index'
import bg from '@/static/loading.jpg'
const { t } = useI18n()
// const store = useCounterStore()
// const page = computed(() => {
// switch (locale.value) {
// case 'cn':
// return page1
// case 'jp':
// return page2
// case 'en':
// return page3
// case 'fr':
// return page4
// case 'sp':
// return page5
// default:
// return page2
// }
// })
const data = reactive([
{ label: `${t('indexLoading.label1')}`, show: false },
{ label: `${t('indexLoading.label2')}`, show: false },
{ label: `${t('indexLoading.label3')}`, show: false },
{ label: `${t('indexLoading.label4')}`, show: false },
{ label: `${t('indexLoading.label5')}`, show: false },
{ label: `${t('indexLoading.label6')}`, show: false }
])
onShow(() => {
checkToken()
startTimer()
})
onHide(() => {
clearInterval(timer.value)
})
let islogin = false
const checkToken = async () => {
const res = await check_token()
if (res.code === 1) {
islogin = res.data.login
}
}
const timer: Ref<any> = ref(null)
const startTimer = () => {
let index = 0
timer.value = setInterval(() => {
if (index >= data.length) {
clearInterval(timer.value)
// store.getUserInfo()
// console.log(uni.getStorageSync('token'))
if (!islogin) {
uni.navigateTo({
url: '/subPackages/login/login'
})
} else {
uni.switchTab({
url: '/pages/index/index'
})
}
return
}
refreshData(index++)
}, 500)
}
const refreshData = (index: any) => {
data[index].show = true
}
</script>
<style lang="scss" scoped>
.foot-bottom {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
position: fixed;
left: 2.0625rem;
bottom: 0;
}
.foot {
padding-bottom: 66px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: flex-start;
}
.foot-tip {
color: #000;
font-size: 15px;
margin-top: 11px;
width: 215px;
}
.cardimg {
// background-image: url('@/static/image/login/page.jpg');
background-repeat: no-repeat;
background-size: 100% 100%;
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
-o-transition-duration: 0.5s;
min-height: 100vh;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
</style>
<template>
<Navigater :title="t('jiaoyiDetail.title')" />
<view class="info">
<view class="flex justify-between">
<view class="tt">{{ jiaoyiDetail?.product?.name }}</view>
<view class="tt">{{ jiaoyiDetail?.yingsun }}</view>
</view>
<view class="flex">
<view class="text-base">{{ jiaoyiDetail?.product?.shuzidaima }}</view>
<view class="tag">{{ detailRows[0].value }}</view>
</view>
<view class="flex"></view>
</view>
<view class="rows">
<view v-for="(item, index) in detailRows" v-show="!((item.key === 'selltime' || item.key === 'sellprice') && item.value === '-')" :key="index" class="row">
<view class="label">{{ item.label }}</view>
<view class="value" :class="getTextColor(item)">{{ item.key === 'yingkui' || item.key === 'sellprice' ? changeMoney(item.value) : item.value }}</view>
</view>
</view>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'
import { getOrderDetailApi } from '@/api/order'
import { onLoad } from '@dcloudio/uni-app'
import { changeMoney, timestampToDate2 } from '@/common/common'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const ismai = ref('1')
onLoad(async (options) => {
ismai.value = options?.ismai
console.log(ismai.value, 'options?.ismai')
await getOrderDetailfn(options?.id)
})
const getTextColor = (item) => {
if (item.key === 'yingkui' && Number(item.value) > 0) {
return 'txt-red'
} else if (item.key === 'yingkui' && Number(item.value) <= 0) {
return 'txt-green'
}
}
const jiaoyiDetail = ref({})
const getOrderDetailfn = async (id: string) => {
const res = await getOrderDetailApi({ id, type: '1' })
jiaoyiDetail.value = res.data
for (const i in detailRows.value) {
const key = detailRows.value[i].key
for (const s in res.data) {
if (key === s) {
detailRows.value[i].value = res.data[s]
break
}
}
// 特殊处理
if (key === 'sellprice') {
detailRows.value[i].value = !Number(detailRows.value[i].value) ? '-' : detailRows.value[i].value
}
// if (key === 'yingkui') {
// detailRows.value[i].value = changeMoney(Number(detailRows.value[i].value))
// }
if (key === 'price') {
detailRows.value[i].value = changeMoney(Number(detailRows.value[i].value))
}
if (key === 'selltime') {
if (key === 'selltime') {
detailRows.value[i].value = detailRows.value[i].value ? timestampToDate2(detailRows.value[i].value * 1000) : '-'
} else {
detailRows.value[i].value = timestampToDate2(detailRows.value[i].value * 1000)
}
} else if (key === 'shizhi') {
detailRows.value[i].value = changeMoney(detailRows.value[i].value)
}
}
console.log(res)
}
const tip1 = computed(() => (ismai.value === '1' ? t('jiaoyiDetail.shuliang') : t('jiaoyiDetail.shuliang')))
const detailRows = ref([
{ label: t('jiaoyiDetail.leixing'), key: 'status_str', value: '' },
{ label: t('jiaoyiDetail.danhao'), key: 'order_sn', value: '' },
{ label: t('jiaoyiDetail.mairushijian'), key: 'buytime', value: '' },
{ label: t('jiaoyiDetail.mairujia'), key: 'price', value: '' },
{ label: t('jiaoyiDetail.maichushijian'), key: 'selltime', value: '' },
{ label: t('jiaoyiDetail.maichujia'), key: 'sellprice', value: '' },
{ label: tip1, key: 'shuliang', value: '' },
{ label: t('jiaoyiDetail.yingkui'), key: 'yingkui', value: '' },
{ label: t('jiaoyiDetail.mairuzongjia'), key: 'shizhi', value: '' },
{ label: t('jiaoyiDetail.ganggan'), key: 'ganggan_ratio', value: '' }
])
</script>
<style lang="scss" scoped>
.txt-green {
color: #34e607 !important;
}
.txt-red {
color: #ff4545 !important;
}
.info {
width: 20.9063rem;
height: 3.9688rem;
background: linear-gradient(168deg, #1b5191 0.74%, #09366b 49.68%, #1a4f8d 99.61%);
padding: 0.8rem 0.8rem;
margin: 0.5rem auto 0;
border-top-right-radius: 1.25rem;
border-top-left-radius: 1.25rem;
.tag {
height: 1rem;
background: rgba(12, 48, 88, 0.7);
border-radius: 0.1563rem;
color: #fff;
font-size: 0.625rem;
padding: 0 0.375rem;
margin-left: 0.3125rem;
}
.tt {
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
.text-base {
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.7);
font-weight: 500;
}
}
.rows {
background-color: linear-gradient(168deg, #08182b 0.74%, #1b5191 99.61%);
padding: 1.4375rem 1.875rem 0 2.1875rem;
// margin-top: 0.63rem;
border-top-left-radius: 1.25rem;
border-top-right-radius: 1.25rem;
.row {
font-size: $uni-font-size-lg;
height: 2.38rem;
display: flex;
justify-content: space-between;
align-items: center;
.label {
color: #abafb9;
font-size: 0.875rem;
}
.value {
color: #fff;
font-size: 0.875rem;
}
}
}
</style>
<template>
<view class="nav">
{{ t('login.tip1') }}
<view class="nav-right" @click="goPage('/subPackages/register/register')">{{ t('login.tip2') }}</view>
</view>
<view class="container">
<view class="wrap mx-[1.88rem]">
<img class="bg" :src="bg" />
<view class="title">{{ t('login.tip3') }}</view>
<view class="mas">
<view class="input_wrap">
<view class="icon">
<image src="/src/static/image/login/1.png" mode="widthFix"></image>
</view>
<input v-model="loginParams.account" :placeholder="t('login.account_placeholder')" />
</view>
<view class="input_wrap">
<view class="icon">
<image src="/src/static/image/login/2.png" mode="widthFix"></image>
</view>
<input v-model="loginParams.password" :placeholder="t('login.password_placeholder')" type="password" />
</view>
</view>
<view class="button-wrap">
<view class="button" @click="login">{{ t('login.button_text') }}</view>
<view class="text" @click="goPage('/subPackages/register/register')">{{ t('login.register') }}</view>
</view>
<!-- <view class="text_button mx-[1.88rem]">
<view @click="goWeb()">{{ t('login.forget_password') }}</view>
</view> -->
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { loginApi } from '@/api/login/login'
import { switchTab, goPage, checkInput } from '@/common/common'
import { useCounterStore } from '@/store/store'
import { showSuccessToast } from 'vant'
import { getCzhiurlApi } from '@/api/user'
import bg from '@/static/logo.png'
import { onLoad } from '@dcloudio/uni-app'
const { t } = useI18n()
const store = useCounterStore()
const loginParams = ref({
account: '',
password: ''
})
const kefu_url = ref('')
onLoad(() => {
getCzhiurlFn()
})
const getCzhiurlFn = async () => {
const res = await getCzhiurlApi()
if (res.code === 1) {
kefu_url.value = res.data.kefu_url
}
}
// const goWeb = () => {
// window.open(kefu_url.value)
// }
const checkArr = [
{ key: 'account', message: t('login.account_error') },
{ key: 'password', message: t('login.password_error') }
]
const login = async () => {
if (!checkInput(checkArr, loginParams.value)) {
return
}
uni.showLoading({ mask: true })
const res = await loginApi(loginParams.value)
uni.hideLoading()
if (res.code === 1) {
uni.setStorageSync('token', res.data.userinfo.token)
uni.setStorageSync('userId', res.data.userinfo.id)
uni.setStorageSync('userInfo', res.data.userinfo)
store.token = res.data.userinfo.token
store.userId = res.data.userinfo.userId
store.getUserInfo()
showSuccessToast(res.msg)
setTimeout(() => {
switchTab('/pages/index/index')
}, 1000)
}
}
</script>
<style lang="scss" scoped>
body {
background-image: url('/src/static/image/login/bg1.png');
}
.nav {
width: 100%;
height: 3.125rem;
color: #fff;
// background: #fff;
font-size: 1.0625rem;
display: flex;
justify-content: center;
align-items: center;
position: sticky;
top: 0;
left: 0;
.nav-right {
position: absolute;
top: 0.8438rem;
right: 1.7813rem;
font-size: 1.0625rem;
color: #fff;
}
}
.container {
text-align: center;
overflow-x: hidden;
margin: 0 auto;
// background-color: #fff;
// height: 100vh;
.bg {
width: 13.69rem;
// height: 14.5833rem;
margin: 3rem auto;
}
.title {
color: #45d9fd;
font-size: 1.125rem;
font-weight: 600;
margin-top: 0.6875rem;
}
}
.logo {
width: 7.5rem;
height: 7.5rem;
// border-radius: 50%;
// background-color: $uni-color-primary;
margin: 14vh auto 0;
}
.name {
margin: 2.3vh auto 9.54vh;
font-size: 1.5rem;
color: $uni-color-primary;
}
.button-wrap {
width: 20rem;
margin-top: 1.875rem;
.text {
color: #fff;
font-size: 0.9375rem;
line-height: 3.125rem;
}
.button {
width: 100%;
}
}
.mas {
width: 20rem;
height: 7.375rem;
background: #00316b;
border-radius: 1.25rem;
margin-top: 1.8125rem;
}
.input_wrap {
display: flex;
align-items: center;
height: 3.6875rem;
border-radius: 1.25rem;
// border: 0.03rem solid $uni-color-primary;
padding: 0 0.88rem;
max-width: 20rem;
margin-left: auto;
margin-right: auto;
font-size: 1rem;
.uni-input-input {
color: #fff;
}
.icon {
width: 1.1875rem;
height: 1.1875rem;
margin-right: 0.94rem;
image {
width: 100%;
height: 100%;
display: block;
}
}
input {
flex: 1;
text-align: left;
color: $uni-color-primary;
.uni-input-placeholder {
color: #b3b6c1;
}
}
}
.text_button {
max-width: 20rem;
font-size: $uni-font-size-1;
color: $uni-color-primary;
display: flex;
justify-content: space-between;
margin: 0.31rem auto;
view {
padding: 0.31rem;
}
}
.button {
// max-width: 20rem;
width: 11.25rem;
height: 3.125rem;
background-color: #6a69e9;
border-radius: 1.34rem;
display: flex;
justify-content: center;
align-items: center;
// margin: 0 auto;
color: #fff;
// margin-top: 4rem;
// margin-bottom: 2rem;
}
</style>
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const goPage = (url: string) => {
uni.navigateTo({
url
})
}
</script>
<template>
<view class="box">
<image src="/src/static/image/login/logo.png" class="logo"></image>
<view class="name">Squarepoint</view>
<view class="btn1" @click="goPage('/subPackages/register/register')">{{ t('logout.registertip') }}</view>
<view class="btn2" @click="goPage('/subPackages/login/login')">{{ t('logout.logotip') }}</view>
</view>
</template>
<style lang="scss" scoped>
uni-page-body {
width: 100%;
height: 100%;
background: #ffffff;
}
.box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.name {
margin: 2.3vh auto 0;
font-size: 1.5rem;
color: $uni-color-primary;
}
.logo {
width: 7.5rem;
height: 7.5rem;
// border-radius: 50%;
// background-color: $uni-color-primary;
margin: 14vh auto 0;
}
.btn1 {
width: 19.7813rem;
height: 2.6563rem;
margin-top: 3.5rem;
display: flex;
justify-content: center;
align-items: center;
background: #50aff0;
border-radius: 1.3438rem;
font-weight: 300;
font-size: 1rem;
color: #ffffff;
}
.btn2 {
width: 19.7813rem;
height: 2.6563rem;
margin-top: 1.5rem;
display: flex;
justify-content: center;
align-items: center;
background: #ffffff;
border: 1px solid #50aff0;
border-radius: 1.3438rem;
font-weight: 300;
font-size: 1rem;
color: #50aff0;
}
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { ref } from 'vue'
import { getUserMessageApi, getUserMessageDetailApi } from '@/api/message'
import { onShow } from '@dcloudio/uni-app'
const { t } = useI18n()
const UserMessageList = ref([])
onShow(() => {
getUserMessage()
getUserMessageDetail()
})
const getUserMessage = async () => {
const res = await getUserMessageApi()
if (res.code === 1) {
UserMessageList.value = res.data.data
}
}
const getUserMessageDetail = async () => {
await getUserMessageDetailApi()
}
const getData = (dataString: any) => {
const time = new Date(dataString * 1000)
const year = time.getFullYear()
const month = time.getMonth() + 1
const day = time.getDate()
const hour = time.getHours()
const minute = time.getMinutes()
const second = time.getSeconds()
return (
year +
'-' +
(month < 10 ? '0' + month : month) +
'-' +
(day < 10 ? '0' + day : day) +
' ' +
(hour < 10 ? '0' + hour : hour) +
':' +
(minute < 10 ? '0' + minute : minute) +
':' +
(second < 10 ? '0' + second : second)
)
}
</script>
<template>
<Navigater :title="t('message.xiaoxi')" />
<view>
<scroll-view scroll-y :style="{ height: 'calc(100vh - 48px)' }">
<view v-for="(item, index) in UserMessageList" :key="index">
<view class="createtime">{{ getData(item.createtime) }}</view>
<view class="content">{{ item.content }}</view>
</view>
<NotData v-if="UserMessageList.length === 0" />
</scroll-view>
</view>
</template>
<style lang="scss" scoped>
.content {
color: #fff;
background-color: rgba(10, 31, 54, 0.8);
margin: 0.625rem;
padding: 0.9375rem 0.625rem;
font-size: $uni-font-size-1;
border-radius: 0.625rem;
}
.createtime {
font-size: $uni-font-size-1;
color: #747474;
text-align: center;
margin-top: 0.625rem;
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { getOrderDetailApi } from '@/api/order'
// import { paramsType } from '@/api/order/indexType'
import { onMounted, ref } from 'vue'
const { t } = useI18n()
const order = ref({})
const props = defineProps({
id: {
type: String
},
type: String
})
// 获取股票详情
const getOrderDetailFn = async () => {
console.log(props.id)
const res = await getOrderDetailApi(props)
if (res.code === 1) {
order.value = res.data
}
console.log(res)
}
onMounted(() => {
getOrderDetailFn()
})
</script>
<template>
<Navigater :title="t('order.tip1')" />
<view class="box">
<view class="title-box">
<view class="name">{{ order?.product?.name }}</view>
<view class="code">{{ order?.product?.shuzidaima }}</view>
</view>
<van-cell-group class="order-box">
<van-cell title="訂單號:" :value="order.order_sn" :arrow="false"></van-cell>
<van-cell title="買入時間:" :value="order.buytime" :arrow="false"></van-cell>
<van-cell title="賣出時間:" :value="order.selltime" :arrow="false" v-if="order.status === '2'"></van-cell>
<van-cell title="買入價格:" :value="order.price" :arrow="false"></van-cell>
<van-cell v-if="order.status === '2'" title="賣出價格:" :value="order.sellprice" :arrow="false"></van-cell>
<van-cell title="持有數量:" :value="order.shuliang" :arrow="false"></van-cell>
<van-cell title="原始保證金:" :value="order.benjin" :arrow="false"></van-cell>
<van-cell title="槓桿倍數:" :value="order.ganggan_ratio" :arrow="false"></van-cell>
<van-cell title="買入手續費:" :value="order.sxf_gyf" :arrow="false"></van-cell>
<van-cell v-if="order.status === '2'" title="賣出手續費:" :value="order.sxf_pc" :arrow="false"></van-cell>
<van-cell title="市值:" :value="order.shizhi" :arrow="false"></van-cell>
<van-cell title="類型:" :value="order.buy_type == '0' ? '市價' : '限價'" :arrow="false"></van-cell>
<van-cell v-if="order.status === '2'" title="證交稅:" :value="order.se_fee" :arrow="false"></van-cell>
<van-cell v-if="order.status === '2'" title="證交稅:" :value="order.se_fee" :arrow="false"></van-cell>
<van-cell title="狀態" :value="order.status_str" :arrow="false" class="zt"></van-cell>
</van-cell-group>
<!-- <view class="centen">
<view class="row">
<view class="leab">已实现损益</view>
<view class="data">-309.92</view>
</view>
</view> -->
</view>
</template>
<style lang="scss" scoped>
body {
background: #fff;
}
.box {
width: 100%;
.centen {
padding: 0 20px;
.row {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.title-box {
margin-top: 1.5625rem;
margin-bottom: 1.5625rem;
text-align: center;
.name {
font-weight: 600;
font-size: 1.25rem;
}
.code {
font-size: 1rem;
}
}
}
</style>
<script setup lang="ts">
import { Ref, ref } from 'vue'
import Navigator from '@/components/navigator/navigator.vue'
import { getRealnameApi, subRealnameApi } from '@/api/real_name'
import { RealNameType } from '@/api/real_name/indexType'
import { useI18n } from 'vue-i18n'
import { onLoad } from '@dcloudio/uni-app'
import { closeToast, showLoadingToast, showSuccessToast, showToast } from 'vant'
import { useCounterStore } from '@/store/store'
import baseURL from '@/utils/config'
const store = useCounterStore()
const { t } = useI18n()
const form: Ref<RealNameType> = ref({
true_name: '',
id_card: '',
id_card_img_1: '',
id_card_img_2: '',
status_msg: null,
status: ''
})
const progressImg1 = ref(false)
const progressImgjidu1 = ref(50)
const progressImg2 = ref(false)
const progressImgjidu2 = ref(19)
const id_card_img_1 = ref('')
const id_card_img_2 = ref('')
// const userinfo = ref([])
const getRealname = async () => {
showLoadingToast({
message: t('toastText.tip1'),
forbidClick: true,
overlay: true,
loadingType: 'spinner'
})
const res = await getRealnameApi()
if (res.code === 1) {
if (res.data) {
form.value = res.data
id_card_img_1.value = form.value.id_card_img_1
id_card_img_2.value = form.value.id_card_img_2
}
// form.value.status = '2'
} else {
showToast(res.msg)
}
closeToast()
}
onLoad(() => {
getRealname()
})
// 提交实名
const submitRealName = async () => {
if (store.userInfo?.is_auth === 1 && form.value.status !== '') {
return showToast(t('real_name.tip1'))
}
if (form.value.status === '0') {
return showToast(t('real_name.tip2'))
}
const res = await subRealnameApi(form.value)
if (res.code === 1) {
showSuccessToast(res.msg)
setTimeout(() => {
getRealname()
store.getUserInfo()
}, 2000)
} else {
showToast(res.msg)
}
}
// 上传
const uploadImage = (type: number) => {
if (form.value.status === '0') {
return showToast(t('real_name.tip2'))
}
if (form.value.status === '1') {
return showToast(t('real_name.tip3'))
}
uni.chooseImage({
sourceType: ['album', 'camera'], // 从相册选择
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths
const filePath = tempFilePaths[0]
console.log(tempFilePaths, 'tempFilePaths')
// showToast(filePath)
switch (type) {
case 1:
id_card_img_1.value = filePath
progressImg1.value = true
progressImgjidu1.value = 60
break
case 2:
id_card_img_2.value = filePath
progressImg2.value = true
progressImgjidu2.value = 69
break
}
// uni.showLoading()
uni.uploadFile({
// url: '/api.php/common/upload', // 仅爲示例,非真实的接口地址
url: baseURL.baseURL + '/common/upload?lang=' + uni.getStorageSync('locale'), // 仅爲示例,非真实的接口地址
filePath: filePath,
name: 'file',
header: {
token: uni.getStorageSync('token')
},
success: (uploadFileRes) => {
const resData = JSON.parse(uploadFileRes.data)
if (resData.code !== 1) {
showToast(t('real_name.tip4'))
}
// showToast(tempFilePaths + '---' + resData)
console.log('resData.data.fullurl', tempFilePaths)
switch (type) {
case 1:
form.value.id_card_img_1 = resData.data.fullurl
id_card_img_1.value = resData.data.fullurl
progressImgjidu1.value = 99
progressImg1.value = false
showSuccessToast(t('real_name.tip5'))
break
case 2:
form.value.id_card_img_2 = resData.data.fullurl
id_card_img_2.value = resData.data.fullurl
progressImgjidu2.value = 99
progressImg2.value = false
showSuccessToast(t('real_name.tip6'))
break
}
uni.hideLoading()
}
})
}
})
}
</script>
<template>
<Navigator :title="t('real_name.realName')" />
<view v-if="form.status == '0'">
<view class="u-text-center u-font-xl" style="">{{ t('real_name.tip2') }}</view>
</view>
<view v-if="form.status == '1'">
<!-- <view class="u-text-center">
<image src="../../static/img/authentication/chenggong.png" class="success-icon"></image>
</view> -->
<view class="u-text-center u-font-xl" style="">{{ t('real_name.tip7') }}</view>
</view>
<view v-if="form.status == 2" style="height: 50px; width: 100%; background-color: #4672ae; color: #fff; display: flex; align-items: center; padding: 15rpx">
{{ t('real_name.tip15') }}{{ form.status_msg }}
</view>
<view class="info-list">
<view class="input-item" style="margin-bottom: 0.9375rem">
<view class="input-item-lebal">{{ t('real_name.tip8') }}</view>
<input v-model="form.true_name" type="text" :disabled="form.status === '1'" :placeholder="t('real_name.tip9')" style="text-align: right" />
</view>
<view class="input-item" style="border: none">
<view class="input-item-lebal">{{ t('real_name.tip10') }}</view>
<input v-model="form.id_card" :disabled="form.status === '1'" type="text" maxlength="16" :placeholder="t('real_name.tip11')" style="text-align: right" />
</view>
</view>
<view class="upload-image">
<view class="upload-image-box" @click="uploadImage(1)">
<image :src="id_card_img_1 != '' ? id_card_img_1 : `/static/image/authentication/zheng.png`" mode=""> </image>
<view style="font-size: 0.5rem; color: #a6a6a6; font-weight: 400; text-align: center">{{ t('real_name.tip12') }}</view>
<v-solt>
<u-line-progress v-show="progressImg1" active-color="#2979ff" :striped="true" :striped-active="true" :percent="progressImgjidu1"></u-line-progress>
</v-solt>
</view>
<view @click="uploadImage(2)">
<image class="upload-image-box" :src="id_card_img_2 != '' ? id_card_img_2 : `/static/image/authentication/fan.png`" mode=""> </image>
<view style="font-size: 0.5rem; color: #a6a6a6; font-weight: 400; text-align: center">{{ t('real_name.tip13') }}</view>
<v-slot>
<u-line-progress v-show="progressImg2" active-color="#2979ff" :striped="true" :striped-active="true" :percent="progressImgjidu2"></u-line-progress>
</v-slot>
</view>
</view>
<butto v-if="form.status === '2' || form.status === ''" :disabled="progressImg1 == true || progressImg2 == true || form.status === '1'" class="submit" @click="submitRealName">
{{ t('real_name.tip14') }}
</butto>
</template>
<style lang="scss" scoped>
input {
font-size: 1.125rem;
height: 1.875rem;
line-height: 0.9375rem;
}
.wrap {
box-sizing: border-box;
}
.u-text-center {
margin-top: 2.0313rem;
display: flex;
justify-content: center;
align-items: center;
}
.input-item {
padding: 0 1.25rem;
height: 3.375rem;
border-radius: 0.625rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: space-between;
align-items: center;
background: rgb(10, 30, 54, 0.5);
// border-bottom: solid 0.0625rem #adc3d1;
::v-deep .uni-input-placeholder {
font-weight: 500;
color: #fff;
font-size: 0.9375rem;
}
.input-item-lebal {
font-size: 0.8125rem;
color: #a0a5b0;
}
input {
font-weight: 500;
font-size: 0.9375rem;
color: #c0c2c4;
padding-left: 1.5rem;
flex: 1;
}
}
.upload-image {
display: flex;
justify-content: space-between;
padding: 0.625rem;
.upload-image-box {
width: 10.4063rem;
height: 6.1875rem;
border-radius: 0.4063rem;
// border: 1px solid #50b0f2;
// border: 1px solid #50b0f2;
}
image {
width: 100%;
height: 100%;
// border-radius: 0.4063rem;
// border: 1px solid #50b0f2;
}
text {
padding-top: 12rpx;
}
}
.submit {
display: block;
height: 2.8125rem;
line-height: 2.8125rem;
text-align: center;
font-size: 1rem;
color: #fff;
background: $uni-color-primary;
border-radius: 1.5625rem;
margin: 2.5rem 0.625rem 0.625rem 0.625rem;
}
.success-icon {
width: 5rem;
height: 6.25rem;
margin-top: 10%;
}
.info-list {
margin: 1.25rem 0.5625rem 0;
// background: #2a2e39;
border-radius: 0.25rem;
}
</style>
<script setup lang="ts">
import Navigator from '@/components/navigator/navigator.vue'
import { useCounterStore } from '@/store/store'
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const store = useCounterStore()
const number = ref(0)
const moneyList = [1000000, 2000000, 5000000, 10000000, 20000000, 50000000]
const checkMoney = (item: number) => {
number.value = item
}
</script>
<template>
<Navigator />
<view class="top-money"> {{ store.$state.userInfo?.money }} </view>
<view class="recharge-box">
<view class="recharge-box-title">{{ t('recharge.chongzhijine') }}</view>
<!-- 允许输入数字,调起带符号的纯数字键盘 -->
<van-field v-model="number" type="number" />
<view class="money-tag-box">
<view v-for="(item, i) in moneyList" :key="i" class="money-tag" :class="number == item ? 'active' : ''" @click="checkMoney(item)">
{{ item.toLocaleString() }}
</view>
</view>
<view class="sumbit">{{ t('recharge.queren') }}</view>
</view>
<view class="tip">{{ t('recharge.zhuyishixiang') }}:</view>
</template>
<style lang="scss" scoped>
.tip {
margin-top: 0.7813rem;
margin-left: 1.125rem;
font-weight: 300;
font-size: $uni-font-size-1;
color: #292828;
}
.top-money {
width: 100%;
height: 4.5313rem;
display: flex;
justify-content: center;
align-items: center;
background: #f9fafb;
margin-top: 0.4688rem;
font-weight: 400;
font-size: 1.5rem;
color: #080707;
}
.recharge-box {
width: 100%;
height: 13rem;
background: #f9fafb;
margin-top: 0.4375rem;
padding: 1.2813rem 1.2188rem 1.0938rem 1.1563rem;
.sumbit {
width: 21rem;
height: 1.5938rem;
margin-top: 0.5313rem;
display: flex;
justify-content: center;
align-items: center;
background: #50b0f2;
border-radius: 0.8125rem;
font-weight: 300;
font-size: $uni-font-size-1;
color: #fefbfb;
}
.money-tag-box {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 1.2188rem;
.money-tag.active {
background: #50aff0;
color: #fbfcfc;
}
.money-tag {
width: 6.3438rem;
height: 1.5313rem;
border-radius: 0.75rem;
border: 0.0625rem solid #50b0f2;
opacity: 0.59;
font-weight: 500;
font-size: $uni-font-size-1;
color: #292828;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.7188rem;
}
}
.van-field {
margin-top: 0.4688rem;
width: 21.0625rem;
height: 1.6563rem;
background: #f9fafb;
border-radius: 0.8125rem;
border: 0.0625rem solid #50b0f2;
padding: 0 0 0 0.625rem;
display: flex;
align-items: center;
::v-deep .van-field__control {
line-height: 0;
}
}
.recharge-box-title {
font-weight: 300;
font-size: $uni-font-size-1;
color: #080707;
}
}
</style>
<template>
<view class="nav">
{{ t('register.button_text') }}
<view class="nav-right" @click="reLaunch('/subPackages/login/login')">{{ t('register.tip3') }}</view>
</view>
<view class="container">
<view class="wrap mx-[1.88rem]">
<img class="bg" :src="bg" />
<view class="title">{{ t('register.tip4') }}</view>
<view class="mas">
<view class="input_wrap">
<view class="icon">
<image src="/src/static/image/login/1.png" mode="widthFix"></image>
</view>
<input v-model="registerParams.account" :placeholder="t('register.account_placeholder')" />
</view>
<view class="input_wrap">
<view class="icon">
<image src="/src/static/image/login/2.png" mode="widthFix"></image>
</view>
<input v-model="registerParams.password" :placeholder="t('register.password_placeholder')" type="password" />
</view>
<view class="input_wrap">
<view class="icon">
<image src="/src/static/image/login/2.png" mode="widthFix"></image>
</view>
<input v-model="registerParams.again_password" :placeholder="t('register.password_again_placeholder')" type="password" />
</view>
<view class="input_wrap">
<view class="icon">
<image src="/src/static/image/login/3.png" mode="widthFix"></image>
</view>
<input v-model="registerParams.yaoqingma" :placeholder="t('register.code_placeholder')" />
<!-- <view class="text_button" @click="sendSms">{{ t('register.code_text') }}</view> -->
</view>
</view>
<view class="button-wrap">
<view class="button" @click="register">{{ t('register.tip4') }}</view>
<view class="text" @click="reLaunch('/subPackages/login/login')">{{ t('register.tip3') }}</view>
</view>
<!-- <view class="button" @click="reLaunch('/subPackages/login/login')">{{ t('register.button2_text') }}</view>
<view class="button" @click="register">{{ t('register.button_text') }}</view> -->
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { registerApi } from '@/api/login/login'
import { reLaunch, checkInput, switchTab } from '@/common/common'
import { showFailToast, showLoadingToast, showSuccessToast, showToast } from 'vant'
import { useCounterStore } from '@/store/store'
import bg from '@/static/logo.png'
// import { AxiosResponse } from 'axios'
const { t } = useI18n()
// console.log(AxiosResponse)
const store = useCounterStore()
const registerParams = ref({
account: '',
password: '',
again_password: '',
yaoqingma: ''
})
const checkArr = [
{ key: 'account', message: t('register.account_error') },
{ key: 'password', message: t('register.password_error') },
{ key: 'again_password', message: t('register.password_again_error') },
{ key: 'yaoqingma', message: t('register.code_error') }
]
const register = async () => {
const reg = /^(070|080|090)\d{8}$/
if (!checkInput(checkArr, registerParams.value)) {
return
}
if (!reg.test(registerParams.value.account)) {
return showToast(t('register.tip1'))
}
if (registerParams.value.password.length < 6 || registerParams.value.password.length > 10) {
return showToast(t('register.tip2'))
}
if (registerParams.value.password !== registerParams.value.again_password) {
showFailToast(t('register.password_repeat_error'))
return
}
showLoadingToast({ mask: true })
const res = await registerApi(registerParams.value)
// closeToast()
if (res.code === 1) {
uni.setStorageSync('token', res.data.userinfo.token)
uni.setStorageSync('userId', res.data.userinfo.id)
uni.setStorageSync('userInfo', res.data.userinfo)
store.token = res.data.userinfo.token
store.userId = res.data.userinfo.userId
store.getUserInfo()
showSuccessToast(res.msg)
setTimeout(() => {
switchTab('/pages/index/index')
}, 1000)
} else {
showFailToast(res.msg)
}
}
// const sendSms = async () => {
// if (!registerParams.value.account) {
// showFailToast(t('register.account_error'))
// return
// }
// const params = {
// mobile: registerParams.value.account,
// event: 'register'
// }
// uni.showLoading({ mask: true })
// await sendSmsApi(params)
// uni.hideLoading()
// }
</script>
<style lang="scss" scoped>
.button-wrap {
width: 20rem;
// display: flex;
justify-content: space-between;
align-content: center;
margin-top: 1.875rem;
.text {
color: #fff;
font-size: 0.9375rem;
line-height: 3.125rem;
}
.button {
width: 11.25rem;
height: 3.125rem;
background-color: #6a69e9;
border-radius: 1.34rem;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
width: 100%;
}
}
.mas {
width: 20rem;
height: 14.75rem;
background: #00316b;
border-radius: 1.25rem;
margin-top: 1.8125rem;
}
.nav {
width: 100%;
height: 3.125rem;
color: #fff;
// background: #fff;
font-size: 1.0625rem;
display: flex;
justify-content: center;
align-items: center;
position: sticky;
top: 0;
left: 0;
.nav-right {
position: absolute;
top: 0.8438rem;
right: 1.7813rem;
font-size: 1.0625rem;
color: #fff;
}
}
body {
background-image: url('/src/static/image/login/bg1.png');
}
.container {
text-align: center;
overflow-x: hidden;
margin: 0 auto;
// background-color: #fff;
// height: 100vh;
.bg {
width: 13.69rem;
margin: 3rem auto;
}
.title {
color: #45d9fd;
font-size: 1.125rem;
font-weight: 600;
margin-top: 0.6875rem;
}
}
.logo {
width: 7.5rem;
height: 7.5rem;
// border-radius: 50%;
// background-color: $uni-color-primary;
margin: 14vh auto 0vh;
}
.name {
margin: 0vh auto 9.54vh;
font-size: 1.5rem;
color: $uni-color-primary;
}
.input_wrap {
display: flex;
align-items: center;
height: 3.6875rem;
border-radius: 1.25rem;
// border: 0.03rem solid $uni-color-primary;
padding: 0 0.88rem;
max-width: 20rem;
margin-left: auto;
margin-right: auto;
font-size: 1rem;
.icon {
width: 1.1875rem;
height: 1.1875rem;
margin-right: 0.94rem;
image {
width: 100%;
height: 100%;
display: block;
}
}
input {
flex: 1;
text-align: left;
color: $uni-color-primary;
.uni-input-placeholder {
color: #b3b6c1;
}
}
}
</style>
<script setup lang="ts">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { searchStock } from '@/api/search'
import { onLoad } from '@dcloudio/uni-app'
import { closeToast, showLoadingToast } from 'vant'
import icon1 from '@/static/4.png'
const { t } = useI18n()
const code = ref('')
const history = ref([])
const searchValue = ref([])
const search = async () => {
showLoadingToast({
message: t('search.tip2'),
forbidClick: true,
overlay: true
})
const res = await searchStock({ code: code.value })
closeToast()
if (res.code === 1) {
if (res.data.result.length) {
// addHistory()
// getHistory()
if (!history.value.find((item) => item === code.value)) {
addHistory()
getHistory()
}
}
searchValue.value = res.data.result
}
}
const clickSearch = (value) => {
code.value = value
search()
}
// 添加搜索历史
const addHistory = () => {
history.value.push(code.value)
console.log(history.value, 'history.value')
uni.setStorageSync('history', history.value)
}
// 获取搜索历史
const getHistory = () => {
history.value = uni.getStorageSync('history') || []
}
// 跳转详情
const goPage = (id: number) => {
uni.navigateTo({
url: '/subPackages/index/gupiaoDetail/gupiaoDetail?id=' + id
})
}
const goBack = () => {
uni.navigateBack({})
}
// 删除记录
const delkeyword = (value) => {
history.value = history.value.filter((item) => item !== value)
uni.setStorageSync('history', history.value)
}
onLoad(() => {
getHistory()
})
</script>
<template>
<!-- <Navigator :title="t('search.title')" /> -->
<!-- <view class="nav">
</view> -->
<view class="top-box">
<img :src="icon1" style="width: 0.625rem; height: 1.0547rem; margin-left: 1.0625rem" @click="goBack" />
<view class="input_wrap">
<image src="/static/image/searchNavigation/search.png" class="search-img" />
<input v-model="code" :placeholder="t('search.tip3')" cursor-color="#ffffff" auto-focus @confirm="search" />
</view>
<view class="search_text" @click="search">{{ t('search.title') }}</view>
</view>
<view class="content">
<!-- <view class="title">{{ t('search.sousuolishi') }}</view> -->
<view v-if="!searchValue.length" class="keyword">
<view v-for="item in history" :key="item" class="keyword-list">
<view class="keyword-item">
<view class="keyword-item-left" @click="clickSearch(item)">{{ item }}</view>
<image src="/static/image/searchNavigation/close.png" class="keyword-close" @click="delkeyword(item)" />
</view>
</view>
</view>
<view class="list">
<!-- <view v-if="!searchValue.length" class="not-data"> {{ t('search.tip1') }} </view> -->
<NotData v-if="!searchValue.length" />
<view v-for="item in searchValue" :key="item.id" class="list-item" @click="goPage(item.id)">
<view class="item-title">
{{ item.name }}{{ item.shuzidaima }} <span>{{ item.price }}&nbsp; {{ item.zhangdieshu }}({{ item.zhangdiebaifenbi }}%)</span>
</view>
<img class="arrow" src="/static/rigth.png" />
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.uni-input-placeholder {
font-size: 0.8125rem !important;
color: #fff;
}
.nav {
width: 100%;
height: 3.125rem;
}
.top-box {
width: 100%;
height: 3.125rem;
display: flex;
align-items: center;
.search {
width: 4.375rem;
height: 2rem;
margin-left: 0.625rem;
margin-right: 0.9375rem;
// background: #07c160;
// ::v-deep .van-button__content {
// color: #ffffff;
// }
}
.search_text {
color: #fff;
font-size: 0.875rem;
margin-left: 0.625rem;
}
.input_wrap {
display: flex;
align-items: center;
width: 17.8125rem;
height: 2.125rem;
border-radius: 1.0313rem;
// border: 0.0625rem solid #46abef;
background-color: #08182b;
margin-left: 0.625rem;
.search-img {
margin-left: 0.9375rem;
margin-right: 0.3125rem;
width: 0.875rem;
height: 0.875rem;
}
}
}
.content {
width: 100%;
// display: flex;
// flex-direction: column;
// justify-content: center;
// align-items: center;
// margin-top: 0.9375rem;
.list {
margin-top: 0.9375rem;
.not-data {
text-align: center;
margin-top: 6.25rem;
color: #0e0e0e;
}
.list-item {
height: 4.0625rem;
width: 100%;
padding: 0 0.9375rem;
border-radius: 4px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
background-color: $uni-bg-color;
.arrow {
width: 1.25rem;
height: 1.25rem;
}
.item-title {
height: 4.0625rem;
font-weight: 600;
font-size: $uni-font-size-lg;
color: #333;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
span {
font-size: $uni-font-size-lg;
font-weight: 400;
color: #333;
margin-top: 0.3125rem;
}
}
}
}
.keyword {
margin-top: 0.4375rem;
// padding: 0 0.9375rem;
display: flex;
flex-flow: wrap;
// padding: 0 9px;
font-size: $uni-font-size-2;
.keyword-item {
// width: 6.0938rem;
width: 23.4375rem;
height: 2.125rem;
padding: 0.5rem 0.9375rem 0.4063rem 0.9375rem;
height: 1.7188rem;
display: flex;
align-items: center;
justify-content: space-between;
.keyword-item-left {
color: #a6a6a6;
font-size: 0.875rem;
}
.keyword-close {
width: 0.6995rem;
height: 0.6995rem;
}
}
}
.title {
margin-top: 0.6875rem;
margin-left: 1.25rem;
font-size: $uni-font-size-1;
font-weight: 600;
}
}
::v-deep.uni-input-input {
color: #fff !important;
font-size: 0.8125rem !important;
}
uni-input {
flex: 1;
}
</style>
<script setup lang="ts">
// import { Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useCounterStore } from '@/store/store'
const store = useCounterStore()
const { t } = useI18n()
const goPage = (url: string) => {
uni.navigateTo({ url })
}
const logout = () => {
console.log('logout!!')
console.log(store.clearState, 'store.clearState!!')
store.clearState()
}
</script>
<template>
<Navigater :title="t('seting.sheding')" />
<view class="card">
<view class="form-item">
<view class="form-title">{{ t('seting.xingming') }}</view>
<view class="form-val">{{ store.$state.userInfo?.true_name || '' }}</view>
</view>
<view class="form-item">
<view class="form-title">{{ t('seting.zhanghu') }}</view>
<view class="form-val">{{ store.$state.userInfo?.username || '' }}</view>
</view>
<view class="form-item" @click="goPage('/subPackages/changePassword/changePassword')">
<view class="form-title">{{ t('seting.denglumima') }}</view>
<img src="@/static/rigth.png" />
</view>
<view class="form-item" @click="goPage('/subPackages/transactionPassions/transactionPassions')">
<view class="form-title">{{ t('seting.zijinmima') }}</view>
<img src="@/static/rigth.png" />
</view>
<view class="logout" @click="logout">
{{ t('seting.logout') }}
</view>
</view>
</template>
<style lang="scss" scoped>
.card {
width: 100%;
height: 14.6563rem;
// background: #ffffff;
margin-top: 0.625rem;
display: flex;
flex-direction: column;
align-items: center;
.logout {
width: 21rem;
height: 2.75rem;
display: flex;
justify-content: center;
align-items: center;
margin-top: 1.875rem;
background: $uni-color-primary;
border-radius: 1.5625rem;
font-weight: 300;
font-size: 0.9375rem;
color: #fff;
}
.form-item {
width: 100%;
height: 2.125rem;
padding: 0 1.1875rem 0 1.1875rem;
display: flex;
justify-content: space-between;
align-items: center;
// border-bottom: 1px solid #adc3d1;
.form-title {
font-weight: 300;
font-size: $uni-font-size-2;
color: #fff;
}
.form-val {
font-weight: 300;
font-size: $uni-font-size-2;
color: #fff;
}
img {
height: 0.9688rem;
}
}
}
</style>
<script setup lang="ts">
import { computed, Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import yuyan from '@/static/image/user/yuyan.png'
const { t, locale } = useI18n()
type itmeType = {
name: string
val: string
isShow: boolean
}
type listType = [itmeType]
const check1 = computed(() => locale.value === 'cn')
const check2 = computed(() => locale.value === 'jp')
const check3 = computed(() => locale.value === 'en')
const check4 = computed(() => locale.value === 'sp')
const check5 = computed(() => locale.value === 'fr')
const list: Ref<listType> = ref([
{
name: 'yuyan.zhongwenjianti',
val: 'cn',
isShwo: check1
},
{
name: 'yuyan.ribenyu',
val: 'jp',
isShwo: check2
},
{
name: 'yuyan.yinyu',
val: 'en',
isShwo: check3
},
{
name: 'yuyan.xibanyayu',
val: 'sp',
isShwo: check4
},
{
name: 'yuyan.fayu',
val: 'fr',
isShwo: check5
}
])
const checkLocale = (val: string) => {
uni.setStorageSync('locale', val)
locale.value = val
console.log(check1.value, 'check1')
console.log(check2.value, 'check2')
console.log(check3.value, 'check3')
console.log(check4.value, 'check4')
console.log(check5.value, 'check5')
}
</script>
<template>
<Navigater :title="t('user.qiehuanyuyan')" />
<view class="box">
<view class="title">
<img :src="yuyan" />
<span>{{ t('user.qiehuanyuyan') }}</span>
</view>
<view class="list">
<view v-for="(item, i) in list" :key="i" class="item" @click="checkLocale(item.val)"
><span>{{ t(item.name) }}</span>
<!-- <van-switch v-model="item.isShow" size="18px" active-color="#6A69E9" /> -->
<van-icon v-if="item.val === locale" name="success" size="20px" color="#EE2560" />
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.box {
padding: 0 1.25rem;
}
.title {
margin-top: 0.9375rem;
display: flex;
align-items: center;
img {
width: 2.125rem;
height: 2.125rem;
margin-right: 0.625rem;
}
span {
color: #fff;
font-size: 1rem;
font-weight: 500;
}
}
.list .item:last-child {
border-bottom: none;
}
.list {
width: 20.9375rem;
height: 15.75rem;
border-radius: 1.25rem;
background: #08182b;
margin-top: 0.9063rem;
padding-left: 1rem;
padding-right: 1.0625rem;
.item {
width: 100%;
height: 3.125rem;
display: flex;
justify-content: space-between;
align-items: center;
align-items: center;
background: #08182b;
border-bottom: 1px solid #686868;
.link {
width: 18.4375rem;
height: 0.0313rem;
}
span {
font-weight: 400;
font-size: 0.875rem;
color: #fff;
}
}
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { CzType } from '@/api/transactionLog/indexType'
import { changeMoney } from '@/common/common'
import { computed, onMounted, ref } from 'vue'
interface PropsType {
data: Array<CzType>
value: Number
}
onMounted(() => {
console.log(props.data)
})
const props = defineProps<PropsType>()
const { t } = useI18n()
const emit = defineEmits(['bottom'])
// const shenhe_str = ref([t('incomeLog.daishenhe'), t('incomeLog.yipizhun'), t('incomeLog.shenheshibai')])
const text1 = computed(() => t('transactionLog.tip2'))
const text2 = computed(() => t('transactionLog.tip3'))
const text3 = computed(() => t('transactionLog.tip4'))
const remark = ref([text1, text2, text3])
const bottomFn = () => {
emit('bottom')
}
</script>
<template>
<scroll-view scroll-y :style="{ height: 'calc(100vh - 110px)' }" @scrolltolower="bottomFn">
<NotData v-if="data.length === 0" />
<view class="list-box">
<view v-for="item in props.data" :key="item.id" class="list-item">
<view class="list-item-left">
<view class="list-item-shouru" style="color: #fff; font-size: 0.9375rem; font-weight: 500">{{ props.value === 1 ? t('incomeLog.shourujilu') : t('incomeLog.zhichujilu') }}</view>
<view class="list-item-time">{{ t('incomeLog.dingdanbianhao') }}:{{ item.order_sn }}</view>
<view class="list-item-time" style="text-align: left">{{ item.createtime }}</view>
</view>
<view class="list-item-right">
<view class="list-item-shouru">{{ changeMoney(item.money) }}</view>
<view v-if="props.value === 1" class="list-item-tag">{{ item.remark }}</view>
<view v-if="props.value === 2" class="list-item-tag">{{ remark[Number(item.status)].value }}</view>
</view>
</view>
</view>
</scroll-view>
</template>
<style lang="scss" scoped>
.list-box {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 1.25rem;
.list-item {
width: 21.5625rem;
display: flex;
justify-content: space-between;
background: rgb(10, 28, 50, 0.5);
border-radius: 1.0313rem;
padding: 0.625rem 1.25rem;
margin-bottom: 0.4375rem;
.list-item-right {
display: flex;
flex-direction: column;
align-items: flex-end;
.list-item-tag {
// width: 4.1875rem;
// height: 1.2188rem;
padding: 0.0938rem 0.25rem;
margin-top: 0.3125rem;
display: flex;
align-items: center;
justify-content: center;
background: #ee2560;
border-radius: 1.25rem;
font-weight: 500;
font-size: 0.75rem;
color: #fff;
}
}
.list-item-shouru {
font-weight: 500;
font-size: 0.9375rem;
font-weight: 600;
color: #48bd76;
}
.list-item-time {
color: #cbcbcb;
text-align: right;
font-size: 0.8125rem;
line-height: 1.125rem;
}
}
}
</style>
<script setup lang="ts">
import { onMounted } from 'vue'
import { JyType } from '@/api/transactionLog/indexType'
import { useI18n } from 'vue-i18n'
import { changeMoney } from '@/common/common'
const { t } = useI18n()
interface PropsType {
data: Array<JyType>
}
const props = defineProps<PropsType>()
onMounted(() => {
console.log(props.data, 'props')
})
const emit = defineEmits(['bottom'])
const bottomFn = () => {
emit('bottom')
}
</script>
<template>
<scroll-view scroll-y :style="{ height: 'calc(100vh - 50px)' }" @scrolltolower="bottomFn">
<NotData v-if="data.length === 0" />
<view class="list-box">
<!-- <view v-for="item in props.data" :key="item.id" class="list-item">
<view class="list-item-top">
<view class="list-item-top-left">
<view class="list-item-money">{{ item.gpCode }}</view>
<view class="list-item-tag">{{ item.gpName }}</view>
</view>
<view class="list-item-top-rigth"> {{ item.createtime }} </view>
</view>
<view class="list-item-bottom">
<view class="list-item-bottom-left">
<view class="list-item-bottom-money">{{ t('orderLog.money') }}</view>
<view class="list-item-bottom-remarks"
><span>{{ item.money }}</span
>{{ t('orderLog.beizhu') }}</view
>
</view>
<view class="list-item-bottom-right">{{ item.name }} </view>
</view>
</view> -->
<view v-for="item in props.data" :key="item.id" class="item">
<view class="note xian">
<view class="date">
<view v-if="item?.isshow" class="gpCode" style="font-weight: 400; font-size: 12px">{{ item.gpCode }}</view>
<view class="name">{{ item.name }}</view>
<!-- <view v-if="item?.isshow" class="gpName" style="font-weight: 400; font-size: 12px">{{ item.gpName }}</view> -->
</view>
<view class="time"> {{ item.createtime }} </view>
</view>
<view class="info-box">
<view class="info-box-left">
<view v-if="item?.isshow" class="gpName">{{ item.gpName }}</view>
<view class="u-flex u-row-between biaohao"> {{ t('transactionLog.tip1') }}{{ item.order_sn }} </view>
</view>
<view class="money" :class="item.money > 0 ? 'txt-red' : 'txt-green'" style="float: right; line-height: 32px">{{ changeMoney(item.money) }}</view>
</view>
<!-- <view class="u-margin-top-10 record-text">
<view class="u-flex u-row-between"> {{ t('transactionLog.tip1') }}{{ item.order_sn }} </view>
<view class="mt-10"> {{ item.createtime }} </view>
</view> -->
</view>
</view>
</scroll-view>
</template>
<style lang="scss" scoped>
.txt-green {
color: #0cd17c;
}
.txt-red {
color: #ff4545 !important;
}
.mt-10 {
margin-top: 0.625rem;
}
.record-text {
margin-top: 1.25rem;
font-size: 0.75rem;
color: #999;
}
.list-box .item:first-child {
margin-top: 0.625rem;
}
.list-box {
.item {
// background: #fff;
width: 100%;
padding: 1.3125rem 0.9375rem 0 0.9375rem;
box-sizing: border-box;
border-radius: 0.375rem;
margin-top: 0.625rem;
.info-box {
width: 21.5625rem;
height: 4.5938rem;
background: rgb(13, 46, 85, 0.7);
border-radius: 0.9375rem;
margin-top: 0.625rem;
padding: 1rem 0.625rem 0.9063rem 0.9375rem;
display: flex;
align-items: center;
justify-content: space-between;
.money {
font-size: 1rem;
font-weight: 600;
}
.info-box-left {
display: flex;
flex-direction: column;
justify-content: space-between;
.gpName {
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
.biaohao {
color: #a0a5b0;
font-size: 0.8125rem;
}
}
}
.time {
font-size: 0.8125rem;
color: #a0a5b0;
line-height: 0.8125rem;
text-align: right;
font-weight: 400;
}
.date {
display: flex;
align-items: center;
font-size: 0.9375rem;
max-height: 14.5625rem;
color: #545861;
margin-top: 0.3125rem;
.gpCode {
color: #0f75fc;
font-size: 0.75rem;
font-weight: 500;
background: #ddebff;
border-radius: 0.1875rem;
line-height: 1.0625rem;
padding: 0.125rem 0.375rem;
margin-right: 0.3125rem;
}
.name {
font-size: 0.9375rem;
color: #fff;
font-weight: 500;
}
}
.note {
font-weight: 600;
// color: #cacee0;
}
.xian {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.list-item {
width: 21.5625rem;
height: 5.1875rem;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 0.5313rem 1.375rem 0.7188rem 1.375rem;
background: #ffffff;
border-radius: 0.9375rem;
margin-bottom: 0.4375rem;
.list-item-bottom {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.list-item-bottom-right {
font-weight: 300;
font-size: $uni-font-size-1;
color: #1b70ab;
}
.list-item-bottom-left {
display: flex;
align-items: center;
width: 11.875rem;
justify-content: space-between;
.list-item-bottom-remarks {
font-weight: 300;
font-size: $uni-font-size-1;
color: #1b70ab;
display: flex;
justify-content: center;
align-items: center;
span {
color: #c02d1a;
margin-right: 0.1563rem;
}
}
.list-item-bottom-money {
font-weight: 300;
font-size: $uni-font-size-1;
color: #1b70ab;
// margin-right: 5.3125rem;
}
}
}
.list-item-top {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.list-item-top-rigth {
font-weight: 300;
font-size: $uni-font-size-1;
color: #000203;
}
.list-item-top-left {
display: flex;
align-items: center;
.list-item-money {
width: 3.4688rem;
font-weight: 300;
font-size: $uni-font-size-1;
color: #000203;
}
.list-item-tag {
width: 5.6563rem;
// height: 0.875rem;
display: flex;
justify-content: center;
align-items: center;
// background: #a6d5f5;
border-radius: 0.4375rem;
font-weight: 300;
font-size: $uni-font-size-1;
// color: #fdfefe;
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: pre-wrap; //溢出不换行
}
}
}
}
}
</style>
<script setup lang="ts">
// import SearchNavigation from '@/components/searchNavigation/searchNavigation.vue'
import { onMounted, Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import OrderLog from './components/orderLog.vue'
import IncomeLog from './components/incomeLog.vue'
import { getLiuShuiApi } from '@/api/transactionLog'
import { JyType, CzType } from '@/api/transactionLog/indexType'
import { onLoad, onReachBottom } from '@dcloudio/uni-app'
import Navigator from '@/components/navigator/navigator.vue'
import { closeToast, showLoadingToast } from 'vant'
const { t } = useI18n()
interface TabType {
title: string
value: number
}
const isLs = ref(false)
onLoad((option) => {
console.log(option, 'option')
if (option?.isLs === '1') {
isLs.value = true
tabValue.value = 3
// tabList.value = [
// {
// title: 'transactionLog.tab1',
// value: 3
// }
// ]
} else {
isLs.value = false
tabValue.value = 1
// tabList.value = [
// {
// title: 'transactionLog.tab2',
// value: 1
// },
// {
// title: 'transactionLog.tab3',
// value: 2
// }
// ]
}
})
const tabValue: Ref<Number> = ref(1)
const tabList: Ref[TabType] = ref([
{
title: 'transactionLog.tab2',
value: 1
},
{
title: 'transactionLog.tab3',
value: 2
}
])
const checkTab = (value: number) => {
tabValue.value = value
getLiuShuiFn()
}
onMounted(() => {
getLiuShuiFn()
})
const jyData: Ref[JyType] = ref([])
let jyPage = 1
const czData: Ref[CzType] = ref([])
let czPage = 1
const tlData: Ref[CzType] = ref([])
let tlPage = 1
const getLiuShuiFn = async () => {
showLoadingToast({
message: t('search.tip2'),
mask: true
})
isLoading.value = true
let page = 1
switch (tabValue.value) {
case 1:
page = czPage
break
case 2:
page = tlPage
break
case 3:
page = jyPage
break
}
const res = await getLiuShuiApi({ type: tabValue.value, page })
closeToast()
if (res.code === 1) {
if (tabValue.value === 3) {
if (res.data.data.length) {
jyPage++
}
res.data.data.forEach((element) => {
const arr = element.detailed.split('|')
element.name = arr[0]
if (arr[1]) {
element.gpCode = arr[2]
element.gpName = arr[4]
element.isshow = true
} else {
element.isshow = false
}
jyData.value.push(element)
})
console.log(jyData.value)
}
if (tabValue.value === 1) {
res.data.data.forEach((element) => {
if (res.data.data.length) {
czPage++
}
czData.value.push(element)
})
console.log(czData.value)
}
if (tabValue.value === 2) {
res.data.data.forEach((element) => {
if (res.data.data.length) {
tlPage++
}
tlData.value.push(element)
})
}
}
isLoading.value = false
}
const isLoading = ref(false)
onReachBottom(() => {})
const bottomFn = () => {
getLiuShuiFn()
}
</script>
<template>
<Navigator class="top" :title="isLs ? t('index.button4') : t('user.shouru')" />
<view class="bg-[#fff]">
<!-- <SearchNavigation /> -->
</view>
<view v-if="!isLs" class="tab-box">
<view v-for="item in tabList" :key="item.value" class="tab-box-item" :class="tabValue === item.value ? 'active' : ''" @click="checkTab(item.value)">
{{ t(item.title) }}
</view>
</view>
<view class="list">
<OrderLog v-if="isLs && tabValue === 3" :data="jyData" @bottom="bottomFn" />
<IncomeLog v-if="!isLs && tabValue === 1" :data="czData" :value="tabValue" @bottom="bottomFn" />
<IncomeLog v-if="!isLs && tabValue === 2" :data="tlData" :value="tabValue" @bottom="bottomFn" />
</view>
<!-- <view class="loading-box">
<van-loading v-if="isLoading" type="spinner" size="24px" />
</view> -->
</template>
<style lang="scss" scoped>
// .top {
// width: 100%;
// position: fixed;
// top: 0;
// left: 0;
// }
.list {
// margin-top: 5.875rem;
// background: #f5f5f9;
background: rgb(10, 30, 54, 0.5);
// padding-top: 1.25rem;
border-top-left-radius: 1.25rem;
border-top-right-radius: 1.25rem;
}
.loading-box {
display: flex;
justify-content: center;
align-content: center;
}
uni-page-body {
// padding-top: 94px;
height: 100%;
}
.tab-box {
// position: fixed;
// top: 3.13rem;
// margin-top: 3.13rem;
// position: fixed;
// top: 50px;
// left: 0;
// background: #e4f1f9;
width: 100%;
padding: 0.8125rem 1.3125rem;
display: flex;
align-items: center;
// justify-content: space-between;
.tab-box-item.active {
background: $uni-color-primary;
color: #fff;
}
.tab-box-item {
width: 6.875rem;
height: 2.125rem;
padding: 0.25rem 0.5rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: 1.25rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background: #08182b;
font-size: 0.875rem;
color: #fff;
}
}
</style>
<script setup lang="ts">
import { ref, Ref, reactive, computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { PayPasswordType } from '@/api/transactionPassions/indexType'
import { setPayPasswordApi } from '@/api/transactionPassions'
import { useCounterStore } from '@/store/store'
import { showSuccessToast, showToast } from 'vant'
import { getWithdrawal } from '@/api/user'
import { onLoad } from '@dcloudio/uni-app'
import icon1 from '@/static/1.png'
import icon2 from '@/static/2.png'
const store = useCounterStore()
const form: Ref<PayPasswordType> = ref({
new_pay_password: '',
old_pay_password: '',
re_pay_password: '',
user_id: store.$state.userId
})
const paypassword = ref('')
onLoad(() => {
getWithdrawalFn()
})
const getWithdrawalFn = async () => {
const res = await getWithdrawal(store.$state.userId)
if (res.code === 1) {
paypassword.value = res.data.user_info.paypassword
// paypassword.value = ''
console.log(paypassword.value, 'vvvv')
}
console.log(res)
}
const isIf = computed(() => {
return paypassword.value === '' ? null : true
})
const formList = reactive([
{
label: 'transactionPassions.jiumima',
dataName: 'old_pay_password',
msgName: 'checkMsg.shurujiumima',
isShow: false,
isIf: isIf
},
{
label: 'transactionPassions.xingmima',
dataName: 'new_pay_password',
msgName: 'checkMsg.shuruxingmima',
isShow: false,
isIf: true
},
{
label: 'transactionPassions.xingmima2',
dataName: 're_pay_password',
msgName: 'checkMsg.shuruxingmima',
isShow: false,
isIf: true
}
])
const { t } = useI18n()
const showPass = (i: number) => {
formList[i].isShow = !formList[i].isShow
}
const submit = async () => {
console.log(form.value)
if (paypassword.value !== '') {
if (form.value.old_pay_password === '') {
return showToast(t('transactionPassions.tip1'))
}
}
if (form.value.new_pay_password === '') {
return showToast(t('transactionPassions.tip2'))
}
if (form.value.re_pay_password === '') {
return showToast(t('transactionPassions.tip2'))
}
if (form.value.new_pay_password.length < 6 || form.value.new_pay_password.length > 10) {
return showToast(t('transactionPassions.tip3'))
}
if (form.value.new_pay_password !== form.value.re_pay_password) {
return showToast(t('transactionPassions.tip4'))
}
const res = await setPayPasswordApi(form.value)
if (res.code === 1) {
showSuccessToast(res.data.msg)
setTimeout(() => {
uni.switchTab({
url: '/pages/user/user'
})
}, 1000)
}
}
</script>
<template>
<Navigater :title="t('user.shiwuchuli')"></Navigater>
<view class="Box">
<!-- <view class="box-top"> {{ t('account.chatu') }} </view> -->
<view class="box-form-card">
<!-- <view class="title">{{ t('transactionPassions.shezhishiwuchulitoushi') }}</view> -->
<view v-for="(item, i) in formList" v-show="item.isIf" :key="i" class="box-form-item">
<view class="box-form-item-label"> &nbsp;&nbsp;{{ t(item.label) }}</view>
<van-field v-model="form[item.dataName]" :right-icon="item.isShow ? icon1 : icon2" :type="item.isShow ? 'text' : 'password'" :placeholder="t(item.msgName)" @click-right-icon="showPass(i)" />
<!-- <img src="@/static/1.png" class="input-img" /> -->
</view>
<van-button class="btn" type="primary" @click="submit">{{ t('transactionPassions.queren') }}</van-button>
</view>
</view>
</template>
<style lang="scss" scoped>
::v-deep .van-field__control {
height: 2rem;
border: none;
font-weight: 400;
font-size: 0.9375rem;
color: #fff;
}
// ::v-deep uni-page {
// background: #fff;
// }
::v-deep .van-field {
width: 20rem;
height: 3.375rem;
background: rgb(10, 30, 54, 0.5);
border-radius: 0.625rem;
}
::v-deep .van-field__body {
width: 20rem;
height: 3.375rem;
background: rgb(10, 30, 54, 0.5);
color: #fff;
border-radius: 0.9688rem;
padding: 1.0938rem 0.9375rem 0.9688rem 1.25rem;
.van-field__right-icon {
padding: 0;
margin-right: 0.625rem;
.van-icon__image {
width: 1.2813rem;
height: 1.375rem;
}
}
}
::v-deep .van-button {
margin-top: 2.6875rem;
width: 20.9375rem;
height: 2.75rem;
border-radius: 1.5625rem;
background: #6a69e9;
}
::v-deep .van-button__text {
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
::v-deep .van-field {
padding: 0;
}
.Box {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
// padding-top: 1.75rem;
.box-form-card {
width: 23.4375rem;
height: 31.9688rem;
// margin-top: 2.375rem;
// background: #fdfefe;
// border-radius: 2.0938rem 2.0938rem 0 0;
// padding: 3.6563rem 0 0 2.25rem;
display: flex;
// justify-content: center;
flex-direction: column;
align-items: center;
.title {
font-weight: 500;
font-size: 1.1563rem;
color: #040404;
line-height: 1.1563rem;
margin-bottom: 1.875rem;
}
.btn {
margin-top: 2.6875rem;
width: 20.9375rem;
height: 2.75rem;
border-radius: 1.5625rem;
color: #fff;
font-size: 0.875rem;
font-weight: 500;
}
.box-form-item {
display: flex;
flex-direction: column;
margin-top: 0.9375rem;
position: relative;
.box-form-item-label {
height: 2.75rem;
display: flex;
align-items: center;
// margin-bottom: 0.5938rem;
font-weight: 500;
font-size: 0.875rem;
line-height: 0.75rem;
color: #fff;
}
}
}
.box-top {
width: 11.4688rem;
height: 11.4688rem;
background: transparent;
border-radius: 50%;
font-weight: 300;
font-size: 2.75rem;
color: #cbcccd;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const webviewUrl = ref('')
onLoad((options) => {
webviewUrl.value = options.url as string
})
</script>
<template>
<web-view :src="webviewUrl"></web-view>
</template>
<style lang="scss" scoped></style>
<script setup lang="ts">
import Navigator from '@/components/navigator/navigator.vue'
import { useCounterStore } from '@/store/store'
import { getBankListApi } from '@/api/bankAccount'
import { submitWithdrawalApi } from '@/api/withdrawal'
import { BankInfoType } from '@/api/bankAccount/indexType'
import { WithdrawalType } from '@/api/withdrawal/indexType'
import { Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { onShow } from '@dcloudio/uni-app'
import { closeToast, showLoadingToast, showSuccessToast, showToast } from 'vant'
import ka from '@/static/image/user/ka.png'
const { t } = useI18n()
const store = useCounterStore()
onShow(() => {
getBankListFn()
})
const bankData: Ref<BankInfoType> = ref({
id: null,
bank_address: '',
bank_card: '',
bank_code: '',
bank_name: '',
shiming_name: '',
bank_num: ''
})
type BankInfoListType = [BankInfoType]
const bankDataList: Ref<BankInfoListType> = ref([])
const checkBank = (item: BankInfoType) => {
bankData.value = item
showCenter.value = false
console.log(111)
}
// 获取银行卡数据
const getBankListFn = async () => {
showLoadingToast({
message: t('toastText.tip1'),
forbidClick: true,
overlay: true,
loadingType: 'spinner'
})
const res = await getBankListApi()
if (res.code === 1) {
bankDataList.value = res.data.user_bankcard
if (res.data.user_bankcard.length) {
bankData.value = res.data.user_bankcard[0]
}
}
closeToast()
console.log(res)
}
const bankNum = () => {
const phoneNumber = bankData.value.bank_num
if (phoneNumber) return phoneNumber.substring(0, 3) + '****' + phoneNumber.substring(phoneNumber.length - 3)
}
const showCenter = ref(false)
const from: Ref<WithdrawalType> = ref({
bankcard_id: '',
money: '',
pass: '',
user_id: store.userId
})
const goPage = (url: string) => {
uni.navigateTo({ url })
}
const sumbitLoading = ref(false)
const sumbit = async () => {
from.value.bankcard_id = bankData.value?.id || null
console.log(from.value.bankcard_id, 'from.value.bankcard_id')
console.log(from.value)
if (from.value.bankcard_id === '' || !from.value.bankcard_id) {
return showToast(t('withdrawal.tip4'))
}
if (from.value.money === '' || !from.value.money) {
return showToast(t('withdrawal.tip5'))
}
if (from.value.pass === '' || !from.value.pass) {
return showToast(t('withdrawal.tip6'))
}
if (from.value.money < 1000) {
return showToast(t('withdrawal.tip7'))
}
sumbitLoading.value = true
const res = await submitWithdrawalApi(from.value)
from.value = {
bankcard_id: '',
money: '',
pass: '',
user_id: store.userId
}
sumbitLoading.value = false
if (res.code === 1) {
showSuccessToast(res.data.msg)
store.getUserInfo()
setTimeout(() => {
uni.switchTab({
url: '/pages/user/user'
})
}, 2000)
}
console.log(res)
}
</script>
<template>
<van-popup v-model:show="showCenter" round class="check-bank-popup">
<view class="check-bank-popup-title">
{{ t('withdrawal.title') }}
</view>
<view v-for="item in bankDataList" :key="item.id" class="twBank" @click="checkBank(item)">
<view class="u-flex">
<view class="">
<view class="u-font-blod">{{ item.bank_num }}</view>
<view class="u-light-color">{{ item.bank_name }}&nbsp;{{ item.shiming_name }} </view>
</view>
</view>
<view class="iiiimg">
<img src="@/static/rigth.png" alt="" />
</view>
</view>
</van-popup>
<Navigator :title="t('user.tixian')" />
<view class="top-money">
<span>{{ t('withdrawal.zhanghuyue') }}</span> {{ Number(store.$state.userInfo?.money).toLocaleString() }}
</view>
<!-- <view class="bank-check-box-title"> {{ t('withdrawal.tixian') }}</view> -->
<view class="box">
<view v-if="bankDataList.length === 0" class="bank-crad" @click="goPage('/subPackages/bankAccount/bankAccount')">
<view style="display: flex; align-items: center">
<img :src="ka" alt="" style="width: 1.3125rem; height: 1.0625rem; margin-right: 0.625rem" />
<view class="bank-crad-left">{{ t('withdrawal.tip3') }}</view>
</view>
<view class="bank-crad-right"><img src="@/static/rigth.png" alt="" /></view>
</view>
<view v-else class="bank-check-box" @click="showCenter = true">
<view class="bank-check-box-left">
<view class="bank-check-box-left-top">
{{ bankData.bank_name }}&nbsp;<span>({{ bankNum() }})</span>
</view>
<view class="bank-check-box-left-bottom">{{ t('withdrawal.chikaren') }}:&nbsp;{{ bankData.shiming_name }}</view>
</view>
<view class="bank-check-box-right">
<img src="@/static/rigth.png" alt="" />
</view>
</view>
<view class="recharge-box">
<view class="recharge-box-title">{{ t('withdrawal.tilingjine') }}</view>
<!-- 允许输入数字,调起带符号的纯数字键盘 -->
<van-field v-model="from.money" type="number" :placeholder="t('withdrawal.tip1')" />
<view class="recharge-box-title a">{{ t('withdrawal.jiaoyimima') }}</view>
<!-- 允许输入数字,调起带符号的纯数字键盘 -->
<van-field v-model="from.pass" type="password" :placeholder="t('withdrawal.tip2')" />
<van-button :loading="sumbitLoading" class="sumbit" @click="sumbit">{{ t('recharge.queren') }}</van-button>
</view>
<view class="tip">{{ t('withdrawal.zhuyishixiang') }}:</view>
<view class="tip1">{{ t('withdrawal.tip7') }}</view>
<view class="tip1">{{ t('withdrawal.tip8') }}</view>
<view class="tip1">{{ t('withdrawal.tip9') }}</view>
<view class="tip1">{{ t('withdrawal.tip10') }}</view>
</view>
</template>
<style lang="scss" scoped>
.bank-crad {
width: 100%;
height: 4.5313rem;
padding: 1.3438rem 2.2188rem 1.1563rem 1.2188rem;
// background: #f9fafb;
display: flex;
justify-content: space-between;
align-items: center;
.bank-crad-left {
text-align: center;
color: #fff;
}
.bank-crad-right {
img {
height: 1.1563rem;
}
}
}
.text {
font-weight: 300;
font-size: 0.75rem;
color: #292828;
margin-left: 1.125rem;
}
.check-bank-popup {
width: 21.875rem;
padding: 1.25rem 1.25rem 3.125rem 1.25rem;
background: #e5f1f9;
.twBank {
padding: 0.9375rem 0.3125rem;
border-radius: 0.4375rem;
margin-top: 0.625rem;
background: #fff;
// background-color: rgba(250, 250, 250, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
.u-flex {
display: flex;
flex-direction: row;
align-items: center;
font-size: 0.875rem;
.u-font-blod {
font-weight: 600;
}
.u-light-color {
color: #919191;
}
}
.iiiimg {
img {
width: 0.75rem;
}
}
}
.check-bank-popup-title {
font-size: 1.125rem;
text-align: center;
}
}
.tip {
margin-top: 0.7813rem;
margin-left: 1.125rem;
// font-weight: 300;
font-size: $uni-font-size-1;
color: #a0a5b0;
}
.tip1 {
font-size: $uni-font-size-1;
margin-left: 1.125rem;
color: #a0a5b0;
}
.bank-check-box {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 4.5313rem;
padding: 1.3438rem 0.9063rem 1.1563rem 1.2188rem;
background: #f9fafb;
.bank-check-box-right {
img {
height: 1.1563rem;
}
}
.bank-check-box-left {
display: flex;
flex-direction: column;
justify-content: space-between;
.bank-check-box-left-top {
font-weight: 0.125rem;
color: #080707;
}
.bank-check-box-left-bottom {
font-weight: 300;
font-size: $uni-font-size-1;
color: #898484;
}
}
}
.bank-check-box-title {
margin-top: 0.7813rem;
margin-left: 1.1875rem;
font-weight: 300;
font-size: 0.8438rem;
color: #080707;
}
.top-money {
width: 20.9063rem;
height: 5.5938rem;
border-radius: 1.25rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: linear-gradient(168deg, #08182b 0.74%, #1b5191 99.61%);
margin: 0.4688rem auto 0;
font-weight: 500;
font-size: 1.375rem;
color: #fff;
span {
font-weight: 300;
// font-size: $uni-font-size-1;
color: #fff;
font-size: 0.75rem;
// margin-bottom: 0.8438rem;
}
}
.box {
margin-top: 1.25rem;
background: linear-gradient(168deg, #08182b 0.74%, #1b5191 99.61%);
border-top-left-radius: 1.25rem;
border-top-right-radius: 1.25rem;
}
.recharge-box {
width: 100%;
// height: 13rem;
// background: #f9fafb;
margin-top: 0.4375rem;
padding: 1.2813rem 1.2188rem 1.0938rem 1.1563rem;
.sumbit {
width: 20rem;
height: 2.75rem;
margin-top: 1.7188rem;
display: flex;
justify-content: center;
align-items: center;
background: #6a69e9;
border-radius: 1.5625rem;
::v-deep .van-button__text {
font-weight: 500;
font-size: 0.875rem;
color: #fff;
}
}
// .money-tag-box {
// width: 100%;
// display: flex;
// flex-wrap: wrap;
// justify-content: space-between;
// margin-top: 1.2188rem;
// .money-tag.active {
// background: #50aff0;
// color: #fbfcfc;
// }
// .money-tag {
// width: 6.3438rem;
// height: 1.5313rem;
// border-radius: 0.75rem;
// border: 0.0625rem solid #50b0f2;
// opacity: 0.59;
//
// font-weight: 500;
// font-size: $uni-font-size-1;
// color: #292828;
// display: flex;
// align-items: center;
// justify-content: center;
// margin-bottom: 0.7188rem;
// }
// }
.van-field {
margin-top: 0.7188rem;
width: 20rem;
height: 3.375rem;
background: rgb(12, 35, 63, 0.5);
border-radius: 0.8125rem;
// border: 0.0625rem solid #50b0f2;
// padding: 0 0 0 0.625rem;
display: flex;
align-items: center;
::v-deep .van-field__control {
line-height: 0;
color: #fff;
}
}
.a {
margin-top: 0.9063rem;
}
.recharge-box-title {
font-weight: 500;
font-size: 0.875rem;
color: #fff;
}
}
</style>
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #00316b;
$uni-color-gray: #f8f8f8;
$uni-color-primary2: #50aff099;
/* 文字基本颜色 */
$uni-text-color: #0e0e0e; //基本色
$uni-text-color-gray: #a5a5a5;
$uni-text-color-red: #DA475A;
$uni-text-color-green: #47B082;
/* 背景颜色 */
$uni-bg-color: #ffffff;
$uni-bg-color-gray: #f8f8f8;
$uni-bg-color-gray2: #f2f4f5;
$uni-bg-color-hover: #f1f1f1; //点击状态颜色
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色
/* 边框颜色 */
$uni-border-color: #c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm: 0.5rem;
$uni-font-size-base: 0.63rem;
$uni-font-size-lg: 0.75rem;
$uni-font-size-1: 0.75rem;
$uni-font-size-2: 0.8125rem;
/* 图片尺寸 */
$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: 10px;
$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;
\ No newline at end of file
// eslint-disable-next-line camelcase
// 线上
// const baseURL = 'https://adminjdhgjhs.jpinsoo.com/api'
// const baseURL = 'https://web.gsc-capital.jp/api'
// const baseURL = '/api.php'
// 测试
const baseURL = '/api.php'
export default {
/* 服务器地址 */
baseURL
}
import axios from 'axios'
import { showFailToast } from 'vant'
// 创建axios实例
const service = axios.create({
timeout: 5000 // 请求超时时间
})
// 请求拦截器
service.interceptors.request.use(
(config) => {
console.log(uni.getStorageSync('locale'), "uni.getStorageSync('locale')")
if (uni.getStorageSync('locale') === '' || !uni.getStorageSync('locale')) {
uni.setStorageSync('locale', 'jp')
}
if (config?.params) {
config.params.lang = uni.getStorageSync('locale')
} else {
config.params = { lang: uni.getStorageSync('locale') }
}
const token = uni.getStorageSync('token')
config.headers.token = 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 !== 1) {
showFailToast(res.msg)
}
return res
},
(error) => {
const res = error.response.data
// token 过期处理
if (res.code === 401) {
console.log('token 过期处理')
// 清除token 以及用户信息
uni.setStorageSync('token', null)
uni.setStorageSync('userId', null)
uni.setStorageSync('userInfo', null)
// 提示用户
// showFailToast('ユーザー情報が無効になりました。再ログインしてください')
// uni.showToast({
// title: 'ユーザー情報が無効になりました。再ログインしてください',
// icon: 'none'
// })
setTimeout(() => {
// 跳转登录
uni.navigateTo({
url: '/subPackages/login/login'
})
}, 1500)
return Promise.reject(error)
}
// 响应错误处理
console.log('err' + error) // for debug
// showFailToast(error.msg || 'error')
showFailToast({
duration: 2000,
message: error.msg || 'error'
})
// uni.showToast({
// title: error.msg || 'error',
// icon: 'none'
// })
return Promise.reject(error)
}
)
export default service
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{vue,js,ts,jsx,tsx}'],
theme: {
colors: {
primary: '#50aff0'
},
fontSize: {
mini: '0.38rem',
sm: '0.5rem',
base: '0.63rem',
lg: '0.75rem'
},
extend: {
colors: {
user: '#638daa'
},
flex: {
2: '2 2 0%'
}
},
textColor: {
primary: '#0e0e0e',
grey: '#A5A5A5',
red: '#EA3522',
green: '#31CC43'
}
},
plugins: []
}
{
"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, // 端口号
hmr: true,
open: false, // 启动后是否自动打开浏览器 server: {
proxy: {
'^/api.php': {
target: 'http://129.226.60.49:9906/', // 目标源,目标服务器,真实请求地址
changeOrigin: true, // 支持跨域
rewrite: (path) => path.replace(/^\/api/, '/api') // 重写真实路径,替换/api
}
}
},
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
css: {
preprocessorOptions: {
scss: {
additionalData: `
@use "@/style/output.scss";
`,
silenceDeprecations: ['legacy-js-api']
}
}
}
})
This source diff could not be displayed because it is too large. You can view the blob instead.
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