Commit 7abc24d1 authored by wildfirecode13's avatar wildfirecode13

111

parent 5aec9961
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<!-- 未领取 --> <!-- 未领取 -->
<block a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.RECEIVE}}"> <block a:if="{{item.drawStatus===PRIZE_DRAW_STATUS_MAP.RECEIVE}}">
<!-- 实物填写地址 --> <!-- 实物填写地址 -->
<image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}" onTap="handleClick" data-item="{{item}}" src="{{task.image.addressBth}}" /> <image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}" onTap="handleClick" data-item="{{item}}" src="{{task.image.getBth}}" />
<!--<image a:if="{{item.type === PRIZE_TYPE_MAP.ENTITY}}" onTap="handleClick" data-item="{{item}}" src="{{task.image.addressBth}}" />-->
<!-- 优惠券立即领取 --> <!-- 优惠券立即领取 -->
<image a:else onTap="handleClick" data-item="{{item}}" src="{{task.image.getBth}}" /> <image a:else onTap="handleClick" data-item="{{item}}" src="{{task.image.getBth}}" />
</block> </block>
......
...@@ -124,6 +124,7 @@ Page({ ...@@ -124,6 +124,7 @@ Page({
}, },
}) })
.catch((err) => { .catch((err) => {
commonToast('领取失败~')
console.log("alibaba.latour.strategy.issue------catch", err); console.log("alibaba.latour.strategy.issue------catch", err);
}); });
console.log(result, "result"); console.log(result, "result");
...@@ -131,6 +132,7 @@ Page({ ...@@ -131,6 +132,7 @@ Page({
}, },
fail: (err) => { fail: (err) => {
console.log("scope.latourBenefit----fail", err); console.log("scope.latourBenefit----fail", err);
commonToast('领取失败~')
reject(err); reject(err);
}, },
}); });
...@@ -167,53 +169,57 @@ Page({ ...@@ -167,53 +169,57 @@ Page({
}, },
// 领取实物前询问 // 领取实物前询问
async handleGetEntity(e) { async handleGetEntity(e) {
if (flag) { const text = 'zzzxxx'
return commonToast('请前去钉钉领取,钉钉号为:'+text+'。钉钉号已经复制成功。',3000);
} setClipboard({ text:`钉钉号为:${text}` })
// my.showLoading();
flag = true;
const { activityId } = app;
const { item } = e.target.dataset;
const userAddress = await getUserAddress({ joinTag: " " }).catch((data) => {
flag = false
console.log('getUserAddress出错了,错误信息是', data);
})
// my.hideLoading();
if (!userAddress) return
// commonToast(' getUserAddress =>'+JSON.stringify( userAddress))
const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {};
const params = {
activityId,
area: countyName,
addressdetail: detailInfo,
name,
phone: telNumber,
detailInfo,
cityCode,
cityName,
city: cityName,
province: provinceName,
provinceName,
countyName,
streetName,
_id: item._id
}
my.confirm({ // if (flag) {
title: '提示', // return
content: '确认使用该收货地址:' + name + telNumber + userAddress.duibaAddress.address, // }
confirmButtonText: '确定', // // my.showLoading();
cancelButtonText: '取消', // flag = true;
success: (result) => { // const { activityId } = app;
console.log(result) // const { item } = e.target.dataset;
const { confirm } = result; // const userAddress = await getUserAddress({ joinTag: " " }).catch((data) => {
// flag = false
// console.log('getUserAddress出错了,错误信息是', data);
// })
// // my.hideLoading();
// if (!userAddress) return
// // commonToast(' getUserAddress =>'+JSON.stringify( userAddress))
// const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {};
// const params = {
// activityId,
// area: countyName,
// addressdetail: detailInfo,
// name,
// phone: telNumber,
// detailInfo,
// cityCode,
// cityName,
// city: cityName,
// province: provinceName,
// provinceName,
// countyName,
// streetName,
// _id: item._id
// }
if (confirm) { // my.confirm({
this.receiveObjectPrize(params); // title: '提示',
} // content: '确认使用该收货地址:' + name + telNumber + userAddress.duibaAddress.address,
}, // confirmButtonText: '确定',
}); // cancelButtonText: '取消',
flag = false // success: (result) => {
// console.log(result)
// const { confirm } = result;
// if (confirm) {
// this.receiveObjectPrize(params);
// }
// },
// });
// flag = false
}, },
// 领取实物 // 领取实物
async receiveObjectPrize(params) { async receiveObjectPrize(params) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment