zc.vue 731 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view>
  3. <view v-if="switchLang == 'en'">
  4. <u-image src="../../static/pdf/zc.png" width="750rpx" mode="widthFix"></u-image>
  5. </view>
  6. <view v-else>
  7. <u-image src="../../static/pdf/zc.png" width="750rpx" mode="widthFix"></u-image>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. switchLang: 'en'
  16. }
  17. },
  18. onShow() {
  19. uni.setNavigationBarTitle({
  20. title: this.$t('policy.title')
  21. });
  22. let self = this
  23. uni.getStorage({
  24. key: 'lang',
  25. success: function (res) {
  26. if (res.data && res.data === 'en') {
  27. self.switchLang = 'en'
  28. } else {
  29. self.switchLang = 'zh'
  30. }
  31. }
  32. });
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. </style>