App.vue 5.8 KB

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