Files
dou_fire/pages/synthesize/individual.vue
唐明明 0fe6fd4aaf 宗法
2023-05-22 11:13:29 +08:00

258 lines
6.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
<image class="yearImg" src="https://cdn.douhuofalv.com/images/2023/04/17/85db0728f2bae879ecbe561eed100549.png" mode="widthFix"></image>
<view class="list">
<view class="title">
<view class="title-name"><text>个人法律咨询365服务包</text></view>
<image class="title-img" src="https://cdn.douhuofalv.com/images/2023/04/17/79426f8fe9395c1c1f5be41d0a6f2eb8.png" mode="widthFix"></image>
</view>
<view class="item" v-for="(item, index) in synthesisArr" :key="index">
<view class="item-back">
<view class="item-title">{{item.title}}</view>
<view class="range">
<view class="range-label">
<view class="range-label-title">针对群体</view>
<view class="range-label-text">
{{item.audiences}}
</view>
</view>
<view class="range-label">
<view class="range-label-title">咨询收费</view>
<view class="range-label-text">
{{item.price}}//
</view>
</view>
<view class="range-label">
<view class="range-label-title">服务期限</view>
<view class="range-label-text">
{{item.day}}
</view>
</view>
<view class="range-label scope" v-if="index == 0">
<view class="range-label-title">服务范围</view>
<view class="range-label-text">
<text v-for="(items, scopeIndex) in item.scope" :key="scopeIndex">{{scopeIndex + 1}}{{items}}</text>
</view>
</view>
</view>
<image class="shapeWhite-back" src="https://cdn.douhuofalv.com/images/2023/04/17/705af638ddaed151ce5bc5ead85f604d.png" mode="widthFix"></image>
</view>
<view class="btn">
<view class="btn-go" :class="{'hide': item.service_order != null && item.service_order.can.pay_status === 2}" @click="onBtn(index)">
<block v-if="item.is_open && item.service_order === null">
<text>{{item.is_open ? '立即续费' : '立即开通'}}</text>
</block>
<block v-else>
<text v-if="item.service_order.can.pay_status === 1">{{item.is_open ? '立即续费' : '立即开通' }}</text>
<text v-if="item.service_order.can.pay_status === 2">打款审核中</text>
<text v-if="item.service_order.can.pay_status === 3">打款被驳回</text>
</block>
</view>
<!-- 到期时间 -->
<view class="order-at" v-if="item.is_open && item.service_user != null">到期时间{{item.service_user.ended_at}}</view>
</view>
</view>
</view>
<image class="yearBttom" src="https://cdn.douhuofalv.com/images/2023/04/17/fc4cad00a630e3d69b3f486e9d2937e9.png" mode="widthFix"></image>
</view>
</template>
<script>
import { yearSynthList } from '@/apis/interfaces/synthesis'
export default {
data() {
return {
synthesisArr: [],
}
},
onShow() {
this.yearServe();
},
methods: {
// 年费服务包列表
yearServe(){
yearSynthList({
type: 1
}).then(res => {
this.synthesisArr = res
console.log(res)
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 点击开通按钮
onBtn(index){
let obj = this.synthesisArr[index]
if(obj.service_order === null){
this.onOpenPAY(obj.synthesis_service_id)
return
}
switch (obj.service_order.can.pay_status){
case 1:
this.onOpenPAY(obj.synthesis_service_id)
break;
case 2:
uni.showToast({
title: '打款凭证审核中,请耐心等待',
icon : 'none'
})
break;
case 3:
uni.showModal({
title : '审核被驳回',
content : '驳回原因:' + obj.service_order.offline_pays.remark,
showCancel : false,
success : modalRes => {
if(modalRes.confirm){
this.$Router.push({
name : 'BankPay',
params : {
payId : obj.service_order.offline_pays.offline_pay_id,
type : 'edit',
orderId : obj.service_order.order_id,
orderType : obj.service_order.order_type.replace(/\\/g, '-'),
price : obj.price
}
})
}
}
})
break;
}
},
// 填写支付信息
onOpenPAY(serveId){
this.$Router.push({
name: 'PersonWrite',
params: {
serveId
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100vw;
background-color: #121d4c;
}
.yearImg,
.yearBttom{
width: 100%;
display: block;
}
.list {
padding: 30rpx;
box-sizing: border-box;
background-color: #032e9e;
border-radius: 0 0 60rpx 60rpx;
.title {
margin-bottom: 40rpx;
display: flex;
height: 80rpx;
line-height: 80rpx;
.title-name {
flex: 1;
text {
padding: 0 70rpx 0 30rpx;
font-size: 36rpx;
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
display: inline-block;
color: #2c3c66;
font-weight: 600;
position: relative;
&:after {
position: absolute;
content: '';
right: 0;
top: 0;
width: 0;
height: 0;
border-width: 40rpx;
border-style: solid;
border-color: transparent #03339e transparent transparent;
}
}
}
.title-img {
width: 110rpx;
}
}
.item {
margin-bottom: 30rpx;
.item-back {
background-color: #002088;
border-radius: 20rpx;
padding: 30rpx;
box-sizing: border-box;
position: relative;
.item-title {
font-weight: 600;
font-size:36rpx;
background-image: -webkit-linear-gradient(top,#fdf6ca, #e29c68);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
flex: 1;
margin-bottom: 30rpx;
}
.range {
color: #ffffff;
font-size: 28rpx;
.range-label {
line-height: 40rpx;
padding: 10rpx 0;
display: flex;
.range-label-title {
width: 160rpx;
}
.range-label-text {
width: calc(100% - 160rpx);
text {
display: block;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
}
}
.shapeWhite-back {
width: 50%;
position: absolute;
left: 0;
bottom: 0;
}
}
.btn {
padding: 40rpx;
box-sizing: border-box;
text-align: center;
.btn-go {
display: inline-block;
background-image: -webkit-linear-gradient(top,#fff8da,#f3c796);
color: #582700;
width: 50%;
font-weight: 600;
font-size: 36rpx;
line-height: 88rpx;
border-radius: 50rpx;
box-shadow: 0 8rpx 6rpx rgba(0, 0, 0, .3);
&.hide{
opacity: .7;
}
}
.order-at{ text-align: center; color: white; font-size: 30rpx; padding-top: 30rpx; }
}
}
}
</style>