[综法]
This commit is contained in:
@@ -6,13 +6,19 @@
|
||||
<view class="title-name"><text>企业法律咨询服务包</text></view>
|
||||
<view class="title-text">legal advice</view>
|
||||
</view>
|
||||
<view class="item" :class="{active : item.service_order != null}" v-for="(item, index) in synthesisArr" :key="index">
|
||||
<view class="endedAt" v-if="item.service_order">
|
||||
<view class="endedAt-time">到期时间:{{item.service_order.ended_at}}</view>
|
||||
<view class="item" :class="{active : item.service_user != null}" v-for="(item, index) in synthesisArr" :key="index">
|
||||
<view class="endedAt" v-if="item.service_user">
|
||||
<view class="endedAt-time">到期时间:{{item.service_user.ended_at}}</view>
|
||||
</view>
|
||||
<view class="top">
|
||||
<view class="top-title">{{item.title}}</view>
|
||||
<view class="top-btn" @click="$Router.push({name: 'StandWrite', params: {serveId: item.synthesis_service_id}})">{{item.is_open ? '续费' : '开通'}}</view>
|
||||
<view class="top-btn" :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 class="range">
|
||||
<view class="range-label">
|
||||
@@ -58,19 +64,74 @@
|
||||
</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="@/static/imgs/general_back.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">
|
||||
<!-- @click="cancelPay" -->
|
||||
<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: [], //企业-年费服务包列表
|
||||
synthesisArr : [], //企业-年费服务包列表
|
||||
generalShow : false ,// 公众号
|
||||
voucherState : false, // 上传凭证弹出
|
||||
orderId : '', // 订单 ID
|
||||
orderType : '', // 订单类型
|
||||
orderPrice : '', // 订单金额
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
created() {},
|
||||
|
||||
|
||||
onShow() {
|
||||
// 获取-个人-年费服务包列表
|
||||
this.yearServe();
|
||||
},
|
||||
@@ -88,6 +149,138 @@
|
||||
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 => {}
|
||||
})
|
||||
},
|
||||
|
||||
// 取消支付
|
||||
// cancelPay() {
|
||||
// this.voucherState = false
|
||||
// uni.showToast({
|
||||
// title: '取消支付',
|
||||
// icon : 'none'
|
||||
// })
|
||||
// setTimeout(()=>{
|
||||
// this.$Router.replace({name: 'YearOrder', params: {yearType: 2}})
|
||||
// },3000)
|
||||
// },
|
||||
|
||||
// 上传凭证
|
||||
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: 'StandWrite',
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,6 +385,9 @@
|
||||
padding: 0 30rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 8rpx 6rpx rgba(0, 0, 0, .3);
|
||||
&.hide{
|
||||
opacity: .7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.range {
|
||||
@@ -268,4 +464,153 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 关注
|
||||
.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>
|
||||
Reference in New Issue
Block a user