活动列表页面联调

main
26947 2024-06-05 16:57:58 +08:00
parent c5483524a9
commit 06ff1dc23f
16 changed files with 797 additions and 142 deletions

44
api/activityInfo/info.js Normal file
View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询活动详情列表
export function listInfo(query) {
return request({
url: '/activityInfo/info/list',
method: 'get',
params: query
})
}
// 查询活动详情详细
export function getInfo(id) {
return request({
url: '/activityInfo/info/' + id,
method: 'get'
})
}
// 新增活动详情
export function addInfo(data) {
return request({
url: '/activityInfo/info',
method: 'post',
data: data
})
}
// 修改活动详情
export function updateInfo(data) {
return request({
url: '/activityInfo/info',
method: 'put',
data: data
})
}
// 删除活动详情
export function delInfo(id) {
return request({
url: '/activityInfo/info/' + id,
method: 'delete'
})
}

View File

@ -6,10 +6,16 @@ import './permission.js' // permission
import iconConfig from './utils/icon/icon.js' import iconConfig from './utils/icon/icon.js'
// main.js // main.js
import uviewPlus from 'uview-plus' import uviewPlus from 'uview-plus'
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
app.config.globalProperties.iconConfig = iconConfig app.config.globalProperties.iconConfig = iconConfig
app.config.globalProperties.parseTime = parseTime
app.config.globalProperties.resetForm = resetForm
app.config.globalProperties.handleTree = handleTree
app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.selectDictLabel = selectDictLabel
app.config.globalProperties.selectDictLabels = selectDictLabels
app.use(uviewPlus) app.use(uviewPlus)
app.use(store) app.use(store)

View File

