|
@@ -22,7 +22,7 @@
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<ul>
|
|
<li>
|
|
<li>
|
|
- <span>規格:</span>
|
|
|
|
|
|
+ <span>{{$t('common.guige')}}</span>
|
|
<ul>
|
|
<ul>
|
|
<li @click.stop="onClickSku(item)" :class="{ active: item.id == i.currentSku.id }" v-for="(item, idx) in i.skus" :key="idx">
|
|
<li @click.stop="onClickSku(item)" :class="{ active: item.id == i.currentSku.id }" v-for="(item, idx) in i.skus" :key="idx">
|
|
<span v-if="item.properties[0]">
|
|
<span v-if="item.properties[0]">
|
|
@@ -32,7 +32,7 @@
|
|
</ul>
|
|
</ul>
|
|
</li>
|
|
</li>
|
|
<li>
|
|
<li>
|
|
- <span>數量:</span>
|
|
|
|
|
|
+ <span>{{$t('common.shuliang')}}</span>
|
|
<div class="number">
|
|
<div class="number">
|
|
<ui-icon
|
|
<ui-icon
|
|
@click="
|
|
@click="
|
|
@@ -58,10 +58,10 @@
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="goods-button">
|
|
<div class="goods-button">
|
|
- <span v-if="i.saleChannel == 1" class="tipss">僅供線下門店購買</span>
|
|
|
|
|
|
+ <span v-if="i.saleChannel == 1" class="tipss">{{$t('common.onlyOffLine')}}</span>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <div @click.stop="viewDetail(i)">查看詳情</div>
|
|
|
|
- <div @click.stop="addCart(i)">加入購物車</div>
|
|
|
|
|
|
+ <div @click.stop="viewDetail(i)">{{$t('common.viewDetail')}}</div>
|
|
|
|
+ <div @click.stop="addCart(i)">{{$t('common.addCart')}}</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -81,6 +81,10 @@ import { Loading, Dialog } from "@/global_components/";
|
|
import browser from "@/utils/browser";
|
|
import browser from "@/utils/browser";
|
|
import viewimg from "@/views/viewimg";
|
|
import viewimg from "@/views/viewimg";
|
|
|
|
|
|
|
|
+import { useI18n, getLocale } from '@/i18n'
|
|
|
|
+const { t } = useI18n({ useScope: 'global' })
|
|
|
|
+
|
|
|
|
+
|
|
// get_product_info
|
|
// get_product_info
|
|
const store = useStore();
|
|
const store = useStore();
|
|
const isshoppingguide = computed(() => store.getters["shoppingguide"]);
|
|
const isshoppingguide = computed(() => store.getters["shoppingguide"]);
|
|
@@ -135,7 +139,7 @@ const addCart = async (item) => {
|
|
Loading.hide();
|
|
Loading.hide();
|
|
if (result.code === 0) {
|
|
if (result.code === 0) {
|
|
apis.burying_point({ type: 7, productId: item.id });
|
|
apis.burying_point({ type: 7, productId: item.id });
|
|
- return Dialog.toast({ content: `添加成功`, type: "success" });
|
|
|
|
|
|
+ return Dialog.toast({ content: t('common.addSuccess'), type: "success" });
|
|
} else {
|
|
} else {
|
|
let callbackUrl = `${window.location.origin}${window.location.pathname}?m=${browser.getURLParam("m")}&${getApp().Camera.getPoseUrlParams()}`;
|
|
let callbackUrl = `${window.location.origin}${window.location.pathname}?m=${browser.getURLParam("m")}&${getApp().Camera.getPoseUrlParams()}`;
|
|
|
|
|
|
@@ -160,7 +164,7 @@ const close = () => {
|
|
|
|
|
|
const updateProductsById = async (idx) => {
|
|
const updateProductsById = async (idx) => {
|
|
if (!tagclick.value.data.products[idx]) {
|
|
if (!tagclick.value.data.products[idx]) {
|
|
- Dialog.toast({ content: `獲取商品詳情失敗,請稍後再試`, type: "error" });
|
|
|
|
|
|
+ Dialog.toast({ content: t('common.viewDetailFail'), type: "error" });
|
|
close();
|
|
close();
|
|
return;
|
|
return;
|
|
}
|
|
}
|