index.vue 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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 == '1'" class="uni-section" title="系统管理" type="line">
  15. <template v-slot:right>
  16. 已认证
  17. </template>
  18. </uni-section>
  19. <uni-section v-else class="uni-section" title="系统管理" type="line" @click="certification">
  20. <template v-slot:right>
  21. 未认证
  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="calendar-filled" 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="email-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="compose" 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. sendEidtoken
  98. } from "../../api/login.js"
  99. export default {
  100. data() {
  101. return {
  102. current: 0,
  103. swiperDotIndex: 0,
  104. data: [{
  105. image: 'https://img.tukuppt.com/bg_grid/00/09/96/qWJxN1umma.jpg!/fh/350'
  106. },
  107. {
  108. image: 'https://img.tukuppt.com/bg_grid/00/18/92/JBheZs7ZVK.jpg!/fh/350'
  109. },
  110. {
  111. image: 'https://img.tukuppt.com/bg_grid/00/81/07/DGEl4suqeV.jpg!/fh/350'
  112. }
  113. ],
  114. certificationStatus: "",
  115. eidToken: ""
  116. }
  117. },
  118. methods: {
  119. clickBannerItem(item) {
  120. console.info(item)
  121. },
  122. changeSwiper(e) {
  123. this.current = e.detail.current
  124. },
  125. changeGrid(e) {
  126. // this.$modal.showToast('模块建设中~')
  127. // if (this.certificationStatus == "0") {
  128. // uni.showToast({
  129. // title: '请先完成实名认证',
  130. // icon: 'none',
  131. // duration: 1000
  132. // })
  133. // return
  134. // }
  135. switch (e) {
  136. case 0:
  137. uni.navigateTo({
  138. url: ('/pages/handlecase/index')
  139. })
  140. break;
  141. case 5:
  142. uni.navigateTo({
  143. url: ('/pages/im/index')
  144. })
  145. break;
  146. case 6:
  147. uni.navigateTo({
  148. url: ('/pages/expressDelivery/index')
  149. })
  150. break;
  151. case 7:
  152. uni.navigateTo({
  153. url: ('/pages/signature/index')
  154. })
  155. break;
  156. default:
  157. break;
  158. }
  159. },
  160. // 获取eidtoken
  161. getEidtokenFn() {
  162. getEidtoken({}).then(res => {
  163. console.log(res.data.EidToken, "kkkkkkkkk");
  164. this.eidToken = res.data.EidToken
  165. })
  166. },
  167. // 点击实名认证
  168. certification() {
  169. let that = this
  170. // uni.navigateTo({
  171. // url: ('/mp_ecard_sdk/index/index')
  172. // })
  173. startEid({
  174. data: {
  175. token: this.eidToken,
  176. },
  177. verifyDoneCallback(res) {
  178. const {
  179. token,
  180. verifyDone
  181. } = res;
  182. console.log('收到核身完成的res:', res);
  183. console.log('核身的token是:', token);
  184. console.log('是否完成核身:', verifyDone);
  185. sendEidtoken({
  186. "eidToken": token
  187. }).then(res => {
  188. that.certificationStatus = '1'
  189. })
  190. },
  191. });
  192. }
  193. },
  194. onLoad() {
  195. // sendEidtoken({
  196. // "eidToken": 'C0339AE1-7B30-4DB9-B1E4-35A10F45249B'
  197. // }).then(res => {
  198. // // that.certificationStatus = '已认证'
  199. // })
  200. this.getEidtokenFn()
  201. // this.certificationStatus = uni.getStorageSync('certificationStatus')
  202. },
  203. }
  204. </script>
  205. <style lang="scss">
  206. /* #ifndef APP-NVUE */
  207. page {
  208. display: flex;
  209. flex-direction: column;
  210. box-sizing: border-box;
  211. background-color: #fff;
  212. min-height: 100%;
  213. height: auto;
  214. }
  215. view {
  216. font-size: 14px;
  217. line-height: inherit;
  218. }
  219. /* #endif */
  220. .text {
  221. text-align: center;
  222. font-size: 26rpx;
  223. margin-top: 10rpx;
  224. }
  225. .grid-item-box {
  226. flex: 1;
  227. /* #ifndef APP-NVUE */
  228. display: flex;
  229. /* #endif */
  230. flex-direction: column;
  231. align-items: center;
  232. justify-content: center;
  233. padding: 15px 0;
  234. }
  235. .uni-margin-wrap {
  236. width: 690rpx;
  237. width: 100%;
  238. ;
  239. }
  240. .swiper {
  241. height: 300rpx;
  242. }
  243. .swiper-box {
  244. height: 150px;
  245. }
  246. .swiper-item {
  247. /* #ifndef APP-NVUE */
  248. display: flex;
  249. /* #endif */
  250. flex-direction: column;
  251. justify-content: center;
  252. align-items: center;
  253. color: #fff;
  254. height: 300rpx;
  255. line-height: 300rpx;
  256. }
  257. .grid-body {
  258. // background-image: url('https://img.tukuppt.com/bg_grid/00/18/52/aEicoC2qMI.jpg!/fh/350');
  259. background-repeat: no-repeat;
  260. background-size: cover;
  261. height: 900rpx;
  262. // color: #fff;
  263. opacity: 0.9;
  264. }
  265. .uni-section {
  266. background-color: #b90404 !important;
  267. color: #fff;
  268. }
  269. /deep/ .uni-section__content-title {
  270. color: #fff !important;
  271. }
  272. @media screen and (min-width: 500px) {
  273. .uni-swiper-dot-box {
  274. width: 400px;
  275. /* #ifndef APP-NVUE */
  276. margin: 0 auto;
  277. /* #endif */
  278. margin-top: 8px;
  279. }
  280. .image {
  281. width: 100%;
  282. }
  283. }
  284. </style>