Commit 1048bf6c by duanguohui

xd: 去除一些打印

parent 73dae00e
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,10 +21,11 @@ export default {
$route: function() {
let isBack = this.$router.isBack
if (isBack) {
this.transitionName = 'slide-right'
console.log(this.transitionName, 'pop动画')
} else {
this.transitionName = 'slide-left'
console.log(this.transitionName, 'push动画')
}
// 做完回退动画后,要设置成前进动画,否则下次打开页面动画将还是回退
this.$router.isBack = false
......
......@@ -2,7 +2,7 @@ import request from '@/utils/request'
import { Toast } from 'vant';
function requestHandle (res) {
return new Promise((resolve, reject) => {
console.log(res)
// console.log(res)
if(res.status == 200 && (!res.data.code || res.data.code == 0)) {
resolve(res)
} else {
......@@ -23,10 +23,10 @@ export function apiRequest( obj = {
delete obj.params
}
return request(obj).then(res => {
console.log('then')
// console.log('then')
return requestHandle(res)
}).catch(err => {
console.log('catch', JSON.stringify(err))
// console.log('catch', JSON.stringify(err))
return requestHandle(err)
})
......
......@@ -97,13 +97,13 @@ const router = new Router({
})
router.beforeEach((from, to , next) => {
// 路由拦截
console.log(from, to)
// console.log(from, to)
if(window.localStorage.getItem('login') || from.path === '/login') {
next()
} else {
// router.redirect()
if(to.path === '/login') {
console.log('11212')
// console.log('11212')
next()
} else {
next('/login?' + Date.now())
......
......@@ -87,13 +87,13 @@ const router = new Router({
})
router.beforeEach((from, to , next) => {
// 路由拦截
console.log(from, to)
// console.log(from, to)
if(window.localStorage.getItem('login') || from.path === '/login') {
next()
} else {
// router.redirect()
if(to.path === '/login') {
console.log('11212')
// console.log('11212')
next()
} else {
next('/login?' + Date.now())
......
......@@ -7,7 +7,7 @@ import {
} from '@/utils/auth'
// 创建axios实例
console.log(process.env)
// console.log(process.env)
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
timeout: 10 * 1000 // 请求超时时间, 10秒
......@@ -61,7 +61,7 @@ service.interceptors.response.use(
// return response.data;
// }
err => {
console.dir(err);
// console.dir(err);
if (err && err.response) {
switch (err.response.status) {
case 400:
......@@ -134,7 +134,7 @@ service.interceptors.response.use(
break
}
}
console.log(err.message)
// console.log(err.message)
return Promise.reject(err.response)
}
)
......
......@@ -62,14 +62,14 @@ export default {
methods: {
onLoad() {
// 异步更新数据
console.log('onLoad')
// console.log('onLoad')
this.getList();
this.page++
},
onRefresh() {
this.page = 0;
console.log('onRefresh')
// console.log('onRefresh')
this.getList(true);
},
changeBtn(index) {
......@@ -104,7 +104,7 @@ export default {
},
getList2() {
getFilmList().then(res => {
console.log(res);
// console.log(res);
this.list = res.data.list;
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment