From f34800798d947f0f95a79660426aa3d4f0fc744c Mon Sep 17 00:00:00 2001 From: zhangyibo95 <690096405@qq.com> Date: Fri, 31 Jul 2026 09:42:59 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=96=B0=E5=A2=9E=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis.js | 8 +- src/components/Signin.vue | 5 ++ src/pages.json | 15 ++-- src/pages/org-bind.vue | 177 ++++++++++++++++++++++++++++++++++++++ src/websocket.js | 4 +- 5 files changed, 200 insertions(+), 9 deletions(-) create mode 100644 src/pages/org-bind.vue diff --git a/src/apis.js b/src/apis.js index 9c47724..2ec8229 100644 --- a/src/apis.js +++ b/src/apis.js @@ -8,7 +8,7 @@ try { switch (envVersion) { case "develop": // 开发版 - // BASE_URL = "http://192.168.1.2:8000/api/shoot"; + // BASE_URL = "http://192.168.1.30:8000/api/shoot"; BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; break; case "trial": // 体验版 @@ -233,6 +233,12 @@ export const checkUserBindAPI = async (code) => { }); }; +export const tempBindOrgAPI = (scene) => { + return request("POST", "/user/org/device/tempBind", { + scene, + }); +}; + export const bindDeviceAPI = (device) => { return request("POST", "/user/device/bindDevice", { device, diff --git a/src/components/Signin.vue b/src/components/Signin.vue index 277075f..f938c1a 100644 --- a/src/components/Signin.vue +++ b/src/components/Signin.vue @@ -32,6 +32,10 @@ const props = defineProps({ type: Function, default: () => {}, }, + onSuccess: { + type: Function, + default: () => {}, + }, }); const agree = ref(false); const phone = ref(""); @@ -127,6 +131,7 @@ async function doLogin() { clearDevice(); } props.onClose(); + await props.onSuccess(); } catch (error) { console.log("login error", error); } finally { diff --git a/src/pages.json b/src/pages.json index 5b11d63..5489311 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,11 +1,14 @@ { "pages": [ - { - "path": "pages/index" - }, - { - "path": "pages/friend-battle" - }, + { + "path": "pages/index" + }, + { + "path": "pages/org-bind" + }, + { + "path": "pages/friend-battle" + }, { "path": "pages/point-book" }, diff --git a/src/pages/org-bind.vue b/src/pages/org-bind.vue new file mode 100644 index 0000000..e8b17a4 --- /dev/null +++ b/src/pages/org-bind.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/websocket.js b/src/websocket.js index 73e7132..9fe5576 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -24,8 +24,8 @@ function createWebSocket(token, onMessage) { switch (envVersion) { case "develop": // 开发版 - // url = "ws://192.168.1.2:8000/socket"; - url = "wss://apitest.shelingxingqiu.com/socket"; + // url = "ws://192.168.1.30:8000/socket"; + // url = "wss://apitest.shelingxingqiu.com/socket"; break; case "trial": // 体验版 url = "wss://apitest.shelingxingqiu.com/socket";