claear double check

This commit is contained in:
liuyalei 2022-08-18 13:09:38 +08:00
parent de1cc8b78a
commit 6a00f32229
2 changed files with 40 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{
"name" : "艺象心",
"appid" : "__UNI__77CA6BC",
"appid" : "__UNI__ED9DD86",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@ -1,8 +1,8 @@
<template>
<view>
<view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'">
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model="Edvalue" border="none"
@input="CheckValue" @clear="clearFun">
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model.trim="Edvalue" border="none"
@change="CheckValue" @clear="clearFun">
</u--input>
</view>
<!-- 是否已加入协会 -->
@ -222,13 +222,13 @@
uni.setNavigationBarTitle({
title: JSON.parse(opt.key)
})
if(this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项'){
if (opt.value == '[""]' || opt.value == "null"){
this.Edvalue=[""]
console.log("onload 艺术成就",this.Edvalue );
if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') {
if (opt.value == '[""]' || opt.value == "null") {
this.Edvalue = [""]
console.log("onload 艺术成就", this.Edvalue);
}
}
//
if (this.Edkey == '出生日期' || this.Edkey == '入会时间') {
@ -259,9 +259,9 @@
}
if (this.Edkey == '头像') {
// console.log("ll", JSON.parse(this.Edvalue)[0]);
this.fileList4.push({
url: this.baseurl + JSON.parse(this.Edvalue)[0]
url: this.baseurl + this.Edvalue
})
}
@ -427,9 +427,14 @@
var baseStr = http.config.baseUrl.replace('/h5/api', '')
if (this.Edkey == '头像') {
if (this.fileList4[0]) {
var str = JSON.stringify(this.fileList4.map((v, i) => {
/* var str = JSON.stringify(
this.fileList4.map((v, i) => {
return v.url.replace(baseStr, '')
}))
})[0]
) */
var str = this.fileList4.map((v, i) => {
return v.url.replace(baseStr, '')
})[0]
// console.log('str===', str);
this.PostChangerRequest({
'images': str
@ -476,9 +481,9 @@
}
} else if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') {
// console.log("submit", this.Edvalue);
var str = JSON.stringify(this.Edvalue)
if (this.Edvalue[0]) {
if (this.Edkey == '艺术成就') {
@ -588,8 +593,22 @@
// input value
// console.log("event", event.target.value);
// console.log("gg", event.target.value.indexOf(" ") >= 0);
this.Edvalue = this.Edvalue.trim()
if (!this.Edvalue) {
// this.Edvalue = this.Edvalue.trim()
console.log("this.de",this.Edvalue );
console.log("this.deBlone",!!this.Edvalue );
/* if(this.Edvalue){
console.log("有值");
this.isSubmit = true
}else{
console.log("无");
uni.showToast({
title: "值不能为空或者空格",
icon: 'error'
})
this.isSubmit = false
} */
/* if (!this.Edvalue) {
uni.showToast({
title: "值不能为空或者空格",
icon: 'error'
@ -702,7 +721,10 @@
if (this.Edkey == '是否已入协会') {
this.isSubmit = true
} else {
if (!n && n == "") {
if (n) {
console.log("n",n);
this.isSubmit = true
}else{
uni.$u.toast('值不能为空')
this.isSubmit = false
}