18 Commits

Author SHA1 Message Date
John
145d263b4f 国际化 2024-03-10 23:15:10 +08:00
John
82671e4b67 国际化 2024-03-10 23:05:19 +08:00
John
337300d438 国际化 2024-03-10 22:52:54 +08:00
John
42c7d3bec8 国际化 2024-03-10 12:07:07 +08:00
John
807e528e47 国际化 2024-03-10 12:06:56 +08:00
John
b734a72fc6 国际化 2024-03-10 12:04:23 +08:00
John
44e109ae4b 国际化 2024-03-09 18:27:20 +08:00
John
041dda021a 国际化 2024-03-09 02:48:29 +08:00
John
f9f962a8ae 国际化 2024-03-09 02:39:06 +08:00
John
6dbecfc4ce 国际化 2024-03-09 02:37:14 +08:00
John
304421281f 国际化 2024-03-09 02:34:09 +08:00
John
e702b1bc7f 国际化 2024-03-09 01:39:12 +08:00
John
619f6986ce 国际化 2024-03-09 01:05:32 +08:00
John
0494fbd364 国际化 2024-03-09 01:04:20 +08:00
John
80dbf50d4b 国际化 2024-03-09 00:45:48 +08:00
星河下的稻草人
c595061dc8 9 2024-03-06 20:59:01 +08:00
dute7liang
755f0cd208 Merge branch 'domain-dyn' 2024-03-01 22:05:24 +08:00
dute7liang
66eb2729b7 init 2024-03-01 21:15:25 +08:00
33 changed files with 2253 additions and 397 deletions

1125
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,20 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <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) {
localStorage.setItem('lang', res)
location.reload()
}
})
}
_getDefaultLocal()
</script> </script>

View File

@@ -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
}
});
}

175
src/lang/en_us.ts Normal file
View File

@@ -0,0 +1,175 @@
// 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',
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 Daily Interest Rate',
borrowingLimit: 'Borrowing Limit',
installmentPeriod: 'Installment Period',
optional: 'Optional',
applicationAmount: 'Application Amount',
loanTerm: 'Loan Term',
repaymentPerInstallment: 'Repayment Per Installment',
dailyInterestRate: 'Daily 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: 'Borrow Now',
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 the front side of your ID card',
idCardUp2: 'Click to upload the back side of your ID card (with the national emblem)',
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',
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',
}
}

162
src/lang/hi-IN.ts Normal file
View File

@@ -0,0 +1,162 @@
// zh_cn.js 文件
export default {
app: {
home: 'मुख्य पृष्ठ',
serveList: 'सेवा सूची',
message: 'ग्राहक सहायता',
my: 'मेरा',
yuan: 'युआन',
second: 'सेकंड',
month: 'माह',
prompt: 'प्रोम्प्ट',
tips: 'टिप्स',
enterLogout: 'आप निश्चित हैं कि आप लॉग आउट करना चाहते हैं?',
enterWithdrawal: 'आप निश्चित हैं कि आप निकासी करना चाहते हैं?',
withdrawal: 'निकासी',
info: 'जानकारी',
success: 'सफल',
withdrawalAmount: 'निकासी राशि',
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: 'दादा-दादी',
bankOfDeposit: 'खाता खोलने वाला बैंक',
bankCard: 'बैंक कार्ड नंबर',
},
router: {
home: 'मुख्य पृष्ठ',
serveList: 'वॉलेट',
message: 'चैट',
my: 'मेरा',
userInfo: 'मेरी जानकारी',
userInfo1: 'बेसिक जानकारी',
signature: 'हस्ताक्षर',
contract: 'अनुबंध',
userInfo2: 'जमा दस्तावेज',
userInfo3: 'प्राप्ति बैंक कार्ड',
loansInfo: 'लोन विवरण',
loansInfo1: 'कैश आउट',
myLoan: 'मेरे लोन',
myRepayment: 'मेरी रिपेमेंट',
borrowInfo: 'लोन विवरण',
uploadPassword: 'पासवर्ड परिवर्तन',
login: 'लॉगिन',
register: 'रजिस्टर',
forget: 'पासवर्ड भूल गए',
agreement: 'समझौता',
}
};

162
src/lang/id_ID.ts Normal file
View File

@@ -0,0 +1,162 @@
// 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',
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: 'Pinjaman 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',
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
View 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}

175
src/lang/zh_cn.ts Normal file
View File

@@ -0,0 +1,175 @@
// zh_cn.js文件
export default {
app: {
home: '首页',
serveList: '钱包',
message: '客服',
my: '我的',
yuan: '元',
second: '秒',
month: '个月',
prompt: '提示',
tips: '温馨提示',
enterLogout: '您确定要退出登录吗',
enterWithdrawal: '您确定要提现吗',
withdrawal: '提现',
info: '信息',
success: '成功',
withdrawalAmount: '提现金额',
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: '祖父母',
bankOfDeposit: '开户银行',
bankCard: '银行卡号',
},
router: {
home: '首页',
serveList: '钱包',
message: '聊天',
my: '我的',
userInfo: '我的资料',
userInfo1: '基本信息',
signature: '签名',
contract: '合同',
userInfo2: '提交资料',
userInfo3: '收款银行卡',
loansInfo: '借款详情',
loansInfo1: '提现',
myLoan: '我的借款',
myRepayment: '我的还款',
borrowInfo: '贷款详情',
uploadPassword: '修改密码',
login: '登录',
register: '注册',
forget: '忘记密码',
agreement: '协议',
}
}

View File

@@ -1,20 +1,29 @@
import './array.prototype.d.ts'; import './array.prototype.d.ts';
import './date.prototype.d.ts'; import './date.prototype.d.ts';
import './string.prototype.d.ts'; import './string.prototype.d.ts';
// 导入资源文件
import { createApp } from 'vue' import { createApp } from 'vue'
import App from './App.vue' import App from './App.vue'
import router from "./router"; import router from "./router";
import {setupStore} from "@/store"; import {setupStore} from "@/store";
import {setupCustomComponents} from "@/plugins/customComponents"; import {setupCustomComponents} from "@/plugins/customComponents";
import {vantLocales} from './lang'
// 2. 引入组件样式 // 2. 引入组件样式
import 'vant/lib/index.css'; import 'vant/lib/index.css';
import 'vant/es/toast/style' import 'vant/es/toast/style'
const app = createApp(App) const app = createApp(App)
// app.use(i18n)
app.use(router) app.use(router)
app.mount('#app') app.mount('#app')
setupStore(app) setupStore(app)
// vant-ui组件国际化
vantLocales(app)
setupCustomComponents(app) setupCustomComponents(app)

View File

@@ -2,7 +2,9 @@ import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router';
import {useUserStore} from "@/store/modules/user"; import {useUserStore} from "@/store/modules/user";
import {domainStoreWidthOut} from "@/store/modules/domain"; import {domainStoreWidthOut} from "@/store/modules/domain";
import {getDomainList} from "@/api/login"; import {getDomainList} from "@/api/login";
import { i18n } from '@/lang';
const { t } = i18n.global
export const constantRouter: Array<RouteRecordRaw> = [ export const constantRouter: Array<RouteRecordRaw> = [
{ {
path: '/', path: '/',
@@ -17,7 +19,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'index', name: 'index',
component: () => import('@/views/index/index.vue'), component: () => import('@/views/index/index.vue'),
meta: { meta: {
title: '首页', title: t('router.home'),
}, },
children: [ children: [
{ {
@@ -25,7 +27,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'Home', name: 'Home',
component: () => import('@/views/index/home/index.vue'), component: () => import('@/views/index/home/index.vue'),
meta: { meta: {
title: '首页', title: t('router.home'),
showBar: false showBar: false
}, },
}, },
@@ -35,7 +37,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
component: () => import('@/views/index/serveList/index.vue'), component: () => import('@/views/index/serveList/index.vue'),
meta: { meta: {
isPermissions: true, isPermissions: true,
title: '钱包', title: t('router.serveList'),
showBar: false showBar: false
}, },
}, },
@@ -45,7 +47,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
component: () => import('@/views/index/message/index.vue'), component: () => import('@/views/index/message/index.vue'),
meta: { meta: {
isPermissions: true, isPermissions: true,
title: '聊天', title: t('router.message'),
showBar: false showBar: false
}, },
}, },
@@ -55,7 +57,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
component: () => import('@/views/index/my/index.vue'), component: () => import('@/views/index/my/index.vue'),
meta: { meta: {
isPermissions: true, isPermissions: true,
title: '我的', title: t('router.my'),
showBar: false showBar: false
}, },
} }
@@ -66,7 +68,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'userInfo', name: 'userInfo',
component: () => import('@/views/my/userInfo/index.vue'), component: () => import('@/views/my/userInfo/index.vue'),
meta: { meta: {
title: '我的资料', title: t('router.userInfo'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -76,7 +78,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'userInfo1', name: 'userInfo1',
component: () => import('@/views/my/userInfo1/index.vue'), component: () => import('@/views/my/userInfo1/index.vue'),
meta: { meta: {
title: '基本信息', title: t('router.userInfo1'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -86,7 +88,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'signature', name: 'signature',
component: () => import('@/views/my/signature/index.vue'), component: () => import('@/views/my/signature/index.vue'),
meta: { meta: {
title: '签名', title: t('router.signature'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -96,7 +98,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'contract', name: 'contract',
component: () => import('@/views/my/contract/index.vue'), component: () => import('@/views/my/contract/index.vue'),
meta: { meta: {
title: '合同', title: t('router.contract'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -106,7 +108,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'userInfo2', name: 'userInfo2',
component: () => import('@/views/my/userInfo2/index.vue'), component: () => import('@/views/my/userInfo2/index.vue'),
meta: { meta: {
title: '提交资料', title: t('router.userInfo2'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -116,7 +118,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'userInfo3', name: 'userInfo3',
component: () => import('@/views/my/userInfo3/index.vue'), component: () => import('@/views/my/userInfo3/index.vue'),
meta: { meta: {
title: '收款银行卡', title: t('router.userInfo3'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -126,7 +128,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'loansInfo', name: 'loansInfo',
component: () => import('@/views/loans/info/index.vue'), component: () => import('@/views/loans/info/index.vue'),
meta: { meta: {
title: '借款详情', title: t('router.loansInfo'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -136,7 +138,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'loansInfo1', name: 'loansInfo1',
component: () => import('@/views/loans/info1/index.vue'), component: () => import('@/views/loans/info1/index.vue'),
meta: { meta: {
title: '提现', title: t('router.loansInfo1'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -146,7 +148,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'myLoan', name: 'myLoan',
component: () => import('@/views/my/myLoan/index.vue'), component: () => import('@/views/my/myLoan/index.vue'),
meta: { meta: {
title: '我的借款', title: t('router.myLoan'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -156,7 +158,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'myRepayment', name: 'myRepayment',
component: () => import('@/views/my/myRepayment/index.vue'), component: () => import('@/views/my/myRepayment/index.vue'),
meta: { meta: {
title: '我的还款', title: t('router.myRepayment'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -167,7 +169,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'borrowInfo', name: 'borrowInfo',
component: () => import('@/views/borrowInfo/index.vue'), component: () => import('@/views/borrowInfo/index.vue'),
meta: { meta: {
title: '贷款详情', title: t('router.borrowInfo'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -177,7 +179,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'uploadPassword', name: 'uploadPassword',
component: () => import('@/views/uploadPassword/index.vue'), component: () => import('@/views/uploadPassword/index.vue'),
meta: { meta: {
title: '修改密码', title: t('router.uploadPassword'),
isPermissions: true, isPermissions: true,
showBar: true showBar: true
}, },
@@ -190,7 +192,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'login', name: 'login',
component: () => import('@/views/login/index.vue'), component: () => import('@/views/login/index.vue'),
meta: { meta: {
title: '登录', title: t('router.login'),
showBar: false showBar: false
}, },
}, },
@@ -199,7 +201,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'register', name: 'register',
component: () => import('@/views/register/index.vue'), component: () => import('@/views/register/index.vue'),
meta: { meta: {
title: '注册', title: t('router.register'),
showBar: true showBar: true
}, },
}, },
@@ -208,7 +210,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'forget', name: 'forget',
component: () => import('@/views/forget/index.vue'), component: () => import('@/views/forget/index.vue'),
meta: { meta: {
title: '忘记密码', title: t('router.forget'),
showBar: true showBar: true
}, },
}, },
@@ -217,7 +219,7 @@ export const constantRouter: Array<RouteRecordRaw> = [
name: 'agreement', name: 'agreement',
component: () => import('@/views/agreement/agreement.vue'), component: () => import('@/views/agreement/agreement.vue'),
meta: { meta: {
title: '协议', title: t('router.agreement'),
showBar: true showBar: true
}, },
} }
@@ -238,6 +240,7 @@ const router = createRouter({
// @ts-ignore // @ts-ignore
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
const dsw = domainStoreWidthOut() const dsw = domainStoreWidthOut()
if (!dsw.getDomain || dsw.getDomain.length == 0) { if (!dsw.getDomain || dsw.getDomain.length == 0) {
const response = await getDomainList() const response = await getDomainList()
if (response && response.data) { if (response && response.data) {
@@ -245,9 +248,11 @@ router.beforeEach(async (to, from, next) => {
dsw.setDomain(domain) dsw.setDomain(domain)
} }
} }
if (to.meta.title) { // 判断是否有标题 // if (to.meta.titleI18n) { // 判断是否有标题
document.title = to.meta.title as string; // 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) { if (to.meta.isPermissions) {
const userStore = useUserStore() const userStore = useUserStore()
if (!userStore.getToken) { if (!userStore.getToken) {

View File

@@ -138,8 +138,9 @@ const transform: AxiosTransform = {
if(config.url && config.url.endsWith("domain.txt")){ if(config.url && config.url.endsWith("domain.txt")){
return config return config
}else if(domain && domain.length > 0){ }else if(domain && domain.length > 0){
let domainUrl = domain[Math.floor((Math.random()*domain.length))]; // let domainUrl = domain[Math.floor((Math.random()*domain.length))];
config.url = domainUrl + config.url; // config.url = domainUrl + config.url;
// config.url = domainUrl + config.url;
}else if(apiUrl && isString(apiUrl)){ }else if(apiUrl && isString(apiUrl)){
config.url = `${apiUrl}${config.url}`; config.url = `${apiUrl}${config.url}`;
} }

View File

@@ -11,8 +11,10 @@ import {getAgreement} from "@/api";
import {onMounted, ref} from "vue"; import {onMounted, ref} from "vue";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {px2vw} from "@/utils"; import {px2vw} from "@/utils";
import { useI18n } from 'vue-i18n';
const route = useRoute() const route = useRoute()
const { t } = useI18n()
const agreement = ref('') const agreement = ref('')
const _getSystemConfigOne = (key) => { const _getSystemConfigOne = (key) => {
@@ -21,10 +23,10 @@ const _getSystemConfigOne = (key) => {
}) })
} }
const tittleMap = { const tittleMap = {
loansAgreement: '借款协议', loansAgreement: t('home.loansAgreement'),
serviceAgreement: '平台服务协议', serviceAgreement: t('home.serviceAgreement'),
authAgreement: '委托授权协议', authAgreement: t('home.authAgreement'),
lawAgreement: '法律协议', lawAgreement: t('home.lawAgreement'),
} }
onMounted(() => { onMounted(() => {

View File

@@ -3,7 +3,7 @@
<div class="content"> <div class="content">
<j-gap height="120" background="#F9BF3A" opacity="0"/> <j-gap height="120" background="#F9BF3A" opacity="0"/>
<div class="action"> <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"> <view class="footer-content">
@@ -13,7 +13,7 @@
</van-steps> </van-steps>
</view> </view>
<view class="footer-content-2"> <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'}"> <view class="footer-content-2-content" :style="{color: stepBorrow.borrowNameStyle || '#e84a10'}">
{{ stepBorrow.borrowRemark }} {{ stepBorrow.borrowRemark }}
</view> </view>
@@ -23,15 +23,15 @@
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
<view>贷款详情</view> <view>{{ $t('borrowInfo.loanDetails') }}</view>
</view> </view>
<van-cell title="贷款编号" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.tradeNo" /> <van-cell :title="$t('borrowInfo.loanNo')" 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.loanAmount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(borrowInfo.totalLoanMoney)" />
<!-- <van-cell title="借款期限" title-style="color: #8997ae;" style="&#45;&#45;van-cell-value-color: #000" :value="borrowInfo.totalMonth + '个月'" />--> <!-- <van-cell title="借款期限" title-style="color: #8997ae;" style="&#45;&#45;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="$t('borrowInfo.loanCycle')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.totalMonth + $t('app.month')" />
<van-cell title="提现银行" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.bankType" /> <van-cell :title="$t('borrowInfo.withdrawalBank')" 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="$t('borrowInfo.repaymentPerInstallment')" 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.describe')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="borrowInfo.noteRemark" />
@@ -46,24 +46,26 @@ import {getBorrowInfo, getUserInfo} from "@/api";
import {resetData} from "@/utils/dataUtil"; import {resetData} from "@/utils/dataUtil";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import {toRoundMark} from "@/utils"; import {toRoundMark} from "@/utils";
import { useI18n } from 'vue-i18n';
const route = useRoute() const route = useRoute()
const active = ref(0); const active = ref(0);
const { t } = useI18n()
const stepBorrow = reactive({ const stepBorrow = reactive({
"borrowNameStyle": "", "borrowNameStyle": "",
"borrowRemark": "", "borrowRemark": "",
"borrowStep": [ "borrowStep": [
{ {
"name": "提交成功", "name": t('app.submittedSuccessfully'),
"over": true "over": true
}, },
{ {
"name": "银行卡异常", "name": "",
"over": true "over": true
}, },
{ {
"name": "到账成功", "name": t('app.receivedSuccessfully'),
"over": false "over": false
} }
] ]
@@ -227,4 +229,4 @@ onMounted(() => {
} }
} }
} }
</style> </style>

View File

@@ -8,8 +8,8 @@
v-model="loginData.phoneNumber" v-model="loginData.phoneNumber"
v-if="flag === '1'" v-if="flag === '1'"
class="login-btn" class="login-btn"
label="手机号码" :label="$t('app.phoneNumber')"
placeholder="请输入手机号码" :placeholder="$t('app.enter') + $t('app.phoneNumber')"
label-align="top" label-align="top"
style="background: #12332100" style="background: #12332100"
type="tel" type="tel"
@@ -19,8 +19,8 @@
v-model="loginData.code" v-model="loginData.code"
class="login-btn" class="login-btn"
v-if="flag === '1'" v-if="flag === '1'"
label="验证码" :label="$t('app.verificationCode')"
placeholder="请输入验证码" :placeholder="$t('app.enter') + $t('app.verificationCode')"
label-align="top" label-align="top"
style="background: #12332100" style="background: #12332100"
type="number" type="number"
@@ -29,10 +29,10 @@
<div class="password-btn"> <div class="password-btn">
<van-count-down v-show="countDownFlag" ref="countDown" :auto-start="false" :time="time" @finish="onFinish"> <van-count-down v-show="countDownFlag" ref="countDown" :auto-start="false" :time="time" @finish="onFinish">
<template #default="timeData"> <template #default="timeData">
<span class="block">{{ timeData.seconds }}</span> <span class="block">{{ timeData.seconds }}{{ $t('app.second') }}</span>
</template> </template>
</van-count-down> </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> </div>
</template> </template>
</van-field> </van-field>
@@ -41,9 +41,9 @@
v-model="loginData.password" v-model="loginData.password"
class="login-btn" class="login-btn"
v-if="flag === '2'" v-if="flag === '2'"
label="登录密码" :label="$t('app.login') + $t('app.password')"
label-align="top" label-align="top"
placeholder="请设置6-16位密码" :placeholder="$t('app.passwordPlaceholder')"
style="background: #12332100" style="background: #12332100"
type="password" type="password"
/> />
@@ -52,9 +52,9 @@
v-model="loginData.confirmPassword" v-model="loginData.confirmPassword"
class="login-btn" class="login-btn"
v-if="flag === '2'" v-if="flag === '2'"
label="确认密码" :label="$t('app.confirm') + $t('app.password')"
label-align="top" label-align="top"
placeholder="请再次输入密码" :placeholder="$t('app.passwordPlaceholder1')"
style="background: #12332100" style="background: #12332100"
type="password" type="password"
/> />
@@ -67,7 +67,7 @@
v-if="flag === '1'" v-if="flag === '1'"
@click.stop="next" @click.stop="next"
> >
下一步 {{ $t('app.next') }}
</van-button> </van-button>
<van-button <van-button
@@ -78,7 +78,7 @@
v-if="flag === '2'" v-if="flag === '2'"
@click.stop="updatePwdBtn" @click.stop="updatePwdBtn"
> >
确认修改 {{ $t('app.confirm') }}{{ $t('app.update') }}
</van-button> </van-button>
@@ -89,6 +89,7 @@
import {reactive, ref} from "vue"; import {reactive, ref} from "vue";
import {sendSmsForget, updatePwd} from "@/api/login"; import {sendSmsForget, updatePwd} from "@/api/login";
import {showToast} from "vant"; import {showToast} from "vant";
import { useI18n } from 'vue-i18n';
const loginData = reactive({ const loginData = reactive({
phone: null, phone: null,
@@ -100,6 +101,7 @@ const loginData = reactive({
}) })
const flag = ref('1') const flag = ref('1')
const { t } = useI18n()
const time = ref(60 * 1000); const time = ref(60 * 1000);
@@ -118,7 +120,7 @@ const start = () => {
onFinish() onFinish()
}) })
} else { } else {
showToast('请输入手机号') showToast(t('app.enter') + t('app.phoneNumber'))
} }
}; };

View File

@@ -12,20 +12,20 @@
<div :style="{padding: '0 ' + px2vw(30) + ' ' + px2vw(20)}"> <div :style="{padding: '0 ' + px2vw(30) + ' ' + px2vw(20)}">
<div class="product"> <div class="product">
<div class="product-title">产品详情</div> <div class="product-title">{{$t('home.productDetails')}}</div>
<div class="product-content"> <div class="product-content">
<div class="product-content-label"> <div class="product-content-label">
<div>最低日息</div> <div>{{$t('home.minimumDailyInterestRate')}}</div>
<div><span>{{ calLoan.loanRate }}%</span></div> <div><span>{{ calLoan.loanRate }}%</span></div>
</div> </div>
<div class="product-content-label"> <div class="product-content-label">
<div>借款额度</div> <div>{{$t('home.borrowingLimit')}}</div>
<div><span>¥{{ loans.loansMinAccount }}-{{ loans.loansMaxAccount }}</span></div> <div><span>¥{{ loans.loansMinAccount }}-{{ loans.loansMaxAccount }}</span></div>
</div> </div>
<div class="product-content-label"> <div class="product-content-label">
<div>分期期限</div> <div>{{$t('home.installmentPeriod')}}</div>
<div><span>可选{{ loans.loansMonth.replaceAll(',', '/') }}</span></div> <div><span>{{$t('home.optional')}}{{ loans.loansMonth.replaceAll(',', '/') }}</span></div>
</div> </div>
</div> </div>
@@ -33,7 +33,7 @@
<div class="apply"> <div class="apply">
<div class="apply-title yellow_color">申请金额()</div> <div class="apply-title yellow_color">{{$t('home.applicationAmount')}}({{$t('app.yuan')}})</div>
<div class="apply-money">{{ strip }}</div> <div class="apply-money">{{ strip }}</div>
@@ -52,10 +52,10 @@
</div> </div>
<div class="apply-jkqx"> <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 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"> <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> </div>
</div> </div>
@@ -63,9 +63,9 @@
<j-gap height="2" background="#fff"/> <j-gap height="2" background="#fff"/>
<div class="apply-mqhk"> <div class="apply-mqhk">
<div>每期还款</div> <div>{{ $t('home.repaymentPerInstallment') }}</div>
<div>¥{{ calLoan.avgRepayment }}</div> <div>¥{{ calLoan.avgRepayment }}</div>
<div>(日利率{{ calLoan.loanRate }}% 总利息¥{{ calLoan.totalInterest }})</div> <div>({{ $t('home.dailyInterestRate') }}{{ calLoan.loanRate }}% {{ $t('home.totalInterest') }}¥{{ calLoan.totalInterest }})</div>
</div> </div>
</div> </div>
@@ -75,17 +75,17 @@
<van-icon :name="getAssetsImages('home/xlb.png')" size="30"/> <van-icon :name="getAssetsImages('home/xlb.png')" size="30"/>
<div>{{ loansUser.time }}</div> <div>{{ loansUser.time }}</div>
<div style="color: #ec6401">{{ loansUser.phone }}</div> <div style="color: #ec6401">{{ loansUser.phone }}</div>
<div>成功借款</div> <div>{{ $t('home.successfulBorrowing') }}</div>
<div style="color: #BC7C1C; font-weight: 600;">¥{{ loansUser.amount }}</div> <div style="color: #BC7C1C; font-weight: 600;">¥{{ loansUser.amount }}</div>
</div> </div>
<div class="xieyi"> <div class="xieyi">
<van-checkbox v-model="checked" :icon-size="px2vw(28)" style="align-items: baseline" checked-color="linear-gradient(to right, #F9D88D, #D2A64C)"> <van-checkbox v-model="checked" :icon-size="px2vw(28)" style="align-items: baseline" checked-color="linear-gradient(to right, #F9D88D, #D2A64C)">
我已阅读并同意 {{ $t('home.enterAgreement') }}
<span class="yellow_color1" @click.stop="go('authAgreement')">委托授权协议</span> <span class="yellow_color1" @click.stop="go('authAgreement')">{{ $t('home.authAgreement') }}</span>
<span class="yellow_color1" @click.stop="go('serviceAgreement')">平台服务协议</span> <span class="yellow_color1" @click.stop="go('serviceAgreement')">{{ $t('home.serviceAgreement') }}</span>
<span class="yellow_color1" @click.stop="go('loansAgreement')">借款协议</span> <span class="yellow_color1" @click.stop="go('loansAgreement')">{{ $t('home.loansAgreement') }}</span>
</van-checkbox> </van-checkbox>
</div> </div>
@@ -97,7 +97,7 @@
style="width: 100%; " style="width: 100%; "
@click.stop="immediateBorrowing" @click.stop="immediateBorrowing"
> >
立即借款 {{ $t('home.immediateBorrowing') }}
</van-button> </van-button>
</div> </div>
@@ -115,10 +115,11 @@ import {resetData} from "@/utils/dataUtil";
import {watch} from "vue-demi"; import {watch} from "vue-demi";
import {showToast} from "vant"; import {showToast} from "vant";
import JGap from "@/components/JGap/JGap.vue"; import JGap from "@/components/JGap/JGap.vue";
import { useI18n } from 'vue-i18n';
const user = useUserStore() const user = useUserStore()
const router = useRouter() const router = useRouter()
const { t } = useI18n()
const bannerList = [ const bannerList = [
{ {
bannerUrl: getAssetsImages('home/banner_home.png') bannerUrl: getAssetsImages('home/banner_home.png')
@@ -159,14 +160,14 @@ const immediateBorrowing = () => {
} }
}) })
} else { } else {
showToast('请先填写个人资料') showToast(t('home.pleaseFillInYourPersonalInformationFirst'))
router.push({ router.push({
path: '/userInfo' path: '/userInfo'
}) })
} }
return return
} }
showToast('请阅读并同意相关协议') showToast(t('home.pleaseEnterAgreement'))
} }
const loans = reactive({ const loans = reactive({

View File

@@ -6,7 +6,8 @@
<van-tabbar route v-model="active" active-color="#F9BF3A"> <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"> <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"> <template #icon="props">
<van-icon :color="props.active ? '' : 'rgb(229, 229, 229)'" :name="props.active ? tabBar.active : tabBar.inactive" /> <van-icon :color="props.active ? '' : 'rgb(229, 229, 229)'" :name="props.active ? tabBar.active : tabBar.inactive" />
</template> </template>
@@ -16,16 +17,16 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from "vue"; import { reactive, ref } from 'vue';
import JGap from "@/components/JGap/JGap.vue";
import {getAssetsImages} from "@/utils"; import {getAssetsImages} from "@/utils";
import {useBackgroundHook} from "@/hooks/useBackgroundHook"; import { useI18n } from 'vue-i18n';
const tabBarList = [ const { t } = useI18n()
const tabBarList = reactive([
{ {
to: '/home', to: '/home',
name: 'home', name: 'home',
text: '首页', text: 'app.home',
replace: true, replace: true,
active: getAssetsImages('tabBar/home-active.png'), active: getAssetsImages('tabBar/home-active.png'),
inactive: getAssetsImages('tabBar/home-inactive.png') inactive: getAssetsImages('tabBar/home-inactive.png')
@@ -33,7 +34,7 @@ const tabBarList = [
{ {
to: '/serveList', to: '/serveList',
name: 'serveList', name: 'serveList',
text: '钱包', text: 'app.serveList',
replace: true, replace: true,
active: getAssetsImages('tabBar/artificer-active.png'), active: getAssetsImages('tabBar/artificer-active.png'),
inactive: getAssetsImages('tabBar/artificer-inactive.png') inactive: getAssetsImages('tabBar/artificer-inactive.png')
@@ -41,7 +42,7 @@ const tabBarList = [
{ {
to: '/message', to: '/message',
name: 'message', name: 'message',
text: '客服', text: 'app.message',
replace: true, replace: true,
active: 'chat', active: 'chat',
inactive: 'chat' inactive: 'chat'
@@ -49,20 +50,21 @@ const tabBarList = [
{ {
to: '/my', to: '/my',
name: 'my', name: 'my',
text: '我的', text: 'app.my',
replace: true, replace: true,
active: getAssetsImages('tabBar/my-active.png'), active: getAssetsImages('tabBar/my-active.png'),
inactive: getAssetsImages('tabBar/my-inactive.png') inactive: getAssetsImages('tabBar/my-inactive.png')
} }
] ])
const active = ref(0) const active = ref(0)
// const {setBodyBackground} = useBackgroundHook()
// setBodyBackground()
</script> </script>
<style scoped> <style lang="scss" scoped>
:deep('.van-tabbar-item__text') {
text-align: center !important;
}
</style> </style>

View File

@@ -1,6 +1,6 @@
<template> <template>
<j-nav-bar/> <!-- <j-nav-bar/>-->
<div ref="root" class="frame" style="height: calc(100vh - 50px - 46px)"> <div ref="root" class="frame" style="height: calc(100vh - 50px)">
<iframe :src="iframeSrc" class="frame-iframe" ref="frameRef"></iframe> <iframe :src="iframeSrc" class="frame-iframe" ref="frameRef"></iframe>
</div> </div>
</template> </template>

View File

@@ -9,21 +9,21 @@
<div class="content"> <div class="content">
<div class="action"> <div class="action">
<van-cell title="我的资料" is-link to="userInfo" > <van-cell :title="$t('my.userInfo')" is-link to="userInfo" >
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
<van-icon :name="getAssetsImages('my/my_info.png')" /> <van-icon :name="getAssetsImages('my/my_info.png')" />
</div> </div>
</template> </template>
</van-cell> </van-cell>
<van-cell title="我的借款" is-link to="myLoan" > <van-cell :title="$t('my.loan')" is-link to="myLoan" >
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
<van-icon :name="getAssetsImages('my/my_info1.png')" /> <van-icon :name="getAssetsImages('my/my_info1.png')" />
</div> </div>
</template> </template>
</van-cell> </van-cell>
<van-cell title="我的还款" is-link to="myRepayment" > <van-cell :title="$t('my.repayment')" is-link to="myRepayment" >
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
<van-icon :name="getAssetsImages('my/my_info2.png')" /> <van-icon :name="getAssetsImages('my/my_info2.png')" />
@@ -37,7 +37,7 @@
<!-- </div>--> <!-- </div>-->
<!-- </template>--> <!-- </template>-->
<!-- </van-cell>--> <!-- </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> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
<van-icon :name="getAssetsImages('my/my_info4.png')" /> <van-icon :name="getAssetsImages('my/my_info4.png')" />
@@ -60,14 +60,21 @@
<!-- </van-cell>--> <!-- </van-cell>-->
</div> </div>
<div class="action"> <div class="action">
<van-cell title="修改密码" is-link to="uploadPassword" > <van-cell :title="$t('my.uploadPassword')" is-link to="uploadPassword" >
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
<van-icon :name="getAssetsImages('my/my_info5.png')" /> <van-icon :name="getAssetsImages('my/my_info5.png')" />
</div> </div>
</template> </template>
</van-cell> </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> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 5px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 5px">
<van-icon :name="getAssetsImages('my/my_info66.png')" /> <van-icon :name="getAssetsImages('my/my_info66.png')" />
@@ -75,28 +82,39 @@
</template> </template>
</van-cell> </van-cell>
</div> </div>
<van-popup v-model:show="showPicker" round position="bottom">
<van-picker
:columns="columns"
@confirm="onConfirm"
@cancel="onCancel"
/>
</van-popup>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {showConfirmDialog} from "vant"; import { showConfirmDialog, showToast } from 'vant';
import {getAssetsImages} from "@/utils"; import {getAssetsImages} from "@/utils";
import {useUserStore} from "@/store/modules/user"; import {useUserStore} from "@/store/modules/user";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import {onMounted, reactive, ref} from "vue"; import {onMounted, reactive, ref} from "vue";
import {getCustomerInfo} from "@/api"; import {getCustomerInfo} from "@/api";
import {resetData} from "@/utils/dataUtil"; import {resetData} from "@/utils/dataUtil";
import { useI18n } from 'vue-i18n';
import { getDefaultLocal } from '@/api/system/user';
const userStore = useUserStore() const userStore = useUserStore()
const router = useRouter() const router = useRouter()
const { t } = useI18n()
const headerImage = ref('https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg') const headerImage = ref('https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg')
const logout = () => { const logout = () => {
showConfirmDialog({ showConfirmDialog({
title: '提示', title: t('app.prompt'),
message: '您确定要退出登录吗', message: t('app.enterLogout'),
width: '500px' width: '500px'
}) })
.then(() => { .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({ const customerInfo = reactive({

View File

@@ -4,16 +4,16 @@
<view class="bg-1"> <view class="bg-1">
<view class="bg-1-1"> <view class="bg-1-1">
<div class="header-head" :style="{'--bg-image': `url(${headerImage}) no-repeat`}"></div> <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')}}{{toRoundMark(customerInfo.borrowAccount)}}</view>
</view> </view>
<view class="accountBalance" style="border-bottom: 1px #fff dashed;"> <view class="accountBalance" style="border-bottom: 1px #fff dashed;">
<view class="yellow_color">账户余额</view> <view class="yellow_color">{{$t('serveList.balance')}}{{$t('app.yuan')}}</view>
<view class="money">{{ toRoundMark(customerInfo.account) }}</view> <view class="money">{{ toRoundMark(customerInfo.account) }}</view>
</view> </view>
<view class="accountBalance"> <view class="accountBalance">
<view class="yellow_color">待还款金额</view> <view class="yellow_color">{{$t('serveList.amountToBeRepaid')}}{{$t('app.yuan')}}</view>
<view class="money">{{ toRoundMark(customerInfo.repaymentAccount) }}</view> <view class="money">{{ toRoundMark(customerInfo.repaymentAccount) }}</view>
</view> </view>
@@ -25,7 +25,7 @@
style="color: #e6a600;width: 80%" style="color: #e6a600;width: 80%"
@click.stop="withdrawalBtn" @click.stop="withdrawalBtn"
> >
立即提现 {{$t('serveList.immediateWithdrawal')}}
</van-button> </van-button>
</view> </view>
</view> </view>
@@ -33,7 +33,7 @@
<view class="footer"> <view class="footer">
<view class="footer-t gray_color "> <view class="footer-t gray_color ">
<van-icon :name="getAssetsImages('common/yhd.png')" size="18"/> <van-icon :name="getAssetsImages('common/yhd.png')" size="18"/>
账户资金安全由银行保障 {{$t('serveList.financialSecurity')}}
</view> </view>
<view class="footer-content"> <view class="footer-content">
@@ -43,7 +43,7 @@
</van-steps> </van-steps>
</view> </view>
<view class="footer-content-2"> <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'}"> <view class="footer-content-2-content" :style="{color: stepBorrow.borrowNameStyle || '#e84a10'}">
{{ stepBorrow.borrowRemark }} {{ stepBorrow.borrowRemark }}
</view> </view>
@@ -51,8 +51,8 @@
</view> </view>
</view> </view>
</div> </div>
<van-dialog :width="px2vw(650)" v-model:show="withdrawalShow" title="提现" show-cancel-button @confirm="saveUserInfoBtn"> <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="提现金额" placeholder="请输入你的提现金额"/> <van-field v-model="withdrawAmount" type="number" :label="$t('app.withdrawalAmount')" :placeholder="$t('app.pleaseWithdrawalAmount')"/>
</van-dialog> </van-dialog>
</template> </template>
@@ -64,10 +64,12 @@ import {useRouter} from "vue-router";
import {getBorrowWithdraw, getCustomerInfo, getStepBorrow} from "@/api"; import {getBorrowWithdraw, getCustomerInfo, getStepBorrow} from "@/api";
import {resetData} from "@/utils/dataUtil"; import {resetData} from "@/utils/dataUtil";
import {getAssetsImages, px2vw, toRoundMark} from "../../../utils"; import {getAssetsImages, px2vw, toRoundMark} from "../../../utils";
import { useI18n } from 'vue-i18n';
const router = useRouter() const router = useRouter()
const userStore = useUserStore() const userStore = useUserStore()
const { t } = useI18n()
const withdrawalShow = ref(false); const withdrawalShow = ref(false);
const withdrawAmount = ref(0); const withdrawAmount = ref(0);
@@ -112,15 +114,15 @@ const stepBorrow = reactive({
"borrowRemark": "", "borrowRemark": "",
"borrowStep": [ "borrowStep": [
{ {
"name": "提交成功", "name": t('app.submittedSuccessfully'),
"over": true "over": true
}, },
{ {
"name": "银行卡异常", "name": t('app.bankCardAbnormality'),
"over": true "over": true
}, },
{ {
"name": "到账成功", "name": t('app.receivedSuccessfully'),
"over": false "over": false
} }
] ]
@@ -157,7 +159,7 @@ const saveUserInfoBtn = () => {
// }) // })
// .then(() => { // .then(() => {
getBorrowWithdraw({withdrawAmount: withdrawAmount.value}).then(res => { getBorrowWithdraw({withdrawAmount: withdrawAmount.value}).then(res => {
showToast('提现成功') showToast(t('app.withdrawal') + t('app.success'))
router.push({ router.push({
path: '/serveList' path: '/serveList'
}) })

View File

@@ -4,30 +4,30 @@
<j-gap height="120" background="#F9BF3A" opacity="0"/> <j-gap height="120" background="#F9BF3A" opacity="0"/>
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
确认借款信息 {{ $t('app.confirm') }}{{ $t('borrowInfo.loanInfo') }}
</view> </view>
<van-cell title="借款金额" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(loansInfo.totalLoanMoney)" /> <van-cell :title="$t('borrowInfo.loanAmount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="toRoundMark(loansInfo.totalLoanMoney)" />
<van-cell title="借款期限" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="loansInfo.totalMonth + '个月'" /> <van-cell :title="$t('home.loanTerm')" 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="$t('borrowInfo.withdrawalBank')" 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.receivingAccount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="backCardNumDesensitization(userInfo.backCardNum)" />
</div> </div>
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
借款用途 {{ $t('borrowInfo.usageOfLoan') }}
</view> </view>
<van-field <van-field
v-model="loansInfo.noteRemark" v-model="loansInfo.noteRemark"
rows="5" rows="5"
autosize autosize
type="textarea" type="textarea"
placeholder="请输入你的借款用途" :placeholder="$t('app.enter') + $t('borrowInfo.usageOfLoan')"
/> />
</div> </div>
<div class="xieyi"> <div class="xieyi">
<van-checkbox v-model="checked" :icon-size="px2vw(28)" style="align-items: baseline" checked-color="linear-gradient(to right, #F9D88D, #D2A64C)"> <van-checkbox v-model="checked" :icon-size="px2vw(28)" style="align-items: baseline" checked-color="linear-gradient(to right, #F9D88D, #D2A64C)">
我已阅读并同意 {{ $t('home.enterAgreement') }}
<span class="yellow_color1" @click.stop="go('loansAgreement')">借款协议</span> <span class="yellow_color1" @click.stop="go('loansAgreement')">{{ $t('home.loansAgreement') }}</span>
</van-checkbox> </van-checkbox>
</div> </div>
@@ -40,7 +40,7 @@
@click.stop="saveUserInfoBtn" @click.stop="saveUserInfoBtn"
:disabled="!checked" :disabled="!checked"
> >
提交申请 {{ $t('app.submitApplication') }}
</van-button> </van-button>
</div> </div>
</div> </div>
@@ -54,10 +54,12 @@ import {useUserStore} from "@/store/modules/user";
import {getUserInfo, startBorrow} from "@/api"; import {getUserInfo, startBorrow} from "@/api";
import {resetData} from "@/utils/dataUtil"; import {resetData} from "@/utils/dataUtil";
import {showConfirmDialog, showToast} from "vant"; import {showConfirmDialog, showToast} from "vant";
import { useI18n } from 'vue-i18n';
const useUser = useUserStore() const useUser = useUserStore()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const { t } = useI18n()
const loansInfo = reactive({ const loansInfo = reactive({
"customerId": useUser.getUserInfo.id, "customerId": useUser.getUserInfo.id,
@@ -81,13 +83,13 @@ const go = (key) => {
const saveUserInfoBtn = () => { const saveUserInfoBtn = () => {
showConfirmDialog({ showConfirmDialog({
title: '提示', title: t('app.prompt'),
message: '您确定要申请贷款吗', message: t('loans.enterSubmitApplication'),
width: '500px' width: '500px'
}) })
.then(() => { .then(() => {
startBorrow(loansInfo).then(res => { startBorrow(loansInfo).then(res => {
showToast('申请成功') showToast(t('app.submittedSuccessfully'))
router.push({ router.push({
path: '/serveList' path: '/serveList'
}) })

View File

@@ -4,21 +4,21 @@
<j-gap height="120" background="#F9BF3A" opacity="0"/> <j-gap height="120" background="#F9BF3A" opacity="0"/>
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
确认提现信息 {{ $t('app.confirm') }}{{ $t('app.withdrawal') }}{{ $t('app.info') }}
</view> </view>
<van-cell title="到账银行" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="userInfo.bankType" /> <van-cell :title="$t('borrowInfo.withdrawalBank')" 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.receivingAccount')" title-style="color: #8997ae;" style="--van-cell-value-color: #000" :value="backCardNumDesensitization(userInfo.backCardNum)" />
</div> </div>
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
提现金额 {{ $t('app.withdrawalAmount') }}
</view> </view>
<van-field <van-field
v-model="withdrawAmount" v-model="withdrawAmount"
label="金额" :label="$t('app.withdrawalAmount')"
type="number" type="number"
placeholder="请输入你的提现金额" :placeholder="$t('app.enter') + $t('app.withdrawalAmount')"
/> />
</div> </div>
<!-- <div class="xieyi">--> <!-- <div class="xieyi">-->
@@ -37,7 +37,7 @@
@click.stop="saveUserInfoBtn" @click.stop="saveUserInfoBtn"
:disabled="!withdrawAmount || withdrawAmount == 0" :disabled="!withdrawAmount || withdrawAmount == 0"
> >
提现 {{ $t('app.withdrawal') }}
</van-button> </van-button>
</div> </div>
</div> </div>
@@ -50,10 +50,12 @@ import {useUserStore} from "@/store/modules/user";
import {getBorrowWithdraw, getUserInfo} from "@/api"; import {getBorrowWithdraw, getUserInfo} from "@/api";
import {resetData} from "@/utils/dataUtil"; import {resetData} from "@/utils/dataUtil";
import {showConfirmDialog, showToast} from "vant"; import {showConfirmDialog, showToast} from "vant";
import { useI18n } from 'vue-i18n';
const useUser = useUserStore() const useUser = useUserStore()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const { t } = useI18n()
const withdrawAmount = ref() const withdrawAmount = ref()
@@ -72,13 +74,13 @@ const go = (key) => {
const saveUserInfoBtn = () => { const saveUserInfoBtn = () => {
showConfirmDialog({ showConfirmDialog({
title: '提示', title: t('app.prompt'),
message: '您确定要提现吗', message: t('app.enterWithdrawal'),
width: '500px' width: '500px'
}) })
.then(() => { .then(() => {
getBorrowWithdraw({withdrawAmount: withdrawAmount.value}).then(res => { getBorrowWithdraw({withdrawAmount: withdrawAmount.value}).then(res => {
showToast('提现成功') showToast(t('app.prompt') + t('app.success'))
router.push({ router.push({
path: '/serveList' path: '/serveList'
}) })

View File

@@ -3,15 +3,15 @@
<div class="content"> <div class="content">
<j-gap height="50" background="#F9BF3A" opacity="0"/> <j-gap height="50" background="#F9BF3A" opacity="0"/>
<div class="slogan"> <div class="slogan">
<div class="slogan-1">登录</div> <div class="slogan-1">{{ $t(('app.login')) }}</div>
</div> </div>
<div class="input-box"> <div class="input-box">
<!-- 输入手机号调起手机号键盘 --> <!-- 输入手机号调起手机号键盘 -->
<van-field <van-field
v-model="loginData.mobile" v-model="loginData.mobile"
label="账号" :label="$t('app.account')"
class="login-btn" class="login-btn"
placeholder="请输入账号" :placeholder="$t('app.enter') + $t('app.account')"
label-align="top" label-align="top"
type="tel" type="tel"
/> />
@@ -19,8 +19,8 @@
<!-- 允许输入数字调起带符号的纯数字键盘 --> <!-- 允许输入数字调起带符号的纯数字键盘 -->
<van-field <van-field
v-model="loginData.password" v-model="loginData.password"
label="密码" :label="$t('app.password')"
placeholder="请输入密码" :placeholder="$t('app.enter') + $t('app.password')"
class="login-btn" class="login-btn"
label-align="top" label-align="top"
type="password" type="password"
@@ -33,12 +33,12 @@
style="width: 100%; margin: 20px 0" style="width: 100%; margin: 20px 0"
@click.stop="loginBtn" @click.stop="loginBtn"
> >
登录 {{ $t('app.login') }}
</van-button> </van-button>
<view class="op"> <view class="op">
<view @click="goRegister" class="register">注册账号</view> <view @click="goRegister" class="register">{{ $t('app.register') }}{{ $t('app.account') }}</view>
<view @click="goForget" class="forget">忘记密码</view> <view @click="goForget" class="forget">{{ $t('app.forgotPassword') }}</view>
</view> </view>
</div> </div>

View File

@@ -2,7 +2,7 @@
<div> <div>
<j-nav-bar /> <j-nav-bar />
<div class="contract" v-if="contractHtml" v-html="contractHtml"></div> <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> </div>
</template> </template>
@@ -11,8 +11,10 @@ import {onMounted, ref} from 'vue'
import {getContract} from "@/api"; import {getContract} from "@/api";
import {showToast} from "vant"; import {showToast} from "vant";
import {useRoute} from "vue-router"; import {useRoute} from "vue-router";
import { useI18n } from 'vue-i18n';
const route = useRoute() const route = useRoute()
const { t } = useI18n()
const contractHtml = ref('') const contractHtml = ref('')
@@ -24,7 +26,7 @@ const _getContract = () => {
contractHtml.value = res contractHtml.value = res
}) })
} else { } else {
showToast('暂无合同') showToast(t('app.none') + t('app.contract'))
} }
} }

View File

@@ -10,19 +10,19 @@
> >
<view class="j-item" v-for="item in borrowList" :key="item.id" @click="goInfo(item.tradeNo)"> <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 style="display: flex; justify-content: space-between">
<view class="j-item-c"> <view class="j-item-c">
<view>贷款总额{{ item.totalLoanMoney }}</view> <view>{{ $t('app.totalLoan') }}{{ item.totalLoanMoney }}{{ $t('app.yuan') }}</view>
<view class="yellow_color1">每期还款{{ item.avgRepayment }}*{{ item.totalMonth }}</view> <view class="yellow_color1">{{ $t('home.repaymentPerInstallment') }}{{ item.avgRepayment }}*{{ item.totalMonth }}</view>
<view>贷款申请日期{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view> <view>{{ $t('borrowInfo.applicationTime') }}{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view>
</view> </view>
<view :style="{paddingRight: px2vw(20)}" @click.stop="toContract(item.tradeNo)" style="display: flex; justify-content: center; align-items: center; flex-flow: column"> <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" /> <van-icon size="50" name="orders-o" />
合同 {{ $t('app.contract') }}
</view> </view>
</view> </view>
</view> </view>

View File

@@ -10,12 +10,12 @@
> >
<view class="j-item" v-for="item in borrowList" :key="item.id" @click="goInfo(item.tradeNo)"> <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 class="j-item-c">
<view>贷款总额{{ item.totalLoanMoney }}</view> <view>{{ $t('app.totalLoan') }}{{ item.totalLoanMoney }}{{ $t('app.yuan') }}</view>
<view class="yellow_color1">每期还款{{ item.avgRepayment }}*{{ item.totalMonth }}</view> <view class="yellow_color1">{{ $t('home.repaymentPerInstallment') }}{{ item.avgRepayment }}*{{ item.totalMonth }}</view>
<view>贷款申请日期{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view> <view>{{ $t('borrowInfo.applicationTime') }}{{ new Date(item.createTime).format('yyyy-MM-dd hh:mm:ss') }}</view>
</view> </view>
</view> </view>

View File

@@ -2,7 +2,7 @@
<div> <div>
<j-nav-bar v-if="!useEdit" /> <j-nav-bar v-if="!useEdit" />
<van-signature v-if="!useEdit" @submit="onSubmit" @clear="onClear" /> <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" /> <van-image class="my-signature-image" v-if="userInfo.signature" :src="userInfo.signature" />
</div> </div>
</template> </template>

View File

@@ -3,10 +3,10 @@
<div class="content"> <div class="content">
<j-gap height="120" background="#F9BF3A" opacity="0"/> <j-gap height="120" background="#F9BF3A" opacity="0"/>
<van-cell-group inset> <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> <template #title>
<div class="t">身份信息</div> <div class="t">{{ $t('app.identityInformation') }}</div>
<div class="t2">*让我们了解您的资料信息</div> <div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
</template> </template>
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
@@ -15,10 +15,10 @@
</template> </template>
</van-cell> </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> <template #title>
<div class="t">资料信息</div> <div class="t">{{ $t('app.information') }}</div>
<div class="t2">*让我们了解您的资料信息</div> <div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
</template> </template>
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
@@ -27,10 +27,10 @@
</template> </template>
</van-cell> </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> <template #title>
<div class="t">收款银行卡</div> <div class="t">{{ $t('app.receivingBank') }}</div>
<div class="t2">*让我们了解您的资料信息</div> <div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
</template> </template>
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
@@ -38,10 +38,10 @@
</div> </div>
</template> </template>
</van-cell> </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> <template #title>
<div class="t">签名信息</div> <div class="t">{{ $t('app.signatureInformation') }}</div>
<div class="t2">*让我们了解您的资料信息</div> <div class="t2">*{{ $t('app.rwmljndzlxx') }}</div>
</template> </template>
<template #icon> <template #icon>
<div style="display: flex; justify-content: center; align-items: center; padding-right: 12px"> <div style="display: flex; justify-content: center; align-items: center; padding-right: 12px">
@@ -59,7 +59,7 @@
style="width: 100%; " style="width: 100%; "
@click.stop="goHome" @click.stop="goHome"
> >
立即借款 {{ $t('home.immediateBorrowing') }}
</van-button> </van-button>
</div> </div>
</div> </div>

View File

@@ -4,9 +4,23 @@
<div class="content"> <div class="content">
<j-gap height="120" background="#F9BF3A" opacity="0"/> <j-gap height="120" background="#F9BF3A" opacity="0"/>
<div class="action"> <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
<van-field required v-model="userInfo.cardNum" type="text" label="身份证号" placeholder="请输入真实身份证号" :rules="[{ required: true, message: '请输入真实身份证号' }]"/> required
v-model="userInfo.realName"
type="text"
:label="$t('userInfo.name')"
:placeholder="$t('userInfo.enter') + $t('userInfo.name')"
:rules="[{ required: true, message: $t('userInfo.enter') + $t('userInfo.name') }]"
/>
<van-field
required
v-model="userInfo.cardNum"
type="text"
:label="$t('userInfo.idCard')"
:placeholder="$t('userInfo.enter') + $t('userInfo.idCard')"
:rules="[{ required: true, message: $t('userInfo.enter') + $t('userInfo.idCard') }]"
/>
<!-- <van-field required label="身份证号" placeholder="请输入真实身份证号" v-model="userInfo.cardNum" readonly clickable @touchstart.stop="idCardKeyboardShow = true" :rules="[{ required: true, message: '请输入真实身份证号' }]"/>--> <!-- <van-field required label="身份证号" placeholder="请输入真实身份证号" v-model="userInfo.cardNum" readonly clickable @touchstart.stop="idCardKeyboardShow = true" :rules="[{ required: true, message: '请输入真实身份证号' }]"/>-->
<!-- <van-number-keyboard--> <!-- <van-number-keyboard-->
@@ -20,49 +34,55 @@
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
<view>*需本人身份证且内容清晰可辨</view> <view>*{{ $t('userInfo.idCardPrompt') }}</view>
<view>请您确认拍照权限已开启</view> <view>{{ $t('userInfo.photographPrompt') }}</view>
</view> </view>
<view class="action-content"> <view class="action-content">
<view class="action-content-item"> <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"> <div class="id-card-box">
<van-image v-if="userInfo.cardBackPicture" :height="px2vw(156)" :src="userInfo.cardBackPicture" <van-image v-if="userInfo.cardBackPicture" :height="px2vw(156)" :src="userInfo.cardBackPicture"
:width="px2vw(236)"/> :width="px2vw(236)"/>
<van-image v-if="!userInfo.cardBackPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')" <van-image v-if="!userInfo.cardBackPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')"
:width="px2vw(236)"/> :width="px2vw(236)"/>
<div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px"> <div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px">
点击上传身份证人像面 {{ $t('userInfo.idCardUp1') }}
</div> </div>
</div> </div>
</van-uploader> </van-uploader>
</view> </view>
<view class="action-content-item"> <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"> <div class="id-card-box">
<van-image v-if="userInfo.cardFrontPicture" :height="px2vw(156)" :src="userInfo.cardFrontPicture" <van-image v-if="userInfo.cardFrontPicture" :height="px2vw(156)" :src="userInfo.cardFrontPicture"
:width="px2vw(236)"/> :width="px2vw(236)"/>
<van-image v-if="!userInfo.cardFrontPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')" <van-image v-if="!userInfo.cardFrontPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')"
:width="px2vw(236)"/> :width="px2vw(236)"/>
<div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px"> <div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px">
点击上传身份证国徽面 {{ $t('userInfo.idCardUp2') }}
</div> </div>
</div> </div>
</van-uploader> </van-uploader>
</view> </view>
<view class="action-content-item"> <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"> <div class="id-card-box">
<van-image v-if="userInfo.handCardPicture" :height="px2vw(156)" :src="userInfo.handCardPicture" <van-image v-if="userInfo.handCardPicture" :height="px2vw(156)" :src="userInfo.handCardPicture"
:width="px2vw(236)"/> :width="px2vw(236)"/>
<van-image v-if="!userInfo.handCardPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')" <van-image v-if="!userInfo.handCardPicture" :height="px2vw(156)" :src="getAssetsImages('my/idcard1.png')"
:width="px2vw(236)"/> :width="px2vw(236)"/>
<div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px"> <div :style="{fontSize: px2vw(26)}" style="color: #858B9C; width: 100%; text-align: center; padding-top: 10px">
点击上传手持身份证照 {{ $t('userInfo.idCardUp3') }}
</div> </div>
</div> </div>
</van-uploader> </van-uploader>
@@ -70,23 +90,23 @@
<view style="width: 100%; padding: 20px 0"> <view style="width: 100%; padding: 20px 0">
<view>拍摄要求</view> <view>{{ $t('userInfo.shootingRequirements') }}</view>
<view style="display: flex; justify-content: space-between; align-items: center"> <view style="display: flex; justify-content: space-between; align-items: center">
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column"> <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')"/> <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>
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column"> <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')"/> <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>
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column"> <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')"/> <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>
<view style="display: flex; justify-content: center; align-items: center; flex-flow: column"> <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')"/> <van-image :height="px2vw(92)" :width="px2vw(148)" :src="getAssetsImages('my/idcard5.png')"/>
<view class="gray_color font-22">×闪光强烈</view> <view class="gray_color font-22">×{{ $t('userInfo.flashStrongly') }}</view>
</view> </view>
</view> </view>
</view> </view>
@@ -105,7 +125,7 @@
native-type="submit" native-type="submit"
:disabled="!useEdit || !(userInfo.realName && userInfo.cardNum)" :disabled="!useEdit || !(userInfo.realName && userInfo.cardNum)"
> >
提交 {{ $t('app.submit') }}
</van-button> </van-button>
</div> </div>
</van-form> </van-form>
@@ -119,8 +139,10 @@ import {getAssetsImages, px2vw} from "@/utils";
import {showToast} from "vant"; import {showToast} from "vant";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import {useUpload} from "@/hooks/useUpload"; import {useUpload} from "@/hooks/useUpload";
import { useI18n } from 'vue-i18n';
const idCardKeyboardShow = ref(false) const idCardKeyboardShow = ref(false)
const { t } = useI18n()
const userInfo = reactive({ const userInfo = reactive({
backCardNum: '', backCardNum: '',
@@ -163,7 +185,7 @@ const _getBorrowPage = () => {
const beforeRead = (file) => { const beforeRead = (file) => {
if (file.type !== 'image/jpeg' && file.type !== 'image/png') { if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
showToast('请上传 jpg 或者 png 格式图片'); showToast(t('app.upPNGOrJPG'));
return false; return false;
} }
return true; return true;

View File

@@ -1,37 +1,78 @@
<template> <template>
<j-nav-bar color="#FFF" nav-bar-background="#f9bf3a" :placeholder="false"/> <j-nav-bar color="#FFF" nav-bar-background="#f9bf3a" :placeholder="false" />
<van-form @submit="saveUserInfoBtn"> <van-form @submit="saveUserInfoBtn">
<div class="content"> <div class="content">
<j-gap height="120" background="#F9BF3A" opacity="0"/> <j-gap height="120" background="#F9BF3A" opacity="0" />
<div class="action"> <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.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
<van-field required v-model="userInfo.companyTitle" type="text" label="职位" placeholder="请输入职位" :rules="[{ required: true, message: '请输入职位' }]"/> required
<van-field required v-model="userInfo.companyPhone" type="tel" label="单位电话" placeholder="号码加区号(非必填)" :rules="[{ required: true, message: '号码加区号' }]"/> v-model="userInfo.companyName"
<van-field required v-model="userInfo.companyYear" type="number" label="工作年龄" placeholder="请输入工龄" :rules="[{ required: true, message: '请输入工龄' }]"/> type="text"
<van-field required v-model="userInfo.incomeWan" type="number" label="月薪" placeholder="请输入月薪" :rules="[{ required: true, message: '请输入月薪' }]"/> :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 <van-field
v-model="userInfo.companyAddress" v-model="userInfo.companyAddress"
is-link is-link
required required
readonly readonly
:rules="[{ required: true, message: '请选择省市区' }]" :label="$t('userInfo.unitAddress')"
label="单位地址" :placeholder="$t('app.select') + $t('userInfo.unitAddress')"
placeholder="请选择省市区" :rules="[{ required: true, message: $t('app.select') + $t('userInfo.unitAddress') }]"
@click="companyAddressShow = true" @click="companyAddressShow = true"
/> />
<van-popup v-model:show="companyAddressShow" round position="bottom"> <van-popup v-model:show="companyAddressShow" round position="bottom">
<van-cascader <van-cascader
v-model="cascaderValue" v-model="cascaderValue"
title="请选择所在地区" :title="$t('app.select') + $t('userInfo.unitAddress')"
:options="options" :options="options"
@close="companyAddressShow = false" @close="companyAddressShow = false"
@finish="onFinish" @finish="onFinish"
/> />
</van-popup> </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 <van-field
@@ -39,38 +80,58 @@
is-link is-link
required required
readonly readonly
:rules="[{ required: true, message: '请选择所在地区' }]" :label="$t('userInfo.currentResidentialAddress')"
label="现居住地址" :placeholder="$t('app.select') + $t('userInfo.currentResidentialAddress')"
placeholder="请选择所在地区" :rules="[{ required: true, message: $t('app.select') + $t('userInfo.currentResidentialAddress') }]"
@click="customerAddressShow = true" @click="customerAddressShow = true"
/> />
<van-popup v-model:show="customerAddressShow" round position="bottom"> <van-popup v-model:show="customerAddressShow" round position="bottom">
<van-cascader <van-cascader
v-model="customerAddressValue" v-model="customerAddressValue"
title="请选择所在地区" :title="$t('app.select') + $t('userInfo.currentResidentialAddress')"
:options="options" :options="options"
@close="customerAddressShow = false" @close="customerAddressShow = false"
@finish="onCustomerAddressFinish" @finish="onCustomerAddressFinish"
/> />
</van-popup> </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>
<div class="action"> <div class="action">
<view class="tt"> <view class="tt">
直系亲属联系人 {{ $t('userInfo.directFamilyContactPerson') }}
</view> </view>
<van-field required v-model="userInfo.kinsfolkName" type="text" label="姓名" placeholder="请输入真实姓名" :rules="[{ required: true, message: '请输入真实姓名' }]"/> <van-field
<van-field required v-model="userInfo.kinsfolkPhone" type="tel" label="手机号码" placeholder="请输入手机号码" :rules="[{ required: true, message: '请输入手机号码' }]"/> required
v-model="userInfo.kinsfolkName"
type="text"
:label="$t('userInfo.name')"
:placeholder="$t('userInfo.enter') + $t('userInfo.name')"
:rules="[{ required: true, message: $t('userInfo.enter') + $t('userInfo.name') }]"
/>
<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 <van-field
v-model="userInfo.kinsfolkRefText" v-model="userInfo.kinsfolkRefText"
is-link is-link
:rules="[{ required: true, message: '请选择关系' }]" :rules="[{ required: true, message: $t('app.select') + $t('userInfo.relationship') }]"
required required
readonly readonly
label="关系" :label="$t('userInfo.relationship')"
placeholder="请选择关系" :placeholder="$t('app.select') + $t('userInfo.relationship')"
@click="showPicker = true" @click="showPicker = true"
/> />
<van-popup v-model:show="showPicker" round position="bottom"> <van-popup v-model:show="showPicker" round position="bottom">
@@ -93,29 +154,31 @@
native-type="submit" native-type="submit"
:disabled="!useEdit" :disabled="!useEdit"
> >
提交 {{ $t('app.submit') }}
</van-button> </van-button>
</div> </div>
</van-form> </van-form>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {onMounted, reactive, ref} from "vue"; import { onMounted, reactive, ref } from 'vue';
import {getBorrowPage, getUserInfo, updateCustomerCard} from "@/api"; import { getBorrowPage, getUserInfo, updateCustomerCard } from '@/api';
import {resetData} from "@/utils/dataUtil"; import { resetData } from '@/utils/dataUtil';
import {showToast} from "vant"; import { useRouter } from 'vue-router';
import {useRouter} from "vue-router"; import { useCascaderAreaData } from '@vant/area-data';
import {useCascaderAreaData} from "@vant/area-data"; import { useI18n } from 'vue-i18n';
const companyAddressShow = ref(false) const { t } = useI18n()
const customerAddressShow = ref(false)
const companyAddressShow = ref(false);
const customerAddressShow = ref(false);
const cascaderValue = ref(''); const cascaderValue = ref('');
const customerAddressValue = ref(''); const customerAddressValue = ref('');
const columns = [ const columns = [
{ text: '父母', value: '1' }, { text: t('userInfo.parents'), value: '1' },
{ text: '配偶', value: '2' }, { text: t('userInfo.spouse'), value: '2' },
{ text: '子女', value: '3' }, { text: t('userInfo.children'), value: '3' },
{ text: '祖父母', value: '4' }, { text: t('userInfo.grandparents'), value: '4' }
]; ];
const userInfo = reactive({ const userInfo = reactive({
backCardNum: '', backCardNum: '',
@@ -139,28 +202,28 @@ const userInfo = reactive({
kinsfolkRef: '', kinsfolkRef: '',
kinsfolkRefText: '', kinsfolkRefText: '',
realName: '' realName: ''
}) });
const _getUserInfo = () => { const _getUserInfo = () => {
getUserInfo().then(res => { getUserInfo().then(res => {
resetData(userInfo, res) resetData(userInfo, res);
columns.forEach(c => { columns.forEach(c => {
if (c.value == userInfo.kinsfolkRef) { if (c.value == userInfo.kinsfolkRef) {
userInfo.kinsfolkRefText = c.text userInfo.kinsfolkRefText = c.text;
} }
}) });
}) });
} };
const borrowPage = { const borrowPage = {
pageNum: 0, pageNum: 0,
pageSize: 3, pageSize: 3
} };
const useEdit = ref(true) const useEdit = ref(true);
const _getBorrowPage = () => { const _getBorrowPage = () => {
getBorrowPage(borrowPage).then(res => { getBorrowPage(borrowPage).then(res => {
useEdit.value = res.length === 0; useEdit.value = res.length === 0;
}) });
} };
const options = useCascaderAreaData(); const options = useCascaderAreaData();
const onFinish = ({ selectedOptions }) => { const onFinish = ({ selectedOptions }) => {
@@ -183,21 +246,18 @@ const onConfirm = ({ selectedOptions }) => {
}; };
const router = useRouter();
const router = useRouter()
const saveUserInfoBtn = (values) => { const saveUserInfoBtn = (values) => {
updateCustomerCard(userInfo).then(res => { updateCustomerCard(userInfo).then(res => {
router.back() router.back();
}) });
} };
onMounted(() => { onMounted(() => {
_getUserInfo() _getUserInfo();
_getBorrowPage() _getBorrowPage();
}) });
</script> </script>
@@ -215,6 +275,7 @@ onMounted(() => {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
box-shadow: 0 0 1vw 0px #e0e0e0; box-shadow: 0 0 1vw 0px #e0e0e0;
&-content { &-content {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
@@ -249,6 +310,7 @@ onMounted(() => {
color: #738aa4; color: #738aa4;
padding: 20px 0; padding: 20px 0;
} }
// //
} }

View File

@@ -6,12 +6,12 @@
<div class="content"> <div class="content">
<j-gap background="#F9BF3A" height="120" opacity="0"/> <j-gap background="#F9BF3A" height="120" opacity="0"/>
<div class="action"> <div class="action">
<view class="tt">填写真实有效的信息审核才会通过哦~</view> <view class="tt">{{ $t('userInfo.realPrompt') }}~</view>
<van-field <van-field
v-model="userInfo.bankType" v-model="userInfo.bankType"
:rules="[{ required: true, message: '请选择开户银行' }]" :label="$t('userInfo.bankOfDeposit')"
label="开户银行" :placeholder="$t('app.enter') + $t('userInfo.bankOfDeposit')"
placeholder="请输入开户银行" :rules="[{ required: true, message: $t('app.enter') + $t('userInfo.bankOfDeposit') }]"
:disabled="!useEdit" :disabled="!useEdit"
required required
/> />
@@ -22,8 +22,17 @@
@confirm="onConfirm" @confirm="onConfirm"
/> />
</van-popup>--> </van-popup>-->
<van-field :disabled="!useEdit" @paste="pasteField" @copy="copyField" v-model="userInfo.backCardNum" :rules="[{ required: true, message: '请输入银行卡号' }]" label="银行卡号" placeholder="请输入银行卡号" required <van-field
type="digit"/> :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> </div>
@@ -37,7 +46,7 @@
style="width: 100%; " style="width: 100%; "
v-if="useEdit" v-if="useEdit"
> >
提交 {{ $t('app.submit') }}
</van-button> </van-button>
</div> </div>
</van-form> </van-form>

View File

@@ -4,7 +4,7 @@
<div class="content"> <div class="content">
<j-gap height="50" background="#F9BF3A" opacity="0"/> <j-gap height="50" background="#F9BF3A" opacity="0"/>
<div class="slogan"> <div class="slogan">
<div class="slogan-1">注册</div> <div class="slogan-1">{{ $t('app.register') }}</div>
</div> </div>
@@ -13,16 +13,16 @@
<van-field <van-field
v-model="loginData.phoneNumber" v-model="loginData.phoneNumber"
class="login-btn" class="login-btn"
label="手机号码" :label="$t('app.phoneNumber')"
placeholder="请输入手机号码" :placeholder="$t('app.enter') + $t('app.phoneNumber')"
type="tel" type="tel"
/> />
<van-field <van-field
v-model="loginData.code" v-model="loginData.code"
class="login-btn" class="login-btn"
label="验证码" :label="$t('app.verificationCode')"
placeholder="请输入验证码" :placeholder="$t('app.enter') + $t('app.verificationCode')"
type="number" type="number"
> >
<template #button> <template #button>
@@ -32,7 +32,7 @@
<span class="block">{{ timeData.seconds }}</span> <span class="block">{{ timeData.seconds }}</span>
</template> </template>
</van-count-down> </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> </div>
</template> </template>
</van-field> </van-field>
@@ -41,8 +41,8 @@
<van-field <van-field
v-model="loginData.password" v-model="loginData.password"
class="login-btn" class="login-btn"
label="登录密码" :label="$t('app.login') + $t('app.password')"
placeholder="请设置6-16位密码" :placeholder="$t('app.passwordPlaceholder')"
type="text" type="text"
/> />
@@ -55,11 +55,11 @@
style="width: 100%; margin: 20px 0" style="width: 100%; margin: 20px 0"
@click.stop="registerBtn" @click.stop="registerBtn"
> >
注册 {{ $t('app.register') }}
</van-button> </van-button>
<view class="op"> <view class="op">
<view class="register" @click="goLogin">登录</view> <view class="register" @click="goLogin">{{ $t('app.login') }}</view>
</view> </view>
</div> </div>
@@ -71,9 +71,12 @@ import {showToast} from "vant";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import {register, sendSmsRegister} from "@/api/login"; import {register, sendSmsRegister} from "@/api/login";
import {useUserStore} from "@/store/modules/user"; import {useUserStore} from "@/store/modules/user";
import { useI18n } from 'vue-i18n';
const router = useRouter() const router = useRouter()
const userStore = useUserStore() const userStore = useUserStore()
const { t } = useI18n()
const loginData = reactive({ const loginData = reactive({
phone: null, phone: null,
@@ -100,7 +103,7 @@ const start = () => {
onFinish() onFinish()
}) })
} else { } else {
showToast('请输入手机号') showToast(t('app.enter') + t('app.phoneNumber'))
} }
}; };

View File

@@ -10,8 +10,8 @@
v-model="loginData.phoneNumber" v-model="loginData.phoneNumber"
disabled disabled
class="login-btn" class="login-btn"
label="手机号码" :label="$t('app.phoneNumber')"
placeholder="请输入手机号码" :placeholder="$t('app.enter') + $t('app.phoneNumber')"
label-align="top" label-align="top"
style="background: #12332100" style="background: #12332100"
type="tel" type="tel"
@@ -20,8 +20,8 @@
<van-field <van-field
v-model="loginData.code" v-model="loginData.code"
class="login-btn" class="login-btn"
label="验证码" :label="$t('app.verificationCode')"
placeholder="请输入验证码" :placeholder="$t('app.enter') + $t('app.verificationCode')"
label-align="top" label-align="top"
style="background: #12332100" style="background: #12332100"
type="number" type="number"
@@ -33,7 +33,7 @@
<span class="block">{{ timeData.seconds }}</span> <span class="block">{{ timeData.seconds }}</span>
</template> </template>
</van-count-down> </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> </div>
</template> </template>
</van-field> </van-field>
@@ -41,9 +41,9 @@
<van-field <van-field
v-model="loginData.password" v-model="loginData.password"
class="login-btn" class="login-btn"
label="登录密码"
label-align="top" label-align="top"
placeholder="请设置6-16位密码" :label="$t('app.login') + $t('app.password')"
:placeholder="$t('app.passwordPlaceholder')"
style="background: #12332100" style="background: #12332100"
type="password" type="password"
/> />
@@ -51,9 +51,9 @@
<van-field <van-field
v-model="loginData.confirmPassword" v-model="loginData.confirmPassword"
class="login-btn" class="login-btn"
label="确认密码"
label-align="top" label-align="top"
placeholder="请再次输入密码" :label="$t('app.confirm') + $t('app.password')"
:placeholder="$t('app.passwordPlaceholder1')"
style="background: #12332100" style="background: #12332100"
type="password" type="password"
/> />
@@ -68,7 +68,7 @@
style="width: 100%; margin: 20px 0" style="width: 100%; margin: 20px 0"
@click.stop="updatePwdBtn" @click.stop="updatePwdBtn"
> >
确认修改 {{ $t('app.confirm') + $t('app.update') }}
</van-button> </van-button>
</view> </view>
</view> </view>
@@ -83,7 +83,9 @@ import {sendSmsForget, updatePwd} from "@/api/login";
import {showToast} from "vant"; import {showToast} from "vant";
import {getCustomerInfo} from "@/api"; import {getCustomerInfo} from "@/api";
import {resetData} from "@/utils/dataUtil"; import {resetData} from "@/utils/dataUtil";
import { useI18n } from 'vue-i18n';
const { t } = useI18n()
const loginData = reactive({ const loginData = reactive({
phone: null, phone: null,
phoneNumber: '', phoneNumber: '',
@@ -112,7 +114,7 @@ const start = () => {
onFinish() onFinish()
}) })
} else { } else {
showToast('请输入手机号') showToast(t('app.enter') + t('app.phoneNumber'))
} }
}; };
@@ -127,7 +129,7 @@ const updatePwdBtn = () => {
password: loginData.password password: loginData.password
}).then(res => { }).then(res => {
console.log(res) console.log(res)
showToast('修改成功') showToast(t('app.update') + t('app.success'))
}) })
} }
const customerInfo = reactive({ const customerInfo = reactive({

View File

@@ -38,7 +38,8 @@ export default defineConfig({
port: 9528, port: 9528,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:8887', target: ' http://dk.qiqizl.com',
// target: 'http://localhost:8887',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(new RegExp(`^/api`), '/api'), rewrite: (path) => path.replace(new RegExp(`^/api`), '/api'),