選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

opening-account-people.vue 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  1. <template>
  2. <navBar title="ETC开户新办申请-个人" :scrollTop="scrollTop"></navBar>
  3. <navBgCar></navBgCar>
  4. <view class="content-wrap">
  5. <view @click="tabChange(true)">
  6. <view :class="state.isMyPeopple ? 'big' : 'nomal'"> 本人车辆 </view>
  7. <view :class="state.isMyPeopple ? 'tip' : ''"> </view>
  8. </view>
  9. <view @click="tabChange(false)" style="margin-left: 60rpx" class="" v-if="state.isEnableOther">
  10. <view :class="state.isMyPeopple ? 'nomal' : 'big'"> 他人车辆 </view>
  11. <view :class="state.isMyPeopple ? '' : 'tip'"> </view>
  12. </view>
  13. </view>
  14. <view v-if="state.isMyPeopple" class="content">
  15. <view class="item-tips">
  16. <view class="title"> 上传后请核对识别信息 </view>
  17. <view class="tip"> 如有错误请及时手动修改 </view>
  18. </view>
  19. <view class="picture-wrapper" @click="takePhotoMode('1','my')">
  20. <view class="bg">
  21. <view class="">
  22. <view class="name"> 人像面 </view>
  23. <view class="value"> 上传身份证的人像面 </view>
  24. <view class="tip">
  25. <view class="tip-value"> 拍摄规范 </view>
  26. </view>
  27. </view>
  28. <image v-if="!state.form.userPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  29. </image>
  30. <image v-else class="icon" :src="strReplace(state.form.userPosImgUrl)"></image>
  31. </view>
  32. </view>
  33. <view class="picture-wrapper" @click="takePhotoMode('2','my')">
  34. <view class="bg">
  35. <view class="">
  36. <view class="name"> 国徽面 </view>
  37. <view class="value"> 上传身份证的国徽面 </view>
  38. <view class="tip">
  39. <view class="tip-value"> 拍摄规范 </view>
  40. </view>
  41. </view>
  42. <image v-if="!state.form.userNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/guohui.png`">
  43. </image>
  44. <image v-else class="icon" :src="strReplace(state.form.userNegImgUrl)"></image>
  45. </view>
  46. </view>
  47. <view class="shibie-wrapper">
  48. <view class="title"> 识别内容如下 </view>
  49. <u-form label-width="230" :model="state.form" ref="uForm">
  50. <u-form-item label="姓名">
  51. <u-input v-model="state.form.userName" placeholder='请输入姓名' :disabled="state.isEnableOCRData"
  52. maxlength="20" @input="replaceInput" />
  53. </u-form-item>
  54. <u-form-item label="身份证号">
  55. <u-input placeholder='请输入身份证' type="idcard" v-model="state.form.userIdNum"
  56. :disabled="state.isEnableOCRData" maxlength="18" />
  57. </u-form-item>
  58. <u-form-item label="地址">
  59. <u-input placeholder='请输入地址' :autoHeight='true' v-model="state.form.address"
  60. :disabled="state.isEnableOCRData" maxlength="50" />
  61. </u-form-item>
  62. <u-form-item label="联系方式">
  63. <u-input placeholder='请输入联系方式' type="number" v-model="state.form.tel" maxlength="11" />
  64. </u-form-item>
  65. </u-form>
  66. </view>
  67. <view class="green-tip">
  68. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  69. </view>
  70. <view class="action">
  71. <button type="default" class="button" @click="savaHandle()">
  72. 下一步
  73. </button>
  74. </view>
  75. </view>
  76. <view v-else class="content">
  77. <view class="title"> 车主信息 </view>
  78. <view class="item-tips">
  79. <view class="title"> 上传后请核对识别信息 </view>
  80. <view class="tip"> 如有错误请及时手动修改 </view>
  81. </view>
  82. <view class="picture-wrapper" @click="takePhotoMode('1','my')">
  83. <view class="bg">
  84. <view class="">
  85. <view class="name"> 人像面 </view>
  86. <view class="value"> 上传身份证的人像面 </view>
  87. <view class="tip">
  88. <view class="tip-value"> 拍摄规范 </view>
  89. </view>
  90. </view>
  91. <image v-if="!state.form.userPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  92. </image>
  93. <image v-else class="icon" :src="strReplace(state.form.userPosImgUrl)"></image>
  94. </view>
  95. </view>
  96. <view class="picture-wrapper" @click="takePhotoMode('2','my')">
  97. <view class="bg">
  98. <view class="">
  99. <view class="name"> 国徽面 </view>
  100. <view class="value"> 上传身份证的国徽面 </view>
  101. <view class="tip">
  102. <view class="tip-value"> 拍摄规范 </view>
  103. </view>
  104. </view>
  105. <image v-if="!state.form.userNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/guohui.png`">
  106. </image>
  107. <image v-else class="icon" :src="strReplace(state.form.userNegImgUrl)"></image>
  108. </view>
  109. </view>
  110. <view class="shibie-wrapper">
  111. <view class="title"> 识别内容如下 </view>
  112. <u-form label-width="200" :model="state.form" ref="uForm">
  113. <u-form-item label="姓名">
  114. <u-input inputAlign="right" placeholder='请输入姓名' v-model="state.form.userName"
  115. :disabled="state.isEnableOCRData" maxlength="20" />
  116. </u-form-item>
  117. <u-form-item label="身份证号">
  118. <u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.userIdNum"
  119. :disabled="state.isEnableOCRData" type="idcard" maxlength="18" />
  120. </u-form-item>
  121. <u-form-item label="联系方式">
  122. <u-input inputAlign="right" placeholder='请输入联系方式' v-model="state.form.tel" maxlength="11"
  123. type="number" />
  124. </u-form-item>
  125. <u-form-item label="地址">
  126. <u-input placeholder='请输入地址' inputAlign="right" :autoHeight='true' v-model="state.form.address"
  127. :disabled="state.isEnableOCRData" maxlength="50" />
  128. </u-form-item>
  129. </u-form>
  130. </view>
  131. <view style="margin-top: 30rpx" class="title"> 代办人信息 </view>
  132. <view class="item-tips">
  133. <view class="title"> 上传后请核对识别信息 </view>
  134. <view class="tip"> 如有错误请及时手动修改 </view>
  135. </view>
  136. <view class="picture-wrapper" @click="takePhotoMode('1','other')">
  137. <view class="bg">
  138. <view class="">
  139. <view class="name"> 人像面 </view>
  140. <view class="value"> 上传身份证的人像面 </view>
  141. <view class="tip">
  142. <view class="tip-value"> 拍摄规范 </view>
  143. </view>
  144. </view>
  145. <image v-if="!state.form.agentPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  146. </image>
  147. <image v-else class="icon" :src="strReplace(state.form.agentPosImgUrl)"></image>
  148. </view>
  149. </view>
  150. <view class="picture-wrapper" @click="takePhotoMode('2','other')">
  151. <view class="bg">
  152. <view class="">
  153. <view class="name"> 国徽面 </view>
  154. <view class="value"> 上传身份证的国徽面 </view>
  155. <view class="tip">
  156. <view class="tip-value"> 拍摄规范 </view>
  157. </view>
  158. </view>
  159. <image v-if="!state.form.agentNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/guohui.png`">
  160. </image>
  161. <image v-else class="icon" :src="strReplace(state.form.agentNegImgUrl)"></image>
  162. </view>
  163. </view>
  164. <view class="picture-wrapper" @click="cardFileImageUpdate()" v-if='state.isEnableBook'>
  165. <view class="bg">
  166. <view class="">
  167. <view class="name"> 委托书 </view>
  168. <view class="value"> 上传文字清晰的委托书 </view>
  169. <view class="tip">
  170. <view class="tip-value"> 拍摄规范 </view>
  171. </view>
  172. <view class="down" @click="downAuthD">模板下载</view>
  173. </view>
  174. <image v-if="!state.form.proxyUrl" class="icon" :src="`${$imgUrl}applyCard/weituoshu.png`">
  175. </image>
  176. <image v-else class="icon" :src="strReplace(state.form.proxyUrl)"></image>
  177. </view>
  178. </view>
  179. <view class="shibie-wrapper">
  180. <view class="title"> 识别内容如下 </view>
  181. <u-form label-width="200" :model="state.form" ref="uForm">
  182. <u-form-item label="经办人姓名">
  183. <u-input inputAlign="right" placeholder='请输入经办人姓名' v-model="state.form.agentName"
  184. :disabled="state.isEnableOCRData" maxlength="20" />
  185. </u-form-item>
  186. <u-form-item label="身份证号">
  187. <u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.agentIdNum"
  188. :disabled="state.isEnableOCRData" maxlength="18" type="idcard" />
  189. </u-form-item>
  190. <u-form-item label="联系方式">
  191. <u-input inputAlign="right" placeholder='请输入联系方式' v-model="state.form.agentTel" type="number"
  192. maxlength="11" />
  193. </u-form-item>
  194. </u-form>
  195. </view>
  196. <view class="green-tip">
  197. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  198. </view>
  199. <view class="action">
  200. <button type="default" class="button" @click="savaHandle()">
  201. 下一步
  202. </button>
  203. </view>
  204. </view>
  205. <u-select mode="single-column" :list="state.genderList" v-model="state.genderShow" @confirm="genderSelectConfirm">
  206. </u-select>
  207. <view class="choice-takePhoto-wrap" v-if="state.isTakePhotoModeShow" @click="cancle">
  208. <view class="choice-takePhoto">
  209. <view @click.stop="takePhoto(state.choiceIndex)" style="border-radius: 20rpx 20rpx 0 0;">拍照</view>
  210. <view @click.stop="xiangce(state.choiceIndex)">从手机相册选择</view>
  211. <view @click.stop="cancle">取消</view>
  212. </view>
  213. </view>
  214. <viewfinder v-if="state.phoneType" :phoneType="state.phoneType" :images="state.images"
  215. :showStartPhoto="state.showImg" @confirmReturn="confirmReturn" @camera="camera"></viewfinder>
  216. </template>
  217. <script setup lang="ts">
  218. import viewfinder from "../../components/viewfinder.vue"
  219. import navBgCar from "./components/nav-bg-car3";
  220. import {
  221. reactive,
  222. ref,
  223. } from "vue";
  224. import {
  225. msg,
  226. checkStr,
  227. strReplace,
  228. uploadFile,
  229. hasLogin,
  230. compressImage,
  231. chooseImageCompress
  232. } from "@/utils/utils";
  233. import {
  234. onLoad,
  235. onPageScroll,
  236. } from "@dcloudio/uni-app";
  237. import {
  238. etcOcrCard,
  239. etcUserCardInfoSubmit,
  240. fileUpload,
  241. register,
  242. envs,
  243. getUserMsg,
  244. ocrAllQuery,
  245. userUpload
  246. } from "@/utils/network/api.js";
  247. import {
  248. request, requestNew
  249. } from "@/utils/network/request.js";
  250. import {
  251. stringToJson
  252. } from "@/utils/network/encryption";
  253. import {
  254. setItem,
  255. getItem,
  256. } from "@/utils/storage";
  257. import {
  258. getCodeName
  259. } from "@/datas/queryKey.js";
  260. import navBar from "@/components/nav-bar/nav-bar2.vue";
  261. const scrollTop = ref(0)
  262. const state = reactive({
  263. showImg: true,
  264. isMy: "",//自己办理 他人办理
  265. phoneType: 0, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面
  266. choiceIndex: 1, // 1 身份证正面 2 身份证反面
  267. isTakePhotoModeShow: false, //选择拍照方式是否出来
  268. images: '',
  269. genderList: [{
  270. value: '男',
  271. label: '男'
  272. },
  273. {
  274. value: '女',
  275. label: '女'
  276. }
  277. ],
  278. form: {
  279. orderId: "", //订单ID
  280. userName: "", //开户人姓名
  281. userIdType: "101", //用户证件类型 101//身份证
  282. userIdNum: "", //用户证件号码
  283. userPosImgUrl: "", //身份证正面
  284. userNegImgUrl: "", //身份证反面
  285. tel: "", //开户人手机号
  286. address: "", //开户人地址
  287. sceneType: "", //用户协议支撑服务场景(发行服务机构和用户签订的协议)
  288. channelId: "", //渠道id
  289. gender: "",
  290. customerIdVld: "", //用户证件有效期
  291. agentName: "",
  292. agentGender: "",
  293. agentTel: '',
  294. agentPhone: "",
  295. agentIdType: "101",
  296. agentIdNum: "",
  297. agentPosImgUrl: "",
  298. agentNegImgUrl: "",
  299. proxyUrl: "",
  300. agentAddress: "",
  301. agentIdVld: '',
  302. opId: '',
  303. orderSource: 'WECHAT',
  304. },
  305. genderShow: false,
  306. orderId: "",
  307. vehiclePlateColor: undefined,
  308. isMyPeopple: true,
  309. isSign: '',
  310. type: 1,
  311. isEnableOther: true, //小程序是否支持他人办理
  312. isEnableBook: true, //他人办理时是否上传委托书
  313. isEnableInfo: true, //小程序信息带出
  314. isEnableOCRData: true, //允许修改OCR识别出来的数据
  315. vehicleId: ""
  316. });
  317. const userGenderAction = () => {
  318. state.genderShow = true;
  319. };
  320. const genderSelectConfirm = (e) => {
  321. state.form.gender = ''
  322. e.map((val, index) => {
  323. state.form.gender = val.label;
  324. })
  325. };
  326. const camera = () => {
  327. state.phoneType = 0
  328. }
  329. const savaHandle = () => {
  330. if (!state.form.userName) {
  331. msg('请输入姓名');
  332. return;
  333. }
  334. if (!state.form.userPosImgUrl) {
  335. msg('请上传身份证的人像面');
  336. return;
  337. }
  338. if (!state.form.userNegImgUrl) {
  339. msg('请上传身份证的国徽面');
  340. return;
  341. }
  342. if (!checkStr(state.form.userIdNum, 'card')) {
  343. msg('请输入正确身份证号');
  344. return;
  345. }
  346. if (!checkStr(state.form.tel, 'mobile')) {
  347. msg('请输入正确的手机号');
  348. return;
  349. }
  350. // 都要无感注册
  351. // 没登录就存token 登录了就正常走
  352. registerRequest().then((result : any) => {
  353. console.log("result==",result)
  354. if (!getItem('openId')) {
  355. setItem('token', result.accessToken)
  356. setItem('openId', result.openId)
  357. state.form.opId = getItem('openId') ? getItem('openId') : '';
  358. }
  359. console.log("正常走 ")
  360. // 已经登录
  361. let data = state.form;
  362. console.log("data==",data)
  363. const options = {
  364. type: 2,
  365. data: data,
  366. method: "POST",
  367. showLoading: true,
  368. };
  369. requestNew(userUpload, options).then((res) => {
  370. console.log(res);
  371. uni.redirectTo({
  372. url: `/subpackage/orders/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=${state.type}&isSign=${state.isSign}&vehicleId=${state.vehicleId}`,
  373. });
  374. });
  375. })
  376. };
  377. const cardFileImageUpdate = () => {
  378. uni.chooseImage({
  379. count: 1, //只能选取一张照片
  380. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  381. sourceType: ["camera", "album"], //从相册选择
  382. success: function (res) {
  383. uploadFile(res.tempFilePaths[0], "", "").then((data) => {
  384. state.form.proxyUrl = data;
  385. })
  386. },
  387. });
  388. };
  389. //tab切换
  390. const tabChange = (val : any) => {
  391. state.isTakePhotoModeShow = false
  392. if (val) {
  393. state.isMyPeopple = true;
  394. } else {
  395. state.isMyPeopple = false;
  396. }
  397. state.form = {
  398. orderId: state.orderId, //订单ID
  399. userName: "", //开户人姓名
  400. userIdType: "101", //用户证件类型 101//身份证
  401. userIdNum: "", //用户证件号码
  402. userPosImgUrl: "", //身份证正面
  403. userNegImgUrl: "", //身份证反面
  404. tel: "", //开户人手机号
  405. address: "", //开户人地址
  406. sceneType: "", //用户协议支撑服务场景(发行服务机构和用户签订的协议)
  407. channelId: "", //渠道id
  408. gender: "",
  409. customerIdVld: "",
  410. agentName: "",
  411. agentGender: "",
  412. agentTel: '',
  413. agentPhone: "",
  414. agentIdType: "101",
  415. agentIdNum: "",
  416. agentPosImgUrl: "",
  417. agentNegImgUrl: "",
  418. proxyUrl: "",
  419. agentAddress: "",
  420. agentIdVld: '',
  421. orderSource: 'WECHAT',
  422. };
  423. };
  424. onLoad((option : any) => {
  425. state.form.orderId = option.orderId;
  426. state.orderId = option.orderId;
  427. state.vehiclePlateColor = option.vehiclePlateColor;
  428. state.form.opId = getItem('openId') ? getItem('openId') : '';
  429. state.isSign = option.isSign;
  430. state.type = option.type;
  431. state.vehicleId = option.vehicleId;
  432. getGlobalParam(); //全局配置数据
  433. console.log("option", option)
  434. });
  435. //监听页面滚动
  436. onPageScroll((e) => {
  437. scrollTop.value = e.scrollTop;
  438. });
  439. const replaceInput = (event) => {
  440. console.log("event", event)
  441. const screeningStr = /[^\u4E00-\u9FA5]/g; //想禁止什么类型,在这里替换正则就可以了
  442. if (screeningStr.test(event)) {
  443. setTimeout(() => {
  444. state.form.userName = event.replace(screeningStr, '');
  445. }, 100)
  446. } else {
  447. setTimeout(() => {
  448. state.form.userName = event;
  449. }, 100)
  450. }
  451. console.log("event.replace(screeningStr, '')", event.replace(screeningStr, ''), event, state.form.userName)
  452. }
  453. const getGlobalParam = () => {
  454. const data = getItem('globalParam')
  455. console.log("全局配置数据", getCodeName('IS_ENABLE', data.miniSupportOther), getCodeName('IS_ENABLE', data.otherUploadProxy), getCodeName('IS_ENABLE', data.miniInfoShow), getCodeName('IS_ENABLE', data.changeOCRData))
  456. // 小程序是否支持他人办理
  457. if (getCodeName('IS_ENABLE', data.miniSupportOther) == '启用') {
  458. state.isEnableOther = true;
  459. } else {
  460. state.isEnableOther = false;
  461. }
  462. // 他人办理时是否上传委托书
  463. if (getCodeName('IS_ENABLE', data.otherUploadProxy) == '启用') {
  464. state.isEnableBook = true;
  465. } else {
  466. state.isEnableBook = false;
  467. }
  468. // 小程序信息带出 登录情况下才需要带出用户信息
  469. if(hasLogin()){
  470. if (getCodeName('IS_ENABLE', data.miniInfoShow) == '启用') {
  471. state.isEnableInfo = true;
  472. uni.showModal({
  473. // title: '提示',
  474. content: '是否允许带出用户信息',
  475. success: function (res) {
  476. if (res.confirm) {
  477. console.log('用户点击确定');
  478. queryUserMsg() //通过opneId查询用户信息
  479. } else if (res.cancel) {
  480. console.log('用户点击取消');
  481. }
  482. }
  483. });
  484. } else {
  485. state.isEnableInfo = false;
  486. }
  487. }
  488. // 允许修改OCR识别出来的数据
  489. if (getCodeName('IS_ENABLE', data.changeOCRData) == '启用') {
  490. state.isEnableOCRData = false;
  491. } else {
  492. state.isEnableOCRData = true;
  493. }
  494. }
  495. // 通过opneId查询用户信息
  496. const queryUserMsg = () => {
  497. const options = {
  498. type: 2,
  499. data: {
  500. "openId": getItem('openId')
  501. },
  502. method: "POST",
  503. showLoading: true,
  504. };
  505. request(getUserMsg, options).then((res) => {
  506. console.log("通过opneId查询用户信息", stringToJson(res.bizContent))
  507. const data = stringToJson(res.bizContent);
  508. state.form.userPosImgUrl = data.customerPosImgUrl;
  509. state.form.userNegImgUrl = data.customerNegImgUrl;
  510. state.form.userName = data.customerName;
  511. state.form.userIdNum = data.customerIdNum;
  512. state.form.address = data.customerAddress;
  513. state.form.tel = data.customerTel;
  514. })
  515. }
  516. const takePhotoMode = (index, isMy) => {
  517. console.log("index", index, isMy)
  518. state.isTakePhotoModeShow = true
  519. state.choiceIndex = index
  520. state.isMy = isMy
  521. }
  522. const xiangce = (val) => {
  523. console.log("val", val)
  524. var imageType = val;
  525. chooseImageCompress((res)=>{
  526. state.images = res.tempFilePath?res.tempFilePath:res.tempFilePaths[0]
  527. state.showImg = false
  528. state.phoneType = state.choiceIndex
  529. state.isTakePhotoModeShow = false
  530. })
  531. }
  532. const takePhoto = (val) => {
  533. state.showImg = true
  534. console.log("拍照", val)
  535. state.phoneType = val;
  536. }
  537. const confirmReturn = (val) => {
  538. console.log("图片地址val", val)
  539. state.phoneType = 0
  540. state.isTakePhotoModeShow = false
  541. var imageType = state.choiceIndex;
  542. // uploadFile(val.tempImagePath, imageType, ocrAllQuery).then((data) => {
  543. uploadFile(val.tempImagePath, imageType, etcOcrCard).then((data) => {
  544. console.log("身份证上传", data)
  545. if (state.isMy == "my") {
  546. if (state.choiceIndex == "1") {
  547. state.form.userName = data.name;
  548. state.form.gender = data.gender;
  549. state.form.userIdNum = data.idno;
  550. state.form.userPosImgUrl = data.imageUrl;
  551. state.form.address = data.address;
  552. } else {
  553. state.form.customerIdVld = data.enddate;
  554. state.form.userNegImgUrl = data.imageUrl;
  555. }
  556. state.isTakePhotoModeShow = false
  557. } else {
  558. if (state.choiceIndex == "1") {
  559. state.form.agentName = data.name;
  560. state.form.agentGender = data.gender;
  561. state.form.agentIdNum = data.idno;
  562. state.form.agentPosImgUrl = data.imageUrl;
  563. state.form.agentAddress = data.address;
  564. } else {
  565. console.log("state.isMy", state.isMy, state.choiceIndex, state.choiceIndex == "1", data)
  566. state.form.agentIdVld = data.enddate;
  567. state.form.agentNegImgUrl = data.imageUrl;
  568. }
  569. state.isTakePhotoModeShow = false
  570. }
  571. })
  572. }
  573. const cancle = () => {
  574. state.isTakePhotoModeShow = false
  575. }
  576. const downAuthD = () => {
  577. uni.downloadFile({
  578. url: "https://qtzl.etcjz.cn/default-bucket/20240311/个人委托书.docx",
  579. filePath: uni.env.USER_DATA_PATH + '/' + '个人委托书.docx',
  580. success(res) {
  581. const filePath = res.filePath
  582. uni.openDocument({
  583. filePath: filePath,
  584. fileType: 'docx',
  585. showMenu: true, //关键点
  586. success: function (res) {
  587. // msg("成功查看协议详情");
  588. },
  589. fail: function (err) {
  590. msg("打开文档失败");
  591. }
  592. });
  593. },
  594. fail: function (err) {
  595. msg("下载文档失败");
  596. console.log("err", err)
  597. },
  598. complete(res) {
  599. }
  600. })
  601. }
  602. // 无感注册
  603. const registerRequest = () => {
  604. let data = {
  605. userType: "PERSONAL",
  606. idNum: state.form.userIdNum,
  607. idType: state.form.userIdType,
  608. mobile: state.form.tel,
  609. userName: state.form.userName,
  610. gender: state.form.gender == '男' ? 'MALE' : 'FEMALE',
  611. certifyChannel: "BAIDUOCR",
  612. address: state.form.address,
  613. agentIdNum: state.form.agentIdNum,
  614. agentIdType: state.form.agentIdType,
  615. agentName: state.form.agentName,
  616. department: "",
  617. userIdImgUrl: state.form.userPosImgUrl,
  618. userIdImgBase64: "",
  619. }
  620. const options = {
  621. type: 2,
  622. data: data,
  623. method: "POST",
  624. showLoading: true,
  625. };
  626. return new Promise(async (resolve, reject) => {
  627. const res = await request(register, options);
  628. const data = stringToJson(res.bizContent);
  629. resolve(data);
  630. }).catch((error) => {
  631. reject(error);
  632. });
  633. }
  634. </script>
  635. <style lang="scss" scoped>
  636. .title {
  637. font-size: 35rpx;
  638. font-family: Microsoft YaHei;
  639. font-weight: 400;
  640. color: #000000;
  641. line-height: 80rpx;
  642. margin-bottom: 10rpx;
  643. }
  644. .content-wrap {
  645. position: relative;
  646. margin-top: -50rpx;
  647. padding: 0rpx 30rpx;
  648. display: flex;
  649. .big {
  650. font-size: 30rpx;
  651. font-family: Microsoft YaHei;
  652. font-weight: 400;
  653. color: #333333;
  654. line-height: 24rpx;
  655. }
  656. .nomal {
  657. font-size: 26rpx;
  658. font-family: Microsoft YaHei;
  659. font-weight: 400;
  660. color: #666666;
  661. line-height: 24rpx;
  662. }
  663. .tip {
  664. margin-top: -5px;
  665. width: 117rpx;
  666. height: 16rpx;
  667. background: #00b38b;
  668. opacity: 0.3;
  669. }
  670. }
  671. .content {
  672. padding: 50rpx 30rpx 50rpx 30rpx;
  673. .action {
  674. padding-left: 20rpx;
  675. padding-right: 20rpx;
  676. padding-bottom: 30rpx;
  677. .button {
  678. height: 80rpx;
  679. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  680. border-radius: 40rpx;
  681. font-size: 32rpx;
  682. font-weight: 400;
  683. color: #ffffff;
  684. line-height: 80rpx;
  685. }
  686. }
  687. .item-tips {
  688. .title {
  689. font-size: 30rpx;
  690. font-family: Microsoft YaHei;
  691. font-weight: 400;
  692. color: #000000;
  693. line-height: 24rpx;
  694. }
  695. .tip {
  696. margin-top: 16rpx;
  697. font-size: 24rpx;
  698. font-family: Microsoft YaHei;
  699. font-weight: 400;
  700. color: #999999;
  701. line-height: 24rpx;
  702. }
  703. }
  704. .picture-wrapper {
  705. margin-top: 40rpx;
  706. .bg {
  707. background: #ffffff;
  708. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  709. border-radius: 20rpx;
  710. padding: 40rpx;
  711. display: flex;
  712. // align-items: center;
  713. justify-content: space-between;
  714. .name {
  715. font-size: 34rpx;
  716. font-family: Microsoft YaHei;
  717. font-weight: 400;
  718. color: #000000;
  719. line-height: 34rpx;
  720. }
  721. .value {
  722. margin-top: 20rpx;
  723. font-size: 24rpx;
  724. font-family: Microsoft YaHei;
  725. font-weight: 400;
  726. color: #999999;
  727. line-height: 24rpx;
  728. }
  729. .tip {
  730. margin-top: 20rpx;
  731. text-align: center;
  732. width: 110rpx;
  733. height: 40rpx;
  734. background: rgba(33, 190, 177, 0.2);
  735. border-radius: 6rpx;
  736. .tip-value {
  737. font-size: 20rpx;
  738. font-family: Microsoft YaHei;
  739. font-weight: 400;
  740. color: #0a8f8a;
  741. line-height: 40rpx;
  742. opacity: 1;
  743. }
  744. }
  745. }
  746. .icon {
  747. width: 294rpx;
  748. height: 188rpx;
  749. }
  750. }
  751. .shibie-wrapper {
  752. margin-top: 60rpx;
  753. .title {
  754. font-size: 30rpx;
  755. font-family: Microsoft YaHei;
  756. font-weight: 400;
  757. color: #000000;
  758. line-height: 30rpx;
  759. }
  760. }
  761. .buchong-wrapper {
  762. margin-top: 60rpx;
  763. .title {
  764. font-size: 30rpx;
  765. font-family: Microsoft YaHei;
  766. font-weight: 400;
  767. color: #000000;
  768. line-height: 30rpx;
  769. }
  770. }
  771. .green-tip {
  772. margin-top: 50rpx;
  773. font-size: 24rpx;
  774. font-family: Microsoft YaHei;
  775. font-weight: 400;
  776. color: #00b38b;
  777. line-height: 24rpx;
  778. margin-bottom: 60rpx;
  779. }
  780. }
  781. .choice-takePhoto {
  782. position: absolute;
  783. bottom: 0;
  784. background-color: white;
  785. width: 100%;
  786. border-radius: 20rpx 20rpx 0 0;
  787. }
  788. .choice-takePhoto>view:first-child {
  789. text-align: center;
  790. height: 80rpx;
  791. line-height: 80rpx;
  792. border-bottom: 1rpx solid rgba(127, 127, 127, 0.3);
  793. background-color: white;
  794. }
  795. .choice-takePhoto>view:last-child {
  796. text-align: center;
  797. height: 80rpx;
  798. line-height: 80rpx;
  799. border-top: 6rpx solid rgba(127, 127, 127, 0.1);
  800. background-color: white;
  801. }
  802. .choice-takePhoto>view {
  803. text-align: center;
  804. height: 80rpx;
  805. line-height: 80rpx;
  806. background-color: white;
  807. }
  808. .choice-takePhoto-wrap {
  809. width: 100%;
  810. height: 100vh;
  811. background-color: rgba(127, 127, 127, 0.2);
  812. position: fixed;
  813. left: 0;
  814. top: 0;
  815. z-index: 11111;
  816. }
  817. .down {
  818. background-color: rgba(33, 190, 177, 0.2);
  819. color: #0a8f8a;
  820. border-radius: 10rpx;
  821. padding: 6rpx 10rpx;
  822. font-size: 28rpx;
  823. margin-top: 10rpx;
  824. width: 48%;
  825. }
  826. </style>