浏览代码

Merge branch '2024鹅状元' of https://gogs.mtavip.com/wangguoyu/uniProject into 2024鹅状元

tanxue 3 月之前
父节点
当前提交
5741a3c67d
共有 1 个文件被更改,包括 16 次插入11 次删除
  1. 16 11
      pages/selectGradesTerms/index.vue

+ 16 - 11
pages/selectGradesTerms/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="grades-terms-page">
+	<view class="grades-terms-page" @touchmove.stop.prevent>
 		<view class="icon-title-navBar-box">
 			<!-- 返回按钮↓ -->
 			<view class="nav-bar-icon" @click="handleBack"></view>
@@ -106,11 +106,11 @@
 					data.activeProduct = null;
 					data.activeXueke = 1
 				}
-				
-				nextTick(() => {
-					// 滚动到某个元素显示
-					data.scrollTop = `s_${data.activeProduct}`
-				})
+
+        setTimeout(() => {
+          // 滚动到某个元素显示
+          data.scrollTop = `s_${data.activeProduct}`
+        }, 100)
 			})
 		}
 
@@ -177,11 +177,16 @@
 
 		function handleBack() {
 			if (userCode !== 'Visitor') {
-				
-				if (!data.activeProduct) {
-					return;
-				}
-				
+
+        const auth = cacheManager.get('auth');
+
+        if (!data.activeProduct && !auth.levelId) {
+          uni.showToast({
+            title:'请选择内容'
+          })
+          return;
+        }
+
 				uni.redirectTo({
 					url: `/pages/study/index`
 				})