refactor: 替换多页面国际化文本为硬编码中文内容
移除项目内大部分$lang()国际化调用,替换为直接中文文本,统一前端展示文案
This commit is contained in:
@@ -282,7 +282,7 @@ export default {
|
||||
//生成海报
|
||||
getGoodsPoster() {
|
||||
uni.showLoading({
|
||||
'title': this.$lang('goods.posterGenerating')
|
||||
'title': '海报生成中...'
|
||||
})
|
||||
//活动海报信息
|
||||
if (this.memberInfo && this.memberInfo.member_id) this.posterParams.source_member = this.memberInfo.member_id;
|
||||
@@ -348,12 +348,12 @@ export default {
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('common.saveSuccess')
|
||||
title: "保存成功"
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('common.saveFailed')
|
||||
title: "保存失败,请稍后重试"
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -361,7 +361,7 @@ export default {
|
||||
},
|
||||
fail: (err) => {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('common.saveFailed')
|
||||
title: "保存失败,请稍后重试"
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<text class="iconfont icon-right"></text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="box">{{ $lang('goods.notConfigured') }}</view>
|
||||
<view class="box">未配置</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 ">{{ $lang('promotion.limitedTimeDiscount') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">限时折扣</text>
|
||||
<text class="title">当前商品正在参加{{ 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 ">{{ $lang('promotion.groupbuy') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">团购</text>
|
||||
<text class="title">当前商品正在参加{{ 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 ">{{ $lang('promotion.pintuan') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">拼团</text>
|
||||
<text class="title">当前商品正在参加{{ 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 ">{{ $lang('promotion.seckill') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">秒杀</text>
|
||||
<text class="title">当前商品正在参加{{ 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 ">{{ $lang('promotion.topicActivity') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">专题活动</text>
|
||||
<text class="title">当前商品正在参加{{ 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 ">{{ $lang('promotion.bargain') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">砍价</text>
|
||||
<text class="title">当前商品正在参加{{ 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 ">{{ $lang('promotion.pinfan') }}</text>
|
||||
<text class="title">{{ $lang('promotion.participating', { name: item.promotion_name }) }}</text>
|
||||
<text class="promotion-mark ">拼团返利</text>
|
||||
<text class="title">当前商品正在参加{{ 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">{{ $lang('cart.totalTypes') }}{{ cartData[0].cartList.length }}{{ $lang('cart.types') }}</view>
|
||||
<view class="num-wrap">共{{ cartData[0].cartList.length }}种商品</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">{{ $lang('cart.coupon') }}</text>
|
||||
<text class="desc">{{ $lang('cart.couponDesc') }}{{ discount.coupon_info.coupon_money | moneyFormat }}{{ $lang('sku.unit') }}</text>
|
||||
<text class="title color-base-text">优惠券</text>
|
||||
<text class="desc">领券结算最高可减{{ discount.coupon_info.coupon_money | moneyFormat }}元</text>
|
||||
</view>
|
||||
<view class="color-base-text" @click="$refs.couponPopup.open()">
|
||||
{{ $lang('cart.click') }}{{ discount.coupon_info.receive_type == 'wait' ? $lang('goods.receive') : $lang('cart.view') }}
|
||||
点击{{ discount.coupon_info.receive_type == 'wait' ? '领取' : '查看' }}
|
||||
<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">{{ $lang('goods.fullReduce') }}</text>
|
||||
<text class="discount-tag">满减</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">{{ $lang('goods.full') }}{{ Number(mitem.limit) }}{{ $lang('goods.minus') }}{{
|
||||
<text v-if="mitem.discount_money">{{ Number(mitem.limit) }}减{{
|
||||
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">{{ $lang('cart.invalidGoodsCount', { count: invalidGoods.length }) }}</text>
|
||||
<text class="font-size-base">失效商品{{ invalidGoods.length }}件</text>
|
||||
</view>
|
||||
<view class="cart-action color-base-text" @click="clearInvalidGoods">{{ $lang('cart.clear') }}</view>
|
||||
<view class="cart-action color-base-text" @click="clearInvalidGoods">清空</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">{{ $lang('cart.invalid') }}</text>
|
||||
<text class="invalid-mark">已失效</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -199,7 +199,7 @@
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="cart-empty">
|
||||
<ns-empty :text="$lang('cart.emptyCart')" :subText="$lang('cart.emptyDesc')" :isIndex="Boolean(storeToken)"
|
||||
<ns-empty text="购物车为空" subText="赶紧去逛逛, 购买心仪的商品吧" :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">{{ $lang('cart.discountDetail') }}</text>
|
||||
<text class="tit">优惠明细</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">{{ $lang('cart.goodsTotal') }}</view>
|
||||
<view class="money price-font">{{ $lang('common.currencySymbol') }}{{ discount.goods_money | moneyFormat }}</view>
|
||||
<view class="title">商品总额</view>
|
||||
<view class="money price-font">¥{{ discount.goods_money | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="detail-item" v-if="discount.coupon_money > 0">
|
||||
<view class="title">{{ $lang('goods.coupon') }}</view>
|
||||
<view class="money price-font reduce">-{{ $lang('common.currencySymbol') }}{{ discount.coupon_money | moneyFormat }}</view>
|
||||
<view class="title">优惠券</view>
|
||||
<view class="money price-font reduce">-¥{{ discount.coupon_money | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="detail-item" v-if="discount.promotion_money > 0">
|
||||
<view class="title">{{ $lang('goods.fullReduce') }}</view>
|
||||
<view class="money reduce price-font">-{{ $lang('common.currencySymbol') }}{{ discount.promotion_money | moneyFormat }}
|
||||
<view class="title">满减</view>
|
||||
<view class="money reduce price-font">-¥{{ discount.promotion_money | moneyFormat }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail-item total">
|
||||
<view class="title">{{ $lang('cart.total') }}</view>
|
||||
<view class="money price-font ">{{ $lang('common.currencySymbol') }}{{ discount.order_money | moneyFormat }}</view>
|
||||
<view class="title">合计</view>
|
||||
<view class="money price-font ">¥{{ 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">{{ $lang('goods.coupon') }}</text>
|
||||
<text class="tit">优惠券</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">{{ $lang('coupon.discountSuffix') }}</text>
|
||||
<text class="unit">折</text>
|
||||
</template>
|
||||
<view class="at-least">
|
||||
<template v-if="discount.coupon_info.at_least > 0">
|
||||
{{ $lang('goods.full') }}{{ discount.coupon_info.at_least }}{{ $lang('goods.usable') }}
|
||||
满{{ discount.coupon_info.at_least }}可用
|
||||
</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">
|
||||
{{ $lang('cart.maxDeduct') }}{{ $lang('common.currencySymbol') }}{{ discount.coupon_info.discount_limit }}
|
||||
最多可抵¥{{ discount.coupon_info.discount_limit }}
|
||||
</view>
|
||||
<view class="time font-size-goods-tag"
|
||||
v-if="discount.coupon_info.validity_type == 0">
|
||||
{{ $lang('form.validityPeriod') }}{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
|
||||
有效期:{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
|
||||
</view>
|
||||
<view class="time font-size-goods-tag"
|
||||
v-else-if="discount.coupon_info.validity_type == 1">
|
||||
{{ $lang('cart.validFromReceive') }}{{ discount.coupon_info.fixed_term }}{{ $lang('cart.daysValid') }}
|
||||
有效期:领取之日起{{ discount.coupon_info.fixed_term }}天内有效
|
||||
</view>
|
||||
<view class="time font-size-goods-tag" v-else>{{ $lang('cart.longTermValid') }}</view>
|
||||
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" v-if="discount.coupon_info.receive_type != 'wait'"
|
||||
disabled>{{ $lang('goods.received') }}</button>
|
||||
disabled>已领取</button>
|
||||
<button type="primary" v-else
|
||||
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">{{ $lang('goods.receive') }}</button>
|
||||
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">领取</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' ? $lang('cart.receiveCouponSettle') : $lang('cart.settleNow') }}({{
|
||||
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? '领券' : '立即' }}结算({{
|
||||
totalCount }})
|
||||
</button>
|
||||
<button type="primary" size="mini" class="mini" @click="settlement" disabled v-else>{{
|
||||
|
||||
@@ -46,16 +46,16 @@ export default {
|
||||
this.mpShareData = res;
|
||||
}).catch(err => {
|
||||
// 如果后台没配置,用默认值
|
||||
this.mpShareData = {
|
||||
appMessage: {
|
||||
title: this.$lang('goods.shareTitle'),
|
||||
path: '/pages_goods/category'
|
||||
},
|
||||
timeLine: {
|
||||
title: this.$lang('goods.shareTitle'),
|
||||
query: '/pages_goods/category'
|
||||
}
|
||||
};
|
||||
this.mpShareData = {
|
||||
appMessage: {
|
||||
title: '发现超多好物,快来看看',
|
||||
path: '/pages_goods/category'
|
||||
},
|
||||
timeLine: {
|
||||
title: '发现超多好物,快来看看',
|
||||
query: '/pages_goods/category'
|
||||
}
|
||||
};
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
@@ -92,19 +92,19 @@ export default {
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.mpShareData?.appMessage || {
|
||||
title: this.$lang('goods.shareTitle'),
|
||||
title: '发现超多好物,快来看看',
|
||||
path: '/pages_goods/category'
|
||||
};
|
||||
},
|
||||
onShareTimeline() {
|
||||
return this.mpShareData?.timeLine || {
|
||||
title: this.$lang('goods.shareTitle'),
|
||||
title: '发现超多好物,快来看看',
|
||||
query: '/pages_goods/category'
|
||||
};
|
||||
},
|
||||
onAddToFavorites() {
|
||||
return {
|
||||
title: this.$lang('goods.shareTitle'),
|
||||
title: '发现超多好物,快来看看',
|
||||
path: '/pages_goods/category'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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">{{ $lang('goods.limitedTimeDiscount') }}</view>
|
||||
<view class="sale-num" v-if="goodsSkuDetail.sale_show">{{ $lang('goods.sold') }}{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
|
||||
<view class="promotion-text">限时折扣</view>
|
||||
<view class="sale-num" v-if="goodsSkuDetail.sale_show">已售{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="countdown">
|
||||
<view class="txt">{{ $lang('goods.endsIn') }}</view>
|
||||
<view class="txt">距结束仅剩</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">{{ $lang('goods.originalPrice') }}</text>
|
||||
<text class="unit price-font">原价</text>
|
||||
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="money price-font">{{ goodsSkuDetail.price }}</text>
|
||||
</view>
|
||||
@@ -128,10 +128,10 @@
|
||||
<!-- <view class="group-wrap card-info" v-if="goodsSkuDetail.goods_class == 5 && goodsSkuDetail.card_info && goodsSkuDetail.card_info.relation_goods.length">
|
||||
<view class="card-title">- 套餐包含以下的服务及商品 -</view>
|
||||
<view class="card-desc" v-if="goodsSkuDetail.card_info.card_type == 'timecard' || goodsSkuDetail.card_info.card_type == 'commoncard'">
|
||||
{{ goodsSkuDetail.card_info.card_type == 'commoncard' ? $lang('goods.cardTotalCount', { count: goodsSkuDetail.card_info.common_num }) + ' ,' : '' }}
|
||||
{{ goodsSkuDetail.card_info.card_type == 'timecard' ? $lang('goods.unlimitedCount') + ' ,' : '' }} {{ $lang('goods.validPeriod') }}{{
|
||||
(goodsSkuDetail.card_info.validity_type == 0 && $lang('goods.permanent')) ||
|
||||
(goodsSkuDetail.card_info.validity_type == 1 && goodsSkuDetail.card_info.validity_day + $lang('common.days')) ||
|
||||
{{ goodsSkuDetail.card_info.card_type == 'commoncard' ? '卡项内项目/商品总的可用次数为' + goodsSkuDetail.card_info.common_num + ' ,' : '' }}
|
||||
{{ goodsSkuDetail.card_info.card_type == 'timecard' ? '次数不限 ,' : '' }} 有效期为{{
|
||||
(goodsSkuDetail.card_info.validity_type == 0 && '永久') ||
|
||||
(goodsSkuDetail.card_info.validity_type == 1 && goodsSkuDetail.card_info.validity_day + '天') ||
|
||||
(goodsSkuDetail.card_info.validity_type == 2 && $util.timeStampTurnTime(goodsSkuDetail.card_info.validity_time))
|
||||
}}
|
||||
</view>
|
||||
@@ -149,7 +149,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-off" @click="cardOff = !cardOff" v-if="goodsSkuDetail.card_info.relation_goods.length > 1">
|
||||
<text>{{ cardOff ? $lang('common.collapse') : $lang('common.expand') }}</text>
|
||||
<text>{{ cardOff ? '收起' : '展开' }}</text>
|
||||
<text class="icondiy" :class="[cardOff ? 'icon-system-jiantoushang' : 'icon-system-jiantouxia']"></text>
|
||||
</view>
|
||||
</view> -->
|
||||
@@ -173,11 +173,11 @@
|
||||
<view v-if="item.type == 'reward'">
|
||||
{{
|
||||
parseFloat(item.at_least) > 0
|
||||
? $lang('goods.fullReduce', { atLeast: decimalPointFormat(item.at_least), money: decimalPointFormat(item.money) })
|
||||
: $lang('goods.noThresholdUse', { money: decimalPointFormat(item.money) })
|
||||
? '满' + decimalPointFormat(item.at_least) + '减' + decimalPointFormat(item.money)
|
||||
: '无门槛使用' + decimalPointFormat(item.money)
|
||||
}}
|
||||
</view>
|
||||
<view v-else-if="item.type == 'discount'">{{ $lang('goods.fullDiscount', { atLeast: decimalPointFormat(item.at_least), discount: parseFloat(item.discount) }) }}</view>
|
||||
<view v-else-if="item.type == 'discount'">{{ '满' + decimalPointFormat(item.at_least) + '打' + parseFloat(item.discount)+'折' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
@@ -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">{{ $lang('goods.fullReduce') }}</text>
|
||||
<text class="free-tip color-base-text">满减</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">{{ $lang('goods.comboMeal') }}</text>
|
||||
<text class="tit">组合套餐</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>{{ $lang('goods.comboMeal') }}</text>
|
||||
<text>组合套餐</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">{{ $lang('goods.comboPrice') }}</text>
|
||||
<text class="label">套餐价</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)">{{ $lang('goods.buyNow') }}</button>
|
||||
<button type="primary" size="mini" class="mini" @click="toComoDetail(item.bl_id)">立即购买</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>{{ $lang('goods.coupon') }}</text>
|
||||
<text>优惠券</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">{{ $lang('coupon.discountSuffix') }}</text>
|
||||
<text class="unit">折</text>
|
||||
</template>
|
||||
<view class="at-least">
|
||||
<template v-if="item.at_least > 0">
|
||||
{{ $lang('goods.full') }}{{ item.at_least }}{{ $lang('goods.usable') }}
|
||||
满{{ item.at_least }}可用
|
||||
</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">{{ $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 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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box"><button type="primary" @click="closeCouponPopup()">{{ $lang('common.confirm') }}</button></view>
|
||||
<view class="button-box"><button type="primary" @click="closeCouponPopup()">确定</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>{{ $lang('goods.promotion') }}</text>
|
||||
<text>促销</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">{{ $lang('goods.fullReduce') }}</view>
|
||||
<view class="free-tip color-base-text color-base-border">满减</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">{{ $lang('goods.fullGift') }}</text>
|
||||
<text class="free-tip color-base-text color-base-border">满送</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">{{ $lang('goods.freeShipping') }}</view>
|
||||
<view class="free-tip color-base-text color-base-border">包邮</view>
|
||||
<text class="font-size-base">{{ manjian.free_shipping }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="button-box"><button type="primary" @click="closeManjianPopup()">{{ $lang('common.confirm') }}</button></view>
|
||||
<view class="button-box"><button type="primary" @click="closeManjianPopup()">确定</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>{{ $lang('goods.goodsMessage') }}</text>
|
||||
<text>商品留言</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()">{{ $lang('common.confirm') }}</button></view>
|
||||
<view class="button-box"><button type="primary" @click="saveubfirnation()">确定</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="$lang('goods.aiService')" :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 == 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">{{ $lang('goods.callOnMobile', { phone: '021-51815181' }) }}</text>
|
||||
<text class="contact-text">可在手机端拨打 021-51815181</text>
|
||||
</view>
|
||||
<view class="contact-buttons">
|
||||
<button class="contact-btn cancel-btn" @click="closeContactPopup">{{ $lang('common.cancel') }}</button>
|
||||
<button class="contact-btn copy-btn" @click="copyPhoneNumber">{{ $lang('goods.copyToClipboard') }}</button>
|
||||
<button class="contact-btn cancel-btn" @click="closeContactPopup">取消</button>
|
||||
<button class="contact-btn copy-btn" @click="copyPhoneNumber">复制到剪切板</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -588,7 +588,7 @@ export default {
|
||||
data: '021-51815181',
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: this.$lang('common.copySuccess'),
|
||||
title: '复制成功',
|
||||
icon: 'success'
|
||||
});
|
||||
this.closeContactPopup();
|
||||
|
||||
@@ -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') : $lang('goods.searchGoods')" />
|
||||
:placeholder="langstatus ? $lang('Search') : '请输入您要搜索的商品'" />
|
||||
<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') : $lang('goods.comprehensive') }}</text>
|
||||
<text :class="{ 'color-base-text': orderType === '' }">{{ langstatus ? $lang('Random') : '综合' }}</text>
|
||||
</view>
|
||||
|
||||
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">
|
||||
{{ langstatus ? $lang('Sales') : $lang('chat.sales') }}
|
||||
{{ langstatus ? $lang('Sales') : '销量' }}
|
||||
</view>
|
||||
|
||||
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
||||
<text
|
||||
:class="{ 'color-base-text': orderType === 'discount_price' }">{{ langstatus ? $lang('Price') : $lang('goods.price') }}</text>
|
||||
:class="{ 'color-base-text': orderType === 'discount_price' }">{{ langstatus ? $lang('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') : $lang('goods.filter') }}</text>
|
||||
<text @click="sortTabClick('screen')">{{ langstatus ? $lang('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">{{ $lang('goods.sold') }}{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : $lang('sku.unit') }}</view>
|
||||
<view class="sale" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
||||
? item.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">{{ $lang('goods.sold') }}{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : $lang('sku.unit') }}</view>
|
||||
<view class="sale" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
||||
? item.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="$lang('goods.noGoods')"></ns-empty></view>
|
||||
<view v-if="goodsList.length == 0 && emptyShow"><ns-empty text="暂无商品"></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">{{ $lang('goodsList.filter') }}</view>
|
||||
<view class="title color-tip">筛选</view>
|
||||
<scroll-view scroll-y>
|
||||
<!-- 包邮 -->
|
||||
<!-- <view class="item-wrap">
|
||||
<view class="label"><text>{{ $lang('goodsList.freeShipping') }}</text></view>
|
||||
<view class="label"><text>是否包邮</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>{{ $lang('goodsList.priceRange') }}</text></view>
|
||||
<view class="label"><text>价格区间(元)</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>{{ $lang('goodsList.brand') }}</text></view>
|
||||
<view class="label"><text>品牌</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">{{ $lang('goodsList.allCategory') }}</text>
|
||||
<text class="first">全部分类</text>
|
||||
<view class="class-box">
|
||||
<view @click="selectedCategory('')" class="list-wrap">
|
||||
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ $lang('goodsList.all') }}</text>
|
||||
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</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">{{ $lang('goodsList.reset') }}</button>
|
||||
<button type="primary" class="footer-box1" @click="screenData">{{ $lang('goodsList.confirm') }}</button>
|
||||
<button type="default" class="footer-box" @click="resetData">重置</button>
|
||||
<button type="primary" class="footer-box1" @click="screenData">确定</button>
|
||||
</view>
|
||||
</uni-drawer>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
@@ -233,14 +233,14 @@ export default {
|
||||
}
|
||||
if (cart_id.length == 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('cart.selectGoodsToDelete')
|
||||
title: '请选择要删除的商品'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: this.$lang('common.tip'),
|
||||
content: cart_id.length > 1 ? this.$lang('cart.confirmDeleteSelected') : this.$lang('cart.confirmDeleteOne'),
|
||||
title: '提示',
|
||||
content: cart_id.length > 1 ? '确定要删除这些商品吗?' : '确定要删除该商品吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
cart_id = cart_id.toString();
|
||||
@@ -381,8 +381,8 @@ export default {
|
||||
*/
|
||||
clearInvalidGoods() {
|
||||
uni.showModal({
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('cart.confirmClearInvalid'),
|
||||
title: '提示',
|
||||
content: '确定要清空这些商品吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
var cart_ids = [];
|
||||
@@ -432,11 +432,11 @@ export default {
|
||||
if (event.type == 'plus') {
|
||||
if (data.max_buy > 0 && data.max_buy < data.stock) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('cart.personLimit', { count: data.max_buy })
|
||||
title: '该商品每人限购' + data.max_buy + '件'
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('sku.insufficientStock')
|
||||
title: '库存不足'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -318,9 +318,9 @@ export default {
|
||||
|
||||
let list = this.couponList;
|
||||
if (res.data.is_exist == 1 && res.code < 0) {
|
||||
msg = this.$lang('goods.couponAlreadyClaimed');
|
||||
msg = '您已领取过该优惠券,快去使用吧';
|
||||
} else if (res.code == 0) {
|
||||
msg = this.$lang('goods.couponClaimSuccess');
|
||||
msg = '领取成功,快去使用吧';
|
||||
} else {
|
||||
msg = res.message;
|
||||
}
|
||||
@@ -362,7 +362,7 @@ export default {
|
||||
//获取满减信息
|
||||
getManjian(data) {
|
||||
this.manjian = data;
|
||||
let limit = data.type == 0 ? this.$lang('goods.yuan') : this.$lang('goods.piece');
|
||||
let limit = data.type == 0 ? '元' : '件';
|
||||
Object.keys(data.rule_json).forEach((key) => {
|
||||
var item = data.rule_json[key];
|
||||
if (item.coupon_data) {
|
||||
@@ -374,40 +374,40 @@ export default {
|
||||
// 满减
|
||||
if (item.discount_money != undefined) {
|
||||
if (this.manjian.manjian == undefined) {
|
||||
this.manjian.manjian = this.$lang('goods.spendLimitMinus', { limit: item.limit, unit: limit, money: item.discount_money });
|
||||
this.manjian.manjian = '满' + item.limit + limit + '减' + item.discount_money + '元';
|
||||
} else {
|
||||
this.manjian.manjian += this.$lang('goods.semicolonSpendLimitMinus', { limit: item.limit, unit: limit, money: item.discount_money });
|
||||
this.manjian.manjian += ';满' + item.limit + limit + '减' + item.discount_money + '元';
|
||||
}
|
||||
}
|
||||
// 满送
|
||||
if (item.point != undefined || item.coupon != undefined) {
|
||||
let text = '';
|
||||
if (item.point != undefined) {
|
||||
text = this.$lang('goods.givePoints', { points: item.point });
|
||||
text = '送' + item.point + '积分';
|
||||
}
|
||||
if (item.coupon != undefined && item.coupon_data != undefined) {
|
||||
item.coupon_data.forEach((couponItem, couponIndex) => {
|
||||
if (couponItem.type == 'discount') {
|
||||
if (text == '') text = this.$lang('goods.giveDiscountCoupon', { num: item.coupon_num[couponIndex], discount: parseFloat(couponItem.discount) });
|
||||
else text += this.$lang('goods.andGiveDiscountCoupon', { num: item.coupon_num[couponIndex], discount: parseFloat(couponItem.discount) });
|
||||
if (text == '') text = '送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.discount) + '折优惠券';
|
||||
else text += '、送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.discount) + '折优惠券';
|
||||
} else {
|
||||
if (text == '') text = this.$lang('goods.giveMoneyCoupon', { num: item.coupon_num[couponIndex], money: parseFloat(couponItem.money) });
|
||||
else text += this.$lang('goods.andGiveMoneyCoupon', { num: item.coupon_num[couponIndex], money: parseFloat(couponItem.money) });
|
||||
if (text == '') text = '送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.money) + '元优惠券';
|
||||
else text += '、送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.money) + '元优惠券';
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.manjian.mansong == undefined) {
|
||||
this.manjian.mansong = this.$lang('goods.spendLimit', { limit: item.limit, unit: limit }) + text;
|
||||
this.manjian.mansong = '满' + item.limit + limit + text;
|
||||
} else {
|
||||
this.manjian.mansong += this.$lang('goods.semicolonSpend') + this.$lang('goods.spendLimit', { limit: item.limit, unit: limit }) + text;
|
||||
this.manjian.mansong += ';' + '满' + item.limit + limit + text;
|
||||
}
|
||||
}
|
||||
// 包邮
|
||||
if (item.free_shipping != undefined) {
|
||||
if (this.manjian.free_shipping == undefined) {
|
||||
this.manjian.free_shipping = this.$lang('goods.spendLimitFreeShipping', { limit: item.limit, unit: limit });
|
||||
this.manjian.free_shipping = '满' + item.limit + limit + '包邮';
|
||||
} else {
|
||||
this.manjian.free_shipping += this.$lang('goods.semicolonSpendLimitFreeShipping', { limit: item.limit, unit: limit });
|
||||
this.manjian.free_shipping += ';满' + item.limit + limit + '包邮';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
fontWeight: false,
|
||||
padding: 0,
|
||||
cartEvent: "detail",
|
||||
text: this.$lang('goods.buy'),
|
||||
text: "购买",
|
||||
textColor: "#FFFFFF",
|
||||
theme: "default",
|
||||
aroundRadius: 25,
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
if(this.langstatus == 1){
|
||||
// this.$langConfig.refresh();
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$lang('goods.goodsList')
|
||||
title:uni.getStorageSync('lang') == 'en-us'?'Goods List':'商品列表'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
* 转发分享
|
||||
*/
|
||||
onShareAppMessage(res) {
|
||||
var title = this.$lang('goods.searchResultCount', { count: this.count, keyword: this.keyword + this.category_title + this.coupon_name });'”相关的优质商品';
|
||||
var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品';
|
||||
let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
|
||||
var path = route.path;
|
||||
return {
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
},
|
||||
// 分享到微信朋友圈
|
||||
onShareTimeline() {
|
||||
var title = this.$lang('goods.searchResultCount', { count: this.count, keyword: this.keyword + this.category_title + this.coupon_name });'”相关的优质商品';
|
||||
var title = '搜索到' + this.count + '件“' + this.keyword + this.category_title + this.coupon_name + '”相关的优质商品';
|
||||
let route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
|
||||
var query = route.query;
|
||||
return {
|
||||
@@ -362,26 +362,26 @@ export default {
|
||||
// }
|
||||
if (!Number(this.maxPrice) && this.maxPrice) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('goods.inputMaxPrice')
|
||||
title: '请输入最高价'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (Number(this.minPrice) < 0 || Number(this.maxPrice) < 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('goods.priceNotNegative')
|
||||
title: '筛选价格不能小于0'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.minPrice != '' && Number(this.minPrice) > Number(this.maxPrice) && this.maxPrice) {
|
||||
|
||||
this.$util.showToast({
|
||||
title: this.$lang('goods.minNotGreaterMax')
|
||||
title: '最低价不能大于最高价'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.maxPrice != '' && Number(this.maxPrice) < Number(this.minPrice)) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('goods.maxNotLessMin')
|
||||
title: '最高价不能小于最低价'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user