Browse Source

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

tanxue 3 weeks ago
parent
commit
6d78da93c9

+ 2 - 2
api/chanpinZiRanPinDu.js

@@ -1,8 +1,8 @@
 import request from '@/utils/request'
 
-export function getPinduChanpinBanbenSave(data = {}) {
+export function getChanpin3DengjiSave(data = {}) {
     return request({
-        'url': '/app/pindu/chanpin/banben/save',
+        'url': '/app/pindu/chanpin/dengji/save',
         headers: {
             isToken: true
         },

+ 0 - 6
pages.json

@@ -72,12 +72,6 @@
 			}
 		},
 		{
-			"path": "pages/chanpinXuanze/cp3/banben",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
 			"path": "pages/xinshuxue/unitTest",
 			"style": {
 				"navigationStyle": "custom"

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

@@ -1,7 +1,7 @@
 <template>
 	<view class="sx-card-list" v-if="list.length">
     <template  v-for="{chanpin,value:item} in list" :item="item">
-     <cardVue v-if="chanpin == 'xxx'" :item="item" :key="item.chanpinId" class="sx-card-box"></cardVue>
+     <cardVue v-if="chanpin == 'ziranpindu1'" :item="item" :key="item.chanpinId" class="sx-card-box"></cardVue>
     </template>
 
 	</view>
@@ -12,7 +12,7 @@
 </template>
 
 <script setup>
-  import cardVue from '../cp1/card.vue';
+  import cardVue from '../cp3/card.vue';
 
 	const props = defineProps({
 		list: {

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

@@ -1,84 +0,0 @@
-<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 pinduHttp from "@/api/chanpinZiRanPinDu.js"
-import cacheManager from "@/utils/cacheManager.js";
-import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
-
-const data = reactive({
-  dengjiId: null,
-  banbenList: []
-})
-
-function getBanbenList() {
-  pinduHttp.getPinduChanpinBanbenList({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,
-  }
-  pinduHttp.getPinduChanpinBanbenSave(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>

+ 17 - 5
pages/chanpinXuanze/cp3/card.vue

@@ -15,27 +15,39 @@
     <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>
+        <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 * as pinduHttp from "@/api/chanpinZiRanPinDu.js"
 import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+import cacheManager from "@/utils/cacheManager.js";
 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/cp3/banben?dengjiId=${item.dengjiId}`
+  const opt = {
+    dengjiId: item.dengjiId,
+  }
+  pinduHttp.getChanpin3DengjiSave(opt).then(res => {
+    if (!res.data) {
+      return;
+    }
+    cacheManager.get('contentInfo') && cacheManager.remove('contentInfo');
+    // 跳转
+    uni.switchTab({
+      url: "/pages/chanpinneirong/index"
+    })
   })
 }
-
 </script>
 
 <style scoped>