Commit b320052e by cen

feat: 轻改首页

1 parent 5a91d0e7
......@@ -3,6 +3,8 @@
<layout-root>
<!-- #endif -->
<view class="page-container container">
<!-- 与旧项目一致:页面背景图 home-bg-1.webp -->
<view class="page-bg"></view>
<HomeFrame ref="homeRef"
:show-footer="true"
:swiper-custom="true"
......@@ -146,7 +148,9 @@ function getPkg(item: any, key: string): any {
}
function callExposedMethod(comp: any, methodName: string): void {
if (comp == null) return;
if (comp == null) {
return;
}
const obj = comp as UTSJSONObject;
const fn = obj[methodName];
if (fn != null) {
......@@ -188,11 +192,7 @@ function jumpPage(pid: string): void {
function handleStart(): void {
const comp = customerTypeRef.value;
if (comp != null) {
const compObj = comp as UTSJSONObject;
const openFn = compObj.open;
if (openFn != null && typeof openFn === "function") {
;(openFn as () => void)();
}
callExposedMethod(comp, "open");
}
}
......@@ -343,8 +343,8 @@ async function getBoutiquePackageList(): Promise<void> {
for (const element of arr) {
const e = element as UTSJSONObject;
if (e != null) {
e.scriptIntroduction = ((e.scriptIntroduction ?? "") as string).replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
e.content = ((e.content ?? "") as string).replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
e.scriptIntroduction = ((e.scriptIntroduction ?? "") as string).replaceAll(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
e.content = ((e.content ?? "") as string).replaceAll(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
if (e.marketPrice != null) e.marketPrice = Number.parseFloat((e.marketPrice as any).toString()).toString();
if (e.packagePrice != null) e.packagePrice = Number.parseFloat((e.packagePrice as any).toString()).toString();
list.push(e);
......@@ -399,14 +399,27 @@ onShow(async () => {
<style scoped lang="scss">
.page-container {
width: 100%;
width: 100%;
height: 100%;
position: relative;
}
.container {
position: relative;
}
.page-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: -1;
background-image: url('@/assets/images/common/home-bg-1.webp');
background-size: cover;
background-repeat: no-repeat;
}
.swiper-custom-wrap {
width: 100%;
height: 100%;
......
// uni_modules/permission-handler-plus 根入口
export * from "./utssdk/index.uts";
// permission-handler-plus 统一入口,按平台导出实现
export type { SuccessCallBack, FailCallBack, PermissionObject } from "./interface.uts";
export { permissionStatusName, permissionIdByName, permissionNameById } from "./interface.uts";
// #ifdef APP-ANDROID
export { checkPermission, requestPermissions } from "./app-android/index.uts";
// #endif
// #ifdef APP-IOS
export { checkPermission, requestPermissions } from "./app-ios/index.uts";
// #endif
// #ifdef APP-HARMONY
export { checkPermission, requestPermissions } from "./app-harmony/index.uts";
// #endif
// #ifndef APP-ANDROID || APP-IOS || APP-HARMONY
// Web 等非 App 平台:导出 stub,避免运行时 "does not provide an export named 'checkPermission'" 报错
import type { PermissionObject } from "./interface.uts";
export function checkPermission(permission: string, complete: (result: string) => void): void {
complete("granted")
}
export function requestPermissions(permission: PermissionObject): void {
const nameMap = new Map<string, string>()
if (permission.names != null && permission.names.length > 0) {
permission.names.forEach((name: string) => {
nameMap.set(name, "granted")
})
}
permission.success(nameMap)
}
// #endif
......@@ -18,7 +18,7 @@ export default defineConfig({
],
resolve: {
alias: {
"@": resolve("src")
"@": resolve(".")
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!