Browse Source

数学产品

wangxy 1 month ago
parent
commit
0f22855137
2 changed files with 29 additions and 12 deletions
  1. 11 0
      api/chanpinShuxue.js
  2. 18 12
      pages/chanpinXuanze/banben.vue

+ 11 - 0
api/chanpinShuxue.js

@@ -21,3 +21,14 @@ export function getShuxueChanpinBanbenList(data = {}) {
         timeout: 20000
         timeout: 20000
     })
     })
 }
 }
+export function getShuxueChanpinBanbenInfo(data = {}) {
+    return request({
+        'url': '/app/shuxue/chanpin/banben/info',
+        headers: {
+            isToken: true
+        },
+        method: 'post',
+        data,
+        timeout: 20000
+    })
+}

+ 18 - 12
pages/chanpinXuanze/banben.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
 	<view>
 	<view>
-		<view>
+		<view class="icon-title-navBar-box">
 			<view @click="handleBack"><</view>
 			<view @click="handleBack"><</view>
-			<view>选择版本</view>
+			<view class="nav-bar-title">选择版本</view>
 		</view>
 		</view>
-		
+
 		<view v-for="item in data.banbenList" :key="item.id">
 		<view v-for="item in data.banbenList" :key="item.id">
 			<!-- 封面 -->
 			<!-- 封面 -->
 			<image :src="item.cover" mode=""></image>
 			<image :src="item.cover" mode=""></image>
@@ -12,19 +12,19 @@
 			<view>{{item.chanpinName}} {{item.dengjiName}}</view>
 			<view>{{item.chanpinName}} {{item.dengjiName}}</view>
 			<!-- 版本名称 -->
 			<!-- 版本名称 -->
 			<view>{{item.name}}</view>
 			<view>{{item.name}}</view>
-			
-			<view>播放按钮</view>
+
+			<view @click="handleSelect(item)">播放按钮</view>
 		</view>
 		</view>
+		<CustomTabBar :currentTabNumber="0"></CustomTabBar>
 	</view>
 	</view>
-	<footTabbarVue :currentTabNumber="0"></footTabbarVue>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
 	import {reactive} from "vue";
 	import {reactive} from "vue";
 	import {onLoad} from "@dcloudio/uni-app"
 	import {onLoad} from "@dcloudio/uni-app"
 	import * as shuxueHttp from "@/api/chanpinShuxue.js"
 	import * as shuxueHttp from "@/api/chanpinShuxue.js"
-	import footTabbarVue from "./components/footTabbar.vue";
-	
+  import CustomTabBar from "@/components/custom-tabbar/custom-tabbar.vue";
+
 	const data = reactive({
 	const data = reactive({
 		dengjiId: null,
 		dengjiId: null,
 		banbenList: []
 		banbenList: []
@@ -34,17 +34,23 @@
 			data.banbenList = res.data;
 			data.banbenList = res.data;
 		})
 		})
 	}
 	}
-	
+
 	function handleBack() {
 	function handleBack() {
 		uni.navigateBack()
 		uni.navigateBack()
 	}
 	}
-	
+
+  function handleSelect(item) {
+    uni.redirectTo({
+      url: `/pages/chanpinXuanze/xuexi?banbenId=${item.id}`
+    })
+  }
+
 	onLoad((options) => {
 	onLoad((options) => {
 		data.dengjiId = options.dengjiId;
 		data.dengjiId = options.dengjiId;
 		getBanbenList();
 		getBanbenList();
 	})
 	})
-	
-	
+
+
 </script>
 </script>
 
 
 <style>
 <style>