[盘债计算器]
This commit is contained in:
565
pages/index/clients.vue
Normal file
565
pages/index/clients.vue
Normal file
@@ -0,0 +1,565 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<block v-if="listsArr.length > 0">
|
||||
<image class="indexTop" src="/static/index_top.png" mode="scaleToFill"></image>
|
||||
<view class="indexTips">
|
||||
<view class="indexTips-name">计算历史记录</view>
|
||||
<view class="indexTips-text">根据您填写的内容生成以下结果</view>
|
||||
</view>
|
||||
<view class="indexCont">
|
||||
<view class="indexCont-white" v-for="(item, index) in listsArr" :key="index">
|
||||
<view class="resultTitle">
|
||||
{{item.institution}}
|
||||
</view>
|
||||
<view class="resultList">
|
||||
<view class="item">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
欠款金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
首付金额:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.first_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
分期金额:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.periods_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
分期期数:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.periods}}期
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
手续费费率:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.tax}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
每期还款本金:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.every_total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
每期还款手续费:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.every_tax}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款金额:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款本金:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.principal}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款手续费:
|
||||
</view>
|
||||
<view class="item-label-text" v-if="item.base">
|
||||
{{item.base.tax_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">温馨提示:{{item.description}}</view>
|
||||
<view class="see">
|
||||
<view class="see-go" @click="generalClick(item)">点击查看还款计划表</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pack-center pages-hint" v-else>
|
||||
<image src="https://cdn.shuiganying.com/images/2023/04/04/40b2f4bfe2dfb828688fcd3766d6b541.png"></image>
|
||||
<view class="reportTips">
|
||||
<view class="reportTips-title">暂无数据</view>
|
||||
<view class="reportTips-text">抱歉,暂没有历史记录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 还款计划表弹出 -->
|
||||
<view class="tipsBack" v-if="generalShow" :catchtouchmove="true"></view>
|
||||
<view class="tipsCont" v-if="generalShow" :catchtouchmove="true">
|
||||
<view class="tipsWhite">
|
||||
<view class="tipsTitle">还款计划表(单位:元)</view>
|
||||
<view class="tipsList">
|
||||
<view class="tipsList-tab">
|
||||
<view class="tips-tab-item">期数</view>
|
||||
<view class="tips-tab-item">还款金额</view>
|
||||
<view class="tips-tab-item">本金</view>
|
||||
<view class="tips-tab-item">手续费</view>
|
||||
</view>
|
||||
<view class="tipsList-data">
|
||||
<view class="tipsList-label" v-for="(items, index) in timeArr" :key="index">
|
||||
<view class="tips-label-item">第{{index+1}}期</view>
|
||||
<view class="tips-label-item">{{items.total}}</view>
|
||||
<view class="tips-label-item">{{items.principal}}</view>
|
||||
<view class="tips-label-item">{{items.tax}}</view>
|
||||
</view>
|
||||
<view class="tipsList-label">
|
||||
<view class="tips-label-item">合计</view>
|
||||
<view class="tips-label-item">{{timeAll.total}}</view>
|
||||
<view class="tips-label-item">{{timeAll.principal}}</view>
|
||||
<view class="tips-label-item">{{timeAll.tax}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tipsWhite-btn">
|
||||
<view @click="otherSee" class="tipsWhite-btn-go">
|
||||
其他还款方式
|
||||
</view>
|
||||
</view>
|
||||
<image class="close" @click="generalShow = false" src="/static/close.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 数据缓冲阶段 -->
|
||||
<view class="pack-center pages-hint grey" v-if="paySuccess">
|
||||
<image src="/static/loadingGif.gif"></image>
|
||||
<view>加载中...</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Lists } from '@/apis/interfaces/index'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listsArr : [], // 结果列表
|
||||
timeArr : [], // 还款计划表列表
|
||||
timeAll : '', // 还款计划表总计
|
||||
otherArr : '', // 其他携带数据
|
||||
userId : '',
|
||||
generalShow: false,
|
||||
paySuccess : true,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userId = options.user_id
|
||||
},
|
||||
onShow() {
|
||||
// 获取历史结果
|
||||
this.listsInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 历史结果
|
||||
listsInfo() {
|
||||
Lists({
|
||||
user_id: this.userId
|
||||
}).then(res => {
|
||||
this.paySuccess = false
|
||||
this.listsArr = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 查看还款计划表
|
||||
generalClick(arr){
|
||||
this.otherArr = arr
|
||||
this.timeArr = arr.project
|
||||
this.timeAll = arr.project_total
|
||||
this.generalShow = !this.generalShow
|
||||
},
|
||||
|
||||
// 其他方式
|
||||
otherSee() {
|
||||
let newData = JSON.stringify(this.otherArr);
|
||||
uni.navigateTo({
|
||||
url: `/pages/result/other?data=${encodeURIComponent(newData)}`
|
||||
})
|
||||
|
||||
this.generalShow = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.indexTop {
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
}
|
||||
|
||||
.indexTips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 60rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.indexTips-name {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.indexTips-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.indexCont {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-top: 200rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.indexCont-white {
|
||||
height: 100%;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.resultTitle {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #0c58d2;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
line-height: 48rpx;
|
||||
padding: 15rpx 0;
|
||||
display: flex;
|
||||
margin-right: 20rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.item-label-name {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.textShadow {
|
||||
filter: blur(6px);
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-weight: 400;
|
||||
background-color: #f7faff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: justify;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.see {
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.see-go {
|
||||
display: inline-block;
|
||||
border: 2rpx solid #0c58d2;
|
||||
color: #0c58d2;
|
||||
line-height: 74rpx;
|
||||
padding: 0 25rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.indexLock {
|
||||
width: 34rpx;
|
||||
vertical-align: -4rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 计划表弹出 */
|
||||
.tipsBack {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
}
|
||||
.tipsCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tipsWhite {
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
bottom: -120rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.tipsTitle {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.tipsList {
|
||||
margin: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tipsList-tab {
|
||||
display: flex;
|
||||
background: #e5edf8;
|
||||
line-height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.tips-tab-item, .tips-label-item {
|
||||
flex: 4;
|
||||
text-align: center;
|
||||
}
|
||||
.tipsList-data {
|
||||
background: #fafafa;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
max-height: 30vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.tipsList-label {
|
||||
display: flex;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 2rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.tipsList-label:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tipsWhite-btn {
|
||||
text-align: center;
|
||||
padding: 30rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.tipsWhite-btn-go {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
line-height: 88rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #0c58d2;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.postertBack {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.postertCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.postertContTop {
|
||||
top: -200rpx;
|
||||
}
|
||||
|
||||
.poster-back {
|
||||
position: relative;
|
||||
padding-top: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-img, .poster-Cont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.poster-Cont {
|
||||
padding: 50rpx;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.poster-Cont-code {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-Cont-code image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-Cont-url {
|
||||
display: flex;
|
||||
padding: 30rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.poster-url-number {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-url-copy {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-btn {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.poster-Cont-down {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 90rpx;
|
||||
color: #051437;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-down-img {
|
||||
width: 40rpx;
|
||||
margin-left: 15rpx;
|
||||
vertical-align: -8rpx;
|
||||
animation: bounce-down 2s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes bounce-down {
|
||||
25% {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
50%,
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
|
||||
.sign-img-btn {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
top: calc(100% + 240rpx);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.poster-img-btn {
|
||||
width: 70rpx;
|
||||
display: block;
|
||||
margin: 30rpx auto 0;
|
||||
}
|
||||
|
||||
/* 暂无数据 */
|
||||
.reportTips-title {
|
||||
color: #000;
|
||||
font-size: 34rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.reportTips-text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.reportTips-btn {
|
||||
background-color: #3b7cff;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
line-height: 78rpx;
|
||||
padding: 0 60rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.pack-center {
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.grey {
|
||||
background-color: #f9f9f9;
|
||||
z-index: 9999999;
|
||||
}
|
||||
</style>
|
||||
114
pages/index/custom.vue
Normal file
114
pages/index/custom.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view v-if="listsArr.length > 0">
|
||||
<navigator hover-class="none" :url="'/pages/index/clients?user_id=' + item.user_id" class="list" v-for="(item, index) in listsArr" :key="index">
|
||||
<image class="list-cover" :src="item.avatar ? item.avatar : '/static/user_default.png'" mode="aspectFill"></image>
|
||||
<view class="list-cont">
|
||||
<view class="list-name">{{item.nickname}}</view>
|
||||
<view class="list-phone">{{item.username}}</view>
|
||||
</view>
|
||||
<view class="list-btn">计算结果></view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="pack-center pages-hint" v-else>
|
||||
<image src="https://cdn.shuiganying.com/images/2023/04/04/40b2f4bfe2dfb828688fcd3766d6b541.png"></image>
|
||||
<view class="reportTips">
|
||||
<view class="reportTips-title">暂无数据</view>
|
||||
<view class="reportTips-text">抱歉,暂没有历史记录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Clients } from '@/apis/interfaces/index'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listsArr : [] // 结果列表
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.listsInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
listsInfo() {
|
||||
Clients().then(res => {
|
||||
this.listsArr = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.list {
|
||||
position: relative;
|
||||
padding: 24rpx 30rpx 24rpx 140rpx;
|
||||
min-height: 80rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.list-cover {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 24rpx;
|
||||
left: 24rpx;
|
||||
background: #808080;
|
||||
}
|
||||
|
||||
.list-cont {
|
||||
width: calc(100% - 180rpx);
|
||||
}
|
||||
|
||||
.list-name {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.list-phone {
|
||||
height: 30rpx;
|
||||
line-height:30rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.list::before {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 1rpx;
|
||||
background: #FAFAFA;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.list:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list-btn {
|
||||
display: inline-block;
|
||||
background-color: #0352c8;
|
||||
color: #ffffff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 64rpx;
|
||||
padding: 0 20rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 30rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
931
pages/index/index.vue
Normal file
931
pages/index/index.vue
Normal file
@@ -0,0 +1,931 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="indexTop" src="/static/index_top.png" mode="scaleToFill"></image>
|
||||
<view class="indexTips">
|
||||
<view class="indexTips-name">欢迎使用盘债计算器</view>
|
||||
<view class="indexTips-text">请填写以下内容 <image class="indexTips-warm" @click="warmClick" src="/static/warm.png" mode="widthFix"></image></view>
|
||||
</view>
|
||||
<view class="indexCont">
|
||||
<view class="indexCont-white">
|
||||
<view class="indexUser" v-if="userLogin">
|
||||
<block v-if="inviteUser.user_id != ''">
|
||||
<view class="indexUser-left">
|
||||
<view class="indexUser-head"><image :src="inviteUser.avatar ? inviteUser.avatar : '/static/user_default.png' " mode="aspectFill"></image></view>
|
||||
<view class="indexUser-text">
|
||||
<view class="indexUser-name">
|
||||
{{inviteUser.realname ? inviteUser.realname : '--'}} <text class="indexUser-number">{{inviteUser.username ? inviteUser.username : '--'}}</text>
|
||||
</view>
|
||||
<view class="indexUser-tips">
|
||||
详细业务咨询请联系我
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="indexUser-tel" @click="callPhone" src="/static/tel.png" mode="aspectFill"></image>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="indexUser-left">
|
||||
<view class="indexUser-head"><image :src="serviceData.avatar" mode="aspectFill"></image></view>
|
||||
<view class="indexUser-text">
|
||||
<view class="indexUser-name">
|
||||
{{serviceData.realname}} <text class="indexUser-number">{{serviceData.username}}</text>
|
||||
</view>
|
||||
<view class="indexUser-tips">
|
||||
详细业务咨询请联系客服
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="indexUser-tel" @click="callPhone" src="/static/tel.png" mode="aspectFill"></image>
|
||||
</block>
|
||||
</view>
|
||||
<view class="list">
|
||||
<block v-for="(item, index) in serviceArr" :key="index">
|
||||
<view class="listName">
|
||||
机构{{index + 1}}
|
||||
<view class="list-remove" @click="onRemove(index)" v-if="index > 0">
|
||||
<image src="/static/removeIcon.png" mode="widthFix"></image>删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="listItem">
|
||||
<view class="listItem-name">
|
||||
{{item.titleName}}
|
||||
</view>
|
||||
<view class="listItem-picker">
|
||||
<block v-if="objectArray != ''">
|
||||
<picker :disabled="!canSettle" :range="objectArray" :value="item.pickerIndex" :range-key="'title'" class="listItem-picker-add" @change="($event) => item.pickerIndex = $event.detail.value">
|
||||
<view class="uni-input" v-if="objectArray[item.pickerIndex]">{{objectArray[item.pickerIndex].title}}</view>
|
||||
</picker>
|
||||
</block>
|
||||
<view class="listItem-picker-add" v-else>请先登录</view>
|
||||
<image src="/static/basic_down.png" class="listItem-picker-img" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listItem">
|
||||
<view class="listItem-name">
|
||||
{{item.priceName}}
|
||||
</view>
|
||||
<view class="listItem-picker">
|
||||
<input v-if="userLogin" type="number" :disabled="!canSettle" placeholder="请输入欠款金额" placeholder-class="placeholderClass" @input="($event) => item.priceValue = $event.detail.value" />
|
||||
<view class="listItem-picker-add" v-else>请先登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="listAdd">
|
||||
<view class="listAdd-btn" @click="addPush">
|
||||
<image src="/static/add.png" mode="widthFix"></image>添加新机构
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listSubmit">
|
||||
<view class="listSubmit-btn" :class="{active: !canSettle}" @click="onSubmit" v-if="userLogin">
|
||||
{{canRemark}}<block v-if="canSettle"><block v-if="numberCount.have_count > 0 && numberCount.have_count <= 5">(剩余次数{{numberCount.have_count}})</block></block>
|
||||
</view>
|
||||
<view class="listSubmit-btn" @click="onLogin" v-else>
|
||||
请先登录
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 漂浮窗 -->
|
||||
<view class="showy" v-if="userLogin">
|
||||
<navigator hover-class="none" url="/pages/index/custom" class="showy-item" v-if="isSalesman">
|
||||
<image class="showy-item-img" src="/static/record.png" mode="widthFix"></image>
|
||||
<view class="showy-item-name"><text>客户</text><text>管理</text></view>
|
||||
</navigator>
|
||||
<view class="showy-item" @click="isImgLay = true">
|
||||
<image class="showy-item-img" src="/static/share.png" mode="widthFix"></image>
|
||||
<view class="showy-item-name">分享</view>
|
||||
<view class="showy-item-number" v-if="numberCount.share_balance > 0">+{{numberCount.share_add}}次</view>
|
||||
</view>
|
||||
<view class="showy-item">
|
||||
<image class="showy-item-img" src="/static/record.png" mode="widthFix"></image>
|
||||
<view class="showy-item-name" @click="historyClick"><text>历史</text><text>记录</text></view>
|
||||
<view class="showy-item-number" v-if="numberCount.use_count > 0">{{numberCount.use_count}}条</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 邀请好友弹出 -->
|
||||
<view class="postertBack" v-if="isImgLay"></view>
|
||||
<view class="postertCont postertContTop" v-if="isImgLay">
|
||||
<view class="poster-back">
|
||||
<image class="poster-img" src="/static/share_back.png" mode="widthFix"></image>
|
||||
<view class="poster-Cont">
|
||||
<view class="poster-Cont-code">
|
||||
<image :src="canShare.qrcode" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="poster-Cont-url">
|
||||
<view class="nowrap poster-url-number" @click="copyUrl(canShare.url)">地址:{{canShare.url}}/</view>
|
||||
<view class="poster-url-copy">复制</view>
|
||||
</view>
|
||||
<view class="poster-Cont-btn">
|
||||
<view class="poster-Cont-down" @click="shareClick">保存图片,分享好友<image class="poster-Cont-down-img" src="/static/hand.png" mode="widthFix"></image></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="sign-img-btn" src="/static/close.png" @click="isImgLay = false" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 长按保存 -->
|
||||
<view class="postertBack" v-if="isImgLong"></view>
|
||||
<view class="postertCont" v-if="isImgLong">
|
||||
<view class="poster-back">
|
||||
<image v-if="isImgLong" class="poster-img" :src="posterImg" mode="widthFix"></image>
|
||||
<view class="poster-Cont-btn" style="margin-top: 40rpx; text-align: center;">
|
||||
<view class="poster-Cont-down">请长按图片,保存本地</view>
|
||||
<image class="poster-img-btn" src="/static/close.png" @click="isImgLong = false" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 海报canvas -->
|
||||
<vue-canvas-poster :widthPixels="1000" :painting="paintings" @success="saveSuccess" @fail="saveFail"></vue-canvas-poster>
|
||||
|
||||
<!-- 提交缓冲阶段 -->
|
||||
<view class="pack-center pages-hint grey" v-if="paySuccess">
|
||||
<image src="/static/loadingGif.gif"></image>
|
||||
<view>计算结果中...</view>
|
||||
</view>
|
||||
|
||||
<!-- 是否确定提交计算 -->
|
||||
<view class="tipsBack" v-if="generalShow"></view>
|
||||
<view class="tipsCont" v-if="generalShow">
|
||||
<view class="tipsWhite">
|
||||
<image class="tipsCont-img" src="/static/tips.png" mode="widthFix"></image>
|
||||
<view class="tipsWhite-top">
|
||||
<view class="tipsWhite-name">
|
||||
计算提示
|
||||
</view>
|
||||
<view class="tipsWhite-text">
|
||||
请确认提交的数据是否准确?确定后进行提交
|
||||
</view>
|
||||
</view>
|
||||
<view class="tipsWhite-btn">
|
||||
<view class="tipsWhite-btn-go" @click="generalShow = false">
|
||||
暂不提交
|
||||
</view>
|
||||
<view class="tipsWhite-btn-go" @click="judgeGeneral">
|
||||
立即提交
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { VueCanvasPoster } from 'vue-canvas-poster'
|
||||
import { authFollow, wechatCode } from '@/apis/interfaces/authUrl'
|
||||
import { Init, Debt } from '@/apis/interfaces/index'
|
||||
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy.js'
|
||||
export default {
|
||||
components: {
|
||||
VueCanvasPoster
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userLogin : false, // 是否登录
|
||||
canRemark : '', // 按钮文字
|
||||
canSettle : false, // 是否计算
|
||||
canShare : '', // 分享数据
|
||||
serviceData: '', // 客服信息
|
||||
inviteUser : '', // 用户信息
|
||||
serviceArr : [],
|
||||
blurValue : '',
|
||||
numberCount: '', // 计算次数
|
||||
haveCount : '', // 用户计算
|
||||
objectArray: [], // 机构列表
|
||||
isSalesman : '', // 客户管理
|
||||
paySuccess : false, // 计算结果
|
||||
generalShow: false, // 是否提交
|
||||
|
||||
// 海报
|
||||
isImgLay : false, // 是否显示图片弹出层
|
||||
isImgLong : false,// 长按保存图片
|
||||
paintings : {
|
||||
width: "375px",
|
||||
height: "375px",
|
||||
borderRadius: "10px",
|
||||
background: "#ffffff",
|
||||
views: [
|
||||
//海报背景
|
||||
{
|
||||
type: "image",
|
||||
url: "/static/share_downback.png",
|
||||
css: {
|
||||
top: "0",
|
||||
left: "0",
|
||||
width: "375px",
|
||||
height: "375px",
|
||||
mode: 'aspectFill'
|
||||
},
|
||||
},
|
||||
|
||||
//二维码
|
||||
{
|
||||
type: "image",
|
||||
url: "",
|
||||
css: {
|
||||
top: "60px",
|
||||
left: "60px",
|
||||
width: "255px",
|
||||
height: "255px",
|
||||
mode: 'aspectFill'
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
posterImg : "", //生成的海报图片路径
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
// 邀请码数据
|
||||
if(options != '') {
|
||||
this.$store.commit('setInvite', options.invite)
|
||||
this.$store.commit('setShareUser', options.share_user)
|
||||
this.$store.commit('setLockId', options.lock_id)
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if(this.$store.getters.getToken) {
|
||||
this.userLogin = true
|
||||
|
||||
// 获取计算前置接口
|
||||
this.preUrl()
|
||||
return
|
||||
}
|
||||
this.userLogin = false
|
||||
},
|
||||
|
||||
created() {
|
||||
// 新增卡片
|
||||
this.serviceArr.push({
|
||||
titleName : '机构名称',
|
||||
priceName : '欠款金额',
|
||||
pickerIndex: 0,
|
||||
priceValue : '',
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 计算前置接口
|
||||
preUrl() {
|
||||
Init().then(res => {
|
||||
this.serviceData = res.service
|
||||
this.isSalesman = res.is_salesman
|
||||
this.inviteUser = res.invite_user
|
||||
this.canShare = res.share
|
||||
this.canSettle = res.can_settle
|
||||
this.canRemark = res.can_remark
|
||||
this.numberCount = res.count
|
||||
this.haveCount = res.count.have_count - 1
|
||||
this.objectArray = res.institution
|
||||
this.paintings.views[1].url = res.share.qrcode
|
||||
}).catch(err => {
|
||||
this.userLogin = false
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 新增表单数据
|
||||
addPush(){
|
||||
if(this.$store.getters.getToken) {
|
||||
// 是否可以计算
|
||||
if(this.canSettle) {
|
||||
if(this.haveCount != 0) {
|
||||
this.serviceArr.push({
|
||||
titleName : '机构名称',
|
||||
priceName : '欠款金额',
|
||||
pickerIndex: 0,
|
||||
priceValue : '',
|
||||
})
|
||||
this.haveCount --
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '抱歉,没有次数啦',
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
uni.showToast({
|
||||
title: this.canRemark,
|
||||
icon: "none"
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showToast({
|
||||
title: '请先登录',
|
||||
icon: "none"
|
||||
})
|
||||
},
|
||||
|
||||
// 移出选项
|
||||
onRemove(index){
|
||||
this.serviceArr.splice(index, 1)
|
||||
this.haveCount ++
|
||||
},
|
||||
|
||||
// 提交订单数据-确认
|
||||
onSubmit(){
|
||||
// 已完善信息
|
||||
if(this.$store.getters.getPassInfo != 'false') {
|
||||
if(this.canSettle) {
|
||||
this.generalShow = true
|
||||
return
|
||||
}
|
||||
uni.showToast({
|
||||
title: this.canRemark,
|
||||
icon: "none"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 完善个人信息
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/perfect'
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 提交订单数据
|
||||
judgeGeneral() {
|
||||
this.generalShow = false
|
||||
|
||||
let SubmitAdd = this.serviceArr.map(obj => {
|
||||
return {
|
||||
institution_id : this.objectArray[obj.pickerIndex].id,
|
||||
total : obj.priceValue,
|
||||
}
|
||||
})
|
||||
Debt({
|
||||
invite : this.$store.getters.getInvite,
|
||||
lock_id : this.$store.getters.getLockId,
|
||||
data : SubmitAdd
|
||||
}).then(res => {
|
||||
this.paySuccess = true
|
||||
|
||||
this.serviceArr.splice(0,this.serviceArr.length);//清空数组
|
||||
this.serviceArr.push({
|
||||
titleName : '机构名称',
|
||||
priceName : '欠款金额',
|
||||
pickerIndex: 0,
|
||||
priceValue : '',
|
||||
})
|
||||
|
||||
|
||||
// 跳转结果页面
|
||||
setTimeout(()=>{
|
||||
this.paySuccess = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/result/result'
|
||||
})
|
||||
},3000)
|
||||
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 微信授权登录
|
||||
onLogin() {
|
||||
authFollow({
|
||||
url: 'http://debtwww.douhuofalv.com/pages/webview/webview',
|
||||
scopes: ''
|
||||
}).then(res => {
|
||||
window.location.href = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 查看历史记录
|
||||
historyClick() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/result/history'
|
||||
})
|
||||
},
|
||||
|
||||
// 拨打电话
|
||||
callPhone(e) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.inviteUser.username
|
||||
})
|
||||
},
|
||||
|
||||
// 查看温馨提示
|
||||
warmClick() {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '新用户可免费计算2个机构,每邀请1名用户完成计算可增加1个机构计算份额。用户计算机构份额上限为5个。',
|
||||
showCancel: false,
|
||||
success: res=> {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 复制订单号
|
||||
copyUrl(val) {
|
||||
const result = h5Copy(val)
|
||||
if (result === false) {
|
||||
uni.showToast({
|
||||
title:'不支持',
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showToast({
|
||||
title:'复制成功',
|
||||
icon:'none'
|
||||
})
|
||||
},
|
||||
|
||||
// 下载海报
|
||||
shareClick (){
|
||||
this.isImgLay = false
|
||||
this.isImgLong = true
|
||||
|
||||
},
|
||||
saveSuccess(src) {
|
||||
this.posterImg = src;
|
||||
},
|
||||
saveFail(err) {},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.indexTop {
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
}
|
||||
|
||||
.indexTips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 60rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.indexTips-name {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.indexTips-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.indexTips-warm {
|
||||
width: 34rpx;
|
||||
margin-left: 15rpx;
|
||||
margin-top: 2rpx;
|
||||
|
||||
}
|
||||
.indexCont {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-top: 200rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-bottom: 140rpx solid transparent;
|
||||
}
|
||||
|
||||
.indexCont-white {
|
||||
height: 100%;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.indexUser {
|
||||
display: flex;
|
||||
border-bottom: 4rpx solid #f7faff;
|
||||
padding: 40rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexUser-left {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.indexUser-head {
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 100%;
|
||||
background-color: #e5ecf6;
|
||||
border: 6rpx solid #e5ecf6;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexUser-head image {
|
||||
border-radius: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.indexUser-text {
|
||||
width: calc(100% - 150rpx);
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexUser-name {
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
font-size: 34rpx;
|
||||
line-height: 58rpx;
|
||||
}
|
||||
|
||||
.indexUser-tips {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.indexUser-number {
|
||||
font-size: 30rpx;
|
||||
font-weight: normal;
|
||||
padding-left: 20rpx;
|
||||
box-sizing: border-box;
|
||||
line-height: 62rpx;
|
||||
color: #666666;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.indexUser-tel {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.listName {
|
||||
color: #0c58d2;
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
margin: 30rpx 0 ;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.list-remove {
|
||||
background-color: #FBE7EE;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
padding: 0 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: normal;
|
||||
line-height: 44rpx;
|
||||
color: #d4155a;
|
||||
border-radius: 50rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.list-remove image {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: -2rpx;
|
||||
}
|
||||
|
||||
.listItem-name {
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.listItem-picker {
|
||||
background-color: #f7faff;
|
||||
border-radius: 15rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.listItem-picker input {
|
||||
display: block;
|
||||
height: 100%;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.listItem-picker-img {
|
||||
width: 30rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 30rpx;
|
||||
}
|
||||
|
||||
.listAdd {
|
||||
text-align: center;
|
||||
color: #0c58d2;
|
||||
padding: 40rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.listAdd-btn image {
|
||||
width: 30rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.listSubmit {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #f7faff;
|
||||
text-align: center;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.listSubmit-btn {
|
||||
width: 90%;
|
||||
display: inline-block;
|
||||
background-color: #0352c8;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
border-radius: 100rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.listSubmit-btn.active {
|
||||
background-color: #dcdcdc;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 漂浮窗 */
|
||||
.showy {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 15%;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 20rpx rgba(3, 96, 217, .1);
|
||||
z-index: 999;
|
||||
border-radius: 60rpx 0 0 60rpx;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.showy-item {
|
||||
text-align: center;
|
||||
padding: 20rpx 30rpx 10rpx 35rpx;
|
||||
font-size: 26rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.showy-item-number {
|
||||
position: absolute;
|
||||
right: 5rpx;
|
||||
top: 0;
|
||||
background-color: #ff7171;
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
border-radius: 80rpx;
|
||||
padding: 0 10rpx;
|
||||
transform: scale(0.83);
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.showy-item-img {
|
||||
width: 44rpx;
|
||||
}
|
||||
|
||||
.showy-item-name text {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.postertBack {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.postertCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.postertContTop {
|
||||
top: -200rpx;
|
||||
}
|
||||
|
||||
.poster-back {
|
||||
position: relative;
|
||||
padding-top: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-img, .poster-Cont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.poster-Cont {
|
||||
padding: 50rpx;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.poster-Cont-code {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-Cont-code image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-Cont-url {
|
||||
display: flex;
|
||||
padding: 30rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.poster-url-number {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-url-copy {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-btn {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.poster-Cont-down {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 90rpx;
|
||||
color: #051437;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-down-img {
|
||||
width: 40rpx;
|
||||
margin-left: 15rpx;
|
||||
vertical-align: -8rpx;
|
||||
animation: bounce-down 2s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes bounce-down {
|
||||
25% {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
50%,
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
|
||||
.sign-img-btn {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
top: calc(100% + 240rpx);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.poster-img-btn {
|
||||
width: 70rpx;
|
||||
display: block;
|
||||
margin: 30rpx auto 0;
|
||||
}
|
||||
|
||||
|
||||
.grey {
|
||||
background-color: #f9f9f9;
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
/* 是否确认提交 */
|
||||
.tipsBack {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
background-color: rgba(0, 0, 0, .8);
|
||||
}
|
||||
.tipsCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 10000;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tipsWhite {
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tipsWhite-top {
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tipsCont-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tipsWhite-name {
|
||||
text-align: center;
|
||||
color: #111111;
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.tipsWhite-text {
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
line-height: 48rpx;
|
||||
padding: 0 50rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tipsWhite-btn {
|
||||
display: flex;
|
||||
padding: 30rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tipsWhite-btn-go {
|
||||
flex: 2;
|
||||
color: #fff;
|
||||
margin: 0 15rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border: 2rpx solid #F6F6F6;
|
||||
background-color: #007df5;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.tipsWhite-btn-go:first-child {
|
||||
color: #333333;
|
||||
background-color: #ffffff;
|
||||
border: 2rpx solid #cccccc;
|
||||
}
|
||||
</style>
|
||||
180
pages/index/perfect.vue
Normal file
180
pages/index/perfect.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="indexTop" src="/static/index_top.png" mode="scaleToFill"></image>
|
||||
<view class="indexTips">
|
||||
<view class="indexTips-name">完善个人信息</view>
|
||||
<view class="indexTips-text">请您填写的以下内容</view>
|
||||
</view>
|
||||
<view class="indexCont">
|
||||
<view class="indexCont-white">
|
||||
<view class="item">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
姓名:
|
||||
</view>
|
||||
<input class="item-label-text" type="text" v-model="name" placeholder="输入您的姓名" maxlength="4" />
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
手机号:
|
||||
</view>
|
||||
<input class="item-label-text" type="text" v-model="tel" placeholder="输入您的手机号" maxlength="11" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="return" @click="submitTo" v-if="enjoin">提交信息</view>
|
||||
<view class="return active" v-else>提交信息...</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Info } from '@/apis/interfaces/index'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name : '',
|
||||
tel : '',
|
||||
enjoin: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
submitTo() {
|
||||
Info({
|
||||
mobileNo: this.tel,
|
||||
nickname: this.name
|
||||
}).then(res => {
|
||||
this.enjoin = false
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: "none"
|
||||
})
|
||||
this.$store.commit('setPassInfo', true)
|
||||
|
||||
// 跳转首页
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},3000)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.indexTop {
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
}
|
||||
|
||||
.indexTips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 60rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.indexTips-name {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.indexTips-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.indexCont {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-top: 240rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.indexCont-white {
|
||||
height: 100%;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 50rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
.indexCont-white::after,
|
||||
.indexCont-white::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: rgba(255, 255, 255, .4);
|
||||
left: 20rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.indexCont-white::after {
|
||||
z-index: 2;
|
||||
width: calc(100% - 40rpx);
|
||||
left: 20rpx;
|
||||
top: -25rpx;
|
||||
height: 25px;
|
||||
}
|
||||
.indexCont-white::before {
|
||||
z-index: 1;
|
||||
width: calc(100% - 80rpx);
|
||||
left: 40rpx;
|
||||
top: -50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.item-label:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.item-label-name {
|
||||
font-weight: 600;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.item-label-text {
|
||||
background-color: #f7faff;
|
||||
border-radius: 15rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.return {
|
||||
margin-top: 90rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
color: #0c58d2;
|
||||
border: 2rpx solid #0c58d2;
|
||||
}
|
||||
|
||||
.return.active {
|
||||
border-color: #999;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
</style>
|
||||
708
pages/result/history.vue
Normal file
708
pages/result/history.vue
Normal file
@@ -0,0 +1,708 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<block v-if="listsArr.length > 0">
|
||||
<image class="indexTop" src="/static/index_top.png" mode="scaleToFill"></image>
|
||||
<view class="indexTips">
|
||||
<view class="indexTips-name">计算历史记录</view>
|
||||
<view class="indexTips-text">根据您填写的内容生成以下结果</view>
|
||||
</view>
|
||||
<view class="indexCont">
|
||||
<view class="indexCont-white" v-for="(item, index) in listsArr" :key="index">
|
||||
<view class="resultTitle">
|
||||
{{item.institution}}
|
||||
</view>
|
||||
<view class="resultDel" v-if="isSalesman" @click="resultClick(index, item.log_id)">删除记录</view>
|
||||
<view class="resultList">
|
||||
<view class="item">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
欠款金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view :class="{textShadow: item.status != '1'}">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
首付金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.first_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
分期金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.periods_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
分期期数:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.periods}}期
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
手续费费率:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.tax}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
每期还款本金:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.every_total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
每期还款手续费:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.every_tax}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款本金:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.principal}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款手续费:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.tax_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">温馨提示:{{item.description}}</view>
|
||||
<view class="see">
|
||||
<view class="see-go" @click="generalClick(item)" v-if="item.status == '1'">点击查看还款计划表</view>
|
||||
<view class="see-go" @click="unlockClick(item.share)" v-else><image class="indexLock" src="/static/lock.png" mode="widthFix"></image>分享二维码,解锁次数</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pack-center pages-hint" v-else>
|
||||
<image src="https://cdn.shuiganying.com/images/2023/04/04/40b2f4bfe2dfb828688fcd3766d6b541.png"></image>
|
||||
<view class="reportTips">
|
||||
<view class="reportTips-title">暂无数据</view>
|
||||
<view class="reportTips-text">抱歉,暂没有历史记录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 还款计划表弹出 -->
|
||||
<view class="tipsBack" v-if="generalShow" :catchtouchmove="true"></view>
|
||||
<view class="tipsCont" v-if="generalShow" :catchtouchmove="true">
|
||||
<view class="tipsWhite">
|
||||
<view class="tipsTitle">还款计划表(单位:元)</view>
|
||||
<view class="tipsList">
|
||||
<view class="tipsList-tab">
|
||||
<view class="tips-tab-item">期数</view>
|
||||
<view class="tips-tab-item">还款金额</view>
|
||||
<view class="tips-tab-item">本金</view>
|
||||
<view class="tips-tab-item">手续费</view>
|
||||
</view>
|
||||
<view class="tipsList-data">
|
||||
<view class="tipsList-label" v-for="(items, index) in timeArr" :key="index">
|
||||
<view class="tips-label-item">第{{index+1}}期</view>
|
||||
<view class="tips-label-item">{{items.total}}</view>
|
||||
<view class="tips-label-item">{{items.principal}}</view>
|
||||
<view class="tips-label-item">{{items.tax}}</view>
|
||||
</view>
|
||||
<view class="tipsList-label">
|
||||
<view class="tips-label-item">合计</view>
|
||||
<view class="tips-label-item">{{timeAll.total}}</view>
|
||||
<view class="tips-label-item">{{timeAll.principal}}</view>
|
||||
<view class="tips-label-item">{{timeAll.tax}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tipsWhite-btn">
|
||||
<view @click="otherSee" class="tipsWhite-btn-go">
|
||||
其他还款方式
|
||||
</view>
|
||||
</view>
|
||||
<image class="close" @click="generalShow = false" src="/static/close.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 邀请好友弹出 -->
|
||||
<view class="postertBack" v-if="isImgLay"></view>
|
||||
<view class="postertCont postertContTop" v-if="isImgLay">
|
||||
<view class="poster-back">
|
||||
<image class="poster-img" src="/static/share_back.png" mode="widthFix"></image>
|
||||
<view class="poster-Cont">
|
||||
<view class="poster-Cont-code">
|
||||
<image :src="canShare.qrcode" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="poster-Cont-url">
|
||||
<view class="nowrap poster-url-number" @click="copyUrl(canShare.url)">地址:{{canShare.url}}/</view>
|
||||
<view class="poster-url-copy">复制</view>
|
||||
</view>
|
||||
<view class="poster-Cont-btn">
|
||||
<view class="poster-Cont-down" @click="shareClick">保存图片,分享好友<image class="poster-Cont-down-img" src="/static/hand.png" mode="widthFix"></image></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="sign-img-btn" src="/static/close.png" @click="isImgLay = false" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 长按保存 -->
|
||||
<view class="postertBack" v-if="isImgLong"></view>
|
||||
<view class="postertCont" v-if="isImgLong">
|
||||
<view class="poster-back">
|
||||
<image v-if="isImgLong" class="poster-img" :src="posterImg" mode="widthFix"></image>
|
||||
<view class="poster-Cont-btn" style="margin-top: 40rpx; text-align: center;">
|
||||
<view class="poster-Cont-down">请长按图片,保存本地</view>
|
||||
<image class="poster-img-btn" src="/static/close.png" @click="isImgLong = false" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 海报canvas -->
|
||||
<vue-canvas-poster :widthPixels="1000" :painting="paintings" @success="saveSuccess" @fail="saveFail"></vue-canvas-poster>
|
||||
|
||||
<!-- 数据缓冲阶段 -->
|
||||
<view class="pack-center pages-hint grey" v-if="paySuccess">
|
||||
<image src="/static/loadingGif.gif"></image>
|
||||
<view>加载中...</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Init, Lists, logDel } from '@/apis/interfaces/index'
|
||||
import { VueCanvasPoster } from 'vue-canvas-poster'
|
||||
export default {
|
||||
components: {
|
||||
VueCanvasPoster
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listsArr : [], // 结果列表
|
||||
timeArr : [], // 还款计划表列表
|
||||
timeAll : '', // 还款计划表总计
|
||||
otherArr : '', // 其他携带数据
|
||||
isSalesman : '', // 客户管理
|
||||
generalShow: false,
|
||||
paySuccess : true,
|
||||
|
||||
// 海报
|
||||
canShare : '', // 分享图片
|
||||
isImgLay : false, // 是否显示图片弹出层
|
||||
isImgLong : false,// 长按保存图片
|
||||
paintings : {
|
||||
width: "375px",
|
||||
height: "375px",
|
||||
borderRadius: "10px",
|
||||
background: "#ffffff",
|
||||
views: [
|
||||
//海报背景
|
||||
{
|
||||
type: "image",
|
||||
url: "/static/share_downback.png",
|
||||
css: {
|
||||
top: "0",
|
||||
left: "0",
|
||||
width: "375px",
|
||||
height: "375px",
|
||||
mode: 'aspectFill'
|
||||
},
|
||||
},
|
||||
|
||||
//二维码
|
||||
{
|
||||
type: "image",
|
||||
url: "",
|
||||
css: {
|
||||
top: "60px",
|
||||
left: "60px",
|
||||
width: "255px",
|
||||
height: "255px",
|
||||
mode: 'aspectFill'
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
posterImg: "", //生成的海报图片路径
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
Init().then(res => {
|
||||
this.isSalesman = res.is_salesman
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
|
||||
// 获取历史结果
|
||||
this.listsInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 历史结果
|
||||
listsInfo() {
|
||||
Lists().then(res => {
|
||||
this.paySuccess = false
|
||||
this.listsArr = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 删除结果
|
||||
resultClick(index, id) {
|
||||
uni.showModal({
|
||||
title: '删除确认',
|
||||
content: '是否删除此计算记录',
|
||||
success: res=> {
|
||||
if (res.confirm) {
|
||||
logDel(id).then(res => {
|
||||
this.listsArr.splice(index, 1)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 查看还款计划表
|
||||
generalClick(arr){
|
||||
this.otherArr = arr
|
||||
this.timeArr = arr.project
|
||||
this.timeAll = arr.project_total
|
||||
this.generalShow = !this.generalShow
|
||||
},
|
||||
|
||||
// 其他方式
|
||||
otherSee() {
|
||||
let newData = JSON.stringify(this.otherArr);
|
||||
uni.navigateTo({
|
||||
url: `/pages/result/other?data=${encodeURIComponent(newData)}`
|
||||
})
|
||||
|
||||
this.generalShow = false
|
||||
},
|
||||
|
||||
// 显示海报
|
||||
unlockClick(share) {
|
||||
this.paintings.views[1].url = share.qrcode
|
||||
this.isImgLay = true
|
||||
this.canShare = share
|
||||
},
|
||||
|
||||
// 下载海报
|
||||
shareClick (){
|
||||
this.isImgLay = false
|
||||
this.isImgLong = true
|
||||
|
||||
},
|
||||
|
||||
saveSuccess(src) {
|
||||
this.posterImg = src;
|
||||
},
|
||||
saveFail(err) {},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.indexTop {
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
}
|
||||
|
||||
.indexTips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 60rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.indexTips-name {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.indexTips-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.indexCont {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-top: 200rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.indexCont-white {
|
||||
height: 100%;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.resultDel {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 30rpx;
|
||||
background-color: #ff7171;
|
||||
color: #ffffff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 52rpx;
|
||||
padding: 0 24rpx;
|
||||
display: inline-block;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.resultTitle {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #0c58d2;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
line-height: 48rpx;
|
||||
padding: 15rpx 0;
|
||||
display: flex;
|
||||
margin-right: 20rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.item-label-name {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.textShadow {
|
||||
filter: blur(6px);
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-weight: 400;
|
||||
background-color: #f7faff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: justify;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.see {
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.see-go {
|
||||
display: inline-block;
|
||||
border: 2rpx solid #0c58d2;
|
||||
color: #0c58d2;
|
||||
line-height: 74rpx;
|
||||
padding: 0 25rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.indexLock {
|
||||
width: 34rpx;
|
||||
vertical-align: -4rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 计划表弹出 */
|
||||
.tipsBack {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
}
|
||||
.tipsCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tipsWhite {
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
bottom: -120rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.tipsTitle {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.tipsList {
|
||||
margin: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tipsList-tab {
|
||||
display: flex;
|
||||
background: #e5edf8;
|
||||
line-height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.tips-tab-item, .tips-label-item {
|
||||
flex: 4;
|
||||
text-align: center;
|
||||
}
|
||||
.tipsList-data {
|
||||
background: #fafafa;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
max-height: 30vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.tipsList-label {
|
||||
display: flex;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 2rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.tipsList-label:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tipsWhite-btn {
|
||||
text-align: center;
|
||||
padding: 30rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.tipsWhite-btn-go {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
line-height: 88rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #0c58d2;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.postertBack {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.postertCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.postertContTop {
|
||||
top: -200rpx;
|
||||
}
|
||||
|
||||
.poster-back {
|
||||
position: relative;
|
||||
padding-top: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-img, .poster-Cont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.poster-Cont {
|
||||
padding: 50rpx;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.poster-Cont-code {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-Cont-code image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-Cont-url {
|
||||
display: flex;
|
||||
padding: 30rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.poster-url-number {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-url-copy {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-btn {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.poster-Cont-down {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 90rpx;
|
||||
color: #051437;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-down-img {
|
||||
width: 40rpx;
|
||||
margin-left: 15rpx;
|
||||
vertical-align: -8rpx;
|
||||
animation: bounce-down 2s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes bounce-down {
|
||||
25% {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
50%,
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
|
||||
.sign-img-btn {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
top: calc(100% + 240rpx);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.poster-img-btn {
|
||||
width: 70rpx;
|
||||
display: block;
|
||||
margin: 30rpx auto 0;
|
||||
}
|
||||
|
||||
/* 暂无数据 */
|
||||
.reportTips-title {
|
||||
color: #000;
|
||||
font-size: 34rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.reportTips-text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.reportTips-btn {
|
||||
background-color: #3b7cff;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
line-height: 78rpx;
|
||||
padding: 0 60rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.pack-center {
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.grey {
|
||||
background-color: #f9f9f9;
|
||||
z-index: 9999999;
|
||||
}
|
||||
</style>
|
||||
251
pages/result/other.vue
Normal file
251
pages/result/other.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="indexTop" src="/static/index_top.png" mode="scaleToFill"></image>
|
||||
<view class="indexTips">
|
||||
<view class="indexTips-name">其他还款方式</view>
|
||||
<view class="indexTips-text">根据您填写的内容生成以下结果</view>
|
||||
</view>
|
||||
<view class="indexCont">
|
||||
<view class="indexCont-white">
|
||||
<view class="item">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
机构名称:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{listsArr.institution}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
欠款金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{listsArr.total}}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tipsTitle">其他还款表(单位:元)</view>
|
||||
|
||||
<view class="tipsList">
|
||||
<view class="tipsList-tab">
|
||||
<view class="tips-label-item">期数</view>
|
||||
<view class="tips-tab-item">刷POS</view>
|
||||
<view class="tips-tab-item">分期还款</view>
|
||||
<view class="tips-tab-item">最低还款</view>
|
||||
<view class="tips-tab-item">逾期不还</view>
|
||||
</view>
|
||||
<view class="tipsList-data">
|
||||
<view class="tipsList-label" v-for="(items, index) in listsArr.other" :key="index">
|
||||
<view class="tips-label-item">第{{index+1}}期</view>
|
||||
<view class="tips-label-item">{{items.pos}}</view>
|
||||
<view class="tips-label-item">{{items.stages}}</view>
|
||||
<view class="tips-label-item">{{items.mincash}}</view>
|
||||
<view class="tips-label-item">{{items.overdue}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="list-label">
|
||||
<view class="list-name">POS合计:</view>
|
||||
<view class="list-text">{{listsArr.other_total.pos_add}}元</view>
|
||||
</view>
|
||||
<view class="list-label">
|
||||
<view class="list-name">分期合计:</view>
|
||||
<view class="list-text">{{listsArr.other_total.stages_add}}元</view>
|
||||
</view>
|
||||
<view class="list-label">
|
||||
<view class="list-name">最低合计:</view>
|
||||
<view class="list-text">{{listsArr.other_total.mincash_add}}元</view>
|
||||
</view>
|
||||
<view class="list-label">
|
||||
<view class="list-name">逾期合计:</view>
|
||||
<view class="list-text">{{listsArr.other_total.overdue_add}}元</view>
|
||||
</view>
|
||||
<view class="list-label">
|
||||
<view class="list-name">外加偿还本金:</view>
|
||||
<view class="list-text">{{listsArr.other_total.principal}}元</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<navigator hover-class="none" open-type="navigateBack" class="return">返回</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listsArr : '', // 结果列表
|
||||
}
|
||||
},
|
||||
onLoad(options){
|
||||
let dData = decodeURIComponent(options.data);
|
||||
let newdData = JSON.parse(dData)
|
||||
this.listsArr = newdData
|
||||
console.log(newdData)
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.indexTop {
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
}
|
||||
|
||||
.indexTips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 60rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.indexTips-name {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.indexTips-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.indexCont {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-top: 240rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.indexCont-white {
|
||||
height: 100%;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
.indexCont-white::after,
|
||||
.indexCont-white::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background-color: rgba(255, 255, 255, .4);
|
||||
left: 20rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.indexCont-white::after {
|
||||
z-index: 2;
|
||||
width: calc(100% - 40rpx);
|
||||
left: 20rpx;
|
||||
top: -25rpx;
|
||||
height: 25px;
|
||||
}
|
||||
.indexCont-white::before {
|
||||
z-index: 1;
|
||||
width: calc(100% - 80rpx);
|
||||
left: 40rpx;
|
||||
top: -50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
line-height: 48rpx;
|
||||
padding: 15rpx 0;
|
||||
display: flex;
|
||||
margin-right: 20rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.item-label-name {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.list {
|
||||
border-top: 2rpx dotted #eeeeee;
|
||||
margin-top: 30rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.list-label {
|
||||
display: flex;
|
||||
padding: 30rpx 0 10rpx;
|
||||
}
|
||||
|
||||
.list-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.list-text {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.return {
|
||||
margin-top: 50rpx;
|
||||
margin-bottom: 30rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
color: #0c58d2;
|
||||
border: 2rpx solid #0c58d2;
|
||||
}
|
||||
|
||||
.tipsTitle {
|
||||
font-size: 28rpx;
|
||||
margin-top: 30rpx;
|
||||
color: #0c58d2;
|
||||
}
|
||||
|
||||
.tipsList {
|
||||
margin: 20rpx 0;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
border: 1px solid #eee;;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.tipsList-tab {
|
||||
display: flex;
|
||||
background: #e5edf8;
|
||||
line-height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.tips-tab-item, .tips-label-item {
|
||||
flex: 4;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tipsList-label {
|
||||
display: flex;
|
||||
line-height: 80rpx;
|
||||
background: #fafafa;
|
||||
border-bottom: 2rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.tipsList-label:last-child {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
614
pages/result/result.vue
Normal file
614
pages/result/result.vue
Normal file
@@ -0,0 +1,614 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="indexTop" src="/static/index_top.png" mode="scaleToFill"></image>
|
||||
<view class="indexTips">
|
||||
<view class="indexTips-name">计算结果...</view>
|
||||
<view class="indexTips-text">根据您填写的内容生成以下结果</view>
|
||||
</view>
|
||||
<view class="indexCont">
|
||||
<view class="indexCont-white" v-for="(item, index) in listsArr" :key="index">
|
||||
<view class="resultTitle">
|
||||
{{item.institution}}
|
||||
</view>
|
||||
<view class="resultList">
|
||||
<view class="item">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
欠款金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view :class="{textShadow: item.status != '1'}">
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
首付金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.first_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
分期金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.periods_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
分期期数:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.periods}}期
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
手续费费率:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.tax}}%
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
每期还款本金:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.every_total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
每期还款手续费:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.every_tax}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款金额:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.total}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款本金:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.principal}}元
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label-name">
|
||||
总还款手续费:
|
||||
</view>
|
||||
<view class="item-label-text">
|
||||
{{item.base.tax_amount}}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">温馨提示:{{item.description}}</view>
|
||||
<view class="see">
|
||||
<view class="see-go" @click="generalClick(item)" v-if="item.status == '1'">点击查看还款计划表</view>
|
||||
<view class="see-go" @click="unlockClick(item.share)" v-else><image class="indexLock" src="/static/lock.png" mode="widthFix"></image>分享二维码,解锁次数</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 还款计划表弹出 -->
|
||||
<view class="tipsBack" v-if="generalShow" :catchtouchmove="true"></view>
|
||||
<view class="tipsCont" v-if="generalShow" :catchtouchmove="true">
|
||||
<view class="tipsWhite">
|
||||
<view class="tipsTitle">还款计划表(单位:元)</view>
|
||||
<view class="tipsList">
|
||||
<view class="tipsList-tab">
|
||||
<view class="tips-tab-item">期数</view>
|
||||
<view class="tips-tab-item">还款金额</view>
|
||||
<view class="tips-tab-item">本金</view>
|
||||
<view class="tips-tab-item">手续费</view>
|
||||
</view>
|
||||
<view class="tipsList-data">
|
||||
<view class="tipsList-label" v-for="(items, index) in timeArr" :key="index">
|
||||
<view class="tips-label-item">第{{index+1}}期</view>
|
||||
<view class="tips-label-item">{{items.total}}</view>
|
||||
<view class="tips-label-item">{{items.principal}}</view>
|
||||
<view class="tips-label-item">{{items.tax}}</view>
|
||||
</view>
|
||||
<view class="tipsList-label">
|
||||
<view class="tips-label-item">合计</view>
|
||||
<view class="tips-label-item">{{timeAll.total}}</view>
|
||||
<view class="tips-label-item">{{timeAll.principal}}</view>
|
||||
<view class="tips-label-item">{{timeAll.tax}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tipsWhite-btn">
|
||||
<view @click="otherSee" class="tipsWhite-btn-go">
|
||||
其他还款方式
|
||||
</view>
|
||||
</view>
|
||||
<image class="close" @click="generalShow = false" src="/static/close.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 邀请好友弹出 -->
|
||||
<view class="postertBack" v-if="isImgLay"></view>
|
||||
<view class="postertCont postertContTop" v-if="isImgLay">
|
||||
<view class="poster-back">
|
||||
<image class="poster-img" src="/static/share_back.png" mode="widthFix"></image>
|
||||
<view class="poster-Cont">
|
||||
<view class="poster-Cont-code">
|
||||
<image :src="canShare.qrcode" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="poster-Cont-url">
|
||||
<view class="nowrap poster-url-number" @click="copyUrl(canShare.url)">地址:{{canShare.url}}/</view>
|
||||
<view class="poster-url-copy">复制</view>
|
||||
</view>
|
||||
<view class="poster-Cont-btn">
|
||||
<view class="poster-Cont-down" @click="shareClick">保存图片,分享好友<image class="poster-Cont-down-img" src="/static/hand.png" mode="widthFix"></image></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="sign-img-btn" src="/static/close.png" @click="isImgLay = false" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 长按保存 -->
|
||||
<view class="postertBack" v-if="isImgLong"></view>
|
||||
<view class="postertCont" v-if="isImgLong">
|
||||
<view class="poster-back">
|
||||
<image v-if="isImgLong" class="poster-img" :src="posterImg" mode="widthFix"></image>
|
||||
<view class="poster-Cont-btn" style="margin-top: 40rpx; text-align: center;">
|
||||
<view class="poster-Cont-down">请长按图片,保存本地</view>
|
||||
<image class="poster-img-btn" src="/static/close.png" @click="isImgLong = false" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 海报canvas -->
|
||||
<vue-canvas-poster :widthPixels="1000" :painting="paintings" @success="saveSuccess" @fail="saveFail"></vue-canvas-poster>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Lists } from '@/apis/interfaces/index'
|
||||
import { VueCanvasPoster } from 'vue-canvas-poster'
|
||||
export default {
|
||||
components: {
|
||||
VueCanvasPoster
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listsArr : [], // 结果列表
|
||||
timeArr : [], // 还款计划表列表
|
||||
timeAll : '', // 还款计划表总计
|
||||
otherArr : '', // 其他携带数据
|
||||
generalShow: false,
|
||||
|
||||
// 海报
|
||||
canShare : '', // 分享图片
|
||||
isImgLay : false, // 是否显示图片弹出层
|
||||
isImgLong : false,// 长按保存图片
|
||||
paintings : {
|
||||
width: "375px",
|
||||
height: "375px",
|
||||
borderRadius: "10px",
|
||||
background: "#ffffff",
|
||||
views: [
|
||||
//海报背景
|
||||
{
|
||||
type: "image",
|
||||
url: "/static/share_downback.png",
|
||||
css: {
|
||||
top: "0",
|
||||
left: "0",
|
||||
width: "375px",
|
||||
height: "375px",
|
||||
mode: 'aspectFill'
|
||||
},
|
||||
},
|
||||
|
||||
//二维码
|
||||
{
|
||||
type: "image",
|
||||
url: "",
|
||||
css: {
|
||||
top: "60px",
|
||||
left: "60px",
|
||||
width: "255px",
|
||||
height: "255px",
|
||||
mode: 'aspectFill'
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
posterImg: "", //生成的海报图片路径
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 获取查看结果
|
||||
this.listsInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 查看结果
|
||||
listsInfo() {
|
||||
Lists().then(res => {
|
||||
this.listsArr = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 查看还款计划表
|
||||
generalClick(arr){
|
||||
this.otherArr = arr
|
||||
this.timeArr = arr.project
|
||||
this.timeAll = arr.project_total
|
||||
this.generalShow = !this.generalShow
|
||||
},
|
||||
|
||||
// 其他方式
|
||||
otherSee() {
|
||||
let newData = JSON.stringify(this.otherArr);
|
||||
uni.navigateTo({
|
||||
url: `/pages/result/other?data=${encodeURIComponent(newData)}`
|
||||
})
|
||||
|
||||
this.generalShow = false
|
||||
},
|
||||
|
||||
// 显示海报
|
||||
unlockClick(share) {
|
||||
this.paintings.views[1].url = share.qrcode
|
||||
this.isImgLay = true
|
||||
this.canShare = share
|
||||
},
|
||||
|
||||
// 下载海报
|
||||
shareClick (){
|
||||
this.isImgLay = false
|
||||
this.isImgLong = true
|
||||
|
||||
},
|
||||
|
||||
saveSuccess(src) {
|
||||
this.posterImg = src;
|
||||
},
|
||||
saveFail(err) {},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.indexTop {
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
}
|
||||
|
||||
.indexTips {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 60rpx 40rpx 0;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.indexTips-name {
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.indexTips-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.indexCont {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
margin-top: 200rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.indexCont-white {
|
||||
height: 100%;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.resultTitle {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
color: #0c58d2;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
line-height: 48rpx;
|
||||
padding: 15rpx 0;
|
||||
display: flex;
|
||||
margin-right: 20rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.item-label-name {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.textShadow {
|
||||
filter: blur(6px);
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-weight: 400;
|
||||
background-color: #f7faff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: justify;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.see {
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.see-go {
|
||||
display: inline-block;
|
||||
border: 2rpx solid #0c58d2;
|
||||
color: #0c58d2;
|
||||
line-height: 74rpx;
|
||||
padding: 0 25rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.indexLock {
|
||||
width: 34rpx;
|
||||
vertical-align: -4rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 计划表弹出 */
|
||||
.tipsBack {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
}
|
||||
.tipsCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tipsWhite {
|
||||
background-color: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
bottom: -120rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.tipsTitle {
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.tipsList {
|
||||
margin: 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tipsList-tab {
|
||||
display: flex;
|
||||
background: #e5edf8;
|
||||
line-height: 90rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
.tips-tab-item, .tips-label-item {
|
||||
flex: 4;
|
||||
text-align: center;
|
||||
}
|
||||
.tipsList-data {
|
||||
background: #fafafa;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
max-height: 30vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.tipsList-label {
|
||||
display: flex;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 2rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.tipsList-label:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tipsWhite-btn {
|
||||
text-align: center;
|
||||
padding: 30rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.tipsWhite-btn-go {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
line-height: 88rpx;
|
||||
border-radius: 80rpx;
|
||||
background-color: #0c58d2;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.postertBack {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.postertCont {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
padding: 0 10%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.postertContTop {
|
||||
top: -200rpx;
|
||||
}
|
||||
|
||||
.poster-back {
|
||||
position: relative;
|
||||
padding-top: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-img, .poster-Cont {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.poster-Cont {
|
||||
padding: 50rpx;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.poster-Cont-code {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-Cont-code image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.poster-Cont-url {
|
||||
display: flex;
|
||||
padding: 30rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.poster-url-number {
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.poster-url-copy {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-btn {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.poster-Cont-down {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
background-color: #fff;
|
||||
border-radius: 80rpx;
|
||||
line-height: 90rpx;
|
||||
color: #051437;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.poster-Cont-down-img {
|
||||
width: 40rpx;
|
||||
margin-left: 15rpx;
|
||||
vertical-align: -8rpx;
|
||||
animation: bounce-down 2s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes bounce-down {
|
||||
25% {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
50%,
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
|
||||
.sign-img-btn {
|
||||
position: absolute;
|
||||
left: calc(50% - 35rpx);
|
||||
width: 70rpx;
|
||||
top: calc(100% + 240rpx);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.poster-img-btn {
|
||||
width: 70rpx;
|
||||
display: block;
|
||||
margin: 30rpx auto 0;
|
||||
}
|
||||
</style>
|
||||
48
pages/webview/webview.vue
Normal file
48
pages/webview/webview.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { wechatCode } from '@/apis/interfaces/authUrl'
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad(options) {
|
||||
// 获取微信code
|
||||
wechatCode({
|
||||
code : options.code,
|
||||
share_user : this.$store.getters.getShareUser,
|
||||
invite : this.$store.getters.getInvite,
|
||||
lock_id : this.$store.getters.getLockId
|
||||
}).then(res => {
|
||||
this.$store.commit('setToken', res.token_type + ' ' + res.token)
|
||||
this.$store.commit('setPassInfo', res.pass_info)
|
||||
|
||||
this.$store.commit('setShareUser', '')
|
||||
this.$store.commit('setInvite', '')
|
||||
this.$store.commit('setLockId', '')
|
||||
|
||||
if(res.pass_info) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/perfect'
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user