index.vue 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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" v-if="sysType == 1">待办案件</text>
  31. <text class="text" v-if="sysType == 2">我的申请</text>
  32. </view>
  33. </uni-grid-item>
  34. <uni-grid-item v-if="sysType == 2 && checkPermi(['caseManagement:list:add'])">
  35. <view class="grid-item-box" @tap="changeGrid(1)">
  36. <uni-icons type="staff-filled" size="30" color="#327DD7"></uni-icons>
  37. <text class="text">立案申请</text>
  38. </view>
  39. </uni-grid-item>
  40. <!-- <uni-grid-item v-if="sysType == 2">
  41. <view class="grid-item-box" @tap="changeGrid(2)">
  42. <uni-icons type="color" size="30" color="#327DD7"></uni-icons>
  43. <text class="text">线上调解</text>
  44. </view>
  45. </uni-grid-item>
  46. <uni-grid-item v-if="sysType == 2">
  47. <view class="grid-item-box" @tap="changeGrid(3)">
  48. <uni-icons type="compose" size="30" color="#327DD7"></uni-icons>
  49. <text class="text">我的申请</text>
  50. </view>
  51. </uni-grid-item> -->
  52. <!-- <uni-grid-item>
  53. <view class="grid-item-box" @tap="changeGrid(4)">
  54. <uni-icons type="heart-filled" size="30" color="#327DD7"></uni-icons>
  55. <text class="text">证据交换</text>
  56. </view>
  57. </uni-grid-item> -->
  58. <uni-grid-item>
  59. <view class="grid-item-box" @tap="changeGrid(5)">
  60. <uni-icons type="bars" size="30" color="#327DD7"></uni-icons>
  61. <text class="text" v-if="sysType == 1">视频审理</text>
  62. <text class="text" v-if="sysType == 2">线上调解</text>
  63. </view>
  64. </uni-grid-item>
  65. <!-- <uni-grid-item>
  66. <view class="grid-item-box" @tap="changeGrid(6)">
  67. <uni-icons type="email-filled" size="30" color="#327DD7"></uni-icons>
  68. <text class="text">查询快递</text>
  69. </view>
  70. </uni-grid-item> -->
  71. <!-- <uni-grid-item>
  72. <view class="grid-item-box" @tap="changeGrid(7)">
  73. <uni-icons type="compose" size="30" color="#327DD7"></uni-icons>
  74. <text class="text">在线签字</text>
  75. </view>
  76. </uni-grid-item> -->
  77. <!-- <uni-grid-item>
  78. <view class="grid-item-box" @tap="changeGrid(8)">
  79. <uni-icons type="wallet-filled" size="30" color="#327DD7"></uni-icons>
  80. <text class="text">仲裁文书</text>
  81. </view>
  82. </uni-grid-item>
  83. <uni-grid-item>
  84. <view class="grid-item-box" @tap="changeGrid(9)">
  85. <uni-icons type="wallet-filled" size="30" color="#327DD7"></uni-icons>
  86. <text class="text">法规政策</text>
  87. </view>
  88. </uni-grid-item> -->
  89. </uni-grid>
  90. </view>
  91. </view>
  92. </template>
  93. <script>
  94. import {
  95. startEid
  96. } from '../../mp_ecard_sdk/main.js'
  97. import {
  98. getEidtoken,
  99. sendEidtoken
  100. } from "../../api/login.js"
  101. export default {
  102. data() {
  103. return {
  104. current: 0,
  105. swiperDotIndex: 0,
  106. data: [{
  107. image: 'https://img.tukuppt.com/bg_grid/00/09/96/qWJxN1umma.jpg!/fh/350'
  108. },
  109. {
  110. image: 'https://img.tukuppt.com/bg_grid/00/18/92/JBheZs7ZVK.jpg!/fh/350'
  111. },
  112. {
  113. image: 'https://img.tukuppt.com/bg_grid/00/81/07/DGEl4suqeV.jpg!/fh/350'
  114. }
  115. ],
  116. certificationStatus: "",
  117. eidToken: "",
  118. sysType:null
  119. }
  120. },
  121. methods: {
  122. clickBannerItem(item) {
  123. console.info(item)
  124. },
  125. changeSwiper(e) {
  126. this.current = e.detail.current
  127. },
  128. changeGrid(e) {
  129. // this.$modal.showToast('模块建设中~')
  130. // if (this.certificationStatus == "0") {
  131. // uni.showToast({
  132. // title: '请先完成实名认证',
  133. // icon: 'none',
  134. // duration: 1000
  135. // })
  136. // return
  137. // }
  138. switch (e) {
  139. case 0:
  140. uni.navigateTo({
  141. url: ('/pages/handlecase/index')
  142. })
  143. break;
  144. case 5:
  145. uni.navigateTo({
  146. url: ('/pages/im/index')
  147. })
  148. break;
  149. case 6:
  150. uni.navigateTo({
  151. url: ('/pages/expressDelivery/index')
  152. })
  153. break;
  154. case 7:
  155. uni.navigateTo({
  156. url: ('/pages/signature/index')
  157. })
  158. break;
  159. case 1:
  160. uni.navigateTo({
  161. url: (`/pages/handlecase/component/newlyAddedCase?title=新增案件`)
  162. })
  163. break;
  164. default:
  165. break;
  166. }
  167. },
  168. // 获取eidtoken
  169. getEidtokenFn() {
  170. getEidtoken({}).then(res => {
  171. console.log(res.data.EidToken, "kkkkkkkkk");
  172. this.eidToken = res.data.EidToken
  173. })
  174. },
  175. // 点击实名认证
  176. certification() {
  177. let that = this
  178. // uni.navigateTo({
  179. // url: ('/mp_ecard_sdk/index/index')
  180. // })
  181. startEid({
  182. data: {
  183. token: this.eidToken,
  184. },
  185. verifyDoneCallback(res) {
  186. const {
  187. token,
  188. verifyDone
  189. } = res;
  190. console.log('收到核身完成的res:', res);
  191. console.log('核身的token是:', token);
  192. console.log('是否完成核身:', verifyDone);
  193. sendEidtoken({
  194. "eidToken": token
  195. }).then(res => {
  196. that.certificationStatus = '1'
  197. })
  198. },
  199. });
  200. }
  201. },
  202. onLoad() {
  203. this.sysType = uni.getStorageSync('sysType');
  204. console.log(this.sysType)
  205. // sendEidtoken({
  206. // "eidToken": 'C0339AE1-7B30-4DB9-B1E4-35A10F45249B'
  207. // }).then(res => {
  208. // // that.certificationStatus = '已认证'
  209. // })
  210. this.getEidtokenFn()
  211. // this.certificationStatus = uni.getStorageSync('certificationStatus')
  212. },
  213. }
  214. </script>
  215. <style lang="scss">
  216. /* #ifndef APP-NVUE */
  217. page {
  218. display: flex;
  219. flex-direction: column;
  220. box-sizing: border-box;
  221. background-color: #fff;
  222. min-height: 100%;
  223. height: auto;
  224. }
  225. view {
  226. font-size: 14px;
  227. line-height: inherit;
  228. }
  229. /* #endif */
  230. .text {
  231. text-align: center;
  232. font-size: 26rpx;
  233. margin-top: 10rpx;
  234. }
  235. .grid-item-box {
  236. flex: 1;
  237. /* #ifndef APP-NVUE */
  238. display: flex;
  239. /* #endif */
  240. flex-direction: column;
  241. align-items: center;
  242. justify-content: center;
  243. padding: 15px 0;
  244. }
  245. .uni-margin-wrap {
  246. width: 690rpx;
  247. width: 100%;
  248. ;
  249. }
  250. .swiper {
  251. height: 300rpx;
  252. }
  253. .swiper-box {
  254. height: 150px;
  255. }
  256. .swiper-item {
  257. /* #ifndef APP-NVUE */
  258. display: flex;
  259. /* #endif */
  260. flex-direction: column;
  261. justify-content: center;
  262. align-items: center;
  263. color: #fff;
  264. height: 300rpx;
  265. line-height: 300rpx;
  266. }
  267. .grid-body {
  268. // background-image: url('https://img.tukuppt.com/bg_grid/00/18/52/aEicoC2qMI.jpg!/fh/350');
  269. background-repeat: no-repeat;
  270. background-size: cover;
  271. height: 900rpx;
  272. // color: #fff;
  273. opacity: 0.9;
  274. }
  275. .uni-section {
  276. background-color: #b90404 !important;
  277. color: #fff;
  278. }
  279. /deep/ .uni-section__content-title {
  280. color: #fff !important;
  281. }
  282. @media screen and (min-width: 500px) {
  283. .uni-swiper-dot-box {
  284. width: 400px;
  285. /* #ifndef APP-NVUE */
  286. margin: 0 auto;
  287. /* #endif */
  288. margin-top: 8px;
  289. }
  290. .image {
  291. width: 100%;
  292. }
  293. }
  294. </style>