فهرست منبع

修改所有bug

eraser 4 سال پیش
والد
کامیت
95cd5e4443

+ 1 - 1
components/home/simulation.vue

@@ -33,7 +33,7 @@
 		},
 		methods: {
 			onClick_download_btn(){
-				let url = this.$Api + "/file/simulationexe";
+				let url = mydata_api + "/file/simulationexe";
 				uni.request({
 				    url: url, //仅为示例,并非真实接口地址。
 				    success: (res) => {

+ 9 - 9
components/home/simulationLibrary.vue

@@ -167,13 +167,13 @@
 		},
 		methods: {
 			init() {
-				console.log('simulationLibrary=',this.$UserId)
+				console.log('simulationLibrary=',mydata_userInfo.UserID)
 				uni.request({
-					url: this.$Api + "/item/getitemlist",
+					url: mydata_api + "/item/getitemlist",
 					data: {
 						"BeginNum" : 0,  //第一个
 						"EndNum" : 3,   //最后一个
-						"UserID": this.$UserId,
+						"UserID": mydata_userInfo.UserID,
 						"ItemType":""      //道具 角色 场景  空为全部
 					},
 					method: "POST",
@@ -195,11 +195,11 @@
 				})
 				//道具
 				uni.request({
-					url: this.$Api + "/item/getitemlist",
+					url: mydata_api + "/item/getitemlist",
 					data: {
 						"BeginNum" : 0,  //第一个
 						"EndNum" : 5,   //最后一个
-						"UserID": this.$UserId,
+						"UserID": mydata_userInfo.UserID,
 						"ItemType":"道具"      //道具 角色 场景  空为全部
 					},
 					method: "POST",
@@ -220,11 +220,11 @@
 				
 				//角色
 				uni.request({
-					url: this.$Api + "/item/getitemlist",
+					url: mydata_api + "/item/getitemlist",
 					data: {
 						"BeginNum" : 0,  //第一个
 						"EndNum" : 5,   //最后一个
-						"UserID": this.$UserId,
+						"UserID": mydata_userInfo.UserID,
 						"ItemType":"角色"      //道具 角色 场景  空为全部
 					},
 					method: "POST",
@@ -245,11 +245,11 @@
 				
 				//场景
 				uni.request({
-					url: this.$Api + "/item/getitemlist",
+					url: mydata_api + "/item/getitemlist",
 					data: {
 						"BeginNum" : 0,  //第一个
 						"EndNum" : 5,   //最后一个
-						"UserID": this.$UserId,
+						"UserID": mydata_userInfo.UserID,
 						"ItemType":"场景"      //道具 角色 场景  空为全部
 					},
 					method: "POST",

+ 5 - 8
components/home/teacher/create.vue

@@ -48,7 +48,8 @@
 				},
 				index_proType: 0,
 
-				proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
+				// proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
+				proType: ['科幻', '现实', 'XR', '主旋律', 'VR'],
 			}
 		},
 		components: {},
@@ -57,7 +58,7 @@
 		},
 		methods: {
 			save() {
-				this.model.createUserID = this.$UserId;
+				this.model.createUserID = mydata_userInfo.UserID;
 				console.log(this.model);
 				if (this.model.projectName == "") {
 					alert("请输入项目名称~");
@@ -78,21 +79,17 @@
 				// 	"Type":this.model.type
 				// }
 				// console.log("请求创建项目",data);
-				// MyRequest.CreateProjectNew(data,function(res){
-				// 	console.log("创建项目成功",res);
-				// },null);
 
-				console.log("创建项目自己ID",mydata_userInfo.UserID);
+				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', //仅为示例,非真实的接口地址
+							url: mydata_api + '/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

+ 56 - 49
components/home/teacher/project.vue

@@ -379,7 +379,8 @@
 				editDialogshow : false,
 
 				editDialogData : {name : "", type :"", Introduction : ""},
-				proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
+				// proType: ['科幻', '现实', '剧情', '历史', '爱情', '惊悚', '公路', '动画'],
+				proType: ['科幻', '现实', 'XR', '主旋律', 'VR'],
 				addproType: ['编剧', '摄影师' ,'录音师', '灯光师', '创建人','美术师'],
 				addFileType: ['剧本' ,'拍摄脚本' ,'分镜头脚本' ,'气氛图', '项目简介', '项目报告' ,'场景图'],
 				index_addproType : 0,
@@ -493,9 +494,9 @@
 					return false;
 				}
 
-				console.log("创建项目自己ID",mydata_userInfo.UserID);
+				console.log("创建项目的用户ID",mydata_userInfo.UserID);
 				uni.request({
-					url: this.$Api + "/project/changeprojectinfo",
+					url: mydata_api + "/project/changeprojectinfo",
 					data: {
 						"UserID":this.projectData[0].CreateUserID,
 						"ProjectID" : this.projectData[0].Id,
@@ -525,55 +526,55 @@
 			determine(obj) {
 				this.show = false;
 				this.auditshow = false;
-				console.log("点了 对话框", obj);
+				// console.log("点了 对话框", obj);
 				switch (this.currentSelect.section) {
 					case 0: //項目管理
 						switch (this.currentSelect.buttonType) {
 							case 'delete':
-								console.log("点了 删除", this.currentSelect);
+								// console.log("点了 删除", this.currentSelect);
 								if (obj == 0) {
-									console.log("点了 确定删除", this.currentSelect);
+									// console.log("点了 确定删除", this.currentSelect);
 									this.deleteItemProject()
 								}else if(obj == 1){
-									console.log("点了 取消删除", this.currentSelect);
+									// console.log("点了 取消删除", this.currentSelect);
 								}
 								break;
 							case 'edit':
-								console.log("点了 修改", this.currentSelect);
+								// console.log("点了 修改", this.currentSelect);
 								if (obj == 0) {
-									console.log("点了 确定修改", this.currentSelect,this.projectData[0]);
+									// console.log("点了 确定修改", this.currentSelect,this.projectData[0]);
 									this.editDialogData = {name : this.projectData[0].ProjectName, type :this.projectData[0].Type, Introduction : this.projectData[0].Describe}
 									this.editDialogshow = true
-									console.log("修改数据", this.editDialogData);
+									// console.log("修改数据", this.editDialogData);
 								}else if(obj == 1){
 									this.editDialogData = {name : "", type :"", Introduction : ""}
-									console.log("点了 取消修改", this.currentSelect);
+									// console.log("点了 取消修改", this.currentSelect);
 								}
 								break;
 							case 'downloadIMG':
-								console.log("点了 下载", this.currentSelect);
+								// console.log("点了 下载", this.currentSelect);
 								if (obj == 0) {
-									console.log("点了 确定下载", this.currentSelect,this.projectData[0]);
+									// console.log("点了 确定下载", this.currentSelect,this.projectData[0]);
                                     this.DownloadFile()
 								}else if(obj == 1){
 									// this.editDialogData = {name : "", type :"", Introduction : ""}
-									console.log("点了 取消下载", this.currentSelect);
+									// console.log("点了 取消下载", this.currentSelect);
 								}
 								break;
 							case 'deleteFile':
-								console.log("点了 删除", this.currentSelect);
+								// console.log("点了 删除", this.currentSelect);
 								if (obj == 0) {
-									console.log("点了 确定删除", this.currentSelect,this.projectData[0]);
+									// console.log("点了 确定删除", this.currentSelect,this.projectData[0]);
                                     this.delFile()
 								}else if(obj == 1){
 									// this.editDialogData = {name : "", type :"", Introduction : ""}
-									console.log("点了 取消删除", this.currentSelect);
+									// console.log("点了 取消删除", this.currentSelect);
 								}
 								break;
 							case 'audit':
-								console.log("点了 审核", this.currentSelect);
+								// console.log("点了 审核", this.currentSelect);
 								if (obj == 0) {
-									console.log("点了 确定审核", this.currentSelect,this.projectData[0]);
+									// console.log("点了 确定审核", this.currentSelect,this.projectData[0]);
 									let data = {
 										ProjectItemID: this.currentSelect.item,
 										Pass: true
@@ -582,7 +583,7 @@
 
 								}else if(obj == 1){
 									// this.editDialogData = {name : "", type :"", Introduction : ""}
-									console.log("点了 取消审核", this.currentSelect);
+									// console.log("点了 取消审核", this.currentSelect);
 									let data = {
 										ProjectItemID: this.currentSelect.item,
 										Pass: false
@@ -602,7 +603,7 @@
 			},
 			auditPost(obj) {
 				console.log("审核信息", obj.ProjectItemID.ProjectID);
-				let url = this.$Api + "/project/setfilepass"
+				let url = mydata_api + "/project/setfilepass"
 				let data = {
 					"ProjectItemID" : obj.ProjectItemID.Id,
 					"Pass":obj.Pass,
@@ -623,9 +624,9 @@
 			},
 			getlist() {
 				uni.request({
-					url: this.$Api + "/project/getprojectcontent",
+					url: mydata_api + "/project/getprojectcontent",
 					data: {
-						"UserID": this.$UserId,
+						"UserID": mydata_userInfo.UserID,
 						"ProjectID": this.projectData[0].Id
 					},
 					method: "POST",
@@ -636,27 +637,27 @@
 							this.projectData[0] = res.data.Project;
 							this.$forceUpdate()
 						}
-						console.log("获取了什么样子的信息", this.projectData[0]);
+						// console.log("获取了什么样子的信息", this.projectData[0]);
 					}
 				})
 			},
 			getFileList() {
 				uni.request({
-					url: this.$Api + "/project/getprojectcontent",
+					url: mydata_api + "/project/getprojectcontent",
 					data: {
-						"UserID": this.$UserId,
+						"UserID": mydata_userInfo.UserID,
 						"ProjectID": this.projectData[0].Id
 					},
 					method: "POST",
 					dataType: "json",
 					success: res => {
 						this.fileData = res.data.ProjectItem;
-						console.log('this.fileData=',this.fileData)
+						// console.log('刷新所有文件=',this.fileData)
 					}
 				})
 			},
 			viewProject(obj) {
-				console.log('进来的什么信息',obj)
+				// console.log('进来的什么信息',obj)
 				this.projectData = [obj];
 				this.getFileList();
 				this.getMemberList();
@@ -666,12 +667,12 @@
 					"ProjectID": this.projectData[0].Id
 				}
 				uni.request({
-					url: this.$Api + "/project/getmember",
+					url: mydata_api + "/project/getmember",
 					data: temp,
 					method: "POST",
 					dataType: "json",
 					success: res => {
-						console.log("请求学生", res);
+						// console.log("请求学生", res);
 						if (res.data.Code == 100) {
 							this.projectMembers = res.data.Users;
 							// console.log();
@@ -686,9 +687,10 @@
 			addFileData(){
                 uni.chooseImage({
                 	success: (chooseImageRes) => {
+						console.log('选择文件成功')
                 		const tempFilePaths = chooseImageRes.tempFilePaths;
                 		uni.uploadFile({
-                			url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
+                			url: mydata_api+'/project/uploadprojectfile', 
                 			filePath: tempFilePaths[0],
                 			name: 'file',
                 			formData: {
@@ -723,7 +725,7 @@
 					"Type": "美术师" //编剧 摄影师 录音师 灯光师 创建人
 				}
 				uni.request({
-					url: this.$Api + "/project/getmember",
+					url: mydata_api + "/project/getmember",
 					data: temp,
 					method: "POST",
 					dataType: "json",
@@ -737,7 +739,7 @@
 				})
 			},
 			onClick_addFile(){
-				console.log("项目 点了添加文件")
+				// console.log("项目 点了添加文件")
 				// this.isShowAddFile = true
 		
 				uni.chooseFile({
@@ -749,16 +751,16 @@
 			},
 			//删除项目
 			deleteItemProject(){
-				// console.log('this.$Api=',this.$Api)
-				// console.log('UserID=',this.$UserId)
+				// console.log('mydata_api=',mydata_api)
+				// console.log('UserID=',mydata_userInfo.UserID)
 				// console.log('ProjectID=',this.projectData[0].Id)
 				var temp = {
 					"UserID":this.projectData[0].CreateUserID,
-					"ProjectID" : this.projectData[0].Id,
+					"ProjectID" : (this.projectData[0].Id).toString(),
 				}
-				console.log("删除过去的项目为",temp)
+				console.log("删除项目为",temp)
 				uni.request({
-					url: this.$Api + "/backstage/deleteproject",
+					url: mydata_api + "/backstage/deleteproject",
 					data: temp,
 					method: "POST",
 					dataType: "json",
@@ -787,7 +789,7 @@
             },
 			deleteMember(item){
 				console.log('删掉成员 ',item)
-				let url = this.$Api + "/project/deletemember"
+				let url = mydata_api + "/project/deletemember"
 				let data = {
 					"userID" : this.projectData[0].CreateUserID,
 					"DeleteUserID":item.User.Id,
@@ -815,7 +817,7 @@
 				// this.currentSelect
 				console.log('删除文件', this.currentSelect)
 				// SetFilePass
-				let url = this.$Api + "/project/deleteprojectcontent"
+				let url = mydata_api + "/project/deleteprojectcontent"
 				// "UserID":"xxxx",           //上传人或者项目创建人
 				// 		"ProjectItemID" : "123"
 				let data = {
@@ -851,7 +853,7 @@
 				this.projectData[0].Describe = this.projectDescribe;
 				 
 				uni.request({
-				 	url: this.$Api + "/project/changeprojectinfo",
+				 	url: mydata_api + "/project/changeprojectinfo",
 				 	data: {
 				 		"UserID":this.projectData[0].CreateUserID,
 				 		"ProjectID" : this.projectData[0].Id,
@@ -893,18 +895,23 @@
 			},
 			confirm_file_upload(){
 				
+				uni.showLoading({  
+				    title: '上传中'  
+				});
+				let fileType = this.addFileType[this.fileType];
 				uni.uploadFile({
-					url: this.$Api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
+					url: mydata_api+'/project/uploadprojectfile', //仅为示例,非真实的接口地址
 					filePath: this.filePath[0],
 					name: 'file',
 					formData: {
 						"UserID": this.projectData[0].CreateUserID,
 						"Name": this.fileName,
-						"Type": this.fileType,
+						"Type": fileType,
 						"ProjectID": this.projectData[0].Id,
 					},
 					success: (uploadFileRes) => {
-						console.log('upload ok=', uploadFileRes.data);
+						// console.log('upload ok=', uploadFileRes.data);
+						uni.hideLoading();
 						this.bShowUpLoadFile = false;
 				        this.getFileList();
 						// setTimeout(function(){
@@ -916,7 +923,7 @@
 			cancel_file_upload(){
 				this.bShowUpLoadFile = false;
 				this.fileName = '';
-				this.fileType = 0;
+				this.fileType = '';
 				this.filePath = null;
 			},
 			// 添加学生
@@ -934,7 +941,7 @@
 					return
 				}
 				
-				let url = this.$Api + "/project/addmember"
+				let url = mydata_api + "/project/addmember"
 				let data = {
 					"UserID" : this.projectData[0].CreateUserID,
 					"ProjectID":this.projectData[0].Id,
@@ -963,9 +970,9 @@
 						}
 						
 						this.bShowAddStu = false;
-						// setTimeout(function(){
-						// 	alert("添加有误,请检查该学生是否存在");
-						// },500)
+						setTimeout(function(){
+							alert("添加有误,请检查该学生是否存在");
+						},500)
 					}
 				})	
 			},

+ 1 - 2
components/home/teacher/table.vue

@@ -57,9 +57,8 @@
 			},
 			getList() {
 				uni.request({
-					url: this.$Api + "/project/getprojects",
+					url: mydata_api + "/project/getprojects",
 					data: {
-						// "UserID": this.$UserId
 						"UserID": mydata_userInfo.UserID
 					},
 					method: "POST",

+ 2 - 2
components/login/loginByPWD.vue

@@ -68,7 +68,7 @@
 				this.isShowTip = 0;
 			},
 			onLogin() {
-				let url = this.$Api + "/user/loginin";
+				let url = mydata_api + "/user/loginin";
 				uni.request({
 					header: {
 						'Content-Type': 'application/json;charset=UTF-8'
@@ -99,7 +99,7 @@
 							mydata_userInfo.role = data.Type;
 							
 							//设置用户类型(老师或者学生)
-							// let url = this.$Api + "/user/setusertype";
+							// let url = mydata_api + "/user/setusertype";
 							// uni.request({
 							// 	header: {
 							// 		'Content-Type': 'application/json;charset=UTF-8'

+ 1 - 1
components/login/resetPWD.vue

@@ -64,7 +64,7 @@
 				// this.$emit("onLogin", "onLogin")
 				this.findUser();
 				
-				// let url = "http://39.105.166.141:8085/user/addusers";
+				let url =  mydata_api + "/user/addusers";
 				// uni.request({
 				// 	header: {
 				// 		'Content-Type': 'application/json;charset=UTF-8'

+ 1 - 1
components/startLearning/learningAndExperiment/learningAndExperiment.vue

@@ -84,7 +84,7 @@
 				this.$emit("onClick_KSKC");
 			},
 			onClick_download_btn() {
-				let url = this.$Api + "/file/simulationexe";
+				let url = mydata_api + "/file/simulationexe";
 				uni.request({
 					url: url, //仅为示例,并非真实接口地址。
 					success: (res) => {

+ 18 - 8
components/student/StudentInfo.vue

@@ -148,8 +148,8 @@
 		},
 		methods: {
 			save() {
-				this.model.UserID = this.$UserId;
-				this.model.SetUserID = this.$UserId;
+				this.model.UserID = mydata_userInfo.UserID;
+				this.model.SetUserID = mydata_userInfo.UserID;
 				var tempData = this.model;
 				if (this.model.PhoneNum != "") {
 					tempData.PhoneNum = Number(this.model.PhoneNum);
@@ -167,7 +167,7 @@
 					tempData.CertificateNum = 0;
 				}
 				uni.request({
-					url: this.$Api + "/user/setuserinfo",
+					url: mydata_api + "/user/setuserinfo",
 					data: tempData,
 					method: "POST",
 					dataType: "json",
@@ -187,13 +187,20 @@
 		onUploadAvatar(){
 			uni.chooseFile({
 			    success: (chooseFileRes) => {
+					
+					console.log('选择图片ok=',uploadFileRes.data);
+					uni.showLoading({  
+					    title: '上传中'  
+					});
+					
 			        const tempFilePaths = chooseFileRes.tempFilePaths;
+					
 			        uni.uploadFile({
-			            url: this.$Api + "/user/uploaduserheadimage", //仅为示例,非真实的接口地址
+			            url: mydata_api + "/user/uploaduserheadimage", //仅为示例,非真实的接口地址
 			            filePath: tempFilePaths[0],
 			            name: 'file',
 			            formData: {
-							'UserID':this.$UserId,                // 创建用户 id
+							'UserID':mydata_userInfo.UserID,                // 创建用户 id
 			            },
 			            success: (uploadFileRes) => {
 			                console.log('upload ok=',uploadFileRes.data);
@@ -202,17 +209,20 @@
 								header: {
 									'Content-Type': 'application/json;charset=UTF-8'
 								},
-							    url: this.$Api + "/user/getuserinfo", //仅为示例,非真实的接口地址
+							    url: mydata_api + "/user/getuserinfo", //仅为示例,非真实的接口地址
 								method: 'POST',
 								data: {
-									'UserID':this.$UserId, 
+									'UserID':mydata_userInfo.UserID, 
 								},
 								dataType: 'json',
 								success: (res) => {
+									console.log('上传头像成功url=',res)
 									this.userInfo.avatarSrc = res.data.User.HeadImageURL;
+									uni.hideLoading();
 								},
 								fail: (res) => {
-									console.log("fail+**+*", res)
+									uni.hideLoading();
+									alert("上传头像失败")
 								}
 							});
 			            }

+ 2 - 2
components/student/record.vue

@@ -148,9 +148,9 @@
 				this.getlist();
 			},
 			getlist() {
-				this.queryList.UserID = this.$UserId;
+				this.queryList.UserID = mydata_userInfo.UserID;
 				uni.request({
-					url: this.$Api + "/backstage/getalluser",
+					url: mydata_api + "/backstage/getalluser",
 					data: this.queryList,
 					method: "POST",
 					dataType: "json",

+ 2 - 2
components/student/table.vue

@@ -57,9 +57,9 @@
 			},
 			getList() {
 				uni.request({
-					url: this.$Api + "/project/getprojects",
+					url: mydata_api + "/project/getprojects",
 					data: {
-						"UserID": this.$UserId
+						"UserID": mydata_userInfo.UserID
 					},
 					method: "POST",
 					dataType: "json",

+ 2 - 2
components/user/personalLearning.vue

@@ -198,6 +198,7 @@
 				this.showIndex_userInfo = 1;
 			},
 			updateInfo(data) {
+				// console.log('个人学习记录data=',data)
 				this.model.Name = data.Name;
 				this.model.Class = data.Class;
 				this.model.StudentID = data.StudentID;
@@ -267,7 +268,7 @@
 					aData.push(parseInt(data[15].Score));
 				}
 				// aData.push(parseInt(data[16]));
-				console.log('aData=', aData)
+				// console.log('aData=', aData)
 			
 				this.getServerData(aData);
 			},
@@ -504,7 +505,6 @@
 				color: #fff;
 			}
 		}
-
 	}
 
 	tbody tr {

+ 10 - 9
components/user/selfInfo.vue

@@ -235,12 +235,14 @@
 				this.model.Nation = this.array_mz[this.mzIndex]
 			},
 			onClick_commit() {
-				let url = this.$Api + "/user/setuserinfo";
+				let url = mydata_api + "/user/setuserinfo";
 				console.log("请求提交", mydata_userInfo, this.model);
 				//强制转换到数字类型,要不然提交不成功
 				this.model.StudentID = Number(this.model.StudentID);
 				this.model.PhoneNum = Number(this.model.PhoneNum);
-				this.model.CertificateNum = Number(this.model.CertificateNum);
+		
+				// this.model.CertificateNum = Number(this.model.CertificateNum);
+			
 
 				// let model3 = {
 				// 	"UserID": '69145935-e1ec-4a04-8133-43f351bde42c', //设置用户
@@ -273,14 +275,13 @@
 						let data = res.data;
 						//100成功
 						if (data.Code == 100) {
-							console.log("请求成功100");
+							// console.log("请求成功100");
 							alert('提交成功!')
 						}
 						//200失败
 						else {
-
+							console.log("fail+200+*", res)
 						}
-						console.log("success+++**+*", res)
 					},
 					fail: (res) => {
 						console.log("fail+**+*", res)
@@ -317,11 +318,11 @@
 			    success: (chooseFileRes) => {
 			        const tempFilePaths = chooseFileRes.tempFilePaths;
 			        uni.uploadFile({
-			            url: this.$Api + "/user/uploaduserheadimage", //仅为示例,非真实的接口地址
+			            url: mydata_api + "/user/uploaduserheadimage", //仅为示例,非真实的接口地址
 			            filePath: tempFilePaths[0],
 			            name: 'file',
 			            formData: {
-							'UserID':this.$UserId,                // 创建用户 id
+							'UserID':mydata_userInfo.UserID,                // 创建用户 id
 			            },
 			            success: (uploadFileRes) => {
 			                console.log('upload ok=',uploadFileRes.data);
@@ -330,10 +331,10 @@
 								header: {
 									'Content-Type': 'application/json;charset=UTF-8'
 								},
-							    url: this.$Api + "/user/getuserinfo", //仅为示例,非真实的接口地址
+							    url: mydata_api + "/user/getuserinfo", //仅为示例,非真实的接口地址
 								method: 'POST',
 								data: {
-									'UserID':this.$UserId,
+									'UserID':mydata_userInfo.UserID,
 								},
 								dataType: 'json',
 								success: (res) => {

+ 3 - 13
components/user/stuManage.vue

@@ -133,17 +133,7 @@
 			onClick_addStu_add() {
 				// console.log(this.addStudentData);
 				let self = this;
-				// let data=[
-				// 	{
-				// 		"IlabAccount":'test'
-				// 	},
-				// 	{
-				// 		"IlabAccount":'mj_2728179'
-				// 	}
-				// ]
-				// let addData=this.addStudentData.IlabAccount;
-
-
+				
 				MyRequest.AddUsers([this.addStudentData], function(res) {
 					console.log("请求添加成功,返回值", res);
 					
@@ -161,9 +151,9 @@
 				}, null);
 			},
 			onClick_XSSYQK(studentI){
-				console.log("实验情况studentI=",studentI);
+				// console.log("实验情况studentI=",studentI);
 				let UserID = this.allStudent[studentI].UserID;
-				console.log("UserID=",this.allStudent[studentI].UserID);
+				// console.log("UserID=",this.allStudent[studentI].UserID);
 				this.$emit('onClick_XSSYQK',UserID);	
 			}
 		}

+ 10 - 3
components/user/stuTestDetails.vue

@@ -219,11 +219,17 @@
 				this.mzIndex = e.target.value
 			},
 			updateInfo(data) {
-				// console.log('data=',data)
+				// console.log('学生管理data=',data)
 				this.model.Name = data.Name;
 				this.model.Class = data.Class;
 				this.model.StudentID = data.StudentID;
-
+				
+				// console.log('data.UserScore',data.UserScore)
+				// console.log('typeof(data.UserScore)=',typeof(data.UserScore))
+				if(typeof(data.UserScore) == 'string')
+				{
+					data.UserScore = JSON.parse(data.UserScore);
+				}
 				userController.data_scores = data.UserScore;
 				this.model.Score_ylrz = userController.getScore_ylrz();
 				this.model.Score_sjkc = userController.getScore_sjck();
@@ -232,6 +238,7 @@
 				this.model.Score_jspf = userController.getScore_jspf();
 			},
 			updateLearnProgress(data) {
+
 				if (data[0].Score != -1) {
 					this.YLRZ_P = parseInt(data[0].Score / 10 * 100);
 				}
@@ -291,7 +298,7 @@
 					aData.push(parseInt(data[15].Score));
 				}
 				// aData.push(parseInt(data[16]));
-				console.log('aData=', aData)
+				// console.log('aData=', aData)
 
 				this.getServerData(aData);
 			},

+ 38 - 46
components/user/user.vue

@@ -134,6 +134,12 @@
 			onClick_Btn1(index) {
 				// console.log('index===',index)
 				// console.log('this.userMenu_student===',this.userMenu_student)
+				if((index + 1)==1 && mydata_userInfo.UserID=='4c80ab9c-7e0a-4f41-b8d0-c62f30e0f85c')
+				{
+					alert('专家号不能查看个人信息!')
+					return;
+				}
+				
 				if (index == this.userMenu_student.length - 1) {
 					this.$emit("onClick_proManage");
 				}
@@ -143,7 +149,7 @@
 					this.checkedIndex_leftMenu = index;
 					this.showIndex = index + 1;
 					// console.log('checkedIndex_leftMenu=',index)
-					// console.log('showIndex=',index+1)
+					console.log('showIndex=',index+1)
 				}
 				
 				if (this.userInfo.role == '老师') 
@@ -179,7 +185,7 @@
 				this.getUserInfo();
 			},
 			getUserInfo() {
-				let url = this.$Api + "/user/getuserinfo";
+				let url = mydata_api + "/user/getuserinfo";
 				let _self = this;
 				uni.request({
 					header: {
@@ -195,7 +201,7 @@
 						let data = res.data;
 						//100成功
 						if (data.Code == 100) {
-							console.log("请求成功", res);
+							// console.log("请求成功", res);
 							this.$refs.GRXX.updateInfo(data.User);
 							mydata_userInfo.email = data.User.Email;
 							// console.log('00000000000=',mydata_userInfo.role)
@@ -208,7 +214,7 @@
 							{
 								this.$refs.GRXXJL.updateInfo(data.User);
 								//请求分数
-								url = this.$Api + "/score/getscore";
+								url = mydata_api + "/score/getscore";
 								uni.request({
 									header: {
 										'Content-Type': 'application/json;charset=UTF-8'
@@ -261,45 +267,16 @@
 					this.scrollTop = 0
 				});
 			},
-			//范例,直接复制
-			testPost() {
-				let url = this.$Api + "/user/getuserinfo";
-				uni.request({
-					header: {
-						'Content-Type': 'application/json;charset=UTF-8'
-					},
-					url: url,
-					method: 'POST',
-					data: {
-						"UserID": mydata_userInfo.UserID,
-					},
-					dataType: 'json',
-					success: (res) => {
-						let data = res.data;
-						//100成功
-						if (data.Code == 100) {
-
-						}
-						//200失败
-						else {
-
-						}
-						console.log("success+++**+*", res.data.Code)
-					},
-					fail: (res) => {
-						console.log("fail+**+*", res)
-					}
-				});
-			},
 			onClick_XSSYQK(UserID){
 				// console.log("11111=",this.userInfo.role);
 				// console.log("2222=",this.isShow_xssyqk);
 				// console.log("UserID=",UserID);
+				
 				this.isShow_xssyqk = true;
 				this.checkedIndex_leftMenu = 1;
 				this.showIndex = 2;
 				
-				let url = this.$Api + "/user/getuserinfo";
+				let url = mydata_api + "/user/getuserinfo";
 				uni.request({
 					header: {
 						'Content-Type': 'application/json;charset=UTF-8'
@@ -314,7 +291,7 @@
 						let data = res.data;
 						//100成功
 						if (data.Code == 100) {
-							console.log("请求成功", res);
+							// console.log("请求成功", res);
 							 this.$refs.XSSYQK.updateInfo(data.User);
 						}
 						//200失败
@@ -328,7 +305,7 @@
 					}
 				});
 				
-				url = this.$Api + "/score/getscore";
+				url = mydata_api + "/score/getscore";
 				uni.request({
 					header: {
 						'Content-Type': 'application/json;charset=UTF-8'
@@ -343,14 +320,13 @@
 						let data = res.data;
 						//100成功
 						if (data.Code == 100) {
-							console.log("请求分数成功", res);
+							// console.log("请求分数成功", res);
 							 this.$refs.XSSYQK.updateLearnProgress(data.Scores);
 						}
 						//200失败
 						else {
-				
+							console.log("fail+200+*", res)
 						}
-						// console.log("success+++**+*", res.data.Code)
 					},
 					fail: (res) => {
 						console.log("fail+**+*", res)
@@ -361,36 +337,52 @@
 			onUploadAvatar(){
 				uni.chooseFile({
 				    success: (chooseFileRes) => {
+						
+						uni.showLoading({  
+						    title: '正在上传'  
+						}); 
+						
 				        const tempFilePaths = chooseFileRes.tempFilePaths;
+						 
 				        uni.uploadFile({
-				            url: this.$Api + "/user/uploaduserheadimage", //仅为示例,非真实的接口地址
+				            url: mydata_api + "/user/uploaduserheadimage", //仅为示例,非真实的接口地址
 				            filePath: tempFilePaths[0],
 				            name: 'file',
 				            formData: {
-								'UserID':this.$UserId,                // 创建用户 id
+								'UserID':mydata_userInfo.UserID,                // 创建用户 id
 				            },
 				            success: (uploadFileRes) => {
-				                console.log('upload ok=',uploadFileRes.data);
+				                console.log('选择图片ok=',uploadFileRes.data);
+								uni.showLoading({  
+								    title: '上传中'  
+								});
 								//刷新avatar
 								uni.request({
 									header: {
 										'Content-Type': 'application/json;charset=UTF-8'
 									},
-								    url: this.$Api + "/user/getuserinfo", //仅为示例,非真实的接口地址
+								    url: mydata_api + "/user/getuserinfo", //仅为示例,非真实的接口地址
 									method: 'POST',
 									data: {
-										'UserID':this.$UserId, 
+										'UserID':mydata_userInfo.UserID, 
 									},
 									dataType: 'json',
 									success: (res) => {
+										console.log('上传头像成功url=',res)
 										this.userInfo.avatarSrc = res.data.User.HeadImageURL;
+										uni.hideLoading();
+										
 									},
 									fail: (res) => {
-										console.log("fail+**+*", res)
+										// console.log("uploadFileRes+fail+", res)
+										uni.hideLoading();
+										alert("上传头像失败")
 									}
 								});
 				            }
 				        });
+						
+						
 				    }
 				});
 			}

+ 4 - 0
components/user/userController.js

@@ -45,8 +45,12 @@ userController = {
 	},
 	//虚拟艺术创作5-14
 	getScore_xnyscz: function() {
+		// console.log('艺术创作=',userController.data_scores)
+		// console.log('艺术创作类型=', typeof(userController.data_scores))
 		let score = -1;
 		for (let i = 5; i <= 14; i++) {
+			// console.log('艺术创作'+i+'=',userController.data_scores[i])
+			// console.log('艺术创作222'+i+'=',userController.data_scores[i].Score)
 			if (userController.data_scores[i].Score > 0) {
 				score += userController.data_scores[i].Score;
 			}

+ 2 - 2
main.js

@@ -10,9 +10,9 @@ Vue.config.productionTip = false
 
 App.mpType = 'app'
 
-Vue.prototype.$Api="http://8.140.128.1:8085"
+// Vue.prototype.$Api="http://8.140.128.1:8085"
 // Vue.prototype.$Api="http://39.105.166.141:8085"
-Vue.prototype.$UserId="1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
+// Vue.prototype.$UserId="1e9c969f-8990-40f2-8a8c-ecbafc5720b2"
 
 const app = new Vue({
     ...App,

+ 3 - 0
manifest.json

@@ -5,6 +5,9 @@
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "transformPx" : false,
+	"networkTimeout":{	//这一句
+		"request":20000	//2万就是20秒
+	},
     /* 5+App特有相关 */
     "app-plus" : {
         "usingComponents" : true,

+ 1 - 1
pages/home.vue

@@ -145,7 +145,7 @@
 			let password = localStorage.getItem("password");
 
 			if (account != null && password != null) {
-				let url = this.$Api + "/user/loginin";
+				let url = mydata_api + "/user/loginin";
 				uni.request({
 					header: {
 						'Content-Type': 'application/json;charset=UTF-8'

+ 1 - 1
pages/index/index.vue

@@ -31,7 +31,7 @@
 			return {
 				title: 'Hello',
 				funName: '',
-				myHost: 'http://39.105.166.141:8085',
+				myHost:  mydata_api,
 				webviewStyles: {
 					progress: {
 						color: '#FF3333'