wangxy 6 dagar sedan
förälder
incheckning
2bb6417ea9

+ 37 - 0
api/shop.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+export function getAppShopIndex(data = {}) {
+	return request({
+		url: "/app/shop/index",
+		headers: {
+			isToken: true
+		},
+		method: 'post',
+		data,
+		timeout: 20000
+	})
+}
+
+
+export function getAppShuxueBuy(data = {}) {
+	return request({
+		url: "/app/shop/shuxue/buy",
+		headers: {
+			isToken: true
+		},
+		method: 'post',
+		data,
+		timeout: 20000
+	})
+}
+
+export function getAppShuxueInfo(data = {}) {
+	return request({
+		url: "/app/shop/shuxue/info",
+		headers: {
+			isToken: true
+		},
+		method: 'post',
+		data,
+		timeout: 20000
+	})
+}

+ 65 - 30
pages/chanpinMy/components/goLogin/goLogin.vue → components/goLogin/goLogin.vue

@@ -1,7 +1,7 @@
 <template>
 	<uni-popup ref="dlRef" :animation="true" :is-mask-click="false" mask-background-color="rgba(255, 255, 255, 0.6);">
 		<!-- 返回 -->
-		<view class="icon-title-navBar-box">
+		<view class="icon-title-navBar-box333">
 			<view @click="handleBack" class="nav-bar-icon"></view>
 			<text class="nav-bar-title">登录</text>
 		</view>
@@ -13,6 +13,17 @@
 			<view class="close-btn" v-if="loginData.clearTelIcon" @click="clearTel"></view>
 		</view>
 
+		<!-- 验证码 -->
+		<view class="phone-input-box">
+			<input class="phone-input" type="text" v-model="loginData.yzmNumber" placeholder="请输入验证码" maxlength="4"
+				@input="clearYzmInput" />
+			<view class="close-btn" v-if="loginData.clearYzmIcon" @click="clearYzm"></view>
+			
+			<text class="cxfs-btn" @click="startCountdown"
+				:class="{ 'cxfs-btn-disabled': loginData.isDisabled}">{{loginData.buttonText}}</text>
+		</view>
+
+
 		<!-- 隐私协议 -->
 		<view class="agreement-checkbox-box">
 			<checkbox-group @change="handleUpdateAgree">
@@ -26,12 +37,14 @@
 			</view>
 		</view>
 		<!-- 登录按钮 -->
+		<ezyActiveVue class="ezy-btn-active login-btn yzm-btn" @aclick="handleLogin" :class="loginData.yzmStatus">登录
+		</ezyActiveVue>
 	</uni-popup>
 	<!-- 政策协议 -->
 	<agree-content-dialog ref="agreeContentDialogRef" :agreeType="agreeType"></agree-content-dialog>
 	<!-- 图形验证码 -->
-	<captcha ref="captcha" :config="config" @captchaSuccess="captchaSuccess" @captchaError="captchaError"
-		@captchaFail="captchaFail" @captchaReady="captchaReady" @captchaClose="captchaClose"></captcha>
+	<captchaVue ref="captcha" :config="config" @captchaSuccess="captchaSuccess" @captchaError="captchaError"
+		@captchaFail="captchaFail" @captchaReady="captchaReady" @captchaClose="captchaClose"></captchaVue>
 	<!-- 确认协议 -->
 	<agree-dialog ref="agreeDialogRef" @confirm-btn="confirmBtn"></agree-dialog>
 </template>
@@ -46,9 +59,14 @@
 	} from "@/utils/common";
 	import {
 		login,
-		banbenImpinfo,sendCode
+		banbenImpinfo,
+		sendCode
 	} from "@/api/login";
 	import cacheManager from "@/utils/cacheManager";
+	import agreeContentDialog from '@/pages/login/agreeContentDialog.vue';
+	import agreeDialog from '@/pages/login/agreeDialog.vue'
+	import captchaVue from "@/components/captcha4/index.vue";
+	import ezyActiveVue from "@/components/ezyActive/ezyActive.vue"
 
 	const emits = defineEmits(['success'])
 
@@ -71,7 +89,7 @@
 		timeLeft: 60, // 初始倒计时时间(秒)
 		intervalId: null, // 定时器ID
 		isDisabled: false, // 按钮是否禁用
-		buttonText: '', // 按钮文本
+		buttonText: '获取验证码', // 按钮文本
 	})
 
 	const sliderData = reactive({})
