Browse Source

修改详情页面

wangxy 1 month ago
parent
commit
41b6247c31
1 changed files with 18 additions and 4 deletions
  1. 18 4
      pages/chanpinneirong/chanpin1.vue

+ 18 - 4
pages/chanpinneirong/chanpin1.vue

@@ -74,6 +74,8 @@
 		</view>
 		</view>
 		<!-- 弹窗组件 -->
 		<!-- 弹窗组件 -->
 		<danyuanInfoVue ref="dyRef" v-if="isShow" @close="isShow = false"></danyuanInfoVue>
 		<danyuanInfoVue ref="dyRef" v-if="isShow" @close="isShow = false"></danyuanInfoVue>
+		<!-- 购买提示窗 -->
+		<tipSmallDialog ref="gmtRef" content="需要购买当前课程才能学习" @confirm-btn="handleConfirmBtn" qrBtnName="前往购买"></tipSmallDialog>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -98,6 +100,8 @@
 	import {
 	import {
 		updateChanpin1Process
 		updateChanpin1Process
 	} from "./useNeirongChanpin1"
 	} from "./useNeirongChanpin1"
+	import tipSmallDialog from "@/components/dialog/tipSmallDialog.vue";
+	
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
@@ -127,7 +131,8 @@
 		components: {
 		components: {
 			CustomTabBar,
 			CustomTabBar,
 			danyuanInfoVue,
 			danyuanInfoVue,
-			ezyActiveVue
+			ezyActiveVue,
+			tipSmallDialog
 		},
 		},
 
 
 		onHide() {
 		onHide() {
@@ -137,6 +142,12 @@
 			// 页面卸载无需特殊处理
 			// 页面卸载无需特殊处理
 		},
 		},
 		methods: {
 		methods: {
+			handleConfirmBtn() {
+				// 加锁视频需要购买
+				uni.navigateTo({
+					url: "/pages/chanpinShop/cp1/dingdan"
+				})
+			},
 			initData(banbenId) {
 			initData(banbenId) {
 				console.log('123111');
 				console.log('123111');
 				const cacheData = cacheManager.get('contentInfo');
 				const cacheData = cacheManager.get('contentInfo');
@@ -301,10 +312,13 @@
 			handlePlay(da, code) {
 			handlePlay(da, code) {
 
 
 				if (da.lock && code == 'play') {
 				if (da.lock && code == 'play') {
+					
+					this.$refs.gmtRef.handleShow();
+					
 					// 加锁视频需要购买
 					// 加锁视频需要购买
-					uni.navigateTo({
-						url: "/pages/chanpinShop/cp1/dingdan"
-					})
+					// uni.navigateTo({
+					// 	url: "/pages/chanpinShop/cp1/dingdan"
+					// })
 					return;
 					return;
 				}
 				}
 				let jieId = code === 'jixu' ? da.curJieId : da.jieId;
 				let jieId = code === 'jixu' ? da.curJieId : da.jieId;