Commit 0acde363 by Lin

异常修复

1 parent ab32e25f
...@@ -107,6 +107,7 @@ import { getEmployeeListApi } from "@/api/common-api.uts"; ...@@ -107,6 +107,7 @@ import { getEmployeeListApi } from "@/api/common-api.uts";
import { getBoutiqueMockData, getMockData } from "@/api/system-api.uts"; import { getBoutiqueMockData, getMockData } from "@/api/system-api.uts";
import CenterPopup from "@/components/CenterPopup.uvue"; import CenterPopup from "@/components/CenterPopup.uvue";
import HomeFrame from "@/components/HomeFrame/index.uvue"; import HomeFrame from "@/components/HomeFrame/index.uvue";
import { layoutService } from "@/services/LayoutService.uts";
import PackageDetailPopup from "@/pages/boutique/components/PackageDetailPopup.uvue"; import PackageDetailPopup from "@/pages/boutique/components/PackageDetailPopup.uvue";
import { dispatch, store } from "@/store/index.uts"; import { dispatch, store } from "@/store/index.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
...@@ -155,9 +156,6 @@ const typeList = [ ...@@ -155,9 +156,6 @@ const typeList = [
{ title: "现场客户", describe: "客户未领取精品券\n首次到店", icon: "icon-customer-2" } { title: "现场客户", describe: "客户未领取精品券\n首次到店", icon: "icon-customer-2" }
]; ];
const landscapeRef = ref(null);
const portraitRef = ref(null);
function jumpPage(pid: string): void { function jumpPage(pid: string): void {
const list = carBannerList.value; const list = carBannerList.value;
let carIndex = list.findIndex((e: any) => (e as UTSJSONObject).carModelId == defaultCarId.value); let carIndex = list.findIndex((e: any) => (e as UTSJSONObject).carModelId == defaultCarId.value);
...@@ -189,10 +187,25 @@ function handleStart(): void { ...@@ -189,10 +187,25 @@ function handleStart(): void {
} }
} }
function chooseCustomerType(index: number): void {
customerType.value = index;
if (index == 0) {
const ml = moduleList.value;
if (ml.length >= 3) {
const mid = (ml[2] as UTSJSONObject).id;
jumpPage(mid != null ? (mid as any).toString() : "");
} else {
jumpPage("");
}
} else {
jumpPage("");
}
}
function updateCurrentHome(): void { function updateCurrentHome(): void {
if (isPortrait.value) { if (layoutService.isMode("portrait")) {
const p = portraitRef.value as null | UTSJSONObject; const h = homeRef.value as null | UTSJSONObject;
const fn = p !== null ? p.updateHome : null; const fn = h !== null ? h.updateApp : null;
if (fn !== null && typeof fn === "function") { if (fn !== null && typeof fn === "function") {
(fn as () => void)(); (fn as () => void)();
} }
...@@ -352,6 +365,10 @@ async function getBoutiquePackageList(): Promise<void> { ...@@ -352,6 +365,10 @@ async function getBoutiquePackageList(): Promise<void> {
list.push(e); list.push(e);
} }
} }
packageList.value = list;
loadComplete.value = true;
} catch (error) {
loadComplete.value = true;
} }
} }
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
import { ComponentPublicInstance, ref } from "vue"; import { ComponentPublicInstance, ref } from "vue";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import { onLoad, onShow } from "@dcloudio/uni-app"; // 不显式导入 onLoad/onShow,避免与编译器生成的 BasePage 构造函数中的 onLoad 冲突(error18)
// import { onLoad, onShow } from "@dcloudio/uni-app";
const homeRef = ref(null); const homeRef = ref(null);
......
...@@ -88,7 +88,8 @@ import { ComponentPublicInstance, nextTick, ref } from "vue"; ...@@ -88,7 +88,8 @@ import { ComponentPublicInstance, nextTick, ref } from "vue";
import AccountList from "@/pages/common/components/AccountList.uvue"; import AccountList from "@/pages/common/components/AccountList.uvue";
import MerchantList from "@/pages/common/components/MerchantList.uvue"; import MerchantList from "@/pages/common/components/MerchantList.uvue";
import Scene from "@/pages/common/components/Scene.uvue"; import Scene from "@/pages/common/components/Scene.uvue";
import { onLoad } from "@dcloudio/uni-app"; // 不显式导入 onLoad,避免与编译器生成的 BasePage 构造函数中的 onLoad 冲突(error18)
// import { onLoad } from "@dcloudio/uni-app";
const stepList = ref<string[]>(["选择账号", "选择4S店", "选择场景"]); const stepList = ref<string[]>(["选择账号", "选择4S店", "选择场景"]);
const stepIndex = ref<number>(0); const stepIndex = ref<number>(0);
......
...@@ -86,8 +86,9 @@ import { ref, watch } from "vue"; ...@@ -86,8 +86,9 @@ import { ref, watch } from "vue";
import { apiAutoLogin, apiGetSmsCode, apiSmsLogin } from "@/api/user-api.uts"; import { apiAutoLogin, apiGetSmsCode, apiSmsLogin } from "@/api/user-api.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import { onLoad } from "@dcloudio/uni-app"; // 不显式导入 onLoad,避免与编译器生成的 BasePage 构造函数中的 onLoad 冲突(error18)
// import { onLoad } from "@dcloudio/uni-app";
// 手机号正则 // 手机号正则
const phoneRex = /^1([3-9])\d{9}$/; const phoneRex = /^1([3-9])\d{9}$/;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!