@@ -108,6 +126,11 @@
 			loginData.telStatus = 'login-btn-disabled';
 		}
 	}
+	
+	const validatePhone = (value) => {
+		const phoneRegex = /^1[3-9]\d{9}$/;
+		return phoneRegex.test(value)
+	}
 
 	function clearTelInput(event) {
 		if (event.detail.value.length > 0) {
@@ -124,6 +147,23 @@
 		loginData.clearTelIcon = false;
 	}
 
+	function clearYzmInput(event) {
+		if (event.detail.value.length > 0) {
+			loginData.clearYzmIcon = true;
+			loginData.yzmStatus = 'login-btn-normal';
+		} else {
+			loginData.clearYzmIcon = false;
+			loginData.yzmStatus = 'login-btn-disabled';
+		}
+	}
+
+	function clearYzm() {
+		this.loginData.yzmNumber = '';
+		this.loginData.yzmStatus = 'login-btn-disabled';
+		this.loginData.clearYzmIcon = false;
+	}
+
+
 	// 登录
 	function handleLogin() {
 		// 用户名
@@ -131,6 +171,16 @@
 			toast('请输入手机号')
 			return;
 		}
+		// 正确手机号
+		if (!validatePhone(loginData.phoneNumber)) {
+			toast('请输入正确手机号')
+			return;
+		}
+		// 验证码
+		if (!loginData.yzmNumber) {
+			toast('请输入验证码')
+			return;
+		}
 		// 协议
 		if (!isAgreed.value) {
 			agreeDialogRef.value.handleShow()
@@ -144,30 +194,8 @@
 			if (res.code == 0) {
 				// 更新用户信息
 				cacheManager.set('auth', res.data)
-				setTimeout(() => {
-					banbenImpinfo({}).then(res => {
-						if (res.code == 0) {
-							cacheManager.updateObject("auth", {
-								banbenId: res.data.banbenId,
-								chanpinId: res.data.chanpinId,
-								danyuanId: res.data.danyuanId,
-								dengjiId: res.data.dengjiId,
-							})
-							// 更新学习信息 移除学习记录执通过后台更新记录
-							if (cacheManager.get('xuexi-shuxue')) {
-								cacheManager.remove("xuexi-shuxue")
-							}
-							// 关闭登录 返回支付
-							toast('登录成功')
-							// 返回支付
-							handleBack();
-							emits('success')
-						}
-					}).catch(() => {
-						toast('数据异常')
-						return false
-					})
-				})
+				// 返回重新支付
+				handleBack();
 			}
 		})
 	}
@@ -194,8 +222,15 @@
 	}
 
 	function startCountdown() {
-		if (loginData.buttonText === '重新发送') {
+		
+		if (!loginData.phoneNumber) {
+			toast('请输入手机号')
+			return;
+		}
+		
+		if (loginData.buttonText === '重新发送' ||loginData.buttonText ===  '获取验证码') {
 			showCaptcha();
+			return;
 		}
 		loginData.isDisabled = true;
 		loginData.buttonText = `重新发送(${loginData.timeLeft}S)`;

+ 29 - 1
pages.json

@@ -27,6 +27,13 @@
 			}
 		},
 		{
+			"path" : "pages/chanpinShop/index",
+			"style" :
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
 			"path" : "pages/chanpinZiliao/ziliaoInfo",
 			"style" : 
 			{
@@ -92,6 +99,27 @@
 			{
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path" : "pages/chanpinShop/cp1/intro",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "pages/chanpinShop/cp1/dingdan",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "pages/chanpinShop/orderHistory",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"tabBar": {
@@ -139,4 +167,4 @@
 			"query": "" //启动参数,在页面的onLoad函数里面得到
 		}]
 	}
-}
+},

+ 10 - 0
pages/chanpinMy/my.vue

@@ -27,6 +27,10 @@
 					<icon class="list-icon yysz-icon"></icon>
 					<text>应用设置</text>
 				</view>
+        <view class="list-item" @click="shangcheng">
+          <icon class="list-icon yysz-icon"></icon>
+          <text>商城</text>
+        </view>
 				<view v-if="appleCode=='true'&&currentPlatform=='ios' || currentPlatform=='android'" class="list-item"
 					@click="duihuamaDuihuan">
 					<icon class="list-icon duihuanma-icon"></icon>
