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