This commit is contained in:
2025-11-05 11:25:36 +08:00
13 changed files with 1384 additions and 709 deletions

View File

@@ -3,6 +3,10 @@
<view class="app-container">
<!-- 顶部头部区域 -->
<view class="container-header">
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序使用 image 标签作为背景 -->
<image class="header-bg-image" src="/static/icon/background2.png" mode="aspectFill"></image>
<!-- #endif -->
<view class="header-top">
<view
class="header-btnLf button-click"
@@ -507,14 +511,33 @@ function getNextDates({ startDate = "", count = 6 }) {
}
.app-container .container-header {
position: relative;
/* #ifndef MP-WEIXIN */
background: url("@/static/icon/background2.png") 0 0 no-repeat;
background-size: 100% 400rpx;
/* #endif */
/* #ifdef MP-WEIXIN */
/* 小程序使用 image 标签,背景样式在 image 上设置 */
/* #endif */
}
/* #ifdef MP-WEIXIN */
.app-container .container-header .header-bg-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 400rpx;
z-index: 0;
}
/* #endif */
.app-container .container-header .header-top {
display: flex;
line-height: calc(88rpx - 14rpx);
padding: 16rpx 44rpx 14rpx 44rpx;
position: relative;
z-index: 1;
}
.app-container .container-header .header-top .header-btnLf {
@@ -551,6 +574,7 @@ function getNextDates({ startDate = "", count = 6 }) {
padding: 0 24rpx;
width: calc(100% - 48rpx);
position: relative;
z-index: 1;
}
.app-container .container-header .header-input .iconsearch {

View File

@@ -701,9 +701,43 @@ const handleServiceClick = (serviceType) => {
}
};
// 处理直播按钮点击
// 处理直播按钮点击 - 跳转微信视频号
const handleLiveClick = () => {
$api.msg('该功能正在开发中');
// #ifdef MP-WEIXIN
const feedId = 'sphKH1AEeLfTJJE';
// 使用微信原生 API 打开视频号直播
if (typeof wx !== 'undefined' && wx.openChannelsUserProfile) {
wx.openChannelsUserProfile({
// feedId: feedId,
finderUserName: feedId, // 视频号 finderUserName如果feedId足够可以留空
success: (res) => {
console.log('打开视频号成功', res);
},
fail: (err) => {
console.error('打开视频号失败', err);
$api.msg(err.errMsg || '无法打开直播,请稍后重试');
}
});
} else {
// 如果 API 不存在,尝试使用 uni API
uni.openChannelsLive({
feedId: feedId,
success: (res) => {
console.log('打开视频号成功', res);
},
fail: (err) => {
console.error('打开视频号失败', err);
$api.msg('无法打开直播,请检查微信版本或稍后重试');
}
});
}
// #endif
// #ifndef MP-WEIXIN
// 非微信小程序环境提示
$api.msg('该功能仅在微信小程序中可用');
// #endif
};
// 跳转到测试页面

View File

@@ -1,5 +1,5 @@
<template>
<AppLayout title="我的" back-gorund-color="#F4F4F4">
<AppLayout back-gorund-color="#F4F4F4">
<!-- 自定义tabbar -->
<CustomTabBar :currentPage="4" />
<!-- 企业用户信息卡片 -->

View File

@@ -1,5 +1,5 @@
<template>
<AppLayout title="附近" :use-scroll-view="false">
<AppLayout :use-scroll-view="false">
<template #headerleft>
<view class="btnback">
<image src="@/static/icon/back.png" @click="navBack"></image>
@@ -19,10 +19,10 @@
<component :is="components[index]" :ref="(el) => handelComponentsRef(el, index)" />
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<oneComponent v-show="currentIndex === 0" :ref="(el) => handelComponentsRef(el, index)" />
<twoComponent v-show="currentIndex === 1" :ref="(el) => handelComponentsRef(el, index)" />
<threeComponent v-show="currentIndex === 2" :ref="(el) => handelComponentsRef(el, index)" />
<fourComponent v-show="currentIndex === 3" :ref="(el) => handelComponentsRef(el, index)" />
<oneComponent v-if="index === 0" :ref="(el) => handelComponentsRef(el, index)" />
<twoComponent v-if="index === 1" :ref="(el) => handelComponentsRef(el, index)" />
<threeComponent v-if="index === 2" :ref="(el) => handelComponentsRef(el, index)" />
<fourComponent v-if="index === 3" :ref="(el) => handelComponentsRef(el, index)" />
<!-- #endif -->
</swiper-item>
</swiper>