活动管理完成列表页面简单联调
parent
cd4c17d3ee
commit
2215204170
|
@ -0,0 +1,51 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询活动参与表列表
|
||||||
|
export function listActivityTakeInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/activityInfo/activityTakeInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询活动参与表详细
|
||||||
|
export function getActivityTakeInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/activityInfo/activityTakeInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询活动参与表详细
|
||||||
|
export function getTakePartsInfoByacId(id) {
|
||||||
|
return request({
|
||||||
|
url: '/activityInfo/activityTakeInfo/ByacId/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增活动参与表
|
||||||
|
export function addActivityTakeInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/activityInfo/activityTakeInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改活动参与表
|
||||||
|
export function updateActivityTakeInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/activityInfo/activityTakeInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除活动参与表
|
||||||
|
export function delActivityTakeInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/activityInfo/activityTakeInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
20
pages.json
20
pages.json
|
@ -7,7 +7,16 @@
|
||||||
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
|
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages": [{
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "pages/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "若依移动端框架",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"path": "pages/signln/harvestaddress",
|
"path": "pages/signln/harvestaddress",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "收货地址",
|
"navigationBarTitleText": "收货地址",
|
||||||
|
@ -28,14 +37,7 @@
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "若依移动端框架",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"navigationBarTextStyle": "white"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/signln/signid",
|
"path": "pages/signln/signid",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -19,26 +19,48 @@
|
||||||
<view class="cardz">
|
<view class="cardz">
|
||||||
<up-parse :content="actiInfoList.acContent" :tagStyle="style"></up-parse>
|
<up-parse :content="actiInfoList.acContent" :tagStyle="style"></up-parse>
|
||||||
</view>
|
</view>
|
||||||
<view class="cardx" v-for="(item,index) in toimage(actiInfoList.file)" :key="index">
|
<view class="cardx" v-for="(item, index) in toimage(actiInfoList.file)" :key="index">
|
||||||
<image :src="item" class="image"></image>
|
<image :src="item" class="image"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dictAuto">
|
<view class="dictAuto">
|
||||||
|
<view v-if="actiInfoList.state === '0'">
|
||||||
<view class="state1">
|
<view class="state3" v-if="activityAttendInfo.attendState === '0' | activityAttendInfo.attendState === '1' " >
|
||||||
<up-button color="#c0f0ec" size="large" shape="circle" @click="btnClick"><span
|
<up-button color="#F1F1F1" size="large" shape="circle"><span class="btnText">未参加</span></up-button>
|
||||||
class="btnText">立即报名</span></up-button>
|
</view>
|
||||||
|
<view class="state3" v-else-if="activityAttendInfo.attendState === '2' " >
|
||||||
|
<up-button color="#F1F1F1" size="large" shape="circle"><span class="btnText">已参加</span></up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else-if="actiInfoList.state === '2'">
|
||||||
|
<view class="state1" v-if="activityAttendInfo.attendState === '0'">
|
||||||
|
<up-button color="#C0F0EC" size="large" shape="circle"><span class="btnText">立即报名</span></up-button>
|
||||||
|
</view>
|
||||||
|
<view class="state2" v-else-if="activityAttendInfo.attendState === '1'">
|
||||||
|
<up-button color="#FDE2E2" size="large" shape="circle"><span class="btnText">扫码签到</span></up-button>
|
||||||
|
</view>
|
||||||
|
<view class="state2" v-else-if="activityAttendInfo.attendState === '2'">
|
||||||
|
<up-button color="#FDE2E2" size="large" shape="circle"><span class="btnText">已签到</span></up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else-if="actiInfoList.state === '1'">
|
||||||
|
<view class="state1" v-if="activityAttendInfo.attendState === '0'">
|
||||||
|
<up-button color="#C0F0EC" size="large" shape="circle"><span class="btnText">立即报名</span></up-button>
|
||||||
|
</view>
|
||||||
|
<view class="state1" v-else-if="activityAttendInfo.attendState === '1'">
|
||||||
|
<up-button color="#C0F0EC" size="large" shape="circle"><span class="btnText">取消报名</span></up-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infox">
|
<view class="infox">
|
||||||
<view class="infoavatar">
|
<view class="infoavatar">
|
||||||
<up-avatar size="60rpx" :src="QNDomain+actiInfoList.avatarInfo"/>
|
<up-avatar size="60rpx" :src="QNDomain + actiInfoList.avatarInfo" />
|
||||||
<view style="margin-left: 24rpx;">
|
<view style="margin-left: 24rpx;">
|
||||||
<view class="launchName">{{ actiInfoList.nickName }}</view>
|
<view class="launchName">{{ actiInfoList.nickName }}</view>
|
||||||
<view class="launchAddres">{{ actiInfoList.infoSchool }}</view>
|
<view class="launchAddres">{{ actiInfoList.infoSchool }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="elroll">已报名:{{ actiInfoList.elroll }}人</view>
|
<view class="elroll">已报名:{{ actiInfoList.elroll }}人</view>
|
||||||
|
@ -50,11 +72,15 @@
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { getTakePartsInfoByacId, getActivityTakeInfo, delActivityTakeInfo, addActivityTakeInfo, updateActivityTakeInfo } from "@/api/activityInfo/activityTakeInfo";
|
||||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
|
import { listInfo, getInfo, 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 } from 'vue'
|
import { ref, reactive, getCurrentInstance, toRefs, computed } from 'vue'
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const iconConfig = proxy.iconConfig;
|
const iconConfig = proxy.iconConfig;
|
||||||
const tu21 = iconConfig.tu21;
|
const tu21 = iconConfig.tu21;
|
||||||
|
@ -65,9 +91,10 @@ const tu53 = iconConfig.tu53;
|
||||||
const style = ref({
|
const style = ref({
|
||||||
p: 'font-weight: 400;font-size: 24rpx;color: #000000 !important;',
|
p: 'font-weight: 400;font-size: 24rpx;color: #000000 !important;',
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
const activityState = ref([])//字典
|
const activityState = ref([])//字典 activity_state 活动状态
|
||||||
|
const takePartState = ref([])//字典 take_part_state 活动参与状态
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
const title = ref('确认签到');
|
const title = ref('确认签到');
|
||||||
const content = ref('请您确认活动签到,祝您玩的愉快!');
|
const content = ref('请您确认活动签到,祝您玩的愉快!');
|
||||||
|
@ -78,21 +105,32 @@ const bgColor = ref('');
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const QNDomain = store.state.user.QNDomain
|
const QNDomain = store.state.user.QNDomain
|
||||||
const actiInfoList = ref({});
|
const actiInfoList = ref({});
|
||||||
function getAvatar (){
|
function getAvatar() {
|
||||||
console.log("头像:",QNDomain + actiInfoList.value.avatarInfo)
|
return QNDomain + actiInfoList.value.avatarInfo
|
||||||
return QNDomain + actiInfoList.value.avatarInfo
|
|
||||||
}
|
}
|
||||||
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;
|
||||||
console.log("actiInfoList:",actiInfoList.value);
|
console.log("actiInfoList:", actiInfoList.value);
|
||||||
});
|
});
|
||||||
getDicts('activity_state').then(e => {
|
getDicts('activity_state').then(e => {
|
||||||
activityState.value = e.data
|
activityState.value = e.data
|
||||||
})
|
})
|
||||||
|
getDicts('take_part_state').then(e => {
|
||||||
|
takePartState.value = e.data
|
||||||
|
})
|
||||||
|
checkStatus(options.id);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const activityAttendInfo = ref({})
|
||||||
|
const checkStatus = (id) => {
|
||||||
|
getTakePartsInfoByacId(id).then(e => {
|
||||||
|
console.log("数据:", e);
|
||||||
|
activityAttendInfo.value = e.data;
|
||||||
|
})
|
||||||
|
}
|
||||||
const leftClick = () => {
|
const leftClick = () => {
|
||||||
proxy.$tab.navigateBack(1)
|
proxy.$tab.navigateBack(1)
|
||||||
}
|
}
|
||||||
|
@ -101,8 +139,8 @@ const btnClick = () => {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
onlyFromCamera: true,
|
onlyFromCamera: true,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('扫描二维码成功,结果:',res);
|
console.log('扫描二维码成功,结果:', res);
|
||||||
|
|
||||||
toqrcode(res);
|
toqrcode(res);
|
||||||
open.value = !open.value
|
open.value = !open.value
|
||||||
},
|
},
|
||||||
|
@ -110,22 +148,22 @@ const btnClick = () => {
|
||||||
console.log('扫描二维码出现错误')
|
console.log('扫描二维码出现错误')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const toimage = (url) => {
|
const toimage = (url) => {
|
||||||
if (typeof url === 'string') {
|
if (typeof url === 'string') {
|
||||||
let info = url.split(",");
|
let info = url.split(",");
|
||||||
// 使用map方法处理每个元素,给每个元素增加domainName前缀
|
// 使用map方法处理每个元素,给每个元素增加domainName前缀
|
||||||
let processedInfo = info.map(item => QNDomain + item);
|
let processedInfo = info.map(item => QNDomain + item);
|
||||||
console.log("processedInfo", processedInfo);
|
console.log("processedInfo", processedInfo);
|
||||||
// 使用join方法将数组转换成字符串,这里使用逗号作为分隔符
|
// 使用join方法将数组转换成字符串,这里使用逗号作为分隔符
|
||||||
return processedInfo;
|
return processedInfo;
|
||||||
}
|
}
|
||||||
return null; // 或者其他默认值
|
return null; // 或者其他默认值
|
||||||
}
|
}
|
||||||
const toqrcode = (e) => {
|
const toqrcode = (e) => {
|
||||||
qrcodeInfo.value = JSON.parse(e.result)
|
qrcodeInfo.value = JSON.parse(e.result)
|
||||||
console.log("信息:",qrcodeInfo.value);
|
console.log("信息:", qrcodeInfo.value);
|
||||||
}
|
}
|
||||||
//模态框确认按钮
|
//模态框确认按钮
|
||||||
function confirm() {
|
function confirm() {
|
||||||
|
@ -216,6 +254,7 @@ const getDictLabelByValue = (state) => {
|
||||||
color: #00CCBE !important;
|
color: #00CCBE !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.state2 {
|
.state2 {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
@ -225,9 +264,10 @@ const getDictLabelByValue = (state) => {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #00CCBE !important;
|
color: #FFABAB !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.state3 {
|
.state3 {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
@ -237,7 +277,7 @@ const getDictLabelByValue = (state) => {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #00CCBE !important;
|
color: #7E7E7E !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,7 +303,8 @@ const getDictLabelByValue = (state) => {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */
|
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
.infoavatar{
|
|
||||||
|
.infoavatar {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue