|
|
@@ -18,6 +18,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-show="showCheck" style="color: red;font-size: 12px;text-align:center;">平台账号名称不能包含中文及空格</div>
|
|
|
+ <div v-show="accountIsNumber" style="color: red;font-size: 12px;text-align:center;">平台账号不能为纯数字</div>
|
|
|
<div class="bodyRow">
|
|
|
<div class="contentCol1">
|
|
|
<span>是否认证</span>
|
|
|
@@ -61,7 +62,8 @@ export default {
|
|
|
accountValue: this.editData["accountCode"],
|
|
|
fansNum: this.editData["fansCount"],
|
|
|
flag: this.editData.authorizationName,
|
|
|
- showCheck:false
|
|
|
+ showCheck:false,
|
|
|
+ accountIsNumber:false
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -70,11 +72,14 @@ export default {
|
|
|
},
|
|
|
checkVal(){
|
|
|
//let reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
|
|
|
-
|
|
|
let reg = new RegExp("[\\u4E00-\\u9FFF\\u0020]+", "g");
|
|
|
if(this.editData.platformName === '微信订阅号' || this.editData.platformName === '微信服务号'){
|
|
|
this.showCheck = reg.test(this.accountValue);
|
|
|
}
|
|
|
+ if(this.editData.platformName === '今日头条'){
|
|
|
+ console.log(2323)
|
|
|
+ this.accountIsNumber = /^\d+$/.test(this.accountValue);
|
|
|
+ }
|
|
|
},
|
|
|
confirm() {
|
|
|
/* this.formData.append("dataset_title", this.dataset_title);
|
|
|
@@ -112,6 +117,10 @@ export default {
|
|
|
alert('平台账号名称不能包含中文及空格');
|
|
|
return
|
|
|
}
|
|
|
+ if (this.accountIsNumber) {
|
|
|
+ alert('平台账号不能为纯数字');
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.fansNum < 0) {
|
|
|
alert('粉丝数量填写错误');
|
|
|
return
|