updata
This commit is contained in:
parent
f487ed7a3e
commit
b6630aa2d7
@ -41,17 +41,28 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="expiretime" label="到期时间" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<span class="time">{{ scope.row.expiretime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="days" label="剩余天数" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span :class="scope.row.days < 3 ? 'critical' : ''">{{ scope.row.days }}天</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goBaiDu(scope.row.list_url)">
|
||||
续费
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧部分保持不变 -->
|
||||
<div class="rightBox">
|
||||
<div class="user card">
|
||||
<div class="userImg">
|
||||
@ -64,7 +75,8 @@
|
||||
<p><i class="el-icon-phone"></i> 手机号: {{ userInfo.mobile }}</p>
|
||||
<p><i class="el-icon-message"></i> 邮箱: {{ userInfo.email }}</p>
|
||||
</div>
|
||||
</div>· </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="price card">
|
||||
<div class="title">账户余额</div>
|
||||
@ -128,8 +140,6 @@ export default Vue.extend({
|
||||
},
|
||||
viewList: [],
|
||||
navList: [],
|
||||
// 移除 data 中的 mybalance 定义
|
||||
mybalance: 0,
|
||||
todoList: [
|
||||
{ name: '待支付', count: 0 },
|
||||
{ name: '待续费', count: 0 },
|
||||
@ -137,14 +147,12 @@ export default Vue.extend({
|
||||
{ name: '站内信', count: 0 }
|
||||
],
|
||||
messageCenterVisible: false,
|
||||
// 添加图标路径数组
|
||||
navIcons: [icon1, icon2, icon3, icon4]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
this.initMybalance();
|
||||
this.getUnreadMsgCount();
|
||||
this.getUnreadMsgCount();
|
||||
this.fetchTodoCount();
|
||||
},
|
||||
mounted() {
|
||||
@ -168,6 +176,16 @@ export default Vue.extend({
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goBaiDu(listUrl) {
|
||||
this.$store.commit('setRedirectUrl', listUrl);
|
||||
localStorage.setItem('redirectUrl', listUrl);
|
||||
this.$router.push({
|
||||
name: 'baiduProductShow',
|
||||
params: {
|
||||
listUrl: listUrl,
|
||||
}
|
||||
});
|
||||
},
|
||||
goBaidu(item) {
|
||||
this.$store.commit('setRedirectUrl', item.url)
|
||||
localStorage.setItem('redirectUrl', item.url)
|
||||
@ -180,9 +198,7 @@ export default Vue.extend({
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加获取导航图标的方法
|
||||
getNavIcon(index) {
|
||||
// 如果导航项数量超过图标数量,循环使用图标
|
||||
const iconIndex = index % this.navIcons.length;
|
||||
return this.navIcons[iconIndex];
|
||||
},
|
||||
@ -190,7 +206,8 @@ export default Vue.extend({
|
||||
async initMybalance() {
|
||||
const res = await editReachargelogAPI()
|
||||
if (res.status) {
|
||||
this.mybalance = res.data
|
||||
// 注意:根据您的 user 模块,这里需要使用 'SETMYBANLANCE' 而不是 'user/setMybalance'
|
||||
this.$store.commit('SETMYBANLANCE', res.data)
|
||||
}
|
||||
},
|
||||
async getUnreadMsgCount() {
|
||||
@ -209,12 +226,10 @@ export default Vue.extend({
|
||||
this.$message.error('获取未读消息失败');
|
||||
}
|
||||
},
|
||||
// 获取待办事项数量
|
||||
async fetchTodoCount() {
|
||||
try {
|
||||
const res = await todoCount();
|
||||
if (res.status && res.data) {
|
||||
// 更新待办事项数量
|
||||
this.todoList = this.todoList.map(item => {
|
||||
switch(item.name) {
|
||||
case '待支付':
|
||||
@ -240,27 +255,17 @@ export default Vue.extend({
|
||||
this.openMessageCenter();
|
||||
} else {
|
||||
let query = {};
|
||||
|
||||
switch(todoName) {
|
||||
case '待支付':
|
||||
query = {
|
||||
filterType: 'processing'
|
||||
};
|
||||
query = { filterType: 'processing' };
|
||||
break;
|
||||
case '待续费':
|
||||
query = {
|
||||
filterType: 'pendingPayment'
|
||||
};
|
||||
query = { filterType: 'pendingPayment' };
|
||||
break;
|
||||
case '处理中':
|
||||
query = {
|
||||
filterType: 'processing'
|
||||
};
|
||||
query = { filterType: 'processing' };
|
||||
break;
|
||||
}
|
||||
|
||||
console.log(`跳转到资源概览,筛选类型: ${todoName}`, query);
|
||||
|
||||
this.$router.push({
|
||||
path: '/orderManagement/orderManagement',
|
||||
query: query
|
||||
@ -367,7 +372,6 @@ export default Vue.extend({
|
||||
justify-content: center;
|
||||
min-width: 0;
|
||||
|
||||
// 修改这里:为图片添加样式
|
||||
.nav-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
@ -375,13 +379,6 @@ export default Vue.extend({
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
// 移除原来的图标样式
|
||||
// i {
|
||||
// font-size: 24px;
|
||||
// margin-bottom: 10px;
|
||||
// color: #409eff;
|
||||
// }
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user