球星卡微信小程序
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.

59 lines
1.6 KiB

4 years ago
4 years ago
4 years ago
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 title="我的分销优惠码" :isLink="true" :border="false" url="/packages/agent/agent" v-if="isAgent()"></u-cell>
  14. </u-cell-group>
  15. <view class="fixed-tips">{{ version ? 'v'+ version : '' }}</view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. data() {
  21. return {
  22. src:"https://cdn.uviewui.com/uview/album/1.jpg",
  23. userInfo: {},
  24. version: ''
  25. }
  26. },
  27. onLoad(){
  28. this.userInfo = uni.getStorageSync('userInfo') || {};
  29. let miniProgram = wx.getAccountInfoSync().miniProgram;
  30. if(miniProgram.version){
  31. this.version = miniProgram.version;
  32. }
  33. },
  34. methods: {
  35. previewImage(){
  36. uni.previewImage({
  37. urls: [this.userInfo.avatar]
  38. })
  39. },
  40. isAgent(){
  41. return this.userInfo.is_agent
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. .fixed-tips{
  48. position: fixed;
  49. bottom: 8vh;
  50. width: 750rpx;
  51. left: 0;
  52. text-align: center;
  53. font-size: 26rpx;
  54. color: #bdc3c7;
  55. }
  56. </style>