| @@ -65,7 +65,7 @@ | |||||
| "navigationBarTextStyle": "white" | "navigationBarTextStyle": "white" | ||||
| }, | }, | ||||
| "networkTimeout": { | "networkTimeout": { | ||||
| "request": 1000, | |||||
| "request": 100, | |||||
| "downloadFile": 10000 | "downloadFile": 10000 | ||||
| }, | }, | ||||
| "debug": false | "debug": false | ||||
| @@ -52,8 +52,8 @@ Component({ | |||||
| }); | }); | ||||
| }else { | }else { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: err.message, | |||||
| image: "../../assets/img/fail.png", | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| @@ -60,6 +60,14 @@ Component({ | |||||
| this.alphaClick(); | this.alphaClick(); | ||||
| this.queueClick(); | this.queueClick(); | ||||
| }) | }) | ||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| // 子组件向父组件传值 | // 子组件向父组件传值 | ||||
| // 传值到 coupon=>detail页面 | // 传值到 coupon=>detail页面 | ||||
| var myEvent1 = "questions2"; | var myEvent1 = "questions2"; | ||||
| @@ -25,7 +25,14 @@ Page({ | |||||
| data: res.data | data: res.data | ||||
| }); | }); | ||||
| console.log(that.data.data); | console.log(that.data.data); | ||||
| }); | |||||
| }).catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| gotoactdetail:function(){ | gotoactdetail:function(){ | ||||
| let that = this; | let that = this; | ||||
| @@ -95,8 +95,13 @@ Page({ | |||||
| console.log(that.data.questionnaire); | console.log(that.data.questionnaire); | ||||
| } | } | ||||
| }) | }) | ||||
| .catch(error=>{ | |||||
| console.log(error) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -197,7 +202,14 @@ Page({ | |||||
| validDays: res.data.validDays | validDays: res.data.validDays | ||||
| }); | }); | ||||
| } | } | ||||
| }); | |||||
| }).catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 支付订单更新 | * 支付订单更新 | ||||
| @@ -217,8 +229,13 @@ Page({ | |||||
| console.log("payOrderUpdate then", res); | console.log("payOrderUpdate then", res); | ||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| console.log("payOrderUpdate catch", err); | |||||
| }); | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 发起支付 | * 发起支付 | ||||
| @@ -447,8 +464,13 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| console.log("ERR", err); | |||||
| }); | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }, | }, | ||||
| onShareAppMessage: function (options) { | onShareAppMessage: function (options) { | ||||
| @@ -50,6 +50,14 @@ Page({ | |||||
| staticGamedata: res.data | staticGamedata: res.data | ||||
| }) | }) | ||||
| }) | }) | ||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| onLoad: function(options) { | onLoad: function(options) { | ||||
| let that = this; | let that = this; | ||||
| @@ -101,7 +109,15 @@ Page({ | |||||
| updateDate: util.formatTime(that.data.data.updateDate, "yyyy-MM-dd hh:mm:ss"), | updateDate: util.formatTime(that.data.data.updateDate, "yyyy-MM-dd hh:mm:ss"), | ||||
| createDate: util.formatTime(that.data.data.createDate, "yyyy-MM-dd hh:mm:ss") | createDate: util.formatTime(that.data.data.createDate, "yyyy-MM-dd hh:mm:ss") | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }, 2000); | }, 2000); | ||||
| @@ -127,6 +143,14 @@ Page({ | |||||
| util.barcode("barcode", options.quancode, 510, 100); | util.barcode("barcode", options.quancode, 510, 100); | ||||
| util.qrcode("qrcode", options.quancode, 350, 350); | util.qrcode("qrcode", options.quancode, 350, 350); | ||||
| }) | }) | ||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| phone: function() { | phone: function() { | ||||
| let that = this; | let that = this; | ||||
| @@ -102,7 +102,15 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| list: tmpArr | list: tmpArr | ||||
| }) | }) | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } else { | } else { | ||||
| that.setData({ | that.setData({ | ||||
| loading: true, | loading: true, | ||||
| @@ -118,19 +118,27 @@ Page({ | |||||
| birthdate: birthdate, | birthdate: birthdate, | ||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | |||||
| console.log(res); | |||||
| wx.showModal({ | |||||
| title: '提示', | |||||
| content: '修改成功', | |||||
| showCancel: false, | |||||
| success: function (res) { | |||||
| wx.switchTab({ | |||||
| url: '/pages/user/index', | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .then(res => { | |||||
| console.log(res); | |||||
| wx.showModal({ | |||||
| title: '提示', | |||||
| content: '修改成功', | |||||
| showCancel: false, | |||||
| success: function (res) { | |||||
| wx.switchTab({ | |||||
| url: '/pages/user/index', | |||||
| }) | |||||
| } | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }, | }, | ||||
| radioChange: function (e) { | radioChange: function (e) { | ||||
| @@ -39,7 +39,15 @@ Page({ | |||||
| wx.setNavigationBarTitle({ | wx.setNavigationBarTitle({ | ||||
| title: res.data.mallName | title: res.data.mallName | ||||
| }) | }) | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| getPhoneNumber: function (e) { | getPhoneNumber: function (e) { | ||||
| @@ -92,6 +100,14 @@ Page({ | |||||
| icon: "none" | icon: "none" | ||||
| }); | }); | ||||
| } | } | ||||
| ); | |||||
| ) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }); | }); | ||||
| @@ -24,7 +24,15 @@ Page({ | |||||
| wx.setNavigationBarTitle({ | wx.setNavigationBarTitle({ | ||||
| title: res.data.mallName | title: res.data.mallName | ||||
| }) | }) | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| bindGetUserInfo: function(e) { | bindGetUserInfo: function(e) { | ||||
| @@ -61,6 +69,14 @@ Page({ | |||||
| icon: "none" | icon: "none" | ||||
| }); | }); | ||||
| } | } | ||||
| ); | |||||
| ) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }); | }); | ||||
| @@ -134,7 +134,15 @@ Component({ | |||||
| }) | }) | ||||
| console.log(tmpArr); | console.log(tmpArr); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| setTimeout(function () { | setTimeout(function () { | ||||
| that.setData({ | that.setData({ | ||||
| loading: false, | loading: false, | ||||
| @@ -175,7 +183,15 @@ Component({ | |||||
| that.setData({ | that.setData({ | ||||
| tabs: res.data.list | tabs: res.data.list | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }; | }; | ||||
| if (app.globalData.token && app.globalData.token != null) { | if (app.globalData.token && app.globalData.token != null) { | ||||
| app.businessListCallback(app.globalData.token); | app.businessListCallback(app.globalData.token); | ||||
| @@ -111,13 +111,19 @@ Page({ | |||||
| title: weapNote.firstpage.title | title: weapNote.firstpage.title | ||||
| }) | }) | ||||
| }) | }) | ||||
| .catch(err => { | |||||
| console.log(err); | |||||
| that.setData({ | |||||
| loading: false, | |||||
| loadingtext: "网络异常,请检查您的网络设置" | |||||
| }) | |||||
| .catch(err => { | |||||
| console.log(err); | |||||
| that.setData({ | |||||
| loading: false, | |||||
| loadingtext: "网络异常,请检查您的网络设置" | |||||
| }) | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | }); | ||||
| }); | |||||
| }, | }, | ||||
| onShow:function(){ | onShow:function(){ | ||||
| this.setData({ | this.setData({ | ||||
| @@ -232,12 +238,10 @@ Page({ | |||||
| .catch(err => { | .catch(err => { | ||||
| console.log(err); | console.log(err); | ||||
| if(err.errMsg=='request:fail timeout'){ | if(err.errMsg=='request:fail timeout'){ | ||||
| setTimeout(function(){ | |||||
| that.setData({ | that.setData({ | ||||
| loading:false, | loading:false, | ||||
| loadingtext:"网络异常,请检查您的网络设置" | loadingtext:"网络异常,请检查您的网络设置" | ||||
| }) | }) | ||||
| },3000) | |||||
| } | } | ||||
| if (err.code == 11004) { | if (err.code == 11004) { | ||||
| // 用户昵称未授权 | // 用户昵称未授权 | ||||
| @@ -245,6 +249,13 @@ Page({ | |||||
| url: "/pages/getuserinfo/index" | url: "/pages/getuserinfo/index" | ||||
| }); | }); | ||||
| } | } | ||||
| // debugger | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon:'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }); | }); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -55,7 +55,15 @@ Component({ | |||||
| list: res.data.list, | list: res.data.list, | ||||
| total:res.data.total | total:res.data.total | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }; | }; | ||||
| if (app.globalData.token && app.globalData.token != null) { | if (app.globalData.token && app.globalData.token != null) { | ||||
| console.log("couponChannelList init 1"); | console.log("couponChannelList init 1"); | ||||
| @@ -23,6 +23,13 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| mallImgUrl: res.data.mallImgUrl | mallImgUrl: res.data.mallImgUrl | ||||
| }); | }); | ||||
| }).catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | }) | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -19,6 +19,14 @@ Page({ | |||||
| carList: res.data | carList: res.data | ||||
| }); | }); | ||||
| }) | }) | ||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| unbindCarBtn: function(e) { | unbindCarBtn: function(e) { | ||||
| console.log(e); | console.log(e); | ||||
| @@ -83,7 +83,15 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| createDate: createDate | createDate: createDate | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| gotogame: function () { | gotogame: function () { | ||||
| let that=this; | let that=this; | ||||
| @@ -178,7 +186,15 @@ Page({ | |||||
| }, | }, | ||||
| }); | }); | ||||
| /// End payment -------- | /// End payment -------- | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } else { | } else { | ||||
| // 免费券 | // 免费券 | ||||
| that.payOrderUpdate(orderId, "0", 1) // 支付成功 | that.payOrderUpdate(orderId, "0", 1) // 支付成功 | ||||
| @@ -207,8 +223,13 @@ Page({ | |||||
| console.log("payOrderUpdate then", res); | console.log("payOrderUpdate then", res); | ||||
| }) | }) | ||||
| .catch(err => { | .catch(err => { | ||||
| console.log("payOrderUpdate catch", err); | |||||
| }); | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -115,7 +115,15 @@ Page({ | |||||
| [createDate]: createDate1 | [createDate]: createDate1 | ||||
| }); | }); | ||||
| } | } | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| else { | else { | ||||
| console.log("加载完成allow_load设置成false"); | console.log("加载完成allow_load设置成false"); | ||||
| @@ -54,7 +54,15 @@ Page({ | |||||
| }); | }); | ||||
| } | } | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.message, | |||||
| image: "../../assets/img/fail.png", | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }, 2000); | }, 2000); | ||||
| @@ -73,7 +81,15 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| couponorderstatus: res.data.CouponOrderStatus | couponorderstatus: res.data.CouponOrderStatus | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| /** | /** | ||||
| * couponorderstatus | * couponorderstatus | ||||
| @@ -68,7 +68,15 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| list: that.data.list | list: that.data.list | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } | } | ||||
| }, | }, | ||||
| }); | }); | ||||
| @@ -41,7 +41,15 @@ Page({ | |||||
| }); | }); | ||||
| util.barcode("barcode", options.quancode, 510, 100); | util.barcode("barcode", options.quancode, 510, 100); | ||||
| util.qrcode("qrcode", options.quancode, 350, 350); | util.qrcode("qrcode", options.quancode, 350, 350); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| phone: function () { | phone: function () { | ||||
| let that = this; | let that = this; | ||||
| @@ -75,7 +75,6 @@ Page({ | |||||
| "yyyy-MM-dd hh:mm:ss" | "yyyy-MM-dd hh:mm:ss" | ||||
| ); | ); | ||||
| }); | }); | ||||
| console.log("姐姐的订单列表"); | |||||
| setTimeout(function () { | setTimeout(function () { | ||||
| wx.hideLoading(); | wx.hideLoading(); | ||||
| }, 1200); | }, 1200); | ||||
| @@ -93,13 +92,20 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| list: that.data.list | list: that.data.list | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } else { | } else { | ||||
| console.log("加载完成allow_load设置成false"); | console.log("加载完成allow_load设置成false"); | ||||
| } | } | ||||
| }, | }, | ||||
| handleChange({ detail }) { | handleChange({ detail }) { | ||||
| console.log(detail); | |||||
| this.setData({ | this.setData({ | ||||
| current: detail.key | current: detail.key | ||||
| }); | }); | ||||
| @@ -117,13 +123,10 @@ Page({ | |||||
| }, | }, | ||||
| onReachBottom: function () { | onReachBottom: function () { | ||||
| var that = this; | var that = this; | ||||
| console.log(that.data.page); | |||||
| that.data.page++; | that.data.page++; | ||||
| console.log(that.data.page); | |||||
| that.setData({ | that.setData({ | ||||
| page: that.data.page | page: that.data.page | ||||
| }); | }); | ||||
| console.info("after++ " + that.data.page); | |||||
| that.getList(that.data.current_scroll, that.data.page); | that.getList(that.data.current_scroll, that.data.page); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -121,7 +121,15 @@ Page({ | |||||
| desc: weapNote.carpage.desc, | desc: weapNote.carpage.desc, | ||||
| title: weapNote.carpage.title | title: weapNote.carpage.title | ||||
| }) | }) | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| // 登录 | // 登录 | ||||
| var scene = decodeURIComponent(options.scene); | var scene = decodeURIComponent(options.scene); | ||||
| that.setData({ | that.setData({ | ||||
| @@ -194,6 +202,13 @@ Page({ | |||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| url: "/pages/getuserinfo/index" | url: "/pages/getuserinfo/index" | ||||
| }); | }); | ||||
| }else{ | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -215,7 +230,15 @@ Page({ | |||||
| // 共同登录 | // 共同登录 | ||||
| that.userCarLogin(); | that.userCarLogin(); | ||||
| } | } | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 获取用户信息 | * 获取用户信息 | ||||
| @@ -318,7 +341,15 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| couponList: res.data.list | couponList: res.data.list | ||||
| }); | }); | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| @@ -375,6 +406,13 @@ Page({ | |||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| url: "/pages/phoneinput/phoneinput" | url: "/pages/phoneinput/phoneinput" | ||||
| }); | }); | ||||
| }else{ | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } | } | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -436,8 +474,13 @@ Page({ | |||||
| park: res.data | park: res.data | ||||
| }) | }) | ||||
| }) | }) | ||||
| .catch(error=>{ | |||||
| console.log(error) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -452,8 +495,13 @@ Page({ | |||||
| .then(res => { | .then(res => { | ||||
| console.log(res); | console.log(res); | ||||
| }) | }) | ||||
| .catch(error=>{ | |||||
| console.log(error) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -488,6 +536,14 @@ Page({ | |||||
| that.getStopFee(listCardNum); | that.getStopFee(listCardNum); | ||||
| } | } | ||||
| }) | }) | ||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -53,10 +53,13 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| .catch(error => { | |||||
| .catch(err => { | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: error.data, | |||||
| }) | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | }) | ||||
| }, | }, | ||||
| //计时器 | //计时器 | ||||
| @@ -102,10 +105,13 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| .catch(error => { | |||||
| .catch(err => { | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: '请输入有效手机号', | |||||
| }) | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | }) | ||||
| } | } | ||||
| } | } | ||||
| @@ -91,7 +91,15 @@ Page({ | |||||
| } | } | ||||
| } | } | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| } else { | } else { | ||||
| console.info("allow_load==false 已禁止加载"); | console.info("allow_load==false 已禁止加载"); | ||||
| that.setData({ | that.setData({ | ||||
| @@ -114,7 +114,15 @@ Page({ | |||||
| score: res.data.score, | score: res.data.score, | ||||
| levelName: res.data.levelName | levelName: res.data.levelName | ||||
| }) | }) | ||||
| }); | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| // that.getrun(); | // that.getrun(); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -49,6 +49,9 @@ class HttpBasics { | |||||
| }, | }, | ||||
| fail: err => { | fail: err => { | ||||
| // wx.hideLoading(); | // wx.hideLoading(); | ||||
| if (err.errMsg == 'request:fail timeout') { | |||||
| err.errMsg = '请求超时,请检查您的网络设置!' | |||||
| } | |||||
| reject(err); | reject(err); | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -75,7 +78,12 @@ class HttpBasics { | |||||
| this.responseMap(res, resolve, reject); | this.responseMap(res, resolve, reject); | ||||
| }, | }, | ||||
| fail: err => { | fail: err => { | ||||
| // debugger | |||||
| // wx.hideLoading(); | // wx.hideLoading(); | ||||
| console.log(err) | |||||
| if (err.errMsg=='request:fail timeout'){ | |||||
| err.errMsg='请求超时,请检查您的网络设置!' | |||||
| } | |||||
| reject(err); | reject(err); | ||||
| }, | }, | ||||
| complete: res => {} | complete: res => {} | ||||