Compare commits
29 Commits
domain-dyn
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82e9f90cf2 | ||
|
|
28a70dc261 | ||
|
|
2bebd96f82 | ||
|
|
52e00d6606 | ||
|
|
8a171ae091 | ||
|
|
7d8a0c4c11 | ||
|
|
c3de0a8fb6 | ||
|
|
bc7b6e798e | ||
|
|
da7f6af6be | ||
|
|
b6677f8a49 | ||
|
|
bd9644d273 | ||
|
|
145d263b4f | ||
|
|
82671e4b67 | ||
|
|
337300d438 | ||
|
|
42c7d3bec8 | ||
|
|
807e528e47 | ||
|
|
b734a72fc6 | ||
|
|
44e109ae4b | ||
|
|
041dda021a | ||
|
|
f9f962a8ae | ||
|
|
6dbecfc4ce | ||
|
|
304421281f | ||
|
|
e702b1bc7f | ||
|
|
619f6986ce | ||
|
|
0494fbd364 | ||
|
|
80dbf50d4b | ||
|
|
c595061dc8 | ||
|
|
755f0cd208 | ||
|
|
66eb2729b7 |
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>
|
||||
|
||||
16692
package-lock.json
generated
16692
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
https://baidu.com,https://jingdong.com
|
||||
|
||||
15
src/App.vue
15
src/App.vue
@@ -16,6 +16,21 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getDefaultLocal } from '@/api/system/user';
|
||||
const lang = localStorage.getItem('lang')
|
||||
|
||||
const _getDefaultLocal = () => {
|
||||
getDefaultLocal().then(res => {
|
||||
console.log('res', res)
|
||||
if (lang !== res.defaultLocal) {
|
||||
localStorage.setItem('lang', res.defaultLocal)
|
||||
localStorage.setItem('defaultCoinUnit', res.defaultCoinUnit)
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
_getDefaultLocal()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { http } from '@/utils/http/axios';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const baseUrl = '/api'
|
||||
|
||||
/**
|
||||
* @description: getLoansInfo
|
||||
*/
|
||||
export function getDefaultLocal() {
|
||||
// zh_CN 中文
|
||||
// gu_IN 印度
|
||||
const language = localStorage.getItem('lang')
|
||||
let lang = 'zh_CN'
|
||||
if (language === 'zh') {
|
||||
lang = 'zh_CN'
|
||||
} else if (language === 'id') {
|
||||
lang = 'gu_IN'
|
||||
}
|
||||
return http.request({
|
||||
url: `${baseUrl}/app/home/loans/defaultLocal`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
lang
|
||||
}
|
||||
});
|
||||
}
|
||||
177
src/lang/en_us.ts
Normal file
177
src/lang/en_us.ts
Normal file
@@ -0,0 +1,177 @@
|
||||
// en_us.js文件
|
||||
export default {
|
||||
app: {
|
||||
home: 'Home',
|
||||
serveList: 'Wallet',
|
||||
message: 'Customer Service',
|
||||
my: 'Mine',
|
||||
yuan: 'Yuan',
|
||||
second: 'Second',
|
||||
month: 'Month',
|
||||
prompt: 'Prompt',
|
||||
tips: 'Tips',
|
||||
enterLogout: 'Are you sure you want to log out?',
|
||||
enterWithdrawal: 'Are you sure you want to withdraw?',
|
||||
withdrawal: 'Withdrawal',
|
||||
info: 'Info',
|
||||
success: 'Success',
|
||||
withdrawalAmount: 'Withdrawal Amount',
|
||||
withdrawCode: 'Withdrawal Code',
|
||||
pleaseWithdrawalAmount: 'Please enter the withdrawal amount',
|
||||
submit: 'Submit',
|
||||
submittedSuccessfully: 'Successfully submitted',
|
||||
submitApplication: 'Submit Application',
|
||||
bankCardAbnormality: 'Bank card abnormality',
|
||||
receivedSuccessfully: 'Received successfully',
|
||||
phoneNumber: 'Phone number',
|
||||
verificationCode: 'Verification code',
|
||||
confirm: 'Confirm',
|
||||
enter: 'Please enter',
|
||||
select: 'Please select',
|
||||
send: 'Send',
|
||||
login: 'Login',
|
||||
account: 'Account',
|
||||
logout: 'Logout',
|
||||
register: 'Register',
|
||||
password: 'Password',
|
||||
forgotPassword: 'Forgot password',
|
||||
passwordPlaceholder: 'Please set a password of 6-16 digits',
|
||||
passwordPlaceholder1: 'Please confirm the password again',
|
||||
next: 'Next',
|
||||
update: 'Update',
|
||||
noData: 'No data',
|
||||
none: 'None',
|
||||
contract: 'Contract',
|
||||
loan: 'Loan',
|
||||
totalLoan: 'Total loan',
|
||||
complete: 'Complete',
|
||||
noComplete: 'Incomplete',
|
||||
signature: 'Signature',
|
||||
identityInformation: 'Identity information',
|
||||
information: 'Information',
|
||||
signatureInformation: 'Signature information',
|
||||
receivingBank: 'Receiving bank card',
|
||||
rwmljndzlxx: 'Let us know your information',
|
||||
upPNGOrJPG: 'Please upload a JPG or PNG format image',
|
||||
},
|
||||
home: {
|
||||
productDetails: 'Product Details',
|
||||
minimumDailyInterestRate: 'Minimum Month Interest Rate',
|
||||
borrowingLimit: 'Borrowing Limit',
|
||||
installmentPeriod: 'Installment Period',
|
||||
optional: 'Optional',
|
||||
applicationAmount: 'Application Amount',
|
||||
loanTerm: 'Loan Term',
|
||||
repaymentPerInstallment: 'Repayment Per Installment',
|
||||
dailyInterestRate: 'Month Interest Rate',
|
||||
totalInterest: 'Total Interest',
|
||||
successfulBorrowing: 'Successful Borrowing',
|
||||
enterAgreement: 'I have read and agreed to',
|
||||
authAgreement: 'Authorization Agreement',
|
||||
serviceAgreement: 'Platform Service Agreement',
|
||||
lawAgreement: 'Legal Agreement',
|
||||
loansAgreement: 'Loan Agreement',
|
||||
immediateBorrowing: 'Borrow Now',
|
||||
pleaseFillInYourPersonalInformationFirst: 'Please fill in your personal information first',
|
||||
pleaseEnterAgreement: 'Please read and agree to the relevant agreements',
|
||||
},
|
||||
my: {
|
||||
userInfo: 'My Profile',
|
||||
loan: 'My Loans',
|
||||
repayment: 'My Repayments',
|
||||
legalLiability: 'Legal Liability',
|
||||
uploadPassword: 'Change Password',
|
||||
logout: 'Logout',
|
||||
language: 'Switch Language',
|
||||
},
|
||||
serveList: {
|
||||
loan: 'My Loans',
|
||||
balance: 'Account Balance',
|
||||
amountToBeRepaid: 'Amount to Be Repaid',
|
||||
immediateWithdrawal: 'Withdraw immediately',
|
||||
financialSecurity: 'Account funds security is guaranteed by the bank',
|
||||
},
|
||||
borrowInfo: {
|
||||
applicationTime: 'Application Time',
|
||||
loanDetails: 'Loan Details',
|
||||
loanInfo: 'Borrowing Information',
|
||||
loanNo: 'Loan Number',
|
||||
loanAmount: 'Loan Amount',
|
||||
loanCycle: 'Loan Cycle',
|
||||
withdrawalBank: 'Withdrawal Bank',
|
||||
repaymentPerInstallment: 'Repayment Per Installment',
|
||||
describe: 'Description',
|
||||
receivingAccount: 'Receiving Account',
|
||||
usageOfLoan: 'Purpose of Loan',
|
||||
},
|
||||
loans: {
|
||||
enterSubmitApplication: 'Are you sure you want to apply for a loan?'
|
||||
},
|
||||
userInfo: {
|
||||
realPrompt: 'Please fill in true and valid information to pass the review.',
|
||||
idCardPrompt: 'Please use your own ID card, and make sure the content is clear and readable.',
|
||||
photographPrompt: 'Please confirm that the camera permission is enabled.',
|
||||
name: 'Name',
|
||||
idCard: 'ID Card Number',
|
||||
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',
|
||||
missingBorder: 'Missing Borders',
|
||||
outOfFocus: 'Blurry Photo',
|
||||
flashStrongly: 'Strong Flash',
|
||||
unitName: 'Company Name',
|
||||
position: 'Position',
|
||||
workTelephone: 'Work Phone',
|
||||
workingAge: 'Years of Work Experience',
|
||||
monthlyPay: 'Monthly Salary',
|
||||
unitAddress: 'Company Address',
|
||||
addressInfo: 'Detailed Address',
|
||||
currentResidentialAddress: 'Current Residential Address',
|
||||
directFamilyContactPerson: 'Immediate Family Contact',
|
||||
relationship: 'Relationship',
|
||||
parents: 'Parents',
|
||||
spouse: 'Spouse',
|
||||
children: 'Children',
|
||||
grandparents: 'Grandparents',
|
||||
friend: 'friend',
|
||||
bankOfDeposit: 'Bank of Deposit',
|
||||
bankCard: 'Bank Card Number',
|
||||
},
|
||||
router: {
|
||||
home: 'Home',
|
||||
serveList: 'Wallet',
|
||||
message: 'Chat',
|
||||
my: 'Mine',
|
||||
userInfo: 'My Profile',
|
||||
userInfo1: 'Basic Information',
|
||||
signature: 'Signature',
|
||||
contract: 'Contract',
|
||||
userInfo2: 'Submit Documents',
|
||||
userInfo3: 'Receiving Bank Card',
|
||||
loansInfo: 'Loan Details',
|
||||
loansInfo1: 'Withdrawal',
|
||||
myLoan: 'My Loans',
|
||||
myRepayment: 'My Repayments',
|
||||
borrowInfo: 'Borrowing Details',
|
||||
uploadPassword: 'Change Password',
|
||||
login: 'Login',
|
||||
register: 'Register',
|
||||
forget: 'Forgot Password',
|
||||
agreement: 'Agreement',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
164
src/lang/hi-IN.ts
Normal file
164
src/lang/hi-IN.ts
Normal file
@@ -0,0 +1,164 @@
|
||||
// zh_cn.js 文件
|
||||
export default {
|
||||
app: {
|
||||
home: 'मुख्य पृष्ठ',
|
||||
serveList: 'सेवा सूची',
|
||||
message: 'ग्राहक सहायता',
|
||||
my: 'मेरा',
|
||||
yuan: 'युआन',
|
||||
second: 'सेकंड',
|
||||
month: 'माह',
|
||||
prompt: 'प्रोम्प्ट',
|
||||
tips: 'टिप्स',
|
||||
enterLogout: 'आप निश्चित हैं कि आप लॉग आउट करना चाहते हैं?',
|
||||
enterWithdrawal: 'आप निश्चित हैं कि आप निकासी करना चाहते हैं?',
|
||||
withdrawal: 'निकासी',
|
||||
info: 'जानकारी',
|
||||
success: 'सफल',
|
||||
withdrawalAmount: 'निकासी राशि',
|
||||
withdrawCode: 'विचड्रावेल कोड',
|
||||
pleaseWithdrawalAmount: 'कृपया निकासी राशि दर्ज करें',
|
||||
submit: 'सबमिट',
|
||||
submittedSuccessfully: 'सफलतापूर्वक सबमिट',
|
||||
submitApplication: 'आवेदन सबमिट',
|
||||
bankCardAbnormality: 'बैंक कार्ड असमान',
|
||||
receivedSuccessfully: 'निकासी सफल',
|
||||
phoneNumber: 'फोन नंबर',
|
||||
verificationCode: 'सत्यापन कोड',
|
||||
confirm: 'पुष्टि',
|
||||
enter: 'कृपया दर्ज करें',
|
||||
select: 'चयन करें',
|
||||
send: 'भेजें',
|
||||
login: 'लॉग इन',
|
||||
account: 'खाता',
|
||||
logout: 'लॉग आउट',
|
||||
register: 'रजिस्टर',
|
||||
password: 'पासवर्ड',
|
||||
forgotPassword: 'पासवर्ड भूल गए',
|
||||
passwordPlaceholder: 'कृपया 6-16 अक्षर का पासवर्ड दर्ज करें',
|
||||
passwordPlaceholder1: 'कृपया पासवर्ड पुनः दर्ज करें',
|
||||
next: 'आगे',
|
||||
update: 'अद्यतन',
|
||||
noData: 'कोई डेटा नहीं',
|
||||
none: 'कोई नहीं',
|
||||
contract: 'ठेका',
|
||||
loan: 'लोन',
|
||||
totalLoan: 'लोन का कुल',
|
||||
complete: 'पूर्ण',
|
||||
noComplete: 'अपूर्ण',
|
||||
signature: 'हस्ताक्षर',
|
||||
identityInformation: 'पहचान जानकारी',
|
||||
information: 'जानकारी',
|
||||
signatureInformation: 'हस्ताक्षर जानकारी',
|
||||
receivingBank: 'प्राप्तकर्ता बैंक',
|
||||
rwmljndzlxx: 'हमसे संपर्क करें',
|
||||
upPNGOrJPG: 'कृपया JPG या PNG फ़ॉर्मेट की तस्वीर अपलोड करें',
|
||||
},
|
||||
home: {
|
||||
productDetails: 'उत्पाद विवरण',
|
||||
minimumDailyInterestRate: 'न्यूनतम दैनिक ब्याज दर',
|
||||
borrowingLimit: 'ऋण सीमा',
|
||||
installmentPeriod: '분할 भुगतान अवधि',
|
||||
optional: 'वैकल्ਪिक',
|
||||
applicationAmount: 'आवेदन राशि',
|
||||
loanTerm: 'ऋण अवधि',
|
||||
repaymentPerInstallment: 'प्रत्येक अंश के लिए ऋण चुकौती',
|
||||
dailyInterestRate: 'दैनिक ब्याज दर',
|
||||
totalInterest: 'कुल ब्याज',
|
||||
successfulBorrowing: 'ऋण सफल',
|
||||
enterAgreement: 'मैंने पढ़ा और सहमति दी है',
|
||||
authAgreement: 'सहायता प्राधिकरण समझौता',
|
||||
serviceAgreement: 'प्लेटफॉर्म सेवा समझौता',
|
||||
lawAgreement: 'कानून समझौता',
|
||||
loansAgreement: 'ऋण समझौता',
|
||||
immediateBorrowing: 'तुरंत ऋण लेना',
|
||||
pleaseFillInYourPersonalInformationFirst: 'कृपया पहले अपनी व्यक्तिगत जानकारी भरें',
|
||||
pleaseEnterAgreement: 'कृपया संबंधित समझौते पढ़ें और सहमत करें'
|
||||
},
|
||||
my: {
|
||||
userInfo: 'मेरी जानकारी',
|
||||
loan: 'मेरी ऋण',
|
||||
repayment: 'मेरी ऋण चुकौती',
|
||||
legalLiability: 'कानूनी दायित्व',
|
||||
uploadPassword: 'पासवर्ड परिवर्तन',
|
||||
logout: 'लॉग आउट',
|
||||
language: 'भाषा बदलें',
|
||||
},
|
||||
serveList: {
|
||||
loan: 'मेरी ऋण',
|
||||
balance: 'खाता शेष',
|
||||
amountToBeRepaid: 'प्रतिपूर्ति के लिए राशि',
|
||||
immediateWithdrawal: 'तुरंत वापस लें',
|
||||
financialSecurity: 'खाता धन सुरक्षा बैंक द्वारा सुरक्षित',
|
||||
},
|
||||
borrowInfo: {
|
||||
applicationTime: 'आवेदन समय',
|
||||
loanDetails: 'ऋण विवरण',
|
||||
loanInfo: 'ऋण जानकारी',
|
||||
loanNo: 'ऋण संख्या',
|
||||
loanAmount: 'ऋण राशि',
|
||||
loanCycle: 'ऋण चक्र',
|
||||
withdrawalBank: 'निकासी बैंक',
|
||||
repaymentPerInstallment: 'प्रत्येक अंश के लिए ऋण चुकौती',
|
||||
describe: 'विवरण',
|
||||
receivingAccount: 'प्राप्त खाता',
|
||||
usageOfLoan: 'ऋण उपयोग',
|
||||
},
|
||||
loans: {
|
||||
enterSubmitApplication: 'आप ऋण आवेदन करना सुनिश्चित हैं?'
|
||||
},
|
||||
userInfo: {
|
||||
realPrompt: 'वास्तविक और प्रभावी जानकारी भरें, ऐसा करने पर ही सत्यापन पਾਸ होगा',
|
||||
idCardPrompt: 'आपका स्वयं का आधार कार्ड, और सामग्री स्पष्ट और पठनीय होनी चाहिए',
|
||||
photographPrompt: 'कृपया पुष्टि करें कि कैमरा ऑपरेशन की अनुमति सक्रिय है',
|
||||
name: 'नाम',
|
||||
idCard: 'आधार कार्ड नंबर',
|
||||
idCardUp1: 'आधार कार्ड फটো साइड अपलोड करें',
|
||||
idCardUp2: 'आधार कार्ड राष्ट्रीय प्रतीक साइड अपलोड करें',
|
||||
idCardUp3: 'हाथ में आधार कार्ड फोटो अपलोड करें',
|
||||
shootingRequirements: 'चित्रण आवश्यकता',
|
||||
standardShooting: 'मानक शूटिंग',
|
||||
missingBorder: 'बॉर्डर गायब',
|
||||
outOfFocus: 'छवि धुंधला',
|
||||
flashStrongly: 'फ्लैश बहुत तेज',
|
||||
unitName: 'संस्था का नाम',
|
||||
position: 'पद',
|
||||
workTelephone: 'कार्यालय का टेलीफोन',
|
||||
workingAge: 'कार्यकाल',
|
||||
monthlyPay: 'मासिक वेतन',
|
||||
unitAddress: 'कार्यालय का पता',
|
||||
addressInfo: 'विस्तृत पता',
|
||||
currentResidentialAddress: 'वर्तमान निवास पता',
|
||||
directFamilyContactPerson: 'सরাसरी परिवार का संपर्क व्यक्ति',
|
||||
relationship: 'रिश्ता',
|
||||
parents: 'माता-पिता',
|
||||
spouse: 'पति/पत्नी',
|
||||
children: 'बच्चे',
|
||||
grandparents: 'दादा-दादी',
|
||||
friend: 'मित्र',
|
||||
bankOfDeposit: 'खाता खोलने वाला बैंक',
|
||||
bankCard: 'बैंक कार्ड नंबर',
|
||||
},
|
||||
router: {
|
||||
home: 'मुख्य पृष्ठ',
|
||||
serveList: 'वॉलेट',
|
||||
message: 'चैट',
|
||||
my: 'मेरा',
|
||||
userInfo: 'मेरी जानकारी',
|
||||
userInfo1: 'बेसिक जानकारी',
|
||||
signature: 'हस्ताक्षर',
|
||||
contract: 'अनुबंध',
|
||||
userInfo2: 'जमा दस्तावेज',
|
||||
userInfo3: 'प्राप्ति बैंक कार्ड',
|
||||
loansInfo: 'लोन विवरण',
|
||||
loansInfo1: 'कैश आउट',
|
||||
myLoan: 'मेरे लोन',
|
||||
myRepayment: 'मेरी रिपेमेंट',
|
||||
borrowInfo: 'लोन विवरण',
|
||||
uploadPassword: 'पासवर्ड परिवर्तन',
|
||||
login: 'लॉगिन',
|
||||
register: 'रजिस्टर',
|
||||
forget: 'पासवर्ड भूल गए',
|
||||
agreement: 'समझौता',
|
||||
}
|
||||
};
|
||||
164
src/lang/id_ID.ts
Normal file
164
src/lang/id_ID.ts
Normal file
@@ -0,0 +1,164 @@
|
||||
// id_ID.ts文件
|
||||
export default {
|
||||
app: {
|
||||
home: 'Beranda',
|
||||
serveList: 'Dompet',
|
||||
message: 'Layanan Pelanggan',
|
||||
my: 'Saya',
|
||||
yuan: 'Yuan',
|
||||
second: 'Detik',
|
||||
month: 'Bulan',
|
||||
prompt: 'Prompt',
|
||||
tips: 'Tips Hangat',
|
||||
enterLogout: 'Apakah Anda yakin ingin keluar dari login?',
|
||||
enterWithdrawal: 'Apakah Anda yakin ingin melakukan penarikan?',
|
||||
withdrawal: 'Penarikan',
|
||||
info: 'Informasi',
|
||||
success: 'Sukses',
|
||||
withdrawalAmount: 'Jumlah Penarikan',
|
||||
pleaseWithdrawalAmount: 'Jumlah Penarikan',
|
||||
withdrawCode: 'Kode tarik',
|
||||
submit: 'Kirim',
|
||||
submittedSuccessfully: 'Pengiriman Sukses',
|
||||
submitApplication: 'Kirim Aplikasi',
|
||||
bankCardAbnormality: 'Kartu Bank Abnormal',
|
||||
receivedSuccessfully: 'Penerimaan Sukses',
|
||||
phoneNumber: 'Nomor Telepon',
|
||||
verificationCode: 'Kode Verifikasi',
|
||||
confirm: 'Konfirmasi',
|
||||
enter: 'Silakan masukkan',
|
||||
select: 'Silakan pilih',
|
||||
send: 'Kirim',
|
||||
login: 'Masuk',
|
||||
account: 'Akun',
|
||||
logout: 'Keluar',
|
||||
register: 'Daftar',
|
||||
password: 'Kata Sandi',
|
||||
forgotPassword: 'Lupa Kata Sandi',
|
||||
passwordPlaceholder: 'Silakan atur kata sandi 6-16 karakter',
|
||||
passwordPlaceholder1: 'Silakan masukkan kata sandi lagi',
|
||||
next: 'Langkah Berikutnya',
|
||||
update: 'Perbarui',
|
||||
noData: 'Data Sementara Tidak Ada',
|
||||
none: 'Tidak Ada',
|
||||
contract: 'Kontrak',
|
||||
loan: 'Kredit',
|
||||
totalLoan: 'Total Kredit',
|
||||
complete: 'Lengkap',
|
||||
noComplete: 'Tidak Lengkap',
|
||||
signature: 'Tanda tangan',
|
||||
identityInformation: 'Informasi Identitas',
|
||||
information: 'Informasi Data',
|
||||
signatureInformation: 'Informasi Tanda tangan',
|
||||
receivingBank: 'Kartu Bank Penerimaan',
|
||||
rwmljndzlxx: 'Biarkan Kami Memahami Informasi Anda',
|
||||
upPNGOrJPG: 'Silakan unggah gambar format jpg atau png',
|
||||
},
|
||||
home: {
|
||||
productDetails: 'Detail Produk',
|
||||
minimumDailyInterestRate: 'Suku Bunga Harian Minimum',
|
||||
borrowingLimit: 'Batas Peminjaman',
|
||||
installmentPeriod: 'Jangka Waktu Angsuran',
|
||||
optional: 'Opsional',
|
||||
applicationAmount: 'Jumlah Aplikasi',
|
||||
loanTerm: 'Jangka Waktu Peminjaman',
|
||||
repaymentPerInstallment: 'Pembayaran Per Angsuran',
|
||||
dailyInterestRate: 'Suku Bunga Harian',
|
||||
totalInterest: 'Total Suku Bunga',
|
||||
successfulBorrowing: 'Peminjaman Sukses',
|
||||
enterAgreement: 'Saya telah membaca dan menyetujui',
|
||||
authAgreement: 'Perjanjian Pemberian Kuasa',
|
||||
serviceAgreement: 'Perjanjian Layanan Platform',
|
||||
lawAgreement: 'Perjanjian Hukum',
|
||||
loansAgreement: 'Perjanjian Peminjaman',
|
||||
immediateBorrowing: 'Peminjaman Segera',
|
||||
pleaseFillInYourPersonalInformationFirst: 'Silakan isi informasi pribadi Anda terlebih dahulu',
|
||||
pleaseEnterAgreement: 'Silakan baca dan menyetujui perjanjian terkait',
|
||||
},
|
||||
my: {
|
||||
userInfo: 'Info Saya',
|
||||
loan: 'Peminjaman Saya',
|
||||
repayment: 'Pembayaran Saya',
|
||||
legalLiability: 'Tanggung Jawab Hukum',
|
||||
uploadPassword: 'Ganti Kata Sandi',
|
||||
logout: 'Keluar',
|
||||
language: 'Beralih Bahasa',
|
||||
},
|
||||
serveList: {
|
||||
loan: 'Pinjaman Saya',
|
||||
balance: 'Saldo Akun',
|
||||
amountToBeRepaid: 'Jumlah Yang Harus Dibayar Kembali',
|
||||
immediateWithdrawal: 'Tarik segera',
|
||||
financialSecurity: 'Keamanan dana akun dijamin oleh bank',
|
||||
},
|
||||
borrowInfo: {
|
||||
applicationTime: 'Waktu Aplikasi',
|
||||
loanDetails: 'Detail Pinjaman',
|
||||
loanInfo: 'Informasi Peminjaman',
|
||||
loanNo: 'Nomor Pinjaman',
|
||||
loanAmount: 'Jumlah Peminjaman',
|
||||
loanCycle: 'Siklus Pinjaman',
|
||||
withdrawalBank: 'Bank Pengeluaran',
|
||||
repaymentPerInstallment: 'Pembayaran Per Angsuran',
|
||||
describe: 'Deskripsi',
|
||||
receivingAccount: 'Akun Penerimaan',
|
||||
usageOfLoan: 'Tujuan Peminjaman',
|
||||
},
|
||||
loans: {
|
||||
enterSubmitApplication: 'Apakah Anda yakin akan mengajukan peminjaman?'
|
||||
},
|
||||
userInfo: {
|
||||
realPrompt: 'Isilah informasi yang benar dan valid, untuk proses verifikasi dapat lewat',
|
||||
idCardPrompt: 'Harus menggunakan KTP pribadi Anda sendiri, dan kontennya harus jelas dan terbaca',
|
||||
photographPrompt: 'Pastikan izin foto telah diaktifkan',
|
||||
name: 'Nama',
|
||||
idCard: 'Nomor KTP',
|
||||
idCardUp1: 'Klik untuk unggah foto wajah KTP',
|
||||
idCardUp2: 'Klik untuk unggah foto lambang negara KTP',
|
||||
idCardUp3: 'Klik untuk unggah foto tangan pegang KTP',
|
||||
shootingRequirements: 'Persyaratan pemotretan',
|
||||
standardShooting: 'Pemotretan standar',
|
||||
missingBorder: 'Bingkai hilang',
|
||||
outOfFocus: 'Foto kabur',
|
||||
flashStrongly: 'Kilat terlalu kuat',
|
||||
unitName: 'Nama perusahaan',
|
||||
position: 'Jabatan',
|
||||
workTelephone: 'Telepon perusahaan',
|
||||
workingAge: 'Usia kerja',
|
||||
monthlyPay: 'Gaji bulanan',
|
||||
unitAddress: 'Alamat perusahaan',
|
||||
addressInfo: 'Alamat lengkap',
|
||||
currentResidentialAddress: 'Alamat tempat tinggal sekarang',
|
||||
directFamilyContactPerson: 'Kontak langsung dengan anggota keluarga',
|
||||
relationship: 'Hubungan',
|
||||
parents: 'Orang tua',
|
||||
spouse: 'Pasangan',
|
||||
children: 'Anak',
|
||||
grandparents: 'Kakek-nenek',
|
||||
friend: 'teman',
|
||||
bankOfDeposit: 'Bank tempat rekening',
|
||||
bankCard: 'Nomor rekening bank',
|
||||
},
|
||||
router: {
|
||||
home: 'Beranda',
|
||||
serveList: 'Dompet',
|
||||
message: 'Obrolan',
|
||||
my: 'Saya',
|
||||
userInfo: 'Info Saya',
|
||||
userInfo1: 'Info Dasar',
|
||||
signature: 'Tanda tangan',
|
||||
contract: 'Kontrak',
|
||||
userInfo2: 'Unggah Dokumen',
|
||||
userInfo3: 'Kartu Kredit Penerimaan',
|
||||
loansInfo: 'Detail Pinjaman',
|
||||
loansInfo1: 'Pengeluaran',
|
||||
myLoan: 'Pinjaman Saya',
|
||||
myRepayment: 'Pembayaran Saya',
|
||||
borrowInfo: 'Detail Kredit',
|
||||
uploadPassword: 'Ganti Kata Sandi',
|
||||
login: 'Masuk',
|
||||
register: 'Daftar',
|
||||
forget: 'Lupa Kata Sandi',
|
||||
agreement: 'Perjanjian',
|
||||
}
|
||||
}
|
||||
74
src/lang/index.ts
Normal file
74
src/lang/index.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import {Locale} from 'vant'
|
||||
import zhCN from 'vant/lib/locale/lang/zh-CN'
|
||||
import idId from 'vant/lib/locale/lang/id-ID'
|
||||
import hiIN from 'vant/lib/locale/lang/hi-IN'
|
||||
import enUS from 'vant/lib/locale/lang/en-US'
|
||||
import zhLocale from './zh_cn'
|
||||
import idLocale from './id_ID'
|
||||
import hiLocale from './hi-IN'
|
||||
import enLocale from './en_us'
|
||||
import type { App } from 'vue';
|
||||
|
||||
|
||||
const messages = {
|
||||
zh: {
|
||||
...zhCN,
|
||||
...zhLocale
|
||||
},
|
||||
id: {
|
||||
...idId,
|
||||
...idLocale
|
||||
},
|
||||
hi: {
|
||||
...hiIN,
|
||||
...hiLocale
|
||||
},
|
||||
en: {
|
||||
...enUS,
|
||||
...enLocale
|
||||
}
|
||||
}
|
||||
|
||||
// const language = (navigator.language || 'zh').toLocaleLowerCase(); // 这是获取浏览器的语言
|
||||
const defLanguage = localStorage.getItem('lang') || 'zh_CN';
|
||||
|
||||
// console.log('当前的环境语言是:', language)
|
||||
console.log('当前的后台语言是:', localStorage.getItem('lang'))
|
||||
const localeLanMap = {
|
||||
'zh_CN': 'zh',
|
||||
'hi_IN': 'hi',
|
||||
'id_ID': 'id',
|
||||
'en_US': 'en',
|
||||
}
|
||||
const i18n = createI18n({
|
||||
allowComposition: true,
|
||||
legacy: false,
|
||||
locale: localeLanMap[defLanguage], // 设置默认语言
|
||||
fallbackLocale: localeLanMap[defLanguage], // 设置备用语言
|
||||
messages: messages // 设置资源文件对象
|
||||
})
|
||||
|
||||
// 更新vant组件库本身的语言变化,支持国际化
|
||||
function vantLocales (app: App<Element>) {
|
||||
app.use(i18n)
|
||||
const lanMap = {
|
||||
'zh_CN': zhCN,
|
||||
'hi_IN': hiIN,
|
||||
'id_ID': idId,
|
||||
'en_US': enUS,
|
||||
}
|
||||
|
||||
Locale.use(defLanguage, lanMap[defLanguage] || zhCN)
|
||||
|
||||
// if (lan === 'hi') {
|
||||
// Locale.use(lan, hiIN)
|
||||
// console.log('========================', lan)
|
||||
// } else if (lan === 'id') {
|
||||
// Locale.use(lan, idId)
|
||||
// } else {
|
||||
// Locale.use(lan, zhCN)
|
||||
// }
|
||||
}
|
||||
|
||||
export {i18n, vantLocales}
|
||||
177
src/lang/zh_cn.ts
Normal file
177
src/lang/zh_cn.ts
Normal file
@@ -0,0 +1,177 @@
|
||||
// zh_cn.js文件
|
||||
export default {
|
||||
app: {
|
||||
home: '首页',
|
||||
serveList: '钱包',
|
||||
message: '客服',
|
||||
my: '我的',
|
||||
yuan: '元',
|
||||
second: '秒',
|
||||
month: '个月',
|
||||
prompt: '提示',
|
||||
tips: '温馨提示',
|
||||
enterLogout: '您确定要退出登录吗',
|
||||
enterWithdrawal: '您确定要提现吗',
|
||||
withdrawal: '提现',
|
||||
info: '信息',
|
||||
success: '成功',
|
||||
withdrawalAmount: '提现金额',
|
||||
pleaseWithdrawalAmount: '提现金额',
|
||||
withdrawCode: '提现码',
|
||||
submit: '提交',
|
||||
submittedSuccessfully: '提交成功',
|
||||
submitApplication: '提交申请',
|
||||
bankCardAbnormality: '银行卡异常',
|
||||
receivedSuccessfully: '到账成功',
|
||||
phoneNumber: '手机号码',
|
||||
verificationCode: '验证码',
|
||||
confirm: '确认',
|
||||
enter: '请输入',
|
||||
select: '请选择',
|
||||
send: '发送',
|
||||
login: '登录',
|
||||
account: '账号',
|
||||
logout: '登出',
|
||||
register: '注册',
|
||||
password: '密码',
|
||||
forgotPassword: '忘记密码',
|
||||
passwordPlaceholder: '请设置6-16位密码',
|
||||
passwordPlaceholder1: '请再次输入密码',
|
||||
next: '下一步',
|
||||
update: '修改',
|
||||
noData: '暂无数据',
|
||||
none: '暂无',
|
||||
contract: '合同',
|
||||
loan: '贷款',
|
||||
totalLoan: '贷款总额',
|
||||
complete: '完整',
|
||||
noComplete: '不完整',
|
||||
signature: '签名',
|
||||
identityInformation: '身份信息',
|
||||
information: '资料信息',
|
||||
signatureInformation: '签名信息',
|
||||
receivingBank: '收款银行卡',
|
||||
rwmljndzlxx: '让我们了解您的资料信息',
|
||||
upPNGOrJPG: '请上传 jpg 或者 png 格式图片',
|
||||
},
|
||||
home: {
|
||||
productDetails: '产品详情',
|
||||
minimumDailyInterestRate: '最低月息',
|
||||
borrowingLimit: '借款额度',
|
||||
installmentPeriod: '分期期限',
|
||||
optional: '可选',
|
||||
applicationAmount: '申请金额',
|
||||
loanTerm: '借款期限',
|
||||
repaymentPerInstallment: '每期还款',
|
||||
dailyInterestRate: '月利率',
|
||||
totalInterest: '总利息',
|
||||
successfulBorrowing: '成功借款',
|
||||
enterAgreement: '我已阅读并同意',
|
||||
authAgreement: '委托授权协议',
|
||||
serviceAgreement: '平台服务协议',
|
||||
lawAgreement: '法律协议',
|
||||
loansAgreement: '借款协议',
|
||||
immediateBorrowing: '立即借款',
|
||||
pleaseFillInYourPersonalInformationFirst: '请先填写个人资料',
|
||||
pleaseEnterAgreement: '请阅读并同意相关协议',
|
||||
},
|
||||
my: {
|
||||
userInfo: '我的资料',
|
||||
loan: '我的借款',
|
||||
repayment: '我的还款',
|
||||
legalLiability: '法律责任',
|
||||
uploadPassword: '修改密码',
|
||||
logout: '退出登录',
|
||||
language: '切换语言',
|
||||
},
|
||||
serveList: {
|
||||
loan: '我的贷款',
|
||||
balance: '账户余额',
|
||||
amountToBeRepaid: '待还款金额',
|
||||
immediateWithdrawal: '立即提现',
|
||||
financialSecurity: '账户资金安全由银行保障',
|
||||
},
|
||||
borrowInfo: {
|
||||
applicationTime: '申请时间',
|
||||
loanDetails: '贷款详情',
|
||||
loanInfo: '借款信息',
|
||||
loanNo: '贷款编号',
|
||||
loanAmount: '借款金额',
|
||||
loanCycle: '贷款周期',
|
||||
withdrawalBank: '提现银行',
|
||||
repaymentPerInstallment: '每期还款',
|
||||
describe: '描述',
|
||||
receivingAccount: '收款帐户',
|
||||
usageOfLoan: '借款用途',
|
||||
},
|
||||
loans: {
|
||||
enterSubmitApplication: '您确定要申请贷款吗'
|
||||
},
|
||||
userInfo: {
|
||||
realPrompt: '填写真实有效的信息,审核才会通过哦',
|
||||
idCardPrompt: '需本人身份证,且内容清晰可辨',
|
||||
photographPrompt: '请您确认拍照权限已开启',
|
||||
name: '姓名',
|
||||
idCard: '身份证号',
|
||||
idCardUp1: '点击上传身份证人像面',
|
||||
idCardUp2: '点击上传身份证国徽面',
|
||||
idCardUp3: '点击上传手持身份证照',
|
||||
shootingRequirements: '拍摄要求',
|
||||
standardShooting: '标准拍摄',
|
||||
missingBorder: '边框缺失',
|
||||
outOfFocus: '照片模糊',
|
||||
flashStrongly: '闪光强烈',
|
||||
unitName: '单位名称',
|
||||
position: '职位',
|
||||
workTelephone: '单位电话',
|
||||
workingAge: '工作年龄',
|
||||
monthlyPay: '月薪',
|
||||
unitAddress: '单位地址',
|
||||
addressInfo: '详细地址',
|
||||
currentResidentialAddress: '现居住地址',
|
||||
directFamilyContactPerson: '直系亲属联系人',
|
||||
relationship: '关系',
|
||||
parents: '父母',
|
||||
spouse: '配偶',
|
||||
children: '子女',
|
||||
grandparents: '祖父母',
|
||||
friend: '朋友',
|
||||
bankOfDeposit: '开户银行',
|
||||
bankCard: '银行卡号',
|
||||
},
|
||||
router: {
|
||||
home: '首页',
|
||||
serveList: '钱包',
|
||||
message: '聊天',
|
||||
my: '我的',
|
||||
userInfo: '我的资料',
|
||||
userInfo1: '基本信息',
|
||||
signature: '签名',
|
||||
contract: '合同',
|
||||
userInfo2: '提交资料',
|
||||
userInfo3: '收款银行卡',
|
||||
loansInfo: '借款详情',
|
||||
loansInfo1: '提现',
|
||||
myLoan: '我的借款',
|
||||
myRepayment: '我的还款',
|
||||
borrowInfo: '贷款详情',
|
||||
uploadPassword: '修改密码',
|
||||
login: '登录',
|
||||
register: '注册',
|
||||
forget: '忘记密码',
|
||||
agreement: '协议',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,20 +1,29 @@
|
||||
import './array.prototype.d.ts';
|
||||
import './date.prototype.d.ts';
|
||||
import './string.prototype.d.ts';
|
||||
// 导入资源文件
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from "./router";
|
||||
import {setupStore} from "@/store";
|
||||
import {setupCustomComponents} from "@/plugins/customComponents";
|
||||
import {vantLocales} from './lang'
|
||||
// 2. 引入组件样式
|
||||
import 'vant/lib/index.css';
|
||||
import 'vant/es/toast/style'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
// app.use(i18n)
|
||||
|
||||
|
||||
app.use(router)
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
setupStore(app)
|
||||
|
||||
// vant-ui组件国际化
|
||||
vantLocales(app)
|
||||
|
||||
setupCustomComponents(app)
|
||||
|
||||
@@ -2,7 +2,9 @@ import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router';
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {domainStoreWidthOut} from "@/store/modules/domain";
|
||||
import {getDomainList} from "@/api/login";
|
||||
import { i18n } from '@/lang';
|
||||
|
||||
const { t } = i18n.global
|
||||
export const constantRouter: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/',
|
||||
@@ -17,7 +19,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'index',
|
||||
component: () => import('@/views/index/index.vue'),
|
||||
meta: {
|
||||
title: '首页',
|
||||
title: t('router.home'),
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@@ -25,7 +27,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'Home',
|
||||
component: () => import('@/views/index/home/index.vue'),
|
||||
meta: {
|
||||
title: '首页',
|
||||
title: t('router.home'),
|
||||
showBar: false
|
||||
},
|
||||
},
|
||||
@@ -35,7 +37,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
component: () => import('@/views/index/serveList/index.vue'),
|
||||
meta: {
|
||||
isPermissions: true,
|
||||
title: '钱包',
|
||||
title: t('router.serveList'),
|
||||
showBar: false
|
||||
},
|
||||
},
|
||||
@@ -45,7 +47,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
component: () => import('@/views/index/message/index.vue'),
|
||||
meta: {
|
||||
isPermissions: true,
|
||||
title: '聊天',
|
||||
title: t('router.message'),
|
||||
showBar: false
|
||||
},
|
||||
},
|
||||
@@ -55,7 +57,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
component: () => import('@/views/index/my/index.vue'),
|
||||
meta: {
|
||||
isPermissions: true,
|
||||
title: '我的',
|
||||
title: t('router.my'),
|
||||
showBar: false
|
||||
},
|
||||
}
|
||||
@@ -66,7 +68,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'userInfo',
|
||||
component: () => import('@/views/my/userInfo/index.vue'),
|
||||
meta: {
|
||||
title: '我的资料',
|
||||
title: t('router.userInfo'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -76,7 +78,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'userInfo1',
|
||||
component: () => import('@/views/my/userInfo1/index.vue'),
|
||||
meta: {
|
||||
title: '基本信息',
|
||||
title: t('router.userInfo1'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -86,7 +88,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'signature',
|
||||
component: () => import('@/views/my/signature/index.vue'),
|
||||
meta: {
|
||||
title: '签名',
|
||||
title: t('router.signature'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -96,7 +98,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'contract',
|
||||
component: () => import('@/views/my/contract/index.vue'),
|
||||
meta: {
|
||||
title: '合同',
|
||||
title: t('router.contract'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -106,7 +108,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'userInfo2',
|
||||
component: () => import('@/views/my/userInfo2/index.vue'),
|
||||
meta: {
|
||||
title: '提交资料',
|
||||
title: t('router.userInfo2'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -116,7 +118,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'userInfo3',
|
||||
component: () => import('@/views/my/userInfo3/index.vue'),
|
||||
meta: {
|
||||
title: '收款银行卡',
|
||||
title: t('router.userInfo3'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -126,7 +128,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'loansInfo',
|
||||
component: () => import('@/views/loans/info/index.vue'),
|
||||
meta: {
|
||||
title: '借款详情',
|
||||
title: t('router.loansInfo'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -136,7 +138,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'loansInfo1',
|
||||
component: () => import('@/views/loans/info1/index.vue'),
|
||||
meta: {
|
||||
title: '提现',
|
||||
title: t('router.loansInfo1'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -146,7 +148,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'myLoan',
|
||||
component: () => import('@/views/my/myLoan/index.vue'),
|
||||
meta: {
|
||||
title: '我的借款',
|
||||
title: t('router.myLoan'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -156,7 +158,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'myRepayment',
|
||||
component: () => import('@/views/my/myRepayment/index.vue'),
|
||||
meta: {
|
||||
title: '我的还款',
|
||||
title: t('router.myRepayment'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -167,7 +169,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'borrowInfo',
|
||||
component: () => import('@/views/borrowInfo/index.vue'),
|
||||
meta: {
|
||||
title: '贷款详情',
|
||||
title: t('router.borrowInfo'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -177,7 +179,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'uploadPassword',
|
||||
component: () => import('@/views/uploadPassword/index.vue'),
|
||||
meta: {
|
||||
title: '修改密码',
|
||||
title: t('router.uploadPassword'),
|
||||
isPermissions: true,
|
||||
showBar: true
|
||||
},
|
||||
@@ -190,7 +192,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
meta: {
|
||||
title: '登录',
|
||||
title: t('router.login'),
|
||||
showBar: false
|
||||
},
|
||||
},
|
||||
@@ -199,7 +201,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'register',
|
||||
component: () => import('@/views/register/index.vue'),
|
||||
meta: {
|
||||
title: '注册',
|
||||
title: t('router.register'),
|
||||
showBar: true
|
||||
},
|
||||
},
|
||||
@@ -208,7 +210,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'forget',
|
||||
component: () => import('@/views/forget/index.vue'),
|
||||
meta: {
|
||||
title: '忘记密码',
|
||||
title: t('router.forget'),
|
||||
showBar: true
|
||||
},
|
||||
},
|
||||
@@ -217,7 +219,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
|
||||
name: 'agreement',
|
||||
component: () => import('@/views/agreement/agreement.vue'),
|
||||
meta: {
|
||||
title: '协议',
|
||||
title: t('router.agreement'),
|
||||
showBar: true
|
||||
},
|
||||
}
|
||||
@@ -238,6 +240,7 @@ const router = createRouter({
|
||||
// @ts-ignore
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
const dsw = domainStoreWidthOut()
|
||||
|
||||
if (!dsw.getDomain || dsw.getDomain.length == 0) {
|
||||
const response = await getDomainList()
|
||||
if (response && response.data) {
|
||||
@@ -245,9 +248,11 @@ router.beforeEach(async (to, from, next) => {
|
||||
dsw.setDomain(domain)
|
||||
}
|
||||
}
|
||||
if (to.meta.title) { // 判断是否有标题
|
||||
document.title = to.meta.title as string;
|
||||
}
|
||||
// if (to.meta.titleI18n) { // 判断是否有标题
|
||||
// console.log('sssssss', to.meta.titleI18n)
|
||||
// // document.title = to.meta.title as string;
|
||||
// document.title = t(to.meta.titleI18n as string);
|
||||
// }
|
||||
if (to.meta.isPermissions) {
|
||||
const userStore = useUserStore()
|
||||
if (!userStore.getToken) {
|
||||
|
||||
@@ -138,8 +138,9 @@ 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;
|
||||
// let domainUrl = domain[Math.floor((Math.random()*domain.length))];
|
||||
// config.url = domainUrl + config.url;
|
||||
// config.url = domainUrl + config.url;
|
||||
}else if(apiUrl && isString(apiUrl)){
|
||||
config.url = `${apiUrl}${config.url}`;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -11,8 +11,10 @@ import {getAgreement} from "@/api";
|
||||
import {onMounted, ref} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
import {px2vw} from "@/utils";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
const agreement = ref('')
|
||||
|
||||
const _getSystemConfigOne = (key) => {
|
||||
@@ -21,10 +23,10 @@ const _getSystemConfigOne = (key) => {
|
||||
})
|
||||
}
|
||||
const tittleMap = {
|
||||
loansAgreement: '借款协议',
|
||||
serviceAgreement: '平台服务协议',
|
||||
authAgreement: '委托授权协议',
|
||||
lawAgreement: '法律协议',
|
||||
loansAgreement: t('home.loansAgreement'),
|
||||
serviceAgreement: t('home.serviceAgreement'),
|
||||
authAgreement: t('home.authAgreement'),
|
||||
lawAgreement: t('home.lawAgreement'),
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="content">
|
||||
<j-gap height="120" background="#F9BF3A" opacity="0"/>
|
||||
<div class="action">
|
||||
<view class="tt">申请时间 {{ new Date(borrowInfo.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view>
|
||||
<view class="tt">{{ $t('borrowInfo.applicationTime') }} {{ new Date(borrowInfo.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view>
|
||||
|
||||
|
||||
<view class="footer-content">
|
||||
@@ -13,7 +13,7 @@
|
||||
</van-steps>
|
||||
</view>
|
||||
<view class="footer-content-2">
|
||||
<view class="footer-content-2-tit gray_color">温馨提示</view>
|
||||
<view class="footer-content-2-tit gray_color">{{ $t('app.tips') }}</view>
|
||||
<view class="footer-content-2-content" :style="{color: stepBorrow.borrowNameStyle || '#e84a10'}">
|
||||
{{ stepBorrow.borrowRemark }}
|
||||
</view>
|
||||
@@ -23,15 +23,15 @@
|
||||
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
<view>贷款详情</view>
|
||||
<view>{{ $t('borrowInfo.loanDetails') }}</view>
|
||||
</view>
|
||||
<van-cell title="贷款编号" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.tradeNo" />
|
||||
<van-cell title="借款金额" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(borrowInfo.totalLoanMoney)" />
|
||||
<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="defaultCoinUnit + borrowInfo.totalLoanMoney" />
|
||||
<!-- <van-cell title="借款期限" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.totalMonth + '个月'" />-->
|
||||
<van-cell title="贷款周期" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.totalMonth + '个月'" />
|
||||
<van-cell title="提现银行" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.bankType" />
|
||||
<van-cell title="每期还款" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(borrowInfo.avgRepayment)" />
|
||||
<van-cell title="描述" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.noteRemark" />
|
||||
<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="defaultCoinUnit + borrowInfo.avgRepayment" />
|
||||
<van-cell :title="$t('borrowInfo.describe')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.noteRemark" />
|
||||
|
||||
|
||||
|
||||
@@ -45,25 +45,27 @@ 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": "",
|
||||
"borrowRemark": "",
|
||||
"borrowStep": [
|
||||
{
|
||||
"name": "提交成功",
|
||||
"name": t('app.submittedSuccessfully'),
|
||||
"over": true
|
||||
},
|
||||
{
|
||||
"name": "银行卡异常",
|
||||
"name": "",
|
||||
"over": true
|
||||
},
|
||||
{
|
||||
"name": "到账成功",
|
||||
"name": t('app.receivedSuccessfully'),
|
||||
"over": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
v-model="loginData.phoneNumber"
|
||||
v-if="flag === '1'"
|
||||
class="login-btn"
|
||||
label="手机号码"
|
||||
placeholder="请输入手机号码"
|
||||
:label="$t('app.phoneNumber')"
|
||||
:placeholder="$t('app.enter') + $t('app.phoneNumber')"
|
||||
label-align="top"
|
||||
style="background: #12332100"
|
||||
type="tel"
|
||||
@@ -19,8 +19,8 @@
|
||||
v-model="loginData.code"
|
||||
class="login-btn"
|
||||
v-if="flag === '1'"
|
||||
label="验证码"
|
||||
placeholder="请输入验证码"
|
||||
:label="$t('app.verificationCode')"
|
||||
:placeholder="$t('app.enter') + $t('app.verificationCode')"
|
||||
label-align="top"
|
||||
style="background: #12332100"
|
||||
type="number"
|
||||
@@ -29,10 +29,10 @@
|
||||
<div class="password-btn">
|
||||
<van-count-down v-show="countDownFlag" ref="countDown" :auto-start="false" :time="time" @finish="onFinish">
|
||||
<template #default="timeData">
|
||||
<span class="block">{{ timeData.seconds }}秒</span>
|
||||
<span class="block">{{ timeData.seconds }}{{ $t('app.second') }}</span>
|
||||
</template>
|
||||
</van-count-down>
|
||||
<div v-show="!countDownFlag" style="color: #bc7c1c" @click="start">发送验证码</div>
|
||||
<div v-show="!countDownFlag" style="color: #bc7c1c" @click="start">{{ $t('app.send') }}{{ $t('app.verificationCode') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
@@ -41,9 +41,9 @@
|
||||
v-model="loginData.password"
|
||||
class="login-btn"
|
||||
v-if="flag === '2'"
|
||||
label="登录密码"
|
||||
:label="$t('app.login') + $t('app.password')"
|
||||
label-align="top"
|
||||
placeholder="请设置6-16位密码"
|
||||
:placeholder="$t('app.passwordPlaceholder')"
|
||||
style="background: #12332100"
|
||||
type="password"
|
||||
/>
|
||||
@@ -52,9 +52,9 @@
|
||||
v-model="loginData.confirmPassword"
|
||||
class="login-btn"
|
||||
v-if="flag === '2'"
|
||||
label="确认密码"
|
||||
:label="$t('app.confirm') + $t('app.password')"
|
||||
label-align="top"
|
||||
placeholder="请再次输入密码"
|
||||
:placeholder="$t('app.passwordPlaceholder1')"
|
||||
style="background: #12332100"
|
||||
type="password"
|
||||
/>
|
||||
@@ -67,7 +67,7 @@
|
||||
v-if="flag === '1'"
|
||||
@click.stop="next"
|
||||
>
|
||||
下一步
|
||||
{{ $t('app.next') }}
|
||||
</van-button>
|
||||
|
||||
<van-button
|
||||
@@ -78,7 +78,7 @@
|
||||
v-if="flag === '2'"
|
||||
@click.stop="updatePwdBtn"
|
||||
>
|
||||
确认修改
|
||||
{{ $t('app.confirm') }}{{ $t('app.update') }}
|
||||
</van-button>
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
import {reactive, ref} from "vue";
|
||||
import {sendSmsForget, updatePwd} from "@/api/login";
|
||||
import {showToast} from "vant";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const loginData = reactive({
|
||||
phone: null,
|
||||
@@ -100,6 +101,7 @@ const loginData = reactive({
|
||||
})
|
||||
|
||||
const flag = ref('1')
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
const time = ref(60 * 1000);
|
||||
@@ -118,7 +120,7 @@ const start = () => {
|
||||
onFinish()
|
||||
})
|
||||
} else {
|
||||
showToast('请输入手机号')
|
||||
showToast(t('app.enter') + t('app.phoneNumber'))
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
<div :style="{padding: '0 ' + px2vw(30) + ' ' + px2vw(20)}">
|
||||
|
||||
<div class="product">
|
||||
<div class="product-title">产品详情</div>
|
||||
<div class="product-title">{{$t('home.productDetails')}}</div>
|
||||
|
||||
<div class="product-content">
|
||||
<div class="product-content-label">
|
||||
<div>最低日息</div>
|
||||
<div><span>{{ calLoan.loanRate }}%</span></div>
|
||||
<div>{{$t('home.minimumDailyInterestRate')}}</div>
|
||||
<div><span>{{ loans.minMonthRate }}%</span></div>
|
||||
</div>
|
||||
<div class="product-content-label">
|
||||
<div>借款额度</div>
|
||||
<div><span>¥{{ loans.loansMinAccount }}-{{ loans.loansMaxAccount }}</span></div>
|
||||
<div>{{$t('home.borrowingLimit')}}</div>
|
||||
<div><span>{{ defaultCoinUnit }}{{ loans.loansMinAccount }}-{{ loans.loansMaxAccount }}</span></div>
|
||||
</div>
|
||||
<div class="product-content-label">
|
||||
<div>分期期限</div>
|
||||
<div><span>可选{{ loans.loansMonth.replaceAll(',', '/') }}</span></div>
|
||||
<div>{{$t('home.installmentPeriod')}}</div>
|
||||
<div><span>{{$t('home.optional')}}{{ loans.loansMonth.replaceAll(',', '/') }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,29 +33,29 @@
|
||||
|
||||
|
||||
<div class="apply">
|
||||
<div class="apply-title yellow_color">申请金额(元)</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">
|
||||
<div class="apply-jkqx-title">借款期限</div>
|
||||
<div class="apply-jkqx-title">{{$t('home.loanTerm')}}</div>
|
||||
<div class="apply-jkqx-item-box">
|
||||
<div v-for="lm in loans.loansMonthList" :key="lm" class="apply-jkqx-item" :class="{'checked': lm === lmChecked}" @click="lmChecked = lm">
|
||||
{{ lm }}个月
|
||||
{{ lm }}{{$t('app.month')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,9 +63,9 @@
|
||||
<j-gap height="2" background="#fff"/>
|
||||
|
||||
<div class="apply-mqhk">
|
||||
<div>每期还款</div>
|
||||
<div>¥{{ calLoan.avgRepayment }}</div>
|
||||
<div>(日利率{{ calLoan.loanRate }}% 总利息¥{{ calLoan.totalInterest }})</div>
|
||||
<div>{{ $t('home.repaymentPerInstallment') }}</div>
|
||||
<div>{{ defaultCoinUnit }}{{ calLoan.avgRepayment }}</div>
|
||||
<div>({{ $t('home.dailyInterestRate') }}{{ calLoan.loanRateMonth*100 }}% {{ $t('home.totalInterest') }}{{ defaultCoinUnit }}{{ calLoan.totalInterest }})</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -75,17 +75,17 @@
|
||||
<van-icon :name="getAssetsImages('home/xlb.png')" size="30"/>
|
||||
<div>{{ loansUser.time }}</div>
|
||||
<div style="color: #ec6401">{{ loansUser.phone }}</div>
|
||||
<div>成功借款</div>
|
||||
<div style="color: #BC7C1C; font-weight: 600;">¥{{ loansUser.amount }}</div>
|
||||
<div>{{ $t('home.successfulBorrowing') }}</div>
|
||||
<div style="color: #BC7C1C; font-weight: 600;">{{ defaultCoinUnit }}{{ loansUser.amount }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="xieyi">
|
||||
<van-checkbox v-model="checked" :icon-size="px2vw(28)" style="align-items: baseline" checked-color="linear-gradient(to right, #F9D88D, #D2A64C)">
|
||||
我已阅读并同意
|
||||
<span class="yellow_color1" @click.stop="go('authAgreement')">《委托授权协议》</span>
|
||||
<span class="yellow_color1" @click.stop="go('serviceAgreement')">《平台服务协议》</span>
|
||||
<span class="yellow_color1" @click.stop="go('loansAgreement')">《借款协议》</span>
|
||||
{{ $t('home.enterAgreement') }}
|
||||
<span class="yellow_color1" @click.stop="go('authAgreement')">《{{ $t('home.authAgreement') }}》</span>
|
||||
<span class="yellow_color1" @click.stop="go('serviceAgreement')">《{{ $t('home.serviceAgreement') }}》</span>
|
||||
<span class="yellow_color1" @click.stop="go('loansAgreement')">《{{ $t('home.loansAgreement') }}》</span>
|
||||
</van-checkbox>
|
||||
</div>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
style="width: 100%; "
|
||||
@click.stop="immediateBorrowing"
|
||||
>
|
||||
立即借款
|
||||
{{ $t('home.immediateBorrowing') }}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
@@ -115,26 +115,33 @@ import {resetData} from "@/utils/dataUtil";
|
||||
import {watch} from "vue-demi";
|
||||
import {showToast} from "vant";
|
||||
import JGap from "@/components/JGap/JGap.vue";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const user = useUserStore()
|
||||
const router = useRouter()
|
||||
|
||||
const { t } = useI18n()
|
||||
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
|
||||
}
|
||||
|
||||
@@ -159,14 +166,14 @@ const immediateBorrowing = () => {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
showToast('请先填写个人资料')
|
||||
showToast(t('home.pleaseFillInYourPersonalInformationFirst'))
|
||||
router.push({
|
||||
path: '/userInfo'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
showToast('请阅读并同意相关协议')
|
||||
showToast(t('home.pleaseEnterAgreement'))
|
||||
}
|
||||
|
||||
const loans = reactive({
|
||||
@@ -176,10 +183,12 @@ const loans = reactive({
|
||||
loansInitMonth: "",
|
||||
loansMaxAccount: 0,
|
||||
loansMinAccount: 0,
|
||||
minDayServiceRate: 0,
|
||||
loansMonth: "",
|
||||
loansMonthList: [],
|
||||
serviceRate: "",
|
||||
serviceRateList: [],
|
||||
defaultCoinUnit: "$"
|
||||
})
|
||||
const _getLoansInfo = () => {
|
||||
getLoansInfo().then(res => {
|
||||
@@ -214,7 +223,9 @@ const calLoan = reactive({
|
||||
"totalInterest": 0,
|
||||
"totalLoanMoney": 0,
|
||||
"totalMonth": 0,
|
||||
"totalRepayment": 0
|
||||
"totalRepayment": 0,
|
||||
"loanRateDay": 0,
|
||||
defaultCoinUnit: "$"
|
||||
})
|
||||
|
||||
const params = computed(() => {
|
||||
@@ -240,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)
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
<van-tabbar route v-model="active" active-color="#F9BF3A">
|
||||
<van-tabbar-item v-for="tabBar in tabBarList" :key="tabBar.name" :replace="tabBar.replace" :to="tabBar.to">
|
||||
<span>{{ tabBar.text }}</span>
|
||||
<!-- <van-text-ellipsis :content="$t(tabBar.text)" />-->
|
||||
<div style="white-space: nowrap;overflow: hidden;text-align: center">{{ $t(tabBar.text) }}</div>
|
||||
<template #icon="props">
|
||||
<van-icon :color="props.active ? '' : 'rgb(229, 229, 229)'" :name="props.active ? tabBar.active : tabBar.inactive" />
|
||||
</template>
|
||||
@@ -16,16 +17,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from "vue";
|
||||
import JGap from "@/components/JGap/JGap.vue";
|
||||
import { reactive, ref } from 'vue';
|
||||
import {getAssetsImages} from "@/utils";
|
||||
import {useBackgroundHook} from "@/hooks/useBackgroundHook";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const tabBarList = [
|
||||
const { t } = useI18n()
|
||||
const tabBarList = reactive([
|
||||
{
|
||||
to: '/home',
|
||||
name: 'home',
|
||||
text: '首页',
|
||||
text: 'app.home',
|
||||
replace: true,
|
||||
active: getAssetsImages('tabBar/home-active.png'),
|
||||
inactive: getAssetsImages('tabBar/home-inactive.png')
|
||||
@@ -33,7 +34,7 @@ const tabBarList = [
|
||||
{
|
||||
to: '/serveList',
|
||||
name: 'serveList',
|
||||
text: '钱包',
|
||||
text: 'app.serveList',
|
||||
replace: true,
|
||||
active: getAssetsImages('tabBar/artificer-active.png'),
|
||||
inactive: getAssetsImages('tabBar/artificer-inactive.png')
|
||||
@@ -41,7 +42,7 @@ const tabBarList = [
|
||||
{
|
||||
to: '/message',
|
||||
name: 'message',
|
||||
text: '客服',
|
||||
text: 'app.message',
|
||||
replace: true,
|
||||
active: 'chat',
|
||||
inactive: 'chat'
|
||||
@@ -49,20 +50,21 @@ const tabBarList = [
|
||||
{
|
||||
to: '/my',
|
||||
name: 'my',
|
||||
text: '我的',
|
||||
text: 'app.my',
|
||||
replace: true,
|
||||
active: getAssetsImages('tabBar/my-active.png'),
|
||||
inactive: getAssetsImages('tabBar/my-inactive.png')
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const active = ref(0)
|
||||
|
||||
// const {setBodyBackground} = useBackgroundHook()
|
||||
// setBodyBackground()
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
: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 - 46px)">
|
||||
<!-- <j-nav-bar/>-->
|
||||
<div ref="root" class="frame" style="height: calc(100vh - 50px)">
|
||||
<iframe :src="iframeSrc" class="frame-iframe" ref="frameRef"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -9,21 +9,21 @@
|
||||
<div class="content">
|
||||
|
||||
<div class="action">
|
||||
<van-cell title="我的资料" is-link to="userInfo" >
|
||||
<van-cell :title="$t('my.userInfo')" is-link to="userInfo" >
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
|
||||
<van-icon :name="getAssetsImages('my/my_info.png')" />
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="我的借款" is-link to="myLoan" >
|
||||
<van-cell :title="$t('my.loan')" is-link to="myLoan" >
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
|
||||
<van-icon :name="getAssetsImages('my/my_info1.png')" />
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="我的还款" is-link to="myRepayment" >
|
||||
<van-cell :title="$t('my.repayment')" is-link to="myRepayment" >
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
|
||||
<van-icon :name="getAssetsImages('my/my_info2.png')" />
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell title="法律责任" is-link @click="go('/agreement', 'lawAgreement')" >
|
||||
<van-cell :title="$t('my.legalLiability')" is-link @click="go('/agreement', 'lawAgreement')" >
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
|
||||
<van-icon :name="getAssetsImages('my/my_info4.png')" />
|
||||
@@ -60,14 +60,21 @@
|
||||
<!-- </van-cell>-->
|
||||
</div>
|
||||
<div class="action">
|
||||
<van-cell title="修改密码" is-link to="uploadPassword" >
|
||||
<van-cell :title="$t('my.uploadPassword')" is-link to="uploadPassword" >
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
|
||||
<van-icon :name="getAssetsImages('my/my_info5.png')" />
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="退出登录" is-link @click="logout" >
|
||||
<!-- <van-cell :title="$t('my.language')" is-link @click="checkLanguage()" >-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">-->
|
||||
<!-- <van-icon name="chat-o" />-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell :title="$t('my.logout')" is-link @click="logout" >
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
|
||||
<van-icon :name="getAssetsImages('my/my_info66.png')" />
|
||||
@@ -75,28 +82,39 @@
|
||||
</template>
|
||||
</van-cell>
|
||||
</div>
|
||||
|
||||
<van-popup v-model:show="showPicker" round position="bottom">
|
||||
<van-picker
|
||||
:columns="columns"
|
||||
@confirm="onConfirm"
|
||||
@cancel="onCancel"
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {showConfirmDialog} from "vant";
|
||||
import { showConfirmDialog, showToast } from 'vant';
|
||||
import {getAssetsImages} from "@/utils";
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {useRouter} from "vue-router";
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
import {getCustomerInfo} from "@/api";
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { getDefaultLocal } from '@/api/system/user';
|
||||
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
||||
const headerImage = ref('https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg')
|
||||
|
||||
const logout = () => {
|
||||
|
||||
showConfirmDialog({
|
||||
title: '提示',
|
||||
message: '您确定要退出登录吗',
|
||||
title: t('app.prompt'),
|
||||
message: t('app.enterLogout'),
|
||||
width: '500px'
|
||||
})
|
||||
.then(() => {
|
||||
@@ -121,6 +139,41 @@ const go = (url, key) => {
|
||||
})
|
||||
}
|
||||
|
||||
const checkLanguage = () => {
|
||||
// getDefaultLocal().then(res => {
|
||||
// console.log('res', res)
|
||||
// if (res === 'gu_IN') {
|
||||
// localStorage.setItem('lang', 'id')
|
||||
// } else {
|
||||
// localStorage.setItem('lang', 'zh')
|
||||
// }
|
||||
// location.reload()
|
||||
// })
|
||||
showPicker.value = true
|
||||
}
|
||||
const showPicker = ref(false)
|
||||
|
||||
const columns = [
|
||||
{ text: '中文', value: 'zh_CN' },
|
||||
{ text: 'Bahasa indonesia', value: 'id_ID' },
|
||||
{ text: 'हिंदी', value: 'hi_IN' },
|
||||
{ text: 'English', value: 'en_US' },
|
||||
// { text: t('language.zh'), value: 'zh' },
|
||||
// { text: t('language.hi'), value: 'hi' },
|
||||
// { text: t('language.id'), value: 'id' },
|
||||
];
|
||||
const onConfirm = ({ selectedValues }) => {
|
||||
// const lang = localStorage.getItem('lang')
|
||||
// if (lang === 'zh') {
|
||||
// } else {
|
||||
// localStorage.setItem('lang', 'zh')
|
||||
// }
|
||||
localStorage.setItem('lang', selectedValues)
|
||||
location.reload()
|
||||
};
|
||||
const onCancel = () => {
|
||||
showPicker.value = false;
|
||||
};
|
||||
|
||||
|
||||
const customerInfo = reactive({
|
||||
|
||||
@@ -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">我的贷款:{{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">账户余额(元)</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">待还款金额(元)</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">
|
||||
@@ -25,7 +25,7 @@
|
||||
style="color: #e6a600;width: 80%"
|
||||
@click.stop="withdrawalBtn"
|
||||
>
|
||||
立即提现
|
||||
{{$t('serveList.immediateWithdrawal')}}
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -33,7 +33,7 @@
|
||||
<view class="footer">
|
||||
<view class="footer-t gray_color ">
|
||||
<van-icon :name="getAssetsImages('common/yhd.png')" size="18"/>
|
||||
账户资金安全由银行保障
|
||||
{{$t('serveList.financialSecurity')}}
|
||||
</view>
|
||||
|
||||
<view class="footer-content">
|
||||
@@ -43,7 +43,7 @@
|
||||
</van-steps>
|
||||
</view>
|
||||
<view class="footer-content-2">
|
||||
<view class="footer-content-2-tit gray_color">温馨提示</view>
|
||||
<view class="footer-content-2-tit gray_color">{{$t('app.tips')}}</view>
|
||||
<view class="footer-content-2-content" :style="{color: stepBorrow.borrowNameStyle || '#e84a10'}">
|
||||
{{ stepBorrow.borrowRemark }}
|
||||
</view>
|
||||
@@ -51,8 +51,25 @@
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
<van-dialog :width="px2vw(650)" v-model:show="withdrawalShow" title="提现" show-cancel-button @confirm="saveUserInfoBtn">
|
||||
<van-field v-model="withdrawAmount" type="number" label="提现金额" placeholder="请输入你的提现金额"/>
|
||||
<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,16 +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')
|
||||
|
||||
@@ -112,15 +135,15 @@ const stepBorrow = reactive({
|
||||
"borrowRemark": "",
|
||||
"borrowStep": [
|
||||
{
|
||||
"name": "提交成功",
|
||||
"name": t('app.submittedSuccessfully'),
|
||||
"over": true
|
||||
},
|
||||
{
|
||||
"name": "银行卡异常",
|
||||
"name": "",
|
||||
"over": true
|
||||
},
|
||||
{
|
||||
"name": "到账成功",
|
||||
"name": t('app.receivedSuccessfully'),
|
||||
"over": false
|
||||
}
|
||||
]
|
||||
@@ -149,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('提现成功')
|
||||
router.push({
|
||||
path: '/serveList'
|
||||
})
|
||||
})
|
||||
// })
|
||||
// .catch(() => {
|
||||
// // on cancel
|
||||
// });
|
||||
}
|
||||
|
||||
const _getSetting = () => {
|
||||
getSetting().then(res => {
|
||||
openWithdrawCode.value = res.openWithdrawCode
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
_getCustomerInfo()
|
||||
_getStepBorrow()
|
||||
_getSetting()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -4,30 +4,35 @@
|
||||
<j-gap height="120" background="#F9BF3A" opacity="0"/>
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
确认借款信息
|
||||
{{ $t('app.confirm') }}{{ $t('borrowInfo.loanInfo') }}
|
||||
</view>
|
||||
<van-cell title="借款金额" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(loansInfo.totalLoanMoney)" />
|
||||
<van-cell title="借款期限" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="loansInfo.totalMonth + '个月'" />
|
||||
<van-cell title="到账银行" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="userInfo.bankType" />
|
||||
<van-cell title="收款账号" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="backCardNumDesensitization(userInfo.backCardNum)" />
|
||||
<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)" />
|
||||
</div>
|
||||
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
借款用途
|
||||
{{ $t('borrowInfo.usageOfLoan') }}
|
||||
</view>
|
||||
<van-field
|
||||
v-model="loansInfo.noteRemark"
|
||||
rows="5"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="请输入你的借款用途"
|
||||
:placeholder="$t('app.enter') + $t('borrowInfo.usageOfLoan')"
|
||||
/>
|
||||
</div>
|
||||
<div class="xieyi">
|
||||
<van-checkbox v-model="checked" :icon-size="px2vw(28)" style="align-items: baseline" checked-color="linear-gradient(to right, #F9D88D, #D2A64C)">
|
||||
我已阅读并同意
|
||||
<span class="yellow_color1" @click.stop="go('loansAgreement')">《借款协议》</span>
|
||||
{{ $t('home.enterAgreement') }}
|
||||
<span class="yellow_color1" @click.stop="go('loansAgreement')">《{{ $t('home.loansAgreement') }}》</span>
|
||||
</van-checkbox>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +45,7 @@
|
||||
@click.stop="saveUserInfoBtn"
|
||||
:disabled="!checked"
|
||||
>
|
||||
提交申请
|
||||
{{ $t('app.submitApplication') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,15 +54,18 @@
|
||||
<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";
|
||||
import {showConfirmDialog, showToast} from "vant";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const useUser = useUserStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
|
||||
const loansInfo = reactive({
|
||||
"customerId": useUser.getUserInfo.id,
|
||||
@@ -81,13 +89,13 @@ const go = (key) => {
|
||||
const saveUserInfoBtn = () => {
|
||||
|
||||
showConfirmDialog({
|
||||
title: '提示',
|
||||
message: '您确定要申请贷款吗',
|
||||
title: t('app.prompt'),
|
||||
message: t('loans.enterSubmitApplication'),
|
||||
width: '500px'
|
||||
})
|
||||
.then(() => {
|
||||
startBorrow(loansInfo).then(res => {
|
||||
showToast('申请成功')
|
||||
showToast(t('app.submittedSuccessfully'))
|
||||
router.push({
|
||||
path: '/serveList'
|
||||
})
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
<j-gap height="120" background="#F9BF3A" opacity="0"/>
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
确认提现信息
|
||||
{{ $t('app.confirm') }}{{ $t('app.withdrawal') }}{{ $t('app.info') }}
|
||||
</view>
|
||||
<van-cell title="到账银行" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="userInfo.bankType" />
|
||||
<van-cell title="收款账号" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="backCardNumDesensitization(userInfo.backCardNum)" />
|
||||
<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)" />
|
||||
</div>
|
||||
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
提现金额
|
||||
{{ $t('app.withdrawalAmount') }}
|
||||
</view>
|
||||
<van-field
|
||||
v-model="withdrawAmount"
|
||||
label="金额"
|
||||
:label="$t('app.withdrawalAmount')"
|
||||
type="number"
|
||||
placeholder="请输入你的提现金额"
|
||||
:placeholder="$t('app.enter') + $t('app.withdrawalAmount')"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="xieyi">-->
|
||||
@@ -37,7 +37,7 @@
|
||||
@click.stop="saveUserInfoBtn"
|
||||
:disabled="!withdrawAmount || withdrawAmount == 0"
|
||||
>
|
||||
提现
|
||||
{{ $t('app.withdrawal') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,10 +50,12 @@ import {useUserStore} from "@/store/modules/user";
|
||||
import {getBorrowWithdraw, getUserInfo} from "@/api";
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
import {showConfirmDialog, showToast} from "vant";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const useUser = useUserStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
const withdrawAmount = ref()
|
||||
@@ -72,13 +74,13 @@ const go = (key) => {
|
||||
const saveUserInfoBtn = () => {
|
||||
|
||||
showConfirmDialog({
|
||||
title: '提示',
|
||||
message: '您确定要提现吗',
|
||||
title: t('app.prompt'),
|
||||
message: t('app.enterWithdrawal'),
|
||||
width: '500px'
|
||||
})
|
||||
.then(() => {
|
||||
getBorrowWithdraw({withdrawAmount: withdrawAmount.value}).then(res => {
|
||||
showToast('提现成功')
|
||||
showToast(t('app.prompt') + t('app.success'))
|
||||
router.push({
|
||||
path: '/serveList'
|
||||
})
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<div class="content">
|
||||
<j-gap height="50" background="#F9BF3A" opacity="0"/>
|
||||
<div class="slogan">
|
||||
<div class="slogan-1">登录</div>
|
||||
<div class="slogan-1">{{ $t(('app.login')) }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<!-- 输入手机号,调起手机号键盘 -->
|
||||
<van-field
|
||||
v-model="loginData.mobile"
|
||||
label="账号"
|
||||
:label="$t('app.account')"
|
||||
class="login-btn"
|
||||
placeholder="请输入账号"
|
||||
:placeholder="$t('app.enter') + $t('app.account')"
|
||||
label-align="top"
|
||||
type="tel"
|
||||
/>
|
||||
@@ -19,8 +19,8 @@
|
||||
<!-- 允许输入数字,调起带符号的纯数字键盘 -->
|
||||
<van-field
|
||||
v-model="loginData.password"
|
||||
label="密码"
|
||||
placeholder="请输入密码"
|
||||
:label="$t('app.password')"
|
||||
:placeholder="$t('app.enter') + $t('app.password')"
|
||||
class="login-btn"
|
||||
label-align="top"
|
||||
type="password"
|
||||
@@ -33,12 +33,12 @@
|
||||
style="width: 100%; margin: 20px 0"
|
||||
@click.stop="loginBtn"
|
||||
>
|
||||
登录
|
||||
{{ $t('app.login') }}
|
||||
</van-button>
|
||||
|
||||
<view class="op">
|
||||
<view @click="goRegister" class="register">注册账号</view>
|
||||
<view @click="goForget" class="forget">忘记密码</view>
|
||||
<view @click="goRegister" class="register">{{ $t('app.register') }}{{ $t('app.account') }}</view>
|
||||
<view @click="goForget" class="forget">{{ $t('app.forgotPassword') }}</view>
|
||||
</view>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<j-nav-bar />
|
||||
<div class="contract" v-if="contractHtml" v-html="contractHtml"></div>
|
||||
<div v-else class="noData">暂无合同</div>
|
||||
<div v-else class="noData">{{ $t('app.none') + $t('app.contract') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,8 +11,10 @@ import {onMounted, ref} from 'vue'
|
||||
import {getContract} from "@/api";
|
||||
import {showToast} from "vant";
|
||||
import {useRoute} from "vue-router";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
const contractHtml = ref('')
|
||||
|
||||
@@ -24,7 +26,7 @@ const _getContract = () => {
|
||||
contractHtml.value = res
|
||||
})
|
||||
} else {
|
||||
showToast('暂无合同')
|
||||
showToast(t('app.none') + t('app.contract'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
>
|
||||
|
||||
<view class="j-item" v-for="item in borrowList" :key="item.id" @click="goInfo(item.tradeNo)">
|
||||
<view class="j-item-t">贷款编号:{{item.tradeNo}}</view>
|
||||
<view class="j-item-t">{{ $t('borrowInfo.loanNo') }}:{{item.tradeNo}}</view>
|
||||
|
||||
<view style="display: flex; justify-content: space-between">
|
||||
|
||||
<view class="j-item-c">
|
||||
<view>贷款总额:{{ item.totalLoanMoney }}元</view>
|
||||
<view class="yellow_color1">每期还款:{{ item.avgRepayment }}*{{ item.totalMonth }}</view>
|
||||
<view>贷款申请日期:{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</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>
|
||||
|
||||
<view :style="{paddingRight: px2vw(20)}" @click.stop="toContract(item.tradeNo)" style="display: flex; justify-content: center; align-items: center; flex-flow: column">
|
||||
<van-icon size="50" name="orders-o" />
|
||||
合同
|
||||
{{ $t('app.contract') }}
|
||||
</view>
|
||||
</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()
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
>
|
||||
|
||||
<view class="j-item" v-for="item in borrowList" :key="item.id" @click="goInfo(item.tradeNo)">
|
||||
<view class="j-item-t">贷款编号:{{item.tradeNo}}</view>
|
||||
<view class="j-item-t">{{ $t('borrowInfo.loanNo') }}:{{item.tradeNo}}</view>
|
||||
|
||||
<view class="j-item-c">
|
||||
<view>贷款总额:{{ item.totalLoanMoney }}元</view>
|
||||
<view class="yellow_color1">每期还款:{{ item.avgRepayment }}*{{ item.totalMonth }}</view>
|
||||
<view>贷款申请日期:{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</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>
|
||||
</view>
|
||||
|
||||
@@ -34,6 +34,7 @@ const finished = ref(false);
|
||||
const refreshing = ref(false);
|
||||
|
||||
|
||||
const defaultCoinUnit = localStorage.getItem('defaultCoinUnit')
|
||||
const router = useRouter()
|
||||
|
||||
const onLoad = () => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<j-nav-bar v-if="!useEdit" />
|
||||
<van-signature v-if="!useEdit" @submit="onSubmit" @clear="onClear" />
|
||||
<div class="my-signature">我的签名:</div>
|
||||
<div class="my-signature">{{ $t('app.my') + $t('app.signature') }}:</div>
|
||||
<van-image class="my-signature-image" v-if="userInfo.signature" :src="userInfo.signature" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="content">
|
||||
<j-gap height="120" background="#F9BF3A" opacity="0"/>
|
||||
<van-cell-group inset>
|
||||
<van-cell :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的资料" is-link to="userInfo1" :value="userInfo.cardFlag ? '完整' : '不完整'">
|
||||
<van-cell :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的资料" is-link to="userInfo1" :value="userInfo.cardFlag ? $t('app.complete') : $t('app.noComplete')">
|
||||
<template #title>
|
||||
<div class="t">身份信息</div>
|
||||
<div class="t2">*让我们了解您的资料信息</div>
|
||||
<div class="t">{{ $t('app.identityInformation') }}</div>
|
||||
<div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
|
||||
</template>
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
|
||||
@@ -15,10 +15,10 @@
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的借款" is-link to="userInfo2" :value="userInfo.infoFlag ? '完整' : '不完整'">
|
||||
<van-cell :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的借款" is-link to="userInfo2" :value="userInfo.infoFlag ? $t('app.complete') : $t('app.noComplete')">
|
||||
<template #title>
|
||||
<div class="t">资料信息</div>
|
||||
<div class="t2">*让我们了解您的资料信息</div>
|
||||
<div class="t">{{ $t('app.information') }}</div>
|
||||
<div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
|
||||
</template>
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
|
||||
@@ -27,10 +27,10 @@
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的还款" is-link to="userInfo3" :value="userInfo.bankFlag ? '完整' : '不完整'">
|
||||
<van-cell :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的还款" is-link to="userInfo3" :value="userInfo.bankFlag ? $t('app.complete') : $t('app.noComplete')">
|
||||
<template #title>
|
||||
<div class="t">收款银行卡</div>
|
||||
<div class="t2">*让我们了解您的资料信息</div>
|
||||
<div class="t">{{ $t('app.receivingBank') }}</div>
|
||||
<div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
|
||||
</template>
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
|
||||
@@ -38,10 +38,10 @@
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell v-if="userInfo.allowSignature" :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" title="我的借款" is-link to="signature" :value="userInfo.signatureFlag ? '完整' : '不完整'" >
|
||||
<van-cell v-if="userInfo.allowSignature" :style="{ padding: px2vw(40) + ' ' + px2vw(35)}" :title="$t('my.loan')" is-link to="signature" :value="userInfo.signatureFlag ? $t('app.complete') : $t('app.noComplete')" >
|
||||
<template #title>
|
||||
<div class="t">签名信息</div>
|
||||
<div class="t2">*让我们了解您的资料信息</div>
|
||||
<div class="t">{{ $t('app.signatureInformation') }}</div>
|
||||
<div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
|
||||
</template>
|
||||
<template #icon>
|
||||
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
|
||||
@@ -59,7 +59,7 @@
|
||||
style="width: 100%; "
|
||||
@click.stop="goHome"
|
||||
>
|
||||
立即借款
|
||||
{{ $t('home.immediateBorrowing') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,9 +4,23 @@
|
||||
<div class="content">
|
||||
<j-gap height="120" background="#F9BF3A" opacity="0"/>
|
||||
<div class="action">
|
||||
<view class="tt">填写真实有效的信息,审核才会通过哦~</view>
|
||||
<van-field required v-model="userInfo.realName" type="text" label="姓名" placeholder="请输入真实姓名" :rules="[{ required: true, message: '请输入真实姓名' }]"/>
|
||||
<van-field required v-model="userInfo.cardNum" type="text" label="身份证号" placeholder="请输入真实身份证号" :rules="[{ required: true, message: '请输入真实身份证号' }]"/>
|
||||
<view class="tt">{{ $t('userInfo.realPrompt') }}~</view>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.realName"
|
||||
type="text"
|
||||
:label="$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('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: '请输入真实身份证号' }]"/>-->
|
||||
|
||||
<!-- <van-number-keyboard-->
|
||||
@@ -20,76 +34,82 @@
|
||||
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
<view>*需本人身份证,且内容清晰可辨</view>
|
||||
<view>请您确认拍照权限已开启</view>
|
||||
<view>*{{ $t('userInfo.idCardPrompt') }}</view>
|
||||
<view>{{ $t('userInfo.photographPrompt') }}</view>
|
||||
</view>
|
||||
|
||||
<view class="action-content">
|
||||
|
||||
<view class="action-content-item">
|
||||
<van-uploader :rules="[{ required: true, message: '点击上传身份证人像面' }]" required :after-read="afterReadIdFront" :before-read="beforeRead" :max-count="1">
|
||||
<van-uploader
|
||||
:rules="[{ required: true, message: $t('userInfo.idCardUp1') }]"
|
||||
required
|
||||
:after-read="afterReadIdFront"
|
||||
:before-read="beforeRead"
|
||||
:max-count="1"
|
||||
>
|
||||
<div class="id-card-box">
|
||||
<van-image v-if="userInfo.cardBackPicture" :height="px2vw(156)" :src="userInfo.cardBackPicture"
|
||||
:width="px2vw(236)"/>
|
||||
<van-image v-if="!userInfo.cardBackPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')"
|
||||
:width="px2vw(236)"/>
|
||||
<div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px">
|
||||
点击上传身份证人像面
|
||||
{{ $t('userInfo.idCardUp1') }}
|
||||
</div>
|
||||
</div>
|
||||
</van-uploader>
|
||||
</view>
|
||||
|
||||
<view class="action-content-item">
|
||||
<van-uploader :rules="[{ required: true, message: '点击上传身份证国徽面' }]" required :after-read="afterReadIdBack" :before-read="beforeRead" :max-count="1">
|
||||
<van-uploader :rules="[{ required: true, message: $t('userInfo.idCardUp2') }]" required :after-read="afterReadIdBack" :before-read="beforeRead" :max-count="1">
|
||||
<div class="id-card-box">
|
||||
<van-image v-if="userInfo.cardFrontPicture" :height="px2vw(156)" :src="userInfo.cardFrontPicture"
|
||||
:width="px2vw(236)"/>
|
||||
<van-image v-if="!userInfo.cardFrontPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')"
|
||||
:width="px2vw(236)"/>
|
||||
<div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px">
|
||||
点击上传身份证国徽面
|
||||
{{ $t('userInfo.idCardUp2') }}
|
||||
</div>
|
||||
</div>
|
||||
</van-uploader>
|
||||
</view>
|
||||
|
||||
<view class="action-content-item">
|
||||
<van-uploader :rules="[{ required: true, message: '点击上传手持身份证照' }]" required :after-read="afterReadAvatar" :before-read="beforeRead" :max-count="1">
|
||||
<van-uploader :rules="[{ required: true, message: $t('userInfo.idCardUp3') }]" required :after-read="afterReadAvatar" :before-read="beforeRead" :max-count="1">
|
||||
<div class="id-card-box">
|
||||
<van-image v-if="userInfo.handCardPicture" :height="px2vw(156)" :src="userInfo.handCardPicture"
|
||||
:width="px2vw(236)"/>
|
||||
<van-image v-if="!userInfo.handCardPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')"
|
||||
:width="px2vw(236)"/>
|
||||
<div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px">
|
||||
点击上传手持身份证照
|
||||
{{ $t('userInfo.idCardUp3') }}
|
||||
</div>
|
||||
</div>
|
||||
</van-uploader>
|
||||
</view>
|
||||
|
||||
|
||||
<view style="width: 100%; padding: 20px 0">
|
||||
<view>拍摄要求</view>
|
||||
<!-- <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">
|
||||
<van-image :height="px2vw(92)" :width="px2vw(148)" :src="getAssetsImages('my/idcard2.png')"/>
|
||||
<view class="gray_color font-22">√标准拍摄</view>
|
||||
<view class="gray_color font-22">√{{ $t('userInfo.standardShooting') }}</view>
|
||||
</view>
|
||||
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column">
|
||||
<van-image :height="px2vw(92)" :width="px2vw(148)" :src="getAssetsImages('my/idcard3.png')"/>
|
||||
<view class="gray_color font-22">×边框缺失</view>
|
||||
<view class="gray_color font-22">×{{ $t('userInfo.missingBorder') }}</view>
|
||||
</view>
|
||||
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column">
|
||||
<van-image :height="px2vw(92)" :width="px2vw(148)" :src="getAssetsImages('my/idcard4.png')"/>
|
||||
<view class="gray_color font-22">×照片模糊</view>
|
||||
<view class="gray_color font-22">×{{ $t('userInfo.outOfFocus') }}</view>
|
||||
</view>
|
||||
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column">
|
||||
<van-image :height="px2vw(92)" :width="px2vw(148)" :src="getAssetsImages('my/idcard5.png')"/>
|
||||
<view class="gray_color font-22">×闪光强烈</view>
|
||||
</view>
|
||||
<view class="gray_color font-22">×{{ $t('userInfo.flashStrongly') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
</view>
|
||||
|
||||
|
||||
@@ -105,7 +125,7 @@
|
||||
native-type="submit"
|
||||
:disabled="!useEdit || !(userInfo.realName && userInfo.cardNum)"
|
||||
>
|
||||
提交
|
||||
{{ $t('app.submit') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
@@ -119,8 +139,10 @@ import {getAssetsImages, px2vw} from "@/utils";
|
||||
import {showToast} from "vant";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useUpload} from "@/hooks/useUpload";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const idCardKeyboardShow = ref(false)
|
||||
const { t } = useI18n()
|
||||
|
||||
const userInfo = reactive({
|
||||
backCardNum: '',
|
||||
@@ -163,7 +185,7 @@ const _getBorrowPage = () => {
|
||||
|
||||
const beforeRead = (file) => {
|
||||
if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
|
||||
showToast('请上传 jpg 或者 png 格式图片');
|
||||
showToast(t('app.upPNGOrJPG'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -5,72 +5,154 @@
|
||||
<div class="content">
|
||||
<j-gap height="120" background="#F9BF3A" opacity="0" />
|
||||
<div class="action">
|
||||
<view class="tt">填写真实有效的信息,审核才会通过哦~</view>
|
||||
<view class="tt">{{ $t('userInfo.realPrompt') }}~</view>
|
||||
<!-- <van-field required v-model="userInfo.realName" type="text" label="姓名" placeholder="请输入真实姓名" :rules="[{ required: true, message: '请输入真实姓名' }]"/>-->
|
||||
<van-field required v-model="userInfo.companyName" type="text" label="单位名称" placeholder="请输入单位名称" :rules="[{ required: true, message: '请输入单位名称' }]"/>
|
||||
<van-field required v-model="userInfo.companyTitle" type="text" label="职位" placeholder="请输入职位" :rules="[{ required: true, message: '请输入职位' }]"/>
|
||||
<van-field required v-model="userInfo.companyPhone" type="tel" label="单位电话" placeholder="号码加区号(非必填)" :rules="[{ required: true, message: '号码加区号' }]"/>
|
||||
<van-field required v-model="userInfo.companyYear" type="number" label="工作年龄" placeholder="请输入工龄" :rules="[{ required: true, message: '请输入工龄' }]"/>
|
||||
<van-field required v-model="userInfo.incomeWan" type="number" label="月薪" placeholder="请输入月薪" :rules="[{ required: true, message: '请输入月薪' }]"/>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.companyName"
|
||||
type="text"
|
||||
:label="$t('userInfo.unitName')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.unitName')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.unitName') }]"
|
||||
/>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.companyTitle"
|
||||
type="text"
|
||||
:label="$t('userInfo.position')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.position')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.position') }]"
|
||||
/>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.companyPhone"
|
||||
type="tel"
|
||||
:label="$t('userInfo.workTelephone')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.workTelephone')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.workTelephone') }]"
|
||||
/>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.companyYear"
|
||||
type="number"
|
||||
:label="$t('userInfo.workingAge')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.workingAge')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.workingAge') }]"
|
||||
/>
|
||||
<van-field
|
||||
required v-model="userInfo.incomeWan"
|
||||
type="number"
|
||||
:label="$t('userInfo.monthlyPay')"
|
||||
: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
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请选择省市区' }]"
|
||||
label="单位地址"
|
||||
placeholder="请选择省市区"
|
||||
:label="$t('userInfo.unitAddress')"
|
||||
:placeholder="$t('app.select') + $t('userInfo.unitAddress')"
|
||||
: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"
|
||||
title="请选择所在地区"
|
||||
:title="$t('app.select') + $t('userInfo.unitAddress')"
|
||||
:options="options"
|
||||
@close="companyAddressShow = false"
|
||||
@finish="onFinish"
|
||||
/>
|
||||
</van-popup>
|
||||
<van-field required v-model="userInfo.companyAddressInfo" type="text" label="详细地址" placeholder="请输入详细地址" :rules="[{ required: true, message: '请输入详细地址' }]"/>
|
||||
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.companyAddressInfo"
|
||||
type="text"
|
||||
:label="$t('userInfo.addressInfo')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.addressInfo')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.addressInfo') }]"
|
||||
/>
|
||||
|
||||
|
||||
<van-field
|
||||
v-if="lang === 'zh_CN'"
|
||||
v-model="userInfo.customerAddress"
|
||||
is-link
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请选择所在地区' }]"
|
||||
label="现居住地址"
|
||||
placeholder="请选择所在地区"
|
||||
:label="$t('userInfo.currentResidentialAddress')"
|
||||
:placeholder="$t('app.select') + $t('userInfo.currentResidentialAddress')"
|
||||
: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"
|
||||
title="请选择所在地区"
|
||||
:title="$t('app.select') + $t('userInfo.currentResidentialAddress')"
|
||||
:options="options"
|
||||
@close="customerAddressShow = false"
|
||||
@finish="onCustomerAddressFinish"
|
||||
/>
|
||||
</van-popup>
|
||||
<van-field required v-model="userInfo.customerAddressInfo" type="text" label="详细地址" placeholder="例:东北石油大学启智寝室楼2A603" :rules="[{ required: true, message: '请输入详细地址' }]"/>
|
||||
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.customerAddressInfo"
|
||||
type="text"
|
||||
:label="$t('userInfo.addressInfo')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.addressInfo')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.addressInfo') }]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="action">
|
||||
<view class="tt">
|
||||
直系亲属联系人
|
||||
{{ $t('userInfo.directFamilyContactPerson') }}
|
||||
</view>
|
||||
|
||||
<van-field required v-model="userInfo.kinsfolkName" type="text" label="姓名" placeholder="请输入真实姓名" :rules="[{ required: true, message: '请输入真实姓名' }]"/>
|
||||
<van-field required v-model="userInfo.kinsfolkPhone" type="tel" label="手机号码" placeholder="请输入手机号码" :rules="[{ required: true, message: '请输入手机号码' }]"/>
|
||||
<van-field
|
||||
required
|
||||
v-model="userInfo.kinsfolkName"
|
||||
type="text"
|
||||
:label="$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"
|
||||
type="tel"
|
||||
:label="$t('app.phoneNumber')"
|
||||
:placeholder="$t('app.enter') + $t('app.phoneNumber')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('app.phoneNumber') }]"
|
||||
/>
|
||||
<van-field
|
||||
v-model="userInfo.kinsfolkRefText"
|
||||
is-link
|
||||
:rules="[{ required: true, message: '请选择关系' }]"
|
||||
:rules="[{ required: true, message: $t('app.select') + $t('userInfo.relationship') }]"
|
||||
required
|
||||
readonly
|
||||
label="关系"
|
||||
placeholder="请选择关系"
|
||||
:label="$t('userInfo.relationship')"
|
||||
:placeholder="$t('app.select') + $t('userInfo.relationship')"
|
||||
@click="showPicker = true"
|
||||
/>
|
||||
<van-popup v-model:show="showPicker" round position="bottom">
|
||||
@@ -93,29 +175,33 @@
|
||||
native-type="submit"
|
||||
:disabled="!useEdit"
|
||||
>
|
||||
提交
|
||||
{{ $t('app.submit') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
import {getBorrowPage, getUserInfo, updateCustomerCard} from "@/api";
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
import {showToast} from "vant";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useCascaderAreaData} from "@vant/area-data";
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { getBorrowPage, getUserInfo, updateCustomerCard } from '@/api';
|
||||
import { resetData } from '@/utils/dataUtil';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useCascaderAreaData } from '@vant/area-data';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const companyAddressShow = ref(false)
|
||||
const customerAddressShow = ref(false)
|
||||
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: '父母', value: '1' },
|
||||
{ text: '配偶', value: '2' },
|
||||
{ text: '子女', value: '3' },
|
||||
{ text: '祖父母', value: '4' },
|
||||
{ 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.friend'), value: '5' }
|
||||
];
|
||||
const userInfo = reactive({
|
||||
backCardNum: '',
|
||||
@@ -139,28 +225,28 @@ const userInfo = reactive({
|
||||
kinsfolkRef: '',
|
||||
kinsfolkRefText: '',
|
||||
realName: ''
|
||||
})
|
||||
});
|
||||
const _getUserInfo = () => {
|
||||
getUserInfo().then(res => {
|
||||
resetData(userInfo, res)
|
||||
resetData(userInfo, res);
|
||||
columns.forEach(c => {
|
||||
if (c.value == userInfo.kinsfolkRef) {
|
||||
userInfo.kinsfolkRefText = c.text
|
||||
}
|
||||
})
|
||||
})
|
||||
userInfo.kinsfolkRefText = c.text;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const borrowPage = {
|
||||
pageNum: 0,
|
||||
pageSize: 3,
|
||||
}
|
||||
const useEdit = ref(true)
|
||||
pageSize: 3
|
||||
};
|
||||
const useEdit = ref(true);
|
||||
const _getBorrowPage = () => {
|
||||
getBorrowPage(borrowPage).then(res => {
|
||||
useEdit.value = res.length === 0;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const options = useCascaderAreaData();
|
||||
const onFinish = ({ selectedOptions }) => {
|
||||
@@ -183,21 +269,18 @@ const onConfirm = ({ selectedOptions }) => {
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
const router = useRouter()
|
||||
const router = useRouter();
|
||||
const saveUserInfoBtn = (values) => {
|
||||
updateCustomerCard(userInfo).then(res => {
|
||||
router.back()
|
||||
})
|
||||
}
|
||||
|
||||
router.back();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
_getUserInfo()
|
||||
_getBorrowPage()
|
||||
})
|
||||
_getUserInfo();
|
||||
_getBorrowPage();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -215,6 +298,7 @@ onMounted(() => {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
box-shadow: 0 0 1vw 0px #e0e0e0;
|
||||
|
||||
&-content {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
@@ -249,6 +333,7 @@ onMounted(() => {
|
||||
color: #738aa4;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<div class="content">
|
||||
<j-gap background="#F9BF3A" height="120" opacity="0"/>
|
||||
<div class="action">
|
||||
<view class="tt">填写真实有效的信息,审核才会通过哦~</view>
|
||||
<view class="tt">{{ $t('userInfo.realPrompt') }}~</view>
|
||||
<van-field
|
||||
v-model="userInfo.bankType"
|
||||
:rules="[{ required: true, message: '请选择开户银行' }]"
|
||||
label="开户银行"
|
||||
placeholder="请输入开户银行"
|
||||
:label="$t('userInfo.bankOfDeposit')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.bankOfDeposit')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.bankOfDeposit') }]"
|
||||
:disabled="!useEdit"
|
||||
required
|
||||
/>
|
||||
@@ -22,8 +22,17 @@
|
||||
@confirm="onConfirm"
|
||||
/>
|
||||
</van-popup>-->
|
||||
<van-field :disabled="!useEdit" @paste="pasteField" @copy="copyField" v-model="userInfo.backCardNum" :rules="[{ required: true, message: '请输入银行卡号' }]" label="银行卡号" placeholder="请输入银行卡号" required
|
||||
type="digit"/>
|
||||
<van-field
|
||||
:disabled="!useEdit"
|
||||
@paste="pasteField"
|
||||
@copy="copyField"
|
||||
v-model="userInfo.backCardNum"
|
||||
:label="$t('userInfo.bankCard')"
|
||||
:placeholder="$t('app.enter') + $t('userInfo.bankCard')"
|
||||
:rules="[{ required: true, message: $t('app.enter') + $t('userInfo.bankCard') }]"
|
||||
required
|
||||
type="digit"
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -37,7 +46,7 @@
|
||||
style="width: 100%; "
|
||||
v-if="useEdit"
|
||||
>
|
||||
提交
|
||||
{{ $t('app.submit') }}
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="content">
|
||||
<j-gap height="50" background="#F9BF3A" opacity="0"/>
|
||||
<div class="slogan">
|
||||
<div class="slogan-1">注册</div>
|
||||
<div class="slogan-1">{{ $t('app.register') }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
<van-field
|
||||
v-model="loginData.phoneNumber"
|
||||
class="login-btn"
|
||||
label="手机号码"
|
||||
placeholder="请输入手机号码"
|
||||
:label="$t('app.phoneNumber')"
|
||||
:placeholder="$t('app.enter') + $t('app.phoneNumber')"
|
||||
type="tel"
|
||||
/>
|
||||
|
||||
<van-field
|
||||
v-model="loginData.code"
|
||||
class="login-btn"
|
||||
label="验证码"
|
||||
placeholder="请输入验证码"
|
||||
:label="$t('app.verificationCode')"
|
||||
:placeholder="$t('app.enter') + $t('app.verificationCode')"
|
||||
type="number"
|
||||
>
|
||||
<template #button>
|
||||
@@ -32,7 +32,7 @@
|
||||
<span class="block">{{ timeData.seconds }}秒</span>
|
||||
</template>
|
||||
</van-count-down>
|
||||
<div v-show="!countDownFlag" style="color: #bc7c1c" @click="start">发送验证码</div>
|
||||
<div v-show="!countDownFlag" style="color: #bc7c1c" @click="start">{{ $t('app.send') + $t('app.verificationCode') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
@@ -41,8 +41,8 @@
|
||||
<van-field
|
||||
v-model="loginData.password"
|
||||
class="login-btn"
|
||||
label="登录密码"
|
||||
placeholder="请设置6-16位密码"
|
||||
:label="$t('app.login') + $t('app.password')"
|
||||
:placeholder="$t('app.passwordPlaceholder')"
|
||||
type="text"
|
||||
/>
|
||||
|
||||
@@ -55,11 +55,11 @@
|
||||
style="width: 100%; margin: 20px 0"
|
||||
@click.stop="registerBtn"
|
||||
>
|
||||
注册
|
||||
{{ $t('app.register') }}
|
||||
</van-button>
|
||||
|
||||
<view class="op">
|
||||
<view class="register" @click="goLogin">登录</view>
|
||||
<view class="register" @click="goLogin">{{ $t('app.login') }}</view>
|
||||
</view>
|
||||
|
||||
</div>
|
||||
@@ -71,9 +71,12 @@ import {showToast} from "vant";
|
||||
import {useRouter} from "vue-router";
|
||||
import {register, sendSmsRegister} from "@/api/login";
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
|
||||
const loginData = reactive({
|
||||
phone: null,
|
||||
@@ -100,7 +103,7 @@ const start = () => {
|
||||
onFinish()
|
||||
})
|
||||
} else {
|
||||
showToast('请输入手机号')
|
||||
showToast(t('app.enter') + t('app.phoneNumber'))
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
v-model="loginData.phoneNumber"
|
||||
disabled
|
||||
class="login-btn"
|
||||
label="手机号码"
|
||||
placeholder="请输入手机号码"
|
||||
:label="$t('app.phoneNumber')"
|
||||
:placeholder="$t('app.enter') + $t('app.phoneNumber')"
|
||||
label-align="top"
|
||||
style="background: #12332100"
|
||||
type="tel"
|
||||
@@ -20,8 +20,8 @@
|
||||
<van-field
|
||||
v-model="loginData.code"
|
||||
class="login-btn"
|
||||
label="验证码"
|
||||
placeholder="请输入验证码"
|
||||
:label="$t('app.verificationCode')"
|
||||
:placeholder="$t('app.enter') + $t('app.verificationCode')"
|
||||
label-align="top"
|
||||
style="background: #12332100"
|
||||
type="number"
|
||||
@@ -33,7 +33,7 @@
|
||||
<span class="block">{{ timeData.seconds }}秒</span>
|
||||
</template>
|
||||
</van-count-down>
|
||||
<div v-show="!countDownFlag" style="color: #bc7c1c" @click="start">发送验证码</div>
|
||||
<div v-show="!countDownFlag" style="color: #bc7c1c" @click="start">{{ $t('app.send') + $t('app.verificationCode') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
@@ -41,9 +41,9 @@
|
||||
<van-field
|
||||
v-model="loginData.password"
|
||||
class="login-btn"
|
||||
label="登录密码"
|
||||
label-align="top"
|
||||
placeholder="请设置6-16位密码"
|
||||
:label="$t('app.login') + $t('app.password')"
|
||||
:placeholder="$t('app.passwordPlaceholder')"
|
||||
style="background: #12332100"
|
||||
type="password"
|
||||
/>
|
||||
@@ -51,9 +51,9 @@
|
||||
<van-field
|
||||
v-model="loginData.confirmPassword"
|
||||
class="login-btn"
|
||||
label="确认密码"
|
||||
label-align="top"
|
||||
placeholder="请再次输入密码"
|
||||
:label="$t('app.confirm') + $t('app.password')"
|
||||
:placeholder="$t('app.passwordPlaceholder1')"
|
||||
style="background: #12332100"
|
||||
type="password"
|
||||
/>
|
||||
@@ -68,7 +68,7 @@
|
||||
style="width: 100%; margin: 20px 0"
|
||||
@click.stop="updatePwdBtn"
|
||||
>
|
||||
确认修改
|
||||
{{ $t('app.confirm') + $t('app.update') }}
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -83,7 +83,9 @@ import {sendSmsForget, updatePwd} from "@/api/login";
|
||||
import {showToast} from "vant";
|
||||
import {getCustomerInfo} from "@/api";
|
||||
import {resetData} from "@/utils/dataUtil";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n()
|
||||
const loginData = reactive({
|
||||
phone: null,
|
||||
phoneNumber: '',
|
||||
@@ -112,7 +114,7 @@ const start = () => {
|
||||
onFinish()
|
||||
})
|
||||
} else {
|
||||
showToast('请输入手机号')
|
||||
showToast(t('app.enter') + t('app.phoneNumber'))
|
||||
}
|
||||
};
|
||||
|
||||
@@ -127,7 +129,7 @@ const updatePwdBtn = () => {
|
||||
password: loginData.password
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
showToast('修改成功')
|
||||
showToast(t('app.update') + t('app.success'))
|
||||
})
|
||||
}
|
||||
const customerInfo = reactive({
|
||||
|
||||
@@ -38,7 +38,8 @@ export default defineConfig({
|
||||
port: 9528,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8887',
|
||||
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