chutingting 1 year ago
parent
commit
b1f302eaec
3 changed files with 26 additions and 4 deletions
  1. +18
    -3
      src/layout/index.vue
  2. +1
    -0
      src/store/modules/userInfo.js
  3. +7
    -1
      src/views/createVideo/index.vue

+ 18
- 3
src/layout/index.vue View File

@@ -36,7 +36,7 @@
{{ $t("voiceModel.title") }}
</div>

<div class="bottomBtx">
<!-- <div class="bottomBtx"> -->
<div class="myRouter-item" @click="router.push('/myStore')">
<div class="icon">
<el-icon><i-ep-Goods /></el-icon>
@@ -77,13 +77,14 @@
</el-menu-item-group>
</el-sub-menu>
</el-menu>
</div>
<!-- </div> -->
</div>
</div>
<!-- 右边显示部分 -->
<div class="rightBox">
<!-- nav栏 -->
<div class="nav">
<div class="navItem">当前币值:{{ currentValue }}</div>
<!-- 语言 -->
<el-tooltip
style="cursor: pointer; z-index: 999"
@@ -94,6 +95,7 @@
>
<lang-select class="navItem" />
</el-tooltip>
<div class="navItem" v-if="currentPhone">{{ currentPhone }}</div>
<!-- 登录 -->
<div class="navItem" v-if="!AccessToken" @click="router.push('login')">
{{ $t("navbar.goLogin") }}
@@ -131,6 +133,8 @@ import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";

import { userInfoModules } from "@/store/modules/userInfo";
import { getUserPoinsApi } from '@/apis/my.js'

import {
Document,
Menu as IconMenu,
@@ -196,7 +200,18 @@ function handleOutsideClick() {
appStore.closeSideBar(false);
}

onMounted(() => {});
// 当前币值
const currentValue = ref('')
const currentPhone = localStorage.getItem('phone')
function currentValFn() {
getUserPoinsApi().then(res => {
currentValue.value = res.data
})
}

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


+ 1
- 0
src/store/modules/userInfo.js View File

@@ -13,6 +13,7 @@ export const userInfoModules = defineStore("userInfo", () => {
async function getUserInfo() {
const res = await getUserInfoApi()
userInfo.value = res.data
localStorage.setItem('phone', res.data.phone)
}
// 退出清除用户信息
function loginOut(params) {


+ 7
- 1
src/views/createVideo/index.vue View File

@@ -1637,7 +1637,13 @@ async function createVideo() {
const res2 = await createVideoApi(workId.value);
// 去充值
if (res2.code === '64001') {
router.push("/myStore");
// router.push("/myStore");
router.push({
path: "/businessCheck",
query: {
tag: 'createVideo'
},
});
return
}
ElMessage.success(


Loading…
Cancel
Save