|
@@ -18,9 +18,11 @@
|
|
|
<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">
|
|
|
+ <!-- num -->
|
|
|
<view class="word-num-box">
|
|
|
<icon></icon><text>{{citem.studyCount || 0}}/{{citem.count || 0}}词</text>
|
|
|
</view>
|
|
|
+
|
|
|
<!-- 单词 -->
|
|
|
<view class="word-list-item" v-for="(item,index) in citem.wordList" :key="index"
|
|
|
@click="toWord(item)" :class="{active: item.wcFlag == 1}">
|
|
@@ -44,6 +46,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 没有单词 -->
|
|
|
+ <view class="no-word-box" v-else>
|
|
|
+ 暂无单词
|
|
|
+ </view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
|
|
@@ -91,11 +97,10 @@
|
|
|
handleTouchEnd,
|
|
|
userCode
|
|
|
} = useSwiper(listData, (userCode) => {
|
|
|
- console.log('userCode',userCode)
|
|
|
// 非VIP
|
|
|
- if (userCode.value == 'Not-Vip') {
|
|
|
+ if (userCode == 'Not-Vip') {
|
|
|
goPayDialogRef.value.handleShow();
|
|
|
- }else if(userCode.value == 'Visitor'){
|
|
|
+ }else if(userCode == 'Visitor'){
|
|
|
// 游客
|
|
|
youkeDialogRef.value.handleShow();
|
|
|
}
|
|
@@ -121,6 +126,7 @@
|
|
|
});
|
|
|
|
|
|
function handleSwiperChange(e) {
|
|
|
+ listData.activeIndex = e.detail.current;
|
|
|
if (!swiperData.isAllowed) {
|
|
|
// 不满足条件时回退到原索引
|
|
|
nextTick(() => {
|
|
@@ -128,12 +134,10 @@
|
|
|
});
|
|
|
swiperData.isAllowed = false; // 重置状态
|
|
|
}
|
|
|
- if (userCode.value == 'VIP') {
|
|
|
- console.log('VIPVIPVIP');
|
|
|
- listData.activeIndex = e.detail.current;
|
|
|
+ if (userCode == 'VIP') {
|
|
|
+ findWordLeft(listData.activeIndex)
|
|
|
handleTitleClick(listData.jieNumberList[listData.activeIndex])
|
|
|
}
|
|
|
- findWordLeft(listData.activeIndex)
|
|
|
}
|
|
|
|
|
|
|