Bläddra i källkod

library 项目分页

yichael 4 år sedan
förälder
incheckning
f4b1df941f

BIN
assets/library/Block2.png


BIN
assets/library/NoSelectedStar.png


BIN
assets/library/Star_Selected.png


BIN
assets/library/subscibe.png


+ 95 - 54
components/home/simulationLibrary.vue

@@ -15,26 +15,26 @@
 				</view>
 				
 				<view class="s_content_block">
-					<view class="s_img_title" v-text="'角色'"></view>
+					<view class="s_img_title" v-text="'场景'"></view>
 					<view class="s_img_image_block">
 						<view class="s_img_content">
-							<view class="s_image_block" v-for="(item,index) in charactorArr" :key="index">
-								<img :src="item.Texture_Url" class="s_image" mode="" @click="viewDetail0(index)"></img>
+							<view  class="s_image_block" v-for="(item,index) in sceneArr" :key="index">
+								<img :src="item.Texture_Url" class="s_image" mode="" @click="viewDetail1(index)"></img>
 							</view>
 						</view>
-						<img src="../../assets/home/left.png" class="v-left" alt="" @click="more0()">
+						<img src="../../assets/home/left.png" class="v-left" alt="" @click="more1()">
 					</view>
 				</view>
 				
 				<view class="s_content_block">
-					<view class="s_img_title" v-text="'场景'"></view>
+					<view class="s_img_title" v-text="'角色'"></view>
 					<view class="s_img_image_block">
 						<view class="s_img_content">
-							<view  class="s_image_block" v-for="(item,index) in sceneArr" :key="index">
-								<img :src="item.Texture_Url" class="s_image" mode="" @click="viewDetail1(index)"></img>
+							<view class="s_image_block" v-for="(item,index) in charactorArr" :key="index">
+								<img :src="item.Texture_Url" class="s_image" mode="" @click="viewDetail0(index)"></img>
 							</view>
 						</view>
-						<img src="../../assets/home/left.png" class="v-left" alt="" @click="more1()">
+						<img src="../../assets/home/left.png" class="v-left" alt="" @click="more0()">
 					</view>
 				</view>
 				
@@ -69,8 +69,9 @@
 			</view>
 			<view class="detail-block">
 				<view class="DefaultDisplayImg-block">
-					<!-- <image :src="imageUrl" mode="widthFix"></image> -->
-					<img :src="imageUrl" mode="widthFix"></img>
+					<image :src="imageUrl" ></image>
+					<!-- <img :src="imageUrl" mode="widthFix"></img> -->
+					<!-- <img :src="imageUrl" ></img> -->
 				</view>
 				<view class="Label-block">
 					<text>作品名称:{{ItemName}}</text>
@@ -84,9 +85,9 @@
 		<view class="more" v-if="bShow[2]">
 			<view class="ListBack" @click="detailBack()"><text>返回</text></view>
 			<view class="detail_image_block" v-for="(item,index) in detailArr" :key="index">
-				<img :src="item.Texture_Url" class="detail_image" @click="viewDetail0(index)"  :style="{left:`${index%3*400}rpx`,top:`${parseInt(index/3)*400+100}rpx`}" v-if="bShowImg[0]"></img>
-				<img :src="item.Texture_Url" class="detail_image" @click="viewDetail1(index)"  :style="{left:`${index%3*400}rpx`,top:`${parseInt(index/3)*400+100}rpx`}" v-if="bShowImg[1]"></img>
-				<img :src="item.Texture_Url" class="detail_image" @click="viewDetail2(index)"  :style="{left:`${index%3*400}rpx`,top:`${parseInt(index/3)*400+100}rpx`}" v-if="bShowImg[2]"></img>
+				<img :src="item.Texture_Url" class="detail_image" @click="viewDetail0(index)"  :style="{left:`${index%6*400}rpx`,top:`${parseInt(index/6)*400+100}rpx`}" v-if="bShowImg[0]"></img>
+				<img :src="item.Texture_Url" class="detail_image" @click="viewDetail1(index)"  :style="{left:`${index%6*400}rpx`,top:`${parseInt(index/6)*400+100}rpx`}" v-if="bShowImg[1]"></img>
+				<img :src="item.Texture_Url" class="detail_image" @click="viewDetail2(index)"  :style="{left:`${index%6*400}rpx`,top:`${parseInt(index/6)*400+100}rpx`}" v-if="bShowImg[2]"></img>
 			</view>
 		</view>
 	</view>
