Commit 2b819d39 by 李伟康

提交

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