App.vue 4.3 KB

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