Explorar el Código

主题4&主题5

panhui hace 3 años
padre
commit
f84220de7e

BIN
src/main/vue/src/assets/png-diwen-bai.png


+ 128 - 81
src/main/vue/src/components/phone/Home.vue

@@ -17,47 +17,57 @@
                 width="38"
                 height="38"
                 :radius="38"
-                :src="require('../../assets/img_default_photo.png')"
+                :src="companyInfo.logo || require('../../assets/img_default_photo.png')"
             ></van-image>
-            <div class="text1">探索者!</div>
+            <div class="text1 text3">{{ companyInfo.name }}</div>
         </div>
-        <div class="welcom" v-else>
+        <div class="welcom" v-else-if="theme === 'theme1' || theme === 'theme2'">
             <div class="left">
                 <div class="text1">WELCOME</div>
-                <div class="text2">探索者!</div>
+                <div class="text2 text3">{{ companyInfo.name }}</div>
             </div>
             <van-image
                 width="38"
                 height="38"
                 :radius="38"
-                :src="require('../../assets/img_default_photo.png')"
+                :src="companyInfo.logo || require('../../assets/img_default_photo.png')"
             ></van-image>
         </div>
-
-        <div class="mySwiper" :class="[`swiper-${theme}`]" ref="mySwiper">
-            <div class="swiper-wrapper">
-                <div class="swiper-slide" v-for="item in banners" :key="item.id">
-                    <product-small :info="item"></product-small>
+        <template v-if="theme === 'theme1' || theme === 'theme2' || theme === 'theme3'">
+            <div class="mySwiper" :class="[`swiper-${theme}`]" ref="mySwiper">
+                <div class="swiper-wrapper">
+                    <div class="swiper-slide" v-for="item in banners" :key="item.id">
+                        <product-small :info="item"></product-small>
+                    </div>
                 </div>
+                <!-- 如果需要分页器 -->
+                <div class="swiper-pagination"></div>
+            </div>
+        </template>
+        <div class="large-logo" v-else>
+            <van-image
+                width="100%"
+                height="100%"
+                radius="12"
+                fit="cover"
+                :src="companyInfo.logo || require('../../assets/img_default_photo.png')"
+            ></van-image>
+        </div>
+
+        <div class="home-title">
+            <span>新闻公告</span>
+
+            <div class="title-more">
+                <span>更多</span>
+                <van-icon name="icon-icon_inter" class-prefix="font_family" />
             </div>
-            <!-- 如果需要分页器 -->
-            <div class="swiper-pagination"></div>
         </div>
 
-        <!-- <swiper
-            pagination
-            @slideChange="changeMySwiper"
-            :space-between="theme === 'theme2' || theme === 'theme3' ? 8 : 16"
-            class="mySwiper"
-            :autoplay="{ delay: 5000, disableOnInteraction: false }"
-            v-if="banners.length > 0"
-            slidesPerView="auto"
-            centeredSlides
-        >
-            <swiper-slide v-for="item in banners" :key="item.id">
-                <product-small :info="item"></product-small>
-            </swiper-slide>
-        </swiper> -->
+        <div class="newsList">
+            <news-large v-for="(item, index) in news" :theme="theme" :key="index" :info="item.obj"></news-large>
+        </div>
+
+        <div class="home-title">数字艺术品</div>
 
         <!-- <div class="tabs" v-if="!empty">
             <div class="tab" :class="{ active: active === 0 }" @click="active = 0">数字藏品</div>
@@ -66,8 +76,9 @@
         <div class="listSwiper">
             <product-large
                 v-for="(item, index) in products"
+                :theme="theme"
                 :key="index"
-                :info="products[index].obj"
+                :info="item.obj"
                 :type="item.type"
             ></product-large>
         </div>
@@ -80,15 +91,11 @@ import Swiper from 'swiper/swiper-bundle';
 import 'swiper/swiper.min.css';
 import 'swiper/swiper-bundle.min.css';
 
-// import SwiperCore, { Pagination, Autoplay } from 'swiper';
-
-// // install Swiper modules
-// SwiperCore.use([Pagination, Autoplay]);
-
+import product from '../../mixins/product';
 import ProductLarge from './productLarge.vue';
+import NewsLarge from './NewsLarge.vue';
 import ProductSmall from './productSmall.vue';
 import { mapState } from 'vuex';
-import { Image as VanImage } from 'vant';
 
 export default {
     name: 'home',
@@ -96,12 +103,19 @@ export default {
         theme: {
             type: String,
             default: 'theme2'
+        },
+        companyInfo: {
+            type: Object,
+            default: () => {
+                return {};
+            }
         }
     },
+    mixins: [product],
     components: {
         ProductLarge,
         ProductSmall,
-        VanImage
+        NewsLarge
     },
     computed: {
         ...mapState(['userInfo']),
@@ -146,13 +160,35 @@ export default {
             riskShow: false,
             activeIndex: 0,
             isLoading: false,
-            mySwiper: null
+            mySwiper: null,
+            companyInfo: {}
         };
     },
     watch: {
         theme() {
             this.$nextTick(() => {
-                this.mySwiper.destroy();
+                if (this.mySwiper) {
+                    this.mySwiper.destroy();
+                }
+                if (this.$refs.mySwiper) {
+                    this.mySwiper = new Swiper(this.$refs.mySwiper, {
+                        pagination: {
+                            el: '.swiper-pagination'
+                        },
+                        autoplay: { delay: 5000, disableOnInteraction: false },
+                        spaceBetween: this.theme === 'theme2' || this.theme === 'theme3' ? 8 : 16,
+                        slidesPerView: 'auto',
+                        centeredSlides: true
+                    });
+                }
+            });
+        }
+    },
+    mounted() {
+        this.getInit();
+
+        this.$nextTick(() => {
+            if (this.$refs.mySwiper) {
                 this.mySwiper = new Swiper(this.$refs.mySwiper, {
                     pagination: {
                         el: '.swiper-pagination'
@@ -162,23 +198,11 @@ export default {
                     slidesPerView: 'auto',
                     centeredSlides: true
                 });
-            });
-        }
-    },
-    mounted() {
-        this.getInit();
-        console.log(new Swiper());
-        this.$nextTick(() => {
-            this.mySwiper = new Swiper(this.$refs.mySwiper, {
-                pagination: {
-                    el: '.swiper-pagination'
-                },
-                autoplay: { delay: 5000, disableOnInteraction: false },
-                spaceBetween: this.theme === 'theme2' || this.theme === 'theme3' ? 8 : 16,
-                slidesPerView: 'auto',
-                centeredSlides: true
-            });
+            }
         });
+        // this.$http.get('sysConfig/get/home_bg').then(res => {
+        //     this.bgImg = res.value || '';
+        // });
     },
     methods: {
         changeSwiper() {
@@ -199,9 +223,11 @@ export default {
                     this.products = res.filter(item => {
                         return item.type === 'collection';
                     });
-                    this.news = res.filter(item => {
-                        return item.type === 'news';
-                    });
+                    this.news = res
+                        .filter(item => {
+                            return item.type === 'news';
+                        })
+                        .slice(0, 3);
                 })
             ]).then(() => {
                 this.$toast.clear();
@@ -328,7 +354,7 @@ export default {
 
 <style lang="less" scoped>
 .darkBg {
-    background-color: #181818;
+    background-color: var(--bg);
 }
 .theme2-bg {
     width: 221px;
@@ -340,7 +366,7 @@ export default {
 }
 .theme3-bg {
     width: 100%;
-    position: absolute;
+    position: fixed;
     top: 0;
     left: 0;
     height: auto;
@@ -349,39 +375,21 @@ export default {
 .top {
     display: flex;
     padding: 9px 16px;
-    background-color: @bg;
+    background-color: var(--bg);
     display: flex;
     align-items: center;
     .logo {
         width: 74px;
         height: 26px;
     }
-
-    .search {
-        flex-grow: 1;
-        background-color: #fff;
-        display: flex;
-        align-items: center;
-        margin-left: 10px;
-        padding: 4px 20px;
-        border-radius: 21px;
-        img {
-            width: 16px;
-            height: 16px;
-            margin-right: 10px;
-        }
-        font-size: 14px;
-        color: @text3;
-        line-height: 24px;
-    }
 }
 
 .home {
     width: 100%;
-    // background-color: #fff;
+    // background-color: @bg3;
     position: relative;
     z-index: 1;
-    background-color: #272b2e;
+    background-color: var(--bg2);
     padding-top: var(--safe-top);
     overflow-y: auto;
     max-height: 720px;
@@ -396,7 +404,6 @@ export default {
     padding: 16px 0;
     // margin: 0 16px;
     box-sizing: border-box;
-    position: relative;
     // padding-bottom: 35px;
 
     .swiper-slide {
@@ -409,7 +416,7 @@ export default {
         bottom: 30px;
     }
 
-    /deep/.swiper-pagination-bullet {
+    .swiper-pagination-bullet {
         width: 5px;
         height: 5px;
         border-radius: 5px;
@@ -417,7 +424,8 @@ export default {
         margin: 0 4px;
         opacity: 1;
     }
-    /deep/.swiper-pagination-bullet-active {
+
+    .swiper-pagination-bullet-active {
         background: var(--prim);
     }
 }
@@ -441,6 +449,20 @@ export default {
         }
     }
 }
+
+.swiper-theme4,
+.swiper-theme5 {
+    padding: 20px 0 16px;
+    .swiper-slide {
+        height: 160px;
+    }
+}
+
+.large-logo {
+    padding: 20px 16px 16px;
+    height: 160px;
+    overflow: hidden;
+}
 // .swiper-slide {
 //     width: 255px;
 // }
@@ -623,4 +645,29 @@ export default {
         border-radius: 8px;
     }
 }
+
+.home-title {
+    font-size: 18px;
+    font-weight: bold;
+    color: var(--text1);
+    line-height: 24px;
+    padding: 10px 16px 8px;
+    .flex();
+
+    span {
+        flex-grow: 1;
+    }
+
+    .title-more {
+        .flex();
+        font-size: 12px;
+        color: #939599;
+        .font_family {
+            font-weight: normal;
+        }
+    }
+}
+.newsList {
+    padding-bottom: 8px;
+}
 </style>

+ 175 - 0
src/main/vue/src/components/phone/NewsLarge.vue

@@ -0,0 +1,175 @@
+<template>
+    <div class="news-small" :class="[`news-${theme}`, type === 'light' ? 'isLight' : '']">
+        <van-image :src="getImg(info.pic)" :radius="12" width="120" height="120" fit="cover" />
+
+        <div class="content">
+            <div class="name van-multi-ellipsis--l2">{{ info.title }}</div>
+            <div class="flex1"></div>
+            <van-button type="primary" round plain size="mini"> 查看</van-button>
+        </div>
+    </div>
+</template>
+
+<script>
+import product from '../../mixins/product';
+export default {
+    mixins: [product],
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        },
+        type: {
+            type: String,
+            default: 'dark'
+        },
+        theme: {
+            type: String,
+            default: 'theme2'
+        }
+    },
+    computed: {
+        time() {
+            if (this.info.startTime) {
+                if (this.dayjs().isSameOrBefore(this.info.startTime, 'YYYY-MM-DD HH:mm:ss')) {
+                    return this.dayjs(this.info.startTime).format('MM月DD日');
+                }
+            }
+
+            return '';
+        }
+    },
+    mounted() {
+        if (this.info.startTime) {
+            var x = this.dayjs(this.info.startTime, 'YYYY-MM-DD HH:mm:ss');
+            var y = this.dayjs();
+            let d = this.dayjs.duration(x.diff(y));
+            let day = parseInt(d.asDays());
+            if (day <= 0) {
+                this.getTime(this.info.startTime);
+            }
+        }
+    },
+    methods: {
+        likeProduct() {
+            if (!this.info.liked) {
+                this.$http.get(`/collection/${this.info.id}/like`).then(() => {
+                    this.$emit('update:info', {
+                        ...this.info,
+                        liked: true,
+                        likes: this.info.likes + 1
+                    });
+                    this.$toast.success('收藏成功');
+                });
+            } else {
+                this.$http.get(`/collection/${this.info.id}/unlike`).then(() => {
+                    this.$emit('update:info', {
+                        ...this.info,
+                        liked: false,
+                        likes: this.info.likes - 1
+                    });
+                    this.$toast.success('取消收藏');
+                });
+            }
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.news-small {
+    width: calc(354px - 32px);
+    margin: 8px 16px;
+    position: relative;
+    background-color: var(--bglight);
+    display: inline-flex;
+    border-radius: 12px;
+    overflow: hidden;
+
+    .bg {
+        position: absolute;
+        width: 92px;
+        height: 116px;
+        right: 0;
+        bottom: 0;
+        z-index: 0;
+    }
+
+    .van-image {
+        display: block;
+        position: relative;
+        z-index: 2;
+        flex-shrink: 0;
+    }
+    .content {
+        padding: 16px 15px 16px 12px;
+        .flex-col();
+        flex-grow: 1;
+        .name {
+            font-size: 16px;
+            font-weight: bold;
+            color: var(--text1);
+            line-height: 22px;
+        }
+
+        .van-button {
+            width: 68px;
+            background-color: var(--fadePrim);
+            color: var(--prim);
+            font-size: 14px;
+            border-width: 0;
+        }
+
+        .flex1 {
+            flex-grow: 1;
+        }
+
+        .sales-list {
+            margin-top: 8px;
+            .flex();
+        }
+    }
+
+    .text {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+    }
+
+    .top-bg {
+        width: 100%;
+        display: block;
+        position: absolute;
+        z-index: 2;
+        top: 0;
+        left: 0;
+    }
+
+    &.isLight {
+        background-color: @bg;
+        .content {
+            .name {
+                color: #000000;
+            }
+            .bottom {
+                .miner {
+                    color: #939599;
+                }
+            }
+        }
+    }
+
+    &.news-theme4 {
+        .content {
+            .van-button {
+                width: 68px;
+                --van-button-plain-background-color: var(--fadePrimlight);
+                --van-button-primary-background-color: var(--primlight);
+                --van-button-mini-font-size: 14px;
+            }
+        }
+    }
+}
+</style>

+ 7 - 1
src/main/vue/src/components/phone/module.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="module">
         <div class="phone" :class="[theme]">
-            <phone-home :theme="theme"></phone-home>
+            <phone-home :theme="theme" :companyInfo="companyInfo"></phone-home>
         </div>
         <div class="phone-bg">
             <div class="bg" :style="{ backgroundImage: `url(${require('../../assets/phone.png')})` }"></div>
@@ -16,6 +16,12 @@ export default {
         theme: {
             type: String,
             default: 'theme2'
+        },
+        companyInfo: {
+            type: Object,
+            default: () => {
+                return {};
+            }
         }
     },
     components: { phoneHome }

+ 53 - 19
src/main/vue/src/components/phone/productLarge.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="product">
+    <div class="product" :class="[`product-${theme}`]">
         <van-image
             :radius="30"
             width="100%"
@@ -30,7 +30,7 @@
                     </div>
                     <div class="flex1"></div>
                     <div class="price" v-if="info.salable">
-                        <img src="../../assets/icon_jiage.png" alt="" />
+                        <van-icon name="icon-icon_jiage" class-prefix="font_family" />
                         <span> {{ info.price }}</span>
                     </div>
                     <div v-else class="status">仅展示</div>
@@ -38,12 +38,17 @@
             </div>
 
             <div class="sold xianliang" v-if="time && info.scheduleSale">
-                <img src="../../assets/shizhong.png" alt="" />
+                <van-icon name="icon-clock" class-prefix="font_family" />
                 <span>即将开售:{{ startTime || time }}</span>
             </div>
-
-            <div class="sold" v-if="isSolded">已售罄</div>
-            <div class="sold" v-else-if="isSold" style="color: #ff4f50">即将售罄</div>
+            <div class="sold" v-if="isSolded">
+                <van-icon name="icon-jinzhi" class-prefix="font_family" />
+                <span>已售罄</span>
+            </div>
+            <div class="sold" v-else-if="isSold">
+                <van-icon name="icon-info_icon_qianggouzhong" class-prefix="font_family" />
+                <span>即将售罄</span>
+            </div>
         </template>
 
         <div class="content" v-else>
@@ -60,8 +65,8 @@
             </div>
         </div>
 
-        <img class="bg" src="../../assets/png-diwen2.png" alt="" />
-        <!-- <img class="top-bg" v-if="time" src="@assets/collecbg.png" alt="" /> -->
+        <img class="bg" v-if="theme === 'theme4'" src="../../assets/png-diwen-bai.png" alt="" />
+        <img class="bg" v-else src="../../assets/png-diwen2.png" alt="" />
     </div>
 </template>
 
@@ -79,6 +84,10 @@ export default {
         type: {
             type: String,
             default: 'collection'
+        },
+        theme: {
+            type: String,
+            default: 'theme2'
         }
     },
     computed: {
@@ -177,7 +186,7 @@ export default {
         .name {
             font-size: 14px;
             font-weight: bold;
-            color: #fff;
+            color: var(--text1);
             line-height: 24px;
         }
 
@@ -198,7 +207,7 @@ export default {
                 display: inline-block;
                 &.sales-fir {
                     background: var(--prim);
-                    color: #000000;
+                    color: var(--text2);
                 }
                 background-color: var(--fadePrim);
                 color: var(--prim);
@@ -226,12 +235,13 @@ export default {
 
             .price {
                 font-size: 20px;
-                color: #fff;
                 line-height: 20px;
-                font-family: OSP;
-                img {
-                    width: 8px;
-                    display: inline-block;
+                color: var(--text1);
+                .flex();
+                .font_family {
+                    font-size: 8px;
+                    line-height: 16px;
+                    margin-top: 4px;
                 }
             }
         }
@@ -251,22 +261,46 @@ export default {
         top: 0;
         left: 0;
     }
+
+    &.product-theme4 {
+        .content {
+            .sales {
+                span {
+                    background: var(--fadePrimlight);
+                    &.sales-fir {
+                        background: var(--primlight);
+                    }
+                }
+            }
+        }
+        .xianliang {
+            color: var(--primlight);
+        }
+    }
 }
 
 .status {
     font-size: 14px;
-    color: #fff;
+    color: var(--text1);
 }
 .sold {
-    background-color: #ffffff;
+    background-color: var(--bglight);
     font-size: 12px;
-    color: #939599;
-    padding: 0 17px;
+    color: var(--info);
+    padding: 0 17px 0 10px;
     border-radius: 13px;
     line-height: 24px;
     position: absolute;
     top: 16px;
     left: 16px;
     z-index: 3;
+    .flex();
+    .font_family {
+        margin-right: 4px;
+    }
+
+    &.preSold {
+        color: var(--danger);
+    }
 }
 </style>

+ 1 - 0
src/main/vue/src/main.js

@@ -28,6 +28,7 @@ import 'vant/lib/index.css';
 import 'normalize.css/normalize.css';
 import './styles/element_theme/index.css';
 import './styles/theme.less';
+import './styles/font.less';
 import theme from '!less-vars-loader!./styles/common/theme.less';
 // import VueAMap from "vue-amap";
 // Vue.use(VueAMap);

+ 145 - 0
src/main/vue/src/styles/font.less

@@ -0,0 +1,145 @@
+@font-face {
+    font-family: 'OSP';
+    src: url(https://cdn.raex.vip/font/OSP-DIN.ttf);
+}
+
+@font-face {
+    font-family: 'DIN';
+    src: url(https://cdn.raex.vip/font/OSP-DIN.ttf);
+}
+@font-face {
+    font-family: 'SourceHanSans-Medium';
+    src: url(https://cdn.raex.vip/font/SourceHanSans-Medium.otf);
+}
+@font-face {
+    font-family: 'font_family'; /* Project id 2852142 */
+    src: url('//at.alicdn.com/t/c/font_2852142_o0irw07uokf.woff2?t=1665558717758') format('woff2'),
+        url('//at.alicdn.com/t/c/font_2852142_o0irw07uokf.woff?t=1665558717758') format('woff'),
+        url('//at.alicdn.com/t/c/font_2852142_o0irw07uokf.ttf?t=1665558717758') format('truetype');
+}
+.font_family {
+    font-family: 'font_family' !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+.flex1{
+    flex-grow: 1;
+}
+.font_family-icon-icon_inter1:before {
+    content: '\e64e';
+    font-size: 24px;
+}
+.font_family-icon-icon_inter:before {
+    content: '\e631';
+    font-size: 24px;
+}
+.font_family-icon-phone:before {
+    content: '\e64b';
+    font-size: 20px;
+}
+
+.font_family-icon-weibiaoti--:before {
+    content: '\e616';
+    font-size: 20px;
+}
+.font_family-icon-jinzhi:before {
+    content: '\e610';
+    font-size: 18px;
+}
+.font_family-icon-clock:before {
+    content: '\e617';
+    font-size: 18px;
+}
+.font_family-icon-info_icon_qianggouzhong:before {
+    content: '\e64d';
+    font-size: 18px;
+}
+.font_family-icon-yanzhengma:before {
+    content: '\e624';
+    font-size: 20px;
+}
+.font_family-icon-icon_gouxuan_pre:before {
+    content: '\e64a';
+    font-size: 24px;
+}
+
+.font_family-icon-tabbar_icon_02:before {
+    content: '\e646';
+    font-size: 28px;
+}
+
+.font_family-icon-tabbar_icon_04:before {
+    content: '\e647';
+    font-size: 28px;
+}
+
+.font_family-icon-tabbar_icon_03:before {
+    content: '\e648';
+    font-size: 28px;
+}
+
+.font_family-icon-tabbar_icon_01:before {
+    content: '\e649';
+    font-size: 28px;
+}
+
+.icon-png-u-weixuanzhong:before {
+    content: '\e640';
+}
+
+.icon-png-sr-weixuanzhong:before {
+    content: '\e641';
+}
+
+.icon-png-ssr-xuanzhong:before {
+    content: '\e642';
+}
+
+.icon-png-right-bg:before {
+    content: '\e643';
+}
+
+.icon-png-middle-bg:before {
+    content: '\e644';
+}
+
+.icon-png-left-bg:before {
+    content: '\e645';
+}
+
+.icon-help::before {
+    content: '\e752';
+}
+
+.icon-sanjiao::before {
+    content: '\e63f';
+    display: block;
+}
+
+.icon-a-icon-dianzan5:before {
+    content: '\e634';
+}
+
+.icon-icon_inter:before {
+    content: '\e631';
+}
+.font_family-icon-icon_jiage {
+    display: inline-block;
+    font-size: 8px;
+    line-height: 8px;
+}
+.font_family-icon-icon_jiage:before {
+    content: '\e632';
+    font-size: 8px;
+    line-height: 8px;
+}
+.icon-icon_jiage:before {
+    content: '\e632';
+    font-size: 8px;
+    line-height: 8px;
+}
+.icon-a-icon-dianzan2:before {
+    content: '\e633';
+}

+ 75 - 13
src/main/vue/src/styles/theme.less

@@ -5,17 +5,13 @@
     --primlight: #3ab200;
     --btnText: #fff;
     --bglight:#373b3e;
-    --swiper-theme-color:var(--prim);
-    --van-primary-color: var(--prim);
-    --van-tabbar-item-active-color: var(--prim);
-    --van-tabs-default-color: var(--prim);
-    --van-tabs-bottom-bar-color: var(--prim);
-    --van-tab-active-text-color: var(--prim);
-    --van-field-error-message-color: var(--prim);
-    --van-button-primary-background-color: var(--prim);
-    --van-button-primary-border-color: var(--prim);
-    --van-number-keyboard-button-background-color: var(--prim);
-    --van-button-primary-background-color:var(--prim);
+    --danger:#FF4F50;
+    --info:#939599;
+    --bg:#181818;
+    --bg2:#272b2e;
+    --bg3:#272b2e;
+    --text1:#fff;
+    --text2:#000;
 }
 
 .theme2 {
@@ -25,7 +21,13 @@
     --primlight: #f5ab23;
     --btnText: #000;
     --bglight:#2F2519;
-    --swiper-theme-color:var(--prim);
+    --danger:#FF4F50;
+    --info:#939599;
+    --bg:#181818;
+    --bg2:#272b2e;
+    --bg3:#272b2e;
+    --text1:#fff;
+    --text2:#000;
     --van-primary-color: var(--prim);
     --van-tabbar-item-active-color: var(--prim);
     --van-tabs-default-color: var(--prim);
@@ -45,7 +47,13 @@
     --primlight: #979DFF;
     --btnText: #000;
     --bglight:#3C3766;
-    --swiper-theme-color:var(--prim);
+    --danger:#FF4F50;
+    --info:#939599;
+    --bg:#181818;
+    --bg2:#272b2e;
+    --bg3:#272b2e;
+    --text1:#fff;
+    --text2:#000;
     --van-primary-color: var(--prim);
     --van-tabbar-item-active-color: var(--prim);
     --van-tabs-default-color: var(--prim);
@@ -57,3 +65,57 @@
     --van-number-keyboard-button-background-color: var(--prim);
     --van-button-primary-background-color:var(--prim);
 }
+
+.theme4 {
+    --prim: #51B8FF;
+    --fadePrim: #51B8FF20;
+    --darkPrim: #367bd7;
+    --primlight: #4092FF;
+    --fadePrimlight: #4092FF20;
+    --btnText: #000;
+    --bglight:#fff;
+    --danger:#FF4F50;
+    --info:#939599;
+    --bg:#fff;
+    --bg2:#F5F7FA;
+    --bg3:#fff;
+    --text1:#000;
+    --text2:#fff;
+    --van-primary-color: var(--prim);
+    --van-tabbar-item-active-color: var(--prim);
+    --van-tabs-default-color: var(--prim);
+    --van-tabs-bottom-bar-color: var(--prim);
+    --van-tab-active-text-color: var(--prim);
+    --van-field-error-message-color: var(--prim);
+    --van-button-primary-background-color: var(--prim);
+    --van-button-primary-border-color: var(--prim);
+    --van-number-keyboard-button-background-color: var(--prim);
+    --van-button-primary-background-color:var(--prim);
+}
+
+.theme5 {
+    --prim: #51B8FF;
+    --fadePrim: #51B8FF20;
+    --darkPrim: #367bd7;
+    --primlight: #4092FF;
+    --fadePrimlight: #4092FF20;
+    --btnText: #000;
+    --bglight:#1C1C1C;
+    --danger:#FF4F50;
+    --info:#939599;
+    --bg:#1C1C1C;
+    --bg2:#000000;
+    --bg3:#1C1C1C;
+    --text1:#fff;
+    --text2:#000;
+    --van-primary-color: var(--prim);
+    --van-tabbar-item-active-color: var(--prim);
+    --van-tabs-default-color: var(--prim);
+    --van-tabs-bottom-bar-color: var(--prim);
+    --van-tab-active-text-color: var(--prim);
+    --van-field-error-message-color: var(--prim);
+    --van-button-primary-background-color: var(--prim);
+    --van-button-primary-border-color: var(--prim);
+    --van-number-keyboard-button-background-color: var(--prim);
+    --van-button-primary-background-color:var(--prim);
+}

+ 19 - 19
src/main/vue/src/views/Admin.vue

@@ -280,36 +280,36 @@ export default {
                         active: true,
                         category: '',
                         children: [
+                            // {
+                            //     id: '3252238',
+                            //     name: '轮播图',
+                            //     path: '/bannerList',
+                            //     icon: '',
+                            //     sort: 34,
+                            //     parent: '3252226',
+                            //     root: false,
+                            //     active: true
+                            // },
                             {
-                                id: '3252238',
-                                name: '轮播图',
-                                path: '/bannerList',
+                                id: '3252239',
+                                name: '首页推荐',
+                                path: '/recommendList',
                                 icon: '',
-                                sort: 34,
+                                sort: 35,
                                 parent: '3252226',
                                 root: false,
                                 active: true
                             },
                             {
-                                id: '3252239',
-                                name: '首页推荐',
-                                path: '/recommendList',
+                                id: '3252230',
+                                name: '新闻管理',
+                                path: '/newsList',
                                 icon: '',
-                                sort: 35,
+                                sort: 36,
                                 parent: '3252226',
                                 root: false,
                                 active: true
-                            },
-                            // {
-                            //     id: '3252230',
-                            //     name: '新闻管理',
-                            //     path: '/newsList',
-                            //     icon: '',
-                            //     sort: 36,
-                            //     parent: '3252226',
-                            //     root: false,
-                            //     active: true
-                            // }
+                            }
                         ]
                     },
                     {

+ 15 - 4
src/main/vue/src/views/company/CompanyTheme.vue

@@ -16,6 +16,9 @@
                     size="small"
                     style="max-width: 750px"
                 >
+                    <el-form-item prop="logo" label="LOGO">
+                        <single-upload v-model="formData.logo"></single-upload>
+                    </el-form-item>
                     <el-form-item label="选择主题">
                         <el-radio-group v-model="formData.theme">
                             <el-radio :label="item.value" v-for="(item, index) in themeOptions" :key="index">
@@ -34,7 +37,7 @@
                 </el-form>
 
                 <div class="phone">
-                    <phone-module :theme="formData.theme"></phone-module>
+                    <phone-module :theme="formData.theme" :companyInfo="formData"></phone-module>
                 </div>
             </div>
             <el-dialog title="添加藏品" :visible.sync="showCollectionDialog" width="500px">
@@ -84,6 +87,7 @@ export default {
         this.$http.get(`/company/get/${this.companyId}`).then(res => {
             if (res.theme) {
                 this.formData.theme = res.theme;
+                this.formData.logo = res.logo;
             }
         });
     },
@@ -91,13 +95,16 @@ export default {
         return {
             saving: false,
             formData: {
-                theme: 'theme1'
+                theme: 'theme1',
+                logo: ''
             },
             rules: {},
             themeOptions: [
                 { label: '主题1', value: 'theme1' },
                 { label: '主题2', value: 'theme2' },
-                { label: '主题3', value: 'theme3' }
+                { label: '主题3', value: 'theme3' },
+                { label: '主题4', value: 'theme4' },
+                { label: '主题5', value: 'theme5' }
             ],
             settings: [],
             collections: [],
@@ -114,7 +121,11 @@ export default {
     methods: {
         onSave() {
             this.$http
-                .post('/company/save', { id: this.companyId, theme: this.formData.theme }, { body: 'json' })
+                .post(
+                    '/company/save',
+                    { id: this.companyId, theme: this.formData.theme, logo: this.formData.logo },
+                    { body: 'json' }
+                )
                 .then(res => {
                     this.$message.success('保存成功');
                 });