|
|
@@ -17,8 +17,8 @@
|
|
|
<div v-else-if="step === 1" class="form">
|
|
|
<div class="title">填写姓名与身份证号</div>
|
|
|
<van-cell-group>
|
|
|
- <van-field label="姓名" placeholder="请输入姓名" :value="name" @input="name = $event.detail" />
|
|
|
- <van-field label="身份证" placeholder="请输入身份证" :value="idNo" @input="idNo = $event.detail" />
|
|
|
+ <van-field label="姓名" placeholder="请输入姓名" @input="name = $event.detail" />
|
|
|
+ <van-field label="身份证" placeholder="请输入身份证" @input="idNo = $event.detail" />
|
|
|
</van-cell-group>
|
|
|
<div style="padding: 30px">
|
|
|
<van-button type="primary" class="btn" round block @click="checkName">下一步</van-button>
|
|
|
@@ -100,22 +100,30 @@ export default {
|
|
|
name: '',
|
|
|
idNo: '',
|
|
|
photo: '',
|
|
|
- resultData: null
|
|
|
+ resultData: null,
|
|
|
+ init: false
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- authUtil.initProduct(membershipKey, res => {
|
|
|
- console.log(res);
|
|
|
- if (res.code !== '0') {
|
|
|
- wx.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: res.message
|
|
|
- });
|
|
|
- } else {
|
|
|
- apiKey = res.data.apiKey;
|
|
|
- apiSecret = res.data.apiSecret;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (!this.init) {
|
|
|
+ wx.showLoading({
|
|
|
+ title: '初始化中'
|
|
|
+ });
|
|
|
+ authUtil.initProduct(membershipKey, res => {
|
|
|
+ console.log(res);
|
|
|
+ wx.hideLoading();
|
|
|
+ if (res.code !== '0') {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.message
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.init = true;
|
|
|
+ apiKey = res.data.apiKey;
|
|
|
+ apiSecret = res.data.apiSecret;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
nameMask() {
|