@@ -108,6 +109,12 @@
 				itemArr:[],
 				charactorArr:[],
 				sceneArr:[],
+				
+				allContentBigArr:[],
+				itemBigArr:[],
+				charactorBigArr:[],
+				sceneBigArr:[],
+				
 				bShow: [
 					true, //normal
 					false, //detail
@@ -128,82 +135,111 @@
 		methods: {
 			
 			init() {
+				this.bShow = [
+					true, //normal
+					false, //detail
+					false, //more
+				];
+				this.bShowImg = [
+					false, //normal
+					false, //detail
+					false, //more
+				];
 				//临时
 				this.allContentArr.length = 0;
 				this.itemArr.length = 0;
 				this.charactorArr.length = 0;
 				this.sceneArr.length = 0;
+				
+				this.allContentBigArr.length = 0;
+				this.itemBigArr.length = 0;
+				this.charactorBigArr.length = 0;
+				this.sceneBigArr.length = 0;
+				
+		
+				this.allContentArr.push({'CreateUserName':'郭佳','Name':'昆仑山','UploadTime':'2021-05-19 10:51:29','Texture_Url':'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/WebDownload/Library/昆仑山.png?versionId=CAEQDxiBgIDms5S.1BciIGEyYjVhMTdkZGFkNDQ1MTc4MjI0NDhlMDY4MTIxYjQz'});
+				this.allContentArr.push({'CreateUserName':'吴之雨','Name':'星际探索','UploadTime':'2021-05-19 10:51:29','Texture_Url':'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/WebDownload/Library/星际探索3.png?versionId=CAEQDxiBgMDAspS.1BciIGY1NWIyNGRhNDc0MzQ4MDY4YjI4ZmMxYTU2ZGY4MTQx'});
+				this.allContentArr.push({'CreateUserName':'张耀中','Name':'陆地居住区','UploadTime':'2021-05-19 10:51:29','Texture_Url':'https://zhongchuan1.oss-cn-beijing.aliyuncs.com/WebDownload/Library/陆地居住区.png?versionId=CAEQDxiBgIDytpS.1BciIDdmNDA3NzBiYjA5ZDRjZjBhMmM1OGMxNzYxMWE5NDhm'});
+			
+				
+				//场景
 				uni.request({
-					url: mydata_api + "/item/getitemlist",
-					data: {
-						"BeginNum" : 0,  //第一个
-						"EndNum" : 3,   //最后一个
-						"UserID": mydata_userInfo.UserID,
-						"ItemType":""      //道具 角色 场景  空为全部
-					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-						// console.log('res111111111=',res)
-						this.allContentArr = res.data.Items;
-						// let items =  res.data.Items;
-						console.log('全部=',res.data.Items)
-					}
-				})
-				//道具
-				uni.request({
-					url: mydata_api + "/item/getitemlist",
+					url: mydata_api + "/project/getallprojectcontent",
 					data: {
 						"BeginNum" : 0,  //第一个
-						"EndNum" : 5,   //最后一个
+						"EndNum" : 100,   //最后一个
 						"UserID": mydata_userInfo.UserID,
-						"ItemType":"道具"      //道具 角色 场景  空为全部
+						"Type":"场景图"      //道具 角色 场景  空为全部
 					},
 					method: "POST",
 					dataType: "json",
 					success: res => {
-						
-						this.itemArr = res.data.Items;
-						// let items =  res.data.Items;
-						// console.log('道具=',items)
+						console.log('场景=',res);
+						let aArr = res.data.ProjectItem;
+			
+						for(let i=0;i<aArr.length;i++)
+						{
+							let item = aArr[i];
+							this.sceneBigArr.push({'CreateUserName':item.UploadUserName,'Name':item.Name,'UploadTime':item.UPloadTime,'Texture_Url':item.URL});
+							
+							if(i>6) continue;
+							this.sceneArr.push({'CreateUserName':item.UploadUserName,'Name':item.Name,'UploadTime':item.UPloadTime,'Texture_Url':item.URL});
+						}
 					}
-				})
+				})	
 				
 				//角色
 				uni.request({
-					url: mydata_api + "/item/getitemlist",
+					url: mydata_api + "/project/getallprojectcontent",
 					data: {
 						"BeginNum" : 0,  //第一个
-						"EndNum" : 5,   //最后一个
+						"EndNum" : 100,   //最后一个
 						"UserID": mydata_userInfo.UserID,
-						"ItemType":"角色"      //道具 角色 场景  空为全部
+						"Type":"气氛图"      //道具 角色 场景  空为全部
 					},
 					method: "POST",
 					dataType: "json",
 					success: res => {
-						this.charactorArr =  res.data.Items;
+						console.log('角色=',res);
+						let aArr = res.data.ProjectItem;
 						
-						// let items =  res.data.Items;
-						// console.log('角色=',items)
+						for(let i=0;i<aArr.length;i++)
+						{
+							let item = aArr[i];
+							this.charactorBigArr.push({'CreateUserName':item.UploadUserName,'Name':item.Name,'UploadTime':item.UPloadTime,'Texture_Url':item.URL});
+							
+							if(i>6) continue;
+							this.charactorArr.push({'CreateUserName':item.UploadUserName,'Name':item.Name,'UploadTime':item.UPloadTime,'Texture_Url':item.URL});
+						}
 					}
 				})
 				
-				//场景
+				//道具
 				uni.request({
 					url: mydata_api + "/item/getitemlist",
 					data: {
 						"BeginNum" : 0,  //第一个
-						"EndNum" : 5,   //最后一个
+						"EndNum" : 100,   //最后一个
 						"UserID": mydata_userInfo.UserID,
-						"ItemType":"场景"      //道具 角色 场景  空为全部
+						"ItemType":"道具"      //道具 角色 场景  空为全部
 					},
 					method: "POST",
 					dataType: "json",
 					success: res => {
+						console.log('道具=',res.data.Items);
+						this.itemBigArr = res.data.Items;
+						// let items =  res.data.Items;
+						// console.log('道具=',items)
+						for(let i=0;i<this.itemBigArr.length;i++)
+						{
+							let item = this.itemBigArr[i];
+							if(i>6) break;
+							this.itemArr.push(item);
+						}
 						
-						this.sceneArr = res.data.Items;
 					}
 				})	
+				
 			},
 			// previewImage(url){
 			// 	uni.downloadFile({
