Tang 4 years ago
parent
commit
bf2a1added

+ 35 - 2
common/httpList/collect.js

@@ -50,14 +50,16 @@ export default {
 			url: '/collect/bank/delete/' + data,
 			method: 'post',
 		})
-	}, //查询收藏题库列表
+	}, 
+	//查询收藏题库列表
 	bankCollectList(data) {
 		return myRequest({
 			url: '/collect/bank/list',
 			method: 'get',
 			data: data,
 		})
-	}, //判断是否收藏题库
+	},
+	 //判断是否收藏题库
 	bankCollects(data) {
 		return myRequest({
 			url: '/collect/bank/' + data,
@@ -75,4 +77,35 @@ export default {
 			data: data,
 		})
 	},
+	
+	//新增收藏题目
+	questionsystemadd(data) {
+		return myRequest({
+			url: '/system/question',
+			method: 'post',
+			data: data,
+		})
+	},
+	//删除收藏题目
+	questionsystemdelete(data) {
+		return myRequest({
+			url: '/system/question/delete/' + data,
+			method: 'post',
+		})
+	}, 
+	//查询收藏题目列表
+	systemquestionList(data) {
+		return myRequest({
+			url: '/system/question/list',
+			method: 'get',
+			data: data,
+		})
+	},
+	 //获取收藏题目详细信息
+	questionsystems(data) {
+		return myRequest({
+			url: '/system/question/' + data,
+			method: 'get',
+		})
+	},
 }

+ 9 - 3
common/httpList/record.js

@@ -3,12 +3,18 @@ import {
 } from '../request.js'
 export default {
 
-	appuserInfo(data) {
+	studyRecord(data) {
 		return myRequest({
-			url: '/study/record/add',
+			url: '/study/record',
 			method: 'post',
 			data: data,
 		})
 	},
-	
+	studyRecordList(data) {
+		return myRequest({
+			url: '/study/record/list',
+			method: 'get',
+			data: data,
+		})
+	},
 }

+ 7 - 0
common/httpList/userInfo.js

@@ -52,4 +52,11 @@ export default {
 			data: data,
 		})
 	},
+	rankList(data) {
+		return myRequest({
+			url: '/app/user/rankingList',
+			method: 'get',
+			data: data,
+		})
+	},
 }

+ 6 - 6
common/request.js

@@ -1,6 +1,6 @@
-// const BASE_URL = 'http://192.168.0.222:8088'   //
+const BASE_URL = 'http://192.168.0.222:8088'
 // const BASE_URL = 'http://192.168.0.145:8088'   //
-const BASE_URL = 'https://api.xyyxt.net'   //
+// const BASE_URL = 'https://api.xyyxt.net'  //
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
@@ -54,17 +54,17 @@ export const myRequest = (options) => {
 		const res = await myRequest(datas)
 		if (res.data.code === 200) {
 			uni.setStorageSync('token', res.data.data.token)
-			
-			 var userInfo = {
+
+			var userInfo = {
 				url: '/getInfo',
 				method: 'get',
 			}
 			const resUser = await myRequest(userInfo)
 			if (resUser.data.code === 200) {
 				store.state.userInfo = resUser.data.data
-			} 
+			}
 			let onset = await myRequest(response)
-			return onset 
+			return onset
 		} else {
 			uni.navigateTo({
 				url: '/pages/login/login'

+ 15 - 10
components/home.vue

@@ -13,15 +13,15 @@
 					<view class="card_box">
 						<u-row gutter="16">
 							<u-col span="11" v-if="false">
-								<view>
-									<text class="t1">距离</text>
-									<text class="t2">二级建造师</text>
-									<text class="t1">考试</text>
-									<text class="t3">365</text>
-									<text class="t1">天,继续加油哦!</text>
+								<view >
+										<text class="t1">距离</text>
+										<text class="t2">二级建造师</text>
+										<text class="t1">考试</text>
+										<text class="t3">365</text>
+										<text class="t1">天,继续加油哦!</text>
 								</view>
 							</u-col>
-							<u-col span="1">
+							<u-col offset="11" span="1">
 								<view @click="jumpPlan"><image src="/static/more.png" class="img_more"></image></view>
 							</u-col>
 						</u-row>
@@ -33,7 +33,7 @@
 					<view style="width: 100%;display: flex;justify-content:center;margin-top: 40rpx;">
 						<view v-for="(item, index) in date_num" :key="index" class="date_num">{{ item }}</view>
 					</view>
-					<view style="width: 100%;margin-top: 20rpx;">
+					<view style="width: 100%;margin-top: 20rpx;" v-if="false">
 						<u-row gutter="16">
 							<u-col span="2" text-align="center">
 								<view><image src="/static/left.png" class="arr-icon"></image></view>
@@ -155,7 +155,7 @@ export default {
 				}
 			],
 			date: ['日', '一', '二', '三', '四', '五', '六'],
-			date_num: [23, 24, 25, 26, 27, 28, 29],
+			date_num: [20, 21, 22, 23, 24, 25, 26],
 			list1: [],
 			list2: [],
 			list3: [],
@@ -271,7 +271,12 @@ export default {
 			}
 		},
 		jumpPlan() {
-			this.$navTo.togo('/pages2/plan/detail', {});
+			if(!this.$method.isLogin()){
+				this.$navTo.togo('/pages/login/login');
+			}else{
+				this.$navTo.togo('/pages2/plan/detail', {});
+			}
+			
 		},
 		jumpSearch() {
 			this.$navTo.togo('/pages2/index/search', {});

+ 25 - 3
components/my.vue

@@ -23,9 +23,12 @@
 						<u-line-progress height="8" active-color="#2F4379" :percent="0" :show-percent="false"></u-line-progress>
 					</navigator>
 				</u-col>
-				<view class="qiandao">
+				<view class="qiandao" @click="qd()" v-if="!isQd">
 					签到
 				</view>
+				<view class="qiandao"  v-if="isQd">
+					已签到
+				</view>
 			</u-row>
 			<view style="margin-top: 20rpx;">
 				<u-row >
@@ -45,7 +48,7 @@
 							学习排名
 						</view>
 						<view  class="head_t2">
-							NO.3
+							NO.{{rank}}
 						</view>
 						</navigator>
 					</u-col>
@@ -130,10 +133,28 @@
 				list:[23,24,25,26,27,28,29],
 				content:'此功能暂未开放',
 				show:false,
-				collectTotal:0
+				collectTotal:0,
+				isQd:false,
+				rank:0
 			};
 		},
+		mounted(){
+			this.haveQD()
+		},
 		methods: {
+			haveQD(){
+				let num = uni.getStorageSync("qd_day");
+				if(num){
+					this.isQd = true
+				}
+			},
+			qd(){
+				let date = new Date()
+				let num = date.getDate()
+				let key = "qd_day"
+				uni.setStorageSync(key, num);
+				this.isQd = true
+			},
 			jumpDetail(item){
 				this.$navTo.togo('/pages2/course/detail', {
 					id: item.courseId
@@ -150,6 +171,7 @@
 				let self = this
 				this.$api.appInfoAttached().then(res => {
 					self.collectTotal = res.data.data.collectTotal
+					self.rank = res.data.data.rank
 				});
 				this.studyRecordList()
 			},

+ 9 - 0
pages.json

@@ -207,6 +207,15 @@
 					"bounce": "none"
 				}
 			}
+		},{
+			"path": "bank/endBG",
+			"style": {
+				"navigationBarTitleText": "错题集",
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
 		}, {
 			"path": "wd/enroll",
 			"style": {

+ 3 - 3
pages2/bank/detail.vue

@@ -26,7 +26,7 @@
 										<view class="t1">总题数</view>
 										<view class="t3">300</view>
 										<view class="t1">已答过</view>
-										<view class="t3">204</view>
+										<view class="t3">0</view>
 									</view>
 								</u-col>
 							</u-row>
@@ -35,7 +35,7 @@
 					<view class="box2">
 						<view style="height: 100%;display: flex;flex-direction: column;justify-content: center;">
 							<view style="text-align: center;" @click="jumpQuestion">
-								<view class="big_num">35</view>
+								<view class="big_num">0</view>
 								<view class="t4">
 									错题集
 									<u-icon name="arrow-right" size="28"></u-icon>
@@ -46,7 +46,7 @@
 					<view class="box2">
 						<view style="height: 100%;display: flex;flex-direction: column;justify-content: center;">
 							<view style="text-align: center;">
-								<view class="big_num">126</view>
+								<view class="big_num">0</view>
 								<view class="t4">
 									收藏集
 									<u-icon name="arrow-right" size="28"></u-icon>

+ 152 - 0
pages2/bank/endBG.vue

@@ -0,0 +1,152 @@
+<template>
+	<view class="endBG">
+		<view class="topTitle">
+			<view>
+				<image style="height: 48rpx;width: 167rpx;" src="@/static/goods.png" mode=""></image>
+			</view>
+			<view>你完成了错题练习</view>
+		</view>
+		<view class="content">
+			<view class="leftcen">
+				<view class="leftT">{{((correct / allIndex) * 100 ).toFixed(0)}}%</view>
+				<view class="leftC">正确率</view>
+				<view class="leftB">不含简答/案例题</view>
+			</view>
+			<view class="rightcen">
+				<view class="rightT">
+					<view class="rightleftIcon">
+						<span style="color: rgb(35,214,145);font-size: 48rpx;margin-right: 28rpx;">✔</span>
+						<span>正确题数</span>
+					</view>
+					<view class="rightRigthIcon" style="color: rgb(35,214,145);font-size: 48rpx;font-weight: 500;">
+						{{correct}}
+					</view>
+				</view>
+				<view class="rightT">
+					<view class="rightleftIcon">
+						<span style="color: rgb(225,38,38);font-size: 48rpx;margin-right: 28rpx;">✖</span>
+						<span>错误题数</span>
+					</view>
+					<view class="rightRigthIcon" style="color: rgb(225,38,38);font-size: 48rpx;font-weight: 500;">
+						{{error}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="footer">
+			<view class="btns">错题解析</view>
+			<view class="btns">全部解析</view>
+			<view class="btns">继续练习</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			allIndex: 0,
+			correct: 0,
+			error: 0,
+		};
+	},
+	onLoad(options) {
+		this.allIndex = options.allIndex;
+		this.correct = options.correct;
+		this.error = options.error;
+	},
+	methods: {}
+};
+</script>
+<style>
+::-webkit-scrollbar {
+	width: 0;
+	height: 0;
+	color: transparent;
+}
+</style>
+<style scope>
+.topTitle {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	margin: 70rpx 0rpx;
+	color: #333333;
+	font-size: 36rpx;
+	font-weight: 500;
+}
+.content {
+	display: flex;
+	align-items: center;
+	height: 182rpx;
+}
+.content > .leftcen {
+	width: 242rpx;
+	background-color: #f6f7f9;
+	border-radius: 32rpx;
+	height: 100%;
+	margin-right: 23rpx;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+}
+.content > .leftcen > .leftT {
+	margin-top: 15rpx;
+	font-size: 60rpx;
+	font-weight: 800;
+	color: #32467b;
+}
+.content > .leftcen > .leftC {
+	color: #333333;
+	font-size: 32rpx;
+	margin-bottom: 6rpx;
+}
+.content > .leftcen > .leftB {
+	color: #999999;
+	font-size: 24rpx;
+}
+.content > .rightcen {
+	flex: 1;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+}
+.content > .rightcen > .rightT {
+	padding: 0rpx 35rpx 0rpx 45rpx;
+	display: flex;
+	align-items: center;
+	font-size: 30rpx;
+	height: 80rpx;
+	border-radius: 32rpx;
+	background-color: #f6f7f9;
+	justify-content: space-between;
+}
+.rightleftIcon {
+	display: flex;
+	align-items: center;
+}
+.footer {
+	display: flex;
+	justify-content: space-around;
+	align-items: center;
+	margin-top: 42rpx;
+}
+.footer > .btns {
+	width: 200rpx;
+	height: 80rpx;
+	line-height: 80rpx;
+	text-align: center;
+	border-radius: 32rpx;
+	background-color: #f6f7f9;
+	font-size: 32rpx;
+	color: #333;
+	font-weight: 500;
+}
+.endBG {
+	padding: 0rpx 32rpx;
+}
+page {
+	background: #ffffff;
+}
+</style>

+ 89 - 26
pages2/bank/question.vue

@@ -13,7 +13,7 @@
 			<view class="content">
 				<view class="contentTitle">{{ nowPageData.content }}</view>
 				<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
-					<image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit"></image>
+					<image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit"  @click="seeBigImage(nowPageData.imgUrl)"></image>
 				</view>
 			</view>
 			<!---案例内容start -->
@@ -25,7 +25,7 @@
 				</view>
 				<view class="content">
 					<view class="contentTitle">{{ itemst.content }}</view>
-					<view class="imageBox" v-if="itemst.imgUrl && itemst.imgUrl !== null"><image :src="$method.splitImgHost(itemst.imgUrl)" mode="aspectFit"></image></view>
+					<view class="imageBox" v-if="itemst.imgUrl && itemst.imgUrl !== null"><image :src="$method.splitImgHost(itemst.imgUrl)" mode="aspectFit"  @click="seeBigImage(itemst.imgUrl)"></image></view>
 				</view>
 				<view
 					class="banksChiList"
@@ -37,7 +37,7 @@
 					<view class="leftIndex">{{ alphabet[indexs] }}.</view>
 					<view class="bankTie">
 						<view>{{ items.content }}</view>
-						<image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit"></image>
+						<image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit"  @click="seeBigImage(items.imgUrl)"></image>
 					</view>
 				</view>
 				<view v-if="itemst.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePDs(1, indexst)">正确</view>
@@ -69,7 +69,7 @@
 			<view class="content">
 				<view class="contentTitle">{{ nowPageData.content }}</view>
 				<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
-					<image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit"></image>
+					<image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit" @click="seeBigImage(nowPageData.imgUrl)"></image>
 				</view>
 			</view>
 			<view
@@ -82,7 +82,7 @@
 				<view class="leftIndex">{{ alphabet[indexs] }}.</view>
 				<view class="bankTie">
 					<view>{{ items.content }}</view>
-					<image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit"></image>
+					<image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit" @click="seeBigImage(items.imgUrl)"></image>
 				</view>
 			</view>
 			<view v-if="nowPageData.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePD(1)">正确</view>
@@ -99,8 +99,8 @@
 			<u-row gutter="16">
 				<u-col span="4">
 					<view class="box">
-						<view style="text-align: center;margin-left: 30rpx;position: absolute;left: 20rpx;">
-							<image src="/static/sc.png" class="sc"></image>
+						<view style="text-align: center;margin-left: 30rpx;position: absolute;left: 20rpx;" @click="favorites">
+							<image :src="collecStatus ? '/static/star.png' : '/static/sc.png'" class="sc"></image>
 							<view class="sc_t">收藏</view>
 						</view>
 					</view>
@@ -173,7 +173,8 @@ export default {
 			bankId: 0, //题库ID
 			selects: [], //当前做了哪些题目
 			showJX: [], // 展开解析列表
-			showJXanli: [] // 展开案例解析列表
+			showJXanli: [], // 展开案例解析列表
+			collecStatus: false
 		};
 	},
 	onLoad(option) {
@@ -187,8 +188,49 @@ export default {
 			this.examId = option.examId;
 		}
 	},
-	onShow() {},
 	methods: {
+		//预览图片
+		seeBigImage(url){
+			var urlarr = []
+			urlarr.push(this.$method.splitImgHost(url))
+			uni.previewImage({
+				urls: urlarr
+			})
+		},
+		favoritesStatus() {
+			this.$api.questionsystems(this.nowPageData.questionId).then(result => {
+				if (result.data.data === undefined) {
+					this.collecStatus = false;
+				} else {
+					this.collecStatus = true;
+				}
+			});
+		},
+		//收藏
+		favorites() {
+			console.log(this.collecStatus);
+			var self = this;
+			if (!uni.getStorageSync('union_id') && this.$store.state.token === '') {
+				uni.navigateTo({
+					url: '/pages/login/login'
+				});
+			} else {
+				if (this.collecStatus) {
+					this.$api.questionsystems(self.nowPageData.questionId).then(results => {
+						self.$api.questionsystemdelete(results.data.data.collectQuestionId).then(resz => {
+							self.favoritesStatus();
+						});
+					});
+				} else {
+					var data = {
+						questionId: self.nowPageData.questionId
+					};
+					this.$api.questionsystemadd(data).then(res => {
+						self.favoritesStatus();
+					});
+				}
+			}
+		},
 		// 查看解析start
 		showTitle(ids) {
 			var self = this;
@@ -219,13 +261,16 @@ export default {
 			this.initDatas();
 			this.initLint();
 			this.getCooieds();
+			this.favoritesStatus(self.nowPageData.questionId);
+			this.show = false;
 		},
+		//数据清空
 		initDatas() {
 			this.isWrong = -1;
 			this.showJX = [];
 			this.showJXanli = [];
 			this.selects = [];
-		}, //数据清空
+		},
 		getCooieds() {
 			var self = this;
 			if (this.answerList.length) {
@@ -238,7 +283,6 @@ export default {
 						} else {
 							self.replyL = item.selectIds;
 						}
-						console.log(self.replyL);
 					}
 				});
 			}
@@ -324,7 +368,6 @@ export default {
 					examId: option.examId
 				};
 			}
-			console.log(option);
 			this.$api.questiondetailList(data).then(res => {
 				if (res.data.rows.length) {
 					let self = this;
@@ -338,6 +381,7 @@ export default {
 						}
 					}
 					self.nowPageData = res.data.rows[self.numIndex];
+					self.favoritesStatus(res.data.rows[self.numIndex].questionId);
 					self.list = res.data.rows;
 				} else {
 					uni.showModal({
@@ -464,7 +508,18 @@ export default {
 		},
 		//交卷
 		carryOut() {
-			this.answerList.forEach((item, index) => {
+			var self = this;
+			var correct = 0;
+			var errorz = 0;
+			var answerListString = JSON.parse(JSON.stringify(this.answerList));
+			answerListString.forEach((item, index) => {
+				if (item.isRight !== undefined) {
+					if (item.isRight === 1) {
+						correct++;
+					} else {
+						errorz++;
+					}
+				}
 				item.selectIds = item.selectIds.toString();
 				item.replyStr.forEach((items, indexs) => {
 					if (items.selectId) {
@@ -476,7 +531,7 @@ export default {
 			var data = {
 				bankId: this.bankId,
 				type: this.typeId,
-				answerList: this.answerList
+				answerList: answerListString
 			};
 			if (this.examId !== null) {
 				data.examId = this.examId;
@@ -485,21 +540,29 @@ export default {
 				data.simulateId = this.bankSectionId;
 			}
 			this.$api.questiondetailrecord(data).then(res => {
-				console.log(res);
 				if (res.data.code === 200) {
-					uni.showModal({
-						title: '提示',
-						content: '提交成功返回上级',
-						showCancel: false,
-						confirmText: '返回上级',
-						success: function(ress) {
-							if (ress.confirm) {
-								uni.navigateBack({
-									delta: 1
-								});
-							}
+					// uni.showModal({
+					// 	title: '提示',
+					// 	content: '提交成功返回上级',
+					// 	showCancel: false,
+					// 	confirmText: '返回上级',
+					// 	success: function(ress) {
+					// 		if (ress.confirm) {
+					// 			uni.navigateBack({
+					// 				delta: 1
+					// 			});
+					// 		}
+					// 	}
+					// });
+					var num = 0;
+					self.list.forEach((item, index) => {
+						if (item.type !== 4) {
+							num++;
 						}
 					});
+					uni.redirectTo({
+						url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${self.typeId}&allIndex=${num}&correct=${correct}&error=${errorz}`
+					});
 				} else {
 					uni.showToast({
 						title: '提交失败',

+ 11 - 1
pages2/course/detail.vue

@@ -181,6 +181,7 @@
 </template>
 
 <script>
+	import {mapGetters} from 'vuex';
 export default {
 	data() {
 		return {
@@ -250,6 +251,7 @@ export default {
 			
 		}	
 	},
+	computed: {...mapGetters(['userInfo'])},
 	onLoad(option) {
 		const Verify = require('@/wxcomponents/verify_mpsdk/main.js');
 		Verify.init();
@@ -480,11 +482,19 @@ export default {
 			});
 		},
 		startVideo() {
-			if (!uni.getStorageSync('union_id') && this.$store.state.token === '') {
+			if (!uni.getStorageSync('union_id')) {
 				uni.navigateTo({
 					url: '/pages/login/login'
 				});
 			} else {
+				if(this.userInfo.certified!=1){
+					uni.showToast({
+						title: '请先实名认证',
+						icon: 'none',
+						duration: 2000
+					});
+					return
+				}
 				//模拟今天是否人脸识别
 				if (!this.faceGetState) {
 					let time = (new Date()).getTime()/1000

+ 2 - 1
pages2/wd/edu_info.vue

@@ -127,7 +127,8 @@
 				this.fileList = lists;
 			},
 			submitForm(){
-				if(this.schoolInfo.schoolName==''){
+				console.log(this.schoolInfo)
+				if(!this.schoolInfo.schoolName){
 					uni.showModal({
 						title: "提示",
 						content: '学校名不能为空',

+ 68 - 14
pages2/wd/ranking.vue

@@ -14,15 +14,23 @@
 					</u-col>
 					<u-col span="5">
 						<view style="vertical-align: middle;display: flex;">
-							<image src="/static/avatar.png" style="width: 80rpx;height: 80rpx;"></image>
-							<view class="r_t2">李宏杰</view>
+							<image :src="userInfo!=null?$method.splitImgHost(userInfo.avatar):''" style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
+							<view class="r_t2">{{userInfo.nickname}}</view>
 						</view>
 					</u-col>
-					<u-col span="5">
+					<u-col span="5" v-if="current==0">
 						<view style="color: #0183FE;font-size: 28rpx;">
 							<view style="line-height: 80rpx;">
-								<text>第15名</text>
-								<text style="margin-left: 30rpx;">12h</text>
+								<text>第{{info.rank}}名</text>
+								<text style="margin-left: 30rpx;">{{info.hourse}}h</text>
+							</view>
+						</view>
+					</u-col>
+					<u-col span="5" v-if="current==1">
+						<view style="color: #0183FE;font-size: 28rpx;">
+							<view style="line-height: 80rpx;">
+								<text>第{{info2.rank}}名</text>
+								<text style="margin-left: 30rpx;">{{info2.hourse}}h</text>
 							</view>
 						</view>
 					</u-col>
@@ -46,7 +54,7 @@
 					</u-row>
 				</view>
 				<scroll-view class='main-scroll' scroll-y  >
-					<view v-for="(item,index) in list2" :key="index" class="rank_item">
+					<view v-for="(item,index) in list2" :key="index" class="rank_item" v-if="current==0">
 						<u-row >
 							<u-col span="2" text-align="center">
 								<view class="rank_t3">
@@ -58,16 +66,36 @@
 							</u-col>
 							<u-col span="8" >
 								<view style="vertical-align: middle;display: flex;">
-									<image src="/static/avatar.png" style="width: 80rpx;height: 80rpx;"></image>
-									<view class="rank_t4" style="padding-left: 30rpx;">陈政</view>
+									<image :src="$method.splitImgHost(item.avatar)" style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
+									<view class="rank_t4" style="padding-left: 30rpx;">{{item.nickname}}</view>
 								</view>
 							</u-col>
 							<u-col span="2" text-align="left">
-								<view class="rank_t4">72h</view>
+								<view class="rank_t4">{{item.hourse}}h</view>
+							</u-col>
+						</u-row>
+					</view>
+					<view v-for="(item,index) in list3" :key="index" class="rank_item" v-if="current==1">
+						<u-row >
+							<u-col span="2" text-align="center">
+								<view class="rank_t3">
+									<image src="/static/sort_1.png" class="rank_img" v-if="index==0"></image>
+									<image src="/static/sort_2.png" class="rank_img" v-if="index==1"></image>
+									<image src="/static/sort_3.png" class="rank_img" v-if="index==2"></image>
+									<view v-if="index>2" class="rank_t5">{{index+1}}</view>
+								</view>
+							</u-col>
+							<u-col span="8" >
+								<view style="vertical-align: middle;display: flex;">
+									<image :src="$method.splitImgHost(item.avatar)" style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
+									<view class="rank_t4" style="padding-left: 30rpx;">{{item.nickname}}</view>
+								</view>
+							</u-col>
+							<u-col span="2" text-align="left">
+								<view class="rank_t4">{{item.hourse}}h</view>
 							</u-col>
 						</u-row>
 					</view>
-					
 				</scroll-view>
 				
 			</view>
@@ -76,6 +104,7 @@
 </template>
 
 <script>
+		import {mapGetters} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -85,21 +114,46 @@
 					name: '总榜'
 				}],
 				current: 0,
-				list2:[1,1,1,1,1,1,1,1,1,1,1],
+				list2:[],
+				list3:[],
+				info:{
+					hourse:0,
+					rank:0
+				},
+				info2:{
+					hourse:0,
+					rank:0
+				},
 			}
 		},
 		onLoad(option) {
-			
+		//	this.rankList()
+		//	this.rankList2()
 		},
 		onShow(){
 		},
 		methods: {
 			change(index) {
 				this.current = index;
-			}
+			},
+			rankList(){
+				let self = this
+				this.$api.rankList({status:0}).then(res => {
+			//		self.info = res.data.data
+			//		self.list2 = res.data.data.ranKingUsers
+				});
+			},
+			rankList2(){
+				let self = this
+				this.$api.rankList({status:1}).then(res => {
+			//		self.info2 = res.data.data
+			//		self.list3 = res.data.data.ranKingUsers
+					console.log(self.info2,333)
+				});
+			},
 		
 		},
-		
+		computed: {...mapGetters(['userInfo'])}
 	}
 </script>
 

BIN
static/goods.png