diff --git a/pages/home/components/brand-card.vue b/pages/home/components/brand-card.vue
index c3ab8e5..4abd582 100644
--- a/pages/home/components/brand-card.vue
+++ b/pages/home/components/brand-card.vue
@@ -1,212 +1,228 @@
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
- {{ tag.text }}
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/home/components/skill-card.vue b/pages/home/components/skill-card.vue
index e5c3e01..cff9da6 100644
--- a/pages/home/components/skill-card.vue
+++ b/pages/home/components/skill-card.vue
@@ -2,10 +2,8 @@
-
+
{{ item.title }}
@@ -14,10 +12,9 @@
{{ item.type || '平台课程' }}
-
+
+
{{ formatViews(item.views) }}观看 · {{ item.time }}
@@ -68,14 +65,21 @@ export default {
handleClick() {
// 1. 保留 emit,方便外层如果有特殊需求可以监听到
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) {
uni.navigateTo({
url: `/pages/jingxuan/skill-detail?id=${this.item.id}`
});
}
- // 跳转到技能/课程详情页
}
}
}
@@ -85,7 +89,7 @@ export default {
.skill-item {
display: flex;
margin-bottom: 20rpx;
-
+
&:last-child {
margin-bottom: 0;
}
@@ -99,17 +103,17 @@ export default {
margin-right: 24rpx;
flex-shrink: 0;
- .cover {
- width: 100%;
- height: 100%;
+ .cover {
+ width: 100%;
+ height: 100%;
}
-
+
.play-icon {
position: absolute;
- top: 50%;
+ top: 50%;
left: 50%;
transform: translate(-50%, -50%);
- width: 39rpx;
+ width: 39rpx;
height: 39rpx;
}
}
@@ -132,20 +136,20 @@ export default {
font-weight: 400;
line-height: 40rpx;
}
-
+
.skill-type {
display: flex;
align-items: center;
font-size: 22rpx;
margin-top: 10rpx;
-
- .type-icon {
- width: 26rpx;
- height: 26rpx;
- margin-right: 8rpx;
+
+ .type-icon {
+ width: 26rpx;
+ height: 26rpx;
+ margin-right: 8rpx;
border-radius: 50%;
}
-
+
.type-text {
border-radius: 7rpx;
font-weight: 400;
@@ -153,25 +157,25 @@ export default {
line-height: 33rpx;
padding: 2rpx 10rpx;
}
-
+
&.platform-course .type-text {
background: #f9d3d760;
color: #E55463;
}
-
+
&.brand-course .type-text {
background: #f9d3d760;
color: #E55463;
}
}
-
+
.skill-stats {
font-size: 22rpx;
color: #999;
margin-top: 10rpx;
display: flex;
align-items: center;
-
+
.view-icon {
width: 26rpx;
height: 22rpx;
@@ -188,5 +192,4 @@ export default {
-webkit-line-clamp: 2;
overflow: hidden;
}
-
\ No newline at end of file
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 3ec9aa2..626fc87 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -1,1376 +1,1577 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发布服务请完善以下资料:
-
-
-
-
-
-
- 营业时间未配置
- 请完善店铺的营业时间
-
-
- 去配置
-
-
-
-
-
-
- 服务技能未配置
- 请完善服务技能
-
-
- 去配置
-
-
-
-
-
-
-
- {{ isUnderReview ? '资质认证中' : '资质未认证' }}
- 请完成资质认证
-
-
-
-
- {{ isUnderReview ? '查看进度' : '去认证' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
- {{ orderBasic.waitStart }}
- 待开始
-
-
- {{ orderBasic.waitFinish }}
- 待完成
-
-
- {{ orderBasic.finished }}
- 已完成
-
-
-
-
-
-
-
-
-
-
-
-
- {{ displayScore.toFixed(1) }}
-
-
-
-
-
- 访问人数
- {{ orderDetail.visitors }} 人
- 昨日{{ orderDetail.yVisitors }}人
-
-
- 下单量
- {{ orderDetail.orders }} 单
- 昨日{{ orderDetail.yOrders }}单
-
-
- 成交金额
-
- {{ formattedAmount.val }}
- {{ formattedAmount.unit }}
-
- 昨日{{ formattedYAmount.val }}{{ formattedYAmount.unit }}
-
-
-
-
-
-
-
-
-
- {{ msg.title }}
-
-
- 点击查看
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/jingxuan/brand-detail.vue b/pages/jingxuan/brand-detail.vue
index 600d72a..1edc59c 100644
--- a/pages/jingxuan/brand-detail.vue
+++ b/pages/jingxuan/brand-detail.vue
@@ -17,39 +17,25 @@
{{ useMockData ? '关闭模拟数据' : '开启模拟数据' }}
-->
-
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
- {{ info.video ? "视频" : "图片" }}
-
-
-
- 相册
-
-
-
-
-
-
- {{ currentBannerIndex + 1 }} / {{ bannerList.length }}
+
+
+ {{ currentBannerIndex + 1 }} / {{ totalSlides }}
@@ -164,6 +150,27 @@
+
+
+
{{ tipsText }}
@@ -196,6 +203,7 @@ export default {
tipShow: false, // 弹窗控制
tipsText: "", // 弹窗提示文本
tipType: "", // 弹窗类型判断
+ showPhonePopup: 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',
// ==================================
- isVideoPlaying: false, // 是否正在就地播放视频
phoneIconTop: 20, // 顶部电话图标初始Top
phoneIconRight: 50, // 顶部电话图标初始Right
@@ -296,6 +303,10 @@ export default {
showTabSection() {
return this.availableTabs.length > 0;
},
+ // 总轮播数(视频+图片)
+ totalSlides() {
+ return this.bannerList.length + (this.info.video ? 1 : 0);
+ },
canSubmit() {
const d = this.formData;
const baseValid = d.contact_name && d.contact_phone && d.province_code && d.city_code && d.area_code && d.intention;
@@ -439,29 +450,69 @@ export default {
// 拨打电话面板
makeCall() {
- // 兼容可能存在的多种手机号字段
- const phone = this.info.contact_phone || '';
- if (phone) {
- uni.makePhoneCall({
- phoneNumber: String(phone),
- fail: (err) => {
- console.log('取消拨打或拨打失败', err);
- }
- });
+ if (!this.isLogin) {
+ this.tipsText = "您现在还未登录,是否确定登录?";
+ 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({
+ phoneNumber: String(phone),
+ fail: (err) => {
+ console.log('取消拨打或拨打失败', err);
+ }
+ });
+ },
+
goAlbum() {
uni.navigateTo({
url: `/pages/album/index?id=${this.brandId}&user_type=2`
});
},
- // 就地播放视频
- playVideoInPlace() {
- this.isVideoPlaying = true;
+ // 视频事件处理
+ onVideoPlay() {
+ console.log('视频开始播放');
+ },
+ onVideoPause() {
+ console.log('视频暂停');
+ },
+ onVideoEnded() {
+ // 视频播放结束,切换到下一张图片
+ if (this.bannerList.length > 0) {
+ this.currentBannerIndex = 1;
+ }
},
// 悬浮按钮切换 Mock 数据
@@ -472,7 +523,6 @@ export default {
},
getBrandDetails() {
- this.isVideoPlaying = false; // 每次刷新数据重置播放状态
if (this.useMockData) {
this.injectMockData();
return;
@@ -1132,4 +1182,100 @@ export default {
.popup-btn.confirm .btn-text {
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;
+}
\ No newline at end of file
diff --git a/pages/my/myFavorite.vue b/pages/my/myFavorite.vue
index 2542dcf..0bbfe33 100644
--- a/pages/my/myFavorite.vue
+++ b/pages/my/myFavorite.vue
@@ -2,26 +2,19 @@
+ headleSrc="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/51ebca5d-95c5-4fb8-8aa3-560a79100d25.png"
+ @onHeadleClick="goToSearch">
-
+
-
+
收藏的品牌
-
+
收藏的课程
@@ -32,21 +25,17 @@
-
+
-
+
{{ group.title }}
-
+
{{ sub.title }}
@@ -54,18 +43,12 @@
-
+
平台课程
-
+
品牌课程
@@ -79,30 +62,24 @@
-
+
-
+
+
-
+
-
+
+
@@ -114,7 +91,7 @@