Files
miniapp/pages/work/index.vue
T

282 lines
6.8 KiB
Vue
Raw Normal View History

2023-09-05 16:14:07 +08:00
<template>
2023-09-12 16:58:05 +08:00
<view class="work-container">
<!-- 轮播图 -->
<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
<swiper-item v-for="(item, index) in data" :key="index">
<view class="swiper-item" @click="clickBannerItem(item)">
<image :src="item.image" mode="aspectFill" :draggable="false" />
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
<!-- 宫格组件 -->
2023-10-07 16:19:18 +08:00
<uni-section v-if="certificationStatus == '已认证'" class="uni-section" title="系统管理" type="line">
<template v-slot:right>
{{certificationStatus}}
</template>
</uni-section>
<uni-section v-else class="uni-section" title="系统管理" type="line" @click="certification">
2023-09-12 16:58:05 +08:00
<template v-slot:right>
{{certificationStatus}}
</template>
</uni-section>
<!-- <uni-section class="uni-section" title="系统管理" type="line"></uni-section> -->
<view class="grid-body">
2023-09-14 09:42:52 +08:00
<uni-grid :column="4" :showBorder="false">
2023-09-12 16:58:05 +08:00
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(0)">
2023-09-12 16:58:05 +08:00
<uni-icons type="compose" size="30" color="#327DD7"></uni-icons>
2023-09-14 09:42:52 +08:00
<text class="text">代办案件</text>
2023-09-12 16:58:05 +08:00
</view>
</uni-grid-item>
2023-09-21 14:32:29 +08:00
<!-- <uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(1)">
2023-09-12 16:58:05 +08:00
<uni-icons type="staff-filled" size="30" color="#327DD7"></uni-icons>
2023-09-14 09:42:52 +08:00
<text class="text">代办案件</text>
2023-09-12 16:58:05 +08:00
</view>
</uni-grid-item>
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(2)">
2023-09-12 16:58:05 +08:00
<uni-icons type="color" size="30" color="#327DD7"></uni-icons>
<text class="text">代理立案</text>
</view>
</uni-grid-item>
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(3)">
2023-09-12 16:58:05 +08:00
<uni-icons type="settings-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">代理案件进展</text>
</view>
</uni-grid-item>
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(4)">
2023-09-12 16:58:05 +08:00
<uni-icons type="heart-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">证据交换</text>
</view>
2023-09-21 14:32:29 +08:00
</uni-grid-item> -->
2023-09-12 16:58:05 +08:00
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(5)">
2023-09-12 16:58:05 +08:00
<uni-icons type="bars" size="30" color="#327DD7"></uni-icons>
<text class="text">互联网庭</text>
</view>
</uni-grid-item>
2023-09-21 14:32:29 +08:00
<!-- <uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(6)">
2023-09-12 16:58:05 +08:00
<uni-icons type="gear-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">在线撤诉</text>
</view>
</uni-grid-item>
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(7)">
2023-09-12 16:58:05 +08:00
<uni-icons type="chat-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">笔录签字</text>
</view>
</uni-grid-item>
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(8)">
2023-09-12 16:58:05 +08:00
<uni-icons type="wallet-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">仲裁文书</text>
</view>
</uni-grid-item>
<uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(9)">
2023-09-12 16:58:05 +08:00
<uni-icons type="wallet-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">法规政策</text>
</view>
2023-09-21 14:32:29 +08:00
</uni-grid-item> -->
2023-09-12 16:58:05 +08:00
</uni-grid>
</view>
</view>
2023-09-05 16:14:07 +08:00
</template>
<script>
2023-09-21 14:32:29 +08:00
import {
startEid
} from '../../mp_ecard_sdk/main.js'
2023-10-07 16:19:18 +08:00
import {
getEidtoken
} from "../../api/login.js"
2023-09-12 16:58:05 +08:00
export default {
data() {
return {
current: 0,
swiperDotIndex: 0,
data: [{
image: 'https://img.tukuppt.com/bg_grid/00/09/96/qWJxN1umma.jpg!/fh/350'
},
{
image: 'https://img.tukuppt.com/bg_grid/00/18/92/JBheZs7ZVK.jpg!/fh/350'
},
{
image: 'https://img.tukuppt.com/bg_grid/00/81/07/DGEl4suqeV.jpg!/fh/350'
}
],
2023-10-07 16:19:18 +08:00
certificationStatus: "未认证",
eidToken: ""
2023-09-12 16:58:05 +08:00
}
},
methods: {
clickBannerItem(item) {
console.info(item)
},
changeSwiper(e) {
this.current = e.detail.current
},
changeGrid(e) {
2023-09-21 14:32:29 +08:00
// this.$modal.showToast('模块建设中~')
2023-10-07 16:19:18 +08:00
if (this.certificationStatus == "未认证") {
uni.showToast({
title: '请先完成实名认证',
icon: 'none',
duration: 1000
})
return
}
2023-09-14 09:42:52 +08:00
switch (e) {
case 0:
uni.navigateTo({
url: ('/pages/handlecase/index')
})
break;
2023-09-21 14:32:29 +08:00
case 5:
uni.navigateTo({
url: ('/pages/im/index')
})
break;
2023-09-14 09:42:52 +08:00
default:
break;
}
2023-09-12 16:58:05 +08:00
},
2023-10-07 16:19:18 +08:00
// 获取eidtoken
getEidtokenFn() {
getEidtoken({}).then(res => {
console.log(res.data.eidToken, "kkkkkkkkk");
this.eidToken = res.data.eidToken
})
},
2023-09-12 16:58:05 +08:00
// 点击实名认证
2023-09-14 09:42:52 +08:00
certification() {
2023-10-07 16:19:18 +08:00
let that = this
// uni.navigateTo({
// url: ('/mp_ecard_sdk/index/index')
// })
2023-09-21 14:32:29 +08:00
startEid({
data: {
2023-10-07 16:19:18 +08:00
token: this.eidToken,
2023-09-21 14:32:29 +08:00
},
verifyDoneCallback(res) {
const {
token,
verifyDone
} = res;
console.log('收到核身完成的res:', res);
console.log('核身的token是:', token);
console.log('是否完成核身:', verifyDone);
2023-10-07 16:19:18 +08:00
// flagShow = '已认证'
// console.log(flagShow, "JKJJKJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKk");
// console.log(this, "PPPPPPPPPPPPPPP");
that.certificationStatus = '已认证'
2023-09-21 14:32:29 +08:00
},
});
2023-09-12 16:58:05 +08:00
}
2023-10-07 16:19:18 +08:00
},
onLoad() {
this.getEidtokenFn()
},
2023-09-12 16:58:05 +08:00
}
2023-09-05 16:14:07 +08:00
</script>
<style lang="scss">
2023-09-12 16:58:05 +08:00
/* #ifndef APP-NVUE */
page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #fff;
min-height: 100%;
height: auto;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
view {
font-size: 14px;
line-height: inherit;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
/* #endif */
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.text {
text-align: center;
font-size: 26rpx;
margin-top: 10rpx;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.grid-item-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15px 0;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.uni-margin-wrap {
width: 690rpx;
width: 100%;
;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.swiper {
height: 300rpx;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.swiper-box {
height: 150px;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.swiper-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
height: 300rpx;
line-height: 300rpx;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.grid-body {
// background-image: url('https://img.tukuppt.com/bg_grid/00/18/52/aEicoC2qMI.jpg!/fh/350');
background-repeat: no-repeat;
background-size: cover;
height: 900rpx;
// color: #fff;
opacity: 0.9;
}
2023-09-05 16:14:07 +08:00
2023-09-12 16:58:05 +08:00
.uni-section {
background-color: #b90404 !important;
color: #fff;
}
/deep/ .uni-section__content-title {
color: #fff !important;
}
@media screen and (min-width: 500px) {
.uni-swiper-dot-box {
width: 400px;
/* #ifndef APP-NVUE */
margin: 0 auto;
/* #endif */
margin-top: 8px;
}
.image {
width: 100%;
}
}
</style>