index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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:'8'},
  75. {title:'内容推送',type:'9'},
  76. ]
  77. };
  78. },
  79. onLoad() {
  80. },
  81. created() {
  82. this.sys = uni.getSystemInfoSync();
  83. },
  84. methods: {
  85. tiaozhuan(type){
  86. if(type==1){
  87. uni.navigateTo({
  88. url: "/pages/qianbao/index",
  89. })
  90. }else if(type==2){
  91. uni.navigateTo({
  92. url: "/pages/pingjia/index",
  93. })
  94. }else if(type==3){
  95. uni.navigateTo({
  96. url: "/pages/fankui/index",
  97. })
  98. }else if(type==4){
  99. uni.navigateTo({
  100. url: "/pages/xiaoxi/index",
  101. })
  102. }else if(type==5){
  103. uni.navigateTo({
  104. url: "/pages/guanzhu/index",
  105. })
  106. }else if(type==8){
  107. var orfamily=uni.getStorageSync("family_id");
  108. if(orfamily){
  109. uni.navigateTo({
  110. url: "/pages/qiehuan/index",
  111. })
  112. }else{
  113. uni.navigateTo({
  114. url: "/pages/chuanghome/index",
  115. })
  116. }
  117. }else if(type==10){
  118. uni.navigateTo({
  119. url: "/pages/luru/index",
  120. })
  121. }
  122. },
  123. dizhi(){
  124. uni.navigateTo({
  125. url: "/pages/dizhi/index",
  126. })
  127. },
  128. dingdan(){
  129. uni.navigateTo({
  130. url: "/pages/dingdan/index",
  131. })
  132. },
  133. queren(){
  134. var that=this;
  135. if(uni.getStorageSync("token")==""){
  136. uni.redirectTo({
  137. url:"/pages/login/index"
  138. })
  139. return
  140. }
  141. myRequest({
  142. url: "/api/Logout/logout",
  143. method:'get',
  144. data:{}
  145. }).then(res => {
  146. uni.setStorageSync("token","")
  147. uni.redirectTo({
  148. url:"/pages/login/index"
  149. })
  150. })
  151. }
  152. },
  153. }
  154. </script>
  155. <style lang="scss">
  156. /deep/ .tm-menubars .body{
  157. background-color: #1b1b1b !important;
  158. }
  159. .chuandaimg{width: 100px;}
  160. .info{width: 90%;margin:0 auto;}
  161. /deep/ .info uni-button{background-color: #303440 !important;}
  162. .sange image{vertical-align: middle;margin-right: 8px;}
  163. /deep/ .tm-col{width: 33% !important;}
  164. .sange1{width: 22px;height: 22px;}
  165. .sange2{width: 18px;height: 22px;}
  166. .sange3{width: 22px;height: 22px;}
  167. .aa{float: right;width: 1px;height: 18px;background-color: #D8D8D8;margin-top: 2px;}
  168. /deep/ .tm-grouplist{margin:5px !important;margin-top: 15px !important;}
  169. /deep/ .liebiao .grey-darken-4.bk{background-color: #0D0D0D !important;}
  170. /deep/ .liebiao .py-24{padding-top: 15px;padding-bottom: 15px;}
  171. /deep/ .logincla .primary{
  172. background-color: #303440 !important;
  173. }
  174. </style>