2024-06-01 15:04:14 +08:00
|
|
|
|
<template class="content">
|
|
|
|
|
<view class="fixed-header">
|
|
|
|
|
<!-- 顶部导航栏 -->
|
|
|
|
|
<up-navbar leftText="" title="" :placeholder="true" :safeAreaInsetTop="true" @leftClick="leftClick">
|
|
|
|
|
|
|
|
|
|
<template #center>
|
|
|
|
|
<div class="navbarcenter"><span>活动详情</span></div>
|
|
|
|
|
</template>
|
|
|
|
|
</up-navbar>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="height: 100vh; overflow: auto;">
|
|
|
|
|
<view class="avtivityInfo">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="cards">
|
2024-06-05 16:57:58 +08:00
|
|
|
|
<view class="title"> {{ actiInfoList.acTitle }}</view>
|
2024-06-01 15:04:14 +08:00
|
|
|
|
<view class="time">活动时间:{{ actiInfoList.startTime }} - {{ actiInfoList.endTime }}</view>
|
2024-06-05 16:57:58 +08:00
|
|
|
|
<view class="addrs">活动地点:{{ actiInfoList.addres }}</view>
|
2024-06-01 15:04:14 +08:00
|
|
|
|
</view>
|
2024-06-05 16:57:58 +08:00
|
|
|
|
<view class="cardz">
|
|
|
|
|
<up-parse :content="actiInfoList.acContent" :tagStyle="style"></up-parse>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="cardx" v-for="(item,index) in toimage(actiInfoList.file)" :key="index">
|
|
|
|
|
<image :src="item" class="image"></image>
|
2024-06-01 15:04:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="dictAuto">
|
|
|
|
|
|
|
|
|
|
<view class="state1">
|
|
|
|
|
<up-button color="#c0f0ec" size="large" shape="circle" @click="btnClick"><span
|
|
|
|
|
class="btnText">立即报名</span></up-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="infox">
|
2024-06-02 11:10:25 +08:00
|
|
|
|
<view class="infoavatar"><up-avatar size="60rpx" :src="QNDomain + actiInfoList.launchAvatarsurl"></up-avatar>
|
|
|
|
|
</view>
|
2024-06-01 15:04:14 +08:00
|
|
|
|
<view>
|
|
|
|
|
<view class="launchName">{{ actiInfoList.launchName }}</view>
|
|
|
|
|
<view class="launchAddres">{{ actiInfoList.launchAddres }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="elroll">已报名:{{ actiInfoList.elroll }}人</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="infox2">
|
2024-06-05 16:57:58 +08:00
|
|
|
|
<up-modal :show="open" :title="title" width="600rpx" :content='content' confirmText="签到" cancelText="取消"
|
|
|
|
|
confirmColor="#3477FC" showCancelButton closeOnClickOverlay @confirm="confirm" @cancel="cancel"></up-modal>
|
2024-06-01 15:04:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
<script setup>
|
2024-06-05 16:57:58 +08:00
|
|
|
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
|
2024-06-01 15:04:14 +08:00
|
|
|
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
2024-06-05 16:57:58 +08:00
|
|
|
|
import { ref, reactive, getCurrentInstance,toRefs } from 'vue'
|
2024-06-01 15:04:14 +08:00
|
|
|
|
import { useStore } from 'vuex';
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const iconConfig = proxy.iconConfig;
|
|
|
|
|
const tu21 = iconConfig.tu21;
|
|
|
|
|
const tu22 = iconConfig.tu22;
|
|
|
|
|
const tu51 = iconConfig.tu51;
|
|
|
|
|
const tu52 = iconConfig.tu52;
|
|
|
|
|
const tu53 = iconConfig.tu53;
|
2024-06-05 16:57:58 +08:00
|
|
|
|
const style = ref({
|
|
|
|
|
p: 'font-weight: 400;font-size: 24rpx;color: #000000 !important;',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
2024-06-02 11:10:25 +08:00
|
|
|
|
const open = ref(false)
|
2024-06-05 16:57:58 +08:00
|
|
|
|
const title = ref('确认签到');
|
|
|
|
|
const content = ref('请您确认活动签到,祝您玩的愉快!');
|
2024-06-01 15:04:14 +08:00
|
|
|
|
// 创建响应式数据 ref('#001f3f')
|
|
|
|
|
const bgColor = ref('');
|
|
|
|
|
|
2024-06-05 16:57:58 +08:00
|
|
|
|
|
2024-06-01 15:04:14 +08:00
|
|
|
|
const store = useStore()
|
|
|
|
|
const QNDomain = store.state.user.QNDomain
|
2024-06-05 16:57:58 +08:00
|
|
|
|
const actiInfoList = ref({});
|
2024-06-01 15:04:14 +08:00
|
|
|
|
onLoad((options) => {
|
2024-06-05 16:57:58 +08:00
|
|
|
|
const _id = options.id
|
|
|
|
|
getInfo(_id).then(response => {
|
|
|
|
|
actiInfoList.value = response.data;
|
|
|
|
|
console.log("actiInfoList:",actiInfoList.value);
|
|
|
|
|
});
|
2024-06-01 15:04:14 +08:00
|
|
|
|
})
|
|
|
|
|
const leftClick = () => {
|
|
|
|
|
proxy.$tab.navigateBack(1)
|
|
|
|
|
}
|
2024-06-05 16:57:58 +08:00
|
|
|
|
const qrcodeInfo = ref()
|
2024-06-02 11:10:25 +08:00
|
|
|
|
const btnClick = () => {
|
2024-06-05 16:57:58 +08:00
|
|
|
|
uni.scanCode({
|
|
|
|
|
onlyFromCamera: true,
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.log('扫描二维码成功,结果:',res);
|
|
|
|
|
|
|
|
|
|
toqrcode(res);
|
|
|
|
|
open.value = !open.value
|
|
|
|
|
},
|
|
|
|
|
error: (res) => {
|
|
|
|
|
console.log('扫描二维码出现错误')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const toimage = (url) => {
|
|
|
|
|
console.log(QNDomain);
|
|
|
|
|
if (typeof url === 'string') {
|
|
|
|
|
let info = url.split(",");
|
|
|
|
|
// 使用map方法处理每个元素,给每个元素增加domainName前缀
|
|
|
|
|
let processedInfo = info.map(item => QNDomain + item);
|
|
|
|
|
console.log("processedInfo", processedInfo);
|
|
|
|
|
// 使用join方法将数组转换成字符串,这里使用逗号作为分隔符
|
|
|
|
|
return processedInfo;
|
|
|
|
|
}
|
|
|
|
|
return null; // 或者其他默认值
|
|
|
|
|
}
|
|
|
|
|
const toqrcode = (e) => {
|
|
|
|
|
qrcodeInfo.value = JSON.parse(e.result)
|
|
|
|
|
console.log("信息:",qrcodeInfo.value);
|
2024-06-02 11:10:25 +08:00
|
|
|
|
}
|
|
|
|
|
//模态框确认按钮
|
2024-06-05 16:57:58 +08:00
|
|
|
|
function confirm() {
|
2024-06-02 11:10:25 +08:00
|
|
|
|
open.value = !open.value
|
|
|
|
|
}
|
|
|
|
|
//模态框取消按钮
|
2024-06-05 16:57:58 +08:00
|
|
|
|
function cancel() {
|
2024-06-02 11:10:25 +08:00
|
|
|
|
open.value = !open.value
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-01 15:04:14 +08:00
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.navbarcenter {
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
width: 148rpx;
|
|
|
|
|
height: 37rpx;
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.avtivityInfo {
|
|
|
|
|
width: 686rpx;
|
|
|
|
|
margin: 44rpx auto;
|
|
|
|
|
|
|
|
|
|
.cards {
|
|
|
|
|
.title {
|
|
|
|
|
font-weight: 400 !important;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: #000000 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.time {
|
|
|
|
|
margin-top: 28rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: #999999 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.addrs {
|
|
|
|
|
margin-top: 12rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: #999999 !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cardz {
|
|
|
|
|
margin-top: 48rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
width: 674rpx;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: #000000 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cardx {
|
|
|
|
|
|
|
|
|
|
.image {
|
|
|
|
|
width: 686rpx;
|
|
|
|
|
height: 720rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dictAuto {
|
|
|
|
|
margin: 4rpx auto;
|
2024-06-01 20:10:34 +08:00
|
|
|
|
margin-bottom: 400rpx;
|
2024-06-05 16:57:58 +08:00
|
|
|
|
|
2024-06-01 15:04:14 +08:00
|
|
|
|
.state1 {
|
|
|
|
|
width: 686rpx;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
|
|
|
|
.btnText {
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
width: 120rpx;
|
2024-06-05 16:57:58 +08:00
|
|
|
|
font-size: 30rpx;
|
2024-06-01 15:04:14 +08:00
|
|
|
|
color: #00CCBE !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.infox {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
padding-left: 32rpx;
|
|
|
|
|
padding-right: 32rpx;
|
2024-06-05 16:57:58 +08:00
|
|
|
|
position: fixed;
|
|
|
|
|
/* 固定位置 */
|
|
|
|
|
left: 0;
|
|
|
|
|
/* 左对齐 */
|
|
|
|
|
right: 0;
|
|
|
|
|
/* 右对齐 */
|
|
|
|
|
bottom: 68rpx;
|
|
|
|
|
/* 底部对齐 */
|
|
|
|
|
border-top: 1px solid #ccc;
|
|
|
|
|
/* 上边框 */
|
|
|
|
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */
|
|
|
|
|
z-index: 10;
|
2024-06-01 15:04:14 +08:00
|
|
|
|
}
|
2024-06-05 16:57:58 +08:00
|
|
|
|
|
|
|
|
|
.infox2 {
|
|
|
|
|
position: fixed;
|
|
|
|
|
/* 固定位置 */
|
|
|
|
|
left: 0;
|
|
|
|
|
/* 左对齐 */
|
|
|
|
|
right: 0;
|
|
|
|
|
/* 右对齐 */
|
|
|
|
|
bottom: 0;
|
|
|
|
|
/* 底部对齐 */
|
2024-06-01 15:04:14 +08:00
|
|
|
|
height: 68rpx;
|
|
|
|
|
width: 100%;
|
|
|
|
|
background-color: #f6f6f6;
|
2024-06-05 16:57:58 +08:00
|
|
|
|
z-index: 10002;
|
|
|
|
|
/* 确保在最上层 */
|
2024-06-01 15:04:14 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|