Browse Source

bugfix1-发布商品

chao 4 years ago
parent
commit
3e6010cf88

+ 8 - 2
src/main/resources/static/js/center.js

@@ -3,11 +3,17 @@ $(function(){
     //GLOBAL_USER_IDENTITY: 2-会员机构;3-供应商;4-普通机构
     var pageFlag = window.location.pathname.split("/")[1];
     if (pageFlag == "supplier" && (GLOBAL_USER_IDENTITY=== 2 || GLOBAL_USER_IDENTITY===4)) {
+        // 机构访问供应商页面直接跳转机构个人中心
         window.location.href = "/user/dashboard.html";
     }else if (pageFlag == "user" && (GLOBAL_USER_IDENTITY === 1 || GLOBAL_USER_IDENTITY===3)) {
+        // 供应商访问机构页面直接跳转供应商个人中心
         window.location.href = "/supplier/dashboard.html";
-    }else{
-        return;
+    }
+    // 登录状态判断
+    if (!globalUserData || !GLOBAL_USER_ID){
+        CAIMEI.Alert("登录已失效,请重新登录", '确定', true, function(){
+            window.location.href = "/login.html";
+        });
     }
 });
 

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

@@ -208,6 +208,16 @@ var releaseContainer = new Vue({
                     }else{
                         _this.paramKeyList = data.parametersList;
                     }
+                    // 下拉列表初始化
+                    setTimeout(function(){
+                        _this.ChangeClassificationFirst({bigTypeId:data.bigTypeId, name:data.bigTypeName});
+                        setTimeout(function(){
+                            _this.ChangeClassificationTwo({smallTypeId:data.smallTypeId, name:data.smallTypeName});
+                            setTimeout(function(){
+                                _this.ChangeClassificationThree({tinyTypeId:data.tinyTypeId, name:data.tinyTypeName});
+                            },500);
+                        },500);
+                    },500);
                 }else{
                     CAIMEI.Alert(response.msg, '确定', false);
                 }
@@ -425,7 +435,7 @@ var releaseContainer = new Vue({
             _this.classificationThreeList =[];
             _this.isSelectActive = 0;
             if(_this.releaseParams.bigTypeId!=''){
-                 _this.GetTwoClassFn(_this.releaseParams.bigTypeId);
+                 _this.GetTwoClassFn(option.bigTypeId);
             }
         },
         ChangeClassificationTwo: function(option){//选择二级分类
@@ -436,7 +446,7 @@ var releaseContainer = new Vue({
             _this.releaseParams.smallTypeId = option.smallTypeId;
             _this.releaseParams.twoClassifyName = option.name;
             _this.isSelectActive = 0;
-            _this.GetThreeClassFn(_this.releaseParams.smallTypeId);
+            _this.GetThreeClassFn(option.smallTypeId);
         },
         ChangeClassificationThree: function(option){//选择三级分类
             var _this = this;
@@ -1108,6 +1118,10 @@ var releaseContainer = new Vue({
             this.newNum = value;
         },
     },
+    created: function () {
+        // 获取初始一级分类菜单
+        this.GetFistClassFn(this.releaseParams.commodityType);
+    },
     mounted: function () {
         var _this = this;
         // var NODE_ENV_BASE_URL = $('#spiServer').val();
@@ -1122,6 +1136,5 @@ var releaseContainer = new Vue({
                 _this.GetEditReleaseProductInfo(_this.productId);
             }
         }
-         _this.GetFistClassFn(_this.releaseParams.commodityType)
     }
 });

+ 2 - 2
src/main/resources/templates/account/login.html

@@ -22,12 +22,12 @@
             </div>
             <form v-show="!qrCodeLogin">
                 <div class="formLine">
-                    <input type="text" v-model="loginAccount" placeholder="请输入邮箱或手机号" :rule="rule.account" maxlength="30" @blur="blurHandle($event)" needverify>
+                    <input type="text" v-model.trim="loginAccount" placeholder="请输入邮箱或手机号" :rule="rule.account" maxlength="30" @blur="blurHandle($event)" needverify>
                     <i class="checked icon mIcon"></i>
                     <span class="errTips icon mIcon" tips="请提供正确的邮箱或手机号码"></span>
                 </div>
                 <div class="formLine">
-                    <input type="password" v-model="loginPassword" placeholder="请输入密码" :rule="rule.password" maxlength="30" @blur="blurHandle($event)" needverify>
+                    <input type="password" v-model.trim="loginPassword" placeholder="请输入密码" :rule="rule.password" maxlength="30" @blur="blurHandle($event)" needverify>
                     <i class="checked icon mIcon"></i>
                     <span class="errTips icon mIcon" tips="请输入正确的密码"></span>
                     <i class="icon showPwd" @click="showPassword($event)"></i>