App.vue 5.8 KB

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