Преглед изворни кода

Merge remote-tracking branch 'origin/2024鹅状元' into 2024鹅状元

wangxy пре 7 месеци
родитељ
комит
ff2c5a4986
4 измењених фајлова са 47 додато и 33 уклоњено
  1. 44 31
      pages/my/index.vue
  2. 1 1
      pages/study/index.vue
  3. 1 1
      pages/study/lookShipin.vue
  4. 1 0
      utils/request.js

+ 44 - 31
pages/my/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="lli-develop-expect-page">
-			<button class="lli-btn" @click="quitClick">退出登录</button>
-					<CustomTabBar></CustomTabBar>
+		<button class="lli-btn" @click="quitClick">退出登录</button>
+		<CustomTabBar></CustomTabBar>
 	</view>
 </template>
 
@@ -9,36 +9,49 @@
 	import {
 		logout
 	} from '@/api/login.js'
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import { getCurrentInstance } from 'vue';
-	import {
-		onLoad,
+	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
+	import {
+		getCurrentInstance
+	} from 'vue';
+	import {
+		onLoad,
 	} from '@dcloudio/uni-app';
-	const quitClick = ()=>{
+	const quitClick = () => {
 		uni.showModal({
-		        title: '提示',
-		        content: '你确定要执行这个操作吗?',
-		        success: (res) => {
-		          if (res.confirm) {
-		            quit();
-		          } else if (res.cancel) {
-		            // 用户点击了取消按钮
-		            console.log('用户点击了取消');
-		          }
-		        }
-		      });
-		
-		 }
-		 const quit = ()=>{
-		 			uni.navigateTo({
-		 				url: '/pages/login/index'
-		 			});
-		 		
-		 		 }
-		 onLoad((options) => {
-			const instance = getCurrentInstance();
-		 	console.log(instance.appContext.config.globalProperties)
-		 })
+			title: '提示',
+			content: '你确定要执行这个操作吗?',
+			success: (res) => {
+				if (res.confirm) {
+					quit();
+				} else if (res.cancel) {
+					// 用户点击了取消按钮
+					console.log('用户点击了取消');
+				}
+			}
+		});
+
+	}
+
+
+
+
+	const quit = () => {
+
+		uni.removeStorage({
+			key: 'Mta-Auth',
+			success: function(res) {
+				console.log('success');
+				uni.navigateTo({
+					url: '/pages/login/index'
+				});
+			}
+		});
+
+	}
+	onLoad((options) => {
+		const instance = getCurrentInstance();
+		console.log(instance.appContext.config.globalProperties)
+	})
 	// import { ref, onMounted } from 'vue';
 	//
 	// const listData = ref([]);
@@ -72,4 +85,4 @@
 
 <style>
 
-</style>
+</style>

+ 1 - 1
pages/study/index.vue

@@ -344,7 +344,7 @@ import { toast } from "../../utils/common";
 
 	function clickGradeTerm() {
 		uni.navigateTo({
-			url: '/pages/selectGradesTerms/index'
+			url:  `/pages/selectGradesTerms/index?&nianji=${routeParams.value.nianji}&xueqi=${routeParams.value.xueqi}`,
 		})
 	}
 

+ 1 - 1
pages/study/lookShipin.vue

@@ -229,7 +229,7 @@
 					player.tag.play();
 
 				});
-				player.one('ended', function() {
+				player.on('ended', function() {
 				that.$ownerInstance.callMethod('playEnd', {data:'end'})
 					// uni.$emit('playEnd', {
 					// 	data: 'end'

+ 1 - 0
utils/request.js

@@ -68,6 +68,7 @@ const request = config => {
 					})
 					reject('无效的会话,或者会话已过期,请重新登录。')
 				} else if (code === 500) {
+					toast("数据异常-500")
 					reject('500')
 				} else if (code !== 0) {
 					//   toast(msg)