feat: 新增多语言文案、优化导航及工具函数,修复部分业务逻辑
1. 新增多语言资源文件,覆盖文章、预约日期、会员信息、优惠券、表单、购物车、积分商城、分销、AI聊天等多个模块 2. 优化底部导航组件,使用多语言配置替代硬编码文案 3. 重构工具函数,新增从后端数据提取多语言文案的工具方法 4. 修复邀请好友页面的保存提示文案,替换为多语言版本 5. 修复商品SKU组件的提示文案,使用多语言配置 6. 重构AI聊天页面的帮助文档和回复模板,使用多语言配置 7. 优化空状态组件,支持多语言默认文案 8. 修复跳转逻辑,补全参数传递 9. 新增本地开发环境配置
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
:src="$util.img('public/uniapp/fenxiao/index/commissionFission-level.png')"
|
||||
alt="" class="level-icon">{{ info.level_name }}</p>
|
||||
</view>
|
||||
<view class="recommend">上级代理商:{{ info.parent_name ? info.parent_name : '总店' }}</view>
|
||||
<view class="recommend">已邀请成功:{{ teamNum.num }}人<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
<view class="recommend">{{ $lang('superiorAgent') }}:{{ info.parent_name ? info.parent_name : $lang('headquarters') }}</view>
|
||||
<view class="recommend">{{ $lang('invitedSuccess', { count: teamNum.num }) }}<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
</view>
|
||||
<!-- <view class="promote-rules font-size-tag" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
@@ -40,10 +40,10 @@
|
||||
<view class="fenxiao-index-allmoney">
|
||||
<view class="allmoney-top-money">
|
||||
<view class="allmoney-top">
|
||||
<view class="font-size-sub">可{{ fenxiaoWords.withdraw }}(元)</view>
|
||||
<view class="font-size-sub">{{ $lang('withdrawable', { withdraw: fenxiaoWords.withdraw }) }}</view>
|
||||
<view class="withdrawal-record"
|
||||
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
提现明细
|
||||
{{ $lang('withdrawDetail') }}
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -61,18 +61,18 @@
|
||||
</view> -->
|
||||
<view class="allmoney-all-wrap"
|
||||
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
<view class="title">提现中(元)<text class="iconfont icon-right"
|
||||
<view class="title">{{ $lang('withdrawing') }}<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
<view class="money price-font">{{ info.account_withdraw_apply | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="allmoney-all-wrap"
|
||||
@click="$util.redirectTo('/pages_promotion/fenxiao/order', { type: 1 })">
|
||||
<view class="title">待入账(元)<text class="iconfont icon-right"
|
||||
<view class="title">{{ $lang('pendingDeposit') }}<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
<view class="money price-font">{{ info.in_progress_money | moneyFormat }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">提现
|
||||
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">{{ $lang('withdraw') }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">我的粉丝</view>
|
||||
<view class="desc">邀请的用户</view>
|
||||
<view class="title">{{ $lang('myFans') }}</view>
|
||||
<view class="desc">{{ $lang('invitedUsers') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
@@ -100,8 +100,8 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.withdraw }}明细</view>
|
||||
<view class="desc">累计{{ fenxiaoWords.account }}¥{{ info.total_commission | moneyFormat }}
|
||||
<view class="title">{{ fenxiaoWords.withdraw + $lang('detail') }}</view>
|
||||
<view class="desc">{{ $lang('totalAccumulated', { account: fenxiaoWords.account, symbol: $lang('common.currencySymbol'), amount: info.total_commission | moneyFormat }) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -111,8 +111,8 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.concept + '订单' }}</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept + '订单' }}明细</view>
|
||||
<view class="title">{{ fenxiaoWords.concept + $lang('order') }}</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept + $lang('orderDetail') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/friend.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">我的邀请码</view>
|
||||
<view class="desc">邀好友赚好礼</view>
|
||||
<view class="title">{{ $lang('myInviteCode') }}</view>
|
||||
<view class="desc">{{ $lang('inviteFriendsEarnRewards') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
@@ -211,8 +211,8 @@
|
||||
<ns-copyright></ns-copyright>
|
||||
<view class="empty" v-if="!info.fenxiao_id > 0 && showEmpty">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<text>您还不是{{ fenxiaoWords.fenxiao_name }},请先提交申请</text>
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">立即加入</view>
|
||||
<text>{{ $lang('notFenxiaoYet', { name: fenxiaoWords.fenxiao_name }) }}</text>
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">{{ $lang('joinNow') }}</view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<ns-login ref="login"></ns-login>
|
||||
@@ -220,7 +220,7 @@
|
||||
<uni-popup ref="taskPopup" type="bottom">
|
||||
<view class="task-popup popup-layer" v-if="levelInfo">
|
||||
<view class="head-wrap">
|
||||
<text>快速升级技巧</text>
|
||||
<text>{{ $lang('quickUpgradeTips') }}</text>
|
||||
<text class="iconfont icon-close" @click="$refs.taskPopup.close()"></text>
|
||||
</view>
|
||||
<view class="body-wrap">
|
||||
@@ -228,7 +228,7 @@
|
||||
<text class="subordinate-consumption">
|
||||
{{ item.title }}
|
||||
<text class="iconfont icon-wenhao" @click="openTips(item)"></text>
|
||||
<text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text>
|
||||
<text class="incomplete">{{ item.progress == 100 ? $lang('completed') : $lang('incomplete') }}</text>
|
||||
</text>
|
||||
<view class="circle">
|
||||
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
|
||||
@@ -236,7 +236,7 @@
|
||||
<text class="zero">{{ item.value }}</text>
|
||||
<text>/{{ item.condition }}</text>
|
||||
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
<text class="to-complete">{{ item.progress == 100 ? '已完成' : '去完成' }}</text>
|
||||
<text class="to-complete">{{ item.progress == 100 ? $lang('completed') : $lang('goComplete') }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -246,12 +246,12 @@
|
||||
<uni-popup type="bottom" ref="tips">
|
||||
<view class="popup">
|
||||
<view class="popup-header">
|
||||
<text class="tit">提示</text>
|
||||
<text class="tit">{{ $lang('tip') }}</text>
|
||||
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<view>{{ tips }}</view>
|
||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
|
||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? $lang('anyConditionUpgrade') : $lang('allConditionsUpgrade') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -290,7 +290,7 @@ export default {
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onShow() {
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('center'));
|
||||
|
||||
if (this.storeToken) {
|
||||
this.checkFenxiaoIsStart();
|
||||
@@ -307,7 +307,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -348,7 +348,7 @@ export default {
|
||||
this.getFenxiaoDetail();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -368,7 +368,7 @@ export default {
|
||||
if (res.data) {
|
||||
if (res.data.status == -1) {
|
||||
this.$util.showToast({
|
||||
title: '当前分销商已冻结'
|
||||
title: this.$lang('fenxiaoFrozen')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||
@@ -480,9 +480,9 @@ export default {
|
||||
|
||||
if (level.one_fenxiao_order_num > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
|
||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数',
|
||||
title: this.$lang('subordinateConsumption'),
|
||||
desc: this.$lang('subordinateOrderCount', { count: level.one_fenxiao_order_num }),
|
||||
tips: this.$lang('subordinateOrderCountTip'),
|
||||
condition: level.one_fenxiao_order_num,
|
||||
value: this.info.one_fenxiao_order_num,
|
||||
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ?
|
||||
@@ -494,9 +494,9 @@ export default {
|
||||
}
|
||||
if (level.one_fenxiao_total_order > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
||||
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
|
||||
title: this.$lang('subordinateConsumption'),
|
||||
desc: this.$lang('subordinateOrderAmount', { amount: this.moneyFormat(level.one_fenxiao_total_order) }),
|
||||
tips: this.$lang('subordinateOrderAmountTip'),
|
||||
condition: this.moneyFormat(level.one_fenxiao_total_order),
|
||||
value: this.info.one_fenxiao_total_order,
|
||||
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ?
|
||||
@@ -508,10 +508,9 @@ export default {
|
||||
}
|
||||
if (level.one_fenxiao_order_money > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费产生' + this.fenxiaoWords.account + '总额满' + this.moneyFormat(level
|
||||
.one_fenxiao_order_money) + '元',
|
||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单' + this.fenxiaoWords.account + '总额',
|
||||
title: this.$lang('subordinateConsumption'),
|
||||
desc: this.$lang('subordinateCommissionAmount', { account: this.fenxiaoWords.account, amount: this.moneyFormat(level.one_fenxiao_order_money) }),
|
||||
tips: this.$lang('subordinateCommissionAmountTip', { account: this.fenxiaoWords.account }),
|
||||
condition: this.moneyFormat(level.one_fenxiao_order_money),
|
||||
value: this.info.one_fenxiao_order_money,
|
||||
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ?
|
||||
@@ -523,9 +522,9 @@ export default {
|
||||
}
|
||||
if (level.order_num > 0) {
|
||||
let task = {
|
||||
title: '自身消费',
|
||||
desc: '自身消费单数满' + level.order_num + '单',
|
||||
tips: '分销商自己购买的订单次数',
|
||||
title: this.$lang('selfConsumption'),
|
||||
desc: this.$lang('selfOrderCount', { count: level.order_num }),
|
||||
tips: this.$lang('selfOrderCountTip'),
|
||||
condition: level.order_num,
|
||||
value: this.info.order_num,
|
||||
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
|
||||
@@ -535,9 +534,9 @@ export default {
|
||||
}
|
||||
if (level.order_money > 0) {
|
||||
let task = {
|
||||
title: '自身消费',
|
||||
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
|
||||
tips: '分销商自己购买的订单总额',
|
||||
title: this.$lang('selfConsumption'),
|
||||
desc: this.$lang('selfOrderAmount', { amount: this.moneyFormat(level.order_money) }),
|
||||
tips: this.$lang('selfOrderAmountTip'),
|
||||
condition: this.moneyFormat(level.order_money),
|
||||
value: this.info.order_money,
|
||||
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ?
|
||||
@@ -549,9 +548,9 @@ export default {
|
||||
}
|
||||
if (level.one_child_num > 0) {
|
||||
let task = {
|
||||
title: '邀请好友',
|
||||
desc: '邀请好友人数达到' + level.one_child_num + '人',
|
||||
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
|
||||
title: this.$lang('inviteFriends'),
|
||||
desc: this.$lang('inviteFriendCount', { count: level.one_child_num }),
|
||||
tips: this.$lang('inviteFriendCountTip'),
|
||||
condition: level.one_child_num,
|
||||
value: this.info.one_child_num,
|
||||
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ?
|
||||
@@ -563,9 +562,9 @@ export default {
|
||||
}
|
||||
if (level.one_child_fenxiao_num > 0) {
|
||||
let task = {
|
||||
title: '邀请好友',
|
||||
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
|
||||
tips: '分销商的直属下级分销商人数',
|
||||
title: this.$lang('inviteFriends'),
|
||||
desc: this.$lang('inviteFenxiaoCount', { count: level.one_child_fenxiao_num }),
|
||||
tips: this.$lang('inviteFenxiaoCountTip'),
|
||||
condition: level.one_child_fenxiao_num,
|
||||
value: this.info.one_child_fenxiao_num,
|
||||
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ?
|
||||
|
||||
Reference in New Issue
Block a user