sunny 2 anos atrás
pai
commit
3046ba45b7

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .DS_Store
 node_modules/
 dist/
+dist.zip*
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*

+ 7 - 2
src/components/SiderInfo.vue

@@ -10,7 +10,7 @@
                     <div class="second-line">点亮在商城的每一天</div>
                 </div>
                 <button class="btn signedin-btn">
-                    <span v-if="dataInfo.signStatus==0" class="btn-text sign-text">去签到</span>
+                    <span @click="goToSignIn" v-if="dataInfo.signStatus==0" class="btn-text sign-text">去签到</span>
                     <span v-else class="btn-text signed-text">已签到</span>
                 </button>
             </div>
@@ -77,10 +77,15 @@ export default {
         };
     },
     created() {
-        // this.getUserInfo();
+        this.getUserInfo();
         this.getHoursTip()
     },
     methods: {
+        goToSignIn(){
+            this.$router.push({
+                path: '/home/signIn',
+            });
+        },
         getUserInfo(){
             const parmas = {
                 userId:13683797487

+ 0 - 1
src/router/index.js

@@ -83,7 +83,6 @@ const routes = [
 ]
 
 const router = new VueRouter({
-  mode: 'history',
   linkActiveClass:'route-active',
   routes,
 })

+ 1 - 1
src/utils/request.js

@@ -4,7 +4,7 @@ import { getToken } from '@/utils/auth'
 
 // create an axios instance
 const service = axios.create({
-  baseURL: 'http://47.103.79.143:9084/admin', // api的base_url
+  baseURL: 'http://47.103.79.143:9085/admin', // api的base_url
   timeout: 10000 // request timeout
 })
 

+ 2 - 2
src/views/HomeView/SignIn.vue

@@ -115,8 +115,8 @@ export default {
     };
   },
   created() {
-    // this.getSignInfo();
-    // this.getUserInfo();
+    this.getSignInfo();
+    this.getUserInfo();
   },
   methods: {
     // 点击日期