feat(aigc): add shared work top bar and back fixes

- add leftAction prop to AigcTopBar to switch between back arrow and home icon
- pass source=sharedWork query param when reLaunching home from shared work page
- update home page to detect shared work source, adjust top bar and back behavior
- add CSS styling for home top bar icon
- update root page back handler to exit WeChat mini program
This commit is contained in:
duanshuwen
2026-07-17 09:29:38 +08:00
parent 767ecb197b
commit b04e3a4613
5 changed files with 36 additions and 4 deletions

View File

@@ -152,6 +152,17 @@ const hasBackListener = computed(() => {
// 处理返回事件
const handleBack = () => {
const pages = getCurrentPages();
if (pages.length <= 1) {
// #ifdef MP-WEIXIN
if (typeof wx !== "undefined" && typeof wx.exitMiniProgram === "function") {
wx.exitMiniProgram();
return;
}
// #endif
}
if (hasBackListener.value) {
emit("back");
return;