index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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="" @click="dingdan">
  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="" @click="dizhi">
  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 style="width: 100%;height: 40px;"></view>
  56. </view>
  57. </template>
  58. <script>
  59. import{myRequest} from '@/api/request.js'
  60. export default {
  61. data() {
  62. return {
  63. show:false,
  64. on:true,
  65. libiaoList:[
  66. {title:'我的钱包',type:'1'},
  67. {title:'我的评价',type:'2'},
  68. {title:'意见反馈',type:'3'},
  69. {title:'我的消息',type:'4'},
  70. {title:'我的关注',type:'5'},
  71. {title:'系统通知',type:'6'},
  72. {title:'历史记录',type:'7'},
  73. {title:'创建家庭',type:'8'},
  74. {title:'内容推送',type:'9'},
  75. {title:'衣服录入',type:'10'},
  76. ]
  77. };
  78. },
  79. onLoad() {
  80. console.log(this.$store.state)
  81. },
  82. created() {
  83. this.sys = uni.getSystemInfoSync();
  84. console.log(this.$store.state)
  85. },
  86. methods: {
  87. tiaozhuan(type){
  88. if(type==1){
  89. uni.navigateTo({
  90. url: "/pages/qianbao/index",
  91. })
  92. }else if(type==2){
  93. uni.navigateTo({
  94. url: "/pages/pingjia/index",
  95. })
  96. }else if(type==3){
  97. uni.navigateTo({
  98. url: "/pages/fankui/index",
  99. })
  100. }else if(type==4){
  101. uni.navigateTo({
  102. url: "/pages/xiaoxi/index",
  103. })
  104. }else if(type==5){
  105. uni.navigateTo({
  106. url: "/pages/guanzhu/index",
  107. })
  108. }else if(type==8){
  109. uni.navigateTo({
  110. url: "/pages/chuanghome/index",
  111. })
  112. }else if(type==10){
  113. uni.navigateTo({
  114. url: "/pages/luru/index",
  115. })
  116. }
  117. },
  118. dizhi(){
  119. uni.navigateTo({
  120. url: "/pages/dizhi/index",
  121. })
  122. },
  123. dingdan(){
  124. uni.navigateTo({
  125. url: "/pages/dingdan/index",
  126. })
  127. },
  128. queren(){
  129. var that=this;
  130. if(uni.getStorageSync("token")==""){
  131. uni.redirectTo({
  132. url:"/pages/login/index"
  133. })
  134. return
  135. }
  136. myRequest({
  137. url: "/api/Logout/logout",
  138. method:'get',
  139. data:{}
  140. }).then(res => {
  141. uni.setStorageSync("token","")
  142. uni.redirectTo({
  143. url:"/pages/login/index"
  144. })
  145. })
  146. }
  147. },
  148. }
  149. </script>
  150. <style lang="scss">
  151. /deep/ .tm-menubars .body{
  152. background-color: #1b1b1b !important;
  153. }
  154. .chuandaimg{width: 100px;}
  155. .info{width: 90%;margin:0 auto;}
  156. /deep/ .info uni-button{background-color: #303440 !important;}
  157. .sange image{vertical-align: middle;margin-right: 8px;}
  158. /deep/ .tm-col{width: 33% !important;}
  159. .sange1{width: 22px;height: 22px;}
  160. .sange2{width: 18px;height: 22px;}
  161. .sange3{width: 22px;height: 22px;}
  162. .aa{float: right;width: 1px;height: 18px;background-color: #D8D8D8;margin-top: 2px;}
  163. /deep/ .tm-grouplist{margin:5px !important;margin-top: 15px !important;}
  164. /deep/ .liebiao .grey-darken-4.bk{background-color: #0D0D0D !important;}
  165. /deep/ .liebiao .py-24{padding-top: 15px;padding-bottom: 15px;}
  166. /deep/ .logincla .primary{
  167. background-color: #303440 !important;
  168. }
  169. </style>