set.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="tui-set-box">
  3. <tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(1)">
  4. <view class="tui-list-cell tui-info-box">
  5. <image :src="memberinfo.userpic || '/static/images/my/mine_def_touxiang_3x.png'" class="tui-avatar"></image>
  6. <view>{{memberinfo.nickname}}</view>
  7. </view>
  8. </tui-list-cell>
  9. <tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(2)">
  10. <view class="tui-list-cell">
  11. 地址管理
  12. </view>
  13. </tui-list-cell>
  14. <!--
  15. <view class="tui-mtop">
  16. <tui-list-cell padding="0" :lineLeft="false" :arrow="true">
  17. <view class="tui-list-cell">
  18. 账户与安全
  19. </view>
  20. </tui-list-cell>
  21. <tui-list-cell padding="0" :lineLeft="false" :arrow="true">
  22. <view class="tui-list-cell">
  23. 支付设置
  24. </view>
  25. </tui-list-cell>
  26. <tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(3)">
  27. <view class="tui-list-cell">
  28. 消息提醒设置
  29. </view>
  30. </tui-list-cell>
  31. </view>
  32. <view class="tui-mtop">
  33. <tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(4)">
  34. <view class="tui-list-cell">
  35. 关于我们
  36. </view>
  37. </tui-list-cell>
  38. <tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(5)">
  39. <view class="tui-list-cell">
  40. 意见反馈
  41. </view>
  42. </tui-list-cell>
  43. </view>-->
  44. <view class="tui-exit">
  45. <tui-button @click="logout" shape="circle" shadow type="danger" height="88rpx">退出登录</tui-button>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. sex: '男',
  54. date: '请选择',
  55. memberinfo: [],
  56. }
  57. },
  58. onShow: function() {
  59. let _this = this;
  60. _this.$util.getUserInfo(function(userInfo) {
  61. //Console.log("adfs");
  62. _this.$request.get('member.detail', {
  63. samkey: (new Date()).valueOf()
  64. }).then(res => {
  65. if (res.errno == 0) {
  66. _this.memberinfo = res.data;
  67. _this.sex = res.data.sex;
  68. }
  69. });
  70. })
  71. },
  72. methods: {
  73. logout() {
  74. uni.navigateTo({
  75. url: '/pages/login/logout?ptype=member'
  76. });
  77. },
  78. href(page) {
  79. let url = "";
  80. switch (page) {
  81. case 1:
  82. url = "/pagesA/my/userInfo/userInfo"
  83. break;
  84. case 2:
  85. url = "/pagesA/my/address/address"
  86. break;
  87. case 3:
  88. url = "/pagesA/my/notice/notice"
  89. break;
  90. case 4:
  91. url = "/pages/common/about/about"
  92. break;
  93. case 5:
  94. url = "/pagesA/my/feedback/feedback?page=mall"
  95. break;
  96. default:
  97. break;
  98. }
  99. uni.navigateTo({
  100. url: url
  101. })
  102. }
  103. },
  104. /**
  105. * 页面相关事件处理函数--监听用户下拉动作
  106. */
  107. onPullDownRefresh: function() {
  108. setTimeout(() => {
  109. uni.stopPullDownRefresh()
  110. }, 200);
  111. },
  112. }
  113. </script>
  114. <style>
  115. .tui-set-box {
  116. padding-bottom: 20rpx;
  117. color: #333;
  118. }
  119. .tui-list-cell {
  120. display: flex;
  121. align-items: center;
  122. padding: 24rpx 30rpx;
  123. font-size: 30rpx;
  124. }
  125. .tui-info-box {
  126. font-size: 34rpx;
  127. }
  128. .tui-avatar {
  129. width: 140rpx;
  130. height: 140rpx;
  131. margin-right: 20rpx;
  132. }
  133. .tui-mtop {
  134. margin-top: 20rpx;
  135. }
  136. .tui-exit {
  137. padding: 100rpx 24rpx;
  138. }
  139. </style>