index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988
  1. <!-- 证件识别 - 订单实名 -->
  2. <template>
  3. <view>
  4. <!-- 未实名认证 -->
  5. <!-- <view class="realname" v-if="userInfoData.customersfrz === 0"> -->
  6. <view class="realname" v-if="true">
  7. <!-- 完成人脸核实信息 -->
  8. <view v-show="false" class="cu-bar bg-white" v-if="formData.customerzjlx === '中国大陆人员'">
  9. <view class="action sub-title">
  10. <text class="text-xl text-bold text-blue">完成人脸核实信息</text>
  11. <text class="text-ABC text-blue"> </text>
  12. </view>
  13. </view>
  14. <view v-show="false" class="input_box flex" v-if="formData.customerzjlx === '中国大陆人员'">
  15. <view class="rlhsBtn r_flex_center" :class="{rlhsBtnTrue: shibieMsg == '人脸核实已完成'}" @click="renlianheshi()">
  16. <i-face-recognition
  17. style="margin-right: 10rpx"
  18. theme="outline"
  19. size="22"
  20. :fill="shibieMsg == '人脸核实已完成' ? '#4caf50' : '#eab766'"
  21. :strokeWidth="2"
  22. strokeLinejoin="bevel"
  23. strokeLinecap="square"
  24. />
  25. <text class="activate">{{ shibieMsg }}</text>
  26. </view>
  27. </view>
  28. <!-- 输入您的姓名 -->
  29. <view class="cu-bar bg-white qyyyzz">
  30. <view class="action sub-title">
  31. <text class="text-xl text-bold text-blue">您的身份</text>
  32. <text class="text-ABC text-blue"></text>
  33. </view>
  34. </view>
  35. <view class="input_box">
  36. <u-radio-group v-model="formData.customerzjlx">
  37. <u-radio active-color="#eab766" name="中国大陆人员"> 中国大陆人员 </u-radio>
  38. <u-radio active-color="#eab766" name="港澳台/外籍人员"> 港澳台/外籍人员 </u-radio>
  39. </u-radio-group>
  40. </view>
  41. <view class="cu-bar bg-white qyyyzz">
  42. <view class="action sub-title">
  43. <text class="text-xl text-bold text-blue">个人信息</text>
  44. <text class="text-ABC text-blue"></text>
  45. </view>
  46. </view>
  47. <view class="input_box">
  48. <input class="input" placeholder="输入手机号码" v-model="formData.customertel" />
  49. </view>
  50. <!-- <view class="input_box">
  51. <input class="input" :disabled="wxsmData?.Text?.ErrCode == 0" placeholder="输入证件姓名" v-model="formData.customername" />
  52. </view>
  53. <view class="input_box">
  54. <input class="input" :disabled="wxsmData?.Text?.ErrCode == 0" placeholder="输入证件号" v-model="formData.customerzjhm" />
  55. </view> -->
  56. <view class="input_box flex">
  57. <input class="input" style="flex-grow: 1; background: #fff" placeholder="填写验证码" v-model="smsCode" />
  58. <view class="inputBtn" @click="handelSmsCaptcha()">
  59. <text v-if="!smsState" class="activate">获取验证码</text>
  60. <text v-else class="un-activate">重新发送({{ times }})秒</text>
  61. </view>
  62. </view>
  63. <view class="uploadText">个人信息会在完成实名信息后自定填入,请优先完成实名信息完成</view>
  64. <view v-if="false">
  65. <!-- 身份证 -->
  66. <view class="cu-bar bg-white">
  67. <view class="action sub-title">
  68. <text class="text-xl text-bold text-blue">请拍摄并上传个人证件</text>
  69. <text class="text-ABC text-blue"> </text>
  70. </view>
  71. </view>
  72. <view class="uploadBox">
  73. <view style="width: 43%">
  74. <view class="uploadItem">
  75. <view class="imgBox imgEx1">
  76. <view class="leftTop"></view>
  77. <view class="leftTop2"></view>
  78. <view class="leftbottom"></view>
  79. <view class="leftbottom2"></view>
  80. <view class="rightTop"></view>
  81. <view class="rightTop2"></view>
  82. <view class="rightbottom"></view>
  83. <view class="rightbottom2"></view>
  84. </view>
  85. <image class="imgUrl" v-if="imgUrl1" :src="imgUrl1"></image>
  86. </view>
  87. <view
  88. @click="uploadImg('imgUrl1', {attmodel: 'sfz-zhengmian', attpath: '/certificate/personageidc/', attother2: '身份证正面'})"
  89. class="leftBtn text-white text-lg text-center"
  90. >上传正面</view
  91. >
  92. </view>
  93. <view style="width: 43%">
  94. <view class="uploadItem">
  95. <view class="imgBox imgEx2">
  96. <view class="leftTop"></view>
  97. <view class="leftTop2"></view>
  98. <view class="leftbottom"></view>
  99. <view class="leftbottom2"></view>
  100. <view class="rightTop"></view>
  101. <view class="rightTop2"></view>
  102. <view class="rightbottom"></view>
  103. <view class="rightbottom2"></view>
  104. </view>
  105. <image class="imgUrl" v-if="imgUrl2" :src="imgUrl2"></image>
  106. </view>
  107. <view
  108. @click="uploadImg('imgUrl2', {attmodel: 'sfz-fanmian', attpath: '/certificate/personageidc/', attother2: '身份证反面'})"
  109. class="leftBtn text-white text-lg text-center"
  110. >上传反面</view
  111. >
  112. </view>
  113. </view>
  114. <view class="uploadText">图片格式要求PNG、JPG、BMP、TIFF、WebP,不超过5M</view>
  115. </view>
  116. <!-- 护照、有效证件 -->
  117. <view v-if="formData.customerzjlx === '港澳台/外籍人员-废弃'">
  118. <!-- 身份证 -->
  119. <view class="cu-bar bg-white">
  120. <view class="action sub-title">
  121. <text class="text-xl text-bold text-blue">请拍摄并上传护照或其它有效证件</text>
  122. <text class="text-ABC text-blue"> </text>
  123. </view>
  124. </view>
  125. <view class="uploadBox">
  126. <view style="width: 43%">
  127. <view class="uploadItem">
  128. <view class="imgBox imgEx1">
  129. <view class="leftTop"></view>
  130. <view class="leftTop2"></view>
  131. <view class="leftbottom"></view>
  132. <view class="leftbottom2"></view>
  133. <view class="rightTop"></view>
  134. <view class="rightTop2"></view>
  135. <view class="rightbottom"></view>
  136. <view class="rightbottom2"></view>
  137. </view>
  138. <image class="imgUrl" v-if="imgHzUrl1" :src="imgHzUrl1"></image>
  139. </view>
  140. <view
  141. @click="uploadImg('imgHzUrl1', {attmodel: 'hz-zhengmian', attpath: '/certificate/personageidc/', attother2: '护照正面'})"
  142. class="leftBtn text-white text-lg text-center"
  143. >上传正面</view
  144. >
  145. </view>
  146. <view style="width: 43%">
  147. <view class="uploadItem">
  148. <view class="imgBox imgEx2">
  149. <view class="leftTop"></view>
  150. <view class="leftTop2"></view>
  151. <view class="leftbottom"></view>
  152. <view class="leftbottom2"></view>
  153. <view class="rightTop"></view>
  154. <view class="rightTop2"></view>
  155. <view class="rightbottom"></view>
  156. <view class="rightbottom2"></view>
  157. </view>
  158. <image class="imgUrl" v-if="imgHzUrl2" :src="imgHzUrl2"></image>
  159. </view>
  160. <view
  161. @click="uploadImg('imgHzUrl2', {attmodel: 'hz-fanmian', attpath: '/certificate/personageidc/', attother2: '护照反面'})"
  162. class="leftBtn text-white text-lg text-center"
  163. >上传反面</view
  164. >
  165. </view>
  166. </view>
  167. <view class="uploadText">图片格式要求PNG、JPG、BMP、TIFF、WebP,不超过5M</view>
  168. <!-- 人脸 -->
  169. <view class="cu-bar bg-white">
  170. <view class="action sub-title">
  171. <text class="text-xl text-bold text-blue">请拍摄并上传人脸正面照片</text>
  172. <text class="text-ABC text-blue"> </text>
  173. </view>
  174. </view>
  175. <view class="uploadBox">
  176. <view style="width: 43%">
  177. <view class="uploadItem">
  178. <view class="imgBox imgExImgUrlHuman"> </view>
  179. <image class="imgUrl" v-if="imgUrlHuman" :src="imgUrlHuman"></image>
  180. </view>
  181. <view
  182. @click="uploadImg('imgUrlHuman', {attmodel: 'ple-renlian', attpath: '/certificate/personageidc/', attother2: '人脸正面'})"
  183. class="leftBtn text-white text-lg text-center"
  184. >拍摄正脸</view
  185. >
  186. </view>
  187. </view>
  188. <view class="uploadText">照片要求清晰、无遮挡、实时拍摄;图片格式要求PNG、JPG、BMP、TIFF、WebP不超过5M</view>
  189. </view>
  190. <view class="cu-bar bg-white margin-top">
  191. <view class="action sub-title">
  192. <text class="text-xl text-bold text-blue ">用户协议须知</text>
  193. <text class="text-ABC text-blue"></text>
  194. </view>
  195. </view>
  196. <view class="requirement">
  197. <view>
  198. <text class="text-gray">请仔细阅读并同意以下协议内容:</text>
  199. </view>
  200. <view style="padding-left: 60rpx; position: relative;" >
  201. <view class="input_box tyinput" >
  202. <u-checkbox-group>
  203. <u-checkbox active-color="#eab766" v-model="checked" shape="circle" label="1"></u-checkbox>
  204. </u-checkbox-group>
  205. </view>
  206. <text class="text-gray">我已阅读并同意</text>
  207. <text class="text-blue" @click="toxueyi(1)" >《信飞通用户协议》</text>、
  208. <text class="text-blue" @click="toxueyi(2)" >《信飞通入网协议》</text>
  209. </view>
  210. </view>
  211. <view class="submitBtn" @click="upFormData">提交认证并激活</view>
  212. </view>
  213. <!-- 已实名,单独绑定手机号码 -->
  214. <view class="realname" v-if="false">
  215. <view class="cu-bar bg-white qyyyzz">
  216. <view class="action sub-title">
  217. <text class="text-xl text-bold text-blue">绑定手机号码</text>
  218. <text class="text-ABC text-blue"></text>
  219. </view>
  220. </view>
  221. <view class="input_box">
  222. <input class="input" placeholder="输入手机号码" v-model="formData.customertel" />
  223. </view>
  224. <view class="input_box flex">
  225. <input class="input" style="flex-grow: 1; background: #fff" placeholder="填写验证码" v-model="smsCode" />
  226. <view class="inputBtn" @click="handelSmsCaptcha()">
  227. <text v-if="!smsState" class="activate">获取验证码</text>
  228. <text v-else class="un-activate">重新发送({{ times }})秒</text>
  229. </view>
  230. </view>
  231. <view class="submitBtn" @click="upFormNumber">激活订单</view>
  232. </view>
  233. </view>
  234. </template>
  235. <script>
  236. import * as AppApi from '@/api/app'
  237. import request from '@/utils/request'
  238. import storage from '@/utils/storage'
  239. import * as Verify from '@/utils/verify'
  240. const apiUrl = 'https://hnapi.kdboss.cn'
  241. // 倒计时时长(秒)
  242. const times = 60
  243. export default {
  244. data() {
  245. return {
  246. list: ['隐私说明:请按要求上传真实的证件照片,您所上传的行驶证仅用于平台账户绑定,请放心上传'],
  247. // ../static/me/zjx_me_bg6.jpg
  248. checked: false,
  249. imgUrl1: '',
  250. imgUrl2: '',
  251. imgUrl3: '',
  252. imgHzUrl1: '',
  253. imgHzUrl2: '',
  254. // 外籍人员 人脸
  255. imgUrlHuman: '',
  256. formData: {
  257. customerzjlx: '中国大陆人员',
  258. customername: '',
  259. customerzjhm: '',
  260. // 手机号码
  261. customertel: ''
  262. },
  263. imgList: [],
  264. imgss: [],
  265. fileList: '',
  266. // 正在加载
  267. isLoading: false,
  268. // 图形验证码信息
  269. captcha: {},
  270. // 短信验证码发送状态
  271. smsState: false,
  272. // 倒计时
  273. times,
  274. inter: null,
  275. // 手机号
  276. mobile: '',
  277. // 图形验证码
  278. captchaCode: '',
  279. // 短信验证码
  280. smsCode: '',
  281. payorderid: '',
  282. payordercustomerid: '',
  283. wxsmtype: 0,
  284. wxsmData: {},
  285. wxsmInfo: {},
  286. smData: {},
  287. shibieMsg: '点击进入人脸活体验证'
  288. }
  289. },
  290. computed: {
  291. userInfoData: () => storage.get('wx_userinfo')
  292. },
  293. watch: {},
  294. onReady() {
  295. // 获取屏幕高度
  296. uni.getSystemInfo({
  297. success: (res) => {
  298. console.log(res.windowHeight)
  299. }
  300. })
  301. },
  302. onLoad(options) {
  303. const app = this
  304. // 储存订单get参数
  305. let querData = {
  306. payorderid: options.payorderid || storage.get('wxsm_query').payorderid,
  307. payordercustomerid: options.payordercustomerid || storage.get('wxsm_query').payordercustomerid,
  308. wxsmtype: options.wxsmtype || storage.get('wxsm_query').wxsmtype
  309. }
  310. storage.set('wxsm_query', querData)
  311. app.payorderid = querData.payorderid
  312. app.payordercustomerid = querData.payordercustomerid
  313. app.wxsmtype = querData.wxsmtype
  314. // 获取实名结果回调
  315. app.wxsmfun()
  316. app.wxsmInfo = storage.get('wxsm_info')
  317. },
  318. mounted() {
  319. let baseUrl = apiUrl + '/api/attachment/addtoPath?pagevalue=300'
  320. this.fileList = baseUrl
  321. },
  322. methods: {
  323. toxueyi(data) {
  324. this.$navTo('pages/user/userxieyi/index', { data })
  325. },
  326. // 点击发送短信验证码
  327. handelSmsCaptcha() {
  328. const app = this
  329. if (Verify.isEmpty(app.formData.customertel)) {
  330. this.$toast('请填写手机号码')
  331. return false
  332. }
  333. if (app.smsState) {
  334. this.$toast('请稍后再发送')
  335. return false
  336. }
  337. app.sendSmsCaptcha()
  338. },
  339. // 人脸核实
  340. renlianheshi() {
  341. const app = this
  342. let param = {
  343. // 商户id
  344. RuleId: 1,
  345. RedirectUrl: `${window.location.origin}?param=pages/user/activatorder/index?wxsmtype=1,shopping`
  346. }
  347. AppApi.wxHuman(param)
  348. .then((result) => {
  349. app.smData = JSON.parse(result.Data)
  350. storage.set('wxsm_info', app.smData)
  351. app.wxsmInfo = app.smData
  352. console.log(app.smData, result, 'result')
  353. // 显示发送成功
  354. app.$toast('进入实名...')
  355. window.location.href = app.smData.Url
  356. })
  357. .finally(() => {
  358. // 显示发送成功
  359. })
  360. },
  361. // 人脸核实信息
  362. wxsmfun() {
  363. const app = this
  364. // console.log(`${window.location.origin}?param=pages/user/activatorder/index?wxsmtype=1,shopping`)
  365. if (app.wxsmtype == 1) {
  366. app.$toast('获取实名信息中...')
  367. let param = {
  368. // 商户id
  369. BizToken: storage.get('wxsm_info').BizToken,
  370. // 指定拉取的结果信息,取值(0:全部;1:文本类;2:身份证正反面;3:视频最佳截图照片;4:视频)。 如 134表示拉取文本类、视频最佳截图照片、视频。 默认值:0
  371. InfoType: 0,
  372. RuleId: 1
  373. }
  374. AppApi.wxGetDetectInfo(param)
  375. .then((result) => {
  376. app.wxsmData = JSON.parse(JSON.parse(result.Data).DetectInfo)
  377. // 字段注释
  378. if (app.wxsmData.Text.ErrCode === 0) {
  379. app.$toast(app.wxsmData.Text.ErrMsg)
  380. app.formData.customername = app.wxsmData.Text.Name
  381. app.formData.customerzjhm = app.wxsmData.Text.IdCard
  382. app.shibieMsg = '人脸核实已完成'
  383. } else {
  384. app.$toast('人脸核身失败')
  385. }
  386. let wxApi = {
  387. // 文本类信息
  388. Text: {
  389. ErrCode: null, // 本次核身最终结果。0为成功
  390. ErrMsg: null, // 本次核身最终结果信息描述。
  391. IdCard: '', // 本次核身最终获得的身份证号。
  392. Name: '', // 本次核身最终获得的姓名。
  393. OcrNation: null, // ocr阶段获取的民族
  394. OcrAddress: null, // ocr阶段获取的地址
  395. OcrBirth: null, // ocr阶段获取的出生信息
  396. OcrAuthority: null, // ocr阶段获取的证件签发机关
  397. OcrValidDate: null, // ocr阶段获取的证件有效期
  398. OcrName: null, // ocr阶段获取的姓名
  399. OcrIdCard: null, // ocr阶段获取的身份证号
  400. OcrGender: null, // ocr阶段获取的性别
  401. LiveStatus: null, // 活体检测阶段的错误码。0为成功
  402. LiveMsg: null, // 活体检测阶段的错误信息
  403. Comparestatus: null, // 一比一阶段的错误码。0为成功
  404. Comparemsg: null, // 一比一阶段的错误信息
  405. Sim: null, // 比对相似度
  406. Location: null, // 地理位置信息
  407. Extra: '', // DetectAuth结果传进来的Extra信息
  408. Detail: {
  409. // 活体一比一信息详情
  410. LivenessData: [
  411. {
  412. ErrCode: null, // 活体比对验证错误码
  413. ErrMsg: null, // 活体比对验证错误描述
  414. ReqTime: null, // 活体验证时间戳
  415. IdCard: null, // 验证身份证号
  416. Name: null // 验证姓名
  417. }
  418. ]
  419. }
  420. },
  421. // 身份证正反面照片Base64
  422. IdCardData: {
  423. OcrFront: null,
  424. OcrBack: null
  425. },
  426. // 视频最佳帧截图Base64
  427. BestFrame: {
  428. BestFrame: null
  429. },
  430. // 活体视频Base64
  431. VideoData: {
  432. LivenessVideo: null
  433. }
  434. }
  435. console.log(app.wxsmData, 'wxsmData')
  436. })
  437. .finally(() => {
  438. // 显示发送成功
  439. })
  440. }
  441. },
  442. // 请求发送短信验证码接口
  443. sendSmsCaptcha() {
  444. const app = this
  445. app.isLoading = true
  446. AppApi.verifycodesmsbykt({mobile: app.formData.customertel})
  447. .then((result) => {
  448. // 显示发送成功
  449. app.$toast(result.message)
  450. // 执行定时器
  451. app.timer()
  452. })
  453. .finally(() => {
  454. // 显示发送成功
  455. app.$toast('发送成功')
  456. // 执行定时器
  457. app.timer()
  458. app.isLoading = false
  459. })
  460. },
  461. // 执行定时器
  462. timer() {
  463. const app = this
  464. app.smsState = true
  465. clearInterval(app.inter)
  466. app.inter = setInterval(() => {
  467. app.times = app.times - 1
  468. if (app.times <= 0) {
  469. app.smsState = false
  470. app.times = times
  471. clearInterval(app.inter)
  472. }
  473. }, 1000)
  474. },
  475. //头像上传
  476. uploadImg(url, formData) {
  477. const app = this
  478. // 选择图片并上传
  479. uni.chooseImage({
  480. count: 1, // 可选择图片的数量
  481. success: function (chooseResult) {
  482. var tempFilePaths = chooseResult.tempFilePaths
  483. // 上传图片
  484. let baseUrl = apiUrl + '/api/attachment/addtoPath?pagevalue=300'
  485. uni.uploadFile({
  486. url: baseUrl, // 上传图片的服务器接口
  487. filePath: tempFilePaths[0],
  488. name: 'file',
  489. formData: {
  490. ...formData,
  491. attother1: 'zhengjianhao',
  492. attlsh: storage.get('wx_userid')
  493. }, // 证件 身份证 正面
  494. success: function (uploadResult) {
  495. let res = JSON.parse(uploadResult.data)
  496. if (res.Status == 0) {
  497. app[url] = res.Data
  498. console.log(app[url], 'imgUrl1')
  499. app.$toast('上传成功')
  500. } else {
  501. app.$toast('上传失败')
  502. }
  503. // 上传成功后的处理
  504. },
  505. fail: function (error) {
  506. console.log('上传失败', error)
  507. // 上传失败后的处理
  508. }
  509. })
  510. }
  511. })
  512. },
  513. async upFormData() {
  514. const app = this
  515. if (app.checked != '1') {
  516. this.$toast('请阅读并同意上面的用户协议')
  517. return false
  518. }
  519. if (Verify.isEmpty(app.smsCode)) {
  520. this.$toast('验证码')
  521. return false
  522. }
  523. // if (Verify.isEmpty(app.imgUrl1)) {
  524. // this.$toast('请上传身份证正面')
  525. // return false
  526. // }
  527. // if (Verify.isEmpty(app.imgUrl2)) {
  528. // this.$toast('请上传身份证反面')
  529. // return false
  530. // }
  531. // if (Verify.isEmpty(app.formData.customername)) {
  532. // this.$toast('请填写证件姓名')
  533. // return false
  534. // }
  535. // if (Verify.isEmpty(app.formData.customerzjhm)) {
  536. // this.$toast('请填写证件号')
  537. // return false
  538. // }
  539. if (Verify.isEmpty(app.formData.customertel)) {
  540. this.$toast('请填写手机号码')
  541. return false
  542. }
  543. // if (app.formData.customerzjlx === '中国大陆人员' && app.shibieMsg != '人脸核实已完成') {
  544. // this.$toast('请完成实名认证')
  545. // return false
  546. // }
  547. app.isLoading = true
  548. // 订单开通认证
  549. const param = {
  550. // 基础信息
  551. orderid: app.payorderid,
  552. tel: app.formData.customertel,
  553. customerid: storage.get('wx_userid'),
  554. openid: storage.get('wx_openid'),
  555. biztoken: storage.get('wxsm_info').BizToken,
  556. smscode: app.smsCode,
  557. // 实名信息
  558. customerqym: storage.get('wx_qym') || '',
  559. customerzjlx: app.formData.customerzjlx || '',
  560. customername: app.formData.customername || '',
  561. customerzjhm: app.formData.customerzjhm || ''
  562. }
  563. // 激活订单
  564. AppApi.personrz(param)
  565. .then((result) => {
  566. console.log(result, 'result')
  567. // 显示操作成功
  568. app.$toast('订单已经激活')
  569. // 跳转到订单页
  570. setTimeout(() => {
  571. uni.navigateBack({
  572. delta: Number(1)
  573. })
  574. }, 1000)
  575. })
  576. .finally(() => (app.isLoading = false))
  577. // AppApi.bindCustomer({'customerid.value': storage.get('wx_userid'), ...app.formData})
  578. // .then((result) => {
  579. // console.log(result, 'result')
  580. // // 显示操作成功
  581. // app.$toast('实名成功')
  582. // setTimeout(() => {
  583. // // 订单开通认证
  584. // const param = {
  585. // orderid: app.payorderid,
  586. // tel: app.formData.customertel,
  587. // customerid: storage.get('wx_userid'),
  588. // openid: storage.get('wx_openid'),
  589. // smscode: app.smsCode
  590. // }
  591. // AppApi.personrz(param)
  592. // this.$navTo('pages/user/index')
  593. // }, 1000)
  594. // })
  595. .finally(() => (app.isLoading = false))
  596. },
  597. async upFormNumber() {
  598. const app = this
  599. if (Verify.isEmpty(app.smsCode)) {
  600. this.$toast('验证码')
  601. return false
  602. }
  603. if (Verify.isEmpty(app.formData.customertel)) {
  604. this.$toast('请填写手机号码')
  605. return false
  606. }
  607. app.isLoading = true
  608. // 订单开通认证
  609. // 订单号 手机号 客户id
  610. const param = {
  611. orderid: app.payorderid,
  612. tel: app.formData.customertel,
  613. customerid: storage.get('wx_userid'),
  614. openid: storage.get('wx_openid'),
  615. smscode: app.smsCode
  616. }
  617. // 激活订单
  618. AppApi.personrz(param)
  619. .then((result) => {
  620. console.log(result, 'result')
  621. // 显示操作成功
  622. app.$toast('订单已经激活')
  623. // 跳转到订单页
  624. setTimeout(() => {
  625. uni.navigateBack({
  626. delta: Number(1)
  627. })
  628. }, 1000)
  629. })
  630. .finally(() => (app.isLoading = false))
  631. }
  632. },
  633. /**
  634. * 登录成功-跳转回原页面
  635. */
  636. onNavigateBack(delta = 1) {
  637. const pages = getCurrentPages()
  638. if (pages.length > 1) {
  639. uni.navigateBack({
  640. delta: Number(delta || 1)
  641. })
  642. } else {
  643. this.$navTo('pages/order/index', {
  644. dataType: 'comment'
  645. })
  646. }
  647. },
  648. onPullDownRefresh() {
  649. console.log('下拉')
  650. // 获取首页数据
  651. uni.stopPullDownRefresh()
  652. }
  653. }
  654. </script>
  655. <style lang="scss" scoped>
  656. .tyinput{
  657. position: absolute;
  658. left: -10px;
  659. top: 0px;
  660. }
  661. .rlhsBtn {
  662. width: 80%;
  663. background-color: #fff;
  664. border-radius: 10rpx;
  665. color: #eab766;
  666. margin: 10rpx 0rpx 26rpx 10rpx;
  667. text-align: center;
  668. padding: 20rpx 26rpx;
  669. height: auto;
  670. border: 1px solid #eab766;
  671. }
  672. .rlhsBtnTrue {
  673. color: #4caf50;
  674. background-color: #e8ffe9;
  675. border: 1px solid #4caf50;
  676. }
  677. .inputBtn {
  678. width: 260rpx;
  679. background-color: #eab766;
  680. border-radius: 10rpx;
  681. color: #fff;
  682. margin: 10rpx 0rpx 26rpx 10rpx;
  683. text-align: center;
  684. padding: 20rpx 6rpx;
  685. height: auto;
  686. }
  687. .realname {
  688. height: 100%;
  689. padding-bottom: 50rpx;
  690. font-size: 30rpx;
  691. background: #ffffff;
  692. .text-blue,
  693. .line-blue,
  694. .lines-blue {
  695. color: #eab766;
  696. }
  697. }
  698. .input_box {
  699. padding: 0 30rpx;
  700. .input {
  701. background: #eab7660a;
  702. border: 1rpx solid #eab766;
  703. border-radius: 10rpx;
  704. margin: 10rpx 0rpx 26rpx;
  705. padding: 20rpx 26rpx;
  706. height: auto;
  707. }
  708. }
  709. .uploadText {
  710. color: #aaaaaa;
  711. font-size: 22rpx;
  712. padding: 0rpx 30rpx 26rpx;
  713. background: #ffffff;
  714. }
  715. .uploadBox {
  716. padding: 15rpx 80rpx 40rpx;
  717. background-color: #ffffff;
  718. display: flex;
  719. justify-content: space-between;
  720. .leftBtn {
  721. width: 100%;
  722. height: 75rpx;
  723. line-height: 75rpx;
  724. background-color: #eab766;
  725. border-radius: 0 0 12rpx 12rpx;
  726. }
  727. .uploadItem {
  728. width: 100%;
  729. height: 200rpx;
  730. background-color: #eab7662d;
  731. border-radius: 15rpx;
  732. padding: 30rpx;
  733. position: relative;
  734. .imgUrl {
  735. width: 100%;
  736. height: 100%;
  737. position: absolute;
  738. left: 0;
  739. top: 0;
  740. }
  741. .imgBox {
  742. width: 100%;
  743. height: 100%;
  744. position: relative;
  745. }
  746. .imgEx1 {
  747. background: url('/static/discern/ex1.png');
  748. background-size: 82%;
  749. background-repeat: no-repeat;
  750. background-position: center;
  751. }
  752. .imgEx2 {
  753. background: url('/static/discern/ex2.png');
  754. background-size: 82%;
  755. background-repeat: no-repeat;
  756. background-position: center;
  757. }
  758. .imgEx3 {
  759. background: url('/static/background/wendang.png');
  760. background-size: 82%;
  761. background-repeat: no-repeat;
  762. background-position: center;
  763. }
  764. .imgExImgUrlHuman {
  765. background: url('/static/background/renlian.png');
  766. background-size: 82%;
  767. background-repeat: no-repeat;
  768. background-position: center;
  769. }
  770. .leftTop {
  771. height: 28rpx;
  772. width: 4rpx;
  773. background-color: #eab766;
  774. position: absolute;
  775. left: 0;
  776. }
  777. .leftTop2 {
  778. height: 4rpx;
  779. width: 28rpx;
  780. background-color: #eab766;
  781. position: absolute;
  782. top: 0;
  783. }
  784. .leftbottom {
  785. height: 28rpx;
  786. width: 4rpx;
  787. background-color: #eab766;
  788. position: absolute;
  789. bottom: 0;
  790. }
  791. .leftbottom2 {
  792. height: 4rpx;
  793. width: 28rpx;
  794. background-color: #eab766;
  795. position: absolute;
  796. bottom: 0;
  797. }
  798. .rightTop {
  799. height: 28rpx;
  800. width: 4rpx;
  801. background-color: #eab766;
  802. position: absolute;
  803. right: 0;
  804. }
  805. .rightTop2 {
  806. height: 4rpx;
  807. width: 28rpx;
  808. background-color: #eab766;
  809. position: absolute;
  810. right: 0;
  811. top: 0;
  812. }
  813. .rightbottom {
  814. height: 28rpx;
  815. width: 4rpx;
  816. background-color: #eab766;
  817. position: absolute;
  818. right: 0;
  819. bottom: 0;
  820. }
  821. .rightbottom2 {
  822. height: 4rpx;
  823. width: 28rpx;
  824. background-color: #eab766;
  825. position: absolute;
  826. right: 0;
  827. bottom: 0;
  828. }
  829. }
  830. .qyyyzz_uploadItem {
  831. height: 255rpx;
  832. }
  833. }
  834. .distinguishBox {
  835. padding: 5rpx 30rpx 20rpx;
  836. background: white;
  837. view {
  838. margin-bottom: 20rpx;
  839. }
  840. }
  841. .disLabel {
  842. text-align-last: justify;
  843. text-align: justify;
  844. text-justify: distribute-all-lines;
  845. min-width: 142rpx;
  846. display: inline-block;
  847. margin-right: 5rpx;
  848. }
  849. .requirement {
  850. padding: 10rpx 30rpx 26rpx;
  851. background: white;
  852. view {
  853. margin-bottom: 10rpx;
  854. }
  855. .errorBox {
  856. display: flex;
  857. justify-content: space-between;
  858. margin-top: 30rpx;
  859. view {
  860. width: 23%;
  861. height: 100rpx;
  862. }
  863. .item1 {
  864. background-image: url('/static/discern/yes.png');
  865. background-repeat: no-repeat;
  866. background-size: 100%;
  867. position: relative;
  868. }
  869. .item2 {
  870. background-image: url('/static/discern/error1.png');
  871. background-repeat: no-repeat;
  872. background-size: 100%;
  873. position: relative;
  874. }
  875. .item3 {
  876. background-image: url('/static/discern/error2.png');
  877. background-repeat: no-repeat;
  878. background-size: 100%;
  879. position: relative;
  880. }
  881. .item4 {
  882. background-image: url('/static/discern/error3.png');
  883. background-repeat: no-repeat;
  884. background-size: 100%;
  885. position: relative;
  886. }
  887. .iconImg {
  888. width: 60rpx;
  889. position: absolute;
  890. bottom: -10px;
  891. left: 50%;
  892. margin-left: -30rpx;
  893. }
  894. }
  895. }
  896. .submitBtn {
  897. width: 90%;
  898. height: 90rpx;
  899. background: #eab766;
  900. line-height: 90rpx;
  901. margin: 50rpx auto;
  902. text-align: center;
  903. font-size: 34rpx;
  904. color: #fff;
  905. border-radius: 12rpx;
  906. }
  907. </style>