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

changeInformation.vue 23KB

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