Browse Source

AI助手、微信登录调整

zhengjinyi 10 months ago
parent
commit
6e421ea564

+ 1 - 0
src/main/resources/static/css/account/login.css

@@ -95,6 +95,7 @@ li{list-style:none}
 @media screen and (max-width:768px){
  body{background:#FFF}
  footer{display:none}
+ .baseHeadCenter.account{ display: none;}
  .baseHeadCenter.account.dep{background: #1c1c1c;height: 21.4vw;}
  .baseHeadCenter.account .wrap.dep .logo{height: 19.2vw;}
  .baseHeadCenter .logo img{ width: 100%;height: 100%;display: block; }

+ 18 - 20
src/main/resources/static/css/caimei-chat/chats.css

@@ -449,13 +449,13 @@
         height: auto;
         background-color: #FFFFFF;
         box-shadow: 0 16px 20px 0 rgba(174,167,223,.2);
-        border-radius: 4vw;
+        border-radius: 9vw;
         box-sizing: border-box;
-        padding: 3vw;
-        margin:3vw 0;
+        padding:2vw 3vw;
+        margin:3vw 0 8vw;
         position: relative;
     }
-    .cm_ai_header{ width: 100%;height: 24px;box-sizing: border-box;justify-content: left;align-items: center;display: inline-flex;}
+    .cm_ai_header{ width: 100%;height: 24px;box-sizing: border-box;justify-content: left;align-items: center;display: none;}
     .cm_ai_header .cm_ai_icon{ width: 24px;height: 24px;box-sizing: border-box;margin-right: 5px }
     .cm_ai_header .cm_ai_icon img{ width: 24px;height: 24px;display: block; }
     .cm_ai_header .cm_ai_text{line-height: 24px;font-size: 14px;color: #ff5b00;font-weight: 600; }
@@ -464,17 +464,16 @@
         align-items: center;
         justify-content: space-between;
         width: 100%;
-        min-height: 60px;
-        padding: 5px 0;
+        height: 10vw;
+        padding: 0 16vw 0 2vw;
         overflow: hidden;
         box-sizing: border-box;
     }
     .cm_ai_content .cm_ai_input textarea{
         width: 100%;
-        max-height: 106px !important;
-        min-height: 60px !important;
-        font-size: 14px;
-        line-height: 1.5715;
+        height: 10vw;
+        font-size: 3.4vw;
+        line-height: 10vw;
         background-color: transparent;
         border: none;
         box-shadow: none;
@@ -482,26 +481,25 @@
         scrollbar-width:none;
         resize: none;
         box-sizing: border-box;
-        padding-left: 4px;
+        padding-left: 0;
     }
     .cm_ai_content .cm_ai_input textarea:focus {
         outline: none;
     }
     .cm_ai_content .cm_ai_button_main{
-         position: relative;
-         right: 0;
-         bottom: 0;
+         position: absolute;
+         right: 3vw;
+         bottom: 2vw;
          display: flex;
          flex-direction: row-reverse;
          justify-content: space-between;
-         width: 100%;
-         height: 32px;
-         margin-top: 4px;
+         width: 16vw;
+         height: 10vw;
      }
      .cm_ai_content .cm_ai_button{
-         width: 66px;
-         height: 32px;
-         border-radius: 4px;
+         width: 16vw;
+         height: 10vw;
+         border-radius: 5vw;
          background-image: linear-gradient(90deg, #FF9300 0%, #FF5B00 100%);
          display: inline-flex;
          align-items: center;

+ 21 - 10
src/main/resources/static/js/account/login.js

@@ -238,18 +238,29 @@ var loginPage = new Vue({
                 }
             });
         },
-        handleWeChatLogin(){
-            // 微信公众号授权登录
-            if (this.isWeChat) {
-                // 微信浏览器自动授权登录
-                var urlForWeChat = 'https://www.caimei365.com/we_chat/redirect_uri.html';
-                $.get(coreServer+'/user/login/auth/link?mode=2&redirectUri='+urlForWeChat, function(r){
-                    if(r.code===0 && r.data){
-                        setBaseCookie("weChatAutoLogin", 2);
-                        window.location.href = r.data;
+        async handleWeChatLogin(){
+            // 微信公众号授权登录 微信浏览器自动授权登录
+            try {
+                const redirectUri = `https://www.caimei365.com/we_chat/redirect_uri.html`;
+                const data = await this.getWechatAuthLink({mode:2,redirectUri:redirectUri})
+                console.log('data',data)
+                setBaseCookie("weChatAutoLogin", 2);
+                window.location.href = data;
+            } catch (error) {
+                console.error('Error', error);
+            }
+        },
+        // 微信登录异步回调
+        getWechatAuthLink(params){
+            return new Promise((resolve, reject) => {
+                UserApi.wechatAuthLink(params, function(response) {
+                    if (response.code === 0) {
+                        resolve(response.data)
+                    } else {
+                        reject(response);
                     }
                 });
-            }
+            });
         },
         toNormalLogin(){
             this.qrCodeLogin = false;

+ 17 - 17
src/main/resources/static/js/base.js

@@ -34,23 +34,23 @@ if(localStorage.getItem('userInfo')){
     }
     console.log('isShopIsOrder',isShopIsOrder)
 } else {
-    var pathname = window.location.pathname;
-    var weChatLoginFlag = (Number(getBaseCookie("weChatAutoLogin"))===1 || Number(getBaseCookie("weChatAutoLogin"))===2);
-    if(pathname.indexOf('/product/auth/') === -1 && !weChatLoginFlag ){
-        var userAgent = navigator.userAgent.toLowerCase();
-        const isWechatLogin = window.location.href.indexOf('isDataBase') !== -1
-        if (userAgent.match(/MicroMessenger/i) && !isWechatLogin) {
-            // 微信浏览器自动授权登录
-            var urlForWeChat = 'https://www.caimei365.com/we_chat/redirect_uri.html';
-            $.get(coreServer+'/user/login/auth/link?mode=1&redirectUri='+urlForWeChat, function(r){
-                if(r.code===0 && r.data){
-                    setBaseCookie("weChatAutoLogin", 1);
-                    setBeforeUrl();
-                    window.location.href = r.data;
-                }
-            });
-        }
-    }
+    // const pathname = window.location.pathname;
+    // const weChatLoginFlag = (Number(getBaseCookie("weChatAutoLogin")) === 1 || Number(getBaseCookie("weChatAutoLogin")) === 2);
+    // if(pathname.indexOf('/product/auth/') === -1 && !weChatLoginFlag ){
+    //     const userAgent = navigator.userAgent.toLowerCase();
+    //     const isWechatLogin = window.location.href.indexOf('isDataBase') !== -1
+    //     if (userAgent.match(/MicroMessenger/i) && !isWechatLogin) {
+    //         // 微信浏览器自动授权登录
+    //         var urlForWeChat = 'https://www.caimei365.com/we_chat/redirect_uri.html';
+    //         $.get(coreServer+'/user/login/auth/link?mode=1&redirectUri='+urlForWeChat, function(r){
+    //             if(r.code===0 && r.data){
+    //                 setBaseCookie("weChatAutoLogin", 1);
+    //                 setBeforeUrl();
+    //                 window.location.href = r.data;
+    //             }
+    //         });
+    //     }
+    // }
 }
 // 头部
 var globalHead = new Vue({

+ 3 - 5
src/main/resources/static/js/caimei-chat/chats.js

@@ -24,12 +24,10 @@ const cmChats = new Vue({
             this.chatParams.userId = this.chatHistoryParams.userId = globalUserData.userId;
             this.chatParams.question = ''
             this.getChatHistory()
-            setTimeout(()=>{
-                this.handleCreatedInfoHtml()
-            },250)
-        }else{
-            window.location.href = '/login.html'
         }
+        setTimeout(()=>{
+            this.handleCreatedInfoHtml()
+        },250)
     }
 });
 

+ 24 - 0
src/main/resources/static/js/common/serviceapi/user.service.js

@@ -533,6 +533,30 @@ var UserApi = {
             .then(function(res){
                 callback(res)
             });
+        },
+        wechatAuthLink : function (params,callback) {//获取微信参数
+            Http.AjaxService({
+                url:'/user/login/auth/link',
+                type:'GET',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res)
+            });
+        },
+        wechatAuthWebsite : function (params,callback) {//微信授权登录
+            Http.AjaxService({
+                url:'/user/login/auth/website',
+                type:'GET',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res)
+            });
         }
 
 

+ 13 - 14
src/main/resources/static/js/mixins/cmAiMixins.js

@@ -40,17 +40,15 @@ var cmAiMixins = function () {
             },
             // 显示弹窗
             handleShowAiDrawer(){
+                this.isAiDrawer = true
+                setTimeout(()=>{
+                    this.handleCreatedInfoHtml()
+                },250)
                 if(globalUserData){
-                    this.isAiDrawer = true
                     this.clubName = globalUserData.name
                     this.chatParams.userId = this.chatHistoryParams.userId = globalUserData.userId;
                     this.chatParams.question = ''
                     this.getChatHistory()
-                    setTimeout(()=>{
-                        this.handleCreatedInfoHtml()
-                    },250)
-                }else{
-                    window.location.href = '/login.html'
                 }
             },
             //新建对话
@@ -74,13 +72,14 @@ var cmAiMixins = function () {
             },
             // 发送按钮点击事件
             handleAskQuestion(){
+                if(!globalUserData){
+                    window.location.href = '/login.html'
+                    return
+                }
                 this.chatParams.question = this.questionTextarea
                 if(this.isLoading){ return; }
                 if (!this.chatParams.question){
-                    this.$message({
-                        message: '请输入内容',
-                        type: 'warning'
-                    });
+                    CAIMEI.dialog('请输入内容',false)
                     return
                 }
                 // 用于显示AI回答的DOM元素
@@ -265,7 +264,7 @@ var cmAiMixins = function () {
                         if (response.code === 0) {
                             resolve(response.data)
                         } else {
-                            reject(new Error('Failed to fetch new chats'));
+                            reject(response)
                         }
                     });
                 });
@@ -277,7 +276,7 @@ var cmAiMixins = function () {
                         if (response.code === 0) {
                             resolve(response.data)
                         } else {
-                            reject(new Error('Failed to fetch new chats'));
+                            reject(response)
                         }
                     });
                 });
