Mine.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. badge: 22,
  45. inconList:["form","favor","question","edit"],
  46. modalName:null,
  47. leftNavigationtitle:'我的功能分组',
  48. buttonHeight:'',
  49. address: '',
  50. drawerList: [],
  51. plusDrawerList: [],
  52. }
  53. },created: function() {
  54. this.timeNow();
  55. this.viewUserid();
  56. this.monitoringAuthority();
  57. this.address = this.dataprocessing.getWindPowerStationName();
  58. this.FDC=this.dataprocessing.getWindPowerStationId();
  59. this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
  60. },
  61. onHide() {
  62. this.$refs.drawer.closeDrawer();
  63. this.hideModal();
  64. },
  65. onShow(){
  66. this.viewUserid();
  67. this.monitoringAuthority();
  68. this.address = this.dataprocessing.getWindPowerStationName();
  69. this.FDC=this.dataprocessing.getWindPowerStationId();
  70. this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
  71. },
  72. methods:{
  73. openDrawer:function(){
  74. this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList,this.leftNavigationtitle);
  75. },
  76. closeDrawer:function(){
  77. this.drawerIsShow=false;
  78. },viewUserid: function() {
  79. this.plusDrawerList=uni.getStorageSync('plusList');
  80. },
  81. monitoringAuthority: function() {
  82. this.drawerList=uni.getStorageSync('leftlist5');
  83. },
  84. pushWindPowerStationNameToSessionStorage(windpowerstationName) {
  85. uni.setStorageSync('windpowerstationName', windpowerstationName);
  86. //sessionStorage.setItem('windpowerstationName', windpowerstationName);
  87. //alert("v"+ sessionStorage.getItem("windpowerstationName"));
  88. //this.common.goback('/pages/index/Index');
  89. },
  90. getWindPowerStationNameToSessionStorage() {
  91. uni.getStorageSync('windpowerstationName');
  92. return uni.getStorageSync('windpowerstationName');
  93. },
  94. showModal(e) {
  95. this.modalName = e.currentTarget.dataset.target;
  96. this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
  97. },
  98. hideModal() {
  99. this.modalName = null;
  100. this.$refs.plusDrawer.hideModal(this.modalName);
  101. },
  102. falseLogin: function() {
  103. this.removeUsernamePassword();
  104. uni.navigateTo({
  105. url: '/components/login/Login'
  106. });
  107. },
  108. removeUsernamePassword: function() {
  109. uni.removeStorageSync('gyeeusername');
  110. uni.removeStorageSync('gyeepassword');
  111. },
  112. }
  113. };
  114. </script>
  115. <style>
  116. body {
  117. font-family: '方正兰亭细黑_GBK';
  118. font-size: 20px;
  119. color: silver;
  120. background: #000;
  121. }
  122. @font-face {
  123. font-family: '方正兰亭细黑_GBK';
  124. src: url(../../static/fzltxh.TTF);
  125. }
  126. page {
  127. background-color: #1f1f1f;
  128. font-family: '方正兰亭细黑_GBK';
  129. overflow-x: hidden;
  130. }
  131. .top {
  132. width: 100%;
  133. height: 130upx;
  134. padding-top: 5upx;
  135. background-color: #1f1f1f;
  136. position: fixed;
  137. top: 0px;
  138. left: 0px;
  139. z-index: 100;
  140. }
  141. .threeLine {
  142. width: 50px;
  143. height: 45px;
  144. float: left;
  145. }
  146. .text {
  147. width: calc(100% - 100px);
  148. height: 45px;
  149. float: left;
  150. user-select: text;
  151. -webkit-user-select: text;
  152. -moz-user-select: text;
  153. -ms-user-select: text;
  154. color: silver;
  155. line-height: 45px;
  156. margin-top: 11px;
  157. font-size: 18px;
  158. }
  159. .notice {
  160. width: 50px;
  161. height: 45px;
  162. float: left;
  163. }
  164. .plus {
  165. width: 30px;
  166. height: 45px;
  167. float: right;
  168. color: white;
  169. font-size: 35px;
  170. line-height: 45px;
  171. text-align: right;
  172. margin-right: 2.5%;
  173. }
  174. .textWindpowerstation{
  175. width: 180px;
  176. height: 45px;
  177. float: left;
  178. text-align: center;
  179. margin-left: 18px;
  180. }
  181. .cu-btn {
  182. width: 80%;
  183. height: 40px;
  184. margin-left: 10%;
  185. margin-top: 25px;
  186. }
  187. </style>