Browse Source

对接接口

master
前端-胡立永 5 months ago
parent
commit
dcac7cffc1
2 changed files with 30 additions and 2 deletions
  1. +1
    -0
      api/api.js
  2. +29
    -2
      pages/subPack/autonym/autonym.vue

+ 1
- 0
api/api.js View File

@ -69,6 +69,7 @@ const config = {
method: 'POST',
auth: true,
limit : 800,
showLoading : true,
},
// 实名认证详情
authInfo: {


+ 29
- 2
pages/subPack/autonym/autonym.vue View File

@ -8,7 +8,17 @@
<!-- 实名认证表单 -->
<view class="autonum-form">
<view class="autonum-form-title">请填写真实有效的身份信息</view>
<view class="autonum-form-title"
v-if="!userInfo.auth">
请填写真实有效的身份信息
</view>
<view class="autonum-form-title"
v-else>
已完成认证
</view>
<view class="autonum-form-item">
<view class="title">姓名</view>
<input class="text" v-model="form.name" type="text" />
@ -17,7 +27,8 @@
<view class="title">证件号码</view>
<input class="text" v-model="form.cardNo" type="text" />
</view>
<div @click="submit" class="btn">
<div @click="submit" class="btn"
v-if="!userInfo.auth">
立即认证
</div>
</view>
@ -32,6 +43,7 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
name: "Autonym",
data() {
@ -42,6 +54,13 @@
}
}
},
computed : {
...mapState(['userInfo']),
},
onShow() {
this.$store.commit('getUserInfo')
this.getAuthInfo()
},
methods: {
toCenter() {
uni.navigateTo({
@ -71,6 +90,14 @@
// }
// })
},
getAuthInfo(){
this.$api('authInfo', res => {
if(res.result){
this.form.cardNo = res.result.cardNo
this.form.name = res.result.name
}
})
},
}
}
</script>


Loading…
Cancel
Save