Commit ea0fb4af authored by spc's avatar spc

fixed

parent c91d890f
No preview for this file type
......@@ -57,7 +57,7 @@
</template>
<script setup>
import { computed, ref } from 'vue'
import { computed, ref, watch, onUnmounted } from 'vue'
import { fetchUserClickActivity } from '../api/home'
......@@ -147,6 +147,38 @@ const handleClose = async () => {
// handleClose()
// }
// }
// 监听 visible 变化,控制页面滚动
watch(() => props.visible, (newVal) => {
// #ifdef MP-WEIXIN
if (newVal) {
// 弹窗显示时禁止背景页面滚动
wx.setPageStyle({
style: {
overflow: 'hidden'
}
})
} else {
// 弹窗隐藏时恢复背景页面滚动
wx.setPageStyle({
style: {
overflow: 'auto'
}
})
}
// #endif
}, { immediate: true })
// 组件卸载时恢复滚动
onUnmounted(() => {
// #ifdef MP-WEIXIN
wx.setPageStyle({
style: {
overflow: 'auto'
}
})
// #endif
})
</script>
<style lang="less" scoped>
......
<template>
<view class="activity-list-warp">
<view class="search">
<view v-for="(itm,idx) in searchList" :key="idx"
<!-- <view v-for="(itm,idx) in searchList" :key="idx"
:class="searchType === itm.type ? 'search-box search-box-bg' : 'search-box'" @click="searchClick(itm)">
<view :class="searchType === itm.type ? 'search-text':'search-text search-text-thin'">{{itm.name}}
</view>
<view v-if="searchType === itm.type" class="search-total">{{itm.total > 99 ? '99+' : itm.total }}</view>
</view> -->
<view v-for="(itm,idx) in searchList" :key="idx"
class="search-box" @click="searchClick(itm)">
<view :class="searchType === itm.type ? 'search-text':'search-text-thin'">
<view>{{itm.name}}</view>
<view v-if="searchType === itm.type" class="search-text-bot"></view>
</view>
<view v-if="searchType === itm.type" class="search-total">{{itm.total > 99 ? '99+' : itm.total }}</view>
</view>
</view>
<view v-if="!loadMore" class="page-list">
......@@ -52,7 +60,7 @@
</view>
<view class="content-right">
<view
:class="(item.prized === 0 || Date.now() > new Date(item.signupEndTime).getTime()) ? 'btn gray' : 'btn'">
:class="(item.prized === 0 || (item.prized !== 1 && Date.now() > new Date(item.signupEndTime).getTime())) ? 'btn gray' : 'btn'">
{{ formatStatus(item) }}
</view>
</view>
......@@ -112,7 +120,7 @@ const searchClick = (itm)=>{
const formatActivityTime = (startTime, endTime) => {
const start = new Date(startTime);
const end = new Date(endTime);
const getParts = (date) => [date.getMonth() + 1, date.getDate(), date.getHours().toString().padStart(2, '0'), date.getMinutes().toString().padStart(2, '0')];
const getParts = (date) => [(date.getMonth() + 1).toString().padStart(2, '0'), date.getDate().toString().padStart(2, '0'), date.getHours().toString().padStart(2, '0'), date.getMinutes().toString().padStart(2, '0')];
const [sMonth, sDate, sHours, sMinutes] = getParts(start);
const [eMonth, eDate, eHours, eMinutes] = getParts(end);
if (sMonth === eMonth && sDate === eDate) {
......@@ -224,9 +232,17 @@ onLoad(async(options) => {
isShare.value = options.share ? options.share : ''
getInfo(searchType.value)
})
// 登录获取 cuk
const wxAutoLogin = async () => {
await new Promise(resolve => {
userStore.syWxAutoLogin(resolve)
})
}
onShow(async()=> {
console.log(isShare.value,'onShow---')
if(isShare.value == 'true'){
// 确保登录以获取 cuk
await wxAutoLogin()
await userStore.loadUserInfo()
console.log(userStore.userInfo,'userStore.userInfo?.memberId')
if ((userStore?.userInfo?.memberId && userStore?.userInfo?.memberId == "not_login") || !userStore.userInfo) {
......@@ -248,48 +264,96 @@ onShow(async()=> {
color: #1C1C1C;
min-height: 100vh;
padding-top: 30rpx;
// .search{
// width: calc(100% - 40rpx);
// height: 72rpx;
// border-radius: 200rpx;
// background: #ECC990;
// display: flex;
// justify-content: space-between;
// align-items: center;
// padding: 0rpx 5rpx;
// margin: 0rpx auto 20rpx;
// .search-box-bg{
// background: linear-gradient(180deg, #FFFFFF 0%, #FFF2D3 100%);
// border-radius: 200rpx;
// }
// .search-box{
// height: 64rpx;
// width: 232rpx;
// display: flex;
// justify-content: center;
// align-items: center;
// .search-text{
// font-weight: 500;
// font-size: 26rpx;
// color: #B27C1E;
// }
// .search-text-thin{
// font-weight: 400;
// font-size: 24rpx;
// color: #B27C1E;
// opacity: 0.5;
// }
// .search-total{
// width: 48rpx;
// height: 28rpx;
// background: linear-gradient(90deg, #B27C1E 0%, #D3A358 100%);
// border-radius: 40rpx;
// font-size: 20rpx;
// color: #FFFFFF;
// line-height: 28rpx;
// text-align: center;
// margin-left: 10rpx;
// }
// }
// }
.search{
width: calc(100% - 40rpx);
height: 72rpx;
border-radius: 200rpx;
background: #ECC990;
//background: #ECC990;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 5rpx;
margin: 0rpx auto 20rpx;
.search-box-bg{
background: linear-gradient(180deg, #FFFFFF 0%, #FFF2D3 100%);
border-radius: 200rpx;
}
.search-box{
height: 64rpx;
width: 232rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
color: #000000;
.search-text{
font-weight: 500;
font-size: 26rpx;
color: #B27C1E;
font-weight: 600;
position: relative;
display: flex;
justify-content: center;
.search-text-bot{
width: 60%;
height: 8rpx;
border-radius: 26rpx;
background: #000000;
position: absolute;
top: 45rpx;
}
}
.search-text-thin{
font-weight: 400;
font-size: 24rpx;
color: #B27C1E;
opacity: 0.5;
}
.search-total{
width: 48rpx;
height: 28rpx;
background: linear-gradient(90deg, #B27C1E 0%, #D3A358 100%);
border-radius: 40rpx;
font-size: 20rpx;
color: #FFFFFF;
line-height: 28rpx;
width: 36rpx;
height: 24rpx;
line-height: 26rpx;
border-radius: 12rpx 12rpx 12rpx 0rpx;
background: linear-gradient(90deg, #D1AF82 0%, #E6C7A3 100%);
font-size: 16rpx;
text-align: center;
margin-left: 10rpx;
color: #FFFFFF;
}
}
}
......@@ -321,7 +385,7 @@ onShow(async()=> {
display: flex;
justify-content: space-between;
align-items: center;
padding: 22rpx 40rpx;
padding: 26rpx 30rpx;
box-sizing: border-box;
position: absolute;
bottom: 0;
......@@ -333,7 +397,7 @@ onShow(async()=> {
.content-left {
width: 140rpx;
height: 100%;
display: flex;
.left-one {
height: 100%;
display: flex;
......@@ -364,11 +428,11 @@ onShow(async()=> {
}
.content-main {
width: calc(100% - 380rpx);
width: calc(100% - 340rpx);
display: flex;
flex-direction: column;
align-items: flex-start;
margin: 0rpx 20rpx;
margin-right: 20rpx;
height: 100%;
justify-content: space-between;
......@@ -393,14 +457,17 @@ onShow(async()=> {
.text {
font-size: 20rpx;
margin: 0rpx 20rpx 0rpx 2rpx;
margin: 0rpx 10rpx 0rpx 2rpx;
}
.name {
padding: 0rpx 5rpx;
padding-left: 5rpx;
padding-right: 5rpx;
border-radius: 4rpx;
font-size: 18rpx;
line-height: 26rpx;
height: 26rpx;
display: flex;
align-items: center;
color: #FFFFFF;
}
}
......
......@@ -286,7 +286,7 @@ defineExpose({
.picker-layer-cancel {
color: #6f6d67;
font-size: 28rpx;
font-size: 30rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
......@@ -299,7 +299,7 @@ defineExpose({
.picker-layer-confirm {
color: #ffffff;
font-size: 28rpx;
font-size: 30rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
......@@ -311,7 +311,7 @@ defineExpose({
.picker-layer-title {
color: #222;
font-size: 32rpx;
font-size: 30rpx;
font-weight: bold;
}
}
......@@ -326,7 +326,7 @@ defineExpose({
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
font-size: 30rpx;
color: #1d1e25;
}
......
......@@ -373,7 +373,7 @@ onMounted(() => {
.picker-layer-cancel {
color: #6f6d67;
font-size: 28rpx;
font-size: 30rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
......@@ -386,7 +386,7 @@ onMounted(() => {
.picker-layer-confirm {
color: #ffffff;
font-size: 28rpx;
font-size: 30rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
......@@ -398,7 +398,7 @@ onMounted(() => {
.picker-layer-title {
color: #222;
font-size: 32rpx;
font-size: 30rpx;
font-weight: bold;
}
}
......@@ -413,7 +413,7 @@ onMounted(() => {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
font-size: 30rpx;
color: #1d1e25;
}
......
......@@ -16,6 +16,7 @@
<input v-model.trim="fieldItem.fieldValue"
:type="fieldItem.limitInfo.limitType === 1 ? 'number' : 'text'"
:placeholder="fieldItem.placeholder" :maxlength="fieldItem.limitInfo.limitLength"
placeholder-style="color: #D9D9D9;"
@blur="(e) => emit('textInput', { subIndex: '', fieldIndex, e, type: fieldItem.limitInfo.limitType })"
:class="isView ? 'form-input view-bg' : fieldItem.error ? 'error-border form-input' : 'form-input'"
:disabled="isView" />
......@@ -25,11 +26,12 @@
</view>
<!-- 长文本输入框类型 -->
<view v-if="fieldItem.componentType === 'LONG_TEXT'">
<textarea v-model.trim="fieldItem.fieldValue"
<textarea v-model="fieldItem.fieldValue"
:type="fieldItem.limitInfo.limitType === 1 ? 'number' : 'text'"
:placeholder="fieldItem.placeholder" :maxlength="fieldItem.limitInfo.limitLength"
placeholder-style="color: #D9D9D9;"
@blur="(e) => emit('textInput', { subIndex: '', fieldIndex, e, type: fieldItem.limitInfo.limitType })"
:class="isView ? 'form-textarea view-bg' : fieldItem.error ? 'error-border form-textarea' : 'form-textarea'"
:class="isView ? 'form-textarea textarea-pad view-bg' : fieldItem.error ? 'error-border form-textarea' : 'form-textarea'"
:disabled="isView" />
<view v-if="fieldItem.error || fieldItem.noInt" class="error">
{{ fieldItem.error ? `请维护${fieldItem.fieldName}` : `请输入整数后提交` }}
......@@ -37,12 +39,12 @@
</view>
<!-- 手机号类型 -->
<view v-else-if="fieldItem.componentType === 'MOBILE'" :class="isView ? 'form-mobile view-bg' : fieldItem.error ? 'error-border form-mobile' : 'form-mobile'">
<view v-else-if="fieldItem.componentType === 'MOBILE'"
:class="isView ? 'form-mobile view-bg' : fieldItem.error ? 'error-border form-mobile' : 'form-mobile'">
<input v-model.trim="fieldItem.fieldValue" type="number" maxlength="11"
:placeholder="fieldItem.placeholder"
:placeholder="fieldItem.placeholder" placeholder-style="color: #D9D9D9;"
@blur="(e) => emit('mobileInput', { subIndex: '', fieldIndex, e })"
class="form-input form-input-short"
:disabled="isView" />
class="form-input form-input-short" :disabled="isView" />
<view v-if="fieldItem.fieldValue && !isView"
@click="emit('updateMobile', { subIndex: '', fieldIndex })" class="btn">更换手机号
</view>
......@@ -53,7 +55,7 @@
<!-- 身份证号类型 -->
<view v-else-if="fieldItem.componentType === 'ID_CARD'" class="form-card">
<input v-model.trim="fieldItem.fieldValue" type="idcard" maxlength="18"
:placeholder="fieldItem.placeholder"
:placeholder="fieldItem.placeholder" placeholder-style="color: #D9D9D9;"
@blur="(e) => emit('cardInput', { subIndex: '', fieldIndex, e })"
:class="isView ? 'form-input view-bg' : fieldItem.error ? 'error-border form-input' : 'form-input'"
:disabled="isView" />
......@@ -108,7 +110,7 @@
<view class="custom-radio">
<image v-if="fieldItem.fieldValue === opt.optionValue"
:src="$baseUrl + 'sign-up/radio.png'" mode="aspectFit" />
<image v-else :src="$baseUrl + 'sign-up/circle.png'" mode="aspectFit" />
<image v-else :src="$baseUrl + 'sign-up/noradio.png'" mode="aspectFit" />
<text class="radio-label">{{ opt.optionLabel }}</text>
</view>
</view>
......@@ -234,8 +236,8 @@ const hasFilledOutList = (list) => {
.form-child {
padding: 20rpx;
box-sizing: border-box;
color: #1C1C1C;
}
.form-tree {
position: relative;
margin-bottom: 20rpx;
......@@ -249,7 +251,7 @@ const hasFilledOutList = (list) => {
.form-title {
font-weight: 600;
font-size: 28rpx;
font-size: 30rpx;
}
.form-del {
......@@ -265,7 +267,7 @@ const hasFilledOutList = (list) => {
.form-row {
margin-bottom: 35rpx;
font-size: 24rpx;
font-size: 28rpx;
.form-label {
margin: 20rpx 0rpx;
......@@ -289,16 +291,22 @@ const hasFilledOutList = (list) => {
height: 68rpx;
padding: 0rpx 10rpx;
box-sizing: border-box;
border: 1px solid #A8A8A8;
border: 1px solid #D9D9D9;
font-size: 24rpx;
}
.form-textarea {
border-radius: 8rpx;
width: 100%;
height: 130rpx;
padding: 10rpx;
height: 154rpx;
line-height: 1.5;
border: 1px solid #D9D9D9;
font-size: 24rpx;
}
.textarea-pad{
height: 164rpx;
padding-bottom: 10rpx;
box-sizing: border-box;
border: 1px solid #A8A8A8;
}
.form-radio {
......@@ -306,6 +314,7 @@ const hasFilledOutList = (list) => {
align-items: center;
flex-wrap: wrap;
width: calc(100vw - 59rpx);
font-size: 26rpx;
.radio-item {
margin-bottom: 20rpx;
......@@ -313,10 +322,11 @@ const hasFilledOutList = (list) => {
.custom-radio {
margin: -40rpx 45rpx 0rpx 0rpx;
display: flex;
align-items: center;
image {
width: 18rpx;
height: 18rpx;
width: 26rpx;
height: 26rpx;
}
.radio-label {
......@@ -330,6 +340,7 @@ const hasFilledOutList = (list) => {
flex-wrap: wrap;
align-items: center;
width: calc(100vw - 59rpx);
font-size: 24rpx;
.check-item {
margin-bottom: 20rpx;
......@@ -360,8 +371,8 @@ const hasFilledOutList = (list) => {
}
.nocheck-bg {
color: #A8A8A8;
border: 1px solid #A8A8A8;
color: #D9D9D9;
border: 1px solid #D9D9D9;
}
}
}
......@@ -371,14 +382,17 @@ const hasFilledOutList = (list) => {
border-radius: 8rpx;
width: 100%;
height: 68rpx;
border: 1px solid #A8A8A8;
.form-input-short{
border: 1px solid #D9D9D9;
font-size: 24rpx;
.form-input-short {
border: none;
width: calc(100% - 120rpx);
}
.btn {
position: absolute;
color: #A8A8A8;
color: #D9D9D9;
right: 10rpx;
top: 19rpx;
z-index: 99;
......@@ -387,6 +401,7 @@ const hasFilledOutList = (list) => {
.form-card {
position: relative;
font-size: 24rpx;
.arrow-icon {
width: 48rpx;
......@@ -394,6 +409,7 @@ const hasFilledOutList = (list) => {
position: absolute;
right: 10rpx;
top: 10rpx;
opacity: 0.5;
}
}
......@@ -406,17 +422,20 @@ const hasFilledOutList = (list) => {
font-size: 24rpx;
.date-text {
color: #808080;
color: #D9D9D9;
font-size: 24rpx;
}
.arrow-icon {
width: 48rpx;
height: 48rpx;
opacity: 0.5;
}
.union-icon {
width: 29rpx;
height: 36rpx;
opacity: 0.5;
}
}
......@@ -438,19 +457,10 @@ const hasFilledOutList = (list) => {
margin-right: 19rpx;
image {
// width: 86rpx;
// height: 86rpx;
width: 136rpx;
height: 136rpx;
}
}
// :last-child{
// .upload-image{
// margin-right: 0rpx;
// }
// }
.img-list {
margin-bottom: 15rpx;
position: relative;
......@@ -472,18 +482,18 @@ const hasFilledOutList = (list) => {
}
.error-border {
border: 1px solid red;
border: 1px solid #FF2828;
}
.view-bg {
border: none;
background-color: #F5F5F5;
background-color: #F7F7F7;
}
}
.line-dash {
border-bottom: 1px dashed #A8A8A8;
border-bottom: 1px dashed #D9D9D9;
margin: 40rpx 0rpx;
}
......
......@@ -36,6 +36,9 @@
</view>
</view>
</view>
<view v-if="activityInfo.addressList && activityInfo.addressList.length > 2" class="point">
···
</view>
</view>
<image :src="activityInfo.contactQRCode" mode="aspectFit" :show-menu-by-longpress="true" />
<view class="add-text">
......@@ -113,8 +116,8 @@ const formatActivityTime = computed(() => {
// 格式化日期部分:25年11月1日
const formatDatePart = (date) => {
const year = date.getFullYear().toString().slice(-2); // 取后两位
const month = date.getMonth() + 1; // 月份从0开始
const day = date.getDate();
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份从0开始
const day = date.getDate().toString().padStart(2, '0');
return `${year}${month}${day}日`;
};
......@@ -138,7 +141,7 @@ const formatActivityTime = computed(() => {
// 不同天:25年11月1日 ~25年11月25日
const startDatePart = formatDatePart(startDate);
const endDatePart = formatDatePart(endDate);
return `${startDatePart}${endDatePart}`;
return `${startDatePart}-${endDatePart}`;
}
})
const datePart = computed(() => {
......@@ -219,7 +222,7 @@ defineExpose({
}
.result-popup-goto {
font-size: 20rpx;
font-size: 24rpx;
text-align: center;
text-decoration: underline;
color: #D3A458;
......@@ -316,6 +319,9 @@ defineExpose({
}
}
}
.point{
line-height: 24rpx;
}
}
image {
......
......@@ -41,7 +41,7 @@
<view v-else-if="Date.now() > new Date(activityInfo.signupEndTime).getTime()" class="footer">
<view class="button-footer">
<image class="image-bg" :src="$baseUrl + 'sign-up/signup.png'" mode="aspectFit" />
<image class="image-gary" :src="$baseUrl + 'sign-up/gray.png'" mode="aspectFit" />
<!-- <image class="image-gary" :src="$baseUrl + 'sign-up/gray.png'" mode="aspectFit" /> -->
<view class="text text-gray">
已结束
</view>
......@@ -69,7 +69,7 @@
<view v-else class="footer">
<view class="button-footer">
<image class="image-bg" :src="$baseUrl + 'sign-up/signup.png'" mode="aspectFit" />
<image class="image-gary" :src="$baseUrl + 'sign-up/gray.png'" mode="aspectFit" />
<!-- <image class="image-gary" :src="$baseUrl + 'sign-up/gray.png'" mode="aspectFit" /> -->
<view class="text text-gray">
会员积分不足
</view>
......@@ -93,7 +93,7 @@
<view v-else class="footer">
<view class="button-footer">
<image class="image-bg" :src="$baseUrl + 'sign-up/signup.png'" mode="aspectFit" />
<image class="image-gary" :src="$baseUrl + 'sign-up/gray.png'" mode="aspectFit" />
<!-- <image class="image-gary" :src="$baseUrl + 'sign-up/gray.png'" mode="aspectFit" /> -->
<view class="text text-gray">
会员等级不足
</view>
......@@ -382,6 +382,12 @@ onLoad((options) => {
});
query.value = options
})
// 登录获取 cuk
const wxAutoLogin = async () => {
await new Promise(resolve => {
userStore.syWxAutoLogin(resolve)
})
}
onShow(async()=> {
console.log(query.value,'onShow')
......@@ -389,7 +395,9 @@ onShow(async()=> {
uni.removeStorageSync('needRefresh');
isShowSignUp.value = true
}
if(query.value.share == 'true'){
if (query.value.share == 'true') {
// 确保登录以获取 cuk
await wxAutoLogin()
await userStore.loadUserInfo()
console.log(userStore.userInfo,'userStore.userInfo?.memberId')
if ((userStore?.userInfo?.memberId && userStore?.userInfo?.memberId == "not_login") || !userStore.userInfo) {
......@@ -486,7 +494,6 @@ onShareAppMessage(() => {
height: 146rpx;
z-index: 99;
}
.container {
max-height: 840rpx;
min-height: 320rpx;
......@@ -529,25 +536,25 @@ onShareAppMessage(() => {
.footer {
.button-footer {
width: 582rpx;
width: 550rpx;
height: 100rpx;
position: fixed;
bottom: 70rpx;
left: 50%;
transform: translateX(-50%);
text-align: center;
.image-bg {
width: 100%;
height: 132rpx;
}
.image-gary {
width: 100%;
height: 100%;
position: absolute;
left: 0;
}
box-shadow: 0px 12rpx 8rpx 0px #00000026;
border-radius: 160rpx;
}
// .image-gary {
// width: 100%;
// height: 100%;
// position: absolute;
// left: 0;
// }
.text {
width: 100%;
......@@ -558,13 +565,13 @@ onShareAppMessage(() => {
left: 50%;
transform: translateX(-50%);
color: transparent;
background-image: linear-gradient(180deg, #B27C1E 14%, #4C350D 90%);
background-image: linear-gradient(90deg, #916633 0%, #AB7A44 100%);
-webkit-background-clip: text;
background-clip: text;
}
.text-gray {
opacity: 0.4;
opacity: 0.5;
}
.tips {
......@@ -573,17 +580,14 @@ onShareAppMessage(() => {
position: absolute;
font-size: 24rpx;
top: -20rpx;
right: 0rpx;
right: -20rpx;
padding: 0rpx 13rpx;
border-radius: 26rpx 22rpx 22rpx 7rpx;
border-radius: 26rpx 22rpx 22rpx 8rpx;
color: #FFFFFF;
background: linear-gradient(90deg, #B27C1E 0%, #D3A358 100%);
background: linear-gradient(90deg, #916633 0%, #AB7A44 100%);
text-align: center;
}
}
}
}
</style>
......@@ -549,6 +549,7 @@ watch(() => formData.value, (newVal) => {
overflow: hidden;
position: relative;
background-color: #F2F2F2;
color: #1C1C1C;
.top-box {
width: 100%;
......
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