@@ -289,7 +288,7 @@ var cmAiMixins = function () {
                         if (response.code === 0) {
                             resolve(response.data)
                         } else {
-                            reject(new Error('Failed to fetch new chats'));
+                            reject(response)
                         }
                     });
                 });
@@ -301,7 +300,7 @@ var cmAiMixins = function () {
                         if (response.code === 0) {
                             resolve(response.data)
                         } else {
-                            reject(new Error('Failed to fetch new chats'));
+                            reject(response)
                         }
                     });
                 });

+ 91 - 0
src/main/resources/static/js/we_chat/we_chat.js

@@ -0,0 +1,91 @@
+const redirectUri = new Vue({
+    el: "#weChatContention",
+    data() {
+        return {
+            loginParams:{
+                code:'',
+                state:'',
+                mode:'',
+            }
+        }
+    },
+    computed: {},
+    methods: {
+        openFullScreen() {
+            const loading = this.$loading({
+                lock: true,
+                text: '微信授权登录中~',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0, 0, 0, 0.4)'
+            });
+            setTimeout(() => {
+                this.weChatLoginInit()
+                loading.close();
+            }, 2000);
+        },
+        // 初始化
+        async weChatLoginInit(){
+            try {
+                const data = await this.getWechatAuthWebsite(this.loginParams)
+                console.log('data', data);
+                const userData = {
+                    account: data.account,
+                    email: data.email,
+                    phone: data.bindMobile,
+                    name: data.name,
+                    userName: data.userName,
+                    userId: data.userId,
+                    spId: data.serviceProviderId,
+                    clubId: data.clubId,
+                    shopId: data.shopId,
+                    unionId: data.unionId,
+                    userIdentity: data.userIdentity,
+                    permission: data.userPermission,
+                    token: data.token
+                };
+                localStorage.setItem('userInfo',JSON.stringify(userData))
+                this.tobeforePage()
+            } catch (error) {
+                CAIMEI.Alert(error.msg,'确定',true, function(){
+                    this.tobeforePage()
+                });
+            }
+        },
+        // 微信登录异步回调
+        getWechatAuthWebsite(params){
+            return new Promise((resolve, reject) => {
+                UserApi.wechatAuthWebsite(params, function(response) {
+                    if (response.code === 0) {
+                        resolve(response.data)
+                    } else {
+                        reject(response)
+                    }
+                })
+            })
+        },
+        tobeforePage(){
+            const loginBeforePath = getBaseCookie("loginBeforePath");
+            if (loginBeforePath && loginBeforePath!=='undefined' && loginBeforePath.indexOf('.html')>0) {
+                delBaseCookie("loginBeforePath")
+                window.location.href = loginBeforePath
+            } else if (userData && userData.userIdentity*1 === 3) {
+                location.href = '/supplier/dashboard.html'
+            } else if (userData && (userData.userIdentity*1 === 2 || userData.userIdentity*1 === 4)) {
+                location.href = '/user/dashboard.html'
+            }
+        }
+    },
+    created() {
+
+    },
+    mounted() {
+        // 如果用户同意授权,页面将跳转至 redirect_uri/?code=CODE&state=STATE
+        this.loginParams.mode = Number(getBaseCookie("weChatAutoLogin")) === 1 ? 1 : 2
+        this.loginParams.code = getUrlParam('code')
+        this.loginParams.state = getUrlParam('state')
+        // console.log('wx_mode',this.loginParams.mode)
+        // console.log('wx_code',this.loginParams.code)
+        // console.log('wx_state',this.loginParams.state)
+        this.openFullScreen()
+    }
+});

