zjs_project 1 anno fa
parent
commit
317da8346a

+ 11 - 1
src/mixins/commonPageMethod.js

@@ -8,6 +8,8 @@ export default {
 	mounted() {
 		console.warn("---mounted---",this.pvId,this.$route.meta.keepAlive)
 		if(this.pvId && !this.$route.meta.keepAlive){
+			window.removeEventListener('beforeunload', this.pvCloseHandle);
+			window.removeEventListener('visibilitychange', this.visibilitychange);
 			window.currentPage = this;
 			let param = {
 				type: 'PV',
@@ -36,6 +38,11 @@ export default {
 	// 	console.warn("---onhide---")
 	// 	this.pvCloseHandle()
 	// },
+	// beforeUpdate() {
+	// 	console.warn("beforeUpdate");
+	// 	// 移除visibilitychange事件监听器
+	// 	window.removeEventListener('visibilitychange', this.visibilitychange);
+	// },
 	beforeRouteLeave(to, from, next) {
 		console.warn("router:beforeRouteLeave:",from.name);
 		// 在离开当前路由前执行的方法
@@ -50,8 +57,10 @@ export default {
 		next();
 	},
 	activated(){
-		console.warn("activated:",this.pvId);
+		console.warn("activated:",this.pvId); 
 		if(this.pvId && this.$route.meta.keepAlive){
+			window.removeEventListener('beforeunload', this.pvCloseHandle);
+			window.removeEventListener('visibilitychange', this.visibilitychange);
 			window.currentPage = this;
 			let param = {
 				type: 'PV',
@@ -66,6 +75,7 @@ export default {
 	},
 	methods: {
 		visibilitychange(){
+			console.warn("visibilitychange");
 			if (document.visibilityState !== 'visible') { // 离开页面
 			   this.pvCloseHandle()
 			} else { // 进入页面

+ 1 - 0
src/static/globlShowModel.js

@@ -83,6 +83,7 @@ var globlShowModel = [
 	'BP_T_1PeopleBasin03',
 	'BP_AutoWall_51M',
 	'BP_G_grass01',
+	'BP_G_tree03',
 ];
 
 module.exports = globlShowModel;

+ 2 - 2
src/static/layoutModelData.js

@@ -97,7 +97,7 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_tree00.glb', name: '大树',modelName: 'BP_G_tree00', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_tree01.glb', name: '中树',modelName: 'BP_G_tree01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_tree02.glb', name: '小树',modelName: 'BP_G_tree02', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_tree02.glb', name: '最小树',modelName: 'BP_G_tree03', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_tree03.glb', name: '最小树',modelName: 'BP_G_tree03', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_parterre01.gltf', name: '9格花坛',modelName: 'BP_G_parterre01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_parterre03.gltf', name: '三角花坛',modelName: 'BP_G_parterre03', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_G_parterre04.gltf', name: '矩形花坛',modelName: 'BP_G_parterre04', type:1},
@@ -134,7 +134,7 @@ var layoutModel = [
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DinningChiar01_30Degree.glb', name: '餐椅01_30度',modelName: 'BP_D_DinningChiar01_30Degree', type:1},
 	
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_LongDiningTable_240CM.glb', name: '2.4M长餐桌',modelName: 'BP_D_LongDiningTable_240CM', type:1},
-	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DiningDecration01.glb', name: '桌面饰品01',modelName: 'BP_D_DiningDecoration01', type:1},
+	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DiningDecoration01.glb', name: '桌面饰品01',modelName: 'BP_D_DiningDecoration01', type:1},
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DinningDecration03.glb', name: '餐桌装饰03',modelName: 'BP_D_DinningDecration03', type:1},
 	
 	{url: 'https://dm.static.elab-plus.com/miniProgram/model/BP_D_DinningDecration02_30D.glb', name: '餐桌饰品02_30度',modelName: 'BP_D_DinningDecration02_30D', type:1},