wangxy 1 month ago
parent
commit
9df9d456f9

+ 7 - 0
pages.json

@@ -191,6 +191,13 @@
 			"style": {
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path" : "pages/chanpinMy/yinsizhengce",
+			"style" : 
+			{
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"tabBar": {

+ 0 - 3
pages/chanpinMy/my.vue

@@ -49,9 +49,6 @@
 		ref
 	} from "vue";
 	
-	import {useExitApp} from "@/utils/useExitApp.js"
-	// 初始化退出逻辑
-	useExitApp();
 	
 	let currentTabIndex = ref(3)
 	let myInfoData = reactive({

+ 5 - 2
pages/chanpinMy/myInfo.vue

@@ -292,8 +292,11 @@
 	}
 
 	function yinsizhengce() {
-		agreeType.value = 'ystk'
-		agreeContentDialogRef.value.handleShow();
+		uni.navigateTo({
+			url: '/pages/chanpinMy/yinsizhengce'
+		});
+		// agreeType.value = 'ystk'
+		// agreeContentDialogRef.value.handleShow();
 	}
 
 	function kefudianhua() {

+ 1 - 5
pages/chanpinXuanze/index.vue

@@ -43,11 +43,7 @@
 	} from "@dcloudio/uni-app"
 	import * as shuxueHttp from "@/api/chanpinShuxue.js"
 	import CustomTabBar from "@/components/custom-tabbar/index.vue";
-	
-	import {useExitApp} from "@/utils/useExitApp.js"
-	// 初始化退出逻辑
-	useExitApp();
-	
+
 	let currentTabIndex = ref(0)
 	const data = reactive({
 		list: [{

+ 0 - 40
pages/chanpinneirong/index.vue

@@ -139,47 +139,7 @@
 				this.initFromOptions(cacheDataAuth);
 			}
 		},
-		// 返回处理
-		onBackPress(options) {
-			if (options.from === 'backbutton') {
-				// 返回键处理
-				return this.handleHarmonyOSBack()
-			}
-			return false
-		},
 		methods: {
-			handleHarmonyOSBack() {
-				// 双击返回键退出应用
-				if (!this.canExitApp) {
-					this.canExitApp = true
-			
-					// 显示提示
-					uni.showToast({
-						title: '再按一次退出应用',
-						icon: 'none',
-						duration: 2000
-					})
-			
-					// 2秒后重置状态
-					setTimeout(() => {
-						this.canExitApp = false
-					}, 2000)
-			
-					return true // 拦截返回事件
-				} else {
-					// 退出应用
-					this.exitApp()
-					return true
-				}
-			},
-			exitApp() {
-				// #ifdef APP-PLUS || APP-PLUS-NVUE
-				// 系统退出应用
-				plus.runtime.quit()
-				// #endif
-			},
-			
-			
 			// 从缓存初始化方法
 			initFromCache(cacheData) {
 				console.log('cacheData',cacheData);

+ 0 - 4
pages/login/index.vue

@@ -76,7 +76,6 @@
 	import {
 		error
 	} from "uview-plus";
-	import {useExitApp} from "@/utils/useExitApp.js"
 	
 	
 	let indexData = reactive({
@@ -101,9 +100,6 @@
 	const tipTitle = '升级提醒';
 	const tipContent = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
 
-	// 初始化退出逻辑
-	useExitApp();
-
 	onLoad((options) => {
 		showAppleLogin.value = isIOS13OrAbove();
 		getLoginInit()

+ 1 - 0
utils/useExitApp.js

@@ -5,6 +5,7 @@
 	} from '@dcloudio/uni-app';
 
 	export function useExitApp() {
+		
 		const canExitApp = ref(false);
 		
 		onBackPress((options) => {