feat: 新增多语言文案与组件国际化适配
本次提交完成了大量多语言相关的新增与优化工作: 1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案 2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包 3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案 4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持 5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
@@ -2,24 +2,24 @@
|
||||
<view>
|
||||
<view class="privacy-mask" v-if="showPop">
|
||||
<view class="privacy-wrap">
|
||||
<view class="privacy-title">用户隐私保护提示</view>
|
||||
<view class="privacy-desc">
|
||||
感谢您使用{{ appName }},在使用前您应当阅读并同意
|
||||
<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || H5 -->
|
||||
<text class="privacy-link" @tap="openPrivacyService">{{ privacyServiceName }}</text>
|
||||
<!-- #endif -->
|
||||
,当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用{{ appName }}相关功能。
|
||||
</view>
|
||||
<view class="privacy-button-flex">
|
||||
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">不同意</button>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || MP-WEIXIN -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization"
|
||||
@agreeprivacyauthorization="handleAgree">同意并继续</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef WEB || H5 -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">同意并继续</button>
|
||||
<!-- #endif -->
|
||||
<view class="privacy-title">{{ $lang('components.privacyPopup.title') }}</view>
|
||||
<view class="privacy-desc">
|
||||
{{ $lang('components.privacyPopup.descPrefix', { appName: appName }) }}
|
||||
<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || H5 -->
|
||||
<text class="privacy-link" @tap="openPrivacyService">{{ privacyServiceName }}</text>
|
||||
<!-- #endif -->
|
||||
{{ $lang('components.privacyPopup.descSuffix', { appName: appName }) }}
|
||||
</view>
|
||||
<view class="privacy-button-flex">
|
||||
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">{{ $lang('components.privacyPopup.disagreeBtn') }}</button>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || MP-WEIXIN -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization"
|
||||
@agreeprivacyauthorization="handleAgree">{{ $lang('components.privacyPopup.agreeBtn') }}</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef WEB || H5 -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">{{ $lang('components.privacyPopup.agreeBtn') }}</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,12 +43,12 @@ export default {
|
||||
showPop: false,
|
||||
privacyAuthorization: null,
|
||||
privacyResolves: new Set(),
|
||||
privacyContractName: '用户隐私保护指引',
|
||||
appName: '本小程序',
|
||||
privacyContractName: this.$lang('components.privacyPopup.defaultContractNameMp'),
|
||||
appName: this.$lang('components.privacyPopup.defaultAppNameMp'),
|
||||
// #ifdef WEB || H5
|
||||
appName: '本应用',
|
||||
privacyContractName: '《隐私条款》',
|
||||
privacyServiceName: '《用户服务协议》',
|
||||
appName: this.$lang('components.privacyPopup.defaultAppNameH5'),
|
||||
privacyContractName: this.$lang('components.privacyPopup.defaultContractNameH5'),
|
||||
privacyServiceName: this.$lang('components.privacyPopup.defaultServiceNameH5'),
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
@@ -250,7 +250,7 @@ export default {
|
||||
uni.setStorageSync('privacyAgreed', true);
|
||||
|
||||
uni.showModal({
|
||||
content: '未同意隐私协议,无法使用相关功能',
|
||||
content: this.$lang('components.privacyPopup.disagreeTip'),
|
||||
success: () => {
|
||||
this.$emit('disagree')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user