|
@@ -102,7 +102,9 @@ const current = ref(0);
|
|
|
|
|
|
const mysw = ref(null);
|
|
|
|
|
|
-const isShowNewGoodType = computed(()=>tagclick.value&&tagclick.value.data.productSource.mchType == 1);
|
|
|
+const isShowNewGoodType = computed(()=> {
|
|
|
+ return tagclick?.value?.data?.productSource?.mchType == 1
|
|
|
+});
|
|
|
|
|
|
|
|
|
const viewDetail = (item) => {
|
|
@@ -111,9 +113,7 @@ const viewDetail = (item) => {
|
|
|
}
|
|
|
apis.burying_point({ type: 3, productId: item.id });
|
|
|
|
|
|
- console.log(tagclick.value.data.productSource,'itemitemitem');
|
|
|
-
|
|
|
- if (tagclick.value.data.productSource.mchType == 1) {
|
|
|
+ if (tagclick?.value?.data?.productSource?.mchType == 1) {
|
|
|
if (browser.detectIOS()) {
|
|
|
window.location.href = item.url;
|
|
|
} else {
|
|
@@ -178,7 +178,8 @@ const addCart = async (item) => {
|
|
|
return;
|
|
|
}
|
|
|
Loading.show();
|
|
|
-
|
|
|
+ console.log('addCart', item);
|
|
|
+ debugger
|
|
|
let result = await apis.inCat({
|
|
|
AccessToken: browser.getURLParam("AccessToken"),
|
|
|
skuId: item.currentSku.id,
|
|
@@ -204,7 +205,7 @@ const addCart = async (item) => {
|
|
|
browser.openLink(
|
|
|
`/pages/login/login?callbackHttpUrl=${encodeURIComponent(callbackUrl)}`,
|
|
|
`${tagclick.value.data.productSource.cdfHost}/shop/${tagclick.value.data.productSource.cdfMchId}/h5login?redirectUrl=${encodeURIComponent(callbackUrl)}`,
|
|
|
- `/pages/login/login?callbackHttpUrl=${encodeURIComponent(callbackUrl)}`
|
|
|
+ `/pages/login/login?callbackHttpUrl=${encodeURIComponent(callbackUrl)}`,
|
|
|
`${tagclick.value.data.productSource.cdfHostPc}/login?redirectUrl=${encodeURIComponent(callbackUrl)}`,
|
|
|
);
|
|
|
}
|
|
@@ -215,7 +216,7 @@ const close = () => {
|
|
|
};
|
|
|
|
|
|
const updateProductsById = async (idx) => {
|
|
|
- if (tagclick.value.data.productSource.mchType == 1) {
|
|
|
+ if (tagclick?.value?.data?.productSource?.mchType == 1) {
|
|
|
return
|
|
|
}
|
|
|
if (!tagclick.value.data.products[idx]) {
|