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', method: 'POST',
auth: true, auth: true,
limit : 800, limit : 800,
showLoading : true,
}, },
// 实名认证详情 // 实名认证详情
authInfo: { authInfo: {


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

@ -8,7 +8,17 @@
<!-- 实名认证表单 --> <!-- 实名认证表单 -->
<view class="autonum-form"> <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="autonum-form-item">
<view class="title">姓名</view> <view class="title">姓名</view>
<input class="text" v-model="form.name" type="text" /> <input class="text" v-model="form.name" type="text" />
@ -17,7 +27,8 @@
<view class="title">证件号码</view> <view class="title">证件号码</view>
<input class="text" v-model="form.cardNo" type="text" /> <input class="text" v-model="form.cardNo" type="text" />
</view> </view>
<div @click="submit" class="btn">
<div @click="submit" class="btn"
v-if="!userInfo.auth">
立即认证 立即认证
</div> </div>
</view> </view>
@ -32,6 +43,7 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
name: "Autonym", name: "Autonym",
data() { data() {
@ -42,6 +54,13 @@
} }
} }
}, },
computed : {
...mapState(['userInfo']),
},
onShow() {
this.$store.commit('getUserInfo')
this.getAuthInfo()
},
methods: { methods: {
toCenter() { toCenter() {
uni.navigateTo({ 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> </script>


Loading…
Cancel
Save