diff --git a/app.js b/app.js index ab79f94..ce49c6b 100644 --- a/app.js +++ b/app.js @@ -14,8 +14,7 @@ App({ wx.getLocation({ type: "wgs84", success: function(res) { - that.globalData.locationInfo = res - console.log("getLocation", res); + that.globalData.locationInfo = res; }, fail: error => { console.log(error); diff --git a/components/banner/index.js b/components/banner/index.js index ee42217..9f1f140 100644 --- a/components/banner/index.js +++ b/components/banner/index.js @@ -28,8 +28,6 @@ Component({ }); }, gotobannerdetail: function(e) { - console.log("我要点击进入banner详情页面"); - console.log(e.currentTarget.dataset.id); wx.navigateTo({ url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}` }); diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index 381e7ae..d2d1ccf 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -1,4 +1,4 @@ - + diff --git a/components/gameentry/gentry.js b/components/gameentry/gentry.js index 1643062..13bf6ea 100644 --- a/components/gameentry/gentry.js +++ b/components/gameentry/gentry.js @@ -21,7 +21,6 @@ Component({ data: {} }) .then(res => { - console.log(res); var data = { couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId @@ -74,13 +73,4 @@ Component({ that.setData({ alphaData: animation.export() }); }, }, - onReady: function () { - console.log(this.gamedata, 999999999) - }, - onLoad: function (options) { - console.log(this.gamedata, 999999999) - }, - onShow: function () { - console.log(this.gamedata, 999999999) - } }); \ No newline at end of file diff --git a/components/questionnaire/questionnaire.js b/components/questionnaire/questionnaire.js index 45c02cb..83f9159 100644 --- a/components/questionnaire/questionnaire.js +++ b/components/questionnaire/questionnaire.js @@ -34,7 +34,6 @@ Component({ */ formSubmit:function(e){ let that = this; - console.log(e); /** * 多选 */ @@ -56,7 +55,6 @@ Component({ } }) .then(res => { - console.log(res); this.alphaClick(); this.queueClick(); }) @@ -77,7 +75,6 @@ Component({ * 多选 */ checkboxChange:function(e){ - console.log(e); this.setData({ anwserId:e.detail.value }) diff --git a/dist/cell/index.js b/dist/cell/index.js index 50e635c..56af462 100644 --- a/dist/cell/index.js +++ b/dist/cell/index.js @@ -1,6 +1,5 @@ const warn = (msg, getValue) => { console.warn(msg); - console.log('接受到的值为:', getValue); }; Component({ diff --git a/dist/slide/index.js b/dist/slide/index.js index a397f4f..29534f5 100644 --- a/dist/slide/index.js +++ b/dist/slide/index.js @@ -6,7 +6,7 @@ Component({ }, methods : { handleTap2(){ - console.log(event,1111111) + }, handleTap3(){ diff --git a/dist/swipeout/index.js b/dist/swipeout/index.js index b23748c..19da4b7 100644 --- a/dist/swipeout/index.js +++ b/dist/swipeout/index.js @@ -66,12 +66,10 @@ Component({ */ //query.selectAll('.i-swipeout-button-right-item').boundingClientRect((rects)=>{ // if( rects ){ - // console.log(rects,1111111) // rects.forEach(item => { // limitMovePosition += item.width; // }); // this.data.limitMove = limitMovePosition; - // console.log(limitMovePosition,111111111) // } // }).exec() }else{ diff --git a/pages/actdetail/actdetail.js b/pages/actdetail/actdetail.js index 2d95fd5..3e2f8f2 100644 --- a/pages/actdetail/actdetail.js +++ b/pages/actdetail/actdetail.js @@ -12,7 +12,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(options) let that = this; that.setData({ detail:options.detail diff --git a/pages/addPark/addPark.js b/pages/addPark/addPark.js index ec378fa..3bd8afd 100644 --- a/pages/addPark/addPark.js +++ b/pages/addPark/addPark.js @@ -56,11 +56,9 @@ Page({ onLoad: function (options) { - console.log(options); let that = this; if (Object.keys(options).length!=0){ - console.log("标识") that.setData({ flags: options.flags }) @@ -73,7 +71,6 @@ Page({ }) }, handleTap: function (e) { - console.log(e); this.buttonStatus(); this.setData({ choose: e.target.dataset.cardata, @@ -349,7 +346,6 @@ Page({ prevPage.setData({ addCar: carNumber }) - console.log(carNumber); if (this.data.flags =='managepalte'){ wx.navigateBack({ url: '/pages/managelicenseplate/managelicenseplate?addcar=' + carNumber, diff --git a/pages/bannerdetail/index.js b/pages/bannerdetail/index.js index 8c167ba..35ff90f 100644 --- a/pages/bannerdetail/index.js +++ b/pages/bannerdetail/index.js @@ -13,18 +13,15 @@ Page({ }, onLoad(options) { let that = this; - console.log(options.id); Http.get({ url: config.api.bannerDetail, data: { id: options.id } }).then(res => { - console.log(res); that.setData({ data: res.data }); - console.log(that.data.data); }).catch(err => { wx.showToast({ title: err.errMsg, @@ -36,7 +33,6 @@ Page({ }, gotoactdetail:function(){ let that = this; - console.log("99999"); wx.navigateTo({ url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`, }) diff --git a/pages/bannerdetail/index.wxss b/pages/bannerdetail/index.wxss index 85c8a6a..33560cf 100644 --- a/pages/bannerdetail/index.wxss +++ b/pages/bannerdetail/index.wxss @@ -32,8 +32,9 @@ page { background: #fff; border-radius: 12rpx; width: 705rpx; - height: 212rpx; + /* height: 212rpx; */ margin: 24rpx auto 0; + padding-bottom: 20rpx; } .act text { @@ -60,7 +61,7 @@ page { .proct { position: relative; - height: 60rpx; + /* height: 60rpx; */ margin-top: 20rpx; } diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 1b0fc73..f76b7ca 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -5,7 +5,9 @@ const util = require("../../../utils/util"); Page({ data: { - data: {}, + data: { + title:null + }, questions1:null, questions2:null, display:"none", @@ -33,7 +35,6 @@ Page({ }, phone: function () { let that = this; - console.log(that.data); if (that.data.data.merchantLinkPhone) { wx.makePhoneCall({ phoneNumber: that.data.data.merchantLinkPhone @@ -46,7 +47,6 @@ Page({ * 问卷调查组件传递的值 */ close: function (e) { - console.log(e.detail); let that = this; that.setData({ questions1: e.detail, @@ -54,7 +54,6 @@ Page({ }) }, formSubmit:function(e){ - console.log(e.detail); let that = this; that.setData({ questions2: e.detail, @@ -66,7 +65,6 @@ Page({ */ gotopay:function(){ let that = this; - console.log(that.data.questions1); if (that.data.questions1 || that.data.questions2){ that.setData({ display: "none", @@ -92,7 +90,6 @@ Page({ questionnaire: JSON.parse(res.data.content), questionId:res.data.id }); - console.log(that.data.questionnaire); } }) .catch(err => { @@ -113,6 +110,7 @@ Page({ var total_micro_second = EndTime - NowTime || []; // 渲染倒计时时钟 let obj = that.dateformat(total_micro_second); + if (total_micro_second>0){ that.setData({ clock: obj, @@ -163,7 +161,8 @@ Page({ */ that.setData({ couponChannelId: options.couponChannelId, - couponId: options.couponId + couponId: options.couponId, + title: that.data.data.title, }); var parmer = { url: config.api.couponDetail, @@ -172,7 +171,6 @@ Page({ } }; Http.get(parmer).then(res => { - console.log(res.data); if (res.data.endTime){ that.countdown(res.data.endTime); //当前时间与优惠券下架时间做计算 @@ -214,7 +212,9 @@ Page({ /** * 支付订单更新 */ - payOrderUpdate: (orderId, payOrderId, status, reason) => { + payOrderUpdate: (orderId, payOrderId, status, reason,type,_this) => { + let that=this; + // 支付成功 Http.post({ url: config.api.payOrderUpdate, data: { @@ -225,17 +225,21 @@ Page({ } }) .then(res => { - console.log(res); - console.log("payOrderUpdate then", res); - }) - .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); + if(!type){ + setTimeout(() => { + wx.navigateTo({ + url: `/pages/order/detail/index?orderId=${ + orderId + }` + }); + }, 1000) + } }) + .catch(err => { + setTimeout(function(){ + _this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this); + },2000) + }); }, /** * 发起支付 @@ -251,7 +255,6 @@ Page({ data: {} }) .then(res => { - console.log(res); var data = { couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId @@ -270,7 +273,6 @@ Page({ }); }) .catch(err => { - console.log(err); if (err.code == "2011") { wx.showToast({ title: "商户信息没找到", @@ -358,7 +360,6 @@ Page({ }) .then(res => { if (typeof (res) != "undefined") { - console.log("", res); let orderId = "" + res.data.id; that.setData({ orderId: orderId @@ -374,7 +375,6 @@ Page({ orderId: orderId } }).then(res => { - console.log(res); /// Begin payment ---- var payOrderId = "" + res.data.payOrderId; wx.hideLoading(); @@ -385,19 +385,11 @@ Page({ signType: (res.data.signType) ? res.data.signType : "MD5", paySign: res.data.paySign, success: res => { - that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 - console.log(res); + that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that); if (res.errMsg == "requestPayment:ok") { setTimeout(function () { wx.hideLoading(); }, 2000); - setTimeout(() => { - wx.navigateTo({ - url: `/pages/order/detail/index?orderId=${ - that.data.orderId - }` - }); - }, 1000) /** * 用户支付成功以后跳转到券包列表 */ @@ -410,14 +402,13 @@ Page({ wx.switchTab({ url: '/pages/passCar/passCar' }); - }, 1600) + }, 1600); } } }, fail: res => { - that.payOrderUpdate(that.data.orderId, payOrderId, 2); // 支付失败 - console.log(res); + that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail'); // 支付失败 return; }, complete: res => { @@ -439,12 +430,8 @@ Page({ }); }) } else { - /** - * @Meo - * 功能:用户问卷调查功能 - */ - console.log(that.data.data.type); - that.payOrderUpdate(orderId, "0", 1); + // 免费券 + that.payOrderUpdate(orderId, "0", 1, '', 'fail'); wx.setStorage({ key: 'couponNum', data: "couponNum" @@ -456,11 +443,6 @@ Page({ }` }); }, 1000) - /** - * @Meo - * type - * 5 停车券 - */ if (that.data.data.type == 5) { setTimeout(() => { wx.switchTab({ @@ -484,24 +466,20 @@ Page({ onShareAppMessage: function (options) { var that = this; var shareObj = { - title: options.target.dataset.title, - path: '/pages/index/index', + title: that.data.data.title, + path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}`, success: function (res) { if (res.errMsg == 'shareAppMessage:ok') { - console.log(res) } }, fail: function (error) { if (res.errMsg == 'shareAppMessage:fail cancel') { - console.log(error) } else if (res.errMsg == 'shareAppMessage:fail') { - console.log(error) } } }; // 来自页面内的按钮的转发 if (options.from == 'button') { - console.log(options) var eData = options.target.dataset.id; var couponId = options.target.dataset.couponid; // shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${couponId}`; diff --git a/pages/couponorder/detail/index.js b/pages/couponorder/detail/index.js index 81bc47f..7cfbcb4 100644 --- a/pages/couponorder/detail/index.js +++ b/pages/couponorder/detail/index.js @@ -61,7 +61,6 @@ Page({ }, onLoad: function(options) { let that = this; - console.log(options.sight); setTimeout(function() { wx.setScreenBrightness({ value: 0.7, @@ -86,7 +85,6 @@ Page({ couponOrderId: options.quancode } }).then(res => { - console.log(res); that.setData({ couponorderstatus: res.data.couponOrderStatus, data: res.data @@ -130,7 +128,6 @@ Page({ couponOrderId: options.quancode } }).then(res => { - console.log(res); that.setData({ couponorderstatus: res.data.couponOrderStatus, data: res.data @@ -154,7 +151,6 @@ Page({ }, phone: function() { let that = this; - console.log(that.data); if (that.data.data.merchantLinkPhone) { wx.makePhoneCall({ phoneNumber: that.data.data.merchantLinkPhone diff --git a/pages/couponorder/detail/index.wxml b/pages/couponorder/detail/index.wxml index ee7b375..0eb28fe 100644 --- a/pages/couponorder/detail/index.wxml +++ b/pages/couponorder/detail/index.wxml @@ -77,6 +77,7 @@ 订单编号: {{data.orderId}} + diff --git a/pages/couponorder/index/index.js b/pages/couponorder/index/index.js index c0aeee5..a6e3782 100644 --- a/pages/couponorder/index/index.js +++ b/pages/couponorder/index/index.js @@ -51,7 +51,6 @@ Page({ }, //点击跳转到券详情页面 gotouse: function (e) { - console.log(e.currentTarget.dataset.couponorderstatus); if (this.data.mystatus == '' || this.data.mystatus == 'undefined') { var mystatus = e.currentTarget.dataset.couponorderstatus; } else { @@ -77,7 +76,6 @@ Page({ couponOrderStatus: key } }).then(res => { - console.log(res); res.data.list.map(file => { file.expiredTime = util.fmtDate(file.expiredTime); }); @@ -86,7 +84,6 @@ Page({ loading: false }); }, 1400); - console.log(pageNum); if (pageNum >= res.data.pages) { that.setData({ allow_load: false @@ -140,8 +137,6 @@ Page({ that.setData({ page: that.data.page }); - console.log(that.data.page+"页数"); - console.log(that.data.current_scroll+"点击的tab数") that.getList(that.data.current_scroll, that.data.page); } }); \ No newline at end of file diff --git a/pages/edit/edit.js b/pages/edit/edit.js index 99cb6ed..95be962 100644 --- a/pages/edit/edit.js +++ b/pages/edit/edit.js @@ -33,7 +33,6 @@ Page({ * 职业 */ bindPickerChange: function (e) { - console.log(e) this.setData({ index: e.detail.value }) @@ -50,7 +49,6 @@ Page({ let that = this; wx.chooseLocation({ success: function (res) { - console.log(res); that.setData({ name: res.name+'('+res.address+')', address: JSON.stringify(res), @@ -60,12 +58,10 @@ Page({ console.log(error) }, complete: function (data) { - console.log(data); } }) }, formSubmit: function (e) { - console.log(e); let that = this; /** * sex @@ -105,10 +101,6 @@ Page({ showCancel: false }) } else { - console.log(username) - console.log(address) - console.log(sex) - console.log(birthdate) Http.post({ url: config.api.updateInfo, data: { @@ -119,7 +111,6 @@ Page({ } }) .then(res => { - console.log(res); wx.showModal({ title: '提示', content: '修改成功', @@ -142,7 +133,6 @@ Page({ } }, radioChange: function (e) { - console.log(e.detail.value) this.setData({ sex: e.detail.value, flagsex: 1 @@ -157,7 +147,6 @@ Page({ url: config.api.getScore, data: {} }).then(res => { - console.log(res); if (res.data.address && JSON.parse(res.data.address).name) { that.setData({ address: res.data.address, diff --git a/pages/game/index.js b/pages/game/index.js index 9b778cb..6a62fd9 100644 --- a/pages/game/index.js +++ b/pages/game/index.js @@ -7,7 +7,6 @@ Page({ url:'' }, bindGetMsg(e){ - console.log(e,1234565432) }, onShareAppMessage: function (res) { let _this=this; @@ -19,12 +18,10 @@ Page({ }, fail: function (res) { // 转发失败 - console.log(666) } } }, onShow: function () { - // console.log(app.globalData.havePlayEd) app.globalData.havePlayEd=true let num = wx.getStorageSync('couponNum'); if (num == 'couponNum') { @@ -34,7 +31,6 @@ Page({ }; }, onLoad(options) { - console.log(options,999999999) if (options.share){ // wx.onShareAppMessage(); }else{ diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index bf54da3..4b1d200 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -17,7 +17,6 @@ Page({ paramData: options }) var that = this; - console.log(options); if (options.couponChannelId && options.couponId) { that.setData({ couponChannelId: options.couponChannelId, @@ -32,7 +31,6 @@ Page({ appId: config.weapp.AppId } }).then(res => { - console.log(res.data.mallImgUrl); that.setData({ mallImgUrl: res.data.mallImgUrl }); @@ -62,11 +60,6 @@ Page({ } }).then( function (res) { - console.log(res); - console.log("这是用户授权手机号的结果"); - console.log(that.data.couponChannelId); - console.log(that.data.couponId); - console.log("这是从立即支付传回来的值 因为用户没有授权手机号"); app.globalData.phone = res.data.phone; if (that.path == 'index') { wx.redirectTo({ diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js index e55fd9e..ca977f2 100755 --- a/pages/getuserinfo/index.js +++ b/pages/getuserinfo/index.js @@ -4,12 +4,20 @@ const Http = require("../../utils/HttpBasics"); Page({ data: { canIUse: wx.canIUse("button.open-type.getUserInfo"), - path:null + path:null, + couponChannelId: null, + couponId:null, }, onLoad: function(options) { var that = this; + if (options.couponChannelId && options.couponId){ + that.setData({ + couponChannelId: options.couponChannelId, + couponId: options.couponId, + }) + } if (options.path == 'index') { - this.path = options.path + that.path = options.path } Http.get({ url: config.api.marketicon, @@ -17,7 +25,6 @@ Page({ appId: config.weapp.AppId } }).then(res => { - console.log(res.data.mallImgUrl); that.setData({ mallImgUrl: res.data.mallImgUrl }); @@ -37,11 +44,8 @@ Page({ bindGetUserInfo: function(e) { let that=this; - console.log(e); var iv = e.detail.iv; var encryptedData = e.detail.encryptedData; - console.log(iv); - console.log(encryptedData); Http.post({ url: config.api.getUserInfo, data: { @@ -50,17 +54,22 @@ Page({ } }).then( function(res) { - console.log(res); - console.log("授权个人信息返回的数据", that.path) if(that.path=='index'){ wx.reLaunch({ url: "/pages/game/index" }); - }else{ + } + else{ //返回主页 - wx.switchTab({ - url: "/pages/index/index" - }); + if (that.data.couponChannelId && that.data.couponId){ + wx.redirectTo({ + url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}` + }); + }else{ + wx.switchTab({ + url: "/pages/index/index" + }); + } } }, function(error) { diff --git a/pages/grade/grade.js b/pages/grade/grade.js index ed37577..c9bc3a5 100644 --- a/pages/grade/grade.js +++ b/pages/grade/grade.js @@ -36,8 +36,6 @@ Page({ } }) .then(res=>{ - console.log(JSON.parse(res.data.score.rules)); - that.setData({ flags: 'have', rules: JSON.parse(res.data.score.rules), diff --git a/pages/index/coupons/index.js b/pages/index/coupons/index.js index 93eeab8..8135376 100644 --- a/pages/index/coupons/index.js +++ b/pages/index/coupons/index.js @@ -100,7 +100,6 @@ Component({ url: config.api.couponChannelList, data: param }).then(res => { - console.log(res); /** * 加载完成 */ @@ -120,7 +119,6 @@ Component({ }); } } - console.log(pageNum); if (pageNum == 1) { that.setData({ list: [], @@ -132,8 +130,6 @@ Component({ that.setData({ list: tmpArr }) - - console.log(tmpArr); }) .catch(err => { wx.showToast({ diff --git a/pages/index/index.js b/pages/index/index.js index e74b610..d54753a 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -32,7 +32,6 @@ Page({ data: {} }) .then(res => { - console.log(res); var data = { couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId @@ -91,7 +90,6 @@ Page({ scene: decodeURIComponent(options.scene) }); } - console.log(that.data.scene); app.getLocation(); if (options.couponChannelId && options.couponId){ that.userLogin(options.couponChannelId, options.couponId); @@ -144,11 +142,9 @@ Page({ onPullDownRefresh: function(e) { let that = this; that.userLogin(); - // console.log(this.data.code); if (that.data.code == 0 || that.data.code == undefined) { that.selectComponent("#lists").getList(0, 1); wx.stopPullDownRefresh(); - // console.log("下拉刷新"); } else { that.selectComponent("#lists").getList(that.data.code, 1); wx.stopPullDownRefresh(); @@ -204,11 +200,6 @@ Page({ }) .then(res => { app.globalData.token = res.data.token; - if (res.data.token && couponChannelId && couponId){ - wx.navigateTo({ - url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, - }) - } if (res.data.token){ that.setData({ showGame: true @@ -229,39 +220,41 @@ Page({ if (app.businessListCallback) { app.businessListCallback(app.globalData.token); } - return Http.post({ - url: config.api.checkUserStatus, - data: {} - }); - }) - .then(res => { - console.log("checkUserStatus:res", res); + that.checkuerstatus(couponChannelId, couponId); + }) .catch(err => { - console.log(err); - if (err.errMsg =='请求超时,请检查您的网络设置!'){ - that.setData({ - loading:false, - loadingtext:"请求超时,请检查您的网络设置!" - }) - } - if (err.code == 11004) { - // 用户昵称未授权 - wx.redirectTo({ - url: "/pages/getuserinfo/index" - }); - } - // debugger - wx.showToast({ - title: err.errMsg, - icon:'none', - duration: 2000, - mask: false - }); }); } }); }, + checkuerstatus(couponChannelId, couponId){ + Http.post({ + url: config.api.checkUserStatus, + data: {} + }) + .then(res => { + if (couponChannelId && couponId) { + wx.navigateTo({ + url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, + }) + } + }) + .catch(err => { + if (err.code == 11004) { + // 用户昵称未授权 + if (couponChannelId && couponId) { + wx.redirectTo({ + url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}` + }); + } else { + wx.redirectTo({ + url: '/pages/getuserinfo/index' + }); + } + } + }); + }, getStaticGame(token){ let _this = this; Http.get({ @@ -363,7 +356,6 @@ Page({ wx.getUserInfo({ success: res => { // 可以将 res 发送给后台解码出 unionId - console.log("getUserInfo", res); } }); } @@ -377,7 +369,6 @@ Page({ that.setData({ page: that.data.page }); - // console.log("我是第" + that.data.page + "几页") //父组件获得子组件的方法 //如果code == 0 if (that.data.code == 0 || that.data.code == undefined) { diff --git a/pages/index/rushToBuy/index.js b/pages/index/rushToBuy/index.js index c6fe0aa..785f669 100644 --- a/pages/index/rushToBuy/index.js +++ b/pages/index/rushToBuy/index.js @@ -27,7 +27,6 @@ Component({ }); }, gotodetail: function(e) { - console.log(e); wx.navigateTo({ url: `/pages/coupon/detail/index?couponChannelId=${ e.currentTarget.dataset.couponchannelid @@ -50,7 +49,6 @@ Component({ targetAd: 2 } }).then(res => { - console.log(res); this.setData({ list: res.data.list, total:res.data.total @@ -66,7 +64,6 @@ Component({ }) }; if (app.globalData.token && app.globalData.token != null) { - console.log("couponChannelList init 1"); app.couponChannelListCallback(app.globalData.token); } } diff --git a/pages/login/index.js b/pages/login/index.js index b452c0e..42789dc 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -3,23 +3,18 @@ const Http = require("../../utils/HttpBasics"); Page({ data: {}, getPhoneNumber: function(e) { - console.log(e.detail.errMsg); - console.log(e.detail.iv); - console.log(e.detail.encryptedData); wx.navigateBack({ delta: 1 }); }, onLoad() { let that = this; - console.log(config.weapp.AppId) Http.get({ url: config.api.marketicon, data: { appId: config.weapp.AppId } }).then(res=>{ - console.log(res.data.mallImgUrl); that.setData({ mallImgUrl: res.data.mallImgUrl }); diff --git a/pages/managelicenseplate/managelicenseplate.js b/pages/managelicenseplate/managelicenseplate.js index bd347ee..dbbf948 100644 --- a/pages/managelicenseplate/managelicenseplate.js +++ b/pages/managelicenseplate/managelicenseplate.js @@ -29,7 +29,6 @@ Page({ }) }, unbindCarBtn: function(e) { - console.log(e); var that = this; var carNum = e.currentTarget.dataset.car; that.unbindCar(carNum); @@ -49,7 +48,6 @@ Page({ data: postData }) .then(res => { - console.log(res); that.initUsrCarList(); wx.showModal({ title: "提示", @@ -82,7 +80,6 @@ Page({ data: postData }) .then(res => { - console.log(res); that.setData({ addCar: null }); @@ -94,14 +91,14 @@ Page({ success: function() {} }); }) - .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false + .catch(error => { + wx.showModal({ + title: "提示", + showCancel: false, + content: error.data.message, + success: function() {} }); - }) + }); }, jumpToAdd: function() { wx.navigateTo({ diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 8c7effa..1bca080 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -24,7 +24,6 @@ Page({ // 1 已使用 // 2 已过期 // 3 已经退款 - console.log(e); if (that.data.mystatus == "" || that.data.mystatus == undefined) { wx.navigateTo({ url: `/pages/orderquanma/index?quancode=${ @@ -35,7 +34,6 @@ Page({ e.currentTarget.dataset.couponorderstatus }&sight=${that.data.sight}` }); - console.log(e.currentTarget.dataset.couponorderstatus); } else { wx.navigateTo({ url: `/pages/orderquanma/index?quancode=${ @@ -68,15 +66,12 @@ Page({ orderId: options.orderId } }).then(res => { - console.log(res); - console.log("我是订单详情"); that.setData({ order: res.data }); //createDate 创建时间 var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss"); - console.log(createDate); that.setData({ createDate: createDate }); @@ -101,7 +96,6 @@ Page({ orderId: orderId } }).then(res => { - console.log(res); /// Begin payment ---- var payOrderId = "" + res.data.payOrderId; wx.hideLoading(); @@ -116,7 +110,6 @@ Page({ }, fail: res => { that.payOrderUpdate(that.data.orderId, payOrderId, 2,'','fail'); - console.log(res); return; }, }); @@ -170,7 +163,6 @@ Page({ } }) .catch(err => { - console.log(_this); setTimeout(function () { _this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this); }, 1500) diff --git a/pages/order/index/index.js b/pages/order/index/index.js index 57ce5d3..1e7c667 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -34,14 +34,12 @@ Page({ }, gotopay: function (e) { - console.log("orderId" + e.currentTarget.dataset.id); wx.navigateTo({ url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'` }) }, getList(key, pageNum) { let that = this; - console.log(key); /** * key==0 * 不发送该字段 @@ -71,7 +69,6 @@ Page({ url: config.api.orderList, data: variable }).then(res => { - console.log(res); if (pageNum >= res.data.pages) { that.setData({ allow_load: false diff --git a/pages/orderquanma/index.js b/pages/orderquanma/index.js index 7a55fda..a53bd69 100644 --- a/pages/orderquanma/index.js +++ b/pages/orderquanma/index.js @@ -24,9 +24,6 @@ Page({ remark: options.remark, couponorderstatus: options.couponorderstatus }); - - console.log(options.couponorderstatus); - console.log("我是状态"); /** * 如果没有核销 */ @@ -38,7 +35,6 @@ Page({ couponOrderId: options.quancode } }).then(res => { - console.log(res); that.setData({ couponorderstatus: res.data.CouponOrderStatus }); @@ -77,7 +73,6 @@ Page({ couponOrderId: options.quancode } }).then(res => { - console.log(res); that.setData({ couponorderstatus: res.data.CouponOrderStatus }); diff --git a/pages/park/park.js b/pages/park/park.js index bb5b9f9..b6f7bed 100644 --- a/pages/park/park.js +++ b/pages/park/park.js @@ -44,7 +44,6 @@ Page({ //获取车牌省份 sheng: function (e) { var that = this; - console.log(e.currentTarget.dataset.sh); that.setData({ carNo: e.currentTarget.dataset.sh }) @@ -58,7 +57,6 @@ Page({ //获取车牌号码 other: function (e) { var that = this; - console.log(e.currentTarget.dataset.ot); var carNo = that.data.carNo + e.currentTarget.dataset.ot; that.setData({ carNo: carNo @@ -68,22 +66,17 @@ Page({ del: function () { var that = this; var ss = that.data.carNo; - console.log(ss); var s = ss.split(''); - console.log(s); - console.log(s.slice(0, -1)); if (s.slice(0, -1).length == 0) { that.setData({ hidden1: false, hidden2: true }) } - console.log(s.join('').slice(0, -1)); var s = s.join('').slice(0, -1); that.setData({ carNo: s }) - console.log(that.data.carNo.length); }, //确认输入 diff --git a/pages/passCar/choicecoupon/choicecoupon.js b/pages/passCar/choicecoupon/choicecoupon.js index 82164e3..f4524a9 100644 --- a/pages/passCar/choicecoupon/choicecoupon.js +++ b/pages/passCar/choicecoupon/choicecoupon.js @@ -24,7 +24,6 @@ Page({ */ choicecoupon: function(e) { wx.navigateBack(); - console.log(e); var pages = getCurrentPages(); var prevPage = pages[pages.length - 2] //上一个页面 var that = this; @@ -41,8 +40,6 @@ Page({ }, getList(key, pageNum) { var that = this; - console.log(key); - console.log(pageNum); if (that.data.allow_load) { Http.get({ url: config.api.couponOrderList + "?type=5", @@ -52,7 +49,6 @@ Page({ couponOrderStatus: key } }).then(res => { - console.log(res); res.data.list.map(file => { file.expiredTime = format.formatTime( file.expiredTime, diff --git a/pages/passCar/couponDetail/couponDetail.js b/pages/passCar/couponDetail/couponDetail.js index 54aae72..d970043 100644 --- a/pages/passCar/couponDetail/couponDetail.js +++ b/pages/passCar/couponDetail/couponDetail.js @@ -18,7 +18,6 @@ Page({ clearInterval(that.data.setInter); }, onLoad: function (options) { - console.log(options); let that = this; that.setData({ code: options.quancode @@ -30,7 +29,6 @@ Page({ couponOrderId: options.quancode } }).then(res => { - console.log(res); that.setData({ data: res.data }); @@ -53,7 +51,6 @@ Page({ }, phone: function () { let that = this; - console.log(that.data); if (that.data.data.merchantLinkPhone) { wx.makePhoneCall({ phoneNumber: that.data.data.merchantLinkPhone diff --git a/pages/passCar/couponList/couponList.js b/pages/passCar/couponList/couponList.js index 56e7e4f..9f07bf1 100644 --- a/pages/passCar/couponList/couponList.js +++ b/pages/passCar/couponList/couponList.js @@ -34,15 +34,12 @@ Page({ //点击跳转到券详情页面 gotouse: function (e) { - console.log(e.currentTarget.dataset.quancode); - console.log("点击跳转到券详情"); wx.navigateTo({ url: `/pages/passCar/couponDetail/couponDetail?quancode=${ e.currentTarget.dataset.quancode }`, success: function (res) { // success - console.log("点击跳转到券详情页面"); }, fail: function () { // fail @@ -54,8 +51,6 @@ Page({ }, getList(key, pageNum) { var that = this; - console.log(key); - console.log(pageNum); if (that.data.allow_load) { wx.showLoading({ title: "加载中" @@ -68,7 +63,6 @@ Page({ couponOrderStatus: key } }).then(res => { - console.log(res); res.data.list.map(file => { file.expiredTime = format.formatTime( file.expiredTime, @@ -102,7 +96,6 @@ Page({ }); }) } else { - console.log("加载完成allow_load设置成false"); } }, handleChange({ detail }) { diff --git a/pages/passCar/passCar.js b/pages/passCar/passCar.js index b0cd0fe..d7135f3 100644 --- a/pages/passCar/passCar.js +++ b/pages/passCar/passCar.js @@ -30,7 +30,6 @@ Page({ * 获得当前的车牌号码 */ var listCardNum = (that.data.carList)[e.detail.current].carNumber; - console.log(listCardNum); that.setData({ listCardNum: listCardNum }); @@ -62,7 +61,6 @@ Page({ }) }, gotodetail: function(e) { - console.log(e.target.dataset.rule); wx.showModal({ title: '缴费规则', content: e.target.dataset.rule, @@ -193,10 +191,8 @@ Page({ }); }) .then(res => { - console.log("checkUserStatus:res", res); }) .catch(err => { - console.log("checkUserStatus:err", err); if (err.code == 11004) { // 用户昵称未授权 wx.redirectTo({ @@ -252,7 +248,6 @@ Page({ wx.getUserInfo({ success: res => { // 可以将 res 发送给后台解码出 unionId - console.log("getUserInfo", res); } }); } @@ -284,7 +279,6 @@ Page({ carNumber: that.data.listCardNum, couponOrderId: quanid }; - console.log(etcpData); /** * 停简单 */ @@ -313,7 +307,6 @@ Page({ */ gotoquan: function() { let that = this; - console.log(that.data.quanid); if (that.data.quanid) { wx.navigateTo({ url: `/pages/passCar/choicecoupon/choicecoupon?quanid=${that.data.quanid}`, @@ -337,7 +330,6 @@ Page({ couponOrderStatus: 0 } }).then(res => { - console.log(res); that.setData({ couponList: res.data.list }); @@ -370,14 +362,12 @@ Page({ data: {} }) .then(res => { - console.log(res); Http.post({ url: config.api.carInit, data: { phone: app.globalData.phone } }).then(res => { - console.log(res); app.globalData.carLogin = true; app.globalData.parkVendor = res.data.vendor; if (res.data.token) { @@ -387,11 +377,9 @@ Page({ * 获得停车费用 */ that.initUsrCarList("flags"); - console.log(app.globalData.etcpToken); }); }) .catch(err => { - console.log(err); if (err.code == 11005) { // 用户手机未授权 /** @@ -438,7 +426,6 @@ Page({ data: postData }) .then(res => { - console.log(res); that.setData({ addCar: null }); @@ -451,7 +438,6 @@ Page({ }); }) .catch(error => { - console.log(error); wx.showModal({ title: "提示", showCancel: false, @@ -492,17 +478,16 @@ Page({ Http.get({ url: config.api.getParkStatus, }) - .then(res => { - console.log(res); - }) - .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) + .then(res => { + }) + .catch(err => { + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) }, @@ -510,13 +495,11 @@ Page({ * 绑定车获取 */ initUsrCarList: function(flag) { - console.log(flag); var that = this; Http.get({ url: config.api.getUserCarList, data: {} }).then(res => { - console.log(res) that.setData({ carList: res.data }); @@ -526,7 +509,6 @@ Page({ */ if (flag == "flags" && res.data.length > 0) { var listCardNum = res.data[0].carNumber; - console.log(listCardNum); that.setData({ listCardNum: listCardNum }) @@ -586,7 +568,6 @@ Page({ }) }) .catch(error => { - console.log(error); wx.showModal({ title: '提示', content: error.message, diff --git a/pages/payrule/payrule.js b/pages/payrule/payrule.js index 3af5bb4..4541ddc 100644 --- a/pages/payrule/payrule.js +++ b/pages/payrule/payrule.js @@ -12,7 +12,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(options.rule); this.setData({ rule:options.rule }) diff --git a/pages/phoneinput/phoneinput.js b/pages/phoneinput/phoneinput.js index ab4b02e..88c926a 100644 --- a/pages/phoneinput/phoneinput.js +++ b/pages/phoneinput/phoneinput.js @@ -22,7 +22,6 @@ Page({ paramData: options }) var that = this; - console.log(options); that.setData({ couponChannelId: options.couponChannelId, couponId: options.couponId, @@ -36,7 +35,6 @@ Page({ }, next() { var that = this - console.log(that.data.yzm) Http.get({ url: config.api.validationCode, data: { @@ -102,7 +100,6 @@ Page({ console.log(res) that.timerInfo() if (res.code == 200) { - console.log(res) } else { wx.showToast({ title: res.message diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js index c5dd7dd..72f3e0b 100644 --- a/pages/rushToBuy/index.js +++ b/pages/rushToBuy/index.js @@ -42,7 +42,6 @@ Page({ targetAd: 2 } }).then(res => { - console.log(res); if (page >= res.data.pages) { that.setData({ allow_load: false @@ -68,7 +67,6 @@ Page({ var startTime = util.formatTime(that.data.list[i].endTime, "yyyy-MM-dd hh:mm:ss"); var alsell = Math.floor((that.data.list[i].inventory - (that.data.list[i].remainInventory))/(that.data.list[i].inventory)*100); util.timechuo(startTime); - console.log(alsell); /** * 修改list的endtime * 渲染到页面 @@ -101,7 +99,6 @@ Page({ }); }) } else { - console.info("allow_load==false 已禁止加载"); that.setData({ loading: true, content: "——— 再拉裤子就掉了啦 ———" @@ -114,7 +111,6 @@ Page({ } }; if (app.globalData.token && app.globalData.token != null) { - console.log("couponChannelList init 1"); app.couponChannelListCallback(app.globalData.token); } }, @@ -144,9 +140,7 @@ Page({ onReachBottom: function () { let that = this; that.data.page++; - console.log(that.data.page); that.getList(that.data.page); - console.log("这是第:" + that.data.page); }, /** diff --git a/pages/user/index.js b/pages/user/index.js index 28532a5..32fb9c0 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -26,7 +26,6 @@ Page({ // let that = this; // wx.getWeRunData({ // success: function (res) { - // console.log(res); // Http.post({ // url: config.api.getWeRunData, // data: { @@ -34,7 +33,6 @@ Page({ // iv: res.iv // } // }).then(res => { - // console.log(res); // that.setData({ // step: res.data.stepInfoList[30].step // }) @@ -48,7 +46,6 @@ Page({ // getxinghao:function(){ // wx.getSystemInfo({ // success:function(res){ - // console.log(res); // wx.showModal({ // content: res.brand, // }) @@ -70,7 +67,6 @@ Page({ flag: 'show' }); } - console.log(that.data.flag) }, gotoedit:function(){ wx.navigateTo({ @@ -86,7 +82,6 @@ Page({ wx.hideTabBarRedDot({ index: 2 }); - console.log("我是渲染") if (num == 'couponNum1') { wx.setStorage({ key: 'couponNum', @@ -104,7 +99,6 @@ Page({ url: config.api.getScore, data: {} }).then(res=>{ - console.log(res); if (res.data.address && res.data.name && res.data.sex && res.data.birthdate){ that.setData({ showEdit:true diff --git a/utils/HttpBasics.js b/utils/HttpBasics.js index f419099..5f70d9a 100644 --- a/utils/HttpBasics.js +++ b/utils/HttpBasics.js @@ -100,18 +100,12 @@ class HttpBasics { * @param {*} reject */ responseMap = (res, resolve, reject) => { - console.log(res); // 网络状态码200 if (res.statusCode == 200) { // 服务器code 200 成功 if (res.data.code == 200) { resolve(res.data); } else { - // wx.hideLoading(); - // wx.showToast({ - // title: res.data.message, - // image:'./../../assets/img/fail.png' - // }); reject(res.data); } } diff --git a/utils/util.js b/utils/util.js index a0be6b4..e947673 100644 --- a/utils/util.js +++ b/utils/util.js @@ -9,7 +9,6 @@ const formatTime = (date, fmt) => { if (typeof date == "number") { date = new Date(date); } - // console.log(date); var o = { "M+": date.getMonth() + 1, //月份 "d+": date.getDate(), //日