@@ -186,6 +190,12 @@
 		authInfo.value = cacheManager.get('auth');
 	}
 
+  // 商城
+  function shangcheng() {
+    uni.navigateTo({
+      url: '/pages/chanpinShop/index'
+    })
+  }
 
 	function test() {
 		loginRef.value.showPopup()

+ 63 - 0
pages/chanpinShop/components/kaiTongFongShi.vue

@@ -0,0 +1,63 @@
+<template>
+	<uni-popup ref="kaitongRef" :animation="false" :is-mask-click="false" mask-background-color="rgba(0,0,0, 0.76);">
+		<view class="phone-tip-dialog">
+			<view class="common-body-box">
+				<view class="tip-title">开通方式</view>
+				<view @click="handleClose">关闭</view>
+			</view>
+
+			<view @click="handleKaitong">使用手机号快速登录</view>
+			<view v-if="currentPlatform== 'ios'">游客身份开通(限当前设备使用)</view>
+		</view>
+	</uni-popup>
+
+	<goLoginVue ref="LoginRef"></goLoginVue>
+</template>
+
+<script setup>
+	import {
+		nextTick,
+		ref
+	} from 'vue';
+	import goLoginVue from "@/components/goLogin/goLogin.vue"
+
+	const kaitongRef = ref(null); // 索引
+	const LoginRef = ref(null);
+	const $emit = defineEmits(['confirm-btn'])
+	const currentPlatform = ref(null);
+
+
+	function isIOSorAndroid() {
+		const systemInfo = uni.getSystemInfoSync();
+
+		if (systemInfo.platform == 'ios') {
+			currentPlatform.value = 'ios'
+		} else {
+			currentPlatform.value = 'android'
+		}
+	}
+
+	// 打开弹窗
+	function handleShow() {
+		isIOSorAndroid();
+		kaitongRef.value.open();
+	}
+
+	function handleClose() {
+		kaitongRef.value.close();
+	}
+
+	function handleKaitong() {
+		LoginRef.value.showDl();
+		nextTick(() => {
+			kaitongRef.value.close();
+		})
+	}
+
+	defineExpose({
+		handleShow
+	})
+</script>
+
+<style>
+</style>

+ 23 - 0
pages/chanpinShop/components/shuxueList.vue

@@ -0,0 +1,23 @@
+<template>
+	<view class="sx-card-list" v-if="list.length">
+    <template  v-for="{chanpin,value:item} in list">
+      <cp1 v-if="chanpin == 'tujiemuti'" :item="item" :key="item.chanpinId"></cp1>
+    </template>
+
+	</view>
+	<view class="ezy-no-sj" v-else>
+		<icon></icon>
+		<text>暂无数据</text>
+	</view>
+</template>
+
+<script setup>
+
+import cp1 from '../cp1/card.vue';
+
+	const props = defineProps({
+		list: {
+			type: Array
+		}
+	})
+</script>

+ 22 - 0
pages/chanpinShop/components/yingyuList.vue

@@ -0,0 +1,22 @@
+<template>
+	<view class="sx-card-list" v-if="list.length">
+    <template  v-for="{chanpin,value:item} in list" :item="item">
+      <cp1 v-if="chanpin == 'xxx'" :item="item" :key="item.chanpinId" class="sx-card-box"></cp1>
+    </template>
+
+	</view>
+	<view class="ezy-no-sj" v-else>
+		<icon></icon>
+		<text>暂无数据</text>
+	</view>
+</template>
+
+<script setup>
+  import cardVue from '../cp1/card.vue';
+
+	const props = defineProps({
+		list: {
+			type: Array
+		}
+	})
+</script>

+ 21 - 0
pages/chanpinShop/components/yuwenList.vue

@@ -0,0 +1,21 @@
+<template>
+  <view class="sx-card-list" v-if="list.length">
+    <template  v-for="{chanpin,value:item} in list" :item="item">
+      <cp1 v-if="chanpin == 'xxx'" :item="item" :key="item.chanpinId" class="sx-card-box"></cp1>
+    </template>
+  </view>
+  <view class="ezy-no-sj" v-else>
+    <icon></icon>
+    <text>暂无数据</text>
+  </view>
+</template>
+
+<script setup>
+import cardVue from '../cp1/card.vue';
+
+const props = defineProps({
+  list: {
+    type: Array
+  }
+})
+</script>

+ 37 - 0
pages/chanpinShop/cp1/card.vue

@@ -0,0 +1,37 @@
+<template>
+  <view class="sx-card-box">
+    <view class="card-head-box" @click="handleClick">
+      <!-- 封面 -->
+      <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.price}}</view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+const props = defineProps({
+  item: {
+    type: Object
+  }
+})
+
+	// 选择产品等级
+function handleClick() {
+	uni.navigateTo({
+		url: '/pages/chanpinShop/cp1/intro'
+	})
+}
+
+</script>
+
+<style scoped>
+
+</style>

