From 601327a9cd2d800011b837549a865ce5da67eba7 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 24 一月 2024 13:33:46 +0800
Subject: [PATCH] #

---
 pages/common/modeSwitch.vue |   38 ++++++++++++++++++++++++++++++++++----
 1 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/pages/common/modeSwitch.vue b/pages/common/modeSwitch.vue
index 8831285..20778cb 100644
--- a/pages/common/modeSwitch.vue
+++ b/pages/common/modeSwitch.vue
@@ -23,25 +23,55 @@
 		onShow() {
 			this.baseUrl = uni.getStorageSync('baseUrl');
 			this.token = uni.getStorageSync('token');
+			this.getInfo()
 		},
 		methods: {
 			getInfo() {
 				let _this = this
 				uni.request({
-					url: `${_this.baseUrl}/search/sign/auth/v2`,
-					data: {},
-					header: { 'token': uni.getStorageSync('token') },
+					url: `${_this.baseUrl}/mobile/search/sign/auth/v2`,
+					data: {sign:false},
+					header: {
+						'token': uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded'
+					},
 					method: 'POST',
 					success(res) {
+						console.log(res);
 						res = res.data
 						if (res.code === 200) {
+							if (res.data == 0) {
+								_this.modeText = "榛樿"
+							} else {
+								_this.modeText = "閫�搴�"
+							}
 							
 						}
 					}
 				})
 			},
 			change() {
-				
+				let _this = this
+				uni.request({
+					url: `${_this.baseUrl}/mobile/search/sign/auth/v2`,
+					data: {sign:true},
+					header: {
+						'token': uni.getStorageSync('token'),
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					method: 'POST',
+					success(res) {
+						res = res.data
+						console.log(res);
+						if (res.code === 200) {
+							if (res.data == 0) {
+								_this.modeText = "榛樿"
+							} else {
+								_this.modeText = "閫�搴�"
+							}
+						}
+					}
+				})
 			}
 		}
 	}

--
Gitblit v1.9.1