Browse Source

Merge branch '2025鹅状元数学' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025鹅状元数学

tanxue 3 weeks ago
parent
commit
66f5589b8c
2 changed files with 49 additions and 7 deletions
  1. 2 2
      pages/chanpinXuanze/components/shuxueList.vue
  2. 47 5
      pages/chanpinXuanze/cp2/card.vue

+ 2 - 2
pages/chanpinXuanze/components/shuxueList.vue

@@ -2,8 +2,7 @@
 	<view class="sx-card-list" v-if="list.length">
 	<view class="sx-card-list" v-if="list.length">
     <template  v-for="{chanpin,value:item} in list">
     <template  v-for="{chanpin,value:item} in list">
      <cp1 v-if="chanpin == 'tujiemuti'" :item="item" :key="item.chanpinId"></cp1>
      <cp1 v-if="chanpin == 'tujiemuti'" :item="item" :key="item.chanpinId"></cp1>
-	 <view class="ezy-no-more">没有更多</view>
-<!--      <cp2 v-if="chanpin == 'tujiemuti333'" :item="item" :key="item.chanpinId"></cp2>-->
+     <cp2 v-if="chanpin == 'jisuantexun'" :item="item" :key="item.chanpinId"></cp2>
     </template>
     </template>
 
 
 	</view>
 	</view>
@@ -16,6 +15,7 @@
 <script setup>
 <script setup>
 
 
 import cp1 from '../cp1/card.vue';
 import cp1 from '../cp1/card.vue';
+import cp2 from '../cp2/card.vue';
 
 
 	const props = defineProps({
 	const props = defineProps({
 		list: {
 		list: {

+ 47 - 5
pages/chanpinXuanze/cp2/card.vue

@@ -1,11 +1,53 @@
 <template>
 <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>
 </template>
 
 
-<script>
-export default {
-  name: "card.vue"
-}
+<script setup>
+	import * as jisuanHttp from "@/api/chanpinJiSuanTeXun.js"
+	import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+	import cacheManager from "@/utils/cacheManager.js";
+	const porps = defineProps({
+		item: {
+			type: Object
+		}
+	})
+
+	// 选择产品等级
+	function handleSelect(item) {
+		const opt = {
+			dengjiId: item.dengjiId,
+		}
+		jisuanHttp.getChanpin2DengjiSave(opt).then(res => {
+			if (!res.data) {
+				return;
+			}
+			cacheManager.get('contentInfo') && cacheManager.remove('contentInfo');
+			// 跳转
+			uni.switchTab({
+				url: "/pages/chanpinneirong/index"
+			})
+		})
+	}
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>