index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view :style="{ minHeight: sys.windowHeight + 'px' }"
  3. :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']" style="padding-bottom:50px;">
  4. <tm-menubars title="" :shadow="0" :showback="false"></tm-menubars>
  5. <view class="tou C1b1b1b">
  6. <view class="info">
  7. <image class="chuandaimg fl" src="/static/img/55.png" mode="widthFix"></image>
  8. <view class="chuandazi fl ml-30">
  9. <view class="text-size-lg text-weight-b text-overflow-2 mt-20">Hahhhnxsm_</view>
  10. <view class="tm-cartCellListFood-label text-size-s text-grey">15077854701</view>
  11. <tm-button size="s" class="mt-10">编辑个人资料</tm-button>
  12. </view>
  13. <view style="clear: both;"></view>
  14. <tm-row class="sange mt-40 pb-30">
  15. <tm-col color="" >
  16. <view class="py-10 text-size-xs">
  17. <image class="sange1" src="/static/img/56.png"></image>
  18. <text>我的订单</text>
  19. <view class="aa"></view>
  20. </view>
  21. </tm-col>
  22. <tm-col color="" >
  23. <view class="py-10 text-size-xs">
  24. <image class="sange2" src="/static/img/57.png"></image>
  25. <text>我的订单</text>
  26. <view class="aa"></view>
  27. </view>
  28. </tm-col>
  29. <tm-col color="">
  30. <view class="py-10 text-size-xs">
  31. <image class="sange3" src="/static/img/58.png"></image>
  32. <text>我的订单</text>
  33. </view>
  34. </tm-col>
  35. </tm-row>
  36. </view>
  37. </view>
  38. <!-- 列表 -->
  39. <tm-grouplist class="liebiao pt-20">
  40. <tm-listitem v-for="item in libiaoList" @click="tiaozhuan(item.type)" :title="item.title" left-icon="" show-left-icon :show-right-icon="item.type==9?false:true">
  41. <template #rightValue v-if="item.type==9">
  42. <view class="xiangji">
  43. <tm-col :grid="3"><tm-switch :text="['','']" color="primary" v-model="on"></tm-switch></tm-col>
  44. </view>
  45. </template>
  46. </tm-listitem>
  47. </tm-grouplist>
  48. <view class="px-24">
  49. <tm-button@click="show=true" theme="primary" :round="24" block class="mt-50 logincla">退出账号</tm-button>
  50. </view>
  51. <!-- <tm-button theme="primary">上传图片</tm-button> -->
  52. <tm-dialog v-model="show" content="确认退出系统?" @confirm="queren"></tm-dialog>
  53. <!-- 弹出层消息 -->
  54. <tm-message ref="toast"></tm-message>
  55. </view>
  56. </template>
  57. <script>
  58. import{myRequest} from '@/api/request.js'
  59. export default {
  60. data() {
  61. return {
  62. show:false,
  63. on:true,
  64. libiaoList:[
  65. {title:'我的钱包',type:'1'},
  66. {title:'我的评价',type:'2'},
  67. {title:'意见反馈',type:'3'},
  68. {title:'我的消息',type:'4'},
  69. {title:'我的关注',type:'5'},
  70. {title:'系统通知',type:'6'},
  71. {title:'历史记录',type:'7'},
  72. {title:'创建家庭',type:'8'},
  73. {title:'内容推送',type:'9'},
  74. {title:'衣服录入',type:'10'},
  75. ]
  76. };
  77. },
  78. onLoad() {
  79. console.log(this.$store.state)
  80. },
  81. created() {
  82. this.sys = uni.getSystemInfoSync();
  83. console.log(this.$store.state)
  84. },
  85. methods: {
  86. tiaozhuan(type){
  87. if(type==8){
  88. uni.navigateTo({
  89. url: "/pages/chuanghome/index",
  90. })
  91. }else if(type==3){
  92. uni.navigateTo({
  93. url: "/pages/fankui/index",
  94. })
  95. }else if(type==4){
  96. uni.navigateTo({
  97. url: "/pages/xiaoxi/index",
  98. })
  99. }else if(type==10){
  100. uni.navigateTo({
  101. url: "/pages/luru/index",
  102. })
  103. }
  104. },
  105. queren(){
  106. var that=this;
  107. if(uni.getStorageSync("token")==""){
  108. uni.redirectTo({
  109. url:"/pages/login/index"
  110. })
  111. return
  112. }
  113. myRequest({
  114. url: "/api/Logout/logout",
  115. method:'get',
  116. data:{}
  117. }).then(res => {
  118. uni.setStorageSync("token","")
  119. uni.redirectTo({
  120. url:"/pages/login/index"
  121. })
  122. })
  123. }
  124. },
  125. }
  126. </script>
  127. <style lang="scss">
  128. /deep/ .tm-menubars .body{
  129. background-color: #1b1b1b !important;
  130. }
  131. .chuandaimg{width: 100px;}
  132. .info{width: 90%;margin:0 auto;}
  133. /deep/ .info uni-button{background-color: #303440 !important;}
  134. .sange image{vertical-align: middle;margin-right: 8px;}
  135. /deep/ .tm-col{width: 33% !important;}
  136. .sange1{width: 22px;height: 22px;}
  137. .sange2{width: 18px;height: 22px;}
  138. .sange3{width: 22px;height: 22px;}
  139. .aa{float: right;width: 1px;height: 18px;background-color: #D8D8D8;margin-top: 2px;}
  140. /deep/ .tm-grouplist{margin:5px !important;margin-top: 15px !important;}
  141. /deep/ .liebiao .grey-darken-4.bk{background-color: #0D0D0D !important;}
  142. /deep/ .liebiao .py-24{padding-top: 15px;padding-bottom: 15px;}
  143. /deep/ .logincla .primary{
  144. background-color: #303440 !important;
  145. }
  146. </style>