Commit 5fdde65d authored by 潘永坪's avatar 潘永坪

支付宝小程序兼容

parent b9a2c7f3
......@@ -74,7 +74,7 @@ export default {
}
},
deep: true,
immediate: true
immediate: false
}
},
data() {
......
......@@ -45,7 +45,6 @@
<text class="bottom-title">
证件号
</text>
<!-- <input v-model.trim="credentialNumber" placeholder="请输入证件号码,必填"/> -->
<input v-model.trim="credentialNumber" :placeholder="placeholderText" />
</view>
<view>
......@@ -118,36 +117,34 @@ export default {
}
},
deep: true,
immediate: true
immediate: false
},
credential: {//该产品对应联系人可以添加的证件类型
handler(newValue, oldValue) {
if(newValue){
this.credentialList=newValue.split(',')||[]
this.credentialList.forEach((item,index)=>{
//转化成数字类型,防止上面证件类型,编辑选择身份证时出现bug
this.credentialList[index]=parseFloat(item)
})
if(this.credentialList.length==1){
let type=this.credentialList[0]
if(type=='0'){this.placeholderText='请输入身份证,必填'}
if(type=='1'){this.placeholderText='请输入护照,必填'}
if(type=='2'){this.placeholderText='请输入港澳通行证,必填'}
if(type=='3'){this.placeholderText='请输入台胞通行证,必填'}
if(type=='4'){this.placeholderText='请输入台胞证,必填'}
if(type=='5'){this.placeholderText='请输入回乡证,必填'}
if(type=='6'){this.placeholderText='请输入外国人永久居留证,必填'}
if(type=='7'){this.placeholderText='请输入学生证,必填'}
if(type=='8'){this.placeholderText='请输入军官证,必填'}
if(type=='9'){this.placeholderText='请输入残疾军人证,必填'}
}
if(this.credentialList.length>1){
this.placeholderText='请输入证件号码,必填'
}
this.credentialList=newValue.split(',')||[]
this.credentialList.forEach((item,index)=>{
//转化成数字类型,防止上面证件类型,编辑选择身份证时出现bug
this.credentialList[index]=parseFloat(item)
})
if(this.credentialList.length==1){
let type=this.credentialList[0]
if(type=='0'){this.placeholderText='请输入身份证,必填'}
if(type=='1'){this.placeholderText='请输入护照,必填'}
if(type=='2'){this.placeholderText='请输入港澳通行证,必填'}
if(type=='3'){this.placeholderText='请输入台胞通行证,必填'}
if(type=='4'){this.placeholderText='请输入台胞证,必填'}
if(type=='5'){this.placeholderText='请输入回乡证,必填'}
if(type=='6'){this.placeholderText='请输入外国人永久居留证,必填'}
if(type=='7'){this.placeholderText='请输入学生证,必填'}
if(type=='8'){this.placeholderText='请输入军官证,必填'}
if(type=='9'){this.placeholderText='请输入残疾军人证,必填'}
}
if(this.credentialList.length>1){
this.placeholderText='请输入证件号码,必填'
}
},
deep: true,
immediate: true
immediate: false
}
},
methods: {
......
......@@ -470,7 +470,9 @@ export default {
this.orderSource = this.$commonjs.getKey(option,'orderSource')|| ''
this.thirdOpenid = this.$commonjs.getKey(option,'thirdOpenid')|| '' //第三方openid
this.productId = this.$commonjs.getKey(option,'productId') || ''
this.initData() //页面初始化数据
setTimeout(()=>{
this.initData() //页面初始化数据
},1000)
this.docQuery = uni.createSelectorQuery().in(this)
},
computed: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment