components.scss 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. /******************** 这里放组件样式 ********************/
  2. /***** view *****/
  3. view{box-sizing: border-box;}
  4. /***** 对齐方式 *****/
  5. .ezy-tl{text-align: left;}
  6. .ezy-tc{text-align: center;}
  7. .ezy-tr{text-align: right;}
  8. /***** 状态栏 *****/
  9. .phone-status-bar{height: var(--status-bar-height);width: 100%;}
  10. /***** 超出省略 *****/
  11. // 文本超出省略号显示 (一行)
  12. @mixin single-line-ellipsis() {text-overflow: ellipsis;overflow: hidden;word-wrap: break-word;white-space: nowrap;word-break: break-all;}
  13. // 文本超出省略号显示 (多行)
  14. @mixin multi-line-ellipsis($rows: 3){-webkit-line-clamp:$rows;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;word-wrap: break-word;display: -webkit-box;white-space: normal !important;-webkit-box-orient: vertical;}
  15. /***** 页面背景图 *****/
  16. // no-repeat cover
  17. @mixin ezy-no-repeat-cover($position: center) {
  18. background-position: $position;background-size: cover;background-repeat: no-repeat;
  19. }
  20. // no-repeat contain
  21. @mixin ezy-no-repeat-contain($position: center) {
  22. background-position: $position;background-size: contain;background-repeat: no-repeat;
  23. }
  24. /***** tabbar *****/
  25. .phone-custom-tabbar{
  26. width: 100%;height: 130rpx;background-color: #fff;border-top: 1rpx solid #e5e4e4;z-index: 9;
  27. position: fixed;left: var(-window-left);right: var(-window right);bottom: var(--window-bottom);
  28. box-sizing: border-box;padding-bottom: env(safe-area-inset-bottom);display: flex;justify-content: space-around;align-items: center;
  29. .tabbar-item{text-align: center;width: 160rpx;}
  30. .tabbar-item-icon{width: 50rpx;height: 50rpx;display: block;@include ezy-no-repeat-cover();margin: 0 auto 8rpx;}
  31. .tabbar-item-text{font-size: 28rpx;color: #333;}
  32. }
  33. /***** list列表滚动 *****/
  34. .phone-scroll-view{
  35. .uni-load-more{margin-bottom:var(--status-bar-height);}
  36. }
  37. /***** 富文本处理 *****/
  38. @mixin ezy-rich-text() {
  39. div,p,span{margin: 0;padding: 0;}
  40. img{max-width: 100%;}
  41. }
  42. /***** 按钮 *****/
  43. // 按钮
  44. .phone-green-btn[type='default']{background-color: #3fd2a1;color: #fff;}
  45. .phone-white-btn[type='default']{background-color: #fff;color: #3fd2a1;border: 1rpx solid #3fd2a1;}
  46. .phone-white-btn[type='default']:after{display: none;}
  47. .phone-green-btn[type='default']:hover{background-color: #34c595;color: #fff;}
  48. /***** 标题栏 *****/
  49. // 三个元素
  50. .phone-navBar-box{
  51. display: flex;align-items: center;justify-content: space-between;background-color: #fff;
  52. padding: var(--status-bar-height) 20rpx 20rpx;box-sizing: border-box;position: relative;
  53. .nav-bar-icon{
  54. width: 24rpx;height: 38rpx;
  55. background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
  56. }
  57. .nav-bar-title{font-size: 36rpx;color: #333;}
  58. // 考试数字
  59. .nav-bar-other{
  60. font-size: 30rpx;color: #fff;margin-right: 2%;
  61. .key-note{color: #ffff01;}
  62. }
  63. // 文字按钮
  64. .text-btn{font-size: 26rpx;color: #666;padding-top: 4rpx;box-sizing: border-box;}
  65. }
  66. // 两个元素
  67. .icon-title-navBar-box,.icon-title-bjcolor-navBar-box{
  68. display: flex;align-items: center;justify-content: center;background-color: #fff;
  69. padding: var(--status-bar-height) 20rpx 20rpx;box-sizing: border-box;position: relative;
  70. .nav-bar-title{
  71. font-size: 36rpx;height: 63rpx;line-height: 63rpx;color: #333;max-width: 70%;
  72. }
  73. .nav-bar-icon{
  74. width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: calc(12rpx + var(--status-bar-height));;
  75. background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
  76. }
  77. }
  78. // 带背景色
  79. .icon-title-bjcolor-navBar-box{
  80. background-color: #3fd2a1;
  81. .nav-bar-title{color: #fff;}
  82. .nav-bar-icon{background-image: url("@/static/images/common/nav-white-bar-jt.svg");}
  83. }
  84. // 仅一个返回按钮
  85. .phone-nav-bar-icon{width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: var(--status-bar-height);
  86. background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
  87. }
  88. /***** 查询框 *****/
  89. .phone-search-box{
  90. width: 100%;height: 110rpx;background-color:#f4f6fa;
  91. padding: 20rpx 42rpx;box-sizing: border-box;
  92. position: relative;
  93. .search-input {
  94. height: 70rpx;line-height: 70rpx;font-size: 28rpx;background-color:#fff;
  95. border-radius: 35rpx;padding: 0 70rpx 0 20rpx;
  96. }
  97. .uni-input-placeholder{color:#a4a4a4;}
  98. .search-icon {
  99. width: 100rpx;height: 60rpx;line-height: 60rpx;text-align: center;
  100. position: absolute;right: 52rpx;top: 25rpx;
  101. background-color: #3fd2a1;
  102. border-radius: 40rpx;
  103. }
  104. }
  105. // 前面带线的标题
  106. .phone-line-title {display: block;color: #333;font-size: 36rpx;line-height: 1;}
  107. .phone-line-title:before{content: ' ';width: 4rpx;height: 36rpx;background-color:#3fd2a1;
  108. margin-right: 18rpx;display: inline-block;vertical-align: middle;}
  109. /***** 试题---题干 *****/
  110. .phone-shiti-question{
  111. font-size: 32rpx;color: #333;line-height: 1.6;margin-bottom: 24rpx;
  112. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;@include ezy-rich-text;
  113. display: flex;flex-direction: row;justify-content: flex-start;
  114. }
  115. /***** 单选题 *****/
  116. .phone-danxuan-box{
  117. margin: 0 10rpx;overflow: auto;height: calc(100vh - 420rpx - var(--status-bar-height));
  118. .danxuan-option-box{
  119. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  120. font-size: 32rpx;color: #666;box-sizing: border-box;padding: 10rpx 24rpx;
  121. display: flex;
  122. .option-change{
  123. width: 48rpx;height: 48rpx;line-height: 48rpx;box-sizing: border-box;
  124. flex-shrink: 0;border-radius: 50%;border: 1rpx solid;margin-right: 16rpx;
  125. display: flex;align-items: center;justify-content: center;
  126. }
  127. .option-question{font-size: 32rpx;line-height: 1.6;margin-left: 6rpx;@include ezy-rich-text;
  128. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;}
  129. }
  130. .danxuan-option-box.active .option-change{color: #FFF;background-color:#cbcbcb;border-color:#cbcbcb;}
  131. .danxuan-option-box.showError .option-change{color: #FFF;background-color:#ff5757;border-color:#ff5757;}
  132. .danxuan-option-box.active_right .option-change{color: #FFF;background-color:#1ac136;border-color:#1ac136;}
  133. }
  134. /***** 判断题 *****/
  135. .phone-duoxuan-box{
  136. margin: 0 10rpx;
  137. .duoxuan-option-box{
  138. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  139. font-size: 32rpx;color: #666;box-sizing: border-box;padding: 10rpx 24rpx;
  140. display: flex;
  141. .option-change{
  142. width: 48rpx;height: 48rpx;line-height: 48rpx;box-sizing: border-box;
  143. flex-shrink: 0;border-radius: 50%;border: 1rpx solid;margin-right: 16rpx;
  144. display: flex;align-items: center;justify-content: center;
  145. }
  146. .option-question{font-size: 32rpx;line-height: 1.6;margin-left: 6rpx;@include ezy-rich-text;
  147. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;}
  148. }
  149. // active background-color:#0589e9;
  150. .duoxuan-option-box.active .option-change{color: #FFF;background-color:#cbcbcb;border-color:#cbcbcb;}
  151. .duoxuan-option-box.showError .option-change{color: #FFF;background-color:#ff5757;border-color:#ff5757;}
  152. .duoxuan-option-box.active_right .option-change{color: #FFF;background-color:#1ac136;border-color:#1ac136;}
  153. }
  154. /***** 判断题 *****/
  155. .phone-panduan-box{
  156. margin: 0 10rpx;
  157. .panduan-option-box{
  158. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  159. font-size: 32rpx;color: #666;box-sizing: border-box;padding: 10rpx 24rpx;
  160. .option-question{font-size: 32rpx;line-height: 1.6;margin-left: 16rpx;margin-bottom: 24rpx;
  161. text-align: justify;word-wrap: break-word;word-break: break-all;display: flex;
  162. .uni-radio-input{margin-right: 20rpx;}
  163. }
  164. }
  165. // active background-color:#0589e9;
  166. .option-question.active .uni-radio-input{color: #FFF;background-color:#cbcbcb!important;border-color:#cbcbcb!important;}
  167. .option-question.showError .uni-radio-input{color: #FFF;background-color:#ff5757!important;border-color:#ff5757!important;}
  168. .option-question.active_right .uni-radio-input{color: #FFF;background-color:#1ac136!important;border-color:#1ac136!important;}
  169. }
  170. /***** 填空题 *****/
  171. .phone-tiankong-box{
  172. .tiankong-option-box{
  173. padding:0 40rpx;box-sizing: border-box;margin-bottom: 36rpx;
  174. .option-question{font-size: 30rpx;color: #333;}
  175. .option-question-text{font-size: 30rpx;color: #333;margin-top: 16rpx;background: #f0f0f0;padding: 10px;border-radius: 4px;}
  176. }
  177. }
  178. /***** 考试须知 *****/
  179. .phone-ksxz-dialog{
  180. .uni-dialog-title{
  181. padding: 24rpx 0!important;font-size: 30rpx;border-bottom: 1px solid #f5f5f5;
  182. .uni-popup__info{color: #333!important;}
  183. }
  184. .uni-dialog-content{
  185. justify-content: flex-start!important;
  186. }
  187. .uni-dialog-button-text{color: #999!important;}
  188. .uni-dialog-button-text.uni-button-color{color: #3fd2a1!important;}
  189. .ksxz-content-box{
  190. font-size: 28rpx;color: #333;
  191. >view{margin-bottom: 12rpx;line-height: 1.6;}
  192. .ksms-row{margin-bottom: 12rpx;}
  193. .ksms-intro{color: #666;}
  194. }
  195. }