+ 133 - 0
pages/chanpinShop/cp1/dingdan.vue

@@ -0,0 +1,133 @@
+<template>
+	<view>
+		<view class="icon-title-navBar-box">
+			<view class="nav-bar-icon" @click="handleBack"></view>
+			<text class="nav-bar-title">确认订单</text>
+		</view>
+		<!-- 卡片 -->
+			<view>
+				<view><image :src="data.cover"></image></view>
+				<view>名称:{{data.name}}</view>
+				<view>简介:{{data.intro}}</view>
+				<view>价格:{{data.xianjia}}</view>
+			</view>
+		<!-- 等级 -->
+		<view>
+			<view>课程学习等级</view>
+			<view>
+				<!-- 套餐 -->
+				<view v-for="item in data.taocanList" @click="handleSelectTaoCan(item)" :class="{active: item.taocanId == activeTaocan.taocanId}">
+					{{item.name}}
+				</view>
+			</view>
+		</view>
+		<!-- 商品总价 -->	
+		<view>
+			<view>商品总价 ¥{{yuanjia}}</view>
+			<view>优惠券   -¥{{youhui}}</view>
+			<view>合计 ¥{{xianjia}}</view>
+		</view>
+		<!-- 支付模式 -->
+		<view>
+			<view>微信</view>
+			<view>支付宝</view>
+		</view>	
+		
+		<!-- 支付区 -->
+		<view>
+			<view>
+				<view>合计:¥{{xianjia}}</view>
+				<view>共优惠¥{{youhui}}</view>
+			</view>
+			<view @click="handlePay">立即支付</view>
+		</view>
+	</view>
+	
+	<kaiTongFongShiVue ref="kaiRef"></kaiTongFongShiVue>
+</template>
+
+<script setup>
+	import {
+		reactive,
+		ref,
+		computed,
+	} from "vue";
+	import {
+		onLoad,
+		onShow
+	} from "@dcloudio/uni-app"
+	import * as shopHttp from "@/api/shop.js"
+	import kaiTongFongShiVue from "../components/kaiTongFongShi.vue";
+
+	const data = reactive({
+		chanpinId:null,
+		cover: null,
+		intro: null,
+		name: null,
+		taocanList: []
+	})
+	
+	const activeTaocan = ref(null)
+	const kaiRef = ref(null)
+
+	const youhui = computed(() => {
+		if (!activeTaocan.value) {
+			return '0.00'
+		} else {
+			return activeTaocan.value.youhui
+		}
+	})	
+	
+	const xianjia = computed(() => {
+		if (!activeTaocan.value) {
+			return '0.00'
+		} else {
+			return activeTaocan.value.xianjia
+		}
+	})
+	
+	const yuanjia = computed(() => {
+		if (!activeTaocan.value) {
+			return '0.00'
+		} else {
+			return activeTaocan.value.yuanjia
+		}
+	})
+	
+
+	onLoad(() => {
+		initPage()
+	})
+	
+	function handleSelectTaoCan(item) {
+		activeTaocan.value = item;
+	}
+
+	function initPage() {
+		shopHttp.getAppShuxueBuy().then(res => {
+			Object.assign(data, res.data)
+			
+			activeTaocan.value = res.data.taocanList[0]
+		})	
+	}
+	
+	function handlePay() {
+		
+		kaiRef.value.handleShow();
+		
+		/* if (getUserIsYouke()) {
+			// 游客
+			kaiRef.value.handleShow();
+		} else {
+			// 非游客
+		} */
+	}
+
+	function handleBack() {
+		uni.navigateBack()
+	}
+</script>
+
+<style>
+
+</style>

+ 50 - 0
pages/chanpinShop/cp1/intro.vue

