index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="uc_vip_code_container">
  3. <div class="card text-center padding-top-xl">
  4. <view class="user margin-xl">
  5. <view class="up">
  6. <view class="left">
  7. <img :src="userinfo.portrait"/>
  8. <view>
  9. <text>
  10. <text>{{ userinfo.user_name }}</text>
  11. </text>
  12. <text>{{ userinfo.level_name }} 有效期至 {{ userinfo.validity_time }}</text>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <img src="https://img.shuimuai.com/web/demo_code.png" class="qrcode margin-xl" alt="">
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import utils from '@/utils/index'
  23. var $this
  24. export default {
  25. name: "uc_vip_code_container",
  26. components: {},
  27. data() {
  28. return {
  29. userinfo: {}
  30. }
  31. },
  32. methods: {}
  33. ,
  34. mounted() {
  35. },
  36. created() {
  37. $this = this;
  38. },
  39. onLoad() {
  40. $this.userinfo = wx.getStorageSync('userinfo')
  41. $this.userinfo['validity_time'] = utils.formatTime($this.userinfo['validity_time'])
  42. $this.userinfo['level_name'] = utils.get_level_name($this.userinfo['level'])
  43. }
  44. }
  45. </script>
  46. <style scoped>
  47. @import "index.css";
  48. </style>