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