@@ -311,7 +347,7 @@
 					false, //detail
 					false, //more
 				]
-				this.detailArr=this.charactorArr;//.itemArr;
+				this.detailArr=this.charactorBigArr;//.itemArr;
 			},
 			more1(){
 				
@@ -327,7 +363,7 @@
 					false, //more
 				]
 				
-				this.detailArr=this.sceneArr;//charactorArr;
+				this.detailArr=this.sceneBigArr;//charactorArr;
 				
 			},
 			more2(){
@@ -343,9 +379,9 @@
 					true, //more
 				]
 				
-				this.detailArr=this.itemArr;
+				this.detailArr=this.itemBigArr;
 				
-				console.log('this.detailArr=',this.detailArr);
+				// console.log('this.detailArr=',this.detailArr);
 			},
 			detailBack(){
 				this.bShow = [
@@ -721,11 +757,16 @@
 		/* border: 1rpx solid #ff0000; */
 	}
 	
-	.DefaultDisplayImg-block image{
+	.DefaultDisplayImg-block img{
 		width: 100%;
 		/* height: 80%; */
 	}
 	
+	.DefaultDisplayImg-block image{
+		width: 100%;
+		height: 100%;
+	}
+	
 	.Label-block{
 		width:70%;
 		height:10%;

+ 0 - 4
components/home/teacher/project.vue

@@ -81,9 +81,6 @@
 							<th>{{item.Type}}</th>
 							<th>{{item.UploadUserName}}</th>
 							<th>{{item.UPloadTime.substring(0,9)}}</th>
-<!-- 							<th><button type="default" size="mini" @click="download(index,item)" class="m_edit_1">下载</button></th>
-							<th><button type="default" size="mini" @click="deleteFile(index,item)" class="m_delete_1">删除</button></th>
-							<th><button type="default" size="mini" @click="audit(index,item)" class="m_audit_1">审核</button></th> -->
 							<th style="position: relative;"><button type="default" size="mini" @click="download(index,item)" class="m_edit_1">下载</button></th>
 							<th style="position: relative;"><button type="default" size="mini" @click="deleteFile(index,item)" class="m_delete_1">删除</button></th>
 							<th style="position: relative;"><button type="default" size="mini" @click="audit(index,item)" class="m_audit_1">审核</button></th>
@@ -133,7 +130,6 @@
 								</div>
 							</th>
 							<th>{{item.User.PhoneNum}}</th>
-							<!-- <th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="deleteMember(item)"  v-show="item.User.Id != projectData[0].CreateUserID">删除</button></th> -->
 							<th><button type="default" size="mini" class="m_delete2" @click="deleteMember(item)"  v-show="item.User.Id != projectData[0].CreateUserID">删除</button></th>
 						</tr>
 					</tbody>

+ 126 - 28
components/home/teacher/table.vue

@@ -31,7 +31,18 @@
 					</tr>
 				</tbody>
 			</table>
+			
+			<view class="m_right_footer">
+				<view class="m_paging">
+					<text class="m_paging_item m_paging_upper" v-show="bShowLastPageBtn" @click="last()">上一页</text>
+					<text class="m_paging_item" :key="i" v-for="i in pageTotalNum" @click="paging(i)" :class="i==currentPage?'p_act':''">
+						{{i}}
+					</text>
+					<text class="m_paging_item m_paging_lower" v-show="bShowNextPageBtn" @click="next()">下一页</text>
+				</view>
+			</view>
 		</view>
+		
 	</view>
 </template>
 
@@ -41,7 +52,12 @@
 		data() {
 			return {
 				index: 1,
-				tabledata: []
+				tabledata: [],
+				pageTotalNum:1,
+				currentPage:1,
+				totalItem:2,
+				bShowLastPageBtn:false,
+				bShowNextPageBtn:false,
 			}
 		},
 		components: {
@@ -51,36 +67,118 @@
 			// this.getList();
 		},
 		methods: {
-			paging(obj) {
-				this.index = obj;
-			},
-			getList() {
+			paging(i) {
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				
+				let fromIndex = this.totalItem*(i-1);
+				let toIndex = fromIndex+this.totalItem;
+				
+				let data = {
+					"UserID": mydata_userInfo.UserID,
+					"BeginNum": fromIndex, //用户数组索引
+					"EndNum": toIndex, //用户数组索引结束
+				}
+				// console.log('data=',data)
 				uni.request({
-					url: mydata_api + "/project/getprojects",
-					data: {
-						"UserID": mydata_userInfo.UserID
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
+					},
+					url: mydata_api + '/project/getprojects',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部资产", res);
+							this.tabledata = res.data.Items;
+							this.pageTotalNum = Math.ceil(res.data.TotalNum/this.totalItem);
+							this.currentPage = i;					
+							this.showNextOrLastPageBtn();
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+						}
+						uni.hideLoading();					
 					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-						this.tabledata = res.data.Projects
-						console.log('tabledata=',this.tabledata)
-						// let aData = {
-						// 	"CreateTime": "2020-01-01 00:00:00",
-						// 	"CreateUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
-						// 	"CreateUserName": "朱峰",
-						// 	"Describe": '“实验以振兴国产科技电影”和“实现中国航天强国梦”的宏大蓝图为背景,以我国首次登陆火星计划为现实脚本,运用现场实时特效技术手段,对火星地面、外太空等场景进行“经典学习”和“实践创兴”并通过持续开发和学生在实验过程中的资源上传不断扩大现场创作的实景和虚拟资产库,使学生再学习过程中,即是资源学习者和方案讨论者,也是资源建设者',
-						// 	"Id": 30,
-						// 	"ProjectName": "《火星计划》",
-						// 	"ProjectReviewImage": "../../../assets/studentAndTeacher/table/marsPlanReviewImage.png",
-						// 	"ReviewImageOss": "../../../assets/studentAndTeacher/table/marsPlanMainCover.png",
-						// 	"Type": "科幻",
-						// }
-						// this.tabledata.unshift(aData);
-						// console.log("table页面请求所有项目",res);
-						this.$forceUpdate();//强制刷新页面
+					fail: (res) => {
+						console.log("请求失败****");	
+						uni.hideLoading();
 					}
-				})
+				});
+			},
+			initPage() {
+				this.paging(1);
+			},
+			last()
+			{
+				this.currentPage--;
+				this.paging(this.currentPage);
+			},
+			next()
+			{
+				this.currentPage++;
+				this.paging(this.currentPage);
+			},
+			showNextOrLastPageBtn()
+			{
+				if(this.pageTotalNum==this.currentPage)
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = false;
+					// console.log('11111')
+				}
+				else if(1==this.currentPage)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = true;
+					// console.log('2222')
+				}
+				else
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = true;
+					// console.log('333333')
+				}
+				
+				if(this.pageTotalNum==1){
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = false;
+					// console.log('444444')
+				}
+			},
+			getList() {
+				this.initPage(1);
+				// uni.request({
+				// 	url: mydata_api + "/project/getprojects",
+				// 	data: {
+				// 		"UserID": mydata_userInfo.UserID
+				// 	},
+				// 	method: "POST",
+				// 	dataType: "json",
+				// 	success: res => {
+				// 		this.tabledata = res.data.Projects
+				// 		console.log('tabledata=',this.tabledata)
+				// 		// let aData = {
+				// 		// 	"CreateTime": "2020-01-01 00:00:00",
+				// 		// 	"CreateUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
+				// 		// 	"CreateUserName": "朱峰",
+				// 		// 	"Describe": '“实验以振兴国产科技电影”和“实现中国航天强国梦”的宏大蓝图为背景,以我国首次登陆火星计划为现实脚本,运用现场实时特效技术手段,对火星地面、外太空等场景进行“经典学习”和“实践创兴”并通过持续开发和学生在实验过程中的资源上传不断扩大现场创作的实景和虚拟资产库,使学生再学习过程中,即是资源学习者和方案讨论者,也是资源建设者',
+				// 		// 	"Id": 30,
+				// 		// 	"ProjectName": "《火星计划》",
+				// 		// 	"ProjectReviewImage": "../../../assets/studentAndTeacher/table/marsPlanReviewImage.png",
+				// 		// 	"ReviewImageOss": "../../../assets/studentAndTeacher/table/marsPlanMainCover.png",
+				// 		// 	"Type": "科幻",
+				// 		// }
+				// 		// this.tabledata.unshift(aData);
+				// 		// console.log("table页面请求所有项目",res);
+				// 		this.$forceUpdate();//强制刷新页面
+				// 	}
+				// })
 			},
 			//查看项目
 			find(obj,index){

+ 4 - 4
components/login/loginByPWD.vue

@@ -51,8 +51,8 @@
 			return {
 				account: '',
 				password: '',
-				regURL: 'http://www.ilab-x.com/register',
-				resetURL: 'http://www.ilab-x.com/find/password',
+				regURL: mydata_api+'/register',
+				resetURL: mydata_api+'/find/password',
 				//是否显示登录失败的提示 1显示0隐藏(即:透明度归零)
 				isShowTip: 0,
 			}
@@ -97,11 +97,11 @@
 							if (data.Image != '') {
 								mydata_userInfo.avatarSrc = data.Image;
 							}
-							console.log("login登陆成功data=", data);
+							console.log("login账户密码登陆成功data=", data);
 					
 							mydata_userInfo.Name = data.Name;
 							mydata_userInfo.UserID = data.UserID;
-							mydata_userInfo.Position = data.Position;
+							// mydata_userInfo.Position = data.Position;
 							mydata_userInfo.role = data.Type;
 							
 							

+ 4 - 4
components/student/StudentInfo.vue

@@ -50,20 +50,20 @@
 					</div>
 				</div>
 				<div class="m_row">
-					<div class="m_form_item">
+				<!-- 	<div class="m_form_item">
 						<span class="m_form_title">证件类型</span>
 						<input type="text" value="" v-model="model.Certificate" class="m_input" placeholder="请输入" />
-					</div>
+					</div> -->
 					<div class="m_form_item">
 						<span class="m_form_title">手机</span>
 						<input type="text" v-model="model.PhoneNum" class="m_input" placeholder="请输入手机" />
 					</div>
 				</div>
 				<div class="m_row">
-					<div class="m_form_item">
+					<!-- <div class="m_form_item">
 						<span class="m_form_title">证件号码</span>
 						<input type="text" class="m_input" v-model="model.CertificateNum" placeholder="请输入号码" />
-					</div>
+					</div> -->
 					<div class="m_form_item">
 						<span class="m_form_title">邮件</span>
 						<input type="text" value="" v-model="model.Email" class="m_input" placeholder="请输入邮件" />

+ 117 - 32
components/student/table.vue

@@ -30,51 +30,138 @@
 					</tr>
 				</tbody>
 			</table>
+			
+			<view class="m_right_footer">
+				<view class="m_paging">
+					<text class="m_paging_item m_paging_upper" v-show="bShowLastPageBtn" @click="last()">上一页</text>
+					<text class="m_paging_item" :key="i" v-for="i in pageTotalNum" @click="paging(i)" :class="i==currentPage?'p_act':''">
+						{{i}}
+					</text>
+					<text class="m_paging_item m_paging_lower" v-show="bShowNextPageBtn" @click="next()">下一页</text>
+				</view>
+			</view>
 		</view>
+		
 	</view>
 </template>
-
+	
 <script>
 	export default {
 		name: "student_table",
 		data() {
 			return {
 				index: 1,
-				tabledata: []
+				tabledata: [],
+				pageTotalNum:1,
+				currentPage:1,
+				totalItem:2,
+				bShowLastPageBtn:false,
+				bShowNextPageBtn:false,
 			}
 		},
 		methods: {
-			paging(obj) {
-				this.index = obj;
-			},
-			getList() {
+			// paging(obj) {
+			// 	this.index = obj;
+			// },
+			paging(i) {
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				let fromIndex = this.totalItem*(i-1);
+				let toIndex = fromIndex+this.totalItem;
+				
+				let data = {
+					"UserID": mydata_userInfo.UserID,
+					"BeginNum": fromIndex, //用户数组索引
+					"EndNum": toIndex, //用户数组索引结束
+				}
+				
 				uni.request({
-					url: mydata_api + "/project/getprojects",
-					data: {
-						"UserID": mydata_userInfo.UserID
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
 					},
-					method: "POST",
-					dataType: "json",
-					success: res => {
-			
-						this.tabledata = res.data.Projects
-						console.log('tabledata=',this.tabledata)
-						// let aData = {
-						// 	"CreateTime": "2020-01-01 00:00:00",
-						// 	"CreateUserID": "59458299-3b84-4895-98f6-b990cdaedc72",
-						// 	"CreateUserName": "朱峰",
-						// 	"Describe": '“实验以振兴国产科技电影”和“实现中国航天强国梦”的宏大蓝图为背景,以我国首次登陆火星计划为现实脚本,运用现场实时特效技术手段,对火星地面、外太空等场景进行“经典学习”和“实践创兴”并通过持续开发和学生在实验过程中的资源上传不断扩大现场创作的实景和虚拟资产库,使学生再学习过程中,即是资源学习者和方案讨论者,也是资源建设者',
-						// 	"Id": 30,
-						// 	"ProjectName": "《火星计划》",
-						// 	"ProjectReviewImage": "../../../assets/studentAndTeacher/table/marsPlanReviewImage.png",
-						// 	"ReviewImageOss": "../../../assets/studentAndTeacher/table/marsPlanMainCover.png",
-						// 	"Type": "科幻",
-						// }
-						// this.tabledata.unshift(aData);
-						// console.log('res=',this.tabledata)
-						this.$forceUpdate();//强制刷新页面
+					url: mydata_api + '/project/getprojects',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部资产", res);
+							this.tabledata = res.data.Items;
+							this.pageTotalNum = Math.ceil(res.data.TotalNum/this.totalItem);
+							this.currentPage = i;					
+							this.showNextOrLastPageBtn();
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+						}
+						uni.hideLoading();					
+					},
+					fail: (res) => {
+						console.log("请求失败****");	
+						uni.hideLoading();
 					}
-				})
+				});
+			},
+			initPage() {
+				this.paging(1);
+			},
+			last()
+			{
+				this.currentPage--;
+				this.paging(this.currentPage);
+			},
+			next()
+			{
+				this.currentPage++;
+				this.paging(this.currentPage);
+			},
+			showNextOrLastPageBtn()
+			{
+				if(this.pageTotalNum==this.currentPage)
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = false;
+					// console.log('11111')
+				}
+				else if(1==this.currentPage)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = true;
+					// console.log('2222')
+				}
+				else
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = true;
+					// console.log('333333')
+				}
+				
+				if(this.pageTotalNum==1){
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = false;
+					// console.log('444444')
+				}
+			},
+			getList() {
+			// 	uni.request({
+			// 		url: mydata_api + "/project/getprojects",
+			// 		data: {
+			// 			"UserID": mydata_userInfo.UserID
+			// 		},
+			// 		method: "POST",
+			// 		dataType: "json",
+			// 		success: res => {
+			
+			// 			this.tabledata = res.data.Projects
+			// 			// console.log('tabledata=',this.tabledata)
+			// 			this.$forceUpdate();//强制刷新页面
+			// 		}
+			// 	})
+				this.initPage(1);
 			},
 			find(obj,index){
 				this.$emit('viewProject',obj,index);
@@ -97,8 +184,6 @@
 
 		.s_logo {
 			width: 100%;
-			// height: 800rpx;
-			// object-fit: cover;
 		}
 
 		.m_right_hander {

+ 4 - 4
components/user/selfInfo.vue

@@ -29,7 +29,7 @@
 								<view class="table-title">政治面貌</view>
 								<input class="form-input" name="input" placeholder="请输入" v-model="model.PoliticsStatus" />
 							</view>
-							<view class="box2-table-box-left-item df fdr aic jcsb">
+						<!-- 	<view class="box2-table-box-left-item df fdr aic jcsb">
 								<view class="table-title">证件类型</view>
 								<picker @change="bindPickerChange_zj" :value="zjIndex" :range="array_zj">
 									<view class="form-input df fdr aic jcsb">
@@ -43,7 +43,7 @@
 							<view class="box2-table-box-left-item df fdr aic jcsb">
 								<view class="table-title">证件号码</view>
 								<input class="form-input" name="input" placeholder="请输入" v-model="model.CertificateNum" />
-							</view>
+							</view> -->
 						</view>
 						<view class="box2-table-box-right">
 							<view class="box2-table-box-left-item df fdr aic jcsb">
@@ -147,7 +147,7 @@
 					"Nation": "汉族", //民族 
 					"PoliticsStatus": "", //政治面貌
 					"NativePlace": "", //籍贯
-					"Certificate": "身份证", //证件类型
+					// "Certificate": "身份证", //证件类型
 					"CertificateNum": null //证件号码
 				},
 				model2: {
@@ -165,7 +165,7 @@
 					"Nation": "汉", //民族 
 					"PoliticsStatus": "群众", //政治面貌
 					"NativePlace": "江西", //籍贯
-					"Certificate": "身份证", //证件类型
+					// "Certificate": "身份证", //证件类型
 					"CertificateNum": 12345678910 //证件号码
 
 				},

+ 2 - 1
myData.js

@@ -31,4 +31,5 @@ mydata_userInfo = {
 // mydata_api='http://39.105.166.141: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://www.tanhuagame.com:8085/web'
+// mydata_api='https://ilabtft.cuc.edu.cn/web'

+ 90 - 20
pages/home.vue

@@ -172,6 +172,31 @@
 			}
 		},
 		onLoad() {
+			
+			let aUserID = this.getCookie("AutoUserID");
+			let aName = this.getCookie("AutoName");
+			let aType = this.getCookie("AutoType");
+			let aIsAdmin = this.getCookie("AutoIsAdmin");
+			let aImage = this.getCookie("AutoImage");
+			
+			if(aUserID!='') console.log('aUserID=',aUserID)
+			if(aName!='') console.log('aName=',aName)
+			if(aType!='') console.log('aType=',aType)
+			if(aIsAdmin!='') console.log('aIsAdmin=',aIsAdmin)
+			if(aImage!='') console.log('aImage=',aImage)
+			
+			let self = this;
+			if(aUserID!='')
+			{
+				console.log('从Liab跳转登录')
+				setTimeout(function(){
+					self.onLoginSuccess(aUserID,aName,aType,aImage);
+				},500)
+				
+				return;
+			}
+			
+			// console.log('从保存用户名密码登录')
 			let account = localStorage.getItem("account");
 			let password = localStorage.getItem("password");
 
@@ -192,29 +217,30 @@
 						let data = res.data;
 						//登录成功
 						if (data.Code == 100) {
-							// console.log("登陆成功");
-							if (data.Image != '') {
-								mydata_userInfo.avatarSrc = data.Image;
-							}
-							console.log("home登陆成功data=", data);
-							mydata_userInfo.Name = data.Name;
-							mydata_userInfo.UserID = data.UserID;
-							mydata_userInfo.Position = data.Position;
-							mydata_userInfo.role = data.Type;
+							console.log("home从保存用户名密码登录data=", data);
+							this.onLoginSuccess(data.UserID,data.Name,data.Type,data.Image);
+							// if (data.Image != '') {
+							// 	mydata_userInfo.avatarSrc = data.Image;
+							// }
+							// console.log("home登陆成功data=", data);
+							// mydata_userInfo.Name = data.Name;
+							// mydata_userInfo.UserID = data.UserID;
+							// // mydata_userInfo.Position = data.Position;
+							// mydata_userInfo.role = data.Type;
 							
-							if (mydata_userInfo.role == '老师') {
-								userController.updateStudentList(null, null);
-							}
-							else{
-								mydata_userInfo.role = '学生';
-							}
-							userController.updateUserInfo();
-							userController.updateScore();
+							// if (mydata_userInfo.role == '老师') {
+							// 	userController.updateStudentList(null, null);
+							// }
+							// else{
+							// 	mydata_userInfo.role = '学生';
+							// }
+							// userController.updateUserInfo();
+							// userController.updateScore();
 
-							// MyRequest.SetUserType(mydata_userInfo.role,null,null);
+							// // MyRequest.SetUserType(mydata_userInfo.role,null,null);
 
-							getApp().globalData.bLogin = true;
-							this.onLogin();
+							// getApp().globalData.bLogin = true;
+							// this.onLogin();
 						}
 					},
 					fail: (res) => {
@@ -223,7 +249,51 @@
 				});
 			}
 		},
+		
 		methods: {
+			onLoginSuccess(UserID,Name,Type,Image)
+			{
+				mydata_userInfo.UserID = UserID;
+				mydata_userInfo.Name = Name;
+				mydata_userInfo.role = Type;
+				mydata_userInfo.avatarSrc = Image;
+				
+				if (mydata_userInfo.role == '老师') {
+					userController.updateStudentList(null, null);
+				}
+				else{
+					mydata_userInfo.role = '学生';
+				}
+				userController.updateUserInfo();
+				userController.updateScore();
+				
+				// MyRequest.SetUserType(mydata_userInfo.role,null,null);
+				
+				getApp().globalData.bLogin = true;
+				this.onLogin();
+			},
+			getQueryVariable(variable)
+			{
+			       var query = window.location.search.substring(1);
+			       var vars = query.split("&");
+			       for (var i=0;i<vars.length;i++) {
+			               var pair = vars[i].split("=");
+			               if(pair[0] == variable){return pair[1];}
+			       }
+			       return(false);
+			},
+			getCookie(name){
+			    var strcookie = document.cookie;//获取cookie字符串
+			    var arrcookie = strcookie.split("; ");//分割
+			    //遍历匹配
+			    for ( var i = 0; i < arrcookie.length; i++) {
+			        var arr = arrcookie[i].split("=");
+			        if (arr[0] == name){
+			            return arr[1];
+			        }
+			    }
+			    return "";
+			},
 			onTopSYClick(index) {
 				if (!getApp().globalData.bLogin) {
 					// uni.showToast({