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 { ...@@ -21,10 +21,11 @@ export default {
$route: function() { $route: function() {
let isBack = this.$router.isBack let isBack = this.$router.isBack
if (isBack) { if (isBack) {
this.transitionName = 'slide-right' this.transitionName = 'slide-right'
console.log(this.transitionName, 'pop动画')
} else { } else {
this.transitionName = 'slide-left' this.transitionName = 'slide-left'
console.log(this.transitionName, 'push动画')
} }
// 做完回退动画后,要设置成前进动画,否则下次打开页面动画将还是回退 // 做完回退动画后,要设置成前进动画,否则下次打开页面动画将还是回退
this.$router.isBack = false this.$router.isBack = false
......
...@@ -2,7 +2,7 @@ import request from '@/utils/request' ...@@ -2,7 +2,7 @@ import request from '@/utils/request'
import { Toast } from 'vant'; import { Toast } from 'vant';
function requestHandle (res) { function requestHandle (res) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(res) // console.log(res)
if(res.status == 200 && (!res.data.code || res.data.code == 0)) { if(res.status == 200 && (!res.data.code || res.data.code == 0)) {
resolve(res) resolve(res)
} else { } else {
...@@ -23,10 +23,10 @@ export function apiRequest( obj = { ...@@ -23,10 +23,10 @@ export function apiRequest( obj = {
delete obj.params delete obj.params
} }
return request(obj).then(res => { return request(obj).then(res => {
console.log('then') // console.log('then')
return requestHandle(res) return requestHandle(res)
}).catch(err => { }).catch(err => {
console.log('catch', JSON.stringify(err)) // console.log('catch', JSON.stringify(err))
return requestHandle(err) return requestHandle(err)
}) })
......
...@@ -97,13 +97,13 @@ const router = new Router({ ...@@ -97,13 +97,13 @@ const router = new Router({
}) })
router.beforeEach((from, to , next) => { router.beforeEach((from, to , next) => {
// 路由拦截 // 路由拦截
console.log(from, to) // console.log(from, to)
if(window.localStorage.getItem('login') || from.path === '/login') { if(window.localStorage.getItem('login') || from.path === '/login') {
next() next()
} else { } else {
// router.redirect() // router.redirect()
if(to.path === '/login') { if(to.path === '/login') {
console.log('11212') // console.log('11212')
next() next()
} else { } else {
next('/login?' + Date.now()) next('/login?' + Date.now())
......
...@@ -87,13 +87,13 @@ const router = new Router({ ...@@ -87,13 +87,13 @@ const router = new Router({
}) })
router.beforeEach((from, to , next) => { router.beforeEach((from, to , next) => {
// 路由拦截 // 路由拦截
console.log(from, to) // console.log(from, to)
if(window.localStorage.getItem('login') || from.path === '/login') { if(window.localStorage.getItem('login') || from.path === '/login') {
next() next()
} else { } else {
// router.redirect() // router.redirect()
if(to.path === '/login') { if(to.path === '/login') {
console.log('11212') // console.log('11212')
next() next()
} else { } else {
next('/login?' + Date.now()) next('/login?' + Date.now())
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
} from '@/utils/auth' } from '@/utils/auth'
// 创建axios实例 // 创建axios实例
console.log(process.env) // console.log(process.env)
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
timeout: 10 * 1000 // 请求超时时间, 10秒 timeout: 10 * 1000 // 请求超时时间, 10秒
...@@ -61,7 +61,7 @@ service.interceptors.response.use( ...@@ -61,7 +61,7 @@ service.interceptors.response.use(
// return response.data; // return response.data;
// } // }
err => { err => {
console.dir(err); // console.dir(err);
if (err && err.response) { if (err && err.response) {
switch (err.response.status) { switch (err.response.status) {
case 400: case 400:
...@@ -134,7 +134,7 @@ service.interceptors.response.use( ...@@ -134,7 +134,7 @@ service.interceptors.response.use(
break break
} }
} }
console.log(err.message) // console.log(err.message)
return Promise.reject(err.response) return Promise.reject(err.response)
} }
) )
......
...@@ -62,14 +62,14 @@ export default { ...@@ -62,14 +62,14 @@ export default {
methods: { methods: {
onLoad() { onLoad() {
// 异步更新数据 // 异步更新数据
console.log('onLoad') // console.log('onLoad')
this.getList(); this.getList();
this.page++ this.page++
}, },
onRefresh() { onRefresh() {
this.page = 0; this.page = 0;
console.log('onRefresh') // console.log('onRefresh')
this.getList(true); this.getList(true);
}, },
changeBtn(index) { changeBtn(index) {
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
}, },
getList2() { getList2() {
getFilmList().then(res => { getFilmList().then(res => {
console.log(res); // console.log(res);
this.list = res.data.list; 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