feat:修改热更新
@ -218,9 +218,14 @@ export default {
|
||||
const notificationManager = main.getSystemService(
|
||||
Context.NOTIFICATION_SERVICE
|
||||
);
|
||||
notificationManager.cancelAll();
|
||||
if (notificationManager) {
|
||||
plus.android.importClass("android.app.NotificationManager");
|
||||
if (typeof notificationManager.cancelAll === "function") {
|
||||
notificationManager.cancelAll();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn("cancelAll notifications failed:", e);
|
||||
// 部分 Android 运行时未暴露 cancelAll,跳过即可,避免 onShow 持续报错。
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"appid" : "__UNI__F199FF4",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.5",
|
||||
"versionCode" : 117,
|
||||
"versionCode" : 120,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@ -356,6 +356,22 @@
|
||||
"bounce": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
|
||||
"style": {
|
||||
"disableScroll": true,
|
||||
"app-plus": {
|
||||
"backgroundColorTop": "transparent",
|
||||
"background": "transparent",
|
||||
"titleNView": false,
|
||||
"scrollIndicator": false,
|
||||
"popGesture": "none",
|
||||
"animationType": "fade-in",
|
||||
"animationDuration": 200
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, onMounted, onUnmounted } from "vue";
|
||||
import { onLoad, onShow, onHide } from "@dcloudio/uni-app";
|
||||
import { onLoad, onShow, onHide, onReady } from "@dcloudio/uni-app";
|
||||
import { useStore } from "vuex";
|
||||
import Header from "../components/Header.vue";
|
||||
import BottomNav from "../components/BottomNav.vue";
|
||||
@ -111,6 +111,8 @@ import { useBanner } from "./composables/useBanner.js";
|
||||
import { useBackgroundRefresh } from "@/composables/useBackgroundRefresh.js";
|
||||
import { doubleTapLike } from "@/utils/likeHelper.js";
|
||||
|
||||
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
|
||||
// ========== Store & User Info ==========
|
||||
const store = useStore();
|
||||
// const currentUserNickname = computed(() => store.state.user?.userInfo?.nickname || '')
|
||||
@ -302,6 +304,11 @@ onShow(() => {
|
||||
} else {
|
||||
activeContentTab.value = "xinghe";
|
||||
}
|
||||
// uni.showToast({
|
||||
// title: "页面加载完成",
|
||||
// icon: "success",
|
||||
// duration: 2000,
|
||||
// });
|
||||
});
|
||||
|
||||
// ========== 后台切回自动刷新 ==========
|
||||
@ -349,6 +356,10 @@ uni.$on("guide:openComponent", (componentName) => {
|
||||
onUnmounted(() => {
|
||||
uni.$off("guide:openComponent");
|
||||
});
|
||||
|
||||
onReady(() => {
|
||||
checkUpdate();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
"""One-off: generate PNGs under unpackage/res/icons for manifest.json paths."""
|
||||
from pathlib import Path
|
||||
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
# 勿放 unpackage/(.gitignore),否则云端/他人拉代码后 HBuilder 仍报图标不存在
|
||||
OUT = ROOT / "static" / "app-icons"
|
||||
|
||||
BG = (0x4A, 0x6B, 0xCF)
|
||||
ACCENT = (0xFF, 0xFF, 0xFF)
|
||||
|
||||
SIZES = {
|
||||
"72x72.png": 72,
|
||||
"96x96.png": 96,
|
||||
"144x144.png": 144,
|
||||
"192x192.png": 192,
|
||||
"1024x1024.png": 1024,
|
||||
"76x76.png": 76,
|
||||
"152x152.png": 152,
|
||||
"20x20.png": 20,
|
||||
"40x40.png": 40,
|
||||
"167x167.png": 167,
|
||||
"29x29.png": 29,
|
||||
"58x58.png": 58,
|
||||
"80x80.png": 80,
|
||||
"120x120.png": 120,
|
||||
"180x180.png": 180,
|
||||
"60x60.png": 60,
|
||||
"87x87.png": 87,
|
||||
}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
for fname, w in SIZES.items():
|
||||
h = w
|
||||
im = Image.new("RGB", (w, h), BG)
|
||||
draw = ImageDraw.Draw(im)
|
||||
margin = max(1, w // 8)
|
||||
draw.ellipse(
|
||||
[margin, margin, w - margin, h - margin],
|
||||
outline=ACCENT,
|
||||
width=max(1, w // 32),
|
||||
)
|
||||
if w >= 48:
|
||||
r = w // 5
|
||||
cx, cy = w // 2, h // 2
|
||||
draw.ellipse([cx - r, cy - r, cx + r, cy + r], fill=ACCENT)
|
||||
im.save(OUT / fname, format="PNG", optimize=True)
|
||||
print("wrote", len(SIZES), "icons to", OUT)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
Before Width: | Height: | Size: 308 KiB |
|
Before Width: | Height: | Size: 336 KiB |
|
Before Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 485 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 383 KiB |
|
Before Width: | Height: | Size: 474 KiB |
|
Before Width: | Height: | Size: 471 KiB |
|
Before Width: | Height: | Size: 402 KiB |
|
Before Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 714 KiB |
|
Before Width: | Height: | Size: 457 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 336 KiB |
|
Before Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 424 KiB |
|
Before Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 685 KiB |
|
Before Width: | Height: | Size: 685 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 220 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 282 KiB |
|
Before Width: | Height: | Size: 622 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 502 KiB |
|
Before Width: | Height: | Size: 502 KiB |
|
Before Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 444 KiB |
|
Before Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 523 KiB |
|
Before Width: | Height: | Size: 487 KiB |
|
Before Width: | Height: | Size: 221 KiB |
|
Before Width: | Height: | Size: 445 KiB |
|
Before Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 316 KiB |
|
Before Width: | Height: | Size: 642 KiB |
|
Before Width: | Height: | Size: 319 KiB |
|
Before Width: | Height: | Size: 259 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 347 KiB |
|
Before Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 287 KiB |
|
Before Width: | Height: | Size: 452 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 503 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 58 KiB |