球星卡微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <view>
  3. <u-cell-group :border="false">
  4. <u-cell title="头像" :isLink="true" :border="false" @click="previewImage">
  5. <u-avatar size="40" slot="value" :src="userInfo.avatar"></u-avatar>
  6. </u-cell>
  7. <u-cell title="昵称" :border="false" :value="userInfo.nick_name"></u-cell>
  8. <u-cell title="手机号码" :isLink="true" :border="false" @click="$msg('敬请期待')"></u-cell>
  9. <u-cell title="收货地址" :isLink="true" :border="false" url="/packages/address/address"></u-cell>
  10. <u-cell title="系统消息" :isLink="true" :border="false" @click="$msg('敬请期待')">
  11. <u-badge class="badge" slot="value" numberType="overflow" max="99" :value="99"></u-badge>
  12. </u-cell>
  13. </u-cell-group>
  14. <view class="fixed-tips">{{ version ? 'v'+ version : '' }}</view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. src:"https://cdn.uviewui.com/uview/album/1.jpg",
  22. userInfo: {},
  23. version: ''
  24. }
  25. },
  26. onLoad(){
  27. this.userInfo = uni.getStorageSync('userInfo') || {};
  28. let miniProgram = wx.getAccountInfoSync().miniProgram;
  29. if(miniProgram.version){
  30. this.version = miniProgram.version;
  31. }
  32. },
  33. methods: {
  34. previewImage(){
  35. uni.previewImage({
  36. urls: [this.userInfo.avatar]
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .fixed-tips{
  44. position: fixed;
  45. bottom: 8vh;
  46. width: 750rpx;
  47. left: 0;
  48. text-align: center;
  49. font-size: 26rpx;
  50. color: #bdc3c7;
  51. }
  52. </style>