Browse Source

供应商发布商品、首页新品橱窗

zhengjinyi 3 years ago
parent
commit
f3096573fe

+ 13 - 6
src/main/resources/static/js/flea-market/form.js

@@ -193,6 +193,13 @@ var fleaMarketForm = new Vue({
         contains:function(arr, val) {// 校验
             return arr.some(item => item === val)
         },
+        handleMobileCodeInput(){//
+            this.vShow_checkCode = false;
+        },
+        handleMobileAddresInput(){//
+            this.vShow_TownId = false;
+            this.vShow_Address = false;
+        },
         handleMobileInput:function () {// 控制联系人手机号显示获取验证码按钮
             var re = /^1\d{10}$/;
             if(re.test(this.secondParams.contactMobile)){
@@ -279,7 +286,7 @@ var fleaMarketForm = new Vue({
             if(_this.secondParams.checkCode == ''){
                 _this.vShow_checkCode = true;
                 _this.fromMessage = '请输入短信验证码';
-                _this.scrollIntoView('vShow_Price');
+                _this.scrollIntoView('secondHandrelease');
                 setTimeout(function(){
                     _this.vShow_checkCode = false;
                 },3000);
@@ -317,7 +324,7 @@ var fleaMarketForm = new Vue({
             if(_this.secondParams.name == ''){
                 _this.vShow_Name = true;
                 _this.fromMessage = '请输入商品名称';
-                _this.scrollIntoView('vShowsecondHandType');
+                _this.scrollIntoView('secondHandrelease');
                 setTimeout(function(){
                     _this.vShow_Name = false;
                 },3000);
@@ -327,7 +334,7 @@ var fleaMarketForm = new Vue({
                 if(_this.secondParams.companyName == ''){
                     _this.vShow_companyName = true;
                     _this.fromMessage = '请输入公司名称';
-                    _this.scrollIntoView('vShowsecondHandType');
+                    _this.scrollIntoView('vShow_Name');
                     setTimeout(function(){
                         _this.vShow_companyName = false;
                     },3000);
@@ -337,7 +344,7 @@ var fleaMarketForm = new Vue({
              if(_this.secondParams.productQuality == ''){
                   _this.vShow_shopColor = true;
                   _this.fromMessage = '请输入商品成色';
-                  _this.scrollIntoView('vShow_FixedYears');
+                  _this.scrollIntoView('vShow_Name');
                     setTimeout(function(){
                         _this.vShow_shopColor = false;
                     },3000);
@@ -346,7 +353,7 @@ var fleaMarketForm = new Vue({
               if(_this.secondParams.townId == ''|| _this.secondParams.townId == undefined){
                   _this.vShow_TownId = true;
                   _this.fromMessage = '请完善联系地址';
-                  _this.scrollIntoView('vShow_caimeiMobile');
+                  _this.scrollIntoView('vShow_Name');
                   setTimeout(function(){
                       _this.vShow_TownId = false;
                   },3000);
@@ -355,7 +362,7 @@ var fleaMarketForm = new Vue({
              if(_this.secondParams.address == ''){
                   _this.vShow_Address = true;
                   _this.fromMessage = '请填写详细地址';
-                  _this.scrollIntoView('vShow_caimeiMobile');
+                  _this.scrollIntoView('vShow_Name');
                   setTimeout(function(){
                         _this.vShow_Address = false;
                     },3000);

+ 3 - 2
src/main/resources/static/js/supplier-center/shop/release.js

@@ -58,7 +58,7 @@ var releaseContainer = new Vue({
             trainingMethod:0,// 线上培训方式
             trainingType:0,// 售价包含培训费用
             trainingFee:'',
-            newvalidFlag:0,// 新品商品状态  0.参与 2.未参与
+            newProductType:0,// 新品商品状态  0.参与 2.未参与
         },
         params:{
             param:[],//相关参数
@@ -170,6 +170,7 @@ var releaseContainer = new Vue({
                     _this.releaseParams.step = data.step;
                     _this.releaseParams.byFlag = data.byFlag;
                     _this.releaseParams.allAreaFlag = data.allAreaFlag;
+                    _this.releaseParams.newProductType = data.newProductType;
                     _this.releaseParams.detailInfo = data.productDetail.detailInfo;
                     _this.releaseParams.serviceInfo = data.productDetail.serviceInfo;
                     _this.releaseParams.orderInfo = data.productDetail.orderInfo;
@@ -591,7 +592,7 @@ var releaseContainer = new Vue({
             }
         },
         radioChangeNewvalidFlag: function(event){//选择新品展示
-            this.releaseParams.newvalidFlag= event.target.value;
+            this.releaseParams.newProductType= event.target.value;
         },
         addProvinceFn: function(item){//选择指定区域
             item.isChecked = ! item.isChecked;

+ 2 - 1
src/main/resources/templates/flea-market/form.html

@@ -53,7 +53,7 @@
                 </div>
                 <div class="unlogin-item input-item shrink-spacing" id="vShow_checkCode">
                     <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>验证码:</div>
-                    <input class="code" type="text"  maxlength="6" v-model="secondParams.checkCode" placeholder="请输入验证码">
+                    <input class="code" type="text"  maxlength="6" v-model="secondParams.checkCode"   @blur="handleMobileCodeInput" placeholder="请输入验证码">
                     <a class="getCode" href="javascript:void(0);" @click="getNewMobileCodeFn" :class="[isMobileDisabled  ? 'disabled' : '']">{{ mobileCodeText }}</a>
                     <span class="release-tips errTips icon mIcon" v-show="vShow_checkCode">{{fromMessage}}</span>
                 </div>
@@ -147,6 +147,7 @@
                     <span class="release-tips errTips icon mIcon" v-show="vShow_TownId">{{fromMessage}}</span>
                     <textarea type="text" id="addressDetails" class="border-grey address-details"
                               v-model="secondParams.address" maxlength="50"
+                              @blur="handleMobileAddresInput"
                               placeholder="请填写详细地址,如街道/小区/门牌等"/></textarea>
                     <span class="release-tips errTips icon mIcon" v-show="vShow_Address">{{fromMessage}}</span>
                 </div>

+ 14 - 11
src/main/resources/templates/index.html

@@ -142,7 +142,7 @@
                         <div class="swiper-container-floor hotList" id="recommendBox">
                             <div class="section_page_main type_08 swiper-wrapper recommendBox-wrapper clear mfw section_8 max">
                                 <!-- 商品/图片 列表 -->
-                                <a :href="pros.link" class="page_main_item hot ad_04 swiper-slide" target="_blank" v-for="pros in floor.floorImageList4">
+                                <a :href="'/product-'+pros.product.productId+'.html'" class="page_main_item hot ad_04 swiper-slide" target="_blank" v-for="pros in floor.floorImageList4">
                                     <img class="page_main_image" src="/img/base/placeholder.png" :data-original="pros.product.image" :alt="pros.name">
                                     <div class="page_main_type" v-if="pros && pros.product.productType && pros.product.productType === 2">医疗器械</div>
                                     <div class="page_main_text">
@@ -220,7 +220,7 @@
                                     </div>
                                 </a>
                             </div>
-                            <div class="swiper-pagination swiper-pagination-floor mfc hot"  :data-id="floor.newfloorlist.length"></div>
+                            <div class="swiper-pagination swiper-pagination-floor mfc hot"  :data-id="floor.floorImageList4.length"></div>
                         </div>
                     </div>
                     <!--楼层-->
@@ -380,7 +380,7 @@
                 </template>
                 <template v-else>
                     <!--静态化固定楼层-->
-                    <div class="section_page section_page_user hot" th:each="floor,stat : ${floorJson.get('PageFloor')}">
+                    <div class="section_page section_page_user hot" th:each="floor,stat : ${floorJson.get('pageFloorList')}">
                         <div class="section_page_title">
                             <h1 th:text="${floor.get('title')}" data-id="0"></h1>
                             <p th:text="${floor.get('detail')}"></p>
@@ -391,18 +391,19 @@
                                 <!-- 商品/图片 列表 -->
                                 <th:block th:each="pros : ${floor.get('floorImageList4')}"  th:object="${pros}">
                                     <a th:href="*{link}" class="page_main_item hot ad_04 swiper-slide" target="_blank">
-                                        <img class="page_main_image" src="/img/base/placeholder.png" th:attr="data-original=*{image}" th:alt="*{name}">
+                                        <th:block th:if="${pros.get('product')}!=null" th:object="${pros.get('product')}">
+                                            <img class="page_main_image" src="/img/base/placeholder.png" th:attr="data-original=*{image}" th:alt="*{name}">
+                                        </th:block>
                                         <th:block th:if="${pros.get('product')}!=null" th:object="${pros.get('product')}">
                                             <div class="page_main_type" th:if="*{productType}==2">医疗器械</div>
                                         </th:block>
-                                        <div class="page_main_tag" th:if="*{listType}==2"><p th:text="*{label}"></p></div>
                                         <div class="page_main_text">
                                             <th:block th:if="${pros.containsKey('product')}">
                                                 <span class="tag" th:if="${pros.get('product').containsKey('beautyActFlag')} and ${pros.get('product').get('beautyActFlag')}==1">美博会</span>
                                             </th:block>
-                                            <span th:text="${pros.get('name')}"></span>
+                                            <span th:text="${pros.get('product').get('name')}"></span>
                                         </div>
-                                        <div class="page_main_price" th:if="*{listType}==1">
+                                        <div class="page_main_price">
                                             <th:block th:if="${pros.get('product')}!=null" th:object="${pros.get('product')}">
                                                 <!-- 商品价格 -->
                                                 <div th:attr="class=*{'main_price_text product_'+productId}, data-id=*{productId}">
@@ -411,9 +412,11 @@
                                                         <div class="price_text_tag">
                                                             <p class="couponTag" th:if="*{couponsLogo}">优惠券</p>
                                                             <!--超级会员价格标签 svipProductFlag 1:超级会员优惠商品 0 不是商超级会员优惠商品-->
-                                                            <div class="svip-tag" th:if="*{svipProductFlag}==1">
-                                                                <div class="svip-icon">SVIP</div>
-                                                            </div>
+                                                            <th:block th:if="${svipProductFlag}!=null">
+                                                                <div class="svip-tag" th:if="*{svipProductFlag}==1">
+                                                                    <div class="svip-icon">SVIP</div>
+                                                                </div>
+                                                            </th:block>
                                                             <p class="listTag" th:if="*{actStatus}==1 and ${pros.get('product').get('promotions')}!=null">
                                                                 <template th:text="*{promotions.name}"></template>
                                                                 <th:block th:if="*{promotions.type}==1 and *{promotions.mode}==1">
@@ -438,7 +441,7 @@
                                     </a>
                                 </th:block>
                             </div>
-                            <div class="swiper-pagination swiper-pagination-floor mfc" th:attr="data-id=${floor.get('floorImageList').size}"></div>
+                            <div class="swiper-pagination swiper-pagination-floor mfc" th:attr="data-id=${floor.get('floorImageList4').size}"></div>
                         </div>
                     </div>
                     <!--静态化普通楼层-->

+ 5 - 5
src/main/resources/templates/supplier-center/shop/goods.html

@@ -246,11 +246,11 @@
                                     </div>
                                 </div>
                                 <div class="good-handle">
-                                        <a class="btn down" href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="ItemDownshelf(product)">下架</a>
-                                        <a class="btn success" href="javascript: void(0);" v-if="product.isAddFeatured" @click="AddPushHotFn(product)">添加主页推荐</a>
-                                        <a class="btn danger" href="javascript: void(0);" v-if="product.isDelFeatured" @click="DeletePushHotFn(product)">删除主页推荐</a>
-                                        <a class="btn primary" href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="pageLinkDetils(product)">查看</a>
-                                    </div>
+                                    <a class="btn down" href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="ItemDownshelf(product)">下架</a>
+                                    <a class="btn success" href="javascript: void(0);" v-if="product.isAddFeatured" @click="AddPushHotFn(product)">添加主页推荐</a>
+                                    <a class="btn danger" href="javascript: void(0);" v-if="product.isDelFeatured" @click="DeletePushHotFn(product)">删除主页推荐</a>
+                                    <a class="btn primary" href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="pageLinkDetils(product)">查看</a>
+                                </div>
                             </div>
                           </div>
                         </div>

+ 2 - 2
src/main/resources/templates/supplier-center/shop/release.html

@@ -484,11 +484,11 @@
                                 <div class="release-input">
                                     <div class="release-props">
                                         <label class="release-radio">
-                                            <input type="radio" name="byFlag" v-model="releaseParams.newvalidFlag" value="0"  @click="radioChangeNewvalidFlag">
+                                            <input type="radio" name="byFlag" v-model="releaseParams.newProductType" value="0"  @click="radioChangeNewvalidFlag">
                                             <i class="icon mIcon">参与</i>
                                         </label>
                                         <label class="release-radio">
-                                            <input type="radio" name="byFlag" v-model="releaseParams.newvalidFlag" value="2" checked @click="radioChangeNewvalidFlag">
+                                            <input type="radio" name="byFlag" v-model="releaseParams.newProductType" value="2" checked @click="radioChangeNewvalidFlag">
                                             <i class="icon mIcon">不参与</i>
                                         </label>
                                     </div>