فهرست منبع

机构注册、供应商注册~

zhengjinyi 4 سال پیش
والد
کامیت
c56e855da7

+ 2 - 1
src/main/resources/static/css/account/register.css

@@ -20,6 +20,7 @@ footer .footTop{display:none;}
 .subLine{margin-top: 20px;float: left;}
 .subLine .btn-upgrade {cursor: pointer;display: block;width: 232px;height: 50px;line-height: 50px;background-color: #e15616;border-radius: 2px;text-align: center;font-size: 18px;color: #FFF;float: left;margin-right: 15px;}
 .subLine .btn-upgrade.none{border: 1px solid #E15616;background-color: #ffe6dc;box-shadow: 0px 3px 6px 0px rgba(249, 75, 75, 0.17);color: #e15616;}
+.subLine .btn-upgrade.disabled{background-color: #999999;}
 .formLine{width: 100%;float: left;}
 
 .formLine .form-upload{width: 128px;height: auto;float: left;margin-right: 20px;}
@@ -135,5 +136,5 @@ footer{display:none}
 .subLine{margin-top:2vw;float: left;}
 .subLine .btn-upgrade {cursor: pointer;display: block;width: 93.4vw;height: 11.2vw;line-height: 50px;background-color: #e15616;border-radius: 0.2vw;text-align: center;font-size: 3.4vw;color: #FFF;float: left;margin-bottom: 2.8vw;}
 .subLine .btn-upgrade.none{border: 1px solid #E15616;background-color: #ffe6dc;box-shadow: 0px 3px 6px 0px rgba(249, 75, 75, 0.17);color: #e15616;}
-
+.subLine .btn-upgrade.disabled{background-color: #999999;}
 }

+ 2 - 0
src/main/resources/static/css/base/form.css

@@ -37,6 +37,7 @@
 .subLine .errTips.show{visibility:visible}
 .subLine .errTips:before{width:20px;height:20px;background-position:-172px -296px;vertical-align:top}
 .subLine .btn{cursor: pointer;display:block;margin:32px auto;width:232px;height:50px;line-height:50px;background-color:#e15616;border-radius:2px;text-align:center;font-size:18px;color:#FFF}
+.subLine .btn.disabled{background-color: #999999;}
 .subLine .iconfont{width:16px;height: 16px;display: block;background:url(/img/base/icon.png) no-repeat;float: left;margin-right: 5px;cursor: pointer;}
 .subLine .icon-weigouxuan{background-position: -236px 0;}
 .subLine .icon-gouxuan{background-position: -210px 0;}
@@ -83,6 +84,7 @@
 .subLine p input{margin-right:1vw;}
 .subLine p a{color:#1890f9}
 .subLine .btn{display:block;margin:5vw auto;width:100%;height:11.2vw;line-height:11.2vw;background-color:#e15616;border-radius:.2vw;text-align:center;font-size:3.4vw;color:#FFF}
+.subLine .btn.disabled{background-color: #999999;}
 .subLine .iconfont{width:4vw;height: 4vw;display: block;background:url(/img/base/icon_m.png) no-repeat;float: left;margin-right: 1vw;cursor: pointer;background-size: 100vw;}
 .subLine .icon-weigouxuan{background-position: -10vw -54.1vw;}
 .subLine .icon-gouxuan{background-position: -1vw -54.1vw;}

+ 2 - 2
src/main/resources/static/js/account/login.js

@@ -84,7 +84,7 @@ var loginPage = new Vue({
                             spId: response.data.serviceProviderID,
                             clubId: response.data.clubID,
                             shopId: response.data.shopID,
-                            identity: response.data.userIdentity,
+                            userIdentity: response.data.userIdentity,
                             permission: response.data.userPermission,
                             token: response.data.token
                         };
@@ -134,7 +134,7 @@ var loginPage = new Vue({
                             spId: response.data.serviceProviderID,
                             clubId: response.data.clubID,
                             shopId: response.data.shopID,
-                            identity: response.data.userIdentity,
+                            userIdentity: response.data.userIdentity,
                             permission: response.data.userPermission,
                             token: response.data.token
                         };

+ 8 - 3
src/main/resources/static/js/account/register-club.js

@@ -2,7 +2,7 @@ var registerPage = new Vue({
     el: "#registerPage",
     data: {
         loginLoading: false,
-        showTabContentIndex:2,
+        showTabContentIndex:1,
         showSupplierConfirm:true,
         advisoryStatus: false,
         showClass:'',
@@ -96,6 +96,10 @@ var registerPage = new Vue({
                     _self.isShowAgree = true;
                     return;
                 }
+                if(_self.clubUser.password2!=_self.clubUser.password){
+                    CAIMEI.dialog('两次密码输入不一致',false,function () {});
+                    return;
+                }
                 var params = {
                         userName : _self.clubUser.name,
                         bindMobile : _self.clubUser.phone,
@@ -183,14 +187,16 @@ var registerPage = new Vue({
             this.$nextTick(function() {
                 if (!pass) {return false;}
                 _self.clubUpgradeUser.mainPros = _self.userMainPros.join("/");
-                console.log(_self.clubUpgradeUser.mainPros);
+                _self.loginLoading = true;
                 UserApi.ClubUpgrade(_self.clubUpgradeUser,function (response) {
                     if(response.code === 0){
                         CAIMEI.Alert('您的升级申请已提交审核','确定',true,function () {
                             _self.clubLoginIndex();
+                            _self.loginLoading = false;
                         });
                     } else {
                         CAIMEI.Alert(response.msg,'确定',false);
+                        _self.loginLoading = false;
                     }
                 });
             });
@@ -240,7 +246,6 @@ var registerPage = new Vue({
                         if(_self.checkedArray(_self.mainProEdit,_self.mentuzCampNullList)){
                             CAIMEI.dialog('主营内容已存在!',false);
                         }else {
-
                             _self.mentuzCampNullList.push(obj);
                         }
                     }else{

+ 8 - 1
src/main/resources/static/js/account/register-supplier.js

@@ -73,13 +73,20 @@ var registerPage = new Vue({
                     _self.isShowAgree = true;
                     return;
                 }
+                if(_self.supplierUser.passWordConfirm!=_self.supplierUser.password){
+                    CAIMEI.dialog('两次密码输入不一致',false,function () {});
+                    return;
+                }
+                _self.loginLoading = true;
                 UserApi.SupplierRgister(_self.supplierUser,function (response) {
                     if(response.code === 0){
                         CAIMEI.Alert('您的资料已提交成功,系统将在1-2个工作日内进行审核~','知道了',true,function () {
                             window.location.href = '/index.html';
+                            _self.loginLoading = false;
                         });
                     } else {
-                        alertInfo(response.msg);
+                        CAIMEI.Alert(response.msg,'确定',false);
+                        _self.loginLoading = false;
                     }
                 });
             });

+ 12 - 1
src/main/resources/static/js/base.js

@@ -19,6 +19,8 @@ var globalHead = new Vue({
             productCount: 0,
             priceTotal: 0
         },
+        shopId:'',
+        userIdentity:'',
         articleType: ''
     },
     methods: {
@@ -62,6 +64,9 @@ var globalHead = new Vue({
                 }
             });
         },
+        pageLinkSupplier: function(){//预览商品
+            window.open('/supplier/index.html?id='+this.shopId);
+        },
         // 退出登录
         userLogOut: function(){
             localStorage.removeItem('userInfo');
@@ -83,7 +88,13 @@ var globalHead = new Vue({
         }
         // 信息中心
         this.articleType = getUrlParam("type");
-
+    },
+    mounted:function(){
+        var userData =JSON.parse(window.localStorage.getItem('userInfo'));
+        if(userData!=null){
+            this.userIdentity = userData.userIdentity;
+            this.shopId = userData.shopId;
+        }
     }
 });
 // 初始化效果

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

@@ -32,7 +32,7 @@
                     <i class="icon showPwd" @click="showPassword($event)"></i>
                 </div>
                 <div class="forget">
-                    <a href="javascript:void(0);">忘记密码?</a>
+                    <a href="/forget.html">忘记密码?</a>
                 </div>
                 <div class="submit clear">
                     <a v-if="isPC" class="btn" href="/register.html">免费注册</a>

+ 2 - 2
src/main/resources/templates/account/register-club.html

@@ -81,7 +81,7 @@
                         我已阅读并同意<a href="javascript:void(0);">《机构协议》</a><a href="javascript:void(0);">《用户协议》</a>及<a href="javascript:void(0);">《隐私权政策》</a>
                     </p>
                     <span class="errTips icon mIcon show" v-if="isShowAgree">请阅读并同意协议</span>
-                    <div class="btn"  @click="clubRegister()">注册</div>
+                    <button class="btn" :class="loginLoading ? 'disabled':''"  @click="clubRegister()">注册</button>
                 </div>
             </form>
         </div>
@@ -227,7 +227,7 @@
                 </div>
                 <div class="subLine">
                     <button class="btn-upgrade none" type="button" @click="clubLoginIndex()">先跳过,以后再升级</button>
-                    <button class="btn-upgrade" type="button" @click="clubUpgrade()">确认升级并提交审核</button>
+                    <button class="btn-upgrade" :class="loginLoading ? 'disabled':''" type="button" @click="clubUpgrade()">确认升级并提交审核</button>
                 </div>
             </form>
         </div>

+ 2 - 2
src/main/resources/templates/account/register-supplier.html

@@ -47,7 +47,7 @@
                         <input type="text" v-model.trim="supplierUser.mobileCode" placeholder="请输入短信验证码" :rule="rule.code" maxlength="6" @blur="blurHandle($event)" needverify>
                         <i class="checked icon mIcon"></i>
                         <span class="errTips icon mIcon" tips="请输入有效短信验证码"></span>
-                        <a class="getCode" href="javascript:void(0);" @click="getMobileImage">获取短信验证码</a>
+                        <a class="getCode" href="javascript:void(0);" @click="getMobileImage" :class="[isMobileDisabled  ? 'disabled' : '']">{{mobileCodeText}}</a>
                     </div>
                     <div class="formLine">
                         <p><em>*</em>登录密码:</p>
@@ -158,7 +158,7 @@
                             我已阅读并同意<a href="javascript:void(0);">《供应商协议》</a><a href="javascript:void(0);">《用户协议》</a>及<a href="javascript:void(0);">《隐私权政策》</a>
                         </p>
                         <span class="errTips icon mIcon show" v-if="isShowAgree">请阅读并同意协议</span>
-                        <div class="btn"  @click="supplierRegister()">同意并提交审核</div>
+                        <button class="btn" :class="loginLoading ? 'disabled':''"  @click="supplierRegister()">同意并提交审核</button>
                     </div>
                 </form>
             </div>

+ 8 - 6
src/main/resources/templates/components/header.html

@@ -18,12 +18,14 @@
             </li>
             <li v-if="loginStatus">
                 <a class="cTab" href="javascript:void(0);" v-text="userData.userName"></a>
-                <div class="cShow">
-                    <a href="javascript:void(0);">我的采美</a>
-                    <a href="javascript:void(0);">机构资料</a>
-                    <a href="javascript:void(0);">我的机构</a>
-                    <a href="javascript:void(0);">店铺管理</a>
-                    <a href="javascript:void(0);">我的订单</a>
+                <div class="cShow" v-if="userIdentity == 4">
+                    <a href="/user/dashboard.html">我的采美</a>
+                    <a href="/user/setting/information.html">机构资料</a>
+                    <a href="javascript:void(0);" @click="userLogOut()">退出登录</a>
+                </div>
+                <div class="cShow" v-if="userIdentity == 3">
+                    <a href="/supplier/dashboard.html">我的采美</a>
+                    <a href="javascript:void(0);" @click="pageLinkSupplier()">店铺管理</a>
                     <a href="javascript:void(0);" @click="userLogOut()">退出登录</a>
                 </div>
             </li>