uni.scss 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. /**
  2. * 这里是uni-app内置的常用样式变量
  3. *
  4. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  5. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  6. *
  7. */
  8. /**
  9. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  10. *
  11. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  12. */
  13. /* 颜色变量 */
  14. @import '@/uni_modules/uview-ui/theme.scss';
  15. /* 行为相关颜色 */
  16. $uni-color-primary: #00A447;
  17. $uni-color-success: #4cd964;
  18. $uni-color-warning: #f0ad4e;
  19. $uni-color-error: #dd524d;
  20. /* 文字基本颜色 */
  21. $uni-text-color:#333;//基本色
  22. $uni-text-color-inverse:#fff;//反色
  23. $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
  24. $uni-text-color-placeholder: #808080;
  25. $uni-text-color-disable:#c0c0c0;
  26. $uni-text-color-red:#FF3C3F;
  27. /* 背景颜色 */
  28. $uni-bg-color:#ffffff;
  29. $uni-bg-color-grey:#f8f8f8;
  30. $uni-bg-color-hover:#f1f1f1;//点击状态颜色
  31. $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
  32. $uni-background-color:#F5F5F5;
  33. /* 边框颜色 */
  34. $uni-border-color:#eee;
  35. /* 尺寸变量 */
  36. /* 文字尺寸 */
  37. $uni-font-size-sm:12px;
  38. $uni-font-size-base:14px;
  39. $uni-font-size-lg:16;
  40. /* 图片尺寸 */
  41. $uni-img-size-sm:20px;
  42. $uni-img-size-base:26px;
  43. $uni-img-size-lg:40px;
  44. /* Border Radius */
  45. $uni-border-radius-sm: 2px;
  46. $uni-border-radius-base: 3px;
  47. $uni-border-radius-lg: 6px;
  48. $uni-border-radius-circle: 50%;
  49. /* 水平间距 */
  50. $uni-spacing-row-sm: 5px;
  51. $uni-spacing-row-base: 10px;
  52. $uni-spacing-row-lg: 15px;
  53. /* 垂直间距 */
  54. $uni-spacing-col-sm: 4px;
  55. $uni-spacing-col-base: 8px;
  56. $uni-spacing-col-lg: 12px;
  57. /* 透明度 */
  58. $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
  59. /* 文章场景相关 */
  60. $uni-color-title: #2C405A; // 文章标题颜色
  61. $uni-font-size-title:20px;
  62. $uni-color-subtitle: #555555; // 二级标题颜色
  63. $uni-font-size-subtitle:26px;
  64. $uni-color-paragraph: #3F536E; // 文章段落颜色
  65. $uni-font-size-paragraph:15px;
  66. page{
  67. padding-top: 0;
  68. // &:has(.u-navbar){
  69. // padding-top: 104px;
  70. // }
  71. }
  72. // @import url("@/static/css/flex.scss");
  73. .u-flex {
  74. display: flex;
  75. flex-direction: row;
  76. align-items: center;
  77. }
  78. .u-flex-wrap {
  79. flex-wrap: wrap;
  80. }
  81. .u-flex-nowrap {
  82. flex-wrap: nowrap;
  83. }
  84. .u-col-center {
  85. align-items: center;
  86. }
  87. .u-col-top {
  88. align-items: flex-start;
  89. }
  90. .u-col-bottom {
  91. align-items: flex-end;
  92. }
  93. .u-row-center {
  94. justify-content: center;
  95. }
  96. .u-row-left {
  97. justify-content: flex-start;
  98. }
  99. .u-row-right {
  100. justify-content: flex-end;
  101. }
  102. .u-row-between {
  103. justify-content: space-between;
  104. }
  105. .u-row-around {
  106. justify-content: space-around;
  107. }
  108. .u-text-left {
  109. text-align: left;
  110. }
  111. .u-text-center {
  112. text-align: center;
  113. }
  114. .u-text-right {
  115. text-align: right;
  116. }
  117. .u-flex-col {
  118. /* #ifndef APP-NVUE */
  119. display: flex;
  120. /* #endif */
  121. flex-direction: column;
  122. }
  123. // 定义flex等分
  124. @for $i from 0 through 12 {
  125. .u-flex-#{$i} {
  126. flex: $i;
  127. }
  128. }
  129. @mixin multi-ellipsis($line: 1) {
  130. @if $line <= 0 {
  131. $line: 1;
  132. }
  133. overflow: hidden;
  134. text-overflow: ellipsis;
  135. display: -webkit-box;
  136. -webkit-line-clamp: $line;
  137. -webkit-box-orient: vertical;
  138. }
  139. .ellipsis-1 {
  140. @include multi-ellipsis(1);
  141. }
  142. .ellipsis-2 {
  143. @include multi-ellipsis(2);
  144. }
  145. .product{
  146. padding-bottom: 30rpx;
  147. padding-right: 20rpx;
  148. margin-bottom: 30rpx;
  149. border-bottom: 1px solid $uni-border-color;
  150. .text{
  151. flex: 1;
  152. margin-left: 50rpx;
  153. .name{
  154. height: 76rpx;
  155. font-size: 30rpx;
  156. font-weight: 600;
  157. color: #333;
  158. line-height: 38rpx;
  159. margin-bottom: 16rpx;
  160. }
  161. .price{
  162. color: $uni-text-color-red;
  163. font-family: PingFangSC-Regular, PingFang SC;
  164. }
  165. .price-num{
  166. font-size: 40rpx;
  167. font-weight: bold;
  168. margin-left: 2px;
  169. }
  170. .price-type{
  171. color: #FF3C3F;
  172. font-size: 22rpx;
  173. margin-left: 20rpx;
  174. }
  175. .original-price{
  176. }
  177. .sales{
  178. &:not(:first-of-type){
  179. margin-left: 30rpx;
  180. }
  181. }
  182. .discount{
  183. padding: 4rpx 14rpx;
  184. border: 1px solid #FF3C3F;
  185. border-radius: 2px;
  186. color: #FF3C3F;
  187. margin-right: 50rpx;
  188. }
  189. .up{
  190. margin-bottom: 10rpx;
  191. }
  192. .down{
  193. font-size: 20rpx;
  194. }
  195. }
  196. }
  197. .product.small-product{
  198. .text{
  199. margin-left: 30rpx;
  200. .name{font-size: 26rpx}
  201. .price-num{font-size: 30rpx}
  202. .discount{margin-right: 5px}
  203. }
  204. }
  205. .icon-nav{
  206. margin-bottom: 45rpx;
  207. .u-image{
  208. margin-bottom: 15rpx;
  209. }
  210. .nav-item{
  211. text-align: center;
  212. font-size: 22rpx;
  213. color: #666;
  214. }
  215. }
  216. .half-product{
  217. &-item{
  218. background-color: #fff;
  219. margin-bottom: 30rpx;
  220. width: 48%;
  221. .down{
  222. padding: 20rpx;
  223. .name{
  224. font-size: 30rpx;
  225. line-height: 42rpx;
  226. color: #333;
  227. margin-bottom: 10rpx;
  228. }
  229. .price-num{font-size: 40rpx;margin-left: 10rpx}
  230. }
  231. }
  232. &-item:nth-child(even){
  233. margin-left: 10rpx;
  234. }
  235. }
  236. .product-list-v2{
  237. .product-wrap{
  238. }
  239. .product-v2{
  240. width: calc( (100% - 22rpx )/2 );
  241. margin-bottom: 22rpx;
  242. border: 1rpx solid #EEEEEE;
  243. box-sizing: border-box;
  244. .name{
  245. padding: 0 20rpx;
  246. height: 76rpx;
  247. font-size: 30rpx;
  248. font-weight: 400;
  249. color: #333333;
  250. line-height: 38rpx;
  251. margin-top: 20rpx;
  252. margin-bottom: 16rpx;
  253. }
  254. .price{
  255. padding: 0 20rpx;
  256. margin-bottom: 20rpx;
  257. font-size: 20rpx;
  258. font-weight: 600;
  259. color: #00A447;
  260. font-family: PingFangSC-Regular, PingFang SC;
  261. .price-num{
  262. font-size: 30rpx;
  263. font-weight: 600;
  264. margin-left: 5rpx;
  265. }
  266. .gray{
  267. font-size: 22rpx;
  268. font-weight: 400;
  269. color: #999999;
  270. }
  271. .price-type{
  272. font-size: 20rpx;
  273. font-family: PingFangSC-Regular, PingFang SC;
  274. font-weight: 400;
  275. color: #FFFFFF;
  276. line-height: 28rpx;
  277. padding: 0 9rpx;
  278. background: #D6996C;
  279. border-radius: 6rpx;
  280. margin-left: 20rpx;
  281. }
  282. }
  283. }
  284. }
  285. .tabs-wrap{
  286. margin-bottom: 30rpx;
  287. .more{
  288. font-size: 24rpx;
  289. color: #999;
  290. }
  291. }
  292. .news{
  293. .news-item{
  294. padding-bottom: 30rpx;
  295. margin-bottom: 30rpx;
  296. .text{
  297. flex: 1;
  298. margin-left: 20rpx;
  299. .til{
  300. font-size: 30rpx;
  301. color: #333;
  302. line-height: 1.5;
  303. font-weight: 600;
  304. margin-bottom: 17rpx;
  305. }
  306. // .time{
  307. // text-align: left;
  308. // color: #999;
  309. // font-size: 24rpx;
  310. // }
  311. .info{
  312. color: #999;
  313. font-size: 24rpx;
  314. }
  315. }
  316. }
  317. }
  318. .page-bg{
  319. position: absolute;
  320. z-index: -1;
  321. left: 0;
  322. top: 0;
  323. right: 0;
  324. .img{
  325. width: 100%;
  326. }
  327. }
  328. .activity-list{
  329. .activity-item{
  330. margin-bottom: 24rpx;
  331. .title{
  332. font-size: 30rpx;
  333. font-weight: 400;
  334. color: #333333;
  335. line-height: 42rpx;
  336. margin-bottom: 7rpx;
  337. margin-top: 20rpx;
  338. }
  339. .time{
  340. font-size: 26rpx;
  341. font-weight: 400;
  342. color: #999999;
  343. line-height: 37rpx;
  344. }
  345. }
  346. }
  347. .pickup-info{
  348. padding: 0 30rpx;
  349. .item{
  350. padding: 30rpx 0;
  351. font-size: 30rpx;
  352. font-weight: 400;
  353. color: #333333;
  354. line-height: 42rpx;
  355. &:not(:last-of-type){
  356. border-bottom: 1px solid #eee;
  357. }
  358. }
  359. }