diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..03691c14 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "i18n-ally.localesPaths": [ + "src/tmui/locale", + "src/tmui/tool/dayjs/locale", + "src/tmui/tool/dayjs/esm/locale" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 068e30c2..52335696 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,8 @@ "echarts": "5.4.2", "node-sass": "^9.0.0", "pinia": " 2.0.33", + "sass": "^1.69.5", + "sass-loader": "^13.3.2", "vue": "3.2.47", "vue-i18n": "9.8.0" }, diff --git a/src/http/index.js b/src/http/index.js index 44a85c60..7238da2c 100644 --- a/src/http/index.js +++ b/src/http/index.js @@ -1,7 +1,6 @@ - import deposit from "./deposit"; +import login from "./login"; export default { - deposit, - + login, }; diff --git a/src/http/login.js b/src/http/login.js new file mode 100644 index 00000000..17e915db --- /dev/null +++ b/src/http/login.js @@ -0,0 +1,57 @@ +import http from "./interface"; + +// openId +export const login = (data) => { + return http.request({ + url: "/api/wxuser/openid", + method: "POST", + data, + }); +}; +// 获取手机号 +export const getTel = (data) => { + return http.request({ + url: "/api/wxuser/get/telnum", + method: "POST", + data, + }); +}; +// 注册 +export const register = (data) => { + return http.request({ + url: "/api/wxuser/register", + method: "POST", + data, + }); +}; +// 身份验证 +export const chenckId = (data) => { + return http.request({ + url: "/api/wxuser/ocr", + method: "POST", + data, + }); +}; +// 法大大 +export const fddRealName = (data) => { + return http.request({ + url: "/api/wxuser/bind/fdd", + method: "POST", + data, + }); +}; +//法大大是否验证 +export const checkFdd = () => { + return http.request({ + url: "/api/wxuser/fdd/check", + method: "POST", + }); +}; +export default { + login, + getTel, + register, + chenckId, + fddRealName, + checkFdd, +}; diff --git a/src/main.ts b/src/main.ts index 46d4e621..13e20798 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,13 +1,15 @@ import { createSSRApp } from "vue"; -import * as Pinia from 'pinia'; -import tmui from "./tmui" +import * as Pinia from "pinia"; +import tmui from "./tmui"; import App from "./App.vue"; - +// @ts-ignore +import api from "@/http"; export function createApp() { const app = createSSRApp(App); - app.use(tmui, { shareDisable: false } as Tmui.tmuiConfig) + app.config.globalProperties.$api = api; + app.use(tmui, { shareDisable: false } as Tmui.tmuiConfig); return { app, - Pinia + Pinia, }; } diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue new file mode 100644 index 00000000..868c2bb6 --- /dev/null +++ b/src/pages/login/index.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/src/static/bg.png b/src/static/bg.png new file mode 100644 index 00000000..e8018c1a Binary files /dev/null and b/src/static/bg.png differ