|
|
@@ -16,7 +16,7 @@
|
|
|
<view class="search-form round" @tap="goSearch">
|
|
|
<text class="wlIcon wlIcon-sousuo1 text-bold"></text>
|
|
|
<swiper class="search-swiper placeholder" vertical autoplay circular interval="3000">
|
|
|
- <swiper-item>搜索商品</swiper-item>
|
|
|
+ <swiper-item>{{ $t('mall.searchPlaceholder') }}</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
<!-- 消息中心 -->
|
|
|
@@ -58,19 +58,19 @@
|
|
|
</view>
|
|
|
<!-- 市場價 -->
|
|
|
<view class="text-sm wanl-gray text-dec">
|
|
|
- 市場價
|
|
|
+ {{ $t('mall.marketPrice') }}
|
|
|
<text class="text-price margin-left-xs">{{ goodsData.market_price || '0.00' }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 收藏 -->
|
|
|
<view class="follow wanl-black" v-if="goodsData.follow" @tap="onFollow">
|
|
|
<text class="wlIcon wlIcon-yiguanzhu1 text-red"></text>
|
|
|
- <text class="text-xs">已收藏</text>
|
|
|
+ <text class="text-xs">{{ $t('mall.collected') }}</text>
|
|
|
</view>
|
|
|
<!-- 收藏商品 -->
|
|
|
<view class="follow wanl-black" v-else @tap="onFollow">
|
|
|
<text class="wlIcon wlIcon-gerenguanzhu"></text>
|
|
|
- <text class="text-xs">收藏</text>
|
|
|
+ <text class="text-xs">{{ $t('mall.collect') }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 信息行 -->
|
|
|
@@ -80,11 +80,11 @@
|
|
|
{{ goodsData.views || 0 }}
|
|
|
</view>
|
|
|
<view class="wanl-gray">
|
|
|
- 運費:
|
|
|
+ {{ $t('orderConfirm.freight') }}:
|
|
|
<text class="text-price">{{ (goodsData.freight && goodsData.freight.price) || '0.00' }}</text>
|
|
|
</view>
|
|
|
<view class="wanl-gray">
|
|
|
- 月銷量
|
|
|
+ {{ $t('mall.monthlySales') }}
|
|
|
<text class="margin-left-xs">{{ goodsData.sales || 0 }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -93,20 +93,21 @@
|
|
|
<!-- 优惠券 -->
|
|
|
<view class="promotion text-sm" v-if="goodsData.coupon && goodsData.coupon.length > 0">
|
|
|
<view class="item" @tap="showModal('coupon')">
|
|
|
- <view class="label wanl-gray">優惠券</view>
|
|
|
+ <view class="label wanl-gray">{{ $t('orderConfirm.coupon') }}</view>
|
|
|
<view class="conten flex">
|
|
|
<view class="wanl-ticket text-sm" v-for="(item, index) in goodsData.coupon" :key="index" v-if="index < 2">
|
|
|
<block v-if="item.type === 'reduction' || (item.type === 'vip' && item.usertype === 'reduction')">
|
|
|
<view class="ticket-price">HKD{{ Number(item.price) }}</view>
|
|
|
- <view class="ticket-title">滿{{ Number(item.limit) }}減{{ Number(item.price) }}</view>
|
|
|
+ <view class="ticket-title">{{ $t('mall.fullReduction', [Number(item.limit), Number(item.price)]) }}</view>
|
|
|
</block>
|
|
|
<block v-if="item.type === 'discount' || (item.type === 'vip' && item.usertype === 'discount')">
|
|
|
- <view class="ticket-price">{{ Number(item.discount) }}折</view>
|
|
|
- <view class="ticket-title">滿{{ Number(item.limit) }}打{{ Number(item.discount) }}折</view>
|
|
|
+ <view class="ticket-price">{{ $t('mall.discount', [Number(item.discount)]) }}</view>
|
|
|
+ <view class="ticket-title">{{ $t('mall.fullDiscount', [Number(item.limit), Number(item.discount)]) }}
|
|
|
+ </view>
|
|
|
</block>
|
|
|
<block v-if="item.type === 'shipping'">
|
|
|
- <view class="ticket-price">包郵</view>
|
|
|
- <view class="ticket-title">滿{{ Number(item.limit) }}包郵</view>
|
|
|
+ <view class="ticket-price">{{ $t('orderConfirm.freeShipping') }}</view>
|
|
|
+ <view class="ticket-title">{{ $t('mall.freeShippingFull', [Number(item.limit)]) }}</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -120,22 +121,22 @@
|
|
|
<view class="choice margin-bottom-bj padding-bj text-sm bg-white">
|
|
|
<view class="commodity margin-bottom-bj" @tap="onSelectSku">
|
|
|
<view class="opt">
|
|
|
- <view class="title wanl-gray">選擇</view>
|
|
|
+ <view class="title wanl-gray">{{ $t('mall.select') }}</view>
|
|
|
<view class="option">
|
|
|
<view class="selected">
|
|
|
<view v-if="canCount">
|
|
|
- 请選擇
|
|
|
+ {{ $t('orderConfirm.select') }}
|
|
|
<text class="margin-lr-xs" v-for="(item, index) in goodsData.spu" :key="item.id">{{ item.name }}</text>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <text class="margin-right-bj">已選</text>
|
|
|
+ <text class="margin-right-bj">{{ $t('mall.selected') }}</text>
|
|
|
<text class="margin-right-xs" v-for="(name, key) in selectArr" :key="key">{{ name }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="option-list">
|
|
|
<view v-for="(item, index) in goodsData.spu" :key="item.id">
|
|
|
<text class="cu-tag" v-if="index === 0" v-for="tag in item.item" :key="tag.name">{{ tag.name }}</text>
|
|
|
- <text class="cu-tag" v-if="index === 0">更多規格可選</text>
|
|
|
+ <!-- <text class="cu-tag" v-if="index === 0">{{ $t('mall.moreSpecs') }}</text> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -145,7 +146,7 @@
|
|
|
<view class="commodity" @tap="showModal('service')"
|
|
|
v-if="goodsData.shop && goodsData.shop.service_ids && goodsData.shop.service_ids.length">
|
|
|
<view class="opt">
|
|
|
- <view class="title wanl-gray text-sm">智能小蜜</view>
|
|
|
+ <view class="title wanl-gray text-sm">{{ $t('mall.service') }}</view>
|
|
|
<view class="option">
|
|
|
<view class="selected">
|
|
|
<block v-for="(item, index) in goodsData.shop.service_ids" :key="item.id" v-if="index <= 2">
|
|
|
@@ -163,9 +164,9 @@
|
|
|
<view class="choice margin-bottom-bj padding-bj text-sm bg-white">
|
|
|
<view class="commodity" @tap="showModal('attribute')">
|
|
|
<view class="opt">
|
|
|
- <view class="title wanl-gray text-sm">參數</view>
|
|
|
+ <view class="title wanl-gray text-sm">{{ $t('mall.params') }}</view>
|
|
|
<view class="option">
|
|
|
- <view class="selected"><text>品牌、規格等...</text></view>
|
|
|
+ <view class="selected"><text>{{ $t('mall.brandSpec') }}</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="text-min wanl-gray"><text class="wlIcon wlIcon-fanhui2"></text></view>
|
|
|
@@ -175,18 +176,23 @@
|
|
|
<!-- 评论 -->
|
|
|
<view class="comment margin-bottom-bj padding-bj bg-white" id="evaluate">
|
|
|
<view class="head" @tap="goComment('good')">
|
|
|
- <view>評價({{ goodsData.comment || 0 }})</view>
|
|
|
+ <view>{{ $t('mall.evaluate') }}({{ goodsData.comment || 0 }})</view>
|
|
|
<view class="wanl-orange">
|
|
|
- {{ goodsData.comment > 0 ? parseInt((goodsData.praise / goodsData.comment) * 100) : 0 }}%好評率
|
|
|
+ {{ goodsData.comment > 0 ? parseInt((goodsData.praise / goodsData.comment) * 100) : 0 }}%{{
|
|
|
+ $t('mall.comment.goodRate') }}
|
|
|
<text class="wlIcon wlIcon-fanhui2 margin-left-xs"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="label margin-bottom padding-bottom solid-bottom">
|
|
|
- <view @tap="goComment('good')" class="cu-tag round">好評 ({{ goodsData.praise || 0 }})</view>
|
|
|
- <view @tap="goComment('pertinent')" class="cu-tag round">中評({{ goodsData.moderate || 0 }})</view>
|
|
|
- <view @tap="goComment('poor')" class="cu-tag round">差評 ({{ goodsData.negative || 0 }})</view>
|
|
|
- <view @tap="goComment('figure')" class="cu-tag round">有圖 ({{ (goodsData.comment_list &&
|
|
|
- goodsData.comment_list.figure) || 0 }})</view>
|
|
|
+ <view @tap="goComment('good')" class="cu-tag round">{{ $t('mall.comment.good') }} ({{ goodsData.praise || 0 }})
|
|
|
+ </view>
|
|
|
+ <view @tap="goComment('pertinent')" class="cu-tag round">{{ $t('mall.comment.pertinent') }} ( {{
|
|
|
+ goodsData.moderate || 0 }})</view>
|
|
|
+ <view @tap="goComment('poor')" class="cu-tag round">{{ $t('mall.comment.poor') }} ({{ goodsData.negative || 0
|
|
|
+ }})</view>
|
|
|
+ <view @tap="goComment('figure')" class="cu-tag round">{{ $t('mall.comment.withImage') }} ({{
|
|
|
+ (goodsData.comment_list &&
|
|
|
+ goodsData.comment_list.figure) || 0 }})</view>
|
|
|
</view>
|
|
|
<view class="user" v-for="(item, index) in (goodsData.comment_list && goodsData.comment_list.data || [])"
|
|
|
:key="item.id" @tap="goComment('')">
|
|
|
@@ -194,12 +200,13 @@
|
|
|
<view class="avatar">
|
|
|
<view class="cu-avatar sm round margin-right-xs"
|
|
|
:style="{ backgroundImage: 'url(' + (item.user && item.user.avatar || '') + ')' }"></view>
|
|
|
- <view class="text-sm wanl-gray">{{ (item.user && item.user.nickname) || '匿名' }}</view>
|
|
|
+ <view class="text-sm wanl-gray">{{ (item.user && item.user.nickname) || $t('mall.comment.anonymous') }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="details text-min">
|
|
|
<view class="margin-bottom-sm">{{ item.content }}</view>
|
|
|
- <view class="wanl-gray">規格:{{ item.suk }}</view>
|
|
|
+ <view class="wanl-gray">{{ $t('mall.comment.spec') }}:{{ item.suk }}</view>
|
|
|
</view>
|
|
|
<view class="grid flex-sub grid-square"
|
|
|
:class="[item.images && item.images.length > 3 ? 'col-3' : 'col-' + (item.images ? item.images.length : 0)]"
|
|
|
@@ -209,7 +216,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="more" @tap="goComment('')">
|
|
|
- <text class="wanl-gray text-sm">查看全部</text>
|
|
|
+ <text class="wanl-gray text-sm">{{ $t('mall.viewAll') }}</text>
|
|
|
<text class="wlIcon wlIcon-fanhui4 margin-left-xs"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -221,32 +228,34 @@
|
|
|
:style="{ backgroundImage: 'url(' + (goodsData.shop.avatar || '') + ')' }"></view>
|
|
|
<view class="shopname">
|
|
|
<view class="text-df text-cut" style="width: 300rpx;">{{ goodsData.shop.shopname }}</view>
|
|
|
- <view class="wanl-gray text-min">{{ (goodsData.shop.find_user && goodsData.shop.find_user.fans) || 0 }} 粉絲
|
|
|
+ <view class="wanl-gray text-min">{{ (goodsData.shop.find_user && goodsData.shop.find_user.fans) || 0 }} {{
|
|
|
+ $t('mall.fans') }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bnt">
|
|
|
- <button class="cu-btn round line-orange margin-right-sm" @tap="onShopGoods">全部商品</button>
|
|
|
- <button class="cu-btn round bg-gradual-orange" @tap="onShop">進店逛逛</button>
|
|
|
+ <button class="cu-btn round line-orange margin-right-sm" @tap="onShopGoods">{{ $t('mall.selectAllGoods')
|
|
|
+ }}</button>
|
|
|
+ <button class="cu-btn round bg-gradual-orange" @tap="onShop">{{ $t('mall.enterShop') }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="quality wanl-gray text-min">
|
|
|
<view>
|
|
|
- 產品描述
|
|
|
+ {{ $t('mall.productDesc') }}
|
|
|
<text class="">{{ goodsData.shop.score_describe }}</text>
|
|
|
- <view v-if="goodsData.shop.score_describe < 4.7" class="cu-tag round di">低</view>
|
|
|
- <view v-else class="cu-tag round gao">高</view>
|
|
|
+ <view v-if="goodsData.shop.score_describe < 4.7" class="cu-tag round di">{{ $t('mall.low') }}</view>
|
|
|
+ <view v-else class="cu-tag round gao">{{ $t('mall.high') }}</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- 賣家服務
|
|
|
+ {{ $t('mall.sellerService') }}
|
|
|
<text class="wanl-orange">{{ goodsData.shop.score_service }}</text>
|
|
|
- <view v-if="goodsData.shop.score_service < 4.7" class="cu-tag round di">低</view>
|
|
|
- <view v-else class="cu-tag round gao">高</view>
|
|
|
+ <view v-if="goodsData.shop.score_service < 4.7" class="cu-tag round di">{{ $t('mall.low') }}</view>
|
|
|
+ <view v-else class="cu-tag round gao">{{ $t('mall.high') }}</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- 物流服務
|
|
|
+ {{ $t('mall.logistics') }}
|
|
|
<text class="wanl-orange">{{ goodsData.shop.score_logistics }}</text>
|
|
|
- <view v-if="goodsData.shop.score_logistics < 4.7" class="cu-tag round di">低</view>
|
|
|
- <view v-else class="cu-tag round gao">高</view>
|
|
|
+ <view v-if="goodsData.shop.score_logistics < 4.7" class="cu-tag round di">{{ $t('mall.low') }}</view>
|
|
|
+ <view v-else class="cu-tag round gao">{{ $t('mall.high') }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -254,9 +263,9 @@
|
|
|
<!-- 店铺推荐 -->
|
|
|
<view class="shop-recom padding-bj bg-white" v-if="goodsData.shop_recommend && goodsData.shop_recommend.length">
|
|
|
<view class="head">
|
|
|
- <view>店鋪推薦</view>
|
|
|
+ <view>{{ $t('mall.shopRecommend') }}</view>
|
|
|
<view class="text-sm wanl-orange" @tap="onShop">
|
|
|
- 查看全部
|
|
|
+ {{ $t('mall.viewAll') }}
|
|
|
<text class="wlIcon wlIcon-fanhui2 margin-left-xs"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -272,7 +281,7 @@
|
|
|
<!-- 分隔符 -->
|
|
|
<view class="wanl-divider">
|
|
|
<view class="divider-line"></view>
|
|
|
- <text class="divider-text">商品詳情</text>
|
|
|
+ <text class="divider-text">{{ $t('mall.productDetail') }}</text>
|
|
|
<view class="divider-line"></view>
|
|
|
</view>
|
|
|
|
|
|
@@ -284,7 +293,7 @@
|
|
|
<!-- 分隔符 -->
|
|
|
<view class="wanl-divider">
|
|
|
<view class="divider-line"></view>
|
|
|
- <text class="divider-text">推薦商品</text>
|
|
|
+ <text class="divider-text">{{ $t('mall.shop.recommendGoods') }}</text>
|
|
|
<view class="divider-line"></view>
|
|
|
</view>
|
|
|
|
|
|
@@ -294,8 +303,8 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="load-more" v-if="likeData.length > 0">
|
|
|
- <text v-if="likeLoading">加載中...</text>
|
|
|
- <text v-else-if="likePage >= likeLastPage">没有更多了</text>
|
|
|
+ <text v-if="likeLoading">{{ $t('common.loading') }}</text>
|
|
|
+ <text v-else-if="likePage >= likeLastPage">{{ $t('common.noMore') }}</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="safeAreaBottom"></view>
|
|
|
@@ -307,7 +316,7 @@
|
|
|
<view class="wanl-modal-menu cu-dialog" @tap.stop="">
|
|
|
<view class="wanl-direct">
|
|
|
<view class="menu-header" :style="{ paddingTop: statusBarH + 'px' }">
|
|
|
- <view>功能直連</view>
|
|
|
+ <view>{{ $t('mall.featureLink') }}</view>
|
|
|
<view @tap="hideModal">
|
|
|
<text class="wlIcon-31guanbi"></text>
|
|
|
</view>
|
|
|
@@ -321,14 +330,14 @@
|
|
|
v-if="statistics.notice.notice + statistics.notice.order + statistics.notice.chat > 0">{{
|
|
|
statistics.notice.notice + statistics.notice.order + statistics.notice.chat }}</view>
|
|
|
</view>
|
|
|
- <view class="menu-text">消息</view>
|
|
|
+ <view class="menu-text">{{ $t('mall.message') }}</view>
|
|
|
</view>
|
|
|
<!-- 首頁 -->
|
|
|
<view class="menu-item" hover-class="wanl-opcity" @tap="handleNav('/pages/mall/index')">
|
|
|
<view class="badge-box">
|
|
|
<text class="wlIcon-31shouye"></text>
|
|
|
</view>
|
|
|
- <view class="menu-text">首頁</view>
|
|
|
+ <view class="menu-text">{{ $t('mall.home') }}</view>
|
|
|
</view>
|
|
|
<!-- 我的 -->
|
|
|
<view class="menu-item" hover-class="wanl-opcity" @tap="handleSwitchTab('/pages/mine/index')">
|
|
|
@@ -339,7 +348,7 @@
|
|
|
{{ statistics.order.pay + statistics.order.delive + statistics.order.receiving +
|
|
|
statistics.order.evaluate }}</view>
|
|
|
</view>
|
|
|
- <view class="menu-text">我的</view>
|
|
|
+ <view class="menu-text">{{ $t('mall.mine') }}</view>
|
|
|
</view>
|
|
|
<!-- 購物車 -->
|
|
|
<view class="menu-item" hover-class="wanl-opcity" @tap="goCart">
|
|
|
@@ -347,21 +356,21 @@
|
|
|
<text class="wlIcon-gouwuche"></text>
|
|
|
<view class="cu-tag badge" v-if="cartNum > 0">{{ cartNum }}</view>
|
|
|
</view>
|
|
|
- <view class="menu-text">購物車</view>
|
|
|
+ <view class="menu-text">{{ $t('mall.cart') }}</view>
|
|
|
</view>
|
|
|
<!-- 智能小蜜 -->
|
|
|
<view class="menu-item" hover-class="wanl-opcity" @tap="handleNav('/pages/user/service')">
|
|
|
<view class="badge-box">
|
|
|
<text class="wlIcon-unie737"></text>
|
|
|
</view>
|
|
|
- <view class="menu-text">智能小蜜</view>
|
|
|
+ <view class="menu-text">{{ $t('user.smartAssistant') }}</view>
|
|
|
</view>
|
|
|
<!-- 反饋 -->
|
|
|
<view class="menu-item" hover-class="wanl-opcity" @tap="handleNav('/pages/account/feedback')">
|
|
|
<view class="badge-box">
|
|
|
<text class="wlIcon-xiugaioryijian"></text>
|
|
|
</view>
|
|
|
- <view class="menu-text">反饋</view>
|
|
|
+ <view class="menu-text">{{ $t('mall.feedback') }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -374,7 +383,7 @@
|
|
|
<view class="wanl-modal">
|
|
|
<view class="head padding-bj">
|
|
|
<view class="content">
|
|
|
- <view class="text-lg">优惠券</view>
|
|
|
+ <view class="text-lg">{{ $t('mall.couponTitle') }}</view>
|
|
|
</view>
|
|
|
<view class="close wlIcon wlIcon-31guanbi" @tap="hideModal()"></view>
|
|
|
</view>
|
|
|
@@ -389,24 +398,24 @@
|
|
|
<text class="prices">{{ Number(coupon.price) }}</text>
|
|
|
</view>
|
|
|
<view class="cu-tag wanl-gray-dark radius text-sm bg-white">
|
|
|
- 滿{{ Number(coupon.limit) }}減{{ Number(coupon.price) }}
|
|
|
+ {{ $t('mall.fullReduction', [Number(coupon.limit), Number(coupon.price)]) }}
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-if="coupon.type === 'discount' || (coupon.type === 'vip' && coupon.usertype === 'discount')">
|
|
|
<view class="colour">
|
|
|
<text class="prices">{{ Number(coupon.discount) }}</text>
|
|
|
- <text class="discount">折</text>
|
|
|
+ <text class="discount">{{ $t('mall.discountSuffix') }}</text>
|
|
|
</view>
|
|
|
<view class="cu-tag wanl-gray-dark radius text-sm bg-white">
|
|
|
- 滿{{ Number(coupon.limit) }}打{{ Number(coupon.discount) }}折
|
|
|
+ {{ $t('mall.fullDiscount', [Number(coupon.limit), Number(coupon.discount)]) }}
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-if="coupon.type === 'shipping'">
|
|
|
<view class="colour">
|
|
|
- <text class="prices">包郵</text>
|
|
|
+ <text class="prices">{{ $t('orderConfirm.freeShipping') }}</text>
|
|
|
</view>
|
|
|
<view class="cu-tag wanl-gray-dark radius text-sm bg-white">
|
|
|
- 滿{{ Number(coupon.limit) }}包郵
|
|
|
+ {{ $t('mall.freeShippingFull', [Number(coupon.limit)]) }}
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
@@ -418,21 +427,22 @@
|
|
|
<view class="content text-min">
|
|
|
<view class="wanl-gray">
|
|
|
<view v-if="coupon.grant != '-1'">
|
|
|
- <text class="wlIcon wlIcon-dot"></text>剩餘 {{ coupon.surplus }}
|
|
|
+ <text class="wlIcon wlIcon-dot"></text>{{ $t('mall.remain') }} {{ coupon.surplus }}
|
|
|
</view>
|
|
|
<view v-if="coupon.drawlimit != 0">
|
|
|
- <text class="wlIcon wlIcon-dot"></text>每人限領 {{ coupon.drawlimit }}
|
|
|
+ <text class="wlIcon wlIcon-dot"></text>{{ $t('mall.limitPerPerson') }} {{ coupon.drawlimit }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cu-btn sm round" @tap="onReceive(index)" v-if="!coupon.state">
|
|
|
- <text>立即領取</text>
|
|
|
+ <text>{{ $t('mall.getNow') }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<view class="foot padding-lr-bj">
|
|
|
- <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="hideModal()">完成</button>
|
|
|
+ <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="hideModal()">{{
|
|
|
+ $t('cart.complete') }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -444,12 +454,12 @@
|
|
|
<view class="wanl-modal">
|
|
|
<view class="head padding-bj">
|
|
|
<view class="content">
|
|
|
- <view class="text-lg">產品參數</view>
|
|
|
+ <view class="text-lg">{{ $t('mall.productParams') }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<scroll-view class="scroll-y" scroll-y="true">
|
|
|
<view class="table solid-bottom" v-if="goodsData.brand">
|
|
|
- <view class="name wanl-gray">品牌</view>
|
|
|
+ <view class="name wanl-gray">{{ $t('product.brand') }}</view>
|
|
|
<view class="value">{{ goodsData.brand.name || '' }}</view>
|
|
|
</view>
|
|
|
<view class="table solid-bottom" v-for="(item, index) in goodsData.category_attribute" :key="index">
|
|
|
@@ -458,7 +468,8 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<view class="foot padding-lr-bj">
|
|
|
- <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="hideModal()">完成</button>
|
|
|
+ <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="hideModal()">{{
|
|
|
+ $t('cart.complete') }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -470,7 +481,7 @@
|
|
|
<view class="wanl-modal">
|
|
|
<view class="head padding-bj">
|
|
|
<view class="content">
|
|
|
- <view class="text-lg">基礎服務保障</view>
|
|
|
+ <view class="text-lg">{{ $t('mall.basicService') }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="listbox padding-bj">
|
|
|
@@ -483,7 +494,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="foot padding-lr-bj">
|
|
|
- <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="hideModal()">完成</button>
|
|
|
+ <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="hideModal()">{{
|
|
|
+ $t('cart.complete') }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -500,15 +512,16 @@
|
|
|
<view class="text-price wanl-orange text-xl margin-bottom-xs">{{ selectSku.price ||
|
|
|
goodsData.interval_price || '0.00' }}</view>
|
|
|
<view v-if="selectArr.join('')" class="wanl-gray margin-bottom-xs">
|
|
|
- 庫存 <text class="margin-lr-xs">{{ selectSku.stock || 0 }}</text> 件
|
|
|
+ {{ $t('mall.stock') }} <text class="margin-lr-xs">{{ selectSku.stock || 0 }}</text> {{
|
|
|
+ $t('mall.quantity') }}
|
|
|
</view>
|
|
|
<view class="text-sm">
|
|
|
<view v-if="selectArr.join('')">
|
|
|
- <text class="margin-right-bj">已選</text>
|
|
|
+ <text class="margin-right-bj">{{ $t('mall.selected') }}</text>
|
|
|
<text class="margin-right-xs" v-for="(name, key) in selectArr" :key="key">{{ name }}</text>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- 请選擇:
|
|
|
+ {{ $t('orderConfirm.select') }}:
|
|
|
<text class="wanl-gray-light" v-for="(item, index) in goodsData.spu" :key="item.id">
|
|
|
<block v-if="index !== 0">-</block>
|
|
|
{{ item.name }}
|
|
|
@@ -531,7 +544,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="number padding-bj">
|
|
|
- <view class="text-df">購買數量</view>
|
|
|
+ <view class="text-df">{{ $t('mall.buyQuantity') }}</view>
|
|
|
<view class="num-ctrl">
|
|
|
<view class="num-btn" @tap="changeNum(-1)">-</view>
|
|
|
<text class="num-val">{{ selectNum }}</text>
|
|
|
@@ -541,13 +554,14 @@
|
|
|
</scroll-view>
|
|
|
<view class="foot padding-lr-bj">
|
|
|
<view v-if="isChoice" class="foot-single">
|
|
|
- <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="completeSelection">完成</button>
|
|
|
+ <button class="cu-btn bg-gradual-orange round text-bold complete" @tap="completeSelection">{{
|
|
|
+ $t('cart.complete') }}</button>
|
|
|
</view>
|
|
|
<block v-else>
|
|
|
- <button class="cu-btn bg-gradual-yellow round-left text-bold"
|
|
|
- @tap="submitData('addToCart', 1)">加入購物車</button>
|
|
|
- <button class="cu-btn bg-gradual-orange round-right text-bold"
|
|
|
- @tap="submitData('placeOrder', 1)">立即購買</button>
|
|
|
+ <button class="cu-btn bg-gradual-yellow round-left text-bold" @tap="submitData('addToCart', 1)">{{
|
|
|
+ $t('mall.addToCart') }}</button>
|
|
|
+ <button class="cu-btn bg-gradual-orange round-right text-bold" @tap="submitData('placeOrder', 1)">{{
|
|
|
+ $t('mall.buyNow') }}</button>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -560,25 +574,27 @@
|
|
|
<!-- 店铺 -->
|
|
|
<view class="action" @tap="onShop">
|
|
|
<view class="wlIcon-dianpu1 wanl-orange"></view>
|
|
|
- 店鋪
|
|
|
+ {{ $t('complaint.types.shop') }}
|
|
|
</view>
|
|
|
<view class="action" @tap="goCart">
|
|
|
<view class="wlIcon-gouwuche">
|
|
|
<view class="cu-tag badge" v-if="cartNum > 0">{{ cartNum }}</view>
|
|
|
</view>
|
|
|
- 購物車
|
|
|
+ {{ $t('mall.cart') }}
|
|
|
</view>
|
|
|
<view class="action"
|
|
|
@tap="goChat(goodsData.shop_id, { id: goodsData.id, title: goodsData.title, image: goodsData.image, price: goodsData.price })">
|
|
|
<view class="wlIcon-kefu">
|
|
|
<view class="cu-tag badge"></view>
|
|
|
</view>
|
|
|
- 客服
|
|
|
+ {{ $t('mall.shop.customerService') }}
|
|
|
</view>
|
|
|
<!-- 购买按钮 -->
|
|
|
<view class="btn-group">
|
|
|
- <button class="cu-btn bg-gradual-yellow round-left" @tap="submitData('addToCart')">加入購物車</button>
|
|
|
- <button class="cu-btn bg-gradual-orange round-right" @tap="submitData('placeOrder')">立即購買</button>
|
|
|
+ <button class="cu-btn bg-gradual-yellow round-left" @tap="submitData('addToCart')">{{ $t('mall.addToCart')
|
|
|
+ }}</button>
|
|
|
+ <button class="cu-btn bg-gradual-orange round-right" @tap="submitData('placeOrder')">{{ $t('mall.buyNow')
|
|
|
+ }}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -603,10 +619,10 @@ export default {
|
|
|
currentSwiper: 0,
|
|
|
selectAnchor: 0,
|
|
|
anchorlist: [
|
|
|
- { name: '商品', top: 0 },
|
|
|
- { name: '評價', top: 0 },
|
|
|
- { name: '詳情', top: 0 },
|
|
|
- { name: '推薦', top: 0 }
|
|
|
+ { name: this.$t('mall.goods'), top: 0 },
|
|
|
+ { name: this.$t('mall.evaluate'), top: 0 },
|
|
|
+ { name: this.$t('mall.detail'), top: 0 },
|
|
|
+ { name: this.$t('mall.recommend'), top: 0 }
|
|
|
],
|
|
|
modalName: null,
|
|
|
isChoice: '',
|
|
|
@@ -673,7 +689,7 @@ export default {
|
|
|
// 檢查是否所有 SKU 都售罄
|
|
|
const allSoldOut = this.goodsData.sku && this.goodsData.sku.every(sku => sku.stock <= 0)
|
|
|
if (allSoldOut) {
|
|
|
- uni.showToast({ title: '商品已售罄', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.goodsSoldOut'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
this.showModal('option')
|
|
|
@@ -727,7 +743,7 @@ export default {
|
|
|
const res = await pullMallCouponReceive({ id: coupon.id })
|
|
|
coupon.id = res.id
|
|
|
coupon.state = true
|
|
|
- uni.showToast({ title: res.msg || '領取成功', icon: 'none' })
|
|
|
+ uni.showToast({ title: res.msg || this.$t('mall.receiveSuccess'), icon: 'none' })
|
|
|
} catch (e) {
|
|
|
console.error('领取优惠券失败:', e)
|
|
|
}
|
|
|
@@ -738,7 +754,7 @@ export default {
|
|
|
const res = await pullMallGoodsFollow({ id: this.goodsId })
|
|
|
this.goodsData.follow = res
|
|
|
} catch (e) {
|
|
|
- console.error('收藏操作失败:', e)
|
|
|
+ console.error(this.$t('mall.collectFailed'), e)
|
|
|
}
|
|
|
},
|
|
|
async loadStock(skuId) {
|
|
|
@@ -805,14 +821,14 @@ export default {
|
|
|
var num = this.selectNum + delta
|
|
|
if (num < 1) return
|
|
|
if (this.selectSku.stock && num > this.selectSku.stock) {
|
|
|
- uni.showToast({ title: '最多' + this.selectSku.stock + '件', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.maxStock', [this.selectSku.stock]), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
this.selectNum = num
|
|
|
},
|
|
|
completeSelection() {
|
|
|
if (this.canCount) {
|
|
|
- uni.showToast({ title: '請選擇完整規格', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.selectCompleteSpec'), icon: 'none' })
|
|
|
} else {
|
|
|
this.processingData()
|
|
|
}
|
|
|
@@ -820,7 +836,7 @@ export default {
|
|
|
submitData(name, type) {
|
|
|
if (type == 1) {
|
|
|
if (this.canCount) {
|
|
|
- uni.showToast({ title: '請選擇完整規格', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.selectCompleteSpec'), icon: 'none' })
|
|
|
} else {
|
|
|
this.isChoice = name
|
|
|
this.processingData()
|
|
|
@@ -829,7 +845,7 @@ export default {
|
|
|
// 新增:檢查是否所有 SKU 都售罄
|
|
|
const allSoldOut = this.goodsData.sku && this.goodsData.sku.every(sku => sku.stock <= 0)
|
|
|
if (allSoldOut) {
|
|
|
- uni.showToast({ title: '商品已售罄', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.goodsSoldOut'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
this.showModal('option')
|
|
|
@@ -839,12 +855,12 @@ export default {
|
|
|
async processingData() {
|
|
|
if (this.isChoice === 'addToCart') {
|
|
|
if (!this.selectSku || !this.selectSku.id) {
|
|
|
- uni.showToast({ title: '請選擇商品規格', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.selectProductSpec'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
// 新增:檢查庫存
|
|
|
if (this.selectSku.stock !== undefined && this.selectSku.stock <= 0) {
|
|
|
- uni.showToast({ title: '商品已售罄', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.goodsSoldOut'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
await this.$store.dispatch('cart/add', {
|
|
|
@@ -858,16 +874,16 @@ export default {
|
|
|
number: this.selectNum,
|
|
|
sum: parseFloat(this.selectSku.price) * this.selectNum
|
|
|
})
|
|
|
- uni.showToast({ title: '已加入購物車', icon: 'success' })
|
|
|
+ uni.showToast({ title: this.$t('mall.addedToCart'), icon: 'success' })
|
|
|
} else if (this.isChoice === 'placeOrder') {
|
|
|
// 新增:檢查是否選擇了規格
|
|
|
if (!this.selectSku || !this.selectSku.id) {
|
|
|
- uni.showToast({ title: '請選擇商品規格', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.selectProductSpec'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
// 新增:檢查庫存
|
|
|
if (this.selectSku.stock !== undefined && this.selectSku.stock <= 0) {
|
|
|
- uni.showToast({ title: '商品已售罄', icon: 'none' })
|
|
|
+ uni.showToast({ title: this.$t('mall.goodsSoldOut'), icon: 'none' })
|
|
|
return
|
|
|
}
|
|
|
let goodsData = [
|