@@ -0,0 +1,50 @@
+<template>
+	<view>
+		<view class="icon-title-navBar-box">
+			<view class="nav-bar-icon" @click="handleBack"></view>
+			<text class="nav-bar-title">商城</text>
+		</view>
+		<view>
+			<image :src="imageUrl" alt=""></image>
+		</view>
+		<view>
+			<view @click="fenxiang">分享</view>
+			<view @click="handleStudy">立即报名学习</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		reactive,
+		ref
+	} from "vue";
+	import {
+		onLoad,
+		onShow
+	} from "@dcloudio/uni-app"
+	import * as shopHttp from "@/api/shop.js"
+	
+	const imageUrl = ref(null);
+
+	onLoad(() => {
+		initPage()
+	})
+
+	function initPage() {
+		shopHttp.getAppShuxueInfo().then(res => {
+			imageUrl.value = res.data.image;
+		})
+	}
+	
+	function fenxiang() {}
+	function handleStudy() {
+		uni.navigateTo({
+			url: '/pages/chanpinShop/cp1/dingdan'
+		})
+	}
+</script>
+
+<style>
+
+</style>

+ 122 - 8
pages/chanpinShop/index.vue

@@ -1,13 +1,127 @@
 <template>
-  <view></view>
+	<view class="ezy-xuanke-page">
+		<!-- 返回区域 -->
+		<view class="icon-title-navBar-box">
+			<view class="nav-bar-icon" @click="handleBack"></view>
+			<text class="nav-bar-title">商城</text>
+		</view>
+		<view class="ezy-page-body">
+			<!-- 头部区域 -->
+
+			<view class="ezy-xueke-tab-box">
+				<!-- 动画按钮 -->
+				<ezyActiveVue class="ezy-btn-active tab-item" v-for="item in data.list" :key="item.key"
+					:class="{active: item.key == data.chanpinActiveSelect}" @aclick="handleSelectChanpin(item)">
+					{{ item.label }}
+				</ezyActiveVue>
+			</view>
+			<!-- 数学列表 -->
+			<shuxueListVue v-if="data.chanpinActiveSelect == 'shuxue'" :list="data.shuxueList"></shuxueListVue>
+			<!-- 英语列表 -->
+			<yingyuListVue v-if="data.chanpinActiveSelect == 'yingyu'" :list="data.yingyuList"></yingyuListVue>
+			<!-- 语文列表 -->
+			<yuwenListVue v-if="data.chanpinActiveSelect == 'yuwen'" :list="data.yuwenList"></yuwenListVue>
+		</view>
+	</view>
 </template>
 
-<script>
-export default {
-  name: "index"
-}
-</script>
+<script setup>
+	import {
+		reactive,
+		ref
+	} from "vue";
+	import shuxueListVue from "./components/shuxueList.vue";
+	import yingyuListVue from "./components/yingyuList.vue";
+	import yuwenListVue from "./components/yuwenList.vue";
+	import {
+		onLoad,
+		onShow
+	} from "@dcloudio/uni-app"
+	import * as shopHttp from "@/api/shop.js"
+	import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+	import {
+		getChanpinTongyongIndex
+	} from "@/api/chanpinShuxue";
+	import {
+		getFullTimer
+	} from "@/utils/common";
+
+	let currentTabIndex = ref(0)
+	const data = reactive({
+		list: [{
+				key: 'shuxue',
+				label: '数学'
+			},
+			{
+				key: 'yingyu',
+				label: '英语'
+			},
+			{
+				key: 'yuwen',
+				label: '语文'
+			}
+		],
+		chanpinActiveSelect: 'shuxue',
+
+		shuxueList: [],
+		yingyuList: [],
+		yuwenList: [],
+	})
+
+
+	function getFormatData(data) {
+		const shuxue = data.shuxue || {};
+		const yingyu = data.yingyu || {};
+		const yuwen = data.yuwen || {};
+
+		return {
+			shuxue: Object.entries(shuxue).map(([chanpin, value]) => {
+				return {
+					chanpin,
+					value
+				};
+			}),
+			yingyu: Object.entries(yingyu).map(([chanpin, value]) => {
+				return {
+					chanpin,
+					value
+				};
+			}),
+			yuwen: Object.entries(yuwen).map(([chanpin, value]) => {
+				return {
+					chanpin,
+					value
+				};
+			}),
+		}
+	}
+
+	function getPageData() {
+		shopHttp.getAppShopIndex().then(res => {
+			const result = getFormatData(res.data);
+			data.shuxueList = result.shuxue;
+			data.yingyuList = result.yingyu;
+			data.yuwenList = result.yuwen;
+		})
+	}
+
+	function handleSelectChanpin(item) {
+		data.chanpinActiveSelect = item.key
+	}
+
+	onShow(() => {
+		currentTabIndex.value = 0;
+		data.chanpinActiveSelect = 'shuxue';
+
+		if (getFullTimer() !== `2026-01-28`) {
+			//每日刷新
+			getPageData();
+		} else {
+			getPageData()
+		}
+	})
 
