App.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <script>
  2. export default {
  3. globalData: {
  4. baseUrl: '',
  5. token: '',
  6. version: '', // 当前版本号
  7. buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
  8. envTips: '', // 环境文字提示
  9. theme: 'default', // 主题,default
  10. isIphoneXup: false //是否iphonex以及以上的版本
  11. },
  12. mounted() {
  13. // 非V3模式
  14. if (this.$scope) {
  15. this.$scope.globalData.token = this.$store.state.vuex_token;
  16. } else {
  17. // V3模式
  18. getApp({ allowDefault: true }).globalData.token = this.$store.state.vuex_token;
  19. }
  20. this.$config('init');
  21. },
  22. onLaunch: function() {
  23. console.log('App launch')
  24. },
  25. onShow: function() {
  26. console.log('App Show')
  27. },
  28. onHide: function() {
  29. console.log('App Hide')
  30. },
  31. }
  32. </script>
  33. <style lang="scss">
  34. @import "./static/iconfont/iconfont.css";
  35. @import "uview-ui/index.scss";
  36. /*每个页面公共css */
  37. page {
  38. width: 100%;
  39. min-height: 100%;
  40. display: flex;
  41. background-color: #F8F8F8;
  42. }
  43. /* 登录页是否记住密码多选框样式 */
  44. uni-checkbox.login-form-checkbox .uni-checkbox-input{
  45. width: 24upx !important;
  46. height: 24upx !important;
  47. }
  48. .status_bar {
  49. height: var(--status-bar-height);
  50. width: 100%;
  51. }
  52. .isIPXup{
  53. padding-bottom: 64rpx !important;
  54. }
  55. /* form表单样式 */
  56. .form-box{
  57. background-color: #fff;
  58. padding: 0 30rpx;
  59. }
  60. .form-input {
  61. font-size: 28rpx;
  62. color: #333;
  63. text-align: right;
  64. width: 95%;
  65. box-sizing: border-box;
  66. height: 60rpx;
  67. line-height: 60rpx;
  68. &.textarea{
  69. height: 240rpx;
  70. padding: 24rpx 0;
  71. text-align: left;
  72. }
  73. }
  74. .form-input-placeholder {
  75. font-size: 28rpx;
  76. color: #999;
  77. }
  78. .form-textarea{
  79. height: 240rpx;
  80. padding: 24rpx 0;
  81. text-align: left;
  82. }
  83. .form-number-input{
  84. margin: 0 auto;
  85. }
  86. .u-required{
  87. position: relative;
  88. }
  89. .u-required:before{
  90. content: '*';
  91. position: absolute;
  92. left: -8px;
  93. top: 10upx;
  94. font-size: 14px;
  95. color: #fa3534;
  96. height: 9px;
  97. line-height: 1;
  98. }
  99. /* 元素宽度 百分比 */
  100. .uni-col-1{
  101. box-sizing: border-box;
  102. width: 10%;
  103. }
  104. .uni-col-2{
  105. box-sizing: border-box;
  106. width: 20%;
  107. }
  108. .uni-col-3{
  109. box-sizing: border-box;
  110. width: 30%;
  111. }
  112. .uni-col-4{
  113. box-sizing: border-box;
  114. width: 40%;
  115. }
  116. .uni-col-5{
  117. box-sizing: border-box;
  118. width: 50%;
  119. }
  120. .uni-col-6{
  121. box-sizing: border-box;
  122. width: 60%;
  123. }
  124. .uni-col-7{
  125. box-sizing: border-box;
  126. width: 70%;
  127. }
  128. .uni-col-8{
  129. box-sizing: border-box;
  130. width: 80%;
  131. }
  132. .uni-col-9{
  133. box-sizing: border-box;
  134. width: 90%;
  135. }
  136. .uni-col-10{
  137. box-sizing: border-box;
  138. width: 100%;
  139. }
  140. /* felx布局 */
  141. .flex{
  142. display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
  143. display: -moz-flex; /* Firefox 18+ */
  144. display: -ms-flexbox; /* IE 10 */
  145. display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
  146. }
  147. /*伸缩流方向*/
  148. .flex_column{
  149. -webkit-box-orient: vertical;
  150. -ms-flex-direction: column;
  151. -webkit-flex-direction: column;
  152. flex-direction: column;
  153. }
  154. /*主轴对齐*/
  155. .justify_center{
  156. -webkit-box-pack: center;
  157. -ms-flex-pack: center;
  158. -webkit-justify-content: center;
  159. justify-content: center;
  160. }
  161. .justify_end{
  162. -webkit-box-pack: end;
  163. -ms-flex-pack: end;
  164. -webkit-justify-content: flex-end;
  165. justify-content: flex-end;
  166. }
  167. .justify_between{
  168. -webkit-box-pack: justify;
  169. -ms-flex-pack: justify;
  170. -webkit-justify-content: space-between;
  171. justify-content: space-between;
  172. }
  173. /*侧轴对齐*/
  174. .align_start{
  175. -webkit-box-align: start;
  176. -ms-flex-align: start;
  177. -webkit-align-items: flex-start;
  178. align-items: flex-start;
  179. }
  180. .align_end{
  181. -webkit-box-align: end;
  182. -ms-flex-align: end;
  183. -webkit-align-items: flex-end;
  184. align-items: flex-end;
  185. }
  186. .align_center{
  187. -webkit-box-align: center;
  188. -ms-flex-align: center;
  189. -webkit-align-items: center;
  190. align-items: center;
  191. }
  192. .align_baseline{
  193. -webkit-box-align: baseline;
  194. -ms-flex-align: baseline;
  195. -webkit-align-items: baseline;
  196. align-items: baseline;
  197. }
  198. /*伸缩性*/
  199. .flex_auto{
  200. -webkit-box-flex: 1;
  201. -ms-flex: auto;
  202. -webkit-flex: auto;
  203. flex: auto;
  204. }
  205. .flex_1{
  206. -webkit-box-flex: 1;
  207. -ms-flex: 1;
  208. -webkit-flex: 1;
  209. flex: 1;
  210. }
  211. </style>