This commit is contained in:
2023-05-23 16:47:13 +08:00
parent b84661015a
commit aa1312f5da
17 changed files with 1280 additions and 139 deletions

View File

@@ -1,17 +1,17 @@
<template>
<view class="content">
<view class="orderTab">
<view class="orderTab-item" :class="{active : entrustId == item.entrust_id}" @click="tabClick(item.entrust_id, item.title)" v-for="(item, index) in entrustArr" :key="index">
<view class="orderTab-item" :class="{active : entrustId == item.entrust_id}" @click="tabClick(item.entrust_id, item.type.value)" v-for="(item, index) in entrustArr" :key="index">
<text>{{item.title}}</text>
</view>
</view>
<view class="module">
<view class="entrustTop">
<image class="entrustTop-img" :src="entrustData.cover" mode="widthFix"></image>
<view class="entrustTop-btn" @click="seekClick">立即咨询 ></view>
<view class="entrustTop-btn" @click="seekClick">立即购买 ></view>
</view>
<view class="entrustCont">
<block v-if="title == '民事诉讼'">
<block v-if="type == 0">
<view class="entrustCivil">
<view class="entrustCivil-top">
<view class="entrustCivil-top-name">民事诉讼阶段</view>
@@ -29,7 +29,7 @@
</view>
</view>
</block>
<block v-else-if="title == '刑事辩护'">
<block v-else-if="type == 1">
<view class="entrustBrief">
<view class="entrustBrief-title">
<image class="entrustBrief-title-img" src="https://cdn.douhuofalv.com/images/2023/04/18/4d57907913a7d9ca5f3c7417421c894d.png" mode="aspectFill"></image>
@@ -46,7 +46,7 @@
</view>
<image class="entrustBrief-text" src="https://cdn.douhuofalv.com/images/2023/04/18/e0dbc0ce562b479b9ff3ad3820971612.png" mode="widthFix"></image>
</block>
<block v-else-if="title == '行政诉讼'">
<block v-else-if="type == 2">
<view class="entrustPolitics">
<view class="entrustPolitics-item">
<view class="entrustPolitics-back">
@@ -89,19 +89,46 @@
</view>
<image class="entrustBottom" src="https://cdn.douhuofalv.com/images/2023/04/18/f08e45875d7dba6c3116690978a8a999.png" mode="widthFix"></image>
</view>
<!-- 关注公众号 -->
<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>
</template>
<script>
import { judgeReal } from '@/apis/interfaces/user'
import { authFollow } from '@/apis/interfaces/index'
import { entrustList, entrustInfo, entrustSon } from '@/apis/interfaces/synthesis'
export default {
data() {
return {
title : '',
type : '',
entrustId : '',
sonArr : [], // 民事子分类
entrustData: '', // 案件委托详情
entrustArr : [], // 案件委托列表
generalShow : false // 公众号
}
},
@@ -117,12 +144,12 @@
this.entrustArr = res
if(this.entrustId == '') {
this.entrustId = res[0].entrust_id
this.title = res[0].title
this.type = res[0].type.value
}
// 获取-案件委托-详情
this.yearInfo();
if(this.title == '民事诉讼') {
if(this.type == 0) {
// 获取-案件委托子分类
this.yearSon();
}
@@ -159,10 +186,10 @@
},
// 顶级
tabClick(id, title) {
tabClick(id, type) {
this.entrustId = id
this.title = title
if(title == '民事诉讼') {
this.type = type
if(type == 0) {
// 获取-案件委托子分类
this.yearSon();
}
@@ -171,13 +198,52 @@
this.yearInfo();
},
// 立即咨询
seekClick() {
if(this.title == '民事诉讼') {
this.$Router.push({name: 'EntrustCivil', params: {entrustId: this.entrustId}})
return
}
this.$Router.push({name: 'EntrustWrite', params: {entrustId: this.entrustId}})
// 判断是否认证
judgeReal().then(res => {
if(res.has_sign) {
if(!res.has_subscribe) {
// 弹出公众号
this.generalShow = true
} else {
if(this.type == 0) {
this.$Router.push({name: 'EntrustCivil', params: {entrustId: this.entrustId}})
return
}
this.$Router.push({name: 'EntrustWrite', params: {entrustId: this.entrustId}})
}
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
}
}
}
@@ -462,4 +528,80 @@
.entrustBottom {
width: 100%;
}
// 关注
.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;
}
}
}
</style>