diff --git a/mini/pages/bazi/bazi.js b/mini/pages/bazi/bazi.js index 4550d41..bb48794 100644 --- a/mini/pages/bazi/bazi.js +++ b/mini/pages/bazi/bazi.js @@ -149,5 +149,18 @@ Page({ goFortune() { wx.navigateTo({ url: '/pages/fortune/fortune' }); + }, + + onShareAppMessage() { + return { + title: '八字排盘 - 生辰八字查询', + path: '/pages/bazi/bazi' + }; + }, + + onShareTimeline() { + return { + title: '八字排盘 - 生辰八字查询' + }; } }); diff --git a/mini/pages/birth-profiles/birth-profiles.js b/mini/pages/birth-profiles/birth-profiles.js index da78dfe..718965e 100644 --- a/mini/pages/birth-profiles/birth-profiles.js +++ b/mini/pages/birth-profiles/birth-profiles.js @@ -104,5 +104,18 @@ Page({ // 未登录时引导回个人中心登录 goLogin() { wx.navigateBack(); + }, + + onShareAppMessage() { + return { + title: '生辰档案 - 老黄历', + path: '/pages/birth-profiles/birth-profiles' + }; + }, + + onShareTimeline() { + return { + title: '生辰档案 - 老黄历' + }; } }); diff --git a/mini/pages/bookmarks/bookmarks.js b/mini/pages/bookmarks/bookmarks.js index 0fb6116..9a28457 100644 --- a/mini/pages/bookmarks/bookmarks.js +++ b/mini/pages/bookmarks/bookmarks.js @@ -24,5 +24,18 @@ Page({ openDetail(e) { const date = e.currentTarget.dataset.date; wx.navigateTo({ url: `/pages/day-detail/day-detail?date=${date}` }); + }, + + onShareAppMessage() { + return { + title: '我的收藏 - 老黄历', + path: '/pages/bookmarks/bookmarks' + }; + }, + + onShareTimeline() { + return { + title: '我的收藏 - 老黄历' + }; } }); diff --git a/mini/pages/calendar/calendar.js b/mini/pages/calendar/calendar.js index bd37927..6eba98d 100644 --- a/mini/pages/calendar/calendar.js +++ b/mini/pages/calendar/calendar.js @@ -82,5 +82,16 @@ Page({ } }, - noop() {} + onShareAppMessage() { + return { + title: '万年历 - 农历公历对照查询', + path: '/pages/calendar/calendar' + }; + }, + + onShareTimeline() { + return { + title: '万年历 - 农历公历对照查询' + }; + } }); diff --git a/mini/pages/day-detail/day-detail.js b/mini/pages/day-detail/day-detail.js index 2707c45..54ede13 100644 --- a/mini/pages/day-detail/day-detail.js +++ b/mini/pages/day-detail/day-detail.js @@ -39,5 +39,25 @@ Page({ goBazi() { wx.navigateTo({ url: '/pages/bazi/bazi' }); + }, + + onShareAppMessage() { + const { dayInfo } = this.data; + const title = dayInfo.lunarMonthName + ? `${dayInfo.lunarMonthName}${dayInfo.lunarDayName} 黄历详情` + : '每日黄历详情'; + return { + title, + path: `/pages/day-detail/day-detail?date=${this.data.date}` + }; + }, + + onShareTimeline() { + const { dayInfo } = this.data; + return { + title: dayInfo.lunarMonthName + ? `${dayInfo.lunarMonthName}${dayInfo.lunarDayName} 黄历详情` + : '每日黄历详情' + }; } }); diff --git a/mini/pages/divination/divination.js b/mini/pages/divination/divination.js index 717d6bd..ef17288 100644 --- a/mini/pages/divination/divination.js +++ b/mini/pages/divination/divination.js @@ -60,5 +60,18 @@ Page({ const { boneYearIndex, boneMonthIndex, boneDayIndex, boneHourIndex } = this.data; const result = calculateBoneWeight(boneYearIndex, boneMonthIndex + 1, boneDayIndex + 1, boneHourIndex); this.setData({ boneResult: result }); + }, + + onShareAppMessage() { + return { + title: '占卜工具 - 梅花易数称骨算命', + path: '/pages/divination/divination' + }; + }, + + onShareTimeline() { + return { + title: '占卜工具 - 梅花易数称骨算命' + }; } }); diff --git a/mini/pages/fortune/fortune.js b/mini/pages/fortune/fortune.js index fcd45bf..a649468 100644 --- a/mini/pages/fortune/fortune.js +++ b/mini/pages/fortune/fortune.js @@ -43,5 +43,18 @@ Page({ goBazi() { wx.switchTab({ url: '/pages/bazi/bazi' }); + }, + + onShareAppMessage() { + return { + title: '每日运势 - 今日运势查询', + path: '/pages/fortune/fortune' + }; + }, + + onShareTimeline() { + return { + title: '每日运势 - 今日运势查询' + }; } }); diff --git a/mini/pages/preferences/preferences.js b/mini/pages/preferences/preferences.js index 7bdc212..de65406 100644 --- a/mini/pages/preferences/preferences.js +++ b/mini/pages/preferences/preferences.js @@ -50,5 +50,18 @@ Page({ onHighlightLunarChange(e) { this.setData({ highlightLunar: e.detail.value }); this.saveSettings(); + }, + + onShareAppMessage() { + return { + title: '偏好设置 - 老黄历', + path: '/pages/preferences/preferences' + }; + }, + + onShareTimeline() { + return { + title: '偏好设置 - 老黄历' + }; } }); diff --git a/mini/pages/settings/settings.js b/mini/pages/settings/settings.js index 34ccc94..4dfaeda 100644 --- a/mini/pages/settings/settings.js +++ b/mini/pages/settings/settings.js @@ -46,7 +46,7 @@ Page({ success: (loginRes) => { if (!loginRes.code) { this.setData({ logging: false }); - wx.showToast({ title: '微信登录失败', icon: 'none' }); + wx.showToast({ title: '授权登录失败', icon: 'none' }); return; } request({ @@ -72,7 +72,7 @@ Page({ }, fail: () => { this.setData({ logging: false }); - wx.showToast({ title: '微信登录失败', icon: 'none' }); + wx.showToast({ title: '授权登录失败', icon: 'none' }); } }); }, @@ -100,5 +100,18 @@ Page({ } else { wx.navigateTo({ url }); } + }, + + onShareAppMessage() { + return { + title: '老黄历 - 个人中心', + path: '/pages/settings/settings' + }; + }, + + onShareTimeline() { + return { + title: '老黄历 - 个人中心' + }; } }); diff --git a/mini/pages/settings/settings.wxml b/mini/pages/settings/settings.wxml index ef0793e..171aab8 100644 --- a/mini/pages/settings/settings.wxml +++ b/mini/pages/settings/settings.wxml @@ -8,25 +8,24 @@ - {{userInfo.nickname || '微信用户'}} + {{userInfo.nickname || '授权用户'}} 已登录,生辰档案云端同步 退出 - - + + - 未登录 - 绑定的生辰仅保存在本机,登录后才生效 + 未登录 + 登录后生辰档案云端同步,换设备不丢失 - {{logging ? '登录中…' : '微信登录'}} - 登录后可将生辰档案同步到云端,换设备不丢失 - + {{logging ? '登录中…' : '授权登录'}} + @@ -76,10 +75,9 @@ 关于 - - 老黄历小程序 v{{version}} + + 老黄历 v{{version}} 构建 #{{buildNumber}} ({{commitSha}}) - 提供农历、黄历、八字、许愿等功能 diff --git a/mini/pages/settings/settings.wxss b/mini/pages/settings/settings.wxss index bd7d6cc..854c9bc 100644 --- a/mini/pages/settings/settings.wxss +++ b/mini/pages/settings/settings.wxss @@ -1,17 +1,17 @@ .container { - padding: 20rpx; + padding: 16rpx; } .section-title { - font-size: 28rpx; + font-size: 26rpx; font-weight: 600; - margin-bottom: 16rpx; + margin-bottom: 8rpx; color: #C41E3A; } .avatar { - width: 96rpx; - height: 96rpx; + width: 72rpx; + height: 72rpx; border-radius: 50%; } @@ -21,14 +21,21 @@ justify-content: center; background: #C41E3A; color: #FFFFFF; - font-size: 40rpx; + font-size: 32rpx; +} + +.btn-sm { + padding: 10rpx 28rpx; + font-size: 26rpx; + border-radius: 32rpx; + white-space: nowrap; } .menu-item { display: flex; justify-content: space-between; align-items: center; - padding: 24rpx 0; + padding: 18rpx 0; border-bottom: 1rpx solid #E8D5C4; } @@ -37,7 +44,7 @@ } .menu-label { - font-size: 28rpx; + font-size: 26rpx; } .menu-right { @@ -47,11 +54,11 @@ } .menu-count { - font-size: 24rpx; + font-size: 22rpx; color: #9E8E7E; } .menu-arrow { color: #C9B8A6; - font-size: 36rpx; + font-size: 32rpx; } diff --git a/mini/pages/solar-terms/solar-terms.js b/mini/pages/solar-terms/solar-terms.js index 462b419..506adc7 100644 --- a/mini/pages/solar-terms/solar-terms.js +++ b/mini/pages/solar-terms/solar-terms.js @@ -32,5 +32,16 @@ Page({ // 按日期排序 terms.sort((a, b) => new Date(a.date) - new Date(b.date)); this.setData({ terms }); + onShareAppMessage() { + return { + title: '二十四节气 - 节气查询', + path: '/pages/solar-terms/solar-terms' + }; + }, + + onShareTimeline() { + return { + title: '二十四节气 - 节气查询' + }; } }); diff --git a/mini/pages/wish-detail/wish-detail.js b/mini/pages/wish-detail/wish-detail.js index deda90f..0ebe750 100644 --- a/mini/pages/wish-detail/wish-detail.js +++ b/mini/pages/wish-detail/wish-detail.js @@ -53,4 +53,11 @@ Page({ path: `/pages/wish-detail/wish-detail?id=${wish ? wish.id : ''}`, }; }, + + onShareTimeline() { + const { wish } = this.data; + return { + title: wish ? `我的愿望:${wish.content.substring(0, 20)}...` : '快来许愿吧!' + }; + } }); diff --git a/mini/project.config.json b/mini/project.config.json index af1ed37..7d646c9 100644 --- a/mini/project.config.json +++ b/mini/project.config.json @@ -47,5 +47,6 @@ "editorSetting": { "tabIndent": "insertSpaces", "tabSize": 2 - } -} + }, + "isGameTourist": false +} \ No newline at end of file