diff --git a/config/config.js b/config/config.js index 7b7c664..2667193 100644 --- a/config/config.js +++ b/config/config.js @@ -160,6 +160,10 @@ var config = { * 订单退款状态 */ getRefundStatus: "/order/getRefundStatus", + /** + * 获取im客服id + */ + getIm: "/mallIm/getIm", // 券包详情 // orderDetailAll: "/order/detail_v1", /** diff --git a/pages/coupon/confirmation/confirmation.js b/pages/coupon/confirmation/confirmation.js index 9455904..4752728 100644 --- a/pages/coupon/confirmation/confirmation.js +++ b/pages/coupon/confirmation/confirmation.js @@ -14,7 +14,7 @@ Page({ spuIdObj: {}, priceAndStockObj: {}, mallTenantId: '', - imId: "69168503086", + imId: "", goodId: "", IMorderId: "" }, @@ -75,6 +75,25 @@ Page({ }, }); }, + + getIm() { //获取im客服id + const that = this + Http.get({ + url: config.api.getIm, + data: { + mallTenantId: this.data.mallTenantId || '' + } + }).then(res => { + console.log(res, 'getIm'); + const imId = res.data.imId || '' + that.setData({ + imId: imId + }) + }).catch(err => { + console.log(err, 'res'); + }) + }, + getSupId(id) { Http.get({ url: config.api.getSpuid, @@ -952,4 +971,8 @@ Page({ } }) }, + + onShow() { + this.getIm() + } }) \ No newline at end of file diff --git a/pages/coupon/confirmation/confirmation.ttml b/pages/coupon/confirmation/confirmation.ttml index d5b8d39..22063c9 100644 --- a/pages/coupon/confirmation/confirmation.ttml +++ b/pages/coupon/confirmation/confirmation.ttml @@ -18,8 +18,9 @@ {{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} {{data.type==50?'立即换购':'提交订单'}} - -