2 次代码提交 862b95111b ... f91fa45345

作者 SHA1 备注 提交日期
  wangxy f91fa45345 Merge remote-tracking branch 'origin/2025鹅状元数学' into 2025鹅状元数学 1 天之前
  wangxy 3b580d2bbc 超级单词选择修改 1 天之前

+ 2 - 0
pages/chanpinXuanze/components/yingyuList.vue

@@ -2,6 +2,7 @@
 	<view class="sx-card-list" v-if="list.length">
     <template  v-for="{chanpin,value:item} in list" :item="item">
      <cardVue v-if="chanpin == 'ziranpindu'" :item="item" :key="item.chanpinId"></cardVue>
+     <cp4 v-if="chanpin == 'chaojidanci'" :item="item" :key="item.chanpinId"></cp4>
     </template>
     <view class="ezy-no-more">没有更多</view>
 	</view>
@@ -13,6 +14,7 @@
 
 <script setup>
   import cardVue from '../cp3/card.vue';
+  import cp4 from "../cp4/card.vue";
 
 	const props = defineProps({
 		list: {

+ 84 - 0
pages/chanpinXuanze/cp4/banben.vue

@@ -0,0 +1,84 @@
+<template>
+  <view class="ezy-xbb-page">
+    <view class="icon-title-navBar-box">
+      <view class="nav-bar-icon" @click="handleBack"></view>
+      <view class="nav-bar-title">选择版本</view>
+    </view>
+
+    <view class="xbb-list-box">
+      <template v-if="data.banbenList.length">
+        <ezyActiveVue class="ezy-list-item-active xbb-item-box" v-for="item in data.banbenList" :key="item.id"
+                      @aclick="handleSelect(item)">
+          <!-- 封面 -->
+          <image class="item-img-box" :src="item.cover" mode=""></image>
+          <view class="item-content-box">
+            <!-- 名称+等级 -->
+            <view class="item-name">{{ item.chanpinName }} {{ item.dengjiName }}</view>
+            <!-- 版本名称 -->
+            <view class="item-bb">{{ item.name }}</view>
+          </view>
+          <view class="item-play-btn"></view>
+        </ezyActiveVue>
+		<view class="ezy-no-more">没有更多</view>
+      </template>
+      <template v-else>
+        <view class="shiti-frame-box">
+          <view class="ezy-no-sj">
+            <icon></icon>
+            <text>暂无数据</text>
+          </view>
+        </view>
+      </template>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import {reactive} from "vue";
+import {onLoad} from "@dcloudio/uni-app"
+import * as shuxueHttp from "@/api/chanpinShuxue.js"
+import cacheManager from "@/utils/cacheManager.js";
+import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+
+const data = reactive({
+  dengjiId: null,
+  banbenList: []
+})
+
+function getBanbenList() {
+  shuxueHttp.getShuxueChanpinBanbenList({dengjiId: data.dengjiId}).then(res => {
+    data.banbenList = res.data;
+  })
+}
+
+function handleBack() {
+  uni.switchTab({
+    url: `/pages/chanpinXuanze/index`
+  })
+}
+
+function handleSelect(item) {
+  const opt = {
+    banbenId: item.id,
+  }
+  shuxueHttp.getShuxueChanpinBanbenSave(opt).then(res => {
+    if (!res.data) { return;}
+    cacheManager.get('contentInfo') && cacheManager.remove('contentInfo');
+    // 跳转
+    uni.switchTab({
+      url: "/pages/chanpinneirong/index"
+    })
+  })
+}
+
+onLoad((options) => {
+  data.dengjiId = options.dengjiId;
+  getBanbenList();
+})
+
+
+</script>
+
+<style>
+
+</style>

+ 44 - 0
pages/chanpinXuanze/cp4/card.vue

@@ -0,0 +1,44 @@
+<template>
+  <view class="sx-card-box">
+    <view class="card-head-box">
+      <!-- 封面 -->
+      <image :src="item.cover" class="head-img"></image>
+      <view class="head-right-box">
+        <!-- 名称 -->
+        <view class="head-title">{{item.name}}</view>
+        <!-- 简介 -->
+        <view class="head-content">{{item.intro}}</view>
+        <!-- 共计 -->
+        <view class="head-content">{{item.gongji}}</view>
+      </view>
+    </view>
+    <view class="card-body-box">
+      <view class="body-title">请选择学习等级</view>
+      <view class="dj-item-row">
+        <ezyActiveVue v-for="cItem in item.levelList" class="ezy-btn-active dj-item" @aclick="handleSelect(cItem)" :class="{active: cItem.active}">{{cItem.levelName}}</ezyActiveVue>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+const porps = defineProps({
+  item: {
+    type: Object
+  }
+})
+	// 选择产品等级
+function handleSelect(item) {
+  porps.item.levelList.forEach(citem => {citem.active = false; if (item.dengjiId == citem.dengjiId) {citem.active = true}})
+
+  uni.navigateTo({
+    url: `/pages/chanpinXuanze/cp4/banben?dengjiId=${item.dengjiId}`
+  })
+}
+
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 0
pages/chanpinXuanze/index.vue

@@ -67,6 +67,7 @@
 		shuxueList: [],
 		yingyuList: [],
 		yuwenList: [],
+    danciList: [],
 	})
 	const {isNowDate,resetDate} = useSelectDateForUpdate('xuankeDate')
 
@@ -74,6 +75,7 @@
 		const shuxue = data.shuxue || {};
 		const yingyu = data.yingyu || {};
 		const yuwen = data.yuwen || {};
+        const danci = data.danci || {};
 
 		return {
 			shuxue: Object.entries(shuxue).map(([chanpin, value]) => {