App.vue 5.9 KB

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