App.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. /deep/.uni-mask {
  166. z-index: 1001;
  167. }
  168. /deep/uni-modal .uni-modal {
  169. z-index: 1002;
  170. }
  171. .bg-luohu {
  172. background: linear-gradient(to top, #3396d1, #7dbfdf);
  173. color: #FFFFFF;
  174. }
  175. .btn-back-color {
  176. background-color: #3396d1 !important;
  177. }
  178. .green-back-color {
  179. background-color: #99cc66 !important;
  180. }
  181. .nav-list {
  182. display: flex;
  183. flex-wrap: wrap;
  184. padding: 0px 40upx 0px;
  185. justify-content: space-between;
  186. }
  187. .nav-li {
  188. padding: 30upx;
  189. border-radius: 12upx;
  190. width: 45%;
  191. margin: 0 2.5% 40upx;
  192. background-image: url(https://cdn.nlark.com/yuque/0/2019/png/280374/1552996358352-assets/web-upload/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
  193. background-size: cover;
  194. background-position: center;
  195. position: relative;
  196. z-index: 1;
  197. }
  198. .nav-li::after {
  199. content: "";
  200. position: absolute;
  201. z-index: -1;
  202. background-color: inherit;
  203. width: 100%;
  204. height: 100%;
  205. left: 0;
  206. bottom: -10%;
  207. border-radius: 10upx;
  208. opacity: 0.2;
  209. transform: scale(0.9, 0.9);
  210. }
  211. .nav-li.cur {
  212. color: #fff;
  213. background: rgb(94, 185, 94);
  214. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  215. }
  216. .nav-title {
  217. font-size: 32upx;
  218. font-weight: 300;
  219. }
  220. .nav-title::first-letter {
  221. font-size: 40upx;
  222. margin-right: 4upx;
  223. }
  224. .nav-name {
  225. font-size: 28upx;
  226. text-transform: Capitalize;
  227. margin-top: 20upx;
  228. position: relative;
  229. }
  230. .nav-name::before {
  231. content: "";
  232. position: absolute;
  233. display: block;
  234. width: 40upx;
  235. height: 6upx;
  236. background: #fff;
  237. bottom: 0;
  238. right: 0;
  239. opacity: 0.5;
  240. }
  241. .nav-name::after {
  242. content: "";
  243. position: absolute;
  244. display: block;
  245. width: 100upx;
  246. height: 1px;
  247. background: #fff;
  248. bottom: 0;
  249. right: 40upx;
  250. opacity: 0.3;
  251. }
  252. .nav-name::first-letter {
  253. font-weight: bold;
  254. font-size: 36upx;
  255. margin-right: 1px;
  256. }
  257. .nav-li text {
  258. position: absolute;
  259. right: 30upx;
  260. top: 30upx;
  261. font-size: 52upx;
  262. width: 60upx;
  263. height: 60upx;
  264. text-align: center;
  265. line-height: 60upx;
  266. }
  267. .text-light {
  268. font-weight: 300;
  269. }
  270. @keyframes show {
  271. 0% {
  272. transform: translateY(-50px);
  273. }
  274. 60% {
  275. transform: translateY(40upx);
  276. }
  277. 100% {
  278. transform: translateY(0px);
  279. }
  280. }
  281. @-webkit-keyframes show {
  282. 0% {
  283. transform: translateY(-50px);
  284. }
  285. 60% {
  286. transform: translateY(40upx);
  287. }
  288. 100% {
  289. transform: translateY(0px);
  290. }
  291. }
  292. </style>