diff --git a/shoot.http b/shoot.http index d3a2b01..39ab0c3 100644 --- a/shoot.http +++ b/shoot.http @@ -5,5 +5,5 @@ POST {{serverUrl}}/index/arrow Content-Type: application/json { - "device_id": "iXAx67Ce" + "device_id": "H9hL8GaA" } \ No newline at end of file diff --git a/src/apis.js b/src/apis.js index 5e785ea..5a6385b 100644 --- a/src/apis.js +++ b/src/apis.js @@ -33,20 +33,20 @@ export const getHomeData = () => { return request("GET", "/user/myHome"); }; -// 获取省份及下属城市列表 export const getProvinceData = () => { return request("GET", "/index/provinces/list"); }; -// 获取省份及下属城市列表 -export const loginAPI = (nickName, avatarUrl, code) => { - return request("POST", "/index/code", { +export const loginAPI = async (nickName, avatarUrl, code) => { + const result = await request("POST", "/index/code", { appName: "shoot", appId: "wxa8f5989dcd45cc23", nickName, avatarUrl, code, }); + uni.setStorageSync("token", result.token); + return result; }; export const bindDeviceAPI = (device) => { diff --git a/src/components/Container.vue b/src/components/Container.vue index 11f0253..8ec5eac 100644 --- a/src/components/Container.vue +++ b/src/components/Container.vue @@ -15,7 +15,7 @@ defineProps({