tanxue 5 дней назад
Родитель
Сommit
810adfd2f5

+ 16 - 35
App.vue

@@ -20,41 +20,23 @@
 			// #ifdef APP-PLUS
 			// 有auth
 			if (cacheManager.get('auth')) {
-				banbenImpinfo({}).then(res => {
-					if (res.code == 0) {
-						if (res.data.chanpinId != 0) {
-							if (cacheManager.get('xuexi-shuxue')) {
-								cacheManager.remove("xuexi-shuxue")
-							}
-							// 预防丢失
-							cacheManager.updateObject("auth",{
-								banbenId:res.data.banbenId,
-								chanpinId:res.data.chanpinId,
-								danyuanId:res.data.danyuanId,
-								dengjiId:res.data.dengjiId,
-							})
-							uni.switchTab({
-								url: `/pages/chanpinneirong/index`,
-								success() {
-									plus.navigator.closeSplashscreen();
-								}
-							})
-						} else {
-							
-							// 没学过
-							uni.switchTab({
-								url: `/pages/chanpinXuanze/index`,
-								success() {
-									plus.navigator.closeSplashscreen();
-								}
-							})
+				// 有内容缓存 跳到学习页面
+				if (cacheManager.get('contentInfo')) {
+					uni.switchTab({
+						url: `/pages/chanpinneirong/index`,
+						success() {
+							plus.navigator.closeSplashscreen();
 						}
-					}
-				}).catch(() => {
-					toast("App.vue,banbenImpinfo接口错误")
-					cacheManager.clearAll()
-					return false
-				})
+					})
+				} else {
+					//没有内容缓存 请求接口
+					uni.switchTab({
+						url: `/pages/chanpinXuanze/index`,
+						success() {
+							plus.navigator.closeSplashscreen();
+						}
+					})
+				}
 			} else {
 				cacheManager.clearAll()
 				uni.reLaunch({
@@ -64,7 +46,6 @@
 					}
 				});
 			}
-
 			// #endif
 		},
 		onShow: function() {

+ 11 - 0
api/login.js

@@ -87,4 +87,15 @@ export function banbenImpinfo(data = {}) {
     data,
     timeout: 20000
   })
+}
+export function youkeLogin(data = {}) {
+  return request({
+    'url': '/common/app/login/youke',
+    headers: {
+      isToken: false
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
 }

+ 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
+	})
+}

+ 64 - 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,13 @@
 	} from "@/utils/common";
 	import {
 		login,
-		banbenImpinfo,sendCode
+		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 +88,7 @@
 		timeLeft: 60, // 初始倒计时时间(秒)
 		intervalId: null, // 定时器ID
 		isDisabled: false, // 按钮是否禁用
-		buttonText: '', // 按钮文本
+		buttonText: '获取验证码', // 按钮文本
 	})
 
 	const sliderData = reactive({})
@@ -109,6 +126,11 @@
 		}
 	}
 
