增加一些活动参与人头像查询接口

main
26947 2024-06-10 16:12:11 +08:00
parent ad6dfb3904
commit 8c26b4787e
6 changed files with 121 additions and 58 deletions

View File

@ -16,7 +16,14 @@ export function getInfo(id) {
method: 'get' method: 'get'
}) })
} }
getInfoall
// 查询活动详情详细 所有额外信息
export function getInfoall(id) {
return request({
url: '/activityInfo/info/app/all/' + id,
method: 'get'
})
}
// 新增活动详情 // 新增活动详情
export function addInfo(data) { export function addInfo(data) {
return request({ return request({

View File

@ -1,6 +1,6 @@
// 应用全局配置 // 应用全局配置
export default { export default {
qnDomain: 'http://sdcwwvrwz.hn-bkt.clouddn.com/', qnDomain: 'http://seueton5q.hn-bkt.clouddn.com/',
uploadQiNiuDomain: 'https://upload-z2.qiniup.com', uploadQiNiuDomain: 'https://upload-z2.qiniup.com',
// baseUrl: 'https://vue.ruoyi.vip/prod-api', // baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://47.93.242.168:8080', // baseUrl: 'http://47.93.242.168:8080',

View File

@ -298,7 +298,7 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, }
], ],
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",

View File

@ -183,11 +183,12 @@ const goSing = (e) => {
// //
checkStatus(actiInfoList.value.id); checkStatus(actiInfoList.value.id);
} }
const goQrcode = () => { const goQrcode = (e) => {
console.log("saoma");
uni.scanCode({ uni.scanCode({
onlyFromCamera: true, onlyFromCamera: true,
success: (res) => { success: (res) => {
console.log('扫描二维码成功,结果:', res); console.log('扫描二维码成功,结果:', res.result);
toqrcode(res); toqrcode(res);
}, },
@ -210,6 +211,7 @@ function confirm() {
} }
const toqrcode = (e) => { const toqrcode = (e) => {
qrcodeInfo.value = JSON.parse(e.result); qrcodeInfo.value = JSON.parse(e.result);
console.log("数据结果:",qrcodeInfo.value);
if (actiInfoList.value.id !== qrcodeInfo.value.id) { if (actiInfoList.value.id !== qrcodeInfo.value.id) {
proxy.$modal.msgError('二维码不匹配!') proxy.$modal.msgError('二维码不匹配!')
return; return;

View File

@ -196,17 +196,14 @@ const toInfo = (item) => {
} }
// //
const removePage = () => { const removePage = () => {
queryParams.pageNum = 1 queryParams.value.pageNum = 1
queryParams.pageNum = 5 queryParams.value.pageSize = 5
} }
const activityState = ref() const activityState = ref()
onLoad((options) => { onLoad((options) => {
getDicts('activity_state').then(e => { getDicts('activity_state').then(e => {
activityState.value = e.data activityState.value = e.data;
console.log(e);
}) })
console.log("options:", options);
reset() reset()
getListBytype(options.type) getListBytype(options.type)
}) })
@ -225,12 +222,12 @@ const getListBytype = (type) => {
} }
// //
onPullDownRefresh((options) => { onPullDownRefresh((options) => {
console.log("下拉刷新,", options);
removePage() removePage();
console.log("下拉刷新,", queryParams.value);
getList(); getList();
}) })
const tabsClick = (index) => { const tabsClick = (index) => {
console.log("index:", index);
removePage() removePage()
if (index.state == 9) { if (index.state == 9) {
queryParams.value.auditStatus = null; queryParams.value.auditStatus = null;
@ -245,7 +242,6 @@ const getList = () => {
getmelistInfo(queryParams.value) getmelistInfo(queryParams.value)
.then(res => { .then(res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
console.log("res:", res);
total.value = res.total total.value = res.total
modelValue.value = res.rows modelValue.value = res.rows
}) })

View File

@ -25,37 +25,64 @@
</view> </view>
</view> </view>
<view class="qrcode" v-if="actiInfoList.state == '2'"> <view class="qrcode" v-if="actiInfoList.state == '2'">
<image :src="basetoimg(actiInfoList.acQrcode)" style="width: 200rpx; height: 200rpx;"></image> <image :src="basetoimg(actiInfoList.acQrcode)" style="width: 200rpx; height: 200rpx;"
@click="showqr = true"></image>
<view class="text">签到二维码</view> <view class="text">签到二维码</view>
</view> </view>
<view style="width: 100%; height: 400rpx;"></view> <view style="width: 100%; height: 400rpx;"></view>
</view> </view>
<view class="infox"> <view v-if=" actiInfoList.auditStatus == 0">
<view class="infoavatar"> <view class="infox1" v-if="actiInfoList.state == '1'">
<up-avatar size="60rpx" :src="QNDomain + actiInfoList.avatarInfo" /> <view>
<view style="margin-left: 24rpx;"> <view v-if="dataopen">
<view class="launchName">{{ actiInfoList.nickName }}</view> <up-avatar-group :urls="participation(participationInfo.elrollAvatars)" size="30"
<view class="launchAddres">{{ actiInfoList.infoSchool }}</view> gap="0.4"></up-avatar-group>
</view> </view>
</view> </view>
<view class="elroll">已报名{{ actiInfoList.elroll }}</view> <view class="elroll">已报名{{ actiInfoList.elroll }}</view>
</view> </view>
<view class="infox2">
<up-modal :show="open" :title="title" width="600rpx" :content='content' confirmText="签到" cancelText="取消" <view class="infox2" v-else>
confirmColor="#3477FC" showCancelButton closeOnClickOverlay @confirm="confirm" @cancel="cancel"></up-modal> <view class="flex justifyCenter alignCenter">
<view v-if="dataopen">
<up-avatar-group :urls="participation(participationInfo.elrollAvatars)" size="30"
gap="0.4"></up-avatar-group>
</view>
<view class="elroll">已报名{{ actiInfoList.elroll }}</view>
</view>
<view v-if="actiInfoList.state != '1'" class="flex justifyCenter alignCenter">
<view v-if="dataopen">
<up-avatar-group :urls="participation(participationInfo.qrcodeElrollAvatars)" size="30"
gap="0.4"></up-avatar-group>
</view>
<view class="elroll">已签到{{ actiInfoList.qrcodeElroll }}</view>
</view>
</view>
</view>
<view class="infox3"></view>
<view>
<up-overlay :show="showqr" @click="showqr = false">
<view class="warp">
<image class="rect" @tap.stop :src="basetoimg(actiInfoList.acQrcode)"
style="width: 600rpx; height: 600rpx"></image>
</view>
</up-overlay>
</view> </view>
</template> </template>
<script setup> <script setup>
import { getTakePartsInfoByacId, gotoQrcode, gotoSing1, gotoSing2 } from "@/api/activityInfo/activityTakeInfo"; import { getTakePartsInfoByacId, gotoQrcode, gotoSing1, gotoSing2 } from "@/api/activityInfo/activityTakeInfo";
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info"; import { listInfo, getInfo, getInfoall,delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
import { onShow, onLoad } from '@dcloudio/uni-app'; import { onShow, onLoad } from '@dcloudio/uni-app';
import { ref, reactive, getCurrentInstance, toRefs, computed } from 'vue'; import { ref, reactive, getCurrentInstance, toRefs, computed } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
const showqr = ref(false)
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
const style = ref({ const style = ref({
@ -72,7 +99,19 @@ const QNDomain = store.state.user.QNDomain;
const actiInfoList = ref({}); const actiInfoList = ref({});
const activityAttendInfo = ref({}); const activityAttendInfo = ref({});
const qrcodeInfo = ref(); const qrcodeInfo = ref();
//
const dataopen = ref(false)
const urls1 = reactive([])
const participationInfo = ref([])
const participation = (data) => {
//
const limit = actiInfoList.state === '1' ? 6 : 4;
// limit
const limitedData = data.slice(0, limit);
//
const refObjects = limitedData.map(item => (QNDomain + item.avatar));
return refObjects;
}
function getAvatar() { function getAvatar() {
return QNDomain + actiInfoList.value.avatarInfo; return QNDomain + actiInfoList.value.avatarInfo;
} }
@ -80,18 +119,17 @@ function getAvatar() {
function basetoimg(e) { function basetoimg(e) {
return "data:image/png;base64," + e return "data:image/png;base64," + e
} }
function isHTML(str) {
const htmlRegex = /<[^>]*>/;
return htmlRegex.test(str);
}
const textopen = ref(false)
onLoad((options) => { onLoad((options) => {
const _id = options.id; const _id = options.id;
getInfo(_id).then(response => { getInfo(_id).then(response => {
actiInfoList.value = response.data; actiInfoList.value = response.data;
textopen.value = isHTML(actiInfoList.value.acContent);
console.log("actiInfoList:", actiInfoList.value); console.log("actiInfoList:", actiInfoList.value);
}); });
getInfoall(_id).then(e => {
participationInfo.value = e.data
dataopen.value = true;
console.log("参与人信息:",e);
})
getDicts('activity_state').then(e => { getDicts('activity_state').then(e => {
activityState.value = e.data; activityState.value = e.data;
}); });
@ -255,11 +293,11 @@ page {
.infox { .infox1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 88rpx; height: 74rpx;
padding-left: 32rpx; padding-left: 32rpx;
padding-right: 32rpx; padding-right: 32rpx;
position: fixed; position: fixed;
@ -276,29 +314,49 @@ page {
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */ /* 背景色设置为白色,防止透明背景导致内容重叠可见 */
z-index: 10; z-index: 10;
.infoavatar {
display: flex;
height: 60rpx;
.launchName {
font-size: 26rpx;
color: #000000 !important;
}
.launchAddres {
font-size: 24rpx;
color: #999999 !important;
}
}
.elroll { .elroll {
margin-left: 10rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999 !important; color: #999999 !important;
} }
} }
.infox2 { .infox2 {
display: flex;
justify-content: space-between;
align-items: center;
height: 74rpx;
padding-left: 32rpx;
padding-right: 32rpx;
position: fixed;
/* 固定位置 */
left: 0;
/* 左对齐 */
right: 0;
/* 右对齐 */
bottom: 68rpx;
/* 底部对齐 */
border-top: 1px solid #ccc;
/* 上边框 */
background-color: white;
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */
z-index: 10;
.elroll {
margin-left: 10rpx;
font-size: 24rpx;
color: #999999 !important;
}
}
.infox3{
width: 100%;
height: 68rpx;
background-color: #F6F6F6;
position: fixed; position: fixed;
/* 固定位置 */ /* 固定位置 */
left: 0; left: 0;
@ -306,12 +364,6 @@ page {
right: 0; right: 0;
/* 右对齐 */ /* 右对齐 */
bottom: 0; bottom: 0;
/* 底部对齐 */
height: 68rpx;
width: 100%;
background-color: #f6f6f6;
z-index: 10002;
/* 确保在最上层 */
} }
.acContentstyle { .acContentstyle {
@ -334,4 +386,10 @@ page {
} }
} }
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style> </style>