new_file.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="container">
  3. <view class="flex topBox">
  4. <view class="flex_item">
  5. <image src="/static/img/img01.png" style="width: 82rpx;height: 82rpx;"></image>
  6. <view style="color: #fff;font-size: 36rpx;padding-left: 15rpx;">NICE</view>
  7. </view>
  8. <view class="flex_item topTpl">
  9. <view class="addr" v-if="userInfo.addresss">{{userInfo.addresss}}</view>
  10. <view class="flex_item tplInfo">
  11. <image src="/static/img/img14.png" style="width: 32rpx;height: 32rpx;margin: 0rpx 15rpx;"></image>
  12. <picker :range="langList" range-key='label' @change="selectLang">
  13. <view>{{langLabel}}</view>
  14. </picker>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="infoBox">
  19. <view class="navBack" @click="navTo('/pages/index/index')">
  20. <u-icon name="arrow-left" size="25" color="#fff" style="position: absolute;left: 0;top: 0;font-weight: bold;"></u-icon>
  21. <view class="title">我的邀请</view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. getUserInfo
  29. } from '@/api/login.js';
  30. import {
  31. mapState,
  32. mapActions,
  33. mapMutations
  34. } from "vuex";
  35. export default {
  36. data () {
  37. return {}
  38. },
  39. onLoad () {},
  40. onShow () {
  41. },
  42. computed: {
  43. ...mapState({
  44. langList: "langList",
  45. lang: "lang",
  46. }),
  47. ...mapState('user', ['userInfo']),
  48. langLabel () {
  49. const langLabel = this.langList.find((item) => {
  50. return item.value == this.lang
  51. }).label;
  52. return langLabel
  53. }
  54. },
  55. methods: {
  56. ...mapMutations('user', ['setUserInfo']),
  57. ...mapActions({
  58. setLang: "setLang",
  59. }),
  60. //切换语言
  61. selectLang (value) {
  62. this.setLang(this.langList[value.detail.value].value);
  63. },
  64. navTo(url){
  65. uni.navigateTo({
  66. url:url
  67. })
  68. },
  69. },
  70. }
  71. </script>
  72. <style lang="scss">
  73. page {
  74. width: 100%;
  75. min-height: 100vh;
  76. .container {
  77. width: 100%;
  78. min-height: 100vh;
  79. }
  80. }
  81. .topBox {
  82. color: #FFE0BD;
  83. padding: 25rpx 27rpx;
  84. background: #1A1A17;
  85. .topTpl {
  86. .addr {
  87. padding: 6rpx 25rpx;
  88. background: linear-gradient(-74deg, #CE9C6D, #FFECD6);
  89. box-shadow: 3rpx 4rpx 5rpx 0rpx rgba(151, 118, 74, 0.5);
  90. border-radius: 21rpx;
  91. font-size: 24rpx;
  92. font-family: PingFang SC;
  93. font-weight: 500;
  94. color: #986629;
  95. }
  96. }
  97. }
  98. .infoBox{
  99. padding: 0rpx 25rpx;
  100. }
  101. .navBack{
  102. position: relative;
  103. color: #fff;
  104. text-align: center;
  105. margin: 47rpx 0rpx;
  106. .title{
  107. font-weight: bold;
  108. font-size: 34rpx;
  109. }
  110. }
  111. </style>