index.vue 31 KB

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