wangguoyu пре 6 часа
родитељ
комит
241246ea39
42 измењених фајлова са 0 додато и 9711 уклоњено
  1. 0 24
      api/game.js
  2. 0 78
      api/order.js
  3. 0 36
      api/productMall.js
  4. 0 24
      api/selectGradesTerms.js
  5. 0 36
      api/unitTest.js
  6. 0 25
      api/wrong.js
  7. 0 36
      api/zhuanti.js
  8. 0 121
      pages.json
  9. 0 613
      pages/mall/detailDialog.vue
  10. 0 846
      pages/mall/mallPage.vue
  11. 0 57
      pages/mall/productDialog.vue
  12. 0 72
      pages/my/aboutPage.vue
  13. 0 52
      pages/my/banbenConfirmDialog.vue
  14. 0 533
      pages/my/index.vue
  15. 0 146
      pages/my/sxtkPage.vue
  16. 0 240
      pages/my/telDialog.vue
  17. 0 394
      pages/my/xuexiJilu.vue
  18. 0 270
      pages/my/xuexishichang.vue
  19. 0 401
      pages/my/yingyongshezhi.vue
  20. 0 941
      pages/pay/order.vue
  21. 0 91
      pages/pay/orderPay.vue
  22. 0 27
      pages/pay/paySuccess.vue
  23. 0 27
      pages/pay/paySuccessAll.vue
  24. 0 71
      pages/pay/productDialog.vue
  25. 0 551
      pages/pay/svip.vue
  26. 0 35
      pages/selectGradesTerms/comingSoonDialog.vue
  27. 0 231
      pages/selectGradesTerms/index.vue
  28. 0 34
      pages/study/daoTipDialog.vue
  29. 0 29
      pages/study/eggDialog.vue
  30. 0 497
      pages/study/index.vue
  31. 0 587
      pages/study/lookShipin.vue
  32. 0 543
      pages/study/lookShipinNew.vue
  33. 0 288
      pages/study/product/shuxue.vue
  34. 0 239
      pages/study/product/shuxueNew.vue
  35. 0 246
      pages/study/product/yingyu.vue
  36. 0 55
      pages/study/svipDialog.vue
  37. 0 55
      pages/test/test.vue
  38. 0 182
      pages/unitTest/index.vue
  39. 0 262
      pages/unitTest/useUnit.js
  40. 0 332
      pages/wrong/index.vue
  41. 0 112
      pages/zhuanti/index.vue
  42. 0 272
      pages/zhuanti/zhuantiInfo.vue

+ 0 - 24
api/game.js

@@ -1,24 +0,0 @@
-import request from '@/utils/request'
-export function getYouxiInfo(data = {}) {
-    return request({
-        'url': '/app/youxi/info',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}
-
-export function getYouxiWeishi(data = {}) {
-    return request({
-        'url': '/app/youxi/weishi',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}

+ 0 - 78
api/order.js

@@ -1,78 +0,0 @@
-import request from '@/utils/request'
-export function getOrderList(data = {}) {
-  return request({
-    'url': '/app/order/list',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderAdd(data = {}) {
-  return request({
-    'url': '/app/order/add',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderPayAli(data = {}) {
-  return request({
-    'url': '/app/order/pay/ali',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderPayWx(data = {}) {
-  return request({
-    'url': '/app/order/pay/wx',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderPayApple(data = {}) {
-  return request({
-    'url': '/app/order/pay/apple',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderCheck(data = {}) {
-  return request({
-    'url': '/app/order/check',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderInfo(data = {}) {
-  return request({
-    'url': '/app/order/info',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 36
api/productMall.js

@@ -1,36 +0,0 @@
-import request from '@/utils/request'
-export function getMallist(data = {}) {
-  return request({
-    'url': '/app/card/list',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getMallistCom(data = {}) {
-  return request({
-    'url': '/common/index/card/list',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function mallCardInfo(data = {}) {
-  return request({
-    'url': '/app/card/info',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 24
api/selectGradesTerms.js

@@ -1,24 +0,0 @@
-import request from '@/utils/request'
-export function getCommonTree(data = {}) {
-    return request({
-        'url': '/common/tree',
-        headers: {
-            isToken: false
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}
-
-export function getIndexTree(data = {}) {
-    return request({
-        'url': '/app/index/tree',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}

+ 0 - 36
api/unitTest.js

@@ -1,36 +0,0 @@
-import request from '@/utils/request'
-export function getExamData(data = {}) {
-  return request({
-    'url': '/app/shiti/list',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getExamSubmit(data = {}) {
-  return request({
-    'url': '/app/shiti/save',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getnextZhangInfo(data = {}) {
-  return request({
-    'url': '/app/user/zhang/nextinfo',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 25
api/wrong.js

@@ -1,25 +0,0 @@
-import request from '@/utils/request'
-export function getWrongData(data = {}) {
-    return request({
-        'url': '/app/cuoti/index',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}
-
-
-export function getWrongInfo(data = {}) {
-    return request({
-        'url': '/app/cuoti/list',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}

+ 0 - 36
api/zhuanti.js

@@ -1,36 +0,0 @@
-import request from '@/utils/request'
-export function moodSize(data = {}) {
-  return request({
-    'url': '/app/user/mood/size',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function moodLess(data = {}) {
-  return request({
-    'url': '/app/user/mood/less',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function moodAdd(data = {}) {
-  return request({
-    'url': '/app/user/mood/add',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 121
pages.json

@@ -56,126 +56,6 @@
 			}
 			}
 		},
 		},
 		{
 		{
-			"path": "pages/selectGradesTerms/index",
-			"style": {
-				"navigationBarTitleText": "选择学科和年纪",
-				"navigationStyle": "custom",
-				"app-plus": {
-					"animationType": "none"
-				}
-			}
-		},
-		{
-			"path": "pages/zhuanti/index",
-			"style": {
-				"navigationBarTitleText": "专题",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/zhuanti/zhuantiInfo",
-			"style": {
-				"navigationBarTitleText": "专题",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/study/index",
-			"style": {
-				"navigationBarTitleText": "学习",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/study/lookShipin",
-			"style": {
-				"navigationBarTitleText": "视频",
-				"navigationStyle": "custom"
-			}
-		}, {
-			"path": "pages/study/lookShipinNew",
-			"style": {
-				"navigationBarTitleText": "视频",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/my/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/my/aboutPage",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/my/sxtkPage",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		}, {
-			"path": "pages/my/xuexiJilu",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		}, {
-			"path": "pages/my/xuexishichang",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		}, {
-			"path": "pages/my/yingyongshezhi",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/unitTest/index",
-			"style": {
-				"navigationBarTitleText": "单元测试",
-				"navigationStyle": "custom",
-				"app-plus": {
-					"softinputMode": "adjustResize",
-					"softinputNavBar": "none"
-				}
-			}
-		},
-		{
-			"path": "pages/pay/svip",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/pay/order",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-
-		{
-			"path": "pages/pay/orderPay",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/wrong/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			"path": "pages/mall/mallPage",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-
-		{
 			"path": "pages/chanpinXuanze/banben",
 			"path": "pages/chanpinXuanze/banben",
 			"style": {
 			"style": {
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
@@ -225,7 +105,6 @@
 			},
 			},
 			{
 			{
 				"pagePath": "pages/chanpinZiliao/index"
 				"pagePath": "pages/chanpinZiliao/index"
-
 			},
 			},
 			{
 			{
 				"pagePath": "pages/chanpinMy/my"
 				"pagePath": "pages/chanpinMy/my"

+ 0 - 613
pages/mall/detailDialog.vue

@@ -1,613 +0,0 @@
-<template>
-	<uni-popup ref="detailPopup" :animation="false" :is-mask-click="false"
-		mask-background-color="rgba(51, 137, 217, 0.65);">
-		<view class="mall-detail-dialog">
-			<view class="detail-content-box">
-				<icon class="yfmx-title"></icon>
-				<icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
-				<view class="detail-body-box">
-					<!-- 使用 checkbox-group 管理多选 -->
-					<checkbox-group @change="handleCheckboxChange">
-						<view class="detail-item-box" v-for="item in localList" :key="item.id">
-							<checkbox :value="item.id.toString()" :checked="selectedIds.includes(item.id)"
-								class="detail-checkbox" color="transparent" />
-							<img :src="item.cover" class="mall-image" />
-							<view class="content-body-box">
-								<view class="content-name">
-									<view class="name-text">{{item.name}}</view>
-								</view>
-								<view class="content-text">{{item.intro}}</view>
-								<view class="content-row">
-									<view class="content-yuanjia">¥{{item.xianjia}}</view>
-								</view>
-							</view>
-						</view>
-					</checkbox-group>
-				</view>
-				<!-- 全选/取消全选 -->
-				<view class="select-all-box" @click="toggleSelectAll">
-					<checkbox :checked="isAllSelected" class="detail-checkbox" color="transparent" />
-					<text>全选</text>
-				</view>
-			</view>
-			<!-- 子组件自己的底部结算栏 -->
-			<view class="footer-mall-pay-box">
-				<view class="mall-left-box">
-					<view class="price-icon-box">
-						<text class="red-price fh-text">¥</text>
-						<text class="red-price">{{totalPrice}}</text>
-
-					</view>
-					<view>购买即同意虚拟产品不支持退订</view>
-				</view>
-				<view class="pay-status-box" v-if="payType =='weixin'&&currentPlatform =='android'"
-					@click="switchPayWay">
-					<icon class="wx-icon"></icon>微信
-				</view>
-				<view class="pay-status-box" v-if="payType =='zhifubao'&&currentPlatform =='android'"
-					@click="switchPayWay">
-					<icon class="zfb-icon"></icon>支付宝
-				</view>
-				<view class="pay-status-box apple-status-box" v-if="currentPlatform =='ios'">
-					<!-- <icon class="apple-icon"></icon> -->
-				</view>
-
-				<view v-if="currentPlatform =='android'" class="pay-btn" @touchstart="creatOrder">立即支付</view>
-				<view v-if="currentPlatform =='ios'" class="pay-btn" @touchstart="creatOrderIos">立即支付</view>
-			</view>
-		</view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import {
-		ref,
-		computed,
-		onMounted,
-		watch
-	} from 'vue';
-	import {
-		debounce,
-		toast
-	} from "@/utils/common";
-	import cacheManager from "@/utils/cacheManager.js";
-	import {
-		orderAdd,
-		orderPayAli,
-		orderPayWx,
-		orderPayApple,
-		orderCheck
-	} from "@/api/order.js"
-	const props = defineProps({
-		selectedList: { // 父组件传入的初始选中商品列表
-			type: Array,
-			default: () => []
-		}
-	});
-
-	const payType = ref('weixin');
-	const mxjtClass = ref('mxjt-sq-icon');
-
-	// 本地维护的商品列表(独立于父组件)
-	const localList = ref([]);
-	const selectedIds = ref([]); // 存储选中项的id
-	let orderId = ref('');
-	let productId = ref(null)
-	let iapChannel = ref(null)
-	let quantity = ref(1)
-	let channel = ref('')
-	let appleFlag = ref('')
-	// 本地选中状态管理
-	const localSelectedMap = ref({});
-	let currentPlatform = ref('android')
-	// 初始化本地数据
-	// 初始化数据
-	// watch(() => props.selectedList, (newVal) => {
-
-	// 	localList.value = [...newVal];
-	// 	selectedIds.value = newVal.map(item => item.id); // 初始全部选中
-
-	// }, {
-	// 	immediate: true
-	// });
-	onMounted(() => {
-		isIOSorAndroid()
-	})
-	const isIOSorAndroid = () => {
-		const systemInfo = uni.getSystemInfoSync();
-
-		console.log('systemInfo', systemInfo);
-
-		if (systemInfo.platform == 'ios') {
-
-			return currentPlatform.value = 'ios'
-		} else {
-			return currentPlatform.value = 'android'
-		}
-
-	}
-
-	function genggaiVip(data) {
-		uni.hideLoading();
-		const localList = cacheManager.get('auth').levelIdList || []
-		const mergeList = [...new Set([...localList, ...data.levelIdList])]
-		cacheManager.updateObject('auth', {
-			levelIdList: mergeList
-		})
-		toast("支付成功")
-		uni.redirectTo({
-			url: '/pages/pay/order?status=2'
-		})
-		// if (formPage.value == 'my') {
-		// 	uni.redirectTo({
-		// 		url: '/pages/my/index'
-		// 	})
-		// } else {
-		// 	uni.redirectTo({
-		// 		url: '/pages/study/index'
-		// 	})
-		// }
-	}
-
-	const creatOrderIos = debounce((data => {
-
-
-		const selectedItems = localList.value
-			.filter(item => selectedIds.value.includes(item.id));
-		console.log('selectedItems', selectedItems);
-		const cardIds = selectedItems.map(item => item.id);
-		if (cardIds.length == 0) {
-			uni.showToast({
-				title: '请选择至少一个商品',
-				icon: 'none'
-			});
-			return;
-		}
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-
-		const productMap = {
-			4: 'ezySxJstxL1', //计算特训 L1
-			6: 'ezySxTjmtL1', //图解母题 L1
-			7: 'ezySxJstxL2', //计算特训 L2
-			8: 'ezySxJstxL3', //计算特训 L3
-			9: 'ezySxJstxL4', //计算特训 L4
-			10: 'ezySxJstxL5', //计算特训 L5
-			11: 'ezySxJstxL6', //计算特训 L6
-			12: 'ezySxTjmtL2', //图解母题 L2
-			13: 'ezySxTjmtL3', //图解母题 L3
-			14: 'ezySxTjmtL4', //图解母题 L4
-			15: 'ezySxTjmtL5', //图解母题 L5
-			16: 'ezySxTjmtL6', //图解母题 L6
-			22: 'ezySxTjmtL1L6', //图解母题 L1-6
-			23: 'ezyYyZrpdL1', //自然拼读 L1
-			24: 'ezyYyZrpdL2', //自然拼读 L2
-			25: 'ezyYyZrpdL3', //自然拼读 L3
-			26: 'ezyYyZrpdL4', //自然拼读 L4
-			27: 'ezyYyZrpdL5', //自然拼读 L5
-			28: 'ezyYyZrpdL1L5', //自然拼读 L1-l5
-			29: ' ezySxJstxL1L6' //计算特训 L1-L6
-		};
-		const firstId = cardIds.length > 0 ? cardIds[0] : null;
-		if (firstId) {
-			productId.value = productMap[firstId]
-			console.log('productId.value', productId.value);
-		} else {
-			toast("无对应产品Id,请练习管理员")
-			uni.hideLoading();
-			return false
-		}
-		let req = {
-			cardIds: cardIds
-		}
-		orderAdd(req).then(res => {
-			console.log('res', res);
-			if (res.code == 0) {
-				setTimeout(() => {
-					uni.hideLoading();
-				}, 1000)
-				orderId.value = res.data.id
-				// 测试ios 1元
-				applePay()
-			} else {
-				uni.hideLoading();
-				return false
-				console.log('请求失败');
-			}
-		}).catch((e) => {
-			uni.hideLoading();
-			toast("订单创建失败")
-			return false
-
-		})
-
-
-	}), 500)
-
-	function applePaySuccess(data) {
-		uni.showLoading({
-			title: '开通中',
-			mask: true
-		});
-		let req = {
-			"id": orderId.value,
-			"paynum": data.transactionIdentifier,
-			"receipt": data.transactionReceipt
-		}
-		console.log('reqreq', req);
-		orderPayApple(req).then(res => {
-			if (res.code == 0 && res.data) {
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				console.log('resiapChanneliapChanneliapChannel', res);
-				orderCheck({
-					id: orderId.value
-				}).then(res3 => {
-					console.log('res3', res3);
-					if (res3.code == 0 && res3.data.success) {
-						genggaiVip(res3.data)
-					} else {
-						setTimeout(() => {
-							orderCheck({
-								id: orderId.value
-							}).then(res4 => {
-								if (res4.code == 0 && res4.data.success) {
-									genggaiVip(res4.data)
-								} else {
-									toast(
-										"开通失败,请联系管理员!"
-									)
-									uni
-										.hideLoading();
-									return false
-								}
-							}).catch(() => {
-								uni.hideLoading();
-								toast("check接口报错")
-								return false
-							})
-						}, 5000)
-					}
-				}).catch(() => {
-					uni.hideLoading();
-					toast("check接口报错")
-					return false
-				})
-			} else {
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				uni.hideLoading();
-				toast("失败")
-				console.log('orderPayApple失败');
-				return false
-			}
-		})
-	}
-
-	function applePay() {
-		console.log('123123');
-		if (!productId.value) {
-			uni.showToast({
-				title: '苹果内购ID缺失,请选择其它支付方式或联系客服',
-				icon: "none"
-			});
-			return false;
-		}
-		uni.showLoading({
-			title: '正在支付中...'
-		});
-		try {
-			plus.payment.getChannels(function(channels) { //判读项目支付通道开通情况
-					for (var i in channels) {
-						iapChannel = channels[i];
-						// 获取 id 为 'appleiap' 的 channel  
-						console.info("支付通道", iapChannel)
-						if (iapChannel.id === 'appleiap') { //开通了app应用内支付,在manifest.josn中设置,开通后需打自定议基座
-
-							// ids 数组中的项为 App Store Connect 配置的内购买项目产品ID(productId)
-							var ids = [productId.value];
-							// iap 为应用内支付对象 
-							iapChannel.requestOrder(ids, function(e) {
-									// 获取订单信息成功回调方法  
-									console.log('requestOrder success: ' + JSON.stringify(e));
-									uni.requestPayment({
-										provider: 'appleiap',
-										orderInfo: {
-											productid: productId.value, //产品id,来自于苹果
-											quantity: quantity.value, //产品数量
-											manualFinishTransaction: true
-										},
-										success: (e) => {
-											uni.hideLoading();
-
-											//	toast("苹果内购成功")
-											console.info("苹果内购成功", e)
-											applePaySuccess(e)
-											//e.payment.orderNo = that.orderNo
-											//支付成功回调,前端调用后台接口
-										},
-										fail: (e) => {
-											uni.hideLoading();
-											toast("失败或取消支付")
-										
-										},
-									})
-								},
-								function(e) {
-									// 获取订单信息失败回调方法  
-									console.log('requestOrder failed: ' + JSON.stringify(e));
-								});
-						} else {
-							console.log('不支持苹果支付')
-						}
-					}
-				},
-				function(e) {
-					console.log("获取iap支付通道失败:" + e.message);
-				});
-
-		} catch (e) {
-			uni.showModal({
-				title: "init",
-				content: e.message,
-				showCancel: false
-			});
-		} finally {
-			uni.hideLoading();
-		}
-
-
-
-	}
-
-
-	function wxPay() {
-		orderPayWx({
-			id: orderId.value
-		}).then(res2 => {
-			uni.hideLoading();
-			console.log('res2', res2);
-			if (res2.code != 0) {
-				return false
-			}
-			uni.requestPayment({
-				"provider": "wxpay",
-				"orderInfo": {
-					"appid": res2.data.appid, // 应用ID(AppID)
-					"partnerid": res2.data.partnerId, // 商户号(PartnerID)
-					"prepayid": res2.data.prepayId, // 预支付交易会话ID
-					"package": res2.data.packageVal, // 固定值
-					"noncestr": res2.data.nonceStr, // 随机字符串
-					"timestamp": res2.data.timestamp, // 时间戳(单位:秒)
-					"sign": res2.data.sign // 签名,这里用的 MD5 签名
-				}, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-
-					//var rawdata = JSON.parse(res.rawdata);
-					//	console.log('res',res);	
-					//	console.log('支付成功');
-					//	console.log('rawdata', rawdata);
-					uni.showLoading({
-						title: '开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						console.log('res3', res3);
-						if (res3.code == 0 && res3.data.success) {
-
-							genggaiVip(res3.data)
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code == 0 && res4.data.success) {
-										genggaiVip(res4.data)
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-
-				},
-				fail: function(err) {
-					uni.hideLoading();
-					//  toast('支付失败:' + JSON.stringify(err));
-					console.log('支付失败:' + JSON.stringify(err));
-				}
-			});
-		}).catch((error) => {
-			uni.hideLoading();
-
-			console.log(error);
-		})
-	}
-
-	function aliApy() {
-		orderPayAli({
-			id: orderId.value
-		}).then(res2 => {
-			console.log('res2', res2);
-			uni.hideLoading();
-			if (res2.code != 0) {
-				return false
-			}
-			uni.requestPayment({
-				"provider": "alipay",
-				"orderInfo": res2.data.text, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-					// var rawdata = JSON.parse(res.rawdata);
-					// console.log('支付成功');
-					// console.log('rawdata', rawdata);
-
-					uni.showLoading({
-						title: '开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						if (res3.code == 0 && res3.data.success) {
-							genggaiVip(res3.data)
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code ==
-										0 && res4.data.success) {
-										genggaiVip(res4.data)
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-				},
-				fail: function(err) {
-					console.log('支付失败:' + JSON.stringify(err));
-					uni.hideLoading();
-				}
-			});
-		})
-	}
-
-	const creatOrder = debounce((data) => {
-
-		const selectedItems = localList.value
-			.filter(item => selectedIds.value.includes(item.id));
-		console.log('selectedItems', selectedItems);
-		const cardIds = selectedItems.map(item => item.id);
-		if (cardIds.length === 0) {
-			uni.showToast({
-				title: '请选择至少一个商品',
-				icon: 'none'
-			});
-			return;
-		}
-		console.log('123123123123');
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-		if (payType.value == 'weixin') {
-			console.log('创建订单11');
-			let req = {
-				cardIds: cardIds
-			}
-			orderAdd(req).then(res => {
-				console.log('res', res);
-				console.log(' res.data.id', res.data.id);
-				orderId.value = res.data.id
-				wxPay()
-			}).catch((err) => {
-				uni.hideLoading();
-				toast("订单创建失败")
-				return false
-			})
-
-		} else {
-			let req = {
-				cardIds: cardIds
-			}
-			orderAdd(req).then(res => {
-				console.log('res', res);
-				orderId.value = res.data.id
-				aliApy()
-			}).catch((err) => {
-				uni.hideLoading();
-				toast("订单创建失败")
-				return false
-			})
-
-		}
-
-	}, 500)
-
-
-
-
-	// 是否全选
-	const isAllSelected = computed(() => {
-		return localList.value.length > 0 &&
-			selectedIds.value.length === localList.value.length;
-	});
-	// 处理checkbox变化
-	function handleCheckboxChange(e) {
-		selectedIds.value = e.detail.value.map(id => parseInt(id));
-	}
-	// 全选/取消全选
-	function toggleSelectAll() {
-		if (isAllSelected.value) {
-			selectedIds.value = []; // 取消全选
-		} else {
-			selectedIds.value = localList.value.map(item => item.id); // 全选
-		}
-	}
-	// 计算总价
-	const totalPrice = computed(() => {
-		return localList.value
-			.filter(item => selectedIds.value.includes(item.id))
-			.reduce((sum, item) => sum + parseFloat(item.xianjia || 0), 0)
-			.toFixed(2);
-	});
-
-	// 支付方式切换
-	function switchPayWay() {
-		payType.value = payType.value == 'weixin' ? 'zhifubao' : 'weixin'
-	}
-
-	// 支付处理
-
-
-	const detailPopup = ref(null);
-
-	function detailShow(newVal) {
-		console.log('getSelectedProducts', newVal);
-		localList.value = [...newVal];
-		selectedIds.value = newVal.map(item => item.id); // 初始全部选中
-		detailPopup.value.open();
-	}
-
-	function detailCloseBtn() {
-		detailPopup.value.close();
-	}
-
-	defineExpose({
-		detailShow,
-		detailCloseBtn
-	});
-</script>
-
-<style>
-
-</style>

+ 0 - 846
pages/mall/mallPage.vue

@@ -1,846 +0,0 @@
-<template>
-	<view class="ezy-mall-page">
-		<view class="icon-title-navBar-box">
-			<view @click="goBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">鹅状元进阶营</text>
-		</view>
-		<view class="ezy-tab-border">
-
-			<uni-segmented-control :current="productData.current" :values="productData.items" active-color="#3A7FE9"
-				@clickItem="onChangeTab" class="ezy-tab-box" />
-			<view>
-				<view v-if="productData.current === 0">
-					<scroll-view scroll-y="true" :scroll-into-view="scrollIntoId" class="order-scroll-view">
-						<!--数学-->
-						<view :id="'item-' + item.id" v-for="item in productData.list" :key="item.id"
-							class="mall-list-item">
-							<view class="mall-content-box" :class="item.yigou ==1?'mall-yigou-box':''">
-								<img :src='item.cover' class="mall-image" />
-								<view class="content-body-box">
-									<view class="content-name">
-										<view class="name-text">{{item.name}}</view>
-									</view>
-									<view class="content-text">{{item.intro}}</view>
-									<view class="content-row">
-										<view class="content-yuanjia">原价:{{item.yuanjia}}</view>
-										<view class="shop-car-box" @click="addProduct(item)">
-											<icon v-if="productData.selectedIds.includes(item.id)" class="car-change">
-											</icon>
-										</view>
-									</view>
-								</view>
-							</view>
-							<view class="mall-bottom-row">
-								<view v-if="item.type ==1" class="kcb-btn" @click="productBtn(item.levelList)">课程包明细
-									<icon>
-									</icon>
-								</view>
-								<view class="hdj-text">活动价:{{item.xianjia}}</view>
-							</view>
-						</view>
-					</scroll-view>
-				</view>
-				<view v-if="productData.current === 1">
-					<scroll-view scroll-y="true" :scroll-into-view="scrollIntoId" class="order-scroll-view">
-						<!--数学-->
-						<view :id="'item-' + item.id" v-for="item in productData.list" :key="item.id"
-							class="mall-list-item">
-							<view class="mall-content-box" :class="item.yigou ==1?'mall-yigou-box':''">
-								<img :src='item.cover' class="mall-image" />
-								<view class="content-body-box">
-									<view class="content-name">
-										<view class="name-text">{{item.name}}</view>
-									</view>
-									<view class="content-text">{{item.intro}}</view>
-									<view class="content-row">
-										<view class="content-yuanjia">原价:{{item.yuanjia}}</view>
-										<view class="shop-car-box" v-if="item.yigou !=1" @click="addProduct(item)">
-											<icon v-if="productData.selectedIds.includes(item.id)" class="car-change">
-											</icon>
-										</view>
-									</view>
-								</view>
-							</view>
-							<view class="mall-bottom-row">
-								<view v-if="item.type ==1" class="kcb-btn" @click="productBtn(item.levelList)">课程包明细
-									<icon>
-									</icon>
-								</view>
-								<view class="hdj-text">活动价:{{item.xianjia}}</view>
-							</view>
-						</view>
-					</scroll-view>
-				</view>
-				<!-- 	<view v-if="productData.current === 2">
-					<view>语文</view>
-				</view> -->
-			</view>
-		</view>
-		<view class="footer-mall-pay-box">
-			<view class="mall-left-box" @click="detailBtn">
-				<!-- 需要换成从接口中取得 wgy -->
-				<view class="price-icon-box">
-					<text class="red-price fh-text">¥</text>
-					<text class="red-price">{{totalPrice}}</text>明细
-					<icon :class="mxjtClass"></icon>
-				</view>
-				<view>购买即同意虚拟产品不支持退订</view>
-			</view>
-			<!-- 微信 -->
-			<view class="pay-status-box" v-if="payType =='weixin'&&currentPlatform =='android'" @click="switchPayWay">
-				<icon class="wx-icon"></icon>微信
-			</view>
-			<view class="pay-status-box" v-if="payType =='zhifubao'&&currentPlatform =='android'" @click="switchPayWay">
-				<icon class="zfb-icon"></icon>支付宝
-			</view>
-			<view class="pay-status-box apple-status-box" v-if="currentPlatform =='ios'">
-				<!-- <icon class="apple-icon"></icon> -->
-			</view>
-
-			<view v-if="currentPlatform =='android'" class="pay-btn" @touchstart="creatOrder">立即支付
-			</view>
-			<view  class="pay-btn" v-if="currentPlatform =='ios'" @touchstart="creatOrderIos">立即支付</view>
-		</view>
-		<detail-dialog ref="mallDetailPopup" :selected-list="getSelectedProducts"></detail-dialog>
-
-
-		<product-dialog ref="mallProductPopup"></product-dialog>
-		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		computed,
-		nextTick,
-		ref
-	} from "vue";
-	import {
-		getMallist,
-		getMallistCom
-	} from "@/api/productMall.js";
-	import {
-		orderAdd,
-		orderPayAli,
-		orderPayWx,
-		orderPayApple,
-		orderCheck
-	} from "@/api/order.js"
-	import {
-		onLoad
-	} from "@dcloudio/uni-app";
-	import {
-		toast,
-		debounce,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from '@/utils/cacheManager.js';
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import detailDialog from './detailDialog.vue'
-	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import productDialog from './productDialog.vue'
-
-	const showPayWay = ref(true)
-	const showDetail = ref(false)
-	const mxjtClass = ref('mxjt-sq-icon')
-	const mallDetailPopup = ref(null);
-	const mallProductPopup = ref(null);
-	const youkeDialogRef = ref(null);
-	let scrollIntoId = ref(null)
-	const productData = reactive({
-		items: ['数学', '英语'],
-		current: 1,
-		from: '',
-		cardId: '',
-		list: [],
-		selectedIds: [] // 新增选中状态存储
-	})
-	let currentPlatform = ref('android')
-	const payType = ref('weixin');
-	let orderId = ref('');
-	let productId = ref(null)
-	let iapChannel = ref(null)
-	let quantity = ref(1)
-	let channel = ref('')
-	let appleFlag = ref('')
-	const subjectId = ref(null); //游客使用
-	const levelId = ref(null); //游客使用
-	const typeId = ref(null); //游客使用
-	const tipFlag = ref(null); //游客使用
-
-
-
-	const totalPrice = computed(() => {
-		return productData.list
-			.filter(item => productData.selectedIds.includes(item.id))
-			.reduce((sum, item) => sum + parseFloat(item.xianjia || 0), 0)
-			.toFixed(2)
-	})
-	const getSelectedProducts = computed(() => {
-		return productData.list.filter(item => productData.selectedIds.includes(item.id));
-	});
-
-	function switchPayWay() {
-		payType.value = payType.value == 'weixin' ? 'zhifubao' : 'weixin'
-	}
-
-	function productBtn(item) {
-		mallProductPopup.value.detailShow(item);
-	}
-
-	function ykConfirm() {
-		uni.redirectTo({
-			url: '/pages/login/index'
-		});
-	}
-
-	function detailBtn() {
-		// // 获取选中商品的cardId列表
-		// const selectedProducts = productData.list.filter(
-		// 	item => productData.selectedIds.includes(item.id)
-		// );
-
-		// const cardIds = selectedProducts.map(item => item.id);
-		// console.log('cardIds', cardIds);
-
-		if (productData.selectedIds.length === 0) {
-			toast("请选择至少一个商品查看明细");
-			return;
-		}
-
-		showDetail.value = !showDetail.value;
-		if (showDetail.value) {
-			const selected = productData.list.filter(item =>
-				productData.selectedIds.includes(item.id)
-			);
-			mxjtClass.value = 'mxjt-zk-icon';
-			mallDetailPopup.value.detailShow(selected);
-		} else {
-			mxjtClass.value = 'mxjt-sq-icon';
-			mallDetailPopup.value.detailCloseBtn();
-		}
-
-	}
-	const isIOSorAndroid = () => {
-		const systemInfo = uni.getSystemInfoSync();
-
-		console.log('systemInfo', systemInfo);
-
-		if (systemInfo.platform == 'ios') {
-
-			return currentPlatform.value = 'ios'
-		} else {
-			return currentPlatform.value = 'android'
-		}
-
-	}
-
-	function genggaiVip(data) {
-		uni.hideLoading();
-		const localList = cacheManager.get('auth').levelIdList || []
-		const mergeList = [...new Set([...localList, ...data.levelIdList])]
-		cacheManager.updateObject('auth', {
-			levelIdList: mergeList
-		})
-		toast("支付成功")
-		uni.redirectTo({
-			url: '/pages/pay/order?status=2'
-		})
-
-		//	toast("chenggong!!!! 之后跳转我的订单页面")
-
-		// if (formPage.value == 'my') {
-		// 	uni.redirectTo({
-		// 		url: '/pages/my/index'
-		// 	})
-		// } else {
-		// 	uni.redirectTo({
-		// 		url: '/pages/study/index'
-		// 	})
-		// }
-	}
-	const creatOrderIos = debounce((data => {
-		if (productData.selectedIds.length == 0) {
-			toast("请选择至少一个商品");
-			return;
-		}
-		const selectedProducts = productData.list.filter(
-			item => productData.selectedIds.includes(item.id)
-		);
-
-		const cardIds = selectedProducts.map(item => item.id);
-		console.log('cardIds', cardIds);
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-
-		if (appleFlag.value.toString() == 'true') {
-			productId.value = 'llisoftEzhuangyuanceshi'
-		} else {
-			const productMap = {
-				4: 'ezySxJstxL1', //计算特训 L1
-				6: 'ezySxTjmtL1', //图解母题 L1
-				7: 'ezySxJstxL2', //计算特训 L2
-				8: 'ezySxJstxL3', //计算特训 L3
-				9: 'ezySxJstxL4', //计算特训 L4
-				10: 'ezySxJstxL5', //计算特训 L5
-				11: 'ezySxJstxL6', //计算特训 L6
-				12: 'ezySxTjmtL2', //图解母题 L2
-				13: 'ezySxTjmtL3', //图解母题 L3
-				14: 'ezySxTjmtL4', //图解母题 L4
-				15: 'ezySxTjmtL5', //图解母题 L5
-				16: 'ezySxTjmtL6', //图解母题 L6
-				22: 'ezySxTjmtL1L6', //图解母题 L1-6
-				23: 'ezyYyZrpdL1', //自然拼读 L1
-				24: 'ezyYyZrpdL2', //自然拼读 L2
-				25: 'ezyYyZrpdL3', //自然拼读 L3
-				26: 'ezyYyZrpdL4', //自然拼读 L4
-				27: 'ezyYyZrpdL5', //自然拼读 L5
-				28: 'ezyYyZrpdL1L5', //自然拼读 L1-l5
-				29: ' ezySxJstxL1L6' //计算特训 L1-L6
-			};
-			const firstId = cardIds.length > 0 ? cardIds[0] : null;
-			if (firstId) {
-				productId.value = productMap[firstId]
-				console.log('productId.value', productId.value);
-			} else {
-				toast("无对应产品Id,请练习管理员")
-				uni.hideLoading();
-				return false
-			}
-		}
-		let req = {
-			cardIds: cardIds
-		}
-		orderAdd(req).then(res => {
-			console.log('res', res);
-			if (res.code == 0) {
-				setTimeout(() => {
-					uni.hideLoading();
-				}, 1000)
-
-				orderId.value = res.data.id
-				// 测试ios 1元
-				applePay()
-			} else {
-				uni.hideLoading();
-
-				return false
-				console.log('请求失败');
-			}
-		}).catch((e) => {
-			uni.hideLoading();
-
-			toast("订单创建失败")
-			return false
-
-		})
-
-
-	}), 500)
-
-	function applePaySuccess(data) {
-		uni.showLoading({
-			title: '开通中',
-			mask: true
-		});
-		let req = {
-			"id": orderId.value,
-			"paynum": data.transactionIdentifier,
-			"receipt": data.transactionReceipt
-		}
-		console.log('reqreq', req);
-		orderPayApple(req).then(res => {
-			if (res.code == 0 && res.data) {
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				console.log('resiapChanneliapChanneliapChannel', res);
-				orderCheck({
-					id: orderId.value
-				}).then(res3 => {
-					console.log('res3', res3);
-					if (res3.code == 0 && res3.data.success) {
-						genggaiVip(res3.data)
-					} else {
-						setTimeout(() => {
-							orderCheck({
-								id: orderId.value
-							}).then(res4 => {
-								if (res4.code == 0 && res4.data.success) {
-									genggaiVip(res4.data)
-								} else {
-									toast(
-										"开通失败,请联系管理员!"
-									)
-									uni
-										.hideLoading();
-									return false
-								}
-							}).catch(() => {
-								uni.hideLoading();
-								toast("check接口报错")
-								return false
-							})
-						}, 5000)
-					}
-				}).catch(() => {
-					uni.hideLoading();
-					toast("check接口报错")
-					return false
-				})
-
-
-			} else {
-
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				uni.hideLoading();
-				toast("失败")
-				console.log('orderPayApple失败');
-				return false
-			}
-		})
-	}
-
-	function applePay() {
-		console.log('123123');
-		if (!productId.value) {
-			uni.showToast({
-				title: '苹果内购ID缺失,请选择其它支付方式或联系客服',
-				icon: "none"
-			});
-			return false;
-		}
-		uni.showLoading({
-			title: '正在支付中...'
-		});
-		try {
-			plus.payment.getChannels(function(channels) { //判读项目支付通道开通情况
-					for (var i in channels) {
-						iapChannel = channels[i];
-						// 获取 id 为 'appleiap' 的 channel  
-						console.info("支付通道", iapChannel)
-						if (iapChannel.id === 'appleiap') { //开通了app应用内支付,在manifest.josn中设置,开通后需打自定议基座
-							console.info("苹果支付通道", iapChannel)
-							// ids 数组中的项为 App Store Connect 配置的内购买项目产品ID(productId)
-							var ids = [productId.value];
-							// iap 为应用内支付对象 
-							iapChannel.requestOrder(ids, function(e) {
-									// 获取订单信息成功回调方法  
-									console.log('requestOrder success: ' + JSON.stringify(e));
-									uni.requestPayment({
-										provider: 'appleiap',
-										orderInfo: {
-											productid: productId.value, //产品id,来自于苹果
-											quantity: quantity.value, //产品数量
-											manualFinishTransaction: true
-										},
-										success: (e) => {
-											uni.hideLoading();
-
-											//	toast("苹果内购成功")
-											console.info("苹果内购成功", e)
-											applePaySuccess(e)
-											//e.payment.orderNo = that.orderNo
-											//支付成功回调,前端调用后台接口
-										},
-										fail: (e) => {
-											uni.hideLoading();
-											toast("失败或取消支付")
-											
-										},
-									})
-								},
-								function(e) {
-									// 获取订单信息失败回调方法  
-									console.log('requestOrder failed: ' + JSON.stringify(e));
-								});
-						} else {
-							console.log('不支持苹果支付')
-						}
-					}
-				},
-				function(e) {
-					console.log("获取iap支付通道失败:" + e.message);
-				});
-
-		} catch (e) {
-			uni.showModal({
-				title: "init",
-				content: e.message,
-				showCancel: false
-			});
-		} finally {
-			uni.hideLoading();
-		}
-
-
-
-	}
-
-
-	function wxPay() {
-		orderPayWx({
-			id: orderId.value
-		}).then(res2 => {
-			uni.hideLoading();
-			console.log('res2', res2);
-			if (res2.code != 0) {
-				return false
-			}
-			uni.requestPayment({
-				"provider": "wxpay",
-				"orderInfo": {
-					"appid": res2.data.appid, // 应用ID(AppID)
-					"partnerid": res2.data.partnerId, // 商户号(PartnerID)
-					"prepayid": res2.data.prepayId, // 预支付交易会话ID
-					"package": res2.data.packageVal, // 固定值
-					"noncestr": res2.data.nonceStr, // 随机字符串
-					"timestamp": res2.data.timestamp, // 时间戳(单位:秒)
-					"sign": res2.data.sign // 签名,这里用的 MD5 签名
-				}, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-
-					//var rawdata = JSON.parse(res.rawdata);
-					//	console.log('res',res);	
-					//	console.log('支付成功');
-					//	console.log('rawdata', rawdata);
-					uni.showLoading({
-						title: '开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						console.log('res3', res3);
-						if (res3.code == 0 && res3.data.success) {
-
-							genggaiVip(res3.data)
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code == 0 && res4.data.success) {
-										genggaiVip(res4.data)
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-
-				},
-				fail: function(err) {
-					uni.hideLoading();
-					//  toast('支付失败:' + JSON.stringify(err));
-					console.log('支付失败:' + JSON.stringify(err));
-				}
-			});
-		}).catch((error) => {
-			uni.hideLoading();
-
-			console.log(error);
-		})
-	}
-
-	function aliApy() {
-		orderPayAli({
-			id: orderId.value
-		}).then(res2 => {
-			console.log('res2', res2);
-			if (res2.code != 0) {
-				return false
-			}
-			uni.hideLoading();
-			uni.requestPayment({
-				"provider": "alipay",
-				"orderInfo": res2.data.text, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-					// var rawdata = JSON.parse(res.rawdata);
-					// console.log('支付成功');
-					// console.log('rawdata', rawdata);
-
-					uni.showLoading({
-						title: '开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						if (res3.code == 0 && res3.data.success) {
-							genggaiVip(res3.data)
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code ==
-										0 && res4.data.success) {
-										genggaiVip(res4.data)
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-				},
-				fail: function(err) {
-					console.log('支付失败:' + JSON.stringify(err));
-					uni.hideLoading();
-				}
-			});
-		})
-	}
-
-	const creatOrder = debounce((data) => {
-
-		if (productData.selectedIds.length === 0) {
-			toast("请选择至少一个商品");
-			return;
-		}
-		// 获取选中商品的cardId列表
-		const selectedProducts = productData.list.filter(
-			item => productData.selectedIds.includes(item.id)
-		);
-
-		const cardIds = selectedProducts.map(item => item.id);
-		console.log('cardIds', cardIds);
-
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-		if (payType.value == 'weixin') {
-			console.log('创建订单11');
-			let req = {
-				cardIds: cardIds
-			}
-			orderAdd(req).then(res => {
-				console.log('res', res);
-				console.log(' res.data.id', res.data.id);
-				orderId.value = res.data.id
-				wxPay()
-			}).catch((err) => {
-				uni.hideLoading();
-				toast("订单创建失败")
-				return false
-			})
-
-		} else {
-
-			let req = {
-				cardIds: cardIds
-			}
-			orderAdd(req).then(res => {
-				console.log('res', res);
-				orderId.value = res.data.id
-				aliApy()
-			}).catch((err) => {
-				uni.hideLoading();
-				toast("订单创建失败")
-				return false
-			})
-
-		}
-
-	}, 500)
-
-	function onChangeTab(e) {
-		console.log('e', e);
-		productData.current = e.currentIndex
-		productData.selectedIds = [] // 清空选中
-		if (!cacheManager.get('auth')) {
-			getMoreYk()
-		} else {
-			getMore()
-		}
-	}
-
-
-	function getMore() {
-		const opt = {
-			subjectId: productData.current + 1
-		}
-		getMallist(opt).then(res => {
-			if (res.code == 0) {
-				productData.list = res.data
-				// 初始化选中状态(当有外部cardId时)
-				if (productData.cardId) {
-					const exist = res.data.some(item => item.id == productData.cardId)
-					if (exist) {
-						productData.selectedIds = [Number(productData.cardId)]
-					}
-				}
-				nextTick(() => {
-					scrollToIdFun(productData.cardId)
-				})
-
-			}
-		}).catch(err => {
-			toast("获取产品数据失败")
-			return false
-		})
-	}
-
-	function getMoreYk() {
-		const opt = {
-			subjectId: productData.current + 1
-		}
-		getMallistCom(opt).then(res => {
-			if (res.code == 0) {
-				productData.list = res.data
-
-			}
-		}).catch(err => {
-			toast("获取产品数据失败")
-			return false
-		})
-	}
-
-	function scrollToIdFun(targetId) {
-		const index = productData.list.findIndex(item => item.id == targetId)
-		console.log('index', index);
-		if (index > -1) {
-			// 安卓设备需要双保险
-			scrollIntoId.value = `item-${targetId}`
-			setTimeout(() => {
-				scrollIntoId.value = `item-${targetId}`
-			}, 300)
-
-		}
-	}
-
-
-	function addProduct(item) {
-		if (!cacheManager.get('auth')) {
-			youkeDialogRef.value.handleShow();
-			return false;
-		}
-		if (item.yigou == 1) {
-			return false;
-		}
-
-		const currentSelected = productData.selectedIds;
-		const isAlreadySelected = currentSelected.includes(item.id);
-		if (currentPlatform.value == 'ios') {
-			if (isAlreadySelected) {
-				productData.selectedIds = currentSelected.filter(id => id !== item.id);
-			} else {
-				if (currentSelected.length >= 1) {
-					toast("只允许单个购买!");
-					return false;
-				}
-				productData.selectedIds = [item.id];
-			}
-		} else {
-			const temp = [...currentSelected];
-			const index = temp.indexOf(item.id);
-			index > -1 ? temp.splice(index, 1) : temp.push(item.id);
-			productData.selectedIds = temp;
-		}
-
-	}
-	// function addProduct(item) {
-
-	// 	if (!cacheManager.get('auth')) {
-	// 		youkeDialogRef.value.handleShow();
-	// 		return false
-	// 	}
-	// 	if (item.yigou == 1) {
-	// 		return false
-	// 	}
-	// 	const temp = [...productData.selectedIds]
-	// 	const index = temp.indexOf(item.id)
-	// 	index > -1 ? temp.splice(index, 1) : temp.push(item.id)
-	// 	productData.selectedIds = temp
-	// 	console.log('productData.selectedIds', productData.selectedIds.length);
-	// }
-
-	function isItemSelected(id) {
-		return productData.cardId ?
-			id == productData.cardId // 有外部cardId时严格匹配
-			:
-			productData.selectedIds.includes(id) // 无cardId时检查选中列表
-	}
-
-	function goBack() {
-
-
-		if (!cacheManager.get('auth')) {
-			// 游客
-			uni.redirectTo({
-				url: `/pages/my/index?levelId=${levelId.value}&typeId=${typeId.value}&subjectId=${subjectId.value}&tipFlag=${tipFlag.value}`
-			})
-		} else {
-			if (productData.from == 'daoPage') {
-				uni.redirectTo({
-					url: '/pages/study/index'
-				})
-			} else {
-				uni.redirectTo({
-					url: '/pages/my/index'
-				})
-			}
-		}
-	}
-
-	onLoad((options) => {
-		isIOSorAndroid()
-		if (!cacheManager.get('auth')) {
-			// 游客
-			levelId.value = options.levelId
-			typeId.value = options.typeId
-			subjectId.value = options.subjectId
-			tipFlag.value = options.tipFlag
-			productData.current = Number(options.subjectId) - 1
-			getMoreYk()
-		} else {
-			appleFlag.value = cacheManager.get("auth").appleFlag
-			if (options.from == 'daoPage') {
-				productData.current = Number(options.subjectId) - 1
-				productData.cardId = options.cardId
-				productData.from = options.from
-			} else if (options.from == 'myPage') {
-				productData.current = Number(options.subjectId) - 1
-				productData.cardId = options.cardId
-				productData.from = options.from
-			} else {
-				productData.current = Number(cacheManager.get('auth').subjectId) - 1
-			}
-
-			getMore();
-		}
-
-	})
-</script>
-
-<style>
-
-</style>

+ 0 - 57
pages/mall/productDialog.vue

@@ -1,57 +0,0 @@
-<template>
-	<uni-popup ref="detailPopup" :animation="false" :is-mask-click="false"
-		mask-background-color="rgba(51, 137, 217, 0.65);" style="z-index: 101;">
-		<view class="mall-detail-dialog">
-			<view class="detail-content-box">
-				<icon class="cpmx-title"></icon>
-				<icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
-				<view class="product-body-box">
-					<!-- ↓需要换成从接口中取得 wgy -->
-					<view class="detail-item-box" v-for="(item,index) in productList " :key="index">
-						<img :src="item.cover" class="mall-image mt-20" />
-						<view class="content-body-box">
-							<view class="content-name">
-								<view class="name-text">{{item.levelName}}</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import {
-		mallCardInfo
-	} from "@/api/productMall.js"
-	import {
-		toast,
-		debounce,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		ref
-	} from 'vue';
-	const $emit = defineEmits(['payBtn'])
-	const detailPopup = ref(null); // 索引
-	let productList = ref([])
-	// 打开弹窗
-	function detailShow(data) {
-
-		productList.value = data
-		detailPopup.value.open();
-
-	}
-	// 开启提分之旅按钮
-	function detailPayBtn() {
-		$emit('payBtn')
-	}
-
-	function detailCloseBtn() {
-		detailPopup.value.close();
-	}
-	defineExpose({
-		detailShow
-	})
-</script>

+ 0 - 72
pages/my/aboutPage.vue

@@ -1,72 +0,0 @@
-<template>
-	<view class="ezy-about-page">
-		<view class="icon-title-navBar-box">
-			<view @click="handleBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">关于我们</text>
-		</view>
-		<view class="about-body-border">
-			<view class="about-body-box">
-				<view class="content-top-box">
-					<icon class="about-icon-box"></icon>
-					<view class="top-text-box">
-						<view class="about-name">鹅状元</view>
-						<view class="about-text">客服电话:4001750778</view>
-						<view class="about-text">备案号:辽ICP备15006970号-7A</view>
-					</view>
-				</view>
-				<view class="content-box">
-					<p>鹅状元 APP:点亮孩子成长之路的智慧灯塔</p>
-					<p>专为 6 - 12 岁孩子量身打造的鹅状元 APP 震撼来袭!</p>
-					<p>在这里,学习就像一场奇妙冒险。数学学习不再是难题堆砌,一套独家“秘籍”让知识轻松解锁。从启蒙到进阶的 L1 - L6 阶梯式成长路径,以新颖的“画图策略”为指引,将复杂问题可视化,引领孩子畅游数字海洋。每一道精心挑选的母题都是开启智慧大门的钥匙,牵一发而动全身,让孩子触类旁通,学会举一反三,真正把知识用起来,生活处处皆数学考场。</p>
-					<p>英语学习更是趣味横生。聚焦神奇“发音密码”,带孩子从字母韵律起步,一步步叩响英语世界的大门。沉浸式学习环境,趣味互动游戏贯穿始终,随着学习深入,孩子悄然掌握自然拼读技巧,单词认读、口语表达水到渠成。</p>
-					<p>鹅状元精准锚定孩子成长关键。学习时,它化身启智伙伴,激励孩子自主找答案,点燃思考火苗;还为孩子搭起表达的“舞台”,使其能自信开麦、条理阐述观点。助力孩子在成长路上全速启航,鹅状元 APP 就是那根神奇“魔杖”,帮孩子解锁无限潜力,奔赴美好未来。</p>
-				</view>
-			</view>
-		</view>
-		<CustomTabBar :levelId="levelId" :typeId="typeId" :subjectId="subjectId" :tipFlag="tipFlag"></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {onLoad} from '@dcloudio/uni-app';
-	import {ref} from "vue";
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import cacheManager from '@/utils/cacheManager.js';
-	const subjectId = ref(null);//游客使用
-	const levelId = ref(null);//游客使用
-	const typeId = ref(null);//游客使用
-	const tipFlag = ref(null); //游客使用
-	let routerOpt  = ref(false);
-	
-	// 关于我们
-	function handleBack(){
-		if(cacheManager.get('auth')){
-			// 非游客
-			uni.redirectTo({
-				url: '/pages/my/yingyongshezhi'
-			});
-		}else{
-			uni.redirectTo({
-				url: '/pages/my/yingyongshezhi'
-			});
-			// 游客
-			// uni.redirectTo({
-			// 	url: `/pages/my/index?typeId=${routerOpt.typeId}&levelId=${routerOpt.levelId}&subjectId=${routerOpt.subjectId}&tipFlag=${routerOpt.tipFlag}`
-			// });
-		}
-		
-	}
-	
-	onLoad((options) => {
-		if(options){
-			routerOpt = options;
-			subjectId.value = options.subjectId
-			typeId.value = options.typeId
-			levelId.value = options.levelId
-			tipFlag.value = options.tipFlag
-		}
-	})
-</script>
-
-<style>
-</style>

+ 0 - 52
pages/my/banbenConfirmDialog.vue

@@ -1,52 +0,0 @@
-<!-- 生成题库弹窗 -->
-<template>
- <uni-popup ref="tipBigPopup" :animation="false" :is-mask-click="false"
-  mask-background-color="rgba(255, 255, 255, 0.6);">
-  <view class="sxtk-sc-dialog">
-  <view class="tip-content-box">
-   <view class="tip-title">{{title}}</view>
-   <view class="tip-content" v-if="content">{{content}}</view>
-   <view class="tip-btn-box">
-    <view class="confirm-btn" @click="confirmBtn">生成</view>
-    <view class="not-confirm-btn" @click="handleClose">取消</view>
-   </view>
-  </view>
-  </view>
- </uni-popup>
-</template>
-
-<script setup>
- import { ref } from 'vue';
- const props = defineProps({
-   title: {
-     type: String,
-     default: '温馨提示'
-   },
-   content: {
-     type: String,
-     default: ''
-   },
- });
- const tipBigPopup = ref(null); // 索引
- const $emit = defineEmits(['confirm-btn'])
- // 打开弹窗
- function handleShow() {
-  tipBigPopup.value.open();
- }
- // 取消
- function handleClose() {
-  tipBigPopup.value.close();
- }
- // 确认
- function confirmBtn(){
-  $emit('confirm-btn');
-  tipBigPopup.value.close();
- }
- defineExpose({
-   handleShow,
-   handleClose
-  })
-</script>
-
-<style>
-</style>

+ 0 - 533
pages/my/index.vue

@@ -1,533 +0,0 @@
-<template>
-	<view class="ezy-my-page">
-		<view class="my-head-box">
-			<icon class="head-img-box" :style="{backgroundImage: 'url(' + myInfoData.icon + ')'}"></icon>
-			<view class="head-content-box">
-				<text>{{myInfoData.nickName}}</text>
-				<view class="ezy-jf-box" v-if="loginFlag">
-					<icon class="jf-icon"></icon>
-					<text class="jf-text">{{myInfoData.credit}}</text>
-				</view>
-			</view>
-		</view>
-		<swiper class="my-hyqy-swiper" circular :indicator-dots="hyqyData.indicatorDots" :autoplay="hyqyData.autoplay"
-			:interval="hyqyData.interval" :duration="hyqyData.duration" indicator-color="#5195d3"
-			indicator-active-color="#83d9ff" v-if="bannerArr">
-			<!-- 1.数学 2.英语-->
-			<swiper-item v-for="(item, index) in bannerArr" :key="index" class="hyqy-box" @click="hyqyBtn(item)">
-				<img :src="item.addCover" class="hyqy-box-img" />
-			</swiper-item>
-		</swiper>
-		<!-- 
-		<view class="list-row" @click="telClick">
-			<icon class="list-icon tel-icon"></icon>
-			<text>手机号码</text>
-		</view> 
-		<view class="list-row" @click="aboutClick">
-			<icon class="list-icon about-icon"></icon>
-			<text>关于我们</text>
-		</view>
-		<view v-if="loginFlag" class="list-row" @click="xxscClick">
-			<icon class="list-icon sxtk-icon"></icon>
-			<text>学习时长</text>
-		</view>
-		<view v-if="loginFlag" class="list-row" @click="yinsizhengce">
-			<icon class="list-icon yszc-icon"></icon>
-			<text>隐私政策</text>
-		</view>
-		-->
-		<view class="my-list-box">
-			<view class="list-item" @click="xxjlClick">
-				<icon class="list-icon xxjl-icon"></icon>
-				<text>学习记录</text>
-			</view>
-			<view class="list-item" @click="checkWrong">
-				<icon class="list-icon error-icon"></icon>
-				<text>我的错题</text>
-			</view>
-			<view class="list-item" @click="sxtkClick">
-				<icon class="list-icon sxtk-icon"></icon>
-				<text>数学题库</text>
-			</view>
-			<view v-if="appleCode=='true'&&currentPlatform=='ios'" class="list-item" @click="duihuamaDuihuan">
-				<icon class="list-icon duihuanma-icon"></icon>
-				<text>兑换码</text>
-			</view>
-			<view v-if="currentPlatform=='android'" class="list-item" @click="duihuamaDuihuan">
-				<icon class="list-icon duihuanma-icon"></icon>
-				<text>兑换码</text>
-			</view>
-		</view>
-		<view class="my-list-box">
-			<view class="list-item" @click="cpscClick">
-				<icon class="list-icon cpsc-icon"></icon>
-				<text>产品商城</text>
-			</view>
-			<view class="list-item" @click="orderClick">
-				<icon class="list-icon order-icon"></icon>
-				<text>我的订单</text>
-			</view>
-			<view class="list-item" @click="kefudianhua">
-				<icon class="list-icon kfdh-icon"></icon>
-				<text>客服电话</text>
-			</view>
-			<view class="list-item" @click="yingyongshezhi">
-				<icon class="list-icon yysz-icon"></icon>
-				<text>应用设置</text>
-			</view>
-		</view>
-		<view class="my-list-box">
-			<view class="list-item" @click="yonghuzhuxiao">
-				<icon class="list-icon zhuxiao-icon"></icon>
-				<text>用户注销</text>
-			</view>
-			<view class="list-item" @click="exitLogin">
-				<icon class="list-icon login-out-icon"></icon>
-				<text>退出登录</text>
-			</view>
-		</view>
-		<CustomTabBar :levelId="levelId" :currentTabNumber="3" :typeId="typeId" :subjectId="subjectId"
-			:tipFlag="tipFlag">
-		</CustomTabBar>
-		<tip-small-dialog ref="exitDialogRef" @confirm-btn="exitBtn" :content="tipContent"></tip-small-dialog>
-		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-		<tip-small-dialog ref="zhuxiaoDialogRef" @confirm-btn="zhuxiaoBtn" :content="zhuxiaoContent"></tip-small-dialog>
-		<duihuanmaDialog ref="duihuanmaDialogRef" @confirm-btn="duihuanmaBtn" title="兑换"></duihuanmaDialog>
-		<tel-dialog @telClose="telClose" @bindBtn="bindBtn" v-if="telDialogFlag"></tel-dialog>
-		<agree-content-dialog ref="agreeContentDialogRef" :agreeType="agreeType"></agree-content-dialog>
-		<tip-small-dialog ref="kefuDialogRef" :title="kefuTitle" @confirm-btn="kefuBtn" :content="kefuContent"
-			class="kefu-dialog"></tip-small-dialog>
-	</view>
-</template>
-
-<script setup>
-	import agreeContentDialog from '@/pages/login/agreeContentDialog.vue';
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from '@/utils/cacheManager.js';
-	import {
-		logout
-	} from '@/api/login.js'
-	import {
-		myInfo,
-		zhuxiao,
-		duihuanmaCode,
-		myCardList,
-		commonCardList
-	} from '@/api/my.js'
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import {
-		getCurrentInstance
-	} from 'vue';
-	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue';
-	import duihuanmaDialog from '@/components/dialog/duihuanmaDialog.vue';
-	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
-	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import telDialog from './telDialog.vue'
-	import {
-		MESSAGE_VISITER_TO_LOGIN
-	} from "@/utils/constant.js"
-	import {
-		onShow
-	} from '@dcloudio/uni-app';
-	onShow(() => {
-		if (!cacheManager.get('auth')) {
-			youkeFun();
-		} else {
-			// 非游客
-			noYoukeFun();
-		}
-	})
-	const agreeType = ref(null);
-	const agreeContentDialogRef = ref(null);
-	const subjectId = ref(null); //游客使用
-	const levelId = ref(null); //游客使用
-	const typeId = ref(null); //游客使用
-	const tipFlag = ref(null); //游客使用
-	const tipContent = '你确定要执行这个操作吗?';
-	const zhuxiaoContent = '你确定要执行这个操作吗?';
-	const duihuanmaContent = '你确定要执行这个操作吗?';
-	let hyqyData = reactive({
-		indicatorDots: true,
-		autoplay: true,
-		interval: 10000,
-		duration: 500
-	});
-	let loginFlag = ref(false);
-	let telDialogFlag = ref(false);
-	let myInfoData = reactive({
-		userImg: '',
-		userName: '',
-		credit: '',
-		vipFlag: '',
-		nickName: '',
-		icon: '',
-	});
-	let routerOpt = ref(false);
-	let appleCode = ref(null);
-	let currentPlatform = ref(null);
-	const exitDialogRef = ref(null);
-	const youkeDialogRef = ref(null);
-	const zhuxiaoDialogRef = ref(null);
-	const duihuanmaDialogRef = ref(null);
-	const bannerArr = ref(null);
-
-	const kefuDialogRef = ref(null);
-	const kefuTitle = '提示';
-	const kefuContent = '客服电话:4001750778';
-
-	const exitLogin = () => {
-		exitDialogRef.value.handleShow();
-	}
-
-	// 退出按钮
-	const exitBtn = () => {
-		if (loginFlag.value) {
-			logout().then(res => {
-				toast('退出登录成功')
-				cacheManager.clearAll();
-				uni.reLaunch({
-					url: '/pages/login/index'
-				});
-			}).catch(err => {
-				toast('退出登录失败,请稍后重试')
-			})
-		} else {
-			uni.reLaunch({
-				url: '/pages/login/index'
-			});
-		}
-
-	}
-
-	const zhuxiaoBtn = () => {
-		let req = {
-
-		}
-		zhuxiao().then(res => {
-			cacheManager.clearAll();
-			toast('用户注销成功')
-			uni.redirectTo({
-				url: '/pages/login/index'
-			});
-		}).catch(err => {
-			toast('失败,请稍后重试')
-		})
-	}
-
-	function yonghuzhuxiao() {
-		if (loginFlag.value) {
-			zhuxiaoDialogRef.value.handleShow();
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-
-	function duihuamaDuihuan() {
-		if (loginFlag.value) {
-			duihuanmaDialogRef.value.handleShow();
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-
-	function duihuanmaBtn(data) {
-		console.log('data', data);
-		let req = {
-			code: data
-		}
-		duihuanmaCode(req).then(res => {
-			if (res.code == 0) {
-				toast('兑换成功')
-				const localList = cacheManager.get('auth').levelIdList || []
-				const mergeList = [...new Set([...localList, ...res.data.levelIdList])]
-				cacheManager.updateObject('auth', {
-					levelIdList: mergeList
-				})
-				uni.redirectTo({
-					url: '/pages/my/index'
-				})
-			} else {
-				toast('兑换失败请重试或联系管理员')
-				return false
-			}
-		}).catch(err => {
-
-		})
-	}
-
-	function yinsizhengce() {
-		agreeType.value = 'ystk'
-		agreeContentDialogRef.value.handleShow();
-	}
-
-	function kefudianhua() {
-		kefuDialogRef.value.handleShow();
-	}
-
-	function kefuBtn() {
-		kefuDialogRef.value.handleClose();
-	}
-	// 游客弹窗---确定
-
-	function ykConfirm() {
-		uni.redirectTo({
-			url: '/pages/login/index'
-		});
-	}
-
-	function yingyongshezhi() {
-		if (loginFlag.value) {
-			const AuthCode = getUserIdentity();
-			if (AuthCode == 'Visitor') {
-				youkeDialogRef.value.handleShow();
-				return;
-			}
-			uni.redirectTo({
-				url: '/pages/my/yingyongshezhi'
-			});
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-
-	// 手机号码
-	function telClick() {
-		if (loginFlag.value) {
-			telDialogFlag.value = true;
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-
-	}
-
-	// 手机号码绑定
-	function bindBtn() {
-		telDialogFlag.value = false;
-		myGetAuth()
-	}
-
-	// 关闭手机号码弹窗
-	function telClose() {
-		telDialogFlag.value = false;
-	}
-
-	// 关于我们
-	function aboutClick() {
-		if (loginFlag.value) {
-			uni.redirectTo({
-				url: '/pages/my/aboutPage'
-			});
-		} else {
-			uni.redirectTo({
-				url: `/pages/my/aboutPage?levelId=${routerOpt.levelId}&typeId=${routerOpt.typeId}&subjectId=${routerOpt.subjectId}&tipFlag=${routerOpt.tipFlag}`
-			});
-		}
-	}
-
-
-	function sxtkClick() {
-		if (loginFlag.value) {
-			uni.redirectTo({
-				url: '/pages/my/sxtkPage'
-			});
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-
-	function xxjlClick() {
-		if (loginFlag.value) {
-			uni.redirectTo({
-				url: '/pages/my/xuexiJilu'
-			});
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-
-	function xxscClick() {
-		uni.redirectTo({
-			url: '/pages/my/xuexishichang'
-		});
-	}
-	// 产品商城
-	function cpscClick() {
-
-		if (loginFlag.value) {
-			uni.redirectTo({
-				url: '/pages/mall/mallPage'
-			});
-		} else {
-			uni.redirectTo({
-				url: `/pages/mall/mallPage?levelId=${routerOpt.levelId}&typeId=${routerOpt.typeId}&subjectId=${routerOpt.subjectId}&tipFlag=${routerOpt.tipFlag}`
-			});
-		}
-
-	}
-
-	// 订单
-	function orderClick() {
-		if (loginFlag.value) {
-			uni.redirectTo({
-				url: '/pages/pay/order'
-			});
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-
-	// 获取用户数据
-	function getMyInfo() {
-		myInfo({}).then(res => {
-
-			myInfoData.userName = res.data.userName;
-			myInfoData.credit = res.data.credit;
-
-			myInfoData.nickName = res.data.nickName;
-			appleCode.value = res.data.appleCode.toString()
-			if (res.data.nickName) {
-				myInfoData.nickName = res.data.nickName;
-			} else {
-				myInfoData.nickName = '鹅状元';
-			}
-			if (res.data.icon) {
-				myInfoData.icon = res.data.icon;
-			} else {
-				getUserImg(res.data.growthType)
-			}
-		})
-		getMyCardList();
-	}
-	// 登录人员的cardlist
-	function getMyCardList() {
-		myCardList({}).then(res => {
-			bannerArr.value = res.data;
-		})
-	}
-	// 游客的cardList
-	function getCommonCardList() {
-		commonCardList({}).then(res => {
-			bannerArr.value = res.data;
-		})
-	}
-
-	// 获取用户头像
-	function getUserImg(data) {
-		switch (data) {
-			case 0:
-				myInfoData.icon = 'static/images/my/head-img0.png'
-				break;
-			case 1:
-				myInfoData.icon = 'static/images/my/head-img1.png'
-				break;
-			case 2:
-				myInfoData.icon = 'static/images/my/head-img2.png'
-				break;
-			case 3:
-				myInfoData.icon = 'static/images/my/head-img3.png'
-				break;
-			default:
-				myInfoData.icon = 'static/images/my/head-unlogin-img.png'
-				break;
-
-		}
-	}
-	// 点击card
-	function hyqyBtn(data) {
-		if(data.subjectId ==0){
-			return false
-		}
-		if (loginFlag.value) {
-
-			uni.redirectTo({
-				url: '/pages/mall/mallPage?cardId=' + data.id + '&subjectId=' + data.subjectId + '&from=myPage'
-			})
-		} else {
-			uni.redirectTo({
-				url: `/pages/mall/mallPage?levelId=${routerOpt.levelId}&typeId=${routerOpt.typeId}&cardId=${data.id}&subjectId=${data.subjectId}&tipFlag=${routerOpt.tipFlag}`
-			});
-		}
-
-
-	}
-
-	// 判断是否是游客
-	function myGetAuth() {
-		let LocalStorage = cacheManager.get('auth');
-		if (LocalStorage) {
-			// 非游客
-			noYoukeFun()
-		} else {
-			youkeFun();
-		}
-	}
-
-	// 游客
-	function youkeFun() {
-		// 获取广告
-		getCommonCardList();
-		levelId.value = routerOpt.levelId
-		typeId.value = routerOpt.typeId
-		subjectId.value = routerOpt.subjectId
-		tipFlag.value = routerOpt.tipFlag
-		// my游客
-		loginFlag.value = false;
-		myInfoData.userName = '游客';
-		myInfoData.nickName = '鹅状元';
-		myInfoData.icon = 'static/images/my/head-unlogin-img.png'
-	}
-
-	// 非游客
-	function noYoukeFun() {
-		loginFlag.value = true;
-		getMyInfo();
-	}
-
-	function isIOSorAndroid() {
-		const systemInfo = uni.getSystemInfoSync();
-
-		console.log('systemInfo', systemInfo);
-
-		if (systemInfo.platform == 'ios') {
-			return currentPlatform.value = 'ios'
-		} else {
-			return currentPlatform.value = 'android'
-		}
-	}
-
-	onLoad((options) => {
-		if (!cacheManager.get('auth')) {
-			// 游客
-			routerOpt = options;
-			isIOSorAndroid()
-		} else {
-			//appleCode.value = cacheManager.get("auth").appleCode.toString()
-			isIOSorAndroid()
-		}
-	})
-
-	function checkWrong() {
-		if (loginFlag.value) {
-			const AuthCode = getUserIdentity();
-			if (AuthCode == 'Visitor') {
-				youkeDialogRef.value.handleShow();
-				return;
-			}
-			uni.redirectTo({
-				url: '/pages/wrong/index'
-			})
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-	}
-</script>

+ 0 - 146
pages/my/sxtkPage.vue

@@ -1,146 +0,0 @@
-<template>
-	<view class="ezy-sxtk-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-tab-border sxtk-tab-border">
-			<view class="tab-img"></view>
-			<view class="sxtk-tab-box">
-				<view v-for="(item,index) in jiaocaiData" :key="index"  class="tab-item"
-				 @click="selectNianji(item,index)" :class="{'active': currentNianjiName == item.nianji}">
-					<view class="tab-nianji-item">{{item.nianji}}</view>
-				</view>
-			</view>
-			<view class="sxtk-line"></view>
-			<view class="sxtk-banben-body">
-				<view v-for="(item,index) in currentBanbenList" :key="index" class="banben-item"
-				:class="{'active': banbenName == item}" @click="selectBanben(item,index)">
-					<view class="banben-text-item">{{item}}</view>
-				</view>
-			</view>
-			<view class="sxtk-line"></view>
-			<button class="sxtk-confirm-btn" @click="handleConfirm"></button>
-		</view>
-		<banbenConfirmDialog ref="jiaocaiRef" @confirm-btn="jcConfirm" :content="jcContent"></banbenConfirmDialog>
-		<CustomTabBar ></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-		import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import {
-		selectTiku
-	} from '@/api/my.js'
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import * as httpApi from "@/api/pdf.js"
-	import {
-		ref
-	} from "vue";
-	import banbenConfirmDialog from './banbenConfirmDialog.vue';
-	let jiaocaiData = ref(null)
-	let currentBanbenList = ref([])
-
-	let currentNianjiName = ref('L1')
-	let currentBanbenIndex = ref(null)
-	const banbenName = ref(null)
-	const jiaocaiRef = ref(null);
-	const jcContent = ref(null);
-
-	function selectNianji(item, index) {
-		currentNianjiName.value = item.nianji
-
-		currentBanbenList.value = item.banbenList
-		banbenName.value = ''
-
-	}
-
-	function jcConfirm() {
-		httpApi.getPDFUrl({
-		  banben:banbenName.value,
-		  nianji:currentNianjiName.value,
-		}).then(res1 => {
-			uni.downloadFile({
-			  url: res1.data,
-			  success: function (res) {
-			    var filePath = res.tempFilePath;
-			    uni.openDocument({
-			      filePath: filePath,
-			      showMenu: true,
-			      success: function (res) {
-			        console.log('打开文档成功');
-					jiaocaiRef.value.handleClose();
-			      }
-			    });
-			  }
-			});
-		})
-	
-		/* uni.navigateTo({
-			url: '/pages/pdfPage/pdfPage?banben=' + banbenName.value + '&nianji=' + currentNianjiName.value
-		}); */
-	}
-
-	function selectBanben(item, index) {
-
-		console.log('item', item);
-		if (!currentNianjiName.value) {
-			toast("请选择年级")
-			return false
-		}
-
-		banbenName.value = item
-
-	}
-
-	function handleBack() {
-		uni.redirectTo({
-			url: '/pages/my/index'
-		});
-	}
-
-	function handleConfirm() {
-		// 确认逻辑
-		if (banbenName.value && currentNianjiName.value) {
-			jcContent.value = "用户你好,鹅状元将为您随机生成《" + banbenName.value + "》100道试题."
-			console.log('jcContent.value', jcContent.value);
-			jiaocaiRef.value.handleShow();
-		} else {
-			toast("请选择年级和对应的教学版本")
-			return false
-		}
-	}
-
-	function getInfo() {
-		selectTiku({}).then(res => {
-			// jiaocaiData.value = [{
-			// 		"nianji": "L1",
-			// 		"banbenList": ["人教版"]
-			// 	},
-			// 	{
-			// 		"nianji": "L2",
-			// 		"banbenList": ["人教版222", "人教版222333"]
-			// 	}
-			// ]
-			jiaocaiData.value = res.data
-			// 默认显示第一个年级的版本列表
-			if (jiaocaiData.value && jiaocaiData.value.length > 0) {
-				currentBanbenList.value = jiaocaiData.value[0].banbenList
-			}
-		})
-	}
-
-	onLoad((options) => {
-		if (options.banben && options.nianji) {
-			currentNianjiName.value = options.nianji
-			banbenName.value = options.banben
-		}
-		getInfo()
-	})
-</script>

+ 0 - 240
pages/my/telDialog.vue

@@ -1,240 +0,0 @@
-<template>
-	<view class="my-tel-dialog">
-		<view class="my-tel-content">
-			<view class="tel-close" @click="telClose(AWSC)"></view>
-			<view class="tel-row">
-				<view class="my-tel-title">修改手机号</view>
-				<view class="my-input-box">
-					<input class="my-input" type="text" v-model="bindObj.telNumber" placeholder="请输入手机号" maxlength="11"
-						@input="changeTelInput" />
-					<view class="close-btn" v-if="bindObj.clearTelIcon" @click="clearTel"></view>
-				</view>
-
-
-				<captcha ref="captcha" :config="config" @captchaSuccess="captchaSuccess" @captchaError="captchaError"
-					@captchaFail="captchaFail" @captchaReady="captchaReady" @captchaClose="captchaClose"></captcha>
-				<view class="get-yzm-btn" @click="getYzmBtn" :class="{ 'get-yzm-disabled': bindObj.isDisabled}">
-					{{bindObj.buttonText}}
-				</view>
-
-
-			</view>
-			<view class="yzm-row">
-				<view class="yzm-tip" v-if="bindObj.getYzmFlag">验证码已发送至:{{bindObj.telNumber}}</view>
-				<view class="my-input-box">
-					<input class="my-input" type="text" v-model="bindObj.yzmNumber" placeholder="请输入验证码" maxlength="6"
-						@input="changeYzmInput" />
-					<view class="close-btn" v-if="bindObj.clearYzmIcon" @click="clearYzm"></view>
-				</view>
-				<view @click="bindBtn" class="my-bind-btn">绑定</view>
-			</view>
-
-		</view>
-	</view>
-</template>
-<script>
-	import cacheManager from '@/utils/cacheManager.js';
-	import captcha from "../../components/captcha4/index.vue";
-	import {
-		telBind,
-		sendCode
-	} from "@/api/login.js"
-	import {
-		toast
-	} from "../../utils/common";
-	export default {
-		data() {
-			return {
-				myflag: 0,
-				sliderObj: {
-					sessionId: '',
-					sig: '',
-					token: '',
-				},
-				bindObj: {
-					telNumber: '',
-					clearTelIcon: false,
-					yzmNumber: '',
-					clearYzmIcon: false,
-					/*** 验证码 ***/
-					yzmStatus: 'login-btn-disabled',
-					timeLeft: 60, // 初始倒计时时间(秒)
-					intervalId: null, // 定时器ID
-					isDisabled: true, // 按钮是否禁用
-					buttonText: '获取验证码', // 按钮文本
-					getYzmFlag: false, // 是否发送验证码
-				},
-				config: {
-					captchaId: "9d5837b0807b8de44da0de310a0b2813",
-				},
-			}
-		},
-		components: {
-			captcha
-		},
-		methods: {
-			telClose() {
-				this.$emit('telClose')
-			},
-
-			// 清空手机号
-			clearTel() {
-				this.bindObj.telNumber = '';
-				this.bindObj.isDisabled = true;
-				this.bindObj.clearTelIcon = false;
-				this.bindObj.getYzmFlag = false;
-			},
-
-			// 判断是否输入手机号
-			changeTelInput(event) {
-				if (event.detail.value.length > 0) {
-					this.bindObj.clearTelIcon = true;
-					this.validatePhoneNumber(event.detail.value);
-				} else {
-					this.bindObj.clearTelIcon = false;
-				}
-			},
-
-			// 手机号校验规则
-			validatePhoneNumber(value) {
-				const phoneRegex = /^1[3-9]\d{9}$/;
-				if (phoneRegex.test(value)) {
-					// 通过
-					this.bindObj.isDisabled = false;
-				} else {
-					// 不通过
-					this.bindObj.isDisabled = true;
-				}
-			},
-			// 获取验证码按钮
-			getYzmBtn() {
-				// 判断手机号校验是否通过
-				if (this.bindObj.timeLeft != 60) {
-					toast('请在' + this.bindObj.timeLeft + '后重新获取验证码!')
-					return
-				} else if (this.bindObj.isDisabled === true) {
-					toast("请输入正确的手机号!")
-					return
-				} else {
-				this.$refs.captcha.showCaptcha();
-				}
-			},
-
-	captchaSuccess(result) { // app端的回调
-				console.log(result)
-				this.startCountdown();
-				this.sliderData = result;
-				this.getMessage();
-
-			},
-			captchaError(e) {
-				// app端的回调
-				toast(JSON.stringify(e))
-			},
-			captchaReady() {
-				// app端的回调
-			},
-			captchaFail() {
-				// app端的回调
-				toast('验证失败!')
-			},
-			captchaClose() {
-				// uni.redirectTo({
-				// 	url: `/pages/login/index`
-				// })
-			},
-
-
-			getMessage() {
-				let req = {
-				phone: this.bindObj.telNumber,
-				captchaOutput: this.sliderData.captcha_output,
-				genTime: this.sliderData.gen_time,
-				lotNumber: this.sliderData.lot_number,
-				passToken: this.sliderData.pass_token,
-				}
-				sendCode(req).then(res => {
-					this.bindObj.getYzmFlag = true;
-				}).catch(err => {
-					this.bindObj.getYzmFlag = false;
-					toast('验证码获取失败:' + err)
-				})
-			},
-
-			// 清空验证码
-			clearYzm() {
-				this.bindObj.yzmNumber = '';
-				this.bindObj.isDisabled = true;
-				this.bindObj.clearYzmIcon = false;
-			},
-
-			// 判断是否输入验证码
-			changeYzmInput(event) {
-				if (event.detail.value.length > 0) {
-					this.bindObj.clearYzmIcon = true;
-				} else {
-					this.bindObj.clearYzmIcon = false;
-				}
-			},
-
-			// 开始计时
-			startCountdown() {
-
-				if (this.bindObj.buttonText === '重新发送') {
-					this.sliderFlag = true;
-				}
-				this.bindObj.isDisabled = true;
-				this.bindObj.buttonText = `重新发送(${this.bindObj.timeLeft}S)`;
-
-				// 清除之前的定时器(如果有)
-				if (this.bindObj.intervalId) {
-					clearInterval(this.bindObj.intervalId);
-				}
-
-				// 设置新的定时器
-				this.bindObj.intervalId = setInterval(() => {
-					this.bindObj.timeLeft--;
-					if (this.bindObj.timeLeft <= 0) {
-						clearInterval(this.bindObj.intervalId);
-						this.bindObj.timeLeft = 60; // 重置倒计时
-						this.bindObj.isDisabled = false;
-						this.bindObj.buttonText = '重新发送';
-					} else {
-						this.bindObj.buttonText = `重新发送(${this.bindObj.timeLeft}S)`;
-					}
-				}, 1000);
-			},
-
-			// 绑定按钮
-			bindBtn() {
-				if (this.bindObj.telNumber === '') {
-					toast('手机号不能为空')
-					return;
-				}
-				if (this.bindObj.yzmNumber === '') {
-					toast('验证码不能为空')
-					return;
-				}
-
-				let req = {
-					tel: this.bindObj.telNumber,
-					code: this.bindObj.yzmNumber,
-				}
-				telBind(req).then(res => {
-					if (res.code == 0) {
-						toast('手机号绑定成功')
-						this.updataTel(this.bindObj.telNumber);
-						this.$emit('bindBtn')
-					}
-				})
-			},
-
-			// 在缓存中修改手机号
-			updataTel(data) {
-				cacheManager.updateObject('auth', {
-					userName: data
-				})
-			}
-		}
-	}
-</script>

+ 0 - 394
pages/my/xuexiJilu.vue

@@ -1,394 +0,0 @@
-<template>
-	<view class="ezy-xxjl-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-tab-border">
-			<uni-segmented-control :current="data.current" :values="data.items" active-color="#3A7FE9"
-				@clickItem="onChangeTab" class="ezy-tab-box" />
-			<view class="xxjl-content-box">
-				<view v-if="data.current === 0">
-					<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.shuxue.loading"
-						:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
-						class="xxjl-scroll-view">
-						<!--数学-->
-						<uni-list>
-							<uni-list-item v-for="item in data.shuxue.list" class="xxjl-item-box">
-								<template v-slot:body>
-									<view @click="goDao(item)">
-										<view class="item-date-row">
-											<view class="data-item">
-												<icon class="data-icon"></icon>
-												<text>{{ item.createTime }}</text>
-											</view>
-											<!-- 这里加点击事件 wgy看这里 -->
-											<view class="data-item del-item">
-												<icon @click.stop="deleteJilu(item)" class="del-icon"></icon>
-											</view>
-										</view>
-										<view class="item-zhang-row">
-											<icon class="zhang-icon"></icon>
-											<view>{{ item.levelName }}</view>
-										</view>
-										<view class="item-jie-row">
-											<text>{{ item.zhangName }}</text>
-										</view>
-										<view class="item-jie-row">
-											<text>{{ item.jieName }}</text>
-										</view>
-									</view>
-
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="data.shuxue.state" @click="getMore(0)"
-								:contentText="data.shuxue.contentText"></uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-				<view v-if="data.current === 1">
-					<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.yingyu.loading"
-						:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
-						class="xxjl-scroll-view">
-						<!--英语-->
-						<uni-list>
-							<uni-list-item v-for="item in data.yingyu.list" class="xxjl-item-box">
-								<template v-slot:body>
-									<view>
-										<view class="item-date-row">
-											<view class="data-item">
-												<icon class="data-icon"></icon>
-												<text>{{ item.createTime }}</text>
-											</view>
-											<!-- 这里加点击事件 wgy看这里 -->
-											<view class="data-item del-item">
-												<icon @click.stop="deleteJilu(item)" class="del-icon"></icon>
-											</view>
-										</view>
-										<view class="item-zhang-row">
-											<icon class="zhang-icon"></icon>
-											<view>{{ item.levelName }}</view>
-										</view>
-										<view class="item-jie-row">
-											<text>{{ item.zhangName }}</text>
-										</view>
-										<view class="item-jie-row">
-											<text>{{ item.jieName }}</text>
-										</view>
-									</view>
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="data.yingyu.state" @click="getMore(1)"
-								:contentText="data.yingyu.contentText"></uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-			</view>
-		</view>
-		<tip-small-dialog ref="deleteJiluDialogRef" @confirm-btn="deleteJiluBtn"
-			:content="deleteJiluContent"></tip-small-dialog>
-		<CustomTabBar></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import {
-		xuexiJilu,
-		xuexiJiluDelete
-	} from "@/api/my.js";
-	import {
-		onLoad
-	} from "@dcloudio/uni-app";
-	import cuoti from "@/components/chengji/chengji.vue";
-	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue';
-	import {
-		getWrongInfo
-	} from "@/api/wrong";
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import cacheManager from "@/utils/cacheManager.js"
-	const zhangId = ref(null);
-	const nianji = ref(null);
-	const subjectId = ref(null);
-	const deleteJiluDialogRef = ref(null);
-	const deleteJiluContent = '你确定要执行这个操作吗?';
-	const wrongRef = ref(null);
-	const deleteId = ref('');
-
-	const data = reactive({
-		items: ['数学', '英语'],
-		current: 0,
-		shuxue: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-
-		},
-		yingyu: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-		},
-		wrongList: [],
-	})
-	subjectId.value = data.current + 1;
-
-
-	function goDao(data) {
-		const auth = cacheManager.get('auth');
-		cacheManager.updateObject('auth', {
-			levelId: data.levelId,
-			zhangId: data.zhangId,
-		})
-		cacheManager.remove('zhangInfo')
-		uni.redirectTo({
-			url: `/pages/study/index`
-		})
-
-	}
-
-	function deleteJilu(item) {
-		deleteId.value = item.id
-		deleteJiluDialogRef.value.handleShow();
-	}
-
-	function deleteJiluBtn(id) {
-		let req = {
-			id: deleteId.value
-		}
-		xuexiJiluDelete(req).then(res => {
-			if (res.code == 0) {
-				if (data.current === 0) {
-					data.shuxue.list = [];
-					data.shuxue.page = 0;
-				} else {
-					data.yingyu.list = [];
-					data.yingyu.page = 0;
-				}
-				// 重新加载数据
-				refreshData(data.current);
-			} else {
-				toast('失败,请稍后重试')
-			}
-		}).catch(err => {
-			toast('失败,请稍后重试')
-		})
-	}
-
-	function handleBack() {
-		uni.redirectTo({
-			url: '/pages/my/index'
-		})
-		uni.$emit('back-outpage')
-	}
-
-	function handleBackFromCuoti() {
-		wrongRef.value.closePopup();
-		uni.$emit('back-outpage')
-	}
-
-	function onChangeTab(e) {
-		if (data.current !== e.currentIndex) {
-			data.current = e.currentIndex;
-			subjectId.value = data.current + 1;
-			if (data.current == 0) {
-				data.shuxue.page = 0
-			} else if (data.current == 1) {
-				data.yingyu.page = 0
-			}
-			refreshData(data.current);
-		}
-	}
-
-	function refreshData(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			subjectId: data.current + 1 // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-			data.shuxue.list = [];
-			// 数学
-			data.shuxue.state = 'loading';
-			data.shuxue.page++;
-			opt.page = data.shuxue.page;
-		} else if (code == 1) {
-			data.yingyu.list = [];
-			// 英语
-			data.yingyu.state = 'loading';
-			data.yingyu.page++;
-			opt.page = data.yingyu.page;
-		}
-		xuexiJilu(opt).then(res => {
-			if (code == 0) {
-				data.shuxue.list = data.shuxue.list.concat(res.data.data);
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				data.yingyu.list = data.yingyu.list.concat(res.data.data);
-				data.yingyu.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > data.shuxue.list.length) {
-					// 数学
-					data.shuxue.state = 'more';
-					data.shuxue.loading = false;
-				} else {
-					// 数学
-					data.shuxue.state = 'no-more';
-					data.shuxue.loading = false;
-
-				}
-			} else if (code == 1) {
-				if (res.data.total > data.yingyu.list.length) {
-					// 英语
-					data.yingyu.state = 'more';
-					data.yingyu.loading = false;
-				} else {
-					// 英语
-					data.yingyu.state = 'no-more';
-					data.yingyu.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				data.shuxue.state = 'more';
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				// 英语
-				data.yingyu.state = 'more';
-				data.yingyu.loading = false;
-			}
-		})
-	}
-
-	function getMore(code) {
-		console.log('12312312312');
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			subjectId: data.current + 1 // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-
-			if (data.shuxue.state == 'no-more') return;
-			// 数学
-			data.shuxue.state = 'loading';
-			data.shuxue.page++;
-			opt.page = data.shuxue.page;
-		} else if (code == 1) {
-			// 英语
-			if (data.yingyu.state == 'no-more') return;
-			data.yingyu.state = 'loading';
-			data.yingyu.page++;
-			opt.page = data.yingyu.page;
-		}
-		xuexiJilu(opt).then(res => {
-			if (code == 0) {
-				data.shuxue.list = data.shuxue.list.concat(res.data.data);
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				data.yingyu.list = data.yingyu.list.concat(res.data.data);
-				data.yingyu.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > data.shuxue.list.length) {
-					// 数学
-					data.shuxue.state = 'more';
-					data.shuxue.state_text = '加载更多';
-					data.shuxue.loading = false;
-				} else {
-					// 数学
-					data.shuxue.state = 'no-more';
-					data.shuxue.state_text = '没有更多啦';
-
-					data.shuxue.loading = false;
-				}
-			} else if (code == 1) {
-				if (res.data.total > data.yingyu.list.length) {
-					// 英语
-					data.yingyu.state = 'more';
-					data.yingyu.state_text = '加载更多';
-					data.yingyu.loading = false;
-				} else {
-					// 英语
-					data.yingyu.state = 'no-more';
-					data.yingyu.state_text = '没有更多啦';
-
-					data.yingyu.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				data.shuxue.state = 'more';
-				data.shuxue.state_text = '加载更多';
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				// 英语
-				data.yingyu.state = 'more';
-				data.yingyu.state_text = '加载更多';
-				data.yingyu.loading = false;
-			}
-		})
-	}
-
-	// function formatListToUse(list) {
-	// 	list.forEach((item, index) => {
-	// 		item.mta_show = false;
-	// 		if (item.type == 3) {
-	// 			item.result = JSON.parse(item.result);
-	// 			item.placeholders = item.result.map((item, cindex) => `[bank${cindex+1}]`)
-	// 			item.reply = item.reply ? JSON.parse(item.reply) : item.result.map(() => '');
-	// 		}
-
-	//      if (item.type == 4) {
-	//        // 特殊题型英语题
-	//        const audioList = item.audios ? item.audios.split(',') : [];
-	//        item.placeholders = audioList.map((item, cindex) => `[yingyu${cindex+1}]`)
-	//        item.audioList = audioList;
-	//      }
-	// 	})
-	// }
-	function onRefresh() {
-		if (data.current == 0) {
-			data.shuxue.page = 0;
-			data.shuxue.list = [];
-			data.shuxue.loading = true;
-		} else if (data.current == 1) {
-			data.yingyu.page = 0;
-			data.yingyu.list = [];
-			data.yingyu.loading = true;
-		}
-		refreshData(data.current);
-	}
-
-	onLoad(() => {
-		getMore(data.current);
-	})
-</script>
-
-<style>
-
-</style>

+ 0 - 270
pages/my/xuexishichang.vue

@@ -1,270 +0,0 @@
-<template>
-	<view class="ezy-cuoti-page">
-		<view class="icon-title-navBar-box">
-			<view @click="handleBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">关于我们</text>
-		</view>
-		<text>学习时长</text>
-		<CustomTabBar></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import {
-		getWrongData
-	} from "@/api/wrong";
-	import {
-		onLoad
-	} from "@dcloudio/uni-app";
-	import cuoti from "@/components/chengji/chengji.vue";
-	import {
-		getWrongInfo
-	} from "@/api/wrong";
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-
-	const zhangId = ref(null);
-	const nianji = ref(null);
-	const subjectId = ref(null);
-
-	const wrongRef = ref(null);
-
-	const data = reactive({
-		items: ['数学', '英语'],
-		current: 0,
-		shuxue: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-
-		},
-		yingyu: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-		},
-		wrongList: [],
-	})
-	subjectId.value = data.current+1;
-	function handleBack() {
-		uni.redirectTo({
-			url: '/pages/my/index'
-		})
-	}
-
-	function handleBackFromCuoti() {
-		wrongRef.value.closePopup();
-		uni.$emit('back-outpage')
-	}
-
-	function onChangeTab(e) {
-		if (data.current !== e.currentIndex) {
-			data.current = e.currentIndex;
-			subjectId.value = data.current+1;
-			if (data.current == 0) {
-				data.shuxue.page = 0
-			} else if (data.current == 1) {
-				data.yingyu.page = 0
-			}
-			refreshData(data.current);
-		}
-	}
-
-	function refreshData(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			subjectId: data.current + 1 // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-			data.shuxue.list = [];
-			// 数学
-			data.shuxue.state = 'loading';
-			data.shuxue.page++;
-			opt.page = data.shuxue.page;
-		} else if (code == 1) {
-			data.yingyu.list = [];
-			// 英语
-			data.yingyu.state = 'loading';
-			data.yingyu.page++;
-			opt.page = data.yingyu.page;
-		}
-		getWrongData(opt).then(res => {
-			if (code == 0) {
-				data.shuxue.list = data.shuxue.list.concat(res.data.data);
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				data.yingyu.list = data.yingyu.list.concat(res.data.data);
-				data.yingyu.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > data.shuxue.list.length) {
-					// 数学
-					data.shuxue.state = 'more';
-					data.shuxue.loading = false;
-				} else {
-					// 数学
-					data.shuxue.state = 'no-more';
-					data.shuxue.loading = false;
-				
-				}
-			} else if (code == 1) {
-				if (res.data.total > data.yingyu.list.length) {
-					// 英语
-					data.yingyu.state = 'more';
-					data.yingyu.loading = false;
-				} else {
-					// 英语
-					data.yingyu.state = 'no-more';
-					data.yingyu.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				data.shuxue.state = 'more';
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				// 英语
-				data.yingyu.state = 'more';
-				data.yingyu.loading = false;
-			}
-		})
-	}
-
-	function getMore(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			subjectId: data.current + 1 // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-			if (data.shuxue.state == 'no-more') return;
-			// 数学
-			data.shuxue.state = 'loading';
-			data.shuxue.page++;
-			opt.page = data.shuxue.page;
-		} else if (code == 1) {
-			// 英语
-			if (data.yingyu.state == 'no-more') return;
-			data.yingyu.state = 'loading';
-			data.yingyu.page++;
-			opt.page = data.yingyu.page;
-		}
-		getWrongData(opt).then(res => {
-			if (code == 0) {
-				data.shuxue.list = data.shuxue.list.concat(res.data.data);
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				data.yingyu.list = data.yingyu.list.concat(res.data.data);
-				data.yingyu.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > data.shuxue.list.length) {
-					// 数学
-					data.shuxue.state = 'more';
-					data.shuxue.state_text = '加载更多';
-					data.shuxue.loading = false;
-				} else {
-					// 数学
-					data.shuxue.state = 'no-more';
-					data.shuxue.state_text = '没有更多啦';
-				
-					data.shuxue.loading = false;
-				}
-			} else if (code == 1) {
-				if (res.data.total > data.yingyu.list.length) {
-					// 英语
-					data.yingyu.state = 'more';
-					data.yingyu.state_text = '加载更多';
-					data.yingyu.loading = false;
-				} else {
-					// 英语
-					data.yingyu.state = 'no-more';
-					data.yingyu.state_text = '没有更多啦';
-			
-					data.yingyu.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				data.shuxue.state = 'more';
-				data.shuxue.state_text = '加载更多';
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				// 英语
-				data.yingyu.state = 'more';
-				data.yingyu.state_text = '加载更多';
-				data.yingyu.loading = false;
-			}
-		})
-	}
-
-	function formatListToUse(list) {
-		list.forEach((item, index) => {
-			item.mta_show = false;
-			if (item.type == 3) {
-				item.result = JSON.parse(item.result);
-				item.placeholders = item.result.map((item, cindex) => `[bank${cindex+1}]`)
-				item.reply = item.reply ? JSON.parse(item.reply) : item.result.map(() => '');
-			}
-
-      if (item.type == 4) {
-        // 特殊题型英语题
-        const audioList = item.audios ? item.audios.split(',') : [];
-        item.placeholders = audioList.map((item, cindex) => `[yingyu${cindex+1}]`)
-        item.audioList = audioList;
-      }
-		})
-	}
-
-	function getCuotiData(item) {
-		getWrongInfo({
-			subjectId: data.current + 1,
-			cdate: item.cdate
-		}).then(res => {
-			formatListToUse(res.data)
-			data.wrongList = res.data;
-			wrongRef.value.showPopup();
-		})
-	}
-
-	function onRefresh() {
-		if (data.current == 0) {
-			data.shuxue.page = 0;
-			data.shuxue.list = [];
-			data.shuxue.loading = true;
-		} else if (data.current == 1) {
-			data.yingyu.page = 0;
-			data.yingyu.list = [];
-			data.yingyu.loading = true;
-		}
-		refreshData(data.current);
-	}
-
-	onLoad(() => {
-		getMore(data.current);
-	})
-</script>
-
-<style>
-
-</style>

+ 0 - 401
pages/my/yingyongshezhi.vue

@@ -1,401 +0,0 @@
-<template>
-	<view class="ezy-yysz-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-tab-border">
-			<view class="yysz-row-box">
-				<view class="yysz-item img-item" @click="headClick">
-					<text>头像</text>
-					<icon class="yysz-img-box"
-						:style="{backgroundImage: 'url(' + myInfoData.icon + ')'}"></icon>
-				</view>
-				<view class="yysz-item" @click="nichengClick">
-					<text>昵称</text>
-					<text>{{myInfoData.nickName}}</text>
-				</view>
-			</view>	
-			<view class="yysz-row-box">
-				<view class="yysz-item" @click="telClick">
-					<text>手机号码</text>
-					<text>{{myInfoData.userName}}</text>
-				</view>
-			</view>
-			<view class="yysz-row-box">	
-				<view class="yysz-item" @click="aboutClick">
-					<text>关于我们</text>
-				</view>
-				<view v-if="loginFlag" class="yysz-item" @click="yinsizhengce">
-					<text>隐私政策</text>
-				</view>
-				<view class="yysz-item" @click="kefudianhua">
-					<text>客服与投诉</text>
-					<text>4001750778</text>
-				</view>
-				<!--<view v-if="loginFlag" class="yysz-item" @click="yonghuzhuxiao">
-					<icon class="list-icon zhuxiao-icon"></icon>
-					<text>用户注销</text>
-				</view>
-				 <view class="yysz-item" @click="exitLogin">
-					<icon class="list-icon login-out-icon"></icon>
-					<text>退出登录</text>
-				</view> -->
-		</view>
-		</view>
-		<CustomTabBar :levelId="levelId" :currentTabNumber="3" :typeId="typeId" :subjectId="subjectId"
-			:tipFlag="tipFlag">
-		</CustomTabBar>
-		<tip-small-dialog ref="exitDialogRef" @confirm-btn="exitBtn" :content="tipContent"></tip-small-dialog>
-		<tip-small-dialog ref="zhuxiaoDialogRef" @confirm-btn="zhuxiaoBtn" :content="zhuxiaoContent"></tip-small-dialog>
-		<duihuanmaDialog ref="duihuanmaDialogRef" @confirm-btn="duihuanmaBtn" title="兑换"></duihuanmaDialog>
-		<tel-dialog @telClose="telClose" @bindBtn="bindBtn" v-if="telDialogFlag"></tel-dialog>
-		<agree-content-dialog ref="agreeContentDialogRef" :agreeType="agreeType"></agree-content-dialog>
-		<tip-small-dialog ref="kefuDialogRef" :title="kefuTitle" @confirm-btn="kefuBtn" :content="kefuContent"
-			class="kefu-dialog"></tip-small-dialog>
-		<nichengDialog ref="nichengDialogRef" @confirm-btn="nichengBtn" title="修改昵称"></nichengDialog>
-	</view>
-</template>
-
-<script setup>
-	import agreeContentDialog from '@/pages/login/agreeContentDialog.vue';
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from '@/utils/cacheManager.js';
-	import {
-		logout
-	} from '@/api/login.js'
-	import {
-		myInfo,
-		zhuxiao,
-		duihuanmaCode,
-		nichengUpdate,
-		myCardList,
-		commonCardList,
-		getFilePolicy,
-		updataHead
-	} from '@/api/my.js'
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue';
-	import duihuanmaDialog from '@/components/dialog/duihuanmaDialog.vue';
-	import nichengDialog from '@/components/dialog/nichengDialog.vue';
-	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
-	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import telDialog from './telDialog.vue'
-	import {
-		onShow
-	} from '@dcloudio/uni-app';
-	
-	import { usePermission } from "@/store/permissionStore.js"
-	const permissionStore = usePermission()
-	
-	const agreeType = ref(null);
-	const agreeContentDialogRef = ref(null);
-
-	const tipContent = '你确定要执行这个操作吗?';
-	const zhuxiaoContent = '你确定要执行这个操作吗?';
-	let loginFlag = ref(false);
-	let telDialogFlag = ref(false);
-	let myInfoData = reactive({
-		userImg: '',
-		userName: '',
-		credit: '',
-		vipFlag: '',
-		nickName: '',
-		icon: '',
-	});
-	let routerOpt = ref(false);
-	let appleCode = ref(null);
-	let currentPlatform = ref(null);
-	const exitDialogRef = ref(null);
-	const zhuxiaoDialogRef = ref(null);
-	const nichengDialogRef = ref(null);
-
-	const kefuDialogRef = ref(null);
-	const kefuTitle = '提示';
-	const kefuContent = '客服电话:4001750778';
-	const exitLogin = () => {
-		exitDialogRef.value.handleShow();
-	}
-
-	function handleBack() {
-		uni.redirectTo({
-			url: '/pages/my/index'
-		})
-	}
-
-	function headClick() {
-		chooseImage()
-	}
-
-	const checkAlbumPermission = async () => {
-		const status = await uni.getSetting()
-		if (!status.authSetting['scope.album']) {
-			await uni.authorize({
-				scope: 'scope.album'
-			})
-		}
-	}
-	const chooseImage = async () => {
-		try {
-		//	await checkAlbumPermission()
-			/* #ifdef APP */
-			const systemInfo = uni.getSystemInfoSync();
-			if (systemInfo.platform != 'ios') {
-				if (!await permissionStore.requstPermission('READ_EXTERNAL_STORAGE')) return
-			}
-			/* #endif */
-		
-			uni.chooseImage({
-				count: 1,
-				sizeType: ['compressed'],
-				sourceType: ['album'], // 仅限相册选择‌:ml-citation{ref="1" data="citationList"}
-				success: (res) => {
-
-					uploadFile(res.tempFilePaths[0])
-				},
-				fail: (err) => {
-					console.error('选择失败:', err)
-				}
-			})
-		} catch (err) {
-			uni.showModal({
-				title: '权限申请失败',
-				content: '请前往设置开启相册权限'
-			})
-		}
-	}
-
-	function updateIcon(data) {
-		updataHead({
-			icon: data
-		}).then(res => {
-			if (res.code == 0) {
-				uni.showToast({
-					title: '上传成功',
-					icon: 'success'
-				});
-			} else {
-				uni.showToast({
-					title: '上传失败',
-				});
-			}
-		})
-	}
-
-	function uploadFile(filePath) {
-		const suffix = filePath.split('.').pop();
-		let req = {
-			prefix: 'resource/',
-			suffix: suffix
-		}
-		getFilePolicy(req).then(res => {
-			if (res.code === 0) {
-				const policyData = res.data;
-				console.log('policyData', policyData);
-				uni.uploadFile({
-					url: policyData.uploadUrl,
-					filePath: filePath,
-					name: 'file',
-					formData: {
-						key: policyData.key,
-						policy: policyData.policy,
-						OSSAccessKeyId: policyData.accessid,
-						signature: policyData.signature,
-						success_action_status: '200'
-					},
-					header: {
-						'Content-Type': 'multipart/form-data'
-					},
-					success(uploadRes) {
-						console.log('uploadRes', uploadRes);
-						if (uploadRes.statusCode === 200) {
-							myInfoData.icon = `${policyData.downloadUrl}/${policyData.key}`;
-							updateIcon(myInfoData.icon)
-						} else {
-							uni.showToast({
-								title: '阿里云上传错误,请重试!',
-							});
-							return false
-						}
-					},
-					fail(err) {
-						console.log('err', err);
-					}
-				});
-
-
-			}
-		})
-
-	}
-
-	function nichengClick() {
-		nichengDialogRef.value.handleShow();
-	}
-	// 退出按钮
-	const exitBtn = () => {
-		if (loginFlag.value) {
-			logout().then(res => {
-				toast('退出登录成功')
-				cacheManager.clearAll();
-				uni.reLaunch({
-					url: '/pages/login/index'
-				});
-			}).catch(err => {
-				toast('退出登录失败,请稍后重试')
-			})
-		} else {
-			uni.reLaunch({
-				url: '/pages/login/index'
-			});
-		}
-
-	}
-	const zhuxiaoBtn = () => {
-		let req = {
-
-		}
-		zhuxiao().then(res => {
-			cacheManager.clearAll();
-			toast('用户注销成功')
-			uni.redirectTo({
-				url: '/pages/login/index'
-			});
-		}).catch(err => {
-			toast('失败,请稍后重试')
-		})
-	}
-
-	function yonghuzhuxiao() {
-		zhuxiaoDialogRef.value.handleShow();
-	}
-
-	function nichengBtn(data) {
-		console.log('data', data);
-		let req = {
-			nickName: data
-		}
-		nichengUpdate(req).then(res => {
-			if (res.code == 0) {
-				toast('修改成功')
-				myInfoData.nickName = data
-			} else {
-				toast('修改失败请重试或联系管理员')
-				return false
-			}
-		}).catch(err => {
-
-		})
-	}
-
-	function yinsizhengce() {
-		agreeType.value = 'ystk'
-		agreeContentDialogRef.value.handleShow();
-	}
-
-	function kefudianhua() {
-		kefuDialogRef.value.handleShow();
-	}
-
-	function kefuBtn() {
-		kefuDialogRef.value.handleClose();
-	}
-	// 手机号码
-	function telClick() {
-		if (loginFlag.value) {
-			telDialogFlag.value = true;
-		} else {
-			youkeDialogRef.value.handleShow();
-		}
-
-	}
-	// 手机号码绑定
-	function bindBtn() {
-		telDialogFlag.value = false;
-		myGetAuth()
-	}
-	// 关闭手机号码弹窗
-	function telClose() {
-		telDialogFlag.value = false;
-	}
-	// 关于我们
-	function aboutClick() {
-		if (loginFlag.value) {
-			uni.redirectTo({
-				url: '/pages/my/aboutPage'
-			});
-		} else {
-			uni.redirectTo({
-				url: `/pages/my/aboutPage?levelId=${routerOpt.levelId}&typeId=${routerOpt.typeId}&subjectId=${routerOpt.subjectId}&tipFlag=${routerOpt.tipFlag}`
-			});
-		}
-	}
-	// 获取用户数据
-	function getMyInfo() {
-		myInfo({}).then(res => {
-			myInfoData.userName = res.data.userName;
-			myInfoData.credit = res.data.credit;
-			myInfoData.nickName = res.data.nickName;
-
-			if (res.data.nickName) {
-				myInfoData.nickName = res.data.nickName;
-			} else {
-				myInfoData.nickName = '鹅状元';
-			}
-			if (res.data.icon) {
-				myInfoData.icon = res.data.icon;
-			} else {
-				getUserImg(res.data.growthType)
-			}
-
-		})
-	}
-
-	function getUserImg(data) {
-		switch (data) {
-			case 0:
-				myInfoData.icon = 'static/images/my/head-img0.png'
-				break;
-			case 1:
-				myInfoData.icon = 'static/images/my/head-img1.png'
-				break;
-			case 2:
-				myInfoData.icon = 'static/images/my/head-img2.png'
-				break;
-			case 3:
-				myInfoData.icon = 'static/images/my/head-img3.png'
-				break;
-			default:
-				myInfoData.icon = 'static/images/my/head-unlogin-img.png'
-				break;
-
-		}
-	}
-
-	function isIOSorAndroid() {
-		const systemInfo = uni.getSystemInfoSync();
-
-		console.log('systemInfo', systemInfo);
-
-		if (systemInfo.platform == 'ios') {
-			return currentPlatform.value = 'ios'
-		} else {
-			return currentPlatform.value = 'android'
-		}
-	}
-	onLoad((options) => {
-		isIOSorAndroid()
-		loginFlag.value = true;
-		getMyInfo();
-	})
-</script>

+ 0 - 941
pages/pay/order.vue

@@ -1,941 +0,0 @@
-<template>
-	<view class="ezy-order-page">
-		<view class="icon-title-navBar-box">
-			<view @click="goBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">我的订单</text>
-		</view>
-		<view class="ezy-tab-border">
-
-			<uni-segmented-control :current="dingdanData.current" :values="dingdanData.items" active-color="#3A7FE9"
-				@clickItem="onChangeTab" class="ezy-tab-box" />
-			<view>
-				<view v-if="dingdanData.current == 0">
-					<scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="onScrolltolower"
-						:refresher-triggered="dingdanData.quanbu.loading" :refresher-threshold="50"
-						refresher-background="transparent" @refresherrefresh="onRefresh" class="order-scroll-view">
-						<!--数学-->
-						<uni-list>
-							<uni-list-item v-for="(item,index) in dingdanData.quanbu.list" :key="index"
-								class="order-list-item">
-								<template v-slot:body>
-									<view class="order-item-head">
-										<view class="order-name-box">
-											<icon></icon><text>鹅状元自营</text>
-										</view>
-										<view>
-											<text>不支持退订</text>
-											<text v-if="item.status ==2" class="pay-status">已付款</text>
-											<text v-if="item.status ==3" class="pay-status">已关闭</text>
-											<text v-if="item.status ==1" class="pay-status">待付款</text>
-										</view>
-									</view>
-									<view class="order-content-box" @click="goDao(item2,index2)"
-										v-for="(item2,index2) in item.cardList" :key="index2">
-										<!-- 需要改成从接口获取的 wgy-->
-										<img class="content-img" :src="item2.cover">
-										<view class="content-body-box">
-											<view class="content-name">{{item2.cardName}}</view>
-											<view class="content-text">{{item2.intro}}</view>
-											<!-- 未付款数据对一下  是否有课程包明细 wgy-->
-											<view class="content-money-box">
-												<view class="order-kcb-btn" v-if="item2.type ==1"
-													@click.stop="detailBtn(item2,index2)">课程包明细<icon></icon>
-												</view>
-												<text class="content-yuanjia">¥{{item.money}}</text>
-											</view>
-										</view>
-									</view>
-									<view class="content-heji" v-if="item.cardList.length>1">合计:¥{{item.money}}</view>
-									<view v-if="item.status !=2" class="order-bottom-box">
-										<view class="pay-status-box"
-											v-if="payType =='weixin'&&currentPlatform =='android'"
-											@click="switchPayWay">
-											<icon class="wx-icon"></icon>微信
-										</view>
-										<view class="pay-status-box"
-											v-if="payType =='zhifubao'&&currentPlatform =='android'"
-											@click="switchPayWay">
-											<icon class="zfb-icon"></icon>支付宝
-										</view>
-										<view class="pay-status-box apple-status-box" v-if="currentPlatform =='ios'">
-									<!-- 		<icon class="apple-icon"></icon> -->
-										</view>
-
-										<view v-if="currentPlatform =='android'" class="pay-btn"
-											@touchstart="creatOrder(item.cardList,index)">立即支付
-										</view>
-										<view v-if="currentPlatform =='ios'" class="pay-btn"
-											@touchstart="creatOrderIos(item.cardList,index,item.id)">立即支付
-										</view>
-									</view>
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="dingdanData.quanbu.state" @click="getMore(0)"
-								:contentText="dingdanData.quanbu.contentText">
-							</uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-				<view v-if="dingdanData.current == 1">
-					<scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="onScrolltolower"
-						:refresher-triggered="dingdanData.daiFukuan.loading" :refresher-threshold="50"
-						refresher-background="transparent" @refresherrefresh="onRefresh" class="order-scroll-view">
-						<!--数学-->
-						<uni-list>
-							<uni-list-item v-for="(item,index) in dingdanData.daiFukuan.list" :key="index"
-								class="order-list-item">
-								<template v-slot:body>
-									<view class="order-item-head">
-										<view class="order-name-box">
-											<icon></icon><text>鹅状元自营</text>
-										</view>
-										<view>
-											<text>不支持退订</text>
-											<text v-if="item.status ==2" class="pay-status">已付款</text>
-											<text v-if="item.status ==3" class="pay-status">已关闭</text>
-											<text v-if="item.status ==1" class="pay-status">待付款</text>
-										</view>
-									</view>
-									<view class="order-content-box" v-for="(item2,index2) in item.cardList"
-										:key="index2">
-										<!-- 需要改成从接口获取的 wgy-->
-										<img class="content-img" :src="item2.cover">
-										<view class="content-body-box">
-											<view class="content-name">{{item2.cardName}}</view>
-											<view class="content-text">{{item2.intro}}</view>
-											<!-- 未付款数据对一下  是否有课程包明细 wgy-->
-											<view class="content-money-box">
-												<view class="order-kcb-btn" v-if="item2.type ==1"
-													@click="detailBtn(item2,index2)">课程包明细<icon></icon>
-												</view>
-												<text class="content-yuanjia">¥{{item.money}}</text>
-											</view>
-										</view>
-									</view>
-									<view class="content-heji" v-if="item.cardList.length>1">合计:¥{{item.money}}</view>
-									<view v-if="item.status !=2" class="order-bottom-box">
-										<view class="pay-status-box"
-											v-if="payType =='weixin'&&currentPlatform =='android'"
-											@click="switchPayWay">
-											<icon class="wx-icon"></icon>微信
-										</view>
-										<view class="pay-status-box"
-											v-if="payType =='zhifubao'&&currentPlatform =='android'"
-											@click="switchPayWay">
-											<icon class="zfb-icon"></icon>支付宝
-										</view>
-										<view class="pay-status-box apple-status-box" v-if="currentPlatform =='ios'">
-										<!-- 	<icon class="apple-icon"></icon> -->
-										</view>
-
-										<view v-if="currentPlatform =='android'" class="pay-btn"
-											@touchstart="creatOrder(item.cardList,index)">立即支付
-										</view>
-										<view v-if="currentPlatform =='ios'" class="pay-btn"
-											@touchstart="creatOrderIos(item.cardList,index,item.id)">立即支付
-										</view>
-									</view>
-
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="dingdanData.daiFukuan.state" @click="getMore(1)"
-								:contentText="dingdanData.daiFukuan.contentText">
-							</uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-				<view v-if="dingdanData.current == 2">
-					<scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="onScrolltolower"
-						:refresher-triggered="dingdanData.yiFukuan.loading" :refresher-threshold="50"
-						refresher-background="transparent" @refresherrefresh="onRefresh" class="order-scroll-view">
-						<!--数学-->
-						<uni-list>
-							<uni-list-item v-for="(item,index) in dingdanData.yiFukuan.list" :key="index"
-								class="order-list-item">
-								<template v-slot:body>
-									<view class="order-item-head">
-										<view class="order-name-box">
-											<icon></icon><text>鹅状元自营</text>
-										</view>
-										<view>
-											<text>不支持退订</text>
-											<text v-if="item.status ==2" class="pay-status">已付款</text>
-											<text v-if="item.status ==3" class="pay-status">已关闭</text>
-											<text v-if="item.status ==1" class="pay-status">待付款</text>
-										</view>
-									</view>
-									<view class="order-content-box" @click="goDao(item2,index2)"
-										v-for="(item2,index2) in item.cardList" :key="index2">
-										<!-- 需要改成从接口获取的 wgy-->
-										<img class="content-img" :src="item2.cover">
-										<view class="content-body-box">
-											<view class="content-name">{{item2.cardName}}</view>
-											<view class="content-text">{{item2.intro}}</view>
-											<!-- 未付款数据对一下  是否有课程包明细 wgy-->
-											<view class="content-money-box">
-												<view class="order-kcb-btn" v-if="item2.type ==1"
-													@click="detailBtn(item2,index2)">课程包明细<icon></icon>
-												</view>
-												<text class="content-yuanjia">¥{{item.money}}</text>
-											</view>
-										</view>
-									</view>
-									<view class="content-heji" v-if="item.cardList.length>1">合计:¥{{item.money}}</view>
-									<view v-if="item.status !=2" class="order-bottom-box">
-										<view class="pay-status-box"
-											v-if="payType =='weixin'&&currentPlatform =='android'"
-											@click="switchPayWay">
-											<icon class="wx-icon"></icon>微信
-										</view>
-										<view class="pay-status-box"
-											v-if="payType =='zhifubao'&&currentPlatform =='android'"
-											@click="switchPayWay">
-											<icon class="zfb-icon"></icon>支付宝
-										</view>
-										<view class="pay-status-box apple-status-box" v-if="currentPlatform =='ios'">
-											<!-- <icon class="apple-icon"></icon> -->
-										</view>
-
-										<view v-if="currentPlatform =='android'" class="pay-btn"
-											@touchstart="creatOrder(item.cardList,index)">立即支付
-										</view>
-										<view v-if="currentPlatform =='ios'" class="pay-btn"
-											@touchstart="creatOrderIos(item.cardList,index,item.id)">立即支付
-										</view>
-									</view>
-
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="dingdanData.yiFukuan.state" @click="getMore(2)"
-								:contentText="dingdanData.yiFukuan.contentText">
-							</uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-			</view>
-		</view>
-		<product-dialog ref="mallProductPopup"></product-dialog>
-		<CustomTabBar></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import {
-		orderAdd,
-		orderPayAli,
-		orderPayWx,
-		orderPayApple,
-		getOrderList,
-		orderInfo,
-		orderCheck
-	} from "@/api/order.js"
-	import {
-		onLoad
-	} from "@dcloudio/uni-app";
-	import {
-		toast,
-		debounce,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from '@/utils/cacheManager.js';
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import payComponents from '@/components/payComponents/index.vue';
-	import productDialog from './productDialog.vue'
-	const mallProductPopup = ref(null);
-	const payComponentsRef = ref(null);
-	const showPayWay = ref(true)
-	let currentPlatform = ref('android')
-	const payType = ref('weixin');
-	let orderId = ref('');
-	let productId = ref(null)
-	let iapChannel = ref(null)
-	let quantity = ref(1)
-	let channel = ref('')
-	let appleFlag = ref('')
-
-	function switchPayWay() {
-		payType.value = payType.value == 'weixin' ? 'zhifubao' : 'weixin'
-	}
-
-	function detailBtn(data, index) {
-		mallProductPopup.value.detailShow(data.levelList);
-	}
-	const dingdanData = reactive({
-		items: ['全部', '待付款', '已付款'],
-		current: 0,
-		quanbu: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-
-		},
-		daiFukuan: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-		},
-		yiFukuan: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-		},
-	})
-
-	function goDao(data, index) {
-		console.log('data', data);
-		console.log('index', index);
-		if (data.type == 0 && data.levelList.length == 1) {
-			cacheManager.updateObject('auth', {
-				typeId: data.levelList[0].typeId,
-				levelId: data.levelList[0].levelId,
-				subjectId: data.levelList[0].subjectId,
-				currentZhang: 0
-			})
-			cacheManager.remove('zhangInfo')
-			uni.redirectTo({
-				url: `/pages/study/index`
-			})
-		}
-	}
-
-	function genggaiVip(data) {
-		uni.hideLoading();
-		const localList = cacheManager.get('auth').levelIdList || []
-		const mergeList = [...new Set([...localList, ...data.levelIdList])]
-		cacheManager.updateObject('auth', {
-			levelIdList: mergeList
-		})
-		toast("支付成功")
-		dingdanData.current = 2
-		getMore(2)
-		// if (formPage.value == 'my') {
-		// 	uni.redirectTo({
-		// 		url: '/pages/my/index'
-		// 	})
-		// } else {
-		// 	uni.redirectTo({
-		// 		url: '/pages/study/index'
-		// 	})
-		// }
-	}
-
-	const creatOrderIos = debounce((data, index, orderId) => {
-
-
-
-		console.log('data', data[0].cardId);
-		console.log('index', index);
-		console.log('orderId', orderId);
-		return
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-		const productMap = {
-			4: 'ezySxJstxL1', //计算特训 L1
-			6: 'ezySxTjmtL1', //图解母题 L1
-			7: 'ezySxJstxL2', //计算特训 L2
-			8: 'ezySxJstxL3', //计算特训 L3
-			9: 'ezySxJstxL4', //计算特训 L4
-			10: 'ezySxJstxL5', //计算特训 L5
-			11: 'ezySxJstxL6', //计算特训 L6
-			12: 'ezySxTjmtL2', //图解母题 L2
-			13: 'ezySxTjmtL3', //图解母题 L3
-			14: 'ezySxTjmtL4', //图解母题 L4
-			15: 'ezySxTjmtL5', //图解母题 L5
-			16: 'ezySxTjmtL6', //图解母题 L6
-			22: 'ezySxTjmtL1L6', //图解母题 L1-6
-			23: 'ezyYyZrpdL1', //自然拼读 L1
-			24: 'ezyYyZrpdL2', //自然拼读 L2
-			25: 'ezyYyZrpdL3', //自然拼读 L3
-			26: 'ezyYyZrpdL4', //自然拼读 L4
-			27: 'ezyYyZrpdL5', //自然拼读 L5
-			28: 'ezyYyZrpdL1L5', //自然拼读 L1-l5
-			29: ' ezySxJstxL1L6' //计算特训 L1-L6
-		};
-		const firstId = data.length > 0 ? data[0].cardId : null;
-		if (firstId) {
-			productId.value = productMap[firstId]
-			console.log('productId.value', productId.value);
-		} else {
-			toast("无对应产品Id,请练习管理员")
-			uni.hideLoading();
-			return false
-		}
-		setTimeout(() => {
-			uni.hideLoading();
-		}, 1000)
-		orderId.value = orderId
-		if (!orderId.value) {
-			toast(
-				"无orderId!"
-			)
-			return false
-		}
-		// 测试ios 1元
-		applePay()
-
-
-	}, 500)
-
-	function applePaySuccess(data) {
-		uni.showLoading({
-			title: '开通中',
-			mask: true
-		});
-		let req = {
-			"id": orderId.value,
-			"paynum": data.transactionIdentifier,
-			"receipt": data.transactionReceipt
-		}
-		console.log('reqreq', req);
-		orderPayApple(req).then(res => {
-			if (res.code == 0 && res.data) {
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				console.log('resiapChanneliapChanneliapChannel', res);
-				orderCheck({
-					id: orderId.value
-				}).then(res3 => {
-					console.log('res3', res3);
-					if (res3.code == 0 && res3.data.success) {
-						genggaiVip(res3.data)
-					} else {
-						setTimeout(() => {
-							orderCheck({
-								id: orderId.value
-							}).then(res4 => {
-								if (res4.code == 0 && res4.data.success) {
-									genggaiVip(res4.data)
-								} else {
-									toast(
-										"开通失败,请联系管理员!"
-									)
-									uni
-										.hideLoading();
-									return false
-								}
-							}).catch(() => {
-								uni.hideLoading();
-								toast("check接口报错")
-								return false
-							})
-						}, 5000)
-					}
-				}).catch(() => {
-					uni.hideLoading();
-					toast("check接口报错")
-					return false
-				})
-			} else {
-
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				uni.hideLoading();
-				toast("失败")
-				console.log('orderPayApple失败');
-				return false
-			}
-		})
-	}
-
-	function applePay() {
-		console.log('123123');
-		if (!productId.value) {
-			uni.showToast({
-				title: '苹果内购ID缺失,请选择其它支付方式或联系客服',
-				icon: "none"
-			});
-			return false;
-		}
-		uni.showLoading({
-			title: '正在支付中...'
-		});
-		try {
-			plus.payment.getChannels(function(channels) { //判读项目支付通道开通情况
-					for (var i in channels) {
-						iapChannel = channels[i];
-						// 获取 id 为 'appleiap' 的 channel  
-						console.info("支付通道", iapChannel)
-						if (iapChannel.id === 'appleiap') { //开通了app应用内支付,在manifest.josn中设置,开通后需打自定议基座
-					
-							// ids 数组中的项为 App Store Connect 配置的内购买项目产品ID(productId)
-							var ids = [productId.value];
-							// iap 为应用内支付对象 
-							iapChannel.requestOrder(ids, function(e) {
-									// 获取订单信息成功回调方法  
-									console.log('requestOrder success: ' + JSON.stringify(e));
-									uni.requestPayment({
-										provider: 'appleiap',
-										orderInfo: {
-											productid: productId.value, //产品id,来自于苹果
-											quantity: quantity.value, //产品数量
-											manualFinishTransaction: true
-										},
-										success: (e) => {
-											uni.hideLoading();
-
-											//	toast("苹果内购成功")
-									
-											applePaySuccess(e)
-											//e.payment.orderNo = that.orderNo
-											//支付成功回调,前端调用后台接口
-										},
-										fail: (e) => {
-											uni.hideLoading();
-												toast("失败或取消支付")
-										
-										},
-									})
-								},
-								function(e) {
-									// 获取订单信息失败回调方法  
-									console.log('requestOrder failed: ' + JSON.stringify(e));
-								});
-						} else {
-							console.log('不支持苹果支付')
-						}
-					}
-				},
-				function(e) {
-					console.log("获取iap支付通道失败:" + e.message);
-				});
-
-		} catch (e) {
-			uni.showModal({
-				title: "init",
-				content: e.message,
-				showCancel: false
-			});
-		} finally {
-			uni.hideLoading();
-		}
-
-
-
-	}
-
-
-	function wxPay() {
-		orderPayWx({
-			id: orderId.value
-		}).then(res2 => {
-			uni.hideLoading();
-			console.log('res2', res2);
-			if (res2.code != 0) {
-				return false
-			}
-			uni.requestPayment({
-				"provider": "wxpay",
-				"orderInfo": {
-					"appid": res2.data.appid, // 应用ID(AppID)
-					"partnerid": res2.data.partnerId, // 商户号(PartnerID)
-					"prepayid": res2.data.prepayId, // 预支付交易会话ID
-					"package": res2.data.packageVal, // 固定值
-					"noncestr": res2.data.nonceStr, // 随机字符串
-					"timestamp": res2.data.timestamp, // 时间戳(单位:秒)
-					"sign": res2.data.sign // 签名,这里用的 MD5 签名
-				}, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-
-					//var rawdata = JSON.parse(res.rawdata);
-					//	console.log('res',res);	
-					//	console.log('支付成功');
-					//	console.log('rawdata', rawdata);
-					uni.showLoading({
-						title: '开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						console.log('res3', res3);
-						if (res3.code == 0 && res3.data.success) {
-
-							genggaiVip(res3.data)
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code == 0 && res4.data.success) {
-										genggaiVip(res4.data)
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-
-				},
-				fail: function(err) {
-					uni.hideLoading();
-					//  toast('支付失败:' + JSON.stringify(err));
-					console.log('支付失败:' + JSON.stringify(err));
-				}
-			});
-		}).catch((error) => {
-			uni.hideLoading();
-
-			console.log(error);
-		})
-	}
-
-	function aliApy() {
-		orderPayAli({
-			id: orderId.value
-		}).then(res2 => {
-			console.log('res2', res2);
-			uni.hideLoading();
-			if (res2.code != 0) {
-				return false
-			}
-			uni.requestPayment({
-				"provider": "alipay",
-				"orderInfo": res2.data.text, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-					// var rawdata = JSON.parse(res.rawdata);
-					// console.log('支付成功');
-					// console.log('rawdata', rawdata);
-
-					uni.showLoading({
-						title: '开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						if (res3.code == 0 && res3.data.success) {
-							genggaiVip(res3.data)
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code ==
-										0 && res4.data.success) {
-										genggaiVip(res4.data)
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-				},
-				fail: function(err) {
-					console.log('支付失败:' + JSON.stringify(err));
-					uni.hideLoading();
-				}
-			});
-		})
-	}
-
-	const creatOrder = debounce((data, index) => {
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-		if (payType.value == 'weixin') {
-			orderId.value = data.id
-			wxPay()
-		} else {
-			orderId.value = data.id
-			aliApy()
-		}
-	}, 500)
-
-	function onChangeTab(e) {
-		if (dingdanData.current !== e.currentIndex) {
-			dingdanData.current = e.currentIndex;
-			if (dingdanData.current == 0) {
-				dingdanData.quanbu.page = 0
-			} else if (dingdanData.current == 1) {
-				dingdanData.daiFukuan.page = 0
-			} else if (dingdanData.current == 2) {
-				dingdanData.yiFukuan.page = 0
-			}
-			refreshData(dingdanData.current);
-		}
-	}
-
-	function onScrolltolower() {
-		getMore(dingdanData.current)
-	}
-
-	function refreshData(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			status: code
-		}
-
-		if (code == 0) {
-			dingdanData.quanbu.list = [];
-			// 数学
-			dingdanData.quanbu.state = 'loading';
-			dingdanData.quanbu.page++;
-			opt.page = dingdanData.quanbu.page;
-		} else if (code == 1) {
-			dingdanData.daiFukuan.list = [];
-			// 英语
-			dingdanData.daiFukuan.state = 'loading';
-			dingdanData.daiFukuan.page++;
-			opt.page = dingdanData.daiFukuan.page;
-		} else if (code == 2) {
-			dingdanData.yiFukuan.list = [];
-			// 英语
-			dingdanData.yiFukuan.state = 'loading';
-			dingdanData.yiFukuan.page++;
-			opt.page = dingdanData.yiFukuan.page;
-		}
-		getOrderList(opt).then(res => {
-			if (code == 0) {
-				dingdanData.quanbu.list = dingdanData.quanbu.list.concat(res.data.data);
-				dingdanData.quanbu.loading = false;
-			} else if (code == 1) {
-				dingdanData.daiFukuan.list = dingdanData.daiFukuan.list.concat(res.data.data);
-				dingdanData.daiFukuan.loading = false;
-			} else if (code == 2) {
-				dingdanData.yiFukuan.list = dingdanData.yiFukuan.list.concat(res.data.data);
-				dingdanData.yiFukuan.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > dingdanData.quanbu.list.length) {
-					// 数学
-					dingdanData.quanbu.state = 'more';
-					dingdanData.quanbu.loading = false;
-				} else {
-					// 数学
-					dingdanData.quanbu.state = 'no-more';
-					dingdanData.quanbu.loading = false;
-				}
-			} else if (code == 1) {
-				if (res.data.total > dingdanData.daiFukuan.list.length) {
-					// 英语
-					dingdanData.daiFukuan.state = 'more';
-					dingdanData.daiFukuan.loading = false;
-				} else {
-					// 英语
-					dingdanData.daiFukuan.state = 'no-more';
-					dingdanData.daiFukuan.loading = false;
-				}
-			} else if (code == 2) {
-				if (res.data.total > dingdanData.yiFukuan.list.length) {
-					// 英语
-					dingdanData.yiFukuan.state = 'more';
-					dingdanData.yiFukuan.loading = false;
-				} else {
-					// 英语
-					dingdanData.yiFukuan.state = 'no-more';
-					dingdanData.yiFukuan.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				dingdanData.quanbu.state = 'more';
-				dingdanData.quanbu.loading = false;
-			} else if (code == 1) {
-				// 英语
-				dingdanData.daiFukuan.state = 'more';
-				dingdanData.daiFukuan.loading = false;
-			} else if (code == 2) {
-				// 英语
-				dingdanData.yiFukuan.state = 'more';
-				dingdanData.yiFukuan.loading = false;
-			}
-		})
-	}
-
-	function onRefresh() {
-		if (dingdanData.current == 0) {
-			dingdanData.quanbu.page = 0;
-			dingdanData.quanbu.list = [];
-			dingdanData.quanbu.loading = true;
-		} else if (dingdanData.current == 1) {
-			dingdanData.daiFukuan.page = 0;
-			dingdanData.daiFukuan.list = [];
-			dingdanData.daiFukuan.loading = true;
-		} else if (dingdanData.current == 2) {
-			dingdanData.yiFukuan.page = 0;
-			dingdanData.yiFukuan.list = [];
-			dingdanData.yiFukuan.loading = true;
-		}
-		refreshData(dingdanData.current);
-	}
-
-	function getMore(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			status: Number(code) // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-			if (dingdanData.quanbu.state == 'no-more') {
-				return;
-			}
-			// 数学
-			dingdanData.quanbu.state = 'loading';
-			dingdanData.quanbu.page++;
-			opt.page = dingdanData.quanbu.page;
-		} else if (code == 1) {
-			if (dingdanData.daiFukuan.state == 'no-more') {
-				return;
-			}
-			dingdanData.daiFukuan.state = 'loading';
-			dingdanData.daiFukuan.page++;
-			opt.page = dingdanData.daiFukuan.page;
-		} else if (code == 2) {
-			if (dingdanData.yiFukuan.state == 'no-more') {
-				return;
-			}
-			dingdanData.yiFukuan.state = 'loading';
-			dingdanData.yiFukuan.page++;
-			opt.page = dingdanData.yiFukuan.page;
-		}
-		getOrderList(opt).then(res => {
-			if (code == 0) {
-				dingdanData.quanbu.list = dingdanData.quanbu.list.concat(res.data.data);
-				dingdanData.quanbu.loading = false;
-			} else if (code == 1) {
-				dingdanData.daiFukuan.list = dingdanData.daiFukuan.list.concat(res.data.data);
-				dingdanData.daiFukuan.loading = false;
-			} else if (code == 2) {
-				dingdanData.yiFukuan.list = dingdanData.yiFukuan.list.concat(res.data.data);
-				dingdanData.yiFukuan.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > dingdanData.quanbu.list.length) {
-					// 数学
-					dingdanData.quanbu.state = 'more';
-					dingdanData.quanbu.state_text = '加载更多';
-					dingdanData.quanbu.loading = false;
-				} else {
-					// 数学
-					dingdanData.quanbu.state = 'no-more';
-					dingdanData.quanbu.state_text = '没有更多啦';
-
-					dingdanData.quanbu.loading = false;
-				}
-			} else if (code == 1) {
-				if (res.data.total > dingdanData.daiFukuan.list.length) {
-					// 英语
-					dingdanData.daiFukuan.state = 'more';
-					dingdanData.daiFukuan.state_text = '加载更多';
-
-					dingdanData.daiFukuan.loading = false;
-				} else {
-					// 英语
-					dingdanData.daiFukuan.state = 'no-more';
-					dingdanData.daiFukuan.state_text = '没有更多啦';
-					dingdanData.daiFukuan.loading = false;
-				}
-			} else if (code == 2) {
-				if (res.data.total > dingdanData.yiFukuan.list.length) {
-					// 英语
-					dingdanData.yiFukuan.state = 'more';
-					dingdanData.yiFukuan.state_text = '加载更多';
-					dingdanData.yiFukuan.loading = false;
-				} else {
-					// 英语
-					dingdanData.yiFukuan.state = 'no-more';
-					dingdanData.yiFukuan.state_text = '没有更多啦';
-
-					dingdanData.yiFukuan.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				dingdanData.quanbu.state = 'more';
-				dingdanData.quanbu.state_text = '加载更多';
-				dingdanData.quanbu.loading = false;
-			} else if (code == 1) {
-				// 英语
-				dingdanData.daiFukuan.state = 'more';
-				dingdanData.daiFukuan.state_text = '加载更多';
-				dingdanData.daiFukuan.loading = false;
-			} else if (code == 2) {
-				// 英语
-				dingdanData.yiFukuan.state = 'more';
-				dingdanData.yiFukuan.state_text = '加载更多';
-				dingdanData.yiFukuan.loading = false;
-			}
-		})
-	}
-
-	function goBack() {
-		uni.redirectTo({
-			url: '/pages/my/index'
-		})
-	}
-	const isIOSorAndroid = () => {
-		const systemInfo = uni.getSystemInfoSync();
-
-		console.log('systemInfo', systemInfo);
-
-		if (systemInfo.platform == 'ios') {
-
-			return currentPlatform.value = 'ios'
-		} else {
-			return currentPlatform.value = 'android'
-		}
-
-	}
-	onLoad((options) => {
-		dingdanData.current = Number(options.status) || dingdanData.current
-		getMore(dingdanData.current);
-		isIOSorAndroid()
-	})
-</script>
-
-<style>
-
-</style>

+ 0 - 91
pages/pay/orderPay.vue

@@ -1,91 +0,0 @@
-<template>
-	<view class="ezy-order-pay-page">
-		<view class="ezy-navBar-box">
-			<view class="nav-bar-icon"></view>
-			<text class="nav-bar-title">订单支付</text>
-			<view class="text-btn">取消订单</view>
-		</view>
-		<view class="order-pay-border-box">
-			<!-- svip -->
-			<view class="order-pay-img-box">
-				<!-- :class="'order-pay-img'+item.cardId" 改到下方 -->
-				<icon :class="'order-pay-img1'"></icon>
-				<view class="img-content-box">
-					<view class="content-name">SVIP终身卡</view>
-					<text class="content-tag">终身有效</text>
-					<text class="content-tag">不支持退订</text>
-					<view class="content-yuanjia">¥598</view>
-				</view>
-			</view>
-			
-			<!-- 价格 -->
-			<view class="price-box">
-				<view class="price-row">
-					<text>原价合计</text>
-					<text class="price-red">¥598</text>
-				</view>
-				<view class="price-row price-line-row">
-					<text>活动合计</text>
-					<text class="price-red">-¥400</text>
-				</view>
-				<view class="price-row">
-					<text>合计</text>
-					<text>¥198</text>
-				</view>
-			</view>
-			
-			<!-- 支付方式 -->
-			<view class="pay-type-box">
-				<view class="pay-type-name">支付方式</view>
-				<radio-group @change="radioChange">
-					<view  class="type-radio-box">
-						<view class="type-radio-row">
-							<icon class="wx-radio"></icon>
-							<view class="radio-content-box">
-								<view class="radio-title">微信支付</view>
-								<text class="radio-content">支付信用卡、储蓄卡快捷支付及微信</text>
-							</view>
-							<radio value="weixin" :checked="payType==='weixin'" activeBackgroundColor="transparent"
-							:class="{'radio-checked': payType==='weixin'}"/>
-						</view>
-						<view class="type-radio-row">
-							<icon class="zfb-radio"></icon>
-							<view class="radio-content-box">
-								<view class="radio-title">支付宝</view>
-								<text class="radio-content">支付信用卡、储蓄卡快捷支付及支付宝</text>
-							</view>
-							<radio value="zhifubao" :checked="payType==='zhifubao'" activeBackgroundColor="transparent"
-							:class="{'radio-checked': payType==='zhifubao'}" style="margin-right: 0;"/>
-						</view>
-					</view>
-				</radio-group>
-			</view>
-			
-			<!-- 合计 -->
-			<view class="pay-sum-box">
-				<view>
-					<text>合计:</text>
-					<text class="sum-red">¥198</text>	
-				</view>
-				<view class="sum-btn">
-					支付
-					<icon></icon>
-					29:30
-				</view>
-			</view>
-		</view>
-		<CustomTabBar></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {ref} from "vue";
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	let payType = ref('weixin')
-	function radioChange(data){
-		payType.value = data.detail.value;
-	}
-</script>
-
-<style>
-</style>

+ 0 - 27
pages/pay/paySuccess.vue

@@ -1,27 +0,0 @@
-<!-- 蛋破壳弹窗 -->
-<template>
-	<uni-popup ref="paySuccessPopup" :animation="false" :is-mask-click="false"
-	 mask-background-color="rgba(51, 137, 217, 0.65);">
-	 <view class="ezy-pay-success-dialog"> </view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import { ref } from 'vue';
-	const paySuccessPopup = ref(null); // 索引
-	// 打开弹窗
-	function handleShow() {
-		paySuccessPopup.value.open();
-	}
-	// 取消
-	function handleClose() {
-		paySuccessPopup.value.close();
-	}
-	defineExpose({
-			handleShow,
-			handleClose
-		})
-</script>
-
-<style>
-</style>

+ 0 - 27
pages/pay/paySuccessAll.vue

@@ -1,27 +0,0 @@
-<!-- 蛋破壳弹窗 -->
-<template>
-	<uni-popup ref="paySuccessPopup" :animation="false" :is-mask-click="false"
-	 mask-background-color="rgba(51, 137, 217, 0.65);">
-	 <view class="ezy-pay-success-all-dialog"> </view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import { ref } from 'vue';
-	const paySuccessPopup = ref(null); // 索引
-	// 打开弹窗
-	function handleShow() {
-		paySuccessPopup.value.open();
-	}
-	// 取消
-	function handleClose() {
-		paySuccessPopup.value.close();
-	}
-	defineExpose({
-			handleShow,
-			handleClose
-		})
-</script>
-
-<style>
-</style>

+ 0 - 71
pages/pay/productDialog.vue

@@ -1,71 +0,0 @@
-<template>
-	<uni-popup ref="detailPopup" :animation="false" :is-mask-click="false"
-		mask-background-color="rgba(51, 137, 217, 0.65);" style="z-index: 101;">
-		<view class="mall-detail-dialog">
-			<view class="detail-content-box">
-				<icon class="cpmx-title"></icon>
-				<icon class="dialog-close-btn" @click="detailCloseBtn"></icon>
-				<view class="product-body-box">
-					<!-- ↓需要换成从接口中取得 wgy -->
-					<view class="detail-item-box" @click="goDao(item,index)" v-for="(item,index) in productList " :key="index">
-						<img :src="item.cover" class="mall-image mt-20" />
-						<view class="content-body-box">
-							<view class="content-name">
-								<view class="name-text">{{item.levelName}}</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import {
-		orderInfo
-	} from "@/api/order.js"
-	import {
-		toast,
-		debounce,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		ref
-	} from 'vue';
-		import cacheManager from '@/utils/cacheManager.js';
-	const $emit = defineEmits(['payBtn'])
-	const detailPopup = ref(null); // 索引
-	let productList = ref([])
-	// 打开弹窗
-	function detailShow(data) {
-	productList.value = data
-	detailPopup.value.open();
-
-	}
-	 function goDao(data,index){
-		 console.log('data',data);
-		 console.log('index',index);
-		cacheManager.updateObject('auth', {
-			typeId: data.typeId,
-			levelId: data.levelId,
-			subjectId: data.subjectId,
-			currentZhang: 0
-		})
-		cacheManager.remove('zhangInfo')
-		uni.redirectTo({
-			url: `/pages/study/index`
-		})
-	 }
-	// 开启提分之旅按钮
-	function detailPayBtn() {
-		$emit('payBtn')
-	}
-
-	function detailCloseBtn() {
-		detailPopup.value.close();
-	}
-	defineExpose({
-		detailShow
-	})
-</script>

+ 0 - 551
pages/pay/svip.vue

@@ -1,551 +0,0 @@
-<!-- svip页面 -->
-<template>
-	<view class="ezy-svip-page">
-		<view class="icon-title-navBar-box">
-			<!-- 返回按钮 ↓ -->
-			<view class="nav-bar-icon" @click="goBack"></view>
-			<view class="nav-bar-title">开通svip</view>
-		</view>
-		<!-- :class="'svip-login'+Id" 改到下方 -->
-		<icon :class="'svip-login'+cardId"></icon>
-		<view class="svip-list-box">
-			<view v-for="(item, index) in svipArr" :key="index" class="list-item-box">
-				<icon class="list-icon" :style="{backgroundImage: 'url(' + item.iconPath + ')'}"></icon>
-				<view>
-					<view class="list-title">{{item.title}}</view>
-					<view class="list-content" v-html="item.content"></view>
-				</view>
-			</view>
-		</view>
-		<view class="open-svip-box">
-			<view class="svip-price-box" v-if="cardId ==1">
-				<view>原价:<text class="original-price">¥499</text></view>
-				<view class="discount-price">活动价:¥299</view>
-			</view>
-			<view class="svip-price-box" v-if="cardId ==2">
-				<view>原价:<text class="original-price">¥399</text></view>
-				<view class="discount-price">活动价:¥199</view>
-			</view>
-			<radio-group v-if="currentPlatform =='android'" @change="radioChange" class="pay-type-box">
-				<view class="type-radio-title">支付方式</view>
-				<view class="type-radio-content">
-					<view class="type-radio-box">
-						<icon class="wx-radio"></icon>
-						<text>微信</text>
-						<radio value="weixin" :checked="payType==='weixin'" activeBackgroundColor="transparent"
-							:class="{'radio-checked': payType==='weixin'}" />
-					</view>
-					<view class="type-radio-box">
-						<icon class="zfb-radio"></icon>
-						<text>支付宝</text>
-						<radio value="zhifubao" :checked="payType==='zhifubao'" activeBackgroundColor="transparent"
-							:class="{'radio-checked': payType==='zhifubao'}" style="margin-right: 0;" />
-					</view>
-				</view>
-			</radio-group>
-			<view v-if="currentPlatform =='android'&&!disabled" class="open-svip-btn" @touchstart="creatOrder">立即开通
-			</view>
-			<view v-if="currentPlatform =='android'&&disabled" class="open-svip-btn-hui">立即开通</view>
-			<view v-if="currentPlatform =='ios'&&!disabled" style="margin-top: 20rpx;" class="open-svip-btn"
-				@touchstart="creatOrderIos">立即开通</view>
-			<view v-if="currentPlatform =='ios'&&disabled" style="margin-top: 20rpx;" class="open-svip-btn-hui">立即开通
-			</view>
-		</view>
-		<view class="hyfw-tip-box">请点击<text @click="hyfyClick">《会员服务协议》</text>了解SVIP权益</view>
-		<CustomTabBar></CustomTabBar>
-		<!-- 蛋破壳 -->
-		<pay-success ref="daoPokeRef"></pay-success>
-		<pay-successAll ref="daoPokeAllRef"></pay-successAll>
-		<agree-content-dialog ref="agreeContentDialogRef" :agreeType="agreeType"></agree-content-dialog>
-	</view>
-</template>
-
-<script setup>
-	import agreeContentDialog from '@/pages/login/agreeContentDialog.vue';
-	import {
-		ref
-	} from "vue";
-	import {
-		orderAdd,
-		orderPayAli,
-		orderPayWx,
-		orderPayApple,
-		orderCheck
-	} from "@/api/order.js"
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import cacheManager from "@/utils/cacheManager.js";
-	import paySuccess from './paySuccess.vue';
-	import paySuccessAll from './paySuccessAll.vue';
-	import {
-		onLoad,
-		onReady
-	} from '@dcloudio/uni-app';
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		debounce
-	} from "@/utils/common";
-	const agreeContentDialogRef = ref(null);
-	const agreeType = ref(null);
-	let payType = ref('zhifubao')
-	let cardId = ref('')
-	let formPage = ref('')
-	const daoPokeRef = ref(null);
-	const daoPokeAllRef = ref(null);
-	let orderId = ref('');
-	let productId = ref(null)
-	let iapChannel = ref(null)
-	let quantity = ref(1)
-	let channel = ref('')
-	let disabled = ref(false)
-	let appleFlag = ref('')
-	let currentPlatform = ref('')
-	const isVip = getUserIdentity();
-	const svipArr = [{
-			iconPath: 'static/images/pay/svip-list-icon1.png',
-			title: '学习资源,随心畅学',
-			content: `解锁L1~L6全等级数学思维优质学习资源,<br/>满足多样学习需求`
-		},
-		{
-			iconPath: 'static/images/pay/svip-list-icon2.png',
-			title: '名师打造,优质路径',
-			content: '资深名师精心规划学习路径,引领高效提升方向'
-		},
-		{
-			iconPath: 'static/images/pay/svip-list-icon3.png',
-			title: '进度分析,个性贴心',
-			content: '优先参与丰富真题测试,精准洞察学习状况'
-		},
-		{
-			iconPath: 'static/images/pay/svip-list-icon4.png',
-			title: '真题测试,优先体验',
-			content: '成为会员,即刻畅享专属权益,开启无忧学习之旅'
-		}
-	];
-	onLoad((options) => {
-		isIOSorAndroid()
-		appleFlag.value = cacheManager.get("auth").appleFlag
-		console.log('appleFlag', appleFlag.value);
-		cardId.value = options.cardId
-		formPage.value = options.formPage
-		if (options.orderId) {
-			orderId.value = options.orderId
-		} else {
-			orderId.value = ''
-		}
-	})
-
-	function hyfyClick() {
-		agreeType.value = 'hyfwxy'
-		agreeContentDialogRef.value.handleShow();
-	}
-
-	const isIOSorAndroid = () => {
-		const systemInfo = uni.getSystemInfoSync();
-
-		console.log('systemInfo', systemInfo);
-
-		if (systemInfo.platform == 'ios') {
-
-			return currentPlatform.value = 'ios'
-		} else {
-			return currentPlatform.value = 'android'
-		}
-
-	}
-
-	function radioChange(data) {
-		payType.value = data.detail.value;
-		disabled.value = false
-	}
-
-	function genggaiVip() {
-		uni.hideLoading();
-		//disabled.value = false
-		cacheManager.updateVipStatus('auth', cardId.value)
-		cacheManager.updateObject('auth', {
-			growthType: 1
-		})
-		console.log('isVip', isVip);
-		if (isVip != 'VIP') {
-			daoPokeRef.value.handleShow();
-		} else {
-			daoPokeAllRef.value.handleShow();
-		}
-		setTimeout(() => {
-			daoPokeRef.value.handleClose();
-			daoPokeAllRef.value.handleClose();
-			if (formPage.value == 'my') {
-				uni.redirectTo({
-					url: '/pages/my/index'
-				})
-			} else {
-				uni.redirectTo({
-					url: '/pages/study/index'
-				})
-			}
-		}, 3000)
-	}
-
-	const creatOrderIos = debounce((data => {
-		disabled.value = true
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-		if (appleFlag.value.toString() == 'true') {
-			productId.value = 'llisoftEzhuangyuanceshi'
-		} else {
-			if (cardId.value == 1) {
-				productId.value = 'llisoftEzhuangyuan'
-			} else {
-				productId.value = 'llisoftEzhuangyuanYingyu'
-			}
-		}
-		if (orderId.value) {
-			uni.hideLoading();
-			applePay()
-		} else {
-			let req = {
-				cardId: cardId.value
-			}
-			orderAdd(req).then(res => {
-				console.log('res', res);
-				if (res.code == 0) {
-					uni.hideLoading();
-					orderId.value = res.data.id
-					// 测试ios 1元
-					applePay()
-				} else {
-					uni.hideLoading();
-					//disabled.value = false
-					return false
-					console.log('请求失败');
-				}
-			}).catch((e) => {
-				uni.hideLoading();
-				disabled.value = false
-			toast("订单创建失败")
-				return false
-
-			})
-		}
-
-	}), 500)
-
-	function applePaySuccess(data) {
-		uni.showLoading({
-			title: '会员开通中',
-			mask: true
-		});
-		let req = {
-			"id": orderId.value,
-			"paynum": data.transactionIdentifier,
-			"receipt": data.transactionReceipt
-		}
-		console.log('reqreq', req);
-		orderPayApple(req).then(res => {
-			if (res.code == 0 && res.data) {
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				console.log('resiapChanneliapChanneliapChannel', res);
-				genggaiVip()
-			} else {
-				//disabled.value = false
-				iapChannel.finishTransaction(data.transactionIdentifier)
-				uni.hideLoading();
-				toast("苹果内购失败")
-				console.log('orderPayApple失败');
-				return false
-			}
-		})
-	}
-
-	function applePay() {
-		console.log('123123');
-		if (!productId.value) {
-			uni.showToast({
-				title: '苹果内购ID缺失,请选择其它支付方式或联系客服',
-				icon: "none"
-			});
-			return false;
-		}
-		uni.showLoading({
-			title: '正在支付中...'
-		});
-		try {
-			plus.payment.getChannels(function(channels) { //判读项目支付通道开通情况
-					for (var i in channels) {
-						iapChannel = channels[i];
-						// 获取 id 为 'appleiap' 的 channel  
-						console.info("支付通道", iapChannel)
-						if (iapChannel.id === 'appleiap') { //开通了app应用内支付,在manifest.josn中设置,开通后需打自定议基座
-							console.info("苹果支付通道", iapChannel)
-							// ids 数组中的项为 App Store Connect 配置的内购买项目产品ID(productId)
-							var ids = [productId.value];
-							// iap 为应用内支付对象 
-							iapChannel.requestOrder(ids, function(e) {
-									// 获取订单信息成功回调方法  
-									console.log('requestOrder success: ' + JSON.stringify(e));
-									uni.requestPayment({
-										provider: 'appleiap',
-										orderInfo: {
-											productid: productId.value, //产品id,来自于苹果
-											quantity: quantity.value, //产品数量
-											manualFinishTransaction: true
-										},
-										success: (e) => {
-											uni.hideLoading();
-
-											//	toast("苹果内购成功")
-											console.info("苹果内购成功", e)
-											applePaySuccess(e)
-											//e.payment.orderNo = that.orderNo
-											//支付成功回调,前端调用后台接口
-										},
-										fail: (e) => {
-										//	disabled.value = false
-											uni.hideLoading();
-											toast("苹果内购失败")
-											console.info("苹果内购失败", e)
-										},
-									})
-								},
-								function(e) {
-									// 获取订单信息失败回调方法  
-									console.log('requestOrder failed: ' + JSON.stringify(e));
-								});
-						} else {
-							console.log('不支持苹果支付')
-						}
-					}
-				},
-				function(e) {
-					console.log("获取iap支付通道失败:" + e.message);
-				});
-
-		} catch (e) {
-			uni.showModal({
-				title: "init",
-				content: e.message,
-				showCancel: false
-			});
-		//	disabled.value = false
-		} finally {
-			uni.hideLoading();
-		}
-
-
-
-	}
-
-
-	function wxPay() {
-		orderPayWx({
-			id: orderId.value
-		}).then(res2 => {
-			uni.hideLoading();
-			console.log('res2', res2);
-			uni.requestPayment({
-				"provider": "wxpay",
-				"orderInfo": {
-					"appid": res2.data.appid, // 应用ID(AppID)
-					"partnerid": res2.data.partnerId, // 商户号(PartnerID)
-					"prepayid": res2.data.prepayId, // 预支付交易会话ID
-					"package": res2.data.packageVal, // 固定值
-					"noncestr": res2.data.nonceStr, // 随机字符串
-					"timestamp": res2.data.timestamp, // 时间戳(单位:秒)
-					"sign": res2.data.sign // 签名,这里用的 MD5 签名
-				}, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-
-					//var rawdata = JSON.parse(res.rawdata);
-					//	console.log('res',res);	
-					//	console.log('支付成功');
-					//	console.log('rawdata', rawdata);
-					uni.showLoading({
-						title: '会员开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						console.log('res3', res3);
-						if (res3.code == 0 && res3.data) {
-
-							genggaiVip()
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code ==
-										0 && res4
-										.data) {
-										genggaiVip()
-									} else {
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-
-				},
-				fail: function(err) {
-					uni.hideLoading();
-					//  toast('支付失败:' + JSON.stringify(err));
-					console.log('支付失败:' + JSON.stringify(err));
-				}
-			});
-		}).catch((error) => {
-			uni.hideLoading();
-		//	disabled.value = false
-
-			console.log(error);
-		})
-	}
-	function aliApy(){
-		orderPayAli({
-			id: orderId.value
-		}).then(res2 => {
-			console.log('res2', res2);
-			uni.hideLoading();
-			uni.requestPayment({
-				"provider": "alipay",
-				"orderInfo": res2.data.text, //此处为服务器返回的订单信息字符串
-				success: function(res) {
-					// var rawdata = JSON.parse(res.rawdata);
-					// console.log('支付成功');
-					// console.log('rawdata', rawdata);
-		
-					uni.showLoading({
-						title: '会员开通中,请稍后...'
-					});
-					orderCheck({
-						id: orderId.value
-					}).then(res3 => {
-						if (res3.code == 0 && res3.data) {
-							genggaiVip()
-						} else {
-							setTimeout(() => {
-								orderCheck({
-									id: orderId.value
-								}).then(res4 => {
-									if (res4.code ==
-										0 && res4
-										.data) {
-										genggaiVip()
-									} else {
-									//	disabled.value =false
-										toast(
-											"开通失败,请联系管理员!"
-										)
-										uni
-											.hideLoading();
-										return false
-									}
-								}).catch(() => {
-								//	disabled.value =false
-									uni.hideLoading();
-									toast("check接口报错")
-									return false
-								})
-							}, 5000)
-						}
-					}).catch(() => {
-					//	disabled.value = false
-						uni.hideLoading();
-						toast("check接口报错")
-						return false
-					})
-				},
-				fail: function(err) {
-				//	disabled.value = false
-					//  toast('支付失败:' + JSON.stringify(err));
-					console.log('支付失败:' + JSON.stringify(err));
-					uni.hideLoading();
-				}
-			});
-		})
-	}
-
-	const creatOrder = debounce((data) => {
-
-		console.log('123123123123');
-
-		disabled.value = true
-		uni.showLoading({
-			title: '',
-			mask: true
-		});
-		if (payType.value == 'weixin') {
-			console.log('创建订单11');
-			if (orderId.value) {
-				wxPay()
-			} else {
-				let req = {
-					cardId: cardId.value
-				}
-				orderAdd(req).then(res => {
-					console.log('res', res);
-					console.log(' res.data.id', res.data.id);
-					orderId.value = res.data.id
-					wxPay()
-				}).catch((err) => {
-					uni.hideLoading();
-					disabled.value = false
-					toast("订单创建失败")
-					return false
-				})
-			}
-		} else {
-			if(orderId.value){
-					aliApy()
-			}else{
-				let req = {
-					cardId: cardId.value
-				}
-				orderAdd(req).then(res => {
-					console.log('res', res);
-					orderId.value = res.data.id
-					aliApy()
-				}).catch((err) => {
-					disabled.value = false
-					uni.hideLoading();
-					toast("订单创建失败")
-					return false
-				})
-			}
-		}
-
-	}, 500)
-
-	function goBack(data) {
-		if (formPage.value == 'my') {
-			uni.redirectTo({
-				url: '/pages/my/index'
-			})
-		} else {
-			uni.redirectTo({
-				url: '/pages/study/index'
-			})
-		}
-	}
-</script>
-
-<style>
-</style>

+ 0 - 35
pages/selectGradesTerms/comingSoonDialog.vue

@@ -1,35 +0,0 @@
-<!-- 大弹窗 三~四行文字 -->
-<template>
-	<uni-popup ref="comingSoonPopup" :animation="false" :is-mask-click="false"
-	 mask-background-color="rgba(51, 137, 217, 0.65);">
-	 <view class="coming-soon-dialog">
-		 <icon></icon>
-		<view class="coming-soon-return-btn" @click="returnBtn"></view>
-	 </view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import { ref } from 'vue';
-	const comingSoonPopup = ref(null); // 索引
-	const $emit = defineEmits(['return-btn'])
-	// 打开弹窗
-	function handleShow() {
-		comingSoonPopup.value.open();
-	}
-	// 取消
-	function handleClose() {
-		comingSoonPopup.value.close();
-	}
-	// 返回
-	function returnBtn(){
-		comingSoonPopup.value.close();
-		$emit('return-btn');
-	}
-	defineExpose({
-			handleShow
-		})
-</script>
-
-<style>
-</style>

+ 0 - 231
pages/selectGradesTerms/index.vue

@@ -1,231 +0,0 @@
-<template>
-	<view class="grades-terms-page" @touchmove.stop.prevent>
-		<view @click="handleBack" class="ezy-nav-bar-icon yzm-nav-bar-icon"></view>
-		<view class="grade-item-box">
-			<view :key="xueke.id" @click="handleSelectXueke(xueke)" v-for="xueke in xuekeData"
-				:class="['grade-item',{active: xueke.id == activeXueke}]">{{xueke.lable}}</view>
-		</view>
-		<scroll-view scroll-y="true" class="subject-body"  :scroll-into-view="scrollTop">
-			<!-- <view class="subject-body"> -->
-				<view class="subject-content-box">
-					<!-- 产品 -->
-					<view v-for="item in xuekeList" :key="item.id" :id="`s_${item.id}`"  @click="handleSelectGrade(item)"
-						:class="[
-						    'subject-item',
-						    item.typeId === 1 && 'subject-jstx-item',
-						    {
-						      'active': item.id == activeProduct
-						    }
-						  ]">
-							<img :src="item.cover" class="subject-item-img" />
-							<view class="subject-item-text"><text>{{item.lable}}</text></view>
-					</view>
-				</view>
-			<!-- </view> -->
-		</scroll-view>
-		<view class="grade-line"></view>
-		<button class="grade-confirm-btn" @click="handleConfirm"></button>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		toRefs,
-		computed,
-		nextTick
-	} from "vue";
-	import * as httpApi from "@/api/selectGradesTerms.js";
-	import {
-		onLoad
-	} from "@dcloudio/uni-app";
-	import {
-		getUserIdentity,
-		findRootNode,
-		findTreeNode
-	} from "@/utils/common.js"
-	import cacheManager from "@/utils/cacheManager.js"
-	import {
-		getCommonTree,
-		getIndexTree
-	} from "../../api/selectGradesTerms";
-
-	function useSelectGrade() {
-		const userCode = getUserIdentity();
-		console.log('userCode',userCode);
-		const data = reactive({
-			activeProduct: null, // 当前年级
-			activeXueke: 1, // 当前学期
-			activeTipFlag: null, // 当前学期
-			xuekeData: [], // 学科总数据
-			scrollTop: '',
-		});
-		
-		function handleScroll() {
-			
-		}
-
-		onLoad(({
-			productId,
-			xuekeId,
-			tipFlag
-		}) => {
-			if (userCode !== 'Visitor') {
-				initUserProducts();
-			} else {
-				data.activeProduct = productId;
-				data.activeXueke = xuekeId || 1; // 默认选中数学
-				data.activeTipFlag = tipFlag || '0';
-				initVisitProducts();
-			}
-		});
-
-		// 初始化游客产品数据
-		function initVisitProducts() {
-			httpApi.getCommonTree().then(res => {
-				data.xuekeData = res.data || [];
-			})
-		}
-
-		function initUserProducts() {
-			httpApi.getIndexTree().then(res => {
-				data.xuekeData = res.data || [];
-				const {
-					levelId,
-				} = cacheManager.get('auth');
-				if (levelId) {
-					// LevelId 翻找根节点学科,执行选中高亮操作
-					const xuekeObj = findRootNode(data.xuekeData, levelId, 'levelId');
-					const productObj = findTreeNode(data.xuekeData, levelId, 'children','levelId');
-					data.activeProduct = productObj.id;
-					data.activeXueke = xuekeObj.id;
-				} else {
-					data.activeProduct = null;
-					data.activeXueke = 1
-				}
-
-        setTimeout(() => {
-          // 滚动到某个元素显示
-          data.scrollTop = `s_${data.activeProduct}`
-        }, 100)
-			})
-		}
-
-		// 选择 年级+学期
-		function handleConfirm() {
-			if (!data.activeXueke) {
-				uni.showToast({
-					title: "请选择课程类别",
-					duration: 2000,
-					icon: 'error'
-				});
-				return;
-			}
-			if (!data.activeProduct) {
-				uni.showToast({
-					title: "请选择课程等级",
-					duration: 2000,
-					icon: 'error'
-				});
-				return;
-			}
-			goDAOToStudy();
-		}
-
-		// 跳转 岛 学习
-		function goDAOToStudy() {
-			const Product = data.xuekeData.find(item => item.id == data.activeXueke).children.find(item => item.id == data
-				.activeProduct)
-			const levelId = Product.levelId;
-			const typeId = Product.typeId;
-			const subjectId = Product.subjectId;
-
-			if (userCode !== 'Visitor') {
-				const auth = cacheManager.get('auth');
-				cacheManager.updateObject('auth', {
-					typeId: typeId,
-					levelId: levelId,
-					subjectId: subjectId,
-					zhangId: data.activeProduct == auth.levelId && data.activeXueke == auth.cardId ? auth.zhangId :
-						0,
-					currentZhang: 0
-				})
-				// 通知岛重新调用接口
-				cacheManager.remove('zhangInfo')
-				uni.redirectTo({
-					url: `/pages/study/index`
-				})
-			} else {
-				if (typeId == 1) {
-					// 新岛
-					uni.redirectTo({
-						url: `/pages/study/index?levelId=${levelId}&typeId=${typeId}&subjectId=${subjectId}&tipFlag=${data.activeTipFlag}`
-					})
-				} else {
-					// 旧岛
-					uni.redirectTo({
-						url: `/pages/study/index?levelId=${levelId}&typeId=${typeId}&subjectId=${subjectId}&zhangId=0&tipFlag=${data.activeTipFlag}`
-					})
-				}
-
-			}
-
-		}
-
-		function handleBack() {
-			if (userCode !== 'Visitor') {
-
-        const auth = cacheManager.get('auth');
-
-        if (!data.activeProduct && !auth.levelId) {
-          uni.showToast({
-            title:'请选择内容'
-          })
-          return;
-        }
-
-				uni.redirectTo({
-					url: `/pages/study/index`
-				})
-			} else {
-				uni.redirectTo({
-					url: '/pages/login/index'
-				})
-			}
-		}
-
-		return {
-			...toRefs(data),
-			handleBack,
-			// 方法
-			handleConfirm, // 选择年级+学科
-		};
-	}
-
-	const {
-		activeProduct,
-		activeXueke,
-		xuekeData,
-		handleConfirm,
-		handleBack,
-		scrollTop
-	} = useSelectGrade()
-
-	const xuekeList = computed(() => {
-		if (!xuekeData.value.length) {
-			return []
-		}
-		const d_id = activeXueke.value;
-	
-		return xuekeData.value.find(item => item.id == d_id).children
-	})
-
-	function handleSelectGrade(item) {
-		activeProduct.value = item.id;
-	}
-
-	function handleSelectXueke(item) {
-		activeXueke.value = item.id;
-		activeProduct.value = null;
-	}
-</script>

+ 0 - 34
pages/study/daoTipDialog.vue

@@ -1,34 +0,0 @@
-<template>
-	<uni-popup ref="daoTipPopup" type="bottom" :is-mask-click="false">
-		<view class="dao-popup-box">
-			<view class="dao-popup-img" :style="{backgroundImage: 'url(' + productTip + ')'}"></view>
-			<view class="dao-popup-btn" @click="handleClose"></view>
-		</view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import {ref} from "vue";
-	const props = defineProps({
-	  productTip: {
-	    type: String,
-	    default: ''
-	  },
-	});
-	const daoTipPopup = ref(null);
-	const $emit = defineEmits(['dao-tip-close'])
-	function handleShow() {
-		daoTipPopup.value.open();
-	}
-	function handleClose() {
-		daoTipPopup.value.close();
-		$emit('dao-tip-close');
-	}
-	
-	defineExpose({
-		handleShow
-	})
-</script>
-
-<style>
-</style>

+ 0 - 29
pages/study/eggDialog.vue

@@ -1,29 +0,0 @@
-<template>
-	<uni-popup ref="eggPopup" :animation="false" :is-mask-click="false"
-	 mask-background-color="rgba(51, 137, 217, 0.65);">
-	 <view class="study-egg-dialog">
-			<view class="egg-content-box">
-				<view class="egg-img"></view>
-				<view class="egg-btn" @click="eggBtn"></view>
-			</view>
-	 </view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import { ref } from 'vue';
-	 const $emit = defineEmits(['eggBtn'])
-	const eggPopup = ref(null); // 索引
-	// 打开弹窗
-	function eggShow() {
-		eggPopup.value.open();
-	}
-	// 开启提分之旅按钮
-	function eggBtn(){
-		eggPopup.value.close();
-		$emit('eggBtn')
-	}
-	defineExpose({
-			eggShow
-		})
-</script>

+ 0 - 497
pages/study/index.vue

@@ -1,497 +0,0 @@
-<template>
-	<view>
-		<swiper :circular="true" @change="onChangeTab" :duration="currentDuration" :current="current"
-			class="ezy-study-swiper" :class="'ezy-study-swiper'+ currentProduct">
-			<swiper-item v-for="(item,index) in zhangList" :key="index">
-				<shuxueZhangjie v-if="currentProduct ==1&&typeId==2" @clickGradeTerm="clickGradeTerm"
-					@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
-					:options="item" :youkeImage="youkeImage">
-				</shuxueZhangjie>
-				<yingyuZhangjie v-if="currentProduct ==2&&typeId==2" @clickGradeTerm="clickGradeTerm"
-					@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
-					:options="item" :youkeImage="youkeImage">
-				</yingyuZhangjie>
-				<shuxueNewZhangjie v-if="currentProduct ==1&&typeId==1" @clickGradeTerm="clickGradeTerm"
-					@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
-					:options="item" :youkeImage="youkeImage">
-				</shuxueNewZhangjie>
-			</swiper-item>
-		</swiper>
-		<!-- 蛋 -->
-		<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
-		<catalogue ref="catalogueRef" :list=zhangList @change-zhang="handleChangeZhang"
-			@listSelectJieClick="listSelectJieClick"></catalogue>
-		<CustomTabBar :levelId="levelId" :currentTabNumber="0" :subjectId="subjectId" :typeId="typeId"
-			:tipFlag="tipFlag">
-		</CustomTabBar>
-		<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
-		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-		<dao-tip-dialog ref="daoTipDialogRef" v-if="showDaoTip" :productTip="productTipImg"
-			@dao-tip-close="daoTipClose"></dao-tip-dialog>
-		<tip-dialog ref="tipDialogRef" :title="tipTitle" :content="tipContentVersion"></tip-dialog>
-	</view>
-</template>
-<script setup>
-	import daoTipDialog from './daoTipDialog.vue';
-	import {
-		userZhangInfo,
-		userLocate,
-		userZhangForntInfo,
-		userZhangNextInfo,
-		getCommonZhangInfo
-	} from "@/api/learnPlan.js"
-	import {
-		getVersion
-	} from "@/api/login.js"
-	import {
-		reactive,
-		ref,
-		nextTick,
-		getCurrentInstance,
-		onMounted
-	} from "vue";
-	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-	import catalogue from "@/components/catalogue/catalogue.vue";
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
-	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
-	import dSwiper from '@/components/wSwiper/DSwiper.vue';
-
-	import shuxueZhangjie from './product/shuxue.vue';
-	import shuxueNewZhangjie from './product/shuxueNew.vue';
-	import yingyuZhangjie from './product/yingyu.vue';
-
-	import {
-		useTabBarHistory
-	} from '@/utils/emitEvents.js';
-	import eggDialog from './eggDialog.vue'
-	import tipDialog from '@/components/dialog/tipDialog.vue';
-	import config from '../../config.js'
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from "@/utils/cacheManager.js";
-	const tipContent = '是否前往开通付费?'; //当前产品
-	const goPayDialogRef = ref(null);
-	const youkeDialogRef = ref(null);
-	const dSwiperRef = ref(null);
-	const eggDialogRef = ref(null);
-	const current = ref(0);
-	const currentDuration = ref(500)
-	const YouKeContent = '您当前的身份是游客,想要体验完整内容需注册成用户!';
-	const tipFlag = ref(null) //游客使用
-	const catalogueRef = ref(null);
-	const youkeImage = ref(null);
-	const currentProduct = ref(null);
-	const localAuth = ref(null);
-	const levelId = ref(null); //游客使用
-	const subjectId = ref(null); //游客使用
-	const typeId = ref(null);
-	const zhangList = ref(null);
-	const gradeTerm = ref(null);
-	let infoData = reactive({
-		jieList: [],
-		haveFlag: '',
-		number: '',
-		zhangId: '',
-		zhangName: '',
-		numberStr: '',
-	});
-
-	const termMapping = {
-		1: ' 数学',
-		2: ' 英语'
-	};
-
-	const daoTipDialogRef = ref(null);
-	const showDaoTip = ref(true);
-	const productTipImg = ref('');
-
-
-	const version = config.appInfo.version;
-	const tipDialogRef = ref(null);
-	const tipTitle = '升级提醒';
-	const tipContentVersion = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
-
-
-	onLoad((options) => {
-		init(options);
-		getLoginInit()
-	})
-
-	function listSelectJieClick(item, data, index) {
-
-		if (cacheManager.get('auth')) {
-			cacheManager.updateObject('auth', {
-				currentZhang: zhangList.value.findIndex(citem => citem.zhangId == item.zhangId),
-				zhangId: item.zhangId
-			})
-		}
-
-		listClick(data, item, index);
-	}
-
-	function getLoginInit() {
-		getVersion({}).then(res => {
-			if (version != res.data.version) {
-				tipDialogRef.value.handleShow();
-			}
-		})
-	}
-
-	function getProjectImg() {
-		if (currentProduct.value == 1 && typeId.value == 2) {
-			// 数学
-			productTipImg.value = 'static/images/study/shuxue/shuxue-tip.gif';
-			getBj('shuxue')
-		} else if (currentProduct.value == 2 && typeId.value == 2) {
-			// 英语
-			productTipImg.value = 'static/images/study/yingyu/yingyu-tip.gif'
-			getBj('yingyu');
-		} else if (currentProduct.value == 1 && typeId.value == 1) {
-			// 计算特训
-			productTipImg.value = 'static/images/study/jstx/jstx-tip.gif'
-			getBj('shuxueNew');
-		}
-	}
-
-	function getBj(data) {
-		let bjType = cacheManager.get('dao-tip')[data];
-		if (cacheManager.get('auth')) {
-			// 非游客
-			if (bjType !== 'has') {
-				nextTick(() => {
-					daoTipDialogRef.value.handleShow();
-				})
-			}
-		} else {
-			// 游客
-			if (tipFlag.value === '0') {
-				nextTick(() => {
-					daoTipDialogRef.value.handleShow();
-				})
-			}
-		}
-	}
-
-	function daoTipClose() {
-		if (cacheManager.get('auth')) {
-			// 非游客 记缓存
-			if (currentProduct.value == 1 && typeId.value == 2) {
-				// 数学
-				cacheManager.updateObject('dao-tip', {
-					shuxue: 'has'
-				})
-			} else if (currentProduct.value == 2 && typeId.value == 2) {
-				// 英语
-				cacheManager.updateObject('dao-tip', {
-					yingyu: 'has'
-				})
-			} else if (currentProduct.value == 1 && typeId.value == 1) {
-				// 英语
-				cacheManager.updateObject('dao-tip', {
-					shuxueNew: 'has'
-				})
-			}
-		} else {
-			//游客
-			tipFlag.value = '1';
-		}
-	}
-
-	function onChangeTab(e) {
-		console.log('e', e);
-		console.log(e.detail.current);
-		if (cacheManager.get('auth')) {
-			infoData.zhangId = cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
-			cacheManager.updateObject('auth', {
-				currentZhang: e.detail.current,
-				zhangId: infoData.zhangId
-			})
-		}
-	}
-
-	function init(options) {
-		if (cacheManager.get('auth')) {
-			localAuth.value = cacheManager.get('auth');
-			currentProduct.value = localAuth.value.subjectId;
-			typeId.value = localAuth.value.typeId;
-			console.log(localAuth.value);
-			// 已登录
-			if (localAuth.value.firstLogin) {
-				nextTick(() => {
-					eggDialogRef.value.eggShow();
-				})
-			}
-			if (!cacheManager.get('zhangInfo')) {
-				console.log('不实用换葱');
-				getZhangInfo()
-			} else {
-				console.log('shiyonghuancun');
-				translateData(cacheManager.get('zhangInfo'))
-				zhangList.value = cacheManager.get('zhangInfo').zhangList
-				current.value = cacheManager.get('auth').currentZhang
-				infoData.zhangId = cacheManager.get('zhangInfo').zhangList[current.value].zhangId
-				recordZhangJie()
-			}
-
-			// 已登录付费未支付选择返回 -> 恢复弹窗
-			if (options.studyWithCatalgue) {
-				// 展开弹窗
-				nextTick(() => {
-					catalogueRef.value.showPopup({
-						zhangId: infoData.zhangId
-					});
-				})
-			}
-		} else {
-			subjectId.value = options.subjectId
-			typeId.value = options.typeId
-			levelId.value = options.levelId
-			tipFlag.value = options.tipFlag;
-			currentProduct.value = options.subjectId
-			// 未登录 游客 
-			getCommonZhang(options)
-			getProjectImg()
-		}
-	}
-
-	function findZhangindex(data) {
-		console.log('data', data);
-		for (let zhangIndex = 0; zhangIndex < data.zhangList.length; zhangIndex++) {
-			const zhang = data.zhangList[zhangIndex];
-			for (let jieIndex = 0; jieIndex < zhang.jieList.length; jieIndex++) {
-				if (zhang.jieList[jieIndex].studyFlag == 0) {
-					return zhangIndex; // 返回所在zhang的索引
-				}
-			}
-		}
-		return -1; // 如果没有找到
-	}
-
-	function getZhangInfo(data) {
-		let req = {
-			levelId: localAuth.value.levelId
-		}
-		userZhangInfo(req).then(res => {
-			cacheManager.set('zhangInfo', res.data)
-			let zhang = cacheManager.get('zhangInfo').zhangList.findIndex(zhang => zhang.zhangId == localAuth
-				.value.zhangId);
-			console.log('zhang', zhang);
-
-			if (zhang != -1) {
-				cacheManager.updateObject('auth', {
-					currentZhang: zhang
-				})
-			} else {
-				const zhangIndex = findZhangindex(cacheManager.get('zhangInfo'))
-				console.log(zhangIndex);
-				cacheManager.updateObject('auth', {
-					currentZhang: zhangIndex
-				})
-			}
-			nextTick(() => {
-				translateData(res.data)
-				zhangList.value = res.data.zhangList
-				current.value = cacheManager.get('auth').currentZhang
-				infoData.zhangId = res.data.zhangList[current.value].zhangId
-				recordZhangJie()
-			})
-
-		}).catch((err) => {
-			toast('数据异常,请重新登录!')
-			// cacheManager.clearAll();
-			// uni.reLaunch({
-			// 	url: '/pages/login/index'
-			// });
-		})
-	}
-
-	function getCommonZhang(data) {
-
-		let req = {
-			levelId: data.levelId,
-		}
-		getCommonZhangInfo(req).then(res => {
-			translateData(res.data)
-			youkeImage.value = res.data.icon
-			zhangList.value = res.data.zhangList
-			current.value = 0
-		}).catch((err) => {
-			toast('数据异常,请重新登录!')
-			cacheManager.clearAll();
-			uni.reLaunch({
-				url: '/pages/login/index'
-			});
-		})
-	}
-
-	function recordZhangJie() {
-		let req = {
-			levelId: localAuth.value.levelId,
-			userId: localAuth.value.userId,
-			zhangId: infoData.zhangId,
-			subjectId: currentProduct.value
-		}
-		userLocate(req).then(res => {
-
-		})
-	}
-
-	function goPayPage() {
-		let zhangInfoLocal = cacheManager.get('zhangInfo')
-		if (!zhangInfoLocal.cardId) {
-			toast("cardId 丢失请重新选择学科LevelId");
-			return false
-		}
-		uni.redirectTo({
-			url: '/pages/mall/mallPage?cardId=' + zhangInfoLocal.cardId + '&from=daoPage' + '&subjectId=' +
-				zhangInfoLocal.subjectId
-		})
-	}
-
-	function handleChangeZhang(data) {
-		console.log(data);
-		const authCode = getUserIdentity();
-		if (authCode !== 'Visitor') {
-			cacheManager.updateObject('auth', {
-				zhangId: data.zhangId,
-				currentZhang: zhangList.value.findIndex(citem => citem.zhangId == data.zhangId),
-			})
-		}
-		currentDuration.value = 0
-		setTimeout(() => {
-			current.value = data.number - 1
-			nextTick(() => {
-				currentDuration.value = 500
-			})
-		}, 100)
-		//	init()
-	}
-
-	function goKaoshi(data) {
-		uni.redirectTo({
-			// url: `/pages/unitTest/index?jieNumber=` + data.number
-			url: `/pages/unitTest/index?jieId=` + data.jieId
-		})
-	}
-
-	function goLookShipin(data, index) {
-
-		if (!cacheManager.get('auth')) {
-			console.log('zhangList.value[0].jieList', zhangList.value[0].jieList);
-			console.log('zhangList.value[0].jieList.index', zhangList.value[0].jieList[index]);
-
-			let youkeData = {
-				levelId: levelId.value,
-				typeId: typeId.value,
-				subjectId: subjectId.value,
-				tipFlag: tipFlag.value,
-				jieList: zhangList.value[0].jieList[index],
-				jieName: zhangList.value[0].jieList[index].jieName
-			}
-
-			if (youkeData.typeId == 1) {
-				if (!data.videoId) {
-					toast("videoId 丢失!");
-					return false
-				}
-				uni.redirectTo({
-					url: '/pages/study/lookShipinNew?youkePageData=' + JSON.stringify(youkeData)
-				})
-			} else {
-				if (!data.videoId) {
-					toast("videoId 丢失!");
-					return false
-				}
-				uni.redirectTo({
-					url: '/pages/study/lookShipin?youkePageData=' + JSON.stringify(youkeData)
-				})
-			}
-		} else {
-			if (typeId.value == 1) {
-				// 1新 2旧
-				if (!data.videoId) {
-					toast("videoId 丢失!");
-					return false
-				}
-				uni.redirectTo({
-					url: '/pages/study/lookShipinNew?jieId=' + data.jieId
-				})
-			} else {
-				if (!data.videoId) {
-					toast("videoId 丢失!");
-					return false
-				}
-				uni.redirectTo({
-					url: '/pages/study/lookShipin?jieId=' + data.jieId
-				})
-			}
-
-		}
-	}
-
-	function translateData(data) {
-		//	gradeTerm.value = termMapping[data.subjectId] +' · '+ data.levelName
-		gradeTerm.value = data.levelName
-	}
-
-	function listClick(data, data2, index) {
-		console.log('data', data); // 节内容
-		console.log('data2', data2); //章内容
-		if (!cacheManager.get('auth') && data.firstFlag != 1) {
-			youkeDialogRef.value.handleShow();
-			return;
-		}
-		const authCode = getUserIdentity();
-		console.log('authCode', authCode);
-		if (!(authCode == 'VIP' || data.firstFlag == 1)) {
-			//	debugger
-			goPayDialogRef.value.handleShow();
-			return false
-		}
-
-		if (data.type == 2) {
-			// 最后一项
-			goKaoshi(data, index)
-		} else {
-			goLookShipin(data, index)
-		}
-	}
-
-	function handleCheckCatalogue(item) {
-		catalogueRef.value.showPopup(item);
-	}
-
-	function clickGradeTerm() {
-		// if(cacheManager.get('auth')){
-		// 	cacheManager.updateObject('auth', {
-		// 		currentZhang: 0
-		// 	})
-		// }
-		uni.navigateTo({
-			url: `/pages/selectGradesTerms/index?tipFlag=${tipFlag.value}&from=daoPage&productId=${levelId.value}&xuekeId=${subjectId.value}`
-		})
-
-	}
-	// 游客弹窗---确定
-	function ykConfirm() {
-		uni.redirectTo({
-			url: '/pages/login/index'
-		});
-	}
-
-	function eggBtn() {
-		console.log('点击:开启提分之旅');
-		getProjectImg();
-		cacheManager.updateObject('auth', {
-			firstLogin: false
-		})
-	}
-</script>
-<style>
-</style>

+ 0 - 587
pages/study/lookShipin.vue

@@ -1,587 +0,0 @@
-<template>
-	<view class="ezy-course-page" :style="{backgroundImage: 'url(' + courseBjFun() + ')'}">
-		<view class="icon-title-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">{{shipinTitle}}</text>
-		</view>
-		<view class="ezy-video-box course-video-box">
-			<view ref="videoContent" id="wgy-player-test" :playAuth="playAuth"
-				:change:playAuth="renderScript.receiveMsg" :videoId="videoId" :change:videoId="renderScript.videoIdFun"
-				:hideFlag="hideFlag" :change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers"
-				:change:progressMarkers="renderScript.progressMarkersMsg" :seekTime="seekTime"
-				:change:seekTime="renderScript.seekTimeFun" class="ezy-video">
-			</view>
-		</view>
-		<view class="course-content-border">
-			<view class="course-content-box">
-				<!-- <view class="course-title">{{jieName}}</view> -->
-				<view v-for="(item,index) in progressMarkers" :key="index" @click="markersClick(item)">
-					<view class="title-play-box">
-						<icon class="course-icon" :style="{backgroundImage: 'url(' + courseIconFun() + ')'}"></icon>
-						<view class="course-title">{{item.title}}</view>
-						<view class="course-play-btn" @click="markersClick(item)">视频讲解</view>
-					</view>
-					<rich-text :nodes="item.describe" class="course-content-item"></rich-text>
-				</view>
-			</view>
-		</view>
-		<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
-			mask-background-color="rgba(51, 137, 217, 0.95);">
-			<view :class="courseClass">
-				<view class="text-score">{{credit}}</view>
-				<view class="course-btn-box">
-					<view @click="goBack" class="return-btn"></view>
-					<view @click="goNext" class="continue-btn"></view>
-				</view>
-			</view>
-		</uni-popup>
-		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-		<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
-	</view>
-
-</template>
-
-<script>
-	import {
-		ref
-	} from 'vue';
-	import {
-		onLoad,
-		onReady
-	} from '@dcloudio/uni-app';
-	import {
-		getVideoAuth,
-		getVideoAuthYk,
-		videoWancheng
-	} from "@/api/shipin.js"
-	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
-	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		userZhangNextInfo,
-	} from "@/api/learnPlan.js"
-	import cacheManager from "@/utils/cacheManager.js";
-
-	export default {
-		data() {
-			return {
-				pageData: null, //上个页面获取的视频参数(视频id)
-				playAuth: "", //播放凭证
-				progressMarkers: [],
-				jieName: '',
-				hideFlag: 'show',
-				videoId: "", //阿里云视频id
-				levelId: '',
-				tipFlag: '',
-				credit: '',
-				subjectId: '',
-				tipContent: '是否前往开通付费',
-				typeId: '',
-				seekTime: '',
-				jieId: '',
-				courseClass: '',
-				shipinTitle: '',
-				cacheZhangInfo: {},
-				cacheCurrentZhangIndex: '',
-				YouKeContent: '您当前的身份是游客,想要体验完整内容需注册成用户!'
-			}
-		},
-		components: {
-			tipMiddleDialog,
-			tipBigDialog,
-			tipSmallDialog
-		},
-		onLoad(options) {
-			if (!cacheManager.get('auth')) {
-				const youkeData = JSON.parse(options.youkePageData)
-				// 游客
-				this.videoId = youkeData.jieList.videoId
-				this.subjectId = youkeData.subjectId
-				this.levelId = youkeData.levelId
-				this.typeId = youkeData.typeId
-				this.tipFlag = youkeData.tipFlag
-				this.shipinTitle = youkeData.jieName
-				this.progressMarkers = youkeData.jieList.jiedianList || []
-				this.getLiveYk(); //获取播放凭证
-			} else {
-				this.init(options)
-			}
-		},
-
-		onHide() {
-			console.log('onHideonHideonHideonHide');
-			this.hideFlag = 'hide'
-		},
-		onUnload() {
-			console.log('onUnloadonUnloadonUnloadonUnloadonUnload');
-			this.hideFlag = 'hide'
-		},
-		methods: {
-			courseBjFun() {
-				if (!cacheManager.get('auth')) {
-					switch (Number(this.subjectId)) {
-						case 1:
-							return 'static/images/course/couse-shuxue-bj.png'
-							break;
-						case 2:
-							return 'static/images/course/course-yingyu-bj.png'
-							break;
-						default:
-							break;
-					}
-				} else {
-					switch (Number(cacheManager.get('auth').subjectId)) {
-						case 1:
-							return 'static/images/course/couse-shuxue-bj.png'
-							break;
-						case 2:
-							return 'static/images/course/course-yingyu-bj.png'
-							break;
-						default:
-							break;
-					}
-				}
-			},
-			courseIconFun() {
-				if (!cacheManager.get('auth')) {
-					switch (Number(this.subjectId)) {
-						case 1:
-							return 'static/images/course/shuxue-icon.png'
-							break;
-						case 2:
-							return 'static/images/course/yingyu-icon.png'
-							break;
-						default:
-							break;
-					}
-				} else {
-					switch (Number(cacheManager.get('auth').subjectId)) {
-						case 1:
-							return 'static/images/course/shuxue-icon.png'
-							break;
-						case 2:
-							return 'static/images/course/yingyu-icon.png'
-							break;
-						default:
-							break;
-					}
-				}
-			},
-			init(options) {
-				this.jieId = options.jieId
-				if (!(cacheManager.get('zhangInfo') && options.jieId)) {
-					toast('数据错误,缓存丢失/ jieId丢失')
-					return false
-				}
-				this.cacheCurrentZhangIndex = cacheManager.get('auth').currentZhang
-				this.cacheZhangInfo = cacheManager.get('zhangInfo')
-
-				// let zhang = this.cacheZhangInfo.zhangList.find(zhang => zhang.zhangId == this.zhangId);
-				// if (!zhang) {
-				// 	return
-				// }
-				let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex]
-				let currentObject = zhang.jieList.find(item => item.jieId == options.jieId);
-				console.log(currentObject);
-				this.shipinTitle = currentObject.jieName
-				this.pageData = {
-					...currentObject
-				}
-				console.log(this.pageData);
-				this.videoId = this.pageData.videoId
-				this.jieName = this.pageData.jieName
-				this.credit = this.pageData.credit
-				this.progressMarkers = this.pageData.jiedianList || []
-				this.getLive(); //获取播放凭证
-			},
-			goNextZhang() {
-				let that = this
-				cacheManager.updateObject('auth', {
-					currentZhang: this.cacheCurrentZhangIndex + 1
-				})
-				this.cacheZhangInfo = cacheManager.get('zhangInfo')
-				let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex + 1]
-				uni.redirectTo({
-					url: '/pages/study/lookShipin?jieId=' + zhang.jieList[0].jieId
-				})
-			},
-			playEnd(data) {
-				console.log('data', data);
-				console.log('111111');
-				// #ifdef APP-PLUS
-				plus.screen.lockOrientation('portrait-primary');
-				// #endif
-				const AuthCode = getUserIdentity();
-				console.log(AuthCode);
-				if (AuthCode == 'Visitor') {
-					return false
-				} else {
-
-					let currentJieData = cacheManager.getCurrentJieData('zhangInfo', this.cacheCurrentZhangIndex, this
-						.jieId)
-					if (currentJieData.studyFlag == 1) {
-						// 学完一遍
-						this.courseClass = 'course-finish-dialog'
-						this.$refs.popupRef.open();
-					} else {
-						cacheManager.updateJieStatus('zhangInfo', this.cacheCurrentZhangIndex, this.jieId)
-						this.courseClass = 'course-score-dialog'
-						this.$refs.popupRef.open();
-						let req = {
-							credit: this.credit,
-							jieId: this.jieId,
-						}
-						videoWancheng(req).then(res => {
-
-						})
-					}
-				}
-
-			},
-			goBack() {
-				// #ifdef APP-PLUS
-				plus.screen.unlockOrientation();
-				// #endif
-				this.$refs.popupRef.close();
-				this.goUpPage()
-			},
-			goNext() {
-				// #ifdef APP-PLUS
-				plus.screen.unlockOrientation();
-				// #endif
-				this.$refs.popupRef.close();
-				if (!cacheManager.get('auth')) {
-					console.log(this);
-					this.$refs.youkeDialogRef.handleShow();
-				} else {
-					const AuthCode = getUserIdentity();
-					console.log(AuthCode);
-					if (AuthCode == 'Not-Vip') {
-						this.$refs.goPayDialogRef.handleShow();
-						return false
-					}
-					//	debugger
-					Number(this.jieId++)
-					console.log('this.pageData', this.pageData);
-					let currentObject = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex].jieList.find(item =>
-						item.jieId == this.jieId);
-					if (currentObject) {
-						this.pageData = {
-							...currentObject
-						}
-					}
-					// lastFlag是否是本章最后一节,0否1是  type,1视频,2试题
-					if (this.pageData.lastFlag == 1 && this.pageData.type == 2) {
-						uni.redirectTo({
-							url: `/pages/unitTest/index?jieId=` + this.pageData.jieId
-						})
-					} else if (this.pageData.lastFlag == 1 && this.pageData.type == 1) {
-						// 当前是本章最后一节,并且是 视频 切换下一章
-						this.goNextZhang()
-					} else {
-						uni.redirectTo({
-							//url: '/pages/study/lookShipin?studyData=' + JSON.stringify(pageData)
-							url: '/pages/study/lookShipin?jieId=' + this.jieId
-						})
-					}
-				}
-			},
-			getLiveYk() {
-				if (!this.videoId) {
-					toast("video缺失!")
-					return false
-				}
-				let req = {
-					videoId: this.videoId
-				}
-				getVideoAuthYk(req).then(res => {
-					this.playAuth = res.data
-				})
-			},
-			getLive() {
-				if (!this.videoId) {
-					toast("video缺失!")
-					return false
-				}
-				let req = {
-					videoId: this.videoId
-				}
-				getVideoAuth(req).then(res => {
-					this.playAuth = res.data
-				})
-			},
-			markersClick(data) {
-				this.seekTime = ""
-				this.$nextTick(() => {
-					this.seekTime = data.offset
-				});
-			},
-			goUpPage() {
-				if (!cacheManager.get('auth')) {
-					uni.redirectTo({
-						url: '/pages/study/index?levelId=' + this.levelId + '&typeId=' + this.typeId +
-							'&subjectId=' +
-							this.subjectId + '&tipFlag=' + this.tipFlag
-					})
-				} else {
-					uni.redirectTo({
-						url: `/pages/study/index`
-
-					})
-				}
-
-
-
-			},
-			goPayPage() {
-				let zhangInfoLocal = cacheManager.get('zhangInfo')
-				if (!zhangInfoLocal.cardId) {
-					toast("cardId 丢失请重新选择学科LevelId");
-					return false
-				}
-				uni.redirectTo({
-					url: '/pages/mall/mallPage?cardId=' + zhangInfoLocal.cardId + '&from=daoPage' + '&subjectId=' +
-						zhangInfoLocal.subjectId
-				})
-			},
-			ykConfirm() {
-				uni.redirectTo({
-					url: '/pages/login/index'
-				});
-			}
-		},
-		created() {
-			// console.log("getLive")
-			// this.getLive(); //获取播放凭证
-
-		},
-
-	}
-</script>
-
-
-
-<script module="renderScript" lang="renderjs">
-	export default {
-		mounted() {
-			console.log("renderScript1")
-			// 在适合的生命周期,通过script和link标签引入播放器sdk、css
-			//	this.loadWebPlayerSDK()
-		},
-		data() {
-			return {
-				player: null,
-				playAuth: '',
-				videoId: '',
-				progressMarkers: [],
-				isFullScreen: false,
-				seekTime: ''
-
-			}
-		},
-		methods: {
-
-			receiveMsg(newValue, oldValue, ownerInstance, instance) {
-				// console.log('service层中的options发生变化')
-				// console.log('新值', newValue)
-				// console.log('旧值', oldValue)
-				// ownerInstance和this.$ownerInstance一样,可用来向service层通信
-				// instance和ownerInstance的区别是:
-				// instance.$el指向的是触发事件的那个节点;ownerInstance.$el指向当前vue文件中的根节点;
-				// instance的作用目前尚不明确,官方没有给出用法
-				if (newValue) {
-					this.playAuth = ''
-					this.playAuth = newValue
-					this.loadWebPlayerSDK()
-
-				}
-			},
-			videoIdFun(newValue, oldValue, ownerInstance, instance) {
-				if (newValue) {
-					this.videoId = ''
-					this.videoId = newValue
-				}
-			},
-			hideFlagFun(newValue, oldValue, ownerInstance, instance) {
-				if (this.player) {
-					this.player.pause()
-				}
-			},
-			progressMarkersMsg(newValue, oldValue, ownerInstance, instance) {
-
-				if (newValue) {
-					this.progressMarkers = newValue
-				}
-			},
-			seekTimeFun(newValue, oldValue, ownerInstance, instance) {
-				if (newValue) {
-					this.player.play()
-					this.player.seek(newValue)
-					// switch (this.player.getStatus()) {
-					// 	case 'init':
-					// 		break;
-					// 	case 'ready':
-					// 		break;
-					// 	case 'loading':
-					// 	this.player.play()
-					// 	this.player.seek(newValue)
-					// 		break;
-					// 	case 'play':
-					// 		this.player.seek(newValue)
-					// 		break;
-					// 	case 'pause':
-					// 	this.player.play()
-					// 	this.player.seek(newValue)
-					// 		break;
-					// 	case 'playing':
-					// 	this.player.seek(newValue)
-					// 		break;
-					// 	case 'waiting':
-					// 		break;
-					// 	case 'error':
-					// 		break;
-					// 	case 'ended':
-					// 		break;
-					// 	default:
-					// 		break;
-					// }
-					//	this.player.seek(newValue)
-				}
-			},
-			playAli() {
-				let that = this
-				// console.log(this.videoId);
-				// console.log(this.playAuth);
-				//配置播放器
-				if (!this.playAuth) {
-					return false;
-				}
-				var player = new Aliplayer({
-					id: "wgy-player-test",
-					"vid": this.videoId,
-					"playauth": this.playAuth,
-					extraInfo: {
-						poster: 'noposter'
-					},
-					fullscreenEvents: {
-						fullscreenChange: (isFull) => {
-							this.isFullScreen = isFull
-						}
-					},
-					//cover: 'https://img.alicdn.com/tps/TB1EXIhOFXXXXcIaXXXXXXXXXXX-760-340.jpg',
-					// "vid": '',
-					// "playauth": '',
-					// "playConfig": {
-					// 	"EncryptType": 'AliyunVoDEncryption'
-					// },
-					"skinLayout": [{
-							"name": "bigPlayButton",
-							"align": "blabs",
-							"x": 30,
-							"y": 80
-						},
-						{
-							"name": "H5Loading",
-							"align": "cc"
-						},
-						{
-							"name": "controlBar",
-							"align": "blabs",
-							"x": 0,
-							"y": 0,
-							"children": [{
-									"name": "progress",
-									"align": "blabs",
-									"x": 0,
-									"y": 44
-								},
-								{
-									"name": "playButton",
-									"align": "tl",
-									"x": 15,
-									"y": 12
-								},
-								{
-									"name": "fullScreenButton",
-									"align": "tr",
-									"x": 10,
-									"y": 12
-								},
-								{
-									"name": "timeDisplay",
-									"align": "tr",
-									"x": 10,
-									"y": 5
-								}
-							]
-						}
-					],
-					"qualitySort": "asc",
-					"format": "mp4",
-					"mediaType": "video",
-					"encryptType": 1,
-					"progressMarkers": this.progressMarkers,
-					"autoplay": false,
-					"isLive": false,
-					"rePlay": false,
-					"playsinline": true,
-					"preload": false,
-					"controlBarVisibility": "hover",
-					"useH5Prism": true
-
-				}, function(player) {});
-				this.player = player;
-				player.on('canplay', function() {
-					console.log('canplay', this.player.tag);
-					player.tag.play();
-
-				});
-
-				player.on('ended', function(data) {
-					that.exitFullScreen();
-					that.$ownerInstance.callMethod('playEnd', {
-						data: 'end'
-					})
-					// uni.$emit('playEnd', {
-					// 	data: 'end'
-					// });
-				});
-			},
-			exitFullScreen() {
-				if (document.exitFullscreen) {
-					document.exitFullscreen(); // 标准方法
-				} else if (document.mozCancelFullScreen) { // Firefox
-					document.mozCancelFullScreen();
-				} else if (document.webkitExitFullscreen) { // Chrome, Safari & Opera
-					document.webkitExitFullscreen();
-				} else if (document.msExitFullscreen) { // IE/Edge
-					document.msExitFullscreen();
-				}
-			},
-
-			loadWebPlayerSDK() {
-				return new Promise((resolve, reject) => {
-					const s_tag = document.createElement('script'); // 引入播放器js
-					s_tag.type = 'text/javascript';
-					s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
-					s_tag.charset = 'utf-8';
-					s_tag.onload = () => {
-						//	console.log(this.playAuth);
-						this.playAli()
-						resolve();
-					}
-					document.body.appendChild(s_tag);
-					const l_tag = document.createElement('link'); // 引入播放器css
-					l_tag.rel = 'stylesheet';
-					l_tag.href =
-						'https://g.alicdn.com/de/prismplayer/2.9.6/skins/default/aliplayer-min.css';
-					document.body.appendChild(l_tag);
-				});
-			},
-		}
-	}
-</script>

+ 0 - 543
pages/study/lookShipinNew.vue

@@ -1,543 +0,0 @@
-<template>
-	<view class="ezy-course-page" :style="{backgroundImage: 'url(' + courseBjFun() + ')'}">
-		<view class="icon-title-navBar-box">
-			<view @click="goUpPage" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">{{shipinTitle}}</text>
-		</view>
-		<view class="ezy-video-box course-video-box">
-			<view ref="videoContent" id="wgy-player-test" :playAuth="playAuth"
-				:change:playAuth="renderScript.receiveMsg" :videoId="videoId" :change:videoId="renderScript.videoIdFun"
-				:hideFlag="hideFlag" :change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers"
-				:change:progressMarkers="renderScript.progressMarkersMsg" :seekTime="seekTime"
-				:change:seekTime="renderScript.seekTimeFun" class="ezy-video">
-			</view>
-		</view>
-		<view class="course-content-border">
-			<view class="course-content-box">
-				<view v-for="(item,index) in progressMarkers" :key="index" @click="markersClick(item)">
-					<view class="title-play-box">
-						<icon class="course-icon" :style="{backgroundImage: 'url(' + courseIconFun() + ')'}"></icon>
-						<view class="course-title">{{item.title}}</view>
-						<!-- 	<view class="course-play-btn" @click="markersClick(item)">视频讲解</view> -->
-					</view>
-					<rich-text :nodes="item.describe" class="course-content-item"></rich-text>
-				</view>
-			</view>
-		</view>
-		<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
-			mask-background-color="rgba(51, 137, 217, 0.95);">
-			<view :class="courseClass">
-				<view class="text-score">{{credit}}</view>
-				<view class="course-btn-box">
-					<view @click="goBack" class="return-btn"></view>
-					<view @click="goNext" class="continue-btn"></view>
-				</view>
-			</view>
-		</uni-popup>
-		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-		<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
-	</view>
-
-</template>
-
-<script>
-	import {
-		ref
-	} from 'vue';
-	import {
-		onLoad,
-		onReady
-	} from '@dcloudio/uni-app';
-	import {
-		getVideoAuth,
-		getVideoAuthYk,
-		videoWancheng
-	} from "@/api/shipin.js"
-	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
-	import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		userZhangNextInfo,
-	} from "@/api/learnPlan.js"
-	import cacheManager from "@/utils/cacheManager.js";
-
-	export default {
-		data() {
-			return {
-				pageData: null, //上个页面获取的视频参数(视频id)
-				playAuth: "", //播放凭证
-				progressMarkers: [],
-				jieName: '',
-				hideFlag: 'show',
-				videoId: "", //阿里云视频id
-				tipContent: '是否前往开通付费',
-				subjectId: '',
-				credit: '',
-				tipFlag: '',
-				typeId: '',
-				levelId: '',
-				seekTime: '',
-				jieId: '',
-				courseClass: '',
-				shipinTitle: '',
-				cacheZhangInfo: {},
-				cacheCurrentZhangIndex: '',
-				YouKeContent: '您当前的身份是游客,想要体验完整内容需注册成用户!'
-			}
-		},
-		components: {
-			tipMiddleDialog,
-			tipBigDialog,
-			tipSmallDialog
-		},
-		onLoad(options) {
-			if (!cacheManager.get('auth')) {
-				const youkeData = JSON.parse(options.youkePageData)
-				// 游客
-				this.videoId = youkeData.jieList.videoId
-				this.subjectId = youkeData.subjectId
-				this.levelId = youkeData.levelId
-				this.typeId = youkeData.typeId
-				this.tipFlag = youkeData.tipFlag
-				this.shipinTitle = youkeData.jieName
-				this.progressMarkers = youkeData.jieList.jiedianList || []
-				this.getLiveYk(); //获取播放凭证
-			} else {
-				this.init(options)
-			}
-		},
-
-		onHide() {
-			console.log('onHideonHideonHideonHide');
-			this.hideFlag = 'hide'
-		},
-		onUnload() {
-			console.log('onUnloadonUnloadonUnloadonUnloadonUnload');
-			this.hideFlag = 'hide'
-		},
-		methods: {
-			courseBjFun() {
-				return 'static/images/course/course-jstx-bj.png'
-			},
-			courseIconFun() {
-				return 'static/images/course/jstx-icon.png'
-			},
-			init(options) {
-				this.jieId = options.jieId
-				if (!(cacheManager.get('zhangInfo') && options.jieId)) {
-					toast('数据错误,缓存丢失/ jieId丢失')
-					return false
-				}
-				this.cacheCurrentZhangIndex = cacheManager.get('auth').currentZhang
-				this.cacheZhangInfo = cacheManager.get('zhangInfo')
-
-				// let zhang = this.cacheZhangInfo.zhangList.find(zhang => zhang.zhangId == this.zhangId);
-				// if (!zhang) {
-				// 	return
-				// }
-				let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex]
-				let currentObject = zhang.jieList.find(item => item.jieId == options.jieId);
-				console.log(currentObject);
-				this.shipinTitle = currentObject.jieName
-				this.pageData = {
-					...currentObject
-				}
-				console.log(this.pageData);
-				this.videoId = this.pageData.videoId
-				this.jieName = this.pageData.jieName
-				this.credit = this.pageData.credit
-				this.progressMarkers = this.pageData.jiedianList || []
-				this.getLive(); //获取播放凭证
-			},
-			goNextZhang() {
-				let that = this
-				cacheManager.updateObject('auth', {
-					currentZhang: this.cacheCurrentZhangIndex + 1
-				})
-				this.cacheZhangInfo = cacheManager.get('zhangInfo')
-				let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex + 1]
-				uni.redirectTo({
-					url: '/pages/study/lookShipin?jieId=' + zhang.jieList[0].jieId
-				})
-			},
-			playEnd(data) {
-				console.log('data', data);
-				console.log('111111');
-				// #ifdef APP-PLUS
-				plus.screen.lockOrientation('portrait-primary');
-				// #endif
-				const AuthCode = getUserIdentity();
-				console.log(AuthCode);
-				if (AuthCode == 'Visitor') {
-					return false
-				} else {
-
-					let currentJieData = cacheManager.getCurrentJieData('zhangInfo', this.cacheCurrentZhangIndex, this
-						.jieId)
-					if (currentJieData.studyFlag == 1) {
-						// 学完一遍
-						this.courseClass = 'course-finish-dialog'
-						this.$refs.popupRef.open();
-					} else {
-						cacheManager.updateJieStatus('zhangInfo', this.cacheCurrentZhangIndex, this.jieId)
-						this.courseClass = 'course-score-dialog'
-						this.$refs.popupRef.open();
-						let req = {
-							credit: this.credit,
-							jieId: this.jieId,
-						}
-						videoWancheng(req).then(res => {
-
-						})
-					}
-				}
-
-			},
-			goBack() {
-				// #ifdef APP-PLUS
-				plus.screen.unlockOrientation();
-				// #endif
-				this.$refs.popupRef.close();
-				this.goUpPage()
-			},
-			goNext() {
-				// #ifdef APP-PLUS
-				plus.screen.unlockOrientation();
-				// #endif
-				this.$refs.popupRef.close();
-				if (!cacheManager.get('auth')) {
-					console.log(this);
-					this.$refs.youkeDialogRef.handleShow();
-				} else {
-					const AuthCode = getUserIdentity();
-					console.log(AuthCode);
-					if (AuthCode == 'Not-Vip') {
-						this.$refs.goPayDialogRef.handleShow();
-						return false
-					}
-					//	debugger
-					Number(this.jieId++)
-					console.log('this.pageData', this.pageData);
-					let currentObject = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex].jieList.find(item =>
-						item.jieId == this.jieId);
-					if (currentObject) {
-						this.pageData = {
-							...currentObject
-						}
-					}
-					// lastFlag是否是本章最后一节,0否1是  type,1视频,2试题
-					if (this.pageData.lastFlag == 1 && this.pageData.type == 2) {
-						uni.redirectTo({
-							url: `/pages/unitTest/index?jieId=` + this.pageData.jieId
-						})
-					} else if (this.pageData.lastFlag == 1 && this.pageData.type == 1) {
-						// 当前是本章最后一节,并且是 视频 切换下一章
-						//this.goNextZhang()
-						this.goUpPage()
-					} else {
-						uni.redirectTo({
-							//url: '/pages/study/lookShipin?studyData=' + JSON.stringify(pageData)
-							url: '/pages/study/lookShipinNew?jieId=' + this.jieId
-						})
-					}
-				}
-			},
-			getLiveYk() {
-				if (!this.videoId) {
-					toast("video缺失!")
-					return false
-				}
-				let req = {
-					videoId: this.videoId
-				}
-				getVideoAuthYk(req).then(res => {
-					this.playAuth = res.data
-				})
-			},
-			getLive() {
-				if (!this.videoId) {
-					toast("video缺失!")
-					return false
-				}
-				let req = {
-					videoId: this.videoId
-				}
-				getVideoAuth(req).then(res => {
-					this.playAuth = res.data
-				})
-			},
-			markersClick(data) {
-				this.seekTime = ""
-				this.$nextTick(() => {
-					this.seekTime = data.offset
-				});
-			},
-			goUpPage() {
-				if (!cacheManager.get('auth')) {
-					uni.redirectTo({
-						url: '/pages/study/index?levelId=' + this.levelId + '&typeId=' + this.typeId +
-							'&subjectId=' +
-							this.subjectId + '&tipFlag=' + this.tipFlag
-					})
-				} else {
-					uni.redirectTo({
-						url: `/pages/study/index`
-
-					})
-				}
-
-
-
-			},
-			goPayPage() {
-				let zhangInfoLocal = cacheManager.get('zhangInfo')
-				if (!zhangInfoLocal.cardId) {
-					toast("cardId 丢失请重新选择学科LevelId");
-					return false
-				}
-				uni.redirectTo({
-					url: '/pages/mall/mallPage?cardId=' + zhangInfoLocal.cardId + '&from=daoPage' + '&subjectId=' +
-						zhangInfoLocal.subjectId
-				})
-			},
-			ykConfirm() {
-				uni.redirectTo({
-					url: '/pages/login/index'
-				});
-			}
-		},
-		created() {
-			// console.log("getLive")
-			// this.getLive(); //获取播放凭证
-
-		},
-
-	}
-</script>
-
-
-
-<script module="renderScript" lang="renderjs">
-	export default {
-		mounted() {
-			console.log("renderScript1")
-			// 在适合的生命周期,通过script和link标签引入播放器sdk、css
-			//	this.loadWebPlayerSDK()
-		},
-		data() {
-			return {
-				player: null,
-				playAuth: '',
-				videoId: '',
-				progressMarkers: [],
-				isFullScreen: false,
-				seekTime: ''
-
-			}
-		},
-		methods: {
-
-			receiveMsg(newValue, oldValue, ownerInstance, instance) {
-				// console.log('service层中的options发生变化')
-				// console.log('新值', newValue)
-				// console.log('旧值', oldValue)
-				// ownerInstance和this.$ownerInstance一样,可用来向service层通信
-				// instance和ownerInstance的区别是:
-				// instance.$el指向的是触发事件的那个节点;ownerInstance.$el指向当前vue文件中的根节点;
-				// instance的作用目前尚不明确,官方没有给出用法
-				if (newValue) {
-					this.playAuth = ''
-					this.playAuth = newValue
-					this.loadWebPlayerSDK()
-
-				}
-			},
-			videoIdFun(newValue, oldValue, ownerInstance, instance) {
-				if (newValue) {
-					this.videoId = ''
-					this.videoId = newValue
-				}
-			},
-			hideFlagFun(newValue, oldValue, ownerInstance, instance) {
-				if (this.player) {
-					this.player.pause()
-				}
-			},
-			progressMarkersMsg(newValue, oldValue, ownerInstance, instance) {
-
-				if (newValue) {
-					this.progressMarkers = newValue
-				}
-			},
-			seekTimeFun(newValue, oldValue, ownerInstance, instance) {
-				if (newValue) {
-					this.player.play()
-					this.player.seek(newValue)
-					// switch (this.player.getStatus()) {
-					// 	case 'init':
-					// 		break;
-					// 	case 'ready':
-					// 		break;
-					// 	case 'loading':
-					// 	this.player.play()
-					// 	this.player.seek(newValue)
-					// 		break;
-					// 	case 'play':
-					// 		this.player.seek(newValue)
-					// 		break;
-					// 	case 'pause':
-					// 	this.player.play()
-					// 	this.player.seek(newValue)
-					// 		break;
-					// 	case 'playing':
-					// 	this.player.seek(newValue)
-					// 		break;
-					// 	case 'waiting':
-					// 		break;
-					// 	case 'error':
-					// 		break;
-					// 	case 'ended':
-					// 		break;
-					// 	default:
-					// 		break;
-					// }
-					//	this.player.seek(newValue)
-				}
-			},
-			playAli() {
-				let that = this
-				// console.log(this.videoId);
-				// console.log(this.playAuth);
-				//配置播放器
-				if (!this.playAuth) {
-					return false;
-				}
-				var player = new Aliplayer({
-					id: "wgy-player-test",
-					"vid": this.videoId,
-					"playauth": this.playAuth,
-					extraInfo: {
-						poster: 'noposter'
-					},
-					fullscreenEvents: {
-						fullscreenChange: (isFull) => {
-							this.isFullScreen = isFull
-						}
-					},
-					//cover: 'https://img.alicdn.com/tps/TB1EXIhOFXXXXcIaXXXXXXXXXXX-760-340.jpg',
-					// "vid": '',
-					// "playauth": '',
-					// "playConfig": {
-					// 	"EncryptType": 'AliyunVoDEncryption'
-					// },
-					"skinLayout": [{
-							"name": "bigPlayButton",
-							"align": "blabs",
-							"x": 30,
-							"y": 80
-						},
-						{
-							"name": "H5Loading",
-							"align": "cc"
-						},
-						{
-							"name": "controlBar",
-							"align": "blabs",
-							"x": 0,
-							"y": 0,
-							"children": [{
-									"name": "progress",
-									"align": "blabs",
-									"x": 0,
-									"y": 44
-								},
-								{
-									"name": "playButton",
-									"align": "tl",
-									"x": 15,
-									"y": 12
-								},
-								{
-									"name": "fullScreenButton",
-									"align": "tr",
-									"x": 10,
-									"y": 12
-								},
-								{
-									"name": "timeDisplay",
-									"align": "tr",
-									"x": 10,
-									"y": 5
-								}
-							]
-						}
-					],
-					"qualitySort": "asc",
-					"format": "mp4",
-					"mediaType": "video",
-					"encryptType": 1,
-					"progressMarkers": this.progressMarkers,
-					"autoplay": false,
-					"isLive": false,
-					"rePlay": false,
-					"playsinline": true,
-					"preload": false,
-					"controlBarVisibility": "hover",
-					"useH5Prism": true
-
-				}, function(player) {});
-				this.player = player;
-				player.on('canplay', function() {
-					console.log('canplay', this.player.tag);
-					player.tag.play();
-
-				});
-
-				player.on('ended', function(data) {
-					that.exitFullScreen();
-					that.$ownerInstance.callMethod('playEnd', {
-						data: 'end'
-					})
-					// uni.$emit('playEnd', {
-					// 	data: 'end'
-					// });
-				});
-			},
-			exitFullScreen() {
-				if (document.exitFullscreen) {
-					document.exitFullscreen(); // 标准方法
-				} else if (document.mozCancelFullScreen) { // Firefox
-					document.mozCancelFullScreen();
-				} else if (document.webkitExitFullscreen) { // Chrome, Safari & Opera
-					document.webkitExitFullscreen();
-				} else if (document.msExitFullscreen) { // IE/Edge
-					document.msExitFullscreen();
-				}
-			},
-
-			loadWebPlayerSDK() {
-				return new Promise((resolve, reject) => {
-					const s_tag = document.createElement('script'); // 引入播放器js
-					s_tag.type = 'text/javascript';
-					s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
-					s_tag.charset = 'utf-8';
-					s_tag.onload = () => {
-						//	console.log(this.playAuth);
-						this.playAli()
-						resolve();
-					}
-					document.body.appendChild(s_tag);
-					const l_tag = document.createElement('link'); // 引入播放器css
-					l_tag.rel = 'stylesheet';
-					l_tag.href =
-						'https://g.alicdn.com/de/prismplayer/2.9.6/skins/default/aliplayer-min.css';
-					document.body.appendChild(l_tag);
-				});
-			},
-		}
-	}
-</script>

+ 0 - 288
pages/study/product/shuxue.vue

@@ -1,288 +0,0 @@
-<template>
-	<view class="ezy-study-page ezy-shuxue-study-page">
-		<view class="study-school-year" @click="clickGradeTerm">{{gradeTerm}}</view>
-		<view class="ezy-study-wrap">
-			<view class="chapter-box" @click="handleCheckCatalogue">{{options.numberStr}}</view>
-			<view @click="handleCheckCatalogue" :class="getTitleClass(options.zhangName)">
-				{{getZhangName(options.zhangName)}}
-			</view>
-			<!-- 动物类型 -->
-			<view v-if="growthType!=null" :class="currentGrowth()"></view>
-			<view>
-				<!-- 小岛 -->
-				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
-					@click="listClick(item, index,options)" :class="getClass(options,index,isVip,item)">
-					<view v-if="isVip === 'VIP'">
-						<!-- 序号 -->
-						<view class="brand-icon" v-if="item.studyFlag===0">{{ item.number }}</view>
-						<!-- 星星 -->
-						<view class="brand-finish-icon" v-if="item.studyFlag===1"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag &&animalNum == index" class="brand-arrow"></view>
-						<!-- 节名称 -->
-						<view class="brand-content">{{ item.jieName }}</view>
-					</view>
-					<view v-if="isVip == 'Not-Vip'">
-						<!-- 序号或锁 -->
-						<view  class="brand-icon">{{ item.number }}
-						</view>
-						<view v-if="item.firstFlag !=1" class="brand-lock"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag  &&  animalNum == index &&isVip != 'Visitor'" class="brand-arrow">
-						</view>
-						<!-- 节名称 -->
-						<view class="brand-content"> {{ item.jieName }} </view>
-					</view>
-
-					<view v-if="isVip == 'Visitor'">
-			
-						<!-- 锁 -->
-						<view  class="brand-icon">{{ item.number }}
-						</view>
-						<!-- 锁 -->
-						<view  v-if="item.firstFlag !=1" class="brand-lock"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag  &&  animalNum == index &&isVip != 'Visitor'" class="brand-arrow">
-						</view>
-						<!-- 节名称 -->
-						<view class="brand-content"> {{ item.jieName }} </view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref,
-		watch,
-		getCurrentInstance,
-		onMounted,
-		nextTick
-	} from "vue";
-	import cacheManager from "@/utils/cacheManager.js";
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		onShow
-	} from '@dcloudio/uni-app';
-	const growthType = ref(null);
-
-	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
-	const props = defineProps({
-		options: {
-			type: Object,
-		},
-		youkeImage: {
-			String: '',
-		},
-		gradeTerm: {
-			type: String,
-		},
-	})
-	onShow(() => {
-		growthType.value = cacheManager.get('auth') ? cacheManager.get('auth').growthType : props.youkeImage
-	})
-	
-	const isVip = getUserIdentity();
-	console.log('isVip', isVip);
-	const gradeMapping = {
-		1: '一年级',
-		2: '二年级',
-		3: '三年级',
-		4: '四年级',
-		5: '五年级',
-		6: '六年级'
-	};
-
-	const termMapping = {
-		1: ' 数学',
-		2: ' 英语'
-	};
-
-	let startX = ref(0);
-	let isSliding = ref(false);
-	let endX = ref(0);
-	let gradeTerm = ref('');
-	let animalNum = ref(0);
-
-	function clickGradeTerm() {
-		$emit('clickGradeTerm');
-	}
-
-	function listClick(data, index, data2) {
-		data.daeFlag = true
-		nextTick(() => {
-			animalNum.value = index
-		})
-		setTimeout(() => {
-			$emit('listClick', data, data2, index);
-		}, 300)
-
-	}
-	// 获取章name
-	function getZhangName(data) {
-		if (data.length <= 9) {
-			return data
-		} else {
-			return getZhangContent(data);
-		}
-	}
-
-	function currentGrowth(data) {
-		if (growthType.value == 0) {
-			return 'animal-img dan-img'
-		} else if (growthType.value == 1) {
-			return 'animal-img xiao-e-img'
-		} else if (growthType.value == 2) {
-			return 'animal-img zhong-e-img'
-		} else {
-			return 'animal-img da-e-img'
-		}
-	}
-
-	// 章换行显示
-	function getZhangContent(data) {
-
-		let length = data.length;
-		// 初始将字符串平分成两半
-		let halfLength = Math.floor(length / 2);
-
-		// 插入换行符
-		let firstLine = data.slice(0, halfLength);
-		let secondLine = data.slice(halfLength);
-		//console.log(firstLine + '\n' + secondLine, 'firstLine + + secondLine');
-		return firstLine + '\n' + secondLine;
-	}
-
-	// 章class
-	function getTitleClass(data) {
-
-		if (data.length <= 5) {
-			return 'chapter-title-box chapter-small-title-box'
-		} else if (data.length <= 9) {
-			return 'chapter-title-box chapter-middle-title-box'
-		} else if (data.length > 9) {
-			return 'chapter-title-box chapter-big-title-box'
-		}
-	}
-
-	// 获取节class
-	function getClass(data, index, isVip, item) {
-		//	console.log('data',data);
-		let brandActive = '';
-		if (isVip === 'VIP') {
-			brandActive = 'brand-active';
-		} else if (data.number == 1 && item.firstFlag == 1 && isVip == 'Not-Vip') {
-			brandActive = 'brand-active';
-		} else if (data.number == 1 && item.firstFlag == 1 && isVip == 'Visitor' && item.type == 1) {
-			brandActive = 'brand-active';
-		} else {
-			brandActive = '';
-		}
-		let indexLast = data.jieList.length - 1;
-		// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
-		if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == '单元测试') {
-			return 'ceshi-brand-item' + ' ' + brandActive;
-		} else {
-			return getJieClass(data, index, brandActive)
-		}
-	}
-	// 根据获取节字数获取class
-	function getJieClass(data, index, active) {
-		let itemJieName = data.jieList[index].jieName.length;
-		if (itemJieName > 7) {
-			return 'big-brand-item' + ' ' + active;
-		} else {
-			return 'small-brand-item' + ' ' + active;
-		}
-	}
-
-
-
-	function handleCheckCatalogue() {
-		$emit('handleCheckCatalogue');
-	}
-
-	function onTouchStart(event) {
-		console.log(event.touches.length);
-		isSliding.value = false
-		if (event.touches.length === 1) {
-			isSliding.value = true;
-			startX.value = event.touches[0].pageX;
-		} else {
-			isSliding.value = false;
-			event.preventDefault()
-			return
-		}
-	}
-
-	function onSwipeLeft(event) {
-		console.log('11111');
-		if (cacheManager.get('auth')) {
-			$emit('onLeft');
-		}
-	}
-
-	function onSwipeRight(event) {
-		console.log('22222');
-		console.log(cacheManager.get('auth'));
-		if (cacheManager.get('auth')) {
-			console.log('啊啊啊啊啊');
-			$emit('onRight');
-		}
-
-	}
-
-	function onTouchEnd(event) {
-		if (isSliding.value) {
-			const distanceX = event.changedTouches[0].clientX - startX.value
-			if (distanceX > 200) {
-				onSwipeLeft();
-			} else if (distanceX < -200) {
-				onSwipeRight();
-			}
-			isSliding.value = false
-		} else {
-			console.log('error');
-		}
-	}
-
-	function dataRecom(data) {
-
-		const index = data.jieList.findIndex(item => item.studyFlag == 0);
-
-		if (index !== -1) {
-			data.jieList[index].daeFlag = true;
-			animalNum.value = index
-		}
-	}
-	watch(() => props.options, (newVal, oldVal) => {
-		//	console.log('New options:', newVal);
-		//	console.log('Old options:', oldVal);
-		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-
-		dataRecom(newVal)
-	}, {
-		deep: true,
-		immediate: true
-	});
-	watch(() => props.gradeTerm, (newVal, oldVal) => {
-		//	console.log('New options:', newVal);
-		//	console.log('Old options:', oldVal);
-		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-		gradeTerm.value = newVal
-
-	}, {
-		deep: true,
-		immediate: true
-	});
-</script>
-
-<style>
-
-</style>

+ 0 - 239
pages/study/product/shuxueNew.vue

@@ -1,239 +0,0 @@
-<template>
-	<view class="ezy-study-page ezy-jstx-study-page">
-		<view class="study-school-year" @click="clickGradeTerm">{{gradeTerm}}</view>
-		<view class="ezy-study-wrap">
-			<img class="study-name-img" :src="growthImg"/>
-			<view>
-				<!-- 小岛 -->
-				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
-					@click="listClick(item, index,options)" :class="getClass(options,index,isVip,item)">
-					<view v-if="isVip === 'VIP'">
-						<!-- 序号 -->
-						<view class="brand-icon" v-if="item.studyFlag===0">{{ item.number }}</view>
-						<!-- 星星 -->
-						<view class="brand-finish-icon" v-if="item.studyFlag===1"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag &&animalNum == index" class="brand-arrow"></view>
-						<!-- 节名称 -->
-						<view class="brand-content"><text>{{ item.jieName }}</text></view>
-					</view>
-					<view v-if="isVip == 'Not-Vip'">
-						<!-- 序号 -->
-						<view  class="brand-icon">{{ item.number }} </view>
-						<!-- 锁 -->
-						<view v-if="item.firstFlag !=1" class="brand-lock"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag  &&  animalNum == index &&isVip != 'Visitor'" class="brand-arrow"> </view>
-						<!-- 节名称 -->
-						<view class="brand-content"><text>{{ item.jieName }}</text></view>
-					</view>
-					
-					
-					<view v-if="isVip == 'Visitor'">
-			
-						<view class="brand-icon">{{ item.number }} </view>
-						<!-- 锁 -->
-						<view v-if="item.firstFlag !=1" class="brand-lock"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag  &&  animalNum == index &&isVip != 'Visitor'" class="brand-arrow"> </view>
-						<!-- 节名称 -->
-						<view class="brand-content"><text>{{ item.jieName }}</text></view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref,
-		watch,
-		getCurrentInstance,
-		onMounted,
-		nextTick
-	} from "vue";
-	import cacheManager from "@/utils/cacheManager.js";
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		onShow
-	} from '@dcloudio/uni-app';
-	const growthImg = ref(null);
-
-
-	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
-	const props = defineProps({
-		options: {
-			type: Object,
-		},
-		youkeImage: {
-			String: '',
-		},
-		gradeTerm: {
-			type: String,
-		},
-	})
-	onShow(() => {
-		growthImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : props.youkeImage;
-	})
-	const isVip = getUserIdentity();
-	console.log('isVip', isVip);
-	const gradeMapping = {
-		1: '一年级',
-		2: '二年级',
-		3: '三年级',
-		4: '四年级',
-		5: '五年级',
-		6: '六年级'
-	};
-
-	const termMapping = {
-		1: ' 数学',
-		2: ' 英语'
-	};
-
-	let startX = ref(0);
-	let isSliding = ref(false);
-	let endX = ref(0);
-	let gradeTerm = ref('');
-	let animalNum = ref(0);
-
-	function clickGradeTerm() {
-		$emit('clickGradeTerm');
-	}
-
-	function listClick(data, index, data2) {
-		data.daeFlag = true
-		nextTick(() => {
-			animalNum.value = index
-		})
-		setTimeout(() => {
-			$emit('listClick', data, data2, index);
-		}, 300)
-
-	}
-	// 获取章name
-	function getZhangName(data) {
-		if (data.length <= 9) {
-			return data
-		} else {
-			return getZhangContent(data);
-		}
-	}
-
-	// 章换行显示
-	function getZhangContent(data) {
-
-		let length = data.length;
-		// 初始将字符串平分成两半
-		let halfLength = Math.floor(length / 2);
-
-		// 插入换行符
-		let firstLine = data.slice(0, halfLength);
-		let secondLine = data.slice(halfLength);
-		//console.log(firstLine + '\n' + secondLine, 'firstLine + + secondLine');
-		return firstLine + '\n' + secondLine;
-	}
-
-	// 获取节class
-	function getClass(data, index, isVip,item) {
-		let brandActive = '';
-		if (isVip === 'VIP') {
-			brandActive = 'brand-active';
-		} else if (data.number == 1&&item.firstFlag==1 && isVip =='Not-Vip') {
-			brandActive = 'brand-active';
-		} else if (data.number == 1&&item.firstFlag==1 && isVip =='Visitor' &&item.type ==1) {
-			brandActive = 'brand-active';
-		} else {
-			brandActive = '';
-		}
-		return brandActive
-	}
-
-
-	function handleCheckCatalogue() {
-		$emit('handleCheckCatalogue');
-	}
-
-	function onTouchStart(event) {
-		console.log(event.touches.length);
-		isSliding.value = false
-		if (event.touches.length === 1) {
-			isSliding.value = true;
-			startX.value = event.touches[0].pageX;
-		} else {
-			isSliding.value = false;
-			event.preventDefault()
-			return
-		}
-	}
-
-	function onSwipeLeft(event) {
-		console.log('11111');
-		if (cacheManager.get('auth')) {
-			$emit('onLeft');
-		}
-	}
-
-	function onSwipeRight(event) {
-		console.log('22222');
-		console.log(cacheManager.get('auth'));
-		if (cacheManager.get('auth')) {
-			console.log('啊啊啊啊啊');
-			$emit('onRight');
-		}
-
-	}
-
-	function onTouchEnd(event) {
-		if (isSliding.value) {
-			const distanceX = event.changedTouches[0].clientX - startX.value
-			if (distanceX > 200) {
-				onSwipeLeft();
-			} else if (distanceX < -200) {
-				onSwipeRight();
-			}
-			isSliding.value = false
-		} else {
-			console.log('error');
-		}
-	}
-
-	function dataRecom(data) {
-
-		const index = data.jieList.findIndex(item => item.studyFlag == 0);
-
-		if (index !== -1) {
-			data.jieList[index].daeFlag = true;
-			animalNum.value = index
-		}
-	}
-	watch(() => props.options, (newVal, oldVal) => {
-		//	console.log('New options:', newVal);
-		//	console.log('Old options:', oldVal);
-		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-
-		dataRecom(newVal)
-	}, {
-		deep: true,
-		immediate: true
-	});
-	watch(() => props.gradeTerm, (newVal, oldVal) => {
-		//	console.log('New options:', newVal);
-		//	console.log('Old options:', oldVal);
-		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-		gradeTerm.value = newVal
-
-	}, {
-		deep: true,
-		immediate: true
-	});
-</script>
-
-<style>
-
-</style>

+ 0 - 246
pages/study/product/yingyu.vue

@@ -1,246 +0,0 @@
-<template>
-	<view class="ezy-study-page ezy-yingyu-study-page">
-		<view class="study-school-year" @click="clickGradeTerm">{{gradeTerm}}</view>
-		<view class="ezy-study-wrap" @touchstart="onTouchStart" @touchend="onTouchEnd">
-			<view @click="handleCheckCatalogue" class="chapter-title-box">{{options.zhangName}}</view>
-			<!-- 动物类型 -->
-			<view v-if="growthType!=null" :class="currentGrowth()"></view>
-			<view>
-				<!-- 小岛 -->
-				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
-					@click="listClick(item, index,options)" :class="getClass(options,index,isVip,item)">
-					<view v-if="isVip === 'VIP'">
-						<!-- 序号 -->
-						<view class="brand-icon">{{ item.number }}</view>
-						<!-- 星星 -->
-						<view class="brand-finish-icon" v-if="item.studyFlag===1"></view>
-						<!-- 箭头 -->
-						<view class="brand-arrow" v-if="item.daeFlag &&animalNum == index"></view>
-						<!-- 节名称 -->
-						<view class="brand-content">{{ item.jieName }}</view>
-					</view>
-					<view v-if="isVip == 'Not-Vip'">
-						<!-- 序号 -->
-						<view  class="brand-icon">{{ item.number }}
-						</view>
-						<view v-if="item.firstFlag !=1" class="brand-lock"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag  &&  animalNum == index && isVip != 'Visitor'" class="brand-arrow"></view>
-						<!-- 节名称 -->
-						<view class="brand-content"> {{ item.jieName }} </view>
-
-					</view>
-					<view v-if="isVip == 'Visitor'">
-						<!-- 锁 -->
-						<view  class="brand-icon">{{ item.number }} </view>
-						<!-- 锁 -->
-						<view  v-if="item.firstFlag !=1" class="brand-lock"></view>
-						<!-- 箭头 -->
-						<view v-if="item.daeFlag  &&  animalNum == index && isVip != 'Visitor'" class="brand-arrow"></view>
-						<!-- 节名称 -->
-						<view class="brand-content"> {{ item.jieName }} </view>
-					
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref,
-		watch,
-		getCurrentInstance,
-		nextTick,
-		onMounted
-	} from "vue";
-	import cacheManager from "@/utils/cacheManager.js";
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import {
-		onShow
-	} from '@dcloudio/uni-app';
-	const growthType = ref(null);
-
-	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
-	const props = defineProps({
-		options: {
-			type: Object,
-		},
-		youkeImage: {
-			String: '',
-		},
-		gradeTerm: {
-			type: String,
-		},
-	})
-	onShow(() => {
-		growthType.value = cacheManager.get('auth')?cacheManager.get('auth').growthType:props.youkeImage
-	})
-	const isVip = getUserIdentity();
-	console.log('isVip',isVip);
-	const gradeMapping = {
-		1: '一年级',
-		2: '二年级',
-		3: '三年级',
-		4: '四年级',
-		5: '五年级',
-		6: '六年级'
-	};
-
-	const termMapping = {
-		1: ' 数学',
-		2: ' 英语'
-	};
-
-	let startX = ref(0);
-	let isSliding = ref(false);
-	let endX = ref(0);
-	let gradeTerm = ref('');
-	let animalNum = ref(0);
-
-	function clickGradeTerm() {
-		$emit('clickGradeTerm');
-	}
-
-	function listClick(data,index,data2) {
-		data.daeFlag = true
-		nextTick(() => {
-			animalNum.value = index
-		})
-		setTimeout(() => {
-			$emit('listClick', data,data2,index);
-		}, 300)
-		
-	}
-
-	function currentGrowth(data) {
-		if (growthType.value == 0) {
-			return 'animal-img dan-img'
-		} else if (growthType.value == 1) {
-			return 'animal-img xiao-e-img'
-		} else if (growthType.value == 2) {
-			return 'animal-img zhong-e-img'
-		} else {
-			return 'animal-img da-e-img'
-		}
-	}
-	// 章换行显示
-	function getZhangContent(data) {
-		console.log(data.length, 'data.length');
-		let length = data.length;
-		// 初始将字符串平分成两半
-		let halfLength = Math.floor(length / 2);
-
-		// 插入换行符
-		let firstLine = data.slice(0, halfLength);
-		let secondLine = data.slice(halfLength);
-		console.log(firstLine + '\n' + secondLine, 'firstLine + + secondLine');
-		return firstLine + '\n' + secondLine;
-	}
-
-	// 获取节class
-	function getClass(data, index, isVip,item) {
-	
-		let brandActive = '';
-		if (isVip === 'VIP') {
-			brandActive = 'brand-active';
-		} else if (item.firstFlag == 1 && isVip =='Not-Vip') {
-			brandActive = 'brand-active';
-		}else if (item.firstFlag == 1 && isVip =='Visitor' &&item.type ==1){
-			brandActive = 'brand-active';
-		} else {
-			brandActive = '';
-		}
-		let indexLast = data.jieList.length - 1;
-		// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
-		if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
-			return 'ceshi-brand-item' + ' ' + brandActive;
-		} else {
-			return brandActive;
-		}
-	}
-
-	function handleCheckCatalogue() {
-		$emit('handleCheckCatalogue');
-	}
-
-	function onTouchStart(event) {
-		console.log(event.touches.length);
-		isSliding.value = false
-		if (event.touches.length === 1) {
-			isSliding.value = true;
-			startX.value = event.touches[0].pageX;
-		} else {
-			isSliding.value = false;
-			event.preventDefault()
-			return
-		}
-	}
-
-	function onSwipeLeft(event) {
-		console.log('11111');
-		if (cacheManager.get('auth')) {
-			$emit('onLeft');
-		}
-	}
-
-	function onSwipeRight(event) {
-		console.log('22222');
-		if (cacheManager.get('auth')) {
-			$emit('onRight');
-		}
-
-	}
-
-	function onTouchEnd(event) {
-		if (isSliding.value) {
-			const distanceX = event.changedTouches[0].clientX - startX.value
-			if (distanceX > 0) {
-				onSwipeLeft();
-			} else if (distanceX < 0) {
-				onSwipeRight();
-			}
-			isSliding.value = false
-		} else {
-			console.log('error');
-		}
-	}
-
-	function dataRecom(data) {
-		const index = data.jieList.findIndex(item => item.studyFlag == 0);
-
-		if (index !== -1) {
-			data.jieList[index].daeFlag = true;
-			animalNum.value = index
-		}
-	}
-	watch(() => props.options, (newVal, oldVal) => {
-		//	console.log('New options:', newVal);
-		//	console.log('Old options:', oldVal);
-		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-
-		dataRecom(newVal)
-	}, {
-		deep: true,
-		immediate: true
-	});
-	watch(() => props.gradeTerm, (newVal, oldVal) => {
-		//	console.log('New options:', newVal);
-		//	console.log('Old options:', oldVal);
-		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-		gradeTerm.value = newVal
-
-	}, {
-		deep: true,
-		immediate: true
-	});
-</script>
-
-<style>
-
-</style>

+ 0 - 55
pages/study/svipDialog.vue

@@ -1,55 +0,0 @@
-<!-- 中弹窗 二行文字 -->
-<template>
-	<uni-popup ref="svipPopup" :animation="false" :is-mask-click="false"
-	 mask-background-color="rgba(255, 255, 255, 0.6);">
-	 <view class="ezy-svip-dialog">
-		<view class="tip-content-box">
-		
-			<icon :class="'svip-img'+cardId"></icon>
-			<view class="tip-content">开通SVIP会员解锁学习关卡</view>
-			<view class="tip-btn-box">
-				<view class="not-confirm-btn" @click="handleClose"></view>
-				<view class="confirm-btn" @click="confirmBtn"></view>
-			</view>
-		</view>
-	 </view>
-	</uni-popup>
-</template>
-
-<script setup>
-	import { ref } from 'vue';
-	import cacheManager from "@/utils/cacheManager.js";
-	const props = defineProps({
-	  title: {
-	    type: String,
-	    default: '提示'
-	  },
-	  content: {
-	    type: String,
-		require: true,
-	    default: ''
-	  },
-	});
-	const cardId =cacheManager.get('auth').cardId
-	const svipPopup = ref(null); // 索引
-	const $emit = defineEmits(['confirm-btn'])
-	// 打开弹窗
-	function handleShow() {
-		svipPopup.value.open();
-	}
-	// 取消
-	function handleClose() {
-		svipPopup.value.close();
-	}
-	// 确认
-	function confirmBtn(){
-		$emit('confirm-btn');
-		svipPopup.value.close();
-	}
-	defineExpose({
-			handleShow
-		})
-</script>
-
-<style>
-</style>

+ 0 - 55
pages/test/test.vue

@@ -1,55 +0,0 @@
-<template>
-	<view>
-		<view>试题1:</view>
-		<yingyu v-if="qa" :question="qa" :placeholders="qa.placeholders"></yingyu>
-		<hr>
-		<view>试题2:</view>
-		<yingyu v-if="qa2" :question="qa2" :placeholders="qa2.placeholders"></yingyu>
-	</view>
-	<!-- <mtaRadio></mtaRadio> -->
-</template>
-
-<script setup>
-	import yingyu from '@/components/question/yingyu/danxuan.vue'
-	import mtaRadio from '@/components/question/yingyu/mtaRadio.vue'
-	import {
-		onLoad
-	} from "@dcloudio/uni-app"
-	import {
-		catchError,
-		toast
-	} from "@/utils/common.js"
-	import {
-		ref
-	} from "vue"
-
-	const qa = ref({
-		answer: "1111",
-		jiangjie: "1111",
-		name: "这是文本区域 Hello [radio1] 哈哈,你看到 World [radio2] 就是音频,听我说 Good [radio3]。",
-		optList: [
-			"string"
-		],
-		result: 0,
-		stId: 0,
-		type: 5,
-		placeholders: ['[radio1]','[radio2]','[radio3]']
-	})
-	const qa2 = ref({
-		answer: "1111",
-		jiangjie: "1111",
-		name: "这是文本区域 Yes [radio1]哈哈,你看到 No [radio2]就是音频,听我说 So [radio3]。",
-		optList: [
-			"string"
-		],
-		result: 0,
-		stId: 1,
-		type: 5,
-		placeholders: ['[radio1]','[radio2]','[radio3]']
-	})
-
-</script>
-
-<style>
-
-</style>

+ 0 - 182
pages/unitTest/index.vue

@@ -1,182 +0,0 @@
-<template>
-	<view class="ezy-exam-page" :style="{backgroundImage: 'url(' + courseBjFun() + ')'}">
-		<view class="ezy-navBar-box">
-			<view @click="handleBack" class="nav-bar-icon"></view>
-			<text class="nav-bar-title">单元测试</text>
-			<view class="nav-bar-other"><text class="key-note">{{current+1}}</text>/<text>{{total}}</text></view>
-		</view>
-		<view class="shiti-frame-box">
-			<w-swiper :list="list" :current="current" class="ezy-exam-swiper" @change="onSwiperChange">
-				<template v-slot:default="{item}">
-					<view class="body" v-if="item.mta_show">
-						<danxuan :question="item" v-if="item.type == '1'"></danxuan>
-						<panduan :question="item" v-if="item.type == '2'"></panduan>
-						<tiankong :question="item" v-if="item.type == '3'" :placeholders="item.placeholders"></tiankong>
-						<yingyuDanxuan :question="item" v-if="item.type == '4'" :placeholders="item.placeholders">
-						</yingyuDanxuan>
-					</view>
-				</template>
-			</w-swiper>
-			<view class="exam-submit-btn" v-if="current === list.length-1" @click="handleSubmit(uniPointsRef)"></view>
-		</view>
-
-		<!--  左右滑动  -->
-		<view class="tip-mask-box" @click="handleCloseTishi" v-if="showTishi">
-			<view class="exam-tip-box">左右滑动查看更多题目</view>
-		</view>
-
-
-		<!-- 答卷 -->
-		<chengji ref="chengjiRef" :list="list" @back="handleBack" :cardId="cardId"></chengji>
-		<!-- 分数弹窗 -->
-		<uniPointsVue ref="uniPointsRef" @checkAnswer="checkAnswer" @goStudy="goStudyContinue" :isLastZhang="!!haveFlag"
-			:studyFlag="studyFlag"></uniPointsVue>
-		<!-- 填空 -->
-		<FillItem :value="result" ref="popupRef" @blur="onBlur"></FillItem>
-
-	</view>
-
-</template>
-
-<script setup>
-	import mtaRadio from '@/components/question/yingyu/mtaRadio.vue'
-	import FillItem from "@/components/question/FillItem.vue";
-	import wSwiper from '@/components/wSwiper/wSwiper.vue';
-	import danxuan from "@/components/question/danxuan.vue";
-	import panduan from "@/components/question/panduan.vue";
-	import tiankong from "@/components/question/tiankong.vue";
-	import yingyuDanxuan from "@/components/question/yingyu/danxuan.vue";
-	import chengji from "@/components/chengji/chengji.vue";
-	import uniPointsVue from '@/components/points/uni-points.vue';
-	import * as httpUnit from "@/api/unitTest.js"
-	import {
-		catchError,
-	} from "@/utils/common.js"
-	import {
-		useExam
-	} from './useUnit';
-	import {
-		ref,
-		reactive
-	} from "vue";
-	import cacheManager from "@/utils/cacheManager";
-	import {
-		onLoad
-	} from "@dcloudio/uni-app"
-
-	const {
-		count,
-		total,
-		current,
-		list,
-		rightAnswer,
-		wrongAnswer,
-		jifen,
-		zhangId,
-		jieId,
-		nianji,
-		studyFlag,
-		xueke,
-		showTishi,
-		haveFlag,
-		activeZhang,
-		handleSubmit,
-		initPage,
-		handleCloseTishi
-	} = useExam();
-	const cardId = Number(cacheManager.get('auth').cardId);
-
-	const uniPointsRef = ref(null);
-	const chengjiRef = ref(null);
-	const popupRef = ref(null);
-	const result = ref('');
-	const curTiankong = ref(null);
-	function getPopupRef() {
-		return popupRef.value;
-	}
-	onLoad(() => {
-		uni.$on('tiankong-fillItem', (val) => {
-			const {
-				index,
-				question
-			} = val;
-			curTiankong.value = val;
-			result.value = question.reply[index];
-			const dom = getPopupRef();
-			dom && dom.showPopup();
-		})
-
-	})
-
-	function onBlur({
-		result
-	}) {
-		if (curTiankong.value) {
-			uni.$emit('tiankong-setResult', {
-				index: curTiankong.value.index,
-				stId: curTiankong.value.question.stId,
-				result
-			});
-		}
-		const dom = getPopupRef();
-		dom && dom.handleClear();
-	}
-
-	// 查看答案
-	function checkAnswer() {
-		chengjiRef.value.showPopup();
-	}
-	// 继续学习
-	async function goStudyContinue() {
-		const list = cacheManager.get('zhangInfo').zhangList;
-		// 设置 从单元测试 到 岛 的路由参数
-		activeZhang.value.nextZhang ? activeZhang.value.nextZhang.zhangId : null;
-		cacheManager.updateObject('auth', {
-			currentZhang: list.findIndex(item => item.zhangId == activeZhang.value.nextZhang.zhangId),
-			zhangId: activeZhang.value.nextZhang.zhangId
-		})
-		uni.redirectTo({
-			url: `/pages/study/index`
-		})
-	}
-
-	function handleBack() {
-		// 数学
-		uni.redirectTo({
-			url: `/pages/study/index`
-		})
-		uni.$emit('back-outpage')
-	}
-
-	function onSwiperChange(index) {
-		current.value = index;
-		uni.$emit('swiper-change', index)
-	}
-
-	function courseBjFun() {
-		switch (cardId) {
-			case 1:
-				return 'static/images/course/couse-shuxue-bj.png'
-				break;
-			case 2:
-				return 'static/images/course/course-yingyu-bj.png'
-				break;
-			default:
-				break;
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.swiper-box {
-		height: 200px;
-	}
-
-	.swiper-item {
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		height: 200px;
-	}
-</style>

+ 0 - 262
pages/unitTest/useUnit.js

@@ -1,262 +0,0 @@
-import {
-	onLoad,
-	onReady,
-} from "@dcloudio/uni-app"
-import {
-	reactive,
-	ref,
-	computed,
-	toRefs,
-	onMounted,
-	watch,
-	nextTick
-} from "vue";
-import {
-	catchError,
-	toast
-} from "@/utils/common.js"
-import * as httpUnit from "@/api/unitTest.js"
-import cacheManager, {
-	useUnitTestTishi
-} from "@/utils/cacheManager.js"
-
-
-function useJifen() {
-	const data = reactive({
-		rightAnswer: 0, // 答对
-		wrongAnswer: 0, // 答错
-		jifen: 0, // 积分
-	})
-
-	function updateJifen({
-		rightAnswer,
-		wrongAnswer,
-		jifen
-	}) {
-		data.rightAnswer = rightAnswer;
-		data.wrongAnswer = wrongAnswer;
-		data.jifen = jifen;
-	}
-
-	return {
-		...toRefs(data),
-		updateJifen
-	}
-}
-
-export function useExam() {
-	// 缓存
-
-	const {
-		showTishi,
-		handleCloseTishi,
-		handleShowTishi
-	} = useTishiLeftRight()
-	const {
-		rightAnswer,
-		wrongAnswer,
-		jifen,
-		updateJifen
-	} = useJifen();
-
-
-	const data = reactive({
-		count: 0, // 已答题数
-		total: 0, // 总题数
-		current: 0, // 当前试题序列
-		list: [], // 试题列表
-		jieId: null, // 节Id
-		zhangId: null,
-		haveFlag: false, // 是否有下一章
-		activeZhang: null,
-		studyFlag: 0, // 是否是第一次答题
-	})
-	onLoad((options) => {
-		const jieId = options.jieId
-		const cacheZhangInfo = cacheManager.get('zhangInfo');
-		const {
-			cardId,
-			zhangId,
-			nianji
-		} = cacheManager.get('auth');
-
-		data.jieId = jieId; // 需要路由参数 节Id
-		data.zhangId = zhangId; // 需要路由参数 章Id
-		data.activeZhang = getZhangInfoByJieId(cacheZhangInfo.zhangList,jieId);
-		data.haveFlag = data.activeZhang.curZhang ? data.activeZhang.curZhang.haveFlag: 0;
-		data.studyFlag = data.activeZhang.curZhang ? data.activeZhang.curZhang.jieList[data.activeZhang.curZhang.jieList.length-1].studyFlag: 0;
-		// 初始化页面数据
-		initPage();
-	})
-
-	watch(() => data.list, (val) => {
-		const list = data.list.filter(item => {
-			if (item.type == 3) {
-				// 填空题 所有试题答完
-				return !item.reply.some(citem => citem.trim() == '');
-			} else {
-				return item.reply !== null
-			}
-		});
-		data.count = list.length;
-	}, {
-		deep: true
-	})
-
-
-	// 初始化页面数据
-	async function initPage() {
-		const [err, cdata] = await catchError(httpUnit.getExamData({
-			jieId: data.jieId
-		}));
-		if (err) {
-			toast("单元测试数据获取异常");
-			return;
-		}
-		refreshExam(cdata);
-	}
-
-	function formatListToUse(list) {
-		list.forEach((item, index) => {
-			item.mta_show = false;
-			item.reply = null;
-			if (item.type == 3) {
-				item.result = JSON.parse(item.result);
-				item.placeholders = item.result.map((item, cindex) => `[bank${cindex+1}]`)
-				item.reply = item.reply ? JSON.parse(item.reply): item.result.map(() => '');
-			}
-			
-			if (item.type == 4) {
-				// 特殊题型英语题
-				const audioList = item.audios ? item.audios.split(',') : [];
-				item.placeholders = audioList.map((item, cindex) => `[yingyu${cindex+1}]`)
-				item.audioList = audioList;
-			}
-		})
-	}
-	
-	
-
-	// 数据赋值
-	function refreshExam(list) {
-		const cList = list;
-		formatListToUse(cList)
-		data.list = cList;
-		data.total = cList.length;
-
-		handleShowTishi();
-	}
-
-	// 交卷
-	async function handleSubmit(dom) {
-		uni.$emit('unitTest-submit')
-		const result = [];
-		data.list.forEach(item => {
-			if (item.type == 1) {
-				result.push({
-					reply: item.reply,
-					stId: item.stId
-				})
-			} else if (item.type == 2) {
-				result.push({
-					reply: item.reply ,
-					stId: item.stId
-				})
-			} else if (item.type ==3){
-				result.push({
-					reply: item.reply ? JSON.stringify(item.reply) : '',
-					stId: item.stId
-				})
-			} else if (item.type == 4) {
-				result.push({
-					reply: item.reply,
-					stId: item.stId
-				})
-			}
-		
-		})
-		uni.showLoading({
-			title: '交卷中...'
-		});
-		const [error, cdata] = await catchError(httpUnit.getExamSubmit({
-			jieId: data.jieId,
-			shitiList: result
-		}));
-		uni.hideLoading()
-		if (error) {
-			toast("单元测试数据提交异常");
-			return;
-		}
-		
-		const cacheCurrentZhangIndex = cacheManager.get('auth').currentZhang;
-		cacheManager.updateJieStatus('zhangInfo', cacheCurrentZhangIndex, data.jieId);
-		
-		dom.showPopup({
-			right: cdata.dui,
-			wrong: cdata.cuo,
-			jifen: cdata.jifen
-		});
-	}
-
-
-
-	return {
-		...toRefs(data),
-		rightAnswer,
-		wrongAnswer,
-		jifen,
-		showTishi,
-
-		handleSubmit,
-		initPage,
-		handleCloseTishi,
-		handleShowTishi
-	}
-}
-
-// 提示信息显示隐藏
-function useTishiLeftRight() {
-	let timer = null;
-	const {
-		updateTishi,
-		getTishi
-	} = useUnitTestTishi();
-	const showTishi = ref(false);
-	// 大鹅关闭追加缓存 --- 单独针对当前手机的缓存提示
-	function handleCloseTishi() {
-		updateTishi();
-		showTishi.value = false;
-		clearTimeout(timer);
-		timer = null;
-	}
-	// 大鹅显示追加缓存 --- 单独针对当前手机的缓存提示
-	function handleShowTishi() {
-		const isNotShow = Boolean(getTishi());
-		showTishi.value = !isNotShow;
-		timer = setTimeout(() => {
-			handleCloseTishi();
-		},3000)
-	}
-
-	return {
-		showTishi,
-		handleCloseTishi,
-		handleShowTishi
-	}
-}
-
-function getZhangInfoByJieId(list, jieId) {
-	const curZhang = list.find(item => item.jieList.some(cite => cite.jieId == jieId)) || null;
-	let nextZhang = null;
-	if (curZhang) {
-		const nextIndex = list.findIndex(item => curZhang.zhangId == item.zhangId);
-		if (nextIndex+1<list.length) {
-			nextZhang = list[nextIndex+1];
-		}
-	}
-	return {
-		curZhang,
-		nextZhang
-	};
-
-}

+ 0 - 332
pages/wrong/index.vue

@@ -1,332 +0,0 @@
-<template>
-	<view class="ezy-cuoti-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-tab-border">
-			<uni-segmented-control :current="data.current" :values="data.items" active-color="#3A7FE9"
-				@clickItem="onChangeTab" class="ezy-tab-box" />
-			<view class="cuoti-content-box">
-				<view v-if="data.current === 0">
-					<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.shuxue.loading"
-						:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
-						class="cuoti-scroll-view">
-						<!--数学-->
-						<uni-list>
-							<uni-list-item v-for="item in data.shuxue.list" class="list-item-box">
-								<template v-slot:body>
-									<!-- 时间 -->
-									<view class="item-date-row">
-										<icon class="data-icon"></icon>
-										<text>{{ item.cdate }}</text>
-									</view>
-									<!-- 数量 -->
-									<view class="item-cuoti-row">
-										<icon class="cuoti-icon"></icon>
-										<view class="cuoti-content">错题数:<text
-												class="cuoti-text">{{ item.count }}</text>题</view>
-									</view>
-									<view @click="getCuotiData(item)" class="cuoti-btn">查看错题</view>
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="data.shuxue.state" @click="getMore(0)"
-								:contentText="data.shuxue.contentText"></uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-				<view v-if="data.current === 1">
-					<scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="data.yingyu.loading"
-						:refresher-threshold="50" refresher-background="transparent" @refresherrefresh="onRefresh"
-						class="cuoti-scroll-view">
-						<!--英语-->
-						<uni-list>
-							<uni-list-item v-for="item in data.yingyu.list" class="list-item-box">
-								<template v-slot:body>
-									<!-- 时间 -->
-									<view class="item-date-row">
-										<icon class="data-icon"></icon>
-										<text>{{ item.cdate }}</text>
-									</view>
-									<!-- 数量 -->
-									<view class="item-cuoti-row">
-										<icon class="cuoti-icon"></icon>
-										<view class="cuoti-content">错题数:<text
-												class="cuoti-text">{{ item.count }}</text>题</view>
-									</view>
-									<view @click="getCuotiData(item)" class="cuoti-btn">查看错题</view>
-								</template>
-							</uni-list-item>
-							<uni-load-more :status="data.yingyu.state" @click="getMore(1)"
-								:contentText="data.yingyu.contentText"></uni-load-more>
-						</uni-list>
-					</scroll-view>
-				</view>
-			</view>
-		</view>
-
-		<cuoti ref="wrongRef" :subjectId="subjectId" :list="data.wrongList" @back="handleBackFromCuoti"></cuoti>
-		<CustomTabBar></CustomTabBar>
-	</view>
-</template>
-
-<script setup>
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import {
-		getWrongData
-	} from "@/api/wrong";
-	import {
-		onLoad
-	} from "@dcloudio/uni-app";
-	import cuoti from "@/components/chengji/chengji.vue";
-	import {
-		getWrongInfo
-	} from "@/api/wrong";
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-
-	const zhangId = ref(null);
-	const nianji = ref(null);
-	const subjectId = ref(null);
-
-	const wrongRef = ref(null);
-
-	const data = reactive({
-		items: ['数学', '英语'],
-		current: 0,
-		shuxue: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-
-		},
-		yingyu: {
-			page: 0,
-			list: [],
-			loading: false,
-			state: 'more',
-			contentText: {
-				contentdown: '查看更多',
-				contentrefresh: '加载中',
-				contentnomore: '没有更多'
-			}
-		},
-		wrongList: [],
-	})
-	subjectId.value = data.current+1;
-	function handleBack() {
-		uni.redirectTo({
-			url: '/pages/my/index'
-		})
-		uni.$emit('back-outpage')
-	}
-
-	function handleBackFromCuoti() {
-		wrongRef.value.closePopup();
-		uni.$emit('back-outpage')
-	}
-
-	function onChangeTab(e) {
-		if (data.current !== e.currentIndex) {
-			data.current = e.currentIndex;
-			subjectId.value = data.current+1;
-			if (data.current == 0) {
-				data.shuxue.page = 0
-			} else if (data.current == 1) {
-				data.yingyu.page = 0
-			}
-			refreshData(data.current);
-		}
-	}
-
-	function refreshData(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			subjectId: data.current + 1 // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-			data.shuxue.list = [];
-			// 数学
-			data.shuxue.state = 'loading';
-			data.shuxue.page++;
-			opt.page = data.shuxue.page;
-		} else if (code == 1) {
-			data.yingyu.list = [];
-			// 英语
-			data.yingyu.state = 'loading';
-			data.yingyu.page++;
-			opt.page = data.yingyu.page;
-		}
-		getWrongData(opt).then(res => {
-			if (code == 0) {
-				data.shuxue.list = data.shuxue.list.concat(res.data.data);
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				data.yingyu.list = data.yingyu.list.concat(res.data.data);
-				data.yingyu.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > data.shuxue.list.length) {
-					// 数学
-					data.shuxue.state = 'more';
-					data.shuxue.loading = false;
-				} else {
-					// 数学
-					data.shuxue.state = 'no-more';
-					data.shuxue.loading = false;
-				
-				}
-			} else if (code == 1) {
-				if (res.data.total > data.yingyu.list.length) {
-					// 英语
-					data.yingyu.state = 'more';
-					data.yingyu.loading = false;
-				} else {
-					// 英语
-					data.yingyu.state = 'no-more';
-					data.yingyu.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				data.shuxue.state = 'more';
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				// 英语
-				data.yingyu.state = 'more';
-				data.yingyu.loading = false;
-			}
-		})
-	}
-
-	function getMore(code) {
-		const opt = {
-			page: 1,
-			size: 10, // 固定查询10条
-			subjectId: data.current + 1 // 前台索引加1为学科cardId
-		}
-
-		if (code == 0) {
-			if (data.shuxue.state == 'no-more') return;
-			// 数学
-			data.shuxue.state = 'loading';
-			data.shuxue.page++;
-			opt.page = data.shuxue.page;
-		} else if (code == 1) {
-			// 英语
-			if (data.yingyu.state == 'no-more') return;
-			data.yingyu.state = 'loading';
-			data.yingyu.page++;
-			opt.page = data.yingyu.page;
-		}
-		getWrongData(opt).then(res => {
-			if (code == 0) {
-				data.shuxue.list = data.shuxue.list.concat(res.data.data);
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				data.yingyu.list = data.yingyu.list.concat(res.data.data);
-				data.yingyu.loading = false;
-			}
-			if (code == 0) {
-				if (res.data.total > data.shuxue.list.length) {
-					// 数学
-					data.shuxue.state = 'more';
-					data.shuxue.state_text = '加载更多';
-					data.shuxue.loading = false;
-				} else {
-					// 数学
-					data.shuxue.state = 'no-more';
-					data.shuxue.state_text = '没有更多啦';
-				
-					data.shuxue.loading = false;
-				}
-			} else if (code == 1) {
-				if (res.data.total > data.yingyu.list.length) {
-					// 英语
-					data.yingyu.state = 'more';
-					data.yingyu.state_text = '加载更多';
-					data.yingyu.loading = false;
-				} else {
-					// 英语
-					data.yingyu.state = 'no-more';
-					data.yingyu.state_text = '没有更多啦';
-			
-					data.yingyu.loading = false;
-				}
-			}
-		}).catch(err => {
-			if (code == 0) {
-				// 数学
-				data.shuxue.state = 'more';
-				data.shuxue.state_text = '加载更多';
-				data.shuxue.loading = false;
-			} else if (code == 1) {
-				// 英语
-				data.yingyu.state = 'more';
-				data.yingyu.state_text = '加载更多';
-				data.yingyu.loading = false;
-			}
-		})
-	}
-
-	function formatListToUse(list) {
-		list.forEach((item, index) => {
-			item.mta_show = false;
-			if (item.type == 3) {
-				item.result = JSON.parse(item.result);
-				item.placeholders = item.result.map((item, cindex) => `[bank${cindex+1}]`)
-				item.reply = item.reply ? JSON.parse(item.reply) : item.result.map(() => '');
-			}
-
-      if (item.type == 4) {
-        // 特殊题型英语题
-        const audioList = item.audios ? item.audios.split(',') : [];
-        item.placeholders = audioList.map((item, cindex) => `[yingyu${cindex+1}]`)
-        item.audioList = audioList;
-      }
-		})
-	}
-
-	function getCuotiData(item) {
-		getWrongInfo({
-			subjectId: data.current + 1,
-			cdate: item.cdate
-		}).then(res => {
-			formatListToUse(res.data)
-			data.wrongList = res.data;
-			wrongRef.value.showPopup();
-		})
-	}
-
-	function onRefresh() {
-		if (data.current == 0) {
-			data.shuxue.page = 0;
-			data.shuxue.list = [];
-			data.shuxue.loading = true;
-		} else if (data.current == 1) {
-			data.yingyu.page = 0;
-			data.yingyu.list = [];
-			data.yingyu.loading = true;
-		}
-		refreshData(data.current);
-	}
-
-	onLoad(() => {
-		getMore(data.current);
-	})
-</script>
-
-<style>
-
-</style>

+ 0 - 112
pages/zhuanti/index.vue

@@ -1,112 +0,0 @@
-<template>
-	<view class="ezy-zhuanti-page">
-		<view class="zt-qipao-box">
-			<!-- wgy看这↓ 如果是游客的话不显示text标签内容-->
-			<view>寻觅者<text>"小小同学"</text></view>
-			<view>形容一下你的心情吧?</view>
-		</view>
-		<view class="zt-biaoqing-box">
-			<view v-for="(item,index) in biaoqingList" :key="index" @click="goZhuantiInfo(item)"
-				class="biaoqing-item-box"></view>
-		</view>
-		<CustomTabBar :currentTabNumber="1" :levelId="levelId"  :typeId="typeId" :subjectId="subjectId" :tipFlag='tipFlag' ></CustomTabBar>
-		<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
-	</view>
-
-</template>
-
-<script setup>
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from '@/utils/cacheManager.js';
-		import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
-	import {
-
-	} from '@/api/zhuanti.js'
-
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import {
-		reactive,
-		ref
-	} from "vue";
-	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-	const youkeFlag = ref(null);
-	const yhName = ref(null);
-	const youkeDialogRef = ref(null);
-	const subjectId = ref(null); //游客使用
-	const typeId = ref(null); //游客使用
-	const levelId = ref(null); //游客使用
-	const tipFlag = ref(null); //游客使用
-	let routerOpt = ref(false);
-	const biaoqingList = ref(
-		[{
-				name: '开心',
-				type: 1
-			},
-			{
-				name: '愤怒',
-				type: 2
-			},
-			{
-				name: '悲伤',
-				type: 3
-			},
-			{
-				name: '害怕',
-				type: 4
-			},
-			{
-				name: '得意',
-				type: 5
-			},
-			{
-				name: '嫉妒',
-				type: 6
-			},
-			{
-				name: '压抑',
-				type: 7
-			},
-			{
-				name: '抱怨',
-				type: 8
-			}
-		]
-
-	)
-	onLoad((options) => {
-		if (cacheManager.get('auth')) {
-			youkeFlag.value = true
-			yhName.value = cacheManager.get('auth').realName || ''
-		} else {
-			// 游客
-			routerOpt = options;
-			levelId.value = routerOpt.levelId
-			typeId.value = routerOpt.typeId
-			subjectId.value = routerOpt.subjectId
-			tipFlag.value = routerOpt.tipFlag
-			youkeFlag.value = false
-		}
-	})
-	// 游客弹窗---确定
-	function ykConfirm() {
-		uni.redirectTo({
-			url: '/pages/login/index'
-		});
-	}
-
-	function goZhuantiInfo(data) {
-		console.log('data', data);
-		if (!youkeFlag.value) {
-			youkeDialogRef.value.handleShow();
-			return false
-		}
-		uni.redirectTo({
-			url: '/pages/zhuanti/zhuantiInfo?type=' + data.type
-		})
-	}
-</script>

+ 0 - 272
pages/zhuanti/zhuantiInfo.vue

@@ -1,272 +0,0 @@
-<template>
-	<view class="ezy-biaoqing-page">
-		<view class="ezy-nav-bar-icon" @click="goUpPage"></view>
-		<view class="biaoqing-bj-box" :class="'biaoqing-bj'+ type">
-			<view v-for="(item, index) in bubbles" :key="index" class="qipao-item-box"
-				:class="{ 'qipao-item-disabled': item.disabled }" @click="qipaoBtn(index)">
-				<view v-if="item.showFlag ==1">
-					<view :class="item.iconType"></view>
-					<view class="show-biaoqing-icon"></view>
-					<view class="qipao-text-row">
-						<text>可扎破</text>
-						<icon class="shou-icon"></icon>
-					</view>
-				</view>
-
-			</view>
-			<view class="biaoqing-img"></view>
-		</view>
-		<view :class="maikeType">
-			<view class="maike-box" @touchstart="handleTouchStart" @touchend="handleTouchEnd"
-				@touchcancel="handleTouchCancel" @touchmove="handleTouchMove">
-				<icon class="maike-icon"></icon>
-			</view>
-			<text class="maike-text" v-if="maikeType =='maike-anzhu'">{{ buttonText }}</text>
-			<text class="maike-text" v-if="maikeType =='maike-songkai'">{{ buttonText }}</text>
-		</view>
-
-		<CustomTabBar :currentTabNumber="1"></CustomTabBar>
-	</view>
-
-</template>
-
-<script setup>
-	import {
-		toast,
-		getUserIdentity
-	} from "@/utils/common";
-	import cacheManager from '@/utils/cacheManager.js';
-	import {
-		moodAdd,
-		moodLess,
-		moodSize
-	} from '@/api/zhuanti.js'
-	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
-	import {
-		reactive,
-		ref,
-		computed,
-		onBeforeUnmount
-	} from "vue";
-	import {
-		onLoad
-	} from '@dcloudio/uni-app';
-	const maikeType = ref('maike-anzhu');
-	// 定义气泡数据状态
-	// const bubbles = reactive(
-	// 	// Array.from({
-	// 	// 	length: 5
-	// 	// }, () => ({
-	// 	// 	disabled: false, // 是否破裂
-	// 	// 	iconType: "qipao-mask", //mask
-	// 	// }))
-	// );
-	let bubbles = ref([])
-	const type = ref(null);
-	const audioContext = ref(null);
-	const audioPath = '/static/mp3/zhuanti/qipao.mp3';
-	const isPlaying = ref(false);
-	const showIcon = ref(null);
-	const isPressing = ref(false); // 是否正在按压
-	const isCancelled = ref(false); // 是否已取消
-	const touchPos = ref({
-		x: 0,
-		y: 0
-	}); // 触摸位置
-	onLoad((options) => {
-		console.log('opt', options);
-		type.value = options.type
-		getSize()
-		initAudio()
-	})
-
-	function initAudio() {
-		audioContext.value = uni.createInnerAudioContext();
-		audioContext.value.src = audioPath;
-		// 设置事件监听
-		audioContext.value.onPlay(() => {
-			console.log('开始播放');
-			isPlaying.value = true;
-		});
-
-		audioContext.value.onPause(() => {
-			console.log('暂停播放');
-			isPlaying.value = false;
-		});
-
-		audioContext.value.onStop(() => {
-			console.log('停止播放');
-			isPlaying.value = false;
-		});
-
-		audioContext.value.onError((err) => {
-			console.error('播放错误:', err);
-			isPlaying.value = false;
-			uni.showToast({
-				title: '播放失败',
-				icon: 'none'
-			});
-		});
-	}
-
-	function getSize() {
-		moodSize({
-			type: type.value
-		}).then(res => {
-			if (res.code == 0) {
-				bubbles.value = Array.from({
-					length: Number(res.data)
-				}, () => ({
-					disabled: false,
-					iconType: "qipao-mask",
-					showFlag: "1",
-				}));
-			} else {
-				toast("查询数量失败")
-				return false
-			}
-
-		})
-	}
-	// 点击气泡
-	function qipaoBtn(index) {
-
-		moodLess({
-			type: type.value
-		}).then(res => {
-			if (res.code == 0) {
-
-				if (isPlaying.value) {
-					audioContext.value.stop();
-				} else {
-					audioContext.value.play(); // 开始播放
-				}
-				bubbles.value[index].disabled = true;
-				bubbles.value[index].iconType = "polie-qipao-mask";
-				setTimeout(() => {
-					bubbles.value[index] = {};
-				}, 200)
-
-				// setTimeout(() => {
-				// 	bubbles.value.splice(index, 1)
-				// }, 1000)
-			} else {
-				toast("戳破气泡失败!")
-				return false
-			}
-		})
-		// wgy看这↓ 在这里播放mp3,时间一秒及删除接口
-	}
-
-
-	// const buttonState = computed(() => {
-	// 	if (isCancelled.value) return 'cancelled';
-	// 	return isPressing.value ? 'recording' : 'idle';
-	// });
-
-	// const showCancel = computed(() => {
-	// 	return isPressing.value && !isCancelled.value;
-	// });
-
-	const buttonText = computed(() => {
-		if (isCancelled.value) return '松开取消';
-		return isPressing.value ? '松开发送' : '按住说话';
-	});
-
-
-
-
-	const handleTouchStart = (e) => {
-		isPressing.value = true;
-		isCancelled.value = false;
-		touchPos.value = {
-			x: e.touches[0].clientX,
-			y: e.touches[0].clientY
-		};
-
-		// 这里触发开始逻辑(如开始录音)
-		console.log('操作开始');
-		maikeType.value = 'maike-songkai';
-	};
-
-	const handleTouchEnd = () => {
-		if (isPressing.value && !isCancelled.value) {
-			console.log('操作完成');
-			const newLength = bubbles.value.filter(item =>
-				Object.keys(item).length > 0
-			).length;
-
-			if (newLength == 5) {
-				console.log('5555');
-				maikeType.value = 'maike-anzhu';
-				resetState();
-				return false
-			}
-			moodAdd({
-				type: type.value
-			}).then(res => {
-				console.log('moodAdd', res);
-				const array = {
-					disabled: false,
-					iconType: "qipao-mask",
-					showFlag: "1",
-				}
-				addItem(array)
-				//bubbles.value.push(array)
-			})
-		}
-		console.log('bubbles', bubbles.value);
-		maikeType.value = 'maike-anzhu';
-		resetState();
-	};
-
-	function addItem(item) {
-		const emptyIndex = bubbles.value.findIndex(item =>
-			Object.keys(item).length == 0
-		);
-
-		if (emptyIndex !== -1) {
-			// 如果找到空对象,替换它
-			bubbles.value[emptyIndex] = item;
-		} else {
-			// 如果没有空对象,推入新项
-			bubbles.value.push(item);
-		}
-
-		return bubbles.value;
-	}
-	const handleTouchCancel = () => {
-		isCancelled.value = true;
-		maikeType.value = 'maike-songkai';
-		resetState();
-		console.log('操作取消');
-	};
-	const handleTouchMove = (e) => {
-		if (!isPressing.value) return;
-		// 计算二维平面上两点之间直线距离
-		const currentX = e.touches[0].clientX;
-		const currentY = e.touches[0].clientY;
-		const moveDistance = Math.sqrt(
-			Math.pow(currentX - touchPos.value.x, 2) +
-			Math.pow(currentY - touchPos.value.y, 2)
-		);
-		if (moveDistance > 50) {
-			isCancelled.value = true;
-		} else if (isCancelled.value && moveDistance <= 50) {
-			isCancelled.value = false;
-		}
-	};
-	const resetState = () => {
-		isPressing.value = false;
-		setTimeout(() => {
-			isCancelled.value = false;
-		}, 500); // 短暂保持
-	};
-
-	function goUpPage() {
-		uni.redirectTo({
-			url: `/pages/zhuanti/index`
-
-		})
-	}
-</script>