refactor: 将项目内硬编码文本替换为多语言调用
统一替换所有页面和组件中的硬编码字符串为 $lang 多语言方法调用,提升项目国际化适配能力
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
<text class="iconfont icon-right"></text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="box">未配置</view>
|
||||
<view class="box">{{ $lang('goods.notConfigured') }}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -3,45 +3,45 @@
|
||||
<view class="ns-goods-promotion" v-if="goodsPromotion.length">
|
||||
<view v-for="(item, index) in goodsPromotion" v-if="promotion != item.promotion_type" :key="index">
|
||||
<view v-if="item.promotion_type == 'discount'" class="item" @click="redirectTo('/pages_goods/detail', { goods_id: item.goods_id })">
|
||||
<text class="promotion-mark ">限时折扣</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.limitedTimeDiscount') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" show-menu-by-longpress/></view> -->
|
||||
</view>
|
||||
<view v-else-if="item.promotion_type == 'groupbuy'" class="item" @click="redirectTo('/pages_promotion/groupbuy/detail', { groupbuy_id: item.groupbuy_id })">
|
||||
<!-- <view v-else-if="item.promotion_type == 'groupbuy'" class="item" @click="redirectTo('/pages_promotion/groupbuy/detail', { id: item.groupbuy_id })"> -->
|
||||
<text class="promotion-mark ">团购</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.groupbuy') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" show-menu-by-longpress/></view> -->
|
||||
</view>
|
||||
<view v-else-if="item.promotion_type == 'pintuan'" class="item" @click="redirectTo('/pages_promotion/pintuan/detail', { pintuan_id: item.pintuan_id })">
|
||||
<text class="promotion-mark ">拼团</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.pintuan') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" show-menu-by-longpress/></view> -->
|
||||
</view>
|
||||
<view v-else-if="item.promotion_type == 'seckill'" class="item" @click="redirectTo('/pages_promotion/seckill/detail', { seckill_id: item.id })">
|
||||
<text class="promotion-mark ">秒杀</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.seckill') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" show-menu-by-longpress/></view> -->
|
||||
</view>
|
||||
<view v-else-if="item.promotion_type == 'topic'" class="item" @click="redirectTo('/pages_promotion/topics/goods_detail', { id: item.id })">
|
||||
<text class="promotion-mark ">专题活动</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.topicActivity') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" show-menu-by-longpress/></view> -->
|
||||
</view>
|
||||
<view v-else-if="item.promotion_type == 'bargain'" class="item" @click="redirectTo('/pages_promotion/bargain/detail', { b_id: item.bargain_id })">
|
||||
<text class="promotion-mark ">砍价</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.bargain') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
<!-- <view class="img-wrap"><image :src="$util.img('public/uniapp/goods/detail_more.png')" mode="aspectFit" show-menu-by-longpress/></view> -->
|
||||
</view>
|
||||
<view v-else-if="item.promotion_type == 'pinfan'" class="item" @click="redirectTo('/pages_promotion/pinfan/detail', { pinfan_id: item.pintuan_id })">
|
||||
<text class="promotion-mark ">拼团返利</text>
|
||||
<text class="title">当前商品正在参加{{ item.promotion_name }}</text>
|
||||
<text class="promotion-mark ">{{ $lang('promotion.pinfan') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
|
||||
<block v-if="hasData">
|
||||
<view class="cart-header" v-if="cartData.length">
|
||||
<view class="num-wrap">共{{ cartData[0].cartList.length }}种商品</view>
|
||||
<view class="num-wrap">{{ $lang('cart.totalTypes') }}{{ cartData[0].cartList.length }}{{ $lang('cart.types') }}</view>
|
||||
<view class="cart-action" @click="changeAction">
|
||||
{{ isAction ? $lang('complete') : $lang('edit') }}
|
||||
</view>
|
||||
@@ -13,11 +13,11 @@
|
||||
<view class="cart-wrap" v-for="(siteItem, siteIndex) in cartData" :key="siteIndex">
|
||||
<view class="coupon-use-tips" v-if="discount.coupon_info">
|
||||
<view>
|
||||
<text class="title color-base-text">优惠券</text>
|
||||
<text class="desc">领券结算最高可减{{ discount.coupon_info.coupon_money | moneyFormat }}元</text>
|
||||
<text class="title color-base-text">{{ $lang('cart.coupon') }}</text>
|
||||
<text class="desc">{{ $lang('cart.couponDesc') }}{{ discount.coupon_info.coupon_money | moneyFormat }}{{ $lang('sku.unit') }}</text>
|
||||
</view>
|
||||
<view class="color-base-text" @click="$refs.couponPopup.open()">
|
||||
点击{{ discount.coupon_info.receive_type == 'wait' ? '领取' : '查看' }}
|
||||
{{ $lang('cart.click') }}{{ discount.coupon_info.receive_type == 'wait' ? $lang('goods.receive') : $lang('cart.view') }}
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -120,10 +120,10 @@
|
||||
@limit="goodsLimit($event, { siteIndex, cartIndex })" />
|
||||
</view>
|
||||
<view class="discount-wrap" v-if="manjian && manjian['sku_' + item.sku_id]">
|
||||
<text class="discount-tag">满减</text>
|
||||
<text class="discount-tag">{{ $lang('goods.fullReduce') }}</text>
|
||||
<scroll-view scroll-x="true" class="scroll-view">
|
||||
<block v-for="(mitem, key) in manjian['sku_' + item.sku_id]" :key="key">
|
||||
<text v-if="mitem.discount_money">{{ Number(mitem.limit) }}减{{
|
||||
<text v-if="mitem.discount_money">{{ $lang('goods.full') }}{{ Number(mitem.limit) }}{{ $lang('goods.minus') }}{{
|
||||
mitem.discount_money }}</text>
|
||||
<text class="interval" v-if="mitem.discount_money"></text>
|
||||
</block>
|
||||
@@ -140,9 +140,9 @@
|
||||
<view class="cart-wrap invalid" v-if="invalidGoods.length">
|
||||
<view class="cart-header">
|
||||
<view class="num-wrap">
|
||||
<text class="font-size-base">失效商品{{ invalidGoods.length }}件</text>
|
||||
<text class="font-size-base">{{ $lang('cart.invalidGoodsCount', { count: invalidGoods.length }) }}</text>
|
||||
</view>
|
||||
<view class="cart-action color-base-text" @click="clearInvalidGoods">清空</view>
|
||||
<view class="cart-action color-base-text" @click="clearInvalidGoods">{{ $lang('cart.clear') }}</view>
|
||||
</view>
|
||||
<block v-for="(goodsItem, goodsIndex) in invalidGoods" :key="goodsIndex">
|
||||
<view class="cart-goods invalid-goods">
|
||||
@@ -189,7 +189,7 @@
|
||||
</template>
|
||||
</text>
|
||||
</view>
|
||||
<text class="invalid-mark">已失效</text>
|
||||
<text class="invalid-mark">{{ $lang('cart.invalid') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -199,7 +199,7 @@
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="cart-empty">
|
||||
<ns-empty text="购物车为空" subText="赶紧去逛逛, 购买心仪的商品吧" :isIndex="Boolean(storeToken)"
|
||||
<ns-empty :text="$lang('cart.emptyCart')" :subText="$lang('cart.emptyDesc')" :isIndex="Boolean(storeToken)"
|
||||
:emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
|
||||
<button type="primary" size="mini" class="button mini" v-if="!storeToken" @click="toLogin">{{
|
||||
$lang('toLogin')
|
||||
@@ -218,26 +218,26 @@
|
||||
<uni-popup ref="discountPopup" custom-class="uni-popup-discount" type="bottom">
|
||||
<view class="discount-popup popup" v-if="Object.keys(discount).length">
|
||||
<view class="popup-header">
|
||||
<text class="tit">优惠明细</text>
|
||||
<text class="tit">{{ $lang('cart.discountDetail') }}</text>
|
||||
<text class="iconfont icon-close" @click="toggleDiscountPopup"></text>
|
||||
</view>
|
||||
<view class="popup-body" :class="{ 'safe-area': isIphoneX }" @click="toggleDiscountPopup">
|
||||
<view class="detail-item">
|
||||
<view class="title">商品总额</view>
|
||||
<view class="money price-font">¥{{ discount.goods_money | moneyFormat }}</view>
|
||||
<view class="title">{{ $lang('cart.goodsTotal') }}</view>
|
||||
<view class="money price-font">{{ $lang('common.currencySymbol') }}{{ discount.goods_money | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="detail-item" v-if="discount.coupon_money > 0">
|
||||
<view class="title">优惠券</view>
|
||||
<view class="money price-font reduce">-¥{{ discount.coupon_money | moneyFormat }}</view>
|
||||
<view class="title">{{ $lang('goods.coupon') }}</view>
|
||||
<view class="money price-font reduce">-{{ $lang('common.currencySymbol') }}{{ discount.coupon_money | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="detail-item" v-if="discount.promotion_money > 0">
|
||||
<view class="title">满减</view>
|
||||
<view class="money reduce price-font">-¥{{ discount.promotion_money | moneyFormat }}
|
||||
<view class="title">{{ $lang('goods.fullReduce') }}</view>
|
||||
<view class="money reduce price-font">-{{ $lang('common.currencySymbol') }}{{ discount.promotion_money | moneyFormat }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-item total">
|
||||
<view class="title">合计</view>
|
||||
<view class="money price-font ">¥{{ discount.order_money | moneyFormat }}</view>
|
||||
<view class="title">{{ $lang('cart.total') }}</view>
|
||||
<view class="money price-font ">{{ $lang('common.currencySymbol') }}{{ discount.order_money | moneyFormat }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{ height: tabBarHeight }"></view>
|
||||
@@ -247,7 +247,7 @@
|
||||
<uni-popup ref="couponPopup" custom-class="uni-popup-discount" type="bottom" v-if="discount.coupon_info">
|
||||
<view class="coupon-popup popup">
|
||||
<view class="popup-header">
|
||||
<text class="tit">优惠券</text>
|
||||
<text class="tit">{{ $lang('goods.coupon') }}</text>
|
||||
<text class="iconfont icon-close" @click="$refs.couponPopup.close()"></text>
|
||||
</view>
|
||||
<view class="popup-body" :class="{ 'safe-area': isIphoneX }" @click="$refs.couponPopup.close()">
|
||||
@@ -264,14 +264,14 @@
|
||||
</template>
|
||||
<template v-else-if="discount.coupon_info.type == 'discount'">
|
||||
<text class="money">{{ parseFloat(discount.coupon_info.discount) }}</text>
|
||||
<text class="unit">折</text>
|
||||
<text class="unit">{{ $lang('coupon.discountSuffix') }}</text>
|
||||
</template>
|
||||
<view class="at-least">
|
||||
<template v-if="discount.coupon_info.at_least > 0">
|
||||
满{{ discount.coupon_info.at_least }}可用
|
||||
{{ $lang('goods.full') }}{{ discount.coupon_info.at_least }}{{ $lang('goods.usable') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
无门槛
|
||||
{{ $lang('goods.noThreshold') }}
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -281,23 +281,23 @@
|
||||
<view
|
||||
v-if="discount.coupon_info.type == 'discount' && discount.coupon_info.discount_limit > 0"
|
||||
class="limit">
|
||||
最多可抵¥{{ discount.coupon_info.discount_limit }}
|
||||
{{ $lang('cart.maxDeduct') }}{{ $lang('common.currencySymbol') }}{{ discount.coupon_info.discount_limit }}
|
||||
</view>
|
||||
<view class="time font-size-goods-tag"
|
||||
v-if="discount.coupon_info.validity_type == 0">
|
||||
有效期:{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
|
||||
{{ $lang('form.validityPeriod') }}{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
|
||||
</view>
|
||||
<view class="time font-size-goods-tag"
|
||||
v-else-if="discount.coupon_info.validity_type == 1">
|
||||
有效期:领取之日起{{ discount.coupon_info.fixed_term }}天内有效
|
||||
{{ $lang('cart.validFromReceive') }}{{ discount.coupon_info.fixed_term }}{{ $lang('cart.daysValid') }}
|
||||
</view>
|
||||
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
||||
<view class="time font-size-goods-tag" v-else>{{ $lang('cart.longTermValid') }}</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" v-if="discount.coupon_info.receive_type != 'wait'"
|
||||
disabled>已领取</button>
|
||||
disabled>{{ $lang('goods.received') }}</button>
|
||||
<button type="primary" v-else
|
||||
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">领取</button>
|
||||
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">{{ $lang('goods.receive') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -329,7 +329,7 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="detail" @click="toggleDiscountPopup" v-if="Object.keys(discount).length">
|
||||
优惠明细
|
||||
{{ $lang('cart.discountDetail') }}
|
||||
<text class="iconfont icon-unfold" :class="{ open: !discountPopupShow }"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -338,7 +338,7 @@
|
||||
</view>
|
||||
<view class="action-btn" v-else>
|
||||
<button type="primary" size="mini" class="mini" @click="settlement" v-if="totalCount != 0">
|
||||
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? '领券' : '立即' }}结算({{
|
||||
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? $lang('cart.receiveCouponSettle') : $lang('cart.settleNow') }}({{
|
||||
totalCount }})
|
||||
</button>
|
||||
<button type="primary" size="mini" class="mini" @click="settlement" disabled v-else>{{
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<view class="price-info">
|
||||
<view class="icon-box"><text class="iconfont icon-tutechan"></text></view>
|
||||
<view class="price-box">
|
||||
<view class="promotion-text">限时折扣</view>
|
||||
<view class="sale-num" v-if="goodsSkuDetail.sale_show">已售{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
|
||||
<view class="promotion-text">{{ $lang('goods.limitedTimeDiscount') }}</view>
|
||||
<view class="sale-num" v-if="goodsSkuDetail.sale_show">{{ $lang('goods.sold') }}{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="countdown">
|
||||
<view class="txt">距结束仅剩</view>
|
||||
<view class="txt">{{ $lang('goods.endsIn') }}</view>
|
||||
<view class="clockrun">
|
||||
<uni-count-down
|
||||
:day="goodsSkuDetail.discountTimeMachine.d"
|
||||
@@ -52,7 +52,7 @@
|
||||
<image :src="$util.img('public/uniapp/goods/member_vip.png')" mode="aspectFit" show-menu-by-longpress/>
|
||||
</view>
|
||||
<view class="member-price-wrap" v-if="!goodsSkuDetail.market_price_show">
|
||||
<text class="unit price-font">原价</text>
|
||||
<text class="unit price-font">{{ $lang('goods.originalPrice') }}</text>
|
||||
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="money price-font">{{ goodsSkuDetail.price }}</text>
|
||||
</view>
|
||||
@@ -192,7 +192,7 @@
|
||||
</view>
|
||||
<view class="item free" v-if="manjian.rule_json !== null && addonIsExist.manjian" @click="openManjianPopup()">
|
||||
<view class="label">促销</view>
|
||||
<text class="free-tip color-base-text">满减</text>
|
||||
<text class="free-tip color-base-text">{{ $lang('goods.fullReduce') }}</text>
|
||||
<text class="font-size-base value">{{ manjian.manjian_name }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
@@ -217,7 +217,7 @@
|
||||
<view class="group-wrap" @click="openBundlingPopup()">
|
||||
<view class="goods-cell" @click="openBundlingPopup()">
|
||||
<view class="box">
|
||||
<text class="tit">组合套餐</text>
|
||||
<text class="tit">{{ $lang('goods.comboMeal') }}</text>
|
||||
<text>{{ bundling[0].bl_name }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
@@ -257,7 +257,7 @@
|
||||
<uni-popup ref="bundlingPopup" type="bottom">
|
||||
<view class="bundling-popup-layer popup-layer">
|
||||
<view class="head-wrap" @click="closeBundlingPopup()">
|
||||
<text>组合套餐</text>
|
||||
<text>{{ $lang('goods.comboMeal') }}</text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<scroll-view scroll-y class="bundling-body">
|
||||
@@ -297,10 +297,10 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="bundling-price-wrap">
|
||||
<text class="label">套餐价</text>
|
||||
<text class="label">{{ $lang('goods.comboPrice') }}</text>
|
||||
<text class="unit price-color">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price price-color">{{ item.bl_price }}</text>
|
||||
<button type="primary" size="mini" class="mini" @click="toComoDetail(item.bl_id)">立即购买</button>
|
||||
<button type="primary" size="mini" class="mini" @click="toComoDetail(item.bl_id)">{{ $lang('goods.buyNow') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -316,7 +316,7 @@
|
||||
<uni-popup ref="couponPopup" type="bottom">
|
||||
<view class="goods-coupon-popup-layer popup-layer">
|
||||
<view class="head-wrap" @click="closeCouponPopup()">
|
||||
<text>优惠券</text>
|
||||
<text>{{ $lang('goods.coupon') }}</text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<scroll-view class="coupon-body" scroll-y>
|
||||
@@ -331,33 +331,33 @@
|
||||
</template>
|
||||
<template v-else-if="item.type == 'discount'">
|
||||
<text class="money">{{ parseFloat(item.discount) }}</text>
|
||||
<text class="unit">折</text>
|
||||
<text class="unit">{{ $lang('coupon.discountSuffix') }}</text>
|
||||
</template>
|
||||
<view class="at-least">
|
||||
<template v-if="item.at_least > 0">
|
||||
满{{ item.at_least }}可用
|
||||
{{ $lang('goods.full') }}{{ item.at_least }}{{ $lang('goods.usable') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
无门槛
|
||||
{{ $lang('goods.noThreshold') }}
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc-wrap">
|
||||
<view class="coupon-name">{{ item.coupon_name }}</view>
|
||||
<view v-if="item.type == 'discount' && item.discount_limit > 0" class="limit">最多可抵¥{{ item.discount_limit }}</view>
|
||||
<view class="time font-size-goods-tag" v-if="item.validity_type == 0">有效期:{{ $util.timeStampTurnTime(item.end_time) }}</view>
|
||||
<view class="time font-size-goods-tag" v-else-if="item.validity_type == 1">有效期:领取之日起{{ item.fixed_term }}天内有效</view>
|
||||
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
||||
<view v-if="item.type == 'discount' && item.discount_limit > 0" class="limit">{{ $lang('goods.maxDeduct', { amount: item.discount_limit }) }}</view>
|
||||
<view class="time font-size-goods-tag" v-if="item.validity_type == 0">{{ $lang('goods.validity') }}:{{ $util.timeStampTurnTime(item.end_time) }}</view>
|
||||
<view class="time font-size-goods-tag" v-else-if="item.validity_type == 1">{{ $lang('goods.validity') }}:{{ $lang('goods.validityFromReceive', { days: item.fixed_term }) }}</view>
|
||||
<view class="time font-size-goods-tag" v-else>{{ $lang('goods.validity') }}:{{ $lang('goods.validityLong') }}</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" v-if="item.useState == 2" disabled>已抢光</button>
|
||||
<button type="primary" v-else-if="item.useState == 1" disabled>已领取</button>
|
||||
<button type="primary" v-else @click="receiveCoupon(item)">领取</button>
|
||||
<button type="primary" v-if="item.useState == 2" disabled>{{ $lang('goods.taken') }}</button>
|
||||
<button type="primary" v-else-if="item.useState == 1" disabled>{{ $lang('goods.received') }}</button>
|
||||
<button type="primary" v-else @click="receiveCoupon(item)">{{ $lang('goods.receive') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box"><button type="primary" @click="closeCouponPopup()">确定</button></view>
|
||||
<view class="button-box"><button type="primary" @click="closeCouponPopup()">{{ $lang('common.confirm') }}</button></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -367,24 +367,24 @@
|
||||
<uni-popup ref="manjianPopup" type="bottom">
|
||||
<view class="manjian-popup-layer popup-layer">
|
||||
<view class="head-wrap" @click="closeManjianPopup()">
|
||||
<text>促销</text>
|
||||
<text>{{ $lang('goods.promotion') }}</text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<scroll-view scroll-y class="manjian-body">
|
||||
<view class="item" v-if="manjian.manjian != undefined" style="display: flex;">
|
||||
<view class="free-tip color-base-text color-base-border">满减</view>
|
||||
<view class="free-tip color-base-text color-base-border">{{ $lang('goods.fullReduce') }}</view>
|
||||
<text class="font-size-base">{{ manjian.manjian }}</text>
|
||||
</view>
|
||||
<view class="item" v-if="manjian.mansong != undefined">
|
||||
<text class="free-tip color-base-text color-base-border">满送</text>
|
||||
<text class="free-tip color-base-text color-base-border">{{ $lang('goods.fullGift') }}</text>
|
||||
<text class="font-size-base">{{ manjian.mansong }}</text>
|
||||
</view>
|
||||
<view class="item" v-if="manjian.free_shipping != undefined" style="display: flex;">
|
||||
<view class="free-tip color-base-text color-base-border">包邮</view>
|
||||
<view class="free-tip color-base-text color-base-border">{{ $lang('goods.freeShipping') }}</view>
|
||||
<text class="font-size-base">{{ manjian.free_shipping }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box"><button type="primary" @click="closeManjianPopup()">确定</button></view>
|
||||
<view class="button-box"><button type="primary" @click="closeManjianPopup()">{{ $lang('common.confirm') }}</button></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -393,7 +393,7 @@
|
||||
<uni-popup ref="informationPopup" type="bottom">
|
||||
<view class="manjian-popup-layer popup-layer" :style="{ height: FormHeight }">
|
||||
<view class="head-wrap" @click="closeinformationPopup()">
|
||||
<text>商品留言</text>
|
||||
<text>{{ $lang('goods.goodsMessage') }}</text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
</view>
|
||||
<scroll-view scroll-y class="manjian-body" >
|
||||
@@ -414,7 +414,7 @@
|
||||
<ns-form :data="informationform" ref="form"></ns-form>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box"><button type="primary" @click="saveubfirnation()">确定</button></view>
|
||||
<view class="button-box"><button type="primary" @click="saveubfirnation()">{{ $lang('common.confirm') }}</button></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- <uni-popup ref="informationPopup" type="bottom" class="sku-layer" @change="popclose">
|
||||
@@ -463,7 +463,7 @@
|
||||
|
||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 1" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="phoneClick(goodsSkuDetail.goods_mobile)" :text="$lang('make')" :disabled="false" />
|
||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="showinformation" :text="$lang('leave')" :disabled="false" />
|
||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 3" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="goToAIChat" text="智能客服" :disabled="false" />
|
||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 3" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="goToAIChat" :text="$lang('goods.aiService')" :disabled="false" />
|
||||
<!-- <ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="buyNow" text="商品留言" :disabled="false" /> -->
|
||||
|
||||
</block>
|
||||
@@ -520,11 +520,11 @@
|
||||
<uni-popup ref="contactPopup" type="center">
|
||||
<view class="contact-popup">
|
||||
<view class="contact-content">
|
||||
<text class="contact-text">可在手机端拨打 021-51815181</text>
|
||||
<text class="contact-text">{{ $lang('goods.callOnMobile', { phone: '021-51815181' }) }}</text>
|
||||
</view>
|
||||
<view class="contact-buttons">
|
||||
<button class="contact-btn cancel-btn" @click="closeContactPopup">取消</button>
|
||||
<button class="contact-btn copy-btn" @click="copyPhoneNumber">复制到剪切板</button>
|
||||
<button class="contact-btn cancel-btn" @click="closeContactPopup">{{ $lang('common.cancel') }}</button>
|
||||
<button class="contact-btn copy-btn" @click="copyPhoneNumber">{{ $lang('goods.copyToClipboard') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="search-wrap uni-flex uni-row">
|
||||
<view class="flex-item input-wrap">
|
||||
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()"
|
||||
:placeholder="langstatus ? $lang('Search') : '请输入您要搜索的商品'" />
|
||||
:placeholder="langstatus ? $lang('Search') : $lang('goods.searchGoods')" />
|
||||
<text class="iconfont icon-sousuo3" @click.stop="search()"></text>
|
||||
</view>
|
||||
<view class="iconfont" :class="{ 'icon-apps': isList, 'icon-list': !isList }"
|
||||
@@ -16,16 +16,16 @@
|
||||
<view class="sort-wrap">
|
||||
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }"
|
||||
@click="sortTabClick('')">
|
||||
<text :class="{ 'color-base-text': orderType === '' }">{{ langstatus ? $lang('Random') : '综合' }}</text>
|
||||
<text :class="{ 'color-base-text': orderType === '' }">{{ langstatus ? $lang('Random') : $lang('goods.comprehensive') }}</text>
|
||||
</view>
|
||||
|
||||
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">
|
||||
{{ langstatus ? $lang('Sales') : '销量' }}
|
||||
{{ langstatus ? $lang('Sales') : $lang('chat.sales') }}
|
||||
</view>
|
||||
|
||||
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
||||
<text
|
||||
:class="{ 'color-base-text': orderType === 'discount_price' }">{{ langstatus ? $lang('Price') : '价格' }}</text>
|
||||
:class="{ 'color-base-text': orderType === 'discount_price' }">{{ langstatus ? $lang('Price') : $lang('goods.price') }}</text>
|
||||
<view class="iconfont-wrap">
|
||||
<view class="iconfont icon-iconangledown-copy asc"
|
||||
:class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }">
|
||||
@@ -37,7 +37,7 @@
|
||||
</view>
|
||||
|
||||
<view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap">
|
||||
<text @click="sortTabClick('screen')">{{ langstatus ? $lang('Filter') : '筛选' }}</text>
|
||||
<text @click="sortTabClick('screen')">{{ langstatus ? $lang('Filter') : $lang('goods.filter') }}</text>
|
||||
<view @click="sortTabClick('screen')" class="iconfont-wrap">
|
||||
<view class="iconfont icon-shaixuan color-tip"></view>
|
||||
</view>
|
||||
@@ -78,8 +78,8 @@
|
||||
</view>
|
||||
<view class="pro-info" v-if="item.isinformation == 0">
|
||||
<view class="block-wrap">
|
||||
<view class="sale" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : '件' }}</view>
|
||||
<view class="sale" v-if="item.sale_show">{{ $lang('goods.sold') }}{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : $lang('sku.unit') }}</view>
|
||||
</view>
|
||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||
<view class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
||||
@@ -126,8 +126,8 @@
|
||||
</view>
|
||||
<view class="pro-info" v-if="item.isinformation == 0">
|
||||
<view class="block-wrap">
|
||||
<view class="sale" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : '件' }}</view>
|
||||
<view class="sale" v-if="item.sale_show">{{ $lang('goods.sold') }}{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : $lang('sku.unit') }}</view>
|
||||
</view>
|
||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||
<view class="cart buy-btn click-wrap" :id="'goods-' + item.id"
|
||||
@@ -145,7 +145,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="goodsList.length == 0 && emptyShow"><ns-empty text="暂无商品"></ns-empty></view>
|
||||
<view v-if="goodsList.length == 0 && emptyShow"><ns-empty :text="$lang('goods.noGoods')"></ns-empty></view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
|
||||
@@ -153,11 +153,11 @@
|
||||
|
||||
<!-- 筛选弹出框 -->
|
||||
<uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap">
|
||||
<view class="title color-tip">筛选</view>
|
||||
<view class="title color-tip">{{ $lang('goodsList.filter') }}</view>
|
||||
<scroll-view scroll-y>
|
||||
<!-- 包邮 -->
|
||||
<!-- <view class="item-wrap">
|
||||
<view class="label"><text>是否包邮</text></view>
|
||||
<view class="label"><text>{{ $lang('goodsList.freeShipping') }}</text></view>
|
||||
<view class="list">
|
||||
<uni-tag :inverted="true" text="包邮" :type="isFreeShipping ? 'primary' : 'default'" @click="isFreeShipping = !isFreeShipping" />
|
||||
</view>
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
<!-- 价格筛选项 -->
|
||||
<!-- <view class="item-wrap">
|
||||
<view class="label"><text>价格区间(元)</text></view>
|
||||
<view class="label"><text>{{ $lang('goodsList.priceRange') }}</text></view>
|
||||
<view class="price-wrap">
|
||||
<input class="uni-input" type="digit" v-model="minPrice" placeholder="最低价" />
|
||||
<view class="h-line"></view>
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
<!-- 品牌筛选项 -->
|
||||
<!-- <view class="item-wrap" v-if="brandList.length > 0">
|
||||
<view class="label"><text>品牌</text></view>
|
||||
<view class="label"><text>{{ $lang('goodsList.brand') }}</text></view>
|
||||
<view class="list">
|
||||
<view v-for="(item, index) in brandList" :key="index">
|
||||
<uni-tag :inverted="true" :text="item.brand_name" :type="item.brand_id == brandId ? 'primary' : 'default'" @click="brandId == item.brand_id ? (brandId = 0) : (brandId = item.brand_id)" />
|
||||
@@ -185,10 +185,10 @@
|
||||
|
||||
<!-- 分类筛选项 -->
|
||||
<view class="category-list-wrap">
|
||||
<text class="first">全部分类</text>
|
||||
<text class="first">{{ $lang('goodsList.allCategory') }}</text>
|
||||
<view class="class-box">
|
||||
<view @click="selectedCategory('')" class="list-wrap">
|
||||
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text>
|
||||
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ $lang('goodsList.all') }}</text>
|
||||
</view>
|
||||
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
|
||||
:key="index" class="list-wrap">
|
||||
@@ -200,8 +200,8 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="footer" :class="{ 'safe-area': isIphoneX }">
|
||||
<button type="default" class="footer-box" @click="resetData">重置</button>
|
||||
<button type="primary" class="footer-box1" @click="screenData">确定</button>
|
||||
<button type="default" class="footer-box" @click="resetData">{{ $lang('goodsList.reset') }}</button>
|
||||
<button type="primary" class="footer-box1" @click="screenData">{{ $lang('goodsList.confirm') }}</button>
|
||||
</view>
|
||||
</uni-drawer>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
Reference in New Issue
Block a user