|
|
@@ -71,16 +71,42 @@
|
|
|
alert("请输入项目类型~");
|
|
|
return false;
|
|
|
}
|
|
|
- let data = {
|
|
|
- "CreateUserID":mydata_userInfo.UserID,
|
|
|
- "ProjectName":this.model.projectName,
|
|
|
- "Describe":this.model.describe,
|
|
|
- "Type":this.model.type
|
|
|
- }
|
|
|
- console.log("请求创建项目",data);
|
|
|
- MyRequest.CreateProjectNew(data,function(res){
|
|
|
- console.log("创建项目成功",res);
|
|
|
- },null);
|
|
|
+ // let data = {
|
|
|
+ // "CreateUserID":mydata_userInfo.UserID,
|
|
|
+ // "ProjectName":this.model.projectName,
|
|
|
+ // "Describe":this.model.describe,
|
|
|
+ // "Type":this.model.type
|
|
|
+ // }
|
|
|
+ // console.log("请求创建项目",data);
|
|
|
+ // MyRequest.CreateProjectNew(data,function(res){
|
|
|
+ // console.log("创建项目成功",res);
|
|
|
+ // },null);
|
|
|
+
|
|
|
+ console.log("创建项目自己ID",mydata_userInfo.UserID);
|
|
|
+ uni.chooseImage({
|
|
|
+ success: (chooseImageRes) => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: 'http://39.105.166.141:8085/project/createprojectnew', //仅为示例,非真实的接口地址
|
|
|
+ filePath: tempFilePaths[0],
|
|
|
+ name: 'file',
|
|
|
+ formData: {
|
|
|
+ "CreateUserID": mydata_userInfo.UserID,
|
|
|
+ // "CreateUserID":"1e9c969f-8990-40f2-8a8c-ecbafc5720b2",
|
|
|
+ "ProjectName": this.model.projectName,
|
|
|
+ "Describe": this.model.describe,
|
|
|
+ "Type": this.model.type
|
|
|
+ },
|
|
|
+ success: (uploadFileRes) => {
|
|
|
+ console.log('upload ok=', uploadFileRes.data);
|
|
|
+ alert("创建成功");
|
|
|
+ this.model.projectName='';
|
|
|
+ this.model.describe='';
|
|
|
+ this.model.type='科幻';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
clear() {
|
|
|
this.model = {
|