feat: 新增多语言文案与组件国际化适配
本次提交完成了大量多语言相关的新增与优化工作: 1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案 2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包 3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案 4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持 5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<!-- 搜索区域 -->
|
||||
<view class="search-wrap uni-flex uni-row" style="margin-bottom: 20rpx;">
|
||||
<view class="flex-item input-wrap">
|
||||
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" placeholder="请输入您要搜索的商品" />
|
||||
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" :placeholder="$lang('searchPlaceholder')" />
|
||||
<text class="iconfont icon-sousuo3" @click.stop="search()"></text>
|
||||
</view>
|
||||
<view class="iconfont" :class="{ 'icon-apps': isList, 'icon-list': !isList }" @click="changeListStyle()"></view>
|
||||
@@ -28,11 +28,11 @@
|
||||
<view class="scroll-desc">{{ merch.desc }}</view>
|
||||
<view class="scroll-hint" v-if="isShowScrollHint">
|
||||
<text class="scroll-icon">↓</text>
|
||||
<text class="scroll-text">上滑查看更多</text>
|
||||
<text class="scroll-text">{{ $lang('desc.scrollUpToViewMore') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="expand-tip" v-if="merch.desc && merch.desc.length > 50" @click.stop="toggleDesc">
|
||||
<text class="hint-arrow">{{ isDescExpanded ? '↑ 收起' : '↓ 展开' }}</text>
|
||||
<text class="hint-arrow">{{ isDescExpanded ? $lang('desc.collapse') : $lang('desc.expand') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -42,14 +42,14 @@
|
||||
<view class="sort-wrap">
|
||||
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }"
|
||||
@click="sortTabClick('')">
|
||||
<text :class="{ 'color-base-text': orderType === '' }">综合</text>
|
||||
<text :class="{ 'color-base-text': orderType === '' }">{{ $lang('sort.comprehensive') }}</text>
|
||||
</view>
|
||||
|
||||
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">销量
|
||||
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">{{ $lang('sort.sales') }}
|
||||
</view>
|
||||
|
||||
<view class="price-wrap" @click="sortTabClick('discount_price')">
|
||||
<text :class="{ 'color-base-text': orderType === 'discount_price' }">价格</text>
|
||||
<text :class="{ 'color-base-text': orderType === 'discount_price' }">{{ $lang('sort.price') }}</text>
|
||||
<view class="iconfont-wrap">
|
||||
<view class="iconfont icon-iconangledown-copy asc"
|
||||
:class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }">
|
||||
@@ -61,7 +61,7 @@
|
||||
</view>
|
||||
|
||||
<view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap" @click="showScreen = true">
|
||||
<text @click="showScreen = true">筛选</text>
|
||||
<text @click="showScreen = true">{{ $lang('sort.filter') }}</text>
|
||||
<view @click="showScreen = true" class="iconfont-wrap">
|
||||
<view class="iconfont icon-shaixuan color-tip"></view>
|
||||
</view>
|
||||
@@ -99,8 +99,7 @@
|
||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||
</view>
|
||||
<view class="discount-price" v-else>
|
||||
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '立即咨询'
|
||||
}}</text>
|
||||
<text class="price price-style large">{{ $lang('goods.consultNow') }}</text>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -118,8 +117,7 @@
|
||||
<text>{{ showMarketPrice(item) }}</text>
|
||||
</view>
|
||||
<view class="block-wrap">
|
||||
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : '件' }}</view>
|
||||
<view class="sale color-tip" v-if="item.sale_show">{{ $lang('goods.sold', { num: item.sale_num, unit: item.unit ? item.unit : $lang('goods.defaultUnit') }) }}</view>
|
||||
</view>
|
||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||
<!-- 购物车图标 -->
|
||||
@@ -193,8 +191,7 @@
|
||||
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
|
||||
</view>
|
||||
<view class="discount-price" v-else>
|
||||
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '立即咨询'
|
||||
}}</text>
|
||||
<text class="price price-style large">{{ $lang('goods.consultNow') }}</text>
|
||||
</view>
|
||||
<view class="member-price-tag"
|
||||
v-if="item.member_price && item.member_price == showPrice(item)">
|
||||
@@ -210,8 +207,7 @@
|
||||
</view>
|
||||
<view class="pro-info" v-if="item.isinformation == 0">
|
||||
<view class="block-wrap">
|
||||
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
|
||||
? item.unit : '件' }}</view>
|
||||
<view class="sale color-tip" v-if="item.sale_show">{{ $lang('goods.sold', { num: item.sale_num, unit: item.unit ? item.unit : $lang('goods.defaultUnit') }) }}</view>
|
||||
</view>
|
||||
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
|
||||
<!-- 购物车图标 -->
|
||||
@@ -258,7 +254,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>
|
||||
|
||||
@@ -266,7 +262,7 @@
|
||||
|
||||
<!-- 筛选弹出框 -->
|
||||
<uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap">
|
||||
<view class="title color-tip">筛选</view>
|
||||
<view class="title color-tip">{{ $lang('filter.title') }}</view>
|
||||
<scroll-view scroll-y>
|
||||
<!-- 包邮 -->
|
||||
<!-- <view class="item-wrap">
|
||||
@@ -298,10 +294,10 @@
|
||||
|
||||
<!-- 分类筛选项 -->
|
||||
<view class="category-list-wrap">
|
||||
<text class="first">全部分类</text>
|
||||
<text class="first">{{ $lang('filter.allCategories') }}</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('filter.all') }}</text>
|
||||
</view>
|
||||
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
|
||||
:key="index" class="list-wrap">
|
||||
@@ -313,8 +309,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('filter.reset') }}</button>
|
||||
<button type="primary" class="footer-box1" @click="screenData">{{ $lang('filter.confirm') }}</button>
|
||||
</view>
|
||||
</uni-drawer>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
Reference in New Issue
Block a user