This commit is contained in:
唐明明
2023-09-08 11:23:48 +08:00
6 changed files with 458 additions and 450 deletions

View File

@@ -9,8 +9,8 @@ import { router } from '@/router/index.js'
// 基础配置 // 基础配置
const config = { const config = {
// apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', // 测试环境 apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', // 测试环境
apiUrl : 'https://douhuo.douhuofalv.com/api/', // 正式环境 // apiUrl : 'https://douhuo.douhuofalv.com/api/', // 正式环境
timeout : 60000 timeout : 60000
} }

View File

@@ -39,7 +39,7 @@
<!-- web.douhuotest.douhuofalv dev=0是线上 dev=1是线下 --> <!-- web.douhuotest.douhuofalv dev=0是线上 dev=1是线下 -->
<wx-open-launch-weapp <wx-open-launch-weapp
username="gh_918c81628d6f" username="gh_918c81628d6f"
:path="'pages/pay/pay?type=h5&dev=0&trade_id=' + tradeId + '&token=' + token" :path="'pages/pay/pay?type=h5&dev=1&trade_id=' + tradeId + '&token=' + token"
> >
<script type="text/wxtag-template"> <script type="text/wxtag-template">
<style> <style>
@@ -217,8 +217,8 @@
} }
// 获取微信授权信息-获取oppid // 获取微信授权信息-获取oppid
authFollow({ authFollow({
url: 'https://web.douhuofalv.com/webWechat/index' // url: 'https://web.douhuofalv.com/webWechat/index'
// url: 'https://web.douhuotest.douhuofalv.com/webWechat/index' url: 'https://web.douhuotest.douhuofalv.com/webWechat/index'
}).then(res => { }).then(res => {
window.location.href = res window.location.href = res
}).catch(err => { }).catch(err => {

View File

@@ -1,446 +1,454 @@
<template> <template>
<view class="content"> <view class="content">
<view class="top"> <view class="top">
<view class="top-text" v-if="userName"> <view class="top-text" v-if="userName">
您好{{userName.nickname}} 您好{{userName.nickname}}
<!-- {{userName.parent.sex == '' ? '先生' : '女士'}} --> <!-- {{userName.parent.sex == '' ? '先生' : '女士'}} -->
</view> </view>
以下是根据您的情况为您匹配的机构最佳方案由于银行政策实时变动该方案为预估方案仅供参考具体以协商为准感谢您的支持 以下是根据您的情况为您匹配的机构最佳方案由于银行政策实时变动该方案为预估方案仅供参考具体以协商为准感谢您的支持
</view> </view>
<view class="white"> <view class="white">
<view class="list" v-for="(item, index) in schemesArr" :key="index"> <view class="list" v-for="(item, index) in schemesArr" :key="index">
<view class="label" :class="{active : item.schemesShow}"> <view class="label" :class="{active : item.schemesShow}">
<view class="labelTop"> <view class="labelTop">
<view class="labelTop-name"> <view class="labelTop-name">
{{item.institution.title}} {{item.institution.title}}
</view> </view>
<view class="labelTop-tips"> <view class="labelTop-tips">
{{item.business_type.title}} {{item.business_type.title}}
</view> </view>
</view> </view>
<view class="labelPlan-list"> <view class="labelPlan-list">
<view class="labelPlan-item" v-for="(items, itemsIndex) in item.base" :key="itemsIndex"> <view class="labelPlan-item" v-for="(items, itemsIndex) in item.base" :key="itemsIndex">
<view class="labelPlan-item-name">{{items.title}}</view> <view class="labelPlan-item-name">{{items.title}}</view>
<view class="nowrap labelPlan-item-text"> <view class="nowrap labelPlan-item-text">
<block v-if="items.key === 'price'"> <block v-if="items.key === 'price'">
{{items.value}} {{items.value}}
</block> </block>
<block v-else-if="items.key === 'overdue_day'"> <block v-else-if="items.key === 'overdue_day'">
{{items.value}} {{items.value}}
</block> </block>
<block v-else> <block v-else>
{{items.value}} {{items.value}}
</block> </block>
</view> </view>
<block v-if="items.value"> <block v-if="items.value">
<view v-if="items.key === 'rush' || items.key === 'remark'" class="labelPlan-item-btn" @click="seeTips(items.title, items.value)">查看</view> <view v-if="items.key === 'rush' || items.key === 'remark'" class="labelPlan-item-btn" @click="seeTips(items.title, items.value)">查看</view>
</block> </block>
</view> </view>
</view> </view>
<view class="labelPlan"> <view class="labelPlan">
<view class="labelPlan-top"> <view class="labelPlan-top">
<view class="labelPlan-name"> <view class="labelPlan-name">
预估方案 预估方案
</view> </view>
<view class="labelPlan-tips"> <view class="labelPlan-tips">
YGFA YGFA
</view> </view>
</view> </view>
<view class="labelPlan-list"> <view class="labelPlan-list" v-if="item.type == 'one'">
<view class="labelPlan-item" v-for="(paramsItem, paramsIndex) in item.params" :key="paramsIndex"> <text class="labelPlan-item labelPlan-content">
<view class="labelPlan-item-name">{{paramsItem.title}}</view> {{item.content}}
<view class="nowrap labelPlan-item-text"> </text>
{{paramsItem.value}} </view>
</view> <view class="labelPlan-list" v-else>
<view class="labelPlan-item-btn" v-if="paramsItem.title == '协商方案' || paramsItem.title == '减免情况' || paramsItem.title == '关于减免结清减免政策'" @click="seeTips(paramsItem.title, paramsItem.value)">查看</view> <view class="labelPlan-item" v-for="(paramsItem, paramsIndex) in item.params" :key="paramsIndex">
</view> <view class="labelPlan-item-name">{{paramsItem.title}}</view>
</view> <view class="nowrap labelPlan-item-text">
</view> {{paramsItem.value}}
<view class="labelNotice" :class="{active : item.noticeShow}"> </view>
<view class="labelNotice-top"> <view class="labelPlan-item-btn" v-if="paramsItem.title == '协商方案' || paramsItem.title == '减免情况' || paramsItem.title == '关于减免结清减免政策'" @click="seeTips(paramsItem.title, paramsItem.value)">查看</view>
<view class="labelNotice-name"> </view>
须知 </view>
</view> </view>
<view class="labelNotice-text"> <view class="labelNotice" :class="{active : item.noticeShow}">
{{item.business_type.notic}} <view class="labelNotice-top">
</view> <view class="labelNotice-name">
</view> 须知
<view class="labelNotice-btn" @click="noticeTap(index)"> </view>
<image class="labelNotice-img" :class="{active : item.noticeShow}" src="@/static/imgs/openArrow_grey.png" mode="widthFix"></image>{{item.noticeShow ? '收起' : '展开'}} <text class="labelNotice-text">
</view> {{item.business_type.notic}}
</view> </text>
</view> </view>
<view class="open" @click="recordTap(index)"> <view class="labelNotice-btn" @click="noticeTap(index)">
<view class="open-text"> <image class="labelNotice-img" :class="{active : item.noticeShow}" src="@/static/imgs/openArrow_grey.png" mode="widthFix"></image>{{item.noticeShow ? '收起' : '展开'}}
<image :class="{active : item.schemesShow}" src="@/static/imgs/openArrow.png" mode="widthFix"></image>{{item.schemesShow ? '收起' : '展开'}} </view>
</view> </view>
</view> </view>
</view> <view class="open" @click="recordTap(index)">
<view class="open-text">
<view class="reminder"> <image :class="{active : item.schemesShow}" src="@/static/imgs/openArrow.png" mode="widthFix"></image>{{item.schemesShow ? '收起' : '展开'}}
<image class="reminder-img" src="@/static/imgs/reminderIcon.png"></image> </view>
<view class="reminder-text"> </view>
<text>温馨提示</text> </view>
{{reminder}}
</view> <view class="reminder">
</view> <image class="reminder-img" src="@/static/imgs/reminderIcon.png"></image>
</view> <view class="reminder-text">
<text>温馨提示</text>
<mouldTips :see-data="seeData" @tipsClose="($event) => {seeData.seeShow = $event}"></mouldTips> {{reminder}}
</view>
</view>
</view>
<mouldTips :see-data="seeData" @tipsClose="($event) => {seeData.seeShow = $event}"></mouldTips>
</view> </view>
</template> </template>
<script> <script>
import { Schemes } from '@/apis/interfaces/index' import { Schemes } from '@/apis/interfaces/index'
import mouldTips from '@/components/mould-tips.vue' import mouldTips from '@/components/mould-tips.vue'
export default { export default {
components: { components: {
mouldTips mouldTips
}, },
data() { data() {
return { return {
schemesArr : [], // 预估方案列表 schemesArr : [], // 预估方案列表
reminder : '', // 温馨提示 reminder : '', // 温馨提示
userName : '', // 用户 userName : '', // 用户
// 查看提示组件 // 查看提示组件
seeData : { seeData : {
seeShow : false, seeShow : false,
seeTitle: '', seeTitle: '',
seeText : '', seeText : '',
}, },
noticeShow : false, // 须知展开 noticeShow : false, // 须知展开
baleShow : false, // 服务包弹出 baleShow : false, // 服务包弹出
} }
}, },
onShow() {}, onShow() {},
onLoad() { onLoad() {
// 获取方案 // 获取方案
this.schemesInfo(); this.schemesInfo();
}, },
methods: { methods: {
// 方案 // 方案
schemesInfo() { schemesInfo() {
// this.$Route.query.id // this.$Route.query.id
Schemes(this.$Route.query.id).then(res => { Schemes(this.$Route.query.id).then(res => {
this.reminder = res.tips this.reminder = res.tips
let esArr = res.schemes let esArr = res.schemes
esArr.forEach((item, index) => { esArr.forEach((item, index) => {
index == 0 ? item.schemesShow = true : item.schemesShow = false index == 0 ? item.schemesShow = true : item.schemesShow = false
index == 0 ? item.noticeShow = true : item.noticeShow = false index == 0 ? item.noticeShow = true : item.noticeShow = false
}) })
this.schemesArr = esArr this.schemesArr = esArr
this.userName = res.user this.userName = res.user
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
icon: "none" icon: "none"
}) })
}) })
}, },
// 提示组件 -- 赋值 // 提示组件 -- 赋值
seeTips(title, text) { seeTips(title, text) {
this.seeData.seeShow = true this.seeData.seeShow = true
this.seeData.seeTitle = title this.seeData.seeTitle = title
this.seeData.seeText = text this.seeData.seeText = text
}, },
// 列表展开 // 列表展开
recordTap(index) { recordTap(index) {
var listData = this.schemesArr var listData = this.schemesArr
var helpFlag = this.schemesArr[index].schemesShow var helpFlag = this.schemesArr[index].schemesShow
listData.forEach((item) => { listData.forEach((item) => {
item.schemesShow = false item.schemesShow = false
}) })
listData[index].schemesShow = !helpFlag listData[index].schemesShow = !helpFlag
this.schemesArr = listData this.schemesArr = listData
}, },
// 须知展开 // 须知展开
noticeTap(index) { noticeTap(index) {
var listData = this.schemesArr var listData = this.schemesArr
var helpFlag = this.schemesArr[index].noticeShow var helpFlag = this.schemesArr[index].noticeShow
listData.forEach((item) => { listData.forEach((item) => {
item.noticeShow = false item.noticeShow = false
}) })
listData[index].noticeShow = !helpFlag listData[index].noticeShow = !helpFlag
this.schemesArr = listData this.schemesArr = listData
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
background-color: #f6f6f6; background-color: #f6f6f6;
overflow-y: scroll; overflow-y: scroll;
height: 100vh; height: 100vh;
// height: calc(100vh - 44px); // height: calc(100vh - 44px);
} }
.top { .top {
background-color: $mian-color; background-color: $mian-color;
color: #ffffff; color: #ffffff;
padding: $padding * 2 $padding 280rpx; padding: $padding * 2 $padding 280rpx;
box-sizing: border-box; box-sizing: border-box;
font-size: $title-size-m; font-size: $title-size-m;
line-height: 42rpx; line-height: 42rpx;
opacity: .9; opacity: .9;
text-align: justify; text-align: justify;
.top-text { .top-text {
margin-bottom: $margin; margin-bottom: $margin;
} }
} }
.white { .white {
position: relative; position: relative;
top: -200rpx; top: -200rpx;
left: 0; left: 0;
width: 100%; width: 100%;
padding: $padding; padding: $padding;
box-sizing: border-box; box-sizing: border-box;
z-index: 9; z-index: 9;
border-bottom: transparent 40rpx solid; border-bottom: transparent 40rpx solid;
.list { .list {
padding: $padding; padding: $padding;
box-sizing: border-box; box-sizing: border-box;
background-color: #ffffff; background-color: #ffffff;
border-radius: $radius - 4; border-radius: $radius - 4;
position: relative; position: relative;
margin-top: $margin * 3; margin-top: $margin * 3;
box-shadow: 0 0 20rpx rgba(0, 0, 0, .05); box-shadow: 0 0 20rpx rgba(0, 0, 0, .05);
&::after, &::after,
&::before { &::before {
position: absolute; position: absolute;
content: ''; content: '';
background-color: rgba(255, 255, 255, .4); background-color: rgba(255, 255, 255, .4);
left: 20rpx; left: 20rpx;
border-radius: $radius - 4 $radius - 4 0 0; border-radius: $radius - 4 $radius - 4 0 0;
} }
&::after { &::after {
z-index: 2; z-index: 2;
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
left: 20rpx; left: 20rpx;
top: -25rpx; top: -25rpx;
height: 25px; height: 25px;
} }
&::before { &::before {
z-index: 1; z-index: 1;
width: calc(100% - 80rpx); width: calc(100% - 80rpx);
left: 40rpx; left: 40rpx;
top: -50rpx; top: -50rpx;
height: 50rpx; height: 50rpx;
} }
&:first-child { &:first-child {
margin-top: 0; margin-top: 0;
} }
.label { .label {
position: relative; position: relative;
height: 84rpx; height: 84rpx;
overflow: hidden; overflow: hidden;
&.active { &.active {
height: auto; height: auto;
} }
&::after, &::after,
&::before { &::before {
position: absolute; position: absolute;
content: ''; content: '';
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
border-radius: 50%; border-radius: 50%;
background-color: #f6f6f6; background-color: #f6f6f6;
top: 33%; top: 33%;
} }
&::after { &::after {
left: -45rpx; left: -45rpx;
} }
&::before { &::before {
right: -45rpx; right: -45rpx;
} }
.labelTop { .labelTop {
line-height: 80rpx; line-height: 80rpx;
margin-bottom: $margin - 20; margin-bottom: $margin - 20;
display: flex; display: flex;
.labelTop-name { .labelTop-name {
flex: 1; flex: 1;
font-size: $title-size + 2; font-size: $title-size + 2;
font-weight: 600; font-weight: 600;
} }
.labelTop-tips { .labelTop-tips {
margin-left: 20rpx; margin-left: 20rpx;
background-color: #FBE7EE; background-color: #FBE7EE;
color: $mian-color; color: $mian-color;
font-size: $title-size-sm; font-size: $title-size-sm;
font-weight: normal; font-weight: normal;
padding: 0 15rpx; padding: 0 15rpx;
border: 2rpx solid $mian-color; border: 2rpx solid $mian-color;
border-radius: $radius * 2; border-radius: $radius * 2;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
display: inline-block; display: inline-block;
margin-top: 18rpx; margin-top: 18rpx;
} }
} }
.labelPlan { .labelPlan {
border-top: 2rpx dotted #e7e7e7; border-top: 2rpx dotted #e7e7e7;
padding-top: $padding; padding-top: $padding;
margin-top: $margin; margin-top: $margin;
.labelPlan-top { .labelPlan-top {
display: flex; display: flex;
line-height: 54rpx; line-height: 54rpx;
color: $mian-color; color: $mian-color;
margin-bottom: $margin; margin-bottom: $margin;
.labelPlan-name { .labelPlan-name {
flex: 1; flex: 1;
font-size: $title-size + 4; font-size: $title-size + 4;
font-weight: 600; font-weight: 600;
} }
.labelPlan-tips { .labelPlan-tips {
opacity: .2; opacity: .2;
font-size: $title-size + 2; font-size: $title-size + 2;
} }
} }
} }
.labelPlan-item { .labelPlan-item {
line-height: 40rpx; line-height: 40rpx;
margin-bottom: $margin + 10; margin-bottom: $margin + 10;
display: flex; display: flex;
font-size: $title-size-m; font-size: $title-size-m;
color: #111111; color: #111111;
&:last-child { &:last-child {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.labelPlan-item-name { .labelPlan-item-name {
color: #999999; color: #999999;
flex: 1; flex: 1;
margin-right: $margin; margin-right: $margin;
} }
.labelPlan-item-text { .labelPlan-item-text {
width: 30%; width: 30%;
text-align: right; text-align: right;
} }
.labelPlan-item-btn { .labelPlan-item-btn {
color: $mian-color; color: $mian-color;
border: $mian-color 2rpx solid; border: $mian-color 2rpx solid;
width: 80rpx; width: 80rpx;
text-align: center; text-align: center;
border-radius: $radius-m; border-radius: $radius-m;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: $title-size-sm - 2; font-size: $title-size-sm - 2;
} }
} &.labelPlan-content {
.labelNotice { line-height: 52rpx;
font-size: $title-size-m; }
background-color: #F6F6F6; }
border-radius: $radius-m; .labelNotice {
margin-top: $margin; font-size: $title-size-m;
height: 240rpx; background-color: #F6F6F6;
overflow: hidden; border-radius: $radius-m;
position: relative; margin-top: $margin;
&.active { height: 240rpx;
height: auto; overflow: hidden;
} position: relative;
.labelNotice-top { &.active {
padding: $padding $padding 0; height: auto;
box-sizing: border-box; }
.labelNotice-name { .labelNotice-top {
color: #111111; padding: $padding $padding 0;
margin-bottom: $margin - 10; box-sizing: border-box;
font-weight: 600; .labelNotice-name {
} color: #111111;
.labelNotice-text { margin-bottom: $margin - 10;
color: #666666; font-weight: 600;
line-height: 52rpx; }
text-align: justify; .labelNotice-text {
margin-bottom: 100rpx; color: #666666;
} line-height: 52rpx;
} text-align: justify;
.labelNotice-btn { margin-bottom: 100rpx;
text-align: center; }
line-height: 100rpx; }
color: #999999; .labelNotice-btn {
position: absolute; text-align: center;
bottom: 0; line-height: 100rpx;
left: 0; color: #999999;
width: 100%; position: absolute;
background-color: #F6F6F6; bottom: 0;
.labelNotice-img { left: 0;
width: 24rpx; width: 100%;
height: 24rpx; background-color: #F6F6F6;
margin-right: 10rpx; .labelNotice-img {
transition: .2s; width: 24rpx;
&.active { height: 24rpx;
transform:rotate(180deg) margin-right: 10rpx;
} transition: .2s;
} &.active {
} transform:rotate(180deg)
} }
} }
}
.open { }
text-align: center; }
margin-top: $margin - 10;
width: 100%; .open {
background-color: #ffffff; text-align: center;
.open-text { margin-top: $margin - 10;
background-color: #FBE7EE; width: 100%;
display: inline-block; background-color: #ffffff;
color: $mian-color; .open-text {
padding: 0 $padding - 10; background-color: #FBE7EE;
line-height: 58rpx; display: inline-block;
font-size: $title-size-m; color: $mian-color;
border-radius: $radius-sm; padding: 0 $padding - 10;
image { line-height: 58rpx;
width: 22rpx; font-size: $title-size-m;
height: 22rpx; border-radius: $radius-sm;
margin-right: 10rpx; image {
transition: .2s; width: 22rpx;
&.active { height: 22rpx;
transform:rotate(180deg) margin-right: 10rpx;
} transition: .2s;
} &.active {
} transform:rotate(180deg)
} }
} }
} }
}
.reminder { }
position: fixed; }
left: 0;
bottom: 0; .reminder {
background-color: #f6f6f6; position: fixed;
z-index: 10; left: 0;
width: 100%; bottom: 0;
height: 240rpx; background-color: #f6f6f6;
overflow: hidden; z-index: 10;
padding: $padding; width: 100%;
box-sizing: border-box; height: 240rpx;
display: flex; overflow: hidden;
color: #FEA044; padding: $padding;
font-size: $title-size-m; box-sizing: border-box;
border-bottom: 2rpx solid #f5f5f5; display: flex;
.reminder-img { color: #FEA044;
width: 32rpx; font-size: $title-size-m;
height: 32rpx; border-bottom: 2rpx solid #f5f5f5;
margin-top: 8rpx; .reminder-img {
} width: 32rpx;
.reminder-text { height: 32rpx;
overflow-y: scroll; margin-top: 8rpx;
height: 200rpx; }
width: calc(100% - 52rpx); .reminder-text {
margin-left: 20rpx; overflow-y: scroll;
line-height: 40rpx; height: 200rpx;
text-align: justify; width: calc(100% - 52rpx);
font-size: $title-size-sm; margin-left: 20rpx;
text { line-height: 40rpx;
display: block; text-align: justify;
} font-size: $title-size-sm;
} text {
} display: block;
}
}
}
</style> </style>

View File

@@ -42,7 +42,7 @@
<!-- douhuotest dev=0是线上 dev=1是线下 --> <!-- douhuotest dev=0是线上 dev=1是线下 -->
<wx-open-launch-weapp <wx-open-launch-weapp
username="gh_918c81628d6f" username="gh_918c81628d6f"
:path="'pages/pay/pay?type=h5&dev=1&trade_id=' + tradeId + '&token=' + token" :path="'pages/pay/pay?type=h5&dev=0&trade_id=' + tradeId + '&token=' + token"
> >
<script type="text/wxtag-template"> <script type="text/wxtag-template">
<style> <style>

View File

@@ -61,7 +61,7 @@
<!-- web.douhuotest.douhuofalv dev=0是线上 dev=1是线下 --> <!-- web.douhuotest.douhuofalv dev=0是线上 dev=1是线下 -->
<wx-open-launch-weapp <wx-open-launch-weapp
username="gh_918c81628d6f" username="gh_918c81628d6f"
:path="'pages/pay/pay?type=h5&dev=0&trade_id=' + tradeId + '&token=' + token" :path="'pages/pay/pay?type=h5&dev=1&trade_id=' + tradeId + '&token=' + token"
> >
<script type="text/wxtag-template"> <script type="text/wxtag-template">
<style> <style>
@@ -349,8 +349,8 @@
// 获取微信授权信息-获取oppid // 获取微信授权信息-获取oppid
authFollow({ authFollow({
url: 'https://web.douhuofalv.com/webWechat/index?id=' + this.$Route.query.id + '&style=' + this.$Route.query.style + '&price=' + this.$Route.query.price // url: 'https://web.douhuofalv.com/webWechat/index?id=' + this.$Route.query.id + '&style=' + this.$Route.query.style + '&price=' + this.$Route.query.price
// url: 'https://web.douhuotest.douhuofalv.com/webWechat/index?id=' + this.orderId + '&style=' + this.$Route.query.style + '&price=' + this.$Route.query.price url: 'https://web.douhuotest.douhuofalv.com/webWechat/index?id=' + this.orderId + '&style=' + this.$Route.query.style + '&price=' + this.$Route.query.price
}).then(res => { }).then(res => {
window.location.href = res window.location.href = res
}).catch(err => { }).catch(err => {

View File

@@ -32,8 +32,8 @@ router.beforeEach((to, from, next) => {
// 检查用户是否授权了微信 // 检查用户是否授权了微信
if(to.name != 'webWechatIndex' && openId === ''){ if(to.name != 'webWechatIndex' && openId === ''){
authFollow({ authFollow({
// url: 'https://web.douhuotest.douhuofalv.com/webWechat/index' url: 'https://web.douhuotest.douhuofalv.com/webWechat/index'
url: 'https://web.douhuofalv.com/webWechat/index' // url: 'https://web.douhuofalv.com/webWechat/index'
}).then(res => { }).then(res => {
window.location.href = res window.location.href = res
}).catch(err => { }).catch(err => {