|
@@ -1,17 +1,17 @@
|
|
<template>
|
|
<template>
|
|
- <view class="activity" catchtouchmove="true" :style="pageIndex == 1 ? 'background-image:none;background-color:#e03519' : ''">
|
|
|
|
|
|
+ <view class="activity" catchtouchmove="true" :style="pageIndex == 1 ? 'background-image:none;background-color:#e03519;padding:0 0 120rpx' : ''">
|
|
<!-- <view class="rule" @click="showRule">活动规则</view> -->
|
|
<!-- <view class="rule" @click="showRule">活动规则</view> -->
|
|
|
|
|
|
<!-- logo与跑马灯 -->
|
|
<!-- logo与跑马灯 -->
|
|
<view class="header">
|
|
<view class="header">
|
|
- <img :src="acticve_detail.logo" class="logo" v-if="pageIndex == 1" />
|
|
|
|
- <view class="barrage-box">
|
|
|
|
|
|
+ <img :src="acticve_detail.logo" class="logo" v-if="pageIndex == 1" mode="widthFix" />
|
|
|
|
+ <view class="barrage-box" :style="pageIndex == 1 ? 'margin-top:0' : ''">
|
|
<view class="text">{{ lottery_list }}</view>
|
|
<view class="text">{{ lottery_list }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 立即参与页面 -->
|
|
<!-- 立即参与页面 -->
|
|
- <view class="page-1" v-if="pageIndex == 1">
|
|
|
|
|
|
+ <view class="page-1" v-if="pageIndex == 1" style="padding: 0 16rpx">
|
|
<view class="activity-info">
|
|
<view class="activity-info">
|
|
<text class="title">{{ acticve_detail?.name }}</text>
|
|
<text class="title">{{ acticve_detail?.name }}</text>
|
|
<view class="active-rule">
|
|
<view class="active-rule">
|
|
@@ -24,7 +24,11 @@
|
|
<!-- 答题页面 -->
|
|
<!-- 答题页面 -->
|
|
<view class="page-2" v-if="pageIndex == 2">
|
|
<view class="page-2" v-if="pageIndex == 2">
|
|
<!-- 题干区域 -->
|
|
<!-- 题干区域 -->
|
|
- <view class="question">{{ question.title }}</view>
|
|
|
|
|
|
+ <view class="question">
|
|
|
|
+ <text>猜灯谜:{{ question.title }}</text>
|
|
|
|
+ <br />
|
|
|
|
+ <view style="margin-top: 20rpx">(请从下面选择正确答案提交)</view>
|
|
|
|
+ </view>
|
|
<!-- 选项区域 -->
|
|
<!-- 选项区域 -->
|
|
<view class="options">
|
|
<view class="options">
|
|
<view :class="['option', { active: answer_id == item.id }]" v-for="item in question.answer_list" :key="item.id" @click="_handleSelectAnswer(item.id)">{{ item.value }}</view>
|
|
<view :class="['option', { active: answer_id == item.id }]" v-for="item in question.answer_list" :key="item.id" @click="_handleSelectAnswer(item.id)">{{ item.value }}</view>
|
|
@@ -136,7 +140,6 @@ onShow(() => {
|
|
console.log("回到小程序");
|
|
console.log("回到小程序");
|
|
|
|
|
|
if (detialId.value) {
|
|
if (detialId.value) {
|
|
- console.log(1111);
|
|
|
|
_getDeatail(detialId.value);
|
|
_getDeatail(detialId.value);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -163,11 +166,10 @@ const _getDeatail = (id) => {
|
|
acticve_detail.value = response.data;
|
|
acticve_detail.value = response.data;
|
|
if (response.data.join_last > 0) {
|
|
if (response.data.join_last > 0) {
|
|
_getQuestion();
|
|
_getQuestion();
|
|
- pageIndex.value = 2;
|
|
|
|
|
|
+ pageIndex.value = 1;
|
|
}
|
|
}
|
|
http.request("api/lottery_riddle_record/get_list_all", { lottery_id: response.data.lottery_id }).then((res) => {
|
|
http.request("api/lottery_riddle_record/get_list_all", { lottery_id: response.data.lottery_id }).then((res) => {
|
|
if (res.code == "success") {
|
|
if (res.code == "success") {
|
|
- console.log(res);
|
|
|
|
if (res.data?.length > 0) {
|
|
if (res.data?.length > 0) {
|
|
let str = "";
|
|
let str = "";
|
|
|
|
|
|
@@ -233,9 +235,11 @@ const _goLottery = () => {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: `/pages/activity/lottery?id=${acticve_detail.value.lottery_id}`,
|
|
|
|
|
|
+ url: `/pages/activity/lottery?id=${acticve_detail.value.lottery_id}&activity_id=${detialId.value}`,
|
|
});
|
|
});
|
|
- pageIndex.value = 1;
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ pageIndex.value = 1;
|
|
|
|
+ }, 1000);
|
|
};
|
|
};
|
|
|
|
|
|
const _handleChangePage = (index) => {
|
|
const _handleChangePage = (index) => {
|
|
@@ -264,7 +268,6 @@ const _handleChangePage = (index) => {
|
|
.header {
|
|
.header {
|
|
.logo {
|
|
.logo {
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: 300rpx;
|
|
|
|
}
|
|
}
|
|
.barrage-box {
|
|
.barrage-box {
|
|
padding: 10rpx;
|
|
padding: 10rpx;
|
|
@@ -308,6 +311,7 @@ const _handleChangePage = (index) => {
|
|
align-items: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
|
+ box-sizing: border-box;
|
|
.activity-info {
|
|
.activity-info {
|
|
padding-top: 100rpx;
|
|
padding-top: 100rpx;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -387,15 +391,15 @@ const _handleChangePage = (index) => {
|
|
width: 100%;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
&.active {
|
|
&.active {
|
|
- background-color: #e7522f;
|
|
|
|
|
|
+ background-color: #ffd6a0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.submit-btn {
|
|
.submit-btn {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
- background-color: #e7522f;
|
|
|
|
- color: #fff;
|
|
|
|
|
|
+ background-color: #ffd6a0;
|
|
|
|
+ color: #7e4304;
|
|
border-radius: 60rpx;
|
|
border-radius: 60rpx;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|