Commit 7fd867e3 by kyle

学习统计点击不收回去

parent c5a78da9
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</view> </view>
<view class="progressBottomBox"> <view class="progressBottomBox">
<text>{{item.fileTitle}}</text> <text>{{item.fileTitle}}</text>
<i class="iconfont icon-youjiantou" v-if="item.packFileId" @click="userCoursePackBar(item.packFileId,item.orderId)" :style="{transform: item['state'] ? 'rotate(90deg)' : 'rotate(-90deg)' }"></i> <i class="iconfont icon-youjiantou" v-if="item.packFileId" @click="userCoursePackBar(item.packFileId,item.orderId,item.state)" :style="{transform: item['state'] ? 'rotate(90deg)' : 'rotate(-90deg)' }"></i>
</view> </view>
</view> </view>
<!-- 小课 --> <!-- 小课 -->
...@@ -170,12 +170,12 @@ ...@@ -170,12 +170,12 @@
} }
}) })
}, },
userCoursePackBar(packFileId,orderId){ userCoursePackBar(packFileId,orderId,state){
if(!packFileId || !orderId){ if(!packFileId || !orderId){
return false; return false;
} }
this.userStudyCountList.barInfos.forEach(item=>item.state=false); this.userStudyCountList.barInfos.forEach(item=>item.state=false);
this.userStudyCountList.barInfos.filter(item=>item.orderId==orderId)[0].state = true; this.userStudyCountList.barInfos.filter(item=>item.orderId==orderId)[0].state = !state;
api.userCoursePackBar({userId:this.userId,packFileId:packFileId,orderId:orderId}).then(res=>{ api.userCoursePackBar({userId:this.userId,packFileId:packFileId,orderId:orderId}).then(res=>{
if(res['success']){ if(res['success']){
this.userCoursePackBarList = res['data']['barInfos']; this.userCoursePackBarList = res['data']['barInfos'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment