您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

opening-account-people.vue 22KB

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