[新增5大业务模块]

This commit is contained in:
2024-03-01 09:41:35 +08:00
parent 788c1e7af4
commit d71b91162b
19 changed files with 2103 additions and 581 deletions

View File

@@ -13,7 +13,7 @@
"type" : "uniCloud"
},
{
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android"
},
{

View File

@@ -10,8 +10,8 @@ import router from '../router'
// 基础配置
const config = {
apiUrl : 'https://douhuo.douhuofalv.com/api/',
// apiUrl : 'https://douhuo.demos.uzchain.tech/api/', //测试环境
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
apiUrl : 'https://douhuo.demos.uzchain.tech/api/', //测试环境
timeout : 60000
}

View File

@@ -120,6 +120,74 @@ const delegationCancel = id => {
})
}
// **
// 最新五大板块
// **
// 业务列表
const bigfive = data => {
return request({
url : "bigfive/index",
data
})
}
// 业务详情
const bigfiveInfo = (bigFive) => {
return request({
url : "bigfive/" + bigFive + "/info"
})
}
// 办理初始接口
const bigfiveInit = (bigFive) => {
return request({
url : "bigfive/order/" + bigFive + "/init"
})
}
// 标的额比例计算
const settleAmount = (data, bigFive) => {
return request({
url : "bigfive/order/" + bigFive + "/settle_amount",
method : "POST",
data
})
}
// 三级分类服务费类型
const amountType = (bigFive) => {
return request({
url : "bigfive/order/" + bigFive + "/amount_type",
method : "POST"
})
}
// 办理业务
const bigfiveStore = data => {
return request({
url : "bigfive/order/store",
method : "POST",
data
})
}
// 订单列表
const orderLists = data => {
return request({
url : "bigfive/order/lists",
data
})
}
// 订单取消
const orderCancel = (order) => {
return request({
url : "bigfive/order/" + order + "/cancel",
method : "DELETE"
})
}
export {
categories,
jf,
@@ -135,6 +203,15 @@ export {
delegation,
delegationFrom,
delegationOrder,
delegationCancel
delegationCancel,
bigfive,
bigfiveInfo,
bigfiveInit,
settleAmount,
amountType,
bigfiveStore,
orderLists,
orderCancel
}

View File

@@ -2,8 +2,8 @@
"name" : "抖火法律",
"appid" : "__UNI__C305C03",
"description" : "纵有疾风起,人生不言弃",
"versionName" : "1.6.5",
"versionCode" : 1065,
"versionName" : "1.5.3",
"versionCode" : 1053,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@@ -939,6 +939,69 @@
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#353ef4"
}
},
{
"path" : "pages/business/list",
"name" : "businessList",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/info",
"name" : "businessInfo",
"style" : {
"navigationBarTitleText" : "详情",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/bigFive",
"name" : "businessBigFive",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/handle",
"name" : "businessHandle",
"style" : {
"navigationBarTitleText" : "业务办理",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/other",
"name" : "businessOther",
"style" : {
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/order",
"name" : "businessOrder",
"style" : {
"navigationBarTitleText" : "订单列表",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/business/orderInfo",
"name" : "businessOrderInfo",
"style" : {
"navigationBarTitleText" : "订单详情",
"enablePullDownRefresh" : false,
"navigationBarBackgroundColor": "#FFFFFF"
}
}],
"globalStyle": {
"navigationBarTextStyle": "black",

156
pages/business/bigFive.vue Normal file
View File

@@ -0,0 +1,156 @@
<template>
<view class="create-page">
<block v-if="childrenArr.length > 0">
<view class="create-title">创建新的订单</view>
<view class="create-submit">选择业务类型</view>
<view class="create-from">
<view class="create-type">
<block v-for="(item, index) in childrenArr" :key="index">
<view class="create-type-item" :class="{'active': (item.id == businessId)}" @click="onBusiness(item.id)">
<image class="create-type-icon" :src="item.cover" mode="aspectFill"></image>
<view class="create-type-text">
<view class="title nowrap">{{item.title || '-'}}</view>
<view class="submit nowrap">{{item.subtitle}}</view>
</view>
</view>
</block>
</view>
<view class="create-btn">
<button size="default" @click="onNext()">下一步</button>
</view>
</view>
</block>
<!-- 订单是空的 -->
<view class="order-null" v-else>
<u-empty
mode="order"
icon="http://cdn.uviewui.com/uview/empty/order.png"
text="暂无可创建订单"
>
</u-empty>
</view>
</view>
</template>
<script>
import { bigfiveInit } from '@/apis/interfaces/index.js'
export default {
data() {
return {
childrenArr: [],
businessId : '',
}
},
onLoad() {
},
onShow() {
const parentData = JSON.parse(decodeURIComponent(this.$Route.query.children))
this.childrenArr = parentData
this.businessId = this.childrenArr[0].id
},
methods: {
// 选择业务类型
onBusiness(id){
this.businessId = id
},
// 创建业务单
onNext(){
const synthesisObj = this.childrenArr.find(val => val.id === this.businessId)
// 办理初始接口
bigfiveInit(synthesisObj.id).then(res=>{
console.log(synthesisObj.id)
this.onNav('businessHandle', { record: encodeURIComponent(JSON.stringify(res)), bigFiveId: synthesisObj.id })
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 跳转
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
}
}
</script>
<style lang="scss">
.create-page{
padding: 50rpx;
box-sizing: border-box;
min-height: 100vh;
overflow: hidden;
.create-title{
text-align: center;
font-weight: bold;
font-size: 44rpx;
}
.create-submit{
text-align: center;
font-size: 30rpx;
color: gray;
padding-top: 10rpx;
}
// 选择业务类型
.create-type{
padding-top: 30rpx;
.create-type-title{
text-align: center;
line-height: 50rpx;
color: gray;
font-size: 30rpx;
}
.create-type-item{
background: #f8f8f8;
border-radius: $radius;
padding: 30rpx;
margin-top: 30rpx;
border:solid 1rpx #f8f8f8;
box-sizing: border-box;
display: flex;
align-items: center;
.create-type-icon{
width: 74rpx;
height: 74rpx;
margin-right: $margin;
}
.create-type-text{
line-height: 40rpx;
.title{
font-size: 30rpx;
}
.submit{
color: gray;
font-size: 26rpx;
}
}
&.active{
border:solid 1rpx $main-color;
}
}
}
// 按钮
.create-btn{
margin-top: 90rpx;
button[size="default"]{
height: 100rpx;
line-height: 100rpx;
background: $main-color;
font-size: 32rpx;
color: white;
font-weight: bold;
&::after{
border: none;
}
}
}
}
</style>

204
pages/business/handle.vue Normal file
View File

@@ -0,0 +1,204 @@
<template>
<view class="from-content">
<view class="from-block" v-if="pickerArr.length > 0" >
<view class="from-block-item">
<label>办理业务</label>
<picker class="from-block-val" :range="pickerArr" :value="pickerIndex" range-key="title" @change="pickerChange">
<view class="from-block-picker nowrap">{{pickerArr[pickerIndex].title}}
<u-icon class="from-block-picker-icon" name="arrow-down" color="#555" size="15"></u-icon>
</view>
</picker>
</view>
</view>
<view class="from-block">
<view class="from-block-item">
<label>标的额</label>
<input class="from-block-val from-block-input" type="number" placeholder="请输入标的额" @input="onKeyInput" />
</view>
<view class="from-block-item" v-if="pickertype != 'free'">
<label>服务费</label>
<input class="from-block-val from-block-input" type="number" :value="price || '0'" disabled />
</view>
<view class="from-block-item" v-else>
<label>服务费</label>
<input class="from-block-val from-block-input" type="number" placeholder="请输入客户服务费(元)" v-model="priceValue" />
</view>
<view class="from-block-item">
<label>客户姓名</label>
<input class="from-block-val from-block-input" placeholder="请输入客户姓名" v-model="name" />
</view>
<view class="from-block-item">
<label>手机号码</label>
<input class="from-block-val from-block-input" type="number" placeholder="请输入客户手机号码" v-model="phone" maxlength="11" />
</view>
</view>
<button class="from-btn" @click="onSubmit">提交办理</button>
</view>
</template>
<script>
import { customTypes,customTypeStore } from '@/apis/interfaces/custom.js'
import { settleAmount, amountType, bigfiveStore } from '@/apis/interfaces/index.js'
export default {
data() {
return {
pickerArr : [],
pickerIndex : 0,
pickertype : '',
name : '',
phone : '',
price : '',
priceValue : '',
amount : ''
};
},
onShow() {
const parentData = JSON.parse(decodeURIComponent(this.$Route.query.record))
this.pickerArr = parentData.child.data
this.pickertype = parentData.type
},
methods: {
// 获取标的额
onKeyInput(e) {
this.amount = e.detail.value
this.settleInfo()
},
// 标的额比例计算
settleInfo() {
settleAmount({amount: this.amount}, this.$Route.query.bigFiveId).then(res => {
this.price = res.price
}).catch(err => {
this.price = 0
uni.showToast({
title: err.message,
icon : 'none',
mask:true,
duration:3000
})
})
},
// 选择办理业务
pickerChange(e) {
this.pickerIndex = e.detail.value
// 获取三级分类服务费类型
this.amountTypeInfo();
},
// 三级分类服务费类型
amountTypeInfo() {
amountType(this.$Route.query.bigFiveId).then(res => {
this.pickertype = res.type
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none',
mask:true,
duration:3000
})
})
},
// 提交表单
onSubmit(){
let { name, phone, pickerIndex, price, priceValue, amount, pickerArr, pickertype} = this
if(pickertype != 'free') {
if(amount === ''){
uni.showToast({
title: '请输入标的额',
icon : 'none'
})
return
}
} else {
if(priceValue === ''){
uni.showToast({
title: '请输入服务费金额',
icon : 'none'
})
return
}
}
if(name === ''){
uni.showToast({
title: '请输入客户姓名',
icon : 'none'
})
return
}
if(phone === ''){
uni.showToast({
title: '请输入客户手机号码',
icon : 'none'
})
return
}
uni.showLoading({
title: "提交中...",
mask : true
})
let params = {
big_id : pickerArr.length > 0 ? pickerArr[pickerIndex].id : this.$Route.query.bigFiveId,
name : name,
amount : amount || '',
mobile : phone,
price : pickertype == 'free' ? priceValue : price
}
bigfiveStore(params).then(res => {
let { order_type, order_id, order_no } = res;
this.$Router.replace({
name : 'Pay',
params : {
paytype : 'synthesize',
orderId : order_id,
orderType : order_type.replace(/\\/g, '-')
},
})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none',
mask:true,
duration:3000
})
})
}
}
}
</script>
<style lang="scss">
.from-content{
min-height: 100vh;
padding: 30rpx;
background: #f7f8f9;
}
.from-block{
background: white;
border-radius: 20rpx;
margin-bottom: 30rpx;
padding: 0 30rpx;
}
.from-block-item{
min-height: 70rpx;
display: flex;
font-size: 32rpx;
border-bottom: solid 1rpx #f3f3f3;
padding: 15rpx 0;
&:last-child{ border: none; }
label{ width: 200rpx; line-height: 70rpx; }
.from-block-val{ width: calc(100% - 200rpx); text-align: right; line-height: 70rpx;
&.price{ color: $main-color; font-weight: bold; }
}
.from-block-input{ height: 70rpx; font-size: 32rpx; }
.from-block-picker{ padding-right: 50rpx; position: relative; }
.from-block-picker-icon{ position: absolute; right: 0; top: 50%; margin-top: -15rpx; }
}
.from-btn{ width: 100%; background-color: $main-color; color: white; line-height: 95rpx; height: 95rpx; border-radius: 45rpx; font-size: 32rpx; font-weight: bold;
&::after{ display: none; }
}
</style>

67
pages/business/info.vue Normal file
View File

@@ -0,0 +1,67 @@
<template>
<view class="content">
<image class="infoBack" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/10a4a33eb939fe721f934ec82fabb340.png" mode="widthFix"></image>
<view class="infoCont">
<view class="infoWrite">
<image class="infoCont-mark" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/ca5ec8654ee1f2de5bfc1858a1415aef.png" mode="heightFix"></image>
<image class="infoCont-hot" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/053632a2a4c63fd50a0f2cde9835a152.png" mode="widthFix"></image>
<image class="infoCont-seal" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/2df98978be66b60985c88eea95f091e5.png" mode="widthFix"></image>
<view class="infoCont-title">{{bigFiveInfo.title}}</view>
<view class="infoCont-text">
<view class="infoCont-text-star"></view>
<view class="infoCont-text-subtitle">{{bigFiveInfo.subtitle}}</view>
</view>
<view class="infoCont-text">
<!-- <view class="infoCont-text-star"></view> -->
<view class="infoCont-text-tips">{{bigFiveInfo.remark}}</view>
</view>
</view>
</view>
<image class="infoBottom" src="https://douhuo-storage.oss-cn-beijing.aliyuncs.com/images/2024/02/20/b99c7e15d011e53e8eed7dc16a84d6cf.png" mode="widthFix"></image>
</view>
</template>
<script>
import { bigfiveInfo } from '@/apis/interfaces/index.js'
export default {
data() {
return {
bigFiveInfo: ''
}
},
onShow() {
this.bigfiveIndex()
},
methods: {
// 最新五大板块
bigfiveIndex(){
bigfiveInfo(this.$Route.query.bigFive).then(res=>{
this.bigFiveInfo = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
}
}
</script>
<style lang="scss" scoped>
.content{background: #070b30; overflow-y: scroll;}
.infoBack {width: 100%;}
.infoCont {padding: 0 $padding; box-sizing: border-box; margin-top: -100rpx; position: relative; z-index: 99;}
.infoWrite {background-color: #ffffff; padding: $padding + 10 $padding 90rpx; box-sizing: border-box; position: relative;}
.infoCont-mark {position: absolute; top: 10%; left: 20%;}
.infoCont-hot {width: 130rpx;position: absolute; top: 0; right: 0;}
.infoCont-seal {width: 160rpx;position: absolute; bottom: -80rpx; right: $padding;}
.infoCont-title {color: #003a95; font-size: $title-size + 12; font-weight: bold; margin-bottom: $margin;}
.infoCont-text {color: #111111; line-height: 52rpx; font-size: $title-size; display: flex;}
.infoCont-text-subtitle {font-weight: 600; margin-bottom: 20rpx;}
.infoCont-text-star {padding-right: 10rpx;}
.infoBottom {width: 100%; position: relative; bottom: 0; left: 0;}
</style>

51
pages/business/list.vue Normal file
View File

@@ -0,0 +1,51 @@
<template>
<view class="content">
<view class="list">
<view class="item" v-for="(item, index) in childrenArr" :key="index">
<view class="item-number"><text>0{{index + 1}}</text></view>
<view class="nowrap item-name">{{item.title}}</view>
<view class="nowrap item-text">{{item.subtitle}}</view>
<view class="item-more">
<view class="item-more-name" @click="onNav(item.id)">点击查看详情</view>
<view class="footer-tool-label-icon"><u-icon name="arrow-right" size="16" /></view>
</view>
</view>
</view>
</view>
</template>
<script>
import { bigfive } from '@/apis/interfaces/index.js'
export default {
data() {
return {
childrenArr: []
}
},
onLoad() {
},
onShow() {
const parentData = JSON.parse(decodeURIComponent(this.$Route.query.children))
this.childrenArr = parentData
},
methods: {
// 跳转
onNav(id){
this.$Router.push({name: 'businessInfo', params:{bigFive:id}})
},
}
}
</script>
<style lang="scss" scoped>
.list {padding: $padding; box-sizing: border-box;}
.item {background-color: #ffffff; border-radius: $radius; position: relative;padding: $padding; box-sizing: border-box; overflow: hidden; margin-bottom: $margin;}
.item-name {font-weight: bold; font-size: $title-size + 8; color: #c92453;}
.item-text {font-size: $title-size; color: #111111; line-height: 54rpx; padding: $padding 0;}
.item-more {color: #666666; border-top: 2rpx solid #eeeeee;display: flex; line-height: 44rpx; font-size: $title-size; padding-top: $padding;}
.item-more-name {flex: 1;}
.footer-tool-label-icon {line-height: 44rpx; padding-top: 4rpx; font-weight: 600;}
.item-number {background-color: #fea6cd; position: absolute; right: 0; top: 0; color: #c92553; font-weight: bold; font-size: $title-size + 2; border-radius: 0 $radius 0 $radius + 20; overflow: hidden; padding: 0 $padding - 20rpx 0 $padding - 10;}
.item-number::after {position: absolute; content: ''; bottom: -48%; left: -78%; background-color: #ffc8e7; width: 200%; height: 100%; z-index: 9; border-radius: 100%;transform: rotate(45deg);}
.item-number text {transform: rotate(45deg); display: inline-block; margin: 5rpx 0 10rpx;}
</style>

339
pages/business/order.vue Normal file
View File

@@ -0,0 +1,339 @@
<template>
<view class="content">
<!-- tabs -->
<u-sticky bgColor="#FFF" zIndex="9" >
<u-tabs
:current="tabsCurrent"
:list="tabs"
keyName="value"
lineColor="#446EFE"
:scrollable="tabs.length > 5"
:activeStyle="{
color: '#111',
fontWeight: 'bold',
fontSize: '32rpx'
}"
:inactiveStyle="{
color: '#606266',
fontSize: '30rpx'
}"
@click="onTabs"
></u-tabs>
</u-sticky>
<!-- 订单列表 -->
<view class="orders" v-if="orders.length > 0">
<view class="orders-item" v-for="(item, index) in orders" :key="index">
<view class="orders-flex">
<view class="no nowrap" @click="copyNo(item.order_no)">
{{item.order_no}}
</view>
<view class="state">{{item.status.text}}</view>
</view>
<view class="orders-content">
<view class="orders-content-item">
<label>业务类型</label>
<view class="nowrap">{{item.title}}</view>
</view>
<view class="orders-content-item">
<label>客户姓名</label>
<view class="nowrap">{{item.name}}</view>
</view>
<view class="orders-content-item">
<label>手机号码</label>
<view class="nowrap">{{item.mobile}}</view>
</view>
<view class="orders-content-item" v-if="item.amount != ''">
<label>标的额</label>
<view class="nowrap">{{item.amount}}</view>
</view>
<view class="orders-content-item" v-if="item.price != ''">
<label>服务费</label>
<view class="nowrap">{{item.price}}</view>
</view>
<view class="orders-content-item">
<label>创建时间</label>
<view class="nowrap">{{item.created_at}}</view>
</view>
<view class="orders-content-item" v-if="item.paid_at != ''">
<label>支付时间</label>
<view class="nowrap">{{item.paid_at}}</view>
</view>
</view>
<view class="orders-flex">
<view class="price">{{item.price}}</view>
<view class="btns">
<view class="btns-item border" v-if="item.can.cancel" @click="onCancel(item)">取消订单</view>
<view class="btns-item" v-if="item.can.pay" @click="onPay(item)">立即支付</view>
<view class="btns-item" v-if="item.can.look" @click="onInfo(item)">查看详情</view>
</view>
</view>
</view>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</view>
<!-- 订单是空的 -->
<view class="order-null" v-else>
<u-empty
mode="order"
icon="http://cdn.uviewui.com/uview/empty/order.png"
text="暂无相关订单"
>
</u-empty>
</view>
</view>
</template>
<script>
import { orderLists, orderCancel } from '@/apis/interfaces/index.js'
export default {
data() {
return {
tabs : [{ id: '', value: '全部' }],
tabsCurrent : 0,
tabsId : '',
orders : [],
pagesShow : false,
page : {
current : 1,
has_more: false,
},
status : ''
};
},
onShow() {
this.getOrder()
},
methods: {
// 筛选分类
onTabs(e){
let { id, index } = e;
this.tabsCurrent = index
this.tabsId = id
this.page = { current: 1, has_more: false }
this.getOrder()
},
// 获取订单列表
getOrder(){
let { tabsId, tabs, orders, page } = this
orderLists({
big_id : this.$Route.query.bigId,
status : tabsId,
page : page.current
}).then(res => {
let { status, lists } = res;
this.tabs = [{ id: '', value: '全部' }].concat(status)
this.orders = lists.page.current == 1 ? lists.data : this.orders.concat(lists.data)
this.page = lists.page
this.pagesShow = false
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 取消订单
onCancel(e){
let { order_id } = e;
uni.showModal({
title : "提示",
content : "确认取消当前订单嘛?",
cancelText : "取消",
confirmColor: "#446EFE",
success : modalRes => {
if(modalRes.confirm){
uni.showLoading({
title: "加载中...",
mask : true
})
orderCancel(order_id).then(res => {
uni.showToast({
title: '订单已取消',
icon : 'none'
})
this.page = { current: 1, has_more: false }
this.getOrder()
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
})
},
// 订单详情
onInfo(obj){
this.$Router.push({
name : 'businessOrderInfo',
params : {
orderId : obj.order_id,
orderType : obj.order_type.replace(/\\/g, '-')
}
})
},
// 复制订单号码
copyNo(no){
uni.setClipboardData({
data : no,
success : res => {
uni.showToast({
title: '订单号已复制',
icon : 'none'
})
}
})
},
// 去支付
onPay(obj){
let { order_id, order_type, paid_at } = obj
if(paid_at == ''){
this.$Router.push({
name : 'Pay',
params : {
paytype : 'synthesize',
orderId : order_id,
orderType : order_type.replace(/\\/g, '-')
},
})
}
}
},
onReachBottom() {
this.pagesShow = true;
if(this.page.has_more){
this.status = 'loading';
this.page.current++
this.getOrder()
return
}
this.status = 'nomore';
}
}
</script>
<style lang="scss">
// 订单列表
.orders{
padding: 30rpx 0 10rpx;
.orders-item{
margin: 0 30rpx 20rpx;
background-color: white;
border-radius: $radius;
}
.orders-content{
padding: 20rpx 30rpx;
&-item{
line-height: 70rpx;
display: flex;
justify-content: space-between;
font-size: 30rpx;
color: #111111;
label{
color: #999999;
width: 200rpx;
}
.orders-content-btn{
color: $main-color;
}
&.orders-content-bottom{
padding-right: 40rpx;
position: relative;
.orders-content-icon{
position: absolute;
right: 0;
top: 0;
}
}
}
&-type{
text{
margin-right: 30rpx;
position: relative;
display: inline-block;
&::after{
position: absolute;
content: "/";
width: 30rpx;
text-align: center;
font-size: 30rpx;
top: 0;
right: -30rpx;
}
&:last-child{
margin-right: 0;
&::after{
display: none;
}
}
}
}
&-block{
background: rgba(68, 110, 254, .03);
padding: 20rpx;
font-size: 28rpx;
border-radius: 10rpx;
margin: 10rpx 0;
.item-flex{
display: flex;
justify-content: space-between;
line-height: 50rpx;
}
}
}
.orders-flex{
border-bottom: solid 1rpx #F6F6F6;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx $padding;
&:last-child{
border-top: solid 1rpx #F6F6F6;
border-bottom: none;
}
.no{
font-size: 30rpx;
color: #111;
line-height: 60rpx;
width: calc(100% - 150rpx);
}
.state{
color: $main-color;
font-weight: bold;
font-size: 30rpx;
line-height: 60rpx;
width: 150rpx;
text-align: right;
}
.price{
font-weight: bold;
color: $main-color;
}
.btns{
width: 400rpx;
text-align: right;
.btns-item{
display: inline-block;
height: 70rpx;
line-height: 70rpx;
background: $main-color;
color: white;
border-radius: 35rpx;
padding: 0 30rpx;
font-size: 30rpx;
&.border{
border: solid 1rpx $main-color;
color: $main-color;
background: white;
height: 68rpx;
line-height: 68rpx;
&::after{ display: none;}
}
&:last-child{ margin-left: 30rpx; }
}
}
}
}
</style>

View File

@@ -0,0 +1,124 @@
<template>
<view class="info-content">
<view class="block">
<view class="block-item">
<view class="block-item-flex" v-for="(item, index) in objArr" :key="index">
<label>{{item.name}}</label>
<view class="val">{{item.value}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { unifyInfo } from '@/apis/interfaces/order.js'
export default {
data() {
return {
objArr: []
};
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
unifyInfo({
order_type : this.$Route.query.orderType.replace(/\-/g, '\\'),
order_id : this.$Route.query.orderId
}).then(res => {
console.log(res)
uni.hideLoading()
this.objArr = res;
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
</script>
<style lang="scss" scoped>
.info-content{
position: relative;
background: #eeefff;
min-height: 100vh;
box-sizing: border-box;
padding-bottom: 10rpx;
padding-top: 30rpx;
&::before{
background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
height: 50vh;
content: " ";
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
// 模块
.block{
background: white;
position: relative;
z-index: 1;
margin: 0 40rpx 30rpx;
border-radius: 20rpx;
.block-header{
padding: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title{
width: calc(100% - 200rpx);
text{
font-size: 30rpx;
line-height: 30rpx;
color: gray;
}
view{
font-weight: bold;
font-size: 40rpx;
line-height: 50rpx;
@extend .nowrap;
}
}
.price{
text-align: right;
width: 200rpx;
padding-left: 20rpx;
text{
font-size: 30rpx;
line-height: 30rpx;
color: gray;
}
view{
font-weight: bold;
font-size: 40rpx;
color: #353ef4;
line-height: 50rpx;
@extend .nowrap;
}
}
}
.block-item{
padding: 32rpx;
.block-item-flex{
padding: 20rpx 0;
font-size: 30rpx;
display: flex;
color: #555;
justify-content: space-between;
label{ width: 240rpx; }
.val{
text-align: right;
width: calc(100% - 240rpx);
}
}
}
}
}
</style>

127
pages/business/other.vue Normal file
View File

@@ -0,0 +1,127 @@
<template>
<view class="content">
<view class="flex">
<view class="flex-item" @click="onNav('ConsultWork')">
<image class="flex-icon" src="/static/icons/icon_00.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">协商调解咨询类</view>
<view class="flex-tips">信用卡贷款业务</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('AccountWork')">
<image class="flex-icon" src="/static/icons/work_icon_30.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">账户管理咨询类</view>
<view class="flex-tips">客户账户管理咨询类订单</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('DelegationWork')">
<image class="flex-icon" src="/static/icons/work_icon_29.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">委托管理类</view>
<view class="flex-tips">客户委托管理类订单</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('ServiceWork')">
<image class="flex-icon" src="/static/icons/icon_01.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">法律咨询类</view>
<view class="flex-tips">个人企业法律</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('ActionWork')">
<image class="flex-icon" src="/static/icons/icon_02.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">诉讼委托咨询类</view>
<view class="flex-tips">案件委托拓展服务</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('EnableWork')">
<image class="flex-icon" src="/static/icons/icon_03.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">增收赋能咨询类</view>
<view class="flex-tips">销售领袖演说等</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('AccountWork2')">
<image class="flex-icon" src="/static/icons/icon_04.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">线下订单</view>
<view class="flex-tips">线下咨询类订单</view>
</view>
<view class="flex-btn">去查看</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
},
onShow() {},
methods: {
// 跳转
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
}
}
</script>
<style lang="scss" scoped>
.content{
padding: 30rpx 0;
}
.flex{
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
&-item{
background: white;
padding: 30rpx;
border-radius: 30rpx;
margin-bottom: 30rpx;
display: flex;
box-sizing: border-box;
position: relative;
.flex-icon{ width: 48px; height: 48px; border-radius: 30rpx; }
.flex-title{
box-sizing: border-box;
padding-left: 30rpx;
.flex-name {
color: #293f66;
font-size: 34rpx;
font-weight: bold;
padding: 4rpx 0;
}
.flex-tips {
color: #929db3;
font-size: 28rpx;
}
}
.flex-btn {
position: absolute;
right: 30rpx;
top: 48rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 80rpx;
color: #468bff;
background-color: #f8fbff;
border: 2rpx solid #d8e6ff;
font-size: 28rpx;
padding: 0 25rpx;
}
}
}
</style>

View File

@@ -0,0 +1,669 @@
<template>
<view class="content">
<view class="header">
<view class="banner">
<u-swiper
class="banner-swiper"
:list="bannerArr"
:indicator="true"
keyName="cover"
previousMargin="20"
nextMargin="20"
circular
radius="10"
bgColor="#ffffff"
height="100%"
@click='swiperClick'
/>
</view>
<view class="notice">
<view class="notice-title">
<image class="notice-icon" src="@/static/index/index_notice.png" mode="widthFix" /> 公告
</view>
<u-notice-bar
icon=""
:text="notice"
url=''
linkType='navigateTo'
fontSize="14"
direction="column"
bgColor="#fff"
color="#111111"
/>
<view class="notice-more">更多<u-icon class="more-icon" size="20rpx" color="#999" name="arrow-right" /></view>
</view>
</view>
<!-- 自由服务包 -->
<view class="free" @click="onView('FreeService')">
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
</view>
<!-- 协商调解类 -->
<view class="block" v-if="false">
<view class="block-title">
<view class="title">协商调解咨询类</view>
</view>
<scroll-view class="the-tabs" scroll-x="true" >
<block v-for="(item, index) in theTabs" :key="index">
<view class="the-tabs-item" :class="{'active': item.category_id == theTabId}" @click="onTheTab(item)">{{item.title}}</view>
</block>
<view class="the-tabs-acitve-block" :style="theTabStyle"></view>
</scroll-view>
<scroll-view
class="the-flex"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item"
v-for="item in jfList"
:key="item.service_id"
:id='"_tabs"+item.service_id'
@click="sevicesClick(item.service_id)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}}<text class="ding" v-if="item.type">定金</text></view>
</view>
</scroll-view>
</view>
<!-- 账户管理咨询类 -->
<view class="block" v-if="accountData.length > 0">
<view class="block-title">
<view class="title">账户管理咨询类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
>
<block v-for="(item, index) in accountData" :key="index">
<view class="the-flex-item"
@click="onMagInfo('Account', item.id)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
</view>
</block>
</scroll-view>
</view>
<!-- 委托管理类 -->
<view class="block" v-if="delegation.length > 0">
<view class="block-title">
<view class="title">委托管理类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
>
<block v-for="(item, index) in delegation" :key="index">
<view class="the-flex-item"
@click="onMagInfo('Delegation', item.id)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
</view>
</block>
</scroll-view>
</view>
<!-- 法律咨询类 -->
<view class="block">
<view class="block-title">
<view class="title">法律咨询类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<block v-for="(item, index) in appMenus.service" :key="index">
<view class="the-flex-item"
@click="onView(item.page)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
</view>
</block>
</scroll-view>
</view>
<!-- 诉讼委托类 -->
<view class="block">
<view class="block-title">
<view class="title">诉讼委托咨询类</view>
</view>
<view class="lawsuit">
<block v-for="(item, index) in appMenus.cases" :key="index">
<view class="lawsuit-item" @click="onView(item.page)">
<view class="lawsuit-cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="lawsuit-text">
<view class="lawsuit-title nowrap">{{item.title}}</view>
<view class="lawsuit-price">{{item.price}}<text v-if="item.limit != null">{{item.limit}}</text></view>
</view>
</view>
</block>
</view>
</view>
<!-- 增收赋能类 -->
<view class="block">
<view class="block-title">
<view class="title">增收赋能咨询类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item" v-for="(item, index) in empowerArr" :key="index" @click="onEmpower(item.id)">
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}}</view>
</view>
</scroll-view>
</view>
<!-- 弹窗 -->
<u-popup :show="showAdImg" mode="center" bgColor="transparent">
<view class="ad-lay">
<view class="ad-down">
<u-count-down
ref="adCountDown"
:time="showAdTime"
:autoStart="false"
@change="timeData = $event"
@finish="showAdImg = false">
<view>
自动关闭<text>{{ timeData.seconds }}</text>S
</view>
</u-count-down>
</view>
<image class="ad-img" :src="layAdImg" mode="heightFix"></image>
<view class="ad-btn">
<u-icon
class="ad-btn-icon"
name="close-circle"
color="white"
size="36px"
@click="onRemoveAd"
></u-icon>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import { region } from '@/apis/interfaces/address.js'
import { categories, jf, index, accountManagement, delegation } from '@/apis/interfaces/index.js'
import { lists } from '@/apis/interfaces/empower.js'
export default {
data() {
return {
theTabs : [
{ category_id: '', title: '全部' }
],
theTabId : '',
theTabStyle : {
left: '0%'
},
bannerArr : [],
notice : [],
jfList:[],
defaultViewId:'',
zfList:[],
// 首次进入弹窗
timeData : {},
first : 1,
showAdTime : 0,
showAdImg : true,
layAdImg : '',
appMenus : {
cases : [],
service : []
},
// 增收赋能列表
empowerArr : [],
// 账户管理类
accountData : [],
// 委托管理类
delegation : []
}
},
onLoad() {
this.getCategory()
this.getJf()
this.getIndex()
// 增收赋能
this.getEmpower()
// 管理类业务
this.getManagement()
},
methods: {
// 获取管理类业务
getManagement(){
Promise.all([accountManagement(), delegation()]).then(res => {
let accountData = res[0]
let delegationData = res[1]
this.accountData = accountData
this.delegation = delegationData
})
},
// 查看管理类业务
onMagInfo(type, id){
this.$Router.push({
name : 'Mag' + type,
params : { id }
})
},
// 查看增收赋能详情
onEmpower(id){
this.$Router.push({
name : 'EmpowerInfo',
params : { id }
})
},
// 增收赋能接口
getEmpower(){
lists().then(res => {
this.empowerArr = res;
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 获取金法列表
getJf(){
let params = {
category_id:this.theTabId
}
jf(params).then(res=>{
if(res.length>0){
setTimeout(()=>{
this.defaultViewId = '_tabs'+res[0].service_id
},300)
}
this.jfList = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 点击金法产品跳转金法详情
sevicesClick(id){
uni.navigateTo({
url:'/pages/index/introduces?id='+id
})
},
// 首页轮播图及公告
getIndex(){
index().then(res=>{
this.bannerArr = res.bannners
this.appMenus = res.app_menus
let list = []
res.notices.map(item=>{
let params = item.user.name + ' ' + item.user.text
list.push(params)
})
this.notice = list
let { is_lay_ad, lay_ad_img, times } = res.layad
if(is_lay_ad) this.layAdImg = lay_ad_img
if(this.first === 1 && is_lay_ad){
this.showAdImg = true
this.showAdTime = times * 1000
this.$nextTick(() => {
this.$refs.adCountDown.start()
})
}
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 获取金法分类列表
getCategory(){
categories().then(res=>{
this.theTabs = this.theTabs.concat(res)
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 金法产品筛选
onTheTab(e){
if(e.category_id != this.theTabId){
let index = this.theTabs.findIndex(val => val.category_id === e.category_id)
this.theTabStyle = {
left: index * 25 + '%'
}
this.theTabId = e.category_id
this.getJf()
}
},
// 点击轮播图
swiperClick(e){
// console.log(this.bannerArr[e])
},
// 点击轮播图跳转自由服务包
onView(name){
this.$Router.push({ name })
},
// 关闭弹窗广告
onRemoveAd(){
this.first = 0;
this.showAdImg = false;
}
}
}
</script>
<style lang="scss" scoped>
.header{
background-color: white;
padding-top: 20rpx;
}
// ad弹窗广告
.ad-lay{
position: relative;
text-align: center;
.ad-down{
position: absolute;
top: 20rpx;
right: 20rpx;
z-index: 1;
background: rgba(0, 0, 0, .5);
font-size: 20rpx;
padding: 10rpx 20rpx;
line-height: 30rpx;
border-radius: 24rpx;
color: white;
.ad-down-u{
display: inline-block;
line-height: 30rpx;
}
}
.ad-img{
height: 75vh;
border-radius: 20rpx;
}
.ad-btn{
text-align: center;
margin-top: 30rpx;
.ad-btn-icon{
display: inline-block;
}
}
}
// 轮播图
.banner{
position: relative;
width: 100%;
padding-top: 43%;
.banner-swiper{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
}
// 公告
.notice{
background: white;
padding: $padding;
display: flex;
flex-direction: row;
align-items: center;
.notice-title{
background-color: #ececec;
color: #000;
height: 60rpx;
line-height: 60rpx;
width: 130rpx;
text-align: center;
font-size: 26rpx;
font-weight: bold;
border-radius: 20rpx;
.notice-icon{
width: 32rpx;
vertical-align: middle;
margin-bottom: 8rpx;
margin-right: 10rpx;
display: inline-block;
}
}
.notice-more{
font-size: 24rpx;
height: 50rpx;
border-radius: 25rpx;
box-sizing: border-box;
line-height: 50rpx;
text-align: center;
color: #999999;
.more-icon{
display: inline-block;
}
}
}
// 自由服务包
.free{
padding: $padding $padding $padding - 10 $padding ;
.free-img{
width: 100%;
}
}
// 增收赋能类
.closed{
background: white;
margin: 0 $margin;
border-radius: 35rpx;
padding-bottom: 10rpx;
.closed-item{
display: flex;
margin-bottom: 20rpx;
padding-bottom: 20rpx;
border-bottom: solid 1rpx #f8f8f8;
&:last-child{
margin-bottom: 0;
border-bottom: none;
}
.closed-cover{
width: 168rpx;
height: 168rpx;
background-size: cover;
background-position: center;
border-radius: 10rpx;
}
.closed-text{
width: calc(100% - 168rpx);
padding-left: 30rpx;
box-sizing: border-box;
.closed-title{
font-size: 32rpx;
font-weight: bold;
line-height: 50rpx;
}
.closed-subtitle{
color: gray;
font-size: 28rpx;
line-height: 40rpx;
}
.closed-price{
color: #d51959;
font-size: 34rpx;
line-height: 40rpx;
margin-top: 30rpx;
font-weight: bold;
}
}
}
}
// 诉讼委托类
.lawsuit{
padding: 0 20rpx $padding;
display: flex;
justify-content: space-between;
&-item{
background: #F6F6F6;
border-radius: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
width: calc(50% - 20rpx);
margin: 0 10rpx;
}
&-cover{
width: 138rpx;
height: 138rpx;
background-size: cover;
background-position: center;
}
&-text{
width: calc(100% - 138rpx);
padding: 0 20rpx;
box-sizing: border-box;
}
&-title{
font-size: 30rpx;
margin-bottom: 20rpx;
}
&-price{
font-size: 32rpx;
color: #d51959;
font-weight: bold;
}
}
// 经法
.the-tabs{
background: #ececec;
margin: 0 $margin;
height: 60rpx;
border-radius: 35rpx;
display: flex;
position: relative;
white-space: nowrap;
width: calc(100% - 60rpx);
&-item{
width: 25%;
line-height: 60rpx;
text-align: center;
font-size: 26rpx;
color: #454545;
transition: all .4s;
display: inline-block;
background-color: transparent;
&.active{
color: white;
position: relative;
z-index: 2;
}
}
&-acitve-block{
display: inline-block;
width: 25%;
height: 60rpx;
background-image: linear-gradient( to right, #d51959, #ec7247);
border-radius: 35rpx;
position: absolute;
left: 0;
top: 0;
transition: all .4s;
}
}
.the-flex{
padding: $padding 20rpx;
box-sizing: border-box;
white-space: nowrap;
&-item{
width: calc(33% - 20rpx);
margin: 0 10rpx;
display: inline-block;
&:last-child{
margin-right: 20rpx;
}
.cover{
width: 100%;
padding-top: 100%;
background-position: center;
background-size: cover;
background-position: center;
border-radius: 10rpx;
}
.title{
font-size: 30rpx;
color: #111111;
padding: 10rpx 0;
line-height: 40rpx;
}
.price{
line-height: 40rpx;
font-weight: bold;
color: #d51959;
font-size: 32rpx;
text{
font-size: 80%;
}
.ding{
font-size: 64%;
margin-left: 4rpx;
position: relative;
bottom: 2rpx;
}
}
}
}
// 模块
.block{
background-color: white;
border-radius: $radius;
margin: 0 $margin $margin;
.block-title{
padding: 0 $padding;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title{
font-weight: bold;
color: #111111;
font-size: 36rpx;
}
.more{
background-color: #ececec;
font-size: 28rpx;
height: 50rpx;
border-radius: 25rpx;
width: 120rpx;
padding-left: 10rpx;
box-sizing: border-box;
line-height: 50rpx;
text-align: center;
color: #454545;
.more-icon{
display: inline-block;
}
}
}
}
</style>

View File

@@ -37,138 +37,24 @@
<view class="free" @click="onView('FreeService')">
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
</view>
<!-- 协商调解类 -->
<view class="block" v-if="false">
<view class="block-title">
<view class="title">协商调解咨询类</view>
</view>
<scroll-view class="the-tabs" scroll-x="true" >
<block v-for="(item, index) in theTabs" :key="index">
<view class="the-tabs-item" :class="{'active': item.category_id == theTabId}" @click="onTheTab(item)">{{item.title}}</view>
</block>
<view class="the-tabs-acitve-block" :style="theTabStyle"></view>
</scroll-view>
<scroll-view
class="the-flex"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item"
v-for="item in jfList"
:key="item.service_id"
:id='"_tabs"+item.service_id'
@click="sevicesClick(item.service_id)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}}<text class="ding" v-if="item.type">定金</text></view>
</view>
</scroll-view>
</view>
<!-- 账户管理咨询类 -->
<view class="block" v-if="accountData.length > 0">
<view class="block-title">
<view class="title">账户管理咨询类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
>
<block v-for="(item, index) in accountData" :key="index">
<view class="the-flex-item"
@click="onMagInfo('Account', item.id)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
</view>
</block>
</scroll-view>
</view>
<!-- 委托管理类 -->
<view class="block" v-if="delegation.length > 0">
<view class="block-title">
<view class="title">委托管理类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
>
<block v-for="(item, index) in delegation" :key="index">
<view class="the-flex-item"
@click="onMagInfo('Delegation', item.id)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
</view>
</block>
</scroll-view>
</view>
<!-- 法律咨询类 -->
<view class="block">
<view class="block-title">
<view class="title">法律咨询类</view>
<view class="module" :style="{'background-color':item.bg_color,'color':item.text_color}" v-for="(item, index) in bigfiveArr" :key="index">
<view class="moduleCont" @click="onNav('businessList', item.children)">
<view class="moduleCont-text">
<view class="moduleCont-text-name">{{item.title}}</view>
<view class="nowrap moduleCont-text-tips">{{item.subtitle}}</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<block v-for="(item, index) in appMenus.service" :key="index">
<view class="the-flex-item"
@click="onView(item.page)"
>
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}} <text v-if="item.limit != null">/{{item.limit}}</text></view>
<image class="moduleCont-img" :src="item.cover" mode="widthFix"></image>
</view>
</block>
</scroll-view>
</view>
<!-- 诉讼委托类 -->
<view class="block">
<view class="block-title">
<view class="title">诉讼委托咨询类</view>
</view>
<view class="lawsuit">
<block v-for="(item, index) in appMenus.cases" :key="index">
<view class="lawsuit-item" @click="onView(item.page)">
<view class="lawsuit-cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="lawsuit-text">
<view class="lawsuit-title nowrap">{{item.title}}</view>
<view class="lawsuit-price">{{item.price}}<text v-if="item.limit != null">{{item.limit}}</text></view>
<view class="moduleInfo" @click="moduleClick(index)">
<view class="moduleInfo-text" :class="{active : item.schemesShow}">{{item.remark}}</view>
<image class="moduleInfo-more" :class="{active : item.schemesShow}" src="@/static/imgs/basic_down.png" mode="widthFix"></image>
</view>
</view>
</block>
</view>
</view>
<!-- 增收赋能类 -->
<view class="block">
<view class="block-title">
<view class="title">增收赋能咨询类</view>
</view>
<scroll-view
class="the-flex"
style="padding-top: 0;"
scroll-x="true"
scroll-with-animation="true"
:scroll-into-view='defaultViewId'
>
<view class="the-flex-item" v-for="(item, index) in empowerArr" :key="index" @click="onEmpower(item.id)">
<view class="cover" :style="'background-image: url(' + item.cover + ');'"></view>
<view class="title nowrap">{{item.title}}</view>
<view class="price nowrap"><text></text>{{item.price}}</view>
</view>
</scroll-view>
</view>
<!-- 弹窗 -->
<u-popup :show="showAdImg" mode="center" bgColor="transparent">
<view class="ad-lay">
@@ -200,24 +86,12 @@
</template>
<script>
import { region } from '@/apis/interfaces/address.js'
import { categories, jf, index, accountManagement, delegation } from '@/apis/interfaces/index.js'
import { lists } from '@/apis/interfaces/empower.js'
import { index, bigfive } from '@/apis/interfaces/index.js'
export default {
data() {
return {
theTabs : [
{ category_id: '', title: '全部' }
],
theTabId : '',
theTabStyle : {
left: '0%'
},
bannerArr : [],
notice : [],
jfList:[],
defaultViewId:'',
zfList:[],
// 首次进入弹窗
timeData : {},
first : 1,
@@ -228,85 +102,17 @@
cases : [],
service : []
},
// 增收赋能列表
empowerArr : [],
// 账户管理类
accountData : [],
// 委托管理类
delegation : []
bigfiveArr : [], //五大板块
moduleShow : false //展开默认
}
},
onLoad() {
this.getCategory()
this.getJf()
this.getIndex()
// 增收赋能
this.getEmpower()
// 管理类业务
this.getManagement()
this.getIndex();
this.bigfiveIndex();
},
methods: {
// 获取管理类业务
getManagement(){
Promise.all([accountManagement(), delegation()]).then(res => {
let accountData = res[0]
let delegationData = res[1]
this.accountData = accountData
this.delegation = delegationData
})
},
// 查看管理类业务
onMagInfo(type, id){
this.$Router.push({
name : 'Mag' + type,
params : { id }
})
},
// 查看增收赋能详情
onEmpower(id){
this.$Router.push({
name : 'EmpowerInfo',
params : { id }
})
},
// 增收赋能接口
getEmpower(){
lists().then(res => {
this.empowerArr = res;
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 获取金法列表
getJf(){
let params = {
category_id:this.theTabId
}
jf(params).then(res=>{
if(res.length>0){
setTimeout(()=>{
this.defaultViewId = '_tabs'+res[0].service_id
},300)
}
this.jfList = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 点击金法产品跳转金法详情
sevicesClick(id){
uni.navigateTo({
url:'/pages/index/introduces?id='+id
})
},
// 首页轮播图及公告
getIndex(){
index().then(res=>{
@@ -336,10 +142,15 @@
})
})
},
// 获取金法分类列表
getCategory(){
categories().then(res=>{
this.theTabs = this.theTabs.concat(res)
// 最新五大板块
bigfiveIndex(){
bigfive({parent_id: 0}).then(res=>{
let esArr = res
esArr.forEach((item, index) => {
item.schemesShow = false
})
this.bigfiveArr = esArr
}).catch(err=>{
uni.showToast({
title:err.message,
@@ -349,17 +160,17 @@
})
})
},
// 金法产品筛选
onTheTab(e){
if(e.category_id != this.theTabId){
let index = this.theTabs.findIndex(val => val.category_id === e.category_id)
this.theTabStyle = {
left: index * 25 + '%'
}
this.theTabId = e.category_id
this.getJf()
}
// 点击查看全部
moduleClick(index) {
this.bigfiveArr[index].schemesShow = !this.bigfiveArr[index].schemesShow
},
// 跳转
onNav(name, children){
this.$Router.push({name, params:{children:encodeURIComponent(JSON.stringify(children))}})
},
// 点击轮播图
swiperClick(e){
// console.log(this.bannerArr[e])
@@ -471,199 +282,24 @@
width: 100%;
}
}
// 增收赋能类
.closed{
background: white;
margin: 0 $margin;
border-radius: 35rpx;
padding-bottom: 10rpx;
.closed-item{
display: flex;
margin-bottom: 20rpx;
padding-bottom: 20rpx;
border-bottom: solid 1rpx #f8f8f8;
&:last-child{
margin-bottom: 0;
border-bottom: none;
}
.closed-cover{
width: 168rpx;
height: 168rpx;
background-size: cover;
background-position: center;
border-radius: 10rpx;
}
.closed-text{
width: calc(100% - 168rpx);
padding-left: 30rpx;
box-sizing: border-box;
.closed-title{
font-size: 32rpx;
font-weight: bold;
line-height: 50rpx;
}
.closed-subtitle{
color: gray;
font-size: 28rpx;
line-height: 40rpx;
}
.closed-price{
color: #d51959;
font-size: 34rpx;
line-height: 40rpx;
margin-top: 30rpx;
font-weight: bold;
}
}
}
}
// 诉讼委托类
.lawsuit{
padding: 0 20rpx $padding;
display: flex;
justify-content: space-between;
&-item{
background: #F6F6F6;
border-radius: 10rpx;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
width: calc(50% - 20rpx);
margin: 0 10rpx;
}
&-cover{
width: 138rpx;
height: 138rpx;
background-size: cover;
background-position: center;
}
&-text{
width: calc(100% - 138rpx);
padding: 0 20rpx;
box-sizing: border-box;
}
&-title{
font-size: 30rpx;
margin-bottom: 20rpx;
}
&-price{
font-size: 32rpx;
color: #d51959;
font-weight: bold;
}
}
// 经法
.the-tabs{
background: #ececec;
margin: 0 $margin;
height: 60rpx;
border-radius: 35rpx;
display: flex;
position: relative;
white-space: nowrap;
width: calc(100% - 60rpx);
&-item{
width: 25%;
line-height: 60rpx;
text-align: center;
font-size: 26rpx;
color: #454545;
transition: all .4s;
display: inline-block;
background-color: transparent;
&.active{
color: white;
position: relative;
z-index: 2;
}
}
&-acitve-block{
display: inline-block;
width: 25%;
height: 60rpx;
background-image: linear-gradient( to right, #d51959, #ec7247);
border-radius: 35rpx;
position: absolute;
left: 0;
top: 0;
transition: all .4s;
}
}
.the-flex{
padding: $padding 20rpx;
box-sizing: border-box;
white-space: nowrap;
&-item{
width: calc(33% - 20rpx);
margin: 0 10rpx;
display: inline-block;
&:last-child{
margin-right: 20rpx;
}
.cover{
width: 100%;
padding-top: 100%;
background-position: center;
background-size: cover;
background-position: center;
border-radius: 10rpx;
}
.title{
font-size: 30rpx;
color: #111111;
padding: 10rpx 0;
line-height: 40rpx;
}
.price{
line-height: 40rpx;
font-weight: bold;
color: #d51959;
font-size: 32rpx;
text{
font-size: 80%;
}
.ding{
font-size: 64%;
margin-left: 4rpx;
position: relative;
bottom: 2rpx;
}
}
}
}
// 模块
.block{
background-color: white;
border-radius: $radius;
margin: 0 $margin $margin;
.block-title{
padding: 0 $padding;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title{
font-weight: bold;
color: #111111;
font-size: 36rpx;
}
.more{
background-color: #ececec;
font-size: 28rpx;
height: 50rpx;
border-radius: 25rpx;
width: 120rpx;
padding-left: 10rpx;
box-sizing: border-box;
line-height: 50rpx;
text-align: center;
color: #454545;
.more-icon{
display: inline-block;
}
}
}
}
.block {padding: 0 $padding $padding;box-sizing: border-box;width: 100%;}
.module {border-radius: $radius;padding: $padding - 10 $padding $padding $padding + 10;box-sizing: border-box; margin-bottom: $margin;}
.module.moduleRed {background-color: #fff1f2;color: #c92453;}
.module.moduleYellow {background-color: #fff7f2;color: #ff7b29;}
.module.moduleBlue {background-color: #eaf4f3;color: #0dc8b3;}
.module.moduleGreen {background-color: #eff5ee;color: #1fba05;}
.module.modulePurple {background-color: #f2eef5;color: #a13dec;}
.moduleCont {display: flex;}
.moduleCont-text {width: calc(100% - 170rpx);}
.moduleCont-text-name {font-weight: bold; font-size: $title-size + 12; padding: 20rpx 0 10rpx;}
.moduleCont-text-tips {font-size: $title-size + 2;}
.moduleCont-img {width: 170rpx;}
.moduleInfo {color: #666666;font-size: $title-size-m; line-height: 48rpx; display: flex;}
.moduleInfo-text {width: calc(100% - 28rpx); padding-right: 20rpx; box-sizing: border-box; height: 60rpx;overflow: hidden;}
.moduleInfo-text.active {height: auto;}
.moduleInfo-more {width: 24rpx; margin-top: 15rpx; transition: .2s;}
.moduleInfo-more.active {transform: rotate(180deg);}
</style>

View File

@@ -473,10 +473,8 @@
})
},
// 导航
onNav(name) {
this.$Router.push({
name
})
onNav() {
this.$Router.push({name})
},
// 推荐关系
onParent() {

View File

@@ -65,62 +65,25 @@
</block>
<!-- 管理中台 -->
<view class="flex">
<view class="flex-item" @click="onNav('ConsultWork')">
<image class="flex-icon" src="/static/icons/icon_00.png" mode="aspectFill"></image>
<view class="flex-item" @click="onNav('businessOrder', {bigId: item.id})" v-for="(item, index) in bigfiveArr" :key="index">
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/040906a765db310d77722cec9e0b9f46.png" mode="widthFix" v-if="index == 0"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/e0ac4aae85290f1148cea0005ed523a7.png" mode="widthFix" v-else-if="index == 1"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/8ff1eeeebd37b89026db8c2b8d1f87fc.png" mode="widthFix" v-else-if="index == 2"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/03167bf2cacaa63b6b0eebdf0fe31a92.png" mode="widthFix" v-else-if="index == 3"></image>
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/4dfe17b98e15dfdbae30df1a4fcddeaf.png" mode="widthFix" v-else></image>
<view class="flex-title">
<view class="flex-name">协商调解咨询类</view>
<view class="flex-tips">信用卡贷款业务</view>
<view class="flex-name">{{item.title}}订单</view>
<view class="flex-tips">{{item.subtitle}}</view>
</view>
<view class="flex-btn">去查看</view>
<image class="flex-arrow" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/943544e5693c009bbe873ddaedd9c4be.png" mode="widthFix"></image>
</view>
<view class="flex-item" @click="onNav('AccountWork')">
<image class="flex-icon" src="/static/icons/work_icon_30.png" mode="aspectFill"></image>
<view class="flex-item" @click="onNav('businessOther')">
<image class="flex-icon" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/3f917a849dd07e254aaa9b0f218c8a0a.png" mode="widthFix"></image>
<view class="flex-title">
<view class="flex-name">账户管理咨询类</view>
<view class="flex-tips">客户账户管理咨询类订单</view>
<view class="flex-name">其他咨询类订单</view>
<view class="flex-tips">信用卡贷款个人客户等</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('DelegationWork')">
<image class="flex-icon" src="/static/icons/work_icon_29.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">委托管理类</view>
<view class="flex-tips">客户委托管理类订单</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('ServiceWork')">
<image class="flex-icon" src="/static/icons/icon_01.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">法律咨询类</view>
<view class="flex-tips">个人企业法律</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('ActionWork')">
<image class="flex-icon" src="/static/icons/icon_02.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">诉讼委托咨询类</view>
<view class="flex-tips">案件委托拓展服务</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('EnableWork')">
<image class="flex-icon" src="/static/icons/icon_03.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">增收赋能咨询类</view>
<view class="flex-tips">销售领袖演说等</view>
</view>
<view class="flex-btn">去查看</view>
</view>
<view class="flex-item" @click="onNav('AccountWork2')">
<image class="flex-icon" src="/static/icons/icon_04.png" mode="aspectFill"></image>
<view class="flex-title">
<view class="flex-name">线下订单</view>
<view class="flex-tips">线下咨询类订单</view>
</view>
<view class="flex-btn">去查看</view>
<image class="flex-arrow" src="https://douhuo-demo.oss-cn-beijing.aliyuncs.com/images/2024/02/28/943544e5693c009bbe873ddaedd9c4be.png" mode="widthFix"></image>
</view>
</view>
</view>
@@ -138,6 +101,7 @@
<script>
import { index, rights, sign, synthesisCount } from '@/apis/interfaces/work.js'
import { bigfive } from '@/apis/interfaces/index.js'
export default {
data() {
return {
@@ -162,7 +126,10 @@
address : ""
},
// 综法订单管理
synthesisData : {}
synthesisData : {},
bigfiveArr : [],
captchaShow : false
};
},
onShow() {
@@ -171,8 +138,29 @@
if(this.isAuth){
this.getIndex()
}
this.bigfiveInfo();
},
methods: {
// 最新五大板块
bigfiveInfo(){
bigfive({parent_id: 0}).then(res=>{
this.bigfiveArr = res
}).catch(err=>{
uni.showToast({
title:err.message,
icon:'none',
mask:true,
duration:2000
})
})
},
// 选择学期
onChange(e){
console.log(e)
},
// 签约
onSign(){
if(!this.isCertification){
@@ -248,31 +236,55 @@
})
})
},
// 导航
// 跳转
onNav(name, obj){
let params = obj || {}
this.$Router.push({name, params})
},
// 创建订单
onCreateOrder(){
// 最新五大板块
uni.showActionSheet({
itemList: ['线下订单','个人订单', '客户订单'],
itemList: [this.bigfiveArr[0].title,this.bigfiveArr[1].title, this.bigfiveArr[2].title, this.bigfiveArr[3].title, this.bigfiveArr[4].title],
success : res => {
switch (res.tapIndex){
case 0:
this.onNav('MagAccount2')
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[0].children)) })
break;
case 1:
this.onNav('OrderCreate', { type: 'self' })
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[1].children)) })
break;
case 2:
this.onNav('OrderCreate', { type: 'other' })
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[2].children)) })
break;
case 3:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[3].children)) })
break;
case 4:
this.onNav('businessBigFive', { children: encodeURIComponent(JSON.stringify(this.bigfiveArr[4].children)) })
break;
}
}
})
// 旧数据备份
// uni.showActionSheet({
// itemList: ['线下订单','个人订单', '客户订单'],
// success : res => {
// switch (res.tapIndex){
// case 0:
// this.onNav('MagAccount2')
// break;
// case 1:
// this.onNav('OrderCreate', { type: 'self' })
// break;
// case 2:
// this.onNav('OrderCreate', { type: 'other' })
// break;
// }
// }
// })
}
}
}
@@ -557,42 +569,41 @@
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
&-item{
background: white;
padding: 30rpx;
.flex-item {
padding: 40rpx;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 30rpx;
margin-top: 30rpx;
display: flex;
box-sizing: border-box;
position: relative;
.flex-icon{ width: 48px; height: 48px; border-radius: 30rpx; }
.flex-title{
margin-bottom: 30rpx;
.flex-icon {
width: 80rpx;
display: block;
margin-top: 10rpx;
}
.flex-title {
width: calc(100% - 80rpx);
padding: 0 30rpx;
box-sizing: border-box;
padding-left: 30rpx;
.flex-name {
color: #293f66;
font-size: 34rpx;
font-weight: bold;
padding: 4rpx 0;
color: #405477;
font-size: 34rpx;
margin-bottom: 5rpx;
}
.flex-tips {
color: #929db3;
font-size: 28rpx;
color: #b2bbc9;
}
}
.flex-btn {
.flex-arrow {
width: 50rpx;
position: absolute;
right: 30rpx;
top: 48rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 80rpx;
color: #468bff;
background-color: #f8fbff;
border: 2rpx solid #d8e6ff;
font-size: 28rpx;
padding: 0 25rpx;
top: calc(50% - 25rpx);
}
}
}
</style>

BIN
static/imgs/basic_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB