diff --git a/src/api/account.js b/src/api/account.js index 581bb56..441b7e5 100644 --- a/src/api/account.js +++ b/src/api/account.js @@ -1,71 +1,13 @@ import { getAxios, postAxios, downFile } from '@/utils/axios.js' -import { ElMessage } from 'element-plus'; -//租户获取登录id -export function rentgetloginID(data) { - return getAxios({ url: `/api/tenant/get-id-by-name?name=${data.name}`}) +//获取vx二维码 +export function getVxQrcode() { + return getAxios({ url: 'user/qrcode' }) +} +//获取扫码结果 +export function getScanResult(data) { + return getAxios({ url: '/user/check/' + data}) } //登录 export function login(data) { return postAxios({ url: '/api/user/bigbrother-doLogin', data }) } -//获取国家 -export function getCountryinfo(data) { - return postAxios({ url: '/api/common/country_info', data }) -} - -//查询tk账号查询次数 -export function tkaccountuseinfo(accountName) { - return getAxios({ url: `/api/common/accountCount?accountName=${accountName}` }) -} - -export function tkhostdata(data) { - return postAxios({ url: '/api/big-brother/page', data }) -} - - - - - - -export function apiGetCart() { - return getAxios({ url: '/cgi-bin/cart/latest' }) -} -// export function login(data) { -// return postAxios({ url: 'api/account/login', data }) -// } -export function cheekalive(data) { - return postAxios({ url: 'api/account/cheekalive', data }) -} - -export function dicts(data) { - return postAxios({ url: 'api/param/dicts', data }) -} -export function tkhostdetail(data) { - return postAxios({ url: 'api/tkinfo/tkhostdetail', data }) -} -//导出表格 -export function exporthosts(data) { - return postAxios({ url: 'api/export/hostsinfo', data }) -} -export function downList(url, data) { - return downFile(url, data) -} - -//查询员工 -export function getStaffList(data) { - return postAxios({ url: 'api/account/list', data }) -} -//分配主播 -export function managerhosts(data) { - return postAxios({ url: 'api/account/managerhosts', data }) -} -//编辑主播 -export function upholdinfo(data) { - return postAxios({ url: 'api/tkinfo/upholdinfo', data }) -} - -//查看名字 -export function accountName(str) { - return postAxios({ url: 'api/account/accountName?accounts=' + str }) -} - diff --git a/src/assets/Email.png b/src/assets/Email.png new file mode 100644 index 0000000..6f636d9 Binary files /dev/null and b/src/assets/Email.png differ diff --git a/src/assets/Password.png b/src/assets/Password.png new file mode 100644 index 0000000..f93fd5a Binary files /dev/null and b/src/assets/Password.png differ diff --git a/src/assets/bg.png b/src/assets/bg.png new file mode 100644 index 0000000..78e6b50 Binary files /dev/null and b/src/assets/bg.png differ diff --git a/src/assets/push.png b/src/assets/push.png deleted file mode 100644 index a87c133..0000000 Binary files a/src/assets/push.png and /dev/null differ diff --git a/src/assets/switchEmail.png b/src/assets/switchEmail.png new file mode 100644 index 0000000..88f039a Binary files /dev/null and b/src/assets/switchEmail.png differ diff --git a/src/assets/switchvx.png b/src/assets/switchvx.png new file mode 100644 index 0000000..d01a9ad Binary files /dev/null and b/src/assets/switchvx.png differ diff --git a/src/components/Appaside.vue b/src/components/Appaside.vue index 460616d..8596403 100644 --- a/src/components/Appaside.vue +++ b/src/components/Appaside.vue @@ -11,10 +11,104 @@ -
- logo +
+ + +
+ +
+ 来自世界上最长名的国家的某个人 +
+
+
+
{{ item.name }}
+
+
+
+
+ + + +
+
+
发布新PK
+ +
+
+ + +
+
选择我的主播
+
+
+
+ + +
+
+ + +
+
+ +
+
+
+
金币数(单位为K)
+ +
+
+
场次
+ +
+
+
确认
+
重置
+
+
+
+
- \ No newline at end of file + diff --git a/src/components/mineSubComponent/PKmessage.vue b/src/components/mineSubComponent/PKmessage.vue index 1b8593f..f80ec2f 100644 --- a/src/components/mineSubComponent/PKmessage.vue +++ b/src/components/mineSubComponent/PKmessage.vue @@ -1,6 +1,149 @@ - \ No newline at end of file + diff --git a/src/components/mineSubComponent/PointsList.vue b/src/components/mineSubComponent/PointsList.vue index 906f855..bd092f7 100644 --- a/src/components/mineSubComponent/PointsList.vue +++ b/src/components/mineSubComponent/PointsList.vue @@ -1,6 +1,26 @@ - \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 0ec5670..8d8a7f8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,13 +1,18 @@ import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router' import HomeView from '../views/HomeView.vue' - +import emailRegistration from '../views/emailRegistration.vue' +import { setStorage , getStorage } from '@/utils/storage.js'; const routes = [ { path: '/', - name: 'home', + name: 'login', component: HomeView }, - + { + path: '/emailRegistration', + name: 'emailRegistration', + component: emailRegistration + }, { path: '/nav', name: 'nav', @@ -42,4 +47,23 @@ const router = createRouter({ routes }) +// // 添加导航守卫 +// router.beforeEach((to, from, next) => { +// // 假设你有一个方法来检查用户是否已登录 +// const isAuthenticated = () => { +// return localStorage.getItem('token') !== null; +// }; + +// // 定义需要登录才能访问的路由 +// const requiresAuth = ['nav', 'pk', 'Forum', 'Message', 'Mine']; + +// // 如果需要登录且用户未登录,则重定向到登录页面 +// if (requiresAuth.includes(to.name) && !isAuthenticated()) { +// next({ name: 'login' }); +// } else { +// next(); +// } +// }); + export default router + diff --git a/src/static/css/app.less b/src/static/css/app.less index b108308..5a206ec 100644 --- a/src/static/css/app.less +++ b/src/static/css/app.less @@ -5,6 +5,11 @@ @bg-Sidebar-color-bottom: #E9ECEF; // 侧边栏底色 @Supplementary-text-color: #495057; // 补充文字色 @Prompt-text-color: #6c757d; // 提示文字色 +@Warning-text-color: #FFC107; // 警告文字色 +@Error-text-color: #DC3545; // 错误文字色 +@Success-text-color: #28A745; // 成功文字色 +@lose-color: #ff000010; // 输赢颜色 +@win-color: #0099ff10; // 输赢颜色 diff --git a/src/utils/axios.js b/src/utils/axios.js index c2d0b02..9ef9669 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -7,49 +7,33 @@ import { getToken, getUser } from '@/utils/storage' import router from '@/router' import { ElMessage } from 'element-plus'; -import { usePythonBridge, } from '@/utils/pythonBridge' import { ref } from 'vue'; import { defineStore } from 'pinia' -import { tokenStore,UserStore } from '@/stores/notice' - - - - -const { stopScript } = usePythonBridge(); +import { tokenStore, UserStore } from '@/stores/notice' // 请求地址前缀 let baseURL = '' if (process.env.NODE_ENV === 'development') { // 生产环境 - // baseURL = "https://api.tkpage.yolozs.com" - baseURL = "http://47.79.98.113:8101" - // baseURL = "http://192.168.0.103:8085/" - // baseURL = "http://192.168.1.174:8101" + baseURL = "http://192.168.1.174:8086/" } else { // 测试环境 - // baseURL = "http://120.26.251.180:8085/" - // 开发环境 - // baseURL = "https://api.tkpage.yolozs.com" - baseURL = "http://47.79.98.113:8101" - // baseURL = "http://192.168.1.174:8101" - // baseURL = "http://api.tkpage.vvtiktok.cn" + baseURL = "http://192.168.1.174:8086/" } // 请求拦截器 axios.interceptors.request.use((config) => { const tokenCache = tokenStore() - console.log("config", config) const url = sliceUrl(config.url) - console.log("url", url) // 请求超时时间 - 毫秒 config.timeout = 60000 config.baseURL = baseURL // 自定义Content-type config.headers['Content-type'] = 'application/json' - if (!(config.url == 'bigbrother-doLogin' || config.url == 'get-id-by-name')) { - config.headers['vvtoken'] = tokenCache.token; - } + // if (!(config.url == '' || config.url == '')) { + // config.headers['vvtoken'] = tokenCache.token; + // } return config; }, (error) => { @@ -59,17 +43,16 @@ axios.interceptors.request.use((config) => { // 响应拦截器 axios.interceptors.response.use((response) => { console.log("response", response.data) - if (response.data.code == 0) { - console.log("response", response.data.data) + if (response.data.code == 200) { return response.data.data } else if (response.data.code == 40400) { router.push('/') ElMessage.error(response.data.code + '' + response.data.message); - }else{ + } else { ElMessage.error(response.data.code + '' + response.data.message); } - - + + }, (error) => { // 可添加请求失败后的处理逻辑 @@ -161,7 +144,6 @@ function cheekalive() { if (res.data) { } else { - stopScript(); alert("账号在其他地方登录!") window.location.href = '/'; } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 344ea43..576ed39 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,30 +1,241 @@ \ No newline at end of file +.HomeView { + padding: 0; + margin: 0; + width: 100vw; + height: 100vh; + background-image: url(../assets/bg.png); + background-size: 100% 100%; + display: flex; + justify-content: center; + align-items: center; +} +.login { + width: 627px; + height: 514px; + background-image: linear-gradient(180deg, #dbf0f1, #ffffff); + border-radius: 16px; + display: flex; + flex-direction: column; + align-items: center; + border: 1px solid #4fcacd; +} +.container { + display: flex; + flex-direction: column; + align-items: center; +} +.Switch { + width: 100%; + height: 100px; + display: flex; + justify-content: end; +} +.Switch-content { + width: 110px; + height: 110px; + margin-top: 7px; + margin-right: 8px; +} +.Switchimg { + width: 100%; + height: 100%; +} +.title { + font-size: 36px; + color: #333333; + font-weight: bold; + margin-top: -31px; +} +.striping { + width: 68px; + height: 3px; + background-color: #0aaeab; + margin-top: 10px; +} +.qrcode{ + width: 200px; + height: 200px; + margin-top: 50px; +} +.qrcode-text{ + color: #333333; + font-size: 18px; + margin-top: 40px; +} +.input-Email { + width: 488px; + height: 71px; + border-radius: 4px; + background-color: #f4f4f4; + border: 1px solid #e4e4e4; + margin-top: 43px; + display: flex; + align-items: center; +} +.Emailimg { + width: 28.7px; + height: 22.2px; + margin-left: 25px; + margin-right: 25px; +} +.vertical { + width: 1px; + height: 38px; + background-color: #d9d9d9; + margin-right: 25px; +} +.input-text { + width: 360px; + height: 38px; + border: none; + background-color: #0aaeab00; + font-size: 20px; + color: #999999; +} +.input-text:focus { + outline: none; /* 移除默认蓝色边框 */ +} +.input-Password { + width: 488px; + height: 71px; + border-radius: 4px; + background-color: #f4f4f4; + border: 1px solid #e4e4e4; + margin-top: 33px; + display: flex; + align-items: center; +} +.Passwordimg { + width: 26.4px; + height: 29.3px; + margin-left: 25px; + margin-right: 25px; +} +.login-btn { + width: 487px; + height: 70px; + border-radius: 4px; + background-image: linear-gradient(0deg, #4fcacd, #5fdbde); + margin-top: 38px; + color: #ffffff; + text-align: center; + line-height: 70px; + font-size: 30px; + font-weight: Medium; + box-shadow: 0px 5px 15px rgba(15, 101, 98, 0.43); +} + diff --git a/src/views/emailRegistration.vue b/src/views/emailRegistration.vue new file mode 100644 index 0000000..5413acf --- /dev/null +++ b/src/views/emailRegistration.vue @@ -0,0 +1,34 @@ + + + + + \ No newline at end of file diff --git a/src/views/hosts/Forum.vue b/src/views/hosts/Forum.vue index 865f73d..f188206 100644 --- a/src/views/hosts/Forum.vue +++ b/src/views/hosts/Forum.vue @@ -1,4 +1,5 @@