App.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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.NavBarColor='bg-gradual-blue'
  51. Vue.prototype.Radio_Check_Size='scale(0.7)'
  52. Vue.prototype.ColorList = [{
  53. title: '嫣红',
  54. name: 'red',
  55. color: '#e54d42'
  56. },
  57. {
  58. title: '桔橙',
  59. name: 'orange',
  60. color: '#f37b1d'
  61. },
  62. {
  63. title: '明黄',
  64. name: 'yellow',
  65. color: '#fbbd08'
  66. },
  67. {
  68. title: '橄榄',
  69. name: 'olive',
  70. color: '#8dc63f'
  71. },
  72. {
  73. title: '森绿',
  74. name: 'green',
  75. color: '#39b54a'
  76. },
  77. {
  78. title: '天青',
  79. name: 'cyan',
  80. color: '#1cbbb4'
  81. },
  82. {
  83. title: '海蓝',
  84. name: 'blue',
  85. color: '#0081ff'
  86. },
  87. {
  88. title: '姹紫',
  89. name: 'purple',
  90. color: '#6739b6'
  91. },
  92. {
  93. title: '木槿',
  94. name: 'mauve',
  95. color: '#9c26b0'
  96. },
  97. {
  98. title: '桃粉',
  99. name: 'pink',
  100. color: '#e03997'
  101. },
  102. {
  103. title: '棕褐',
  104. name: 'brown',
  105. color: '#a5673f'
  106. },
  107. {
  108. title: '玄灰',
  109. name: 'grey',
  110. color: '#8799a3'
  111. },
  112. {
  113. title: '草灰',
  114. name: 'gray',
  115. color: '#aaaaaa'
  116. },
  117. {
  118. title: '墨黑',
  119. name: 'black',
  120. color: '#333333'
  121. },
  122. {
  123. title: '雅白',
  124. name: 'white',
  125. color: '#ffffff'
  126. },
  127. ]
  128. },
  129. onShow: function() {
  130. console.log('App Show')
  131. },
  132. onHide: function() {
  133. console.log('App Hide')
  134. }
  135. }
  136. </script>
  137. <style>
  138. @import "plugin/colorui/main.css";
  139. @import "plugin/colorui/icon.css";
  140. @import "plugin/colorui/animation.css";
  141. .nav-list {
  142. display: flex;
  143. flex-wrap: wrap;
  144. padding: 0px 40upx 0px;
  145. justify-content: space-between;
  146. }
  147. .nav-li {
  148. padding: 30upx;
  149. border-radius: 12upx;
  150. width: 45%;
  151. margin: 0 2.5% 40upx;
  152. background-image: url(https://cdn.nlark.com/yuque/0/2019/png/280374/1552996358352-assets/web-upload/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
  153. background-size: cover;
  154. background-position: center;
  155. position: relative;
  156. z-index: 1;
  157. }
  158. .nav-li::after {
  159. content: "";
  160. position: absolute;
  161. z-index: -1;
  162. background-color: inherit;
  163. width: 100%;
  164. height: 100%;
  165. left: 0;
  166. bottom: -10%;
  167. border-radius: 10upx;
  168. opacity: 0.2;
  169. transform: scale(0.9, 0.9);
  170. }
  171. .nav-li.cur {
  172. color: #fff;
  173. background: rgb(94, 185, 94);
  174. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  175. }
  176. .nav-title {
  177. font-size: 32upx;
  178. font-weight: 300;
  179. }
  180. .nav-title::first-letter {
  181. font-size: 40upx;
  182. margin-right: 4upx;
  183. }
  184. .nav-name {
  185. font-size: 28upx;
  186. text-transform: Capitalize;
  187. margin-top: 20upx;
  188. position: relative;
  189. }
  190. .nav-name::before {
  191. content: "";
  192. position: absolute;
  193. display: block;
  194. width: 40upx;
  195. height: 6upx;
  196. background: #fff;
  197. bottom: 0;
  198. right: 0;
  199. opacity: 0.5;
  200. }
  201. .nav-name::after {
  202. content: "";
  203. position: absolute;
  204. display: block;
  205. width: 100upx;
  206. height: 1px;
  207. background: #fff;
  208. bottom: 0;
  209. right: 40upx;
  210. opacity: 0.3;
  211. }
  212. .nav-name::first-letter {
  213. font-weight: bold;
  214. font-size: 36upx;
  215. margin-right: 1px;
  216. }
  217. .nav-li text {
  218. position: absolute;
  219. right: 30upx;
  220. top: 30upx;
  221. font-size: 52upx;
  222. width: 60upx;
  223. height: 60upx;
  224. text-align: center;
  225. line-height: 60upx;
  226. }
  227. .text-light {
  228. font-weight: 300;
  229. }
  230. @keyframes show {
  231. 0% {
  232. transform: translateY(-50px);
  233. }
  234. 60% {
  235. transform: translateY(40upx);
  236. }
  237. 100% {
  238. transform: translateY(0px);
  239. }
  240. }
  241. @-webkit-keyframes show {
  242. 0% {
  243. transform: translateY(-50px);
  244. }
  245. 60% {
  246. transform: translateY(40upx);
  247. }
  248. 100% {
  249. transform: translateY(0px);
  250. }
  251. }
  252. </style>