input.vue 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161
  1. <template>
  2. <view class="infos" style="padding: 30rpx">
  3. <nav-bar title="填写审核资料"></nav-bar>
  4. <view v-show="!agreementModal">
  5. <view class="topBox">
  6. <view>
  7. <u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
  8. <text style="color: #ff3b30; margin-left: 10rpx"
  9. >学习前请提交完整审核资料</text
  10. >
  11. </view>
  12. <view style="color: #007aff" @click="refuseAgreement">稍后再填</view>
  13. </view>
  14. <u-collapse
  15. v-show="remarkStatus"
  16. :item-style="itemStyle"
  17. event-type="close"
  18. ref="collapse"
  19. >
  20. <u-collapse-item title="审核结果反馈">
  21. <view style="padding-bottom: 30rpx">
  22. <text class="collapse-item">{{ remark || "" }}</text>
  23. </view>
  24. </u-collapse-item>
  25. </u-collapse>
  26. <view class="bodyBox" style="margin-top: 30rpx; padding: 0 20rpx">
  27. <u-form :model="form" ref="uForm" :error-type="errorType">
  28. <template v-for="(item, index) in listData">
  29. <u-form-item
  30. :key="index"
  31. v-if="item.fieldKey == 'name'"
  32. :label="item.fieldName"
  33. :required="item.required"
  34. :label-width="auto"
  35. :prop="item.required ? item.fieldKey : ''"
  36. >
  37. <u-input
  38. v-model="form.name"
  39. :disabled="disName"
  40. :placeholder="`请输入${item.fieldName}`"
  41. />
  42. </u-form-item>
  43. <u-form-item
  44. :key="index"
  45. v-if="item.fieldKey == 'idcard'"
  46. :label="item.fieldName"
  47. :required="item.required"
  48. :label-width="auto"
  49. :prop="item.required ? item.fieldKey : ''"
  50. >
  51. <u-input
  52. :disabled="disCard"
  53. v-model="form.idcard"
  54. :placeholder="`请输入${item.fieldName}`"
  55. />
  56. </u-form-item>
  57. <u-form-item
  58. :key="index"
  59. v-if="item.fieldKey == 'telphone'"
  60. :label="item.fieldName"
  61. :required="item.required"
  62. :label-width="auto"
  63. :disabled="true"
  64. :prop="item.required ? item.fieldKey : ''"
  65. >
  66. <u-input
  67. disabled
  68. v-model="form.telphone"
  69. :placeholder="`请输入${item.fieldName}`"
  70. />
  71. </u-form-item>
  72. <u-form-item
  73. :key="index"
  74. v-if="item.fieldKey == 'school'"
  75. :label="item.fieldName"
  76. :required="item.required"
  77. :label-width="auto"
  78. :prop="item.required ? item.fieldKey : ''"
  79. >
  80. <u-input
  81. v-model="form.school"
  82. :placeholder="`请输入${item.fieldName}`"
  83. />
  84. </u-form-item>
  85. <u-form-item
  86. :key="index"
  87. v-if="item.fieldKey == 'work_unit'"
  88. :label="item.fieldName"
  89. :required="item.required"
  90. :label-width="auto"
  91. :prop="item.required ? item.fieldKey : ''"
  92. >
  93. <u-input
  94. v-model="form.work_unit"
  95. :placeholder="`请输入${item.fieldName}`"
  96. />
  97. </u-form-item>
  98. <u-form-item
  99. :key="index"
  100. v-if="item.fieldKey == 'unit_contact'"
  101. :label="item.fieldName"
  102. :required="item.required"
  103. :label-width="auto"
  104. :prop="item.required ? item.fieldKey : ''"
  105. >
  106. <u-input
  107. v-model="form.unit_contact"
  108. :placeholder="`请输入${item.fieldName}`"
  109. />
  110. </u-form-item>
  111. <u-form-item
  112. :key="index"
  113. v-if="item.fieldKey == 'unit_tel'"
  114. :label="item.fieldName"
  115. :required="item.required"
  116. :label-width="auto"
  117. :prop="item.required ? item.fieldKey : ''"
  118. >
  119. <u-input
  120. v-model="form.unit_tel"
  121. :placeholder="`请输入${item.fieldName}`"
  122. />
  123. </u-form-item>
  124. <u-form-item
  125. :key="index"
  126. v-if="item.fieldKey == 'apply_post'"
  127. :label="item.fieldName"
  128. :required="item.required"
  129. :label-width="auto"
  130. :prop="item.required ? item.fieldKey : ''"
  131. >
  132. <u-input
  133. v-model="form.apply_post"
  134. :disabled="apply_post_disabled"
  135. :placeholder="`请输入${item.fieldName}`"
  136. />
  137. </u-form-item>
  138. <u-form-item
  139. :key="index"
  140. v-if="item.fieldKey == 'major'"
  141. :label="item.fieldName"
  142. :required="item.required"
  143. :label-width="auto"
  144. :prop="item.required ? item.fieldKey : ''"
  145. >
  146. <u-input
  147. v-model="form.major"
  148. :placeholder="`请输入${item.fieldName}`"
  149. />
  150. </u-form-item>
  151. <u-form-item
  152. :key="index"
  153. v-if="item.inputType == 2"
  154. :label="item.fieldName"
  155. :label-width="auto"
  156. :required="item.required"
  157. :prop="item.required ? item.fieldKey : ''"
  158. >
  159. <picker
  160. @change="bindPickerChange(item.fieldKey, $event)"
  161. :value="form[item.fieldKey]"
  162. :range="getarrays(item.fieldKey)"
  163. >
  164. <view class="picker">
  165. {{ returnName(item.fieldKey) }}
  166. <image
  167. src="@/static/icon/clears.png"
  168. v-if="clearWatch(item.fieldKey)"
  169. @click.stop="clearFun(item.fieldKey)"
  170. mode=""
  171. style="
  172. width: 30rpx;
  173. height: 30rpx;
  174. vertical-align: middle;
  175. margin-left: 10rpx;
  176. "
  177. ></image>
  178. </view>
  179. </picker>
  180. </u-form-item>
  181. <u-form-item
  182. :key="index"
  183. v-if="item.inputType == 5"
  184. :label="item.fieldName"
  185. :label-width="auto"
  186. :required="item.required"
  187. :prop="item.required ? item.fieldKey : ''"
  188. >
  189. <picker
  190. mode="date"
  191. :value="form[item.fieldKey]"
  192. @change="bindDateChange(item.fieldKey, $event)"
  193. >
  194. <view class="picker">
  195. {{ getTimes(item.fieldKey) }}
  196. <image
  197. src="@/static/icon/clears.png"
  198. v-if="clearWatch(item.fieldKey)"
  199. @click.stop="clearFun(item.fieldKey)"
  200. mode=""
  201. style="
  202. width: 30rpx;
  203. height: 30rpx;
  204. vertical-align: middle;
  205. margin-left: 10rpx;
  206. "
  207. ></image>
  208. </view>
  209. </picker>
  210. </u-form-item>
  211. <u-form-item
  212. :key="index"
  213. v-if="
  214. item.inputType == 3 &&
  215. item.fieldKey !== 'commitment_electr_signature'
  216. "
  217. :label="item.fieldName"
  218. :required="item.required"
  219. :label-width="auto"
  220. label-position="top"
  221. :prop="item.required ? item.fieldKey : ''"
  222. >
  223. <text
  224. v-if="item.fieldKey === 'recent_photos'"
  225. style="
  226. color: #999999;
  227. position: absolute;
  228. top: 20rpx;
  229. left: 130rpx;
  230. "
  231. >竖向白底证件照 文件大小≤2M</text
  232. >
  233. <text
  234. v-if="
  235. item.fieldKey === 'idcard_face_photo' ||
  236. item.fieldKey === 'idcard_national_photo'
  237. "
  238. style="
  239. color: #999999;
  240. position: absolute;
  241. top: 20rpx;
  242. left: 180rpx;
  243. "
  244. >
  245. 文件大小≤2M
  246. </text>
  247. <!-- :max-size="2097152" -->
  248. <!-- @on-list-change="
  249. item.fieldKey === 'recent_photos'
  250. ? changePhotoListHeader1($event)
  251. : item.fieldKey === 'idcard_face_photo'
  252. ? changePhotoListHeader2($event)
  253. : item.fieldKey === 'idcard_national_photo'
  254. ? changePhotoListHeader3($event)
  255. : ''
  256. " -->
  257. <u-upload
  258. :show-progress="false"
  259. :ref="
  260. item.fieldKey === 'recent_photos'
  261. ? 'recent_photos'
  262. : item.fieldKey === 'idcard_face_photo'
  263. ? 'idcard_face_photo'
  264. : item.fieldKey === 'idcard_national_photo'
  265. ? 'idcard_national_photo'
  266. : ''
  267. "
  268. @on-list-change="changePhotoListHeader($event, item.fieldKey)"
  269. :auto-upload="false"
  270. :custom-btn="true"
  271. action="#"
  272. :file-list="
  273. item.fieldKey === 'recent_photos'
  274. ? fileList1
  275. : item.fieldKey === 'idcard_face_photo'
  276. ? fileList2
  277. : item.fieldKey === 'idcard_national_photo'
  278. ? fileList3
  279. : ''
  280. "
  281. width="120"
  282. height="120"
  283. :size-type="['compressed']"
  284. max-count="1"
  285. >
  286. <template v-slot:addBtn>
  287. <image
  288. :src="
  289. item.fieldKey === 'recent_photos'
  290. ? '/static/info_1.png'
  291. : item.fieldKey === 'idcard_face_photo'
  292. ? '/static/info_2.png'
  293. : item.fieldKey === 'idcard_national_photo'
  294. ? '/static/info_3.png'
  295. : ''
  296. "
  297. :style="
  298. item.fieldKey === 'recent_photos'
  299. ? 'width: 120rpx; height: 169rpx;'
  300. : item.fieldKey === 'idcard_face_photo'
  301. ? 'width: 120rpx; height: 82rpx;'
  302. : item.fieldKey === 'idcard_national_photo'
  303. ? 'width: 120rpx; height: 82rpx;'
  304. : ''
  305. "
  306. ></image>
  307. </template>
  308. </u-upload>
  309. </u-form-item>
  310. <view
  311. :key="index"
  312. v-if="
  313. item.inputType == 3 &&
  314. item.fieldKey === 'commitment_electr_signature'
  315. "
  316. >
  317. <u-form-item
  318. v-if="
  319. item.inputType == 3 &&
  320. item.fieldKey === 'commitment_electr_signature'
  321. "
  322. label="承诺书"
  323. :required="item.required"
  324. :label-width="auto"
  325. label-position="top"
  326. >
  327. <view style="line-height: 40rpx; text-indent: 2em">
  328. <text>
  329. 本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
  330. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  331. </text>
  332. <view style="line-height: 40rpx; text-indent: 2em"
  333. ><text>特此承诺!</text></view
  334. >
  335. </view>
  336. </u-form-item>
  337. <u-form-item
  338. v-if="
  339. item.inputType == 3 &&
  340. item.fieldKey === 'commitment_electr_signature'
  341. "
  342. label="签名板"
  343. :required="item.required"
  344. :label-width="auto"
  345. label-position="top"
  346. :prop="item.required ? item.fieldKey : ''"
  347. >
  348. <div style="width:100%">
  349. <view class="dis_stys">
  350. <text style="color: #999999">请在下方签名区进行签名</text>
  351. <text @click="retDraw" mode="">清空</text>
  352. </view>
  353. <view class="handCenter">
  354. <canvas
  355. v-if="!form[item.fieldKey]"
  356. class="handWriting"
  357. disable-scroll="true"
  358. :catchtouchmove="true"
  359. @touchstart="uploadScaleStart"
  360. @touchmove="uploadScaleMove"
  361. @touchend="uploadScaleEnd"
  362. canvas-id="handWriting"
  363. ></canvas>
  364. <view
  365. v-else
  366. style="width: 100%; height: 100%; position: relative"
  367. >
  368. <view class="ctoples">图片</view>
  369. <image
  370. style="width: 100%; height: 100%"
  371. :src="$method.splitImgHost(form[item.fieldKey])"
  372. mode=""
  373. ></image>
  374. </view>
  375. </view>
  376. </div>
  377. </u-form-item>
  378. </view>
  379. <u-form-item
  380. v-if="item.inputType == 4"
  381. :key="index"
  382. :label="item.fieldName"
  383. :required="item.required"
  384. :label-width="auto"
  385. :prop="item.required ? item.fieldKey : ''"
  386. label-position="top"
  387. >
  388. <text
  389. style="
  390. color: #007aff;
  391. position: absolute;
  392. top: 20rpx;
  393. left: 180rpx;
  394. text-decoration: underline;
  395. "
  396. @click="downDocx(item.url)"
  397. >点击下载</text
  398. >
  399. <div>
  400. <view class="dis_stys"
  401. ><text style="color: #999999"
  402. >下载承诺书进行填写并签名盖章后上传(≤2M)</text
  403. ></view
  404. >
  405. <image
  406. v-if="!form[item.fieldKey]"
  407. style="width: 169rpx; height: 169rpx"
  408. @click="getChast"
  409. src="@/static/info_4.png"
  410. ></image>
  411. <view class="quzw" v-if="form[item.fieldKey]">
  412. <view
  413. v-if="
  414. form[item.fieldKey].split('.').splice(-1)[0] == 'docx' ||
  415. form[item.fieldKey].split('.').splice(-1)[0] == 'doc'
  416. "
  417. class="borsrs"
  418. >
  419. <image
  420. src="@/static/icon/jy_icon.png"
  421. style="width: 168rpx; height: 168rpx"
  422. ></image>
  423. <text>{{ titleName }}</text>
  424. </view>
  425. <image
  426. v-else
  427. :src="$method.splitImgHost(form[item.fieldKey])"
  428. style="width: 100%; height: 100%"
  429. mode="aspectFit"
  430. @click="seePhotos(form[item.fieldKey])"
  431. ></image>
  432. <u-icon
  433. name="close-circle-fill"
  434. color="red"
  435. size="44"
  436. class="optionsAbs"
  437. @click="clearWord"
  438. ></u-icon>
  439. </view>
  440. </div>
  441. </u-form-item>
  442. </template>
  443. </u-form>
  444. </view>
  445. <view @click="submits" class="submit_btn">提交资料</view>
  446. </view>
  447. <u-popup
  448. class="modal"
  449. catchtouchmove="return"
  450. v-model="agreementModal"
  451. mode="center"
  452. border-radius="24"
  453. :mask-close-able="false"
  454. >
  455. <view class="agreement">
  456. <view class="body">
  457. <scroll-view scroll-y="true" style="height: 600rpx">
  458. <view class="content">
  459. <view
  460. >本产品(或服务)提供【{{
  461. goodsData.goodsName
  462. }}】课程的在线学习功能,为使用这些功能,我们需要使用您设备上的摄像头,并收集以下个人信息:
  463. <text v-for="(item, listIndex) in listData" :key="listIndex"
  464. >{{ item.fieldName }}、</text
  465. >
  466. <!-- 姓名、性别、身份证号码、移动电话号码、身份证照片、一寸照、证书名称/岗位、证书编号、有效期、人脸照片(每节课随机拍摄三张)、 -->
  467. 学习详细记录。</view
  468. >
  469. <view
  470. >我们会将上述信息提供至广东省建设执业注册管理中心等第三方组织使用,用于继续教育备案等。如果您拒绝,将导致这些功能无法实现,但不影响您使用本产品(或服务)的其他业务功能。</view
  471. >
  472. </view>
  473. </scroll-view>
  474. </view>
  475. <view class="footer">
  476. <view class="btn cancel" @click="refuseAgreement">取消</view>
  477. <view class="btn ok" @click="agree">同意并继续</view>
  478. </view>
  479. </view>
  480. </u-popup>
  481. <u-action-sheet
  482. :list="list"
  483. v-model="showTableDown"
  484. @click="clickIndex"
  485. ></u-action-sheet>
  486. <!--用于图片压缩的canvas画布,不在页面中展示,且id固定不可变 position: absolute; z-index: -1; left: -10000rpx;; top: -10000rpx;-->
  487. <!-- style="width: {{cw}}px; height: {{cw}}px;" -->
  488. <view class="photo_can">
  489. <canvas class="zip_canvas" canvas-id="zipCanvas"></canvas>
  490. </view>
  491. </view>
  492. </template>
  493. <script>
  494. import config from "@/common/config";
  495. import { mapGetters, mapActions } from "vuex";
  496. import Handwriting from "@/common/signature.js";
  497. import getLessLimitSizeImage from "@/common/compressPhoto.js";
  498. export default {
  499. data() {
  500. return {
  501. baseUrls: config.BASE_IMG_URL,
  502. cw: wx.getSystemInfoSync().windowWidth, //画板边长默认是屏幕宽度,正方形画布
  503. list: [
  504. {
  505. text: "上传图片",
  506. },
  507. // {
  508. // text: '上传文件'
  509. // }
  510. ],
  511. showTableDown: false,
  512. gradeId: 0,
  513. errorType: ["message"],
  514. agreementModal: true,
  515. goodsData: {},
  516. itemStyle: {
  517. marginTop: "20px",
  518. backgroundColor: "#fff",
  519. borderRadius: "24rpx",
  520. padding: "0rpx 20rpx",
  521. },
  522. isUploading: false,
  523. form: {
  524. name: "",
  525. sex: "",
  526. idcard: "",
  527. telphone: "",
  528. education: "",
  529. school: "",
  530. graduation_time: "",
  531. work_unit: "",
  532. unit_contact: "",
  533. unit_tel: "",
  534. apply_post: "",
  535. major: "",
  536. working_years: "",
  537. recent_photos: "",
  538. idcard_face_photo: "",
  539. idcard_national_photo: "",
  540. commitment_electr_signature: "",
  541. commitment_seal: "",
  542. },
  543. lineColor: "black",
  544. slideValue: 50,
  545. handwriting: "",
  546. goodsId: null,
  547. listData: [], //页面数据
  548. ast: [],
  549. fileList1: [], //个人近照
  550. fileList2: [], //人像
  551. fileList3: [], //国徽
  552. openVerify: false, // 控制是否手动验证
  553. id: null, //获取修改ID内容
  554. remark: "", //反馈文本
  555. remarkStatus: false, //是否存在审核结果反馈
  556. // nextStatus: false, //是否有下一步
  557. copyData: [], //备份数据
  558. rules: {
  559. name: [
  560. {
  561. required: true,
  562. message: "请输入姓名",
  563. trigger: ["change", "blur"],
  564. },
  565. ],
  566. sex: [
  567. {
  568. required: true,
  569. message: "请选择性别",
  570. trigger: "change",
  571. },
  572. ],
  573. idcard: [
  574. {
  575. required: true,
  576. message: "请输入身份证号",
  577. trigger: ["change", "blur"],
  578. },
  579. // {
  580. // validator: (rule, value, callback) => {
  581. // return this.$u.test.idCard(value);
  582. // },
  583. // message: '身份证号不正确',
  584. // trigger: ['change', 'blur']
  585. // }
  586. ],
  587. telphone: [
  588. {
  589. required: true,
  590. message: "请输入手机号码",
  591. trigger: ["change", "blur"],
  592. },
  593. // {
  594. // validator: (rule, value, callback) => {
  595. // var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
  596. // if (this.$u.test.mobile(value) || vartest.test(value)) {
  597. // return true;
  598. // } else {
  599. // return false;
  600. // }
  601. // },
  602. // message: '手机号码不正确',
  603. // trigger: ['change', 'blur']
  604. // }
  605. ],
  606. education: [
  607. {
  608. required: true,
  609. message: "请选择学历",
  610. trigger: "change",
  611. },
  612. ],
  613. school: [
  614. {
  615. required: true,
  616. message: "请输入毕业院校",
  617. trigger: ["change", "blur"],
  618. },
  619. ],
  620. graduation_time: [
  621. {
  622. required: true,
  623. message: "请选择毕业时间",
  624. trigger: "change",
  625. },
  626. ],
  627. work_unit: [
  628. {
  629. required: true,
  630. message: "请输入工作单位",
  631. trigger: ["change", "blur"],
  632. },
  633. ],
  634. unit_contact: [
  635. {
  636. required: true,
  637. message: "请输入单位联系人",
  638. trigger: ["change", "blur"],
  639. },
  640. ],
  641. unit_tel: [
  642. {
  643. required: true,
  644. message: "请输入单位联系电话",
  645. trigger: ["change", "blur"],
  646. },
  647. {
  648. validator: (rule, value, callback) => {
  649. var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
  650. var vartest1 = /^([0-9]{3,4})?[0-9]{7,8}$/;
  651. if (
  652. this.$u.test.mobile(value) ||
  653. vartest.test(value) ||
  654. vartest1.test(value)
  655. ) {
  656. return true;
  657. } else {
  658. return false;
  659. }
  660. },
  661. message: "单位联系电话不正确",
  662. trigger: ["change", "blur"],
  663. },
  664. ],
  665. apply_post: [
  666. {
  667. required: true,
  668. message: "请输入报名岗位",
  669. trigger: ["change", "blur"],
  670. },
  671. ],
  672. major: [
  673. {
  674. required: true,
  675. message: "请输入所学专业",
  676. trigger: ["change", "blur"],
  677. },
  678. ],
  679. working_years: [
  680. {
  681. required: true,
  682. message: "请选择工作年限",
  683. trigger: "change",
  684. },
  685. ],
  686. recent_photos: [
  687. {
  688. required: true,
  689. message: "请上传个人近照",
  690. trigger: ["change", "blur"],
  691. },
  692. ],
  693. idcard_face_photo: [
  694. {
  695. required: true,
  696. message: "请上传身份证人像面",
  697. trigger: ["change", "blur"],
  698. },
  699. ],
  700. idcard_national_photo: [
  701. {
  702. required: true,
  703. message: "请上传身份证国徽面",
  704. trigger: ["change", "blur"],
  705. },
  706. ],
  707. commitment_electr_signature: [
  708. {
  709. required: true,
  710. message: "请签写承诺书电子签",
  711. trigger: ["change", "blur"],
  712. },
  713. ],
  714. commitment_seal: [
  715. {
  716. required: true,
  717. message: "请上传承诺书盖章",
  718. trigger: ["change", "blur"],
  719. },
  720. ],
  721. },
  722. apply_post_disabled: false,
  723. isRequired: false,
  724. orderGoodsId: 0,
  725. disName: false, // 姓名是否禁止输入
  726. disCard: false, // 身份证是否禁止输入
  727. auto: "180rpx",
  728. };
  729. },
  730. created() {
  731. this.$store.getters.dictObj;
  732. },
  733. async onLoad(option) {
  734. this.orderGoodsId = Number(option.orderGoodsId);
  735. this.goodsId = Number(option.id);
  736. this.gradeId = Number(option.gradeId);
  737. !this.userInfo && this.$api.refreshUserInfo();
  738. await this.getInfo();
  739. await this.getGoodsDetail();
  740. },
  741. onReady(res) {
  742. this.handwriting = new Handwriting({
  743. lineColor: this.lineColor,
  744. slideValue: this.slideValue, // 0, 25, 50, 75, 100
  745. canvasName: "handWriting",
  746. });
  747. this.$refs.uForm.setRules(this.rules);
  748. },
  749. computed: { ...mapGetters(["dictObj", "userInfo"]) },
  750. watch: {
  751. userInfo(val, oldVal) {
  752. //普通的watch监听
  753. if (val) {
  754. this.listData.forEach((item) => {
  755. if (item.fieldKey == "idcard") {
  756. this.form.idcard = this.userInfo.idCard;
  757. }
  758. if (item.fieldKey == "telphone") {
  759. this.form.telphone = this.userInfo.telphone;
  760. }
  761. if (item.fieldKey == "name") {
  762. this.form.name = this.userInfo.realname;
  763. }
  764. });
  765. }
  766. },
  767. },
  768. methods: {
  769. ...mapActions(["getUserInfo"]),
  770. inputName(event) {
  771. console.log("enevt", event, this.form.name);
  772. },
  773. clickIndex(inds) {
  774. if (inds === 0) {
  775. this.uploadImgs();
  776. }
  777. if (inds === 1) {
  778. this.uploadFieds();
  779. }
  780. },
  781. getChast() {
  782. this.showTableDown = true;
  783. },
  784. seePhotos(url) {
  785. uni.previewImage({
  786. urls: [url],
  787. });
  788. },
  789. async downDocx(url) {
  790. let self = this;
  791. var ast = this.listData.some((item) => {
  792. return item.fieldKey === "commitment_electr_signature";
  793. });
  794. if (ast) {
  795. await this.subCanvas();
  796. }
  797. let data = JSON.parse(JSON.stringify(this.form));
  798. if (data["commitment_electr_signature"]) {
  799. data.commitment_electr_signature = await this.$method.uploadFile(
  800. data.commitment_electr_signature,
  801. 0
  802. );
  803. }
  804. if (this.remarkStatus) {
  805. var arsty = {};
  806. for (let k in data) {
  807. for (let j in self.copyData) {
  808. if (k === j) {
  809. if (self.copyData[j].value === data[k]) {
  810. arsty[k] = {
  811. fieldKey: k,
  812. value: data[k],
  813. fieldName: (function () {
  814. for (let i = 0; i < self.listData.length; i++) {
  815. if (self.listData[i].fieldKey == k) {
  816. return self.listData[i].fieldName;
  817. }
  818. }
  819. })(),
  820. status: 0,
  821. };
  822. } else {
  823. arsty[k] = {
  824. fieldKey: k,
  825. value: data[k],
  826. fieldName: (function () {
  827. for (let i = 0; i < self.listData.length; i++) {
  828. if (self.listData[i].fieldKey == k) {
  829. return self.listData[i].fieldName;
  830. }
  831. }
  832. })(),
  833. status: 1,
  834. };
  835. }
  836. }
  837. }
  838. }
  839. } else {
  840. var arsty = {};
  841. for (let k in data) {
  842. arsty[k] = {
  843. fieldKey: k,
  844. value: data[k],
  845. fieldName: (function () {
  846. for (let i = 0; i < self.listData.length; i++) {
  847. if (self.listData[i].fieldKey == k) {
  848. return self.listData[i].fieldName;
  849. }
  850. }
  851. })(),
  852. status: 0,
  853. };
  854. }
  855. }
  856. console.log(arsty);
  857. this.$api
  858. .baseProfileStampV2AddWord({
  859. goodsId: this.goodsId,
  860. keyValue: JSON.stringify(arsty),
  861. })
  862. .then((res) => {
  863. // #ifdef H5
  864. window.location.href = this.$method.splitImgHost(res.data.msg);
  865. // #endif
  866. // #ifdef MP-WEIXIN
  867. uni.downloadFile({
  868. url: this.$method.splitImgHost(res.data.msg),
  869. success: (result) => {
  870. if (result.statusCode === 200) {
  871. const filePath = result.tempFilePath;
  872. console.log(this.$method.splitImgHost(res.data.msg));
  873. this.$method.showToast("下载成功");
  874. uni.saveImageToPhotosAlbum({
  875. filePath: filePath,
  876. success: function (errMsg) {
  877. uni.showToast({
  878. mask: true,
  879. title: "保存成功",
  880. });
  881. },
  882. fail: (errMsg) => {
  883. uni.showToast({
  884. mask: true,
  885. title: "保存失败",
  886. });
  887. },
  888. complete: (errMsg) => {},
  889. });
  890. }
  891. },
  892. });
  893. // #endif
  894. });
  895. },
  896. getGoodsDetail() {
  897. return new Promise((resolve) => {
  898. this.$api
  899. .orderInfo({
  900. orderGoodsId: this.orderGoodsId,
  901. })
  902. .then((res) => {
  903. this.goodsData = res.data.data;
  904. if (this.goodsData.categoryName) {
  905. this.$set(this.form, "apply_post", this.goodsData.categoryName);
  906. console.log(this.form);
  907. if (this.goodsData.categoryName) {
  908. this.apply_post_disabled = true;
  909. }
  910. }
  911. if (this.userInfo && this.userInfo.companyName) {
  912. this.$set(this.form, "work_unit", this.userInfo.companyName);
  913. }
  914. resolve();
  915. });
  916. });
  917. },
  918. uploadImgs() {
  919. uni.chooseImage({
  920. count: 1, //默认9
  921. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  922. success: (res) => {
  923. if (res.tempFiles[0].size > 2097152) {
  924. this.$method.showToast("上传图片不得大于2M");
  925. return;
  926. // this.$method.showToast("上传图片不得大于2M");
  927. // 需要压缩
  928. let canvasId = "zipCanvas";
  929. let imagePath = res.tempFiles[0].path; //原图的路径
  930. let limitSize = 2048; //大小限制2048kb
  931. let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
  932. getLessLimitSizeImage(
  933. canvasId,
  934. imagePath,
  935. limitSize,
  936. drawWidth,
  937. async (resPath) => {
  938. //resPath就是压缩后图片的路径
  939. this.uploadImgsChild(resPath);
  940. }
  941. );
  942. return;
  943. } else {
  944. // this.uploadImgsChild(res.tempFiles[0].path);
  945. // #ifdef MP-WEIXIN
  946. var type = res.tempFiles[0].path.split(".").splice(-1);
  947. // #endif
  948. // #ifdef H5
  949. var type = res.tempFiles[0].type.split("/").splice(-1);
  950. // #endif
  951. if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
  952. this.$method.showToast("请上传图片格式");
  953. return;
  954. }
  955. this.$set(this.form, "commitment_seal", res.tempFiles[0].path);
  956. this.$nextTick(() => {
  957. this.resultForm();
  958. });
  959. }
  960. },
  961. });
  962. },
  963. uploadImgsChild(path) {
  964. // #ifdef MP-WEIXIN
  965. var type = path.split(".").splice(-1);
  966. // #endif
  967. // #ifdef H5
  968. var type = type.split("/").splice(-1);
  969. // #endif
  970. if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
  971. this.$method.showToast("请上传图片格式");
  972. return;
  973. }
  974. this.$set(this.form, "commitment_seal", path);
  975. this.$nextTick(() => {
  976. this.resultForm();
  977. });
  978. },
  979. uploadFieds() {
  980. var self = this;
  981. wx.chooseMessageFile({
  982. count: 1,
  983. size: 2097152,
  984. type: "file",
  985. success(res) {
  986. if (res.tempFiles[0].size > 2097152) {
  987. self.$method.showToast("上传文件不得大于2M");
  988. return;
  989. } else {
  990. var type = res.tempFiles[0].path.split(".").splice(-1);
  991. if (
  992. type[0] != "jpg" &&
  993. type[0] != "png" &&
  994. type[0] != "jpeg" &&
  995. type[0] != "docx" &&
  996. type[0] != "doc"
  997. ) {
  998. self.$method.showToast("请上传word文档或图片");
  999. return;
  1000. }
  1001. self.titleName = res.tempFiles[0].name;
  1002. self.$set(self.form, "commitment_seal", res.tempFiles[0].path);
  1003. self.$nextTick(function () {
  1004. this.resultForm();
  1005. });
  1006. }
  1007. },
  1008. });
  1009. },
  1010. agree() {
  1011. this.agreementModal = false;
  1012. setTimeout(() => {
  1013. this.$refs.collapse.init();
  1014. }, 1000);
  1015. },
  1016. refuseAgreement() {
  1017. uni.navigateBack({
  1018. delta: 2,
  1019. });
  1020. },
  1021. clearFun(key) {
  1022. this.form[key] = "";
  1023. },
  1024. //清除按钮
  1025. clearWatch(key) {
  1026. if (this.form[key]) {
  1027. return true;
  1028. } else {
  1029. return false;
  1030. }
  1031. },
  1032. async uploadDatas(data) {
  1033. console.log("sfsfg---data", data);
  1034. if (this.form.recent_photos && this.form.idcard_face_photo) {
  1035. let base64 = await this.$method.imageToBase64(
  1036. this.form.idcard_face_photo
  1037. );
  1038. let resData = await this.faceCertificationIDCardOCR(1, base64);
  1039. if (!resData.data) {
  1040. uni.showModal({
  1041. title: "提示",
  1042. content: "身份证人像面照片异常,请重新上传",
  1043. showCancel: false,
  1044. });
  1045. this.isUploading = false;
  1046. return;
  1047. }
  1048. base64 = await this.$method.imageToBase64(this.form.recent_photos);
  1049. this.$api
  1050. .faceCertificationIdCardCompareFace({
  1051. urlA: this.form.idcard_face_photo,
  1052. oneInchPhotos: base64,
  1053. })
  1054. .then((res1) => {
  1055. if (res1.data.data >= 70) {
  1056. var self = this;
  1057. if (self.remarkStatus) {
  1058. var arsty = {};
  1059. for (let k in data) {
  1060. for (let j in self.copyData) {
  1061. if (k === j) {
  1062. if (self.copyData[j].value === data[k]) {
  1063. arsty[k] = {
  1064. fieldKey: k,
  1065. value: data[k],
  1066. fieldName: (function () {
  1067. for (let i = 0; i < self.listData.length; i++) {
  1068. if (self.listData[i].fieldKey == k) {
  1069. return self.listData[i].fieldName;
  1070. }
  1071. }
  1072. })(),
  1073. status: 0,
  1074. };
  1075. } else {
  1076. arsty[k] = {
  1077. fieldKey: k,
  1078. value: data[k],
  1079. fieldName: (function () {
  1080. for (let i = 0; i < self.listData.length; i++) {
  1081. if (self.listData[i].fieldKey == k) {
  1082. return self.listData[i].fieldName;
  1083. }
  1084. }
  1085. })(),
  1086. status: 1,
  1087. };
  1088. }
  1089. }
  1090. }
  1091. }
  1092. var datas = {
  1093. id: this.id,
  1094. goodsId: this.goodsId,
  1095. orderGoodsId: this.orderGoodsId,
  1096. keyValue: JSON.stringify(arsty),
  1097. };
  1098. console.log(datas, "datas0");
  1099. // this.isUploading = false;
  1100. // return;
  1101. this.$api.editbaseprofiletp(datas).then((res) => {
  1102. this.isUploading = false;
  1103. if (res.data.code === 200) {
  1104. this.$method.showToast("提交成功");
  1105. this.getUserInfo();
  1106. setTimeout(() => {
  1107. console.log("延迟");
  1108. uni.navigateBack();
  1109. }, 1500);
  1110. } else {
  1111. this.$method.showToast(res.data.msg);
  1112. this.isUploading = false;
  1113. }
  1114. });
  1115. } else {
  1116. var objs = {};
  1117. for (let k in data) {
  1118. objs[k] = {
  1119. fieldKey: k,
  1120. value: data[k],
  1121. fieldName: (function () {
  1122. for (let i = 0; i < self.listData.length; i++) {
  1123. if (self.listData[i].fieldKey == k) {
  1124. return self.listData[i].fieldName;
  1125. }
  1126. }
  1127. })(),
  1128. status: 0,
  1129. };
  1130. }
  1131. var datas = {
  1132. goodsId: this.goodsId,
  1133. profileTpId: this.goodsId,
  1134. orderGoodsId: this.orderGoodsId,
  1135. keyValue: JSON.stringify(objs),
  1136. };
  1137. console.log(data, "datas");
  1138. // this.isUploading = false;
  1139. // return;
  1140. this.$api.addbaseprofiletp(datas).then((res) => {
  1141. this.isUploading = false;
  1142. if (res.data.code === 200) {
  1143. this.$method.showToast("提交成功");
  1144. this.getUserInfo();
  1145. setTimeout(() => {
  1146. console.log("延迟");
  1147. uni.navigateBack();
  1148. }, 1500);
  1149. } else {
  1150. this.$method.showToast(res.data.msg);
  1151. this.isUploading = false;
  1152. }
  1153. });
  1154. }
  1155. } else {
  1156. this.isUploading = false;
  1157. uni.showModal({
  1158. title: "提示",
  1159. content: "个人近照和身份证人像面照片不匹配",
  1160. showCancel: false,
  1161. });
  1162. }
  1163. });
  1164. return;
  1165. }
  1166. var self = this;
  1167. if (self.remarkStatus) {
  1168. var arsty = {};
  1169. for (let k in data) {
  1170. for (let j in self.copyData) {
  1171. if (k === j) {
  1172. if (self.copyData[j].value === data[k]) {
  1173. arsty[k] = {
  1174. fieldKey: k,
  1175. value: data[k],
  1176. fieldName: (function () {
  1177. for (let i = 0; i < self.listData.length; i++) {
  1178. if (self.listData[i].fieldKey == k) {
  1179. return self.listData[i].fieldName;
  1180. }
  1181. }
  1182. })(),
  1183. status: 0,
  1184. };
  1185. } else {
  1186. arsty[k] = {
  1187. fieldKey: k,
  1188. value: data[k],
  1189. fieldName: (function () {
  1190. for (let i = 0; i < self.listData.length; i++) {
  1191. if (self.listData[i].fieldKey == k) {
  1192. return self.listData[i].fieldName;
  1193. }
  1194. }
  1195. })(),
  1196. status: 1,
  1197. };
  1198. }
  1199. }
  1200. }
  1201. }
  1202. console.log(arsty, "arsty");
  1203. if (Object.keys(arsty).length == 0) {
  1204. uni.showModal({
  1205. title: "提示",
  1206. content: "数据错误,请联系管理员",
  1207. });
  1208. this.isUploading = false;
  1209. return;
  1210. }
  1211. var datas = {
  1212. id: this.id,
  1213. goodsId: this.goodsId,
  1214. orderGoodsId: this.orderGoodsId,
  1215. keyValue: JSON.stringify(arsty),
  1216. };
  1217. console.log(datas, "datas1");
  1218. this.$api.editbaseprofiletp(datas).then((res) => {
  1219. this.isUploading = false;
  1220. if (res.data.code === 200) {
  1221. this.$method.showToast("提交成功");
  1222. this.getUserInfo();
  1223. setTimeout(() => {
  1224. console.log("延迟");
  1225. uni.navigateBack();
  1226. }, 1500);
  1227. } else {
  1228. this.$method.showToast(res.data.msg);
  1229. this.isUploading = false;
  1230. }
  1231. });
  1232. } else {
  1233. var objs = {};
  1234. for (let k in data) {
  1235. objs[k] = {
  1236. fieldKey: k,
  1237. value: data[k],
  1238. fieldName: (function () {
  1239. for (let i = 0; i < self.listData.length; i++) {
  1240. if (self.listData[i].fieldKey == k) {
  1241. return self.listData[i].fieldName;
  1242. }
  1243. }
  1244. })(),
  1245. status: 0,
  1246. };
  1247. }
  1248. var datas = {
  1249. goodsId: this.goodsId,
  1250. profileTpId: this.goodsId,
  1251. orderGoodsId: this.orderGoodsId,
  1252. keyValue: JSON.stringify(objs),
  1253. };
  1254. console.log(datas, "datas2");
  1255. // this.isUploading = false;
  1256. // return;
  1257. this.$api
  1258. .addbaseprofiletp(datas)
  1259. .then((res) => {
  1260. this.isUploading = false;
  1261. if (res.data.code === 200) {
  1262. this.$method.showToast("提交成功");
  1263. this.getUserInfo();
  1264. setTimeout(() => {
  1265. console.log("延迟");
  1266. uni.navigateBack();
  1267. }, 1500);
  1268. } else {
  1269. this.$method.showToast(res.data.msg);
  1270. this.isUploading = false;
  1271. }
  1272. })
  1273. .catch((err) => {});
  1274. }
  1275. },
  1276. clearWord() {
  1277. this.$set(this.form, "commitment_seal", "");
  1278. this.titleName = "";
  1279. },
  1280. //提交表单
  1281. async submitApi() {
  1282. var data = JSON.parse(JSON.stringify(this.form));
  1283. if (data["sex"]) {
  1284. data.sex = this.dictObj["sys_user_sex"][Number(data.sex)];
  1285. }
  1286. if (data["education"]) {
  1287. data.education = this.dictObj["edu_level"][Number(data.education)];
  1288. }
  1289. if (data["working_years"]) {
  1290. data.working_years =
  1291. this.dictObj["working_years"][Number(data.working_years)];
  1292. }
  1293. if (data["recent_photos"]) {
  1294. data.recent_photos = await this.$method.uploadFile(
  1295. data.recent_photos,
  1296. 0
  1297. );
  1298. }
  1299. if (data["idcard_face_photo"]) {
  1300. data.idcard_face_photo = await this.$method.uploadFile(
  1301. data.idcard_face_photo,
  1302. 0
  1303. );
  1304. }
  1305. if (data["idcard_national_photo"]) {
  1306. data.idcard_national_photo = await this.$method.uploadFile(
  1307. data.idcard_national_photo,
  1308. 0
  1309. );
  1310. }
  1311. if (data["commitment_electr_signature"]) {
  1312. data.commitment_electr_signature = await this.$method.uploadFile(
  1313. data.commitment_electr_signature,
  1314. 0
  1315. );
  1316. }
  1317. if (data["commitment_seal"]) {
  1318. data.commitment_seal = await this.$method.uploadFile(
  1319. data.commitment_seal,
  1320. 0
  1321. );
  1322. }
  1323. this.uploadDatas(data);
  1324. },
  1325. //验证表单
  1326. resultForm(int) {
  1327. console.log(this.openVerify, "openVerify");
  1328. console.log(this.isRequired, "isRequired");
  1329. if (this.openVerify) {
  1330. if (this.isRequired) {
  1331. this.submitApi();
  1332. } else {
  1333. if (int === 1) {
  1334. this.errorType = ["toast"];
  1335. } else {
  1336. this.errorType = ["message"];
  1337. }
  1338. this.$nextTick(() => {
  1339. this.$refs.uForm.validate((valid) => {
  1340. if (valid) {
  1341. if (int === 1) {
  1342. this.submitApi();
  1343. }
  1344. } else {
  1345. this.isUploading = false;
  1346. this.errorType = ["message"];
  1347. console.log(this.form);
  1348. console.log("验证失败");
  1349. }
  1350. });
  1351. });
  1352. }
  1353. }
  1354. },
  1355. async submits() {
  1356. if (this.isUploading) {
  1357. return;
  1358. }
  1359. this.isUploading = true;
  1360. var ast = this.listData.some((item) => {
  1361. return item.fieldKey === "commitment_electr_signature";
  1362. });
  1363. if (ast) {
  1364. await this.subCanvas();
  1365. }
  1366. this.openVerify = true;
  1367. this.resultForm(1);
  1368. },
  1369. async faceCertificationIDCardOCR(cardSide, base64) {
  1370. if (!this.$method.isBase64(base64)) {
  1371. base64 = await this.$method.fileToBase64(base64);
  1372. }
  1373. let res = await this.$api.faceCertificationIDCardOCR({
  1374. cardSide: cardSide, //1人像 2 国徽
  1375. cardImageBase64: base64,
  1376. gradeId: this.gradeId,
  1377. });
  1378. return Promise.resolve(res.data);
  1379. },
  1380. async changePhotoListHeader(lists, key) {
  1381. const map = {
  1382. recent_photos: 1,
  1383. idcard_face_photo: 2,
  1384. idcard_national_photo: 3,
  1385. };
  1386. const index = map[key];
  1387. if (lists.length) {
  1388. this["fileList" + index] = lists;
  1389. // #ifdef MP-WEIXIN
  1390. const isJPG =
  1391. lists[0].url.indexOf("//tmp") !== -1 ||
  1392. lists[0].url.indexOf("//temp") !== -1;
  1393. // #endif
  1394. // #ifdef H5
  1395. const isJPG =
  1396. lists[0].file.type === "image/jpeg" ||
  1397. lists[0].file.type === "image/png" ||
  1398. lists[0].file.type === "image/jpg";
  1399. // #endif
  1400. if (isJPG) {
  1401. let size = lists[0].file.size;
  1402. if (size < 2 * 1024 * 1024) {
  1403. if (index == 1) {
  1404. let url = lists[0].url;
  1405. // #ifdef MP-WEIXIN
  1406. url = await this.$method.imageInfos(url);
  1407. // #endif
  1408. // #ifdef H5
  1409. url = await this.$method.uploadFile(url, 0);
  1410. // #endif
  1411. this.$set(this.form, "recent_photos", url);
  1412. } else {
  1413. // #ifdef MP-WEIXIN
  1414. let url = lists[0].url;
  1415. // #endif
  1416. // #ifdef H5
  1417. let url = lists[0].file;
  1418. // #endif
  1419. this.$refs[key][0].remove(0);
  1420. let titleMsg =
  1421. "请上传正确清晰的身份证" +
  1422. (index == 2 ? "人像" : "国徽") +
  1423. "面照片";
  1424. this.checkIdCard(index - 1, url, titleMsg, key);
  1425. }
  1426. } else {
  1427. uni.showModal({
  1428. title: "提示",
  1429. content: "上传图片大小不能超过 2MB!",
  1430. showCancel: false,
  1431. });
  1432. return;
  1433. }
  1434. }
  1435. } else {
  1436. this.fileList3 = [];
  1437. this.$set(this.form, "idcard_national_photo", "");
  1438. }
  1439. this.openVerify = false;
  1440. this.$nextTick(function () {
  1441. this.resultForm();
  1442. });
  1443. },
  1444. async changePhotoListHeader1(lists, name) {
  1445. if (lists.length) {
  1446. this.fileList1 = lists;
  1447. // console.log(lists, "lists1");
  1448. if (
  1449. lists[0].url.indexOf("//tmp") !== -1 ||
  1450. lists[0].url.indexOf("//temp") !== -1
  1451. ) {
  1452. if (lists[0].file.size < 2 * 1024 * 1024) {
  1453. // 以前的
  1454. this.$set(
  1455. this.form,
  1456. "recent_photos",
  1457. await this.$method.imageInfos(lists[0].url)
  1458. );
  1459. } else {
  1460. // 需要压缩
  1461. let canvasId = "zipCanvas";
  1462. let imagePath = lists[0].url; //原图的路径
  1463. let limitSize = 2048; //大小限制2048kb
  1464. let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
  1465. getLessLimitSizeImage(
  1466. canvasId,
  1467. imagePath,
  1468. limitSize,
  1469. drawWidth,
  1470. async (resPath) => {
  1471. //resPath就是压缩后图片的路径
  1472. this.$set(
  1473. this.form,
  1474. "recent_photos",
  1475. await this.$method.imageInfos(resPath)
  1476. );
  1477. }
  1478. );
  1479. }
  1480. }
  1481. } else {
  1482. this.fileList1 = [];
  1483. this.$set(this.form, "recent_photos", "");
  1484. }
  1485. this.openVerify = false;
  1486. this.$nextTick(function () {
  1487. this.resultForm();
  1488. });
  1489. },
  1490. async changePhotoListHeader2(lists, name) {
  1491. // console.log('身份证照片zhengmian:', lists, this.$refs.idcard_face_photo)
  1492. if (lists.length) {
  1493. this.fileList2 = lists;
  1494. if (
  1495. lists[0].url.indexOf("//tmp") !== -1 ||
  1496. lists[0].url.indexOf("//temp") !== -1
  1497. ) {
  1498. let url = lists[0].url;
  1499. let size = lists[0].file.size;
  1500. this.$refs.idcard_face_photo[0].remove(0);
  1501. // console.log('url', url, size)
  1502. let titleMsg = "请上传正确清晰的身份证人像面照片";
  1503. if (size < 2 * 1024 * 1024) {
  1504. this.checkIdCard(1, url, titleMsg, "idcard_face_photo");
  1505. } else {
  1506. // 需要压缩
  1507. let canvasId = "zipCanvas";
  1508. let imagePath = url; //原图的路径
  1509. let limitSize = 2048; //大小限制2048kb
  1510. let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
  1511. getLessLimitSizeImage(
  1512. canvasId,
  1513. imagePath,
  1514. limitSize,
  1515. drawWidth,
  1516. async (resPath) => {
  1517. //resPath就是压缩后图片的路径
  1518. this.checkIdCard(1, resPath, titleMsg, "idcard_face_photo");
  1519. }
  1520. );
  1521. }
  1522. }
  1523. } else {
  1524. this.fileList2 = [];
  1525. this.$set(this.form, "idcard_face_photo", "");
  1526. }
  1527. this.openVerify = false;
  1528. this.$nextTick(function () {
  1529. this.resultForm();
  1530. });
  1531. },
  1532. async changePhotoListHeader3(lists, name) {
  1533. if (lists.length) {
  1534. this.fileList3 = lists;
  1535. // #ifdef MP-WEIXIN
  1536. const isJPG =
  1537. lists[0].url.indexOf("//tmp") !== -1 ||
  1538. lists[0].url.indexOf("//temp") !== -1;
  1539. // #endif
  1540. // #ifdef H5
  1541. const isJPG =
  1542. lists[0].file.type === "image/jpeg" ||
  1543. lists[0].file.type === "image/png" ||
  1544. lists[0].file.type === "image/jpg";
  1545. // #endif
  1546. if (isJPG) {
  1547. console.log("//tem", lists[0]);
  1548. // #ifdef MP-WEIXIN
  1549. let url = lists[0].url;
  1550. // #endif
  1551. // #ifdef H5
  1552. let url = lists[0].file;
  1553. // #endif
  1554. let size = lists[0].file.size;
  1555. this.$refs.idcard_national_photo[0].remove(0);
  1556. let titleMsg = "请上传正确清晰的身份证国徽面照片";
  1557. if (size < 2 * 1024 * 1024) {
  1558. this.checkIdCard(2, url, titleMsg, "idcard_national_photo");
  1559. } else {
  1560. uni.showModal({
  1561. title: "提示",
  1562. content: "上传图片大小不能超过 2MB!",
  1563. showCancel: false,
  1564. });
  1565. return;
  1566. // 需要压缩
  1567. let canvasId = "zipCanvas";
  1568. let imagePath = url; //原图的路径
  1569. let limitSize = 2048; //大小限制2048kb
  1570. let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
  1571. getLessLimitSizeImage(
  1572. canvasId,
  1573. imagePath,
  1574. limitSize,
  1575. drawWidth,
  1576. async (resPath) => {
  1577. //resPath就是压缩后图片的路径
  1578. this.checkIdCard(2, resPath, titleMsg, "idcard_national_photo");
  1579. }
  1580. );
  1581. }
  1582. }
  1583. } else {
  1584. this.fileList3 = [];
  1585. this.$set(this.form, "idcard_national_photo", "");
  1586. }
  1587. this.openVerify = false;
  1588. this.$nextTick(function () {
  1589. this.resultForm();
  1590. });
  1591. },
  1592. async checkIdCard(cardSide, url, titleMsg, paramType) {
  1593. let res = await this.faceCertificationIDCardOCR(cardSide, url);
  1594. if (res.code == 500) {
  1595. uni.showToast({
  1596. icon: "none",
  1597. title: titleMsg,
  1598. });
  1599. return;
  1600. }
  1601. let { IdName, IdNum } = res.data;
  1602. if (IdName != this.form.name || IdNum != this.form.idcard) {
  1603. // uni.showModal({
  1604. // content:
  1605. // IdName != this.form.name
  1606. // ? "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
  1607. // : "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服",
  1608. // showCancel: false,
  1609. // success: (resultst) => {
  1610. // if (resultst.confirm) {
  1611. // uni.navigateBack();
  1612. // }
  1613. // },
  1614. // });
  1615. // return;
  1616. }
  1617. this.$refs[paramType][0].lists = [
  1618. {
  1619. url: this.$method.splitImgHost(res.data.IdImgPath),
  1620. },
  1621. ];
  1622. this.$set(this.form, paramType, res.data.IdImgPath);
  1623. },
  1624. getTimes(key) {
  1625. if (this.form[key]) {
  1626. return this.form[key];
  1627. } else {
  1628. return "请选择时间";
  1629. }
  1630. },
  1631. getarrays(key) {
  1632. if (!this.dictObj) return;
  1633. if (key === "sex") {
  1634. return this.dictObj["sys_user_sex"];
  1635. }
  1636. if (key === "education") {
  1637. return this.dictObj["edu_level"];
  1638. }
  1639. if (key === "working_years") {
  1640. return this.dictObj["working_years"];
  1641. }
  1642. },
  1643. returnName(key) {
  1644. if (!this.dictObj) return;
  1645. if (key === "sex") {
  1646. if (this.form[key]) {
  1647. return this.dictObj["sys_user_sex"][Number(this.form[key])];
  1648. } else {
  1649. return "请选择性别";
  1650. }
  1651. }
  1652. if (key === "education") {
  1653. if (this.form[key]) {
  1654. return this.dictObj["edu_level"][Number(this.form[key])];
  1655. } else {
  1656. return "请选择学历";
  1657. }
  1658. }
  1659. if (key === "working_years") {
  1660. if (this.form[key]) {
  1661. return this.dictObj["working_years"][Number(this.form[key])];
  1662. } else {
  1663. return "请选择工作年限";
  1664. }
  1665. }
  1666. },
  1667. /**
  1668. * getbaseprofiletpgetInfo接口返回值result.data.data不存在的话说明是第一次填写资料
  1669. */
  1670. getInfo() {
  1671. return new Promise((resolve) => {
  1672. var self = this;
  1673. this.$api.getbaseprofiletpId(this.goodsId).then((res) => {
  1674. self.listData = JSON.parse(res.data.data.keyValue);
  1675. var ast = JSON.parse(res.data.data.keyValue2);
  1676. self.listData = [...self.listData, ...ast];
  1677. self.listData.forEach((item) => {
  1678. if (item.fieldKey == "idcard") {
  1679. this.form.idcard = this.userInfo.idCard;
  1680. this.disCard = this.form.idcard ? true : false;
  1681. }
  1682. if (item.fieldKey == "telphone") {
  1683. this.form.telphone = this.userInfo.telphone;
  1684. }
  1685. if (item.fieldKey == "name") {
  1686. this.form.name = this.userInfo.realname;
  1687. this.disName = this.form.name ? true : false;
  1688. }
  1689. });
  1690. self.isRequired = self.listData.every((ims) => {
  1691. return ims.required === false;
  1692. });
  1693. this.$nextTick(() => {
  1694. this.agreementModal = true;
  1695. });
  1696. self.$api
  1697. .getbaseprofiletpgetInfo({
  1698. goodsId: self.goodsId,
  1699. orderGoodsId: self.orderGoodsId,
  1700. })
  1701. .then((result) => {
  1702. if (result.data.code === 200) {
  1703. if (!result.data.data) {
  1704. self.$api
  1705. .getbaseprofiletplistProfile({ pageNum: 1, pageSize: 1 })
  1706. .then((kit) => {
  1707. if (kit.data.rows.length) {
  1708. var ajson = JSON.parse(kit.data.rows[0].keyValue);
  1709. self.listData.forEach((zyitem, zyindex) => {
  1710. for (let k in ajson) {
  1711. if (zyitem.fieldKey == k && ajson[k].value) {
  1712. if (k === "sex") {
  1713. const sexIndex =
  1714. self.dictObj["sys_user_sex"].indexOf(
  1715. ajson[k].value
  1716. ) + "";
  1717. self.$set(self.form, k, sexIndex);
  1718. } else if (k === "education") {
  1719. const sexIndex =
  1720. self.dictObj["edu_level"].indexOf(
  1721. ajson[k].value
  1722. ) + "";
  1723. self.$set(self.form, k, sexIndex);
  1724. } else if (k === "working_years") {
  1725. const sexIndex =
  1726. self.dictObj["working_years"].indexOf(
  1727. ajson[k].value
  1728. ) + "";
  1729. self.$set(self.form, k, sexIndex);
  1730. } else if (k === "recent_photos") {
  1731. self.$set(self.form, k, ajson[k].value);
  1732. if (ajson[k].value) {
  1733. self.fileList1 = [
  1734. {
  1735. url: baseUrls + ajson[k].value,
  1736. },
  1737. ];
  1738. }
  1739. } else if (k === "idcard_face_photo") {
  1740. self.$set(self.form, k, ajson[k].value);
  1741. if (ajson[k].value) {
  1742. self.fileList2 = [
  1743. {
  1744. url: baseUrls + ajson[k].value,
  1745. },
  1746. ];
  1747. }
  1748. } else if (k === "idcard_national_photo") {
  1749. self.$set(self.form, k, ajson[k].value);
  1750. if (ajson[k].value) {
  1751. self.fileList3 = [
  1752. {
  1753. url: baseUrls + ajson[k].value,
  1754. },
  1755. ];
  1756. }
  1757. } else {
  1758. if (k === "name") {
  1759. self.$set(
  1760. self.form,
  1761. k,
  1762. this.$store.state.userInfo.realname
  1763. );
  1764. } else if (k === "idcard") {
  1765. self.$set(
  1766. self.form,
  1767. k,
  1768. this.$store.state.userInfo.idCard
  1769. );
  1770. } else if (k === "telphone") {
  1771. self.$set(
  1772. self.form,
  1773. k,
  1774. this.$store.state.userInfo.telphone
  1775. );
  1776. } else if (
  1777. k !== "commitment_electr_signature"
  1778. ) {
  1779. self.$set(self.form, k, ajson[k].value);
  1780. }
  1781. }
  1782. }
  1783. }
  1784. });
  1785. resolve();
  1786. } else {
  1787. resolve();
  1788. }
  1789. });
  1790. }
  1791. if (result.data.data && result.data.data.status === 3) {
  1792. self.remark = result.data.data.text;
  1793. self.remarkStatus = true;
  1794. self.id = result.data.data.id;
  1795. var arrays = JSON.parse(result.data.data.keyValue);
  1796. // var arrays1 = JSON.parse(result.data.data.keyValue2);
  1797. self.copyData = JSON.parse(JSON.stringify(arrays));
  1798. for (let k in arrays) {
  1799. if (k === "sex") {
  1800. if (arrays[k].value) {
  1801. const sexIndex =
  1802. self.dictObj["sys_user_sex"].indexOf(
  1803. arrays[k].value
  1804. ) + "";
  1805. self.$set(self.form, k, sexIndex);
  1806. }
  1807. } else if (k === "education") {
  1808. if (arrays[k].value) {
  1809. const sexIndex =
  1810. self.dictObj["edu_level"].indexOf(arrays[k].value) +
  1811. "";
  1812. self.$set(self.form, k, sexIndex);
  1813. }
  1814. } else if (k === "working_years") {
  1815. if (arrays[k].value) {
  1816. const sexIndex =
  1817. self.dictObj["working_years"].indexOf(
  1818. arrays[k].value
  1819. ) + "";
  1820. self.$set(self.form, k, sexIndex);
  1821. }
  1822. } else if (k === "recent_photos") {
  1823. self.$set(self.form, k, arrays[k].value);
  1824. if (arrays[k].value) {
  1825. self.fileList1 = [{ url: baseUrls + arrays[k].value }];
  1826. }
  1827. } else if (k === "idcard_face_photo") {
  1828. self.$set(self.form, k, arrays[k].value);
  1829. if (arrays[k].value) {
  1830. self.fileList2 = [{ url: baseUrls + arrays[k].value }];
  1831. }
  1832. } else if (k === "idcard_national_photo") {
  1833. self.$set(self.form, k, arrays[k].value);
  1834. if (arrays[k].value) {
  1835. self.fileList3 = [{ url: baseUrls + arrays[k].value }];
  1836. }
  1837. } else if (k === "name") {
  1838. self.$set(
  1839. self.form,
  1840. k,
  1841. this.$store.state.userInfo.realname
  1842. );
  1843. } else if (k === "idcard") {
  1844. self.$set(
  1845. self.form,
  1846. k,
  1847. this.$store.state.userInfo.idCard
  1848. );
  1849. } else if (k === "telphone") {
  1850. self.$set(
  1851. self.form,
  1852. k,
  1853. this.$store.state.userInfo.telphone
  1854. );
  1855. } else {
  1856. self.$set(self.form, k, arrays[k].value);
  1857. }
  1858. }
  1859. resolve();
  1860. } else if (
  1861. result.data.data &&
  1862. (result.data.data.status === 1 ||
  1863. result.data.data.status === 2)
  1864. ) {
  1865. uni.showModal({
  1866. showCancel: false,
  1867. content:
  1868. result.data.data.status === 1
  1869. ? "该商品审核资料已通过,不可重复提交资料"
  1870. : result.data.data.status === 2
  1871. ? "该商品审核资料处于待审核状态,不可重复提交资料"
  1872. : "请联系管理员",
  1873. success: function (k) {
  1874. if (k.confirm) {
  1875. uni.navigateBack();
  1876. }
  1877. },
  1878. });
  1879. }
  1880. }
  1881. });
  1882. });
  1883. });
  1884. },
  1885. bindPickerChange(key, e) {
  1886. this.$set(this.form, key, e.detail.value + "");
  1887. this.openVerify = false;
  1888. this.$nextTick(function () {
  1889. this.resultForm();
  1890. });
  1891. },
  1892. bindDateChange(key, e) {
  1893. this.form[key] = e.detail.value;
  1894. },
  1895. retDraw() {
  1896. this.handwriting.retDraw();
  1897. this.$set(this.form, "commitment_electr_signature", "");
  1898. this.openVerify = false;
  1899. this.$nextTick(function () {
  1900. this.resultForm();
  1901. });
  1902. },
  1903. uploadScaleStart(event) {
  1904. this.handwriting.uploadScaleStart(event);
  1905. },
  1906. uploadScaleMove(event) {
  1907. this.handwriting.uploadScaleMove(event);
  1908. },
  1909. uploadScaleEnd(event) {
  1910. this.handwriting.uploadScaleEnd(event);
  1911. },
  1912. subCanvas() {
  1913. return new Promise((resolve, reject) => {
  1914. var self = this;
  1915. if (self.form.commitment_electr_signature) {
  1916. resolve();
  1917. return;
  1918. }
  1919. self.handwriting
  1920. .saveCanvas()
  1921. .then((res) => {
  1922. if (this.handwriting.linePrack.length) {
  1923. this.$set(this.form, "commitment_electr_signature", res);
  1924. }
  1925. resolve(res);
  1926. })
  1927. .catch((err) => {
  1928. uni.showToast({
  1929. title: "签名上传失败",
  1930. icon: "error",
  1931. });
  1932. this.isUploading = false;
  1933. });
  1934. });
  1935. },
  1936. },
  1937. };
  1938. </script>
  1939. <style>
  1940. page {
  1941. background: #eaeef1;
  1942. }
  1943. </style>
  1944. <style scope lang="scss">
  1945. .infos {
  1946. position: relative;
  1947. top: 0rpx;
  1948. left: 0rpx;
  1949. .photo_can {
  1950. width: 100%;
  1951. height: 100%;
  1952. position: absolute;
  1953. z-index: -1;
  1954. left: -10000rpx;
  1955. top: -10000rpx;
  1956. }
  1957. .zip_canvas {
  1958. width: 100%;
  1959. height: 600rpx;
  1960. border: 2rpx solid #333;
  1961. }
  1962. }
  1963. .ctoples {
  1964. position: absolute;
  1965. top: 0;
  1966. left: 0;
  1967. padding: 2rpx 23rpx;
  1968. display: inline-block;
  1969. background-color: rgba(0, 0, 0, 0.4);
  1970. font-size: 28rpx;
  1971. color: #fff;
  1972. border-bottom-right-radius: 24rpx;
  1973. }
  1974. .quzw {
  1975. width: 638rpx;
  1976. height: 638rpx;
  1977. position: relative;
  1978. border: 2rpx solid #eee;
  1979. border-radius: 8rpx;
  1980. }
  1981. .handWriting {
  1982. width: 100%;
  1983. height: 100%;
  1984. }
  1985. /deep/ .u-collapse-title {
  1986. color: #ff3b30;
  1987. font-size: 24rpx;
  1988. }
  1989. // /deep/ .u-input {
  1990. // text-align: right !important;
  1991. // }
  1992. .picker {
  1993. flex: 1;
  1994. }
  1995. /deep/ .u-form-item--right {
  1996. .u-input__input {
  1997. text-align: right;
  1998. }
  1999. uni-picker {
  2000. flex: 1;
  2001. }
  2002. }
  2003. .collapse-item {
  2004. color: #666;
  2005. font-size: 24rpx;
  2006. padding-bottom: 30rpx;
  2007. }
  2008. .dis_stys {
  2009. display: flex;
  2010. align-items: center;
  2011. justify-content: space-between;
  2012. }
  2013. .handCenter {
  2014. background: #f7f7f7;
  2015. border: 2rpx solid #eeeeee;
  2016. border-radius: 24rpx;
  2017. width: 100%;
  2018. height: 400rpx;
  2019. overflow: hidden;
  2020. }
  2021. .headerSDels {
  2022. height: 58rpx;
  2023. padding: 0rpx 24rpx;
  2024. font-weight: bold;
  2025. display: flex;
  2026. align-items: center;
  2027. flex-direction: row-reverse;
  2028. }
  2029. .listBox {
  2030. margin: 24rpx 32rpx 0rpx;
  2031. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  2032. border-radius: 32rpx;
  2033. background-color: #fff;
  2034. overflow: hidden;
  2035. }
  2036. .imgBoxs {
  2037. width: 156rpx;
  2038. height: 203rpx;
  2039. }
  2040. .imgBoxs2 {
  2041. width: 171rpx;
  2042. height: 108rpx;
  2043. }
  2044. .submit_btn {
  2045. width: 526rpx;
  2046. height: 80rpx;
  2047. background: #007aff;
  2048. border-radius: 40rpx;
  2049. text-align: center;
  2050. line-height: 80rpx;
  2051. color: #ffffff;
  2052. margin: 30rpx auto;
  2053. }
  2054. .picker {
  2055. text-align: right;
  2056. }
  2057. input {
  2058. text-align: right;
  2059. }
  2060. .bodyBox {
  2061. background: #ffffff;
  2062. border-radius: 24rpx;
  2063. width: 100%;
  2064. }
  2065. .topBox {
  2066. height: 80rpx;
  2067. background: #ffffff;
  2068. border-radius: 24rpx;
  2069. width: 100%;
  2070. display: flex;
  2071. justify-content: space-between;
  2072. line-height: 80rpx;
  2073. padding: 0 20rpx;
  2074. font-size: 24rpx;
  2075. }
  2076. .modal {
  2077. .agreement {
  2078. width: 640rpx;
  2079. height: 740rpx;
  2080. background: #ffffff;
  2081. display: flex;
  2082. flex-direction: column;
  2083. .body {
  2084. flex: 1;
  2085. .content {
  2086. padding: 30rpx 40rpx 28rpx;
  2087. line-height: 40rpx;
  2088. font-size: 26rpx;
  2089. color: #666;
  2090. .bold {
  2091. color: #333;
  2092. font-size: 26rpx;
  2093. font-weight: bold;
  2094. }
  2095. .center {
  2096. text-align: center;
  2097. }
  2098. }
  2099. }
  2100. .footer {
  2101. height: 140rpx;
  2102. border-top: 1px solid #eeeeee;
  2103. display: flex;
  2104. align-items: center;
  2105. justify-content: center;
  2106. .btn {
  2107. margin: 0 12rpx;
  2108. width: 200rpx;
  2109. height: 80rpx;
  2110. color: #007aff;
  2111. font-size: 30rpx;
  2112. text-align: center;
  2113. line-height: 80rpx;
  2114. background: #f5f5f5;
  2115. border-radius: 40rpx 40rpx 40rpx 40rpx;
  2116. &.ok {
  2117. width: 336rpx;
  2118. height: 80rpx;
  2119. background: #007aff;
  2120. color: #fff;
  2121. }
  2122. &.close {
  2123. color: #fff;
  2124. width: 560rpx;
  2125. height: 80rpx;
  2126. background: #007aff;
  2127. border-radius: 40rpx 40rpx 40rpx 40rpx;
  2128. }
  2129. }
  2130. }
  2131. }
  2132. }
  2133. </style>