uni.scss 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. $app-base-bg: #F2F2F2; // app 页面背景色
  2. $app-base-color: #F76454; // app 主题颜色
  3. $app-sec-text-color: #999999; // app 次要文字颜色
  4. $app-main-text-color: #333333; // app 主题文字颜色
  5. $app-tabbar-height: 98rpx; // app tabbar高度
  6. $app-nav-height: 128rpx; // app 导航栏高度
  7. $app-item-height: 90rpx; // app 功能列表项高度
  8. $app-item-line-height: 2rpx; // app 功能列表项分割线高度
  9. $app-item-padding-width: 30rpx; // app 功能列表项左右空白宽度
  10. @import 'uview-ui/theme.scss';
  11. @mixin page {
  12. height: 100%;
  13. box-sizing: border-box;
  14. flex-direction: column;
  15. background: $app-base-bg;
  16. // border-top: $app-nav-height solid #FFFFFF;
  17. .content {
  18. flex: 1;
  19. height: 100%;
  20. position: relative;
  21. box-sizing: border-box;
  22. }
  23. }
  24. @mixin flex($c: row) {
  25. display: flex;
  26. align-items: center;
  27. justify-content: center;
  28. flex-direction: $c;
  29. }
  30. .app-item { // app 列表项样式
  31. @include flex();
  32. font-size: 32rpx;
  33. position: relative;
  34. background: #FFFFFF;
  35. box-sizing: border-box;
  36. min-height: $app-item-height;
  37. justify-content: space-between;
  38. padding: 0 $app-item-padding-width;
  39. margin-bottom: $app-item-line-height;
  40. &.item-space {
  41. margin-top: 10rpx;
  42. }
  43. input, picker, textarea {
  44. height: 100%;
  45. width: 521rpx;
  46. font-size: 26rpx;
  47. text-align: left;
  48. color: $app-sec-text-color;
  49. }
  50. }
  51. .kingkong { // 金刚区 样式
  52. height: 346rpx;
  53. margin-top: 10rpx;
  54. navigator {
  55. width: 25%;
  56. height: 50%;
  57. float: left;
  58. display: flex;
  59. align-items: center;
  60. flex-direction: column;
  61. image {
  62. width: 88rpx;
  63. height: 88rpx;
  64. margin-top: 30rpx;
  65. border-radius: 50%;
  66. }
  67. text {
  68. font-size: 32rpx;
  69. margin-top: 12rpx;
  70. }
  71. }
  72. }
  73. .big-btn { // 大按钮样式(镂空)
  74. @include flex();
  75. width: 630rpx;
  76. height: 88rpx;
  77. font-size: 34rpx;
  78. margin: 88rpx auto 0;
  79. border-radius: 44rpx;
  80. color: $app-base-color;
  81. border:2px solid $app-base-color;
  82. &.bg { // 背景
  83. color: #FFFFFF;
  84. background: $app-base-color;
  85. }
  86. }
  87. .small-btn { // 小按钮样式(镂空)
  88. @include flex();
  89. padding: 0 14rpx;
  90. font-size: 26rpx;
  91. margin-left: 10rpx;
  92. color: $app-base-color;
  93. height: 48rpx!important;
  94. min-width: 106rpx!important;
  95. border: 2rpx solid $app-base-color;
  96. &.dank { // 小按钮 (灰色)
  97. color: $app-sec-text-color;
  98. border-color: $app-sec-text-color;
  99. }
  100. }
  101. .login-btn { // 登录按钮
  102. flex: 1;
  103. width: 100%;
  104. height: 100%;
  105. background: #FFFFFF;
  106. navigator {
  107. @include flex();
  108. top: 50%;
  109. left: 50%;
  110. width: 400rpx;
  111. height: 88rpx;
  112. color: #FFFFFF;
  113. position: fixed;
  114. font-size: 32rpx;
  115. border-radius: 10rpx;
  116. background: $app-base-color;
  117. transform: translate(-50%, -50%);
  118. }
  119. }
  120. .ellipsis { // 文字溢出打点换行
  121. overflow: hidden;
  122. white-space: nowrap;
  123. text-overflow: ellipsis;
  124. }
  125. .icon-right { // 图标右侧空出
  126. margin-right: 20rpx;
  127. }
  128. .border-right { // 右边框
  129. border-right: 1rpx solid $app-base-bg;
  130. }
  131. .level-name {
  132. @include flex();
  133. width: 130rpx;
  134. height: 36rpx;
  135. color: #FFFFFF;
  136. font-size: 16rpx!important;
  137. border-radius: 18rpx;
  138. background: $app-base-color;
  139. .cuIcon-crownfill {
  140. margin-right: 6rpx;
  141. }
  142. }
  143. .position-center { // 水平垂直居中
  144. left: 50%;
  145. top: 50%;
  146. position: absolute;
  147. transform: translate(-50%, -50%);
  148. }
  149. .data-card { // 数据卡片样式
  150. @include flex();
  151. width: 100%;
  152. height: 336rpx;
  153. position: relative;
  154. background: $app-base-bg;
  155. image {
  156. z-index: 0;
  157. width: 706rpx;
  158. height: 316rpx;
  159. }
  160. .data-card-text {
  161. width: 100%;
  162. height: 100%;
  163. @include flex(column);
  164. .text {
  165. color: #FFFFFF;
  166. font-size: 32rpx;
  167. }
  168. .num {
  169. color: #FFFFFF;
  170. font-size: 70rpx;
  171. margin-top: 60rpx;
  172. }
  173. }
  174. }
  175. .basecolor { // 文字 主题色
  176. color: $app-base-color
  177. }
  178. .swiper-nav { // 滑动切换导航
  179. @include flex();
  180. width: 100%;
  181. height: 84rpx;
  182. color: #666666;
  183. font-size: 32rpx;
  184. position: relative;
  185. background: #FFFFFF;
  186. box-sizing: border-box;
  187. border-bottom: 1rpx solid $app-base-bg;
  188. .item {
  189. @include flex();
  190. flex: 1;
  191. height: 100%;
  192. &.active {
  193. color: $app-base-color;
  194. }
  195. }
  196. .moveBar {
  197. @include flex();
  198. bottom: 0;
  199. height: 6rpx;
  200. position: absolute;
  201. > text {
  202. width: 100%;
  203. height: 100%;
  204. border-radius: 3rpx;
  205. background: $app-base-color;
  206. }
  207. }
  208. }
  209. .swiper-area { // 滑动切换内容
  210. flex: 1;
  211. width: 100%;
  212. swiper {
  213. width: 100%;
  214. height: 100%;
  215. }
  216. }
  217. .article-header { // 文章发布人信息
  218. @include flex();
  219. height: 120rpx;
  220. justify-content: space-between;
  221. border-bottom: 1rpx solid $app-base-bg;
  222. .head-pic {
  223. width: 80rpx;
  224. height: 80rpx;
  225. border-radius: 50%;
  226. }
  227. .name {
  228. @include flex();
  229. flex: 1;
  230. height: 100%;
  231. margin-left: 20rpx;
  232. justify-content: flex-start;
  233. .identity {
  234. @include flex();
  235. width: 56rpx;
  236. height: 28rpx;
  237. color: #FFFFFF;
  238. font-size: 20rpx;
  239. margin-left: 20rpx;
  240. border-radius: 8rpx;
  241. background: $app-base-color;
  242. }
  243. }
  244. .time {
  245. font-size: 24rpx;
  246. color: #999999;
  247. &.justnow {
  248. color: $app-base-color;
  249. }
  250. }
  251. }
  252. .article-footer { // 文章点赞收藏转发
  253. @include flex();
  254. height: 90rpx;
  255. border-top: 1rpx solid $app-base-bg;
  256. .footer-item {
  257. @include flex();
  258. flex: 1;
  259. height: 40rpx;
  260. &.center {
  261. border-left: 1rpx solid #CCCCCC;
  262. border-right: 1rpx solid #CCCCCC;
  263. }
  264. .icon-right {
  265. font-size: 40rpx;
  266. &.fill {
  267. color: $app-base-color;
  268. }
  269. }
  270. }
  271. }
  272. //店铺
  273. /*主题色及按钮渐变背景*/
  274. $base-color: #fb231f;
  275. $base-line-bg: linear-gradient(93deg, #ff232c 0%, #ff571b 100%);
  276. $gary-bg:#F9F9FB;
  277. /**
  278. * 这里是uni-app内置的常用样式变量
  279. *
  280. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  281. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  282. *
  283. */
  284. /**
  285. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  286. *
  287. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  288. */
  289. /* 颜色变量 */
  290. /* 行为相关颜色 */
  291. $uni-color-primary: #007aff;
  292. $uni-color-success: #4cd964;
  293. $uni-color-warning: #f0ad4e;
  294. $uni-color-error: #dd524d;
  295. /* 文字基本颜色 */
  296. $uni-text-color:#333;//基本色
  297. $uni-text-color-inverse:#fff;//反色
  298. $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
  299. $uni-text-color-placeholder: #808080;
  300. $uni-text-color-disable:#c0c0c0;
  301. /* 背景颜色 */
  302. $uni-bg-color:#ffffff;
  303. $uni-bg-color-grey:#f8f8f8;
  304. $uni-bg-color-hover:#f1f1f1;//点击状态颜色
  305. $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
  306. /* 边框颜色 */
  307. $uni-border-color:#c8c7cc;
  308. /* 尺寸变量 */
  309. /* 文字尺寸 */
  310. $uni-font-size-sm:24upx;
  311. $uni-font-size-base:28upx;
  312. $uni-font-size-lg:32upx;
  313. /* 图片尺寸 */
  314. $uni-img-size-sm:40upx;
  315. $uni-img-size-base:52upx;
  316. $uni-img-size-lg:80upx;
  317. /* Border Radius */
  318. $uni-border-radius-sm: 4upx;
  319. $uni-border-radius-base: 6upx;
  320. $uni-border-radius-lg: 12upx;
  321. $uni-border-radius-circle: 50%;
  322. /* 水平间距 */
  323. $uni-spacing-row-sm: 10px;
  324. $uni-spacing-row-base: 20upx;
  325. $uni-spacing-row-lg: 30upx;
  326. /* 垂直间距 */
  327. $uni-spacing-col-sm: 8upx;
  328. $uni-spacing-col-base: 16upx;
  329. $uni-spacing-col-lg: 24upx;
  330. /* 透明度 */
  331. $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
  332. /* 文章场景相关 */
  333. $uni-color-title: #2C405A; // 文章标题颜色
  334. $uni-font-size-title:40upx;
  335. $uni-color-subtitle: #555555; // 二级标题颜色
  336. $uni-font-size-subtitle:36upx;
  337. $uni-color-paragraph: #3F536E; // 文章段落颜色
  338. $uni-font-size-paragraph:30upx;