Explorar el Código

修改 textarea 字数限制

yichael hace 4 años
padre
commit
b419455df8
Se han modificado 3 ficheros con 17 adiciones y 15 borrados
  1. BIN
      assets/topMenu/TopLogo.png
  2. 15 13
      components/home/teacher/create.vue
  3. 2 2
      myData.js

BIN
assets/topMenu/TopLogo.png


+ 15 - 13
components/home/teacher/create.vue

@@ -6,8 +6,11 @@
 				<view class="uni-form-item  df fdr aic">
 				<view class="uni-form-item  df fdr aic">
 					<view class="title">项目名称</view>
 					<view class="title">项目名称</view>
 					<input class="form-input"  style="width: 70%;margin-left: -6%;" v-model="model.projectName" name="input" placeholder="请输入项目名称" />
 					<input class="form-input"  style="width: 70%;margin-left: -6%;" v-model="model.projectName" name="input" placeholder="请输入项目名称" />
-					<checkbox class="check-is-public " @click="onClickCheck" :checked="bPublic"/>
-					<text> 是否为公共项目</text>
+					<checkbox-group>
+					    <label>
+					        <checkbox value="check-is-public" @click="onClickCheck" :checked="bPublic" />是否为公共项目
+					    </label>
+					</checkbox-group>
 				</view>
 				</view>
 				
 				
 
 
@@ -24,8 +27,7 @@
 				</view>
 				</view>
 				<view class="uni-form-item ">
 				<view class="uni-form-item ">
 					<view class="title">项目介绍</view>
 					<view class="title">项目介绍</view>
-					<textarea name="" class="form-input" v-model="model.describe" style="height: 100rpx;" id="" cols="10" rows="5"
-					 placeholder="请输入项目介绍"></textarea>
+					<textarea name="" class="form-input"  style="height: 100rpx;" maxlength="1400" v-model="model.describe" rows="2" placeholder="请输入项目介绍"></textarea>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -51,7 +53,7 @@
 
 
 				// proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
 				// proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
 				proType: ['科幻', '现实', 'XR', '主旋律', 'VR'],
 				proType: ['科幻', '现实', 'XR', '主旋律', 'VR'],
-				bPublic:0,
+				bPublic:false,
 			}
 			}
 		},
 		},
 		components: {},
 		components: {},
@@ -95,7 +97,7 @@
 								"ProjectName": this.model.projectName,
 								"ProjectName": this.model.projectName,
 								"Describe": this.model.describe,
 								"Describe": this.model.describe,
 								"Type": this.model.type,
 								"Type": this.model.type,
-								"IsPublic":this.bPublic
+								"IsPublic":parseInt(this.bPublic)
 							},
 							},
 							success: (uploadFileRes) => {
 							success: (uploadFileRes) => {
 								console.log('upload ok=', uploadFileRes.data);
 								console.log('upload ok=', uploadFileRes.data);
@@ -123,13 +125,13 @@
 				this.model.type = this.proType[this.index_proType];
 				this.model.type = this.proType[this.index_proType];
 				console.log(this.model)
 				console.log(this.model)
 			},
 			},
-			onClickCheck(e){
-				if(this.bPublic==1){
-					this.bPublic = 0;
-				} else {
-					this.bPublic = 1;
-				}	
-			}
+			// onClickCheck(e){
+			// 	if(this.bPublic==true){
+			// 		this.bPublic = false;
+			// 	} else {
+			// 		this.bPublic = true;
+			// 	}	
+			// }
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 2 - 2
myData.js

@@ -30,5 +30,5 @@ mydata_userInfo = {
 }
 }
 // mydata_api='http://39.105.166.141:8085'
 // mydata_api='http://39.105.166.141:8085'
 // mydata_api='http://8.140.128.1:8085'
 // mydata_api='http://8.140.128.1:8085'
-mydata_api='http://ilabtft.cuc.edu.cn/web'
-// mydata_api='http://www.tanhuagame.com:8085/web'
+// mydata_api='http://ilabtft.cuc.edu.cn/web'
+mydata_api='http://www.tanhuagame.com:8085/web'