|
|
@@ -8,7 +8,7 @@
|
|
|
<input class="form-input" style="width: 70%;margin-left: -6%;" v-model="model.projectName" name="input" placeholder="请输入项目名称" />
|
|
|
<checkbox-group>
|
|
|
<label>
|
|
|
- <checkbox value="check-is-public" @click="onClickCheck" :checked="bPublic" />是否为公共项目
|
|
|
+ <checkbox @click="onClickCheck" :checked="bPublic" />是否为公共项目
|
|
|
</label>
|
|
|
</checkbox-group>
|
|
|
</view>
|
|
|
@@ -76,18 +76,14 @@
|
|
|
alert("请输入项目类型~");
|
|
|
return false;
|
|
|
}
|
|
|
- // let data = {
|
|
|
- // "CreateUserID":mydata_userInfo.UserID,
|
|
|
- // "ProjectName":this.model.projectName,
|
|
|
- // "Describe":this.model.describe,
|
|
|
- // "Type":this.model.type
|
|
|
- // }
|
|
|
- // console.log("请求创建项目",data);
|
|
|
-
|
|
|
- console.log("创建项目用户ID",mydata_userInfo.UserID);
|
|
|
+
|
|
|
uni.chooseImage({
|
|
|
success: (chooseImageRes) => {
|
|
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+
|
|
|
+
|
|
|
+ let isPublic = Number(this.bPublic);
|
|
|
+ console.log('1111=',isPublic)
|
|
|
uni.uploadFile({
|
|
|
url: mydata_api + '/project/createprojectnew', //仅为示例,非真实的接口地址
|
|
|
filePath: tempFilePaths[0],
|
|
|
@@ -97,7 +93,7 @@
|
|
|
"ProjectName": this.model.projectName,
|
|
|
"Describe": this.model.describe,
|
|
|
"Type": this.model.type,
|
|
|
- "IsPublic":parseInt(this.bPublic)
|
|
|
+ "IsPublic":isPublic
|
|
|
},
|
|
|
success: (uploadFileRes) => {
|
|
|
console.log('upload ok=', uploadFileRes.data);
|
|
|
@@ -125,13 +121,13 @@
|
|
|
this.model.type = this.proType[this.index_proType];
|
|
|
console.log(this.model)
|
|
|
},
|
|
|
- // onClickCheck(e){
|
|
|
- // if(this.bPublic==true){
|
|
|
- // this.bPublic = false;
|
|
|
- // } else {
|
|
|
- // this.bPublic = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
+ onClickCheck(e){
|
|
|
+ if(this.bPublic==true){
|
|
|
+ this.bPublic = false;
|
|
|
+ } else {
|
|
|
+ this.bPublic = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|