tanxue преди 3 седмици
родител
ревизия
1701c856dc

+ 12 - 0
api/my.js

@@ -23,6 +23,18 @@ export function getUserInfo(data = {}) {
   })
 }
 
+export function logout(data = {}) {
+  return request({
+    'url': '/app/user/logout',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
 export function getUserUpPassword(data = {}) {
   return request({
     'url': '/app/user/update/password',

+ 1 - 6
components/custom-scroll-list/custom-scroll-list-chengji.vue

@@ -8,7 +8,7 @@
 			@click="onTavChange(item)">{{item.label}}</text>
 	</view>
 	<!-- 无限滚动区域 -->
-	<scroll-view class="scroll-container" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
+	<scroll-view class="mobile-chengji-scroll-box" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
 		:refresher-threshold="100" refresher-background="#F3F3F4" @refresherrefresh="onRefresh"
 		@scrolltolower="onReachBottom" @refresherrestore="onRestore">
 		<slot :list="list"></slot>
@@ -219,8 +219,3 @@
 	})
 </script>
 
-<style lang="scss">
-	.scroll-container {
-		height: calc(100vh - 220rpx)
-	}
-</style>

+ 1 - 1
components/custom-scroll-list/custom-scroll-list.vue

@@ -8,7 +8,7 @@
 			@click="onTavChange(item)">{{item.label}}</text>
 	</view>
 	<!-- 无限滚动区域 -->
-	<scroll-view class="scroll-container" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
+	<scroll-view class="mobile-scroll-box" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
 		:refresher-threshold="100" refresher-background="#F3F3F4" @refresherrefresh="onRefresh"
 		@scrolltolower="onReachBottom" @refresherrestore="onRestore">
 		<slot :list="list"></slot>

+ 0 - 62
components/score-list-card-baoming/score-list-card-baoming.vue

@@ -111,65 +111,3 @@ function btnClick(data) {
 }
 </script>
 
-<style lang="scss" scoped>
-.mobile-card-box {
-  box-sizing: border-box;
-  margin: 0 30rpx 10rpx;
-  border-bottom: 2rpx solid #f2f1f2;
-  padding-bottom: 30rpx;
-}
-
-.mobile-card-title {
-  color: #333;
-  font-size: 32rpx;
-  font-weight: 500;
-  margin: 24rpx 0 24rpx 0;
-  text-overflow: ellipsis;
-  -o-text-overflow: ellipsis;
-  overflow: hidden;
-  word-wrap: break-word;
-  display: -webkit-box;
-  white-space: normal;
-  -webkit-box-orient: vertical;
-  text-align: justify;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  line-height: 48rpx;
-}
-
-// 行
-.mobile-card-row {
-  margin-bottom: 32rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-end;
-
-  text {
-    font-size: 28rpx;
-    line-height: 40rpx;
-  }
-
-  // 得分
-  .mobile-card-score {
-    font-size: 40rpx;
-    color: #f10a0a;
-  }
-
-  // 分数(有最小宽度)
-  .card-score-box {
-    min-width: 240rpx;
-    text-align: left;
-  }
-}
-
-// 按钮
-.mobile-card-btn {
-  width: 60%;
-  height: 80rpx;
-  line-height: 80rpx;
-  margin: 50rpx auto;
-  background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
-  border-radius: 80rpx;
-  display: block;
-}
-</style>

+ 11 - 69
components/scroll-list-card-chengji/scroll-list-card-chengji.vue

@@ -1,14 +1,18 @@
 <template>
 	<view class="scroll-list-card mobile-card-box">
-		<view>
+		<!-- <view>
 			<img style="width: 100rpx;height: 100rpx;;" :src="data.pic" alt="" />
+		</view> -->
+		<view class="mobile-card-title">{{data.ksName}}</view>
+		<view class="mobile-card-row">
+			<view class="timeSpan">总分:{{data.ksScore === null ? '': data.ksScore}}</view>
+			<view class="timeSpan">得分:{{data.userScore === null ? '' : data.userScore}}</view>
 		</view>
-		<text>{{data.ksName}}</text>
-		<view class="timeSpan">总分:{{data.ksScore === null ? '': data.ksScore}}</view>
-		<view class="timeSpan">得分:{{data.userScore === null ? '' : data.userScore}}</view>
-		<view class="timeSpan">及格分:{{data.okScore=== null ? '': data.okScore}}</view>
-		<view class="timeSpan">时间:{{data.answerStartTime === null ? '': data.answerStartTime}}</view>
-		<view @click="lookShijuan(data)">查看试卷</view>
+		<view class="mobile-card-row">
+			<view class="timeSpan">及格分:{{data.okScore=== null ? '': data.okScore}}</view>
+			<view class="timeSpan">时间:{{data.answerStartTime === null ? '': data.answerStartTime}}</view>
+		</view>
+		<button class="mobile-card-btn" @click="lookShijuan(data)">查看试卷</button>
 	<!-- 	<view @click="lookPaiming(data)">查看排名</view> -->
 	</view>
 </template>
@@ -38,65 +42,3 @@
 	}
 </script>
 
-<style lang="scss" scoped>
-	.mobile-card-box {
-		box-sizing: border-box;
-		margin: 0 30rpx 10rpx;
-		border-bottom: 2rpx solid #f2f1f2;
-		padding-bottom: 30rpx;
-	}
-
-	.mobile-card-title {
-		color: #333;
-		font-size: 32rpx;
-		font-weight: 500;
-		margin: 24rpx 0 24rpx 0;
-		text-overflow: ellipsis;
-		-o-text-overflow: ellipsis;
-		overflow: hidden;
-		word-wrap: break-word;
-		display: -webkit-box;
-		white-space: normal;
-		-webkit-box-orient: vertical;
-		text-align: justify;
-		-webkit-line-clamp: 2;
-		line-clamp: 2;
-		line-height: 48rpx;
-	}
-
-	// 行
-	.mobile-card-row {
-		margin-bottom: 32rpx;
-		display: flex;
-		justify-content: space-between;
-		align-items: flex-end;
-
-		text {
-			font-size: 28rpx;
-			line-height: 40rpx;
-		}
-
-		// 得分
-		.mobile-card-score {
-			font-size: 40rpx;
-			color: #f10a0a;
-		}
-
-		// 分数(有最小宽度)
-		.card-score-box {
-			min-width: 240rpx;
-			text-align: left;
-		}
-	}
-
-	// 按钮
-	.mobile-card-btn {
-		width: 60%;
-		height: 80rpx;
-		line-height: 80rpx;
-		margin: 50rpx auto;
-		background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
-		border-radius: 80rpx;
-		display: block;
-	}
-</style>

+ 0 - 62
components/scroll-list-card-kecheng/scroll-list-card-kecheng.vue

@@ -20,65 +20,3 @@ const props = defineProps({
 const { data } = toRefs(props);
 </script>
 
-<style lang="scss" scoped>
-.mobile-card-box {
-  box-sizing: border-box;
-  margin: 0 30rpx 10rpx;
-  border-bottom: 2rpx solid #f2f1f2;
-  padding-bottom: 30rpx;
-}
-
-.mobile-card-title {
-  color: #333;
-  font-size: 32rpx;
-  font-weight: 500;
-  margin: 24rpx 0 24rpx 0;
-  text-overflow: ellipsis;
-  -o-text-overflow: ellipsis;
-  overflow: hidden;
-  word-wrap: break-word;
-  display: -webkit-box;
-  white-space: normal;
-  -webkit-box-orient: vertical;
-  text-align: justify;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  line-height: 48rpx;
-}
-
-// 行
-.mobile-card-row {
-  margin-bottom: 32rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-end;
-
-  text {
-    font-size: 28rpx;
-    line-height: 40rpx;
-  }
-
-  // 得分
-  .mobile-card-score {
-    font-size: 40rpx;
-    color: #f10a0a;
-  }
-
-  // 分数(有最小宽度)
-  .card-score-box {
-    min-width: 240rpx;
-    text-align: left;
-  }
-}
-
-// 按钮
-.mobile-card-btn {
-  width: 60%;
-  height: 80rpx;
-  line-height: 80rpx;
-  margin: 50rpx auto;
-  background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
-  border-radius: 80rpx;
-  display: block;
-}
-</style>

+ 6 - 66
components/scroll-list-card-kechengji/scroll-list-card-kechengji.vue

@@ -1,11 +1,13 @@
 <template>
 	<view class="scroll-list-card mobile-card-box">
-		<view>
+		<!-- <view>
 			<img style="width: 100rpx;height: 100rpx;;" :src="data.pic" alt="" />
+		</view> -->
+		<view class="mobile-card-title">{{data.kcName === null ? '':data.kcName}}</view>
+		<view class="mobile-card-row">
+			<view class="timeSpan">时间:{{data.answerStartTime === null ? '': data.answerStartTime}}</view>
+			<view class="timeSpan">总分:{{data.ksScore === null ? '': data.ksScore}}</view>
 		</view>
-		<text>{{data.kcName === null ? '':data.kcName}}</text>
-		<view class="timeSpan">时间:{{data.answerStartTime === null ? '': data.answerStartTime}}</view>
-		<view class="timeSpan">总分:{{data.ksScore === null ? '': data.ksScore}}</view>
 	</view>
 </template>
 
@@ -26,65 +28,3 @@
 	} = toRefs(props);
 </script>
 
-<style lang="scss" scoped>
-	.mobile-card-box {
-		box-sizing: border-box;
-		margin: 0 30rpx 10rpx;
-		border-bottom: 2rpx solid #f2f1f2;
-		padding-bottom: 30rpx;
-	}
-
-	.mobile-card-title {
-		color: #333;
-		font-size: 32rpx;
-		font-weight: 500;
-		margin: 24rpx 0 24rpx 0;
-		text-overflow: ellipsis;
-		-o-text-overflow: ellipsis;
-		overflow: hidden;
-		word-wrap: break-word;
-		display: -webkit-box;
-		white-space: normal;
-		-webkit-box-orient: vertical;
-		text-align: justify;
-		-webkit-line-clamp: 2;
-		line-clamp: 2;
-		line-height: 48rpx;
-	}
-
-	// 行
-	.mobile-card-row {
-		margin-bottom: 32rpx;
-		display: flex;
-		justify-content: space-between;
-		align-items: flex-end;
-
-		text {
-			font-size: 28rpx;
-			line-height: 40rpx;
-		}
-
-		// 得分
-		.mobile-card-score {
-			font-size: 40rpx;
-			color: #f10a0a;
-		}
-
-		// 分数(有最小宽度)
-		.card-score-box {
-			min-width: 240rpx;
-			text-align: left;
-		}
-	}
-
-	// 按钮
-	.mobile-card-btn {
-		width: 60%;
-		height: 80rpx;
-		line-height: 80rpx;
-		margin: 50rpx auto;
-		background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
-		border-radius: 80rpx;
-		display: block;
-	}
-</style>

+ 0 - 62
components/scroll-list-card-zhengshu/scroll-list-card-zhengshu.vue

@@ -27,65 +27,3 @@
 	} = toRefs(props);
 </script>
 
-<style lang="scss" scoped>
-	.mobile-card-box {
-		box-sizing: border-box;
-		margin: 0 30rpx 10rpx;
-		border-bottom: 2rpx solid #f2f1f2;
-		padding-bottom: 30rpx;
-	}
-
-	.mobile-card-title {
-		color: #333;
-		font-size: 32rpx;
-		font-weight: 500;
-		margin: 24rpx 0 24rpx 0;
-		text-overflow: ellipsis;
-		-o-text-overflow: ellipsis;
-		overflow: hidden;
-		word-wrap: break-word;
-		display: -webkit-box;
-		white-space: normal;
-		-webkit-box-orient: vertical;
-		text-align: justify;
-		-webkit-line-clamp: 2;
-		line-clamp: 2;
-		line-height: 48rpx;
-	}
-
-	// 行
-	.mobile-card-row {
-		margin-bottom: 32rpx;
-		display: flex;
-		justify-content: space-between;
-		align-items: flex-end;
-
-		text {
-			font-size: 28rpx;
-			line-height: 40rpx;
-		}
-
-		// 得分
-		.mobile-card-score {
-			font-size: 40rpx;
-			color: #f10a0a;
-		}
-
-		// 分数(有最小宽度)
-		.card-score-box {
-			min-width: 240rpx;
-			text-align: left;
-		}
-	}
-
-	// 按钮
-	.mobile-card-btn {
-		width: 60%;
-		height: 80rpx;
-		line-height: 80rpx;
-		margin: 50rpx auto;
-		background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
-		border-radius: 80rpx;
-		display: block;
-	}
-</style>

+ 1 - 63
components/scroll-list-card/scroll-list-card.vue

@@ -25,7 +25,7 @@
     <!--    button    -->
     <template v-for="item in btns" :key="item.status">
       <button
-        class="lli-btn"
+        class="mobile-card-btn"
         @click="btnClick(data)"
         v-if="item.show"
         :key="item.status"
@@ -111,65 +111,3 @@ function btnClick(data) {
 }
 </script>
 
-<style lang="scss" scoped>
-.mobile-card-box {
-  box-sizing: border-box;
-  margin: 0 30rpx 10rpx;
-  border-bottom: 2rpx solid #f2f1f2;
-  padding-bottom: 30rpx;
-}
-
-.mobile-card-title {
-  color: #333;
-  font-size: 32rpx;
-  font-weight: 500;
-  margin: 24rpx 0 24rpx 0;
-  text-overflow: ellipsis;
-  -o-text-overflow: ellipsis;
-  overflow: hidden;
-  word-wrap: break-word;
-  display: -webkit-box;
-  white-space: normal;
-  -webkit-box-orient: vertical;
-  text-align: justify;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  line-height: 48rpx;
-}
-
-// 行
-.mobile-card-row {
-  margin-bottom: 32rpx;
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-end;
-
-  text {
-    font-size: 28rpx;
-    line-height: 40rpx;
-  }
-
-  // 得分
-  .mobile-card-score {
-    font-size: 40rpx;
-    color: #f10a0a;
-  }
-
-  // 分数(有最小宽度)
-  .card-score-box {
-    min-width: 240rpx;
-    text-align: left;
-  }
-}
-
-// 按钮
-.mobile-card-btn {
-  width: 60%;
-  height: 80rpx;
-  line-height: 80rpx;
-  margin: 50rpx auto;
-  background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
-  border-radius: 80rpx;
-  display: block;
-}
-</style>

+ 6 - 4
pages/my/index.vue

@@ -70,8 +70,9 @@
 <script setup>
 	import {reactive,ref} from "vue";
 	import {toast} from "@/utils/common";
-	import {getMineInfo} from '@/api/my.js'
+	import {getMineInfo,logout} from '@/api/my.js'
 	import {onLoad,onShow} from '@dcloudio/uni-app';
+	import cacheManager from '@/utils/cacheManager.js';
 	import cameraCommon from "@/components/dialog/cameraCommon.vue";
 	import shexiangtoushuoming from "@/components/dialog/shexiangtoushuoming.vue";
 	let myInfoData = reactive({
@@ -186,14 +187,15 @@
 		 }
 		 
 	function quit (){
-			logout().then(res=>{
+			logout().then(res => {
+				console.log(res,'res');
 				toast('退出登录成功')
+				cacheManager.clearAll();
 				uni.navigateTo({
 					url: '/pages/login'
 				});
-				cacheManager.clearAll();
-				
 			}).catch(err => {
+				console.log(err,'err');
 			toast('退出登录失败,请稍后重试')
 		})