Commit 2b819d39 by 李伟康

提交

1 parent f0e492b8
......@@ -47,6 +47,7 @@ Page({
} = this.data
let {
id,
awardInfoId,
activityId,
businessId,
source,
......@@ -63,7 +64,7 @@ Page({
} = await wx.p.api.solitaireApi.getActivityRedEnvelopeDetail({
id: activityId
})
if (linkId) this.jumpRedEnvelopeH5({
if (linkId || awardInfoId) this.jumpRedEnvelopeH5({
activityId,
linkId,
source
......
......@@ -37,6 +37,7 @@
.card {
flex-direction: column;
width: 100%;
.content-icon {
position: absolute;
......@@ -53,7 +54,7 @@
color: #863e00;
letter-spacing: 0;
width: 95%;
padding: 114rpx 0 8rpx;
padding: 114rpx 40rpx 8rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......
......@@ -35,11 +35,20 @@ Page({
const {
options
} = this
console.log(options,'--------')
if (options.id) this.options.relayLotteryId = options.id
if (options.isLogin) this.getGroupEnterInfo(options)
else this.jumpLoading() //直接打开时跳转、防止sessionId失效
},
async getGroupEnterInfo(options) {
//测试时需要分享测试
// let query = []
// Object.keys(options).map(key => {
// if (key != 'isLogin') query.push(`${key}=${options[key]}`)
// })
// this.shareQuery = query.join('&')
// this.noPageAuth = true
const res = await wx.p.router.intercept()
if (!res) {
const {
......@@ -235,21 +244,23 @@ Page({
id
},
userInfo
} = this.data, {
data
} = await wx.p.api.questionnaireApi.bindRedEnvelopeLink({
activityId: rewardId,
bindingSource: 2,
wechatName: userInfo.nickName,
businessId: id
})
wx.p.router.go('/packageActivity/pages/redEnvelope/index/index', {
} = this.data
// , {
// data
// } = await wx.p.api.questionnaireApi.bindRedEnvelopeLink({
// activityId: rewardId,
// bindingSource: 2,
// wechatName: userInfo.nickName,
// businessId: id
// })
wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/index/index', {
activityId: rewardId,
merchantId: userInfo.merchantId,
linkId: data.id,
// linkId: data.id,
source: 2,
recordId,
isLogin: 1
isLogin: 1,
businessId: id
})
},
async getRedEnvelopeAwardInfo({
......@@ -369,5 +380,5 @@ Page({
*/
onReachBottom() {
},
}
})
\ No newline at end of file
......@@ -4,7 +4,7 @@ page {
}
.layout {
padding: 24rpx 32rpx;
padding: 24rpx 32rpx 160rpx;
.box {
background: #FFFFFF;
......@@ -25,6 +25,9 @@ page {
color: #2D2D2E;
line-height: 46rpx;
margin: 24rpx 0;
max-height: 50vh;
box-sizing: border-box;
overflow-y: scroll;
}
.detail-box {
......
<block wx:if="{{loading}}">
<view class="layout isFullSucreen">
<view class="layout">
<view class="title flex box">{{title}}</view>
<view class="mp-html box">
<mp-html content="{{activityDetail}}"></mp-html>
......
......@@ -12,7 +12,7 @@ Component({
* 组件的初始数据
*/
data: {
count: 5
count: 3
},
lifetimes: {
async attached() {
......@@ -38,15 +38,22 @@ Component({
activityRedEnvelopeId: activityId,
nickName: userInfo.nickName
})
if (response.isActivityRedEnvelopeFlag && !response.isReceiveFlag) wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/index/index', {
activityId,
businessId: data.id,
merchantId,
source: 1,
isLogin: 1
if (response.isActivityRedEnvelopeFlag && !response.isReceiveFlag) this.setData({
jumpOption: {
type: data.activityType,
options: {
activityId,
businessId: data.id,
merchantId,
source: 1,
isLogin: 1
}
}
})
else this.countDown()
// wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/index/index', {
// })
this.countDown()
} else {
if (data.activityType == 2) {
options.couponId = activityId
......@@ -76,9 +83,7 @@ Component({
jumpOption
} = this.data
if (jumpOption) {
if (jumpOption.type == 3) wx.p.router.switchTab('/pages/tab/index/index', {
jumpH5Url: jumpOption.url
})
if (jumpOption.type == 3) wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/index/index', jumpOption.options)
else wx.p.router.redirectTo(jumpOption.url, jumpOption.options)
} else wx.p.router.goHome()
},
......@@ -87,7 +92,7 @@ Component({
let {
count
} = this.data
if (this.timer && count == 0) {
if (this.timer && count == 1) {
clearTimeout(this.timer)
this.back()
return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!