App.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <style lang="scss">
  2. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  3. @import "@/uni_modules/uview-ui/index.scss";
  4. </style>
  5. <script>
  6. import Vue from 'vue'
  7. import appUpdate from 'common/util/appUpdate.js'
  8. export default {
  9. onLaunch: function() {
  10. uni.getSystemInfo({
  11. success: function(e) {
  12. // #ifdef APP-PLUS
  13. // 检测升级
  14. appUpdate()
  15. // #endif
  16. // #ifndef MP
  17. Vue.prototype.StatusBar = e.statusBarHeight;
  18. if (e.platform == 'android') {
  19. Vue.prototype.CustomBar = e.statusBarHeight + 50;
  20. } else {
  21. Vue.prototype.CustomBar = e.statusBarHeight + 45;
  22. };
  23. // #endif
  24. // #ifdef MP-WEIXIN
  25. Vue.prototype.StatusBar = e.statusBarHeight;
  26. let custom = wx.getMenuButtonBoundingClientRect();
  27. Vue.prototype.Custom = custom;
  28. Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
  29. // #endif
  30. // #ifdef MP-ALIPAY
  31. Vue.prototype.StatusBar = e.statusBarHeight;
  32. Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
  33. // #endif
  34. // #ifdef APP-PLUS
  35. //Vue.prototype.$api.listenTranMsg()
  36. // var info = plus.push.getClientInfo();
  37. // /* 5+ push 消息推送 ps:使用:H5+的方式监听,实现推送*/
  38. // plus.push.addEventListener("click", function(msg) {
  39. // console.log("click:" + JSON.stringify(msg));
  40. // console.log(msg.payload);
  41. // console.log(JSON.stringify(msg));
  42. // //这里可以写跳转业务代码
  43. // }, false);
  44. // // 监听在线消息事件
  45. // plus.push.addEventListener("receive", function(msg) {
  46. // // plus.ui.alert(2);
  47. // //这里可以写跳转业务代码
  48. // console.log("recevice:" + JSON.stringify(msg))
  49. // }, false);
  50. // #endif
  51. //Vue.prototype.$api.initLogin()
  52. }
  53. })
  54. Vue.prototype.NavBarColor='bg-gradual-blue'
  55. Vue.prototype.Radio_Check_Size='scale(0.7)'
  56. Vue.prototype.ColorList = [{
  57. title: '嫣红',
  58. name: 'red',
  59. color: '#e54d42'
  60. },
  61. {
  62. title: '桔橙',
  63. name: 'orange',
  64. color: '#f37b1d'
  65. },
  66. {
  67. title: '明黄',
  68. name: 'yellow',
  69. color: '#fbbd08'
  70. },
  71. {
  72. title: '橄榄',
  73. name: 'olive',
  74. color: '#8dc63f'
  75. },
  76. {
  77. title: '森绿',
  78. name: 'green',
  79. color: '#39b54a'
  80. },
  81. {
  82. title: '天青',
  83. name: 'cyan',
  84. color: '#1cbbb4'
  85. },
  86. {
  87. title: '海蓝',
  88. name: 'blue',
  89. color: '#0081ff'
  90. },
  91. {
  92. title: '姹紫',
  93. name: 'purple',
  94. color: '#6739b6'
  95. },
  96. {
  97. title: '木槿',
  98. name: 'mauve',
  99. color: '#9c26b0'
  100. },
  101. {
  102. title: '桃粉',
  103. name: 'pink',
  104. color: '#e03997'
  105. },
  106. {
  107. title: '棕褐',
  108. name: 'brown',
  109. color: '#a5673f'
  110. },
  111. {
  112. title: '玄灰',
  113. name: 'grey',
  114. color: '#8799a3'
  115. },
  116. {
  117. title: '草灰',
  118. name: 'gray',
  119. color: '#aaaaaa'
  120. },
  121. {
  122. title: '墨黑',
  123. name: 'black',
  124. color: '#333333'
  125. },
  126. {
  127. title: '雅白',
  128. name: 'white',
  129. color: '#ffffff'
  130. },
  131. ]
  132. },
  133. onShow: function() {
  134. console.log('App Show')
  135. },
  136. onHide: function() {
  137. console.log('App Hide')
  138. clearInterval(this.$store.state.timer); // 假设定时器存储在 Vuex 的状态管理中
  139. },
  140. }
  141. </script>
  142. <style>
  143. @import "plugin/colorui/main.css";
  144. @import "plugin/colorui/icon.css";
  145. @import "plugin/colorui/animation.css";
  146. .nav-list {
  147. display: flex;
  148. flex-wrap: wrap;
  149. padding: 0px 40upx 0px;
  150. justify-content: space-between;
  151. }
  152. .nav-li {
  153. padding: 30upx;
  154. border-radius: 12upx;
  155. width: 45%;
  156. margin: 0 2.5% 40upx;
  157. background-image: url(https://cdn.nlark.com/yuque/0/2019/png/280374/1552996358352-assets/web-upload/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
  158. background-size: cover;
  159. background-position: center;
  160. position: relative;
  161. z-index: 1;
  162. }
  163. .nav-li::after {
  164. content: "";
  165. position: absolute;
  166. z-index: -1;
  167. background-color: inherit;
  168. width: 100%;
  169. height: 100%;
  170. left: 0;
  171. bottom: -10%;
  172. border-radius: 10upx;
  173. opacity: 0.2;
  174. transform: scale(0.9, 0.9);
  175. }
  176. .nav-li.cur {
  177. color: #fff;
  178. background: rgb(94, 185, 94);
  179. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  180. }
  181. .nav-title {
  182. font-size: 32upx;
  183. font-weight: 300;
  184. }
  185. .nav-title::first-letter {
  186. font-size: 40upx;
  187. margin-right: 4upx;
  188. }
  189. .nav-name {
  190. font-size: 28upx;
  191. text-transform: Capitalize;
  192. margin-top: 20upx;
  193. position: relative;
  194. }
  195. .nav-name::before {
  196. content: "";
  197. position: absolute;
  198. display: block;
  199. width: 40upx;
  200. height: 6upx;
  201. background: #fff;
  202. bottom: 0;
  203. right: 0;
  204. opacity: 0.5;
  205. }
  206. .nav-name::after {
  207. content: "";
  208. position: absolute;
  209. display: block;
  210. width: 100upx;
  211. height: 1px;
  212. background: #fff;
  213. bottom: 0;
  214. right: 40upx;
  215. opacity: 0.3;
  216. }
  217. .nav-name::first-letter {
  218. font-weight: bold;
  219. font-size: 36upx;
  220. margin-right: 1px;
  221. }
  222. .nav-li text {
  223. position: absolute;
  224. right: 30upx;
  225. top: 30upx;
  226. font-size: 52upx;
  227. width: 60upx;
  228. height: 60upx;
  229. text-align: center;
  230. line-height: 60upx;
  231. }
  232. .text-light {
  233. font-weight: 300;
  234. }
  235. @keyframes show {
  236. 0% {
  237. transform: translateY(-50px);
  238. }
  239. 60% {
  240. transform: translateY(40upx);
  241. }
  242. 100% {
  243. transform: translateY(0px);
  244. }
  245. }
  246. @-webkit-keyframes show {
  247. 0% {
  248. transform: translateY(-50px);
  249. }
  250. 60% {
  251. transform: translateY(40upx);
  252. }
  253. 100% {
  254. transform: translateY(0px);
  255. }
  256. }
  257. </style>