合并代码
This commit is contained in:
@@ -40,12 +40,12 @@
|
||||
<!-- 修改后的操作区域 - 三个部分等宽 -->
|
||||
<div class="action-area">
|
||||
<div class="action-grid">
|
||||
<router-link to="/mymatching" class="action-main">
|
||||
<div class="matching-text">
|
||||
<div>开始</div>
|
||||
<div>匹配</div>
|
||||
<div @click="startMatching" class="action-main">
|
||||
<div class="matching-text">
|
||||
<div>开始</div>
|
||||
<div>匹配</div>
|
||||
</div>
|
||||
</div>
|
||||
</router-link>
|
||||
<div class="action-stack">
|
||||
<div class="action-sub-item top">
|
||||
<div class="action-icon">💎</div>
|
||||
@@ -87,19 +87,38 @@ export default {
|
||||
Swiper,
|
||||
SwiperSlide
|
||||
},
|
||||
setup() {
|
||||
methods:{
|
||||
async startMatching(type = 'small', amount = null) {
|
||||
// 先导航到匹配页面
|
||||
await this.$router.push('/matching')
|
||||
|
||||
// 等待页面加载完成后触发匹配
|
||||
setTimeout(() => {
|
||||
// 通过全局事件总线触发匹配页面的匹配方法
|
||||
window.dispatchEvent(new CustomEvent('autoStartMatching', {
|
||||
detail: {
|
||||
type,
|
||||
amount
|
||||
}
|
||||
}))
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
setup(){
|
||||
|
||||
|
||||
// 响应式数据
|
||||
const userPoints = ref(0)
|
||||
const carouselItems = ref([
|
||||
{ image: '/imgs/top/1.jpg', title: '限时优惠活动' },
|
||||
{ image: '/imgs/top/2.jpg', title: '新用户专享' },
|
||||
{ image: '/imgs/top/3.jpg', title: '积分兑换' }
|
||||
{ image: '../..../../imgs/top/1.jpg', title: '限时优惠活动' },
|
||||
{ image: '../../imgs/top/2.jpg', title: '新用户专享' },
|
||||
{ image: '../../imgs/top/3.jpg', title: '积分兑换' }
|
||||
])
|
||||
const headerItems = ref([
|
||||
{ image: "/imgs/mainpage/交易记录.png", text: "交易记录", path: "/transfers" },
|
||||
{ image: "/imgs/mainpage/订单查询.png", text: "订单查询", path: "/points-history" },
|
||||
{ image: "/imgs/mainpage/客服中心.png", text: "客服中心", path: "/support" },
|
||||
{ image: "/imgs/mainpage/系统公告.png", text: "系统公告", path: "/announcements" }
|
||||
{ image: "../../imgs/mainpage/交易记录.png", text: "交易记录", path: "/transfers" },
|
||||
{ image: "../../imgs/mainpage/订单查询.png", text: "订单查询", path: "/points-history" },
|
||||
{ image: "../../imgs/mainpage/客服中心.png", text: "客服中心", path: "/support" },
|
||||
{ image: "../../imgs/mainpage/系统公告.png", text: "系统公告", path: "/announcements" }
|
||||
])
|
||||
const newsItems = ref([
|
||||
"最新活动:双十一特惠",
|
||||
@@ -145,7 +164,7 @@ export default {
|
||||
carouselItems,
|
||||
headerItems,
|
||||
newsItems,
|
||||
getUserPoints // 如果需要外部调用可以暴露
|
||||
getUserPoints// 如果需要外部调用可以暴露
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user