Browse Source

update bug调整

wangxy 3 months ago
parent
commit
bcd536d1d6
1 changed files with 20 additions and 6 deletions
  1. 20 6
      pages/newEnglish/index.vue

+ 20 - 6
pages/newEnglish/index.vue

@@ -134,18 +134,32 @@
 	function nextWord() {
 		const index = data.wordList.findIndex(item => item.id == data.activeId);
 		if (index < data.wordList.length - 1) {
-			uni.redirectTo({
-				url: `/pages/newEnglish/index?jieId=${data.jieId}&wordId=${data.wordList[index + 1].id }`
-			})
+				if (userCode !== 'Visitor') {
+					uni.redirectTo({
+						url: `/pages/newEnglish/index?jieId=${data.jieId}&wordId=${data.wordList[index + 1].id }`
+					})
+				} else {
+					uni.redirectTo({
+						url: `/pages/newEnglish/index?jieId=${data.jieId}&wordId=${data.wordList[index + 1].id }&levelId=${data.levelId}&typeId=${data.typeId}&subjectId=${data.subjectId}&tipFlag=${data.tipFlag}&youkeZhangId=${data.youkeZhangId}`
+					})
+				}
+		
 		}
 	}
 
 	function prevWord() {
 		const index = data.wordList.findIndex(item => item.id == data.activeId);
 		if (index > 0) {
-			uni.redirectTo({
-				url: `/pages/newEnglish/index?jieId=${data.jieId}&wordId=${data.wordList[index - 1].id }`
-			})
+			if (userCode !== 'Visitor') {
+				uni.redirectTo({
+					url: `/pages/newEnglish/index?jieId=${data.jieId}&wordId=${data.wordList[index - 1].id }`
+				})
+			} else {
+				uni.redirectTo({
+					url: `/pages/newEnglish/index?jieId=${data.jieId}&wordId=${data.wordList[index - 1].id }&levelId=${data.levelId}&typeId=${data.typeId}&subjectId=${data.subjectId}&tipFlag=${data.tipFlag}&youkeZhangId=${data.youkeZhangId}`
+				})
+			}
+		
 		}
 	}