Compare commits
24 Commits
John-i18n
...
feature-sa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7d8474d0f | ||
|
|
347bb325ca | ||
|
|
dd79e7d8f3 | ||
|
|
a63af86c8a | ||
|
|
c4d08818e3 | ||
|
|
3546ef9958 | ||
|
|
5b3bc02a6e | ||
|
|
82e9f90cf2 | ||
|
|
e38a67e782 | ||
|
|
bfbec3a56e | ||
|
|
70a3efb430 | ||
|
|
98756790af | ||
|
|
55f495f930 | ||
|
|
956e402ad3 | ||
|
|
28a70dc261 | ||
|
|
2bebd96f82 | ||
|
|
52e00d6606 | ||
|
|
8a171ae091 | ||
|
|
7d8a0c4c11 | ||
|
|
c3de0a8fb6 | ||
|
|
bc7b6e798e | ||
|
|
da7f6af6be | ||
|
|
b6677f8a49 | ||
|
|
bd9644d273 |
106
index.html
106
index.html
@@ -13,9 +13,113 @@
|
||||
|
||||
|
||||
<title>loan</title>
|
||||
<style>
|
||||
.first-loading-wrap {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.first-loading-wrap > h1 {
|
||||
font-size: 128px
|
||||
}
|
||||
|
||||
.first-loading-wrap .loading-wrap {
|
||||
padding: 98px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.dot {
|
||||
animation: antRotate 1.2s infinite linear;
|
||||
transform: rotate(45deg);
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
font-size: 32px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
box-sizing: border-box
|
||||
}
|
||||
|
||||
.dot i {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
position: absolute;
|
||||
display: block;
|
||||
background-color: #1890ff;
|
||||
border-radius: 100%;
|
||||
transform: scale(.75);
|
||||
transform-origin: 50% 50%;
|
||||
opacity: .3;
|
||||
animation: antSpinMove 1s infinite linear alternate
|
||||
}
|
||||
|
||||
.dot i:nth-child(1) {
|
||||
top: 0;
|
||||
left: 0
|
||||
}
|
||||
|
||||
.dot i:nth-child(2) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
-webkit-animation-delay: .4s;
|
||||
animation-delay: .4s
|
||||
}
|
||||
|
||||
.dot i:nth-child(3) {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
-webkit-animation-delay: .8s;
|
||||
animation-delay: .8s
|
||||
}
|
||||
|
||||
.dot i:nth-child(4) {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
-webkit-animation-delay: 1.2s;
|
||||
animation-delay: 1.2s
|
||||
}
|
||||
|
||||
@keyframes antRotate {
|
||||
to {
|
||||
-webkit-transform: rotate(405deg);
|
||||
transform: rotate(405deg)
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes antRotate {
|
||||
to {
|
||||
-webkit-transform: rotate(405deg);
|
||||
transform: rotate(405deg)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes antSpinMove {
|
||||
to {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes antSpinMove {
|
||||
to {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<div id="app">
|
||||
<div class="first-loading-wrap">
|
||||
<div class="loading-wrap">
|
||||
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
||||
</div>
|
||||
网络检测中...
|
||||
</div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
12902
package-lock.json
generated
12902
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@@ -39,25 +39,14 @@
|
||||
"weixin-js-sdk": "^1.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.15.5",
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"fs-extra": "^11.0.0",
|
||||
"postcss": "^8.3.8",
|
||||
"postcss-loader": "^6.1.1",
|
||||
"postcss-px-to-viewport-8-plugin": "^1.2.1",
|
||||
"sass": "^1.59.3",
|
||||
"typescript": "^4.9.3",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vite": "^4.2.3",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-tsc": "^1.2.0",
|
||||
"vue-types": "^4.2.1",
|
||||
"@commitlint/cli": "^17.3.0",
|
||||
"@commitlint/config-conventional": "^17.3.0",
|
||||
"@eslint/create-config": "^0.4.1",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^18.15.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.1",
|
||||
"@typescript-eslint/parser": "^5.45.1",
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.0",
|
||||
"@vue/compiler-sfc": "^3.2.45",
|
||||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
@@ -78,29 +67,41 @@
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-vue": "^9.8.0",
|
||||
"esno": "^0.16.3",
|
||||
"fs-extra": "^11.0.0",
|
||||
"gh-pages": "^4.0.0",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.3.1",
|
||||
"lint-staged": "^13.1.0",
|
||||
"postcss": "^8.3.8",
|
||||
"postcss-loader": "^6.1.1",
|
||||
"postcss-px-to-viewport-8-plugin": "^1.2.1",
|
||||
"prettier": "^2.7.1",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup-plugin-visualizer": "^5.9.0",
|
||||
"sass": "^1.59.3",
|
||||
"stylelint": "^14.16.0",
|
||||
"stylelint-config-prettier": "^9.0.4",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"stylelint-scss": "^4.3.0",
|
||||
"typescript": "^4.9.3",
|
||||
"unplugin-auto-import": "^0.12.0",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vite": "^4.2.3",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-style-import": "^2.0.0",
|
||||
"vite-plugin-top-level-await": "^1.4.1",
|
||||
"vue-demi": "^0.13.11",
|
||||
"vue-draggable-next": "^2.1.1",
|
||||
"vue-eslint-parser": "^9.1.0",
|
||||
"vue-global-api": "^0.4.1"
|
||||
"vue-global-api": "^0.4.1",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-tsc": "^1.2.0",
|
||||
"vue-types": "^4.2.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.4.21"
|
||||
|
||||
5
public/config.json
Normal file
5
public/config.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"tenantId": "000000",
|
||||
"apiUrl": "",
|
||||
"apiUrlList": []
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://baidu.com,https://jingdong.com
|
||||
|
||||
22
src/App.vue
22
src/App.vue
@@ -19,24 +19,24 @@
|
||||
import { getDefaultLocal } from '@/api/system/user';
|
||||
const lang = localStorage.getItem('lang')
|
||||
|
||||
const _getDefaultLocal = () => {
|
||||
getDefaultLocal().then(res => {
|
||||
console.log('res', res)
|
||||
if (lang !== res) {
|
||||
localStorage.setItem('lang', res)
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
const init = async () => {
|
||||
const defaultLocal = await getDefaultLocal()
|
||||
if (lang !== defaultLocal.defaultLocal) {
|
||||
localStorage.setItem('lang', defaultLocal.defaultLocal)
|
||||
localStorage.setItem('defaultCoinUnit', defaultLocal.defaultCoinUnit)
|
||||
location.reload()
|
||||
}
|
||||
}
|
||||
|
||||
_getDefaultLocal()
|
||||
init()
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
@import "style/index.scss";
|
||||
body {
|
||||
//background-color: #f8f8f8;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -57,7 +57,7 @@ export function getUserInfo() {
|
||||
*/
|
||||
export function getOssPolicyInfo() {
|
||||
return http.request({
|
||||
url: `${baseUrl}/v2/common/sts`,
|
||||
url: `${baseUrl}/app/v2/common/sts`,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
@@ -66,7 +66,7 @@ export function getOssPolicyInfo() {
|
||||
*/
|
||||
export function uploadCommon(file, onUploadProgress?) {
|
||||
return http.uploadFile({
|
||||
url: `${baseUrl}/v2/common/upload`,
|
||||
url: `${baseUrl}/app/v2/common/upload`,
|
||||
method: 'POST',
|
||||
onUploadProgress: (progressEvent) => {
|
||||
onUploadProgress && onUploadProgress(progressEvent)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { http } from '@/utils/http/axios';
|
||||
|
||||
const baseUrl = '/api'
|
||||
const baseUrl = '/api/app'
|
||||
|
||||
export function getDomainList(){
|
||||
return http.request({
|
||||
@@ -91,7 +91,7 @@ export function updatePwd(data) {
|
||||
*/
|
||||
export function getUserInfo() {
|
||||
return http.request({
|
||||
url: `${baseUrl}/app/customer/info`,
|
||||
url: `${baseUrl}/customer/info`,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
@@ -103,7 +103,7 @@ export function getUserInfo() {
|
||||
*/
|
||||
export function closeAmount() {
|
||||
return http.request({
|
||||
url: `${baseUrl}/app/user/close/amount`,
|
||||
url: `${baseUrl}/user/close/amount`,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { http } from '@/utils/http/axios';
|
||||
|
||||
|
||||
|
||||
const baseUrl = '/api'
|
||||
const baseUrl = '/api/app'
|
||||
|
||||
/**
|
||||
* @description: getLoansInfo
|
||||
@@ -20,7 +20,7 @@ export function getDefaultLocal() {
|
||||
lang = 'gu_IN'
|
||||
}
|
||||
return http.request({
|
||||
url: `${baseUrl}/app/home/loans/defaultLocal`,
|
||||
url: `${baseUrl}/home/loans/defaultLocal`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
lang
|
||||
|
||||
6
src/config/000000.ts
Normal file
6
src/config/000000.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Config } from '@/config/index';
|
||||
|
||||
export const config: Config = {
|
||||
tenantId: '000000',
|
||||
apiUrl: 'http://124.222.254.188:8889'
|
||||
}
|
||||
87
src/config/index.ts
Normal file
87
src/config/index.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
export type Config = {
|
||||
tenantId: string;
|
||||
apiUrl: string;
|
||||
}
|
||||
|
||||
export const getConfig = async (): Promise<Config> => {
|
||||
const configStr = await fetch('/config.json').then(res => res.text())
|
||||
const sassUrlStr = await fetch('https://apk-web.s3.ap-east-1.amazonaws.com/sass').then(res => res.text())
|
||||
|
||||
const config = JSON.parse(configStr) as Config
|
||||
config.apiUrl = ''
|
||||
// sassUrlStr逗号分隔
|
||||
const sassUrlList = sassUrlStr.split(',')
|
||||
console.log(sassUrlList)
|
||||
if (sassUrlList.length === 1) {
|
||||
config.apiUrl = sassUrlList[0]
|
||||
return config
|
||||
}
|
||||
for (const item of sassUrlList) {
|
||||
const url = item + '/api/app/check'
|
||||
// 判断url是否连通
|
||||
try {
|
||||
const newVar = await fetchWithTimeout(url, 1000).then(res => res.json())
|
||||
if (newVar.code === 200) {
|
||||
config.apiUrl = item
|
||||
return config
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
if (config.apiUrl === '') {
|
||||
config.apiUrl = sassUrlList[sassUrlList.length - 1]
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
function fetchWithTimeout(url, timeout) {
|
||||
// 创建一个在指定时间后拒绝的Promise
|
||||
const timeoutPromise = new Promise((_, reject) => {
|
||||
let id = setTimeout(() => {
|
||||
clearTimeout(id);
|
||||
reject(`Fetch timed out after ${timeout} ms`);
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
// 使用fetch发起请求
|
||||
const fetchPromise = fetch(url);
|
||||
|
||||
// 使用Promise.race来等待第一个Promise解析或拒绝
|
||||
return Promise.race([
|
||||
fetchPromise,
|
||||
timeoutPromise
|
||||
]);
|
||||
}
|
||||
|
||||
// 配置文件
|
||||
const t_000000: Config = {
|
||||
tenantId: '000000',
|
||||
apiUrl: ''
|
||||
}
|
||||
|
||||
|
||||
// export const getConfig = (tenantId: string): Config => {
|
||||
//
|
||||
// // TODO: 读取配置文件
|
||||
// const config = import(`${tenantId}.ts`)
|
||||
//
|
||||
// console.log('res ======222222222222=========> ')
|
||||
// console.log(config)
|
||||
// console.log(config)
|
||||
// if (!config) {
|
||||
//
|
||||
// }
|
||||
// config.then((res) => {
|
||||
//
|
||||
// console.log('res ======222222222222=========> ')
|
||||
// console.log(res)
|
||||
// console.log(res)
|
||||
// })
|
||||
//
|
||||
//
|
||||
// return {
|
||||
// tenantId: '000000'
|
||||
// }
|
||||
// }
|
||||
@@ -4,6 +4,7 @@
|
||||
export enum ResultEnum {
|
||||
SUCCESS = 200,
|
||||
ERROR = 400,
|
||||
ERROR_401 = 401,
|
||||
TIMEOUT = 10042,
|
||||
TYPE = 'success',
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export default {
|
||||
info: 'Info',
|
||||
success: 'Success',
|
||||
withdrawalAmount: 'Withdrawal Amount',
|
||||
withdrawCode: 'Withdrawal Code',
|
||||
pleaseWithdrawalAmount: 'Please enter the withdrawal amount',
|
||||
submit: 'Submit',
|
||||
submittedSuccessfully: 'Successfully submitted',
|
||||
@@ -55,14 +56,14 @@ export default {
|
||||
},
|
||||
home: {
|
||||
productDetails: 'Product Details',
|
||||
minimumDailyInterestRate: 'Minimum Daily Interest Rate',
|
||||
minimumDailyInterestRate: 'Minimum Month Interest Rate',
|
||||
borrowingLimit: 'Borrowing Limit',
|
||||
installmentPeriod: 'Installment Period',
|
||||
optional: 'Optional',
|
||||
applicationAmount: 'Application Amount',
|
||||
loanTerm: 'Loan Term',
|
||||
repaymentPerInstallment: 'Repayment Per Installment',
|
||||
dailyInterestRate: 'Daily Interest Rate',
|
||||
dailyInterestRate: 'Month Interest Rate',
|
||||
totalInterest: 'Total Interest',
|
||||
successfulBorrowing: 'Successful Borrowing',
|
||||
enterAgreement: 'I have read and agreed to',
|
||||
@@ -87,7 +88,7 @@ export default {
|
||||
loan: 'My Loans',
|
||||
balance: 'Account Balance',
|
||||
amountToBeRepaid: 'Amount to Be Repaid',
|
||||
immediateWithdrawal: 'Borrow Now',
|
||||
immediateWithdrawal: 'Withdraw immediately',
|
||||
financialSecurity: 'Account funds security is guaranteed by the bank',
|
||||
},
|
||||
borrowInfo: {
|
||||
@@ -112,8 +113,8 @@ export default {
|
||||
photographPrompt: 'Please confirm that the camera permission is enabled.',
|
||||
name: 'Name',
|
||||
idCard: 'ID Card Number',
|
||||
idCardUp1: 'Click to upload the front side of your ID card',
|
||||
idCardUp2: 'Click to upload the back side of your ID card (with the national emblem)',
|
||||
idCardUp1: 'Click to upload documents like person\'s face',
|
||||
idCardUp2: 'Click to upload the back of the certificate',
|
||||
idCardUp3: 'Click to upload a photo holding your ID card',
|
||||
shootingRequirements: 'Photography Requirements',
|
||||
standardShooting: 'Standard Shooting',
|
||||
@@ -134,6 +135,7 @@ export default {
|
||||
spouse: 'Spouse',
|
||||
children: 'Children',
|
||||
grandparents: 'Grandparents',
|
||||
friend: 'friend',
|
||||
bankOfDeposit: 'Bank of Deposit',
|
||||
bankCard: 'Bank Card Number',
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@ export default {
|
||||
info: 'जानकारी',
|
||||
success: 'सफल',
|
||||
withdrawalAmount: 'निकासी राशि',
|
||||
withdrawCode: 'विचड्रावेल कोड',
|
||||
pleaseWithdrawalAmount: 'कृपया निकासी राशि दर्ज करें',
|
||||
submit: 'सबमिट',
|
||||
submittedSuccessfully: 'सफलतापूर्वक सबमिट',
|
||||
@@ -87,7 +88,7 @@ export default {
|
||||
loan: 'मेरी ऋण',
|
||||
balance: 'खाता शेष',
|
||||
amountToBeRepaid: 'प्रतिपूर्ति के लिए राशि',
|
||||
immediateWithdrawal: 'तुरंत ऋण लेना',
|
||||
immediateWithdrawal: 'तुरंत वापस लें',
|
||||
financialSecurity: 'खाता धन सुरक्षा बैंक द्वारा सुरक्षित',
|
||||
},
|
||||
borrowInfo: {
|
||||
@@ -134,6 +135,7 @@ export default {
|
||||
spouse: 'पति/पत्नी',
|
||||
children: 'बच्चे',
|
||||
grandparents: 'दादा-दादी',
|
||||
friend: 'मित्र',
|
||||
bankOfDeposit: 'खाता खोलने वाला बैंक',
|
||||
bankCard: 'बैंक कार्ड नंबर',
|
||||
},
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
success: 'Sukses',
|
||||
withdrawalAmount: 'Jumlah Penarikan',
|
||||
pleaseWithdrawalAmount: 'Jumlah Penarikan',
|
||||
withdrawCode: 'Kode tarik',
|
||||
submit: 'Kirim',
|
||||
submittedSuccessfully: 'Pengiriman Sukses',
|
||||
submitApplication: 'Kirim Aplikasi',
|
||||
@@ -87,7 +88,7 @@ export default {
|
||||
loan: 'Pinjaman Saya',
|
||||
balance: 'Saldo Akun',
|
||||
amountToBeRepaid: 'Jumlah Yang Harus Dibayar Kembali',
|
||||
immediateWithdrawal: 'Pinjaman Segera',
|
||||
immediateWithdrawal: 'Tarik segera',
|
||||
financialSecurity: 'Keamanan dana akun dijamin oleh bank',
|
||||
},
|
||||
borrowInfo: {
|
||||
@@ -134,6 +135,7 @@ export default {
|
||||
spouse: 'Pasangan',
|
||||
children: 'Anak',
|
||||
grandparents: 'Kakek-nenek',
|
||||
friend: 'teman',
|
||||
bankOfDeposit: 'Bank tempat rekening',
|
||||
bankCard: 'Nomor rekening bank',
|
||||
},
|
||||
@@ -159,4 +161,4 @@ export default {
|
||||
forget: 'Lupa Kata Sandi',
|
||||
agreement: 'Perjanjian',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
success: '成功',
|
||||
withdrawalAmount: '提现金额',
|
||||
pleaseWithdrawalAmount: '提现金额',
|
||||
withdrawCode: '提现码',
|
||||
submit: '提交',
|
||||
submittedSuccessfully: '提交成功',
|
||||
submitApplication: '提交申请',
|
||||
@@ -55,14 +56,14 @@ export default {
|
||||
},
|
||||
home: {
|
||||
productDetails: '产品详情',
|
||||
minimumDailyInterestRate: '最低日息',
|
||||
minimumDailyInterestRate: '最低月息',
|
||||
borrowingLimit: '借款额度',
|
||||
installmentPeriod: '分期期限',
|
||||
optional: '可选',
|
||||
applicationAmount: '申请金额',
|
||||
loanTerm: '借款期限',
|
||||
repaymentPerInstallment: '每期还款',
|
||||
dailyInterestRate: '日利率',
|
||||
dailyInterestRate: '月利率',
|
||||
totalInterest: '总利息',
|
||||
successfulBorrowing: '成功借款',
|
||||
enterAgreement: '我已阅读并同意',
|
||||
@@ -87,7 +88,7 @@ export default {
|
||||
loan: '我的贷款',
|
||||
balance: '账户余额',
|
||||
amountToBeRepaid: '待还款金额',
|
||||
immediateWithdrawal: '立即借款',
|
||||
immediateWithdrawal: '立即提现',
|
||||
financialSecurity: '账户资金安全由银行保障',
|
||||
},
|
||||
borrowInfo: {
|
||||
@@ -134,6 +135,7 @@ export default {
|
||||
spouse: '配偶',
|
||||
children: '子女',
|
||||
grandparents: '祖父母',
|
||||
friend: '朋友',
|
||||
bankOfDeposit: '开户银行',
|
||||
bankCard: '银行卡号',
|
||||
},
|
||||
|
||||
@@ -15,10 +15,13 @@ import { RequestOptions, Result, CreateAxiosOptions } from './types';
|
||||
|
||||
import { useUserStoreWidthOut } from '@/store/modules/user';
|
||||
import {domainStoreWidthOut} from "@/store/modules/domain";
|
||||
import { getConfig } from '@/config';
|
||||
import { storage } from '@/utils/Storage';
|
||||
|
||||
const urlPrefix = '';
|
||||
const tenantConfig = await getConfig();
|
||||
|
||||
// import router from '@/router';
|
||||
import router from '@/router';
|
||||
// import { storage } from '@/utils/Storage';
|
||||
|
||||
/**
|
||||
@@ -101,6 +104,11 @@ const transform: AxiosTransform = {
|
||||
case ResultEnum.ERROR:
|
||||
showFailToast(errorMsg);
|
||||
break;
|
||||
case ResultEnum.ERROR_401:
|
||||
storage.clear();
|
||||
showFailToast(errorMsg);
|
||||
router.replace('/login')
|
||||
break;
|
||||
// 登录超时
|
||||
// case ResultEnum.TIMEOUT:
|
||||
// const LoginName = PageEnum.BASE_LOGIN_NAME;
|
||||
@@ -138,9 +146,8 @@ const transform: AxiosTransform = {
|
||||
if(config.url && config.url.endsWith("domain.txt")){
|
||||
return config
|
||||
}else if(domain && domain.length > 0){
|
||||
// let domainUrl = domain[Math.floor((Math.random()*domain.length))];
|
||||
// config.url = domainUrl + config.url;
|
||||
// config.url = domainUrl + config.url;
|
||||
let domainUrl = domain[Math.floor((Math.random()*domain.length))];
|
||||
config.url = domainUrl + config.url;
|
||||
}else if(apiUrl && isString(apiUrl)){
|
||||
config.url = `${apiUrl}${config.url}`;
|
||||
}
|
||||
@@ -198,11 +205,12 @@ const transform: AxiosTransform = {
|
||||
const token = userStore.getToken;
|
||||
headers.TYPE = 'TBS'
|
||||
headers.channelId = 'MP'
|
||||
headers['Tenant-ID'] = tenantConfig.tenantId
|
||||
if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
|
||||
// jwt token
|
||||
headers.Authorization = options.authenticationScheme
|
||||
headers.Authorization = 'Bearer ' + (options.authenticationScheme
|
||||
? `${options.authenticationScheme} ${token}`
|
||||
: token;
|
||||
: token);
|
||||
}
|
||||
return config;
|
||||
},
|
||||
@@ -278,8 +286,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
|
||||
// 消息提示类型
|
||||
errorMessageMode: 'none',
|
||||
// 接口地址
|
||||
// apiUrl: 'https://fhusdbs.vbg2c.top',
|
||||
apiUrl: '',
|
||||
apiUrl: tenantConfig.apiUrl,
|
||||
// apiUrl: '',
|
||||
// 接口拼接地址
|
||||
urlPrefix: urlPrefix,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {isObject} from "@/utils/is";
|
||||
import { showToast } from 'vant';
|
||||
|
||||
/** px 转 vw, 375 是设置的屏幕宽度 */
|
||||
export const px2vw = (px: number): string => {
|
||||
@@ -75,12 +76,22 @@ export function toThousand(value) {
|
||||
|
||||
// ¥6,285.00
|
||||
export function toRoundMark(value: number | string) {
|
||||
value = value || 0
|
||||
const options = {
|
||||
style: 'currency',
|
||||
currency: 'CNY',
|
||||
};
|
||||
return value.toLocaleString('zh-CN', options)
|
||||
const money = value || 0
|
||||
const lang = localStorage.getItem('lang')
|
||||
// 'zh_CN'
|
||||
// 'hi_IN'
|
||||
// 'id_ID'
|
||||
// 'en_US'
|
||||
// 根据语言设置不同的格式
|
||||
if (lang === 'zh_CN') {
|
||||
return money.toLocaleString('zh-CN', { style: 'currency', currency: 'CNY' })
|
||||
} else if (lang === 'hi_IN'){
|
||||
return money.toLocaleString('hi-IN', { style: 'currency', currency: 'INR' })
|
||||
} else if (lang === 'id_ID'){
|
||||
return money.toLocaleString('id-ID', { style: 'currency', currency: 'IDR' })
|
||||
} else {
|
||||
return money.toLocaleString('en-US', { style: 'currency', currency: 'USD' })
|
||||
}
|
||||
}
|
||||
|
||||
// 6285.00
|
||||
@@ -275,4 +286,21 @@ export function debounce(func: Function, time: number, immediate = false) {
|
||||
}, time)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function copyToClipboard(text) {
|
||||
// 用原生的方式把微信码复制到剪切板
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = text;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
showToast('内容已复制到剪贴板')
|
||||
} catch (err) {
|
||||
console.error('无法复制内容', err);
|
||||
} finally {
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<view>{{ $t('borrowInfo.loanDetails') }}</view>
|
||||
</view>
|
||||
<van-cell :title="$t('borrowInfo.loanNo')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.tradeNo" />
|
||||
<van-cell :title="$t('borrowInfo.loanAmount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(borrowInfo.totalLoanMoney)" />
|
||||
<van-cell :title="$t('borrowInfo.loanAmount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="defaultCoinUnit + borrowInfo.totalLoanMoney" />
|
||||
<!-- <van-cell title="借款期限" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.totalMonth + '个月'" />-->
|
||||
<van-cell :title="$t('borrowInfo.loanCycle')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.totalMonth + $t('app.month')" />
|
||||
<van-cell :title="$t('borrowInfo.withdrawalBank')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.bankType" />
|
||||
<van-cell :title="$t('borrowInfo.repaymentPerInstallment')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(borrowInfo.avgRepayment)" />
|
||||
<van-cell :title="$t('borrowInfo.repaymentPerInstallment')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="defaultCoinUnit + borrowInfo.avgRepayment" />
|
||||
<van-cell :title="$t('borrowInfo.describe')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.noteRemark" />
|
||||
|
||||
|
||||
@@ -45,12 +45,12 @@ import {onMounted, reactive, ref} from "vue";
|
||||
import {getBorrowInfo, getUserInfo} from "@/api";
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
import {useRoute} from "vue-router";
|
||||
import {toRoundMark} from "@/utils";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const route = useRoute()
|
||||
const active = ref(0);
|
||||
const { t } = useI18n()
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
|
||||
const stepBorrow = reactive({
|
||||
"borrowNameStyle": "",
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<div class="product-content">
|
||||
<div class="product-content-label">
|
||||
<div>{{$t('home.minimumDailyInterestRate')}}</div>
|
||||
<div><span>{{ calLoan.loanRate }}%</span></div>
|
||||
<div><span>{{ loans.minMonthRate }}%</span></div>
|
||||
</div>
|
||||
<div class="product-content-label">
|
||||
<div>{{$t('home.borrowingLimit')}}</div>
|
||||
<div><span>¥{{ loans.loansMinAccount }}-{{ loans.loansMaxAccount }}</span></div>
|
||||
<div><span>{{ defaultCoinUnit }}{{ loans.loansMinAccount }}-{{ loans.loansMaxAccount }}</span></div>
|
||||
</div>
|
||||
<div class="product-content-label">
|
||||
<div>{{$t('home.installmentPeriod')}}</div>
|
||||
@@ -33,22 +33,22 @@
|
||||
|
||||
|
||||
<div class="apply">
|
||||
<div class="apply-title yellow_color">{{$t('home.applicationAmount')}}({{$t('app.yuan')}})</div>
|
||||
<div class="apply-title yellow_color">{{$t('home.applicationAmount')}}({{defaultCoinUnit}})</div>
|
||||
|
||||
<div class="apply-money">{{ strip }}</div>
|
||||
|
||||
<div class="apply-strip-box">
|
||||
<div class="reduce" @click="moneyReduce(100)"></div>
|
||||
<div class="reduce" @click="moneyReduce(1000)"></div>
|
||||
|
||||
<div class="slider">
|
||||
<van-slider bar-height="16" active-color="linear-gradient(to bottom, #f3654d, #f9ad7d)" :max="loans.loansMaxAccount" :min="loans.loansMinAccount" :step="100" v-model="strip">
|
||||
<van-slider bar-height="16" active-color="linear-gradient(to bottom, #f3654d, #f9ad7d)" :max="loans.loansMaxAccount" :min="loans.loansMinAccount" :step="1000" v-model="strip">
|
||||
<template #button>
|
||||
<div class="custom-button"></div>
|
||||
</template>
|
||||
</van-slider>
|
||||
</div>
|
||||
|
||||
<div class="add" @click="moneyAdd(100)"></div>
|
||||
<div class="add" @click="moneyAdd(1000)"></div>
|
||||
</div>
|
||||
|
||||
<div class="apply-jkqx">
|
||||
@@ -64,8 +64,8 @@
|
||||
|
||||
<div class="apply-mqhk">
|
||||
<div>{{ $t('home.repaymentPerInstallment') }}</div>
|
||||
<div>¥{{ calLoan.avgRepayment }}</div>
|
||||
<div>({{ $t('home.dailyInterestRate') }}{{ calLoan.loanRate }}% {{ $t('home.totalInterest') }}¥{{ calLoan.totalInterest }})</div>
|
||||
<div>{{ defaultCoinUnit }}{{ calLoan.avgRepayment }}</div>
|
||||
<div>({{ $t('home.dailyInterestRate') }}{{ calLoan.loanRateMonth*100 }}% {{ $t('home.totalInterest') }}{{ defaultCoinUnit }}{{ calLoan.totalInterest }})</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
<div>{{ loansUser.time }}</div>
|
||||
<div style="color: #ec6401">{{ loansUser.phone }}</div>
|
||||
<div>{{ $t('home.successfulBorrowing') }}</div>
|
||||
<div style="color: #BC7C1C; font-weight: 600;">¥{{ loansUser.amount }}</div>
|
||||
<div style="color: #BC7C1C; font-weight: 600;">{{ defaultCoinUnit }}{{ loansUser.amount }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ import {showToast} from "vant";
|
||||
import JGap from "@/components/JGap/JGap.vue";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const user = useUserStore()
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
const bannerList = [
|
||||
@@ -125,17 +125,23 @@ const bannerList = [
|
||||
bannerUrl: getAssetsImages('home/banner_home.png')
|
||||
}
|
||||
]
|
||||
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
const checked = ref(false);
|
||||
const strip = ref(3000)
|
||||
const lmChecked = ref('')
|
||||
|
||||
|
||||
const moneyReduce = (step: number) => {
|
||||
if (strip.value - step < loans.loansMinAccount) {
|
||||
return
|
||||
}
|
||||
strip.value-=step
|
||||
}
|
||||
|
||||
const moneyAdd = (step: number) => {
|
||||
if (strip.value + step > loans.loansMaxAccount) {
|
||||
return
|
||||
}
|
||||
strip.value+=step
|
||||
}
|
||||
|
||||
@@ -177,10 +183,12 @@ const loans = reactive({
|
||||
loansInitMonth: "",
|
||||
loansMaxAccount: 0,
|
||||
loansMinAccount: 0,
|
||||
minDayServiceRate: 0,
|
||||
loansMonth: "",
|
||||
loansMonthList: [],
|
||||
serviceRate: "",
|
||||
serviceRateList: [],
|
||||
defaultCoinUnit: "$"
|
||||
})
|
||||
const _getLoansInfo = () => {
|
||||
getLoansInfo().then(res => {
|
||||
@@ -215,7 +223,9 @@ const calLoan = reactive({
|
||||
"totalInterest": 0,
|
||||
"totalLoanMoney": 0,
|
||||
"totalMonth": 0,
|
||||
"totalRepayment": 0
|
||||
"totalRepayment": 0,
|
||||
"loanRateDay": 0,
|
||||
defaultCoinUnit: "$"
|
||||
})
|
||||
|
||||
const params = computed(() => {
|
||||
@@ -241,7 +251,8 @@ const _getCalLoan = debounce(() => {
|
||||
const loansUser = reactive({
|
||||
amount : "48000",
|
||||
phone : "153****0552",
|
||||
time : "2023/11/27"
|
||||
time : "2023/11/27",
|
||||
defaultCoinUnit : "$"
|
||||
})
|
||||
|
||||
const timer = ref(0)
|
||||
@@ -277,8 +288,10 @@ onMounted(() => {
|
||||
_getLoansInfo()
|
||||
_getHomeInfo()
|
||||
_getLoansUser()
|
||||
_getUserInfo()
|
||||
_getSts()
|
||||
if (userStore.getToken) {
|
||||
_getUserInfo()
|
||||
}
|
||||
// _getSts()
|
||||
})
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer.value);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<router-view />
|
||||
|
||||
<van-tabbar route v-model="active" active-color="#F9BF3A">
|
||||
<van-tabbar route v-model="active" id="van-tabbar" active-color="#F9BF3A">
|
||||
<van-tabbar-item v-for="tabBar in tabBarList" :key="tabBar.name" :replace="tabBar.replace" :to="tabBar.to">
|
||||
<!-- <van-text-ellipsis :content="$t(tabBar.text)" />-->
|
||||
<div style="white-space: nowrap;overflow: hidden;text-align: center">{{ $t(tabBar.text) }}</div>
|
||||
@@ -64,7 +64,7 @@ const active = ref(0)
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
:deep('.van-tabbar-item__text') {
|
||||
:deep(.van-tabbar-item__text) {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- <j-nav-bar/>-->
|
||||
<div ref="root" class="frame" style="height: calc(100vh - 50px)">
|
||||
<div ref="root" class="frame" :style="{height: `calc(100vh - ${navBarHeight}px)`}">
|
||||
<iframe :src="iframeSrc" class="frame-iframe" ref="frameRef"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
@@ -11,8 +11,9 @@ import {getSetting} from "@/api";
|
||||
import {onMounted} from "vue";
|
||||
|
||||
const iframeSrc = ref('')
|
||||
// const iframeSrc = ref('https://www.baidu.com')
|
||||
// const iframeSrc = ref('https://chatlink.mstatik.com/widget/standalone.html?eid=329d34187acc7ebda66a12a0671e3d70')
|
||||
|
||||
const navBarHeight = ref(50)
|
||||
|
||||
const _getSetting = () => {
|
||||
getSetting().then(res => {
|
||||
@@ -22,6 +23,10 @@ const _getSetting = () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const elementsByClassName = document.getElementById('van-tabbar');
|
||||
if (elementsByClassName) {
|
||||
navBarHeight.value = elementsByClassName.offsetHeight + 1
|
||||
}
|
||||
_getSetting()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<div class="header-bj">
|
||||
<div class="header-head" :style="{'--bg-image': `url(${headerImage}) no-repeat`}"></div>
|
||||
<div class="header-text">{{ customerInfo.nickName }}</div>
|
||||
<div class="header-text-code" @click="copyToClipboard(customerInfo.userCode)">编号:{{ customerInfo.userCode }}<span><van-icon name="link-o" /></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -95,7 +96,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { showConfirmDialog, showToast } from 'vant';
|
||||
import {getAssetsImages} from "@/utils";
|
||||
import { copyToClipboard, getAssetsImages } from '@/utils';
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {useRouter} from "vue-router";
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
@@ -237,6 +238,15 @@ onMounted(() => {
|
||||
color: #111a34;
|
||||
transform: translateY(-60px);
|
||||
}
|
||||
.header-text-code {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #111a34;
|
||||
transform: translateY(-60px);
|
||||
span {
|
||||
color: #121b39;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
<view class="bg-1">
|
||||
<view class="bg-1-1">
|
||||
<div class="header-head" :style="{'--bg-image': `url(${headerImage}) no-repeat`}"></div>
|
||||
<view class="bg-1-1-text">{{$t('serveList.loan')}}:{{toRoundMark(customerInfo.borrowAccount)}}</view>
|
||||
<view class="bg-1-1-text">{{$t('serveList.loan')}}:{{defaultCoinUnit}}{{customerInfo.borrowAccount}}</view>
|
||||
</view>
|
||||
|
||||
<view class="accountBalance" style="border-bottom: 1px #fff dashed;">
|
||||
<view class="yellow_color">{{$t('serveList.balance')}}({{$t('app.yuan')}})</view>
|
||||
<view class="money">{{ toRoundMark(customerInfo.account) }}</view>
|
||||
<view class="yellow_color">{{$t('serveList.balance')}}</view>
|
||||
<view class="money">{{defaultCoinUnit}}{{ customerInfo.account }}</view>
|
||||
</view>
|
||||
|
||||
<view class="accountBalance">
|
||||
<view class="yellow_color">{{$t('serveList.amountToBeRepaid')}}({{$t('app.yuan')}})</view>
|
||||
<view class="money">{{ toRoundMark(customerInfo.repaymentAccount) }}</view>
|
||||
<view class="yellow_color">{{$t('serveList.amountToBeRepaid')}}</view>
|
||||
<view class="money">{{defaultCoinUnit}}{{ customerInfo.repaymentAccount }}</view>
|
||||
</view>
|
||||
|
||||
<view class="btn">
|
||||
@@ -51,8 +51,25 @@
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
<van-dialog :width="px2vw(650)" v-model:show="withdrawalShow" :title="$t('app.withdrawalAmount')" show-cancel-button @confirm="saveUserInfoBtn">
|
||||
<van-field v-model="withdrawAmount" type="number" :label="$t('app.withdrawalAmount')" :placeholder="$t('app.pleaseWithdrawalAmount')"/>
|
||||
<van-dialog
|
||||
:width="px2vw(650)"
|
||||
v-model:show="withdrawalShow"
|
||||
:title="$t('app.withdrawalAmount')"
|
||||
show-cancel-button
|
||||
@confirm="saveUserInfoBtn"
|
||||
>
|
||||
<van-field
|
||||
v-model="withdrawAmount"
|
||||
type="number"
|
||||
:label="$t('app.withdrawalAmount')"
|
||||
:placeholder="$t('app.pleaseWithdrawalAmount')"
|
||||
/>
|
||||
<van-field
|
||||
v-if="openWithdrawCode"
|
||||
v-model="withdrawCode"
|
||||
:label="$t('app.withdrawCode')"
|
||||
:placeholder="$t('app.withdrawCode')"
|
||||
/>
|
||||
</van-dialog>
|
||||
</template>
|
||||
|
||||
@@ -61,19 +78,23 @@ import {onMounted, reactive, ref} from "vue";
|
||||
import {showConfirmDialog, showToast} from "vant";
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {useRouter} from "vue-router";
|
||||
import {getBorrowWithdraw, getCustomerInfo, getStepBorrow} from "@/api";
|
||||
import { getBorrowWithdraw, getCustomerInfo, getSetting, getStepBorrow } from '@/api';
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
import {getAssetsImages, px2vw, toRoundMark} from "../../../utils";
|
||||
import {getAssetsImages, px2vw} from "../../../utils";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { getDefaultLocal } from '@/api/system/user';
|
||||
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const openWithdrawCode = ref(false);
|
||||
const withdrawalShow = ref(false);
|
||||
const withdrawAmount = ref(0);
|
||||
const active = ref(0);
|
||||
const withdrawCode = ref('');
|
||||
const active = ref(-1);
|
||||
const headerImage = ref('https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg')
|
||||
|
||||
|
||||
@@ -118,7 +139,7 @@ const stepBorrow = reactive({
|
||||
"over": true
|
||||
},
|
||||
{
|
||||
"name": t('app.bankCardAbnormality'),
|
||||
"name": "",
|
||||
"over": true
|
||||
},
|
||||
{
|
||||
@@ -151,29 +172,42 @@ const withdrawalBtn = () => {
|
||||
}
|
||||
|
||||
const saveUserInfoBtn = () => {
|
||||
|
||||
if (!withdrawCode.value && openWithdrawCode.value) {
|
||||
showToast(t('app.enter') + t('app.withdrawCode'))
|
||||
} else {
|
||||
getBorrowWithdraw({
|
||||
withdrawAmount: withdrawAmount.value,
|
||||
withdrawCode: withdrawCode.value,
|
||||
}).then(res => {
|
||||
showToast(t('app.withdrawal') + t('app.success'))
|
||||
router.push({
|
||||
path: '/serveList'
|
||||
})
|
||||
})
|
||||
}
|
||||
// showConfirmDialog({
|
||||
// title: '提示',
|
||||
// message: '您确定要提现吗',
|
||||
// width: '500px'
|
||||
// })
|
||||
// .then(() => {
|
||||
getBorrowWithdraw({withdrawAmount: withdrawAmount.value}).then(res => {
|
||||
showToast(t('app.withdrawal') + t('app.success'))
|
||||
router.push({
|
||||
path: '/serveList'
|
||||
})
|
||||
})
|
||||
// })
|
||||
// .catch(() => {
|
||||
// // on cancel
|
||||
// });
|
||||
}
|
||||
|
||||
const _getSetting = () => {
|
||||
getSetting().then(res => {
|
||||
openWithdrawCode.value = res.openWithdrawCode
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
_getCustomerInfo()
|
||||
_getStepBorrow()
|
||||
_getSetting()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
<view class="tt">
|
||||
{{ $t('app.confirm') }}{{ $t('borrowInfo.loanInfo') }}
|
||||
</view>
|
||||
<van-cell :title="$t('borrowInfo.loanAmount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(loansInfo.totalLoanMoney)" />
|
||||
<van-cell
|
||||
:title="$t('borrowInfo.loanAmount')"
|
||||
title-style="color: #8997ae;"
|
||||
style="--van-cell-value-color: #000"
|
||||
:value="defaultCoinUnit + loansInfo.totalLoanMoney"
|
||||
/>
|
||||
<van-cell :title="$t('home.loanTerm')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="loansInfo.totalMonth + '个月'" />
|
||||
<van-cell :title="$t('borrowInfo.withdrawalBank')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="userInfo.bankType" />
|
||||
<van-cell :title="$t('borrowInfo.receivingAccount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="backCardNumDesensitization(userInfo.backCardNum)" />
|
||||
@@ -49,7 +54,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {px2vw, toRoundMark} from "@/utils";
|
||||
import {px2vw} from "@/utils";
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {getUserInfo, startBorrow} from "@/api";
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
@@ -60,6 +65,7 @@ const useUser = useUserStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
|
||||
const loansInfo = reactive({
|
||||
"customerId": useUser.getUserInfo.id,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<view style="display: flex; justify-content: space-between">
|
||||
|
||||
<view class="j-item-c">
|
||||
<view>{{ $t('app.totalLoan') }}:{{ item.totalLoanMoney }}{{ $t('app.yuan') }}</view>
|
||||
<view>{{ $t('app.totalLoan') }}:{{ defaultCoinUnit + item.totalLoanMoney }}</view>
|
||||
<view class="yellow_color1">{{ $t('home.repaymentPerInstallment') }}:{{ item.avgRepayment }}*{{ item.totalMonth }}</view>
|
||||
<view>{{ $t('borrowInfo.applicationTime') }}:{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view>
|
||||
</view>
|
||||
@@ -42,6 +42,7 @@ const loading = ref(false);
|
||||
const finished = ref(false);
|
||||
const refreshing = ref(false);
|
||||
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="j-item-t">{{ $t('borrowInfo.loanNo') }}:{{item.tradeNo}}</view>
|
||||
|
||||
<view class="j-item-c">
|
||||
<view>{{ $t('app.totalLoan') }}:{{ item.totalLoanMoney }}{{ $t('app.yuan') }}</view>
|
||||
<view>{{ $t('app.totalLoan') }}:{{ defaultCoinUnit + item.totalLoanMoney }}</view>
|
||||
<view class="yellow_color1">{{ $t('home.repaymentPerInstallment') }}:{{ item.avgRepayment }}*{{ item.totalMonth }}</view>
|
||||
<view>{{ $t('borrowInfo.applicationTime') }}:{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view>
|
||||
</view>
|
||||
@@ -34,6 +34,7 @@ const finished = ref(false);
|
||||
const refreshing = ref(false);
|
||||
|
||||
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
const router = useRouter()
|
||||
|
||||
const onLoad = () => {
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
v-model="userInfo.realName"
|
||||
type="text"
|
||||
:label="$t('userInfo.name')"
|
||||
:placeholder="$t('userInfo.enter') + $t('userInfo.name')"
|
||||
:rules="[{ required: true, message: $t('userInfo.enter') + $t('userInfo.name') }]"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.name')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.name') }]"
|
||||
/>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.cardNum"
|
||||
type="text"
|
||||
:label="$t('userInfo.idCard')"
|
||||
:placeholder="$t('userInfo.enter') + $t('userInfo.idCard')"
|
||||
:rules="[{ required: true, message: $t('userInfo.enter') + $t('userInfo.idCard') }]"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.idCard')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.idCard') }]"
|
||||
/>
|
||||
<!-- <van-field required label="身份证号" placeholder="请输入真实身份证号" v-model="userInfo.cardNum" readonly clickable @touchstart.stop="idCardKeyboardShow = true" :rules="[{ required: true, message: '请输入真实身份证号' }]"/>-->
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</view>
|
||||
|
||||
|
||||
<view style="width: 100%; padding: 20px 0">
|
||||
<!-- <view style="width: 100%; padding: 20px 0">
|
||||
<view>{{ $t('userInfo.shootingRequirements') }}</view>
|
||||
<view style="display: flex; justify-content: space-between; align-items: center">
|
||||
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column">
|
||||
@@ -109,7 +109,7 @@
|
||||
<view class="gray_color font-22">×{{ $t('userInfo.flashStrongly') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
:placeholder="$t('app.enter') + $t('userInfo.monthlyPay')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.monthlyPay') }]"
|
||||
/>
|
||||
|
||||
<van-field
|
||||
v-if="lang === 'zh_CN'"
|
||||
v-model="userInfo.companyAddress"
|
||||
is-link
|
||||
required
|
||||
@@ -56,6 +58,14 @@
|
||||
:rules="[{ required: true, message: $t('app.select') + $t('userInfo.unitAddress') }]"
|
||||
@click="companyAddressShow = true"
|
||||
/>
|
||||
<van-field
|
||||
v-else
|
||||
v-model="userInfo.companyAddress"
|
||||
required
|
||||
:label="$t('userInfo.unitAddress')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.unitAddress')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.unitAddress') }]"
|
||||
/>
|
||||
<van-popup v-model:show="companyAddressShow" round position="bottom">
|
||||
<van-cascader
|
||||
v-model="cascaderValue"
|
||||
@@ -65,6 +75,7 @@
|
||||
@finish="onFinish"
|
||||
/>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.companyAddressInfo"
|
||||
@@ -76,6 +87,7 @@
|
||||
|
||||
|
||||
<van-field
|
||||
v-if="lang === 'zh_CN'"
|
||||
v-model="userInfo.customerAddress"
|
||||
is-link
|
||||
required
|
||||
@@ -85,6 +97,14 @@
|
||||
:rules="[{ required: true, message: $t('app.select') + $t('userInfo.currentResidentialAddress') }]"
|
||||
@click="customerAddressShow = true"
|
||||
/>
|
||||
<van-field
|
||||
v-else
|
||||
v-model="userInfo.customerAddress"
|
||||
required
|
||||
:label="$t('userInfo.currentResidentialAddress')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.currentResidentialAddress')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.currentResidentialAddress') }]"
|
||||
/>
|
||||
<van-popup v-model:show="customerAddressShow" round position="bottom">
|
||||
<van-cascader
|
||||
v-model="customerAddressValue"
|
||||
@@ -94,6 +114,7 @@
|
||||
@finish="onCustomerAddressFinish"
|
||||
/>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.customerAddressInfo"
|
||||
@@ -114,8 +135,8 @@
|
||||
v-model="userInfo.kinsfolkName"
|
||||
type="text"
|
||||
:label="$t('userInfo.name')"
|
||||
:placeholder="$t('userInfo.enter') + $t('userInfo.name')"
|
||||
:rules="[{ required: true, message: $t('userInfo.enter') + $t('userInfo.name') }]"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.name')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.name') }]"
|
||||
/>
|
||||
<van-field
|
||||
required v-model="userInfo.kinsfolkPhone"
|
||||
@@ -172,13 +193,15 @@ const { t } = useI18n()
|
||||
|
||||
const companyAddressShow = ref(false);
|
||||
const customerAddressShow = ref(false);
|
||||
const lang = localStorage.getItem('lang')
|
||||
const cascaderValue = ref('');
|
||||
const customerAddressValue = ref('');
|
||||
const columns = [
|
||||
{ text: t('userInfo.parents'), value: '1' },
|
||||
{ text: t('userInfo.spouse'), value: '2' },
|
||||
{ text: t('userInfo.children'), value: '3' },
|
||||
{ text: t('userInfo.grandparents'), value: '4' }
|
||||
{ text: t('userInfo.grandparents'), value: '4' },
|
||||
{ text: t('userInfo.friend'), value: '5' }
|
||||
];
|
||||
const userInfo = reactive({
|
||||
backCardNum: '',
|
||||
|
||||
@@ -3,6 +3,7 @@ import vue from '@vitejs/plugin-vue'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import {VantResolver} from "unplugin-vue-components/resolvers";
|
||||
import {resolve} from "path";
|
||||
import topLevelAwait from 'vite-plugin-top-level-await';
|
||||
// @ts-ignore
|
||||
import postcsspxtoviewport from 'postcss-px-to-viewport-8-plugin'
|
||||
|
||||
@@ -18,7 +19,8 @@ export default defineConfig({
|
||||
vue(),
|
||||
Components({
|
||||
resolvers: [VantResolver()]
|
||||
})
|
||||
}),
|
||||
topLevelAwait()
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
@@ -38,8 +40,9 @@ export default defineConfig({
|
||||
port: 9528,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: ' http://dk.qiqizl.com',
|
||||
// target: 'http://localhost:8887',
|
||||
target: 'http://124.222.254.188/',
|
||||
// target: ' http://dk.qiqizl.com',
|
||||
// target: 'http://localhost:8082',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(new RegExp(`^/api`), '/api'),
|
||||
|
||||
Reference in New Issue
Block a user