-<style scoped>
+	onLoad(() => {
 
-</style>
+	})
+</script>

+ 13 - 0
pages/chanpinShop/orderHistory.vue

@@ -0,0 +1,13 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script setup>
+
+</script>
+
+<style>
+
+</style>

+ 112 - 89
pages/chanpinXuanze/index.vue

@@ -1,105 +1,128 @@
 <template>
-  <view class="ezy-xuanke-page">
-    <!-- 返回区域 -->
-    <view class="icon-title-navBar-box">
-      <text class="nav-bar-title">选课</text>
-    </view>
-    <view class="ezy-page-body">
-      <!-- 头部区域 -->
+	<view class="ezy-xuanke-page">
+		<!-- 返回区域 -->
+		<view class="icon-title-navBar-box">
+			<text class="nav-bar-title">选课</text>
+		</view>
+		<view class="ezy-page-body">
+			<!-- 头部区域 -->
 
-      <view class="ezy-xueke-tab-box">
-        <!-- 动画按钮 -->
-        <ezyActiveVue class="ezy-btn-active tab-item" v-for="item in data.list"
-                      :key="item.key"
-                      :class="{active: item.key == data.chanpinActiveSelect}"
-                      @aclick="handleSelectChanpin(item)">
-          {{ item.label }}
-        </ezyActiveVue>
-      </view>
-      <!-- 数学列表 -->
-      <shuxueListVue v-if="data.chanpinActiveSelect == 'shuxue'" :list="data.shuxueList"></shuxueListVue>
-      <!-- 英语列表 -->
-      <yingyuListVue v-if="data.chanpinActiveSelect == 'yingyu'" :list="data.yingyuList"></yingyuListVue>
-      <!-- 语文列表 -->
-      <yuwenListVue v-if="data.chanpinActiveSelect == 'yuwen'" :list="data.yuwenList"></yuwenListVue>
-    </view>
-  </view>
-  <custom-tab-bar :show="true" :current-index="currentTabIndex"/>
+			<view class="ezy-xueke-tab-box">
+				<!-- 动画按钮 -->
+				<ezyActiveVue class="ezy-btn-active tab-item" v-for="item in data.list" :key="item.key"
+					:class="{active: item.key == data.chanpinActiveSelect}" @aclick="handleSelectChanpin(item)">
+					{{ item.label }}
+				</ezyActiveVue>
+			</view>
+			<!-- 数学列表 -->
+			<shuxueListVue v-if="data.chanpinActiveSelect == 'shuxue'" :list="data.shuxueList"></shuxueListVue>
+			<!-- 英语列表 -->
+			<yingyuListVue v-if="data.chanpinActiveSelect == 'yingyu'" :list="data.yingyuList"></yingyuListVue>
+			<!-- 语文列表 -->
+			<yuwenListVue v-if="data.chanpinActiveSelect == 'yuwen'" :list="data.yuwenList"></yuwenListVue>
+		</view>
+	</view>
+	<custom-tab-bar :show="true" :current-index="currentTabIndex" />
 </template>
 
 <script setup>
-import {
-  reactive, ref
-} from "vue";
-import shuxueListVue from "./components/shuxueList.vue";
-import yingyuListVue from "./components/yingyuList.vue";
-import yuwenListVue from "./components/yuwenList.vue";
-import {
-  onLoad,
-  onShow
-} from "@dcloudio/uni-app"
-import * as shuxueHttp from "@/api/chanpinShuxue.js"
-import CustomTabBar from "@/components/custom-tabbar/index.vue";
-import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
-import {getChanpinTongyongIndex} from "../../api/chanpinShuxue";
-import {getFullTimer} from "../../utils/common";
+	import {
+		reactive,
+		ref
+	} from "vue";
+	import shuxueListVue from "./components/shuxueList.vue";
+	import yingyuListVue from "./components/yingyuList.vue";
+	import yuwenListVue from "./components/yuwenList.vue";
+	import {
+		onLoad,
+		onShow
+	} from "@dcloudio/uni-app"
+	import * as shuxueHttp from "@/api/chanpinShuxue.js"
+	import CustomTabBar from "@/components/custom-tabbar/index.vue";
+	import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+	import {
+		getChanpinTongyongIndex
+	} from "@/api/chanpinShuxue";
+	import {
+		getFullTimer
+	} from "@/utils/common";
 
