index.vue 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <view class="work-container">
  3. <!-- 轮播图 -->
  4. <uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
  5. <swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
  6. <swiper-item v-for="(item, index) in data" :key="index">
  7. <view class="swiper-item" @click="clickBannerItem(item)">
  8. <image :src="item.image" mode="aspectFill" :draggable="false" />
  9. </view>
  10. </swiper-item>
  11. </swiper>
  12. </uni-swiper-dot>
  13. <!-- 宫格组件 -->
  14. <uni-section v-if="certificationStatus == '已认证'" class="uni-section" title="系统管理" type="line">
  15. <template v-slot:right>
  16. {{certificationStatus}}
  17. </template>
  18. </uni-section>
  19. <uni-section v-else class="uni-section" title="系统管理" type="line" @click="certification">
  20. <template v-slot:right>
  21. {{certificationStatus}}
  22. </template>
  23. </uni-section>
  24. <!-- <uni-section class="uni-section" title="系统管理" type="line"></uni-section> -->
  25. <view class="grid-body">
  26. <uni-grid :column="4" :showBorder="false">
  27. <uni-grid-item>
  28. <view class="grid-item-box" @tap="changeGrid(0)">
  29. <uni-icons type="compose" size="30" color="#327DD7"></uni-icons>
  30. <text class="text">代办案件</text>
  31. </view>
  32. </uni-grid-item>
  33. <!-- <uni-grid-item>
  34. <view class="grid-item-box" @tap="changeGrid(1)">
  35. <uni-icons type="staff-filled" size="30" color="#327DD7"></uni-icons>
  36. <text class="text">代办案件</text>
  37. </view>
  38. </uni-grid-item>
  39. <uni-grid-item>
  40. <view class="grid-item-box" @tap="changeGrid(2)">
  41. <uni-icons type="color" size="30" color="#327DD7"></uni-icons>
  42. <text class="text">代理立案</text>
  43. </view>
  44. </uni-grid-item>
  45. <uni-grid-item>
  46. <view class="grid-item-box" @tap="changeGrid(3)">
  47. <uni-icons type="settings-filled" size="30" color="#327DD7"></uni-icons>
  48. <text class="text">代理案件进展</text>
  49. </view>
  50. </uni-grid-item>
  51. <uni-grid-item>
  52. <view class="grid-item-box" @tap="changeGrid(4)">
  53. <uni-icons type="heart-filled" size="30" color="#327DD7"></uni-icons>
  54. <text class="text">证据交换</text>
  55. </view>
  56. </uni-grid-item> -->
  57. <uni-grid-item>
  58. <view class="grid-item-box" @tap="changeGrid(5)">
  59. <uni-icons type="bars" size="30" color="#327DD7"></uni-icons>
  60. <text class="text">互联网庭</text>
  61. </view>
  62. </uni-grid-item>
  63. <!-- <uni-grid-item>
  64. <view class="grid-item-box" @tap="changeGrid(6)">
  65. <uni-icons type="gear-filled" size="30" color="#327DD7"></uni-icons>
  66. <text class="text">在线撤诉</text>
  67. </view>
  68. </uni-grid-item>
  69. <uni-grid-item>
  70. <view class="grid-item-box" @tap="changeGrid(7)">
  71. <uni-icons type="chat-filled" size="30" color="#327DD7"></uni-icons>
  72. <text class="text">笔录签字</text>
  73. </view>
  74. </uni-grid-item>
  75. <uni-grid-item>
  76. <view class="grid-item-box" @tap="changeGrid(8)">
  77. <uni-icons type="wallet-filled" size="30" color="#327DD7"></uni-icons>
  78. <text class="text">仲裁文书</text>
  79. </view>
  80. </uni-grid-item>
  81. <uni-grid-item>
  82. <view class="grid-item-box" @tap="changeGrid(9)">
  83. <uni-icons type="wallet-filled" size="30" color="#327DD7"></uni-icons>
  84. <text class="text">法规政策</text>
  85. </view>
  86. </uni-grid-item> -->
  87. </uni-grid>
  88. </view>
  89. </view>
  90. </template>
  91. <script>
  92. import {
  93. startEid
  94. } from '../../mp_ecard_sdk/main.js'
  95. import {
  96. getEidtoken
  97. } from "../../api/login.js"
  98. export default {
  99. data() {
  100. return {
  101. current: 0,
  102. swiperDotIndex: 0,
  103. data: [{
  104. image: 'https://img.tukuppt.com/bg_grid/00/09/96/qWJxN1umma.jpg!/fh/350'
  105. },
  106. {
  107. image: 'https://img.tukuppt.com/bg_grid/00/18/92/JBheZs7ZVK.jpg!/fh/350'
  108. },
  109. {
  110. image: 'https://img.tukuppt.com/bg_grid/00/81/07/DGEl4suqeV.jpg!/fh/350'
  111. }
  112. ],
  113. certificationStatus: "未认证",
  114. eidToken: ""
  115. }
  116. },
  117. methods: {
  118. clickBannerItem(item) {
  119. console.info(item)
  120. },
  121. changeSwiper(e) {
  122. this.current = e.detail.current
  123. },
  124. changeGrid(e) {
  125. // this.$modal.showToast('模块建设中~')
  126. if (this.certificationStatus == "未认证") {
  127. uni.showToast({
  128. title: '请先完成实名认证',
  129. icon: 'none',
  130. duration: 1000
  131. })
  132. return
  133. }
  134. switch (e) {
  135. case 0:
  136. uni.navigateTo({
  137. url: ('/pages/handlecase/index')
  138. })
  139. break;
  140. case 5:
  141. uni.navigateTo({
  142. url: ('/pages/im/index')
  143. })
  144. break;
  145. default:
  146. break;
  147. }
  148. },
  149. // 获取eidtoken
  150. getEidtokenFn() {
  151. getEidtoken({}).then(res => {
  152. console.log(res.data.eidToken, "kkkkkkkkk");
  153. this.eidToken = res.data.eidToken
  154. })
  155. },
  156. // 点击实名认证
  157. certification() {
  158. let that = this
  159. // uni.navigateTo({
  160. // url: ('/mp_ecard_sdk/index/index')
  161. // })
  162. startEid({
  163. data: {
  164. token: this.eidToken,
  165. },
  166. verifyDoneCallback(res) {
  167. const {
  168. token,
  169. verifyDone
  170. } = res;
  171. console.log('收到核身完成的res:', res);
  172. console.log('核身的token是:', token);
  173. console.log('是否完成核身:', verifyDone);
  174. // flagShow = '已认证'
  175. // console.log(flagShow, "JKJJKJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKk");
  176. // console.log(this, "PPPPPPPPPPPPPPP");
  177. that.certificationStatus = '已认证'
  178. },
  179. });
  180. }
  181. },
  182. onLoad() {
  183. this.getEidtokenFn()
  184. },
  185. }
  186. </script>
  187. <style lang="scss">
  188. /* #ifndef APP-NVUE */
  189. page {
  190. display: flex;
  191. flex-direction: column;
  192. box-sizing: border-box;
  193. background-color: #fff;
  194. min-height: 100%;
  195. height: auto;
  196. }
  197. view {
  198. font-size: 14px;
  199. line-height: inherit;
  200. }
  201. /* #endif */
  202. .text {
  203. text-align: center;
  204. font-size: 26rpx;
  205. margin-top: 10rpx;
  206. }
  207. .grid-item-box {
  208. flex: 1;
  209. /* #ifndef APP-NVUE */
  210. display: flex;
  211. /* #endif */
  212. flex-direction: column;
  213. align-items: center;
  214. justify-content: center;
  215. padding: 15px 0;
  216. }
  217. .uni-margin-wrap {
  218. width: 690rpx;
  219. width: 100%;
  220. ;
  221. }
  222. .swiper {
  223. height: 300rpx;
  224. }
  225. .swiper-box {
  226. height: 150px;
  227. }
  228. .swiper-item {
  229. /* #ifndef APP-NVUE */
  230. display: flex;
  231. /* #endif */
  232. flex-direction: column;
  233. justify-content: center;
  234. align-items: center;
  235. color: #fff;
  236. height: 300rpx;
  237. line-height: 300rpx;
  238. }
  239. .grid-body {
  240. // background-image: url('https://img.tukuppt.com/bg_grid/00/18/52/aEicoC2qMI.jpg!/fh/350');
  241. background-repeat: no-repeat;
  242. background-size: cover;
  243. height: 900rpx;
  244. // color: #fff;
  245. opacity: 0.9;
  246. }
  247. .uni-section {
  248. background-color: #b90404 !important;
  249. color: #fff;
  250. }
  251. /deep/ .uni-section__content-title {
  252. color: #fff !important;
  253. }
  254. @media screen and (min-width: 500px) {
  255. .uni-swiper-dot-box {
  256. width: 400px;
  257. /* #ifndef APP-NVUE */
  258. margin: 0 auto;
  259. /* #endif */
  260. margin-top: 8px;
  261. }
  262. .image {
  263. width: 100%;
  264. }
  265. }
  266. </style>