Commit 3bf664ba by wangzhihui

添加sentry报错

1 parent 3fd4a3b1
...@@ -120,7 +120,7 @@ Page({ ...@@ -120,7 +120,7 @@ Page({
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
//0-关闭,1-打开 //0-关闭,1-打开
isEnabled: res.data?res.data.isEnabled == 0 ? false : true:false isEnabled: res.data ? res.data.isEnabled == 0 ? false : true : false
}) })
resolve() resolve()
} }
...@@ -351,6 +351,7 @@ Page({ ...@@ -351,6 +351,7 @@ Page({
formData.channelSource = channelSource formData.channelSource = channelSource
formData.merchantId = merchantId formData.merchantId = merchantId
formData.merchantName = merchantName formData.merchantName = merchantName
try {
const { const {
code, code,
message, message,
...@@ -387,7 +388,18 @@ Page({ ...@@ -387,7 +388,18 @@ Page({
success: 'fail', success: 'fail',
dialogText: `原因:${message}` dialogText: `原因:${message}`
}) })
wx.p.sentry.reportError(`添加账户异常:${message}`, {
...formData,
message
});
// wx.$api.showToast(message) // wx.$api.showToast(message)
} }
} catch (err) {
wx.p.sentry.reportError(`添加账户异常:${err.message}`, {
...formData,
err
});
}
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -36,7 +36,6 @@ Page({ ...@@ -36,7 +36,6 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
wx.p.router.getRouterParams().then(params => { wx.p.router.getRouterParams().then(params => {
console.log(params)
this.setData(params) this.setData(params)
}) })
this.getBankList() this.getBankList()
......
...@@ -59,10 +59,11 @@ Page({ ...@@ -59,10 +59,11 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 8, pageSize: 8,
canExchange: 1, canExchange: 1,
businessType:1, businessType: 1,
staffPhone: userInfo?.phone, staffPhone: userInfo?.phone,
staffPlatform: userInfo?.channelSource, staffPlatform: userInfo?.channelSource,
merchantNo: userInfo?.merchantId merchantNo: userInfo?.merchantId,
storeEnd: this.data.sumbitScore
} }
wx.p.api.homeApi.getGoodsStockroomList(params).then(res => { wx.p.api.homeApi.getGoodsStockroomList(params).then(res => {
...@@ -97,7 +98,10 @@ Page({ ...@@ -97,7 +98,10 @@ Page({
// } // }
}, },
getDetail(options) { getDetail(options) {
wx.p.api.homeApi.getGoodsDetailInfo({id: options.id, businessType: 1}).then(res => { wx.p.api.homeApi.getGoodsDetailInfo({
id: options.id,
businessType: 1
}).then(res => {
// if (res && res.specificationResponses?.length) { // if (res && res.specificationResponses?.length) {
// this.toGetSpecString(res, res.startQty) // this.toGetSpecString(res, res.startQty)
// } // }
...@@ -131,9 +135,9 @@ Page({ ...@@ -131,9 +135,9 @@ Page({
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
taxRateObj:{ taxRateObj: {
...res.data, ...res.data,
baseIncome:this.simpleWanConvert(res.data.baseIncome) baseIncome: this.simpleWanConvert(res.data.baseIncome)
} }
}) })
} }
...@@ -173,7 +177,7 @@ Page({ ...@@ -173,7 +177,7 @@ Page({
sumbitScore, sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankId bankId
} = this.data,{ } = this.data, {
phone, phone,
channelSource, channelSource,
merchantId, merchantId,
...@@ -182,24 +186,33 @@ Page({ ...@@ -182,24 +186,33 @@ Page({
if (this.submit) return if (this.submit) return
this.submit = true this.submit = true
wx.p.wxApi.showLoading('提交中') wx.p.wxApi.showLoading('提交中')
wx.p.api.withdrawalApi.saveWithdrawal({ let params = {
withdrawalScore: sumbitScore, withdrawalScore: sumbitScore,
disclaimerAgreementUrl, disclaimerAgreementUrl,
bankId, bankId,
merchantId, merchantId,
merchantName, merchantName,
channelSource:channelSource, channelSource: channelSource,
staffPhone:phone, staffPhone: phone,
}).then(res => { }
wx.p.api.withdrawalApi.saveWithdrawal(params).then(res => {
wx.p.wxApi.hideLoading(); wx.p.wxApi.hideLoading();
if (res.code == 0) { if (res.code == 0) {
wx.p.router.redirectTo('/packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess') wx.p.router.redirectTo('/packageIndex/pages/integral/withdrawalSuccess/withdrawalSuccess')
} else { } else {
wx.p.wxApi.showToast(res.message) wx.p.wxApi.showToast(res.message)
this.submit = false this.submit = false
wx.p.sentry.reportError(`积分提现异常:${res.message}`, {
...params,
res
});
} }
}).catch((err) => { }).catch((err) => {
this.submit = false this.submit = false
wx.p.sentry.reportError(`积分提现异常:${err.message}`, {
...params,
err
});
wx.p.wxApi.showToast(JSON.stringify(err)) wx.p.wxApi.showToast(JSON.stringify(err))
}).finally(() => { }).finally(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!