+ 125 - 125
src/main/resources/templates/account/bind.html

@@ -1,125 +1,125 @@
-<!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/form.css(v=${version})}" rel="stylesheet" type="text/css">
-    <link th:href="@{/css/account/bind.css(v=${version})}" rel="stylesheet" type="text/css">
-    <template th:replace="components/analysis"></template>
-</head>
-<body>
-<!-- 引用头部 -->
-<template th:replace="account/components/header"></template>
-
-<!-- 绑定运营人员 -->
-<div id="bindPage">
-    <div class="signAccount bind">
-        <div class="title center">绑定运营人员</div>
-        <div class="title-tips">
-            <p>您的微信尚未绑定任何账号,请输入您的账号密码,并填写自己的基本信息提交后即可微信扫码直接登录</p>
-        </div>
-        <div class="registerClub clear">
-            <form>
-                <div class="form-step">
-                    <span class="step one active">1</span>
-                    <span class="step two" :class="activeNum == 1 ? 'active':''">2</span>
-                </div>
-                <template v-if="activeNum === 0">
-                    <div class="title">确认公司账号</div>
-                    <div class="formLine-tabs">
-                        <a class="tabs-item" :class="{ current: loginTabs === 1 }" href="javascript:void(0);" @click="handleTabsClick(1)">验证码确认</a>
-                        <a class="tabs-item" :class="{ current: loginTabs === 0 }" href="javascript:void(0);" @click="handleTabsClick(0)">账号密码确认</a>
-                    </div>
-                    <template v-if="loginTabs === 1">
-                        <div class="formLine" >
-                            <p><em>*</em>手机号:</p>
-                            <input  class="codeParamsMobile"  type="text" autocomplete="off" v-model.trim="codeParams.mobile" placeholder="请输入已注册的手机号" @input="handleInputPhone" :rule="rule.mobile" maxlength="11" @blur="blurHandle($event)" needverify>
-                            <i class="checked icon mIcon"></i>
-                            <span class="errTips icon mIcon" tips="请输入正确格式的手机号"></span>
-                        </div>
-                        <div class="formLine smscode">
-                            <p><em>*</em>验证码:</p>
-                            <input type="text" class="smscode" v-model.trim="codeParams.code" autocomplete="off" placeholder="请输入短信验证码" @input="handleInputSmsCode" :rule="rule.code"  maxlength="6" @blur="blurHandle($event)" needverify>
-                            <i class="checked icon mIcon"></i>
-                            <span class="errTips icon mIcon" tips="请输入短信验证码"></span>
-                            <a class="code-btn" href="javascript:void(0);" @click="handleShowImage" :class="[isMobileDisabled1  ? 'disabled' : '']">{{ mobileCodeText1 }}</a>
-                        </div>
-                        <div class="subLine">
-                            <button class="btn" type="button" :class="isDisabled ? 'disabled' : ''"  @click="handleStepNext">下一步</button>
-                        </div>
-                    </template>
-                    <template v-if="loginTabs === 0">
-                        <div class="formLine">
-                            <p><em>*</em>账号:</p>
-                            <input class="mobileOrEmail" type="text" autocomplete="off" v-model.trim="userParams.mobileOrEmail" placeholder="请输入邮箱/手机号" @input="handleInputMobileOrEmail" :rule="rule.mobileOrEmail" maxlength="50" @blur="blurHandle($event)" needverify>
-                            <i class="checked icon mIcon"></i>
-                            <span class="errTips icon mIcon" tips="请输入邮箱/手机号"></span>
-                        </div>
-                        <div class="formLine">
-                            <p><em>*</em>登录密码:</p>
-                            <input type="password" v-model.trim="userParams.password" autocomplete="new-password" placeholder="请输入8-16位数字和字母组合" @input="handleInputPassword" :rule="rule.password" maxlength="32" @blur="blurHandle($event)" needverify>
-                            <i class="checked icon mIcon"></i>
-                            <span class="errTips icon mIcon" tips="8-16位数字或字母或字符"></span>
-                        </div>
-                        <div class="subLine">
-                            <button class="btn" type="button" :class="isDisabled ? 'disabled' : ''"  @click="handleStepNext">下一步</button>
-                        </div>
-                    </template>
-                </template>
-                <template v-if="activeNum === 1">
-                    <div class="title">填写运营人员信息</div>
-                    <div class="formLine">
-                        <p><em>*</em>姓名:</p>
-                        <input type="text" v-model.trim="userParams.linkName" @input="handleInputLinkName" placeholder="请输入真实姓名" :rule="rule.name" maxlength="50" @blur="blurHandle($event)" needverify>
-                        <i class="checked icon mIcon"></i>
-                        <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
-                    </div>
-                    <div class="formLine" >
-                        <p><em>*</em>手机号:</p>
-                        <input  class="massageBtn"  type="text" autocomplete="off" @input="handleInputMobile" v-model.trim="userParams.mobile" placeholder="请输入您的常用手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
-                        <i class="checked icon mIcon"></i>
-                        <span class="errTips icon mIcon" tips="请输入有效电话号码"></span>
-                    </div>
-                    <div class="formLine smscode">
-                        <p><em>*</em>短信验证码:</p>
-                        <input class="smscode" type="text" v-model.trim="userParams.smsCode" @input="handleInputSmsCodee"  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="code-btn" href="javascript:void(0);" @click="handleShowImage" :class="[isMobileDisabled  ? 'disabled' : '']">{{ mobileCodeText }}</a>
-                    </div>
-                    <div class="subLine">
-                        <button class="btn" type="button" :class="isSubDisabled ? 'disabled':''"  @click="handleBindConfirm">提交</button>
-                    </div>
-                </template>
-            </form>
-        </div>
-    </div>
-    <div class="content-model"  :class="isCodeModel ? 'active' : ''">
-        <div class="model-main">
-            <div class="model-title"><p>获取短信验证码</p><i class="icon mIcon icon-close"  @click="closeCodeModel"></i></div>
-            <div class="model-content">
-                <div class="model-form">
-                    <input class="input codeMsgButton" type="text" placeholder="请输入图形验证码" v-model="bindCodeParams.imgCode" maxlength="4" needverify>
-                    <div class="image"><img :src="codeImagePath" alt=""></div>
-                    <div class="refresh" @click="handleRefreshCodeImage">
-                        <i class="icon mIcon"></i>
-                        <span>刷新</span>
-                    </div>
-                    <i class="checked icon mIcon"></i>
-                    <span class="errTips icon mIcon" tips="请输入图形验证码"></span>
-                </div>
-                <div class="model-button">
-                    <div class="button"  @click="getMobileCodeFn">获取短信验证码</div>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
-<!-- 引入底部 -->
-<template th:replace="article/components/article-footer"></template>
-<template th:replace="components/foot-link"></template>
-<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
-<script charset="utf-8" type="text/javascript" th:src="@{/js/account/bind.js(v=${version})}"></script>
-</body>
-</html>
+<!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/form.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/account/bind.css(v=${version})}" rel="stylesheet" type="text/css">
+    <template th:replace="components/analysis"></template>
+</head>
+<body>
+<!-- 引用头部 -->
+<template th:replace="account/components/header"></template>
+
+<!-- 绑定运营人员 -->
+<div id="bindPage">
+    <div class="signAccount bind">
+        <div class="title center">绑定运营人员</div>
+        <div class="title-tips">
+            <p>您的微信尚未绑定任何账号,请输入您的账号密码,并填写自己的基本信息提交后即可微信扫码直接登录</p>
+        </div>
+        <div class="registerClub clear">
+            <form>
+                <div class="form-step">
+                    <span class="step one active">1</span>
+                    <span class="step two" :class="activeNum == 1 ? 'active':''">2</span>
+                </div>
+                <template v-if="activeNum === 0">
+                    <div class="title">确认公司账号</div>
+                    <div class="formLine-tabs">
+                        <a class="tabs-item" :class="{ current: loginTabs === 1 }" href="javascript:void(0);" @click="handleTabsClick(1)">验证码确认</a>
+                        <a class="tabs-item" :class="{ current: loginTabs === 0 }" href="javascript:void(0);" @click="handleTabsClick(0)">账号密码确认</a>
+                    </div>
+                    <template v-if="loginTabs === 1">
+                        <div class="formLine" >
+                            <p><em>*</em>手机号:</p>
+                            <input  class="codeParamsMobile"  type="text" autocomplete="off" v-model.trim="codeParams.mobile" placeholder="请输入已注册的手机号" @input="handleInputPhone" :rule="rule.mobile" maxlength="11" @blur="blurHandle($event)" needverify>
+                            <i class="checked icon mIcon"></i>
+                            <span class="errTips icon mIcon" tips="请输入正确格式的手机号"></span>
+                        </div>
+                        <div class="formLine smscode">
+                            <p><em>*</em>验证码:</p>
+                            <input type="text" class="smscode" v-model.trim="codeParams.code" autocomplete="off" placeholder="请输入短信验证码" @input="handleInputSmsCode" :rule="rule.code"  maxlength="6" @blur="blurHandle($event)" needverify>
+                            <i class="checked icon mIcon"></i>
+                            <span class="errTips icon mIcon" tips="请输入短信验证码"></span>
+                            <a class="code-btn" href="javascript:void(0);" @click="handleShowImage" :class="[isMobileDisabled1  ? 'disabled' : '']">{{ mobileCodeText1 }}</a>
+                        </div>
+                        <div class="subLine">
+                            <button class="btn" type="button" :class="isDisabled ? 'disabled' : ''"  @click="handleStepNext">下一步</button>
+                        </div>
+                    </template>
+                    <template v-if="loginTabs === 0">
+                        <div class="formLine">
+                            <p><em>*</em>账号:</p>
+                            <input class="mobileOrEmail" type="text" autocomplete="off" v-model.trim="userParams.mobileOrEmail" placeholder="请输入邮箱/手机号" @input="handleInputMobileOrEmail" :rule="rule.mobileOrEmail" maxlength="50" @blur="blurHandle($event)" needverify>
+                            <i class="checked icon mIcon"></i>
+                            <span class="errTips icon mIcon" tips="请输入邮箱/手机号"></span>
+                        </div>
+                        <div class="formLine">
+                            <p><em>*</em>登录密码:</p>
+                            <input type="password" v-model.trim="userParams.password" autocomplete="new-password" placeholder="请输入8-16位数字和字母组合" @input="handleInputPassword" :rule="rule.password" maxlength="32" @blur="blurHandle($event)" needverify>
+                            <i class="checked icon mIcon"></i>
+                            <span class="errTips icon mIcon" tips="8-16位数字或字母或字符"></span>
+                        </div>
+                        <div class="subLine">
+                            <button class="btn" type="button" :class="isDisabled ? 'disabled' : ''"  @click="handleStepNext">下一步</button>
+                        </div>
+                    </template>
+                </template>
+                <template v-if="activeNum === 1">
+                    <div class="title">填写运营人员信息</div>
+                    <div class="formLine">
+                        <p><em>*</em>姓名:</p>
+                        <input type="text" v-model.trim="userParams.linkName" @input="handleInputLinkName" placeholder="请输入真实姓名" :rule="rule.name" maxlength="50" @blur="blurHandle($event)" needverify>
+                        <i class="checked icon mIcon"></i>
+                        <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
+                    </div>
+                    <div class="formLine" >
+                        <p><em>*</em>手机号:</p>
+                        <input  class="massageBtn"  type="text" autocomplete="off" @input="handleInputMobile" v-model.trim="userParams.mobile" placeholder="请输入您的常用手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
+                        <i class="checked icon mIcon"></i>
+                        <span class="errTips icon mIcon" tips="请输入有效电话号码"></span>
+                    </div>
+                    <div class="formLine smscode">
+                        <p><em>*</em>短信验证码:</p>
+                        <input class="smscode" type="text" v-model.trim="userParams.smsCode" @input="handleInputSmsCodee"  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="code-btn" href="javascript:void(0);" @click="handleShowImage" :class="[isMobileDisabled  ? 'disabled' : '']">{{ mobileCodeText }}</a>
+                    </div>
+                    <div class="subLine">
+                        <button class="btn" type="button" :class="isSubDisabled ? 'disabled':''"  @click="handleBindConfirm">提交</button>
+                    </div>
+                </template>
+            </form>
+        </div>
+    </div>
+    <div class="content-model"  :class="isCodeModel ? 'active' : ''">
+        <div class="model-main">
+            <div class="model-title"><p>获取短信验证码</p><i class="icon mIcon icon-close"  @click="closeCodeModel"></i></div>
+            <div class="model-content">
+                <div class="model-form">
+                    <input class="input codeMsgButton" type="text" placeholder="请输入图形验证码" v-model="bindCodeParams.imgCode" maxlength="4" needverify>
+                    <div class="image"><img :src="codeImagePath" alt=""></div>
+                    <div class="refresh" @click="handleRefreshCodeImage">
+                        <i class="icon mIcon"></i>
+                        <span>刷新</span>
+                    </div>
+                    <i class="checked icon mIcon"></i>
+                    <span class="errTips icon mIcon" tips="请输入图形验证码"></span>
+                </div>
+                <div class="model-button">
+                    <div class="button"  @click="getMobileCodeFn">获取短信验证码</div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<!-- 引入底部 -->
+<template th:replace="article/components/article-footer"></template>
+<template th:replace="components/foot-link"></template>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/account/bind.js(v=${version})}"></script>
+</body>
+</html>

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

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-找回密码</title>
     <template th:replace="components/head-link"></template>
     <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
     <link th:href="@{/css/account/forget.css(v=${version})}" rel="stylesheet" type="text/css">

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

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-供应商快捷登录</title>
     <template th:replace="components/head-link"></template>
     <!--禁止抓取本页,禁止抓取和跟踪本页的其它链接-->
     <meta name='robots' content='noindex,nofollow' />

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

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-登录</title>
     <template th:replace="components/head-link"></template>
     <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
     <link th:href="@{/css/account/login.css(v=${version})}" rel="stylesheet" type="text/css">

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

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-机构注册</title>
     <template th:replace="components/head-link"></template>
     <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
     <link th:href="@{/css/account/register.css(v=${version})}" rel="stylesheet" type="text/css">

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

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-供应商注册</title>
     <template th:replace="components/head-link"></template>
     <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
     <link th:href="@{/css/account/register.css(v=${version})}" rel="stylesheet" type="text/css">