-let currentTabIndex = ref(0)
-const data = reactive({
-  list:[
-    { key: 'shuxue', label: '数学' },
-    { key: 'yingyu', label: '英语' },
-    { key: 'yuwen', label: '语文' }
-  ],
-  chanpinActiveSelect: 'shuxue',
+	let currentTabIndex = ref(0)
+	const data = reactive({
+		list: [{
+				key: 'shuxue',
+				label: '数学'
+			},
+			{
+				key: 'yingyu',
+				label: '英语'
+			},
+			{
+				key: 'yuwen',
+				label: '语文'
+			}
+		],
+		chanpinActiveSelect: 'shuxue',
 
-  shuxueList: [],
-})
+		shuxueList: [],
+		yingyuList: [],
+		yuwenList: [],
+	})
 
 
-function getFormatData(data) {
-  const shuxue = data.shuxue || {};
-  const yingyu = data.yingyu || {};
-  const yuwen = data.yuwen || {};
+	function getFormatData(data) {
+		const shuxue = data.shuxue || {};
+		const yingyu = data.yingyu || {};
+		const yuwen = data.yuwen || {};
 
-  return {
-    shuxue: Object.entries(shuxue).map(([chanpin, value]) => {
-      return { chanpin, value };
-    }),
-    yingyu:Object.entries(yingyu).map(([chanpin, value]) => {
-      return { chanpin, value };
-    }),
-    yuwen:Object.entries(yuwen).map(([chanpin, value]) => {
-      return { chanpin, value };
-    }),
-  }
-}
+		return {
+			shuxue: Object.entries(shuxue).map(([chanpin, value]) => {
+				return {
+					chanpin,
+					value
+				};
+			}),
+			yingyu: Object.entries(yingyu).map(([chanpin, value]) => {
+				return {
+					chanpin,
+					value
+				};
+			}),
+			yuwen: Object.entries(yuwen).map(([chanpin, value]) => {
+				return {
+					chanpin,
+					value
+				};
+			}),
+		}
+	}
 
-function getShuxueList() {
-  shuxueHttp.getChanpinTongyongIndex().then(res => {
-    const result = getFormatData(res.data);
-    data.shuxueList = result.shuxue;
-    data.yingyuList = result.yingyu;
-    data.yuwenList = result.yuwen;
-  })
-}
+	function getShuxueList() {
+		shuxueHttp.getChanpinTongyongIndex().then(res => {
+			const result = getFormatData(res.data);
+			data.shuxueList = result.shuxue;
+			data.yingyuList = result.yingyu;
+			data.yuwenList = result.yuwen;
+		})
+	}
 
-function handleSelectChanpin(item) {
-  data.chanpinActiveSelect = item.value
-}
+	function handleSelectChanpin(item) {
+		data.chanpinActiveSelect = item.key
+	}
 
-onShow(() => {
-  currentTabIndex.value = 0;
-  data.chanpinActiveSelect = 'shuxue';
+	onShow(() => {
+		currentTabIndex.value = 0;
+		data.chanpinActiveSelect = 'shuxue';
 
-  if (getFullTimer() !== `2026-01-28`) {
-    //每日刷新
-    getShuxueList();
-  }
-})
+		if (getFullTimer() !== `2026-01-28`) {
+			//每日刷新
+			getShuxueList();
+		} else {
+			getShuxueList()
+		}
+	})
 
-onLoad(() => {
-  uni.hideTabBar()
-  getShuxueList()
-})
+	onLoad(() => {
+		uni.hideTabBar()
+	})
 </script>

+ 1 - 1
pages/chanpinXuanze/readme.md

@@ -1 +1 @@
-tujiemuti: 'cp1', // 小学数学图解母体
+tujiemuti - 'cp1' - xinshuxue, // 小学数学图解母体