@@ -160,6 +160,10 @@ var config = { | |||||
* 订单退款状态 | * 订单退款状态 | ||||
*/ | */ | ||||
getRefundStatus: "/order/getRefundStatus", | getRefundStatus: "/order/getRefundStatus", | ||||
/** | |||||
* 获取im客服id | |||||
*/ | |||||
getIm: "/mallIm/getIm", | |||||
// 券包详情 | // 券包详情 | ||||
// orderDetailAll: "/order/detail_v1", | // orderDetailAll: "/order/detail_v1", | ||||
/** | /** | ||||
@@ -14,7 +14,7 @@ Page({ | |||||
spuIdObj: {}, | spuIdObj: {}, | ||||
priceAndStockObj: {}, | priceAndStockObj: {}, | ||||
mallTenantId: '', | mallTenantId: '', | ||||
imId: "69168503086", | |||||
imId: "", | |||||
goodId: "", | goodId: "", | ||||
IMorderId: "" | 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) { | getSupId(id) { | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getSpuid, | url: config.api.getSpuid, | ||||
@@ -952,4 +971,8 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
onShow() { | |||||
this.getIm() | |||||
} | |||||
}) | }) |
@@ -18,8 +18,9 @@ | |||||
<view class="price">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}}</view> | <view class="price">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}}</view> | ||||
<view class="buyX" bindtap="orderFunc">{{data.type==50?'立即换购':'提交订单'}}</view> | <view class="buyX" bindtap="orderFunc">{{data.type==50?'立即换购':'提交订单'}}</view> | ||||
<button class="serviceBox" open-type="im" data-im-id="{{ imId }}" data-im-type="goods" data-biz-line="1" | |||||
data-goods-id="{{ goodId }}" bindim="imCallback" binderror="onimError"> | |||||
<button tt:if="{{imId && goodId}}" class="serviceBox" open-type="im" data-im-id="{{ imId }}" | |||||
data-im-type="goods" data-biz-line="1" data-goods-id="{{ goodId }}" bindim="imCallback" | |||||
binderror="onimError"> | |||||
<view class="fuwuLogoBox f"> | <view class="fuwuLogoBox f"> | ||||
<image class="itemLogo" src="../../../assets/images/service1.png" /> | <image class="itemLogo" src="../../../assets/images/service1.png" /> | ||||
</view> | </view> | ||||
@@ -98,7 +98,7 @@ Page({ | |||||
spuIdObj: {}, | spuIdObj: {}, | ||||
mallTenantId: '', | mallTenantId: '', | ||||
mallList: [], | mallList: [], | ||||
imId: "69168503086", | |||||
imId: "", | |||||
goodId: "", | goodId: "", | ||||
IMorderId: "" | IMorderId: "" | ||||
}, | }, | ||||
@@ -119,6 +119,24 @@ Page({ | |||||
console.log("拉起IM客服失败", e.detail); | console.log("拉起IM客服失败", e.detail); | ||||
}, | }, | ||||
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'); | |||||
}) | |||||
}, | |||||
getCouponList: function (id) { //获取其他活动 | getCouponList: function (id) { //获取其他活动 | ||||
let that = this; | let that = this; | ||||
let data; | let data; | ||||
@@ -1065,6 +1083,7 @@ Page({ | |||||
onShow() { | onShow() { | ||||
this.ifGetUser() //判断是否授权抖音 | this.ifGetUser() //判断是否授权抖音 | ||||
this.getIm() | |||||
this.setData({ | this.setData({ | ||||
mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
showbutton: false, | showbutton: false, | ||||
@@ -256,8 +256,8 @@ | |||||
<button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | <button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | ||||
<!-- <view class="sell">已售出<span class="sellP">{{data.inventory-priceAndStockObj.remainInventory}}</span>件</view> --> | <!-- <view class="sell">已售出<span class="sellP">{{data.inventory-priceAndStockObj.remainInventory}}</span>件</view> --> | ||||
<button class="serviceBox" open-type="im" data-im-id="{{ imId }}" data-im-type="goods" data-biz-line="1" | |||||
data-goods-id="{{ goodId }}" bindim="imCallback" binderror="onimError"> | |||||
<button tt:if="{{imId && goodId}}" class="serviceBox" open-type="im" data-im-id="{{ imId }}" | |||||
data-im-type="goods" data-biz-line="1" data-goods-id="{{ goodId }}" bindim="imCallback" binderror="onimError"> | |||||
<view class="fuwuLogoBox f"> | <view class="fuwuLogoBox f"> | ||||
<image class="itemLogo" src="../../../assets/images/service1.png" /> | <image class="itemLogo" src="../../../assets/images/service1.png" /> | ||||
</view> | </view> | ||||
@@ -35,6 +35,7 @@ Page({ | |||||
wm02Url: imgurl.wm02.url, | wm02Url: imgurl.wm02.url, | ||||
wm03Url: imgurl.wm03.url, | wm03Url: imgurl.wm03.url, | ||||
wm04Url: imgurl.wm04.url, | wm04Url: imgurl.wm04.url, | ||||
wm05Url: imgurl.wm05.url, | |||||
showModalStatus: false, | showModalStatus: false, | ||||
flag: 0, | flag: 0, | ||||
order: null, | order: null, | ||||
@@ -53,7 +54,7 @@ Page({ | |||||
orderFlag: false, //判断是不是线上配送 | orderFlag: false, //判断是不是线上配送 | ||||
tenantId: '', | tenantId: '', | ||||
mallList: [], | mallList: [], | ||||
imId: "69168503086", | |||||
imId: "", | |||||
orderStatus: 1, | orderStatus: 1, | ||||
tenantId: "", | tenantId: "", | ||||
IMorderId: "", | IMorderId: "", | ||||
@@ -99,6 +100,7 @@ Page({ | |||||
}; // 开发者需要透传的参数,可自定义内容 | }; // 开发者需要透传的参数,可自定义内容 | ||||
return new Promise(resolve => { | return new Promise(resolve => { | ||||
console.log(extra, 'extra'); | console.log(extra, 'extra'); | ||||
console.log(this.data.outOrderId, 'outOrderId'); | |||||
resolve(extra); | resolve(extra); | ||||
}); | }); | ||||
}, | }, | ||||
@@ -216,6 +218,24 @@ 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, 'err'); | |||||
}) | |||||
}, | |||||
getCouponMerchant() { //获取适用门店 | getCouponMerchant() { //获取适用门店 | ||||
const that = this | const that = this | ||||
Http.get({ | Http.get({ | ||||
@@ -230,6 +250,7 @@ Page({ | |||||
const orderID = res.data.orders[0].id | const orderID = res.data.orders[0].id | ||||
that.getOrderStatus(orderID) | that.getOrderStatus(orderID) | ||||
that.getIm() | |||||
const extParam = res.data.extParam || null | const extParam = res.data.extParam || null | ||||
if (extParam) { | if (extParam) { | ||||
const obj = JSON.parse(extParam) | const obj = JSON.parse(extParam) | ||||
@@ -811,6 +832,7 @@ Page({ | |||||
showButton: false | showButton: false | ||||
}) | }) | ||||
that.updetail() | that.updetail() | ||||
this.getCouponMerchant() //获取可用商户 | |||||
if (tt.canIUse("microapp-trade-plugin")) { | if (tt.canIUse("microapp-trade-plugin")) { | ||||
that.setData({ | that.setData({ | ||||
canIUseRefund: true | canIUseRefund: true | ||||
@@ -2,7 +2,7 @@ | |||||
<view style="height:{{navigationBarHeight}} "></view> --> | <view style="height:{{navigationBarHeight}} "></view> --> | ||||
<view class='order' tt:if="{{showPage}}"> | <view class='order' tt:if="{{showPage}}"> | ||||
<view tt:if="{{IMorderId}}" class="serviceBOX"> | |||||
<view tt:if="{{IMorderId && imId}}" class="serviceBOX"> | |||||
<button class="serviceBox2" open-type="im" data-im-id="{{ imId }}" data-im-type="order" | <button class="serviceBox2" open-type="im" data-im-id="{{ imId }}" data-im-type="order" | ||||
data-order-id="{{ IMorderId }}" bindim="imCallback" binderror="onimError"> | data-order-id="{{ IMorderId }}" bindim="imCallback" binderror="onimError"> | ||||
<view class="fuwuLogoBox f"> | <view class="fuwuLogoBox f"> | ||||
@@ -66,7 +66,8 @@ | |||||
<view class="zhuangtai"> | <view class="zhuangtai"> | ||||
<image tt:if="{{order.couponOrderStatus==1}}" src="{{wm01Url}}" mode='widthFix'></image> | <image tt:if="{{order.couponOrderStatus==1}}" src="{{wm01Url}}" mode='widthFix'></image> | ||||
<image tt:if="{{order.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image> | <image tt:if="{{order.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image> | ||||
<image tt:if="{{order.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image> | |||||
<image tt:if="{{order.couponOrderStatus==3 && orderStatus != 2}}" src="{{wm03Url}}" mode='widthFix'></image> | |||||
<image tt:if="{{order.couponOrderStatus==3 && orderStatus == 2}}" src="{{wm05Url}}" mode='widthFix'></image> | |||||
<image tt:if="{{order.couponOrderStatus==0&&order.validStatus==0}}" src="{{wm04Url}}" mode='widthFix'></image> | <image tt:if="{{order.couponOrderStatus==0&&order.validStatus==0}}" src="{{wm04Url}}" mode='widthFix'></image> | ||||
<view class="panel" tt:if="{{order.couponOrderStatus==0&&order.validStatus!=0}}"> | <view class="panel" tt:if="{{order.couponOrderStatus==0&&order.validStatus!=0}}"> | ||||
@@ -1,36 +1,36 @@ | |||||
const baseUrl = 'https://formall.oss-accelerate.aliyuncs.com/cimg/' | const baseUrl = 'https://formall.oss-accelerate.aliyuncs.com/cimg/' | ||||
module.exports = { | module.exports = { | ||||
'upDataRq':{ | |||||
'upDataRq': { | |||||
'url': baseUrl + "upDataRq.png", | 'url': baseUrl + "upDataRq.png", | ||||
"name":"" | |||||
"name": "" | |||||
}, | }, | ||||
'upDataRqF': { | 'upDataRqF': { | ||||
'url': baseUrl + "upDataRqF.png", | 'url': baseUrl + "upDataRqF.png", | ||||
"name": "" | "name": "" | ||||
}, | }, | ||||
'xiangshang':{ | |||||
'url': baseUrl +"xiangshang.png", | |||||
"name":"" | |||||
'xiangshang': { | |||||
'url': baseUrl + "xiangshang.png", | |||||
"name": "" | |||||
}, | }, | ||||
'map':{ | |||||
'map': { | |||||
'url': baseUrl + "ditufubiao.png", | 'url': baseUrl + "ditufubiao.png", | ||||
"name": "" | "name": "" | ||||
}, | }, | ||||
'concealBnt':{ | |||||
"url": baseUrl +'xiala.png', | |||||
"naem":'' | |||||
'concealBnt': { | |||||
"url": baseUrl + 'xiala.png', | |||||
"naem": '' | |||||
}, | }, | ||||
'act': { | 'act': { | ||||
'url': baseUrl + 'act.png', | 'url': baseUrl + 'act.png', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'shoppingAtlas':{ | |||||
'shoppingAtlas': { | |||||
'url': baseUrl + 'shoppingAtlas.png', | 'url': baseUrl + 'shoppingAtlas.png', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'shareDefaultTp':{ | |||||
'url': baseUrl +'mall_default.jpg', | |||||
'name':'' | |||||
'shareDefaultTp': { | |||||
'url': baseUrl + 'mall_default.jpg', | |||||
'name': '' | |||||
}, | }, | ||||
'active': { | 'active': { | ||||
'url': baseUrl + 'active.gif', | 'url': baseUrl + 'active.gif', | ||||
@@ -40,7 +40,7 @@ module.exports = { | |||||
'url': baseUrl + 'add.png', | 'url': baseUrl + 'add.png', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'jiaofeiwm':{ | |||||
'jiaofeiwm': { | |||||
'url': baseUrl + 'jiaofeiwm.png', | 'url': baseUrl + 'jiaofeiwm.png', | ||||
'name': '缴费规则' | 'name': '缴费规则' | ||||
}, | }, | ||||
@@ -392,22 +392,26 @@ module.exports = { | |||||
'url': baseUrl + 'wenti1.png', | 'url': baseUrl + 'wenti1.png', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'wm01': { | |||||
'wm01': { // 已使用 | |||||
'url': baseUrl + 'wm01.jpg', | 'url': baseUrl + 'wm01.jpg', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'wm02': { | |||||
'wm02': { // 已过期 | |||||
'url': baseUrl + 'wm02.jpg', | 'url': baseUrl + 'wm02.jpg', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'wm03': { | |||||
'wm03': { // 已退款 | |||||
'url': baseUrl + 'wm03.jpg', | 'url': baseUrl + 'wm03.jpg', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'wm04': { | |||||
'wm04': { // 未开始 | |||||
'url': baseUrl + 'wm04.jpg', | 'url': baseUrl + 'wm04.jpg', | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'wm05': { // 退款中 | |||||
'url': baseUrl + 'wm05.jpg', | |||||
'name': '' | |||||
}, | |||||
'icon0001': { | 'icon0001': { | ||||
'url': baseUrl + 'icon0001.png', | 'url': baseUrl + 'icon0001.png', | ||||
'name': '' | 'name': '' | ||||
@@ -503,7 +507,7 @@ module.exports = { | |||||
'barginlistbg': { | 'barginlistbg': { | ||||
'url': baseUrl + 'barginlistbg.jpg', | 'url': baseUrl + 'barginlistbg.jpg', | ||||
'name': '砍价列表背景图' | 'name': '砍价列表背景图' | ||||
}, | |||||
}, | |||||
'bargindetailbg': { | 'bargindetailbg': { | ||||
'url': baseUrl + 'bargindetailbg.jpg', | 'url': baseUrl + 'bargindetailbg.jpg', | ||||
'name': '砍价详情背景图' | 'name': '砍价详情背景图' | ||||
@@ -564,7 +568,7 @@ module.exports = { | |||||
'wmbarginicon': { | 'wmbarginicon': { | ||||
'url': baseUrl + 'wmbarginicon2.png', | 'url': baseUrl + 'wmbarginicon2.png', | ||||
'name': '我的砍价' | 'name': '我的砍价' | ||||
}, | |||||
}, | |||||
'wmspellgroup': { | 'wmspellgroup': { | ||||
'url': baseUrl + 'wmspellgroup2.png', | 'url': baseUrl + 'wmspellgroup2.png', | ||||
'name': '我的拼团' | 'name': '我的拼团' | ||||
@@ -581,7 +585,7 @@ module.exports = { | |||||
'url': baseUrl + 'leftarrows.png', | 'url': baseUrl + 'leftarrows.png', | ||||
'name': '左箭头' | 'name': '左箭头' | ||||
}, | }, | ||||
'barcode': {//换肤 | |||||
'barcode': { //换肤 | |||||
'url': baseUrl + 'lqcbarcode.png', | 'url': baseUrl + 'lqcbarcode.png', | ||||
'name': '二维码' | 'name': '二维码' | ||||
}, | }, | ||||
@@ -621,7 +625,7 @@ module.exports = { | |||||
'url': baseUrl + 'exchange01.png', | 'url': baseUrl + 'exchange01.png', | ||||
'name': '兑换小图标' | 'name': '兑换小图标' | ||||
}, | }, | ||||
'wangmeimeibargin':{ | |||||
'wangmeimeibargin': { | |||||
'url': baseUrl + 'wangmeimeibargin.jpg', | 'url': baseUrl + 'wangmeimeibargin.jpg', | ||||
'name': '砍价专场的图标' | 'name': '砍价专场的图标' | ||||
}, | }, | ||||
@@ -637,7 +641,7 @@ module.exports = { | |||||
'url': baseUrl + 'wangmeimeiarrow01.png', | 'url': baseUrl + 'wangmeimeiarrow01.png', | ||||
'name': '专场的更多图标' | 'name': '专场的更多图标' | ||||
}, | }, | ||||
'wangmeimeicredit':{ | |||||
'wangmeimeicredit': { | |||||
'url': baseUrl + "wangmeimeicredit.png", | 'url': baseUrl + "wangmeimeicredit.png", | ||||
'name': '积分背景' | 'name': '积分背景' | ||||
}, | }, | ||||
@@ -737,8 +741,8 @@ module.exports = { | |||||
'url': baseUrl + "wentiHr.png", | 'url': baseUrl + "wentiHr.png", | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'stopThat':{ | |||||
'url': baseUrl +"tingcheshiyong.png", | |||||
'stopThat': { | |||||
'url': baseUrl + "tingcheshiyong.png", | |||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
'jiaofei': { | 'jiaofei': { | ||||
@@ -753,21 +757,21 @@ module.exports = { | |||||
'url': baseUrl + "chenghr.png", | 'url': baseUrl + "chenghr.png", | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
"aboutUs":{ | |||||
"aboutUs": { | |||||
'url': baseUrl + "we.png", | 'url': baseUrl + "we.png", | ||||
'name': '' | 'name': '' | ||||
}, | }, | ||||
"sort":{ | |||||
"url":baseUrl + "noSort.png", | |||||
'name':'' | |||||
"sort": { | |||||
"url": baseUrl + "noSort.png", | |||||
'name': '' | |||||
}, | }, | ||||
'up':{ | |||||
'url' : baseUrl + 'up.png', | |||||
'name':'' | |||||
'up': { | |||||
'url': baseUrl + 'up.png', | |||||
'name': '' | |||||
}, | }, | ||||
'down':{ | |||||
'url' : baseUrl + 'down.png', | |||||
'name':'' | |||||
'down': { | |||||
'url': baseUrl + 'down.png', | |||||
'name': '' | |||||
}, | }, | ||||
'live': { | 'live': { | ||||
'url': baseUrl + 'live.png', | 'url': baseUrl + 'live.png', | ||||