myCard.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. <template>
  2. <view>
  3. <u-navbar placeholder title="我的证件" @leftClick="leftClick" bgColor="#112253" titleStyle="color:#fff"
  4. leftIconColor="#fff">
  5. </u-navbar>
  6. <view class="flex content1 flex-between">
  7. <view @click='addclick' class="button">
  8. <!-- <u--image :showLoading="true" src="../../static/imgs/mySet/add.png" width="80px" height="80px"></u--image> -->
  9. <image src="../../static/imgs/mySet/add.png" mode="widthFix" class="btn-img"></image>
  10. 新增
  11. </view>
  12. <view @click='share' class="button">
  13. <image src="../../static/imgs/mySet/share1.png" mode="widthFix" class="btn-img"></image>
  14. 分享
  15. </view>
  16. <view @click='imageOCR' class="button">
  17. <image src="../../static/imgs/mySet/shibie.png" mode="widthFix" class="btn-img"></image>
  18. 识别号码
  19. </view>
  20. </view>
  21. <view v-if='addstatus' class="content2">
  22. <view class="flex flex-between">
  23. <u--input border="bottom" v-model="cardData.certificateName" placeholder="输入证件名称" focus></u--input>
  24. <view @click='add' class="submit">提交</view>
  25. </view>
  26. <view class='add-image'>
  27. <u-upload @afterRead="afterRead" :fileList="fileList1" @delete="deletePic" name="1" multiple
  28. :maxCount="1" height='190' width='360'>
  29. <view class="bgc">
  30. <image class='circle' style='width:148rpx;height:148rpx;' src="../../static/imgs/mySet/uploadbg.png" mode=""></image>
  31. <!-- <view class="circle">
  32. <view class="add">
  33. +
  34. </view>
  35. </view> -->
  36. </view>
  37. </u-upload>
  38. </view>
  39. </view>
  40. <view class="content3" style="background-color: #F7F7F7;">
  41. <mescroll-body v-if='!addstatus&&cardList.length==0||cardList.length>0' ref="mescrollRef"
  42. @init="mescrollInit" @up="upCallback" @down="downCallback" :up="upOption" :down="downOption">
  43. <view v-for='(item,index) in cardList' class="">
  44. <view class="flex flex-between row">
  45. <view v-if='!item.editstatus' class="left flex">
  46. <view class="name-text">
  47. {{item.certificateName}}
  48. </view>
  49. <text v-if='item.personNo'>({{item.personNo1}})</text>
  50. <image src="../../static/imgs/mySet/copy.png" mode="widthFix" style="width: 28rpx;" v-if='item.personNo' @click='clip(0,item)'></image>
  51. <!-- <u-icon v-if='item.personNo' @click='clip(0,item)' name="file-text-fill" color="#2979ff"
  52. size="28"></u-icon> -->
  53. <text v-if='item.bankNo' style="margin:0 20rpx ;">{{item.bankNo1}}</text>
  54. <image src="../../static/imgs/mySet/copy.png" mode="widthFix" style="width: 28rpx;" v-if='item.bankNo' @click='clip(1,item)'></image>
  55. <!-- <u-icon v-if='item.bankNo' @click='clip(1,item)' name="file-text-fill" color="#2979ff"
  56. size="28"></u-icon> -->
  57. </view>
  58. <u--input @input='certificateNameInput($event,item)' border="bottom" v-else
  59. v-model="item.certificateName" placeholder="输入证件名称"></u--input>
  60. <view class="flex" v-if="item.editstatus">
  61. <view @click='qxEdit(item)' :class="!item.editstatus?'edit':'finished'"
  62. style="margin:0 20rpx;">取消</view>
  63. <view @click='edit(item)' :class="!item.status?'edit':'finished'">完成</view>
  64. </view>
  65. <view class="flex" v-if="!item.editstatus">
  66. <view @click="del(item)" :class="!item.editstatus?'edit':'finished'"
  67. style="margin:0 20rpx 0 0;">删除</view>
  68. <view @click='edit(item)' class="finished">编辑</view>
  69. </view>
  70. </view>
  71. <view class="row2" v-if='!item.editstatus'>
  72. <image @click='previewImage(item.certificateImage)' :src="item.certificateImage" class="img" mode="aspectFill" style="width: 95%;"></image>
  73. <view class="right">
  74. <u-checkbox-group v-model="item.checked" placement="column"
  75. @change="checkboxChange($event,index,item)">
  76. <u-checkbox iconColor='#4977FC' activeColor="#fff" :name='index+1'
  77. :customStyle="{marginBottom: '8px'}">
  78. </u-checkbox>
  79. </u-checkbox-group>
  80. <!-- <image src="../../static/imgs/mySet/del1.png" mode="widthFix" @click="del(item)" style="width: 28rpx;"></image> -->
  81. </view>
  82. </view>
  83. <view v-else style='padding-left:20rpx;'>
  84. <u-upload @afterRead="afterRead" :fileList="fileList2" @delete="deletePic" name="2" multiple
  85. :maxCount="1" height='190' width='340'>
  86. <!-- <view class="">
  87. 123
  88. </view> -->
  89. <!-- <image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
  90. mode="widthFix" style="width: 250px;height: 150px;"></image> -->
  91. </u-upload>
  92. </view>
  93. </view>
  94. </mescroll-body>
  95. </view>
  96. <u-picker :immediateChange="true" @cancel='show=false' @confirm='pickerConfirm' title='识别类型' :show="show"
  97. :columns="columns"></u-picker>
  98. <u-popup :show="popupshow" :closeOnClickOverlay='true' :overlayOpacity='0.4' @close='handleHiddenShare'
  99. :round="10" mode="bottom">
  100. <view>
  101. <view class="share-content">
  102. <view class="block" @click="toUrl()">
  103. <button class="moment">
  104. <view class="iconfont icon-pengyouquan"></view>
  105. <view style="font-size: 26rpx;">分享朋友圈</view>
  106. </button>
  107. </view>
  108. <view class="block">
  109. <button class="shareBtn" type="default" data-name="shareBtn" open-type="share">
  110. <view class="iconfont icon-weixin"></view>
  111. <view style="font-size: 26rpx;">分享微信好友</view>
  112. </button>
  113. </view>
  114. </view>
  115. </view>
  116. </u-popup>
  117. <u-modal @cancel='modalshow=false' confirmText='删除' showCancelButton='true' @confirm='delConfirm'
  118. :show="modalshow" title="提示" content='确定删除证件?'></u-modal>
  119. <u-modal @cancel='credentialscancel' cancelText='重新识别' confirmText='确认号码' showCancelButton='true'
  120. @confirm='credentialsConfirm' :show="credentialsShow" title="提示">
  121. <view class="slot-content">
  122. 证件号码
  123. <u--input v-if='shibie=="识别身份证号"' v-model="credentials.recPersonNo" placeholder="输入证件名称"
  124. border="none"></u--input>
  125. <u--input v-if='shibie=="识别银行卡号"' v-model="credentials.bankNo" placeholder="输入证件名称"
  126. border="none"></u--input>
  127. </view>
  128. </u-modal>
  129. <u-modal :show="modalstatusshow" confirmText='继续返回' cancelText='取消' @confirm='confirm' @cancel='cancel'
  130. showCancelButton='true' title="提示" content='有证件处于编辑状态未提交。'></u-modal>
  131. <u-toast ref="uToast"></u-toast>
  132. <canvas style="position: absolute; top: -1000px; left: -1000px; width: 600px; height: 400px; background: #000;"
  133. canvas-id="canvas"></canvas>
  134. <point-share @close='showShare=false' :show='showShare'></point-share>
  135. </view>
  136. </template>
  137. <script>
  138. import uploadImage from '@/components/ossutil/uploadFile.js';
  139. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  140. import PointShare from '../../components/point-share/index.vue';
  141. export default {
  142. mixins: [MescrollMixin],
  143. components: {
  144. PointShare
  145. },
  146. data() {
  147. return {
  148. downOption: {
  149. textColor: '#bbb'
  150. },
  151. upOption: {
  152. page: {
  153. size: 10 // 每页数据的数量,默认10
  154. },
  155. auto: false,
  156. noMoreSize: 1,
  157. textNoMore: '没有更多了~',
  158. textColor: '#bbb'
  159. },
  160. show: false,
  161. modalshow: false,
  162. modalstatusshow: false,
  163. popupshow: false,
  164. columns: [
  165. ['识别身份证号', '识别银行卡号']
  166. ],
  167. showShare: false,
  168. userInfo: {},
  169. cardData: {},
  170. cardList: [],
  171. fileList1: [],
  172. fileList2: [],
  173. checkedList: [],
  174. addstatus: false,
  175. id: '',
  176. credentialsShow: false,
  177. credentials: {},
  178. shibie: '',
  179. shibieList: [],
  180. canReset: false,
  181. shareimg: ''
  182. };
  183. },
  184. onLoad() {
  185. // this.getList()
  186. },
  187. onShow() {
  188. this.userInfo = uni.getStorageSync("userInfo")
  189. this.cardData.commonId = uni.getStorageSync("userInfo").id
  190. this.$nextTick(function() {
  191. this.canReset && this.mescroll.resetUpScroll() // 重置列表数据为第一页
  192. this.canReset && this.mescroll.scrollTo(0, 0) // 重置列表数据为第一页时,建议把滚动条也重置到顶部,避免无法再次翻页的问题
  193. this.canReset = true // 过滤第一次的onShow事件,避免初始化界面时重复触发upCallback, 无需配置auto:false
  194. });
  195. this.cutShareImg()
  196. },
  197. onShareAppMessage(res) {
  198. let that = this;
  199. //生成名片图片
  200. let imageUrl = this.poster
  201. console.log("imageUrl", uni.getStorageSync('checkedList'))
  202. if (res.from === 'button') {
  203. return {
  204. title: '证件分享',
  205. path: '/pages/mySet/lookCard?dataList=' + uni.getStorageSync('checkedList'),
  206. imageUrl: this.shareimg,
  207. };
  208. }
  209. if (res.from === 'menu') {
  210. return {
  211. title: '名片夹',
  212. path: '/pages/tabBarPro/index/index',
  213. imageUrl: this.popupshow ? imageUrl : ''
  214. };
  215. }
  216. },
  217. methods: {
  218. previewImage(src) {
  219. console.log(src)
  220. //预览图片
  221. uni.previewImage({
  222. urls: [src], // 需要预览的图片链接列表,可以写你图片链接的数组或者跟我一样,就写一个单独的链接
  223. current: src // 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张
  224. });
  225. },
  226. toUrl() {
  227. this.popupshow = false
  228. this.showShare = true
  229. },
  230. cutShareImg() {
  231. let that = this;
  232. uni.getImageInfo({
  233. src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230506110702.png', // 这里填写网络图片路径
  234. success: (res) => {
  235. let ctx = uni.createCanvasContext('canvas');
  236. ctx.drawImage(res.path, 0, 0, 480, 300)
  237. ctx.draw(false, () => {
  238. uni.canvasToTempFilePath({
  239. canvasId: 'canvas',
  240. fileType: 'png',
  241. success: (res) => {
  242. //设置分享图片路径
  243. that.shareimg = res.tempFilePath
  244. console.log(that.shareimg)
  245. }
  246. })
  247. })
  248. }
  249. });
  250. },
  251. handleHiddenShare() {
  252. this.popupshow = false
  253. },
  254. certificateNameInput(e, item) {
  255. console.log(item)
  256. if (item.certificateName1 != item.certificateName) {
  257. item.status = true
  258. } else {
  259. item.status = false
  260. }
  261. },
  262. qxEdit() {
  263. this.mescroll.resetUpScroll()
  264. },
  265. clip(status, item) {
  266. uni.setClipboardData({
  267. data: status == 1 ? item.bankNo : item.personNo, // e是你要保存的内容
  268. success: function() {
  269. uni.showToast({
  270. title: '复制成功',
  271. icon: 'none'
  272. })
  273. }
  274. })
  275. },
  276. edit(item) {
  277. if (item.editstatus) {
  278. if (item.status) {
  279. this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'update', {
  280. certificateManagementInfo: JSON.stringify(item)
  281. }, failres => {
  282. console.log('res+++++', failres.errmsg)
  283. uni.hideLoading()
  284. uni.showToast({
  285. icon: "none",
  286. title: failres.errmsg,
  287. duration: 3000
  288. });
  289. }).then(res => {
  290. uni.hideLoading()
  291. uni.showToast({
  292. icon: "success",
  293. title: '编辑成功!',
  294. duration: 2000
  295. });
  296. this.modalshow = false
  297. this.checkedList = []
  298. this.mescroll.resetUpScroll()
  299. })
  300. }
  301. } else {
  302. item.editstatus = true
  303. item.certificateName1 = item.certificateName
  304. this.fileList2 = [{
  305. url: item.certificateImage
  306. }]
  307. }
  308. },
  309. delConfirm() {
  310. this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'delete', {
  311. id: this.id
  312. }, failres => {
  313. console.log('res+++++', failres.errmsg)
  314. uni.showToast({
  315. icon: "none",
  316. title: failres.errmsg,
  317. duration: 3000
  318. });
  319. uni.hideLoading()
  320. }).then(res => {
  321. uni.hideLoading()
  322. uni.showToast({
  323. icon: "success",
  324. title: '删除成功!',
  325. duration: 2000
  326. });
  327. this.modalshow = false
  328. this.checkedList = []
  329. this.mescroll.resetUpScroll()
  330. })
  331. },
  332. pickerConfirm(e) {
  333. this.show = false
  334. console.log(e)
  335. uni.showLoading({
  336. title: '数据加载中',
  337. mask: true
  338. })
  339. var type = '',
  340. type1 = ''
  341. this.shibie = e.value[0]
  342. this.shibieList = JSON.parse(JSON.stringify(this.cardList[this.checkedList[0]]))
  343. if (e.value[0] == '识别身份证号') {
  344. type = 'admin.unimall.certificateManagementInfo'
  345. type1 = 'personShibie'
  346. } else if (e.value[0] == '识别银行卡号') {
  347. type = 'admin.unimall.certificateManagementInfo'
  348. type1 = 'bankShibie'
  349. }
  350. this.$request.baseRequest(type, type1, {
  351. certificateImage: this.cardList[this.checkedList[0]].certificateImage
  352. }, failres => {
  353. console.log('res+++++', failres.errmsg)
  354. uni.hideLoading()
  355. uni.showToast({
  356. icon: "none",
  357. title: failres.errmsg,
  358. duration: 3000
  359. });
  360. }).then(res => {
  361. console.log(res.data)
  362. uni.hideLoading()
  363. uni.showToast({
  364. icon: "success",
  365. title: '识别成功!',
  366. duration: 2000
  367. });
  368. this.credentials = res.data
  369. this.credentialsShow = true
  370. })
  371. },
  372. checkboxChange(e, i) {
  373. console.log(e[0], i)
  374. if (e[0]) {
  375. this.checkedList.push(i)
  376. } else {
  377. var index = this.checkedList.findIndex((item) => {
  378. return item == i
  379. })
  380. this.checkedList.splice(index, 1)
  381. }
  382. // for(var i=0;i<this.cardList.length;i++){
  383. // console.log(this.cardList[i].checked)
  384. // // if(this.cardList[i].checkedList.length>0){
  385. // // this.checkedList.push(i)
  386. // // }
  387. // }
  388. console.log(this.checkedList)
  389. },
  390. share() {
  391. if (this.checkedList.length == 0) {
  392. uni.showToast({
  393. icon: "none",
  394. title: '请勾选想要分享的证件!!',
  395. duration: 2000
  396. });
  397. return
  398. }
  399. var arr = []
  400. for (var i = 0; i < this.cardList.length; i++) {
  401. if (this.checkedList.findIndex((item) => {
  402. return item == i
  403. }) != -1) {
  404. arr.push(this.cardList[i])
  405. }
  406. }
  407. console.log(arr, 111)
  408. uni.setStorageSync('checkedList', JSON.stringify(arr));
  409. this.popupshow = true
  410. },
  411. imageOCR() {
  412. console.log(this.cardList, this.checkedList)
  413. if (this.checkedList.length == 0) {
  414. uni.showToast({
  415. icon: "none",
  416. title: '请勾选想要识别的证件!',
  417. duration: 2000
  418. });
  419. return
  420. }
  421. if (this.checkedList.length > 1) {
  422. uni.showToast({
  423. icon: "none",
  424. title: '一次只能勾选一张证件',
  425. duration: 3000
  426. });
  427. return
  428. }
  429. this.show = true
  430. },
  431. credentialscancel() {
  432. this.credentialsShow = false
  433. this.pickerConfirm({
  434. value: [this.shibie]
  435. })
  436. },
  437. credentialsConfirm() {
  438. var type = '',
  439. type1 = ''
  440. if (this.shibie == '识别身份证号') {
  441. this.shibieList.personNo = this.credentials.recPersonNo
  442. } else if (this.shibie == '识别银行卡号') {
  443. this.shibieList.bankNo = this.credentials.bankNo
  444. }
  445. // if(this.shibie=='识别身份证号'){
  446. // type='admin.unimall.certificateManagementInfo'
  447. // type1='personShibie'
  448. // }else if(this.shibie=='识别银行卡号'){
  449. // type='admin.unimall.certificateManagementInfo'
  450. // type1='bankShibie'
  451. // }
  452. this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'update', {
  453. certificateManagementInfo: JSON.stringify(this.shibieList)
  454. }, failres => {
  455. console.log('res+++++', failres.errmsg)
  456. uni.showToast({
  457. icon: "none",
  458. title: failres.errmsg,
  459. duration: 3000
  460. });
  461. uni.hideLoading()
  462. }).then(res => {
  463. uni.hideLoading()
  464. uni.showToast({
  465. icon: "success",
  466. title: '编辑成功!',
  467. duration: 2000
  468. });
  469. this.credentialsShow = false
  470. this.checkedList = []
  471. this.mescroll.resetUpScroll()
  472. })
  473. },
  474. confirm() {
  475. uni.navigateBack()
  476. },
  477. cancel() {
  478. this.modalstatusshow = false
  479. },
  480. leftClick() {
  481. if (this.cardData.certificateImage) {
  482. console.log(22222)
  483. this.modalstatusshow = true
  484. } else {
  485. uni.navigateBack()
  486. }
  487. },
  488. del(item) {
  489. this.modalshow = true
  490. this.id = item.id
  491. },
  492. addclick() {
  493. this.addstatus = true
  494. },
  495. add() {
  496. if (!this.cardData.certificateImage) {
  497. uni.showToast({
  498. icon: "none",
  499. title: "请上传证件照片",
  500. duration: 2000
  501. });
  502. return
  503. }
  504. uni.showLoading({
  505. title: '数据加载中'
  506. })
  507. this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'add', {
  508. certificateManagementInfo: JSON.stringify(this.cardData)
  509. }, failres => {
  510. console.log('res+++++', failres.errmsg)
  511. uni.hideLoading()
  512. uni.showToast({
  513. icon: "none",
  514. title: failres.errmsg,
  515. duration: 3000
  516. });
  517. }).then(res => {
  518. // if (res.errno == 200) {
  519. uni.hideLoading()
  520. uni.showToast({
  521. icon: "success",
  522. title: '提交成功!',
  523. duration: 2000
  524. });
  525. this.fileList1 = []
  526. this.addstatus = false
  527. this.cardData = {
  528. commonId: uni.getStorageSync("userInfo").id
  529. }
  530. this.mescroll.resetUpScroll()
  531. // }
  532. })
  533. },
  534. deletePic(event) {
  535. this[`fileList${event.name}`].splice(event.index, 1)
  536. this.cardData.certificateImage = this[`fileList${event.name}`].toString()
  537. },
  538. // 新增图片
  539. async afterRead(event) {
  540. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  541. let lists = [].concat(event.file)
  542. let fileListLen = this[`fileList${event.name}`].length
  543. lists.map((item) => {
  544. this[`fileList${event.name}`].push({
  545. ...item,
  546. status: 'uploading',
  547. message: '上传中'
  548. })
  549. })
  550. // console.log(event,111111,fileListLen)
  551. for (let i = 0; i < lists.length; i++) {
  552. const result = await this.uploadFilePromise(lists[i].url)
  553. this.cardData.certificateImage = result
  554. this[`fileList${event.name}`][fileListLen] = {}
  555. let item = this[`fileList${event.name}`][fileListLen]
  556. console.log(item)
  557. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  558. status: 'success',
  559. message: '',
  560. url: result
  561. }))
  562. fileListLen++
  563. this.checkedList = []
  564. }
  565. console.log(this[`fileList${event.name}`])
  566. },
  567. uploadFilePromise(url) {
  568. console.log(url)
  569. return new Promise((resolve, reject) => {
  570. uploadImage(url, 'cardImages/',
  571. result => {
  572. console.log(result, 22222)
  573. resolve(result)
  574. }
  575. )
  576. })
  577. },
  578. mescrollInit() {
  579. },
  580. downCallback() {
  581. var that = this
  582. this.$nextTick(() => {
  583. // mescroll.endSuccess(data.result);
  584. that.mescroll.resetUpScroll()
  585. });
  586. },
  587. upCallback(page) {
  588. var that = this
  589. uni.showLoading({
  590. title: '数据加载中'
  591. })
  592. this.$request.baseRequest('admin.unimall.certificateManagementInfo', 'list', {
  593. page: page.num,
  594. limit: page.size,
  595. commonId: uni.getStorageSync("userInfo").id
  596. }, failres => {
  597. console.log('res+++++', failres.errmsg)
  598. uni.hideLoading()
  599. uni.showToast({
  600. icon: "none",
  601. title: failres.errmsg,
  602. duration: 3000
  603. });
  604. this.mescroll.endBySize(curPageLen, totalPage)
  605. }).then(res => {
  606. console.log(res)
  607. if (page.num == 1) this.cardList = [];
  608. let curPageLen = res.data.items.length;
  609. let totalPage = res.data.total;
  610. if (res.data.items.length > 0) {
  611. for (var i = 0; i < res.data.items.length; i++) {
  612. res.data.items[i].editstatus = false
  613. res.data.items[i].status = false
  614. if (res.data.items[i].personNo) res.data.items[i].personNo1 = '****' + (res.data.items[i]
  615. .personNo.substring(res.data.items[i].personNo.length - 4))
  616. if (res.data.items[i].bankNo) res.data.items[i].bankNo1 = '****' + (res.data.items[i]
  617. .bankNo.substring(res.data.items[i].bankNo.length - 4))
  618. }
  619. }
  620. this.cardList = this.cardList.concat(res.data.items)
  621. this.cardData.certificateName = '证件' + '-' + (this.cardList.length + 1)
  622. this.$nextTick(() => {
  623. console.log(that)
  624. // mescroll.endSuccess(data.result);
  625. that.mescroll.endBySize(curPageLen, totalPage)
  626. });
  627. // if (res.errno == 200) {
  628. uni.hideLoading()
  629. // }
  630. })
  631. },
  632. }
  633. }
  634. </script>
  635. <style lang="scss" scoped>
  636. button::after {
  637. border: initial;
  638. }
  639. .share {
  640. width: 100%;
  641. height: 100%;
  642. }
  643. .share-box {
  644. width: 100%;
  645. height: 100%;
  646. position: fixed;
  647. top: 0rpx;
  648. left: 0rpx;
  649. bottom: 0rpx;
  650. right: 0rpx;
  651. background-color: rgba(0, 0, 0, 0.4);
  652. transition: .3s;
  653. z-index: 999;
  654. }
  655. .block>button {
  656. display: flex;
  657. flex-direction: column;
  658. justify-content: center;
  659. align-items: center;
  660. background-color: white;
  661. border-style: none;
  662. width: 300rpx;
  663. height: 180rpx;
  664. // outline:none;
  665. // opacity: 0;
  666. }
  667. // 进入分享动画
  668. .share-show {
  669. transition: all 0.3s ease;
  670. transform: translateY(0%) !important;
  671. }
  672. // 离开分享动画
  673. .share-item {
  674. .share-to {
  675. width: 100%;
  676. height: 3rem;
  677. display: flex;
  678. justify-content: center;
  679. align-items: center;
  680. &::after {
  681. content: '';
  682. width: 240rpx;
  683. height: 0rpx;
  684. border-top: 1px solid #E4E7ED;
  685. -webkit-transform: scaleY(0.5);
  686. transform: scaleY(0.5);
  687. margin-left: 30rpx;
  688. }
  689. &::before {
  690. content: '';
  691. width: 240rpx;
  692. height: 0rpx;
  693. border-top: 1px solid #E4E7ED;
  694. -webkit-transform: scaleY(0.5);
  695. transform: scaleY(0.5);
  696. margin-right: 30rpx;
  697. }
  698. }
  699. .content {
  700. width: 100%;
  701. height: auto;
  702. display: flex;
  703. flex-wrap: wrap;
  704. .block {
  705. width: 50%;
  706. display: flex;
  707. flex-direction: column;
  708. justify-content: center;
  709. align-items: center;
  710. height: 180rpx;
  711. image {
  712. width: 80rpx;
  713. height: 80rpx;
  714. }
  715. text {
  716. margin-top: 16rpx;
  717. font-size: 28rpx;
  718. color: #606266;
  719. }
  720. }
  721. }
  722. .cancel {
  723. width: 100%;
  724. height: 3rem;
  725. display: flex;
  726. justify-content: center;
  727. align-items: center;
  728. border-top: 1rpx solid #E4E7ED;
  729. }
  730. }
  731. .content1 {
  732. background-color: #112253;
  733. padding: 20rpx;
  734. box-sizing: border-box;
  735. border-radius: 0px 0px 20rpx 20rpx;
  736. .button {
  737. display: flex;
  738. align-items: center;
  739. justify-content: center;
  740. background: #fff;
  741. color: #333333;
  742. border-radius: 20rpx;
  743. padding: 0 24rpx;
  744. height: 88rpx;
  745. width: calc(33% - 60rpx);
  746. font-size: 32rpx;
  747. }
  748. .btn-img {
  749. width: 28rpx;
  750. margin-right: 18rpx;
  751. height: auto;
  752. }
  753. }
  754. .content2 {
  755. padding: 20rpx;
  756. .bgc {
  757. background: #fff;
  758. width: calc(100vw - 40rpx);
  759. height: 380rpx;
  760. position: relative;
  761. border-radius: 30rpx;
  762. .circle {
  763. position: absolute;
  764. top: 50%;
  765. left: 50%;
  766. transform: translateX(-50%) translateY(-50%);
  767. text-align: center;
  768. }
  769. }
  770. .submit {
  771. padding: 8rpx 20rpx;
  772. text-align: center;
  773. background: #112253;
  774. border-radius: 10rpx;
  775. font-size: 28rpx;
  776. font-weight: bold;
  777. color: #FFFFFF;
  778. margin-left: 20rpx;
  779. }
  780. }
  781. .content3 {
  782. .row {
  783. padding: 20rpx;
  784. box-sizing: border-box;
  785. .name-text {
  786. font-size: 32rpx;
  787. font-weight: bold;
  788. color: #1A1A1A;
  789. }
  790. }
  791. .edit {
  792. padding: 10rpx 14rpx;
  793. text-align: center;
  794. background: rgba(17, 34, 83, 0.1);
  795. border-radius: 10rpx;
  796. font-size: 28rpx;
  797. font-weight: bold;
  798. color: #FFFFFF;
  799. }
  800. .finished {
  801. padding: 10rpx 14rpx;
  802. text-align: center;
  803. background: #112253;
  804. border-radius: 10rpx;
  805. font-size: 28rpx;
  806. font-weight: bold;
  807. color: #FFFFFF;
  808. }
  809. .row2 {
  810. display: flex;
  811. justify-content: center;
  812. position: relative;
  813. .img {
  814. border-radius: 20rpx;
  815. height: 380rpx;
  816. }
  817. .right {
  818. position: absolute;
  819. right: 0;
  820. height: 100%;
  821. right: 10px;
  822. display: flex;
  823. flex-direction: column;
  824. justify-content: space-between;
  825. align-items: center;
  826. padding: 10px 5px;
  827. box-sizing: border-box;
  828. }
  829. /deep/.u-checkbox__icon-wrap {
  830. margin-right: 0 !important;
  831. }
  832. }
  833. }
  834. .add-image {
  835. background-color: #fff;
  836. margin-top: 20rpx;
  837. border-radius: 20rpx;
  838. }
  839. .share-content {
  840. display: flex;
  841. padding: 20rpx;
  842. justify-content: center;
  843. font-size: 24rpx;
  844. button {
  845. background: transparent;
  846. line-height: 1.5;
  847. }
  848. button:after {
  849. border: none;
  850. }
  851. }
  852. .icon-pengyouquan,
  853. .icon-weixin {
  854. font-size: 50px;
  855. color: #33CC00;
  856. }
  857. /deep/.u-upload {
  858. .u-upload__deletable {
  859. height: 40rpx;
  860. width: 40rpx;
  861. line-height: 40rpx;
  862. }
  863. .u-upload__deletable__icon {
  864. top: 8rpx;
  865. }
  866. .uicon-close {
  867. font-size: 20px !important;
  868. }
  869. }
  870. </style>