App.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <script>
  2. import Vue from 'vue'
  3. export default {
  4. onLaunch: function() {
  5. uni.getSystemInfo({
  6. success: function(e) {
  7. // #ifndef MP
  8. Vue.prototype.StatusBar = e.statusBarHeight;
  9. if (e.platform == 'android') {
  10. Vue.prototype.CustomBar = e.statusBarHeight + 50;
  11. } else {
  12. Vue.prototype.CustomBar = e.statusBarHeight + 45;
  13. };
  14. // #endif
  15. // #ifdef MP-WEIXIN
  16. Vue.prototype.StatusBar = e.statusBarHeight;
  17. let custom = wx.getMenuButtonBoundingClientRect();
  18. Vue.prototype.Custom = custom;
  19. Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
  20. // #endif
  21. // #ifdef MP-ALIPAY
  22. Vue.prototype.StatusBar = e.statusBarHeight;
  23. Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
  24. // #endif
  25. }
  26. })
  27. },
  28. onShow: function() {
  29. console.log('App Show')
  30. },
  31. onHide: function() {
  32. console.log('App Hide')
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. @import "colorui/main.css";
  38. @import "colorui/icon.css";
  39. @import 'thorui/app.css';
  40. @import 'tuniao-ui/index.scss';
  41. @import 'tuniao-ui/iconfont.css';
  42. page {
  43. background: #EDEDED;
  44. }
  45. .nav-list {
  46. display: flex;
  47. flex-wrap: wrap;
  48. padding: 0px 40upx 0px;
  49. justify-content: space-between;
  50. }
  51. .nav-li {
  52. padding: 30upx;
  53. border-radius: 12upx;
  54. width: 45%;
  55. margin: 0 2.5% 40upx;
  56. background-image: url(https://cdn.nlark.com/yuque/0/2019/png/280374/1552996358352-assets/web-upload/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
  57. background-size: cover;
  58. background-position: center;
  59. position: relative;
  60. z-index: 1;
  61. }
  62. .nav-li::after {
  63. content: "";
  64. position: absolute;
  65. z-index: -1;
  66. background-color: inherit;
  67. width: 100%;
  68. height: 100%;
  69. left: 0;
  70. bottom: -10%;
  71. border-radius: 10upx;
  72. opacity: 0.2;
  73. transform: scale(0.9, 0.9);
  74. }
  75. .nav-li.cur {
  76. color: #fff;
  77. background: rgb(94, 185, 94);
  78. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  79. }
  80. .nav-title {
  81. font-size: 32upx;
  82. font-weight: 300;
  83. }
  84. .nav-title::first-letter {
  85. font-size: 40upx;
  86. margin-right: 4upx;
  87. }
  88. .nav-name {
  89. font-size: 28upx;
  90. text-transform: Capitalize;
  91. margin-top: 20upx;
  92. position: relative;
  93. }
  94. .nav-name::before {
  95. content: "";
  96. position: absolute;
  97. display: block;
  98. width: 40upx;
  99. height: 6upx;
  100. background: #fff;
  101. bottom: 0;
  102. right: 0;
  103. opacity: 0.5;
  104. }
  105. .nav-name::after {
  106. content: "";
  107. position: absolute;
  108. display: block;
  109. width: 100upx;
  110. height: 1px;
  111. background: #fff;
  112. bottom: 0;
  113. right: 40upx;
  114. opacity: 0.3;
  115. }
  116. .nav-name::first-letter {
  117. font-weight: bold;
  118. font-size: 36upx;
  119. margin-right: 1px;
  120. }
  121. .nav-li text {
  122. position: absolute;
  123. right: 30upx;
  124. top: 30upx;
  125. font-size: 52upx;
  126. width: 60upx;
  127. height: 60upx;
  128. text-align: center;
  129. line-height: 60upx;
  130. }
  131. .text-light {
  132. font-weight: 300;
  133. }
  134. @keyframes show {
  135. 0% {
  136. transform: translateY(-50px);
  137. }
  138. 60% {
  139. transform: translateY(40upx);
  140. }
  141. 100% {
  142. transform: translateY(0px);
  143. }
  144. }
  145. @-webkit-keyframes show {
  146. 0% {
  147. transform: translateY(-50px);
  148. }
  149. 60% {
  150. transform: translateY(40upx);
  151. }
  152. 100% {
  153. transform: translateY(0px);
  154. }
  155. }
  156. .fix-bottom {
  157. width: 100%;
  158. height: 100rpx;
  159. }
  160. .m-t-20 {
  161. margin-top: 20rpx;
  162. }
  163. .m-lr-10 {
  164. margin: 0 10rpx;
  165. }
  166. .m-lr-20 {
  167. margin: 0 20rpx;
  168. }
  169. .m-l-30 {
  170. margin: 30rpx;
  171. }
  172. .text-primary {
  173. color: #5677fc;
  174. }
  175. .bg-primary {
  176. background-color: #5677fc;
  177. color: #ffffff;
  178. }
  179. .line-primary::after,
  180. .lines-primary::after {
  181. border-color: #5677fc;
  182. }
  183. .card-view {
  184. width: 90%;
  185. padding: 20rpx;
  186. background: #fff;
  187. margin: 30rpx auto;
  188. border-radius: 15rpx;
  189. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  190. }
  191. .card-shadow {
  192. border-radius: 15rpx;
  193. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  194. }
  195. .about-shadow {
  196. border-radius: 15rpx;
  197. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  198. }
  199. .about {
  200. &__wrap {
  201. position: relative;
  202. z-index: 1;
  203. margin: 20rpx 30rpx;
  204. margin-top: -230rpx;
  205. }
  206. }
  207. </style>