index.vue 4.7 KB

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