Mine.vue 4.8 KB

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