App.vue 5.7 KB

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