xy.vue 737 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view>
  3. <view v-if="switchLang == 'en'">
  4. <u-image src="../../static/pdf/xy.png" width="750rpx" mode="widthFix"></u-image>
  5. </view>
  6. <view v-else>
  7. <u-image src="../../static/pdf/xy.png" width="750rpx" mode="widthFix"></u-image>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. switchLang: true
  16. }
  17. },
  18. onShow() {
  19. uni.setNavigationBarTitle({
  20. title: this.$t('agreement.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>