增加一些活动参与人头像查询接口
parent
ad6dfb3904
commit
8c26b4787e
|
@ -16,7 +16,14 @@ export function getInfo(id) {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
getInfoall
|
||||
// 查询活动详情详细 所有额外信息
|
||||
export function getInfoall(id) {
|
||||
return request({
|
||||
url: '/activityInfo/info/app/all/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 新增活动详情
|
||||
export function addInfo(data) {
|
||||
return request({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// 应用全局配置
|
||||
export default {
|
||||
qnDomain: 'http://sdcwwvrwz.hn-bkt.clouddn.com/',
|
||||
qnDomain: 'http://seueton5q.hn-bkt.clouddn.com/',
|
||||
uploadQiNiuDomain: 'https://upload-z2.qiniup.com',
|
||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||
// baseUrl: 'http://47.93.242.168:8080',
|
||||
|
|
|
@ -298,7 +298,7 @@
|
|||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
|
|
|
@ -183,11 +183,12 @@ const goSing = (e) => {
|
|||
//简单刷新一下数据
|
||||
checkStatus(actiInfoList.value.id);
|
||||
}
|
||||
const goQrcode = () => {
|
||||
const goQrcode = (e) => {
|
||||
console.log("saoma");
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: (res) => {
|
||||
console.log('扫描二维码成功,结果:', res);
|
||||
console.log('扫描二维码成功,结果:', res.result);
|
||||
toqrcode(res);
|
||||
|
||||
},
|
||||
|
@ -210,6 +211,7 @@ function confirm() {
|
|||
}
|
||||
const toqrcode = (e) => {
|
||||
qrcodeInfo.value = JSON.parse(e.result);
|
||||
console.log("数据结果:",qrcodeInfo.value);
|
||||
if (actiInfoList.value.id !== qrcodeInfo.value.id) {
|
||||
proxy.$modal.msgError('二维码不匹配!')
|
||||
return;
|
||||
|
|
|
@ -196,17 +196,14 @@ const toInfo = (item) => {
|
|||
}
|
||||
//删除分页信息
|
||||
const removePage = () => {
|
||||
queryParams.pageNum = 1
|
||||
queryParams.pageNum = 5
|
||||
queryParams.value.pageNum = 1
|
||||
queryParams.value.pageSize = 5
|
||||
}
|
||||
const activityState = ref()
|
||||
onLoad((options) => {
|
||||
getDicts('activity_state').then(e => {
|
||||
activityState.value = e.data
|
||||
|
||||
console.log(e);
|
||||
activityState.value = e.data;
|
||||
})
|
||||
console.log("options:", options);
|
||||
reset()
|
||||
getListBytype(options.type)
|
||||
})
|
||||
|
@ -225,12 +222,12 @@ const getListBytype = (type) => {
|
|||
}
|
||||
// 下拉刷新
|
||||
onPullDownRefresh((options) => {
|
||||
console.log("下拉刷新,", options);
|
||||
removePage()
|
||||
|
||||
removePage();
|
||||
console.log("下拉刷新,", queryParams.value);
|
||||
getList();
|
||||
})
|
||||
const tabsClick = (index) => {
|
||||
console.log("index:", index);
|
||||
removePage()
|
||||
if (index.state == 9) {
|
||||
queryParams.value.auditStatus = null;
|
||||
|
@ -245,7 +242,6 @@ const getList = () => {
|
|||
getmelistInfo(queryParams.value)
|
||||
.then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
console.log("res:", res);
|
||||
total.value = res.total
|
||||
modelValue.value = res.rows
|
||||
})
|
||||
|
|
|
@ -25,37 +25,64 @@
|
|||
</view>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
<view style="width: 100%; height: 400rpx;"></view>
|
||||
|
||||
</view>
|
||||
<view class="infox">
|
||||
<view class="infoavatar">
|
||||
<up-avatar size="60rpx" :src="QNDomain + actiInfoList.avatarInfo" />
|
||||
<view style="margin-left: 24rpx;">
|
||||
<view class="launchName">{{ actiInfoList.nickName }}</view>
|
||||
<view class="launchAddres">{{ actiInfoList.infoSchool }}</view>
|
||||
<view v-if=" actiInfoList.auditStatus == 0">
|
||||
<view class="infox1" v-if="actiInfoList.state == '1'">
|
||||
<view>
|
||||
<view v-if="dataopen">
|
||||
<up-avatar-group :urls="participation(participationInfo.elrollAvatars)" size="30"
|
||||
gap="0.4"></up-avatar-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="elroll">已报名:{{ actiInfoList.elroll }}人</view>
|
||||
</view>
|
||||
<view class="infox2">
|
||||
<up-modal :show="open" :title="title" width="600rpx" :content='content' confirmText="签到" cancelText="取消"
|
||||
confirmColor="#3477FC" showCancelButton closeOnClickOverlay @confirm="confirm" @cancel="cancel"></up-modal>
|
||||
|
||||
<view class="infox2" v-else>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
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 { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, getCurrentInstance, toRefs, computed } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
const showqr = ref(false)
|
||||
const { proxy } = getCurrentInstance();
|
||||
const iconConfig = proxy.iconConfig;
|
||||
const style = ref({
|
||||
|
@ -72,7 +99,19 @@ const QNDomain = store.state.user.QNDomain;
|
|||
const actiInfoList = ref({});
|
||||
const activityAttendInfo = 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() {
|
||||
return QNDomain + actiInfoList.value.avatarInfo;
|
||||
}
|
||||
|
@ -80,18 +119,17 @@ function getAvatar() {
|
|||
function basetoimg(e) {
|
||||
return "data:image/png;base64," + e
|
||||
}
|
||||
function isHTML(str) {
|
||||
const htmlRegex = /<[^>]*>/;
|
||||
return htmlRegex.test(str);
|
||||
}
|
||||
const textopen = ref(false)
|
||||
onLoad((options) => {
|
||||
const _id = options.id;
|
||||
getInfo(_id).then(response => {
|
||||
actiInfoList.value = response.data;
|
||||
textopen.value = isHTML(actiInfoList.value.acContent);
|
||||
console.log("actiInfoList:", actiInfoList.value);
|
||||
});
|
||||
getInfoall(_id).then(e => {
|
||||
participationInfo.value = e.data
|
||||
dataopen.value = true;
|
||||
console.log("参与人信息:",e);
|
||||
})
|
||||
getDicts('activity_state').then(e => {
|
||||
activityState.value = e.data;
|
||||
});
|
||||
|
@ -255,11 +293,11 @@ page {
|
|||
|
||||
|
||||
|
||||
.infox {
|
||||
.infox1 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 88rpx;
|
||||
height: 74rpx;
|
||||
padding-left: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
position: fixed;
|
||||
|
@ -276,29 +314,49 @@ page {
|
|||
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */
|
||||
z-index: 10;
|
||||
|
||||
.infoavatar {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
|
||||
.launchName {
|
||||
font-size: 26rpx;
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
.launchAddres {
|
||||
|
||||
font-size: 24rpx;
|
||||
color: #999999 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.elroll {
|
||||
margin-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.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;
|
||||
/* 固定位置 */
|
||||
left: 0;
|
||||
|
@ -306,12 +364,6 @@ page {
|
|||
right: 0;
|
||||
/* 右对齐 */
|
||||
bottom: 0;
|
||||
/* 底部对齐 */
|
||||
height: 68rpx;
|
||||
width: 100%;
|
||||
background-color: #f6f6f6;
|
||||
z-index: 10002;
|
||||
/* 确保在最上层 */
|
||||
}
|
||||
|
||||
.acContentstyle {
|
||||
|
@ -334,4 +386,10 @@ page {
|
|||
}
|
||||
|
||||
}
|
||||
.warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue