psycho 6 年之前
父節點
當前提交
a554b08b61
共有 2 個文件被更改,包括 16 次插入4 次删除
  1. 15 3
      TEAMModelOS/ClientApp/view/index.vue
  2. 1 1
      TEAMModelOS/webpack.config.vendor.js

+ 15 - 3
TEAMModelOS/ClientApp/view/index.vue

@@ -2,7 +2,8 @@
   <div id="app">
     <div class="main-content">
       <img src="../assets/tmd_logo.png" class="logo animated fadeIn" />
-      <Button type="primary" size="large" class="btn-login animated fadeIn" @click="login" v-show="!isLogin">登录</Button>
+      <Button type="primary" size="large" class="btn-login animated fadeIn" @click="handleLogin('login')" v-show="!isLogin">登录</Button>
+      <Button type="primary" size="large" class="btn-login animated fadeIn" @click="handleLogin('regist')" v-show="!isLogin">注册</Button>
       <p v-show="isLogin" class="suc-text">欢迎登录醍摩豆 , {{username}}</p>
       <div v-show="isLogin" class="overlay-wrap center animated fadeIn">
         <div class="main-btn centerCol" @click="sa">
@@ -37,14 +38,24 @@
         this.$router.replace('/Syllabus')
       },
       //访问TW登录并回调
-      login() {
+      handleLogin(types) {
+        console.log(types);
         let that = this;
-        that.$api.getLoginLink({ date: "151615156" }).then(res => {
+        that.$api.getLoginLink({ date: "151615156",type:types }).then(res => {
           let loginUrl = res.result.data;
           let callback = window.location.href;
           window.location.href = loginUrl + callback;
         })
       },
+      //访问TW注册并回调
+      //handleRegister() {
+      //  let that = this;
+      //  that.$api.getLoginLink({ date: "151615156",type:"regist" }).then(res => {
+      //    let loginUrl = res.result.data;
+      //    let callback = window.location.href;
+      //    window.location.href = loginUrl + callback;
+      //  })
+      //},
       //获取URL地址的指定参数
       getParamAsCH(paramName) {
         var paramValue = "";
@@ -164,6 +175,7 @@
 
   .btn-login {
     width: 150px;
+    margin-top:15px;
     background-color: #a0a1a275 !important;
     border-color: #87888a !important;
   }

+ 1 - 1
TEAMModelOS/webpack.config.vendor.js

@@ -34,7 +34,7 @@ module.exports = () => {
       library: '[name]_[hash]'
     },
     plugins: [
-      //extractCSS,
+      extractCSS,
       new OptimizeCSSPlugin({
         cssProcessorOptions: {
           safe: true