myCard.vue 23 KB

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