index.vue 8.7KB

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