wangguoyu 1 месяц назад
Родитель
Сommit
60a2266af3
2 измененных файлов с 17 добавлено и 2 удалено
  1. 1 1
      pages/pay/order.vue
  2. 16 1
      pages/pay/productDialog.vue

+ 1 - 1
pages/pay/order.vue

@@ -39,7 +39,7 @@
 											<!-- 未付款数据对一下  是否有课程包明细 wgy-->
 											<view class="content-money-box">
 												<view class="order-kcb-btn" v-if="item2.type ==1"
-													@click="detailBtn(item2,index2)">课程包明细<icon></icon>
+													@click.stop="detailBtn(item2,index2)">课程包明细<icon></icon>
 												</view>
 												<text class="content-yuanjia">¥{{item2.xianjia}}</text>
 											</view>

+ 16 - 1
pages/pay/productDialog.vue

@@ -7,7 +7,7 @@
 				<icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
 				<view class="product-body-box">
 					<!-- ↓需要换成从接口中取得 wgy -->
-					<view class="detail-item-box" v-for="(item,index) in productList " :key="index">
+					<view class="detail-item-box" @click="goDao(item,index)" v-for="(item,index) in productList " :key="index">
 						<img :src="item.cover" class="mall-image mt-20" />
 						<view class="content-body-box">
 							<view class="content-name">
@@ -33,6 +33,7 @@
 	import {
 		ref
 	} from 'vue';
+		import cacheManager from '@/utils/cacheManager.js';
 	const $emit = defineEmits(['payBtn'])
 	const detailPopup = ref(null); // 索引
 	let productList = ref([])
@@ -42,6 +43,20 @@
 	detailPopup.value.open();
 
 	}
+	 function goDao(data,index){
+		 console.log('data',data);
+		 console.log('index',index);
+		cacheManager.updateObject('auth', {
+			typeId: data.typeId,
+			levelId: data.levelId,
+			subjectId: data.subjectId,
+			currentZhang: 0
+		})
+		cacheManager.remove('daoPageCache')
+		uni.redirectTo({
+			url: `/pages/study/index`
+		})
+	 }
 	// 开启提分之旅按钮
 	function detailPayBtn() {
 		$emit('payBtn')