551 lines
14 KiB
Vue
551 lines
14 KiB
Vue
<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" :class="{active : item.service_user != null}">
|
||
<view class="endedAt" v-if="item.service_user">
|
||
<view class="endedAt-time">到期时间:{{item.service_user.ended_at}}</view>
|
||
</view>
|
||
<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">
|
||
<!-- button_status 0 可开通 1 可续费 2 待支付 3 待审核 4 已驳回 -->
|
||
<view class="btn-go" :class="{'hide': item.button_status === 3}" @click="onBtn(index)">
|
||
<text v-if="item.button_status === 0">立即购买</text>
|
||
<text v-if="item.button_status === 1">立即续费</text>
|
||
<text v-if="item.button_status === 2">等待支付</text>
|
||
<text v-if="item.button_status === 3">打款审核中</text>
|
||
<text v-if="item.button_status === 4">打款被驳回</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<image class="yearBttom" src="https://cdn.douhuofalv.com/images/2023/04/17/fc4cad00a630e3d69b3f486e9d2937e9.png" mode="widthFix"></image>
|
||
|
||
<!-- 关注公众号 -->
|
||
<view class="tipsBack" v-if="generalShow"></view>
|
||
<view class="tipsCont" v-if="generalShow">
|
||
<view class="tipsWhite">
|
||
<image class="tipsCont-img" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2023/06/06/6b1485847b45273618f8d922ceee889c.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 class="voucherBack" :class="{active : voucherState}"></view>
|
||
<view class="voucherPop" :class="{active : voucherState}">
|
||
<view class="tipsWhite">
|
||
<image class="voucherPop-img" src="https://cdn.douhuofalv.com/images/2023/04/17/f4a3c45fe9aa7db143a362fc5b13b31d.png" mode="widthFix"></image>
|
||
<view class="voucherPop-title">
|
||
<view class="voucherPop-name">支付提示</view>
|
||
<view class="voucherPop-text">抱歉,此订单不支持线上支付,请上传打款凭证</view>
|
||
<view class="voucherPop-btn">
|
||
<view class="voucherPop-go" @click="voucherState = false">
|
||
暂不支付
|
||
</view>
|
||
<view class="voucherPop-go voucherPop-up" @click="clickOpen">
|
||
上传凭证
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import { judgeReal } from '@/apis/interfaces/user'
|
||
import { authFollow } from '@/apis/interfaces/index'
|
||
import { yearSynthList } from '@/apis/interfaces/synthesis'
|
||
export default {
|
||
data() {
|
||
return {
|
||
synthesisArr : [], //个人-年费服务包
|
||
generalShow : false ,// 公众号
|
||
voucherState : false, // 上传凭证弹出
|
||
orderId : '', // 订单 ID
|
||
orderType : '', // 订单类型
|
||
orderPrice : '', // 订单金额
|
||
}
|
||
},
|
||
|
||
created() {},
|
||
|
||
onShow() {
|
||
// 获取-个人-年费服务包列表
|
||
this.yearServe();
|
||
},
|
||
|
||
methods: {
|
||
// 个人-年费服务包列表
|
||
yearServe(){
|
||
yearSynthList({
|
||
type: this.$Route.query.type
|
||
}).then(res => {
|
||
this.synthesisArr = 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.button_status){
|
||
case 1:
|
||
this.onOpenPAY(obj.synthesis_service_id)
|
||
break;
|
||
case 2:
|
||
this.expressSheet(obj.service_order.service_order_id, obj.service_order.order_type, obj.service_order.can, obj.service_order.price)
|
||
break;
|
||
case 3:
|
||
uni.showToast({
|
||
title: '打款凭证审核中,请耐心等待',
|
||
icon : 'none'
|
||
})
|
||
break;
|
||
case 4:
|
||
uni.showModal({
|
||
title : '审核被驳回',
|
||
content : '驳回原因:' + obj.service_order.offline_pays.remark,
|
||
showCancel : false,
|
||
success : modalRes => {
|
||
if(modalRes.confirm){
|
||
this.$Router.push({
|
||
name : 'VoucherOpen',
|
||
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;
|
||
}
|
||
},
|
||
|
||
// 选择支付方式
|
||
expressSheet(id, type, can, price) {
|
||
this.orderId = id
|
||
this.orderType = type
|
||
this.orderPrice = price
|
||
uni.showActionSheet({
|
||
itemList: ['线上支付', '线下支付'],
|
||
success: sheetRes => {
|
||
if(sheetRes.tapIndex == 0) {
|
||
if(can.online) {
|
||
this.$Router.push({name: 'FeePay', params: {id: id, orderType: type, price: price, payForm: 'service'}})
|
||
return
|
||
}
|
||
this.voucherState = true
|
||
} else if (sheetRes.tapIndex == 1) {
|
||
this.$Router.push({name: 'VoucherOpen', params: {orderId: id, orderType: type, price: price}})
|
||
}
|
||
},
|
||
fail: sheetFail => {}
|
||
})
|
||
},
|
||
|
||
// 上传凭证
|
||
clickOpen() {
|
||
this.voucherState = false
|
||
this.$Router.push({name: 'VoucherOpen', params: {orderId: this.orderId, orderType: this.orderType, price: this.orderPrice}})
|
||
},
|
||
|
||
// 填写支付信息
|
||
onOpenPAY(serveId){
|
||
// 判断是否认证
|
||
judgeReal().then(res => {
|
||
if(res.has_sign) {
|
||
if(!res.has_subscribe) {
|
||
// 弹出公众号
|
||
this.generalShow = true
|
||
} else {
|
||
// 跳到咨询表单页
|
||
this.$Router.push({
|
||
name: 'PersonWrite',
|
||
params: {
|
||
serveId
|
||
}
|
||
})
|
||
}
|
||
return
|
||
}
|
||
// 跳到认证页面
|
||
this.$Router.replace({name: 'sheetIdcard'})
|
||
}).catch( err => {
|
||
uni.showToast({
|
||
title: err.message,
|
||
icon: "none"
|
||
})
|
||
})
|
||
},
|
||
|
||
// 状态
|
||
judgeGeneral(){
|
||
// 获取微信授权信息
|
||
authFollow({
|
||
url: 'https://web.douhuofalv.com/webview/webCode'
|
||
// url: 'https://web.douhuotest.douhuofalv.com/webview/webCode'
|
||
}).then(res => {
|
||
window.location.href = res
|
||
}).catch(err => {
|
||
uni.showToast({
|
||
title: err.message,
|
||
icon: "none"
|
||
})
|
||
})
|
||
|
||
// 关闭公众号
|
||
this.generalShow = false
|
||
}
|
||
}
|
||
}
|
||
</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;
|
||
&.active {
|
||
padding-top: 70rpx;
|
||
}
|
||
.endedAt {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
display: inline-block;
|
||
color: #2c3c66;
|
||
width: 100%;
|
||
text-align: center;
|
||
.endedAt-time {
|
||
background-image: -webkit-linear-gradient(40deg,#f1c593, #fef9f2);
|
||
margin: 0 auto;
|
||
display: inline-block;
|
||
padding: 0 20rpx;
|
||
line-height: 52rpx;
|
||
font-size: 26rpx;
|
||
border-radius: 0 0 5rpx 5rpx;
|
||
color: #582700;
|
||
}
|
||
}
|
||
.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 40rpx 0;
|
||
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;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// 关注
|
||
.tipsBack {
|
||
position: fixed;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
left: 0;
|
||
top: 0;
|
||
z-index: 9;
|
||
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: 10;
|
||
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;
|
||
}
|
||
|
||
.tipsWhite-btn {
|
||
display: flex;
|
||
padding: $padding 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: $radius-m;
|
||
&:first-child {
|
||
color: #333333;
|
||
background-color: #ffffff;
|
||
border: 2rpx solid #cccccc;
|
||
}
|
||
}
|
||
}
|
||
|
||
// 打款凭证弹出
|
||
.voucherBack {
|
||
position: fixed;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
left: 0;
|
||
top: 0;
|
||
z-index: 99;
|
||
background-color: rgba(0, 0, 0, .6);
|
||
display: none;
|
||
&.active {
|
||
display: block;
|
||
}
|
||
}
|
||
.voucherPop {
|
||
-webkit-box-orient: vertical;
|
||
-webkit-box-pack: center;
|
||
position: fixed;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
z-index: 100;
|
||
padding: 0 10%;
|
||
box-sizing: border-box;
|
||
display: none;
|
||
&.active {
|
||
display: -webkit-box;
|
||
}
|
||
.tipsWhite {
|
||
background-color: #ffffff;
|
||
border-radius: 20rpx;
|
||
position: relative;
|
||
.voucherPop-img {
|
||
position: absolute !important;
|
||
top: -80rpx;
|
||
right: calc(50% - 100rpx);
|
||
width: 200rpx;
|
||
}
|
||
.voucherPop-title {
|
||
box-sizing: border-box;
|
||
padding: 50rpx 70rpx;
|
||
margin-top: 100rpx;
|
||
text-align: center;
|
||
.voucherPop-name {
|
||
font-weight: 600;
|
||
font-size: 38rpx;
|
||
}
|
||
.voucherPop-text {
|
||
padding: 30rpx 0 35rpx;
|
||
line-height: 44rpx;
|
||
}
|
||
.voucherPop-btn {
|
||
display: flex;
|
||
.voucherPop-go {
|
||
flex: 2;
|
||
text-align: center;
|
||
border: 2rpx solid #da2b56;
|
||
color: #da2b56;
|
||
margin: 0 15rpx;
|
||
line-height: 74rpx;
|
||
border-radius: 10rpx;
|
||
background-color: #ffffff;
|
||
&.voucherPop-up {
|
||
background-color: #da2b56;
|
||
color: #ffffff;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</style> |