|
@@ -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')
|