Commit baab6420 authored by ly's avatar ly

海桐公众号h5

parents
Pipeline #1506 failed with stages
NODE_ENV=development
VUE_APP_API=https://bifrost.billionsat.net
VUE_APP_API_PUBLIC_URL=http://192.168.0.118:8080/
VUE_APP_ROUTE=http://192.168.0.118:8080/index.html#/
NODE_ENV=production
VUE_APP_API=https://great.rockstect.net
VUE_APP_API_PUBLIC_URL=https://blmx.jqtianxia.com/
VUE_APP_ROUTE=https://blmx.jqtianxia.com/index.html#/
NODE_ENV=staging
VUE_APP_API=https://bifrost.billionsat.net
VUE_APP_API_PUBLIC_URL=http://192.168.0.118:8080/
VUE_APP_ROUTE=http://192.168.0.118:8080/index.html#/
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.history
\ No newline at end of file
# tobiras-h5
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "tobiras-h5",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --mode development ",
"build:staging": "vue-cli-service build --mode staging",
"build:prod": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^1.6.8",
"core-js": "^3.6.5",
"postcss": "^7.0.38",
"postcss-pxtorem": "^5.1.1",
"vant": "^4.9.0",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.15",
"@vue/cli-plugin-eslint": "~4.5.15",
"@vue/cli-plugin-router": "~4.5.15",
"@vue/cli-plugin-vuex": "~4.5.15",
"@vue/cli-service": "~4.5.15",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"less": "^3.0.4",
"less-loader": "^7.0.1",
"postcss-loader": "^4.0.4"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"_id": "tobiras-h5@0.1.0",
"readme": "ERROR: No README data found!"
}
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" name="viewport">
<script src="https://m.jqtianxia.com/public/libs/flexible.js"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<!-- 调试 -->
<script src="https://m.rockstect.com/public/vconsole.min.js"></script>
<script>
window.vConsole = new window.VConsole();
</script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script>
document.documentElement.addEventListener('touchstart', function (event) {
if (event.touches.length > 1) {
event.preventDefault();
}
}, false);
</script>
</html>
<template>
<!-- <template> -->
<router-view/>
<!-- </template> -->
</template>
<script>
import { onMounted, toRefs, reactive } from "vue";
import { useRouter } from 'vue-router';
import API from "./api/api";
export default {
setup(){
const router=useRouter()
const state=reactive({
showCenter:false
})
const init=async()=>{
const token = localStorage.getItem('token')
console.log(token,'token')
const res=await API.checkLogins({
"tsToken":token
})
if(res.result){
const{idCard, mobile}=res.result
localStorage.setItem('idCard',idCard)
localStorage.setItem('mobile',mobile)
}else{
router.push('/')
}
}
onMounted(()=>{
init()
})
return {
...toRefs(state),
init
}
}
}
</script>
<style lang="less">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
body{
margin:0;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>
import request from '../utils/Ajax'
export default{
/*登录发送验证码 */
async loginSend(data) {
return request.post('authority/anon/captcha/sendByHtH5', data)
},
// 登录
async logins(data) {
return request.post('authority/anon/haiTongH5/html/login', data)
},
// 检查token是否失效
async checkLogins(data) {
return request.post('authority/anon/account/getCustmCurrentUser', data)
},
// 我的借款
async loanDetails(data) {
return request.post('blackhole/custm/xiaChengMiniProgram/caseInfoTs', data)
},
// 预约还款
async applyC(data) {
return request.post('blackhole/custm/xiaChengMiniProgram/applyTs', data)
}
}
\ No newline at end of file
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
// 2. 引入组件样式
import 'vant/lib/index.css'
createApp(App).use(store).use(router).use(Vant).mount('#app')
import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
{
path: '/',
name: 'Index',
desc: '登录',
component: () => import('../views/login/index.vue')
},
{
path: '/myLoan',
name: 'myLoan',
desc: '我的借款',
component: () => import('../views/myLoan/index.vue')
},
{
path: '/bill',
name: 'bill',
desc: '账单',
component: () => import('../views/bill/index.vue')
}
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
// 路由导航守卫
router.beforeEach((to, from, next) => {
const { name } = to
// 设置页面标题
routes.forEach(route => {
const { desc } = route
if (route.name === name) {
console.log(desc,'desc')
document.title = desc
}
})
// 设置了标题之后继续做其它的事情
next()
})
export default router
import { createStore } from 'vuex'
export default createStore({
state: {
},
mutations: {
},
actions: {
},
modules: {
}
})
import axios from 'axios'
import { showToast } from 'vant'
const API = process.env.VUE_APP_API
console.log(process.env,'8766')
// axios 拦截器
axios.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
const token = localStorage.getItem('token')
console.log(token,'token')
if (!config.data) config.data = {}
if (token) config.data.tsToken = token
return config
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error)
})
// 统一封装
const Fetch = async options => {
let fetch
const {url,data, method} = options
console.log(options,'options')
const baseUrl = `${API}${url}`
switch (method.toLowerCase()) {
case 'get':
fetch = axios.get(baseUrl, {
params: data,
withCredentials: false
})
break
case 'post':
fetch = axios.post(baseUrl, data, {
transformRequest: [
function (data) {
data = JSON.stringify(data)
return data
}
],
// 表示跨域请求时是否需要使用凭证 默认false
withCredentials: false,
// 设置header
headers: {
Accept: 'application/json;charset=UTF-8',
'Content-Type': 'application/json;charset=UTF-8'
}
})
break
default:
fetch = axios({ ...options })
break
}
return fetch
}
// 对返回结果和错误信息进行处理
const request = function (options) {
return Fetch(options).then(res => {
if (res.status === 200) {
const {message,code,success }=res.data
if(code==500 && success==false){
console.log(message,'res6')
showToast({ message })
throw new Error({ ...res.data })
}else{
console.log(res.data,'data7')
return Promise.resolve({ ...res.data})
}
} else {
console.log(res,'data8')
const { message } = res.data.data
showToast({ message })
throw new Error({ ...res.data })
}
}).catch(error => {
console.log(error, ' 进入了catch 函数')
const { response } = error
let msg
let statusCode
if (response && response instanceof Object) {
const {data,statusText} = response
statusCode = response.status
msg = data.message || statusText
} else {
statusCode = 600
error = error.toJSON()
msg = error.message || '服务器开小差了...'
if (error.message === 'Network Error') {
msg = '服务器开小差了'
}
}
showToast({
message: msg
})
/* eslint-disable */
return Promise.reject({
success: false,
statusCode,
message: msg
})
})
}
export default {
// get方法封装
get: function (url, data) {
return request({
url,
data: data ? data : '',
method: 'GET'
})
},
// post方法封装
post: function (url, data) {
return request({
url,
data: data ? data : '',
method: 'POST'
})
}
}
.bill-page {
width: 100%;
height: calc(100vh-120px);
min-height: 2561px;
background: #F7F7F7;
padding-bottom: 240px;
}
.bill-page .bill-mians {
padding-top: 90px;
}
.bill-page .bill-mians .bill-card {
margin: 20px auto;
width: 714px;
height: 342px;
background: url('../../assets/img/bg-img.png') 0 0 no-repeat;
background-size: 714px 342px;
}
.bill-page .bill-mians .bill-card .card-main {
padding: 53px 43px;
}
.bill-page .bill-mians .bill-card .card-main .main-top {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
line-height: 34px;
color: #757575;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-main .main-top .top-text {
padding-right: 16px;
font-weight: 500;
font-size: 32px;
color: #212121;
}
.bill-page .bill-mians .bill-card .card-main .main-s {
height: 68px;
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28px;
color: #757575;
line-height: 68px;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-main .main-s .s-qishu {
text-align: right;
padding-left: 10px;
padding-right: 8px;
}
.bill-page .bill-mians .bill-card .card-main .main-s .s-time {
padding-left: 8px;
}
.bill-page .bill-mians .bill-card .card-main .main-text {
padding-top: 20px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 30px;
color: #212121;
line-height: 38px;
text-align: left;
font-style: normal;
border-top: 2px solid #ccc;
}
.bill-page .bill-mians .bill-card .card-main .main-num {
padding-top: 18px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 42px;
color: #3E97F3;
line-height: 40px;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill {
margin-top: 54px;
background: #FFFFFF;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian {
padding: 40px;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .mian-top {
display: flex;
align-items: center;
justify-content: space-between;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .mian-top .mian-l .l-icon {
display: inline-block;
margin-right: 8px;
width: 4px;
height: 22px;
background: #FF4248;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .mian-top .mian-l span {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
color: #212121;
line-height: 40px;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .mian-top .mian-r {
display: flex;
align-items: center;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .mian-top .mian-r .r-icon {
display: inline-block;
width: 32px;
height: 32px;
background: url('../../assets/img/phone.png') 0 0 no-repeat;
background-size: 100%;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .mian-top .mian-r span {
padding-left: 10px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26px;
color: #278FE9;
line-height: 26px;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line {
display: flex;
align-items: center;
justify-content: space-between;
height: 203px;
background: #FFFFFF;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-l .l-first {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #757575;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-l .l-first .first-text .text-num {
padding: 0 10px;
color: #212121;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-l .l-first .first-time {
padding-left: 8px;
height: 33px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #757575;
line-height: 33px;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-l .l-nums {
font-family: DIN, DIN;
font-weight: bold;
font-size: 40px;
color: #212121;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-l .l-text {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #757575;
text-align: left;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-r {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
line-height: 40px ;
text-align: right;
font-style: normal;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-r .r-red {
color: #FF4248;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-r .r-blue {
color: #3E97F3;
}
.bill-page .bill-mians .bill-card .card-bill .bill-mian .main-line .line-r .r-grey {
color: #9E9E9E;
}
.bill-page{
width: 100%;
height:calc(100vh-120px);
min-height: 2561px;
background: #F7F7F7;
padding-bottom:240px;
.bill-mians{
padding-top:90px;
.bill-card{
margin:20px auto;
width: 714px;
height: 342px;
background: url('../../assets/img/bg-img.png') 0 0 no-repeat;
background-size: 714px 342px;
.card-main{
padding: 53px 43px;
.main-top{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
line-height: 34px;
color: #757575;
text-align: left;
font-style: normal;
.top-text{
padding-right: 16px;
font-weight: 500;
font-size: 32px;
color: #212121;
}
}
.main-s{
// padding:10px 0;
height: 68px;
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28px;
color: #757575;
line-height: 68px;
text-align: left;
font-style: normal;
.s-qishu{
text-align: right;
padding-left: 10px;
padding-right: 8px;
// border-right: 2px solid #ccc;
}
.s-time{
padding-left: 8px;
}
}
.main-text{
padding-top:20px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 30px;
color: #212121;
line-height: 38px;
text-align: left;
font-style: normal;
border-top: 2px solid #ccc;
}
.main-num{
padding-top:18px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 42px;
color: #3E97F3;
line-height: 40px;
text-align: left;
font-style: normal;
}
}
.card-bill{
margin-top:54px;
background: #FFFFFF;
.bill-mian{
padding:40px;
.mian-top{
display: flex;
align-items: center;
justify-content: space-between ;
.mian-l{
// display: flex;
// align-items: center;
.l-icon{
display: inline-block;
margin-right: 8px;
width: 4px;
height: 22px;
background: #FF4248;
}
span{
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
color: #212121;
line-height: 40px;
font-style: normal;
}
}
.mian-r{
display: flex;
align-items: center;
.r-icon{
display: inline-block;
width: 32px;
height: 32px;
background: url('../../assets/img/phone.png') 0 0 no-repeat;
background-size: 100%;
}
span{
padding-left:10px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26px;
color: #278FE9;
line-height: 26px;
// text-align: left;
font-style: normal;
}
}
}
.main-line{
display: flex;
align-items: center;
justify-content: space-between;
height: 203px;
background: #FFFFFF;
.line-l{
.l-first{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #757575;
text-align: left;
font-style: normal;
.first-text{
.text-num{
padding:0 10px;
color:#212121;
}
}
.first-time{
padding-left:8px;
height: 33px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #757575;
line-height: 33px;
text-align: left;
font-style: normal;
}
}
.l-nums{
font-family: DIN, DIN;
font-weight: bold;
font-size: 40px;
color: #212121;
text-align: left;
font-style: normal;
}
.l-text{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #757575;
text-align: left;
font-style: normal;
}
}
.line-r{
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
line-height:40px ;
text-align: right;
font-style: normal;
.r-red{
color: #FF4248;
}
.r-blue{
color:#3E97F3;
}
.r-grey{
color:#9E9E9E;
}
}
}
}
}
}
}
}
\ No newline at end of file
<template>
<div class='bill-page'>
<van-nav-bar
:title="titleDes"
left-text=""
left-arrow
fixed
@click-left="onClickLeft"
/>
<div class='bill-mians'>
<div class='bill-card'>
<div class='card-main'>
<div class='main-top'>
<span class='top-text'>产品名称</span>
<span>协议编号:BA205463526472425</span>
</div>
<div class='main-s'>
<div>借款金额:6000.00元</div>
<div class="s-qishu">
<span class="s-qishu">借款期数:12期</span>
<!-- <span class='s-time'>借款时间:2017/12/12</span> -->
</div>
</div>
<div class='main-text'>待还款金额(元)</div>
<div class='main-num'>5,000.00</div>
</div>
<div class='card-bill'>
<div class='bill-mian'>
<div class='mian-top'>
<div class='mian-l'>
<i class='l-icon'></i>
<span>待还期数</span>
</div>
<div class='mian-r' @click='goPhone'>
<i class='r-icon'></i>
<span>400 888 8888</span>
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>1</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<!-- <span class='r-blue'>待还款</span> -->
<span class='r-grey'>未到还款日</span>
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>2</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<span class='r-blue'>待还款</span>
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>2</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<span class='r-blue'>待还款</span>
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>2</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<span class='r-blue'>待还款</span>
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>2</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<span class='r-blue'>待还款</span>
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>2</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<span class='r-blue'>待还款</span>
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>2</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<!-- <span class='r-red'>已逾期</span> -->
<span class='r-blue'>待还款</span>
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
<div class='main-line'>
<div class='line-l'>
<div class='l-first'>
<span class='first-text'><span class='text-num'>3</span></span>
<span class='first-time'>08/16</span>
</div>
<div class='l-nums'>1,255.00</div>
<div class='l-text'>当期应还(元)</div>
</div>
<div class='line-r'>
<span class='r-red'>已逾期</span>
<!-- <span class='r-blue'>待还款</span> -->
<!-- <span class='r-grey'>未到还款日</span> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { onMounted, toRefs, reactive } from "vue";
export default {
setup(){
const state=reactive({
titleDes:"",
})
const onClickLeft = () => history.back()
const goPhone=()=>{
window.location.href = 'tel://4006672319'
}
onMounted(()=>{
state.titleDes='账单'
})
return {
...toRefs(state),
onClickLeft,
goPhone
}
}
}
</script>
<style lang="less" src="./index.less" scoped></style>
\ No newline at end of file
.login-page {
width: 100%;
height: 100vh;
max-height: 1334px;
background: #F7F7F7;
}
.login-page .login-main {
margin: 20px;
background: #FFFFFF;
}
.login-page .login-main .mian-box {
padding: 10px;
}
.login-page .login-main .mian-box .box-id {
height: 92px;
display: flex;
align-items: center;
}
.login-page .login-main .mian-box .box-id .id-img {
display: inline-block;
width: 48px;
height: 48px;
background: url('../../assets/img/idcard.png') 0 0 no-repeat;
background-size: 100%;
}
.login-page .login-main .mian-box .box-id .id-mobile {
display: inline-block;
width: 48px;
height: 48px;
background: url('../../assets/img/mobile.png') 0 0 no-repeat;
background-size: 100%;
}
.login-page .login-main .mian-box .box-id .id-send {
display: inline-block;
margin-top: 10px;
margin-left: 8px;
width: 32px;
height: 32px;
background: url('../../assets/img/sendcod.png') 0 0 no-repeat;
background-size: 100%;
}
.login-page .login-main .mian-box .box-id .id-input {
border: none;
width: 230px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28px;
color: #1E1E1E;
font-style: normal;
}
.login-page .login-main .mian-box .box-id input::-webkit-input-placeholder {
color: #909090;
font-size: 28px;
}
.login-page .login-main .mian-box .box-id .id-sendcode {
width: 240px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #3877F8;
line-height: 28px;
text-align: right;
font-style: normal;
}
.login-page .login-main .mian-box .box-id .id-sendcodes {
width: 240px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #3877F8;
line-height: 28px;
text-align: right;
}
.login-page .login-main .mian-box .box-btn {
margin-top: 20px;
width: 100%;
height: 52px;
border-radius: 20px;
background: #3E97F3;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
color: #FFFFFF;
line-height: 50px;
text-align: center;
font-style: normal;
}
.login-page .login-main .mian-box .box-footer {
margin-top: 20px;
display: flex;
align-items: flex-start;
}
.login-page .login-main .mian-box .box-footer .footer-img {
display: inline-block;
margin-right: 8px;
width: 32px;
height: 32px;
background: url('../../assets/img/point.png') 0 0 no-repeat;
background-size: 100%;
}
.login-page .login-main .mian-box .box-footer .footer-text {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: #212121;
font-style: normal;
}
.login-page{
width: 100%;
height: 100vh;
max-height: 1334px;
background: #F7F7F7;
.login-main{
margin:20px;
// height: 120px;
background: #FFFFFF;
.mian-box{
padding:10px;
.box-id{
height:92px;
display: flex;
align-items: center;
.id-img{
display: inline-block;
width: 48px;
height: 48px;
background: url('../../assets/img/idcard.png') 0 0 no-repeat;
background-size: 100%;
}
.id-mobile{
display: inline-block;
width: 48px;
height: 48px;
background: url('../../assets/img/mobile.png') 0 0 no-repeat;
background-size: 100%;
}
.id-send{
display: inline-block;
margin-top:10px;
margin-left: 8px;
width: 32px;
height: 32px;
background: url('../../assets/img/sendcod.png') 0 0 no-repeat;
background-size:100%;
}
.id-input{
border: none;
width:230px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28px;
color: #1E1E1E;
font-style: normal;
}
input::-webkit-input-placeholder{
color: #909090;
font-size: 28px;
}
.id-sendcode{
width: 240px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #3877F8;
line-height: 28px;
text-align: right;
font-style: normal;
}
.id-sendcodes{
width: 240px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
color: #3877F8;
line-height: 28px;
text-align: right;
}
}
.box-btn{
margin-top:20px;
width: 100%;
height: 52px;
border-radius: 20px;
background: #3E97F3;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
color: #FFFFFF;
line-height: 50px;
text-align: center;
font-style: normal;
}
.box-footer{
margin-top:20px;
display: flex;
align-items: flex-start;
.footer-img{
display: inline-block;
margin-right: 8px;
width: 32px;
height: 32px;
background: url('../../assets/img/point.png') 0 0 no-repeat;
background-size: 100%;
}
.footer-text{
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 16px;
color: #212121;
font-style: normal;
}
}
}
}
}
\ No newline at end of file
<template>
<div class='login-page'>
<van-nav-bar
:title="titleDes"
left-text=""
left-arrow
@click-left="onClickLeft"
/>
<div class='login-main'>
<div class='mian-box'>
<div class='box-id'>
<i class='id-img'></i>
<input class='id-input'
:value="idCardNumber"
@input="IDChange($event)"
placeholder="输入身份证号" />
</div>
<div class='box-id'>
<i class='id-mobile'></i>
<!-- <van-field class='id-input' v-model="tel" type="tel" placeholder="输入手机号" /> -->
<input class='id-input'
:value="phone"
maxlength="11"
type="number"
@input="phoneChange($event)"
placeholder="输入手机号" />
</div>
<div class='box-id'>
<i class='id-send'></i>
<input class='id-input'
placeholder="输入验证码"
:value="sendcode"
type="number"
@input="changecode($event)"/>
<div class='id-sendcode' @click='loginSendCode' v-if="canSendCode">获取验证码</div>
<div class='id-sendcodes' v-else>重新获取({{count}}秒)</div>
</div>
<div class='box-btn' @click="loginbtn">登 录</div>
<div class='box-footer'>
<i class='footer-img'></i>
<span class='footer-text'>借款人需及时登录,查询逾期信息并进行相关还款、依法还款、义不容辞</span>
</div>
</div>
</div>
</div>
</template>
<script>
import { onMounted, toRefs, reactive } from "vue";
import API from "../../api/api";
import { Toast } from 'vant';
import { useRouter } from 'vue-router';
export default {
setup(){
const router=useRouter()
const state=reactive({
titleDes:"",
idCardNumber:'',
phone:'',
canSendCode: true,
sendcode:'',
passWord:'',
accountVal:'',
timer: null,//倒计时
count: '',//倒计时
})
const onClickLeft = () => history.back()
const IDChange = (e) => {
console.log(e.target.value,997)
state.idCardNumber = e.target.value
}
const phoneChange=(e)=>{
console.log(e.target.value,997)
state.phone = e.target.value
}
const changecode=(e)=>{
state.sendcode = e.target.value
}
const loginSendCode=async()=>{
const res=await API.loginSend({
"mobile":state.phone,
"orgIp":""
})
if(res.success===true){
countdowns()
}
console.log(res,'ress')
}
const loginbtn=async()=>{
const res=await API.logins({
"mobile":state.phone,
"idCard":state.idCardNumber,
"code": state.sendcode
})
console.log(res,'7899')
const { tsToken }=res.result
if(tsToken){
localStorage.setItem('token',tsToken)
router.push('/myLoan')
}
}
// 获取验证码倒计时
const countdowns=()=> {
const TIME_COUNT = 60
if (!state.timer) {
state.count = TIME_COUNT;
state.canSendCode = false;
state.timer = setInterval(() => {
if (state.count > 0 && state.count <= TIME_COUNT) {
state.count--;
} else {
state.canSendCode = true;
clearInterval(state.timer);
state.timer = null;
}
}, 1000)
}
}
onMounted(()=>{
state.titleDes='登录'
})
return {
...toRefs(state),
onClickLeft,
loginSendCode,
IDChange,
phoneChange,
countdowns,
loginbtn,
changecode
}
}
}
</script>
<style lang="less" src="./index.less" scoped></style>
\ No newline at end of file
.loan-page {
width: 100%;
height: calc(100vh-120px);
min-height: 1561px;
background: #F7F7F7;
padding-bottom: 140px;
}
.loan-page .loan-contant {
box-sizing: border-box;
padding-top: 90px;
}
.loan-page .loan-contant .loan-main {
margin: 32px;
background: #FFFFFF;
}
.loan-page .loan-contant .loan-main .main-box {
padding: 20px 32px;
}
.loan-page .loan-contant .loan-main .main-box .box-top {
display: flex;
align-items: center;
justify-content: space-between;
}
.loan-page .loan-contant .loan-main .main-box .box-top .top-l {
display: flex;
align-items: center;
}
.loan-page .loan-contant .loan-main .main-box .box-top .top-l .l-img {
width: 54px;
height: 54px;
background-size: 100%;
}
.loan-page .loan-contant .loan-main .main-box .box-top .top-l span {
padding-left: 10px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
color: #212121;
line-height: 26px;
font-style: normal;
}
.loan-page .loan-contant .loan-main .main-box .box-top .top-r {
display: flex;
align-items: center;
}
.loan-page .loan-contant .loan-main .main-box .box-top .top-r .r-icon {
display: inline-block;
width: 32px;
height: 32px;
background: url('../../assets/img/phone.png') 0 0 no-repeat;
background-size: 100%;
}
.loan-page .loan-contant .loan-main .main-box .box-top .top-r span {
padding-left: 10px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26px;
color: #278FE9;
line-height: 26px;
font-style: normal;
}
.loan-page .loan-contant .loan-main .main-box .box-con {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 10px;
}
.loan-page .loan-contant .loan-main .main-box .box-con .con-l {
font-family: PingFangSC, PingFang SC;
font-weight: 500;
line-height: 50px;
text-align: left;
font-style: normal;
}
.loan-page .loan-contant .loan-main .main-box .box-con .con-l .l-num {
font-size: 28px;
color: #3E97F3;
}
.loan-page .loan-contant .loan-main .main-box .box-con .con-l .l-tex {
font-size: 24px;
color: #212121;
}
.loan-page .loan-contant .loan-main .main-box .box-con .con-r {
margin-left: 18px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
line-height: 32px;
text-align: left;
font-style: normal;
}
.loan-page .loan-contant .loan-main .main-box .box-con .con-r .r-boxs {
display: flex;
font-size: 24px;
}
.loan-page .loan-contant .loan-main .main-box .box-con .con-r .r-boxs .boxs-l {
padding-right: 10px;
}
.loan-page .loan-contant .loan-main .main-box .box-btn {
margin: 10px auto 0;
width: 285px;
height: 64px;
border-radius: 10px;
background: #3E97F3;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 32px;
color: #FFFFFF;
line-height: 64px;
text-align: center;
font-style: normal;
}
.loan-page .popup-btn {
margin: 16px auto 0;
width: 260px;
height: 64px;
border-radius: 8px;
background: #278FE9;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 32px;
color: #FFFFFF;
line-height: 64px;
text-align: center;
font-style: normal;
}
.loan-page{
width: 100%;
height:calc(100vh-120px);
min-height: 1561px;
background: #F7F7F7;
padding-bottom:140px;
.loan-contant{
box-sizing: border-box;
padding-top:90px;
.loan-main{
margin:32px;
background:#FFFFFF ;
.main-box{
padding:20px 32px;
.box-top{
display: flex;
align-items: center;
justify-content:space-between;
.top-l{
display: flex;
align-items: center;
.l-img{
width: 54px;
height: 54px;
background-size: 100%;
}
span{
padding-left: 10px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 28px;
color: #212121;
line-height: 26px;
// text-align: left;
font-style: normal;
}
}
.top-r{
display: flex;
align-items: center;
.r-icon{
display: inline-block;
width: 32px;
height: 32px;
background: url('../../assets/img/phone.png') 0 0 no-repeat;
background-size: 100%;
}
span{
padding-left: 10px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26px;
color: #278FE9;
line-height: 26px;
// text-align: left;
font-style: normal;
}
}
}
.box-con{
display: flex;
align-items: center;
justify-content: space-between;
margin-top:10px;
.con-l{
font-family: PingFangSC, PingFang SC;
font-weight: 500;
line-height: 50px;
text-align: left;
font-style: normal;
.l-num{
font-size: 28px;
color: #3E97F3;
}
.l-tex{
font-size: 24px;
color: #212121;
}
}
.con-r{
margin-left:18px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24px;
line-height: 32px;
text-align: left;
font-style: normal;
.r-loan-num{
}
.r-back-num{
}
.r-boxs{
display:flex;
font-size: 24px;
.boxs-l{
padding-right: 10px;
}
}
}
}
.box-btn{
margin:10px auto 0;
width: 285px;
height: 64px;
border-radius: 10px;
background: #3E97F3;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 32px;
color: #FFFFFF;
line-height: 64px;
text-align: center;
font-style: normal;
}
}
}
}
.popup-btn{
margin: 16px auto 0;
width: 260px;
height:64px;
border-radius: 8px;
background: #278FE9;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 32px;
color: #FFFFFF;
line-height: 64px;
text-align: center;
font-style: normal;
}
}
\ No newline at end of file
<template>
<div class='loan-page'>
<van-nav-bar
:title="titleDes"
left-text=""
fixed
left-arrow
@click-left="onClickLeft"
/>
<div class='loan-contant'>
<div class='loan-main'>
<div class='main-box'>
<div class='box-top'>
<div class='top-l'>
<img class='l-img' src='' />
<span>一时代</span>
</div>
<div class='top-r' @click="goPopup">
<i class='r-icon'></i>
<span>咨询</span>
</div>
</div>
<div class='box-con'>
<div class='con-l'>
<div class='l-num'>5500.00</div>
<div class='l-tex'>待还款金额(元)</div>
</div>
<div class='con-r'>
<div class='r-loan-num'>借款金额:5000.00(元)</div>
<div class='r-back-num'>已还金额:1000.00(元)</div>
<div class='r-boxs'>
<div class='boxs-l'>逾期期数:28期</div>
<div>逾期天数:12360天</div>
</div>
</div>
</div>
<div class='box-btn' @click="goBill">还 款</div>
</div>
</div>
</div>
<van-popup v-model:show="showCenter" round :style="{ padding: '24px' , fontSize:'16px' }" >
<div>咨询申请已提交,</div>
<div>工作人员会在24小时内电话联系你,</div>
<div>请注意接听</div>
<div class="popup-btn" @click='showCancel'>确 定</div>
</van-popup>
</div>
</template>
<script>
import { onMounted, toRefs, reactive } from "vue";
import { useRouter } from 'vue-router';
import API from "../../api/api";
export default {
setup(){
const router=useRouter()
const state=reactive({
titleDes:"",
showCenter:false
})
const onClickLeft = () => history.back()
const goPopup=()=>{
state.showCenter=true
}
const showCancel=()=>{
state.showCenter=false
}
const goBill=()=>{
router.push('/bill')
}
const init=async()=>{
const res=await API.loanDetails({
"idCard": "",
"mobile": ""
})
console.log(res,'reess')
}
onMounted(()=>{
state.titleDes='我的借款'
init()
})
return {
...toRefs(state),
onClickLeft,
goPopup,
showCancel,
goBill,
init
}
}
}
</script>
<style lang="less" src="./index.less" scoped></style>
\ No newline at end of file
const path = require('path')
const autoPreFixer = require('autoprefixer')
const pxToRem = require('postcss-pxtorem')
const resolve = (dir) => {
return path.join(__dirname, dir)
}
const HomePage = process.env.VUE_APP_API_PUBLIC_URL
console.log(HomePage,'HomePage')
module.exports = {
publicPath: HomePage,
runtimeCompiler: true,
filenameHashing: true,
devServer: { hot: true },
css: {
extract: true,
loaderOptions: {
postcss: {
// 这里的选项会传递给 postcss-loader
plugins: [
autoPreFixer(),
pxToRem({
rootValue ({ file }) {
return file.indexOf('vant') !== -1 ? 37.5 : 75
},
propList: ['*']
})
]
}
}
},
configureWebpack () {
return {
resolve: {
alias: {
// eslint-disable-next-line no-undef
'@': resolve('src'),
// eslint-disable-next-line no-undef
'*': resolve('')
}
}
}
},
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = ''
return args
})
},
lintOnSave: false
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment