Commit 594a1396 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' : '') + '" />'
)
document.addEventListener('dblclick', function (e) {
e.preventDefault() // 阻止默认双击事件
})
</script>
<title>RADIX</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="RADIX" />
<meta name="google" content="notranslate" />
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="./src/static/app-icon.png" />
<!-- Android Chrome Icons -->
<link rel="icon" type="image/png" sizes="192x192" href="./src/static/app-icon.png" />
<link rel="icon" type="image/png" sizes="512x512" href="./src/static/app-icon.png" />
<!-- Windows Tiles -->
<meta name="msapplication-TileImage" content="./src/static/app-icon.png" />
<meta name="msapplication-TileColor" content="#ffffff" />
<!-- General Icons -->
<link rel="icon" type="image/png" sizes="32x32" href="./src/static/app-icon.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./src/static/app-icon.png" />
<link rel="icon" type="image/x-icon" href="./src/static/app-icon.png" />
<link rel="icon" href="./src/static/app-icon.png" />
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "RADIX",
"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'
import { onMounted } from 'vue'
const store = useCounterStore()
// store.getSystemInfo()
// store.getUserInfo()
const i = 'orientationchange' in window ? 'orientationchange' : 'resize'
const setViewHeight = () => {
const windowVH = window.innerHeight / 100
document.documentElement.style.setProperty('--vh', windowVH + 'px')
}
document.addEventListener('DOMContentLoaded', setViewHeight)
window.addEventListener(i, setViewHeight)
onLaunch(() => {
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)
next()
})
router.afterEach(() => {
// setTimeout(() => show(), 50)
})
})
onMounted(() => {
// setTimeout(() => {
// // eslint-disable-next-line no-unused-expressions
// document.body.scrollHeight // 触发页面重新计算高度
// }, 100)
// const viewportWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
// const viewportHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
// console.log('Viewport Width: ' + viewportWidth)
// console.log('Viewport Height: ' + viewportHeight)
// const documentHeight = document.documentElement.scrollHeight || document.body.scrollHeight
// console.log('Document Width: ' + documentWidth)
// function getViewportHeight() {
// const vh = window.innerHeight
// const vhCalc = (window.innerWidth / document.documentElement.clientWidth) * 100
// return (window.innerHeight / vhCalc) * vh
// }
// const viewportHeight = getViewportHeight()
// showToast('document.body.clientHeight ' + document.body.clientHeight)
store.pageHeight = document.body.clientHeight + 'px'
document.body.style.height = document.body.clientHeight + 'px'
// showToast('document.body.clientHeight ' + document.body.style.height)
// console.log('Calculated Viewport height:', viewportHeight)
// console.log('Document Height: ' + documentHeight)
})
onShow(() => {})
onHide(() => {})
// const hide = (callback) => {
// const classList = document.querySelector('uni-page').classList
// classList.add('animation-before', 'animation-leave')
// classListNaNpxove('animation-show')
// setTimeout(() => {
// classListNaNpxove('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(() => {
// classListNaNpxove('animation-before', 'animation-after', 'animation-enter')
// }, 300)
// }, 20)
// }
</script>
<style lang="scss">
html,
body {
height: 100%;
overflow: auto;
-webkit-overflow-scrolling: touch; /* 启用惯性滚动 */
}
.hh2 {
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.hh {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
}
.uni-input-input {
color: $color-black;
}
.tabbar {
border-radius: 0.625rem 0.625rem 0px 0px;
// box-shadow: 0px 0px 5px 2px #f4f4f4;
}
body {
background: #fff;
// fill: linear-gradient(191deg, #f3e0eb 0.38%, #f2e7fd 10.66%, #fff 26.2%);
}
::v-deep .uni-toast__icon {
margin: 0.625rem auto 0 !important;
}
::v-deep .van-loading__line:before {
color: #fff !important;
background: #fff !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: #08182b;
color: #fff !important;
font-size: 1rem;
margin-right: 0.625rem;
}
.uni-modal__btn_primary {
width: 8.4375rem;
height: 3.0625rem;
border-radius: 1.5625rem;
background: #ee2560;
font-size: 1rem;
color: #fff !important;
}
}
.up {
color: $color-red !important;
}
.down {
color: $color-green !important;
}
.ping {
color: $uni-text-color;
}
.red {
color: $color-red !important;
}
.green {
color: $color-green !important;
}
.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 function getLotteryApi() {
return request({
url: `${config.baseURL}/index/lottery_prize`,
method: 'get'
})
}
// 抽奖次数
export function getLotteryCountApi() {
return request({
url: `${config.baseURL}/index/lottery_count`,
method: 'get'
})
}
// 抽奖结果
export function getLotteryDrawApi() {
return request({
url: `${config.baseURL}/index/lottery_draw`,
method: 'get'
})
}
// 抽奖历史
export function getLotteryHistoryApi() {
return request({
url: `${config.baseURL}/index/lottery_history`,
method: 'get'
})
}
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 = (timestemp: number, n: string = '-') => {
const date = new Date(timestemp)
const year = date.getFullYear()
const month = date.getMonth() - 1 < 10 ? `0${date.getMonth() - 1}` : date.getMonth() - 1
const day = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()
const hour = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours()
const minute = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes()
return `${year}${n}${month}${n}${day} ${hour}:${minute}`
}
// function convertBeijingToTokyo(beijingDate) {
// const tokyoTime = new Date(beijingDate.getTime() + 1 * 60 * 60 * 1000)
// return tokyoTime
// }
// export function timestampToDate3(date) {
// convertBeijingToTokyo(new Data)
// }
export function timestampToDate2(timestamp: number) {
const date = new Date(timestamp) // 时间戳转换成Date对象
// console.log(convertBeijingToTokyo(date), 'convertBeijingToTokyo(date)')
// date = convertBeijingToTokyo(date)
const year = date.getFullYear() // 获取年份
let month = date.getMonth() + 1 // 获取月份,需要+1因为月份从0开始
let day = date.getDate() // 获取日
let hours = date.getHours() // 获取小时
let minutes = date.getMinutes() // 获取分钟
let seconds = date.getSeconds() // 获取秒钟
// 格式化月份、日期、小时、分钟和秒
month = month < 10 ? '0' + month : month
day = day < 10 ? '0' + day : day
hours = hours < 10 ? '0' + hours : hours
minutes = minutes < 10 ? '0' + minutes : minutes
seconds = seconds < 10 ? '0' + seconds : seconds
// 组合成日期时间字符串
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
}
// 获取指定时区的时间戳;因为目前还无法直接修改date对象的时区,所以使用时间戳方式返回
function getZoneTime(date, zone) {
const offset_GMT = date.getTimezoneOffset()
const current = date.getTime()
const targetDate = new Date(current + offset_GMT * 60 * 1000 + zone * 60 * 60 * 1000)
return targetDate.getTime()
}
export function timestampToDate3(timestamp: number) {
let date = new Date(timestamp) // 时间戳转换成Date对象
// console.log(convertBeijingToTokyo(date), 'convertBeijingToTokyo(date)')
date = new Date(getZoneTime(date, 9))
const year = date.getFullYear() // 获取年份
let month = date.getMonth() + 1 // 获取月份,需要+1因为月份从0开始
let day = date.getDate() // 获取日
let hours = date.getHours() // 获取小时
let minutes = date.getMinutes() // 获取分钟
let seconds = date.getSeconds() // 获取秒钟
// 格式化月份、日期、小时、分钟和秒
month = month < 10 ? '0' + month : month
day = day < 10 ? '0' + day : day
hours = hours < 10 ? '0' + hours : hours
minutes = minutes < 10 ? '0' + minutes : minutes
seconds = seconds < 10 ? '0' + seconds : seconds
// 组合成日期时间字符串
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
}
// 获取股票颜色
export const getColor = (item: any, type: boolean = false) => {
if (type && item.zhangdiebaifenbi > 0) {
return 'up rotate'
}
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
}
// 全角转半角
export const toHalfWidth = (str: any) => {
return (
str
.replace(/[!-~]/g, function (char) {
return String.fromCharCode(char.charCodeAt(0) - 0xfee0)
})
.replace(/[a-zA-Z0-9]/g, function (char) {
return String.fromCharCode(char.charCodeAt(0) - 0xfee0)
})
// eslint-disable-next-line no-irregular-whitespace
.replace(/ /g, ' ')
) // 处理全角空格
}
// 全角转半角 整数
export const toHalfWidthnumber = (str: number) => {
return Number(
str.toString().replace(/[\uff10-\uff19]/g, function (c) {
return String.fromCharCode(c.charCodeAt(0) - 0xfee0)
})
)
}
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://ws.radixws.com/'
})
}
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" :class="item.max" :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}index2.png`,
selectIcon: `${url}index_select2.png`,
text: text1,
id: 0
},
{
path: '/pages/market/market',
icon: `${url}market2.png`,
selectIcon: `${url}market_select2.png`,
text: text2,
max: 'max',
id: 1
},
{
path: '/pages/jiaoyi/jiaoyi',
icon: `${url}jiaoyi2.png`,
selectIcon: `${url}jiaoyi_select2.png`,
text: text3,
max: 'max',
id: 2
},
{
path: '/pages/record/record',
icon: `${url}record2.png`,
selectIcon: `${url}record_select2.png`,
text: text4,
id: 3
},
{
path: '/pages/user/user',
icon: `${url}user2.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: #fafafa;
display: flex;
justify-content: space-around;
position: fixed;
z-index: 1000;
bottom: 0;
left: 0;
// border-top: 0.03rem solid #1b3224;
// box-shadow: ;
box-shadow: 0 0.53rem 0.85rem 0.13rem #00000060;
border-radius: 0 0 0 0;
.bar {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.card {
width: 3.59rem;
border-radius: 0.63rem;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.max {
padding: 0 !important;
}
.image {
width: 1.88rem;
height: 1.88rem;
padding: 0.22rem;
}
.text {
font-size: 0.65rem;
color: #707070;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
}
}
.active {
.text {
color: $color-primary;
}
}
}
</style>
<template>
<view class="navigator">
<slot name="left"></slot>
<view v-if="porps.isShowBack" class="back" @click="goBack">
<!-- <image src="@/static/arrow-left.png"></image> -->
<van-icon name="arrow-left" color="#222" size="1.25rem" :style="arrowStyle"></van-icon>
</view>
<view class="title" style="display: flex; align-items: center; justify-content: center; width: 70%">
<view class="title hh" :style="style">{{ porps.title }}</view>
<view v-if="porps.isdma !== ''" :style="{ width: '2.8125rem', color: '#222' }">{{ porps.isdma }}</view>
</view>
<slot name="right"></slot>
</view>
</template>
<script lang="ts" setup>
const porps = defineProps({
title: {
type: String,
default: ''
},
isShowBack: {
type: Boolean,
default: true
},
isdma: {
type: String,
default: ''
},
style: {
type: Object,
default: () => {}
},
arrowStyle: {
type: Object,
default: () => {}
}
})
const goBack = () => {
const url = window.location.href
if (url.indexOf('pages') >= 0) {
uni.navigateBack({})
} else {
history.go(-1)
}
}
</script>
<style lang="scss" scoped>
.navigator {
height: 3.13rem;
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: $color-black;
font-weight: 500;
text-align: center;
}
</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="nodataWrap">
<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>
</view>
</template>
<style lang="scss" scoped>
.nodataWrap {
overflow: hidden;
}
.box {
margin: 5rem auto 0;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.img {
width: 15.63rem;
height: 15.63rem;
}
.title {
color: #a6a6a6;
font-size: 0.75rem;
margin-top: 1.25rem;
position: relative;
bottom: 1.88rem;
}
}
</style>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
// import { showToast } from 'vant'
const { t } = useI18n()
// const searchValue = ref('')
// const onSearch = () => {}
// const onCancel = () => showToast('取消')
const goPage = () => {
uni.navigateTo({
url: '/subPackages/search/search'
})
}
</script>
<template>
<div class="search">
<view class="nav-box">
<view class="input_wrap" @click="goPage">
<image src="/static/image/index/search.png" class="search-icon"></image>
<span>{{ t('search.tip3') }}</span>
</view>
</view>
</div>
</template>
<style lang="scss" scoped>
.uni-input-placeholder {
font-size: 0.82rem !important;
}
.search {
overflow: hidden;
}
.nav-box {
top: 0;
left: 0;
// width: 100%;
height: 3.125rem;
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
padding: 0.53rem 0;
margin: 0.53rem 0.94rem;
.input_wrap {
width: 14.375rem;
flex: 1;
height: 2.75rem;
border-radius: 1.25rem;
background: #f9f9f9;
color: #fff;
padding: 0 0.94rem;
font-size: 0.82rem;
display: flex;
align-items: center;
gap: 0.5rem;
.search-icon {
width: 1rem;
height: 1rem;
}
span {
color: #aeaeae;
}
}
.search-img {
margin-left: 0.44rem;
width: 0.875rem;
height: 0.875rem;
}
::v-deep.uni-input-input {
color: #b3b3b3 !important;
font-size: 0.82rem !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: '驳回原因,您的实名认证已被驳回,因为',
tip16: '图片上传中。。。'
},
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: '金额:10,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: '返回',
yi: '亿'
},
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: '交易股数',
shuliang1: '购买数量',
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: '可貸300万日元',
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: '返回首頁',
tip38: '单笔信用额度',
tip39: '50-300',
tip40: '万'
},
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'
},
kefu: {
title: '客服'
}
}
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',
tip16: 'The picture is being uploaded...'
},
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',
yi: '100 million'
},
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',
shuliang1: 'Buying Quantity',
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: 'piece'
},
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 amount of 3 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',
tip38: 'Single credit limit',
tip39: '50-300',
tip40: 'Ten thousand'
},
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: "Don't have an account?",
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'
},
kefu: {
title: 'customer service'
}
}
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',
tip16: "L'image est en cours de téléchargement. . ."
},
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',
yi: '100 millions'
},
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',
shuliang1: "Quantité d'achat "
},
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: 'pièce'
},
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: 'Montant du prêt de 3 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",
tip38: 'Limite de crédit unique',
tip39: '50-300',
tip40: 'Dix mille'
},
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: "Vous n'avez pas de compte ?",
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'
},
kefu: {
title: 'service client'
}
}
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: 'IDカードの名前を入力してください',
tip10: 'IDカード番号',
tip11: 'IDカード番号を入力してください',
tip12: '身分証明書の前面をアップロードしてください',
tip13: '身分証明書の裏面をアップロードしてください',
tip14: '送信',
tip15: '拒否の理由、ご本人確認が拒否されました',
tip16: '写真をアップロード中です。 。 。'
},
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万円から',
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: '戻る',
yi: '億'
},
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: '売却数量',
shuliang1: '買い数量',
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: '融資額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: '情報が不足しています',
tip36: '顧客の服',
tip37: 'ホームへ戻る',
tip38: '単一のクレジット限度額',
tip39: '50-300',
tip40: '万'
},
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桁以内に控えてください'
},
kefu: {
title: 'カスタマーサービス'
}
}
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',
tip16: 'La imagen se está cargando. . .'
},
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',
yi: '100 millones'
},
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',
shuliang1: 'Cantidad de compra'
},
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: 'pieza'
},
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: 'Monto del préstamo de 3 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',
tip38: 'Límite de crédito único',
tip39: '50-300',
tip40: 'Diez mil'
},
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: '¿No tienes una cuenta?',
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'
},
kefu: {
title: 'servicio al cliente'
}
}
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": "/japan7/"
}
}
}
{
"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",
"height": "70px",
"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": "RADIX",
"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" :style="{ height: height }"></view>
</template>
<script lang="ts" setup>
import { init, dispose } from 'klinecharts'
import { onMounted, onUnmounted, watch } from 'vue'
const props = defineProps({
value: {
type: Array,
default: () => []
},
height: {
type: String,
default: '154px'
}
})
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'
}
},
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,
// x轴分割文字
tickText: {
color: '#000'
}
},
// y轴
yAxis: {
// x轴分割文字
tickText: {
color: '#000'
}
}
}
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">
<!-- 检索栏 -->
<view class="search">
<view class="search-box hh" @click="goPage('/subPackages/search/search')">
<image src="/static/image/index/search.png" class="search-icon"></image>
<span>{{ t('search.tip3') }}</span>
</view>
<van-badge :dot="dot" style="display: flex">
<image src="/static/image/index/tishi.png" class="xiaoxi" mode="widthFix" @click="goPage('/subPackages/message/message')"></image>
</van-badge>
</view>
<!-- 主体 -->
<view class="content">
<!-- 股票 -->
<div class="card">
<div class="top">
<div class="left">
<div class="title" @click="openSelect">
<span class="name">{{ activeGupiao?.name || '' }}</span>
<van-icon name="arrow-down" color="#141414"></van-icon>
</div>
<div class="price" :style="{ color: getColor(activeGupiao) == 'up' ? '#EA3522' : '#31CC43' }">{{ activeGupiao.price }}</div>
<div class="flex">
<div class="info">
<div class="label" :style="{ color: getColor(activeGupiao) == 'up' ? '#EA3522' : '#31CC43' }">{{ activeGupiao?.zhangdieshu }}</div>
<div class="rate" :style="{ color: getColor(activeGupiao) == 'up' ? '#EA3522' : '#31CC43' }">{{ `(${activeGupiao?.zhangdiebaifenbi})%` }}</div>
</div>
</div>
</div>
<div class="right">
<div class="btn" @click="goPage('/subPackages/index/dadan/dadan')">
{{ t('dadan.title') }}
</div>
</div>
</div>
<div class="bottom">
<GupiaoChart :value="chartValue" height="9.25rem" />
</div>
<view class="buttonList">
<view v-for="(item, index) in buttonList" :key="index" class="button" @click="goPage2(item)">
<div class="image-box">
<image :src="item.icon"></image>
</div>
<view class="text">{{ item.label }}</view>
</view>
</view>
</div>
<view class="scroll_list">
<view class="title-top" @click="switchTab('/pages/market/market')">
<view class="title h">{{ t('index.hot') }}</view>
<view class="title-right">{{ t('index.tip2') }} <van-icon name="arrow"></van-icon></view>
</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">
<view class="name">{{ item.name }}</view
>&nbsp;&nbsp;
<view class="daima">{{ item.shuzidaima }}</view>
</view>
<div class="bottom">
<view>
<view class="text-primary text-lg">
<span class="price" :class="getColor(item)">{{ item.price }}</span>
<span v-if="item.zhangdiebaifenbi === 0"> - </span>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
</view>
<view class="flex items-center justify-between mt-[0.28rem]">
<view class="text-base text-right" style="font-size: 0.69rem" :class="getColor(item)">{{ item.zhangdieshu }}</view>
<view class="text-base text-right" style="font-size: 0.69rem" :class="getColor(item)">{{ item.zhangdiebaifenbi }}%</view>
</view>
</view>
<div class="image">
<image :src="item.zhangdiebaifenbi > 0 ? up : item.zhangdiebaifenbi <= 0 ? down : ''" mode="widthFix" />
</div>
</div>
</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 { 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 { goPage, getColor, switchTab } from '@/common/common'
import up from '@/static/image/index/up2.png'
import down from '@/static/image/index/down2.png'
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 goPage2 = (e) => {
if (e.type === 'kefu') {
goWeb()
} else {
goPage(e.url)
}
}
let inId: any = null
onShow(() => {
getHotGupiao()
getUserMessage()
getCzhiurlFn()
inId = setInterval(() => {
// 获取热门股票
getHotGupiao()
getUserMessage()
}, 10000)
})
onHide(() => {
console.log(inId, 'iddd')
clearInterval(inId)
})
const buttonList = [
{ label: t('index.button1'), icon: '/static/image/index/logo1.png', url: '/subPackages/index/ipo/ipo' },
{ label: t('hongli.title'), icon: '/static/image/index/logo2.png', url: '/subPackages/index/hongli/hongli' },
{ label: t('index.button4'), icon: '/static/image/index/logo3.png', url: '/subPackages/transactionLog/transactionLog?isLs=1' },
{ label: t('rongzi.title'), icon: '/static/image/index/logo4.png', url: '/subPackages/index/rongzi/rongzi' }
]
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()
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 {
overflow: hidden;
height: calc(var(--vh) * 100 - 4.375rem);
}
.h {
position: relative;
&::before {
content: '';
position: absolute;
width: 0%;
height: 0.19rem;
background: #0df69e;
border-radius: 0.25rem;
bottom: -0.31rem;
opacity: 0;
transition: all 1s;
}
&:hover {
&::before {
width: 100%;
opacity: 1;
}
}
}
.search {
width: 100%;
height: 3.125rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.625rem 0.9375rem 0.625rem 0.9375rem;
gap: 1.25rem;
margin: 0.53rem 0;
.touxian {
width: 1.7813rem;
height: 1.7813rem;
border-radius: 50%;
margin-right: 0.9375rem;
}
.search-box {
width: 14.375rem;
flex: 1;
height: 2.75rem;
border-radius: 1.25rem;
background: #f9f9f9;
line-height: 2.75rem;
padding: 0 0.94rem;
font-size: 0.9375rem;
display: flex;
align-items: center;
gap: 0.5rem;
.search-icon {
width: 1rem;
height: 1rem;
}
span {
color: #aeaeae;
font-size: 0.82rem;
}
}
.kefu {
width: 1rem;
height: 1rem;
}
.xiaoxi {
width: 1.13rem;
}
}
.content {
height: calc(var(--vh) * 100 - 4.38rem - 3.125rem - 1.06rem);
overflow-y: auto;
.card {
margin: 0 0.94rem 1.25rem;
border-radius: 0.94rem;
padding: 1rem 0;
> div {
flex: 1;
}
.top {
padding: 0 1rem;
display: flex;
justify-content: space-between;
.flex {
display: flex;
justify-content: space-between;
align-items: center;
}
.title {
font-size: 0.81rem;
font-weight: bold;
// background: $color-primary;
border-radius: 0.55rem;
border: 0.03rem solid #141414;
padding: 0.13rem 0.6rem;
display: flex;
align-items: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
justify-content: space-between;
span {
color: $color-black;
margin-right: 0.64rem;
}
}
.name {
max-width: 8rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.price {
font-size: 2.19rem;
font-weight: bold;
}
.info {
display: flex;
gap: 0.31rem;
align-items: center;
}
.rate {
padding: 0.19rem;
border-radius: 0.31rem;
font-size: 0.94rem;
}
.label {
font-size: 0.94rem;
}
.btn {
background: $color-primary;
border-radius: 0.3rem;
color: #fff;
font-size: 0.94rem;
width: 6.5rem;
height: 1.88rem;
display: flex;
justify-content: center;
align-items: center;
}
}
.bottom {
padding: 0 1rem;
}
}
.buttonList {
margin: 1.25rem 0 0;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
gap: 0.63rem 0;
.button {
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 25%;
}
.image-box {
width: 3.75rem;
height: 3.75rem;
background: $color-primary;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
image {
width: 1.81rem;
height: 1.81rem;
}
.text {
color: $color-black;
margin-top: 0.44rem;
font-size: 0.75rem;
width: 100%;
text-align: center;
}
}
.scroll_list {
width: 100%;
padding: 0.3rem 0.9375rem 1.3rem;
.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: 0.94rem;
margin-bottom: 0.625rem;
background: #f8fafc;
box-shadow: 0rem 0rem 0.38rem 0rem rgba(0, 0, 0, 0.2);
.price {
font-size: 1.0625rem;
font-weight: 500;
}
.name {
color: $color-black;
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: $color-black;
font-size: 0.875rem;
font-weight: 500;
}
}
.bottom {
display: flex;
justify-content: space-between;
image {
width: 2.94rem;
}
}
}
.title-top {
display: flex;
align-items: center;
justify-content: space-between;
}
.title {
color: $color-black;
font-size: 0.875rem;
font-weight: 400;
}
.title-right {
display: flex;
align-items: center;
color: $color-black;
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 {
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;
}
}
}
}
}
.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')">
<template #right>
<van-badge :dot="dot" style="position: absolute; top: 1.0313rem; right: 0.9375rem">
<image src="/static/image/index/tishi.png" class="xiaoxi" mode="widthFix" @click="goPage('/subPackages/message/message')"></image>
</van-badge>
</template>
</Navigator>
</view>
<div class="container">
<div class="wrap">
<view id="button_wrap" class="button_wrap">
<view class="button" :class="{ active: pageType === 0 }" @click="changePageType(0)">{{ t('jiaoyi.weishixiansunyi') }}</view>
<view class="button" :class="{ active: pageType === 1 }" @click="changePageType(1)">{{ t('jiaoyi.yishixiansunyi') }}</view>
<view class="button" :class="{ active: pageType === 2 }" @click="changePageType(2)">{{ t('jiaoyi.sunyiheji3') }}</view>
</view>
<view class="content" :style="{ height: `calc(${store.pageHeight} - 11.1rem )` }">
<view class="gupiao_list">
<view v-show="pageType === 0">
<NotData v-if="!weishixianList.length" />
<view v-for="(item, index) in weishixianList" :key="index" class="gupiao1" @click="goPage(`/subPackages/jiaoyi/jiaoyiDetail/jiaoyiDetail?id=${item.id}&ismai=1`)">
<div class="head">
<view class="icon_primary">{{ getStatus(item) }}</view>
<view class="tag" :class="item.fangxiang_data === '1' ? 'red_tag' : 'green_tag'">{{ item.fangxiang_data === '1' ? t('jiaoyi.zhang') : t('jiaoyi.die') }}</view>
<div class="icon_wrap">
<van-icon name="arrow" color="#afafaf"></van-icon>
</div>
</div>
<div class="info">
<div class="left">
<div class="title">{{ item?.product?.name }}</div>
<div class="daima">{{ item?.product?.shuzidaima }}</div>
</div>
<div class="right">
<div class="price">
<view class="label">{{ t('jiaoyi.xianjia') }}:</view>
<view class="value" :class="{ red: item.yingkui > 0, green: item.yingkui <= 0 }">{{ qfw(item?.product?.price) }}</view>
</div>
</div>
</div>
<div class="bottom">
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.chigushu') }}</view>
<view class="value">{{ item.shuliang }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.xianzaizongjia') }}</view>
<view class="value">{{ qfw(item.shizhi) }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.goumaijiage') }}</view>
<view class="value">{{ qfw(item.price) }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.yugusunyi') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ changeMoney(item?.yingkui) }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.goumaizongjia') }}</view>
<view class="value">{{ qfw(((item.price * item.shuliang) / Number(item.ganggan_ratio)).toFixed(1)) }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.sunyilv') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ item?.yisun }}</view>
</div>
</div>
<view v-if="item.status !== '4'" class="button" @click.stop="openSell(item)">{{ t('jiaoyi.maichu') }}</view>
<view v-if="item.status === '4'" class="button" @click.stop="openCancel(item)">{{ t('jiaoyi.chedan') }}</view>
</div>
</view>
</view>
<view v-show="pageType === 1">
<NotData v-if="!yishixianList.length" />
<view v-for="(item, index) in yishixianList" :key="index" class="gupiao1" @click="goPage(`/subPackages/jiaoyi/jiaoyiDetail/jiaoyiDetail?id=${item.id}&ismai=0`)">
<div class="head">
<view class="icon_green">{{ getStatus(item) }}</view>
<view class="tag" :class="item.fangxiang_data === '1' ? 'red_tag' : 'green_tag'">{{ item.fangxiang_data === '1' ? t('jiaoyi.zhang') : t('jiaoyi.die') }}</view>
<div class="icon_wrap">
<van-icon name="arrow" color="#afafaf"></van-icon>
</div>
</div>
<div class="info">
<div class="left">
<div class="title">{{ item?.product?.name }}</div>
<div class="daima">{{ item?.product?.shuzidaima }}</div>
</div>
<div class="right">
<div class="price">
<view class="label">{{ t('jiaoyi.xianzaijiage') }}:</view>
<view class="value" :class="{ red: item.yingkui > 0, green: item.yingkui <= 0 }">{{ qfw(item?.sellprice) }}</view>
</div>
</div>
</div>
<div class="bottom">
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.chigushu') }}</view>
<view class="value">{{ item.shuliang }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.xianzaizongjia') }}</view>
<view class="value">{{ qfw(item.shizhi) }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.goumaijiage') }}</view>
<view class="value">{{ qfw(item.price) }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.yugusunyi2') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ changeMoney(item?.yingkui) }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.goumaizongjia') }}</view>
<view class="value">{{ qfw(((item.price * item.shuliang) / Number(item.ganggan_ratio)).toFixed(1)) }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.sunyilv') }}</view>
<view class="value" :class="Number(item?.yingkui) > 0 ? 'txt-red' : 'txt-green'">{{ item?.yisun }}</view>
</div>
</div>
</div>
</view>
</view>
<view v-show="pageType === 2">
<NotData v-if="!apply.length" />
<view v-for="(item, index) in apply" :key="index" class="gupiao1 gupiao2">
<div class="info" style="margin-top: 0">
<div class="left">
<div class="title">{{ item?.product?.name }}</div>
<div class="daima">{{ item?.product?.shuzidaima }}</div>
</div>
<div class="right head">
<view class="icon_green2">{{ getText(item) }}</view>
</div>
</div>
<div class="bottom">
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.jiage') }}</view>
<view class="value">{{ changeMoney(item.price) }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.zhognqianshuliang') }}</view>
<view class="value">{{ item.zhongqianshu }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.shenqingliang') }}</view>
<view class="value">{{ item.shengoushuliang }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.renjiaogushu') }}</view>
<view class="value">{{ item.renjiaonum || 0 }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.chouqianri') }}</view>
<view class="value">{{ item?.product?.chouqiandate }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.txt1') }}</view>
<view class="value">{{ changeMoney(item.yingrenjiao) }}</view>
</div>
</div>
<div class="row">
<div class="flex">
<view class="label">{{ t('jiaoyi.faquanri') }}</view>
<view class="value">{{ item?.product?.faquan_date }}</view>
</div>
<div class="flex">
<view class="label">{{ t('jiaoyi.txt2') }}</view>
<view class="value">{{ changeMoney(item.yirenjiao) }}</view>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</div>
</div>
<CustomTabbar :id="2" />
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<view class="title">{{ t('jiaoyi.tip6') }}</view>
<view class="title2">{{ windowInfo }}</view>
<div class="button_group">
<view class="button cancel" @click="gupiaoWindowShow = false">{{ t('jiaoyi.tip8') }}</view>
<div class="button" @click="windowConfirm">{{ t('jiaoyi.tip9') }}</div>
</div>
<image class="close" src="/static/close.png" @click="gupiaoWindowShow = false"></image>
</van-popup>
</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, onMounted, ref } from 'vue'
import { showLoadingToast, showToast } from 'vant'
import { getUserMessageApi } from '@/api/message'
const { t } = useI18n()
// 页面基础配置
const store = useCounterStore()
console.log(store)
const gupiaoWindowShow = ref(false)
const windowOptions = {
position: 'bottom',
'close-on-click-overlay': true,
'safe-area-inset-bottom': true,
round: true
}
onLoad(async () => {
await getJiaoyiList()
InitChart()
})
const butth = ref('')
onMounted(() => {
butth.value = getH('button_wrap')
})
const getH = (id) => {
const el = document.getElementById(id)
return getComputedStyle(el).height
}
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 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()
getUserMessage()
id = setInterval(() => {
getJiaoyiList()
getUserMessage()
}, 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 windowType = ref('sell')
const windowInfo = ref('')
const windowId = ref('')
// 卖出
const openSell = (item) => {
windowId.value = item.id
windowType.value = 'sell'
windowInfo.value = t('jiaoyi.tip7')
gupiaoWindowShow.value = true
}
const openCancel = (item) => {
windowId.value = item.id
windowType.value = 'cancel'
windowInfo.value = t('jiaoyi.tip10')
gupiaoWindowShow.value = true
}
const windowConfirm = async () => {
showLoadingToast({ forbidClick: true, duration: 0 })
gupiaoWindowShow.value = false
if (windowType.value === 'sell') {
const res = await sellGupiaoApi({ id: windowId.value, type: '1' })
getUserMoney()
showToast({
message: res.data.msg,
duration: 2000
})
getJiaoyiList()
}
// 撤单
else {
const res = await cancelOrdeApi({ id: windowId.value, 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: $color-green !important;
}
.txt-red {
color: $color-red !important;
}
.text-primary {
color: #fff;
}
.xiaoxi {
width: 1.13rem;
// padding: 0.1rem;
}
.container {
padding: 1rem 0.63rem 0;
}
.header {
.card {
height: 3.75rem;
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 {
height: 2.13rem;
margin: 0 0.31rem 0.5rem;
display: flex;
justify-content: space-around;
gap: 0.5rem;
.button {
display: flex;
align-items: center;
justify-content: center;
width: 6.875rem;
padding: 0.5rem;
text-align: center;
font-size: 0.875rem;
font-weight: 500;
border-radius: 0.5rem;
border: 0.05rem solid $color-primary;
color: $color-black;
}
.active {
background-color: $color-primary;
color: #fff;
font-weight: 500;
}
}
.content {
overflow-y: auto;
border-top-left-radius: 1.25rem;
border-top-right-radius: 1.25rem;
.gupiao_list {
padding: 0 0.63rem 1rem;
.icon {
background: #0575e6;
padding: 0.14rem 0.44rem;
border-radius: 0.31rem;
color: #fff;
margin-left: 1rem;
white-space: nowrap;
}
.icon_primary {
background: $uni-color-primary;
padding: 0.25rem 0.63rem;
width: 6.25rem;
font-size: $uni-font-size-lg;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
background: linear-gradient(90deg, #b1b5ba50 0%, rgba(177, 181, 186, 0) 100%);
color: $color-red;
}
.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;
}
.gupiao1 {
border-bottom: 0.05rem solid #ffffff50;
padding: 0.94rem 0 0.38rem;
background: #fafafa;
box-shadow: 0rem 0.13rem 0.19rem 0rem rgba(0, 0, 0, 0.05);
border-bottom: 0.06rem solid rgba(20, 20, 20, 0.14);
margin-bottom: 0.31rem;
border-radius: 0.63rem;
.head {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1.25rem;
.icon_green {
background: linear-gradient(90deg, #b1b5ba50 0%, rgba(177, 181, 186, 0) 100%);
width: 6.25rem;
color: $color-green;
padding: 0.25rem 0.63rem;
font-size: $uni-font-size-lg;
}
.icon_green2 {
background: $color-green;
border-radius: 0.19rem;
color: #fff;
padding: 0.18rem 1rem;
border-radius: 0.31rem;
font-size: $uni-font-size-lg;
}
.icon_wrap {
flex: 1;
text-align: right;
}
.tag {
height: 1.25rem;
line-height: 1.25rem;
border-radius: 0.19rem;
text-align: center;
background: #3b363f;
font-size: 0.75rem;
color: #fff;
padding: 0 0.5rem;
}
.red_tag {
background: $color-red;
color: #fff;
}
.green_tag {
background: $color-green;
color: #fff;
}
}
.info {
margin: 0.88rem 0 0;
padding: 0 0.75rem;
display: flex;
justify-content: space-between;
.price {
display: flex;
justify-content: flex-end;
align-items: center;
.label {
color: $color-black;
font-size: 0.75rem;
}
.value {
font-size: 1.13rem;
}
}
.title {
font-size: 0.94rem;
font-weight: 500;
color: $color-black;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 10rem;
}
.daima {
font-size: 0.81rem;
color: $color-gray;
}
}
.bottom {
padding: 0 0.75rem;
.row {
display: flex;
justify-content: space-between;
margin-top: 0.31rem;
gap: 1rem;
.flex {
display: flex;
justify-content: space-between;
}
.label {
color: $color-gray;
font-size: 0.75rem;
width: 4rem;
}
.value {
color: $color-black;
font-size: 0.75rem;
width: 5rem;
text-align: right;
}
}
.button {
width: 19.38rem;
height: 1.81rem;
line-height: 1.81rem;
border-radius: 0.5rem;
text-align: center;
font-size: 0.75rem;
color: #fff;
margin: 0.5rem auto 0;
background: $color-primary;
font-weight: 500;
}
}
}
.gupiao2 {
.flex {
flex: 1;
justify-content: space-between !important;
.label {
// width: 5rem !important;
width: auto !important;
}
.value {
width: auto !important;
}
}
}
}
}
.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;
}
.title2 {
text-align: center;
padding: 0.8rem 0 0.5rem;
font-size: 0.88rem;
color: $color-gray;
}
.button_group {
display: flex;
gap: 1.56rem;
}
.button {
height: 2.75rem;
line-height: 2.75rem;
width: 100%;
text-align: center;
background-color: $color-primary;
color: $color-black;
font-size: 0.88rem;
margin-top: 1rem;
border-radius: 0.5rem;
font-weight: 500;
color: #fff;
}
.cancel {
background: #f76961;
}
.close {
position: absolute;
width: 2.75rem;
height: 2.75rem;
padding: 1rem;
right: 0rem;
top: 0rem;
}
}
</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.zhangdieshu }}</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.price }}</view>
<text v-if="item.zhangdiebaifenbi === 0"> - </text>
<van-icon v-else :class="getColor(item, true)" name="down" size=".75rem" />
</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.zhangdieshu }}</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.price }}</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="gupiao1" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<div class="left">
<image :src="item.is_zixuan ? star : star_o" mode="" @click.stop="collect(item)" />
</div>
<div class="right">
<div class="title">{{ item.name }}</div>
<div class="row">
<div class="daima">{{ item.shuzidaima }}</div>
<div class="rate">
<span :class="getColor(item)">{{ item.zhangdieshu }}</span>
<span :class="getColor(item)">{{ item.zhangdiebaifenbi }}%)</span>
</div>
</div>
<div class="row">
<div class="image_wrap">
<image :src="item.zhangdiebaifenbi > 0 ? up1 : down1" mode="widthFix" />
</div>
<div class="price">
<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" />
<span :class="getColor(item)">{{ item.price }}</span>
</div>
</div>
</div>
</view>
</view>
</view>
<!-- 收藏 -->
<view v-show="buttonType === 'collect'">
<!-- 前6個股票 -->
<view class="hotlist">
<view class="gupiao_wrap">
<view v-for="(item, index) in ziXuanList" :key="index" class="gupiao1" @click="goPage(`/subPackages/index/gupiaoDetail/gupiaoDetail?id=${item.id}`)">
<div class="left">
<image :src="star" mode="" @click.stop="collect(item)" />
</div>
<div class="right">
<div class="title">{{ item.name }}</div>
<div class="row">
<div class="daima">{{ item.shuzidaima }}</div>
<div class="rate">
<span :class="getColor(item)">{{ item.zhangdieshu }}</span>
<span :class="getColor(item)">{{ item.zhangdiebaifenbi }}%)</span>
</div>
</div>
<div class="row">
<div class="image_wrap">
<image :src="item.zhangdiebaifenbi > 0 ? up1 : down1" mode="widthFix" />
</div>
<div class="price">
<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" />
<span :class="getColor(item)">{{ item.price }}</span>
</div>
</div>
</div>
</view>
<view class="plus" @click="goPage('/subPackages/search/search')">
<image :src="plus" mode="widthFix" />
</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 { collectApi, collectDetailApi, 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 up from '@/static/image/market/up1.png'
import down from '@/static/image/market/down1.png'
import socket from '@/common/socket'
import up1 from '@/static/image/market/up.png'
import down1 from '@/static/image/market/down.png'
import star from '@/static/image/index/star.png'
import star_o from '@/static/image/index/star-o.png'
import plus from '@/static/image/market/plus2.png'
import { showToast } from 'vant'
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()
hotGupiaoList.value = mapGupiaoList(res.data.result.slice(0, 3))
console.log(hotGupiaoList.value)
}
// 页面基础配置
const store = useCounterStore()
const contentHeight = `calc(${store.pageHeight} - 10.9rem - .4rem)`
// 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) {
ziXuanList.value = res.data.map((item) => item?.product)
}
}
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
}
}
})
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 })
page1++
if (islun) {
gupiaoList.value = mapGupiaoList([...res?.data?.data])
} else {
gupiaoList.value = mapGupiaoList([...gupiaoList.value, ...res?.data?.data])
}
// 开启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
}
}
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
}
}
})
gupiaoInfo.value = res.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')
// 收藏股票
const collect = async (item) => {
const res = await collectApi({ id: item.id })
const info = await collectDetailApi({ id: item.id })
item.is_zixuan = info.data.msg === 'yes' ? 1 : 0
getZixuanlFn()
showToast(res.data.msg)
}
</script>
<style scoped lang="scss">
.box {
border-radius: 1.5625rem 1.5625rem 0 0;
}
.button_wrap {
height: 2.13rem;
margin: 0 0.94rem 0.5rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.94rem;
.button {
width: 50%;
height: 2.13rem;
border-radius: 0.7rem;
font-size: 0.88rem;
color: $color-black;
display: flex;
align-items: center;
justify-content: center;
border: 0.06rem solid $color-primary;
}
.active {
background: $color-primary;
color: #fff;
font-weight: 500;
}
}
.content {
overflow-y: scroll;
.hotlist {
.hot_gupiao_wrap {
display: flex;
padding: 0.44rem 0.69rem 0;
flex-wrap: wrap;
.gupiao {
width: 32%;
height: 4.56rem;
border-radius: 0.94rem;
padding: 0.09rem 0.19rem;
margin: 0 0.6667% 0.41rem;
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
> .up {
background-color: #fff3f5;
border-radius: 0.625rem;
background-size: 100%;
background-repeat: no-repeat;
background-position: bottom;
}
> .down {
background-color: #e8f7ef;
border-radius: 0.625rem;
background-size: 100%;
background-repeat: no-repeat;
background-position: bottom;
}
}
.hot_gupiao_wrap + .hot_gupiao_wrap {
padding-top: 0;
}
}
.gupiao_wrap {
padding: 0rem 0.9375rem 0;
.gupiao {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.6875rem 0 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;
}
}
}
.gupiao1 {
display: flex;
width: 100%;
border-bottom: 0.06rem solid #ffffff50;
padding: 0.38rem 0.38rem 0.38rem 0;
background: #fafafa;
box-shadow: 0rem 0.13rem 0.19rem 0rem rgba(0, 0, 0, 0.05);
border-bottom: 0.06rem solid rgba(20, 20, 20, 0.14);
margin-bottom: 0.13rem;
border-radius: 0.7rem;
.left {
width: 3.38rem;
display: flex;
align-items: center;
justify-content: center;
image {
width: 1.75rem;
height: 1.75rem;
padding: 0.31rem;
}
}
.right {
flex: 1;
.title {
font-size: 0.94rem;
color: $color-black;
font-weight: 500;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 18rem;
}
.row {
display: flex;
justify-content: space-between;
align-items: center;
}
.daima {
font-size: 0.81rem;
color: #afafaf;
}
.rate span {
font-size: 0.75rem;
}
image {
width: 6.88rem;
}
.price {
font-size: 1.25rem;
font-weight: 500;
display: flex;
align-items: center;
}
}
}
.plus {
height: 5.63rem;
border-bottom: 0.06rem solid #ffffff50;
padding: 0.38rem 0.38rem 0.38rem 0;
background: #fafafa;
box-shadow: 0rem 0.13rem 0.19rem 0rem rgba(0, 0, 0, 0.05);
border-bottom: 0.06rem solid rgba(20, 20, 20, 0.14);
display: flex;
justify-content: center;
align-items: center;
background: #f8fafc;
border-radius: 0.7rem;
image {
width: 1.31rem;
}
}
}
</style>
<template>
<Navigator :title="t('tabbar.record')" :is-show-back="false" />
<scroll-view scroll-y :style="{ height: `calc(${store.pageHeight} - 7.5rem)` }" @scrolltolower="getNews">
<view class="box">
<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)">
<img :src="item.image" alt="" @click.stop="previewImage(item.image)" />
<div class="right">
<view class="record-item-title"> {{ item.title }} </view>
<view class="record-item-time">{{ formatTimestamp(item.updatetime * 1000) }}</view>
</div>
</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, showImagePreview, showLoadingToast } from 'vant'
import { useCounterStore } from '@/store/store'
const store = useCounterStore()
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)
})
}
}
const previewImage = (item) => {
showImagePreview([item])
}
</script>
<style scoped lang="scss">
.box {
// padding-top: 3.5313rem;
.record-list {
// width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin: 0 0.94rem;
.record-item {
position: relative;
margin-bottom: 0.88rem;
border-bottom: 0.05rem solid #d8d8d8;
padding-bottom: 0.5rem;
display: flex;
gap: 1rem;
width: 100%;
img {
width: 5rem;
border-radius: 0.31rem;
display: block;
}
.right {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.record-item-title {
font-weight: 500;
font-size: 0.8125rem;
color: $color-black;
}
.record-item-time {
font-weight: 500;
font-size: 0.8125rem;
color: #a2a2a2;
margin-top: 0.5rem;
}
}
}
uni-image {
width: 100%;
height: 4.5938rem;
}
}
</style>
<template>
<view class="box">
<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: #222; 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 style="font-size: 0.8125rem; color: #a6a6a6">{{ 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>
<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="#fff" size="20" class="showIcon" @click="isShowInfo = !isShowInfo" />
<van-icon v-else name="eye-o" color="#fff" 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>
<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-t">{{ t(item.t) }}</view>
</view>
<view v-if="!isShowInfo" class="user-info-item-money">******</view>
<view v-else class="user-info-item-money" :class="{ up: item.num > 0 && item.color, down: item.num < 0 && item.color }">{{ changeMoney(item.num) }}</view>
</view>
</view>
<view class="user-info-top-right">
<div class="button" @click="goWeb">
<image :src="recharge" mode="" />
<div class="label">{{ t('user.chongzhi') }}</div>
</div>
<div class="button" @click="goPage('/subPackages/withdrawal/withdrawal')">
<image :src="withdraw" mode="" />
<div class="label">{{ t('user.tixian') }}</div>
</div>
</view>
</view>
<view class="page-list-box">
<view v-for="(item, i) in pageListArr" :key="i" class="page-list-item" @click="item.name === 'user.zhuxiao' ? store.clearState() : goPage(item.url, i == 5 ? true : false)">
<view style="display: flex; align-items: center">
<div class="image_wrap">
<image class="page-list-item-icon" :src="item.imgUrl" />
</div>
<view class="name" :style="{ color: item.color }">{{ t(item.name) }}</view>
</view>
<van-icon name="arrow" color="#AFAFAF"></van-icon>
</view>
</view>
</view>
<CustomTabbar :id="4" />
</template>
<script lang="ts" setup>
import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
import { useI18n } from 'vue-i18n'
import { computed, 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 set from '@/static/image/user/set.png'
import recharge from '@/static/image/user/recharge.png'
import withdraw from '@/static/image/user/withdraw.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 = () => {
window.open(kefu_url.value)
}
onShow(() => {
getCzhiurlFn()
store.getUserInfo()
})
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/img1.png',
url: '/subPackages/bankAccount/bankAccount'
},
{
name: 'user.shouru',
imgUrl: '/static/image/user/img2.png',
url: '/subPackages/transactionLog/transactionLog'
},
{
name: 'user.benrenqueren',
imgUrl: '/static/image/user/img3.png',
url: '/subPackages/real_name/real_name'
},
{
name: 'user.rizhisuoyin',
imgUrl: '/static/image/user/img4.png',
url: '/subPackages/changePassword/changePassword'
},
{
name: 'user.shiwuchuli',
imgUrl: '/static/image/user/img5.png',
url: '/subPackages/transactionPassions/transactionPassions'
},
{
name: 'user.kefuzhongxin',
imgUrl: '/static/image/user/img6.png',
url: '/subPackages/customerService/customerService'
},
// {
// name: 'user.qiehuanyuyan',
// imgUrl: '/static/image/user/img7.png',
// url: '/subPackages/switchLanguage/switchLanguage'
// },
{
name: 'user.zhuxiao',
imgUrl: '/static/image/user/img8.png',
url: '/subPackages/logout/logout',
color: '#FF6254'
}
]
const money = computed(() => {
return store.$state.userInfo?.money || 0
})
const count_market = computed(() => {
return store.$state.userInfo?.shizhi || 0
})
const count_losses = computed(() => {
return store.$state.userInfo?.my_losses?.count_losses || 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',
color: true
}
])
</script>
<style scoped lang="scss">
::v-deep .van-button--normal {
padding: 0;
}
uni-view {
box-sizing: border-box;
}
* {
font-weight: 500;
}
.down {
color: #36ff36 !important;
}
::v-deep .van-button {
width: 4.0625rem;
height: 1.5rem;
border-radius: 1.5625rem;
.van-button__text {
font-size: $uni-font-size-1;
}
}
.box {
padding-bottom: 1.875rem;
.page-list-box {
margin-top: 0.75rem;
.page-list-item {
margin: 0 0.94rem;
height: 3.6875rem;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem;
border-bottom: 0.05rem solid #f2f4f6;
// background: #f8fafc;
margin-bottom: 0.31rem;
.image_wrap {
width: 1.44rem;
height: 1.44rem;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
margin-right: 1.5rem;
}
.page-list-item-icon {
width: 1.38rem;
height: 1.38rem;
}
.name {
color: $color-black;
font-size: 0.875rem;
}
}
}
.user-info {
width: 21.5625rem;
border-radius: 1.25rem;
// background-image: url('@/static/image/user/info_bg.png');
background-size: 100% 100%;
background-color: $color-primary;
margin: 0rem auto 0;
padding: 1.25rem 0.94rem;
.user-info-buttom {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.9375rem;
}
.user-info-top {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
.user-info-top-left {
.zichan-box {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
.showIcon {
margin-left: 0.625rem;
}
.zichan-box-title {
font-size: 0.81rem;
color: #fff;
}
.zichan-box-money {
font-weight: 500;
font-size: 1.56rem;
color: #fff;
text-align: center;
}
}
}
}
.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: 6.5625rem;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 0.5938rem;
.user-info-item-money {
width: 100%;
line-height: 1rem;
font-size: 1rem;
font-weight: 500;
color: #fff;
margin-top: 0.3125rem;
word-wrap: break-word;
}
.user-info-item-left {
.user-info-item-t {
font-size: 0.875rem;
line-height: 0.875rem;
color: #fff;
}
.user-info-item-tou {
width: 0.4063rem;
height: 0.4063rem;
border-radius: 50%;
margin-right: 0.4375rem;
}
}
}
.user-info-top-right {
display: flex;
justify-content: space-between;
margin-top: 1rem;
image {
width: 0.94rem;
height: 0.94rem;
}
.button {
width: 8.13rem;
height: 3.75rem;
background: #fff;
border-radius: 0.38rem;
text-align: center;
padding: 0.81rem;
}
.label {
font-size: 0.75rem;
color: $color-black;
font-weight: 500;
}
}
}
.top {
width: 100%;
padding: 0.9375rem;
.user-info-bottom {
position: absolute;
top: 5.9063rem;
left: 0.6563rem;
width: 22.125rem;
height: 3.625rem;
border-radius: 1.25rem;
display: flex;
justify-content: space-between;
.zichan-chart {
width: 2.875rem;
height: 2.875rem;
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;
}
}
.user-info-left {
display: flex;
align-items: center;
.user-info-box {
display: flex;
flex-direction: column;
justify-content: center;
font-weight: 500;
font-size: 1rem;
color: #161616;
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>
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
pageHeight: null | string
}
export const useCounterStore = defineStore('counter', {
state: (): userState => ({
token: null,
userId: null,
userInfo: null,
tabbarHeight: '3.16rem',
navigaterHeight: '4.375rem',
pageHeight: '667px'
}),
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;
}
.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 { showLoadingToast, 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 () => {
showLoadingToast({ forbidClick: true, duration: 0 })
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-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>
<van-button class="btn" type="primary" @click="submitFn">{{ t('account.cunquzhanghaodengjibtn') }}</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: $color-black;
&::placeholder {
color: #afafaf;
}
}
::v-deep .van-field {
height: 3.375rem;
}
::v-deep .van-field__body {
height: 3.375rem;
background: #f8fafc;
border-radius: 0.5rem;
padding: 1.0938rem 0.9375rem 0.9688rem 1.25rem;
.van-field__right-icon {
padding: 0;
margin-right: 0.625rem;
.van-icon__image {
width: 1.19rem;
}
}
}
::v-deep .van-button {
width: 100%;
height: 2.75rem;
background: $color-primary;
border-radius: 0.5rem;
font-size: 0.9375rem;
font-weight: 500;
margin: 2.5rem 0 0;
}
::v-deep .van-button__text {
color: #fff;
font-size: 0.9375rem;
font-weight: 500;
}
::v-deep .van-field {
padding: 0;
}
.Box {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 1rem;
.box-form-card {
width: 100%;
padding: 0.94rem 0;
.btn {
margin-top: 1.25rem;
}
.box-form-item {
display: flex;
flex-direction: column;
margin-bottom: 1.2rem;
.box-form-item-label {
margin-bottom: 0.5938rem;
font-weight: 500;
font-size: $uni-font-size-2;
line-height: 0.75rem;
color: #222;
}
}
}
.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">
<image :src="plus" mode="widthFix" />
<div class="label">{{ t('account.cunquzhanghaodengji') }}</div>
</view>
<scroll-view scroll-y :style="{ height: `calc(${store.pageHeight} - 9.5313rem)` }">
<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>
</scroll-view>
</template>
<script setup lang="ts">
import { getBankListApi, delBankApi } from '@/api/bankAccount'
import { BankInfoType } from '@/api/bankAccount/indexType'
import { useCounterStore } from '@/store/store'
import { useI18n } from 'vue-i18n'
import { onMounted, Ref, ref } from 'vue'
import { showSuccessToast } from 'vant'
import plus from '@/static/image/user/plus.png'
const { t } = useI18n()
// 页面基础配置
const store = useCounterStore()
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;
}
body {
height: 100%;
}
.bg {
width: 100%;
// height: 100%;
position: absolute;
top: 0;
left: 0;
}
.inlet {
height: 5rem;
border-radius: 0.5rem;
margin: 0.8125rem 0.94rem;
border: 0.05rem solid $color-primary;
text-align: center;
image {
width: 1.31rem;
height: 1.31rem;
margin-top: 1.19rem;
}
.label {
font-size: 0.75rem;
color: #222;
margin-top: 0.25rem;
}
}
.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-bottom: 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: #eee;
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, showLoadingToast, 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 () => {
showLoadingToast({ forbidClick: true, duration: 0 })
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 {
height: 2rem;
border: none;
font-weight: 400;
font-size: 0.9375rem;
color: $color-black;
&::placeholder {
color: #afafaf;
}
}
::v-deep .van-field {
height: 3.375rem;
}
::v-deep .van-field__body {
height: 3.375rem;
background: #fff;
border-radius: 0.5rem;
border: 0.06rem solid #afafaf;
padding: 1.0938rem 0.9375rem 0.9688rem 1.25rem;
.van-field__right-icon {
padding: 0;
margin-right: 0.625rem;
.van-icon__image {
width: 1.19rem;
}
}
}
::v-deep .van-button {
width: 100%;
height: 2.75rem;
background: $color-primary;
border-radius: 0.5rem;
font-size: 0.9375rem;
font-weight: 500;
margin: 2.5rem 1rem 0;
}
::v-deep .van-button__text {
color: #fff;
font-size: 0.9375rem;
font-weight: 500;
}
::v-deep .van-field {
padding: 0;
}
.Box {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 1rem;
.box-form-card {
width: 100%;
height: 31.9688rem;
display: flex;
flex-direction: column;
align-items: center;
.title {
font-weight: 500;
font-size: 1.1563rem;
color: #040404;
line-height: 1.1563rem;
margin-bottom: 1.875rem;
}
.box-form-item {
display: flex;
flex-direction: column;
margin-top: 0.9375rem;
position: relative;
width: 100%;
.box-form-item-label {
height: 2.75rem;
display: flex;
align-items: center;
font-weight: 500;
font-size: 0.875rem;
line-height: 0.75rem;
color: $color-black;
}
}
}
.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'
import { useCounterStore } from '@/store/store'
const { t } = useI18n()
const store = useCounterStore()
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(${store.pageHeight} - 3.125rem)` }">
<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>
</view>
</view>
</scroll-view>
</template>
<style lang="scss" scoped>
::v-deep.ma__p {
color: $color-black;
}
.box {
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
}
.content-box {
width: 100%;
padding: 1.375rem 0.7188rem 6.25rem 1.875rem;
font-size: 0.875rem;
}
.title-box {
width: 20.9375rem;
height: 6.25rem;
padding: 1rem 0.625rem 0.9063rem 0.9375rem;
border-bottom: 1px solid #afafaf;
.title {
font-weight: 500;
font-size: 1rem;
color: $color-black;
}
.createtime {
margin-top: 0.3125rem;
font-size: 0.875rem;
color: $color-gray;
text-align: right;
}
}
</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>
<scroll-view scroll-y class="content">
<view v-for="(item, index) in dadanList" v-show="pageType === 0" :key="index" class="gupiao1 flex" @click="openWindow(item)">
<view class="text_ellipsis tt">{{ item.product_name }}</view>
<view>{{ item.product_code }}</view>
<view class="text-center red">{{ changeMoney(item.now_price) }}</view>
<view class="text-center red">{{ changeMoney(item.hedging_price) }}</view>
</view>
<view v-show="pageType === 1" class="card2">
<view v-for="(item, index) in shenqingList" :key="index" class="gupiao2">
<div class="top">
<div class="title">{{ item?.product_name }}</div>
<div class="daima">{{ item?.product_code }}</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('hongli.column_jiage') }}</view>
<view class="value red">{{ changeMoney(item.buy_in_price) }}</view>
</div>
<div class="right">
<view class="label">{{ t('jiaoyi.shenqingliang') }}</view>
<view class="value red">{{ Math.floor(item.buy_in_num * 100) }}</view>
</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('hongli.column_chengjiaoe') }}</view>
<view class="value red">{{ changeMoney(Math.floor(item.buy_in_amount)) }}</view>
</div>
<div class="right">
<view class="label">{{ t('hongli.column_zhuangtai') }}</view>
<view v-if="item.status == '2'" class="value" style="color: #00a389"> {{ t('hongli.tip1') }} </view>
<view v-if="item.status == '3'" class="value red">{{ t('hongli.tip2') }} </view>
<view v-if="item.status == '1'" class="value" style="color: #222">{{ t('hongli.tip3') }}</view>
</div>
</div>
</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.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>
<view class="flex justify-center my-[.8rem]">
<van-stepper v-model="buyParams.num" input-width="100" button-size="2rem" integer />
</view>
<view class="button" @click="buy">{{ t('gupiaoDetail.submit') }}</view>
<image class="close" src="/static/close.png" @click="gupiaoWindowShow = false"></image>
</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 { showLoadingToast, 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()
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 buyParams = ref({
monitoring_id: '',
num: 1
})
const buy = async () => {
showLoadingToast({ forbidClick: true, duration: 0 })
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">
.content {
height: calc(var(--vh) * 100 - 3.13rem - 2.75rem - 2.5rem);
overflow: auto;
.card2 {
padding: 0.75rem 0;
}
}
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 {
height: 2.75rem;
margin: 0 0.94rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.31rem;
.button {
width: 50%;
height: 2.75rem;
border-radius: 0.5rem;
font-size: 0.88rem;
color: $color-black;
display: flex;
align-items: center;
justify-content: center;
border: 0.05rem solid $color-primary;
}
.active {
background: $color-primary;
color: #fff;
font-weight: 500;
}
}
.column,
.gupiao {
padding: 0.52rem 0rem;
margin: 0 0.94rem;
display: flex;
text-align: center;
height: 2.5rem;
align-items: center;
> view {
flex: 1;
color: #a0a5b0;
font-size: 0.75rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.gupiao1 {
margin: 0 0.94rem;
height: 2.81rem;
padding: 0.52rem 0rem;
display: flex;
border-bottom: 0.06rem solid #14141430;
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;
overflow: hidden;
color: #aeaeae;
text-overflow: ellipsis;
}
.tt {
color: $color-black;
}
}
.gupiao2 {
margin: 0 1rem;
padding: 0.5rem 0.31rem;
margin-top: 0.63rem;
border-bottom: 0.06rem solid #14141430;
.top {
display: flex;
align-items: center;
gap: 1.56rem;
.title {
font-size: 0.94rem;
font-weight: 500;
color: $color-black;
}
.daima {
height: 1.19rem;
background: $color-primary;
border-radius: 0.31rem;
color: #fff;
font-size: 0.75rem;
padding: 0 0.38rem;
display: flex;
align-items: center;
}
.date {
span {
color: #afafaf;
font-size: 0.75rem;
}
}
}
.row {
display: flex;
justify-content: space-between;
height: 1.13rem;
align-items: center;
margin-top: 0.63rem;
.left,
.right {
display: flex;
.label {
color: $color-gray;
font-size: 0.74rem;
&::after {
content: ':';
}
}
.value {
color: $color-black;
font-size: 0.74rem;
}
}
}
}
.column {
text-align: center;
}
}
.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: 3.06rem;
line-height: 3.06rem;
width: 100%;
text-align: center;
border-radius: 0.38rem;
background-color: $color-primary;
color: #fff;
font-size: 0.81rem;
margin-top: 1rem;
}
.close {
position: absolute;
width: 2.75rem;
height: 2.75rem;
padding: 1rem;
right: 0.5rem;
top: 0.5rem;
}
}
::v-deep .van-stepper__minus,
::v-deep .van-stepper__plus {
width: 1.63rem;
height: 1.63rem;
border: 0.06rem solid #7d8729;
border-radius: 50%;
background: transparent;
&::before {
background: #7d8729;
}
&::after {
background: #7d8729;
}
}
::v-deep .van-stepper__minus--disabled,
::v-deep .van-stepper__plus--disabled {
border-color: #ccc;
&::before {
background: #ccc;
}
&::after {
background: #ccc;
}
}
::v-deep .van-stepper__input {
background: transparent;
margin: 0 0.63rem;
width: 2.6rem;
}
</style>
<template>
<Navigater :is-show-back="false" :title="t('gendan.title')" style="background: transparent; color: black">
<template #left>
<img class="back" src="/static/arrow-left.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(${store.pageHeight} - 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'
import { useCounterStore } from '@/store/store'
const store = useCounterStore()
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(${store.pageHeight} - 3.125rem)` }">
<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'
import { useCounterStore } from '@/store/store'
const store = useCounterStore()
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'
// }
// }
grid: {
show: true,
horizontal: {
show: false,
size: 1,
color: '#333',
style: 'dashed',
dashedValue: [2, 2]
},
vertical: {
show: false,
size: 1,
color: '#333',
style: 'dashed',
dashedValue: [2, 2]
}
},
// 蜡烛图
candle: {
type: 'candle_solid',
// 网格线
// 提示
tooltip: {
showRule: 'none'
},
bar: {
upColor: '#F92855',
downColor: '#2DC08E',
upBorderColor: '#F92855',
downBorderColor: '#2DC08E',
upWickColor: '#F92855',
downWickColor: '#2DC08E'
}
},
indicator: {
bars: [
{
upColor: '#F92855',
downColor: '#2DC08E'
}
]
},
// x轴
xAxis: {
// x轴线
axisLine: {
show: true,
color: '#e5e8f6'
}
},
// y轴
yAxis: {
// y轴线
axisLine: {
color: '#e5e8f6'
},
// x轴分割文字
tickText: {
color: '#666'
},
// x轴分割线
tickLine: {
color: '#e5e8f6'
}
},
// 图表之间的分割线
separator: {
color: '#e5e8f6'
}
}
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 v-if="isShow" :isdma="`(${gupiaoDetail.shuzidaima})`" :title="`${gupiaoDetail.name}`">
<template #right>
<view class="collect" @click="collect">
<image v-if="collectInfo == 0" src="/static/image/index/star-o.png" mode="" />
<image v-else src="/static/image/index/star.png" mode="" />
</view>
</template>
</Navigater>
<view v-if="isShow" class="content" :style="{ height: contentHeight }">
<div class="head">
<div class="left">
<div class="title">{{ gupiaoDetail.name }}</div>
<div class="daima">{{ gupiaoDetail.shuzidaima }}</div>
</div>
<div class="right">
<div class="price">{{ gupiaoDetail.price }}</div>
</div>
</div>
<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 flex-1 text-left de" style="width: 9.375rem">
<view class="text-lg text-gray hh2">{{ t('gupiaoDetail.label1') }}:</view>
<view class="text-lg" style="color: #141414">{{ gupiaoDetail.open }}</view>
</view>
<view class="flex flex-1 text-left de2" style="width: 9.375rem">
<view class="text-lg text-gray hh2">{{ t('gupiaoDetail.label2') }}:</view>
<view class="text-lg" style="color: #141414">{{ gupiaoDetail.close }}</view>
</view>
</view>
<view class="flex justify-between">
<view class="flex flex-1 text-left de" style="width: 9.375rem">
<view class="text-lg text-gray hh2">{{ t('gupiaoDetail.label3') }}:</view>
<view class="text-lg" style="color: #ff0021">{{ gupiaoDetail.high }}</view>
</view>
<view class="flex flex-1 text-left de2" style="width: 9.375rem">
<view class="text-lg text-gray hh2">{{ t('gupiaoDetail.label4') }}:</view>
<view class="text-lg" style="color: #141414">{{ gupiaoDetail.low }}</view>
</view>
</view>
<view class="flex justify-between">
<view class="flex flex-1 text-left de" style="width: 9.375rem">
<view class="text-lg text-gray hh2">{{ t('gupiaoDetail.label5') }}:</view>
<view class="text-lg" style="color: #ff0021">{{ gupiaoDetail.vol }}</view>
</view>
<view class="flex flex-1 text-left de2" style="width: 9.375rem">
<view class="text-lg text-gray hh2">{{ t('gupiaoDetail.label6') }}:</view>
<view class="text-lg" style="color: #141414">{{ gupiaoDetail.totalMoney }}({{ t('gupiaoDetail.yi') }})</view>
</view>
</view>
</view>
<view class="date_wrap">
<div v-for="(item, index) in columns" :key="index" :class="{ active: item.value == dateActive }" class="date">
<span @click="getChart(gupiaoDetail.id, item.value)">{{ item.label }}</span>
<div v-if="index < columns.length - 1" class="line"></div>
</div>
</view>
<view class="chart_wrap">
<GupiaoChart :value="chartValue" />
</view>
<view class="box">
<view class="button_wrap">
<view class="button" :class="{ active: buyGupiaoParams.buytype === 0 }" @click="changeType(0)">{{ t('gupiaoDetail.shijia') }}</view>
<view class="button" :class="{ active: buyGupiaoParams.buytype === 1 }" @click="changeType(1)">{{ t('gupiaoDetail.xianjia') }}</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-stepper v-model="price" :placeholder="buyGupiaoParams.price" input-width="50" min="0" button-size="1.8rem" step="0.1" @blur="priceChange" />
</view>
</view>
<view class="row">
<view class="text-lg title">{{ t('gupiaoDetail.inputLabel2') }}</view>
<view class="input_wrap">
<van-stepper v-model="buyGupiaoParams.shuliang" input-width="50" button-size="1.8rem" digit />
</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-stepper v-model="buyGupiaoParams.ganggan_ratio" input-width="50" button-size="1.8rem" digit @update:model-value="changeganggan_ratio" />
</view>
</view>
<view class="button_wrap">
<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>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<image class="close" src="../../../static/close.png" @click="gupiaoWindowShow = false"></image>
<view class="title row">{{ gupiaoDetail.name }}/{{ gupiaoDetail.shuzidaima }}</view>
<div class="row_group">
<view class="row">
<view class="label">{{ t('gupiaoDetail.windowLabel1') }}</view>
<view v-if="buyGupiaoParams.buytype == 0" class="value">{{ gupiaoDetail.price ? changeMoney(gupiaoDetail.price) : '-' }}</view>
<view v-else class="value">{{ price ? changeMoney(price) : gupiaoDetail.price ? changeMoney(gupiaoDetail.price) : '-' }}</view>
</view>
<view class="row">
<view class="label">{{ t('gupiaoDetail.windowLabel2') }}</view>
<view class="value">{{ buyGupiaoParams.shuliang }}</view>
</view>
<view class="row">
<view class="label">{{ t('gupiaoDetail.windowLabel3') }}</view>
<view v-if="buyGupiaoParams.buytype == 0" class="value">{{
gupiaoDetail.price !== '-'
? userMoneyInfo.peizi_data === '1'
? changeMoney((gupiaoDetail.price * buyGupiaoParams.shuliang) / buyGupiaoParams.ganggan_ratio)
: changeMoney(gupiaoDetail.price * buyGupiaoParams.shuliang)
: '-'
}}</view>
<view v-else class="value">{{
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 class="label">{{ t('gupiaoDetail.windowLabel4') }}</view>
<view class="value">{{ gupiaoDetail.price !== '-' ? changeMoney(gupiaoDetail.price * buyGupiaoParams.shuliang) : '-' }}</view>
</view>
<view class="row">
<view class="label">{{ t('gupiaoDetail.windowLabel6') }}</view>
<view v-if="buyGupiaoParams.buytype === 0" class="value">{{ userMoneyInfo.peizi_data === '1' ? changeMoney(heji / buyGupiaoParams.ganggan_ratio) : changeMoney(heji) }}</view>
<view v-else class="value">{{
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 class="label">{{ t('gupiaoDetail.windowLabel7') }}</view>
<view class="value">{{ changeMoney(userMoneyInfo.money) }}</view>
</view>
</div>
<view class="button" @click="buyGupiao">{{ t('gupiaoDetail.submit') }}</view>
</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 { closeToast, showConfirmDialog, showLoadingToast, showToast } from 'vant'
const { t } = useI18n()
// 页面基础配置
const store = useCounterStore()
console.log(store)
const contentHeight = `calc(${store.pageHeight} - 3.125rem)`
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 isShow = ref(false)
const getGupiaoDetail = async (id: any) => {
const res = await getGupiaoDetailApi({ id })
isShow.value = true
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 changeType = (e) => {
buyGupiaoParams.value.buytype = e
if (e === 1 && !price.value) {
price.value = buyGupiaoParams.value.price
}
}
// 股票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 () => {
showLoadingToast({ forbidClick: true })
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 () => {
showLoadingToast({ forbidClick: true, duration: 0 })
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) {
closeToast()
getUserMoney()
showConfirmDialog({
message: res.data.msg,
confirmButtonText: t('gupiaoDetail.tip11'),
cancelButtonText: t('gupiaoDetail.tip12')
})
.then(() => {
// on confirm
uni.switchTab({ url: '/pages/jiaoyi/jiaoyi' })
})
.catch(() => {
// on cancel
})
setTimeout(() => {
gupiaoWindowShow.value = false
}, 1500)
} else {
closeToast()
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">
.hh {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
}
.collect {
position: absolute;
right: 0;
height: 100%;
padding: 0 1.5rem;
display: flex;
align-items: center;
image {
width: 1.31rem;
height: 1.31rem;
}
}
.de {
display: flex;
align-items: center;
}
.text-left {
text-align: left;
}
button {
font-family: none;
}
.content {
overflow: auto;
.head {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0.7rem 0.94rem 0;
.title {
font-size: 0.94rem;
color: $color-black;
font-weight: 500;
}
.daima {
font-size: 0.75rem;
color: #aeaeae;
}
.price {
font-size: 1.5rem;
font-weight: 500;
color: $color-black;
}
}
.box {
width: 23.4375rem;
border-top-left-radius: 1.5625rem;
border-top-right-radius: 1.5625rem;
background: #fff;
z-index: 9;
border-radius: 1.88rem 1.88rem 0rem 0rem;
background: #f9f9f9;
box-shadow: 0rem -0.38rem 0.63rem 0rem rgba(0, 0, 0, 0.1);
}
.zd {
display: flex;
align-items: center;
justify-content: flex-end;
text-align: center;
margin: 0 0.94rem;
}
.jiage {
margin-top: 0.7188rem;
text-align: center;
color: #fff;
font-size: 1.5rem;
font-weight: 500;
}
.card {
margin: 0.5938rem auto 0;
padding: 0 0.9375rem;
border-radius: 1.03rem;
margin-top: 0.34rem;
text-align: left;
.text-lg {
color: #fff;
}
.text-gray {
color: #a6abb5;
}
.de2 {
display: flex;
justify-content: flex-end;
height: 1.13rem;
margin: 0.2rem 0;
}
}
.date_wrap {
height: 2.13rem;
margin: 0.9375rem 0.84rem 0;
padding: 0.3125rem 0;
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.34rem;
.date {
text-align: center;
position: relative;
display: flex;
align-items: center;
span {
width: 2.2rem;
height: 1.5rem;
border-radius: 0.63rem;
line-height: 1.5rem;
font-size: 0.75rem;
color: $color-black;
transition: width 0.3s;
}
}
.line {
width: 0.06rem;
height: 0.94rem;
background: #aeaeae;
margin: 0 0.2rem;
border-radius: 0.19rem;
}
.active {
span {
width: 3rem;
background-color: $color-primary;
color: #fff;
}
}
}
.chart_wrap {
padding: 0.56rem 1.25rem 2.56rem;
margin-top: 0.34rem;
}
.button_wrap {
padding: 1.25rem 1.25rem 0.625rem;
display: flex;
gap: 0.63rem;
.button {
border: 0.06rem solid $color-primary;
color: $color-primary;
}
.active {
background-color: $color-primary;
color: #fff;
}
}
.button {
width: 10rem;
height: 2.44rem;
line-height: 2.44rem;
text-align: center;
color: #fff;
font-size: 0.9375rem;
background: #fff;
border-radius: 0.5rem;
}
.submit {
height: 3.0625rem !important;
line-height: 3.0625rem !important;
width: 100% !important;
margin-top: 0.63rem !important;
background-color: $color-primary;
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;
margin: 0.63rem 0;
.title {
font-size: 0.8125rem;
color: #141316;
}
}
.input_wrap {
.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;
}
}
.button_wrap {
padding: 0;
}
}
}
.buy_window {
background-color: #fff;
padding: 0 0.81rem 1.25rem 0.81rem;
.row_group {
display: flex;
flex-wrap: wrap;
// gap: 10%;
.row {
width: 50%;
}
}
.title {
text-align: center;
padding: 0.8rem 0 0.5rem;
font-size: 1rem;
}
.row {
display: flex;
justify-content: space-between;
padding: 0.64rem 0.56rem;
view {
color: $color-black;
font-size: 0.81rem;
}
.label {
color: $color-gray;
}
.value {
color: $color-black;
}
}
.title {
justify-content: center;
}
.button {
height: 3.06rem;
line-height: 3.06rem;
width: 100%;
text-align: center;
border-radius: 0.8rem;
background-color: $color-primary;
color: $color-black;
font-size: 0.94rem;
margin-top: 1.25rem;
font-weight: 500;
color: #fff;
}
.close {
position: absolute;
width: 2.75rem;
height: 2.75rem;
padding: 1rem;
right: 0.5rem;
top: 0rem;
}
}
::v-deep .van-popup--round {
border-radius: 1.88rem 1.88rem 0 0 !important;
}
::v-deep .van-stepper__minus,
::v-deep .van-stepper__plus {
width: 1.63rem;
height: 1.63rem;
border: 0.06rem solid #00a389;
border-radius: 50%;
background: transparent;
&::before {
background: #00a389;
}
&::after {
background: #00a389;
}
}
::v-deep .van-stepper__minus--disabled,
::v-deep .van-stepper__plus--disabled {
border-color: #ccc;
&::before {
background: #ccc;
}
&::after {
background: #ccc;
}
}
::v-deep .van-stepper__input {
background: transparent;
margin: 0 0.63rem;
width: 2.6rem;
}
</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>
<scroll-view scroll-y class="content">
<view class="gupiao_list">
<view v-show="pageType === 0">
<NotData v-if="gupiaoList.length === 0"></NotData>
<view v-for="(item, index) in gupiaoList" :key="index" class="gupiao1 flex" @click="openWindow(item)">
<view class="tt">{{ item?.product?.name }}</view>
<view class="red">{{ changeMoney(item.buy_in_money) }}</view>
<view>{{ item?.product?.shuzidaima }}</view>
</view>
</view>
<view v-show="pageType === 1" class="card2">
<NotData v-if="shenqingList.length === 0"></NotData>
<view v-for="(item, index) in shenqingList" :key="index" class="gupiao2">
<div class="top">
<div class="title">{{ item?.product?.name }}</div>
<div class="daima">{{ item?.product?.shuzidaima }}</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('hongli.column_jiage') }}</view>
<view class="value red">{{ changeMoney(item.buy_in_money) }}</view>
</div>
<div class="right">
<view class="label">{{ t('jiaoyi.shenqingliang') }}</view>
<view v-if="item.order_status == '2' || item.order_status == '3' || item.order_status == '4'" class="value red">{{ Math.floor(item.final_num) }}</view>
<view v-else class="value red">{{ Math.floor(item.buy_in_num) }}</view>
</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('hongli.column_chengjiaoe') }}</view>
<view class="value">{{ changeMoney(Math.floor(item.buy_in_amount)) }}</view>
</div>
<div class="right">
<view class="label">{{ t('hongli.column_zhuangtai') }}</view>
<view v-if="item.status == '2'" class="value" style="color: #00a389"> {{ t('hongli.tip1') }} </view>
<view v-if="item.status == '3'" class="value red">{{ t('hongli.tip2') }} </view>
<view v-if="item.status == '1'" class="value" style="color: #222">{{ t('hongli.tip3') }}</view>
</div>
</div>
</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_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('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%; justify-content: space-between">
<view class="label">{{ t('ipo.windowLabel2') }}{{ t('ipo.zang') }}</view>
<van-stepper v-model="buyParams.num" integer step="1" />
</view>
</view>
<view class="button" @click="buy">{{ t('gupiaoDetail.submit') }}</view>
<image class="close" src="/static/close.png" @click="gupiaoWindowShow = false"></image>
</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'
import { showLoadingToast, showToast } from 'vant'
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 totalPrice = computed(() => {
return buyParams.value.num * 100 * Number(windowDetail.value.buy_in_money)
})
// 購買
const buyParams = ref({
dividend_id: 0,
num: 1
})
const buy = async () => {
showLoadingToast({ forbidClick: true, duration: 0 })
buyParams.value.dividend_id = windowDetail.value.id
const res = await buyHongliApi(buyParams.value)
gupiaoWindowShow.value = false
getHongliList()
getUserMoney()
if (res.code === 1) {
showToast({
message: res.msg
})
}
}
</script>
<style scoped lang="scss">
.content {
height: calc(var(--vh) * 100 - 3.13rem - 2.75rem - 2.5rem);
overflow: auto;
.card2 {
padding: 0.75rem 0;
}
}
.column {
padding: 0.52rem 0rem;
margin: 0 0.94rem;
display: flex;
text-align: center;
height: 2.5rem;
align-items: center;
> view {
flex: 1;
color: #a0a5b0;
font-size: 0.75rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.a {
align-items: center;
}
.button_group {
height: 2.75rem;
margin: 0 0.94rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.31rem;
.button {
width: 50%;
height: 2.75rem;
border-radius: 0.7rem;
font-size: 0.88rem;
color: #aeaeae;
display: flex;
align-items: center;
justify-content: center;
border: 0.05rem solid $color-primary;
color: $color-black;
}
.active {
background: $color-primary;
border: 0.05rem solid $color-primary;
color: #fff;
font-weight: 500;
}
}
.gupiao_list {
margin-bottom: 0.31rem;
align-items: center;
justify-content: center;
width: 100%;
.column,
.gupiao {
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;
overflow: hidden;
text-overflow: ellipsis;
}
}
.gupiao1 {
margin: 0 0.94rem;
height: 2.81rem;
padding: 0.52rem 0rem;
display: flex;
border-bottom: 0.06rem solid #14141430;
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;
overflow: hidden;
color: #aeaeae;
text-overflow: ellipsis;
}
.tt {
color: $color-black;
}
}
.gupiao2 {
margin: 0 1rem;
padding: 0.5rem 0.31rem;
margin-top: 0.63rem;
border-bottom: 0.06rem solid #14141430;
.top {
display: flex;
align-items: center;
gap: 1.56rem;
.title {
font-size: 0.94rem;
font-weight: 500;
color: $color-black;
}
.daima {
height: 1.19rem;
background: $color-primary;
border-radius: 0.31rem;
color: #fff;
font-size: 0.75rem;
padding: 0 0.38rem;
display: flex;
align-items: center;
}
.date {
span {
color: #afafaf;
font-size: 0.75rem;
}
}
}
.row {
display: flex;
justify-content: space-between;
height: 1.13rem;
align-items: center;
margin-top: 0.63rem;
.left,
.right {
display: flex;
.label {
color: $color-gray;
font-size: 0.74rem;
&::after {
content: ':';
}
}
.value {
color: $color-black;
font-size: 0.74rem;
}
}
}
}
.text_ellipsis {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
width: 100%;
}
}
.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 {
&:nth-of-type(2n + 1) {
width: 55%;
}
display: flex;
width: 45%;
align-items: center;
padding: 0.24rem 0.56rem;
color: #fff;
view {
color: $uni-text-color;
font-size: 0.8rem;
}
}
}
.button {
height: 3.06rem;
line-height: 3.06rem;
width: 100%;
text-align: center;
border-radius: 0.38rem;
background-color: $color-primary;
color: #fff;
font-size: 0.81rem;
margin-top: 1rem;
}
.close {
position: absolute;
width: 2.75rem;
height: 2.75rem;
padding: 1rem;
right: 0.5rem;
top: 0.5rem;
}
}
::v-deep .van-stepper__minus,
::v-deep .van-stepper__plus {
width: 1.63rem;
height: 1.63rem;
border: 0.06rem solid #7d8729;
border-radius: 50%;
background: transparent;
&::before {
background: #7d8729;
}
&::after {
background: #7d8729;
}
}
::v-deep .van-stepper__minus--disabled,
::v-deep .van-stepper__plus--disabled {
border-color: #ccc;
&::before {
background: #ccc;
}
&::after {
background: #ccc;
}
}
::v-deep .van-stepper__input {
background: transparent;
margin: 0 0.63rem;
width: 2.6rem;
}
</style>
<template>
<Navigater :title="t('ipo.title')" />
<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(var(--vh) * 100 - 3.13rem - 2.75rem)` }">
<view class="gupiao_list">
<view v-show="pageType === 0">
<view v-for="(item, index) in shengoulist" :key="index" class="gupiao1" @click="openWindow(item)">
<div class="top">
<div class="title">{{ item?.name }}</div>
<div class="daima">{{ item?.shuzidaima }}</div>
<div class="date">
<span>{{ t('ipo.shijian') }}</span>
<span>{{ item.chouqiandate }}</span>
</div>
</div>
<div class="bottom">
<div class="left">
<div class="row">
<div class="label">{{ t('ipo.jiage') }}</div>
<div class="value price">{{ changeMoney(item.chengxiaojia) }}</div>
</div>
<div class="row">
<div class="label">{{ t('ipo.shuliang') }}</div>
<div class="value">1000000</div>
</div>
</div>
<div class="right">{{ t('ipo.button1') }}</div>
</div>
</view>
<NotData v-if="shengoulist.length === 0"></NotData>
</view>
<view v-show="pageType === 1">
<NotData v-if="xinguApply.length === 0"></NotData>
<view v-for="(item, index) in xinguApply" :key="index" class="gupiao2">
<div class="top">
<div class="flex">
<div class="title">{{ item?.product?.name }}</div>
<div class="daima">{{ item?.product?.shuzidaima }}</div>
</div>
<div class="date">
<span>{{ t('jiaoyi.chouqianri') }}</span>
<span>{{ item?.product.chouqiandate }}</span>
</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('jiaoyi.jiage') }}</view>
<view class="value red">{{ changeMoney(item.price) }}</view>
</div>
<div class="right">
<view class="label">{{ t('jiaoyi.zhognqianshuliang') }}</view>
<view class="value">{{ item.zhongqianshu }}</view>
</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('jiaoyi.shenqingliang') }}</view>
<view class="value">{{ item.shengoushuliang }}</view>
</div>
<div class="right">
<view class="label">{{ t('jiaoyi.renjiaogushu') }}</view>
<view class="value">{{ item.renjiaonum || 0 }}</view>
</div>
</div>
<div class="row">
<div class="left">
<view class="label">{{ t('jiaoyi.txt1') }}</view>
<view class="value">{{ changeMoney(item.yingrenjiao) }}</view>
</div>
<div class="right">
<view class="label">{{ t('jiaoyi.txt2') }}</view>
<view class="value">{{ changeMoney(item.yirenjiao) }}</view>
</div>
</div>
<div class="button">{{ getText(item) }}</div>
</view>
</view>
</view>
</scroll-view>
<van-popup v-model:show="gupiaoWindowShow" class="buy_window" v-bind="windowOptions">
<div class="head">
<view class="title">{{ windowDetail.name }}</view>
<div class="daima">{{ windowDetail.shuzidaima }}</div>
</div>
<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') }}{{ t('ipo.zang') }}</view>
<van-stepper v-model="shengouParams.shuliang" step="1" />
</view>
<view class="button" @click="shengou">{{ t('gupiaoDetail.submit') }}</view>
<image class="close" src="/static/close.png" @click="gupiaoWindowShow = false"></image>
</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'
import { showLoadingToast, showToast } from 'vant'
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: 1000,
id: ''
})
const shengou = async () => {
showLoadingToast({ forbidClick: true, duration: 0 })
shengouParams.value.id = windowDetail.value.id
shengouParams.value.price = windowDetail.value.chengxiaojia
const res = await shengouApi(shengouParams.value)
getXinguApply()
gupiaoWindowShow.value = false
showToast({
message: res.data.msg
})
}
</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 {
height: 2.75rem;
margin: 0 0.94rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.31rem;
.button {
width: 50%;
height: 2.75rem;
border-radius: 0.7rem;
font-size: 0.88rem;
display: flex;
align-items: center;
justify-content: center;
border: 0.05rem solid $color-primary;
color: $color-black;
}
.active {
background: $color-primary;
border: 0.05rem solid $color-primary;
color: #fff;
font-weight: 500;
}
}
.gupiao_list {
padding: 1.25rem 0;
.gupiao1 {
margin: 0 1rem;
padding: 0.5rem 0.31rem;
border-bottom: 0.06rem solid #14141433;
margin-top: 0.63rem;
.top {
display: flex;
align-items: center;
justify-content: space-between;
.title {
max-width: 5.5rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 0.94rem;
font-weight: 500;
color: $color-black;
}
.daima {
height: 1.19rem;
background: $color-primary;
border-radius: 0.31rem;
color: #fff;
font-size: 0.75rem;
padding: 0 0.38rem;
display: flex;
align-items: center;
}
.date {
span {
color: #afafaf;
font-size: 0.75rem;
}
}
}
.bottom {
display: flex;
justify-content: space-between;
align-items: flex-end;
.row {
display: flex;
margin-top: 0.56rem;
align-items: center;
.label {
font-size: 0.81rem;
color: $color-gray;
}
.value {
font-size: 0.81rem;
color: $color-black;
}
.price {
color: $color-red;
}
}
.right {
width: 7.5rem;
height: 2.13rem;
background: $color-primary;
border-radius: 0.3rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
color: #fff;
font-weight: 500;
}
}
}
.gupiao2 {
margin: 0 1rem;
padding: 0.5rem 0.31rem;
margin-top: 0.63rem;
border-bottom: 1px solid rgba(20, 20, 20, 0.17);
.top {
display: flex;
align-items: center;
justify-content: space-between;
.flex {
gap: 1rem;
}
.title {
max-width: 5.5rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 0.94rem;
font-weight: 500;
color: $color-black;
}
.daima {
height: 1.19rem;
background: $color-primary;
border-radius: 0.31rem;
color: #fff;
font-size: 0.75rem;
padding: 0 0.38rem;
display: flex;
align-items: center;
}
.date {
span {
color: #afafaf;
font-size: 0.75rem;
}
}
}
.row {
display: flex;
justify-content: space-between;
height: 1.13rem;
align-items: center;
margin-top: 0.63rem;
.left,
.right {
display: flex;
.label {
color: $color-gray;
font-size: 0.81rem;
&::after {
content: ':';
}
}
.value {
color: $color-black;
font-size: 0.81rem;
}
}
}
.button {
height: 2.13rem;
background: $color-primary;
border-radius: 0.38rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
margin-top: 0.63rem;
color: #fff;
font-weight: 500;
}
}
}
.buy_window {
background-color: #fff;
height: 15.13rem;
padding: 1.88rem 1.25rem;
.close {
position: absolute;
width: 2.75rem;
height: 2.75rem;
padding: 1rem;
right: 0.5rem;
top: 0.5rem;
}
.head {
display: flex;
gap: 1.25rem;
align-items: center;
padding: 0 0.31rem;
position: relative;
.title {
font-size: 1rem;
color: #141414;
}
.daima {
height: 1.19rem;
background: $color-primary;
border-radius: 0.31rem;
font-size: 0.75rem;
color: #fff;
padding: 0 0.31rem;
display: flex;
justify-content: center;
align-items: center;
}
}
.row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.25rem 0.31rem 0;
color: #fff;
.value {
color: $color-red;
font-size: 0.88rem;
}
.label {
font-size: 0.88rem;
color: $color-gray;
}
}
.button {
height: 3.06rem;
line-height: 3.06rem;
width: 100%;
text-align: center;
border-radius: 0.38rem;
background: $color-primary;
color: #fff;
font-size: 0.81rem;
margin-top: 2rem;
}
.input_wrap {
border: 0.03rem solid $uni-color-primary;
padding: 0.12rem 0.5rem;
border-radius: 0.16rem;
}
}
::v-deep .van-stepper__minus,
::v-deep .van-stepper__plus {
width: 1.63rem;
height: 1.63rem;
border: 0.06rem solid #7d8729;
border-radius: 50%;
background: transparent;
&::before {
background: #7d8729;
}
&::after {
background: #7d8729;
}
}
::v-deep .van-stepper__minus--disabled,
::v-deep .van-stepper__plus--disabled {
border-color: #ccc;
&::before {
background: #ccc;
}
&::after {
background: #ccc;
}
}
::v-deep .van-stepper__input {
background: transparent;
margin: 0 0.63rem;
width: 2.6rem;
}
</style>
<template>
<view class="">
<view v-if="state == -1" class="body-box">
<div class="bg2"></div>
<Navigater :title="t('rongzi.title')" style="background-color: transparent" :style="{ color: '#fff' }" :arrow-style="{ color: '#fff' }" />
<scroll-view scroll-y :style="{ height: `calc(${store.pageHeight} - 3.125rem)`, position: 'relative' }">
<div class="bg"></div>
<view class="money">
<view class="money-bg">
<view class="tip-box">
<view class="tip">{{ t('rongzi.tip38') }}</view>
<view class="value"
>{{ t('rongzi.tip39') }}<span>{{ t('rongzi.tip40') }}</span></view
>
</view>
</view>
<view class="card">
<view class="tab-flex">
<view class="tab-li">
<view class="icon-box">
<div class="image_wrap">
<image src="/static/image/rongzi/icon1.png" class="icon"></image>
</div>
<view class="desc">{{ t('rongzi.tip1') }}</view>
</view>
<view class="main">{{ t('rongzi.tip2') }}</view>
</view>
<view class="tab-li">
<view class="icon-box">
<div class="image_wrap">
<image src="/static/image/rongzi/icon2.png" class="icon"></image>
</div>
<view class="desc">{{ t('rongzi.tip3') }}</view>
</view>
<view class="main">{{ t('rongzi.tip4') }}</view>
</view>
<view class="tab-li">
<view class="icon-box">
<div class="image_wrap">
<image src="/static/image/rongzi/icon3.png" class="icon"></image>
</div>
<view class="desc">{{ t('rongzi.tip5') }}</view>
</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>
<view class="sumbit" @click="saveSumbit()">{{ t('rongzi.tip24') }}</view>
</view>
</view>
</scroll-view>
</view>
<view v-else class="state-container">
<image v-if="state === 0" class="state-image" src="/static/image/rongzi/state11.png" mode="widthFix" />
<image v-if="state === 1" class="state-image1" src="/static/image/rongzi/state22.png" mode="widthFix" />
<image v-if="state === 2" class="state-image2" src="/static/image/rongzi/state33.png" mode="widthFix" />
<view v-if="state === 0" class="tip1" style="color: #222">{{ tip1 }}</view>
<view v-if="state === 1" class="tip1" style="color: #4e55af">{{ tip1 }}</view>
<view v-if="state === 2" class="tip1" style="color: #ee2560">{{ 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 bg from '@/static/image/rongzi/bg.png'
// import bg2 from '@/static/image/rongzi/bg2.png'
// import logo from '@/static/image/rongzi/logo.png'
import { useCounterStore } from '@/store/store'
import { closeToast, showToast } from 'vant'
const store = useCounterStore()
const { t } = 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)
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
}
}
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 params = ref({
money: null,
name: null,
card: null,
address: null,
phone: null,
mail: null,
income: null,
credit: null,
qualifications: null
})
let ist = true
const saveSumbit = async () => {
if (!ist) return
ist = false
if (params.value.money < 500000) {
ist = true
return showToast({
icon: 'none',
message: t('rongzi.tip33')
})
}
if (params.value.money > 3000000) {
ist = true
return showToast({
message: t('rongzi.tip34')
})
}
if (validInfo() === true) {
const res = await rongziApi(params.value)
ist = true
params.value = {
money: null,
name: null,
card: null,
address: null,
phone: null,
mail: null,
income: null,
credit: null,
qualifications: null
}
if (res.code === 1) {
state.value = 0
}
closeToast()
}
}
const validInfo = () => {
if (params.value.name && params.value.card && params.value.address && params.value.phone && params.value.mail) {
return true
} else {
showToast({
message: t('rongzi.tip35')
})
return false
}
}
</script>
<style scoped lang="scss">
.bg {
height: calc(var(--vh) * 100);
background: url('@/static/image/rongzi/bg2.png');
background-color: #000;
// opacity: 0.4;
background-size: 100% 100%;
width: 100%;
top: 0;
position: fixed;
z-index: -1;
}
.bg2 {
height: calc(var(--vh) * 100);
background: url('@/static/image/rongzi/bg2.png');
background-color: #000;
// opacity: 0.4;
background-size: 100% auto;
width: 100%;
top: 0;
height: 3.125rem;
position: fixed;
z-index: -1;
// display: none;
}
.uni-app--maxwidth {
overflow-x: hidden;
}
.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 {
position: relative;
width: 17.63rem;
height: 17.63rem;
margin: 0 auto;
background: url('@/static/image/rongzi/logo2.png');
background-size: 100% 100%;
.tip-box {
overflow: hidden;
.tip {
color: $color-black;
text-align: center;
font-family: 'PingFang SC';
font-size: 1.13rem;
font-style: normal;
font-weight: 600;
line-height: normal;
margin-top: 4.38rem;
// text-shadow: 0rem 0rem 0.23rem #4e55af;
}
.value {
color: $color-black;
text-align: center;
font-family: 'PingFang SC';
font-size: 2.375rem;
font-style: normal;
font-weight: 600;
line-height: normal;
margin-top: 1.88rem;
// text-shadow: 0rem 0rem 0.23rem #4e55af;
span {
color: $color-black;
font-family: 'PingFang SC';
font-size: 1.125rem;
font-style: normal;
font-weight: 600;
line-height: normal;
}
}
}
}
.top-bg {
width: 100%;
height: 18.75rem;
}
.tab-flex {
box-sizing: border-box;
display: flex;
justify-content: space-between;
width: 100%;
}
.card {
padding: 2.38rem 0.94rem 2rem;
}
.tab-li {
text-align: center;
width: 33%;
.icon-box {
border-radius: 1.25rem;
padding-top: 0.75rem;
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.image_wrap {
width: 3.56rem;
height: 3.56rem;
background: $color-primary;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
.icon {
width: 1.81rem;
height: 1.81rem;
}
.desc {
color: $color-black;
margin-top: 0.625rem;
font-size: 0.75rem;
width: 100%;
}
.main {
color: $color-gray;
margin-top: 0.3125rem;
font-size: 0.75rem;
}
}
.sq-txt {
margin: 0.625rem;
color: $color-black;
font-size: 1.125rem;
}
.color-gary {
font-size: 0.75rem;
margin: 0.3125rem 0.625rem;
uni-view {
color: $color-gray;
}
}
.info-box {
margin: 1.25rem 0.625rem;
border-radius: 0.625rem;
padding: 0.625rem;
}
.xian {
border-bottom: 0.0625rem solid #36394225;
}
.list {
line-height: 2.5rem;
display: flex;
align-items: center;
margin: 0.31rem 0;
width: 100%;
::v-deep .uni-input-input {
font-size: 0.875rem;
}
::v-deep .uni-input-placeholder {
font-size: 0.875rem;
}
}
.list .list-title {
width: 6.4375rem;
line-height: 1.375rem;
color: $color-gray;
}
.list > view {
font-size: 0.875rem;
}
.c-79 {
color: #797c84;
}
.mt-10 {
margin-top: 0.625rem;
}
input {
font-size: 1.125rem;
width: 100%;
height: 1.875rem;
line-height: 0.9375rem;
color: #988b7d;
border: 0.05rem solid #aeaeae;
border-radius: 0.38rem;
padding: 0 0.51rem;
}
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: $color-primary;
color: #fff;
font-weight: 500;
margin: 0.625rem;
border-radius: 0.5rem;
line-height: 3.125rem;
text-align: center;
}
.upload-Image {
display: flex;
align-items: center;
}
.ml-10 {
margin-left: 0.625rem;
}
.state-container {
overflow: hidden;
text-align: center;
overflow: hidden;
padding-top: 6.25rem;
.state-image {
width: 19.75rem;
margin: 0 auto -6.5625rem auto;
display: block;
}
.state-image1 {
width: 19.75rem;
margin: 0 auto -6.5625rem auto;
display: block;
}
.state-image2 {
width: 11.56rem;
margin: 2.8125rem auto 0.5625rem auto;
display: block;
}
.tip1 {
font-size: 1rem;
font-weight: 600;
color: #000;
}
.tip2 {
font-size: 0.8rem;
font-weight: 400;
color: #a6a6a6;
padding: 0.5rem 0 2.25rem 0;
margin: 0 1rem;
}
.but-box {
display: flex;
justify-content: space-around;
margin: 0 1.25rem;
gap: 0.94rem;
view {
flex: 1;
height: 2.9375rem;
line-height: 2.9375rem;
border-radius: 0.625rem;
}
.first {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
background: $color-primary;
color: #fff;
font-weight: 500;
border-radius: 0.5rem;
}
.last {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
border: 0.05rem solid $color-primary;
border-radius: 0.5rem;
color: $color-primary;
}
}
}
</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.png'
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">
.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-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, timestampToDate3 } 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 === 'price') {
detailRows.value[i].value = changeMoney(Number(detailRows.value[i].value))
}
if (key === 'buytime' || key === 'selltime') {
if (key === 'selltime') {
detailRows.value[i].value = detailRows.value[i].value ? timestampToDate3(detailRows.value[i].value * 1000) : '-'
} else {
// detailRows.value[i].value = timestampToDate3(detailRows.value[i].value)
}
} else if (key === 'shizhi') {
detailRows.value[i].value = changeMoney(detailRows.value[i].value)
}
}
console.log(res)
}
const tip1 = computed(() => (ismai.value === '1' ? t('jiaoyiDetail.shuliang1') : 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: $color-green !important;
}
.txt-red {
color: $color-red !important;
}
.info {
width: 20.9063rem;
padding: 0.8rem 0.8rem;
margin: 0.5rem auto 0;
border-top-right-radius: 1.25rem;
border-top-left-radius: 1.25rem;
.tag {
display: none;
height: 1rem;
border-radius: 0.1563rem;
color: #fff;
font-size: 0.625rem;
padding: 0 0.375rem;
margin-left: 0.3125rem;
}
.tt {
color: $color-black;
font-size: 1.19rem;
font-weight: 500;
}
.text-base {
font-size: 0.81rem;
color: #afafaf;
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: $color-gray;
font-size: 0.875rem;
}
.value {
color: $color-black;
font-size: 0.875rem;
}
}
}
</style>
<template>
<view class="container">
<view class="wrap">
<div class="header">
<img class="bg" :src="bg" />
<view class="title">{{ t('login.tip3') }}</view>
</div>
<view class="mas">
<view class="input_wrap">
<input v-model="loginParams.account" :placeholder="t('login.account_placeholder')" />
</view>
<view class="input_wrap">
<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 class="button circle_button" @click="goPage('/subPackages/register/register')">{{ t('register.tip4') }}</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 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: #fff;
}
.wrap {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
height: calc(var(--vh) * 100);
}
.header {
background: $color-primary;
width: 100%;
border-radius: 0 0 2.25rem 2.25rem;
margin-bottom: 2rem;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
.bg {
width: 10.13rem;
height: 10.13rem;
margin: 1.44rem auto 0;
border-radius: 0.31rem;
}
.title {
color: #fff;
font-size: 1.25rem;
font-weight: 600;
margin: 1rem 0 1.88rem;
}
}
.name {
margin: 2.3vh auto 9.54vh;
font-size: 1.5rem;
color: $uni-color-primary;
}
.button-wrap {
width: 20rem;
height: 3.125rem;
margin-top: 1.875rem;
.text {
color: #4a5567;
font-size: 0.9375rem;
line-height: 3.125rem;
}
.button {
background: $color-primary;
width: 100%;
font-weight: 500;
font-size: 1.13rem;
}
}
.mas {
width: 20rem;
height: 7.375rem;
border-radius: 1.25rem;
}
.input_wrap {
display: flex;
align-items: center;
height: 3.06rem;
border-radius: 0.5rem;
margin-bottom: 1.25rem;
background: #c8ccd299;
border-radius: 0.5rem;
// border: 0.06rem solid #afafaf;
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: #0b121b;
.uni-input-placeholder {
color: #afafaf;
}
}
}
.text_button {
max-width: 20rem;
font-size: $uni-font-size-1;
color: $color-black;
display: flex;
justify-content: space-between;
margin: 0.31rem auto;
view {
padding: 0.31rem;
}
}
.button {
width: 11.25rem;
height: 3.75rem;
background-color: $uni-color-primary;
border-radius: 0.5rem;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
.circle_button {
border: 0.06rem solid $color-primary;
background: transparent !important;
color: $color-black;
}
</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/logo.png" class="logo"></image>
<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: #ee2560;
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: #08182b;
// border: 1px solid #50aff0;
border-radius: 1.3438rem;
font-weight: 300;
font-size: 1rem;
color: #fff;
}
}
</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'
import { timestampToDate2 } from '@/common/common'
import { useCounterStore } from '@/store/store'
const store = useCounterStore()
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()
}
</script>
<template>
<Navigater :title="t('message.xiaoxi')" />
<view>
<scroll-view scroll-y :style="{ height: `calc(${store.pageHeight} - 3.125rem)` }">
<view v-for="(item, index) in UserMessageList" :key="index">
<view class="createtime">{{ timestampToDate2(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 { computed, 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 config 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 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()
})
let istrue = true
// 提交实名
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'))
}
if (!istrue) return
istrue = false
const res = await subRealnameApi(form.value)
setTimeout(() => {
istrue = true
}, 1000)
if (res.code === 1) {
showSuccessToast(res.msg)
setTimeout(() => {
getRealname()
store.getUserInfo()
}, 2000)
} else {
showToast(res.msg)
}
}
const baseURL = computed(() => {
return config.baseURL
})
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'))
}
try {
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({
title: t('real_name.tip16'),
mask: true
})
uni.uploadFile({
// url: '/api.php/common/upload', // 仅爲示例,非真实的接口地址
url: baseURL.value + '/common/upload?lang=' + uni.getStorageSync('locale'),
// url: 'https://adminjdhgjhs.jpinsoo.com/api.php/common/upload?lang=' + uni.getStorageSync('locale'), // 仅爲示例,非真实的接口地址
// url: 'https://admin.RADIXbackend.com/api.php/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', resData.data.fullurl)
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()
}
})
}
})
} catch (error) {
showToast(error + 'xxx')
}
}
</script>
<template>
<Navigator :title="t('real_name.realName')" />
<view v-if="form.status == '0'">
<view class="u-text-center u-font-xl" style="color: #222; font-weight: 500">{{ t('real_name.tip2') }}</view>
</view>
<view v-if="form.status == '1'">
<view class="u-text-center u-font-xl" style="color: #222; font-weight: 500">{{ t('real_name.tip7') }}</view>
</view>
<view v-if="form.status == 2" style="height: 3.13rem; 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' || form.status == '0'" :placeholder="t('real_name.tip9')" style="text-align: right" />
</view>
<view class="input-item">
<view class="input-item-lebal">{{ t('real_name.tip10') }}</view>
<input v-model="form.id_card" :disabled="form.status === '1' || form.status == '0'" 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/zheng1.png`" mode=""> </image>
<view style="font-size: 0.5rem; color: #2e3032; 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/fan1.png`" mode=""> </image>
<view style="font-size: 0.5rem; color: #2e3032; 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>
::v-deep .uni-toast__content {
color: #fff;
}
::v-deep .uni-toast {
padding: 0rem 0.63rem;
}
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;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 0.05rem solid #f2f4f6;
::v-deep .uni-input-placeholder {
font-weight: 500;
color: #fff;
font-size: 0.9375rem;
}
.input-item-lebal {
font-size: 0.8125rem;
color: #2e3032;
}
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;
image {
width: 10.4063rem;
height: 6.1875rem;
border-radius: 0.4063rem;
}
text {
padding-top: 12rpx;
}
}
.submit {
display: block;
height: 2.8125rem;
line-height: 2.8125rem;
text-align: center;
font-size: 1rem;
color: #fff;
font-weight: 500;
background: $color-primary;
border-radius: 0.5rem;
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;
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="container">
<view class="wrap">
<div class="header">
<view class="title">{{ t('register.tip4') }}</view>
</div>
<view class="mas">
<view class="input_wrap">
<input v-model="registerParams.account" :placeholder="t('register.account_placeholder')" />
</view>
<view class="input_wrap">
<input v-model="registerParams.password" :placeholder="t('register.password_placeholder')" type="password" />
</view>
<view class="input_wrap">
<input v-model="registerParams.again_password" :placeholder="t('register.password_again_placeholder')" type="password" />
</view>
<view class="input_wrap">
<input v-model="registerParams.yaoqingma" :placeholder="t('register.code_placeholder')" />
</view>
</view>
<view class="button-wrap">
<view class="button" @click="register">{{ t('register.tip4') }}</view>
<view class="button circle_button" @click="reLaunch('/subPackages/login/login')">{{ t('login.button_text') }}</view>
</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'
const { t } = useI18n()
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({ forbidClick: 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)
}
}
</script>
<style lang="scss" scoped>
.button-wrap {
width: 20rem;
height: 3.125rem;
justify-content: space-between;
align-content: center;
margin-top: 0.625rem;
.text {
color: #a6a6a6;
font-size: 0.9375rem;
line-height: 3.125rem;
}
.button {
font-size: 1.13rem;
}
}
.header {
background: $color-primary;
width: 100%;
border-radius: 0 0 2.25rem 2.25rem;
margin-bottom: 2rem;
}
.mas {
width: 20rem;
border-radius: 1.25rem;
}
body {
background: #fff;
}
.wrap {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.container {
text-align: center;
margin: 0 auto;
.bg {
width: 15.7188rem;
height: 12.8422rem;
margin: 0.5625rem auto 0;
}
.title {
color: #fff;
font-size: 1.125rem;
font-weight: 600;
margin: 5.25rem 0 1.75rem;
}
}
.logo {
width: 7.5rem;
height: 7.5rem;
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.06rem;
border-radius: 0.5rem;
background: #c8ccd299;
border-radius: 0.5rem;
// border: 0.06rem solid #afafaf;
margin-bottom: 0.94rem;
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: #0b121b;
.uni-input-placeholder {
color: #afafaf;
}
}
}
.button {
width: 100%;
height: 3.75rem;
background-color: $uni-color-primary;
border-radius: 0.5rem;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background: $color-primary;
font-weight: 500;
}
.circle_button {
border: 0.06rem solid $color-primary;
background: transparent !important;
margin-top: 1.25rem;
color: $color-black;
}
</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/arrow-left.png'
import { getColor } from '@/common/common'
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>
<div class="container">
<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/index/search.png" class="search-icon"></image>
<input v-model="code" :placeholder="t('search.tip3')" auto-focus @confirm="search" />
</view>
<view class="search_text" @click="search">{{ t('search.title') }}</view>
</view>
<view class="content">
<view v-if="!searchValue.length" class="keyword">
<view v-for="item in history" :key="item" class="keyword-list">
<view class="keyword-item" @click="clickSearch(item)">
<view class="keyword-item-left">{{ item }}</view>
<image src="/static/image/searchNavigation/close.png" class="keyword-close" @click.stop="delkeyword(item)" />
</view>
</view>
</view>
<view class="list">
<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">
<span class="title">{{ item.name }}{{ item.shuzidaima }} </span>
<span :class="getColor(item)">{{ item.price }}&nbsp; {{ item.zhangdieshu }}({{ item.zhangdiebaifenbi }}%)</span>
</view>
<van-icon name="arrow" color="#222"></van-icon>
</view>
</view>
</view>
</div>
</template>
<style lang="scss" scoped>
.container {
overflow: hidden;
}
.uni-input-placeholder {
font-size: 0.8125rem !important;
}
.nav {
width: 100%;
height: 3.125rem;
}
.top-box {
width: 100%;
height: 3.125rem;
display: flex;
align-items: center;
margin: 0.53rem 0;
gap: 1rem;
.search {
width: 4.375rem;
height: 2rem;
margin-left: 0.625rem;
margin-right: 0.9375rem;
}
.search_text {
color: $color-black;
font-size: 0.875rem;
padding-right: 1rem;
}
.input_wrap {
width: 14.375rem;
flex: 1;
height: 2.75rem;
border-radius: 1.25rem;
background: #f9f9f9;
line-height: 2.75rem;
padding: 0 0.94rem;
font-size: 0.9375rem;
display: flex;
align-items: center;
gap: 0.5rem;
.search-icon {
width: 1rem;
height: 1rem;
}
.input-placeholder {
color: #aeaeae;
}
}
}
.content {
width: 100%;
height: calc(var(--vh) * 100 - 3.125rem - 1.06rem);
overflow: auto;
.list {
.not-data {
text-align: center;
margin-top: 6.25rem;
color: #0e0e0e;
}
.list-item {
height: 4.0625rem;
// padding: 0 0.9375rem;
display: flex;
align-items: center;
justify-content: space-between;
// background-color: $uni-bg-color;
// padding: 1rem;
margin: 0 1rem;
border-bottom: 0.06rem solid #aeaeae;
.arrow {
width: 1.25rem;
height: 1.25rem;
}
.item-title {
height: 4.0625rem;
font-weight: 600;
font-size: $uni-font-size-lg;
color: $color-black;
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;
margin-top: 0.3125rem;
}
.title {
color: $color-black;
}
}
}
}
.keyword {
margin-top: 0.4375rem;
display: flex;
flex-flow: wrap;
font-size: $uni-font-size-2;
.keyword-item {
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;
}
}
}
}
::v-deep.uni-input-input {
color: $color-black !important;
font-size: 0.82rem !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>
<van-icon name="arrow"></van-icon>
</view>
<view class="form-item" @click="goPage('/subPackages/transactionPassions/transactionPassions')">
<view class="form-title">{{ t('seting.zijinmima') }}</view>
<van-icon name="arrow"></van-icon>
</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: $color-primary;
border-radius: 0.5rem;
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;
.form-title {
font-weight: 300;
font-size: $uni-font-size-2;
color: $color-black;
}
.form-val {
font-weight: 300;
font-size: $uni-font-size-2;
color: $color-black;
}
img {
height: 0.9688rem;
}
}
}
</style>
<script setup lang="ts">
import { computed, Ref, ref } from 'vue'
import { useI18n } from 'vue-i18n'
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="/static/image/user/language.png" />
<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 :class="{ check: item.val === locale }">{{ t(item.name) }}</span>
<img v-if="item.val === locale" src="/static/image/user/checked.png" />
<img v-else src="/static/image/user/circle.png" />
</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: 1.25rem;
height: 1.25rem;
margin-right: 0.625rem;
}
span {
color: $color-black;
font-size: 1rem;
font-weight: 500;
}
}
.list {
// background: #08182b;
margin-top: 0.9063rem;
.item {
width: 100%;
height: 3.125rem;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0.56rem;
align-items: center;
border-bottom: 0.06rem solid #c8ccd2;
.link {
width: 18.4375rem;
height: 0.0313rem;
}
span {
font-weight: 400;
font-size: 0.875rem;
color: $color-gray;
}
img {
width: 1rem;
}
.check {
color: $color-black;
}
}
}
</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(var(--vh) * 100 - 6.9rem)`, overflow: 'hidden' }" @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">
<div class="flex">
<div class="left">
<view class="list-item-shouru" style="color: #222; font-size: 0.9375rem; font-weight: 500">{{ props.value === 1 ? t('incomeLog.shourujilu') : t('incomeLog.zhichujilu') }}</view>
<view class="list-item-time" style="margin: 0.3rem 0">{{ t('incomeLog.dingdanbianhao') }}:{{ item.order_sn }}</view>
<view class="list-item-time" style="text-align: left">{{ item.createtime }}</view>
</div>
<div class="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>
</div>
</div>
</view>
</view>
</scroll-view>
</template>
<style lang="scss" scoped>
.list-box {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.25rem 0;
.list-item {
width: 21.5625rem;
display: flex;
flex-direction: column;
justify-content: space-between;
background: #fff;
padding: 0.625rem 0.625rem;
margin-bottom: 0.4375rem;
border-bottom: 1px solid #c8c8c8;
.flex {
display: flex;
justify-content: space-between;
align-items: center;
.right {
text-align: right;
}
}
.list-item-left {
display: flex;
align-items: center;
justify-content: space-between;
}
.list-item-right {
display: flex;
justify-content: space-between;
align-items: center;
}
.list-item-tag {
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: $color-gray;
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'
import { useCounterStore } from '@/store/store'
const store = useCounterStore()
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(${store.pageHeight} - 3.125rem)` }" @scrolltolower="bottomFn">
<NotData v-if="data.length === 0" />
<view class="list-box">
<view v-for="item in props.data" :key="item.id" class="item">
<div class="head">{{ item.name }}</div>
<div class="title">{{ item.gpName }}</div>
<div class="label">{{ item.gpCode }}</div>
<div class="label">{{ t('transactionLog.tip1') }}{{ item.order_sn }}</div>
<div class="row">
<div class="label">{{ item.createtime }}</div>
<div class="price" :class="item.money > 0 ? 'txt-red' : 'txt-green'">{{ changeMoney(item.money) }}</div>
</div>
</view>
</view>
</scroll-view>
</template>
<style lang="scss" scoped>
.txt-green {
color: #0cd17c;
}
.txt-red {
color: #ff0021;
}
.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 {
padding-bottom: 1.25rem;
padding: 0 1rem 1rem;
.item {
width: 100%;
padding: 1.3125rem 0.9375rem 0 0.9375rem;
box-sizing: border-box;
border-radius: 0.375rem;
margin-top: 0.625rem;
background: #fafafa;
box-shadow: 0px 4px 5.3px 0px rgba(0, 0, 0, 0.05);
border-bottom: 1px solid rgba(20, 20, 20, 0.14);
border-radius: 0.63rem;
padding: 0.63rem;
margin: 0.94rem 0;
.head {
font-size: 0.94rem;
font-weight: 500;
text-align: center;
color: $color-black;
position: relative;
margin-bottom: 1.13rem;
&::before {
content: '';
width: 4.38rem;
height: 0.1rem;
background: #d9d9d9;
border-radius: 0.19rem;
bottom: -0.16rem;
position: absolute;
left: calc(50% - 2.19rem);
}
}
.title {
color: $color-black;
font-size: 0.94rem;
font-weight: 500;
}
.label {
font-size: 0.81rem;
color: $color-gray;
}
.row {
display: flex;
justify-content: space-between;
align-items: center;
.price {
font-size: 1.44rem;
font-weight: 500;
}
}
.info-box {
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
} else {
isLs.value = false
tabValue.value = 1
}
})
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
tlPage.value = 1
tlData.value = []
czPage.value = 1
czData.value = []
getLiuShuiFn()
}
onMounted(() => {
getLiuShuiFn()
})
const jyData: Ref[JyType] = ref([])
const jyPage = ref(1)
const czData: Ref[CzType] = ref([])
const czPage = ref(1)
const tlData: Ref[CzType] = ref([])
const tlPage = ref(1)
const getLiuShuiFn = async () => {
showLoadingToast({
message: t('search.tip2'),
forbidClick: true,
loadingType: 'spinner'
})
isLoading.value = true
let page = 1
switch (tabValue.value) {
case 1:
page = czPage.value
break
case 2:
page = tlPage.value
break
case 3:
page = jyPage.value
break
}
const res = await getLiuShuiApi({ type: tabValue.value, page })
if (res.code === 1) {
if (tabValue.value === 3) {
if (res.data.data.length) {
jyPage.value++
}
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.value++
}
czData.value.push(element)
})
console.log(czData.value)
}
if (tabValue.value === 2) {
res.data.data.forEach((element) => {
if (res.data.data.length) {
tlPage.value++
}
tlData.value.push(element)
})
}
}
closeToast()
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]"> </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>
<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" />
</template>
<style lang="scss" scoped>
.list {
background: rgb(10, 30, 54, 0.5);
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 {
height: 100%;
}
.tab-box {
width: 100%;
padding: 0.8125rem 1.3125rem;
display: flex;
align-items: center;
gap: 0.63rem;
.tab-box-item.active {
background: $color-primary;
color: #fff;
}
.tab-box-item {
// width: 6.875rem;
flex: 1;
height: 2.13rem;
padding: 0.25rem 0.5rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.875rem;
color: $color-black;
border: 0.05rem solid $color-primary;
}
}
</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 { showLoadingToast, 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 () => {
showLoadingToast({ forbidClick: true, duration: 0 })
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: $color-black;
&::placeholder {
color: #afafaf;
}
}
::v-deep .van-field {
height: 3.375rem;
background: transparent;
}
::v-deep .van-field__body {
height: 3.375rem;
background: #fff;
border-radius: 0.5rem;
border: 0.06rem solid #afafaf;
padding: 1.0938rem 0.9375rem 0.9688rem 1.25rem;
.van-field__right-icon {
padding: 0;
margin-right: 0.625rem;
.van-icon__image {
width: 1.19rem;
}
}
}
::v-deep .van-button {
width: 100%;
height: 2.75rem;
background: $color-primary;
border-radius: 0.5rem;
font-size: 0.9375rem;
font-weight: 500;
margin: 2.5rem 1rem 0;
}
::v-deep .van-button__text {
color: #fff;
font-size: 0.9375rem;
font-weight: 500;
}
::v-deep .van-field {
padding: 0;
}
.Box {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 1rem;
.box-form-card {
width: 100%;
height: 31.9688rem;
display: flex;
flex-direction: column;
align-items: center;
.title {
font-weight: 500;
font-size: 1.1563rem;
color: #040404;
line-height: 1.1563rem;
margin-bottom: 1.875rem;
}
.box-form-item {
display: flex;
flex-direction: column;
margin-top: 0.9375rem;
position: relative;
width: 100%;
.box-form-item-label {
height: 2.75rem;
display: flex;
align-items: center;
font-weight: 500;
font-size: 0.875rem;
line-height: 0.75rem;
color: $color-black;
}
}
}
.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/img1.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')
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 < 10000) {
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="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">
<van-icon name="arrow"></van-icon>
</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">
<van-icon name="arrow"></van-icon>
</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;
display: flex;
justify-content: space-between;
align-items: center;
.bank-crad-left {
text-align: center;
color: $color-primary;
}
.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;
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-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;
.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: $color-black;
span {
color: $color-black;
}
}
.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: 8.13rem;
margin: 0 1rem;
border-radius: 0.94rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: $color-primary;
font-weight: 500;
font-size: 1.6rem;
color: #fff;
background-size: 100% 100%;
span {
color: #fff;
font-size: 0.94rem;
}
}
.box {
margin-top: 1.25rem;
padding-bottom: 1rem;
}
.recharge-box {
width: 100%;
margin-top: 0.4375rem;
padding: 1.2813rem 1.2188rem 1.0938rem 1.1563rem;
.sumbit {
width: 100%;
height: 3.06rem;
margin-top: 1.7188rem;
display: flex;
justify-content: center;
align-items: center;
background: $color-primary;
border-radius: 0.5rem;
::v-deep .van-button__text {
font-weight: 500;
font-size: 0.875rem;
color: #fff;
}
}
.van-field {
margin-top: 0.7188rem;
height: 3.06rem;
background: #fff;
border: 0.05rem solid #afafaf;
border-radius: 0.5rem;
display: flex;
align-items: center;
::v-deep .van-field__control {
line-height: 0;
font-size: 0.875rem;
color: $color-black;
&::placeholder {
color: #afafaf;
}
}
}
.a {
margin-top: 0.9063rem;
}
.recharge-box-title {
font-weight: 500;
font-size: 0.875rem;
color: $color-gray;
}
}
</style>
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #EE2560;
$uni-color-gray: #f8f8f8;
$uni-color-primary2: #50aff099;
$color-green: #00A389;
$color-red: #F52311;
$color-black: #141414;
$color-primary: #46B5F8;
$color-gray: #8C8F93;
$color-blue: #46B5F8;
/* 文字基本颜色 */
$uni-text-color: #0e0e0e; //基本色
$uni-text-color-gray: #a5a5a5;
$uni-text-color-red: #FF6254;
$uni-text-color-green: #00A389;
/* 背景颜色 */
$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
// 测试
// const baseURL = 'http://43.154.152.121:9905/api'\
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) => {
const token = uni.getStorageSync('token')
config.headers.token = token
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') }
}
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',
// host: '192.168.1.116',
port: 8080, // 端口号
hmr: true,
open: false, // 启动后是否自动打开浏览器 server: {
proxy: {
'^/api': {
target: 'http://129.226.60.49:9905/', // 目标源,目标服务器,真实请求地址
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']
}
}
}
})
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