|
@@ -123,41 +123,46 @@
|
|
|
}
|
|
|
},
|
|
|
select(item) {
|
|
|
- if (item.basis == "false") {
|
|
|
- for (var i = 0; i < this.businessman.length; i++) {
|
|
|
- if (this.businessman[i] == item) {
|
|
|
- item.basis = "true"
|
|
|
- } else {
|
|
|
- this.businessman[i].basis = "false"
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // this.defaults1 = "default2"
|
|
|
- } else if (item.basis == "true") {
|
|
|
- item.basis = "false"
|
|
|
- // this.defaults2 = "default1"
|
|
|
- }
|
|
|
- this.identityAuthenticationInfo.commonId = this.userInfo.id
|
|
|
- this.identityAuthenticationInfo.defaultFlag = 1
|
|
|
- this.identityAuthenticationInfo.id = item.id
|
|
|
- this.$api.doRequest('post', '/identityAuthenticationInfo/api/setDefault', this.identityAuthenticationInfo,
|
|
|
- 'application/json;charset=UTF-8').then(res => {
|
|
|
+ if(item.authenticationStatus == '已认证'){
|
|
|
+ if (item.basis == "false") {
|
|
|
for (var i = 0; i < this.businessman.length; i++) {
|
|
|
- if (this.businessman.defaultFlag == 1) {
|
|
|
- this.defaults = "default2"
|
|
|
+ if (this.businessman[i] == item) {
|
|
|
+ item.basis = "true"
|
|
|
} else {
|
|
|
- this.defaults = "default1"
|
|
|
+ this.businessman[i].basis = "false"
|
|
|
}
|
|
|
}
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch(res => {
|
|
|
- uni.showToast({
|
|
|
- title: res.errmsg,
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
+
|
|
|
+ // this.defaults1 = "default2"
|
|
|
+ } else if (item.basis == "true") {
|
|
|
+ item.basis = "false"
|
|
|
+ // this.defaults2 = "default1"
|
|
|
+ }
|
|
|
+ this.identityAuthenticationInfo.commonId = this.userInfo.id
|
|
|
+ this.identityAuthenticationInfo.defaultFlag = 1
|
|
|
+ this.identityAuthenticationInfo.id = item.id
|
|
|
+ this.$api.doRequest('post', '/identityAuthenticationInfo/api/setDefault', this.identityAuthenticationInfo,
|
|
|
+ 'application/json;charset=UTF-8').then(res => {
|
|
|
+ for (var i = 0; i < this.businessman.length; i++) {
|
|
|
+ if (this.businessman.defaultFlag == 1) {
|
|
|
+ this.defaults = "default2"
|
|
|
+ } else {
|
|
|
+ this.defaults = "default1"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
})
|
|
|
- });
|
|
|
+ .catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$api.msg('已认证的身份才能设为默认!')
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
open(item) {
|