+ 32 - 32
src/main/resources/templates/account/register.html

@@ -1,32 +1,32 @@
-<!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/form.css(v=${version})}" rel="stylesheet" type="text/css">
-    <link th:href="@{/css/account/register.css(v=${version})}" rel="stylesheet" type="text/css">
-    <template th:replace="components/analysis"></template>
-</head>
-<body>
-<!-- 引用头部 -->
-<template th:replace="account/components/header"></template>
-
-<!-- 注册账号 -->
-<div id="registerPage">
-    <div class="selectAccount">
-        <div class="title">请选择注册的账号类型</div>
-        <div class="cont">
-            <span class="a"><img src="/img/account/clubPC.png" @click="clickTab(1)"> <p class="purchase">采购方(买家)</p><p class="tips-text">医院机构/美容会所/普通买家</p></span>
-            <span class="b"><img src="/img/account/supplierPC.png"  @click="clickTab(2)"><p class="purchase">供应商(卖家)</p><p class="tips-text">仪器/产品/服务供应商</p></span>
-        </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/user.service.js(v=${version})}"></script>
-<script charset="utf-8" type="text/javascript" th:src="@{/js/account/register.js(v=${version})}"></script>
-</body>
-</html>
+<!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/form.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/account/register.css(v=${version})}" rel="stylesheet" type="text/css">
+    <template th:replace="components/analysis"></template>
+</head>
+<body>
+<!-- 引用头部 -->
+<template th:replace="account/components/header"></template>
+
+<!-- 注册账号 -->
+<div id="registerPage">
+    <div class="selectAccount">
+        <div class="title">请选择注册的账号类型</div>
+        <div class="cont">
+            <span class="a"><img src="/img/account/clubPC.png" @click="clickTab(1)"> <p class="purchase">采购方(买家)</p><p class="tips-text">医院机构/美容会所/普通买家</p></span>
+            <span class="b"><img src="/img/account/supplierPC.png"  @click="clickTab(2)"><p class="purchase">供应商(卖家)</p><p class="tips-text">仪器/产品/服务供应商</p></span>
+        </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/user.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/account/register.js(v=${version})}"></script>
+</body>
+</html>

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

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-升级资质</title>
     <template th:replace="components/head-link"></template>
     <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
     <link th:href="@{/css/account/upgrade.css(v=${version})}" rel="stylesheet" type="text/css">

