|
@@ -13,9 +13,9 @@
|
|
|
:key="item.jieId" :class="{active: listData.activeIndex == index}">Unit{{item.number}}</view>
|
|
|
</scroll-view>
|
|
|
|
|
|
- <swiper class="word-view-swiper-box" :indicator-dots="false" :autoplay="false" :circular="false"
|
|
|
+ <swiper class="word-list-swiper-box" :indicator-dots="false" :autoplay="false" :circular="false"
|
|
|
@change="handleSwiperChange" :disable-touch="!swiperData.isAllowed">
|
|
|
- <swiper-item v-for="citem in unitList" :key="citem.jieId" @touchstart="handleTouchStart"
|
|
|
+ <swiper-item class="word-list-swiper-item" v-for="citem in unitList" :key="citem.jieId" @touchstart="handleTouchStart"
|
|
|
@touchend="handleTouchEnd">
|
|
|
<view class="word-list-body" v-if="citem.wordList && citem.wordList.length > 0">
|
|
|
<view class="word-num-box">
|
|
@@ -112,7 +112,6 @@
|
|
|
onLoad((options) => {
|
|
|
routerOpt = options;
|
|
|
if (!cacheManager.get('auth')) {
|
|
|
-
|
|
|
// 游客
|
|
|
const youkeData = JSON.parse(routerOpt.youkePageData)
|
|
|
info.levelId = youkeData.levelId;
|
|
@@ -122,9 +121,9 @@
|
|
|
} else {
|
|
|
// 获取缓存
|
|
|
[info.levelId, info.zhangId] = getDataFromStr(cacheManager.get('auth').levelId)
|
|
|
-
|
|
|
// 非游客
|
|
|
wordJieId = routerOpt.jieId
|
|
|
+ console.log(wordJieId,'routerOpt.jieId');
|
|
|
getWordListData();
|
|
|
}
|
|
|
});
|
|
@@ -178,6 +177,7 @@
|
|
|
}
|
|
|
|
|
|
function handleTitleClick(item) {
|
|
|
+ console.log(item,'item');
|
|
|
if (!cacheManager.get('auth')) {
|
|
|
youkeDialogRef.value.handleShow();
|
|
|
} else {
|
|
@@ -203,22 +203,7 @@
|
|
|
}
|
|
|
|
|
|
function getWordListData() {
|
|
|
- /* const opt = {
|
|
|
- jieId: wordJieId
|
|
|
- };
|
|
|
- getWordList(opt).then(res => {
|
|
|
- if (res.code === 0) {
|
|
|
- listData.count = res.data.count;
|
|
|
- listData.studyCount = res.data.studyCount;
|
|
|
- listData.jieNumberList = res.data.jieNumberList;
|
|
|
- listData.title = res.data.title;
|
|
|
- listData.wordList = res.data.wordList;
|
|
|
- listData.activeIndex = findIndexByJieId(listData.jieNumberList,wordJieId);
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- toast("获取单词列表数据失败");
|
|
|
- }); */
|
|
|
-
|
|
|
+ console.log('wordJieId.value',wordJieId.value);
|
|
|
const opt = {
|
|
|
levelId: info.levelId,
|
|
|
zhangId: info.zhangId,
|
|
@@ -230,7 +215,7 @@
|
|
|
unitList.value = res.data.jieWordsList;
|
|
|
listData.jieNumberList = res.data.jieNumberList;
|
|
|
unitList.value.forEach(item => {
|
|
|
- if (item.jieId == wordJieId.value) {
|
|
|
+ if (item.jieId == wordJieId) {
|
|
|
listData.activeIndex = findIndexByJieId(listData.jieNumberList, wordJieId);
|
|
|
}
|
|
|
})
|