index.vue 7.4KB

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