瀏覽代碼

首页增加公告、公告列表、公告详情

Admin 3 年之前
父節點
當前提交
549116a6a4

+ 16 - 0
src/main/java/com/caimei/www/controller/unlimited/HelpPageController.java

@@ -23,6 +23,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
 public class HelpPageController extends BaseController {
 public class HelpPageController extends BaseController {
 
 
 	private static final String HELP_PAGE_PATH = "help/help";
 	private static final String HELP_PAGE_PATH = "help/help";
+	private static final String HELP_PAGE_NEWS = "help/news";
+	private static final String HELP_PAGE_NEWSDETAILS = "help/details";
 
 
     private HelpService helpService;
     private HelpService helpService;
     @Autowired
     @Autowired
@@ -56,4 +58,18 @@ public class HelpPageController extends BaseController {
     public JsonModel suggestion(Suggestion suggestion) {
     public JsonModel suggestion(Suggestion suggestion) {
         return helpService.suggestionSave(suggestion);
         return helpService.suggestionSave(suggestion);
     }
     }
+
+    /**
+     * 公告页
+     */
+    @GetMapping("/news.html")
+    public String news() {
+        return HELP_PAGE_NEWS;
+    }
+    /**
+     * 公告详情页
+     */
+    @GetMapping("/news/details.html")
+    public String details() { return HELP_PAGE_NEWSDETAILS; }
+
 }
 }

+ 20 - 0
src/main/resources/static/css/help/details.css

@@ -0,0 +1,20 @@
+@charset "utf-8";
+li{list-style:none}
+/**
+ * PC端
+ */
+@media screen and (min-width:768px){
+    .pageWrap{width: 968px;}
+    .navLayout{min-height: 500px;}
+    .news-container{width: 100%;min-height: 600px;background-color: #FFFFFF;margin-top: 24px;box-sizing: border-box;padding: 32px;border-radius: 8px;}
+    .news-container-html{width: 100%;min-height: 600px;}
+}
+
+/**
+* 移动端
+*/
+@media screen and (max-width:768px){
+    .news-container{width: 100%;min-height: 60vw;background-color: #FFFFFF;box-sizing: border-box;padding:3.6vw 3.6vw 6vw 3.6vw;border-radius: 1.6vw;}
+    .news-container-html{width: 100%;min-height: 60vw;}
+}
+

+ 49 - 0
src/main/resources/static/css/help/news.css

@@ -0,0 +1,49 @@
+@charset "utf-8";
+li{list-style:none}
+/**
+ * PC端
+ */
+@media screen and (min-width:768px){
+    .news-title{width: 1184px;margin: 0 auto;box-sizing: border-box;height: 50px;line-height: 50px;}
+    .news-title .news-name{float: left;font-size: 16px;color: #4a4f58;font-weight: bold;}
+    .pageWrap{width: 968px;}
+    .navLayout{min-height: 500px;}
+    .news-container{width: 100%;min-height: 600px;background-color: #FFFFFF;border-radius: 8px;}
+    .news-content-list{width: 100%;height: auto;box-sizing: border-box;padding:16px;border-radius: 8px;}
+    .news-list-cell{width: 100%;height: 48px;float: left;box-sizing: border-box;padding: 0 16px;display: block;}
+    .news-list-cell:nth-child(odd){background-color: #FFFBF9;}
+    .news-list-cell .news-list-le{float: left;box-sizing: border-box;line-height: 18px;font-size: 14px;color: #4A4F58;padding: 15px 0;}
+    .news-list-cell .news-list-le .new-icon{width: 18px;height: 18px;box-sizing: border-box;display: block;background: url("/img/base/icon-news@2x.png");background-size: cover;float: left;}
+    .news-list-cell .news-list-le p{float: left;margin-left: 8px;}
+    .news-list-cell .news-list-ri{float: right;box-sizing: border-box;font-size: 14px;color: #9AA5B5;cursor: pointer;text-align: right;line-height: 48px;}
+    .news-list-cell:hover .news-list-le{color: #E15621;}
+    .news-list-cell:hover .news-list-le .new-icon{background: url("/img/base/icon-news-active@2x.png");background-size: cover;}
+    .news-list-cell:hover .news-list-ri{color: #E15621;}
+    .empty{width: 100%;float: left;}
+    .empty img{width: 180px;height: 180px;}
+}
+
+/**
+* 移动端
+*/
+@media screen and (max-width:768px){
+    .news-title{width: 100%;box-sizing: border-box;height: 10vw;line-height: 10vw;padding: 0 3.6vw;}
+    .news-title .news-name{float: left;font-size: 3.4vw;color: #4a4f58;font-weight: bold;}
+    .pageWrap{width: 100%;}
+    .navLayout{min-height: 60vw;}
+    .news-container{width: 100%;min-height: 60vw;background-color: #FFFFFF;border-radius: 1.6vw;}
+    .news-content-list{width: 100%;height: auto;box-sizing: border-box;padding:3.6vw;}
+    .news-list-cell{width: 100%;height: 12vw;float: left;box-sizing: border-box;padding: 0 3.2vw;display: block;}
+    .news-list-cell:nth-child(odd){background-color: #FFFBF9;}
+    .news-list-cell .news-list-le{ float: left;box-sizing: border-box;line-height: 18px;font-size: 14px;color: #4A4F58;padding: 15px 0;}
+    .news-list-cell .news-list-le .new-icon{width: 18px;height: 18px;box-sizing: border-box;display: block;background: url("/img/base/icon-news@2x.png");background-size: cover;float: left;}
+    .news-list-cell .news-list-le p{width: 50vw;float: left;margin-left: 8px;text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 1;line-clamp: 1;-webkit-box-orient: vertical;}
+    .news-list-cell .news-list-ri{float: right;box-sizing: border-box;font-size: 14px;color: #9AA5B5;cursor: pointer;text-align: right;line-height: 48px;}
+    .news-list-cell:hover .news-list-le{color: #E15621;}
+    .news-list-cell:hover .news-list-le .new-icon{background: url("/img/base/icon-news-active@2x.png");background-size: cover;}
+    .news-list-cell:hover .news-list-ri{color: #E15621;}
+    .empty{width: 100%;float: left;}
+    .empty img{width: 180px;height: 180px;}
+
+}
+

+ 10 - 0
src/main/resources/static/css/index/index_new.h5.css

@@ -13,6 +13,16 @@
 #swiper-container .swiper-pagination .swiper-pagination-bullet{display:block;width:2vw;border-width:1vw 1px;border-color:transparent;cursor:pointer;background:none;font-size:0;opacity:.2}
 #swiper-container .swiper-pagination .swiper-pagination-bullet{display:block;width:2vw;border-width:1vw 1px;border-color:transparent;cursor:pointer;background:none;font-size:0;opacity:.2}
 #swiper-container .swiper-pagination .swiper-pagination-bullet:before{content:"";display:block;width:100%;height:.6vw;background:#FFF;border-radius:.3vw}
 #swiper-container .swiper-pagination .swiper-pagination-bullet:before{content:"";display:block;width:100%;height:.6vw;background:#FFF;border-radius:.3vw}
 #swiper-container .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active{width:3.8vw;opacity:1}
 #swiper-container .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active{width:3.8vw;opacity:1}
+ /*公告*/
+ #new-container{height: 12vw;background-color: #F7F7F7;padding:4vw 3.2vw 0 3.2vw;box-sizing: border-box;}
+ #new-container .inner{width: 100%;height: 100%;background: url("/img/base/icon-newbgh5@2x.png");background-size: cover;box-sizing: border-box;padding:0 3vw;border-radius: 1vw;}
+ #new-container .new-list{float: left;}
+ #new-container .new-label{float: left;line-height: 8vw;font-size: 16px;color: #E15616;font-weight: bold;}
+ #new-container .new-list .new-li{float: left;line-height:  8vw;font-size: 3.2vw;color: #4A4F58;box-sizing: border-box;display: block;}
+ #new-container .new-list .new-li .new-icon{width: 3vw;height: 3vw;margin-top: 2.8vw;box-sizing: border-box;display: block;background: url("/img/base/icon-news@2x.png");background-size: cover;float: left;}
+ #new-container .new-list .new-li p{float: left;margin-left:1vw;}
+ #new-container .new-list .new-li:hover{color: #E15616;text-decoration: line-through;}
+ #new-container .new-more{float: right;line-height: 8vw;font-size: 3.2vw;;color: #93979F;}
 /* 楼层 */
 /* 楼层 */
 .section_right .item_banner .statu .icon-live{display:block;width:3vw;height:3vw;float:left;margin:1.6vw 0 0 1.6vw;background:url("/img/live/icon-live.h5.gif");background-size:cover}
 .section_right .item_banner .statu .icon-live{display:block;width:3vw;height:3vw;float:left;margin:1.6vw 0 0 1.6vw;background:url("/img/live/icon-live.h5.gif");background-size:cover}
 .section_right .item_banner .statu .mIcon.icon-end:before{width:5.3vw;height:4vw;background-position:-63.8vw -69vw}
 .section_right .item_banner .statu .mIcon.icon-end:before{width:5.3vw;height:4vw;background-position:-63.8vw -69vw}

+ 9 - 0
src/main/resources/static/css/index/index_new.pc.css

@@ -20,6 +20,15 @@ li{list-style:none;}
 #swiper-container .swiper-pagination span{display:inline-block;border:5px solid transparent;cursor:pointer}
 #swiper-container .swiper-pagination span{display:inline-block;border:5px solid transparent;cursor:pointer}
 #swiper-container .swiper-pagination span:before{content:"";display:inline-block;width:14px;height:4px;background:rgba(255,255,255,.4);border-radius:2px}
 #swiper-container .swiper-pagination span:before{content:"";display:inline-block;width:14px;height:4px;background:rgba(255,255,255,.4);border-radius:2px}
 #swiper-container .swiper-pagination span.on:before{width:28px;background:#fff}
 #swiper-container .swiper-pagination span.on:before{width:28px;background:#fff}
+/*公告*/
+#new-container{height: 48px;background: url("/img/base/icon-newbg@2x.png");background-size: cover;}
+#new-container .new-list{float: left;}
+#new-container .new-label{float: left;margin-right: 10px;line-height: 48px;font-size: 16px;color: #E15616;font-weight: bold;}
+#new-container .new-list .new-li{float: left;line-height: 28px;font-size: 14px;color: #4A4F58;margin-right: 50px;box-sizing: border-box;padding: 10px 0;display: block;}
+#new-container .new-list .new-li .new-icon{width: 18px;height: 18px;margin-top: 5px;box-sizing: border-box;display: block;background: url("/img/base/icon-news@2x.png");background-size: cover;float: left;}
+#new-container .new-list .new-li p{float: left;margin-left: 8px;}
+#new-container .new-list .new-li:hover{color: #E15616;text-decoration: line-through;}
+#new-container .new-more{float: right;line-height: 48px;font-size: 14px;color: #93979F;}
 /* 楼层 */
 /* 楼层 */
 .section_container{width:100%;height:auto;float:left}
 .section_container{width:100%;height:auto;float:left}
 .section_container .inner{width:1184px;margin:0 auto}
 .section_container .inner{width:1184px;margin:0 auto}

二進制
src/main/resources/static/img/base/icon-newbg@2x.png


二進制
src/main/resources/static/img/base/icon-newbgh5@2x.png


二進制
src/main/resources/static/img/base/icon-news-active@2x.png


二進制
src/main/resources/static/img/base/icon-news@2x.png


+ 11 - 0
src/main/resources/static/js/common/serviceapi/utils.service.js

@@ -424,6 +424,17 @@ var PublicApi = {
                 callback(res)
                 callback(res)
             });
             });
         },
         },
+        getHomeSaleTips:function(params,callback){ //获取关于我们
+            Http.AjaxService({
+                url:'/commodity/home/sale/tips',
+                type:'get',
+                data:params,
+                json:true
+            })
+            .then(function(res){
+                callback(res)
+            });
+        },
         confirmOrder:function (params,callback) {//提交订单
         confirmOrder:function (params,callback) {//提交订单
             Http.AjaxService({
             Http.AjaxService({
                 url:'/order/submit',
                 url:'/order/submit',

+ 211 - 0
src/main/resources/static/js/help/details.js

@@ -0,0 +1,211 @@
+;
+var orderPage = new Vue({
+    el: "#beansPage",
+    data: {
+        isRequset:false,
+        noMore: false,
+        tabsListIndex:0,
+        listQuery:{
+            userId:0,
+            pageNum:1,
+            pageSize:9
+        },
+        beansList:[],
+        listRecord: 0,
+        pageInput: '1',
+        modelType:0,
+        afterSale:'',
+    },
+    filters: {
+        TypeFormat:function(value) {
+            switch (value) {
+                case 0:
+                    return  '活动券';
+                    break;
+                case 1:
+                    return  '品类券';
+                    break;
+                case 2:
+                    return  '用户专享券';
+                    break;
+                case 3:
+                    return  '店铺券';
+                    break;
+                case 4:
+                    return  '新用户券';
+                    break;
+            }
+        }
+    },
+    computed: {
+        pageTotal: function () {
+            var total = Math.ceil(this.listRecord / this.listQuery.pageSize);
+            return total > 0 ? total : 1;
+        },
+        showPageBtn: function () {
+            var total = Math.ceil(this.listRecord / this.listQuery.pageSize);
+            total = total > 0 ? total : 1;
+            var index = this.listQuery.pageNum, arr = [];
+            if (total <= 6) {
+                for (var i = 1; i <= total; i++) {
+                    arr.push(i);
+                }
+                return arr;
+            }
+            if (index <= 3) return [1, 2, 3, 4, 5, 0, total];
+            if (index >= total - 2) return [1, 0, total - 4, total - 3, total - 2, total - 1, total];
+            return [1, 0, index - 2, index - 1, index, index + 1, index + 2, 0, total];
+        }
+    },
+    methods: {
+        getHomeSaleTips:function () {
+            var  _self = this;
+            PublicApi.getHomeSaleTips({},function (response) {
+                if(response.code == 0){
+                    var data = response.data;
+                    _self.afterSale = data.afterSale;
+                    _self.isRequset = false;
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            })
+        },
+        toPagination: function (pageNum) {//点击切换分页
+            if (pageNum <= this.pageTotal) {
+                this.listQuery.pageNum = pageNum;
+                this.QueryCouponCollarList();
+            }
+        },
+        checkNum: function () {//输入跳转分页
+            if (this.pageInput > this.pageTotal) {
+                this.pageInput = this.pageTotal;
+            } else if (this.pageInput < 1) {
+                this.pageInput = 1;
+            }
+        },
+        changeOrderFn:function(index,status){
+            var  _self = this;
+            _self.orderTabBarIndex = index;
+            _self.listQuery.orderState = status;
+            _self.listQuery.searchNo = '';
+            _self.listQuery.beginTime = '';
+            _self.listQuery.endTime = '';
+            _self.listQuery.pageNum = 1;
+            _self.isRequset = true;
+            _self.QueryCouponCollarList()
+        },
+        QueryCouponCollarList:function(){//查询优惠券列表
+            var _self = this;
+            ProductApi.QueryCouponCollarList(_self.listQuery,function (response) {
+                if(response.code == 0){
+                    var data = response.data;
+                    if( data.list && data.list.length>0) {
+                        _self.coupinList = [];
+                        _self.coupinList = data.list;
+                        _self.listRecord = data.total;
+                    }else{
+                        _self.coupinList = [];
+                        _self.coupinList = data.list;
+                        _self.listRecord = data.total;
+                    }
+                    _self.isRequset = false;
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            })
+        },
+        toBuyCoupon:function (coupon) {// 点击购买按钮事件处理
+            var  _self = this;
+            if(this.listQuery.userId == 0){
+                window.location.href='/login.html';
+            }else{
+                ProductApi.createCouponRecord({userId:_self.listQuery.userId, couponId:coupon.couponId}, function (response) {
+                    if(response.code == 0){
+                        let couponRecordId = response.data.couponRecordId
+                        window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
+                    }else{
+                        if(response.code == -1){//个人机构不能购买
+                            CAIMEI.Alert('该优惠券仅限医美机构购买,请升级为医美机构后再次购买。', '去升级', true, function(){
+                                window.location.href = "/user/setting/upgrade.html";
+                            });
+                        }else if(response.code == -2){//会员机构不是医美机构不能购买
+                            CAIMEI.dialog('该优惠券仅限医美机构购买',false,function () {});
+                        }else{
+                            CAIMEI.Alert(response.msg, '确定', false);
+                        }
+                    }
+                })
+            }
+        },
+        receiveCoupon:function(coupon){// 点击领取按钮事件处理
+            var  _self = this;
+            console.log(coupon)
+            if(_self.listQuery.userId == 0){
+                window.location.href='/login.html';
+            }else{
+                ProductApi.ReceiveCoupon({userId:_self.listQuery.userId, couponId:coupon.couponId, source:1}, function (response) {
+                    if(response.code == 0){
+                        CAIMEI.dialog('领取成功',true,function () {
+                            setTimeout(function(){
+                                coupon.couponBtnType = 1;
+                            },200)
+                        });
+                    }else{
+                        CAIMEI.Alert(response.msg, '确定', false);
+                    }
+                })
+            }
+        },
+        myClickCoupon:function (){// 我的优惠券跳转
+            var  _self = this;
+            if(_self.listQuery.userId>0){
+                window.location.href='/user/coupon.html';
+            }else{
+                window.location.href='/login.html';
+            }
+        },
+        toUseCoupon:function (coupon){// 去使用跳转路径
+            var _self = this;
+            switch (coupon.couponType) {
+                case 0:// 活动券跳转到商城首页 / 或者活动页(看是否指定了商品)
+                    if(coupon.productType == 1){
+                        _self.QueryCouponCollarList()
+                        window.open('/index.html');
+                    }else{
+                        _self.QueryCouponCollarList()
+                        window.open('/product/product-coupon.html?couponId='+coupon.couponId);
+                    }
+                    break;
+                case 1:// 品类券:跳转到产品 / 仪器页
+                    if(coupon.categoryType == 1){
+                        _self.QueryCouponCollarList()
+                        window.open('/product/type-287.html');
+                    }else{
+                        _self.QueryCouponCollarList()
+                        window.open('/product/type-286.html');
+                    }
+                    break;
+                case 2:// 专享券:跳转到商城首页
+                    _self.QueryCouponCollarList()
+                    window.open('/index.html');
+                    break;
+                case 3:// 店铺券:跳转到店铺首页
+                    _self.QueryCouponCollarList()
+                    window.open('/supplier-'+coupon.shopId+'.html');
+                    break;
+                case 4:// 新用户券:跳转到商城首页
+                    _self.QueryCouponCollarList()
+                    window.open('/index.html');
+                    break;
+            }
+        }
+    },
+    mounted: function () {
+        var _self = this;
+        if(globalUserData){
+            _self.userId = globalUserData.userId;
+            _self.listQuery.userId = _self.userId;
+        }
+        _self.getHomeSaleTips();
+    }
+});

+ 220 - 0
src/main/resources/static/js/help/news.js

@@ -0,0 +1,220 @@
+;
+var orderPage = new Vue({
+    el: "#beansPage",
+    data: {
+        isRequset:false,
+        noMore: false,
+        tabsListIndex:0,
+        listQuery:{
+            userId:0,
+            pageNum:1,
+            pageSize:9
+        },
+        beansList:[],
+        listRecord: 0,
+        pageInput: '1',
+        modelType:0,
+        newsList:[
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+            {id:1212,title:'12月德玛莉直播秒杀活动即将开始12月德玛莉直播秒杀活动即将开始',time:'2022年03月10日'},
+        ],
+    },
+    filters: {
+        TypeFormat:function(value) {
+            switch (value) {
+                case 0:
+                    return  '活动券';
+                    break;
+                case 1:
+                    return  '品类券';
+                    break;
+                case 2:
+                    return  '用户专享券';
+                    break;
+                case 3:
+                    return  '店铺券';
+                    break;
+                case 4:
+                    return  '新用户券';
+                    break;
+            }
+        }
+    },
+    computed: {
+        pageTotal: function () {
+            var total = Math.ceil(this.listRecord / this.listQuery.pageSize);
+            return total > 0 ? total : 1;
+        },
+        showPageBtn: function () {
+            var total = Math.ceil(this.listRecord / this.listQuery.pageSize);
+            total = total > 0 ? total : 1;
+            var index = this.listQuery.pageNum, arr = [];
+            if (total <= 6) {
+                for (var i = 1; i <= total; i++) {
+                    arr.push(i);
+                }
+                return arr;
+            }
+            if (index <= 3) return [1, 2, 3, 4, 5, 0, total];
+            if (index >= total - 2) return [1, 0, total - 4, total - 3, total - 2, total - 1, total];
+            return [1, 0, index - 2, index - 1, index, index + 1, index + 2, 0, total];
+        }
+    },
+    methods: {
+        toPagination: function (pageNum) {//点击切换分页
+            if (pageNum <= this.pageTotal) {
+                this.listQuery.pageNum = pageNum;
+                this.QueryCouponCollarList();
+            }
+        },
+        checkNum: function () {//输入跳转分页
+            if (this.pageInput > this.pageTotal) {
+                this.pageInput = this.pageTotal;
+            } else if (this.pageInput < 1) {
+                this.pageInput = 1;
+            }
+        },
+        changeOrderFn:function(index,status){
+            var  _self = this;
+            _self.orderTabBarIndex = index;
+            _self.listQuery.orderState = status;
+            _self.listQuery.searchNo = '';
+            _self.listQuery.beginTime = '';
+            _self.listQuery.endTime = '';
+            _self.listQuery.pageNum = 1;
+            _self.isRequset = true;
+            _self.QueryCouponCollarList()
+        },
+        QueryCouponCollarList:function(){//查询优惠券列表
+            var _self = this;
+            ProductApi.QueryCouponCollarList(_self.listQuery,function (response) {
+                if(response.code == 0){
+                    var data = response.data;
+                    if( data.list && data.list.length>0) {
+                        _self.coupinList = [];
+                        _self.coupinList = data.list;
+                        _self.listRecord = data.total;
+                    }else{
+                        _self.coupinList = [];
+                        _self.coupinList = data.list;
+                        _self.listRecord = data.total;
+                    }
+                    _self.isRequset = false;
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            })
+        },
+        toBuyCoupon:function (coupon) {// 点击购买按钮事件处理
+            var  _self = this;
+            if(this.listQuery.userId == 0){
+                window.location.href='/login.html';
+            }else{
+                ProductApi.createCouponRecord({userId:_self.listQuery.userId, couponId:coupon.couponId}, function (response) {
+                    if(response.code == 0){
+                        let couponRecordId = response.data.couponRecordId
+                        window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
+                    }else{
+                        if(response.code == -1){//个人机构不能购买
+                            CAIMEI.Alert('该优惠券仅限医美机构购买,请升级为医美机构后再次购买。', '去升级', true, function(){
+                                window.location.href = "/user/setting/upgrade.html";
+                            });
+                        }else if(response.code == -2){//会员机构不是医美机构不能购买
+                            CAIMEI.dialog('该优惠券仅限医美机构购买',false,function () {});
+                        }else{
+                            CAIMEI.Alert(response.msg, '确定', false);
+                        }
+                    }
+                })
+            }
+        },
+        receiveCoupon:function(coupon){// 点击领取按钮事件处理
+            var  _self = this;
+            console.log(coupon)
+            if(_self.listQuery.userId == 0){
+                window.location.href='/login.html';
+            }else{
+                ProductApi.ReceiveCoupon({userId:_self.listQuery.userId, couponId:coupon.couponId, source:1}, function (response) {
+                    if(response.code == 0){
+                        CAIMEI.dialog('领取成功',true,function () {
+                            setTimeout(function(){
+                                coupon.couponBtnType = 1;
+                            },200)
+                        });
+                    }else{
+                        CAIMEI.Alert(response.msg, '确定', false);
+                    }
+                })
+            }
+        },
+        myClickCoupon:function (){// 我的优惠券跳转
+            var  _self = this;
+            if(_self.listQuery.userId>0){
+                window.location.href='/user/coupon.html';
+            }else{
+                window.location.href='/login.html';
+            }
+        },
+        toUseCoupon:function (coupon){// 去使用跳转路径
+            var _self = this;
+            switch (coupon.couponType) {
+                case 0:// 活动券跳转到商城首页 / 或者活动页(看是否指定了商品)
+                    if(coupon.productType == 1){
+                        _self.QueryCouponCollarList()
+                        window.open('/index.html');
+                    }else{
+                        _self.QueryCouponCollarList()
+                        window.open('/product/product-coupon.html?couponId='+coupon.couponId);
+                    }
+                    break;
+                case 1:// 品类券:跳转到产品 / 仪器页
+                    if(coupon.categoryType == 1){
+                        _self.QueryCouponCollarList()
+                        window.open('/product/type-287.html');
+                    }else{
+                        _self.QueryCouponCollarList()
+                        window.open('/product/type-286.html');
+                    }
+                    break;
+                case 2:// 专享券:跳转到商城首页
+                    _self.QueryCouponCollarList()
+                    window.open('/index.html');
+                    break;
+                case 3:// 店铺券:跳转到店铺首页
+                    _self.QueryCouponCollarList()
+                    window.open('/supplier-'+coupon.shopId+'.html');
+                    break;
+                case 4:// 新用户券:跳转到商城首页
+                    _self.QueryCouponCollarList()
+                    window.open('/index.html');
+                    break;
+            }
+        }
+    },
+    mounted: function () {
+        var _self = this;
+        if(globalUserData){
+            _self.userId = globalUserData.userId;
+            _self.listQuery.userId = _self.userId;
+        }
+        // _self.QueryCouponCollarList();
+    }
+});

+ 9 - 0
src/main/resources/static/js/index.js

@@ -8,6 +8,10 @@ var homeData = new Vue({
         // liveList:[],//右侧直播模块
         // liveList:[],//右侧直播模块
         // cmImageList:[],//右侧活动模块
         // cmImageList:[],//右侧活动模块
         // infoList:[],//右侧文章模块
         // infoList:[],//右侧文章模块
+        newsList:[
+            {id:122,name:'《机构协议》变更通知'},
+            {id:122,name:'12月德玛莉直播秒杀活动即将开始'},
+        ],
         popupFlag:false,
         popupFlag:false,
         couponEntry:2,// 活动优惠券弹窗显示控制
         couponEntry:2,// 活动优惠券弹窗显示控制
         homePageFloor:[]//楼层
         homePageFloor:[]//楼层
@@ -90,6 +94,11 @@ var homeData = new Vue({
             PublicApi.GetHomeInit({ source: 1 },function(response){
             PublicApi.GetHomeInit({ source: 1 },function(response){
                 if(response.code == 0){
                 if(response.code == 0){
                     _self.couponEntry = response.data.couponEntry
                     _self.couponEntry = response.data.couponEntry
+                    if(isPC){
+                        _self.newsList = response.data.bannerList.slice(0,2)
+                    }else{
+                        _self.newsList = response.data.bannerList.slice(0,1)
+                    }
                     console.log('couponEntry', _self.couponEntry)
                     console.log('couponEntry', _self.couponEntry)
                     console.log('GLOBAL_USER_ID', GLOBAL_USER_ID)
                     console.log('GLOBAL_USER_ID', GLOBAL_USER_ID)
                     if(GLOBAL_USER_ID == 0 &&_self.couponEntry == 1){
                     if(GLOBAL_USER_ID == 0 &&_self.couponEntry == 1){

+ 33 - 0
src/main/resources/templates/help/details.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="https://www.thymeleaf.org ">
+<head>
+  <title>采美365网-公告内容</title>
+  <template th:replace="components/head-link"></template>
+  <link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
+  <link th:href="@{/css/help/details.css(v=${version})}" rel="stylesheet" type="text/css">
+  <template th:replace="components/analysis"></template>
+</head>
+<body>
+<!-- 引用头部 -->
+<template th:replace="components/header"></template>
+<div id="beansPage" v-cloak>
+  <div class="navLayout" v-cloak>
+    <div class="wrap clear">
+      <!--loading-->
+      <div v-if="isRequset" class="loading">
+        <img src="/img/base/loading.gif">
+      </div>
+      <div class="news-container clear" v-else>
+        <div class="news-container-html" v-html="afterSale"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<!-- 引入底部 -->
+<template th:replace="components/footer"></template>
+<template th:replace="components/foot-link"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/utils.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/help/details.js(v=${version})}"></script>
+</body>
+</html>

+ 66 - 0
src/main/resources/templates/help/news.html

@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="https://www.thymeleaf.org ">
+<head>
+  <title>采美365网-所有公告</title>
+  <template th:replace="components/head-link"></template>
+  <link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
+  <link th:href="@{/css/help/news.css(v=${version})}" rel="stylesheet" type="text/css">
+  <template th:replace="components/analysis"></template>
+</head>
+<body>
+<!-- 引用头部 -->
+<template th:replace="components/header"></template>
+<!-- 采美豆明细 -->
+<div id="beansPage" v-cloak>
+  <div class="navLayout" v-cloak>
+    <div class="news-title">
+      <div class="news-name">所有公告</div>
+    </div>
+    <div class="wrap clear">
+        <!--loading-->
+        <div v-if="isRequset" class="loading">
+          <img src="/img/base/loading.gif">
+        </div>
+        <div class="news-container clear" v-else>
+          <div class="news-content-list clear" v-if="newsList.length > 0">
+            <a href="/news/details.html" target="_blank" class="news-list-cell" v-for="(list, index) in newsList" :key="index">
+              <div class="news-list-le">
+                <span class="new-icon"></span>
+                <p>{{ list.title }}</p>
+              </div>
+              <div class="news-list-ri">
+                {{ list.time }}
+              </div>
+            </a>
+          </div>
+          <div v-else class="empty">
+            <img src="/img/account/icon-coupon-empty@2x.png">
+            <div class="msg"><p>暂无可领的优惠券</p></div>
+          </div>
+        </div>
+        <!--分页-->
+        <div v-if="(!isPC) && noMore" class="noMore">---- 没有更多了 ----</div>
+        <div v-if="isPC && pageTotal>1" class="pageWrap clear">
+          <a v-if="listQuery.pageNum>1" class="prev" @click="toPagination(listQuery.pageNum*1-1)" href="javascript:void(0);"></a>
+          <template v-for="n in showPageBtn">
+            <a v-if="n" :class="{'on':(n==listQuery.pageNum)}" @click="toPagination(n)" href="javascript:void(0);" v-text="n"></a>
+            <span v-else>···</span>
+          </template>
+          <a v-if="listQuery.pageNum<pageTotal" class="next" @click="toPagination(listQuery.pageNum*1+1)" href="javascript:void(0);"></a>
+          <span>共<b v-text="pageTotal>1?pageTotal:1"></b>页</span>
+          <span>跳至</span>
+          <input v-model="pageInput" @blur="checkNum()"/>
+          <span>页</span>&nbsp;
+          <a class="btn" href="javascript:void(0);" @click="toPagination(pageInput)">点击跳转</a>
+        </div>
+    </div>
+  </div>
+</div>
+<!-- 引入底部 -->
+<template th:replace="components/footer"></template>
+<template th:replace="components/foot-link"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/product.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/help/news.js(v=${version})}"></script>
+</body>
+</html>

+ 12 - 0
src/main/resources/templates/index.html

@@ -36,6 +36,18 @@
             <p th:text="${menu.name}"></p>
             <p th:text="${menu.name}"></p>
         </a>
         </a>
     </div>
     </div>
+    <div id="new-container" class="section_container">
+        <div class="inner">
+            <div class="new-label">公告:</div>
+            <div class="new-list">
+                <a href="/news/details.html" target="_blank" class="new-li" v-for="(list ,index) in newsList" :key="index">
+                    <span class="new-icon"></span>
+                    <p>{{ list.title }}</p>
+                </a>
+            </div>
+            <a href="/news.html" class="new-more"> 更多>> </a>
+        </div>
+    </div>
     <!--首页楼层主体数据-->
     <!--首页楼层主体数据-->
     <div class="section_container">
     <div class="section_container">
         <div class="inner">
         <div class="inner">