Merge remote-tracking branch 'origin/master'

# Conflicts:
#	package-lock.json
#	src/pages.json
#	src/pages/mine/index.vue
This commit is contained in:
xingyy 2023-12-06 17:55:34 +08:00
commit 4a73f5f51d
7 changed files with 118 additions and 8 deletions

7
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"i18n-ally.localesPaths": [
"src/tmui/locale",
"src/tmui/tool/dayjs/locale",
"src/tmui/tool/dayjs/esm/locale"
]
}

View File

@ -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"
},

View File

@ -1,7 +1,6 @@
import deposit from "./deposit";
import login from "./login";
export default {
deposit,
login,
};

57
src/http/login.js Normal file
View File

@ -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,
};

View File

@ -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,
};
}

43
src/pages/login/index.vue Normal file
View File

@ -0,0 +1,43 @@
<template>
<div class="main">
<view>
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="btn">点击登录</button>
</view>
</div>
</template>
<script setup >
import { ref, getCurrentInstance } from "vue";
const currentInstance = getCurrentInstance();
const { $api } = currentInstance.appContext.config.globalProperties;
let isShow = ref(true);
const getPhoneNumber = () => {
console.log(123)
}
</script>
<style lang="scss" scoped>
.main {
background: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/3f70cf7f-4017-42a6-9276-bf854f57f78d.png");
background-size: cover;
height: 100vh;
display: flex;
align-items: center;
flex-direction: column;
.btn {
background: transparent;
width: 200rpx;
position: fixed;
bottom: 15%;
color: #fff;
left: 50%;
transform: translateX(-50%);
font-size: 30rpx;
transition: all 1s;
animation: jump 1s ease-in-out infinite alternate;
}
}
</style>

BIN
src/static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB