auth.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. <template>
  2. <view class="">
  3. <view style="padding: 0 20rpx 20rpx;" v-if="appletStatus==1">
  4. <u-top-tips type="info" ref="uTips"></u-top-tips>
  5. <u-alert-tips :show="show" type="warning" title="审核意见" :close-able="true" :description="opinion"></u-alert-tips>
  6. <view class="auth">
  7. <view class="flex" >
  8. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  9. <text class="text-lg">个人信息认证</text>
  10. </view>
  11. <view class="card">
  12. <u-form :model="model" ref="uForm" >
  13. <u-form-item :required="true" :label-width="labelWidth" label="姓名" >
  14. <u-input placeholder="请输入姓名" v-model="model.realName" type="text"></u-input>
  15. </u-form-item>
  16. <u-form-item :required="true" :label-width="labelWidth" label="性别" >
  17. <u-input type="select" :select-open="sexSelectShow" v-model="sexSelectList[sexSelectIndex].text" placeholder="请选择性别" @click="sexSelectShow = true"></u-input>
  18. </u-form-item>
  19. <u-form-item :required="true" label="身份证号" :label-width="labelWidth">
  20. <u-input maxlength="18" placeholder="请输入身份证号" v-model="model.idcard" ></u-input>
  21. </u-form-item>
  22. <u-form-item :required="true" label="手机号码" :label-width="labelWidth">
  23. <u-input maxlength="11" disabled placeholder="请输入手机号" v-model="model.phone" type="number"></u-input>
  24. </u-form-item>
  25. <u-form-item :required="true" :border-bottom="false" label="脸部信息采集" :label-width="labelWidth"></u-form-item>
  26. </u-form>
  27. <view @click="faceSelectShow=true" class="flex justify-center padding-bottom-50">
  28. <view class=" ">
  29. <upload-img
  30. :width="$isEmpty(model.face)?350:560"
  31. :height="$isEmpty(model.face)?350:420"
  32. :currentImage="model.face"
  33. bgsrc="https://vote-obs.guosen-fumao.cn/c683bfabcdfe4306adb96bb1605394b6-face1%5B0%5D.png"
  34. >
  35. </upload-img>
  36. <view class="text-center padding-top-20 base-color" >
  37. <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
  38. <text v-if="$isEmpty(model.face)">点击上传人脸</text>
  39. <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="auth">
  46. <view class="flex" >
  47. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  48. <text class="text-lg">企业信息认证</text>
  49. </view>
  50. <view class="card">
  51. <u-form :model="model" ref="uForm" >
  52. <u-form-item :required="true" :label-width="labelWidth" label="公司园区" >
  53. <u-input type="select" :select-open="ganderSelectShow" v-model="gander" placeholder="请选择工作园区" @click="ganderShow"></u-input>
  54. </u-form-item>
  55. <u-form-item :required="true" :label-width="labelWidth" label="园区区域" >
  56. <u-input type="select" :select-open="residentialSelectShow" v-model="residential" placeholder="请选择园区区域" @click="residentialShow"></u-input>
  57. </u-form-item>
  58. <u-form-item :required="true" :label-width="labelWidth" label="所属企业" >
  59. <u-input type="select" :select-open="companySelectShow" v-model="company" placeholder="请选择所属企业" @click="companyShow"></u-input>
  60. </u-form-item>
  61. </u-form>
  62. </view>
  63. </view>
  64. <view class="auth">
  65. <view class="flex" >
  66. <image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
  67. <text class="text-lg">其他信息</text>
  68. </view>
  69. <view class="card">
  70. <u-form :model="model" ref="uForm" >
  71. <u-form-item label-position="top" :border-bottom="false" :label-width="labelWidth" label="备注(可选)" >
  72. <u-input height="200" v-model="model.remarks" placeholder="填写备注信息" type="textarea" :border="border" />
  73. </u-form-item>
  74. <!-- <textarea value="" v-model="model.remarks" placeholder="填写备注信息" /> -->
  75. </u-form>
  76. </view>
  77. </view>
  78. <!-- <view class="auth flex justify-between">
  79. <view class="flex flex-direction">
  80. <view class="">
  81. <text style="font-size: 34rpx;" class="cuIcon-noticefill base-color padding-right-10"></text>
  82. <text class="text-lg">消息通知提醒</text>
  83. </view>
  84. <view class="padding-top-10 text-sm text-gray">
  85. <text>开启订阅后,认证审核通知将推送到您的微信上</text>
  86. </view>
  87. </view>
  88. <button v-if="subscribeShow" @click="subscribe" class="cu-btn sm round base-bg-color">
  89. 订阅
  90. </button>
  91. <button v-else @opensetting="opensetting" open-type="openSetting"class="cu-btn sm round base-bg-color">
  92. 订阅
  93. </button>
  94. </view> -->
  95. <button @click="submit" v-if="canIUseGetUserProfile" :style="{marginBottom:safeAreaBottom}" class="cu-btn base-bg-color round flex" style="padding: 40rpx 0;margin-top: 40rpx;">
  96. <text v-text="operationType==0?'提交':'重新审核'"></text>
  97. </button>
  98. <button v-else :style="{marginBottom:safeAreaBottom}" open-type="getUserInfo" @getuserinfo="submit" class="cu-btn base-bg-color round flex" style="padding: 40rpx 0;margin-top: 40rpx;">
  99. <text v-text="operationType==0?'提交':'重新审核'"></text>
  100. </button>
  101. <!-- 性别 -->
  102. <u-picker v-model="sexSelectShow" @confirm="sexSelectCallback" :range="sexSelectList" range-key="text" mode="selector"></u-picker>
  103. <!-- 园区 -->
  104. <u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="name" mode="selector"></u-picker>
  105. <!-- 区域 -->
  106. <u-picker v-model="residentialSelectShow" @confirm="residentialSelectCallback" :range="residentialSelectList" range-key="name" mode="selector"></u-picker>
  107. <!-- 企业 -->
  108. <u-popup border-radius="8" height="60%" mode="bottom" v-model="companySelectShow">
  109. <view class="fixed cu-bar search bg-white">
  110. <view class="search-form round">
  111. <text class="cuIcon-search"></text>
  112. <u-input style="width: 90%;" v-model="keyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
  113. </view>
  114. <!-- <view @click="fetchEnterpriseList" class="action">
  115. <button class="cu-btn bg-blue shadow-blur round">搜索</button>
  116. </view> -->
  117. </view>
  118. <scroll-view v-if="!$isEmpty(companySelectList)" @scrolltolower="scrolltolower" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
  119. <view @click="companySelectCallback(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom" v-for="(item,index) in companySelectList" :key="index">
  120. <text>{{item.enterpriseName}}</text>
  121. </view>
  122. <u-divider v-if="flag" height="80">没有更多了</u-divider>
  123. </scroll-view>
  124. <u-empty v-else name="search"></u-empty>
  125. </u-popup>
  126. <!-- <u-picker v-model="companySelectShow" @confirm="companySelectCallback" :range="companySelectList" range-key="enterpriseName" mode="selector"></u-picker> -->
  127. <u-action-sheet @click="faceSelectCallback" z-index="999999" :list="faceSelectList" v-model="faceSelectShow"></u-action-sheet>
  128. </view>
  129. <view v-else>
  130. </view>
  131. </view>
  132. </template>
  133. <script>
  134. import uploadImg from '@/components/uploadimg/uploadImg.vue'
  135. let that;
  136. export default {
  137. components:{
  138. uploadImg
  139. },
  140. data() {
  141. return {
  142. //0 体验版 1正式版
  143. appletStatus:0,
  144. open:false,
  145. // 0:用户认证 1:重新审核
  146. operationType:0,
  147. phone:'',//当operationType为1时需要传过来
  148. opinion:'',//审核不通过时的审核意见
  149. show:false,//当有审核意见时才显示
  150. labelWidth:'200',
  151. model: {
  152. avatar:'',
  153. name:'',//昵称
  154. openId:'',
  155. realName: '',
  156. enterpriseId:'',
  157. enterpriseName:'',
  158. face:'',
  159. sex: '', //性别 1 男 2 女
  160. idcard:'',
  161. phone: '',
  162. remarks:''
  163. },
  164. //性别
  165. sexSelectList: [{text: '男',value:1},{text: '女',value:2}],
  166. sexSelectShow: false,
  167. sexSelectIndex:0,
  168. //园区
  169. gander:'',
  170. ganderSelectList: [],
  171. ganderSelectShow: false,
  172. ganderSelectIndex:0,
  173. //区域
  174. residential:'',
  175. residentialId:'',
  176. residentialSelectList: [],
  177. residentialSelectShow: false,
  178. residentialSelectIndex:0,
  179. //企业
  180. current:1,
  181. flag:false,
  182. keyword:'',
  183. company:'',
  184. companySelectList: [],
  185. companySelectShow: false,
  186. //上传人脸的方式
  187. faceSelectList: [{
  188. text: '相册上传',
  189. }, {
  190. text: '拍照上传'
  191. }],
  192. faceSelectShow:false,
  193. //验证码
  194. codeTips: '',
  195. subscribeShow:true,
  196. //获取头像信息,兼容低版本
  197. canIUseGetUserProfile: false,
  198. }
  199. },
  200. watch:{
  201. keyword(){
  202. let that=this
  203. //节流函数
  204. if (this.timer){
  205. clearTimeout(this.timer)//阻止setTimeout函数的执行
  206. }
  207. this.timer = setTimeout(() => {
  208. that.current=1
  209. that.companySelectList=[]
  210. that.fetchEnterpriseList(that.residentialId)
  211. }, 500)
  212. },
  213. },
  214. computed: {
  215. //ios底部安全区域
  216. safeAreaBottom() {
  217. let info = uni.getSystemInfoSync()
  218. let safe = 20
  219. if (
  220. info &&
  221. ['devtools', 'ios'].includes(info.platform) &&
  222. info.statusBarHeight > safe
  223. ) {
  224. return info.statusBarHeight - safe+'px'
  225. }
  226. return 0
  227. }
  228. },
  229. onShow() {
  230. this.handelAppletAudit()
  231. let currPage=this.getPageCtx()
  232. if (!this.$isEmpty(currPage.data.image)) {
  233. this.uploadFile(currPage.data.image)
  234. }
  235. },
  236. onLoad(options) {
  237. that=this
  238. //兼容低版本获取头像的方式
  239. if (uni.getUserProfile) {
  240. this.canIUseGetUserProfile=false
  241. }
  242. if (!this.$isEmpty(options.operationType)) {
  243. this.operationType=options.operationType
  244. }
  245. this.fetchAgencyList()
  246. if (this.operationType==0) {
  247. //用户认证
  248. this.getOpenid()
  249. if (!this.$isEmpty(options.phone)) {
  250. this.model.phone=options.phone
  251. }
  252. }else{
  253. //用户重新审核
  254. this.phone=options.phone
  255. this.fetchUserInfo()
  256. }
  257. },
  258. methods: {
  259. handelAppletAudit(){
  260. this.appletStatus=uni.getStorageSync("appletStatus")
  261. if (this.appletStatus==1) {
  262. uni.setNavigationBarTitle({
  263. title:'员工认证'
  264. })
  265. }else{
  266. uni.setNavigationBarTitle({
  267. title:'待开发'
  268. })
  269. }
  270. },
  271. /**
  272. * 重新审核操作时,加载用户的认证信息
  273. */
  274. async fetchUserInfo(){
  275. if (this.$isEmpty(getApp().globalData.userInfo)) {
  276. let res=await this.$api.enterprisestaff.page({phone:this.phone})
  277. this.model=res.data.records[0]
  278. }else{
  279. this.model=getApp().globalData.userInfo
  280. }
  281. if (this.model.sex==2) {
  282. this.sexSelectIndex=1
  283. }
  284. this.opinion=this.model.opinion
  285. if (!this.$isEmpty(this.opinion)) {
  286. this.show=true
  287. }
  288. this.fetchResidentialList(this.model.agencyId)
  289. this.fetchEnterpriseList(this.model.residentialId)
  290. this.gander=this.model.agencyName
  291. this.residential=this.model.residentialName
  292. this.company=this.model.enterpriseName
  293. },
  294. /**
  295. * 获取openid
  296. */
  297. getOpenid(){
  298. uni.login({
  299. success: (res) => {
  300. let data={
  301. appId:this.$api.wxData.appId,
  302. jsCode:res.code,
  303. secret:this.$api.wxData.secret
  304. }
  305. this.$api.wxApi.getOpenId(data).then(res=>{
  306. let resData= JSON.parse(res.data)
  307. this.model.openId=resData.openid
  308. this.$cache.put('openid',resData.openid)
  309. })
  310. }
  311. })
  312. },
  313. /**
  314. * 提交审核
  315. */
  316. async submit(e){
  317. let userInfo={}
  318. try{
  319. if (this.canIUseGetUserProfile) {
  320. let res=await this.$mpi.getUserProfile()
  321. userInfo=res.userInfo
  322. }else{
  323. userInfo=e.detail.userInfo
  324. }
  325. }catch(e){
  326. this.$refs.uTips.show({
  327. title: '认证失败,获取头像昵称失败',
  328. type: 'error',
  329. duration: '3000'
  330. })
  331. return
  332. }
  333. if (this.$isEmpty(userInfo)) {
  334. this.$refs.uTips.show({
  335. title: '认证失败,获取头像昵称失败',
  336. type: 'error',
  337. duration: '3000'
  338. })
  339. return
  340. }
  341. this.model.avatar=userInfo.avatarUrl
  342. this.model.name=userInfo.nickName
  343. this.model.sex=this.sexSelectList[this.sexSelectIndex].value || 1
  344. if (this.$isEmpty(this.model.realName)) {
  345. this.$u.toast('请输入您的姓名')
  346. return
  347. }
  348. if (this.$isEmpty(this.model.idcard)) {
  349. this.$u.toast('请输入身份证号')
  350. return
  351. }
  352. if (!this.$u.test.idCard(this.model.idcard)) {
  353. this.$u.toast('请输入正确的身份证号')
  354. return
  355. }
  356. if (this.$isEmpty(this.model.phone)) {
  357. this.$u.toast('请输入手机号码')
  358. return
  359. }
  360. if (!this.$u.test.mobile(this.model.phone)) {
  361. this.$u.toast('请输入正确的手机号码')
  362. return
  363. }
  364. if (this.$isEmpty(this.model.face)) {
  365. this.$u.toast('请上传人脸信息')
  366. return
  367. }
  368. if (this.$isEmpty(this.model.enterpriseId)) {
  369. this.$u.toast('请选择所属企业')
  370. return
  371. }
  372. if (this.operationType==1) {
  373. //重新审核
  374. this.model.auditStatus=0
  375. }
  376. this.model.createType=1 //1小程序认证方式 0:后台数据导入
  377. let res=await this.$api.enterprisestaff.submit(this.model)
  378. if (res.code==200) {
  379. if (this.operationType==0) {
  380. that.$showModel('提交成功,请耐心等待企业管理者审核',false).then(res=>{
  381. uni.reLaunch({
  382. url:"/pages/login/login"
  383. })
  384. })
  385. }else{
  386. that.$showModel('操作成功',false).then(res=>{
  387. this.$navigateBack()
  388. })
  389. }
  390. await this.$mpi.subscribe(that.$staffTmplIds)
  391. this.getOpenListAndSendMsg()
  392. }else{
  393. this.$u.toast(res.msg)
  394. }
  395. },
  396. async send(openId){
  397. let tokenData={
  398. grantType:this.$api.wxData.subscribe_grant_type,
  399. appId:this.$api.wxData.appId,
  400. secret:this.$api.wxData.secret
  401. }
  402. let res=await this.$api.wxApi.getAccessToken(tokenData)
  403. let token=JSON.parse(res.data).access_token
  404. let subscribeData={
  405. accessToken:token,
  406. touser:openId,
  407. lang:"zh_CN",
  408. page:'/pages/index/staffAudit/list',
  409. miniprogramState:this.$miniprogramState,
  410. templateId: this.$adminTmplIds[2],
  411. "data": {
  412. "thing5": {
  413. "value": this.model.realName
  414. },
  415. "phone_number6":{
  416. "value": this.model.phone
  417. },
  418. "time3": {
  419. "value": this.$dateTime.format(new Date())
  420. }
  421. }
  422. }
  423. let resp=await this.$api.wxApi.subscribe(subscribeData)
  424. console.log(resp);
  425. },
  426. async getOpenListAndSendMsg(){
  427. let agencyRes=await this.$api.getManagerOpenList({agencyId:this.model.agencyId})
  428. let enterpriseRes=await this.$api.getManagerOpenList({enterpriseId:this.model.enterpriseId})
  429. let openIds=[...agencyRes.data,...enterpriseRes.data]
  430. openIds.forEach(item=>{
  431. this.send(item)
  432. })
  433. },
  434. //园区 begin
  435. /**
  436. * 显示园区
  437. */
  438. ganderShow(){
  439. this.ganderSelectShow=true
  440. },
  441. /**
  442. * 获取园区列表
  443. */
  444. fetchAgencyList(){
  445. this.$api.agency.page().then(res=>{
  446. this.ganderSelectList=res.data.records
  447. })
  448. },
  449. /**
  450. * 选择园区后的回调
  451. * @param {Object} e
  452. */
  453. ganderSelectCallback(e) {
  454. uni.hideKeyboard();
  455. //先重置区域和企业
  456. if (this.ganderSelectIndex!=e[0]) {
  457. this.resetResidential()
  458. this.resetEnterprise()
  459. }
  460. this.ganderSelectIndex=e[0]
  461. this.gander=this.ganderSelectList[this.ganderSelectIndex].name
  462. this.model.agencyName=this.ganderSelectList[this.ganderSelectIndex].name
  463. this.model.agencyId=this.ganderSelectList[this.ganderSelectIndex].id
  464. //加载区域
  465. this.fetchResidentialList(this.model.agencyId)
  466. },
  467. //园区 end
  468. //区域 begin
  469. /**
  470. * 重置区域数据
  471. * @param {Object}
  472. */
  473. resetResidential(){
  474. this.residentialSelectList=[]
  475. this.residential=''
  476. this.residentialSelectIndex=0
  477. this.model.residentialName=''
  478. this.model.residentialId=''
  479. },
  480. /**
  481. * 根据园区id获取区域列表
  482. */
  483. fetchResidentialList(agencyId){
  484. this.$api.residential.page({agencyId:agencyId,size:300}).then(res=>{
  485. this.residentialSelectList=res.data.records
  486. })
  487. },
  488. //显示区域
  489. residentialShow(){
  490. if (this.$isEmpty(this.gander)) {
  491. //未选择园区提示先选择园区
  492. this.$u.toast("请先选择园区")
  493. return
  494. }
  495. this.residentialSelectShow=true
  496. },
  497. /**
  498. * 选择区域的回调
  499. */
  500. residentialSelectCallback(e){
  501. uni.hideKeyboard();
  502. //先重置数据
  503. if (this.residentialSelectIndex!=e[0]) {
  504. this.resetEnterprise()
  505. }
  506. this.residentialSelectIndex=e[0]
  507. this.residential=this.residentialSelectList[this.residentialSelectIndex].name
  508. this.residentialId=this.residentialSelectList[this.residentialSelectIndex].id
  509. this.model.residentialName=this.residentialSelectList[this.residentialSelectIndex].name
  510. this.model.residentialId=this.residentialSelectList[this.residentialSelectIndex].id
  511. //加载区域下的企业
  512. this.fetchEnterpriseList(this.residentialId)
  513. },
  514. //区域 end
  515. //企业 begin
  516. /**
  517. * 重置企业数据
  518. */
  519. resetEnterprise(){
  520. this.companySelectList=[]
  521. this.current=1
  522. this.company=''
  523. this.model.enterpriseName=''
  524. this.model.enterpriseId=''
  525. },
  526. /**
  527. * 根据 区域id 获取 企业列表
  528. */
  529. fetchEnterpriseList(residentialId){
  530. let params={
  531. residentialId:residentialId,
  532. current:this.current,
  533. enterpriseName:this.keyword
  534. }
  535. this.$api.enterprise.page(params).then(res=>{
  536. this.companySelectList = [...this.companySelectList,...res.data.records]
  537. })
  538. },
  539. /**
  540. * @param {Object} 下拉加载更多企业
  541. */
  542. scrolltolower(e){
  543. if(this.companySelectList.length<this.current*10){
  544. this.flag=true
  545. return
  546. }else{
  547. this.current++
  548. this.fetchEnterpriseList(this.residentialId)
  549. }
  550. },
  551. /**
  552. * 显示企业
  553. */
  554. companyShow(){
  555. if (this.$isEmpty(this.residential)) {
  556. //未选择区域
  557. this.$u.toast("请选择区域")
  558. return
  559. }
  560. this.companySelectShow=true
  561. },
  562. //公司
  563. companySelectCallback(item) {
  564. this.model.enterpriseId=item.id
  565. this.model.enterpriseName=item.enterpriseName
  566. this.company=item.enterpriseName
  567. this.companySelectShow=false
  568. },
  569. //企业 end
  570. /**
  571. * 获取页面对象
  572. */
  573. getPageCtx(idx = 0){
  574. let pages = getCurrentPages()
  575. if (pages.length > 0) {
  576. return pages[pages.length - 1 - idx] || {}
  577. }
  578. return {}
  579. },
  580. //性别
  581. sexSelectCallback(e) {
  582. uni.hideKeyboard();
  583. this.sexSelectIndex=e[0]
  584. },
  585. faceSelectCallback(index){
  586. if (index==0) {
  587. //图片上传
  588. this.chooseImage()
  589. } else if(index==1){
  590. //拍照上传
  591. uni.navigateTo({
  592. url:'/pages/my-camera/my-camera'
  593. })
  594. }
  595. },
  596. //点击上传图片事件
  597. chooseImage: function () {
  598. uni.chooseImage({
  599. count: 1,
  600. //最多可以选择的图片张数,默认9
  601. sourceType: ['album'],
  602. sizeType: ['compressed'],
  603. //可选择原图或压缩后的图片
  604. success: res => {
  605. that.uploadFile(res.tempFilePaths[0])
  606. }
  607. });
  608. },
  609. //处理照片,拍照上传和相册上传的共同处理方法
  610. async uploadFile(imgUrl){
  611. uni.showLoading({
  612. title:"上传中",
  613. })
  614. let res=await this.$api.uploadFile.submit(imgUrl)
  615. that.model.face=res.data.link
  616. uni.hideLoading()
  617. },
  618. },
  619. }
  620. </script>
  621. <style lang="scss">
  622. page{
  623. background-color: #FFFFFF;
  624. }
  625. .auth{
  626. padding: 40rpx 10rpx;
  627. .card{
  628. margin-top: 20rpx;
  629. padding: 0 30rpx;
  630. box-sizing: border-box;
  631. border-radius: 12rpx;
  632. box-shadow: 0 -10rpx rgba(248, 248, 248,.9) ,0 10rpx rgba(248, 248, 248,.9) , -10rpx 0rpx rgba(248, 248, 248,.9) ,10rpx 0rpx rgba(248, 248, 248,.9);
  633. .item{
  634. padding:30rpx 0;
  635. display: flex;
  636. justify-content: space-between;
  637. }
  638. }
  639. }
  640. </style>