| @@ -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); | |||
| @@ -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}` | |||
| }); | |||
| @@ -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-img"> | |||
| @@ -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) | |||
| } | |||
| }); | |||
| @@ -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 | |||
| }) | |||
| @@ -1,6 +1,5 @@ | |||
| const warn = (msg, getValue) => { | |||
| console.warn(msg); | |||
| console.log('接受到的值为:', getValue); | |||
| }; | |||
| Component({ | |||
| @@ -6,7 +6,7 @@ Component({ | |||
| }, | |||
| methods : { | |||
| handleTap2(){ | |||
| console.log(event,1111111) | |||
| }, | |||
| handleTap3(){ | |||
| @@ -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{ | |||
| @@ -12,7 +12,6 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| console.log(options) | |||
| let that = this; | |||
| that.setData({ | |||
| detail:options.detail | |||
| @@ -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, | |||
| @@ -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}`, | |||
| }) | |||
| @@ -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; | |||
| } | |||
| @@ -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}`; | |||
| @@ -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 | |||
| @@ -77,6 +77,7 @@ | |||
| <text>订单编号:</text> | |||
| <text>{{data.orderId}}</text> | |||
| </view> | |||
| <!-- <view><text>手机号</text><text>2018.05.25</text></view> --> | |||
| </view> | |||
| <view class='notes' style="border-bottom:0"> | |||
| <view> | |||
| @@ -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); | |||
| } | |||
| }); | |||
| @@ -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, | |||
| @@ -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{ | |||
| @@ -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({ | |||
| @@ -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) { | |||
| @@ -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), | |||
| @@ -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({ | |||
| @@ -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) { | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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 | |||
| }); | |||
| @@ -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({ | |||
| @@ -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) | |||
| @@ -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 | |||
| @@ -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 | |||
| }); | |||
| @@ -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); | |||
| }, | |||
| //确认输入 | |||
| @@ -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, | |||
| @@ -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 | |||
| @@ -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 }) { | |||
| @@ -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, | |||
| @@ -12,7 +12,6 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| console.log(options.rule); | |||
| this.setData({ | |||
| rule:options.rule | |||
| }) | |||
| @@ -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 | |||
| @@ -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); | |||
| }, | |||
| /** | |||
| @@ -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 | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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(), //日 | |||