From e08d2a6fa70d30560f3ced5e573be857dc3ab140 Mon Sep 17 00:00:00 2001 From: gaoxs Date: Mon, 13 Apr 2020 17:48:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CountDown.vue | 2 -- components/ProductWindow.vue | 1 - components/PromotionGood.vue | 1 - libs/wechat.js | 3 +- main.js | 3 -- pages/Loading/index.vue | 3 -- pages/activity/GoodsSeckill/index.vue | 1 - pages/activity/GroupDetails/index.vue | 1 - pages/activity/SeckillDetails/index.vue | 2 -- pages/home/index.vue | 2 -- pages/launch/index.vue | 2 -- pages/order/OrderDetails/index.vue | 1 - pages/order/OrderSubmission/index.vue | 19 ---------- pages/shop/GoodsCon/index.vue | 4 --- pages/shop/GoodsList/index.vue | 1 - pages/shop/ShoppingCart/index.vue | 3 -- pages/user/Login/index.vue | 1 - pages/user/PersonalData/index.vue | 2 +- pages/user/User/index.vue | 4 --- pages/user/address/AddAddress/index.vue | 1 - pages/user/signIn/Integral/index.vue | 3 +- utils/index.js | 46 ------------------------- utils/request.js | 2 -- 23 files changed, 3 insertions(+), 105 deletions(-) diff --git a/components/CountDown.vue b/components/CountDown.vue index eef751a..8ca5cff 100644 --- a/components/CountDown.vue +++ b/components/CountDown.vue @@ -43,7 +43,6 @@ export default { // this.show_time(); }, mounted: function() { - console.log(this) this.rtipText = this.$props.tipText; this.rdayText = this.$props.dayText; this.rhourText = this.$props.hourText; @@ -51,7 +50,6 @@ export default { this.rsecondText = this.$props.secondText; this.rdatatime = this.$props.datatime; this.risDay = this.$props.isDay; - console.log(this.rdayText) this.show_time(); }, methods: { diff --git a/components/ProductWindow.vue b/components/ProductWindow.vue index 590c6b3..ef434e0 100644 --- a/components/ProductWindow.vue +++ b/components/ProductWindow.vue @@ -66,7 +66,6 @@ export default { return {}; }, mounted: function() { - console.log(this.attr); }, methods: { closeAttr: function() { diff --git a/components/PromotionGood.vue b/components/PromotionGood.vue index 12c1e8b..7880adb 100644 --- a/components/PromotionGood.vue +++ b/components/PromotionGood.vue @@ -31,7 +31,6 @@ export default { } }, mounted() { - console.log(this, 999); } }; diff --git a/libs/wechat.js b/libs/wechat.js index d309588..4acb0b4 100644 --- a/libs/wechat.js +++ b/libs/wechat.js @@ -1,8 +1,7 @@ // 支付模块 export const weappPay = (option) => { return new Promise((resolve, reject) => { - // 吊起微信支付 - console.log(option,9999) + // 吊起微信支付 uni.requestPayment({ ...option, timeStamp: option.timeStamp + '', diff --git a/main.js b/main.js index 2394f6f..34b32da 100644 --- a/main.js +++ b/main.js @@ -50,7 +50,6 @@ Vue.mixin({ const { $mp } = this.$root - console.log($mp) this._route = parseRoute($mp) // this.$VUE_APP_RESOURCES_URL = VUE_APP_RESOURCES_URL; this._data.$VUE_APP_RESOURCES_URL = VUE_APP_RESOURCES_URL; @@ -84,7 +83,6 @@ store.commit('UPDATE_DEVICETYPE','h5') // #ifdef APP-PLUS // App平台编译的代码 -console.log('App平台编译的代码') Vue.prototype.$deviceType = 'app' store.commit('UPDATE_DEVICETYPE','app') Vue.prototype.$platform = uni.getSystemInfoSync().platform @@ -92,7 +90,6 @@ Vue.prototype.$platform = uni.getSystemInfoSync().platform // #ifdef MP-WEIXIN // 微信小程序编译的代码 -console.log('微信小程序编译的代码') Vue.prototype.$deviceType = 'weixin' store.commit('UPDATE_DEVICETYPE','weixin') // #endif diff --git a/pages/Loading/index.vue b/pages/Loading/index.vue index f910750..943f58f 100644 --- a/pages/Loading/index.vue +++ b/pages/Loading/index.vue @@ -41,8 +41,6 @@ export default { this.toLaunch(); return; } - console.log(this.$store.getters.token, '获取store里面的 token'); - console.log(this.$store.getters.userInfo, '获取store里面的 userInfo'); cookie.get("spread"); // this.toLaunch(); if (this.$deviceType == 'app') { @@ -61,7 +59,6 @@ export default { methods: { ...mapActions(["changeAuthorization", "setUserInfo"]), toLaunch() { - console.log(this); this.changeAuthorization(false); this.$yrouter.switchTab({ path: "/pages/home/index" diff --git a/pages/activity/GoodsSeckill/index.vue b/pages/activity/GoodsSeckill/index.vue index 79a07a5..5067495 100644 --- a/pages/activity/GoodsSeckill/index.vue +++ b/pages/activity/GoodsSeckill/index.vue @@ -114,7 +114,6 @@ export default { }, methods: { changeTime: function(index) { - console.log(index); this.active = index; this.getSeckillList(); }, diff --git a/pages/activity/GroupDetails/index.vue b/pages/activity/GroupDetails/index.vue index 8d95443..5f82c99 100644 --- a/pages/activity/GroupDetails/index.vue +++ b/pages/activity/GroupDetails/index.vue @@ -235,7 +235,6 @@ export default { }, mountedStart: function() { var that = this; - console.log(that); let id = that.$yroute.query.id; getCombinationDetail(id).then(res => { that.userCollect = res.data.userCollect; diff --git a/pages/activity/SeckillDetails/index.vue b/pages/activity/SeckillDetails/index.vue index 0e53e49..edb95f2 100644 --- a/pages/activity/SeckillDetails/index.vue +++ b/pages/activity/SeckillDetails/index.vue @@ -199,7 +199,6 @@ export default { if (that.attr.cartAttr == false) { that.attr.cartAttr = !this.attr.attrcartAttr; } else { - console.log(that.storeInfo); var data = {}; data.productId = that.storeInfo.productId; data.cartNum = that.attr.productSelect.cart_num; @@ -208,7 +207,6 @@ export default { data.new = 1; postCartAdd(data) .then(res => { - console.log(res); that.$yrouter.push({ path: "/pages/order/OrderSubmission/index", query: { id: res.data.cartId } diff --git a/pages/home/index.vue b/pages/home/index.vue index e4caaf7..e13f1dd 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -213,7 +213,6 @@ export default { title: '加载中' }); getHomeData().then(res => { - console.log(res); that.logoUrl = res.data.logoUrl; that.$set(that, 'banner', res.data.banner); that.$set(that, 'menus', res.data.menus); @@ -246,7 +245,6 @@ export default { }); }, goGoodsCon(item) { - console.log(item); this.$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: item.id } diff --git a/pages/launch/index.vue b/pages/launch/index.vue index 66f0ad8..ffcd099 100644 --- a/pages/launch/index.vue +++ b/pages/launch/index.vue @@ -46,7 +46,6 @@ export default { }, mounted() { let type = this.$yroute.query.type; - console.log(2222) if (type) { } @@ -54,7 +53,6 @@ export default { // } }, onHide() { - console.log("清除状态"); } }; diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue index 963414b..a3e113a 100644 --- a/pages/order/OrderDetails/index.vue +++ b/pages/order/OrderDetails/index.vue @@ -514,7 +514,6 @@ export default { }); }, goGroupRule(orderInfo) { - console.log(orderInfo) this.$yrouter.push({ path: "/pages/activity/GroupRule/index", query: { diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index c073541..43def2c 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -345,7 +345,6 @@ }, changeUseIntegral: function(e) { // this.computedPrice(); - console.log(e) this.useIntegral = e.mp.detail.value[0]; }, computedPrice() { @@ -486,22 +485,6 @@ if (this.$deviceType == 'app') { form.form = 'app' } - console.log(this.orderGroupInfo.orderKey, { - realName: this.contacts, - phone: this.contactsTel, - addressId: this.addressInfo.id, - useIntegral: this.useIntegral ? 1 : 0, - couponId: this.usableCoupon.id || 0, - payType: this.active, - pinkId: this.pinkId, - seckillId: this.orderGroupInfo.seckill_id, - combinationId: this.orderGroupInfo.combination_id, - bargainId: this.orderGroupInfo.bargain_id, - from: this.from, - mark: this.mark || "", - shippingType: parseInt(shipping_type) + 1, - ...form - }) createOrder(this.orderGroupInfo.orderKey, { realName: this.contacts, phone: this.contactsTel, @@ -519,7 +502,6 @@ ...form }) .then(res => { - console.log(res) uni.hideLoading(); const data = res.data; switch (data.status) { @@ -565,7 +547,6 @@ break; case "WECHAT_PAY": weappPay(data.result.jsConfig).then(res => { - console.log(res) this.$yrouter.replace({ path: "/pages/order/OrderDetails/index", query: { diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 406c591..d339f99 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -257,9 +257,7 @@ export default { }, computed: mapGetters(["isLogin"]), mounted: function() { - console.log(this); let url = handleQrCode(); - console.log(url); if (url && url.productId) { this.id = url.productId; } else { @@ -329,7 +327,6 @@ export default { if (this.$deviceType == "app") { form.form = "app"; } - console.log(form, 2222); getProductDetail(that.id, form) .then(res => { that.$set(that, "storeInfo", res.data.storeInfo); @@ -500,7 +497,6 @@ export default { }, changeattr: function(msg) { this.attr.cartAttr = msg; - console.log(this.attr, msg); this.isOpen = false; }, //选择属性; diff --git a/pages/shop/GoodsList/index.vue b/pages/shop/GoodsList/index.vue index b91d082..643e3b6 100644 --- a/pages/shop/GoodsList/index.vue +++ b/pages/shop/GoodsList/index.vue @@ -177,7 +177,6 @@ export default { // document.title = this.title || this.$yroute.meta.title; }, get_product_list() { - console.log("请求李贝奥"); var that = this; this.setWhere(); // if (to.name !== "GoodsList") return; diff --git a/pages/shop/ShoppingCart/index.vue b/pages/shop/ShoppingCart/index.vue index 8f16b6d..94ec59f 100644 --- a/pages/shop/ShoppingCart/index.vue +++ b/pages/shop/ShoppingCart/index.vue @@ -193,7 +193,6 @@ export default { // }, watch: { userInfo(user) { - console.log(user, '用户信息,8585'); if (user.uid) { this.carnum(); this.countMoney(); @@ -202,7 +201,6 @@ export default { } }, token(token) { - console.log(token, '用户token,8585'); if (this.userInfo.uid) { this.carnum(); this.countMoney(); @@ -348,7 +346,6 @@ export default { }); return; } - console.log(id); this.$yrouter.push({ path: '/pages/order/OrderSubmission/index', query: { diff --git a/pages/user/Login/index.vue b/pages/user/Login/index.vue index b047c86..693a7f4 100644 --- a/pages/user/Login/index.vue +++ b/pages/user/Login/index.vue @@ -285,7 +285,6 @@ this.current = index; }, async submit() { - console.log("spread:" + cookie.get("spread")); const { account, password diff --git a/pages/user/PersonalData/index.vue b/pages/user/PersonalData/index.vue index 3c789ab..ba56aab 100644 --- a/pages/user/PersonalData/index.vue +++ b/pages/user/PersonalData/index.vue @@ -235,7 +235,7 @@ export default { }) .catch(err => {}); } else if (res.cancel) { - console.log("用户点击取消"); + // console.log("用户点击取消"); } } }); diff --git a/pages/user/User/index.vue b/pages/user/User/index.vue index c615684..2d0363a 100644 --- a/pages/user/User/index.vue +++ b/pages/user/User/index.vue @@ -220,7 +220,6 @@ export default { this.$yrouter.push("/pages/user/PersonalData/index"); }, getPhoneNumber: function(e) { - console.log(e.mp.detail); // 判断一下这里是不是小程序 如果是小程序,走获取微信手机号进行绑定 if (e.mp.detail.errMsg == "getPhoneNumber:ok") { uni.showLoading({ @@ -230,7 +229,6 @@ export default { uni.getProvider({ service: "oauth", success: function(res) { - console.log(res.provider); // 此处可以排除h5 if (res.provider) { uni.login({ @@ -324,8 +322,6 @@ export default { } }, onShow() { - console.log(this.$store.getters.token); - console.log(this.userInfo); if (this.$store.getters.token) { this.User(); this.MenuUser(); diff --git a/pages/user/address/AddAddress/index.vue b/pages/user/address/AddAddress/index.vue index d29dcab..73fcda2 100644 --- a/pages/user/address/AddAddress/index.vue +++ b/pages/user/address/AddAddress/index.vue @@ -133,7 +133,6 @@ export default { this.address.province = e.labelArr[0] || ""; this.address.city = e.labelArr[1] || ""; this.address.district = e.labelArr[2] || ""; - console.log(this.pickerText); }, getUserAddress: function() { if (!this.id) return false; diff --git a/pages/user/signIn/Integral/index.vue b/pages/user/signIn/Integral/index.vue index 3e1646c..a656ffb 100644 --- a/pages/user/signIn/Integral/index.vue +++ b/pages/user/signIn/Integral/index.vue @@ -131,8 +131,7 @@ export default { that.loaded = res.data.length < that.where.limit; that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多"; that.where.page = that.where.page + 1; - that.list.push.apply(that.list, res.data); - console.log(that.list) + that.list.push.apply(that.list, res.data); }, err => { uni.showToast({ diff --git a/utils/index.js b/utils/index.js index af44dbd..255946c 100644 --- a/utils/index.js +++ b/utils/index.js @@ -119,7 +119,6 @@ export const replaceLogin = (msg) => { }); // 这里代表已经失去登录状态以及401强制推出登录了 store.commit('LOGOUT') - console.log(uni, 989) if (Vue.prototype.$deviceType == 'weixin') { // 如果是微信小程序,跳转到授权页 login({ @@ -152,7 +151,6 @@ export const getProvider = () => { uni.getProvider({ service: 'oauth', success: function (res) { - console.log(`当前环境的服务商为 | ${res.provider}`) // 此处可以排除h5 if (res.provider) { resolve(res.provider[0]) @@ -185,7 +183,6 @@ export const authorize = (authorizeStr) => { } export const login = (option) => { - console.log('调用登录') return new Promise((resolve, reject) => { getProvider().then(provider => { // 调用登录接口 @@ -193,16 +190,12 @@ export const login = (option) => { provider: provider, success: function (loginRes) { // 微信登录 - console.log(`获取code | ${loginRes.code}`) let code = loginRes.code; // 检查授权, 检查用户信息授权 authorize('userInfo').then(() => { uni.getUserInfo({ provider: provider, success: function (user) { - console.log(user) - console.log(`用户昵称为 | ${user.userInfo.nickName}`); - console.log(`当前的环境 | ${Vue.prototype.$deviceType}`) if (Vue.prototype.$deviceType == 'weixin') { wxappAuth({ encryptedData: user.encryptedData, @@ -212,23 +205,14 @@ export const login = (option) => { }).then(({ data }) => { - console.log('登录成功') - console.log(data) - console.log('登录成功1') - resolve(data) - console.log('登录成功3') - uni.hideLoading(); - console.log('登录成功4') store.commit("LOGIN", data.token, dayjs(data.expires_time)); - console.log('登录成功5') console.log(store) handleGetUserInfo() }).catch(error => { reject() - console.log('微信登录失败') console.log(error) handleFail(option, '微信登录失败') }); @@ -264,19 +248,13 @@ export const login = (option) => { } export const handleGetUserInfo = () => { - console.log('登录后请求用户信息') getUser().then(res => { - console.log(res.data, '登录后的样式') store.dispatch('setUserInfo', res.data) - console.log('登录成功6') var pages = getCurrentPages() //获取加载的页面 - console.log('登录成功7') var currentPage = pages[pages.length - 1] //获取当前页面的对象 let url = "/pages/home/index" let query = {} - console.log('登录成功8') - console.log(currentPage) if (currentPage) { // 获取到最后一个页面 @@ -297,11 +275,6 @@ export const handleGetUserInfo = () => { } } } - console.log('登录成功9') - console.log({ - path: url, - query - }) if (url == '/pages/home/index' || url == '/pages/shop/GoodsClass/index' || url == '/pages/shop/ShoppingCart/index' || url == '/pages/user/User/index') { switchTab({ path: `${url}`, @@ -363,7 +336,6 @@ export function auth() { * userInfo只是用来限时用户信息,作用并不是很大 * ps:只需要判断 token 是否存在即可 */ - console.log(cookie.get('login_status'), 'token') if (cookie.get('login_status')) { return true } @@ -372,7 +344,6 @@ export function auth() { export const handleLoginStatus = (location, complete, fail, success) => { - console.log(location, '开始检验权限') // 不登录可访问的页面 let page = [{ path: '/pages/Loading/index', @@ -405,7 +376,6 @@ export const handleLoginStatus = (location, complete, fail, success) => { if (!auth()) { page.map((item) => { - console.log(item.path == path) if (item.path == path) { isAuth = true } @@ -416,14 +386,7 @@ export const handleLoginStatus = (location, complete, fail, success) => { return new Promise((resolve, reject) => { if (isAuth) { - console.log('有权限') // 登录了有权限 - console.log({ - url: parseUrl(location), - complete, - fail, - success - }) resolve({ url: parseUrl(location), complete, @@ -431,7 +394,6 @@ export const handleLoginStatus = (location, complete, fail, success) => { success }) } else { - console.log('无权限') // 未登录没有权限 replaceLogin() reject() @@ -443,7 +405,6 @@ export const handleLoginStatus = (location, complete, fail, success) => { export function push(location, complete, fail, success) { handleLoginStatus(location, complete, fail, success).then(params => { - console.log(params) uni.navigateTo(params) }).catch(error => { // 没有权限 @@ -453,7 +414,6 @@ export function push(location, complete, fail, success) { export function replace(location, complete, fail, success) { handleLoginStatus(location, complete, fail, success).then(params => { - console.log(params) uni.redirectTo(params) }).catch(error => { // 没有权限 @@ -476,9 +436,7 @@ export function back() { } export function switchTab(location, complete, fail, success) { - console.log(location) handleLoginStatus(location, complete, fail, success).then(params => { - console.log(params) uni.switchTab(params) }).catch(error => { // 没有权限 @@ -529,14 +487,12 @@ const getImageInfo = (images) => { src: item, fail: function (res) { imageAry[index] = null - console.log(res) if (imageAry.length == images.length) { resolve(imageAry) } }, success: function (res) { imageAry[index] = res - console.log(res) if (Object.keys(imageAry).length == images.length) { resolve(imageAry) } @@ -562,7 +518,6 @@ export const PosterCanvas = (store, successCallBack) => { mask: true }); getImageInfo([store.image, store.code]).then(res => { - console.log(res) let contentHh = 48 * 1.3 const ctx = uni.createCanvasContext('myCanvas') ctx.clearRect(0, 0, 0, 0); @@ -591,7 +546,6 @@ export const PosterCanvas = (store, successCallBack) => { ctx.setTextAlign('center') ctx.setFontSize(22); ctx.setFillStyle('#333333'); - console.log('长按识别二维码立即购买') ctx.fillText('长按识别二维码立即购买', WIDTH / 2, 1167); ctx.save(); ctx.draw(true, () => { diff --git a/utils/request.js b/utils/request.js index 5663577..68974c4 100644 --- a/utils/request.js +++ b/utils/request.js @@ -55,8 +55,6 @@ function baseRequest(options) { return fly.request(url, params || data, { ...option }).then(res => { - console.log(res) - // console.log(url,params,data, ...option) const data = res.data || {}; if (res.status !== 200) { return Promise.reject({ msg: "请求失败", res, data });