修复若干bug

This commit is contained in:
丁杰 2026-06-04 11:45:11 +08:00
parent fc3bd046e9
commit d8d6be6206
5 changed files with 2125 additions and 1763 deletions

View File

@ -1,22 +1,20 @@
<template> <template>
<view class="brand-card-comp" @click="onClick"> <view class="brand-card-comp" @click="onClick">
<image class="brand-bg" :src="item.bgSrc" mode="aspectFill"></image> <image class="brand-bg" :src="item.bgSrc" mode="aspectFill"></image>
<image class="mask-bg" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/9bca353c-fa74-407e-a69e-6f5e9aa43955.png" mode="widthFix"></image> <image class="mask-bg"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/9bca353c-fa74-407e-a69e-6f5e9aa43955.png"
mode="widthFix"></image>
<view class="card-content"> <view class="card-content">
<view class="avatar-wrapper" style="border-color: #F7E5D7;"> <view class="avatar-wrapper" style="border-color: #F7E5D7;">
<image class="avatar-img" :src="item.avatar || 'https://dummyimage.com/100x100/ccc/fff.png&text=logo'"></image> <image class="avatar-img" :src="item.avatar || 'https://dummyimage.com/100x100/ccc/fff.png&text=logo'">
</image>
</view> </view>
<text class="brand-name">{{ item.name }}</text> <text class="brand-name">{{ item.name }}</text>
<view class="tags-container"> <view class="tags-container">
<view <view class="tag-item" v-for="(tag, idx) in displayTags" :key="idx" :style="getTagStyle(tag)">
class="tag-item"
v-for="(tag, idx) in displayTags"
:key="idx"
:style="getTagStyle(tag)"
>
<image class="tag-icon" v-if="tag.icon" :src="tag.icon"></image> <image class="tag-icon" v-if="tag.icon" :src="tag.icon"></image>
<text class="tag-text">{{ tag.text }}</text> <text class="tag-text">{{ tag.text }}</text>
</view> </view>
@ -84,7 +82,15 @@ export default {
// 1. emit便 // 1. emit便
this.$emit('click', this.item); this.$emit('click', this.item);
// 2. // 2.
if (!uni.getStorageSync("accessToken")) {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return;
}
// 3.
if (this.item && this.item.id) { if (this.item && this.item.id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/jingxuan/brand-detail?id=${this.item.id}` url: `/pages/jingxuan/brand-detail?id=${this.item.id}`
@ -128,6 +134,7 @@ export default {
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
} }
.brand-bg { .brand-bg {
width: 100%; width: 100%;
height: 184rpx; height: 184rpx;
@ -136,6 +143,7 @@ export default {
left: 0; left: 0;
z-index: 1; z-index: 1;
} }
.mask-bg { .mask-bg {
width: 100%; width: 100%;
height: 251rpx; height: 251rpx;
@ -145,6 +153,7 @@ export default {
z-index: 2; z-index: 2;
display: block; display: block;
} }
.card-content { .card-content {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -156,6 +165,7 @@ export default {
align-items: center; align-items: center;
padding-bottom: 24rpx; padding-bottom: 24rpx;
} }
.avatar-wrapper { .avatar-wrapper {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
@ -169,10 +179,12 @@ export default {
margin-top: -38rpx; margin-top: -38rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.avatar-img { .avatar-img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.brand-name { .brand-name {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
@ -180,6 +192,7 @@ export default {
line-height: 34rpx; line-height: 34rpx;
margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.tags-container { .tags-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -187,6 +200,7 @@ export default {
gap: 20rpx; gap: 20rpx;
flex-wrap: wrap; flex-wrap: wrap;
} }
.tag-item { .tag-item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -196,12 +210,14 @@ export default {
background-color: transparent; background-color: transparent;
padding: 7rpx 12rpx; padding: 7rpx 12rpx;
} }
.tag-icon { .tag-icon {
width: 24rpx; width: 24rpx;
height: 22rpx; height: 22rpx;
margin-right: 6rpx; margin-right: 6rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.tag-text { .tag-text {
font-size: 20rpx; font-size: 20rpx;
line-height: 28rpx; line-height: 28rpx;

View File

@ -2,10 +2,8 @@
<view class="skill-item" @click="handleClick"> <view class="skill-item" @click="handleClick">
<view class="cover-box"> <view class="cover-box">
<image class="cover" :src="item.coverSrc" mode="aspectFill"></image> <image class="cover" :src="item.coverSrc" mode="aspectFill"></image>
<image <image v-if="item.video" class="play-icon"
class="play-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5c1ddfef-a200-424a-a9dc-03d9395568f6.png"></image>
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5c1ddfef-a200-424a-a9dc-03d9395568f6.png"
></image>
</view> </view>
<view class="skill-info"> <view class="skill-info">
<view class="skill-title line-2">{{ item.title }}</view> <view class="skill-title line-2">{{ item.title }}</view>
@ -14,10 +12,9 @@
<text class="type-text">{{ item.type || '平台课程' }}</text> <text class="type-text">{{ item.type || '平台课程' }}</text>
</view> </view>
<view class="skill-stats"> <view class="skill-stats">
<image <image class="view-icon"
class="view-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/2409b64a-56bb-4d9e-a4cc-5b3444fcf097.png">
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/2409b64a-56bb-4d9e-a4cc-5b3444fcf097.png" </image>
></image>
{{ formatViews(item.views) }}观看 · {{ item.time }} {{ formatViews(item.views) }}观看 · {{ item.time }}
</view> </view>
</view> </view>
@ -69,13 +66,20 @@ export default {
// 1. emit便 // 1. emit便
this.$emit('click', this.item); this.$emit('click', this.item);
// 2. // 2.
if (!uni.getStorageSync("accessToken")) {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return;
}
// 3.
if (this.item && this.item.id) { if (this.item && this.item.id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/jingxuan/skill-detail?id=${this.item.id}` url: `/pages/jingxuan/skill-detail?id=${this.item.id}`
}); });
} }
// /
} }
} }
} }
@ -188,5 +192,4 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
} }
</style> </style>

View File

