refactor(分享功能): 移除分享到朋友圈功能并删除测试页面
移除多个页面的enableShareTimeline配置项 删除ShareButtonTest测试页面及相关配置
Showing
7 changed files
with
7 additions
and
213 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2025-06-28 10:33:00 | 2 | * @Date: 2025-06-28 10:33:00 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-06 22:11:14 | 4 | + * @LastEditTime: 2025-09-17 19:58:26 |
| 5 | * @FilePath: /lls_program/src/app.config.js | 5 | * @FilePath: /lls_program/src/app.config.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -35,7 +35,6 @@ export default { | ... | @@ -35,7 +35,6 @@ export default { |
| 35 | 'pages/FamilyRank/index', | 35 | 'pages/FamilyRank/index', |
| 36 | 'pages/PosterCheckin/index', | 36 | 'pages/PosterCheckin/index', |
| 37 | 'pages/CheckinList/index', | 37 | 'pages/CheckinList/index', |
| 38 | - 'pages/ShareButtonTest/index', | ||
| 39 | ], | 38 | ], |
| 40 | window: { | 39 | window: { |
| 41 | backgroundTextStyle: 'light', | 40 | backgroundTextStyle: 'light', | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2025-08-28 14:50:55 | 2 | * @Date: 2025-08-28 14:50:55 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-04 12:07:53 | 4 | + * @LastEditTime: 2025-09-17 19:57:17 |
| 5 | * @FilePath: /lls_program/src/pages/ActivitiesCover/index.config.js | 5 | * @FilePath: /lls_program/src/pages/ActivitiesCover/index.config.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| 8 | export default { | 8 | export default { |
| 9 | navigationBarTitleText: '活动海报', | 9 | navigationBarTitleText: '活动海报', |
| 10 | enableShareAppMessage: true, | 10 | enableShareAppMessage: true, |
| 11 | - enableShareTimeline: true, | 11 | + // enableShareTimeline: true, |
| 12 | usingComponents: { | 12 | usingComponents: { |
| 13 | }, | 13 | }, |
| 14 | } | 14 | } | ... | ... |
src/pages/ShareButtonTest/index.vue
deleted
100644 → 0
| 1 | -<template> | ||
| 2 | - <view class="test-page"> | ||
| 3 | - <view class="test-header"> | ||
| 4 | - <text class="test-title">ShareButton组件分享功能测试</text> | ||
| 5 | - </view> | ||
| 6 | - | ||
| 7 | - <view class="test-content"> | ||
| 8 | - <!-- 测试数据展示 --> | ||
| 9 | - <view class="test-section"> | ||
| 10 | - <text class="section-title">测试数据:</text> | ||
| 11 | - <view class="data-display"> | ||
| 12 | - <text>活动标题:{{ testActivityData.title }}</text> | ||
| 13 | - <text>活动描述:{{ testActivityData.description }}</text> | ||
| 14 | - <text>分享标题:{{ testShareConfig.title }}</text> | ||
| 15 | - <text>分享路径:{{ testShareConfig.path }}</text> | ||
| 16 | - </view> | ||
| 17 | - </view> | ||
| 18 | - | ||
| 19 | - <!-- ShareButton组件测试 --> | ||
| 20 | - <view class="test-section"> | ||
| 21 | - <text class="section-title">ShareButton组件:</text> | ||
| 22 | - <ShareButton | ||
| 23 | - :activity-data="testActivityData" | ||
| 24 | - :share-config="testShareConfig" | ||
| 25 | - @share-activity="onShareActivity" | ||
| 26 | - @share-poster="onSharePoster" | ||
| 27 | - /> | ||
| 28 | - </view> | ||
| 29 | - | ||
| 30 | - <!-- 分享日志显示 --> | ||
| 31 | - <view class="test-section"> | ||
| 32 | - <text class="section-title">分享日志:</text> | ||
| 33 | - <view class="log-display"> | ||
| 34 | - <text v-for="(log, index) in shareLogs" :key="index" class="log-item"> | ||
| 35 | - {{ log }} | ||
| 36 | - </text> | ||
| 37 | - </view> | ||
| 38 | - </view> | ||
| 39 | - </view> | ||
| 40 | - </view> | ||
| 41 | -</template> | ||
| 42 | - | ||
| 43 | -<script setup> | ||
| 44 | -import { ref } from 'vue' | ||
| 45 | -import Taro from '@tarojs/taro' | ||
| 46 | -import ShareButton from '@/components/ShareButton/index.vue' | ||
| 47 | - | ||
| 48 | -/** | ||
| 49 | - * ShareButton组件分享功能测试页面 | ||
| 50 | - */ | ||
| 51 | - | ||
| 52 | -// 测试用的活动数据 | ||
| 53 | -const testActivityData = ref({ | ||
| 54 | - id: 'test-activity-001', | ||
| 55 | - title: '测试活动 - 南京路商圈时尚Citywalk', | ||
| 56 | - description: '这是一个用于测试ShareButton组件分享功能的测试活动', | ||
| 57 | - banner: 'https://img.yzcdn.cn/vant/cat.jpeg', | ||
| 58 | - dateRange: '2024年1月15日 - 2024年1月31日' | ||
| 59 | -}) | ||
| 60 | - | ||
| 61 | -// 测试用的分享配置 | ||
| 62 | -const testShareConfig = ref({ | ||
| 63 | - title: '精彩活动等你参与 - 测试分享', | ||
| 64 | - path: '/pages/ShareButtonTest/index', | ||
| 65 | - imageUrl: 'https://img.yzcdn.cn/vant/cat.jpeg' | ||
| 66 | -}) | ||
| 67 | - | ||
| 68 | -// 分享日志 | ||
| 69 | -const shareLogs = ref([ | ||
| 70 | - '页面初始化完成', | ||
| 71 | - 'ShareButton组件已加载' | ||
| 72 | -]) | ||
| 73 | - | ||
| 74 | -/** | ||
| 75 | - * 处理分享活动事件 | ||
| 76 | - * @param {Object} data - 分享数据 | ||
| 77 | - */ | ||
| 78 | -const onShareActivity = (data) => { | ||
| 79 | - console.log('=== 测试页面收到分享活动事件 ===') | ||
| 80 | - console.log('分享数据:', data) | ||
| 81 | - | ||
| 82 | - const logMessage = `[${new Date().toLocaleTimeString()}] 分享活动事件触发 - 标题: ${data.shareData?.title || '未知'}` | ||
| 83 | - shareLogs.value.push(logMessage) | ||
| 84 | - | ||
| 85 | - Taro.showToast({ | ||
| 86 | - title: '分享活动事件已触发', | ||
| 87 | - icon: 'success', | ||
| 88 | - duration: 2000 | ||
| 89 | - }) | ||
| 90 | -} | ||
| 91 | - | ||
| 92 | -/** | ||
| 93 | - * 处理分享海报事件 | ||
| 94 | - * @param {Object} data - 活动数据 | ||
| 95 | - */ | ||
| 96 | -const onSharePoster = (data) => { | ||
| 97 | - console.log('=== 测试页面收到分享海报事件 ===') | ||
| 98 | - console.log('活动数据:', data) | ||
| 99 | - | ||
| 100 | - const logMessage = `[${new Date().toLocaleTimeString()}] 分享海报事件触发 - 活动: ${data.title || '未知'}` | ||
| 101 | - shareLogs.value.push(logMessage) | ||
| 102 | - | ||
| 103 | - Taro.showToast({ | ||
| 104 | - title: '分享海报事件已触发', | ||
| 105 | - icon: 'success', | ||
| 106 | - duration: 2000 | ||
| 107 | - }) | ||
| 108 | -} | ||
| 109 | - | ||
| 110 | -/** | ||
| 111 | - * 页面分享配置(用于测试页面本身的分享) | ||
| 112 | - */ | ||
| 113 | -const onShareAppMessage = () => { | ||
| 114 | - const logMessage = `[${new Date().toLocaleTimeString()}] 页面分享函数被调用` | ||
| 115 | - shareLogs.value.push(logMessage) | ||
| 116 | - | ||
| 117 | - return { | ||
| 118 | - title: 'ShareButton组件测试页面', | ||
| 119 | - path: '/pages/ShareButtonTest/index' | ||
| 120 | - } | ||
| 121 | -} | ||
| 122 | - | ||
| 123 | -// 导出分享方法供Taro使用 | ||
| 124 | -defineExpose({ | ||
| 125 | - onShareAppMessage | ||
| 126 | -}) | ||
| 127 | -</script> | ||
| 128 | - | ||
| 129 | -<style lang="less" scoped> | ||
| 130 | -.test-page { | ||
| 131 | - min-height: 100vh; | ||
| 132 | - background: #f5f5f5; | ||
| 133 | - padding: 40rpx; | ||
| 134 | -} | ||
| 135 | - | ||
| 136 | -.test-header { | ||
| 137 | - text-align: center; | ||
| 138 | - margin-bottom: 60rpx; | ||
| 139 | -} | ||
| 140 | - | ||
| 141 | -.test-title { | ||
| 142 | - font-size: 36rpx; | ||
| 143 | - font-weight: bold; | ||
| 144 | - color: #333; | ||
| 145 | -} | ||
| 146 | - | ||
| 147 | -.test-content { | ||
| 148 | - display: flex; | ||
| 149 | - flex-direction: column; | ||
| 150 | - gap: 40rpx; | ||
| 151 | -} | ||
| 152 | - | ||
| 153 | -.test-section { | ||
| 154 | - background: white; | ||
| 155 | - border-radius: 16rpx; | ||
| 156 | - padding: 30rpx; | ||
| 157 | - box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); | ||
| 158 | -} | ||
| 159 | - | ||
| 160 | -.section-title { | ||
| 161 | - font-size: 32rpx; | ||
| 162 | - font-weight: bold; | ||
| 163 | - color: #333; | ||
| 164 | - margin-bottom: 20rpx; | ||
| 165 | - display: block; | ||
| 166 | -} | ||
| 167 | - | ||
| 168 | -.data-display { | ||
| 169 | - display: flex; | ||
| 170 | - flex-direction: column; | ||
| 171 | - gap: 16rpx; | ||
| 172 | -} | ||
| 173 | - | ||
| 174 | -.data-display text { | ||
| 175 | - font-size: 28rpx; | ||
| 176 | - color: #666; | ||
| 177 | - padding: 12rpx; | ||
| 178 | - background: #f8f9fa; | ||
| 179 | - border-radius: 8rpx; | ||
| 180 | -} | ||
| 181 | - | ||
| 182 | -.log-display { | ||
| 183 | - max-height: 400rpx; | ||
| 184 | - overflow-y: auto; | ||
| 185 | - background: #f8f9fa; | ||
| 186 | - border-radius: 8rpx; | ||
| 187 | - padding: 20rpx; | ||
| 188 | -} | ||
| 189 | - | ||
| 190 | -.log-item { | ||
| 191 | - display: block; | ||
| 192 | - font-size: 24rpx; | ||
| 193 | - color: #666; | ||
| 194 | - margin-bottom: 8rpx; | ||
| 195 | - padding: 8rpx; | ||
| 196 | - background: white; | ||
| 197 | - border-radius: 4rpx; | ||
| 198 | - border-left: 4rpx solid #007aff; | ||
| 199 | -} | ||
| 200 | -</style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2025-08-27 18:25:54 | 2 | * @Date: 2025-08-27 18:25:54 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-08-27 19:58:26 | 4 | + * @LastEditTime: 2025-09-17 19:58:30 |
| 5 | * @FilePath: /lls_program/src/pages/Welcome/index.config.js | 5 | * @FilePath: /lls_program/src/pages/Welcome/index.config.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -10,5 +10,5 @@ export default { | ... | @@ -10,5 +10,5 @@ export default { |
| 10 | navigationBarBackgroundColor: '#fff', | 10 | navigationBarBackgroundColor: '#fff', |
| 11 | navigationBarTextStyle: 'black', | 11 | navigationBarTextStyle: 'black', |
| 12 | enableShareAppMessage: true, | 12 | enableShareAppMessage: true, |
| 13 | - enableShareTimeline: true | 13 | + // enableShareTimeline: true |
| 14 | } | 14 | } | ... | ... |
-
Please register or login to post a comment