+ 5 - 51
src/main/resources/templates/we_chat/redirect_uri.html

@@ -6,59 +6,13 @@
     <template th:replace="components/head-link"></template>
 </head>
 <body>
-
 <input type="hidden" th:value="${coreServer}" id="coreServer">
 <input type="hidden" th:value="${agent}" id="userAgent">
+<div id="weChatContention">
+<!--  微信登录  -->
+</div>
 <template th:replace="components/foot-link"></template>
-<script charset="utf-8" type="text/javascript">
-    // 如果用户同意授权,页面将跳转至 redirect_uri/?code=CODE&state=STATE
-    var wx_mode = Number(getBaseCookie("weChatAutoLogin"))===1 ? 1 : 2;
-    var wx_code = getUrlParam('code');
-    var wx_state = getUrlParam('state');
-    var userData = '';
-    $.get(coreServer+'/user/login/auth/website?code='+wx_code+'&state='+wx_state+'&mode='+wx_mode, function(r){
-        if(r.code===0){
-            console.log(r.data);
-            userData = {
-                account: r.data.account,
-                email: r.data.email,
-                phone: r.data.bindMobile,
-                name: r.data.name,
-                userName: r.data.userName,
-                userId: r.data.userId,
-                spId: r.data.serviceProviderId,
-                clubId: r.data.clubId,
-                shopId: r.data.shopId,
-                userIdentity: r.data.userIdentity,
-                permission: r.data.userPermission,
-                token: r.data.token
-            };
-            localStorage.setItem('userInfo',JSON.stringify(userData));
-            tobeforePage();
-        }else{
-            if (wx_mode===2 && r.code===-4){
-                //微信绑定页面
-                window.location.href = '/bind.html';
-            }else if (wx_mode===1) {
-                tobeforePage();
-            }else{
-                CAIMEI.Alert(r.msg,'确定',true, function(){
-                    tobeforePage();
-                });
-            }
-        }
-    });
-    function tobeforePage(){
-        var loginBeforePath = getBaseCookie("loginBeforePath");
-        if (loginBeforePath && loginBeforePath!='undefined' && loginBeforePath.indexOf('.html')>0) {
-            delBaseCookie("loginBeforePath");
-            window.location.href = loginBeforePath;
-        } else if (userData && userData.userIdentity*1 === 3) {
-            location.href = '/supplier/dashboard.html';
-        } else if (userData && (userData.userIdentity*1 === 2 || userData.userIdentity*1 === 4)) {
-            location.href = '/user/dashboard.html';
-        }
-    }
-</script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/we_chat/we_chat.js(v=${version})}"></script>
 </body>
 </html>