App.vue 5.8 KB

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