App.vue 5.1 KB

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