浏览代码

1

dev_czc
congzc 1年前
父节点
当前提交
a9617aecf0
共有 9 个文件被更改,包括 5930 次插入7802 次删除
  1. +1
    -0
      package.json
  2. +13
    -0
      src/apis/Permission.js
  3. +16
    -2
      src/layout/index.vue
  4. +1
    -1
      src/utils/request.js
  5. +2
    -2
      src/views/createVideo/index.vue
  6. +58
    -46
      src/views/login/index.vue
  7. +2
    -1978
      src/views/mangage/model.vue
  8. +235
    -164
      yarn-error.log
  9. +5602
    -5609
      yarn.lock

+ 1
- 0
package.json 查看文件

@@ -24,6 +24,7 @@
"echarts": "^5.2.2",
"element-plus": "^2.3.1",
"js-audio-recorder": "^1.0.7",
"js-cookie": "^3.0.5",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.0",


+ 13
- 0
src/apis/Permission.js 查看文件

@@ -0,0 +1,13 @@
import request from "@/utils/request.js";

/**
* @description:全查询导航菜单
* @param
* @return:
*/
export function getMenuNavApi() {
return request({
url: `/menu/nav`,
method: 'get',
})
}

+ 16
- 2
src/layout/index.vue 查看文件

@@ -105,7 +105,7 @@ import { useAppStore } from "@/store/modules/app";
// import { useSettingsStore } from "@/store/modules/settings";
import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { getMenuNavApi } from "@/apis/Permission.js";
import { userInfoModules } from "@/store/modules/userInfo";

const userInfoPinia = userInfoModules();
@@ -166,13 +166,27 @@ function handleOutsideClick() {
appStore.closeSideBar(false);
}

onMounted(() => {});
onMounted(() => {
getMenuNavFunc();
});
//#region 联系我们弹窗
const showTalkUsDialog = ref(false);
const updateShowTalkUsDialog = (newValue: any) => {
showTalkUsDialog.value = newValue;
};
//#endregion ------------------------------------

//#region 获取路由列表
const MenuList = ref([]);
async function getMenuNavFunc() {
try {
const res = await getMenuNavApi();
MenuList.value = res.data.menuList;
} catch (error) {
console.log(error);
}
}
//#endregion ------------------------------------
</script>

<!-- 新样式 -->


+ 1
- 1
src/utils/request.js 查看文件

@@ -60,7 +60,7 @@ request.interceptors.response.use(
let code = response.data.code
// 当token无效(过期或损坏)时 1053为未登录
if (code == 1052 || code == 1053) {
localStorage.removeItem("AccessToken");
// localStorage.removeItem("AccessToken");
router.push("/login");
// ElMessage.error("登录过期,请重新登录!");
// ElMessage.error($t('tips.tokenExpired'));


+ 2
- 2
src/views/createVideo/index.vue 查看文件

@@ -757,8 +757,8 @@ const soundStyle = ref(""); //选择的风格
// 语言下拉框内容
const languageOptions = ref([]);
async function voiceTotal() {
const res = await voiceTotalApi();
languageOptions.value = res.data;
// const res = await voiceTotalApi();
// languageOptions.value = res.data;
}
// 声音下拉框内容
const soundOptions = ref([]);


+ 58
- 46
src/views/login/index.vue 查看文件

@@ -612,6 +612,7 @@ import {
doFindInviteCode,
doUpdateInviteCode,
} from "@/apis/login";
import { getMenuNavApi } from "@/apis/Permission.js";
import axios from "axios";
// 状态管理依赖

@@ -911,28 +912,6 @@ function confirmPasswordValidator5(rule: any, value: any, callback: any) {
}
//#endregion ----------------------------

// 登录行为
function handleLogin() {
loginFormRef.value.validate((val: any) => {
if (val) {
const data = {
username: loginData.value.username,
password: loginData.value.password,
captcha: loginData.value.captcha,
};
isLogining.value = true;
doLogin(data);
} else {
const msg =
currentLan.value == "zh-cn"
? "请检查信息格式!"
: "Please check the format !";
ElMessage.error(msg);
return;
}
});
}

// 注册行为

//#region 忘记密码 表单3
@@ -1130,7 +1109,7 @@ async function checkInviteCode() {
isLogin.value = 8;
// 有邀请码直接前往我的页面
} else if (status == 1) {
userInfoPinia.getUserInfo(); //保存邮箱到pinia
// userInfoPinia.getUserInfo(); //保存邮箱到pinia
ElMessage.success(
'currentLan.value == "zh-cn" ? "登录成功!" : "Welcome to Metavatar!"'
);
@@ -1152,7 +1131,7 @@ async function handleInvitatioCode() {
};
try {
const res = await doUpdateInviteCode(data);
userInfoPinia.getUserInfo(); //保存邮箱到pinia
// userInfoPinia.getUserInfo(); //保存邮箱到pinia
ElMessage.success(
'currentLan.value == "zh-cn" ? "登录成功!" : "Welcome to Metavatar!"'
);
@@ -1182,6 +1161,49 @@ function getCode() {
* @param {Object} data
* @return: data
*/

/**
* @description:重新发送邮件
* @param {string} email
* @return: data
*/
async function reSendEmail(email: string) {
const msg =
currentLan.value == "zh-cn"
? "确认信息已发送至您的邮箱,请注意查收!"
: "An email has been send to you, Please pay attention to confirm !";
await sendRegisterEmail(email)
.then((res) => {
console.log(res, "res");
ElMessage.success(msg);
})
.catch((err) => {
console.log(err, "err");
ElMessage.error(err.message);
});
}
//#region 新登录
// 登录行为
function handleLogin() {
loginFormRef.value.validate((val: any) => {
if (val) {
const data = {
username: loginData.value.username,
password: loginData.value.password,
captcha: loginData.value.captcha,
};
isLogining.value = true;
doLogin(data);
} else {
const msg =
currentLan.value == "zh-cn"
? "请检查信息格式!"
: "Please check the format !";
ElMessage.error(msg);
return;
}
});
}
async function doLogin(data: any) {
const msg =
currentLan.value == "zh-cn" ? "登录成功!" : "Welcome to Metavatar!";
@@ -1191,11 +1213,12 @@ async function doLogin(data: any) {
// localStorage.setItem("AccessToken", res.data.token);
// 注册成功将账号密码保存到本地
saveInfo(data);
await getMenuNavFunc();
isLogining.value = false;
// await checkInviteCode();
userInfoPinia.getUserInfo(); //保存邮箱到pinia
// userInfoPinia.getUserInfo(); //保存邮箱到pinia
ElMessage.success(msg);
router.push("/createVideo");
router.push("/model");
})
.catch((err) => {
console.log(err, "err");
@@ -1208,28 +1231,17 @@ async function doLogin(data: any) {
}
});
}
//#endregion

/**
* @description:重新发送邮件
* @param {string} email
* @return: data
*/
async function reSendEmail(email: string) {
const msg =
currentLan.value == "zh-cn"
? "确认信息已发送至您的邮箱,请注意查收!"
: "An email has been send to you, Please pay attention to confirm !";
await sendRegisterEmail(email)
.then((res) => {
console.log(res, "res");
ElMessage.success(msg);
})
.catch((err) => {
console.log(err, "err");
ElMessage.error(err.message);
});
//#region 获取菜单导航路由
async function getMenuNavFunc() {
try {
const res = await getMenuNavApi();
} catch (error) {
console.log(error);
}
}
//#endregion --------------------------------
onMounted(() => {
getCode();
getInfo();


+ 2
- 1978
src/views/mangage/model.vue
文件差异内容过多而无法显示
查看文件


+ 235
- 164
yarn-error.log
文件差异内容过多而无法显示
查看文件


+ 5602
- 5609
yarn.lock
文件差异内容过多而无法显示
查看文件


正在加载...
取消
保存