Ver código fonte

主题切换开发

lucky 2 anos atrás
pai
commit
a8a6ca032a
100 arquivos alterados com 64 adições e 28 exclusões
  1. 2 1
      dist/static/vant@2.12.23.min.css
  2. 20 5
      src/App.vue
  3. 10 0
      src/assets/css/_handle.scss
  4. 32 22
      src/assets/css/_themes.scss
  5. 0 0
      src/assets/images/active1/1/1.0@2x.jpg
  6. 0 0
      src/assets/images/active1/1/2.0@2x.jpg
  7. 0 0
      src/assets/images/active1/1/3.0@2x.jpg
  8. 0 0
      src/assets/images/active1/1/4.0@2x.jpg
  9. 0 0
      src/assets/images/active1/12.png
  10. 0 0
      src/assets/images/active1/cardNo.png
  11. 0 0
      src/assets/images/active1/delete/del-active.png
  12. 0 0
      src/assets/images/active1/delete/del.png
  13. 0 0
      src/assets/images/active1/delete/select.png
  14. 0 0
      src/assets/images/active1/footer.png
  15. 0 0
      src/assets/images/active1/goods/1/image10@2x.png
  16. 0 0
      src/assets/images/active1/goods/1/image11@2x.png
  17. 0 0
      src/assets/images/active1/goods/1/image12@2x.png
  18. 0 0
      src/assets/images/active1/goods/1/image13@2x.png
  19. 0 0
      src/assets/images/active1/goods/1/image14@2x.png
  20. 0 0
      src/assets/images/active1/goods/1/image15@2x.png
  21. 0 0
      src/assets/images/active1/goods/1/image16@2x.png
  22. 0 0
      src/assets/images/active1/goods/1/image1@2x.png
  23. 0 0
      src/assets/images/active1/goods/1/image2@2x.png
  24. 0 0
      src/assets/images/active1/goods/1/image3@2x.png
  25. 0 0
      src/assets/images/active1/goods/1/image4@2x.png
  26. 0 0
      src/assets/images/active1/goods/1/image5@2x.png
  27. 0 0
      src/assets/images/active1/goods/1/image6@2x.png
  28. 0 0
      src/assets/images/active1/goods/1/image7@2x.png
  29. 0 0
      src/assets/images/active1/goods/1/image8@2x.png
  30. 0 0
      src/assets/images/active1/goods/1/image9@2x.png
  31. 0 0
      src/assets/images/active1/goods/2/image10@2x.png
  32. 0 0
      src/assets/images/active1/goods/2/image11@2x.png
  33. 0 0
      src/assets/images/active1/goods/2/image12@2x.png
  34. 0 0
      src/assets/images/active1/goods/2/image13@2x.png
  35. 0 0
      src/assets/images/active1/goods/2/image14@2x.png
  36. 0 0
      src/assets/images/active1/goods/2/image15@2x.png
  37. 0 0
      src/assets/images/active1/goods/2/image16@2x.png
  38. 0 0
      src/assets/images/active1/goods/2/image17@2x.png
  39. 0 0
      src/assets/images/active1/goods/2/image18@2x.png
  40. 0 0
      src/assets/images/active1/goods/2/image19@2x.png
  41. 0 0
      src/assets/images/active1/goods/2/image1@2x.png
  42. 0 0
      src/assets/images/active1/goods/2/image20@2x.png
  43. 0 0
      src/assets/images/active1/goods/2/image21@2x.png
  44. 0 0
      src/assets/images/active1/goods/2/image22@2x.png
  45. 0 0
      src/assets/images/active1/goods/2/image23@2x.png
  46. 0 0
      src/assets/images/active1/goods/2/image2@2x.png
  47. 0 0
      src/assets/images/active1/goods/2/image3@2x.png
  48. 0 0
      src/assets/images/active1/goods/2/image4@2x.png
  49. 0 0
      src/assets/images/active1/goods/2/image5@2x.png
  50. 0 0
      src/assets/images/active1/goods/2/image6@2x.png
  51. 0 0
      src/assets/images/active1/goods/2/image7@2x.png
  52. 0 0
      src/assets/images/active1/goods/2/image8@2x.png
  53. 0 0
      src/assets/images/active1/goods/2/image9@2x.png
  54. 0 0
      src/assets/images/active1/home/12.png
  55. 0 0
      src/assets/images/active1/home/1745-active.png
  56. 0 0
      src/assets/images/active1/home/addr-null.png
  57. 0 0
      src/assets/images/active1/home/bgImg.png
  58. 0 0
      src/assets/images/active1/home/bottomBtn1.png
  59. 0 0
      src/assets/images/active1/home/bottomBtn2.png
  60. 0 0
      src/assets/images/active1/home/bottomBtn3.png
  61. 0 0
      src/assets/images/active1/home/centerUl/card.png
  62. 0 0
      src/assets/images/active1/home/centerUl/infro.png
  63. 0 0
      src/assets/images/active1/home/centerUl/rice.png
  64. 0 0
      src/assets/images/active1/home/detail/bag.png
  65. 0 0
      src/assets/images/active1/home/detail/box.png
  66. 0 0
      src/assets/images/active1/home/live-active.png
  67. 0 0
      src/assets/images/active1/home/live.png
  68. 0 0
      src/assets/images/active1/home/middle/camera.png
  69. 0 0
      src/assets/images/active1/home/middle/cardOne.png
  70. 0 0
      src/assets/images/active1/home/middle/cardTwo.png
  71. 0 0
      src/assets/images/active1/home/middle/freshRice.png
  72. 0 0
      src/assets/images/active1/home/middle/keepAlive.png
  73. 0 0
      src/assets/images/active1/home/middle/normalGrow.png
  74. 0 0
      src/assets/images/active1/home/middle/organic.png
  75. 0 0
      src/assets/images/active1/home/more.png
  76. 0 0
      src/assets/images/active1/home/my-active.png
  77. 0 0
      src/assets/images/active1/home/my.png
  78. 0 0
      src/assets/images/active1/home/paddy-bottom.png
  79. 0 0
      src/assets/images/active1/home/paddy-detail.png
  80. 0 0
      src/assets/images/active1/home/paddy-middle.png
  81. 0 0
      src/assets/images/active1/home/paddy-title.png
  82. 0 0
      src/assets/images/active1/home/paddy.png
  83. 0 0
      src/assets/images/active1/home/personal-active.png
  84. 0 0
      src/assets/images/active1/home/pic-1.png
  85. 0 0
      src/assets/images/active1/home/product-active.png
  86. 0 0
      src/assets/images/active1/home/product.png
  87. 0 0
      src/assets/images/active1/home/rice-active.png
  88. 0 0
      src/assets/images/active1/home/rice.png
  89. 0 0
      src/assets/images/active1/home/swipper/swipper1.png
  90. 0 0
      src/assets/images/active1/home/swipper/swipper2.png
  91. 0 0
      src/assets/images/active1/home/swipper/swipper3.png
  92. 0 0
      src/assets/images/active1/introduce/1/1.0@2x.png
  93. 0 0
      src/assets/images/active1/introduce/1/2.0@2x.png
  94. 0 0
      src/assets/images/active1/introduce/1/3.0@2x.png
  95. 0 0
      src/assets/images/active1/introduce/1/4.0@2x.png
  96. 0 0
      src/assets/images/active1/introduce/1/5.0@2x.png
  97. 0 0
      src/assets/images/active1/introduce/2/1.0@2x.png
  98. 0 0
      src/assets/images/active1/introduce/2/2.0@2x.png
  99. 0 0
      src/assets/images/active1/introduce/2/3.0@2x.png
  100. 0 0
      src/assets/images/active1/introduce/3/1.0@2x.png

+ 2 - 1
dist/static/vant@2.12.23.min.css

@@ -1774,7 +1774,8 @@ ul {
     -webkit-box-align: center;
     -webkit-align-items: center;
     align-items: center;
-    height: 46px
+    height: 46px;
+    
 }
 
 .van-nav-bar__arrow {

+ 20 - 5
src/App.vue

@@ -14,12 +14,15 @@ export default {
     }
   },
   mounted() {
+    this.theme('light')
+      // this.theme('dark')
+    
   },
   methods: {
     theme(type) {
 
       // this.$store.commit('upDate', {themeType: type});
-
+      localStorage.setItem("type",type)
       window.document.documentElement.setAttribute( "data-theme", type );
 
       }
@@ -28,15 +31,30 @@ export default {
 </script>
 <style lang="scss">
 @import "./assets/css/index.css";
+@import "./assets/css/_handle.scss";
 .aaa,.bbb{
   position: fixed;
   top: 0;
   padding: 20px;
   background: red;
   z-index: 999;
+  // display: none;
 }
 .bbb{
   right: 0;
+}
+ .van-nav-bar__content {
+            // background: linear-gradient(0deg, #fafafa 0%, #f3d028 100%);
+            // background: #111;
+  @include background("bd_head");
+  .van-nav-bar__title.van-ellipsis{
+    @include font_color("font_van-nav-bar__title");
+
+  }
+  .van-icon{
+    @include font_color("font_van-nav-bar__title");
+
+  }
 }
 @mixin layout-dev {
   position: fixed;
@@ -92,10 +110,7 @@ html {
           height: auto;
         }
         .van-nav-bar-my-fixed {
-          .van-nav-bar__content {
-            // background: linear-gradient(0deg, #fafafa 0%, #f3d028 100%);
-            background-color: #111;
-          }
+         
         }
         .van-tabbar--fixed {
           z-index: 999999;

+ 10 - 0
src/assets/css/_handle.scss

@@ -41,6 +41,16 @@ $theme-map: $theme-map !global;
     
     }
 }
+//padding
+
+@mixin pd($color) {
+
+    @include themeify {
+    
+        padding: themed($color)!important;
+    
+    }
+}
 //渐变文字
 
 @mixin bgTextClip($color) {

+ 32 - 22
src/assets/css/_themes.scss

@@ -6,11 +6,7 @@
 
 //注意一点是,每套配色方案里的key可以自定义但必须一致,不然就会混乱
 
-$themes: (
-    
-    light: ( 
-
-        //边框
+$themes: (light: ( //边框
         border_color1: #3d414a,
         //底部导航--------------------------------------
         //文字
@@ -19,18 +15,28 @@ $themes: (
         // //背景
         bd_tb_j:#111111,
         //------------------------------------------------
-      
+        
+        //头部导航--------------------------------------
+        //文字
+        font_van-nav-bar__title: #DAAD70,
+        // font_tb_d: #f4d022,
+        // //背景
+        bd_head:#111111,
+        //------------------------------------------------
+
         //home/paddy首页-------------------------------------
         //字体
         font_centerBtn-p: #dab082,
         font_detail_p: #daad70,
+        //padding
+        pd_paddy_top: none,
         //背景图大小
         background_size:100% 100%,
         //渐变色文字
         bgTextClip:text,
         //背景
         background_paddy_top:none,
-        background_paddy: url("~@/assets/images/home/bgImg.png") no-repeat center,
+        background_paddy: url("~@/assets/images/active1/home/bgImg.png") no-repeat center,
         background_custom-indicator:#7c6d5b,
         background_indicator-active:#daad71,
         background_centerBtn-p:linear-gradient(-4deg,
@@ -61,7 +67,7 @@ $themes: (
 
 
         //------------------------------------------------
-        
+
         //home/my个人中心--------------------------------
         //文字
         font_my_cell_list:#8a8a8a,
@@ -75,10 +81,9 @@ $themes: (
 
     ),
 
-    dark: ( 
-         //边框
+    dark: ( //边框
 
-         border_color1: #3d414a,
+        border_color1: #3d414a,
         //底部导航--------------------------------------
         //文字
         font_tb_j: #b2812e,
@@ -86,11 +91,23 @@ $themes: (
         // //背景
         bd_tb_j:#ffffff,
         //------------------------------------------------
+        
+        //头部导航--------------------------------------
+        //文字
+        // font_van-nav-bar__title: #DAAD70,
+        font_van-nav-bar__title: #fff,
+        // font_tb_d: #f4d022,
+        // //背景
+        bd_head:#C42323,
+        //------------------------------------------------
+        
 
         //home/paddy首页-------------------------------------
         //字体
         font_centerBtn-p: #666666,
         font_detail_p: #0f0b06,
+        //padding
+        pd_paddy_top: 12px 16px 10px 16px,
         //背景图大小
         background_size:100% 100%,
         //背景
@@ -100,17 +117,11 @@ $themes: (
         background_indicator-active:#daad71,
         background_centerBtn-p:none,
         background_baozhuangBox-fd:#613c0c,
-        background_middle-li:linear-gradient(0deg,
-            #a2794d,
-            #ba9363,
-            #cba66f,
-            #d7b27a,
-            #e3c48a,
-            #e3d097),
+        background_middle-li:linear-gradient(0deg, #d5a15d 0%, #f0e09e 100%),
         background_lastP:#0f0b06,
         //-------------------------------------
 
-         //home/product兑换中心---------------------------------------
+        //home/product兑换中心---------------------------------------
         //文字
         font_product_footerBtn:#fff,
         //背景
@@ -128,7 +139,6 @@ $themes: (
         bd_my_cell_list:#f5f5f5,
 
         //----------------------------------------------
-       
 
-    )
-);
+
+    ));

+ 0 - 0
src/assets/images/1/1.0@2x.jpg → src/assets/images/active1/1/1.0@2x.jpg


+ 0 - 0
src/assets/images/1/2.0@2x.jpg → src/assets/images/active1/1/2.0@2x.jpg


+ 0 - 0
src/assets/images/1/3.0@2x.jpg → src/assets/images/active1/1/3.0@2x.jpg


+ 0 - 0
src/assets/images/1/4.0@2x.jpg → src/assets/images/active1/1/4.0@2x.jpg


+ 0 - 0
src/assets/images/12.png → src/assets/images/active1/12.png


+ 0 - 0
src/assets/images/cardNo.png → src/assets/images/active1/cardNo.png


+ 0 - 0
src/assets/images/delete/del-active.png → src/assets/images/active1/delete/del-active.png


+ 0 - 0
src/assets/images/delete/del.png → src/assets/images/active1/delete/del.png


+ 0 - 0
src/assets/images/delete/select.png → src/assets/images/active1/delete/select.png


+ 0 - 0
src/assets/images/footer.png → src/assets/images/active1/footer.png


+ 0 - 0
src/assets/images/goods/1/image10@2x.png → src/assets/images/active1/goods/1/image10@2x.png


+ 0 - 0
src/assets/images/goods/1/image11@2x.png → src/assets/images/active1/goods/1/image11@2x.png


+ 0 - 0
src/assets/images/goods/1/image12@2x.png → src/assets/images/active1/goods/1/image12@2x.png


+ 0 - 0
src/assets/images/goods/1/image13@2x.png → src/assets/images/active1/goods/1/image13@2x.png


+ 0 - 0
src/assets/images/goods/1/image14@2x.png → src/assets/images/active1/goods/1/image14@2x.png


+ 0 - 0
src/assets/images/goods/1/image15@2x.png → src/assets/images/active1/goods/1/image15@2x.png


+ 0 - 0
src/assets/images/goods/1/image16@2x.png → src/assets/images/active1/goods/1/image16@2x.png


+ 0 - 0
src/assets/images/goods/1/image1@2x.png → src/assets/images/active1/goods/1/image1@2x.png


+ 0 - 0
src/assets/images/goods/1/image2@2x.png → src/assets/images/active1/goods/1/image2@2x.png


+ 0 - 0
src/assets/images/goods/1/image3@2x.png → src/assets/images/active1/goods/1/image3@2x.png


+ 0 - 0
src/assets/images/goods/1/image4@2x.png → src/assets/images/active1/goods/1/image4@2x.png


+ 0 - 0
src/assets/images/goods/1/image5@2x.png → src/assets/images/active1/goods/1/image5@2x.png


+ 0 - 0
src/assets/images/goods/1/image6@2x.png → src/assets/images/active1/goods/1/image6@2x.png


+ 0 - 0
src/assets/images/goods/1/image7@2x.png → src/assets/images/active1/goods/1/image7@2x.png


+ 0 - 0
src/assets/images/goods/1/image8@2x.png → src/assets/images/active1/goods/1/image8@2x.png


+ 0 - 0
src/assets/images/goods/1/image9@2x.png → src/assets/images/active1/goods/1/image9@2x.png


+ 0 - 0
src/assets/images/goods/2/image10@2x.png → src/assets/images/active1/goods/2/image10@2x.png


+ 0 - 0
src/assets/images/goods/2/image11@2x.png → src/assets/images/active1/goods/2/image11@2x.png


+ 0 - 0
src/assets/images/goods/2/image12@2x.png → src/assets/images/active1/goods/2/image12@2x.png


+ 0 - 0
src/assets/images/goods/2/image13@2x.png → src/assets/images/active1/goods/2/image13@2x.png


+ 0 - 0
src/assets/images/goods/2/image14@2x.png → src/assets/images/active1/goods/2/image14@2x.png


+ 0 - 0
src/assets/images/goods/2/image15@2x.png → src/assets/images/active1/goods/2/image15@2x.png


+ 0 - 0
src/assets/images/goods/2/image16@2x.png → src/assets/images/active1/goods/2/image16@2x.png


+ 0 - 0
src/assets/images/goods/2/image17@2x.png → src/assets/images/active1/goods/2/image17@2x.png


+ 0 - 0
src/assets/images/goods/2/image18@2x.png → src/assets/images/active1/goods/2/image18@2x.png


+ 0 - 0
src/assets/images/goods/2/image19@2x.png → src/assets/images/active1/goods/2/image19@2x.png


+ 0 - 0
src/assets/images/goods/2/image1@2x.png → src/assets/images/active1/goods/2/image1@2x.png


+ 0 - 0
src/assets/images/goods/2/image20@2x.png → src/assets/images/active1/goods/2/image20@2x.png


+ 0 - 0
src/assets/images/goods/2/image21@2x.png → src/assets/images/active1/goods/2/image21@2x.png


+ 0 - 0
src/assets/images/goods/2/image22@2x.png → src/assets/images/active1/goods/2/image22@2x.png


+ 0 - 0
src/assets/images/goods/2/image23@2x.png → src/assets/images/active1/goods/2/image23@2x.png


+ 0 - 0
src/assets/images/goods/2/image2@2x.png → src/assets/images/active1/goods/2/image2@2x.png


+ 0 - 0
src/assets/images/goods/2/image3@2x.png → src/assets/images/active1/goods/2/image3@2x.png


+ 0 - 0
src/assets/images/goods/2/image4@2x.png → src/assets/images/active1/goods/2/image4@2x.png


+ 0 - 0
src/assets/images/goods/2/image5@2x.png → src/assets/images/active1/goods/2/image5@2x.png


+ 0 - 0
src/assets/images/goods/2/image6@2x.png → src/assets/images/active1/goods/2/image6@2x.png


+ 0 - 0
src/assets/images/goods/2/image7@2x.png → src/assets/images/active1/goods/2/image7@2x.png


+ 0 - 0
src/assets/images/goods/2/image8@2x.png → src/assets/images/active1/goods/2/image8@2x.png


+ 0 - 0
src/assets/images/goods/2/image9@2x.png → src/assets/images/active1/goods/2/image9@2x.png


+ 0 - 0
src/assets/images/home/12.png → src/assets/images/active1/home/12.png


+ 0 - 0
src/assets/images/home/1745-active.png → src/assets/images/active1/home/1745-active.png


+ 0 - 0
src/assets/images/home/addr-null.png → src/assets/images/active1/home/addr-null.png


+ 0 - 0
src/assets/images/home/bgImg.png → src/assets/images/active1/home/bgImg.png


+ 0 - 0
src/assets/images/home/bottomBtn1.png → src/assets/images/active1/home/bottomBtn1.png


+ 0 - 0
src/assets/images/home/bottomBtn2.png → src/assets/images/active1/home/bottomBtn2.png


+ 0 - 0
src/assets/images/home/bottomBtn3.png → src/assets/images/active1/home/bottomBtn3.png


+ 0 - 0
src/assets/images/home/centerUl/card.png → src/assets/images/active1/home/centerUl/card.png


+ 0 - 0
src/assets/images/home/centerUl/infro.png → src/assets/images/active1/home/centerUl/infro.png


+ 0 - 0
src/assets/images/home/centerUl/rice.png → src/assets/images/active1/home/centerUl/rice.png


+ 0 - 0
src/assets/images/home/detail/bag.png → src/assets/images/active1/home/detail/bag.png


+ 0 - 0
src/assets/images/home/detail/box.png → src/assets/images/active1/home/detail/box.png


+ 0 - 0
src/assets/images/home/live-active.png → src/assets/images/active1/home/live-active.png


+ 0 - 0
src/assets/images/home/live.png → src/assets/images/active1/home/live.png


+ 0 - 0
src/assets/images/home/middle/camera.png → src/assets/images/active1/home/middle/camera.png


+ 0 - 0
src/assets/images/home/middle/cardOne.png → src/assets/images/active1/home/middle/cardOne.png


+ 0 - 0
src/assets/images/home/middle/cardTwo.png → src/assets/images/active1/home/middle/cardTwo.png


+ 0 - 0
src/assets/images/home/middle/freshRice.png → src/assets/images/active1/home/middle/freshRice.png


+ 0 - 0
src/assets/images/home/middle/keepAlive.png → src/assets/images/active1/home/middle/keepAlive.png


+ 0 - 0
src/assets/images/home/middle/normalGrow.png → src/assets/images/active1/home/middle/normalGrow.png


+ 0 - 0
src/assets/images/home/middle/organic.png → src/assets/images/active1/home/middle/organic.png


+ 0 - 0
src/assets/images/home/more.png → src/assets/images/active1/home/more.png


+ 0 - 0
src/assets/images/home/my-active.png → src/assets/images/active1/home/my-active.png


+ 0 - 0
src/assets/images/home/my.png → src/assets/images/active1/home/my.png


+ 0 - 0
src/assets/images/home/paddy-bottom.png → src/assets/images/active1/home/paddy-bottom.png


+ 0 - 0
src/assets/images/home/paddy-detail.png → src/assets/images/active1/home/paddy-detail.png


+ 0 - 0
src/assets/images/home/paddy-middle.png → src/assets/images/active1/home/paddy-middle.png


+ 0 - 0
src/assets/images/home/paddy-title.png → src/assets/images/active1/home/paddy-title.png


+ 0 - 0
src/assets/images/home/paddy.png → src/assets/images/active1/home/paddy.png


+ 0 - 0
src/assets/images/home/personal-active.png → src/assets/images/active1/home/personal-active.png


+ 0 - 0
src/assets/images/home/pic-1.png → src/assets/images/active1/home/pic-1.png


+ 0 - 0
src/assets/images/home/product-active.png → src/assets/images/active1/home/product-active.png


+ 0 - 0
src/assets/images/home/product.png → src/assets/images/active1/home/product.png


+ 0 - 0
src/assets/images/home/rice-active.png → src/assets/images/active1/home/rice-active.png


+ 0 - 0
src/assets/images/home/rice.png → src/assets/images/active1/home/rice.png


+ 0 - 0
src/assets/images/home/swipper/swipper1.png → src/assets/images/active1/home/swipper/swipper1.png


+ 0 - 0
src/assets/images/home/swipper/swipper2.png → src/assets/images/active1/home/swipper/swipper2.png


+ 0 - 0
src/assets/images/home/swipper/swipper3.png → src/assets/images/active1/home/swipper/swipper3.png


+ 0 - 0
src/assets/images/introduce/1/1.0@2x.png → src/assets/images/active1/introduce/1/1.0@2x.png


+ 0 - 0
src/assets/images/introduce/1/2.0@2x.png → src/assets/images/active1/introduce/1/2.0@2x.png


+ 0 - 0
src/assets/images/introduce/1/3.0@2x.png → src/assets/images/active1/introduce/1/3.0@2x.png


+ 0 - 0
src/assets/images/introduce/1/4.0@2x.png → src/assets/images/active1/introduce/1/4.0@2x.png


+ 0 - 0
src/assets/images/introduce/1/5.0@2x.png → src/assets/images/active1/introduce/1/5.0@2x.png


+ 0 - 0
src/assets/images/introduce/2/1.0@2x.png → src/assets/images/active1/introduce/2/1.0@2x.png


+ 0 - 0
src/assets/images/introduce/2/2.0@2x.png → src/assets/images/active1/introduce/2/2.0@2x.png


+ 0 - 0
src/assets/images/introduce/2/3.0@2x.png → src/assets/images/active1/introduce/2/3.0@2x.png


+ 0 - 0
src/assets/images/introduce/3/1.0@2x.png → src/assets/images/active1/introduce/3/1.0@2x.png


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff