Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82e9f90cf2 | ||
|
|
28a70dc261 | ||
|
|
2bebd96f82 | ||
|
|
52e00d6606 | ||
|
|
8a171ae091 | ||
|
|
7d8a0c4c11 | ||
|
|
c3de0a8fb6 | ||
|
|
bc7b6e798e | ||
|
|
da7f6af6be | ||
|
|
b6677f8a49 | ||
|
|
bd9644d273 |
105
index.html
105
index.html
@@ -13,9 +13,112 @@
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
17489
package-lock.json
generated
17489
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
https://baidu.com,https://jingdong.com
|
||||
|
||||
@@ -22,8 +22,9 @@ const lang = localStorage.getItem('lang')
|
||||
const _getDefaultLocal = () => {
|
||||
getDefaultLocal().then(res => {
|
||||
console.log('res', res)
|
||||
if (lang !== res) {
|
||||
localStorage.setItem('lang', res)
|
||||
if (lang !== res.defaultLocal) {
|
||||
localStorage.setItem('lang', res.defaultLocal)
|
||||
localStorage.setItem('defaultCoinUnit', res.defaultCoinUnit)
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
@@ -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: '银行卡号',
|
||||
},
|
||||
|
||||
@@ -75,12 +75,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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,18 +78,22 @@ 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 withdrawCode = ref('');
|
||||
const active = ref(0);
|
||||
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: '',
|
||||
|
||||
@@ -39,7 +39,7 @@ export default defineConfig({
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: ' http://dk.qiqizl.com',
|
||||
// target: 'http://localhost:8887',
|
||||
// target: 'http://localhost:8082',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(new RegExp(`^/api`), '/api'),
|
||||
|
||||
Reference in New Issue
Block a user