chore(多语言): 部分语言暂时使用 isEnEnv 计算属性来判断

This commit is contained in:
2025-12-26 18:11:15 +08:00
parent 31623e6667
commit 332350cfab
3 changed files with 25 additions and 25 deletions

View File

@@ -100,7 +100,7 @@
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text> parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</block> </block>
<block v-else> <block v-else>
<text class="unit price-style small">咨询</text> <text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
</block> </block>
</view> </view>
<view class="member-price-tag" <view class="member-price-tag"
@@ -192,7 +192,7 @@
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text> parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</block> </block>
<block v-else> <block v-else>
<text class="unit price-style small">咨询</text> <text class="unit price-style small">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
</block> </block>
</view> </view>

View File

@@ -79,7 +79,7 @@
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text> <text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</view> </view>
<view class="discount-price" v-else> <view class="discount-price" v-else>
<text class="price price-style large">咨询</text> <text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
</view> </view>
@@ -164,7 +164,7 @@
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text> <text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</view> </view>
<view class="discount-price" v-else> <view class="discount-price" v-else>
<text class="price price-style large">咨询</text> <text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '咨询' }}</text>
</view> </view>
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)"> <view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>

View File

@@ -5,7 +5,7 @@
<!-- 搜索区域 --> <!-- 搜索区域 -->
<view class="search-wrap uni-flex uni-row"> <view class="search-wrap uni-flex uni-row">
<view class="flex-item input-wrap" @click.stop="search()" @tap.stop="search()"> <view class="flex-item input-wrap" @click.stop="search()" @tap.stop="search()">
<input class="uni-input" maxlength="50" v-model="keyword" confirm-type="search" @confirm="search()" @click.stop="search()" @tap.stop="search()" placeholder="请输入商品关键词" /> <input class="uni-input" maxlength="50" v-model="keyword" confirm-type="search" @confirm="search()" @click.stop="search()" @tap.stop="search()" :placeholder="isEnEnv ? 'Please enter product keywords' : '请输入商品关键词'" />
<text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text> <text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
</view> </view>
</view> </view>
@@ -13,24 +13,24 @@
<!-- 排序 --> <!-- 排序 -->
<view class="sort-wrap"> <view class="sort-wrap">
<view class="comprehensive-wrap" :class="{ 'color-base-text': order === '' }" @click="sortTabClick('')"> <view class="comprehensive-wrap" :class="{ 'color-base-text': order === '' }" @click="sortTabClick('')">
<text :class="{ 'color-base-text': order === '' }">综合</text> <text :class="{ 'color-base-text': order === '' }">{{ isEnEnv ? 'Comprehensive' : '综合' }}</text>
</view> </view>
<view class="price-wrap" @click="sortTabClick('point')"> <view class="price-wrap" @click="sortTabClick('point')">
<text :class="{ 'color-base-text': order === 'point' }">积分</text> <text :class="{ 'color-base-text': order === 'point' }">{{ isEnEnv ? 'Points' : '积分' }}</text>
<view class="iconfont-wrap"> <view class="iconfont-wrap">
<view class="iconfont icon-shangsanjiao-copy" :class="{ 'color-base-text': priceOrder === 'asc' && order === 'point' }"></view> <view class="iconfont icon-shangsanjiao-copy" :class="{ 'color-base-text': priceOrder === 'asc' && order === 'point' }"></view>
<view class="iconfont icon-sanjiao" :class="{ 'color-base-text': priceOrder === 'desc' && order === 'point' }"></view> <view class="iconfont icon-sanjiao" :class="{ 'color-base-text': priceOrder === 'desc' && order === 'point' }"></view>
</view> </view>
</view> </view>
<view class="price-wrap" @click="sortTabClick('create_time')"> <view class="price-wrap" @click="sortTabClick('create_time')">
<text :class="{ 'color-base-text': order === 'create_time' }">上新时间</text> <text :class="{ 'color-base-text': order === 'create_time' }">{{ isEnEnv ? 'New Arrival' : '上新时间' }}</text>
<view class="iconfont-wrap"> <view class="iconfont-wrap">
<view class="iconfont icon-shangsanjiao-copy" :class="{ 'color-base-text': priceOrder === 'asc' && order === 'create_time' }"></view> <view class="iconfont icon-shangsanjiao-copy" :class="{ 'color-base-text': priceOrder === 'asc' && order === 'create_time' }"></view>
<view class="iconfont icon-sanjiao" :class="{ 'color-base-text': priceOrder === 'desc' && order === 'create_time' }"></view> <view class="iconfont icon-sanjiao" :class="{ 'color-base-text': priceOrder === 'desc' && order === 'create_time' }"></view>
</view> </view>
</view> </view>
<view :class="{ 'color-base-text': order === 'screen' }" class="screen-wrap"> <view :class="{ 'color-base-text': order === 'screen' }" class="screen-wrap">
<text @click="sortTabClick('screen')">筛选</text> <text @click="sortTabClick('screen')">{{ isEnEnv ? 'Filter' : '筛选' }}</text>
<view @click="sortTabClick('screen')" class="iconfont-wrap"> <view @click="sortTabClick('screen')" class="iconfont-wrap">
<view class="iconfont icon-shaixuan color-tip"></view> <view class="iconfont icon-shaixuan color-tip"></view>
</view> </view>
@@ -48,12 +48,12 @@
</view> </view>
<view class="info-wrap"> <view class="info-wrap">
<view class="name-wrap"> <view class="name-wrap">
<view class="goods-name" @click="toDetail(item)">{{ item.name }}</view> <view class="goods-name" @click="toDetail(item)">{{ isEnEnv ? item.en_goods_name : item.goods_name }}</view>
</view> </view>
<view class="lineheight-clear"> <view class="lineheight-clear">
<view class="discount-price"> <view class="discount-price">
<text class="unit ">{{ item.point }}</text> <text class="unit ">{{ item.point }}</text>
<text class="unit font-size-tag">积分</text> <text class="unit font-size-tag">{{ isEnEnv ? 'Points' : '积分' }}</text>
<block v-if="item.price > 0 && item.pay_type > 0"> <block v-if="item.price > 0 && item.pay_type > 0">
<text class="unit font-size-tag">+</text> <text class="unit font-size-tag">+</text>
<text class="unit font-size-tag">{{ $lang('common.currencySymbol') }}</text> <text class="unit font-size-tag">{{ $lang('common.currencySymbol') }}</text>
@@ -63,7 +63,7 @@
</view> </view>
</view> </view>
<view class="pro-info" v-if="item.stock_show"> <view class="pro-info" v-if="item.stock_show">
<view class="font-size-activity-tag color-tip">库存{{ item.stock }}</view> <view class="font-size-activity-tag color-tip">{{ isEnEnv ? 'Stock ' : '库存' }}{{ item.stock }}</view>
<view class="sale font-size-activity-tag color-tip" @click="toDetail(item)"> <view class="sale font-size-activity-tag color-tip" @click="toDetail(item)">
<!-- <button type="primary" size="mini">立即兑换</button> --> <!-- <button type="primary" size="mini">立即兑换</button> -->
</view> </view>
@@ -72,7 +72,7 @@
</view> </view>
</view> </view>
<view class="empty" v-if="goodsList.length == 0"> <view class="empty" v-if="goodsList.length == 0">
<ns-empty :isIndex="false" text="暂无积分商品"></ns-empty> <ns-empty :isIndex="false" :text="isEnEnv ? 'No point products available' : '暂无积分商品'"></ns-empty>
</view> </view>
</view> </view>
</block> </block>
@@ -80,22 +80,22 @@
<!-- 筛选弹出框 --> <!-- 筛选弹出框 -->
<uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap"> <uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap">
<view class="title color-tip">筛选</view> <view class="title color-tip">{{ isEnEnv ? 'Filter' : '筛选' }}</view>
<scroll-view scroll-y> <scroll-view scroll-y>
<!-- 价格筛选项 --> <!-- 价格筛选项 -->
<view class="item-wrap"> <view class="item-wrap">
<view class="label"><text>积分区间</text></view> <view class="label"><text>{{ isEnEnv ? 'Point Range' : '积分区间' }}</text></view>
<view class="price-wrap"> <view class="price-wrap">
<input class="uni-input" type="digit" v-model="minPoint" placeholder="最低" /> <input class="uni-input" type="digit" v-model="minPoint" :placeholder="isEnEnv ? 'Min' : '最低'" />
<view class="h-line"></view> <view class="h-line"></view>
<input class="uni-input" type="digit" v-model="maxPoint" placeholder="最高" /> <input class="uni-input" type="digit" v-model="maxPoint" :placeholder="isEnEnv ? 'Max' : '最高'" />
</view> </view>
</view> </view>
<!-- 分类筛选项 --> <!-- 分类筛选项 -->
<view class="category-list-wrap"> <view class="category-list-wrap">
<text class="first">全部分类</text> <text class="first">{{ isEnEnv ? 'All Categories' : '全部分类' }}</text>
<view class="class-box"> <view class="class-box">
<view @click="selectedCategory('')" class="list-wrap"><text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text></view> <view @click="selectedCategory('')" class="list-wrap"><text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ isEnEnv ? 'All' : '全部' }}</text></view>
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList" :key="index" class="list-wrap"> <view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList" :key="index" class="list-wrap">
<text :class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{ item.category_name }}</text> <text :class="{ selected: item.category_id == categoryId, 'color-base-text': item.category_id == categoryId }">{{ item.category_name }}</text>
</view> </view>
@@ -103,8 +103,8 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="footer" :class="{ 'safe-area': isIphoneX }"> <view class="footer" :class="{ 'safe-area': isIphoneX }">
<button type="default" class="footer-box" @click="resetData">重置</button> <button type="default" class="footer-box" @click="resetData">{{ isEnEnv ? 'Reset' : '重置' }}</button>
<button type="primary" class="footer-box1" @click="screenData">确定</button> <button type="primary" class="footer-box1" @click="screenData">{{ isEnEnv ? 'Confirm' : '确定' }}</button>
</view> </view>
</uni-drawer> </uni-drawer>
@@ -268,26 +268,26 @@
// } // }
if (!Number(this.maxPoint) && this.maxPoint) { if (!Number(this.maxPoint) && this.maxPoint) {
this.$util.showToast({ this.$util.showToast({
title: '请输入最高价' title: this.isEnEnv ? 'Please enter the maximum price' : '请输入最高价'
}); });
return; return;
} }
if (Number(this.minPoint) < 0 || Number(this.maxPoint) < 0) { if (Number(this.minPoint) < 0 || Number(this.maxPoint) < 0) {
this.$util.showToast({ this.$util.showToast({
title: '筛选价格不能小于0' title: this.isEnEnv ? 'Filter price cannot be less than 0' : '筛选价格不能小于0'
}); });
return; return;
} }
if (this.minPoint != '' && Number(this.minPoint) > Number(this.maxPoint) && this.maxPoint) { if (this.minPoint != '' && Number(this.minPoint) > Number(this.maxPoint) && this.maxPoint) {
this.$util.showToast({ this.$util.showToast({
title: '最低价不能大于最高价' title: this.isEnEnv ? 'Minimum price cannot be greater than maximum price' : '最低价不能大于最高价'
}); });
return; return;
} }
if (this.maxPoint != '' && Number(this.maxPoint) < Number(this.minPoint)) { if (this.maxPoint != '' && Number(this.maxPoint) < Number(this.minPoint)) {
this.$util.showToast({ this.$util.showToast({
title: '最高价不能小于最低价' title: this.isEnEnv ? 'Maximum price cannot be less than minimum price' : '最高价不能小于最低价'
}); });
return; return;
} }