@ -48,10 +48,11 @@
</view> </view>
</template> </template>
<script setup> <script setup>
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
import ActiInfoList from '../common/activityList/index.vue' import ActiInfoList from '../common/activityList/index.vue'
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { getDicts } from "@/api/system/dict/data" import { getDicts } from "@/api/system/dict/data"
import { ref, reactive, getCurrentInstance } from 'vue' import { ref, reactive, getCurrentInstance,toRefs } from 'vue'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
@ -60,7 +61,7 @@ const tu22 = iconConfig.tu22;
const tu51 = iconConfig.tu51; const tu51 = iconConfig.tu51;
const tu52 = iconConfig.tu52; const tu52 = iconConfig.tu52;
const tu53 = iconConfig.tu53; const tu53 = iconConfig.tu53;
const activityState = ref([])// const total = ref()
const imgInfo = ref("") const imgInfo = ref("")
// ref('#001f3f') // ref('#001f3f')
const bgColor = ref(''); const bgColor = ref('');
@ -72,48 +73,97 @@ const list4 = reactive([
{ name: '进行中' }, { name: '进行中' },
{ name: '已结束' } { name: '已结束' }
]); ]);
const actiInfoList = ref([ const actiInfoList = ref([]);
{ const data = reactive({
id: 1, form: {},
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', queryParams: {
startTime: '2023-05-01 15:00', pageNum: 1,
endTime: '2023-05-01 16:00', pageSize: 5,
state: '1', launchUserId: null,
addrs: '天津电子信息职业技术学院操场东面' accendCondition: null,
}, acName: null,
{ acTitle: null,
id: 2, acContent: null,
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', startTime: null,
startTime: '2023-05-01 15:00', endTime: null,
endTime: '2023-05-01 16:00', state: null,
state: '2', addres: null,
addrs: '天津电子信息职业技术学院操场东面' longitude: null,
}, latitude: null,
{ file: null,
id: 3, elroll: null,
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', acQrcode: null,
startTime: '2023-05-01 15:00', tab: null,
endTime: '2023-05-01 16:00', readCount: null,
state: '0', transmitCount: null,
addrs: '天津电子信息职业技术学院操场东面' likeCount: null,
} commentCount: null,
, favoriteCount: null,
{ postTop: null,
id: 4, type: null,
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', anonymity: null,
startTime: '2023-05-01 15:00', auditor: null,
endTime: '2023-05-01 16:00', auditStatus: null,
state: '0', auditTime: null,
addrs: '天津电子信息职业技术学院操场东面' auditAdvice: null,
} cut: null,
},
]); rules: {
auditStatus: [
{ required: true, message: "状态0正常1待脱敏 2待审核 3脱敏未通过 4 审核未通过 5草稿不能为空", trigger: "change" }
],
}
});
const { queryParams, form, rules } = toRefs(data);
//
function reset() {
form.value = {
id: null,
launchUserId: null,
accendCondition: null,
acName: null,
acTitle: null,
acContent: null,
startTime: null,
endTime: null,
state: null,
addres: null,
longitude: null,
latitude: null,
file: null,
elroll: null,
acQrcode: null,
tab: null,
readCount: null,
transmitCount: null,
likeCount: null,
commentCount: null,
favoriteCount: null,
postTop: null,
type: null,
anonymity: null,
createTime: null,
auditor: null,
auditStatus: null,
auditTime: null,
auditAdvice: null,
cut: null,
delFlag: null
};
proxy.resetForm("infoRef");
}
/** 查询活动详情列表 */
function getList() {
queryParams.value.params = {};
listInfo(queryParams.value).then(response => {
console.log(response);
actiInfoList.value = response.rows;
total.value = response.total;
});
}
onLoad((options) => { onLoad((options) => {
getDicts('activity_state').then(e => { getList();
activityState.value = e.data
console.log(activityState.value);
})
}) })
onShow(() => { onShow(() => {
@ -130,10 +180,7 @@ const scrolltolower = () => {
addrs: '天津电子信息职业技术学院操场东面' addrs: '天津电子信息职业技术学院操场东面'
}) })
}; };
const getDictLabelByValue = (state) => {
const dict = activityState.value.find((dict) => dict.dictValue === state);
return dict ? dict : '未知状态';
};
function toESearch() { function toESearch() {

View File

@ -12,13 +12,15 @@
<view class="avtivityInfo"> <view class="avtivityInfo">
<view> <view>
<view class="cards"> <view class="cards">
<view class="title"> {{ actiInfoList.title }}</view> <view class="title"> {{ actiInfoList.acTitle }}</view>
<view class="time">活动时间{{ actiInfoList.startTime }} - {{ actiInfoList.endTime }}</view> <view class="time">活动时间{{ actiInfoList.startTime }} - {{ actiInfoList.endTime }}</view>
<view class="addrs">活动地点{{ actiInfoList.addrs }}</view> <view class="addrs">活动地点{{ actiInfoList.addres }}</view>
</view> </view>
<view class="cardz">{{ actiInfoList.activityInfo }}</view> <view class="cardz">
<view class="cardx"> <up-parse :content="actiInfoList.acContent" :tagStyle="style"></up-parse>
<image :src="QNDomain + actiInfoList.url" class="image"></image> </view>
<view class="cardx" v-for="(item,index) in toimage(actiInfoList.file)" :key="index">
<image :src="item" class="image"></image>
</view> </view>
</view> </view>
</view> </view>
@ -40,21 +42,15 @@
<view class="elroll">已报名{{ actiInfoList.elroll }}</view> <view class="elroll">已报名{{ actiInfoList.elroll }}</view>
</view> </view>
<view class="infox2"> <view class="infox2">
<up-modal :show="open" :title="title" width="600rpx" <up-modal :show="open" :title="title" width="600rpx" :content='content' confirmText="签到" cancelText="取消"
:content='content' confirmText="签到" confirmColor="#3477FC" showCancelButton closeOnClickOverlay @confirm="confirm" @cancel="cancel"></up-modal>
cancelText="取消"
confirmColor="#3477FC"
showCancelButton
closeOnClickOverlay
@confirm="confirm"
@cancel="cancel"
></up-modal>
</view> </view>
</template> </template>
<script setup> <script setup>
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { ref, reactive, getCurrentInstance } from 'vue' import { ref, reactive, getCurrentInstance,toRefs } from 'vue'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
@ -63,45 +59,69 @@ const tu22 = iconConfig.tu22;
const tu51 = iconConfig.tu51; const tu51 = iconConfig.tu51;
const tu52 = iconConfig.tu52; const tu52 = iconConfig.tu52;
const tu53 = iconConfig.tu53; const tu53 = iconConfig.tu53;
const style = ref({
p: 'font-weight: 400;font-size: 24rpx;color: #000000 !important;',
})
const open = ref(false) const open = ref(false)
const title = ref('确认签到'); const title = ref('确认签到');
const content = ref('请您确认活动签到,祝您玩的愉快!'); const content = ref('请您确认活动签到,祝您玩的愉快!');
// ref('#001f3f') // ref('#001f3f')
const bgColor = ref(''); 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({});
{
title: '社团招新|广纳新人(文学社)',
startTime: '2024.06.01 12:00',
endTime: '2024.06.01 14:00',
state: '1',
addrs: '天津电子信息职业技术学院操场东面',
activityInfo: '社团招新是各大高校、社区或其他组织为了吸引新成员、注入新鲜血液而举办的活动。以下是社团招新的一些关键要点和通常的步骤1.确骤1.确定招新目标和需求:社团需要明确自己想要吸引什么样的新成员以及这些新成员能为社团带来什么。这有助于社团骤1.确定招新目标和需求:社团需要明确自己想要吸引什么样的新成员以及这些新成员能为社团带来什么。这有助于社团骤1.确定招新目标和需求:社团需要明确自己想要吸引什么样的新成员,以及这些新成员能为社团带来什么。这有助于社团定招新目标和需求:社团需要明确自己想要吸引什么样的新成员以及这些新成员能为社团带来什么。这有助于社团更有针对性地制定招新计划和策略。2.制定招新计划:包括招新时间、地点、方式等。例如可以在新生入学时举办招新活动卖或者在校园内的显眼位置设立招新摊位。3.宣传和推广:社团需要通过各种渠道进行宣传如校园广播、海报、社交媒体等以吸引潜在的新成员。宣传内容应突出社团的特色和优势让更多人了解和关注。4.举办招新活动:在招招新是各大高校、社区或其他组织为了吸引新成员、注入新鲜血液而举办的活动。以下是社团招新的一些关键要点和通常的步骤1.确定招新目标和需求:社团需要明确自己想要吸引什么样的新成员,新期间,社团可以组织各种有趣的活动,如现场表演、游戏互动、展览展示等,以展示社团的风采和实力,同时吸引更多人参与。',
url: 'home/test/image/png/45feb5093f71dbdbec7329ca1822da0_20240601133007403.png',
launchAvatarsurl: 'home/test/image/jpeg/test1_20240531151817921.jpg',
launchName: '爱吃饭的小张',
launchAddres: '天津电子信息职业技术学院',
elroll: '123'
}
);
onLoad((options) => { onLoad((options) => {
console.log("页面参数:", options.id); const _id = options.id
getInfo(_id).then(response => {
actiInfoList.value = response.data;
console.log("actiInfoList:",actiInfoList.value);
});
}) })
const leftClick = () => { const leftClick = () => {
proxy.$tab.navigateBack(1) proxy.$tab.navigateBack(1)
} }
const qrcodeInfo = ref()
const btnClick = () => { const btnClick = () => {
open.value = !open.value 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(",");
// 使mapdomainName
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);
} }
// //
function confirm () { function confirm() {
open.value = !open.value open.value = !open.value
} }
// //
function cancel () { function cancel() {
open.value = !open.value open.value = !open.value
} }
@ -169,6 +189,7 @@ function cancel () {
.dictAuto { .dictAuto {
margin: 4rpx auto; margin: 4rpx auto;
margin-bottom: 400rpx; margin-bottom: 400rpx;
.state1 { .state1 {
width: 686rpx; width: 686rpx;
height: 80rpx; height: 80rpx;
@ -177,7 +198,7 @@ function cancel () {
.btnText { .btnText {
font-weight: 400; font-weight: 400;
width: 120rpx; width: 120rpx;
font-size: 30rpx; font-size: 30rpx;
color: #00CCBE !important; color: #00CCBE !important;
} }
} }
@ -190,23 +211,35 @@ function cancel () {
height: 88rpx; height: 88rpx;
padding-left: 32rpx; padding-left: 32rpx;
padding-right: 32rpx; padding-right: 32rpx;
position: fixed; /* 固定位置 */ position: fixed;
left: 0; /* 左对齐 */ /* 固定位置 */
right: 0; /* 右对齐 */ left: 0;
bottom: 68rpx; /* 底部对齐 */ /* 左对齐 */
border-top: 1px solid #ccc; /* 上边框 */ right: 0;
/* 右对齐 */
bottom: 68rpx;
/* 底部对齐 */
border-top: 1px solid #ccc;
/* 上边框 */
background-color: white; /* 背景色设置为白色,防止透明背景导致内容重叠可见 */ background-color: white;
z-index: 10; /* 背景色设置为白色,防止透明背景导致内容重叠可见 */
z-index: 10;
} }
.infox2{
position: fixed; /* 固定位置 */ .infox2 {
left: 0; /* 左对齐 */ position: fixed;
right: 0; /* 右对齐 */ /* 固定位置 */
bottom: 0; /* 底部对齐 */ left: 0;
/* 左对齐 */
right: 0;
/* 右对齐 */
bottom: 0;
/* 底部对齐 */
height: 68rpx; height: 68rpx;
width: 100%; width: 100%;
background-color: #f6f6f6; background-color: #f6f6f6;
z-index: 10002; /* 确保在最上层 */ z-index: 10002;
/* 确保在最上层 */
} }
</style> </style>

View File

@ -24,36 +24,51 @@
placeholderStyle="color: #c0c0c0;font-size: 30rpx; background:none;"></up-textarea> placeholderStyle="color: #c0c0c0;font-size: 30rpx; background:none;"></up-textarea>
</view> </view>
<view class="cardzfile"> <view class="cardzfile">
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1"></fileUpload> <fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1" :limit="2"></fileUpload>
</view> </view>
</view> </view>
<view class="cardx"> <view class="cardx">
<up-cell-group :border="false"> <up-cell-group :border="false">
<up-cell :isLink="true" :center="true"> <up-cell :isLink="true" :center="true" @click="startTime">
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;"> <template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
<image :src="tu52" style="width: 30rpx; height: 32rpx;"></image> <image v-if="showtext1" :src="tu52" style="width: 30rpx; height: 32rpx;"></image>
<span>请选择活动开始时间</span> <image v-else :src="tu522" style="width: 30rpx; height: 32rpx;"></image>
<span v-if="showtext1" >请选择活动开始时间</span>
<span v-else class="text2">{{parseTime(StartTime, '{y}-{m}-{d} {h}:{i}:{s}')}}</span>
<up-datetime-picker :show="showStartTime" v-model="newData"
:modelValue="newData"
@confirm="confirm1"
@cancel="cancel"
mode="datetime"></up-datetime-picker>
</template> </template>
</up-cell> </up-cell>
<up-cell :isLink="true" :center="true"> <up-cell :isLink="true" :center="true" @click="showEndTime =!showEndTime ">
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;"> <template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
<image :src="tu53" style="width: 30rpx; height: 32rpx;"></image> <image v-if="showtext2" :src="tu53" style="width: 30rpx; height: 32rpx;"></image>
<span>请选择活动结束时间</span> <image v-else :src="tu532" style="width: 30rpx; height: 32rpx;"></image>
<span v-if="showtext2"></span>
<span v-else class="text2"> {{parseTime(EndTime, '{y}-{m}-{d} {h}:{i}:{s}')}}</span>
<up-datetime-picker :show="showEndTime" v-model="newData" @confirm="confirm2"
:modelValue="newData"
@cancel="cancel"
mode="datetime"></up-datetime-picker>
</template> </template>
</up-cell> </up-cell>
<up-cell :border="false" :isLink="true" :center="true"> <up-cell :border="false" :isLink="true" :center="true">
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;"> <template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
<image :src="tu51" style="width: 30rpx; height: 32rpx;"></image> <image v-if="showtext3" :src="tu51" style="width: 30rpx; height: 32rpx;"></image>
<image v-else :src="tu512" style="width: 30rpx; height: 32rpx;"></image>
<span>添加活动具体位置</span> <span>添加活动具体位置</span>
</template> </template>
</up-cell> </up-cell>
</up-cell-group> </up-cell-group>
</view> </view>
<view class="cardxx"> <view class="cardxx">
<up-button color="#C9F6F5" size="large" shape="circle" @click="publish"><span <up-button color="#C9F6F5" size="large" shape="circle" @click="publish"><span
class="fbText">发布</span></up-button> class="fbText">发布</span></up-button>
<view style="width: 26rpx;height: 80rpx;"></view> <view style="width: 26rpx;height: 80rpx;"></view>
<up-button color="#F8F8E3" size="large" shape="circle" @click="draft" style="margin-left: 26rpx;"><span <up-button color="#F8F8E3" size="large" shape="circle" @click="draft" style="margin-left: 26rpx;"><span
class="cgText">存草稿</span></up-button> class="cgText">存草稿</span></up-button>
</view> </view>
@ -61,20 +76,31 @@
<script setup> <script setup>
import fileUpload from '../common/file/fileUpload' import fileUpload from '../common/file/fileUpload'
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { ref, reactive, getCurrentInstance } from 'vue' import { ref, reactive, getCurrentInstance,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 tu51 = iconConfig.tu51; const tu51 = iconConfig.tu51;
const tu512 = iconConfig.tu512;
const tu52 = iconConfig.tu52; const tu52 = iconConfig.tu52;
const tu522 = iconConfig.tu522;
const tu53 = iconConfig.tu53; const tu53 = iconConfig.tu53;
const tu532 = iconConfig.tu532;
const title = ref('') const title = ref('')
const content = ref(''); const content = ref('');
const fileList1 = ref([]) const fileList1 = ref([])
const fileTypeInfo1 = ref('image') const fileTypeInfo1 = ref('image')
const bgColor = ref(''); const bgColor = ref('');
bgColor.value = 'rgba(170, 0, 0, 0)' bgColor.value = 'rgba(170, 0, 0, 0)'
const showStartTime = ref(false);
const showEndTime = ref(false);
const StartTime = ref('请选择活动开始时间')
const showtext1 = ref(true)
const showtext2 = ref(true)
const showtext3 = ref(true)
const EndTime = ref('请选择活动结束时间')
const newData = ref(new Date().getTime())
onLoad((options) => { onLoad((options) => {
console.log("页面参数:", options.id); console.log("页面参数:", options.id);
}) })
@ -87,8 +113,28 @@ const draft = () => {
const publish = () => { const publish = () => {
console.log("发布"); console.log("发布");
} }
const startTime = (e) => {
showStartTime.value = !showStartTime.value
}
const confirm1 = (e) => {
console.log(e);
showtext1.value = false;
StartTime.value = e.value
showStartTime.value = false
}
const confirm2 = (e) => {
console.log(e);
showtext2.value = false;
EndTime.value = e.value
showEndTime.value = false
}
const cancel = (e) => {
showStartTime.value = false
showEndTime.value = false
}
</script> </script>
<style lang="scss" > <style lang="scss">
.navbarcenter { .navbarcenter {
font-weight: 400; font-weight: 400;
@ -154,21 +200,28 @@ const publish = () => {
margin-left: 32rpx; margin-left: 32rpx;
margin-right: 32rpx; margin-right: 32rpx;
margin-top: 80rpx; margin-top: 80rpx;
.fbText { .fbText {
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
color: #FBFBFB !important; color: #FBFBFB !important;
} }
.cgText { .cgText {
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
color: #999999 !important; color: #999999 !important;
} }
}
.text2{
margin-left: 12rpx;
font-weight: 400;
font-size: 30rpx;
text-align: left;
color: #C9F6F5 !important;
} }
</style> </style>

View File

@ -5,7 +5,7 @@
<up-list-item v-for="(item, index) in modelValue" :key="index"> <up-list-item v-for="(item, index) in modelValue" :key="index">
<view class="listInfo" @click="toInfo(item)"> <view class="listInfo" @click="toInfo(item)">
<span class="titile"> <span class="titile">
{{ item.title }} {{ item.acTitle }}
</span> </span>
<view class="startTime flex alignCenter"> <view class="startTime flex alignCenter">
<image :src="tu52" style="width: 25rpx; height: 26rpx; margin-right: 12rpx;"></image> <image :src="tu52" style="width: 25rpx; height: 26rpx; margin-right: 12rpx;"></image>
@ -17,16 +17,16 @@
</view> </view>
<view class="addrs flex alignCenter"> <view class="addrs flex alignCenter">
<image :src="tu51" style="width: 20rpx; height: 26rpx; margin-right: 12rpx;"></image> <image :src="tu51" style="width: 20rpx; height: 26rpx; margin-right: 12rpx;"></image>
活动地点{{ item.addrs }} 活动地点{{ item.addres }}
</view> </view>
<view class="statsInfo"> <view class="statsInfo">
<!-- 动态数据 --> <!-- 动态数据 -->
<!-- <view :class="getDictLabelByValue(item.state).cssClass" > <view :class="getDictLabelByValue(item.state).cssClass" >
<span class="text">{{ getDictLabelByValue(item.state).dictLabel }}</span></view> --> <span class="text">{{ getDictLabelByValue(item.state).dictLabel }}</span></view>
<!-- 静态数据 --> <!-- 静态数据 -->
<view class="state1"> <!-- <view class="state1">
<span class="text">报名中</span> <span class="text">报名中</span>
</view> </view> -->
</view> </view>
</view> </view>
@ -42,7 +42,7 @@ import { ref, reactive, getCurrentInstance } from 'vue'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
const emit = defineEmits(['scrolltolower']); const emit = defineEmits(['scrolltolower']);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const activityState = ref([])//
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
const tu21 = iconConfig.tu21; const tu21 = iconConfig.tu21;
const tu22 = iconConfig.tu22; const tu22 = iconConfig.tu22;
@ -60,6 +60,21 @@ const scrolltolower = () => {
const toInfo = (item) => { const toInfo = (item) => {
proxy.$tab.navigateTo(`/pages/activity/info?id=${item.id}`); proxy.$tab.navigateTo(`/pages/activity/info?id=${item.id}`);
} }
const getDictLabelByValue = (state) => {
const dict = activityState.value.find((dict) => dict.dictValue === state);
return dict ? dict : '未知状态';
};
onLoad((options) => {
getDicts('activity_state').then(e => {
activityState.value = e.data
console.log(activityState.value);
})
})
onShow(() => {
console.log('Page onShow')
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.scrollable-list { .scrollable-list {

View File

@ -42,7 +42,7 @@ const props = defineProps({
fileSize: { fileSize: {
type: Number, type: Number,
default: 100 * 1024 * 1024, default: 100 * 1024 * 1024,
}, }
}); });
const url = ref(''); const url = ref('');
@ -82,7 +82,7 @@ const form = reactive({
// //
const afterRead = async (event) => { const afterRead = async (event) => {
console.log("event:", event);
let name = event.name; let name = event.name;
let lists = [].concat(event.file); let lists = [].concat(event.file);
let fileListLen = fileList1.value.length; let fileListLen = fileList1.value.length;
@ -113,7 +113,7 @@ const afterRead = async (event) => {
}; };
const uploadFilePromise = async (fileInfo1, name) => { const uploadFilePromise = async (fileInfo1, name) => {
console.log("fileInfo1:",fileInfo1);
// //
let fileNameOld = [0, 1]; let fileNameOld = [0, 1];
if (fileInfo1.name !== undefined) { if (fileInfo1.name !== undefined) {
@ -130,7 +130,7 @@ const uploadFilePromise = async (fileInfo1, name) => {
} }
//typevideo/mp4type //typevideo/mp4type
fileInfo.type = fileInfo1.type + "/" + extension1[extension1.length-1]; fileInfo.type = fileInfo1.type + "/" + extension1[extension1.length-1];
console.log("fileInfo.type:",fileInfo);
fileInfo.extension = extension1[1]; fileInfo.extension = extension1[1];
try { try {
const tokenData = await getQNtoken(fileInfo); const tokenData = await getQNtoken(fileInfo);
@ -211,7 +211,7 @@ const deletePic = (e) => {
const typeInfo = () => { const typeInfo = () => {
store.dispatch('getPhoneType'); store.dispatch('getPhoneType');
console.log(store.state.user.phoneType);
}; };
// //
function listToString(list, separator) { function listToString(list, separator) {

View File

@ -1,6 +1,27 @@
<template> <template>
<view> <view>
<view>
<!-- 顶部导航栏 -->
<up-navbar leftText="" title="" :placeholder="true" :safeAreaInsetTop="true" @leftClick="leftClick"
:bgColor="bgColor">
<template #center>
<div class="navbarcenter"><span>发布话题</span></div>
</template>
</up-navbar>
</view>
<image class="bacimg2" :src="sh2x"></image>
<view class="bgc"></view>
<view class="cardz">
<image :src="sh2x1" class="shenhe2x1"></image>
<span class="text">待审核</span>
</view>
<view style="position: fixed; top: 632rpx; width: 100%; padding-left: 32rpx; padding-right: 32rpx;">
<up-button color="#c0f0ec" size="large" shape="circle" @click="publish"><span
class="fbText">继续发布</span></up-button>
</view>
</view> </view>
</template> </template>
<script setup> <script setup>
@ -12,7 +33,71 @@ const emit = defineEmits(['scrolltolower']);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
const tu21 = iconConfig.tu21; const sh2x1 = iconConfig.sh2x1;
const sh2x = iconConfig.sh2x;
const bgColor = ref('');
bgColor.value = 'rgba(170, 0, 0, 0)'
const leftClick = () => {
proxy.$tab.navigateBack(1)
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.bacimg2 {
width: 508rpx;
height: 540rpx;
position: fixed;
top: -100rpx;
left: -100rpx;
}
.navbarcenter {
font-weight: 400;
font-size: 36rpx;
text-align: left;
color: #000000;
}
.bgc {
width: 100%;
height: 500rpx;
background: linear-gradient(-180deg, #a3e6df, #ffffff);
position: fixed;
top: 0rpx;
left: 0rpx;
z-index: -1;
}
.shenhe2x1 {
width: 232rpx;
height: 228rpx;
position: fixed;
top: 276rpx;
left: 260rpx;
}
.text {
font-weight: 400;
font-size: 48rpx;
text-align: left;
color: #00CCBE !important;
position: fixed;
top: 500rpx;
left: 300rpx;
}
.cardz{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.fbText{
font-weight: 400;
font-size: 30rpx;
text-align: left;
color: #00CCBE !important;
}
</style> </style>

View File

@ -1,6 +1,28 @@
<template> <template>
<view> <view>
<view>
<!-- 顶部导航栏 -->
<up-navbar leftText="" title="" :placeholder="true" :safeAreaInsetTop="true" @leftClick="leftClick"
:bgColor="bgColor">
<template #center>
<div class="navbarcenter"><span>发布话题</span></div>
</template>
</up-navbar>
</view>
<image class="bacimg2" :src="sb2x"></image>
<view class="bgc"></view>
<view class="cardz">
<image :src="sb2x1" class="shenhe2x1"></image>
<span class="text1">审核不通过</span>
<span class="text2">您提交的话题带有违禁词</span>
</view>
<view style="position: fixed; top: 632rpx; width: 100%; padding-left: 32rpx; padding-right: 32rpx;">
<up-button color="#FDE2E2" size="large" shape="circle" @click="publish"><span
class="fbText">继续发布</span></up-button>
</view>
</view> </view>
</template> </template>
<script setup> <script setup>
@ -12,7 +34,85 @@ const emit = defineEmits(['scrolltolower']);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
const tu21 = iconConfig.tu21;
const sb2x1 = iconConfig.sb2x1;
const sb2x = iconConfig.sb2x;
const bgColor = ref('');
bgColor.value = 'rgba(170, 0, 0, 0)'
const leftClick = () => {
proxy.$tab.navigateBack(1)
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.bacimg2 {
width: 508rpx;
height: 540rpx;
position: fixed;
top: -100rpx;
left: -100rpx;
}
.navbarcenter {
font-weight: 400;
font-size: 36rpx;
text-align: left;
color: #000000;
}
.bgc {
width: 100%;
height: 500rpx;
background: linear-gradient(-180deg, #fdecec, #ffffff);
position: fixed;
top: 0rpx;
left: 0rpx;
z-index: -1;
}
.shenhe2x1 {
width: 232rpx;
height: 228rpx;
position: fixed;
top: 276rpx;
left: 260rpx;
}
.text1 {
font-weight: 400;
font-size: 48rpx;
text-align: left;
color: #FFABAB !important;
position: fixed;
top: 500rpx;
left: 252rpx;
}
.text2 {
font-weight: 400;
font-size: 24rpx;
text-align: left;
color: #FFABAB !important;
position: fixed;
top: 560rpx;
left: 242rpx;
}
.cardz {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.fbText {
font-weight: 400;
font-size: 30rpx;
text-align: left;
color: #FFABAB !important;
}
</style> </style>

View File

@ -11,10 +11,10 @@
</template> </template>
</up-navbar> </up-navbar>
</view> </view>
<image class="bacimg2" :src="sh2x"></image> <image class="bacimg2" :src="cg2x22"></image>
<view class="bgc"></view> <view class="bgc"></view>
<view class="cardz"> <view class="cardz">
<image :src="sh2x1" class="shenhe2x1"></image> <image :src="cg2x21" class="shenhe2x1"></image>
<span class="text">待审核</span> <span class="text">待审核</span>
</view> </view>
<view style="position: fixed; top: 632rpx; width: 100%; padding-left: 32rpx; padding-right: 32rpx;"> <view style="position: fixed; top: 632rpx; width: 100%; padding-left: 32rpx; padding-right: 32rpx;">
@ -33,8 +33,8 @@ const emit = defineEmits(['scrolltolower']);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
const sh2x1 = iconConfig.sh2x1; const cg2x21 = iconConfig.cg2x21;
const sh2x = iconConfig.sh2x; const cg2x22 = iconConfig.cg2x21;
const bgColor = ref(''); const bgColor = ref('');
bgColor.value = 'rgba(170, 0, 0, 0)' bgColor.value = 'rgba(170, 0, 0, 0)'

View File

@ -18,6 +18,8 @@
</view> </view>
<view> <view>
<up-button type="primary" text="待审核" size @click="clickBannerItem(1)"></up-button> <up-button type="primary" text="待审核" size @click="clickBannerItem(1)"></up-button>
<up-button type="primary" text="发布成功" size @click="clickBannerItem(2)"></up-button>
<up-button type="primary" text="审核失败" size @click="clickBannerItem(3)"></up-button>
</view> </view>
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1"></fileUpload> <fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1"></fileUpload>
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo2"></fileUpload> <fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo2"></fileUpload>
@ -56,9 +58,17 @@ const fileList1 = ref([])
function clickBannerItem(item) { function clickBannerItem(item) {
if (item === 1) { if(item === 1){
proxy.$tab.navigateTo('/pages/common/talkState/audit')
}
if(item === 2){
proxy.$tab.navigateTo('/pages/common/talkState/publish') proxy.$tab.navigateTo('/pages/common/talkState/publish')
} }
if(item === 3){
proxy.$tab.navigateTo('/pages/common/talkState/auditFailure')
}
} }
function changeSwiper(e) { function changeSwiper(e) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -5,9 +5,17 @@ import store from '@/store'
const QNDomain = store.state.user.QNDomain const QNDomain = store.state.user.QNDomain
const tu21 = ref(QNDomain + "home/icon/image/png/tu2-1_20240531153239639.png") const tu21 = ref(QNDomain + "home/icon/image/png/tu2-1_20240531153239639.png")
const tu22 = ref(QNDomain + "home/icon/image/png/tu2-2_20240531163115818.png") const tu22 = ref(QNDomain + "home/icon/image/png/tu2-2_20240531163115818.png")
//定位
const tu51 = ref(QNDomain + "home/icon/image/png/tu5-1_20240601124004353.png") const tu51 = ref(QNDomain + "home/icon/image/png/tu5-1_20240601124004353.png")
const tu512 = ref(QNDomain + "home/icon/image/png/tu5-1-2_20240605120128566.png")
//开始
const tu52 = ref(QNDomain + "home/icon/image/png/tu5-2_20240601124010403.png") const tu52 = ref(QNDomain + "home/icon/image/png/tu5-2_20240601124010403.png")
const tu522 = ref(QNDomain + "home/icon/image/png/tu5-2-2_20240605120128561.png")
//结束
const tu53 = ref(QNDomain + "home/icon/image/png/tu5-3_20240601124016641.png") const tu53 = ref(QNDomain + "home/icon/image/png/tu5-3_20240601124016641.png")
const tu532 = ref(QNDomain + "home/icon/image/png/tu5-3-2_20240605120128565.png")
const tu23 = ref(QNDomain + "home/icon/image/png/tu2-3_20240602093303793.png") const tu23 = ref(QNDomain + "home/icon/image/png/tu2-3_20240602093303793.png")
//文件上传 //文件上传
const tu2x = ref(QNDomain + "home/icon/image/png/添加图片@2x_20240603101717136.png") const tu2x = ref(QNDomain + "home/icon/image/png/添加图片@2x_20240603101717136.png")
@ -15,8 +23,16 @@ const tu2x = ref(QNDomain + "home/icon/image/png/添加图片@2x_202406031017171
//话题发布-等待审核 //话题发布-等待审核
const sh2x = ref(QNDomain + "home/icon/image/png/等待审核@2x_20240604202431502.png") const sh2x = ref(QNDomain + "home/icon/image/png/等待审核@2x_20240604202431502.png")
const sh2x1 = ref(QNDomain + "home/icon/image/png/等待审核@2x1_20240604202431492.png") const sh2x1 = ref(QNDomain + "home/icon/image/png/等待审核@2x1_20240604202431492.png")
//话题-发布话题 发布成功
const cg2x21 = ref(QNDomain + "home/icon/image/png/成功@2x2 (1)_20240605100256727.png");
const cg2x22 = ref(QNDomain + "home/icon/image/png/成功@2x2 (2)_20240605100300398.png");
//话题-发布话题 审核失败
const sb2x = ref(QNDomain + "home/icon/image/png/审核失败@2x_20240605101107230.png");
const sb2x1 = ref(QNDomain + "home/icon/image/png/审核失败@2x1_20240605101107230.png");
export default { export default {
tu21,tu22,tu23,tu2x, tu21,tu22,tu23,tu2x,
tu51,tu52,tu53, tu51,tu52,tu53,tu512,tu522,tu532,
sh2x,sh2x1 sh2x,sh2x1,
cg2x21,cg2x22,
sb2x,sb2x1,
} }

View File

@ -37,7 +37,7 @@ const request = config => {
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => { showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
if (res.confirm) { if (res.confirm) {
store.dispatch('LogOut').then(res => { store.dispatch('LogOut').then(res => {
uni.reLaunch({ url: '/pages/login' }) uni.reLaunch({ url: '/pages/loginInfo/login' })
}) })
} }
}) })

246
utils/ruoyi.js Normal file
View File

@ -0,0 +1,246 @@
/**
* 通用js方法封装处理
* Copyright (c) 2019 ruoyi
*/
// 日期格式化
export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
// 表单重置
export function resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
}
// 添加日期范围
export function addDateRange(params, dateRange, propName) {
let search = params;
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
dateRange = Array.isArray(dateRange) ? dateRange : [];
if (typeof (propName) === 'undefined') {
search.params['beginTime'] = dateRange[0];
search.params['endTime'] = dateRange[1];
} else {
search.params['begin' + propName] = dateRange[0];
search.params['end' + propName] = dateRange[1];
}
return search;
}
// 回显数据字典
export function selectDictLabel(datas, value) {
if (value === undefined) {
return "";
}
var actions = [];
Object.keys(datas).some((key) => {
if (datas[key].value == ('' + value)) {
actions.push(datas[key].label);
return true;
}
})
if (actions.length === 0) {
actions.push(value);
}
return actions.join('');
}
// 回显数据字典(字符串数组)
export function selectDictLabels(datas, value, separator) {
if (value === undefined || value.length ===0) {
return "";
}
if (Array.isArray(value)) {
value = value.join(",");
}
var actions = [];
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
Object.keys(value.split(currentSeparator)).some((val) => {
var match = false;
Object.keys(datas).some((key) => {
if (datas[key].value == ('' + temp[val])) {
actions.push(datas[key].label + currentSeparator);
match = true;
}
})
if (!match) {
actions.push(temp[val] + currentSeparator);
}
})
return actions.join('').substring(0, actions.join('').length - 1);
}
// 字符串格式化(%s )
export function sprintf(str) {
var args = arguments, flag = true, i = 1;
str = str.replace(/%s/g, function () {
var arg = args[i++];
if (typeof arg === 'undefined') {
flag = false;
return '';
}
return arg;
});
return flag ? str : '';
}
// 转换字符串undefined,null等转化为""
export function parseStrEmpty(str) {
if (!str || str == "undefined" || str == "null") {
return "";
}
return str;
}
// 数据合并
export function mergeRecursive(source, target) {
for (var p in target) {
try {
if (target[p].constructor == Object) {
source[p] = mergeRecursive(source[p], target[p]);
} else {
source[p] = target[p];
}
} catch (e) {
source[p] = target[p];
}
}
return source;
};
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
*/
export function handleTree(data, id, parentId, children) {
let config = {
id: id || 'id',
parentId: parentId || 'parentId',
childrenList: children || 'children'
};
var childrenListMap = {};
var nodeIds = {};
var tree = [];
for (let d of data) {
let parentId = d[config.parentId];
if (childrenListMap[parentId] == null) {
childrenListMap[parentId] = [];
}
nodeIds[d[config.id]] = d;
childrenListMap[parentId].push(d);
}
for (let d of data) {
let parentId = d[config.parentId];
if (nodeIds[parentId] == null) {
tree.push(d);
}
}
for (let t of tree) {
adaptToChildrenList(t);
}
function adaptToChildrenList(o) {
if (childrenListMap[o[config.id]] !== null) {
o[config.childrenList] = childrenListMap[o[config.id]];
}
if (o[config.childrenList]) {
for (let c of o[config.childrenList]) {
adaptToChildrenList(c);
}
}
}
return tree;
}
/**
* 参数处理
* @param {*} params 参数
*/
export function tansParams(params) {
let result = ''
for (const propName of Object.keys(params)) {
const value = params[propName];
var part = encodeURIComponent(propName) + "=";
if (value !== null && value !== "" && typeof (value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
let params = propName + '[' + key + ']';
var subPart = encodeURIComponent(params) + "=";
result += subPart + encodeURIComponent(value[key]) + "&";
}
}
} else {
result += part + encodeURIComponent(value) + "&";
}
}
}
return result
}
// 返回项目路径
export function getNormalPath(p) {
if (p.length === 0 || !p || p == 'undefined') {
return p
};
let res = p.replace('//', '/')
if (res[res.length - 1] === '/') {
return res.slice(0, res.length - 1)
}
return res;
}
// 验证是否为blob格式
export function blobValidate(data) {
return data.type !== 'application/json'
}

View File

@ -38,7 +38,7 @@ export default function upload(config) {
showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => { showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
if (res.confirm) { if (res.confirm) {
store.dispatch('LogOut').then(res => { store.dispatch('LogOut').then(res => {
uni.reLaunch({ url: '/pages/login/login' }) uni.reLaunch({ url: '/pages/loginInfo/login' })
}) })
} }
}) })