Files
miniapp/pages/work/index.vue
T

310 lines
7.6 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-11-23 14:35:50 +08:00
<!-- <uni-section v-if="certificationStatus == '1'" class="uni-section" title="系统管理" type="line">
2023-10-07 16:19:18 +08:00
<template v-slot:right>
2023-10-16 11:26:18 +08:00
已认证
2023-10-07 16:19:18 +08:00
</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>
2023-10-16 11:26:18 +08:00
未认证
2023-09-12 16:58:05 +08:00
</template>
2023-11-23 14:35:50 +08:00
</uni-section> -->
2023-09-12 16:58:05 +08:00
<!-- <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-10-16 11:26:18 +08:00
<uni-icons type="calendar-filled" size="30" color="#327DD7"></uni-icons>
2024-02-29 16:37:09 +08:00
<text class="text" v-if="sysType == 1">待办案件</text>
<text class="text" v-if="sysType == 2">我的申请</text>
</view>
</uni-grid-item>
<uni-grid-item v-if="sysType == 2 && checkPermi(['caseManagement:list:add'])">
<view class="grid-item-box" @tap="changeGrid(1)">
<uni-icons type="staff-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">立案申请</text>
</view>
</uni-grid-item>
<!-- <uni-grid-item v-if="sysType == 2">
<view class="grid-item-box" @tap="changeGrid(2)">
<uni-icons type="color" size="30" color="#327DD7"></uni-icons>
<text class="text">线上调解</text>
2023-09-12 16:58:05 +08:00
</view>
</uni-grid-item>
2024-02-29 09:23:36 +08:00
<uni-grid-item v-if="sysType == 2">
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(3)">
2024-02-29 16:37:09 +08:00
<uni-icons type="compose" size="30" color="#327DD7"></uni-icons>
<text class="text">我的申请</text>
2023-09-12 16:58:05 +08:00
</view>
2024-02-29 16:37:09 +08:00
</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>
2024-02-29 16:37:09 +08:00
<text class="text" v-if="sysType == 1">视频审理</text>
<text class="text" v-if="sysType == 2">线上调解</text>
2023-09-12 16:58:05 +08:00
</view>
</uni-grid-item>
2024-01-24 15:52:01 +08:00
<!-- <uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(6)">
2023-10-16 11:26:18 +08:00
<uni-icons type="email-filled" size="30" color="#327DD7"></uni-icons>
<text class="text">查询快递</text>
2023-09-12 16:58:05 +08:00
</view>
2024-01-24 15:52:01 +08:00
</uni-grid-item> -->
2023-10-16 11:26:18 +08:00
<!-- <uni-grid-item>
2023-09-14 09:42:52 +08:00
<view class="grid-item-box" @tap="changeGrid(7)">
2023-10-16 11:26:18 +08:00
<uni-icons type="compose" size="30" color="#327DD7"></uni-icons>
<text class="text">在线签字</text>
2023-09-12 16:58:05 +08:00
</view>
2023-10-16 11:26:18 +08:00
</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 {
2023-10-09 10:18:28 +08:00
getEidtoken,
sendEidtoken
2023-10-07 16:19:18 +08:00
} 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-16 11:26:18 +08:00
certificationStatus: "",
2024-02-29 09:23:36 +08:00
eidToken: "",
sysType:null
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-11-23 14:35:50 +08:00
// if (this.certificationStatus == "0") {
// 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-10-16 11:26:18 +08:00
case 6:
uni.navigateTo({
url: ('/pages/expressDelivery/index')
})
break;
case 7:
uni.navigateTo({
url: ('/pages/signature/index')
})
2024-02-29 09:23:36 +08:00
break;
case 1:
uni.navigateTo({
url: (`/pages/handlecase/component/newlyAddedCase?title=新增案件`)
})
2024-01-24 15:52:01 +08:00
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 => {
2023-10-16 11:26:18 +08:00
console.log(res.data.EidToken, "kkkkkkkkk");
this.eidToken = res.data.EidToken
2023-10-07 16:19:18 +08:00
})
},
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-09 10:18:28 +08:00
sendEidtoken({
"eidToken": token
}).then(res => {
2023-10-16 11:26:18 +08:00
that.certificationStatus = '1'
2023-10-09 10:18:28 +08:00
})
2023-09-21 14:32:29 +08:00
},
});
2023-09-12 16:58:05 +08:00
}
2023-10-07 16:19:18 +08:00
},
2024-02-29 09:23:36 +08:00
onLoad() {
this.sysType = uni.getStorageSync('sysType');
console.log(this.sysType)
2023-10-16 11:26:18 +08:00
// sendEidtoken({
// "eidToken": 'C0339AE1-7B30-4DB9-B1E4-35A10F45249B'
// }).then(res => {
// // that.certificationStatus = '已认证'
// })
2023-10-07 16:19:18 +08:00
this.getEidtokenFn()
2023-11-23 14:35:50 +08:00
// this.certificationStatus = uni.getStorageSync('certificationStatus')
2023-10-07 16:19:18 +08:00
},
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>