Mine.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view class="content">
  3. <cu-custom bgColor="bg-blacks" :isBack="false">
  4. <block slot="right">
  5. <image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-left: 2%;" @tap="openDrawer"></image>
  6. </block>
  7. <block slot="right">
  8. <view class="icon cuIcon-notice text-white" v-if="badge != 0" style="margin-left: -70%;">
  9. <view class="cu-tag looknumber" style="margin-top: -2%;">
  10. <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
  11. </view>
  12. </view>
  13. </block>
  14. <block slot="right">
  15. </block>
  16. <block slot="content">{{address}}</block>
  17. <block slot="right">
  18. <view class="plus" @tap="showModal" data-target="viewModal">+</view>
  19. </block>
  20. </cu-custom>
  21. <!-- 抽屉组件 -->
  22. <div>
  23. <drawer ref="drawer"></drawer>
  24. </div>
  25. <!--<div class="plusDrawer" @tap="hideModal">
  26. <plusDrawer ref="plusDrawer"></plusDrawer>
  27. </div> -->
  28. <view>
  29. <button class="cu-btn bg-red lg" @tap="falseLogin" type="" :style="{ 'height': buttonHeight}">注销账号</button>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import res from '../../common/data.json';
  35. import drawer from '../../components/drawer/threeLineDrawer.vue'
  36. import plusDrawer from '../../components/drawer/plusDrawer.vue';
  37. export default {
  38. components: {
  39. drawer: drawer,
  40. plusDrawer: plusDrawer,
  41. },
  42. data:function(){
  43. return{
  44. toggleid:13,//12聊天通讯,13我的主页,默认13
  45. badge: 22,
  46. inconList:["form","favor","question","edit"],
  47. modalName:null,
  48. leftNavigationtitle:'我的功能分组',
  49. buttonHeight:'',
  50. address: '',
  51. drawerList: [],
  52. plusDrawerList: [
  53. ],
  54. }
  55. },created: function() {
  56. this.viewUserid();
  57. this.monitoringAuthority();
  58. this.address = this.dataprocessing.getWindPowerStationName();
  59. this.FDC=this.dataprocessing.getWindPowerStationId();
  60. this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
  61. },
  62. onHide() {
  63. this.$refs.drawer.closeDrawer();
  64. this.hideModal();
  65. },
  66. onShow(){
  67. this.viewUserid();
  68. this.monitoringAuthority();
  69. this.address = this.dataprocessing.getWindPowerStationName();
  70. this.FDC=this.dataprocessing.getWindPowerStationId();
  71. this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
  72. },
  73. methods:{
  74. openDrawer:function(){
  75. this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList,this.leftNavigationtitle);
  76. },
  77. closeDrawer:function(){
  78. this.drawerIsShow=false;
  79. },viewUserid: function() {
  80. this.plusDrawerList=uni.getStorageSync('plusList');
  81. },
  82. monitoringAuthority: function() {
  83. this.drawerList=uni.getStorageSync('leftlist5');
  84. },
  85. pushWindPowerStationNameToSessionStorage(windpowerstationName) {
  86. uni.setStorageSync('windpowerstationName', windpowerstationName);
  87. //sessionStorage.setItem('windpowerstationName', windpowerstationName);
  88. //alert("v"+ sessionStorage.getItem("windpowerstationName"));
  89. //this.common.goback('/pages/index/Index');
  90. },
  91. getWindPowerStationNameToSessionStorage() {
  92. uni.getStorageSync('windpowerstationName');
  93. return uni.getStorageSync('windpowerstationName');
  94. },
  95. showModal(e) {
  96. this.modalName = e.currentTarget.dataset.target;
  97. this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
  98. },
  99. hideModal() {
  100. this.modalName = null;
  101. this.$refs.plusDrawer.hideModal(this.modalName);
  102. },
  103. falseLogin: function() {
  104. this.removeUsernamePassword();
  105. uni.navigateTo({
  106. url: '/components/login/Login'
  107. });
  108. },
  109. removeUsernamePassword: function() {
  110. uni.removeStorageSync('gyeeusername');
  111. uni.removeStorageSync('gyeepassword');
  112. },
  113. }
  114. };
  115. </script>
  116. <style>
  117. body {
  118. font-family: '方正兰亭细黑_GBK';
  119. font-size: 20px;
  120. color: silver;
  121. background: #000;
  122. }
  123. @font-face {
  124. font-family: '方正兰亭细黑_GBK';
  125. src: url(../../static/fzltxh.TTF);
  126. }
  127. page {
  128. background-color: #1f1f1f;
  129. font-family: '方正兰亭细黑_GBK';
  130. overflow-x: hidden;
  131. }
  132. .top {
  133. width: 100%;
  134. height: 130upx;
  135. padding-top: 5upx;
  136. background-color: #1f1f1f;
  137. position: fixed;
  138. top: 0px;
  139. left: 0px;
  140. z-index: 100;
  141. }
  142. .threeLine {
  143. width: 50px;
  144. height: 45px;
  145. float: left;
  146. }
  147. .text {
  148. width: calc(100% - 100px);
  149. height: 45px;
  150. float: left;
  151. user-select: text;
  152. -webkit-user-select: text;
  153. -moz-user-select: text;
  154. -ms-user-select: text;
  155. color: silver;
  156. line-height: 45px;
  157. margin-top: 11px;
  158. font-size: 18px;
  159. }
  160. .notice {
  161. width: 50px;
  162. height: 45px;
  163. float: left;
  164. }
  165. .plus {
  166. width: 30px;
  167. height: 45px;
  168. float: right;
  169. color: white;
  170. font-size: 35px;
  171. line-height: 45px;
  172. text-align: right;
  173. margin-right: 2.5%;
  174. }
  175. .textWindpowerstation{
  176. width: 180px;
  177. height: 45px;
  178. float: left;
  179. text-align: center;
  180. margin-left: 18px;
  181. }
  182. .cu-btn {
  183. width: 80%;
  184. height: 40px;
  185. margin-left: 10%;
  186. margin-top: 25px;
  187. }
  188. </style>