Changpeng Duan vor 5 Jahren
Ursprung
Commit
bfc0c58bbd

+ 14 - 12
online/src/App.vue

@@ -14,8 +14,9 @@
         right: 0;
         right: 0;
         bottom: 0;
         bottom: 0;
         width: 100%;
         width: 100%;
-        height: 100%;
-        overflow-y: hidden;
+        height:100%;
+        min-height: 100%;
+        overflow-y: scroll;
     }
     }
 
 
     ul, li {
     ul, li {
@@ -30,18 +31,19 @@
 
 
     /*叹号问题*/
     /*叹号问题*/
     .mu-warning-text-color {
     .mu-warning-text-color {
-      float: left;
+        float: left;
     }
     }
+
 </style>
 </style>
 <script>
 <script>
-window.onload = function() {
-  document.addEventListener('touchstart', function(event) {
-    if (event.touches.length > 1) {
-      event.preventDefault()
+    window.onload = function () {
+        document.addEventListener('touchstart', function (event) {
+            if (event.touches.length > 1) {
+                event.preventDefault()
+            }
+        })
+        document.addEventListener('gesturestart', function (event) {
+            event.preventDefault()
+        })
     }
     }
-  })
-  document.addEventListener('gesturestart', function(event) {
-    event.preventDefault()
-  })
-}
 </script>
 </script>

+ 8 - 4
online/src/Mock/index.js

@@ -1,5 +1,6 @@
 import Mock from 'mockjs'
 import Mock from 'mockjs'
 import '../Global'
 import '../Global'
+
 let Random = Mock.Random;
 let Random = Mock.Random;
 
 
 // worldDetail
 // worldDetail
@@ -132,10 +133,13 @@ let logout = function () {
     };
     };
     return res;
     return res;
 };
 };
+let t = 0;
+if (t == 1) {
+    Mock.mock('/api/testPic', 'post', testPic());
+    Mock.mock('/api/testSelect', 'post', testSelect());
+    Mock.mock(headapi + 'v1/Auth/testTable', 'post', testTable());
+    Mock.mock(headapi + 'v1/Auth/PhoneSignIn', 'post', PhoneSignIn());//用户登录
+}
 
 
-Mock.mock('/api/testPic', 'post', testPic());
-Mock.mock('/api/testSelect', 'post', testSelect());
-Mock.mock(headapi + 'v1/Auth/testTable', 'post', testTable());
-Mock.mock(headapi + 'v1/Auth/PhoneSignIn', 'post', PhoneSignIn());//用户登录
 
 
 export default Mock;
 export default Mock;

+ 18 - 0
online/src/api/getApiRes.js

@@ -73,3 +73,21 @@ export function UserSelfQuery(postdata) {
     return getApiBasic(url,postdata);
     return getApiBasic(url,postdata);
 }
 }
 
 
+// 查询用户是否正在上课接口
+export function GetDuInfoAndUserInfoByUserMd5(postdata) {
+    let url = headapi + 'v1/User/GetDuInfoAndUserInfoByUserMd5';
+    return getApiBasic(url,postdata);
+}
+
+// 心率带信息查询和更新
+export function HrSensorsUpdate(postdata) {
+    let url = headapi + 'v1/HrSensors/HrSensorsUpdate';
+    return getApiBasic(url,postdata);
+}
+
+// App心率数据上报
+export function AddAppHeartRate(postdata) {
+    let url = headapi + 'v1/HrSensors/AddAppHeartRate';
+    return getApiBasic(url,postdata);
+}
+

+ 1 - 1
online/src/main.js

@@ -21,7 +21,7 @@ Vue.component('vue-simple-verify', VueSimpleVerify);
 // import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
 // import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
 
 
 import VConsole from 'vconsole';
 import VConsole from 'vconsole';
-// let vConsole = new VConsole();// 初始化
+let vConsole = new VConsole();// 初始化
 
 
 Vue.use(MuseUI);
 Vue.use(MuseUI);
 Vue.locale = () => {
 Vue.locale = () => {

+ 44 - 17
online/src/page/login.vue

@@ -1,10 +1,12 @@
 <template>
 <template>
-    <div class="container">
+    <div id="mainContainer" class="main" :style="{'height':scrollerHeight}">
+        <div class="form">
         <div class="topImg">
         <div class="topImg">
             <img src="../static/images/login/head.png"/>
             <img src="../static/images/login/head.png"/>
         </div>
         </div>
         <div class="control" v-if="controlShow">
         <div class="control" v-if="controlShow">
-            <mu-text-field v-model="input" placeholder="|请输入手机号" @keyup.enter.native="CheckPhone()"></mu-text-field>
+            <mu-text-field v-model="input" type="number" placeholder="|请输入手机号" @keyup.enter.native="CheckPhone()"
+                           @blur="onBlurInput()"></mu-text-field>
             <mu-button color="info" small round v-if="btnShow" @click="errorToast">继续</mu-button>
             <mu-button color="info" small round v-if="btnShow" @click="errorToast">继续</mu-button>
             <mu-button color="primary" small round v-else @click="stepVertify">继续</mu-button>
             <mu-button color="primary" small round v-else @click="stepVertify">继续</mu-button>
         </div>
         </div>
@@ -19,6 +21,8 @@
                     <li></li>
                     <li></li>
                     <li></li>
                     <li></li>
                     <li></li>
                     <li></li>
+                    <li></li>
+                    <li></li>
                 </ul>
                 </ul>
             </div>
             </div>
             <div class="tips" v-if="tipsState">
             <div class="tips" v-if="tipsState">
@@ -29,6 +33,7 @@
             <mu-button color="primary" small round v-else @click="stepCode">继续</mu-button>
             <mu-button color="primary" small round v-else @click="stepCode">继续</mu-button>
         </div>
         </div>
     </div>
     </div>
+    </div>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -47,12 +52,13 @@
                 controlShow: true, //true
                 controlShow: true, //true
                 btnShow: true, //true
                 btnShow: true, //true
                 vertifyShow: false,
                 vertifyShow: false,
-                codeShow: false,
+                codeShow: false,//false
                 codebtnShow: false,
                 codebtnShow: false,
                 tipsState: false,
                 tipsState: false,
                 codeState: true,
                 codeState: true,
                 input: '',
                 input: '',
                 vcode: '',
                 vcode: '',
+                scrollerHeight: document.documentElement.clientHeight || document.body.clientHeight,
             }
             }
         },
         },
         watch: {
         watch: {
@@ -73,7 +79,7 @@
                 handler(newName, oldName) {
                 handler(newName, oldName) {
                     let that = this;
                     let that = this;
                     // 校验验证码
                     // 校验验证码
-                    if (newName.length == 4) {
+                    if (newName.length == 6) {
                         that.codebtnShow = false;
                         that.codebtnShow = false;
                     } else {
                     } else {
                         that.codebtnShow = true;
                         that.codebtnShow = true;
@@ -83,6 +89,13 @@
                 immediate: true
                 immediate: true
             },
             },
         },
         },
+        created() {
+            var height= document.documentElement.clientHeight; //获取当前可视区域的高度
+            window.onload = function(){ //在页面整体加载完毕时
+                document.getElementById('mainContainer').style.height= height + 'px'//给根布局设置高度
+                console.log(height);
+            }
+        },
         mounted() {
         mounted() {
         },
         },
         methods: {
         methods: {
@@ -146,6 +159,7 @@
                     let json = res;
                     let json = res;
                     if (json.Code == 0) {
                     if (json.Code == 0) {
                         this.tipsState = true;
                         this.tipsState = true;
+                        localStorage.token = json.Rs.token;
                         this.$router.push({path: '/'});
                         this.$router.push({path: '/'});
                     } else {
                     } else {
                         this.tipsState = true;
                         this.tipsState = true;
@@ -159,26 +173,37 @@
                     this.$refs.vcodeInput.focus()
                     this.$refs.vcodeInput.focus()
                 })
                 })
             },
             },
+            onBlurInput() {
+                window.scroll(0, 0)
+            }
         }
         }
     }
     }
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-    .container {
-        position: absolute;
+    .main {
+        position: fixed;
         top: 0;
         top: 0;
         left: 0;
         left: 0;
         right: 0;
         right: 0;
         bottom: 0;
         bottom: 0;
         width: 100%;
         width: 100%;
+        height: 100%;
+        min-heigth: 100%;
         overflow: hidden;
         overflow: hidden;
         display: block;
         display: block;
         margin: 0 auto;
         margin: 0 auto;
         background: url("../static/images/login/bg2.png");
         background: url("../static/images/login/bg2.png");
-        background-size: 100%;
+        background-size: cover;
         background-position: bottom center;
         background-position: bottom center;
     }
     }
 
 
+    .form {
+        position: relative;
+        height: 100vh;
+        overflow-y: auto;
+        width: 100%;
+    }
     .topImg {
     .topImg {
         width: 100%;
         width: 100%;
         overflow: hidden;
         overflow: hidden;
@@ -195,7 +220,7 @@
     }
     }
 
 
     .control {
     .control {
-        width: 100%;
+        width: 92%;
         overflow: hidden;
         overflow: hidden;
         display: block;
         display: block;
         margin: 0 auto;
         margin: 0 auto;
@@ -203,7 +228,7 @@
     }
     }
 
 
     .vertify {
     .vertify {
-        width: 100%;
+        width: 90%;
         overflow: hidden;
         overflow: hidden;
         display: block;
         display: block;
         margin: 0 auto;
         margin: 0 auto;
@@ -229,7 +254,7 @@
     .cubesContainer ul {
     .cubesContainer ul {
         position: relative;
         position: relative;
         bottom: 60px;
         bottom: 60px;
-        width: 200px;
+        width: 240px;
         height: 60px;
         height: 60px;
         overflow: hidden;
         overflow: hidden;
         display: block;
         display: block;
@@ -237,11 +262,12 @@
     }
     }
 
 
     .cubesContainer li {
     .cubesContainer li {
-        width: 40px;
-        height: 40px;
+        width: 30px;
+        height: 30px;
         border: 1px solid #E75296;
         border: 1px solid #E75296;
         float: left;
         float: left;
-        margin-right: 10px;
+        margin-top: 8px;
+        margin-right: 8px;
     }
     }
 
 
     /deep/ .mu-input {
     /deep/ .mu-input {
@@ -278,13 +304,14 @@
 
 
     .cubesContainer /deep/ .mu-text-field-input {
     .cubesContainer /deep/ .mu-text-field-input {
         height: 50px;
         height: 50px;
-        line-height: 50px;
-        font-size: 30px;
+        line-height: 30px;
+        font-size: 22px;
         /*color: #fff;*/
         /*color: #fff;*/
-        text-indent: 40px;
-        letter-spacing: 33px;
+        text-indent: 20px;
+        letter-spacing: 25px;
         color: transparent;
         color: transparent;
         text-shadow: 0 0 0 #E75296;
         text-shadow: 0 0 0 #E75296;
+        text-align: left;
         /*E75296*/
         /*E75296*/
     }
     }
 
 

+ 126 - 31
online/src/page/mainpage.vue

@@ -57,6 +57,9 @@
                 <em>心率带未连接</em>
                 <em>心率带未连接</em>
                 <button>点击连接</button>
                 <button>点击连接</button>
             </div>
             </div>
+            <div class="classInfo" v-if="InClass == 1">
+                <em><span>课程名称</span>:{{DpName}}</em>
+            </div>
         </div>
         </div>
         <div class="middle">
         <div class="middle">
             <ul>
             <ul>
@@ -124,6 +127,9 @@
     import LineExample from '../components/LineExample'
     import LineExample from '../components/LineExample'
     import {
     import {
         UserSelfQuery,
         UserSelfQuery,
+        GetDuInfoAndUserInfoByUserMd5,
+        HrSensorsUpdate,
+        AddAppHeartRate,
     } from '../api/getApiRes.js'
     } from '../api/getApiRes.js'
 
 
     let qs = require('qs');
     let qs = require('qs');
@@ -156,17 +162,31 @@
                 cal: 0,
                 cal: 0,
                 sportCal: 0,
                 sportCal: 0,
                 ck: 0,
                 ck: 0,
+                addCalories: 0,//增量卡路里
+                addPureCalories: 0,//增量运动卡路里
                 screenWidth: parseInt(document.body.clientWidth - 10),
                 screenWidth: parseInt(document.body.clientWidth - 10),
                 screenHeight: parseInt(document.documentElement.clientHeight / 3),
                 screenHeight: parseInt(document.documentElement.clientHeight / 3),
                 watchs: [],
                 watchs: [],
                 begin: null,
                 begin: null,
                 heartLine: [],
                 heartLine: [],
                 dataLabels: [],
                 dataLabels: [],
+                InClass: 0,//是否上课
+                DpName: '1234',//课程名称
+                HrId: '',//心率带
+                duId:'',
+                sn:'',
             }
             }
         },
         },
         mounted() {
         mounted() {
             this.getBodyInfo();
             this.getBodyInfo();
             this.init();
             this.init();
+            clearInterval(this.timer);
+            this.timer = setInterval(() => {
+                this.isClass();
+            }, 3000);
+        },
+        beforeDestroy() {
+            clearInterval(this.timer);
         },
         },
         watch: {
         watch: {
             activeLevel(val) {
             activeLevel(val) {
@@ -197,7 +217,7 @@
                         that.activeLevelText = '峰值锻炼';
                         that.activeLevelText = '峰值锻炼';
                         break;
                         break;
                 }
                 }
-            }
+            },
         },
         },
         methods: {
         methods: {
             init() {
             init() {
@@ -205,7 +225,6 @@
                 // 页面初始化操作
                 // 页面初始化操作
                 document.addEventListener('plusready', function (e) {
                 document.addEventListener('plusready', function (e) {
                     plus.bluetooth.onBLECharacteristicValueChange(function (e) {
                     plus.bluetooth.onBLECharacteristicValueChange(function (e) {
-                        console.log(e.characteristicId);
                         if (e.characteristicId == '00002A19-0000-1000-8000-00805F9B34FB') {
                         if (e.characteristicId == '00002A19-0000-1000-8000-00805F9B34FB') {
                             // 获取电量
                             // 获取电量
                             var value = that.buffer2hexPower(e.value);
                             var value = that.buffer2hexPower(e.value);
@@ -229,11 +248,37 @@
                                 that.dataLabels.push('');
                                 that.dataLabels.push('');
                             }
                             }
                             that.DrawHeartLine(that.heartLine, that.dataLabels);
                             that.DrawHeartLine(that.heartLine, that.dataLabels);
-                            // that.reportInfo();
+                            // that.AutoAddAppHeartRate();
                         }
                         }
                     });
                     });
                 });
                 });
             },
             },
+            // 是否正在上课
+            isClass() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                GetDuInfoAndUserInfoByUserMd5(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.InClass = json.InClass;//0下课,1上课
+                        if (that.InClass == 1) {
+                            // 记录duid
+                            that.duid = json.DuInfo.DuId;
+                            // 上课就上报
+                            that.AutoAddAppHeartRate();
+                        } else {
+                            // 不上课就不报
+                            console.log('下课中,不汇报');
+                            return false
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             buffer2hexPower(value) {
             buffer2hexPower(value) {
                 var t = '';
                 var t = '';
                 if (value) {
                 if (value) {
@@ -298,6 +343,9 @@
                 plus.bluetooth.createBLEConnection({
                 plus.bluetooth.createBLEConnection({
                     deviceId: w.deviceId,
                     deviceId: w.deviceId,
                     success: function (e) {
                     success: function (e) {
+                        // 记录心率带sn
+                        that.sn = w.localName;
+                        that.AddHrSensorsUpdate(w.localName);
                         that.Toast('连接成功!', 'success');
                         that.Toast('连接成功!', 'success');
                         // 渲染完毕再执行这个,所以才能没有延时的更改
                         // 渲染完毕再执行这个,所以才能没有延时的更改
                         // 需要一个回调等待5S
                         // 需要一个回调等待5S
@@ -417,7 +465,6 @@
             },
             },
             // 获取基础身体数据
             // 获取基础身体数据
             getBodyInfo() {
             getBodyInfo() {
-                // todo
                 let that = this;
                 let that = this;
                 let param = {
                 let param = {
                     token: localStorage.token,
                     token: localStorage.token,
@@ -426,14 +473,28 @@
                 UserSelfQuery(postdata).then(res => {
                 UserSelfQuery(postdata).then(res => {
                     let json = res;
                     let json = res;
                     if (json.Code == 0) {
                     if (json.Code == 0) {
-                        that.username = json.Rs.username;
-                        that.sex = json.Rs.sex;
-                        that.height = json.Rs.height;
-                        that.age = json.Rs.age;
-                        that.weight = json.Rs.weight;
-                        that.peaceHeart = json.Rs.peaceHeart;
+                        that.username = json.Rs.UserName;
+                        that.sex = json.Rs.Sex;
+                        that.height = json.Rs.Height;
+                        // Birthday
+                        let age = parseInt((new Date().getTime() - new Date(json.Rs.Birthday).getTime()) / (365 * 24 * 60 * 60 * 1000));
+                        that.age = age;
+                        that.weight = parseInt(json.Rs.Weight) / 10;
+                        that.peaceHeart = json.Rs.StaticHr;
+                        // 有无默认头像
+                        if (json.Rs.Head) {
+                            that.userHead = json.Rs.Head;
+                        } else {
+                            that.userHead = 'http://xhead.beswell.com/flyhead.png';
+                        }
                     } else {
                     } else {
-                        that.$message.error(json.Memo);
+                        if (json.Code == 9999999999) {
+                            that.Toast('登陆已失效,请重新登陆');
+                            localStorage.token = '';
+                            this.$router.push({path: '/login'});
+                        } else {
+                            that.Toast(json.Memo, 'error');
+                        }
                     }
                     }
                 })
                 })
             }
             }
@@ -476,14 +537,12 @@
             calcActLevel(heartRate) {
             calcActLevel(heartRate) {
                 let sum = 170 - this.age;
                 let sum = 170 - this.age;
                 this.activeLevel = parseInt((heartRate / sum) * 100);
                 this.activeLevel = parseInt((heartRate / sum) * 100);
-            }
-            ,
+            },
             // 持续时间
             // 持续时间
             calcHoldTime(curTime) {
             calcHoldTime(curTime) {
                 let res = parseInt(curTime.getTime() - this.begin.getTime()) / 1000;
                 let res = parseInt(curTime.getTime() - this.begin.getTime()) / 1000;
                 return parseInt(res)
                 return parseInt(res)
-            }
-            ,
+            },
             // 计算卡路里
             // 计算卡路里
             calcCalorie(heartRate) {
             calcCalorie(heartRate) {
                 let that = this;
                 let that = this;
@@ -496,39 +555,38 @@
                 } else {
                 } else {
                     calorieNoVo2 = ((-20.4022 + (0.4472 * heartRate) + (0.1263 * that.weight) + (0.074 * that.age)) / 4.184) / 60 * 1;
                     calorieNoVo2 = ((-20.4022 + (0.4472 * heartRate) + (0.1263 * that.weight) + (0.074 * that.age)) / 4.184) / 60 * 1;
                 }
                 }
-
+                // 记录增量卡路里
+                that.addCalories = calorieNoVo2;
                 that.cal = that.cal + calorieNoVo2;
                 that.cal = that.cal + calorieNoVo2;
                 // 计算CK
                 // 计算CK
                 that.calcCk(that.cal);
                 that.calcCk(that.cal);
                 that.calcSportCal(calorieNoVo2, curTime)
                 that.calcSportCal(calorieNoVo2, curTime)
-            }
-            ,
+            },
             // 计算CK
             // 计算CK
             calcCk(cal) {
             calcCk(cal) {
                 this.ck = parseFloat(cal / this.weight).toFixed(2);
                 this.ck = parseFloat(cal / this.weight).toFixed(2);
-            }
-            ,
+            },
             // 计算运动卡路里
             // 计算运动卡路里
             calcSportCal(calorieNoVo2) {
             calcSportCal(calorieNoVo2) {
                 let bmrMSjDaily = (10.00 * this.weight) + (6.25 * this.height) - (5.00 * this.age) + 5.00;
                 let bmrMSjDaily = (10.00 * this.weight) + (6.25 * this.height) - (5.00 * this.age) + 5.00;
                 let BmrMSjRmrcb = parseFloat((bmrMSjDaily * 1.1) / 24);
                 let BmrMSjRmrcb = parseFloat((bmrMSjDaily * 1.1) / 24);
                 let calorieNoVo2Pure = (calorieNoVo2 - BmrMSjRmrcb / 3600 * 1);
                 let calorieNoVo2Pure = (calorieNoVo2 - BmrMSjRmrcb / 3600 * 1);
+
+                // 记录增量运动卡路里
+                that.addPureCalories = calorieNoVo2Pure;
                 this.sportCal = this.sportCal + calorieNoVo2Pure;
                 this.sportCal = this.sportCal + calorieNoVo2Pure;
-            }
-            ,
+            },
             // 绘制心电图
             // 绘制心电图
             DrawHeartLine(heartLine, dataLabels) {
             DrawHeartLine(heartLine, dataLabels) {
                 this.dataLabels = dataLabels;
                 this.dataLabels = dataLabels;
                 this.dataDatasets = heartLine;
                 this.dataDatasets = heartLine;
                 this.calcMaxHr(heartLine);
                 this.calcMaxHr(heartLine);
                 this.calcAveHr(heartLine);
                 this.calcAveHr(heartLine);
-            }
-            ,
+            },
             // 最大心率
             // 最大心率
             calcMaxHr(heartLine) {
             calcMaxHr(heartLine) {
                 this.heartMax = Math.max(...heartLine);
                 this.heartMax = Math.max(...heartLine);
-            }
-            ,
+            },
             // 平均心率
             // 平均心率
             calcAveHr(heartLine) {
             calcAveHr(heartLine) {
                 var sum = 0;
                 var sum = 0;
@@ -538,19 +596,43 @@
                 this.heartAverage = parseInt(sum / heartLine.length);
                 this.heartAverage = parseInt(sum / heartLine.length);
             },
             },
             // 上报信息
             // 上报信息
-            reportInfo() {
-                // todo
+            AutoAddAppHeartRate() {
                 let that = this;
                 let that = this;
                 let param = {
                 let param = {
                     token: localStorage.token,
                     token: localStorage.token,
-                    regionid: regionid,
+                    duId: that.duId,
+                    sn: that.sn,
+                    hrId: that.HrId,
+                    heartRate: that.heartRate,
+                    rcvTime: new Date().getTime(),
+                    calories: that.addCalories,
+                    pureCalories: that.addPureCalories,
                 };
                 };
                 let postdata = qs.stringify(param);
                 let postdata = qs.stringify(param);
-                SchoolTimeQueryByDate(postdata).then(res => {
+                AddAppHeartRate(postdata).then(res => {
                     let json = res;
                     let json = res;
                     if (json.Code == 0) {
                     if (json.Code == 0) {
+                        console.log('心率数据上传成功!');
                     } else {
                     } else {
-                        that.$message.error(json.Memo);
+                        that.Toast(json.Memo);
+                    }
+                })
+            },
+            AddHrSensorsUpdate(sn) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    sn: sn,
+                };
+                let postdata = qs.stringify(param);
+                HrSensorsUpdate(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.HrId = json.HrId;
+                        that.Toast('心率带已连接在线课程', 'success');
+                    } else {
+                        that.HrId = '';
+                        that.Toast(json.Memo);
                     }
                     }
                 })
                 })
             },
             },
@@ -1098,4 +1180,17 @@
         float: right;
         float: right;
         text-align: right;
         text-align: right;
     }
     }
+
+    .classInfo {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-size: 16px;
+        text-align: center;
+    }
+
+    .classInfo span {
+        font-size: 12px;
+    }
 </style>
 </style>

+ 2 - 2
online/src/router/index.js

@@ -115,8 +115,8 @@ router.beforeEach((to,from,next)=>{
         next();
         next();
     }else{
     }else{
         //如果token存在,就正常跳转,如果不存在,则说明未登陆,则跳转到'login'
         //如果token存在,就正常跳转,如果不存在,则说明未登陆,则跳转到'login'
-        // isLogin? next() : next("/login");
-        next();
+        isLogin? next() : next("/login");
+        // next();
     }
     }
 });
 });