+	const validatePhone = (value) => {
+		const phoneRegex = /^1[3-9]\d{9}$/;
+		return phoneRegex.test(value)
+	}
+
 	function clearTelInput(event) {
 		if (event.detail.value.length > 0) {
 			loginData.clearTelIcon = true;
@@ -124,6 +146,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 +170,16 @@
 			toast('请输入手机号')
 			return;
 		}
+		// 正确手机号
+		if (!validatePhone(loginData.phoneNumber)) {
+			toast('请输入正确手机号')
+			return;
+		}
+		// 验证码
+		if (!loginData.yzmNumber) {
+			toast('请输入验证码')
+			return;
+		}
 		// 协议
 		if (!isAgreed.value) {
 			agreeDialogRef.value.handleShow()
@@ -144,30 +193,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 +221,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)`;

+ 42 - 7
pages.json

@@ -19,16 +19,30 @@
 				"navigationStyle": "custom"
 			}
 		},
+      {
+        "path" : "pages/chanpinZiliao/shuxue/jstxInfo",
+        "style" :
+        {
+          "navigationStyle": "custom"
+        }
+      },
 		{
 			"path" : "pages/chanpinMy/order",
-			"style" : 
+			"style" :
 			{
 				"navigationStyle": "custom"
 			}
 		},
 		{
-			"path" : "pages/chanpinZiliao/shuxue/jstxInfo",
-			"style" : 
+			"path" : "pages/chanpinShop/index",
+			"style" :
+			{
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path" : "pages/chanpinZiliao/ziliaoInfo",
+			"style" :
 			{
 				"navigationStyle": "custom"
 			}
@@ -88,7 +102,28 @@
 		},
 		{
 			"path" : "pages/chanpinMy/yinsizhengce",
-			"style" : 
+			"style" :
+			{
+				"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"
 			}
@@ -97,9 +132,9 @@
 	"tabBar": {
 		"custom": true,
 		"list": [{
-				"pagePath": "pages/chanpinXuanze/index"
+			"pagePath": "pages/chanpinXuanze/index"
 
-			},
+		},
 			{
 				"pagePath": "pages/chanpinneirong/index"
 			},
@@ -139,4 +174,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 - 98
pages/chanpinXuanze/index.vue

@@ -1,114 +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.value"
-                      :class="{active: item.value == data.chanpinActiveSelect}"
-                      @aclick="handleSelectChanpin(item)">
-          {{ item.name }}
-        </ezyActiveVue>
-      </view>
-      <!-- 数学列表 -->
-      <shuxueListVue v-if="data.chanpinActiveSelect == 1" :list="data.shuxueList"></shuxueListVue>
-      <!-- 英语列表 -->
-      <yingyuListVue v-if="data.chanpinActiveSelect == 2" :list="data.yingyuList"></yingyuListVue>
-      <!-- 语文列表 -->
-      <yuwenListVue v-if="data.chanpinActiveSelect == 3" :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: [
-    {
-      name: '数学',
-      value: 1
-    },
-    {
-      name: '英语',
-      value: 2
-    },
-    {
-      name: '语文',
-      value: 3
-    },
-  ],
-  chanpinActiveSelect: 1,
+	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 = 1;
+	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, // 小学数学图解母体 

+ 51 - 21
pages/chanpinZiliao/index.vue

@@ -14,25 +14,13 @@
 			<!-- 资源卡片列表 -->
 			
 			<!-- 数学 -->
-			<ShuXueList
-			  v-if="data.chanpinActiveSelect === 'shuxue'"
-			  :list="data.shuxue"
-			  @select="goDetail"
-			/>
+			<ShuXueList v-if="data.chanpinActiveSelect === 'shuxue'" :list="data.shuxueList" />
 			
 			<!-- 英语 -->
-			<YingYuList
-			  v-else-if="data.chanpinActiveSelect === 'yingyu'"
-			  :list="data.yingyu"
-			  @select="goDetail"
-			/>
+			<YingYuList v-if="data.chanpinActiveSelect === 'yingyu'" :list="data.yingyuList" />
 			
 			<!-- 语文 -->
-			<YuWenList
-			  v-else-if="data.chanpinActiveSelect === 'yuwen'"
-			  :list="data.yuwen"
-			  @select="goDetail"
-			/>
+			<YuWenList v-if="data.chanpinActiveSelect === 'yuwen'" :list="data.yuwenList" />
 			
 		</view>
 	</view>
@@ -42,11 +30,12 @@
 <script setup>
 import {reactive, ref} from "vue";
 import {onLoad,onShow} from "@dcloudio/uni-app"
+import {ziliaoIndex} from '@/api/ziliao.js'
 import CustomTabBar from "@/components/custom-tabbar/index.vue";
 import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
-import shuxueList  from "./shuxue/sxList.vue"
-import yingyuList  from "./yingyu/yyList.vue"
-import yuwenList  from "./yuwen/ywList.vue"
+import ShuXueList  from "./shuxue/sxList.vue"
+import YingYuList  from "./yingyu/yyList.vue"
+import YuWenList  from "./yuwen/ywList.vue"
 let currentTabIndex = ref(2);
 const data = reactive({
 	list:[
@@ -55,18 +44,59 @@ const data = reactive({
 	  { key: 'yuwen', label: '语文' }
 	],
 	chanpinActiveSelect: 'shuxue',
-	shuxue: {},
-	yingyu: {},
-	yuwen: {}
+	shuxueList: {},
+	yingyuList: {},
+	yuwenList: {}
 })
 
 // tab click
 function handleSelectChanpin(item) {
 	data.chanpinActiveSelect = item.key
 }
+
+// ziliao list
+function getZiliaoList() {
+  ziliaoIndex({}).then(res => {
+    const result = getFormatData(res.data);
+    data.shuxueList = result.shuxue;
+    data.yingyuList = result.yingyu;
+    data.yuwenList = result.yuwen;
+  })
+}
+
+// Format
+function getFormatData(data) {
+  const shuxue = data.shuxue || {};
+  const yingyu = data.yingyu || {};
+  const yuwen = data.yuwen || {};
+
+  return {
+    shuxue: Object.entries(shuxue).map(([chanpin, content]) => {
+      return { chanpin, content };
+    }),
+    yingyu:Object.entries(yingyu).map(([chanpin, content]) => {
+      return { chanpin, content };
+    }),
+    yuwen:Object.entries(yuwen).map(([chanpin, content]) => {
+      return { chanpin, content };
+    }),
+  }
+}
+
+onShow(() => {
+  currentTabIndex.value = 2;
+  data.chanpinActiveSelect = 'shuxue'
+  // 缺少功能 每日刷新
+  /* if (getFullTimer() !== `2026-01-28`) {
+    //每日刷新
+    getZiliaoList();
+  } */
+})
+
 onLoad(() => {
 	// 隐藏默认系统导航栏显示自定义导航栏
 	uni.hideTabBar()
+	getZiliaoList()
 })
 </script>
 

+ 17 - 4
pages/chanpinZiliao/shuxue/jstxCard.vue

@@ -1,12 +1,25 @@
 <template>
 	<!-- 数学-计算特训card -->
-	<view class="card" @click="handleClick">
-	  <image :src="data.cover" mode="aspectFill" class="cover" />
-	  <text class="name">{{ data.name }}</text>
+	<view class="card" @click="handleClick(item)">
+	  <image :src="item.cover" mode="aspectFill" class="cover" />
+	  <view class="name">{{ item.name }}</view>
 	</view>
 </template>
 
-<script>
+<script setup>
+import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
+const porps = defineProps({
+  item: {
+    type: Object
+  }
+})
+// 跳转详情页面
+function handleClick(item) {
+	console.log('item',item.ziliaoId);
+	uni.navigateTo({
+		url: `/pages/chanpinZiliao/shuxue/jstxInfo?ziliaoId=${item.ziliaoId}`
+	})
+}
 </script>
 
 <style>

+ 74 - 4
pages/chanpinZiliao/shuxue/jstxInfo.vue

@@ -1,8 +1,78 @@
 <template>
+	<view class="ezy-jstx-ziliao-page">
+		<view class="icon-title-navBar-box">
+			<text class="nav-bar-title">{{data.ziliaoName}}</text>
+		</view>
+		<view class="ezy-page-body">
+			<scroll-view scroll-y="true" class="level-list-container">
+				<view v-for="(item, index) in data.dengjiList" :key="item.dengjiId" class="level-item">
+					<view class="level-item-content">
+						<!-- 图标 -->
+						<view @click="selectDjBtn(item)"
+						:class="{active: item.dengjiId == data.dengjiActiveSelect}">{{ item.dengjiName }}</view>
+						
+						<view>
+							<view class="ziliao-card-box">
+								<!-- <img/> -->
+								<!-- 内容区 -->
+								<view class="content-box">
+									<text class="title">{{ ziliaoName }}</text>
+									<text class="version">{{ getFirstVersion(item.banbenList) }}</text>
+								</view>
+										
+								<!-- PDF 按钮 -->
+								<view class="pdf-btn">
+									<icon>PDF</icon>
+								</view>
+							</view>
+							
+						</view>
+						
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+		<jstxDownDialog ref="jiaocaiRef" @confirm-btn="jcConfirm" :content="jcContent"></jstxDownDialog>
+	</view>
 </template>
 
-<script>
-</script>
+<script setup>
+import {reactive, ref} from "vue";
+import {onLoad,onShow} from "@dcloudio/uni-app"
+import {jisuanInfo,jisuanPdf} from '@/api/ziliao.js'
+import jstxDownDialog from './jstxDownDialog.vue';
+const data = reactive({
+	id: '',
+	ziliaoName: '',
+	dengjiList: [],
+	dengjiActiveSelect: '',
+})
+
+// jisuantexun Info data
+function getJisuanInfo() {
+  jisuanInfo({ziliaoId:data.id}).then(res => {
+	  data.ziliaoName = res.data.ziliaoName;
+	  data.dengjiList = res.data.dengjiList;
+	  // 默认为等级list中第一个
+	  data.dengjiActiveSelect = res.data.dengjiList[0].dengjiId;
+  })
+}
+
+// 获取第一个版本名称
+function getFirstVersion(banbenList) {
+	if (banbenList && banbenList.length > 0) {
+		return banbenList[0].banbenName;
+	}
+	return '未知版本';
+}
 
-<style>
-</style>
+function selectDjBtn(item){
+	data.dengjiActiveSelect = item.dengjiId
+}
+
+onLoad((options) => {
+	data.id = options.ziliaoId;
+	console.log('options',options);
+	getJisuanInfo()
+})
+</script>

+ 18 - 1
pages/chanpinZiliao/shuxue/sxList.vue

@@ -1,7 +1,24 @@
 <template>
+	<view class="sx-card-list" v-if="list.length">
+	    <template  v-for="{chanpin,content:item} in list">
+			{{list}}
+			<jstxCard v-if="chanpin == 'jisuantexun'" :item="item" :key="item.ziliaoId"></jstxCard>
+	    </template>
+	
+		</view>
+		<view class="ezy-no-sj" v-else>
+			<icon></icon>
+			<text>暂无数据</text>
+		</view>
 </template>
 
-<script>
+<script setup>
+import jstxCard from './jstxCard.vue';
+const props = defineProps({
+	list: {
+		type: Object
+	}
+})
 </script>
 
 <style>

+ 0 - 26
pages/chanpinZiliao/ziliaoInfo.vue

@@ -1,26 +0,0 @@
-<template>
-	<view class="ezy-ziliao-page">
-		<view class="icon-title-navBar-box">
-			<view @click="handleBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">资料详情</text>
-		</view>
-		<view class="ezy-page-body">
-			
-		</view>
-	</view>
-</template>
-
-<script setup>
-import {reactive, ref} from "vue";
-import {onLoad,onShow} from "@dcloudio/uni-app"
-function handleBack() {
-		uni.switchTab({
-			url: '/pages/chanpinZiliao/index'
-		})
-	}
-onLoad(() => {
-})
-</script>
-
-<style>
-</style>

+ 7 - 7
pages/chanpinneirong/index.vue

@@ -140,7 +140,7 @@
 		},
 		onShow() {
 			this.currentTabIndex = 1
-			const cacheData = cacheManager.get('xuexi-shuxue');
+			const cacheData = cacheManager.get('contentInfo');
 
 			if (cacheData) {
 				console.log('使用缓存数据');
@@ -184,7 +184,7 @@
 			// 从缓存更新数据方法
 			updateFromCache() {
 				updateXuexiProcess()
-				const cacheData = cacheManager.get('xuexi-shuxue');
+				const cacheData = cacheManager.get('contentInfo');
 				console.log('cacheData 从缓存更新数据方法', cacheData);
 				if (cacheData) {
 					this.banbenInfo = {
@@ -225,7 +225,7 @@
 							danyuanId: this.danyuanId,
 							dengjiId: this.dengjiId
 						};
-						cacheManager.set('xuexi-shuxue', cacheData);
+						cacheManager.set('contentInfo', cacheData);
 
 						// 更新全局auth信息
 						cacheManager.updateObject('auth', {
@@ -243,7 +243,7 @@
 						// });
 					}
 				}).catch(res => {
-					cacheManager.remove("xuexi-shuxue");
+					cacheManager.remove("contentInfo");
 					toast("加载失败,请重试");
 				});
 			},
@@ -295,13 +295,13 @@
 							return false;
 						}
 
-						const cacheData = cacheManager.get('xuexi-shuxue') || {};
+						const cacheData = cacheManager.get('contentInfo') || {};
 						cacheData.curDanyuanName = curJieAndDanyuan.danyuan.danyuanName;
 						cacheData.curKechengName = curJieAndDanyuan.jie.jieIntro;
 						cacheData.danyuanId = curJieAndDanyuan.jie.danyuanId;
 						cacheData.curJieId = jieId;
 						cacheData.type = curJieAndDanyuan.jie.type;
-						cacheManager.set('xuexi-shuxue', cacheData);
+						cacheManager.set('contentInfo', cacheData);
 
 						if (type == 1) {
 							uni.navigateTo({
@@ -354,4 +354,4 @@
 
 		}
 	}
-</script>
+</script>

+ 4 - 4
pages/chanpinneirong/useNeirongShuxue.js

@@ -1,7 +1,7 @@
 import cacheManager from "@/utils/cacheManager.js";
 
 export function updateXuexiProcess() {
-	const cacheData = cacheManager.get('xuexi-shuxue');
+	const cacheData = cacheManager.get('contentInfo');
 	console.log('cacheData333333', cacheData)
 	const list = cacheData.danyuanList;
 	const defaultCurProcess = cacheData.curProcess;
@@ -9,8 +9,8 @@ export function updateXuexiProcess() {
 	list.forEach(item => {
 		mList = [...mList, ...item.jieList]
 	})
-	
+
 	const process = mList.filter(item => item.wanchengFlag).length/mList.length * 100 || 0;
 	cacheData.curProcess = defaultCurProcess > process ? defaultCurProcess: process;
-	cacheManager.set('xuexi-shuxue', cacheData);
-}
+	cacheManager.set('contentInfo', cacheData);
+}

+ 51 - 12
pages/login/index.vue

@@ -20,22 +20,23 @@
 						@click="agreeBtn('ystk')" class="agreement-text">《隐私政策》</view>
 				</view>
 			</view>
-			<ezyActiveVue class="ezy-btn-active login-btn" @aclick="getYzmBtn" :class="indexData.telStatus">发送验证码</ezyActiveVue>
+			<ezyActiveVue class="ezy-btn-active login-btn" @aclick="getYzmBtn" :class="indexData.telStatus">发送验证码
+			</ezyActiveVue>
 			<view class="bottom-btn-box">
-				<view class="bottom-tip">选择第三方登录</view>
+				<view class="bottom-tip">选择游客登录</view>
 				<view class="btn-box">
-					<view v-if="wxFlag" class="wx-btn" @click="wxLoginClick">
+					<!-- 		<view v-if="wxFlag" class="wx-btn" @click="wxLoginClick">
 						<icon></icon>
 						<view>微信登录</view>
-					</view>
-					<!-- 			<view class="yk-btn" @click="ykBtn">
+					</view> -->
+					<view class="yk-btn" @click="ykBtn">
 						<icon></icon>
 						<view>游客登录</view>
-					</view> -->
-					<view class="apple-btn" v-if="showAppleLogin" @click="appleLoginClick">
+					</view>
+					<!-- 	<view class="apple-btn" v-if="showAppleLogin" @click="appleLoginClick">
 						<icon></icon>
 						<view>苹果登录</view>
-					</view>
+					</view> -->
 				</view>
 			</view>
 		</view>
@@ -63,7 +64,8 @@
 	import agreeDialog from './agreeDialog.vue'
 	import {
 		wxLogin,
-		getVersion
+		getVersion,
+		youkeLogin
 	} from "@/api/login.js"
 	import {
 		toast,
@@ -77,7 +79,7 @@
 		error
 	} from "uview-plus";
 	import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
-	
+
 	let indexData = reactive({
 		phoneNumber: null,
 		clearTelIcon: false,
@@ -97,12 +99,14 @@
 
 	const version = config.appInfo.version;
 	const tipDialogRef = ref(null);
+	const uuid = ref(null);
 	const tipTitle = '升级提醒';
 	const tipContent = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
 
 	onLoad((options) => {
 		showAppleLogin.value = isIOS13OrAbove();
 		getLoginInit()
+		getUUid()
 		if (plus.runtime.isApplicationExist({
 				pname: 'com.tencent.mm',
 				action: 'weixin://'
@@ -207,6 +211,20 @@
 		}
 		agreeContentDialogRef.value.handleShow();
 	};
+	const getUUid = (data) => {
+		plus.device.getInfo({
+			success: (res) => {
+				// res.uuid 是设备的 UUID(iOS 下为 identifierForVendor)
+				console.log('res', res);
+				uuid.value = res.uuid;
+				console.log('iOS 设备 UUID:', uuid.value);
+
+			},
+			fail: (err) => {
+				console.error('获取设备信息失败:', err);
+			}
+		});
+	};
 
 	const handleAgreementChange = (event) => {
 		if (event.detail.value[0] === 'agree') {
@@ -217,10 +235,31 @@
 	}
 	// 游客登录
 	const ykBtn = () => {
+		const systemInfo = uni.getSystemInfoSync();
 		if (indexData.isAgreed === true) {
-			uni.redirectTo({
-				url: `/pages/selectGradesTerms/index`
+
+			if (!uuid.value) {
+				toast("设备id丢失")
+				getUUid()
+				return false
+			}
+			let req = {
+				uuid: uuid.value
+			}
+			youkeLogin(req).then(res => {
+				if (res.code == 0) {
+					cacheManager.set('auth', res.data)
+					uni.switchTab({
+						url: `/pages/chanpinXuanze/index`
+					})
+				}
 			})
+
+
+
+			// uni.redirectTo({
+			// 	url: `/pages/selectGradesTerms/index`
+			// })
 		} else {
 			agreeYkDialog.value.handleShow();
 		}

+ 9 - 38
pages/login/login.vue

@@ -11,7 +11,8 @@
 						maxlength="4" @input="clearYzmInput" />
 					<view class="close-btn" v-if="loginData.clearYzmIcon" @click="clearYzm"></view>
 				</view>
-				<ezyActiveVue class="ezy-btn-active login-btn yzm-btn" @aclick="loginBtn" :class="loginData.yzmStatus">登录</ezyActiveVue>
+				<ezyActiveVue class="ezy-btn-active login-btn yzm-btn" @aclick="loginBtn" :class="loginData.yzmStatus">
+					登录</ezyActiveVue>
 				<text class="cxfs-btn" @click="startCountdown"
 					:class="{ 'cxfs-btn-disabled': loginData.isDisabled}">{{loginData.buttonText}}</text>
 				<text class="login-text" @click="goIndex">无法收到验证码</text>
@@ -59,14 +60,15 @@
 					captchaId: "9d5837b0807b8de44da0de310a0b2813",
 				},
 				banbenId: '',
-				chanpinId: '',
-				danyuanId:'',
-				dengjiId:''
+				chanpinId: '',
+				danyuanId: '',
+				dengjiId: ''
 
 			}
 		},
 		components: {
-			captcha,ezyActiveVue
+			captcha,
+			ezyActiveVue
 		},
 		onLoad(options) {
 			this.loginInit(options);
@@ -123,39 +125,8 @@
 				login(req).then(res => {
 					if (res.code == 0) {
 						cacheManager.set('auth', res.data)
-						setTimeout(() => {
-							banbenImpinfo({}).then(res => {
-								if (res.code == 0) {
-									console.log('banbenImpinfores',res);
-									this.banbenId = res.data.banbenId
-									this.chanpinId = res.data.chanpinId
-									this.danyuanId = res.data.danyuanId
-									this.dengjiId = res.data.dengjiId
-									cacheManager.updateObject("auth",{
-										banbenId:res.data.banbenId,
-										chanpinId:res.data.chanpinId,
-										danyuanId:res.data.danyuanId,
-										dengjiId:res.data.dengjiId,
-									})
-									if(this.chanpinId ==0){
-										// 没学过
-										uni.switchTab({
-											url: `/pages/chanpinXuanze/index`
-										})
-									}else{
-										if (cacheManager.get('xuexi-shuxue')) {
-											cacheManager.remove("xuexi-shuxue")
-										}
-										// 学过直接到学习页面
-										uni.switchTab({
-											url: `/pages/chanpinneirong/index`,
-										})
-									}
-								}
-							}).catch(() => {
-								toast('banbenImpinfo出错')
-								return false
-							})
+						uni.switchTab({
+							url: `/pages/chanpinXuanze/index`
 						})
 					}
 				})

+ 11 - 11
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,20 +1,20 @@
 {
-  "hash": "122c3a9d",
-  "configHash": "d5858f9f",
-  "lockfileHash": "e3b0c442",
-  "browserHash": "d8bf20c4",
+  "hash": "78e2cbc4",
+  "configHash": "cf70751b",
+  "lockfileHash": "7b43968b",
+  "browserHash": "4a933061",
   "optimized": {
-    "uview-plus": {
-      "src": "../../../../../node_modules/uview-plus/index.js",
-      "file": "uview-plus.js",
-      "fileHash": "5da21bbe",
-      "needsInterop": false
-    },
     "ts-md5/dist/md5": {
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "file": "ts-md5_dist_md5.js",
-      "fileHash": "674d644d",
+      "fileHash": "f1457326",
       "needsInterop": true
+    },
+    "uview-plus": {
+      "src": "../../../../../node_modules/uview-plus/index.js",
+      "file": "uview-plus.js",
+      "fileHash": "73c5cf2b",
+      "needsInterop": false
     }
   },
   "chunks": {

+ 4 - 4
utils/cacheManager.js

@@ -109,7 +109,7 @@ const cacheManager = (function() {
 		}, obj);
 	}
 	function updateShuxueWanchengStatus(currentJieId) {
-	    let obj = get('xuexi-shuxue') || {};
+	    let obj = get('contentInfo') || {};
 	    if (obj && obj.danyuanList) {
 	        obj.danyuanList.forEach(danyuan => {
 	            if (danyuan.jieList) {
@@ -120,9 +120,9 @@ const cacheManager = (function() {
 	            }
 	        });
 	    }
-	    set('xuexi-shuxue', obj);
+	    set('contentInfo', obj);
 	}
-	
+
 	return {
 		set,
 		get,
@@ -147,4 +147,4 @@ export function useUnitTestTishi() {
 		updateTishi: () => cacheManager.set(SHOW_UNIT_TEST_TISHI, 'has'),
 		getTishi: () => cacheManager.get(SHOW_UNIT_TEST_TISHI)
 	}
-}
+}