Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

opening-account-people.vue 23KB

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