companyIdentityThree.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. <template>
  2. <view class="center">
  3. <view>
  4. <!-- 上传银行卡正面 -->
  5. <upload class="upload" :file-list='payeeAddressUrlList[0]' ref="upload" :action="action" :max-size="maxSize"
  6. :max-count="1" :size-type="['compressed']" @on-success="getImgUrl" @on-remove="onRemove"
  7. delIconSize='30' delBgColor='rgba(0,0,0,0.4)' delIcon="trash"
  8. @on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions"
  9. :custom="uploadCustom"></upload>
  10. <!-- 上传银行卡反面 -->
  11. <upload class="upload" :file-list='payeeAddressUrlList[1]' ref="upload" :action="action" :max-size="maxSize"
  12. :max-count="1" :size-type="['compressed']" @on-success="getImgUrl1" @on-remove="onRemove"
  13. delIconSize='30' delBgColor='rgba(0,0,0,0.4)' delIcon="trash"
  14. @on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions1"
  15. :custom="uploadCustom"></upload>
  16. </view>
  17. <view class="person-info">
  18. <view class="c-row b-b">
  19. <text class="tit">银行卡号</text>
  20. <view class="con-list">
  21. <input type='number' placeholder="请填写银行卡号" name="input"
  22. v-model="identityAuthenticationInfo.bankCard"></input>
  23. </view>
  24. </view>
  25. <view class="c-row b-b">
  26. <text class="tit">开户行</text>
  27. <view class="con-list">
  28. <input placeholder="请填写开户行" name="input" v-model="identityAuthenticationInfo.bankDeposit"></input>
  29. </view>
  30. </view>
  31. <view class="c-row b-b">
  32. <text class="tit">开户支行</text>
  33. <view v-if="zhihangStatus" class="con-list">
  34. <picker @change="bankChange" :value="bankIndex" :range="bankType" class="con-list">
  35. <view class="con-list">
  36. {{bankIndex>-1?bankType[bankIndex]:'请选择开户支行'}}
  37. </view>
  38. </picker>
  39. </view>
  40. <view v-else class="con-list">
  41. <input placeholder="请填写" name="input" v-model="identityAuthenticationInfo.bankDepositBranch"></input>
  42. </view>
  43. <button v-if="zhihangStatus" class='cu-btn bg-green shadow' @click="changeZhihang">填写</button>
  44. <button v-else class='cu-btn bg-green shadow' @click="changeZhihang">识别</button>
  45. </view>
  46. <view class="c-row b-b">
  47. <text class="tit_red">*</text>
  48. <text class="tit">手机号</text>
  49. <view class="con-list">
  50. <input placeholder="请填写手机号" @input='phoneinput' type="number" maxlength="11"
  51. v-model="identityAuthenticationInfo.customerPhone"></input>
  52. </view>
  53. </view>
  54. <view style='width:100%;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
  55. <button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
  56. <view class="con-list" style='position:relative;'>
  57. <input style='text-align:right;' v-model='verifyCode' placeholder="请输入验证码" type="number" maxlength="6">
  58. </view>
  59. </view>
  60. <!-- <view class="c-row b-b" v-if="identityAuthenticationInfo.customerTypeFlag == 2">
  61. <text class="tit">公司地址</text>
  62. <view class="con-list">
  63. <input placeholder="请填写公司地址" name="input" v-model="identityAuthenticationInfo.compAddress"></input>
  64. </view>
  65. </view>
  66. <view class="c-row b-b" v-if="identityAuthenticationInfo.customerTypeFlag == 1">
  67. <text class="tit">联系地址</text>
  68. <view class="con-list">
  69. <input placeholder="请填写联系地址" name="input" v-model="identityAuthenticationInfo.compAddress"></input>
  70. </view>
  71. </view> -->
  72. <view class="c-row b-b" >
  73. <text class="tit">供应商姓名</text>
  74. <view class="con-list">
  75. <input placeholder="请填写供应商姓名" name="input" v-model="identityAuthenticationInfo.supplier"></input>
  76. </view>
  77. </view>
  78. <view class="c-row b-b" >
  79. <text class="tit">供应商电话</text>
  80. <view class="con-list">
  81. <input placeholder="请填写供应商电话" name="input"
  82. v-model="identityAuthenticationInfo.supplierPhone"></input>
  83. </view>
  84. </view>
  85. </view>
  86. <button class="btns btn" @click="commit">提交</button>
  87. </view>
  88. </template>
  89. <script>
  90. import upload from '@/components/upload.vue';
  91. import {
  92. mapState
  93. } from 'vuex';
  94. export default {
  95. components: {
  96. upload
  97. },
  98. name: "buy",
  99. data() {
  100. return {
  101. action: this.$uploadUrl,
  102. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  103. btnLoading: false, //防止重复点击
  104. isAdd: true,
  105. imgUrls: [],
  106. uploadCustom: true,
  107. uploadCustom1: true,
  108. uploadOptions: {
  109. "text": "上传银行卡正面",
  110. "bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/bankup%282%29.png"
  111. },
  112. uploadOptions1: {
  113. "text": "上传银行卡反面",
  114. "bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/banklow%282%29.png"
  115. },
  116. // bank1: "../../static/img/authentication/bankup(3).png",
  117. // bank2: "../../static/img/authentication/banklow(3).png",
  118. bankid: [],
  119. consentStatus: true,
  120. consentStatus1: false,
  121. codestatus: false,
  122. verifyCode: null,
  123. inputStatus: 'none',
  124. sendText: '获取验证码',
  125. platform: '',
  126. sendDisabled: false,
  127. identityAuthenticationInfo: {},
  128. bankImgs1: {},
  129. bankIndex: -1,
  130. bankType: [],
  131. certificates: true,
  132. certificatesTwo: true,
  133. zhihangStatus: true,
  134. verification: true,
  135. identityAuthenticationInfos: {},
  136. payeeAddressUrlList: []
  137. }
  138. },
  139. computed: {
  140. ...mapState(['hasLogin', 'userInfo'])
  141. },
  142. onLoad(options) {
  143. this.identityAuthenticationInfo = JSON.parse(options.identityAuthenticationInfo)
  144. if (this.identityAuthenticationInfo.customerTypeFlag == 1) {
  145. this.identityAuthenticationInfo.payeeName = this.identityAuthenticationInfo.customerName
  146. this.identityAuthenticationInfo.payeeNumberCard = this.identityAuthenticationInfo.customerNumberCard
  147. }
  148. if (this.identityAuthenticationInfo.payeeAddressUrl) {
  149. let _lsit = []
  150. _lsit = this.identityAuthenticationInfo.payeeAddressUrl.split(',')
  151. this.payeeAddressUrlList[0] = [{
  152. url: _lsit[0]
  153. }]
  154. this.payeeAddressUrlList[1] = [{
  155. url: _lsit[0]
  156. }]
  157. }
  158. },
  159. methods: {
  160. filterFileType(index, lists) {
  161. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  162. lists.splice(index, 1);
  163. // 当前文件不支持
  164. uni.showModal({
  165. title: '暂不支持当前图片类型',
  166. showCancel: false
  167. });
  168. } else {
  169. this.isAdd = false;
  170. }
  171. },
  172. getImgUrl(res) {
  173. console.log(res)
  174. console.log('------------res-----------')
  175. let that = this
  176. that.bankid[0] = res.data.appendixPath
  177. that.bank1 = res.data.appendixPath
  178. that.certificates = false
  179. that.bankImgs1.bankImg = res.data.appendixPath
  180. that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
  181. .bankImgs1).then(res => {
  182. if (res.data.data.bankNo != null) {
  183. if (res.data.data.bankNo != "") {
  184. that.$set(that.identityAuthenticationInfo,
  185. 'bankCard', res.data.data.bankNo)
  186. }
  187. }
  188. if (res.data.data.bankName != null) {
  189. if (res.data.data.bankName != "") {
  190. that.$set(that.identityAuthenticationInfo,
  191. 'bankDeposit', res.data.data.bankName)
  192. }
  193. }
  194. if (res.data.data.bankNameZhihang.length != 0) {
  195. that.bankType = res.data.data.bankNameZhihang
  196. }
  197. }).catch(res => {
  198. uni.showToast({
  199. title: res.data.message,
  200. icon: 'none',
  201. duration: 2000
  202. })
  203. })
  204. },
  205. getImgUrl1(res) {
  206. console.log(res)
  207. console.log('------------res-----------')
  208. let that = this
  209. that.bankid[1] = res.data.appendixPath
  210. that.bank2 = res.data.appendixPath
  211. that.certificatesTwo = false
  212. that.bankImgs1.bankImg = res.data.appendixPath
  213. // that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
  214. // .bankImgs1).then(res => {
  215. // if (res.data.data.bankNo != null) {
  216. // if (res.data.data.bankNo != "") {
  217. // that.$set(that.identityAuthenticationInfo,
  218. // 'bankCard', res.data.data.bankNo)
  219. // }
  220. // }
  221. // if (res.data.data.bankName != null) {
  222. // if (res.data.data.bankName != "") {
  223. // that.$set(that.identityAuthenticationInfo,
  224. // 'bankDeposit', res.data.data.bankName)
  225. // }
  226. // }
  227. // if (res.data.data.bankNameZhihang != null) {
  228. // that.bankType = res.data.data.bankNameZhihang
  229. // }
  230. // }).catch(res => {
  231. // uni.showToast({
  232. // title: res.data.message,
  233. // icon: 'none',
  234. // duration: 2000
  235. // })
  236. // })
  237. },
  238. onError(error) {
  239. // alert(error)
  240. console.log('------------error-----------')
  241. console.log(error)
  242. },
  243. onProgress(e) {
  244. console.log(e)
  245. },
  246. onRemove(index) {
  247. this.imgUrls.splice(index, 1);
  248. },
  249. obtain() {
  250. if (this.sendText == "获取验证码") {
  251. this.getcode()
  252. }
  253. },
  254. bankChange(e) {
  255. this.bankIndex = e.detail.value
  256. this.Model = this.bankType[this.bankIndex];
  257. this.identityAuthenticationInfo.bankDepositBranch = this.bankType[this.bankIndex];
  258. },
  259. changeZhihang() {
  260. this.zhihangStatus = !this.zhihangStatus
  261. },
  262. commit() {
  263. var that = this
  264. if (this.bankid[0] == '' || this.bankid[0] == null) {
  265. this.$api.msg('请上传银行卡正面')
  266. return
  267. }
  268. // if (this.bankid[1] == '' || this.bankid[1] == null) {
  269. // this.$api.msg('请上传银行卡反面')
  270. // return
  271. // }
  272. if (!this.identityAuthenticationInfo.bankCard) {
  273. this.$api.msg('银行卡号不能为空')
  274. return
  275. }
  276. if (this.identityAuthenticationInfo.bankCard.length < 16 || this.identityAuthenticationInfo.bankCard
  277. .length > 19) {
  278. this.$api.msg('银行卡号输入错误')
  279. return
  280. }
  281. if (!this.identityAuthenticationInfo.bankDeposit) {
  282. this.$api.msg('开户行不能为空')
  283. return
  284. }
  285. if (this.identityAuthenticationInfo.bankDeposit.length < 4 || this.identityAuthenticationInfo.bankDeposit
  286. .length > 15) {
  287. this.$api.msg('开户行输入错误')
  288. return
  289. }
  290. if (!this.identityAuthenticationInfo.bankDepositBranch) {
  291. this.$api.msg('开户支行不能为空')
  292. return
  293. }
  294. if (this.identityAuthenticationInfo.bankDepositBranch.length < 4 || this.identityAuthenticationInfo
  295. .bankDepositBranch.length > 30) {
  296. this.$api.msg('开户支行输入错误')
  297. return
  298. }
  299. if (!this.identityAuthenticationInfo.customerPhone) {
  300. this.$api.msg('手机号不能为空')
  301. return
  302. }
  303. if (this.identityAuthenticationInfo.customerPhone.length != 11) {
  304. this.$api.msg('手机号填写不正确')
  305. return
  306. }
  307. if (!this.verifyCode) {
  308. this.$api.msg('请填写验证码')
  309. return
  310. }
  311. if (this.identityAuthenticationInfo.customerTypeFlag == 1) {
  312. if (!this.identityAuthenticationInfo.payeeName) {
  313. this.$api.msg('收款人姓名不能为空')
  314. return
  315. }
  316. if (this.identityAuthenticationInfo.payeeName < 2 || this.identityAuthenticationInfo.payeeName > 10) {
  317. this.$api.msg('收款人姓名输入错误')
  318. return
  319. }
  320. if (!this.identityAuthenticationInfo.payeeNumberCard) {
  321. this.$api.msg('收款人身份证号不能为空')
  322. return
  323. }
  324. if (this.identityAuthenticationInfo.payeeNumberCard.length != 18) {
  325. this.$api.msg('收款人身份证号输入错误')
  326. return
  327. }
  328. // if (!this.identityAuthenticationInfo.compAddress) {
  329. // this.$api.msg('联系地址不能为空')
  330. // return
  331. // }
  332. // if (this.identityAuthenticationInfo.compAddress.length < 2 || this.identityAuthenticationInfo
  333. // .compAddress.length > 40) {
  334. // this.$api.msg('联系地址输入错误')
  335. // return
  336. // }
  337. } else if (this.identityAuthenticationInfo.customerTypeFlag == 2) {
  338. if (!this.identityAuthenticationInfo.compAddress) {
  339. this.$api.msg('公司地址不能为空')
  340. return
  341. }
  342. if (this.identityAuthenticationInfo.compAddress.length < 2 || this.identityAuthenticationInfo
  343. .compAddress.length > 20) {
  344. this.$api.msg('公司地址输入错误')
  345. return
  346. }
  347. }
  348. this.amendprice()
  349. },
  350. phoneinput(e) {
  351. console.log(e.detail.value.length)
  352. if (e.detail.value.length == 11) {
  353. this.codestatus = true
  354. }
  355. },
  356. amendprice() {
  357. var that = this
  358. uni.showModal({
  359. content: "粮商身份信息审核通过后不可修改,是否确定提交?",
  360. showCancel: true,
  361. confirmText: '确定',
  362. success: function(res) {
  363. if (res.confirm) {
  364. uni.showLoading({
  365. title: "正在提交",
  366. mask: true
  367. })
  368. that.$api.doRequest('get', '/commonUser/loginVerifyCode', {
  369. phone: that.identityAuthenticationInfo.customerPhone,
  370. verifyCode: that.verifyCode
  371. }).then(res => {
  372. if (res.data.code == 200) {
  373. if (that.userInfo) {
  374. that.identityAuthenticationInfo.commonId = that.userInfo.id
  375. } else {
  376. that.identityAuthenticationInfo.commonId = res.data.data.id
  377. }
  378. that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
  379. // that.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
  380. that.identityAuthenticationInfos.customerPhone = that
  381. .identityAuthenticationInfo.customerPhone
  382. that.$api.doRequest('get',
  383. '/identityAuthenticationInfo/selectPhone', that
  384. .identityAuthenticationInfos)
  385. .then(res => {
  386. if (res.data.code == '11018') {
  387. uni.showModal({
  388. title: '提示',
  389. content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
  390. success: function(res) {
  391. if (res.confirm) {
  392. console.log(that
  393. .identityAuthenticationInfo,that
  394. .identityAuthenticationInfo
  395. .id)
  396. if (that
  397. .identityAuthenticationInfo
  398. .id) {
  399. that.$api.doRequest(
  400. 'post',
  401. '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo',
  402. that
  403. .identityAuthenticationInfo,
  404. 'application/json;charset=UTF-8'
  405. ).then(res => {
  406. if(res.data.code=='22004'){
  407. that.$api.msg(res1.message)
  408. return
  409. }
  410. console.log("成功连接")
  411. if (!that
  412. .identityAuthenticationInfo
  413. .goodsName
  414. ) {
  415. that.$api.msg('修改成功!')
  416. uni.navigateTo({
  417. url: `/pages/attestation/index`
  418. })
  419. return
  420. }
  421. })
  422. .catch(res => {
  423. console.log(res)
  424. if (res
  425. .errmsg
  426. ) {
  427. uni.showToast({
  428. title: res
  429. .errmsg,
  430. icon: 'none',
  431. duration: 2000
  432. })
  433. } else {
  434. uni.showToast({
  435. title: res.data.message?res.data.message:"系统异常,请联系管理员",
  436. icon: 'none',
  437. duration: 2000
  438. })
  439. }
  440. });
  441. } else {
  442. that.$api.doRequest(
  443. 'post',
  444. '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo',
  445. that
  446. .identityAuthenticationInfo
  447. )
  448. .then(res => {
  449. if (res.data.code ==200) {
  450. uni.showToast({
  451. title: '提交成功',
  452. icon: 'none',
  453. duration: 2000
  454. })
  455. //判断是不是从邀请页面进来的,如果是邀请进来的就直接邀请成功!
  456. if(that.identityAuthenticationInfo.invitation || that.identityAuthenticationInfo.inviteCompany){
  457. that.$api.doRequest('post', '/identityAuthenticationInfo/saveCompanyIdentity', {
  458. id: res.data.data,
  459. compId: that.identityAuthenticationInfo.inviteCompany,
  460. }, 'application/json;charset=UTF-8').then(res => {
  461. if (res.data.code == 200) {
  462. // this.getList()
  463. }
  464. })
  465. .catch(res => {
  466. if (res.message) {
  467. uni.showToast({
  468. title: res.message,
  469. icon: 'none',
  470. duration: 2000
  471. })
  472. } else {
  473. uni.showToast({
  474. title: "接受邀请失败,请稍后再试。",
  475. icon: 'none',
  476. duration: 2000
  477. })
  478. }
  479. });
  480. }
  481. setTimeout(() => {
  482. uni.navigateBack({
  483. delta: 3
  484. })
  485. },
  486. 2000
  487. );
  488. }else if (res.data&&res.data.message!=''&&res.data.message!=null){
  489. uni.showToast({
  490. title: res.data.message,
  491. icon: 'none',
  492. duration: 2000
  493. })
  494. }
  495. })
  496. }
  497. }
  498. }
  499. });
  500. } else if (res.data.code == 200) {
  501. if (that.identityAuthenticationInfo.id) {
  502. that.$api.doRequest('post',
  503. '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo',
  504. that.identityAuthenticationInfo,
  505. 'application/json;charset=UTF-8').then(
  506. res => {
  507. console.log("成功连接")
  508. if (!that
  509. .identityAuthenticationInfo
  510. .goodsName) {
  511. that.$api.msg('修改成功!')
  512. uni.navigateTo({
  513. url: `/pages/attestation/index`
  514. })
  515. return
  516. }
  517. })
  518. .catch(res => {
  519. if (res.errmsg) {
  520. uni.showToast({
  521. title: res.errmsg,
  522. icon: 'none',
  523. duration: 2000
  524. })
  525. } else {
  526. uni.showToast({
  527. title: "系统异常,请联系管理员",
  528. icon: 'none',
  529. duration: 2000
  530. })
  531. }
  532. });
  533. } else {
  534. that.$api.doRequest('post',
  535. '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo',
  536. that.identityAuthenticationInfo)
  537. .then(res => {
  538. console.log(
  539. "addIdentityAuthenticationInfo:",
  540. res)
  541. if (res.data.code == 200) {
  542. uni.showToast({
  543. title: '提交成功',
  544. icon: 'none',
  545. duration: 2000
  546. })
  547. //判断是不是从邀请页面进来的,如果是邀请进来的就直接邀请成功!
  548. if(that.identityAuthenticationInfo.invitation || that.identityAuthenticationInfo.inviteCompany){
  549. that.$api.doRequest('post', '/identityAuthenticationInfo/saveCompanyIdentity', {
  550. id: res.data.data,
  551. compId: that.identityAuthenticationInfo.inviteCompany,
  552. }, 'application/json;charset=UTF-8').then(res => {
  553. if (res.data.code == 200) {
  554. // this.getList()
  555. }
  556. })
  557. .catch(res => {
  558. if (res.message) {
  559. uni.showToast({
  560. title: res.message,
  561. icon: 'none',
  562. duration: 2000
  563. })
  564. } else {
  565. uni.showToast({
  566. title: "接受邀请失败,请稍后再试。",
  567. icon: 'none',
  568. duration: 2000
  569. })
  570. }
  571. });
  572. }
  573. setTimeout(() => {
  574. uni.navigateBack({
  575. delta: 3
  576. })
  577. }, 2000);
  578. } else {
  579. console.log("异常1:", res)
  580. uni.showToast({
  581. title: res.data.message,
  582. icon: 'none',
  583. duration: 2000
  584. })
  585. }
  586. })
  587. }
  588. }
  589. uni.hideLoading()
  590. }).catch(res => {
  591. console.log("异常:", res)
  592. uni.showToast({
  593. title: "系统异常,请联系管理员",
  594. icon: 'none',
  595. duration: 2000
  596. })
  597. uni.hideLoading()
  598. })
  599. } else {
  600. that.verification = false
  601. uni.showToast({
  602. title: res.data.message,
  603. icon: 'none',
  604. duration: 2000
  605. })
  606. uni.hideLoading()
  607. return false
  608. }
  609. })
  610. .catch(res => {
  611. that.verification = false
  612. uni.showToast({
  613. title: res.data.message,
  614. icon: 'none',
  615. duration: 2000
  616. })
  617. uni.hideLoading()
  618. return false
  619. });
  620. } else if (res.cancel) {
  621. // console.log('用户点击取消');
  622. }
  623. }
  624. })
  625. },
  626. getcode() {
  627. var that = this
  628. if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.identityAuthenticationInfo.customerPhone)) {
  629. this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
  630. phone: this.identityAuthenticationInfo.customerPhone
  631. }).then(res => {
  632. if (res.data.code == 200) {
  633. that.sendDisabled = true
  634. let sec = 60
  635. let interval = setInterval(() => {
  636. sec--;
  637. that.sendText = sec + 's后重发'
  638. if (sec <= 0) {
  639. that.sendDisabled = false
  640. that.sendText = "获取验证码"
  641. clearInterval(interval)
  642. }
  643. }, 1000)
  644. } else {
  645. uni.showToast({
  646. title: res.data.message,
  647. icon: 'none',
  648. duration: 2000
  649. })
  650. return
  651. }
  652. })
  653. .catch(res => {
  654. uni.showToast({
  655. title: res.data.message,
  656. icon: 'none',
  657. duration: 2000
  658. })
  659. return
  660. });
  661. } else {
  662. uni.showToast({
  663. title: '请输入正确的手机号',
  664. icon: 'none',
  665. duration: 2000
  666. })
  667. }
  668. },
  669. }
  670. }
  671. </script>
  672. <style>
  673. .center {
  674. padding: 10px 20px;
  675. background-color: #F5F6FA;
  676. }
  677. .c-row {
  678. display: -webkit-box;
  679. display: -webkit-flex;
  680. display: flex;
  681. -webkit-box-align: center;
  682. -webkit-align-items: center;
  683. align-items: center;
  684. padding: 20rpx 30rpx;
  685. position: relative;
  686. font-size: 14px;
  687. }
  688. .con-list {
  689. -webkit-box-flex: 1;
  690. -webkit-flex: 1;
  691. flex: 1;
  692. display: -webkit-box;
  693. display: -webkit-flex;
  694. display: flex;
  695. -webkit-box-orient: vertical;
  696. -webkit-box-direction: normal;
  697. -webkit-flex-direction: column;
  698. flex-direction: column;
  699. color: #303133;
  700. line-height: 40rpx;
  701. text-align: right;
  702. padding-right: 20rpx;
  703. font-size: 12px;
  704. }
  705. .btn {
  706. margin-top: 10px;
  707. background-color: #FFFFFF;
  708. border-radius: 25px;
  709. border: none;
  710. }
  711. .btns {
  712. background-color: #22C572;
  713. color: white;
  714. }
  715. .picture {
  716. width: 100%;
  717. height: 220px;
  718. text-align: center;
  719. margin-top: 10px;
  720. }
  721. .getcode {
  722. font-size: 14px;
  723. color: #AFB3BF;
  724. background: #F5F6F9;
  725. height: 30px;
  726. line-height: 30px;
  727. }
  728. .getcode.active {
  729. background: #22C572;
  730. color: #fff;
  731. }
  732. .words {
  733. font-size: 18px;
  734. font-weight: 600;
  735. color: #617E8B;
  736. }
  737. .floats {
  738. position: relative;
  739. top: -150px;
  740. text-align: center;
  741. }
  742. .upload {
  743. margin: 20rpx 0;
  744. }
  745. .tit_red {
  746. color: #E54D42;
  747. }
  748. .person-info{
  749. background: white;
  750. padding: 20rpx;
  751. border-radius: 20rpx;
  752. margin-bottom: 50rpx;
  753. }
  754. </style>