Browse Source

签到样式调整

sunlupeng 2 years ago
parent
commit
9c9e620c1a
3 changed files with 33 additions and 16 deletions
  1. 27 11
      src/components/Calendar.vue
  2. 4 3
      src/permission.js
  3. 2 2
      src/utils/request.js

+ 27 - 11
src/components/Calendar.vue

@@ -18,7 +18,17 @@
           isToday: item.date == today,
           isSelected: item.date == selectedDate,
           isMarked: markDates.includes(item.date)
-        }" @click="clickDate(item)">{{ item.date == today ? '今' : item.day }}</li>
+        }" @click="clickDate(item)">
+        <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
+          <div style="font-size: 20px;">
+            {{ item.date == today ? '今' : item.day }}
+          </div>
+          <div style="font-size: 12px;color: #1e80ff;">
+            {{ markDates.includes(item.date) ? '已签到' : '' }}
+          </div>
+        </div>
+         
+      </li>
       </ul>
     </div>
 
@@ -123,9 +133,9 @@ export default {
     // 星期
     weeks() {
       if (this.mondayStart) {
-        return ['一', '二', '三', '四', '五', '六', '日']
+        return ['一', '二', '三', '四', '五', '六', '日']
       } else {
-        return ['日', '一', '二', '三', '四', '五', '六']
+        return ['日', '一', '二', '三', '四', '五', '六']
       }
     },
     dateStyle() {
@@ -294,11 +304,12 @@ $activeBgColor: var(--active-bg-color);
       flex-wrap: wrap;
       margin: 0 auto;
       padding: 0 12px;
+      margin-bottom: 20px;
 
       li {
-        width: 42px;
-        height: 42px;
-        margin: 20px calc((100% / 7 - 42px) / 2);
+        width: 62px;
+        height: 62px;
+        margin: 5px calc((100% / 7 - 62px) / 2);
         display: flex;
         flex-direction: column;
         justify-content: center;
@@ -332,6 +343,7 @@ $activeBgColor: var(--active-bg-color);
           cursor: pointer;
           font-size: 20px;
           color: $fontColor;
+          background: #f2f3f6;
 
           // 今天
           &.isToday {
@@ -339,16 +351,20 @@ $activeBgColor: var(--active-bg-color);
           }
 
           // 标记
-          &.isMarked::after {
-            transition: all ease .25s;
-            background: $markColor;
+          &.isMarked {
+            background-color: #e8f3ff;
           }
+          
+          // &.isMarked::after {
+          //   transition: all ease .25s;
+          //   background: $markColor;
+          // }
 
           // 选中、hover
           &:hover,
           &.isSelected {
-            background: $activeBgColor;
-            color: $activeColor;
+            // background: $activeBgColor;
+            // color: $activeColor;
 
             &:after {
               display: none;

+ 4 - 3
src/permission.js

@@ -5,10 +5,11 @@ import { lockStatus,unlock } from "@/api/allApi";
 //路由跳转之前
 router.beforeEach((to, _from, next) => {
   const path = to.path;
-  const Authorization = to.query.Authorization
+  const Authorization = 'c17596fa2a5fb3b1c3d8515d9f69d468'
+  setToken(Authorization);
+  // const Authorization = to.query.Authorization
   if (path.indexOf('auth') != -1 && Authorization) { 
     setToken(Authorization);
-    // console.log(Authorization);
     next({ path: '/' });
   }else{
     const token = getToken();
@@ -34,7 +35,7 @@ router.beforeEach((to, _from, next) => {
       
       const prodHref = 'http://dgtcloud.dgtis.com/oneportal/login';//发布地址
       
-      const devHref = 'http://192.168.100.208:8080/oneportal/login';//测试地址
+      const devHref = 'http://dgtcloud.dgtis.com/oneportal/login';//测试地址
 
       location.href = process.env.NODE_ENV === 'production' ? prodHref : devHref;
     }

+ 2 - 2
src/utils/request.js

@@ -4,7 +4,7 @@ import { getToken } from '@/utils/auth'
 
 let prodBaseURL = 'http://47.103.79.143:9085/admin';//发布地址
 
-let devBaseURL = 'http://192.168.100.208:9083/admin';//测试地址
+let devBaseURL = 'http://47.103.79.143:9085/admin';//测试地址
 // create an axios instance
 const service = axios.create({
   baseURL: process.env.NODE_ENV === 'production' ? prodBaseURL : devBaseURL,// api 的 base_url
@@ -38,7 +38,7 @@ service.interceptors.response.use(
             
             const prodHref = 'http://dgtcloud.dgtis.com/oneportal/login';//发布地址
             //测试地址
-            const devHref = 'http://192.168.100.208:8080/oneportal/login'; //测试地址
+            const devHref = 'http://dgtcloud.dgtis.com/oneportal/login'; //测试地址
 
             location.href = process.env.NODE_ENV === 'production' ? prodHref : devHref;
         })