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