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

64 lines
1.8 KiB

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