@ -1,6 +1,8 @@
<template> <template>
<view class="homePage"> <view class="homePage">
<image class="page-bg" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0901dc51-ff5a-427f-aab1-993d80aced79.png" mode="widthFix"></image> <image class="page-bg"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0901dc51-ff5a-427f-aab1-993d80aced79.png"
mode="widthFix"></image>
<view class="header-section"> <view class="header-section">
<view class="user-info" @tap="handleLoginRedirect"> <view class="user-info" @tap="handleLoginRedirect">
@ -11,7 +13,8 @@
</view> </view>
</view> </view>
<view class="status-toggle" :class="{ 'is-closed': !isOpenStore }" @tap="toggleStatus" v-if="isLogin && isSettled"> <view class="status-toggle" :class="{ 'is-closed': !isOpenStore }" @tap="toggleStatus"
v-if="isLogin && userInfo.id_type > 0">
<text class="status-text">{{ isOpenStore ? '营业中' : '休息中' }}</text> <text class="status-text">{{ isOpenStore ? '营业中' : '休息中' }}</text>
<view class="toggle-dot"></view> <view class="toggle-dot"></view>
</view> </view>
@ -19,7 +22,9 @@
<view class="setup-modal-mask" v-if="showSetupModal" catchtouchmove="true"> <view class="setup-modal-mask" v-if="showSetupModal" catchtouchmove="true">
<view class="setup-modal-content"> <view class="setup-modal-content">
<image class="modal-bg" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ac2cb4aa-a7c5-4776-98f4-b77e9c0cfa85.png"></image> <image class="modal-bg"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ac2cb4aa-a7c5-4776-98f4-b77e9c0cfa85.png">
</image>
<view class="modal-header"> <view class="modal-header">
<text>温馨提示</text> <text>温馨提示</text>
@ -31,7 +36,9 @@
<view class="missing-list"> <view class="missing-list">
<view class="missing-item" v-if="!hasBusinessTime"> <view class="missing-item" v-if="!hasBusinessTime">
<view class="item-left"> <view class="item-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png"></image> <image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png">
</image>
<view class="item-texts"> <view class="item-texts">
<text class="item-title">营业时间未配置</text> <text class="item-title">营业时间未配置</text>
<text class="item-desc">请完善店铺的营业时间</text> <text class="item-desc">请完善店铺的营业时间</text>
@ -42,7 +49,9 @@
<view class="missing-item" v-if="!hasServiceSkill"> <view class="missing-item" v-if="!hasServiceSkill">
<view class="item-left"> <view class="item-left">
<image class="item-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png"></image> <image class="item-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png">
</image>
<view class="item-texts"> <view class="item-texts">
<text class="item-title">服务技能未配置</text> <text class="item-title">服务技能未配置</text>
<text class="item-desc">请完善服务技能</text> <text class="item-desc">请完善服务技能</text>
@ -53,10 +62,13 @@
<view class="missing-item" v-if="!isCertified"> <view class="missing-item" v-if="!isCertified">
<view class="item-left"> <view class="item-left">
<image class="item-icon" :src="isUnderReview ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25c444be-a66e-45d6-b50d-922149ff059f.png' : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png'"></image> <image class="item-icon"
:src="isUnderReview ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25c444be-a66e-45d6-b50d-922149ff059f.png' : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/21b26b44-5e36-4291-8900-705a3d5bfa90.png'">
</image>
<view class="item-texts"> <view class="item-texts">
<!-- 只有在审核中时赋予蓝色样式 blue-text --> <!-- 只有在审核中时赋予蓝色样式 blue-text -->
<text class="item-title" :class="{'blue-text': isUnderReview}">{{ isUnderReview ? '资质认证中' : '资质未认证' }}</text> <text class="item-title" :class="{ 'blue-text': isUnderReview }">{{ isUnderReview ?
'资质认证中' : '资质未认证' }}</text>
<text class="item-desc">请完成资质认证</text> <text class="item-desc">请完成资质认证</text>
</view> </view>
</view> </view>
@ -75,7 +87,8 @@
</view> </view>
<view class="settlement-guide card-box" v-if="isLogin && isUserInfoLoaded && !isCertified"> <view class="settlement-guide card-box" v-if="isLogin && isUserInfoLoaded && !isCertified">
<view class="guide-header" :style="{ backgroundImage: 'url(' + (isSettled ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/c3a6cdd8-0447-4b50-a8cc-7bab1eedb502.png' : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/138ccbc3-486d-4287-b67f-f809de99e408.png') + ')' }"> <view class="guide-header"
:style="{ backgroundImage: 'url(' + (isSettled ? 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/c3a6cdd8-0447-4b50-a8cc-7bab1eedb502.png' : 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/138ccbc3-486d-4287-b67f-f809de99e408.png') + ')' }">
<view class="guide-body"> <view class="guide-body">
<text class="guide-text">{{ isSettled ? '完成认证,开启您的接单之路' : '入驻美融融,生意更轻松' }}</text> <text class="guide-text">{{ isSettled ? '完成认证,开启您的接单之路' : '入驻美融融,生意更轻松' }}</text>
<view class="guide-btn" @tap="goToSettle">{{ isSettled ? '去认证' : '去入驻' }}</view> <view class="guide-btn" @tap="goToSettle">{{ isSettled ? '去认证' : '去入驻' }}</view>
@ -95,9 +108,14 @@
<view class="header-left"> <view class="header-left">
<text class="title">接单管理</text> <text class="title">接单管理</text>
<text class="update-time">更新时间{{ orderBasic.updateTime }}</text> <text class="update-time">更新时间{{ orderBasic.updateTime }}</text>
<image class="refresh-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/31c6eebc-5538-4c66-9b32-24dced170a99.png" @tap="fetchOrderNum"></image> <image class="refresh-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/31c6eebc-5538-4c66-9b32-24dced170a99.png"
@tap="fetchOrderNum"></image>
</view>
<view class="header-right" @tap="goToOrderList">更多数据 <image class="more-right-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ee119e24-1cb2-43df-86e6-61af8e9fd0ad.png">
</image>
</view> </view>
<view class="header-right" @tap="goToOrderList">更多数据 <image class="more-right-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ee119e24-1cb2-43df-86e6-61af8e9fd0ad.png"></image></view>
</view> </view>
<view class="stats-content"> <view class="stats-content">
<view class="stat-item"> <view class="stat-item">
@ -120,7 +138,9 @@
<view class="header-left"> <view class="header-left">
<text class="title">当日实时数据</text> <text class="title">当日实时数据</text>
<text class="update-time">更新时间{{ orderDetail.updateTime }}</text> <text class="update-time">更新时间{{ orderDetail.updateTime }}</text>
<image class="refresh-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/31c6eebc-5538-4c66-9b32-24dced170a99.png" @tap="fetchRealTimeData"></image> <image class="refresh-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/31c6eebc-5538-4c66-9b32-24dced170a99.png"
@tap="fetchRealTimeData"></image>
</view> </view>
</view> </view>
<view class="detail-content"> <view class="detail-content">
@ -128,20 +148,25 @@
<view class="ring-track"></view> <view class="ring-track"></view>
<view class="ring-progress" :style="{ 'background': progressGradient }"></view> <view class="ring-progress" :style="{ 'background': progressGradient }"></view>
<view class="dot start-dot" v-if="displayScore > 0"></view> <view class="dot start-dot" v-if="displayScore > 0"></view>
<view class="dot end-dot" v-if="displayScore > 0" :style="{'transform': `rotate(-${displayScoreDeg}deg) translateY(-67rpx)`}"></view> <view class="dot end-dot" v-if="displayScore > 0"
:style="{ 'transform': `rotate(-${displayScoreDeg}deg) translateY(-67rpx)` }"></view>
<text class="score-num">{{ displayScore.toFixed(1) }}</text> <text class="score-num">{{ displayScore.toFixed(1) }}</text>
<image class="score-tag-img" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/52005bc0-2896-407d-8826-f34539637d20.png" mode="aspectFit"></image> <image class="score-tag-img"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/52005bc0-2896-407d-8826-f34539637d20.png"
mode="aspectFit"></image>
</view> </view>
<view class="detail-grid"> <view class="detail-grid">
<view class="grid-item"> <view class="grid-item">
<text class="label">访问人数</text> <text class="label">访问人数</text>
<view class="val-box"><text class="val">{{ orderDetail.visitors }}</text> <text class="unit"></text></view> <view class="val-box"><text class="val">{{ orderDetail.visitors }}</text> <text
class="unit"></text></view>
<text class="yesterday">昨日{{ orderDetail.yVisitors }}</text> <text class="yesterday">昨日{{ orderDetail.yVisitors }}</text>
</view> </view>
<view class="grid-item"> <view class="grid-item">
<text class="label">下单量</text> <text class="label">下单量</text>
<view class="val-box"><text class="val">{{ orderDetail.orders }}</text> <text class="unit"></text></view> <view class="val-box"><text class="val">{{ orderDetail.orders }}</text> <text
class="unit"></text></view>
<text class="yesterday">昨日{{ orderDetail.yOrders }}</text> <text class="yesterday">昨日{{ orderDetail.yOrders }}</text>
</view> </view>
<view class="grid-item"> <view class="grid-item">
@ -157,7 +182,9 @@
</view> </view>
<view class="notice-bar card-box"> <view class="notice-bar card-box">
<image class="notice-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/75f624b8-a6ed-4787-9380-1a087062805b.png"></image> <image class="notice-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/75f624b8-a6ed-4787-9380-1a087062805b.png">
</image>
<swiper class="notice-swiper" vertical autoplay circular interval="3000"> <swiper class="notice-swiper" vertical autoplay circular interval="3000">
<swiper-item v-for="(msg, index) in noticeList" :key="index" @tap="goToNotice(msg)"> <swiper-item v-for="(msg, index) in noticeList" :key="index" @tap="goToNotice(msg)">
<text class="notice-text line-1">{{ msg.title }}</text> <text class="notice-text line-1">{{ msg.title }}</text>
@ -169,31 +196,28 @@
<view class="brands-section card-box"> <view class="brands-section card-box">
<view class="card-header"> <view class="card-header">
<view class="header-left"><text class="title" style="margin-left: 10rpx;">精选品牌</text></view> <view class="header-left"><text class="title" style="margin-left: 10rpx;">精选品牌</text></view>
<view class="header-right" @tap="goToBrandList">更多品牌 <image class="more-right-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ee119e24-1cb2-43df-86e6-61af8e9fd0ad.png"></image></view> <view class="header-right" @tap="goToBrandList">更多品牌 <image class="more-right-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ee119e24-1cb2-43df-86e6-61af8e9fd0ad.png">
</image>
</view>
</view> </view>
<view class="brand-grid"> <view class="brand-grid">
<brand-card <brand-card class="brand-card-wrap" v-for="(item, index) in brands" :key="index" :item="item"
class="brand-card-wrap" :tagKeys="item.tagKeys"></brand-card>
v-for="(item, index) in brands"
:key="index"
:item="item"
:tagKeys="item.tagKeys"
></brand-card>
</view> </view>
</view> </view>
<view class="skills-section card-box"> <view class="skills-section card-box">
<view class="card-header"> <view class="card-header">
<view class="header-left"><text class="title">技能集市</text></view> <view class="header-left"><text class="title">技能集市</text></view>
<view class="header-right" @tap="goToSkillList">更多技能 <image class="more-right-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ee119e24-1cb2-43df-86e6-61af8e9fd0ad.png"></image> </view> <view class="header-right" @tap="goToSkillList">更多技能 <image class="more-right-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ee119e24-1cb2-43df-86e6-61af8e9fd0ad.png">
</image>
</view>
</view> </view>
<view class="skill-list"> <view class="skill-list">
<skill-card <skill-card v-for="(item, index) in skills" :key="index" :item="item"></skill-card>
v-for="(item, index) in skills"
:key="index"
:item="item"
></skill-card>
</view> </view>
</view> </view>
@ -236,16 +260,49 @@ export default {
displayScore: 0, displayScore: 0,
animationTimer: null, animationTimer: null,
noticeList: [{ id: 0, title: '', url: '' }], noticeList: [{
id: 0,
title: '',
url: ''
}],
quickActions: [ quickActions: [{
{ name: '扫码验券', icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b128e423-e4b5-4ad6-bdf5-522de7a9bc68.png' , path: '/pages/shop/verify/verify-order'}, name: '扫码验券',
{ name: '服务管理', icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/a90f02a2-9d39-440a-ad20-a4337bcd1b38.png' , path: '/pages/artisan/service-list'}, icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b128e423-e4b5-4ad6-bdf5-522de7a9bc68.png',
{ name: '工位管理', icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4c503603-6c2f-4a7a-9329-5e54b8ca769e.png' , path: '/pages/shop/workSpace/list'}, path: '/pages/shop/verify/verify-order'
{ name: '财务管理', icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/728c659e-e395-4473-b83e-7e04539f7ec6.png' , path: '/pages/wallet/wallet'} },
{
name: '服务管理',
icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/a90f02a2-9d39-440a-ad20-a4337bcd1b38.png',
path: '/pages/artisan/service-list'
},
{
name: '工位管理',
icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4c503603-6c2f-4a7a-9329-5e54b8ca769e.png',
path: '/pages/shop/workSpace/list'
},
{
name: '财务管理',
icon: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/728c659e-e395-4473-b83e-7e04539f7ec6.png',
path: '/pages/wallet/wallet'
}
], ],
orderBasic: { updateTime: '--:--', waitStart: 0, waitFinish: 0, finished: 0 }, orderBasic: {
orderDetail: { updateTime: '--:--', score: '0.0', visitors: 0, yVisitors: 0, orders: 0, yOrders: 0, amount: '0.00', yAmount: '0.00' }, updateTime: '--:--',
waitStart: 0,
waitFinish: 0,
finished: 0
},
orderDetail: {
updateTime: '--:--',
score: '0.0',
visitors: 0,
yVisitors: 0,
orders: 0,
yOrders: 0,
amount: '0.00',
yAmount: '0.00'
},
brands: [], brands: [],
skills: [] skills: []
@ -278,9 +335,11 @@ export default {
// 使 authDetails // 使 authDetails
hasServiceSkill() { hasServiceSkill() {
// userInfo // userInfo
const fromUser = this.userInfo && Array.isArray(this.userInfo.servers_kill) && this.userInfo.servers_kill.length > 0; const fromUser = this.userInfo && Array.isArray(this.userInfo.servers_kill) && this.userInfo.servers_kill
.length > 0;
// authDetails // authDetails
const fromAuth = this.authDetails && Array.isArray(this.authDetails.servers_kill) && this.authDetails.servers_kill.length > 0; const fromAuth = this.authDetails && Array.isArray(this.authDetails.servers_kill) && this.authDetails
.servers_kill.length > 0;
// //
return this.isLogin && (fromUser || fromAuth); return this.isLogin && (fromUser || fromAuth);
@ -378,15 +437,24 @@ export default {
// //
formatMoney(amount) { formatMoney(amount) {
let num = parseFloat(amount); let num = parseFloat(amount);
if (isNaN(num)) return { val: '0', unit: '元' }; if (isNaN(num)) return {
val: '0',
unit: '元'
};
if (num >= 10000) { if (num >= 10000) {
// 10000parseFloat0 // 10000parseFloat0
let val = parseFloat((num / 10000).toFixed(2)); let val = parseFloat((num / 10000).toFixed(2));
return { val: val, unit: '万元' }; return {
val: val,
unit: '万元'
};
} }
// //
return { val: num, unit: '元' }; return {
val: num,
unit: '元'
};
}, },
// //
handleLoginRedirect() { handleLoginRedirect() {
@ -403,11 +471,15 @@ export default {
}, },
goToBusinessTime() { goToBusinessTime() {
this.showSetupModal = false; this.showSetupModal = false;
uni.navigateTo({ url: '/pages/shop/business-time' }); uni.navigateTo({
url: '/pages/shop/business-time'
});
}, },
goToServiceSkill() { goToServiceSkill() {
this.showSetupModal = false; this.showSetupModal = false;
uni.navigateTo({ url: '/pages/shop/service-skills' }); uni.navigateTo({
url: '/pages/shop/service-skills'
});
}, },
// ( / ) // ( / )
@ -431,10 +503,14 @@ export default {
goToSettle() { goToSettle() {
if (!this.isSettled) { if (!this.isSettled) {
// //
uni.navigateTo({ url: '/pages/ruzhu/ruzhu' }); uni.navigateTo({
url: '/pages/ruzhu/ruzhu'
});
} else if (this.isUnderReview) { } else if (this.isUnderReview) {
// //
uni.navigateTo({ url: '/pages/ruzhu/ruzhu?type=1' }); uni.navigateTo({
url: '/pages/ruzhu/ruzhu?type=1'
});
} else { } else {
// //
this.navigateToForm(); this.navigateToForm();
@ -457,24 +533,47 @@ export default {
}, },
goToBrandList() { goToBrandList() {
uni.navigateTo({ url: '/pages/jingxuan/selected-brands' }); if (!this.isLogin) {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return
}
uni.navigateTo({
url: '/pages/jingxuan/selected-brands'
});
}, },
goToSkillList() { goToSkillList() {
uni.navigateTo({ url: '/pages/jingxuan/selected-skills' }); if (!this.isLogin) {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return
}
uni.navigateTo({
url: '/pages/jingxuan/selected-skills'
});
}, },
// () // ()
handleQuickAction(item) { handleQuickAction(item) {
if (item.name === '扫码验券') { if (item.name === '扫码验券') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/shop/verify/verify-order', url: '/pages/shop/verify/verify-order',
fail: (err) => { console.error('跳转失败:', err); } fail: (err) => {
console.error('跳转失败:', err);
}
}); });
return; return;
} // 2. } // 2.
else if (item.path) { else if (item.path) {
uni.navigateTo({ uni.navigateTo({
url: item.path, url: item.path,
fail: () => { uni.showToast({ title: '页面开发中...', icon: 'none' }); } fail: () => {
uni.showToast({
title: '页面开发中...',
icon: 'none'
});
}
}); });
} }
}, },
@ -566,7 +665,10 @@ export default {
// //
fetchNoticeList() { fetchNoticeList() {
request.post('/sj/notice/list', { page: 1, limit: 5 }).then(res => { request.post('/sj/notice/list', {
page: 1,
limit: 5
}).then(res => {
if (res.code == 200 && res.data && res.data.list.length > 0) { if (res.code == 200 && res.data && res.data.list.length > 0) {
this.noticeList = res.data.list; this.noticeList = res.data.list;
} }
@ -575,7 +677,10 @@ export default {
// //
fetchBrandList() { fetchBrandList() {
request.post('/sj/brand/list', { page: 1, limit: 4 }).then(res => { request.post('/sj/brand/list', {
page: 1,
limit: 4
}).then(res => {
if (res.code == 200 && res.data && res.data.list) { if (res.code == 200 && res.data && res.data.list) {
this.brands = res.data.list.map(item => { this.brands = res.data.list.map(item => {
let tags = []; let tags = [];
@ -586,8 +691,10 @@ export default {
return { return {
id: item.id, id: item.id,
name: item.name, name: item.name,
bgSrc: item.cover_img || 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d02b2d8b-0e01-4c6d-bbee-c60dccf4867c.jpg', bgSrc: item.cover_img ||
avatar: item.logo_img || 'https://dummyimage.com/100x100/ccc/fff.png&text=Avatar', 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d02b2d8b-0e01-4c6d-bbee-c60dccf4867c.jpg',
avatar: item.logo_img ||
'https://dummyimage.com/100x100/ccc/fff.png&text=Avatar',
tagKeys: tags tagKeys: tags
}; };
}); });
@ -597,7 +704,10 @@ export default {
// //
fetchSkillList() { fetchSkillList() {
request.post('/sj/skill/list', { page: 1, limit: 4 }).then(res => { request.post('/sj/skill/list', {
page: 1,
limit: 4
}).then(res => {
if (res.code == 200 && res.data && res.data.list) { if (res.code == 200 && res.data && res.data.list) {
this.skills = res.data.list.map(item => { this.skills = res.data.list.map(item => {
return { return {
@ -606,8 +716,10 @@ export default {
type: item.link_name || '平台课程', type: item.link_name || '平台课程',
views: item.browse_num || 0, views: item.browse_num || 0,
time: item.create_time ? item.create_time.split(' ')[0] : '', time: item.create_time ? item.create_time.split(' ')[0] : '',
coverSrc: item.cover_img || 'https://dummyimage.com/200x150/ccc/fff.png&text=Video', coverSrc: item.cover_img ||
typeIcon: item.link_logo || '' 'https://dummyimage.com/200x150/ccc/fff.png&text=Video',
typeIcon: item.link_logo || '',
video: item.video || ''
}; };
}); });
} }
@ -618,15 +730,35 @@ export default {
// //
goToNotice(msg) { goToNotice(msg) {
if(msg.id) { uni.navigateTo({ url: `/pages/notice/detail?id=${msg.id}` }); } if (!this.isLogin) {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return
}
if (msg.id) {
uni.navigateTo({
url: `/pages/notice/detail?id=${msg.id}`
});
}
}, },
// //
goToNoticeList() { goToNoticeList() {
uni.navigateTo({ url: '/pages/notice/notice_list' }); if (!this.isLogin) {
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
return
}
uni.navigateTo({
url: '/pages/notice/notice_list'
});
}, },
// //
goToOrderList() { goToOrderList() {
uni.switchTab({ url: '/pages/order/userorder-list' }); uni.switchTab({
url: '/pages/order/userorder-list'
});
}, },
// / // /
@ -644,7 +776,10 @@ export default {
let newStatus = currentStatus == 1 ? 2 : 1; let newStatus = currentStatus == 1 ? 2 : 1;
// Loading // Loading
uni.showLoading({ title: '切换中...', mask: true }); uni.showLoading({
title: '切换中...',
mask: true
});
// //
request.post("/sj/sjordertaking", { request.post("/sj/sjordertaking", {
@ -655,11 +790,17 @@ export default {
// //
this.userInfo.order_taking = newStatus; // this.userInfo.order_taking = newStatus; //
this.getUserInfo(); // this.getUserInfo(); //
uni.showToast({ title: newStatus == 1 ? '已开启营业' : '已休息', icon: 'none' }); uni.showToast({
title: newStatus == 1 ? '已开启营业' : '已休息',
icon: 'none'
});
}).catch(() => { }).catch(() => {
// //
uni.hideLoading(); uni.hideLoading();
uni.showToast({ title: '网络异常,切换失败', icon: 'none' }); uni.showToast({
title: '网络异常,切换失败',
icon: 'none'
});
}); });
}, },
@ -704,7 +845,10 @@ export default {
/* ============ 提示弹窗样式 ============ */ /* ============ 提示弹窗样式 ============ */
.setup-modal-mask { .setup-modal-mask {
position: fixed; position: fixed;
top: 0; left: 0; right: 0; bottom: 0; top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
z-index: 9999; z-index: 9999;
display: flex; display: flex;
@ -713,7 +857,8 @@ export default {
.setup-modal-content { .setup-modal-content {
width: 630rpx; width: 630rpx;
height: 775rpx; /* 根据要求绝对固定宽高 */ height: 775rpx;
/* 根据要求绝对固定宽高 */
background: #FFFFFF; background: #FFFFFF;
border-radius: 32rpx; border-radius: 32rpx;
position: relative; position: relative;
@ -722,7 +867,8 @@ export default {
.modal-bg { .modal-bg {
position: absolute; position: absolute;
top: 0; left: 0; top: 0;
left: 0;
width: 630rpx; width: 630rpx;
height: 265rpx; height: 265rpx;
z-index: 0; z-index: 0;
@ -761,7 +907,8 @@ export default {
.missing-list { .missing-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 46rpx; /* 间距拉开显得不那么拥挤 */ gap: 46rpx;
/* 间距拉开显得不那么拥挤 */
.missing-item { .missing-item {
display: flex; display: flex;
@ -776,7 +923,8 @@ export default {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 16rpx; margin-right: 16rpx;
flex-shrink: 0; /* 防止图标被挤压变形 */ flex-shrink: 0;
/* 防止图标被挤压变形 */
margin-top: 6rpx; margin-top: 6rpx;
} }
@ -808,10 +956,18 @@ export default {
font-weight: 400; font-weight: 400;
margin-top: -45rpx; margin-top: -45rpx;
&.orange { color: #FF7B00; } &.orange {
&.grey { color: #999999; } color: #FF7B00;
}
&.grey {
color: #999999;
}
/* 增加浅绿色样式 */ /* 增加浅绿色样式 */
&.light-green { color: #5CAC81; } &.light-green {
color: #5CAC81;
}
} }
} }
} }
@ -837,6 +993,7 @@ export default {
} }
} }
} }
/* ==================================== */ /* ==================================== */
.homePage { .homePage {
@ -877,6 +1034,7 @@ export default {
.header-left { .header-left {
display: flex; display: flex;
align-items: center; align-items: center;
.title { .title {
margin-right: 20rpx; margin-right: 20rpx;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -887,6 +1045,7 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
.update-time { .update-time {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
@ -895,14 +1054,15 @@ export default {
line-height: 28rpx; line-height: 28rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
margin-top: -4rpx;
} }
.refresh-icon { .refresh-icon {
width: 18rpx; width: 18rpx;
height: 18rpx; height: 18rpx;
margin-left: 10rpx; margin-left: 10rpx;
} }
} }
.header-right { .header-right {
font-weight: 400; font-weight: 400;
font-size: 20rpx; font-size: 20rpx;
@ -922,24 +1082,32 @@ export default {
.user-info { .user-info {
display: flex; display: flex;
align-items: center; align-items: center;
.avatar { .avatar {
width: 96rpx; width: 76rpx;
height: 96rpx; height: 76rpx;
border-radius: 50%; border-radius: 50%;
margin-right: 20rpx; margin-right: 20rpx;
} }
.name { .name {
font-weight: 500; height: 42rpx;
font-family: PingFangTC, PingFangTC;
font-weight: bold;
font-size: 30rpx; font-size: 30rpx;
color: #333333; color: #333333;
line-height: 42rpx; line-height: 42rpx;
margin-bottom: 8rpx;
} }
.desc { .desc {
height: 28rpx;
font-family: PingFangTC, PingFangTC;
font-weight: 400; font-weight: 400;
font-size: 20rpx; font-size: 20rpx;
color: #858796; color: #858796;
line-height: 28rpx; line-height: 28rpx;
text-align: left;
font-style: normal;
} }
} }
@ -953,18 +1121,19 @@ export default {
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
background-image: linear-gradient( background-image: linear-gradient(316deg,
316deg,
rgba(255, 161, 203, 1) 0, rgba(255, 161, 203, 1) 0,
rgba(251, 143, 180, 1) 49.381741%, rgba(251, 143, 180, 1) 49.381741%,
rgba(255, 130, 239, 1) 100% rgba(255, 130, 239, 1) 100%);
);
transition: all 0.3s ease; transition: all 0.3s ease;
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; left: 0; width: 100%; height: 100%; top: 0;
left: 0;
width: 100%;
height: 100%;
background: url("https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/269c1024-34ec-42af-8b20-1ce047c9851b.png") no-repeat center; background: url("https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/269c1024-34ec-42af-8b20-1ce047c9851b.png") no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
opacity: 0; opacity: 0;
@ -999,9 +1168,11 @@ export default {
&::before { &::before {
opacity: 1; opacity: 1;
} }
.status-text { .status-text {
transform: translateX(46rpx); transform: translateX(46rpx);
} }
.toggle-dot { .toggle-dot {
transform: translate(-113rpx, 2rpx); transform: translate(-113rpx, 2rpx);
} }
@ -1059,11 +1230,13 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.action-icon { .action-icon {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
margin-bottom: 13rpx; margin-bottom: 13rpx;
} }
.action-text { .action-text {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
@ -1079,10 +1252,12 @@ export default {
background: linear-gradient(176deg, #F0F4FF 0%, #FFFFFF 100%); background: linear-gradient(176deg, #F0F4FF 0%, #FFFFFF 100%);
border-radius: 20rpx; border-radius: 20rpx;
border: 1rpx solid #FFFFFF; border: 1rpx solid #FFFFFF;
.stats-content { .stats-content {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
text-align: center; text-align: center;
.num { .num {
display: block; display: block;
font-weight: 500; font-weight: 500;
@ -1091,6 +1266,7 @@ export default {
line-height: 56rpx; line-height: 56rpx;
font-style: normal; font-style: normal;
} }
.label { .label {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
@ -1211,6 +1387,7 @@ export default {
color: #333333; color: #333333;
line-height: 56rpx; line-height: 56rpx;
} }
.unit { .unit {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
@ -1237,6 +1414,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 13rpx 30rpx; padding: 13rpx 30rpx;
min-height: 66rpx;
box-sizing: border-box;
background: url("https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/3d9c6b4b-ef6f-4242-abd4-6194d13e02dc.png"); background: url("https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/3d9c6b4b-ef6f-4242-abd4-6194d13e02dc.png");
background-size: contain; background-size: contain;
@ -1271,6 +1450,7 @@ export default {
.brands-section { .brands-section {
padding: 20rpx 20rpx; padding: 20rpx 20rpx;
.brand-grid { .brand-grid {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -1288,10 +1468,14 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.skill-item { .skill-item {
display: flex; display: flex;
margin-bottom: 30rpx; margin-bottom: 30rpx;
&:last-child { margin-bottom: 0; }
&:last-child {
margin-bottom: 0;
}
.cover-box { .cover-box {
position: relative; position: relative;
@ -1306,11 +1490,14 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.play-icon { .play-icon {
position: absolute; position: absolute;
top: 50%; left: 50%; top: 50%;
left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 39rpx; height: 39rpx; width: 39rpx;
height: 39rpx;
} }
} }
@ -1331,6 +1518,7 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.skill-type { .skill-type {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1343,6 +1531,7 @@ export default {
margin-right: 8rpx; margin-right: 8rpx;
border-radius: 50%; border-radius: 50%;
} }
.type-text { .type-text {
background: #f9d3d760; background: #f9d3d760;
border-radius: 7rpx; border-radius: 7rpx;
@ -1353,12 +1542,14 @@ export default {
padding: 2rpx 10rpx; padding: 2rpx 10rpx;
} }
} }
.skill-stats { .skill-stats {
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
margin-top: 10rpx; margin-top: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.view-icon { .view-icon {
width: 26rpx; width: 26rpx;
height: 22rpx; height: 22rpx;
@ -1370,7 +1561,17 @@ export default {
} }
} }
.line-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .line-1 {
.line-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.line-2 {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
} }
</style> </style>

View File

@ -17,39 +17,25 @@
<text>{{ useMockData ? '关闭模拟数据' : '开启模拟数据' }}</text> <text>{{ useMockData ? '关闭模拟数据' : '开启模拟数据' }}</text>
</view> --> </view> -->
<view class="banner-section" v-if="bannerList && bannerList.length || info.video"> <view class="banner-section" v-if="bannerList && bannerList.length">
<!-- 原生视频组件 (就地播放) --> <!-- 轮播图区域 -->
<video v-if="info.video && isVideoPlaying" id="myVideo" class="banner-video" :src="info.video" autoplay controls <swiper class="banner-swiper" circular @change="onSwiperChange" :autoplay="false" :current="currentBannerIndex">
object-fit="cover"></video> <!-- 视频作为第一项 -->
<swiper-item v-if="info.video">
<!-- 轮播图区域 (当视频播放时隐藏) --> <video id="myVideo" class="banner-video" :src="info.video" :autoplay="currentBannerIndex === 0" controls
<swiper v-else class="banner-swiper" circular @change="onSwiperChange" :autoplay="!info.video"> object-fit="cover" :show-center-play-btn="false" :show-play-btn="false" @play="onVideoPlay"
@pause="onVideoPause" @ended="onVideoEnded"></video>
</swiper-item>
<!-- 图片轮播 -->
<swiper-item v-for="(item, index) in bannerList" :key="index"> <swiper-item v-for="(item, index) in bannerList" :key="index">
<image class="banner-img" :src="item" mode="aspectFill"></image> <image class="banner-img" :src="item" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- 居中的视频播放大图标 (当视频播放时隐藏) --> <!-- 指示器 -->
<image v-if="info.video && !isVideoPlaying" class="center-play-icon" <view class="indicator" v-if="bannerList.length > 0">
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/bb720bb0-4ada-49f6-9ce5-38abfd613d5d.png" <text>{{ currentBannerIndex + 1 }} / {{ totalSlides }}</text>
@click="playVideoInPlace"></image>
<!-- 视频/图片 相册切换组件 (当视频播放时隐藏) -->
<view class="album" v-if="(info.video || bannerList.length > 0) && !isVideoPlaying">
<view class="album-left" @click="info.video ? playVideoInPlace() : goAlbum()">
{{ info.video ? "视频" : "图片" }}
</view>
<view class="album-line"></view>
<view class="album-right" @click="goAlbum">
<view class="album-right-text">相册</view>
<image src="/static/images/icons/right7_13.png" class="album-right-img"></image>
</view>
</view>
<!-- 指示器 (当视频播放时隐藏) -->
<view class="indicator" v-if="!isVideoPlaying && bannerList.length > 0">
<text>{{ currentBannerIndex + 1 }} / {{ bannerList.length }}</text>
</view> </view>
</view> </view>
@ -164,6 +150,27 @@
</view> </view>
</view> </view>
<!-- 拨打电话选择弹窗 -->
<view class="phone-popup" :class="{ show: showPhonePopup }">
<view class="phone-popup-mask" @click="closePhonePopup"></view>
<view class="phone-popup-content">
<view class="phone-popup-header">
<text class="phone-popup-title">拨打电话</text>
</view>
<view class="phone-popup-body">
<view class="phone-option" v-if="info.contact_phone" @click="selectPhone(info.contact_phone)">
<text class="phone-number">{{ info.contact_phone }}</text>
</view>
<view class="phone-option" v-if="info.alternate_phone" @click="selectPhone(info.alternate_phone)">
<text class="phone-number">{{ info.alternate_phone }}</text>
</view>
</view>
<view class="phone-popup-cancel" @click="closePhonePopup">
<text class="cancel-text">取消</text>
</view>
</view>
</view>
<tipsPopup2 :show="tipShow" @closePopup="closePopup" sureText="确认" @okBtn="okBtn"> <tipsPopup2 :show="tipShow" @closePopup="closePopup" sureText="确认" @okBtn="okBtn">
{{ tipsText }} {{ tipsText }}
</tipsPopup2> </tipsPopup2>
@ -196,6 +203,7 @@ export default {
tipShow: false, // tipShow: false, //
tipsText: "", // tipsText: "", //
tipType: "", // tipType: "", //
showPhonePopup: false, //
isCollected: false, // isCollected: false, //
// //
@ -204,7 +212,6 @@ export default {
iconCollectOn: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/fe2011b0-a34d-46ee-911a-0ea6f099ad77.png', iconCollectOn: 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/fe2011b0-a34d-46ee-911a-0ea6f099ad77.png',
// ================================== // ==================================
isVideoPlaying: false, //
phoneIconTop: 20, // Top phoneIconTop: 20, // Top
phoneIconRight: 50, // Right phoneIconRight: 50, // Right
@ -296,6 +303,10 @@ export default {
showTabSection() { showTabSection() {
return this.availableTabs.length > 0; return this.availableTabs.length > 0;
}, },
// +
totalSlides() {
return this.bannerList.length + (this.info.video ? 1 : 0);
},
canSubmit() { canSubmit() {
const d = this.formData; const d = this.formData;
const baseValid = d.contact_name && d.contact_phone && d.province_code && d.city_code && d.area_code && d.intention; const baseValid = d.contact_name && d.contact_phone && d.province_code && d.city_code && d.area_code && d.intention;
@ -439,18 +450,49 @@ export default {
// //
makeCall() { makeCall() {
// if (!this.isLogin) {
const phone = this.info.contact_phone || ''; this.tipsText = "您现在还未登录,是否确定登录?";
if (phone) { this.tipShow = true;
this.tipType = "login";
return; //
}
const contactPhone = this.info.contact_phone || '';
const alternatePhone = this.info.alternate_phone || '';
//
if (contactPhone && alternatePhone) {
this.showPhonePopup = true;
} else if (contactPhone) {
//
this.doMakeCall(contactPhone);
} else if (alternatePhone) {
//
this.doMakeCall(alternatePhone);
} else {
uni.showToast({ title: '暂无联系电话', icon: 'none' });
}
},
//
selectPhone(phone) {
this.closePhonePopup();
this.doMakeCall(phone);
},
//
closePhonePopup() {
this.showPhonePopup = false;
},
//
doMakeCall(phone) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: String(phone), phoneNumber: String(phone),
fail: (err) => { fail: (err) => {
console.log('取消拨打或拨打失败', err); console.log('取消拨打或拨打失败', err);
} }
}); });
} else {
uni.showToast({ title: '暂无联系电话', icon: 'none' });
}
}, },
goAlbum() { goAlbum() {
@ -459,9 +501,18 @@ export default {
}); });
}, },
// //
playVideoInPlace() { onVideoPlay() {
this.isVideoPlaying = true; console.log('视频开始播放');
},
onVideoPause() {
console.log('视频暂停');
},
onVideoEnded() {
//
if (this.bannerList.length > 0) {
this.currentBannerIndex = 1;
}
}, },
// Mock // Mock
@ -472,7 +523,6 @@ export default {
}, },
getBrandDetails() { getBrandDetails() {
this.isVideoPlaying = false; //
if (this.useMockData) { if (this.useMockData) {
this.injectMockData(); this.injectMockData();
return; return;
@ -1132,4 +1182,100 @@ export default {
.popup-btn.confirm .btn-text { .popup-btn.confirm .btn-text {
color: #FFFFFF; color: #FFFFFF;
} }
/* 拨打电话弹窗样式 */
.phone-popup {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
visibility: hidden;
opacity: 0;
transition: all 0.3s ease;
}
.phone-popup.show {
visibility: visible;
opacity: 1;
}
.phone-popup-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.phone-popup-content {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background-color: #F5F5F5;
border-radius: 24rpx 24rpx 0 0;
transform: translateY(100%);
transition: transform 0.3s ease;
}
.phone-popup.show .phone-popup-content {
transform: translateY(0);
}
.phone-popup-header {
padding: 30rpx;
text-align: center;
background-color: #FFFFFF;
border-radius: 24rpx 24rpx 0 0;
}
.phone-popup-title {
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.phone-popup-body {
background-color: #FFFFFF;
margin-top: 2rpx;
}
.phone-option {
display: flex;
flex-direction: column;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #EEEEEE;
}
.phone-option:last-child {
border-bottom: none;
}
.phone-label {
font-size: 26rpx;
color: #999999;
margin-bottom: 10rpx;
}
.phone-number {
font-size: 34rpx;
color: #333333;
font-weight: 500;
}
.phone-popup-cancel {
margin-top: 16rpx;
padding: 30rpx;
text-align: center;
background-color: #FFFFFF;
}
.cancel-text {
font-size: 32rpx;
color: #333333;
}
</style> </style>

View File

@ -2,7 +2,8 @@
<view class="collection-page"> <view class="collection-page">
<custom-navbar title="我的收藏" :showBack="true" backgroundColor="#FFFFFF" :show-headle="true" borderBottom="none" <custom-navbar title="我的收藏" :showBack="true" backgroundColor="#FFFFFF" :show-headle="true" borderBottom="none"
headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png" @onHeadleClick="goToSearch"> headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png"
@onHeadleClick="goToSearch">
</custom-navbar> </custom-navbar>
<view class="nav-placeholder" :style="{ height: navHeight + 'px' }"></view> <view class="nav-placeholder" :style="{ height: navHeight + 'px' }"></view>
@ -10,18 +11,10 @@
<view class="tab-bar-wrap" :style="{ top: navHeight + 'px' }"> <view class="tab-bar-wrap" :style="{ top: navHeight + 'px' }">
<view class="tab-bar"> <view class="tab-bar">
<view class="tab-items"> <view class="tab-items">
<view <view class="tab-item" :class="{ active: currentTab === 'brand' }" @tap="switchTab('brand')">
class="tab-item"
:class="{ active: currentTab === 'brand' }"
@tap="switchTab('brand')"
>
收藏的品牌 收藏的品牌
</view> </view>
<view <view class="tab-item" :class="{ active: currentTab === 'course' }" @tap="switchTab('course')">
class="tab-item"
:class="{ active: currentTab === 'course' }"
@tap="switchTab('course')"
>
收藏的课程 收藏的课程
</view> </view>
</view> </view>
@ -32,7 +25,8 @@
</view> </view>
</view> </view>
<view class="filter-panel" :class="{ 'show': filterVisible }" :style="{ top: filterTop + 'px' }" catchtouchmove="true"> <view class="filter-panel" :class="{ 'show': filterVisible }" :style="{ top: filterTop + 'px' }"
catchtouchmove="true">
<view class="filter-mask" @tap="closeFilterPanel"></view> <view class="filter-mask" @tap="closeFilterPanel"></view>
<view class="filter-container"> <view class="filter-container">
@ -40,13 +34,8 @@
<view class="filter-group" v-for="group in brandFilterData" :key="group.id"> <view class="filter-group" v-for="group in brandFilterData" :key="group.id">
<view class="group-title">{{ group.title }}</view> <view class="group-title">{{ group.title }}</view>
<view class="pill-list"> <view class="pill-list">
<view <view class="pill-item" v-for="sub in group.children" :key="sub.id"
class="pill-item" :class="{ active: selectedSecondIds.includes(sub.id) }" @tap="toggleSecondSelect(sub.id)">
v-for="sub in group.children"
:key="sub.id"
:class="{ active: selectedSecondIds.includes(sub.id) }"
@tap="toggleSecondSelect(sub.id)"
>
{{ sub.title }} {{ sub.title }}
</view> </view>
</view> </view>
@ -54,18 +43,12 @@
</scroll-view> </scroll-view>
<view v-else class="course-filter"> <view v-else class="course-filter">
<view <view class="course-type-item" :class="{ active: selectedCourseType === 'platform' }"
class="course-type-item" @tap="selectCourseType('platform')">
:class="{ active: selectedCourseType === 'platform' }"
@tap="selectCourseType('platform')"
>
平台课程 平台课程
</view> </view>
<view <view class="course-type-item" :class="{ active: selectedCourseType === 'brand' }"
class="course-type-item" @tap="selectCourseType('brand')">
:class="{ active: selectedCourseType === 'brand' }"
@tap="selectCourseType('brand')"
>
品牌课程 品牌课程
</view> </view>
</view> </view>
@ -79,30 +62,24 @@
<view class="collection-content" v-if="currentTab === 'brand'"> <view class="collection-content" v-if="currentTab === 'brand'">
<view class="brand-grid" v-if="filteredBrandList.length > 0"> <view class="brand-grid" v-if="filteredBrandList.length > 0">
<brand-card <brand-card class="brand-card-wrap" v-for="(item, index) in filteredBrandList" :key="index" :item="item"
class="brand-card-wrap" :tagKeys="item.tagKeys" @click="goToBrandDetail(item)"></brand-card>
v-for="(item, index) in filteredBrandList"
:key="index"
:item="item"
:tagKeys="item.tagKeys"
@click="goToBrandDetail(item)"
></brand-card>
</view> </view>
<view class="empty-state" v-else> <view class="empty-state" v-else>
<image class="empty-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/da814ede-1adc-4f90-8cdf-5357a12fab27.png"></image> <image class="empty-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/da814ede-1adc-4f90-8cdf-5357a12fab27.png">
</image>
</view> </view>
</view> </view>
<view class="collection-content" v-else> <view class="collection-content" v-else>
<view class="course-list" v-if="filteredCourseList.length > 0"> <view class="course-list" v-if="filteredCourseList.length > 0">
<skill-card <skill-card v-for="(item, index) in filteredCourseList" :key="index" :item="item"></skill-card>
v-for="(item, index) in filteredCourseList"
:key="index"
:item="item"
></skill-card>
</view> </view>
<view class="empty-state" v-else> <view class="empty-state" v-else>
<image class="empty-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/da814ede-1adc-4f90-8cdf-5357a12fab27.png"></image> <image class="empty-icon"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/da814ede-1adc-4f90-8cdf-5357a12fab27.png">
</image>
</view> </view>
</view> </view>
@ -445,7 +422,8 @@ export default {
/* 将页面左右 padding 转移到内容区,保证 Tab 背景贯穿全屏 */ /* 将页面左右 padding 转移到内容区,保证 Tab 背景贯穿全屏 */
.tab-bar-wrap { .tab-bar-wrap {
position: sticky; /* 吸顶,保证滑动页面时一直显示在最前面 */ position: sticky;
/* 吸顶,保证滑动页面时一直显示在最前面 */
background: #fff; background: #fff;
padding: 10rpx 24rpx; padding: 10rpx 24rpx;
z-index: 101; z-index: 101;
@ -496,6 +474,7 @@ export default {
width: 16rpx; width: 16rpx;
height: 10rpx; height: 10rpx;
transition: transform 0.3s ease; transition: transform 0.3s ease;
/* 展开时图标倒转 */ /* 展开时图标倒转 */
&.rotate { &.rotate {
transform: rotate(180deg); transform: rotate(180deg);
@ -510,23 +489,33 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 100; /* 低于 Tab区的101保证隐藏时躲在其后 */ z-index: 100;
pointer-events: none; /* 面板关闭时,穿透点击到底部列表 */ /* 低于 Tab区的101保证隐藏时躲在其后 */
overflow: hidden; /* 防止抽屉向上滑出时外溢 */ pointer-events: none;
/* 面板关闭时,穿透点击到底部列表 */
overflow: hidden;
/* 防止抽屉向上滑出时外溢 */
&.show { &.show {
pointer-events: auto; /* 打开时恢复点击拦截 */ pointer-events: auto;
/* 打开时恢复点击拦截 */
.filter-mask { .filter-mask {
opacity: 1; opacity: 1;
} }
.filter-container { .filter-container {
transform: translateY(50rpx); /* 滑出 */ transform: translateY(50rpx);
/* 滑出 */
} }
} }
.filter-mask { .filter-mask {
position: absolute; position: absolute;
top: 0; left: 0; right: 0; bottom: 0; top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.4);
opacity: 0; opacity: 0;
transition: opacity 0.3s ease-in-out; transition: opacity 0.3s ease-in-out;
@ -534,7 +523,9 @@ export default {
.filter-container { .filter-container {
position: absolute; position: absolute;
top: 0; left: 0; right: 0; top: 0;
left: 0;
right: 0;
background: #fff; background: #fff;
border-radius: 0 0 30rpx 30rpx; border-radius: 0 0 30rpx 30rpx;
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
@ -542,7 +533,8 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.05); box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.05);
transform: translateY(-100%); /* 默认隐藏在上方即Tab背后 */ transform: translateY(-100%);
/* 默认隐藏在上方即Tab背后 */
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
} }
} }
@ -551,6 +543,7 @@ export default {
.filter-scroll { .filter-scroll {
max-height: 50vh; max-height: 50vh;
} }
.filter-group { .filter-group {
margin-bottom: 30rpx; margin-bottom: 30rpx;
@ -571,7 +564,8 @@ export default {
/* 通用胶囊按钮 */ /* 通用胶囊按钮 */
.pill-item { .pill-item {
width: calc(25% - 16rpx); /* 25%是一行四个,减去间距 */ width: calc(25% - 16rpx);
/* 25%是一行四个,减去间距 */
height: 58rpx; height: 58rpx;
background: #F5F5F5; background: #F5F5F5;
font-weight: 400; font-weight: 400;
@ -586,7 +580,8 @@ export default {
border-radius: 12rpx; border-radius: 12rpx;
transition: all 0.3s; transition: all 0.3s;
box-sizing: border-box; /* 防止 padding 会撑大盒子 */ box-sizing: border-box;
/* 防止 padding 会撑大盒子 */
&.active { &.active {
background: #FFF0F2; background: #FFF0F2;
@ -621,7 +616,8 @@ export default {
padding-top: 20rpx; padding-top: 20rpx;
/* border-top: 1rpx solid #F5F5F5; */ /* border-top: 1rpx solid #F5F5F5; */
.reset-btn, .confirm-btn { .reset-btn,
.confirm-btn {
width: 47%; width: 47%;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;