|
@@ -19,10 +19,10 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="collapse-content-box">
|
|
|
- <view v-for="(jie,cindex) in item.jieList" class="collapse-content-item">
|
|
|
- <text class="jie-index">{{`${index+1}.${cindex+1}`}}</text>
|
|
|
- <text class="text">{{jie.jieName}}</text>
|
|
|
- </view>
|
|
|
+ <view v-for="(jie,cindex) in item.jieList" class="collapse-content-item" @click="handleJieClick(item,jie,index,cindex)">
|
|
|
+ <text class="jie-index">{{`${index+1}.${cindex+1}`}}</text>
|
|
|
+ <text class="text">{{jie.jieName}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</uni-collapse-item>
|
|
|
</uni-collapse>
|
|
@@ -70,12 +70,35 @@
|
|
|
const activeCollapse = ref('');
|
|
|
const Message = MESSAGE_BEFORE_PAY;
|
|
|
const youkeDialogRef = ref(null);
|
|
|
+ const selectZhang = ref(null);
|
|
|
|
|
|
const props = defineProps({
|
|
|
list: {
|
|
|
type: Array,
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ function handleJieClick(item,jie,index,cindex) {
|
|
|
+ selectZhang.value = item;
|
|
|
+ if (index == 0 && cindex == 0 ) {
|
|
|
+ // 全员可访问 第一章 第一节
|
|
|
+ this.$emit('listSelectJieClick', item,jie);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (AuthCode.value == 'Visitor') {
|
|
|
+ // 游客
|
|
|
+ youkeDialogRef.value.handleShow();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (AuthCode.value == 'Not-Vip') {
|
|
|
+ // 非VIP
|
|
|
+ confirmDialogRef.value.handleShow();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Vip
|
|
|
+ this.$emit('listSelectJieClick', item,jie);
|
|
|
+ }
|
|
|
|
|
|
function catalogueBjFun(){
|
|
|
if(cardId.value ==1){
|
|
@@ -125,6 +148,7 @@
|
|
|
* @param({zhangId:string}) data
|
|
|
*/
|
|
|
function handleSelectZhang(data,index) {
|
|
|
+ selectZhang.value = data;
|
|
|
if(index !=0 && AuthCode.value == 'Visitor'){
|
|
|
// 游客
|
|
|
youkeDialogRef.value.handleShow();
|
|
@@ -140,7 +164,7 @@
|
|
|
handleClose();
|
|
|
}
|
|
|
function handleConfirmPay() {
|
|
|
- const url = `/pages/pay/svip?cardId=${cardId.value}`
|
|
|
+ const url = `/pages/pay/svip?cardId=${cardId.value}&formPage=studyWithCatalgue&selectZhangId=${selectZhang.value.zhangId}`
|
|
|
uni.redirectTo({ url })
|
|
|
}
|
|
|
defineExpose({
|