整合提交
commit
746b801587
|
@ -0,0 +1,74 @@
|
|||
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'
|
||||
})
|
||||
}
|
||||
|
||||
// 报名
|
||||
export function gotoSing1(id) {
|
||||
return request({
|
||||
url: '/activityInfo/activityTakeInfo/goSing1/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 取消报名
|
||||
export function gotoSing2(id) {
|
||||
return request({
|
||||
url: '/activityInfo/activityTakeInfo/goSing2/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 签到
|
||||
export function gotoQrcode(data) {
|
||||
return request({
|
||||
url: '/activityInfo/activityTakeInfo/goQrcode',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -12,7 +12,7 @@ export function listInfo(query) {
|
|||
// 查询活动详情详细
|
||||
export function getInfo(id) {
|
||||
return request({
|
||||
url: '/activityInfo/info/' + id,
|
||||
url: '/activityInfo/info/app/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
1
main.js
1
main.js
|
@ -4,6 +4,7 @@ import store from './store' // store
|
|||
import { install } from './plugins' // plugins
|
||||
import './permission.js' // permission
|
||||
import iconConfig from './utils/icon/icon.js'
|
||||
|
||||
// main.js
|
||||
import uviewPlus from 'uview-plus'
|
||||
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
||||
|
|
35
pages.json
35
pages.json
|
@ -7,8 +7,36 @@
|
|||
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
"pages": [{
|
||||
"path": "pages/Friend/violationreporting",
|
||||
=======
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "若依移动端框架",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/post/postInfo/postInfo",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "话题详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/post/postPublish/postPublish",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "发布话题"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/signln/harvestaddress",
|
||||
>>>>>>> fc6726a74b5811cc7e918233ea3a847aadb88d7d
|
||||
"style": {
|
||||
"navigationBarTitleText": "违规举报",
|
||||
"navigationStyle": "custom"
|
||||
|
@ -52,11 +80,18 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
"path": "pages/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "若依移动端框架",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
=======
|
||||
"path": "pages/signln/signid",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签到任务",
|
||||
"navigationStyle": "custom"
|
||||
>>>>>>> fc6726a74b5811cc7e918233ea3a847aadb88d7d
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 列表信息 -->
|
||||
<view >
|
||||
<view>
|
||||
<ActiInfoList v-model="actiInfoList" @scrolltolower="scrolltolower"></ActiInfoList>
|
||||
</view>
|
||||
|
||||
|
@ -52,7 +52,7 @@ import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityI
|
|||
import ActiInfoList from '../common/activityList/index.vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { getDicts } from "@/api/system/dict/data"
|
||||
import { ref, reactive, getCurrentInstance,toRefs } from 'vue'
|
||||
import { ref, reactive, getCurrentInstance, toRefs } from 'vue'
|
||||
import { useStore } from 'vuex';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const iconConfig = proxy.iconConfig;
|
||||
|
@ -75,92 +75,94 @@ const list4 = reactive([
|
|||
]);
|
||||
const actiInfoList = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
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,
|
||||
auditor: null,
|
||||
auditStatus: null,
|
||||
auditTime: null,
|
||||
auditAdvice: null,
|
||||
cut: null,
|
||||
},
|
||||
rules: {
|
||||
auditStatus: [
|
||||
{ required: true, message: "状态0正常1待脱敏 2待审核 3脱敏未通过 4 审核未通过 5草稿不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
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,
|
||||
auditor: null,
|
||||
auditStatus: null,
|
||||
auditTime: null,
|
||||
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");
|
||||
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 = {};
|
||||
queryParams.value.params = {};
|
||||
|
||||
listInfo(queryParams.value).then(response => {
|
||||
console.log(response);
|
||||
actiInfoList.value = response.rows;
|
||||
total.value = response.total;
|
||||
});
|
||||
listInfo(queryParams.value).then(response => {
|
||||
actiInfoList.value = response.rows;
|
||||
response.rows.forEach(item => {
|
||||
actiInfoList.value.push(item)
|
||||
})
|
||||
total.value = response.total;
|
||||
});
|
||||
}
|
||||
onLoad((options) => {
|
||||
getList();
|
||||
|
@ -170,15 +172,31 @@ onShow(() => {
|
|||
console.log('Page onShow')
|
||||
})
|
||||
|
||||
const scrolltolower = () => {
|
||||
console.log("scrolltolower");
|
||||
actiInfoList.value.push({
|
||||
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?',
|
||||
startTime: '2023-05-01 15:00',
|
||||
endTime: '2023-05-01 16:00',
|
||||
state: '2',
|
||||
addrs: '天津电子信息职业技术学院操场东面'
|
||||
})
|
||||
// 在data中添加isLoading标志
|
||||
const isLoading = ref(false);
|
||||
|
||||
const scrolltolower = async () => {
|
||||
// 检查是否还有更多数据可以加载
|
||||
if (queryParams.value.pageNum * queryParams.value.pageSize < total.value) {
|
||||
// 防止在数据加载时重复触发
|
||||
if (isLoading.value) return;
|
||||
isLoading.value = true;
|
||||
|
||||
queryParams.value.pageNum += 1;
|
||||
try {
|
||||
const response = await listInfo(queryParams.value);
|
||||
// 使用Array.prototype.push.apply将新数据追加到actiInfoList中
|
||||
Array.prototype.push.apply(actiInfoList.value, response.rows);
|
||||
console.log(actiInfoList.value);
|
||||
} catch (error) {
|
||||
console.error("加载更多数据时发生错误:", error);
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
} else {
|
||||
// 可以在这里处理没有更多数据的情况,例如显示提示信息
|
||||
console.log("没有更多数据了");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -190,10 +208,7 @@ function toESearch() {
|
|||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.fixed-header {
|
||||
|
||||
|
||||
}
|
||||
.fixed-header {}
|
||||
|
||||
|
||||
.leftinfo {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<view class="fixed-header">
|
||||
<!-- 顶部导航栏 -->
|
||||
<up-navbar leftText="" title="" :placeholder="true" :safeAreaInsetTop="true" @leftClick="leftClick">
|
||||
|
||||
<template #center>
|
||||
<div class="navbarcenter"><span>活动详情</span></div>
|
||||
</template>
|
||||
|
@ -17,27 +16,58 @@
|
|||
<view class="addrs">活动地点:{{ actiInfoList.addres }}</view>
|
||||
</view>
|
||||
<view class="cardz">
|
||||
<up-parse :content="actiInfoList.acContent" :tagStyle="style"></up-parse>
|
||||
<!-- <up-parse :content="processContent(actiInfoList.acContent)" :tagStyle="style"></up-parse> -->
|
||||
<view v-if="textopen" v-html="actiInfoList.acContent" class="acContentstyle"></view>
|
||||
<up-text size="15" color="#000000" lineHeight="23" v-else :text="actiInfoList.acContent"></up-text>
|
||||
|
||||
</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>
|
||||
</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 v-if="actiInfoList.state === '0'">
|
||||
<view class="state3"
|
||||
v-if="activityAttendInfo.attendState === '0' || activityAttendInfo.attendState === '1'">
|
||||
<up-button color="#F1F1F1" size="large" shape="circle"><span 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" @click="goSing(1)"><span
|
||||
class="btnText">立即报名</span></up-button>
|
||||
</view>
|
||||
<view class="state2" v-else-if="activityAttendInfo.attendState === '1'">
|
||||
<up-button color="#FDE2E2" size="large" shape="circle" @click="goQrcode(1)"><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" @click="goSing(1)"><span
|
||||
class="btnText">立即报名</span></up-button>
|
||||
</view>
|
||||
<view class="state1" v-else-if="activityAttendInfo.attendState === '1'">
|
||||
<up-button color="#C0F0EC" size="large" shape="circle" @click="goSing(0)"><span
|
||||
class="btnText">取消报名</span></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="infox">
|
||||
<view class="infoavatar"><up-avatar size="60rpx" :src="QNDomain + actiInfoList.launchAvatarsurl"></up-avatar>
|
||||
</view>
|
||||
<view>
|
||||
<view class="launchName">{{ actiInfoList.launchName }}</view>
|
||||
<view class="launchAddres">{{ actiInfoList.launchAddres }}</view>
|
||||
<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>
|
||||
</view>
|
||||
<view class="elroll">已报名:{{ actiInfoList.elroll }}人</view>
|
||||
</view>
|
||||
|
@ -45,87 +75,142 @@
|
|||
<up-modal :show="open" :title="title" width="600rpx" :content='content' confirmText="签到" cancelText="取消"
|
||||
confirmColor="#3477FC" showCancelButton closeOnClickOverlay @confirm="confirm" @cancel="cancel"></up-modal>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getTakePartsInfoByacId, gotoQrcode, gotoSing1, gotoSing2 } from "@/api/activityInfo/activityTakeInfo";
|
||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { ref, reactive, getCurrentInstance,toRefs } from 'vue'
|
||||
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 { 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;
|
||||
const style = ref({
|
||||
p: 'font-weight: 400;font-size: 24rpx;color: #000000 !important;',
|
||||
|
||||
|
||||
})
|
||||
const open = ref(false)
|
||||
});
|
||||
const activityState = ref([]); // 字典 activity_state 活动状态
|
||||
const takePartState = ref([]); // 字典 take_part_state 活动参与状态
|
||||
const open = ref(false);
|
||||
const title = ref('确认签到');
|
||||
const content = ref('请您确认活动签到,祝您玩的愉快!');
|
||||
// 创建响应式数据 ref('#001f3f')
|
||||
const bgColor = ref('');
|
||||
|
||||
|
||||
const store = useStore()
|
||||
const QNDomain = store.state.user.QNDomain
|
||||
const store = useStore();
|
||||
const QNDomain = store.state.user.QNDomain;
|
||||
const actiInfoList = ref({});
|
||||
onLoad((options) => {
|
||||
const _id = options.id
|
||||
getInfo(_id).then(response => {
|
||||
actiInfoList.value = response.data;
|
||||
console.log("actiInfoList:",actiInfoList.value);
|
||||
});
|
||||
})
|
||||
const leftClick = () => {
|
||||
proxy.$tab.navigateBack(1)
|
||||
const activityAttendInfo = ref({});
|
||||
const qrcodeInfo = ref();
|
||||
|
||||
function getAvatar() {
|
||||
return QNDomain + actiInfoList.value.avatarInfo;
|
||||
}
|
||||
const qrcodeInfo = ref()
|
||||
const btnClick = () => {
|
||||
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);
|
||||
});
|
||||
getDicts('activity_state').then(e => {
|
||||
activityState.value = e.data;
|
||||
});
|
||||
getDicts('take_part_state').then(e => {
|
||||
takePartState.value = e.data;
|
||||
});
|
||||
checkStatus(options.id);
|
||||
});
|
||||
|
||||
const checkStatus = (id) => {
|
||||
getTakePartsInfoByacId(id).then(e => {
|
||||
|
||||
activityAttendInfo.value = e.data;
|
||||
console.log("个人信息:", activityAttendInfo.value)
|
||||
});
|
||||
};
|
||||
|
||||
const leftClick = () => {
|
||||
proxy.$tab.navigateBack(1);
|
||||
};
|
||||
const toimage = (url) => {
|
||||
if (typeof url === 'string') {
|
||||
let info = url.split(",");
|
||||
let processedInfo = info.map(item => QNDomain + item);
|
||||
console.log("processedInfo", processedInfo);
|
||||
return processedInfo;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
|
||||
function cancel() {
|
||||
open.value = !open.value;
|
||||
}
|
||||
|
||||
const getDictLabelByValue = (state) => {
|
||||
const dict = activityState.value.find((dict) => dict.dictValue === state);
|
||||
return dict ? dict : '未知状态';
|
||||
};
|
||||
const goSing = (e) => {
|
||||
if (e === 0) {
|
||||
//取消报名
|
||||
gotoSing2(activityAttendInfo.value.id).then(e => {
|
||||
proxy.$modal.msgSuccess("取消报名成功!");
|
||||
actiInfoList.value.elroll -= 1
|
||||
})
|
||||
}
|
||||
if (e === 1) {
|
||||
//报名
|
||||
gotoSing1(activityAttendInfo.value.id).then(e => {
|
||||
proxy.$modal.msgSuccess("报名成功!");
|
||||
actiInfoList.value.elroll += 1
|
||||
})
|
||||
}
|
||||
//简单刷新一下数据
|
||||
checkStatus(actiInfoList.value.id);
|
||||
}
|
||||
const goQrcode = () => {
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: (res) => {
|
||||
console.log('扫描二维码成功,结果:',res);
|
||||
|
||||
console.log('扫描二维码成功,结果:', res);
|
||||
toqrcode(res);
|
||||
open.value = !open.value
|
||||
|
||||
},
|
||||
error: (res) => {
|
||||
console.log('扫描二维码出现错误')
|
||||
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; // 或者其他默认值
|
||||
|
||||
function confirm() {
|
||||
open.value = !open.value;
|
||||
activityAttendInfo.value.qrcodeInfo = JSON.stringify(qrcodeInfo.value)
|
||||
|
||||
gotoQrcode(activityAttendInfo.value).then(e => {
|
||||
proxy.$modal.msgSuccess("签到成功!");
|
||||
//简单刷新一下数据
|
||||
checkStatus(actiInfoList.value.id);
|
||||
})
|
||||
}
|
||||
const toqrcode = (e) => {
|
||||
qrcodeInfo.value = JSON.parse(e.result)
|
||||
console.log("信息:",qrcodeInfo.value);
|
||||
}
|
||||
//模态框确认按钮
|
||||
function confirm() {
|
||||
open.value = !open.value
|
||||
}
|
||||
//模态框取消按钮
|
||||
function cancel() {
|
||||
open.value = !open.value
|
||||
}
|
||||
|
||||
qrcodeInfo.value = JSON.parse(e.result);
|
||||
if (actiInfoList.value.id !== qrcodeInfo.value.id) {
|
||||
proxy.$modal.msgError('二维码不匹配!')
|
||||
return;
|
||||
} else {
|
||||
open.value = !open.value;
|
||||
console.log("信息:", qrcodeInfo.value);
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.navbarcenter {
|
||||
|
@ -202,6 +287,32 @@ function cancel() {
|
|||
color: #00CCBE !important;
|
||||
}
|
||||
}
|
||||
|
||||
.state2 {
|
||||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.btnText {
|
||||
font-weight: 400;
|
||||
width: 120rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFABAB !important;
|
||||
}
|
||||
}
|
||||
|
||||
.state3 {
|
||||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
.btnText {
|
||||
font-weight: 400;
|
||||
width: 120rpx;
|
||||
font-size: 30rpx;
|
||||
color: #7E7E7E !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infox {
|
||||
|
@ -225,6 +336,10 @@ function cancel() {
|
|||
background-color: white;
|
||||
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */
|
||||
z-index: 10;
|
||||
|
||||
.infoavatar {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.infox2 {
|
||||
|
@ -242,4 +357,12 @@ function cancel() {
|
|||
z-index: 10002;
|
||||
/* 确保在最上层 */
|
||||
}
|
||||
|
||||
.acContentstyle {
|
||||
color: #000000 !important;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
text-align: left;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
</style>
|
|
@ -1,82 +1,94 @@
|
|||
<template>
|
||||
|
||||
<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>
|
||||
<view class="bgc"></view>
|
||||
<view class="cardz">
|
||||
<view class="titleInfo">
|
||||
<up-input placeholder="输入活动标题~(5~20个字)" v-model="title" border="none" maxlength="20" fontSize="34rpx"
|
||||
color="#C0C0C0" clearable></up-input>
|
||||
<view class="xian"></view>
|
||||
</view>
|
||||
<view class="contentInfo">
|
||||
<up-textarea v-model="content" placeholder="输入活动内容
|
||||
<up-form :model="form" :rules="rules" ref="uFormRef">
|
||||
<view class="cardz">
|
||||
<view class="titleInfo">
|
||||
<up-form-item label="" prop="acTitle" borderBottom>
|
||||
<up-input placeholder="输入活动标题~(5~20个字)" v-model="form.acTitle" border="none" maxlength="20"
|
||||
fontSize="34rpx" color="#C0C0C0" clearable></up-input>
|
||||
</up-form-item>
|
||||
<view class="xian"></view>
|
||||
</view>
|
||||
<view class="contentInfo">
|
||||
<up-form-item label="" prop="acContent" borderBottom>
|
||||
<up-textarea v-model="form.acContent" placeholder="输入活动内容
|
||||
活动图片最多可发布两张
|
||||
输入准确定位可以更好提供活动信息奥!安全指南:请勿发布带有个人信息(如:住址)" count border="none" height="270" maxlength="500"
|
||||
placeholderStyle="color: #c0c0c0;font-size: 30rpx; background:none;"></up-textarea>
|
||||
</view>
|
||||
<view class="cardzfile">
|
||||
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1" :limit="2"></fileUpload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cardx">
|
||||
<up-cell-group :border="false">
|
||||
<up-cell :isLink="true" :center="true" @click="startTime">
|
||||
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image v-if="showtext1" :src="tu52" style="width: 30rpx; height: 32rpx;"></image>
|
||||
<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>
|
||||
</up-cell>
|
||||
<up-cell :isLink="true" :center="true" @click="showEndTime =!showEndTime ">
|
||||
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image v-if="showtext2" :src="tu53" style="width: 30rpx; height: 32rpx;"></image>
|
||||
<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>
|
||||
</up-cell>
|
||||
<up-cell :border="false" :isLink="true" :center="true">
|
||||
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<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>
|
||||
</template>
|
||||
</up-cell>
|
||||
</up-cell-group>
|
||||
</view>
|
||||
placeholderStyle="color: #c0c0c0;font-size: 30rpx; background:none;"></up-textarea>
|
||||
</up-form-item>
|
||||
</view>
|
||||
<up-form-item label="" prop="file" borderBottom>
|
||||
<view class="cardzfile">
|
||||
<fileUpload v-model="form.file" :fileTypeInfo="fileTypeInfo1" :limit="2"></fileUpload>
|
||||
</view>
|
||||
</up-form-item>
|
||||
|
||||
<view class="cardxx">
|
||||
<up-button color="#C9F6F5" size="large" shape="circle" @click="publish"><span
|
||||
class="fbText">发布</span></up-button>
|
||||
<view style="width: 26rpx;height: 80rpx;"></view>
|
||||
<up-button color="#F8F8E3" size="large" shape="circle" @click="draft" style="margin-left: 26rpx;"><span
|
||||
class="cgText">存草稿</span></up-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cardx">
|
||||
<up-cell-group :border="false">
|
||||
<up-form-item label="" prop="startTime" borderBottom @click="showStartTime =! showStartTime">
|
||||
<view style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image v-if="showtext1" :src="tu52" style="width: 30rpx; height: 32rpx; margin-right: 12rpx;"></image>
|
||||
<image v-else :src="tu522" style="width: 30rpx; height: 32rpx; margin-right: 12rpx;"></image>
|
||||
<up-input v-model="form.startTime" disabled disabledColor="#ffffff" color="#C9F6F5"
|
||||
placeholder="请选择活动开始时间" placeholderStyle="color: #333333 !important;font-size: 30rpx;"
|
||||
border="none">
|
||||
<span v-if="showtext2">请选择活动开始时间</span>
|
||||
</up-input>
|
||||
<up-icon slot="right" name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</up-form-item>
|
||||
<up-form-item label="" prop="endTime" borderBottom @click="showEndTime = !showEndTime">
|
||||
<view style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image v-if="showtext2" :src="tu53" style="width: 30rpx; height: 32rpx;margin-right: 12rpx;"></image>
|
||||
<image v-else :src="tu532" style="width: 30rpx; height: 32rpx; margin-right: 12rpx;"></image>
|
||||
<up-input v-model="form.endTime" disabled disabledColor="#ffffff" color="#C9F6F5"
|
||||
placeholder="请选择活动结束时间" placeholderStyle="color: #333333 !important;font-size: 30rpx;"
|
||||
border="none">
|
||||
<span v-if="showtext2">请选择活动结束时间</span>
|
||||
</up-input>
|
||||
<up-icon slot="right" name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</up-form-item>
|
||||
|
||||
<up-cell :border="false" :isLink="true" :center="true">
|
||||
<template #title
|
||||
style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<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>
|
||||
</template>
|
||||
</up-cell>
|
||||
</up-cell-group>
|
||||
</view>
|
||||
<up-datetime-picker :show="showStartTime" v-model="newData" :modelValue="newData" @confirm="confirm1" format="YYYY-MM-DD HH:mm:ss"
|
||||
@cancel="cancel" mode="datetime"></up-datetime-picker>
|
||||
<up-datetime-picker :show="showEndTime" v-model="newData" @confirm="confirm2" :modelValue="newData" format="YYYY-MM-DD HH:mm:ss"
|
||||
@cancel="cancel" mode="datetime"></up-datetime-picker>
|
||||
<view class="cardxx">
|
||||
<up-button color="#C9F6F5" size="large" shape="circle" @click="publish" throttleTime="500"><span
|
||||
class="fbText">发布</span></up-button>
|
||||
<view style="width: 26rpx;height: 80rpx;"></view>
|
||||
<up-button color="#F8F8E3" size="large" shape="circle" @click="draft" style="margin-left: 26rpx;"><span
|
||||
class="cgText">存草稿</span></up-button>
|
||||
</view>
|
||||
</up-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
|
||||
import fileUpload from '../common/file/fileUpload'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { ref, reactive, getCurrentInstance,computed } from 'vue'
|
||||
import { ref, reactive, getCurrentInstance, computed, toRefs } from 'vue'
|
||||
import { useStore } from 'vuex';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const iconConfig = proxy.iconConfig;
|
||||
|
@ -88,56 +100,137 @@ const tu53 = iconConfig.tu53;
|
|||
const tu532 = iconConfig.tu532;
|
||||
const title = ref('')
|
||||
const content = ref('');
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
acTitle: '',
|
||||
acContent: '',
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
file: null,
|
||||
state: null,
|
||||
},
|
||||
rules: {
|
||||
acTitle: [
|
||||
{ required: true, message: '请输入活动标题', trigger: 'blur' },
|
||||
{ min: 5, max: 20, message: '标题长度在 5 到 20 个字符', trigger: 'blur' }
|
||||
],
|
||||
acContent: [
|
||||
{ required: true, message: '请输入活动内容', trigger: 'blur' },
|
||||
{ max: 500, message: '内容不能超过 500 字', trigger: 'blur' }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: '请选择活动开始时间', trigger: 'change' }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '请选择活动结束时间', trigger: 'change' },
|
||||
{ validator: (rule, value, callback) => {
|
||||
console.log(form.value.startTime," ",value," ",value <= form.value.startTime)
|
||||
if (value <= form.value.startTime) {
|
||||
callback( proxy.$modal.msgError('时间选择错误') );
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: 'change' }
|
||||
]
|
||||
}
|
||||
});
|
||||
const { form, rules } = toRefs(data);
|
||||
const fileList1 = ref([])
|
||||
const fileTypeInfo1 = ref('image')
|
||||
const bgColor = ref('');
|
||||
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())
|
||||
const StartTime = ref('请选择活动开始时间');
|
||||
const showtext1 = ref(true);
|
||||
const showtext2 = ref(true);
|
||||
const showtext3 = ref(true);
|
||||
const EndTime = ref('请选择活动结束时间');
|
||||
const newData = ref(new Date().getTime());
|
||||
const timeFormat = uni.$u.timeFormat;
|
||||
// 表单引用
|
||||
const uFormRef = ref(null);
|
||||
onLoad((options) => {
|
||||
console.log("页面参数:", options.id);
|
||||
})
|
||||
|
||||
const leftClick = () => {
|
||||
proxy.$tab.navigateBack(1)
|
||||
}
|
||||
|
||||
const draft = () => {
|
||||
form.value.auditStatus = "5"
|
||||
submitForm('draft');
|
||||
console.log("存草稿");
|
||||
}
|
||||
|
||||
const publish = () => {
|
||||
form.value.auditStatus = "1"
|
||||
submitForm('publish');
|
||||
console.log("发布");
|
||||
}
|
||||
|
||||
const submitForm = (type) => {
|
||||
if (uFormRef.value) {
|
||||
uFormRef.value.validate().then(valid => {
|
||||
if (valid) {
|
||||
console.log('表单验证通过:', form.value);
|
||||
proxy.$modal.loading('正在提交数据,请稍候...');
|
||||
// 提交表单数据
|
||||
if (type === 'publish') {
|
||||
console.log("调用发布接口", form.value);
|
||||
// 调用发布接口
|
||||
addInfo(form.value).then(response => {
|
||||
proxy.$modal.closeLoading();
|
||||
proxy.$modal.msgSuccess("发布成功");
|
||||
proxy.$tab.navigateTo('/pages/common/talkState/publish')
|
||||
});
|
||||
} else {
|
||||
// 调用存草稿接口
|
||||
addInfo(form.value).then(response => {
|
||||
proxy.$modal.closeLoading();
|
||||
proxy.$modal.msgSuccess("存草稿成功");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log('表单验证失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log('表单验证错误:', error);
|
||||
});
|
||||
} else {
|
||||
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
|
||||
|
||||
form.value.startTime = timeFormat(e.value,'yyyy-mm-dd hh:MM:ss');
|
||||
showStartTime.value = !showStartTime.value
|
||||
}
|
||||
|
||||
const confirm2 = (e) => {
|
||||
console.log(e);
|
||||
showtext2.value = false;
|
||||
EndTime.value = e.value
|
||||
showEndTime.value = false
|
||||
form.value.endTime = timeFormat(e.value,'yyyy-mm-dd hh:MM:ss');
|
||||
showEndTime.value = !showEndTime.value
|
||||
}
|
||||
|
||||
const cancel = (e) => {
|
||||
showStartTime.value = false
|
||||
showEndTime.value = false
|
||||
showStartTime.value = false;
|
||||
showEndTime.value = false;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.navbarcenter {
|
||||
font-weight: 400;
|
||||
|
||||
font-size: 36rpx;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
|
@ -190,9 +283,6 @@ const cancel = (e) => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.cardxx {
|
||||
|
@ -207,21 +297,18 @@ const cancel = (e) => {
|
|||
color: #FBFBFB !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cgText {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.text2{
|
||||
|
||||
.text2 {
|
||||
margin-left: 12rpx;
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
color: #C9F6F5 !important;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
color: #C9F6F5 !important;
|
||||
}
|
||||
</style>
|
|
@ -104,7 +104,7 @@ const afterRead = async (event) => {
|
|||
url: store.state.user.QNDomain + result,
|
||||
furl: result
|
||||
});
|
||||
emit("update:modelValue", fileList1.value);
|
||||
emit("update:modelValue", listToString(fileList1.value));
|
||||
fileListLen++;
|
||||
} catch (error) {
|
||||
console.error("上传失败:", error);
|
||||
|
@ -219,7 +219,7 @@ const typeInfo = () => {
|
|||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
strs += list[i].furl + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<!-- 话题 -->
|
||||
<view class="center-content-post">
|
||||
<view class="center-content-post" @click="toPostInfoView()">
|
||||
<view class="center-content-post-padding">
|
||||
<view class="center-content-post-head">
|
||||
<!-- 左对齐 -->
|
||||
|
@ -18,8 +18,8 @@
|
|||
</view>
|
||||
<!-- 右对齐 -->
|
||||
<view class="flex alignCenter" v-if="postViewIndex != 0">
|
||||
<text class="no-focus-text" v-if="postValue.isFocus" @click="addFocus(index)">关注</text>
|
||||
<text class="focus-text" v-else @click="cancelFocus()">已关注</text>
|
||||
<text class="no-focus-text" v-if="postValue.isFocus" @click.stop="addFocus(index)">关注</text>
|
||||
<text class="focus-text" v-else @click.stop="cancelFocus()">已关注</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="center-content-post-title" v-if="postValue.title">{{postValue.title}}</text>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<!--一张图片-->
|
||||
<block v-if="postValue.media.length == 1">
|
||||
<image :lazy-load="true" mode="aspectFill" class="img-style-1" :src="postValue.media[0]"
|
||||
@tap="previewImage(postValue.media[0], postValue.media)"></image>
|
||||
@tap.stop="previewImage(postValue.media[0], postValue.media)"></image>
|
||||
</block>
|
||||
<!--二张图片-->
|
||||
<block v-if="postValue.media.length == 2">
|
||||
|
@ -62,7 +62,7 @@
|
|||
<view class="flex alignCenter">
|
||||
<view v-if="postValue.isLike" class="p-item" @click.stop="cancelCollection()">
|
||||
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-8.png" mode=""></image>
|
||||
<text class="count">{{ postValue.likeCount }}</text>
|
||||
<text class="count-like">{{ postValue.likeCount }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 靠右对齐 -->
|
||||
|
@ -80,7 +80,7 @@
|
|||
<!-- 靠右对齐 -->
|
||||
<view class="p-item margin50" v-if="postValue.ifFavorite" @click.stop="cancelFavorite()">
|
||||
<image style="width: 40rpx; height: 40rpx;" src="../static/images/icon/tu3-2.png" mode=""></image>
|
||||
<text class="count">{{ postValue.favoriteCount }}</text>
|
||||
<text class="count-favorite">{{ postValue.favoriteCount }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 靠右对齐 -->
|
||||
|
@ -91,7 +91,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line></u-line>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -128,6 +127,13 @@
|
|||
// favoriteCount: 136
|
||||
// }
|
||||
// );
|
||||
const { proxy } = getCurrentInstance();
|
||||
const toPostInfoView = () => {
|
||||
if(props.postViewType == 1) {
|
||||
return;
|
||||
}
|
||||
proxy.$tab.navigateTo('/pages/post/postInfo/postInfo')
|
||||
}
|
||||
|
||||
const previewImage = (url, urls) => {
|
||||
uni.previewImage({
|
||||
|
@ -170,7 +176,7 @@
|
|||
.center-content-post {
|
||||
}
|
||||
.center-content-post-padding {
|
||||
padding: 46rpx 32rpx;
|
||||
padding: 46rpx 32rpx 28rpx 32rpx;
|
||||
}
|
||||
.center-content-post-head {
|
||||
display: flex;
|
||||
|
@ -238,7 +244,7 @@
|
|||
font-weight: 400;
|
||||
/* width: 670rpx; */
|
||||
// height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
color: #333333;
|
||||
margin-top: 18rpx;
|
||||
|
@ -253,7 +259,7 @@
|
|||
font-weight: 400;
|
||||
/* width: 670rpx; */
|
||||
// height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
color: #333333;
|
||||
margin-top: 18rpx;
|
||||
|
@ -278,11 +284,12 @@
|
|||
|
||||
.center-content-post-tab{
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.post-list-bottom {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
}
|
||||
|
@ -326,6 +333,30 @@
|
|||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.count-like{
|
||||
font-weight: 400;
|
||||
width: 48rpx;
|
||||
/* height: 23rpx; */
|
||||
font-size: 28rpx;
|
||||
text-align: left;
|
||||
color: #FA3939;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.count-favorite{
|
||||
font-weight: 400;
|
||||
width: 48rpx;
|
||||
/* height: 23rpx; */
|
||||
font-size: 28rpx;
|
||||
text-align: left;
|
||||
color: #FFC729;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.avatar-1 {
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,10 @@ const bgColor = ref('');
|
|||
bgColor.value = 'rgba(170, 0, 0, 0)'
|
||||
|
||||
const leftClick = () => {
|
||||
proxy.$tab.navigateBack(1)
|
||||
proxy.$tab.switchTab("/pages/index")
|
||||
}
|
||||
const publish = () => {
|
||||
proxy.$tab.switchTab("/pages/index")
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
<view class="" v-for="(postItem, postIndex) in postList" :key="postIndex">
|
||||
<PostView :postValue="postItem" :postViewIndex="viewIndex" :postViewType="0"></PostView>
|
||||
<u-line></u-line>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
@ -245,7 +246,10 @@ import PostView from "@/pages/common/postview/index.vue";
|
|||
]);
|
||||
|
||||
const publishTalk = (item) => {
|
||||
console.log()
|
||||
if(item.id === 1){
|
||||
//todo 判断用户是否有增加活动的接口调用权限
|
||||
proxy.$tab.navigateTo('/pages/post/postPublish/postPublish')
|
||||
}
|
||||
if(item.id === 2){
|
||||
//todo 判断用户是否有增加活动的接口调用权限
|
||||
proxy.$tab.navigateTo('/pages/activity/publish')
|
||||
|
@ -530,22 +534,6 @@ import PostView from "@/pages/common/postview/index.vue";
|
|||
border-color: #91b4ff;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.avatar-1 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.official-1 {
|
||||
position: absolute;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
display: inline-block;
|
||||
position: relative; /* 设置父元素为相对定位 */
|
||||
|
|
|
@ -0,0 +1,512 @@
|
|||
<template>
|
||||
<view>
|
||||
<PostView :postValue="postValue" :postViewIndex="1" :postViewType="1"></PostView>
|
||||
<view class="center-content-focus-line"></view>
|
||||
<view class="comment">
|
||||
<view class="flex justifyBetween alignCenter commentTop">
|
||||
<text class="commentLabel">全部评论</text>
|
||||
<text class="report">举报</text>
|
||||
</view>
|
||||
<view v-if="!postList" class="no-comment">
|
||||
<image class="no-comment-img" src="../../../static/images/icon/no_comment.png" mode=""></image>
|
||||
<text class="no-comment-text">暂无评论,快去做评论第一人吧!</text>
|
||||
<view class="no-comment-bt">
|
||||
<text class="no-comment-bt-text">快去抢沙发</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="have-comment" v-for="(item, index) in postList" :key="index">
|
||||
<view class="flex alignCenter">
|
||||
<!-- 头像 -->
|
||||
<view class="have-comment-avatar-container">
|
||||
<u-avatar class="have-comment-avatar-1" size="60rpx" :src="item.avatar"></u-avatar>
|
||||
<image v-if="item.isOfficial" class="have-comment-official-1" src="../../../static/images/icon/tu3-6.png"></image>
|
||||
</view>
|
||||
<view class="flex flexColumn">
|
||||
<text class="have-comment-uname">{{item.uname}}</text>
|
||||
<text class="have-comment-address">{{item.address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="have-comment-content">
|
||||
<text class="have-comment-content-text-1">{{item.content}}</text>
|
||||
<view class="have-comment-content-text-2">
|
||||
<text>{{item.createTime}}</text>
|
||||
<text class="have-comment-content-text-2-hf" @click="toAnswer(item.uname)">回复</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="item.answerCommentList.length != 0">
|
||||
<text v-if="!item.isDeployment" class="deploymentAnswer-text" @click="deploymentAnswer(index)">---展开回复</text>
|
||||
<view v-if="item.isDeployment" class="have-comment-answer" v-for="answer in item.answerCommentList" :key="answer">
|
||||
<view class="flex alignCenter">
|
||||
<!-- 头像 -->
|
||||
<view class="have-comment-answer-avatar-container">
|
||||
<u-avatar class="have-comment-answer-avatar-1" size="48rpx" :src="answer.avatar"></u-avatar>
|
||||
<image v-if="answer.isOfficial" class="have-comment-answer-official-1" src="../../../static/images/icon/tu3-6.png"></image>
|
||||
</view>
|
||||
<text class="have-comment-answer-uname">{{answer.uname}}</text>
|
||||
<text v-if="answer.toUserName" class="have-comment-answer-uname">-></text>
|
||||
<text v-if="answer.toUserName" class="have-comment-answer-uname">{{answer.toUserName}}</text>
|
||||
</view>
|
||||
<view class="have-comment-answer-content">
|
||||
<text class="have-comment-answer-content-text-1">{{answer.content}}</text>
|
||||
<view class="have-comment-answer-content-text-2">
|
||||
<text>{{answer.createTime}}</text>
|
||||
<text class="have-comment-answer-content-text-2-hf" @click="toAnswer(answer.uname)">回复</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text v-if="item.isDeployment" class="deploymentAnswer-text" @click="putAnswer(index)">---收起</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 评论区输入框 -->
|
||||
<up-popup :show="showInput" duration="0" @close="close" @open="open" class="comment-po">
|
||||
<view class="flex justifyBetween comment-input" :style="{ paddingBottom: bottomVal + 'px' }">
|
||||
<view class="input-in flex alignCenter justifyCenter">
|
||||
<input class="input-in-text" v-if="showInputText" focus="true" maxlength="55" :placeholder="placeholderInput" :adjust-position="false" />
|
||||
</view>
|
||||
<view class="input-bt flex alignCenter justifyCenter">
|
||||
<text class="input-bt-text">发送</text>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
<!-- 底部操作栏 -->
|
||||
<up-tabbar
|
||||
:fixed="true"
|
||||
:placeholder="true"
|
||||
:safeAreaInsetBottom="true"
|
||||
>
|
||||
<!-- <view class="flex justifyCenter"> -->
|
||||
<view class="flex alignCenter justifyCenter">
|
||||
<view class="flex justifyCenter alignCenter commentInput" @click="toInput()">
|
||||
<image class="commentInput-img" src="../../../static/logo.png" mode=""></image>
|
||||
<text class="commentInput-text">友好评论~</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="postValue.isLike" @click.stop="cancelCollection()" class="flex alignCenter justifyCenter flexColumn">
|
||||
<image class="commentInput-img" src="../../../static/images/icon/tu3-8.png" mode=""></image>
|
||||
<text class="commentInput-txt-like">{{postValue.likeCount}}</text>
|
||||
</view>
|
||||
<view v-if="!postValue.isLike" @click.stop="addCollection()" class="flex alignCenter justifyCenter flexColumn">
|
||||
<image class="commentInput-img" src="../../../static/images/icon/tu3-7.png" mode=""></image>
|
||||
<text class="commentInput-txt">{{postValue.likeCount}}</text>
|
||||
</view>
|
||||
|
||||
<view v-if="postValue.ifFavorite" @click.stop="cancelFavorite()" class="flex alignCenter justifyCenter flexColumn">
|
||||
<image class="commentInput-img" src="../../../static/images/icon/tu3-2.png" mode=""></image>
|
||||
<text class="commentInput-txt-favorite">{{postValue.favoriteCount}}</text>
|
||||
</view>
|
||||
<view v-if="!postValue.ifFavorite" @click.stop="addFavorite()" class="flex alignCenter justifyCenter flexColumn">
|
||||
<image class="commentInput-img" src="../../../static/images/icon/tu3-1.png" mode=""></image>
|
||||
<text class="commentInput-txt">{{postValue.favoriteCount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alignCenter justifyCenter flexColumn">
|
||||
<image class="commentInput-img" src="../../../static/images/icon/tu2-9.png" mode=""></image>
|
||||
<text class="commentInput-txt">转发</text>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
</up-tabbar>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted, getCurrentInstance } from 'vue';
|
||||
import PostView from "@/pages/common/postview/index.vue";
|
||||
|
||||
const bottomVal = ref(0);
|
||||
|
||||
// 监听键盘高度变化
|
||||
uni.onKeyboardHeightChange(res => {
|
||||
if(res.height == 0) {
|
||||
bottomVal.value = 0;
|
||||
return;
|
||||
}
|
||||
bottomVal.value = res.height - 20;
|
||||
console.log(bottomVal.value)
|
||||
});
|
||||
|
||||
const postList = reactive([{
|
||||
avatar: 'https://k.sinaimg.cn/n/sports/transform/400/w600h600/20220130/dd38-eed53ba750d1d8c87eca8b57eda879a5.jpg/w700d1q75cms.jpg?by=cms_fixed_width',
|
||||
uname: '爱吃饭的小张',
|
||||
address: '南开大学',
|
||||
content: '大家来评论',
|
||||
createTime: '7分钟前',
|
||||
isOfficial: true,
|
||||
isDeployment: false,
|
||||
answerCommentList: [{
|
||||
avatar: 'https://picx.zhimg.com/v2-02f89d05a781ffed9fd2e32654d93135_720w.jpg?source=172ae18b',
|
||||
uname: '恋爱60秒',
|
||||
createTime: '2024.05.04',
|
||||
isOfficial: false,
|
||||
address: '理工大学',
|
||||
content: '来了',
|
||||
},
|
||||
{
|
||||
avatar: 'https://oss.1381801.com/forum/202308/11/093616ccxkx99wchwrrw1a.jpg',
|
||||
uname: '喜欢你没道理',
|
||||
createTime: '2024.05.04',
|
||||
isOfficial: false,
|
||||
address: '理工大学',
|
||||
content: '你干嘛~',
|
||||
toUserName: '恋爱60秒',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
avatar: 'https://picx.zhimg.com/v2-02f89d05a781ffed9fd2e32654d93135_720w.jpg?source=172ae18b',
|
||||
uname: '恋爱60秒',
|
||||
createTime: '2024.05.04',
|
||||
isOfficial: false,
|
||||
isDeployment: false,
|
||||
address: '理工大学',
|
||||
content: '评论区上线了',
|
||||
answerCommentList: []
|
||||
}]);
|
||||
|
||||
const postValue = reactive(
|
||||
{
|
||||
avatar: 'https://k.sinaimg.cn/n/sports/transform/400/w600h600/20220130/dd38-eed53ba750d1d8c87eca8b57eda879a5.jpg/w700d1q75cms.jpg?by=cms_fixed_width',
|
||||
uname: '爱吃饭的小张',
|
||||
createTime: '11分钟前',
|
||||
address: '南开大学',
|
||||
isFocus: false,
|
||||
isOfficial: true,
|
||||
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?',
|
||||
content: '八年前,学弟在工地上杀了一个工友,上杀了一个工友,杀人前,他给警察打了电话,预告杀人的时间和地点,和地点,并......',
|
||||
type: '1',
|
||||
media: [
|
||||
'https://tu.sioe.cn/gj/qiege/image.jpg',
|
||||
'https://picx.zhimg.com/v2-3b4fc7e3a1195a081d0259246c38debc_720w.jpg?source=172ae18b',
|
||||
'https://bpic.51yuansu.com/backgd/cover/00/63/09/64b52b1426fff_800.jpg?x-oss-process=image/resize,w_780/sharpen,100',
|
||||
'https://tu.sioe.cn/gj/qiege/image.jpg',
|
||||
],
|
||||
tab: ['学术讨论组', '校园风景'],
|
||||
transmitCount: 136,
|
||||
isLike: true,
|
||||
likeCount: 999,
|
||||
commentCount: 136,
|
||||
ifFavorite: true,
|
||||
favoriteCount: 136
|
||||
}
|
||||
);
|
||||
|
||||
const placeholderInput = ref('')
|
||||
|
||||
// 创建响应式数据
|
||||
const showInput = ref(false);
|
||||
const showInputText = ref(false)
|
||||
// 定义方法
|
||||
function open() {
|
||||
// 打开逻辑,比如设置 show 为 true
|
||||
showInput.value = true;
|
||||
setTimeout(() => {
|
||||
showInputText.value = true;
|
||||
}, 50);
|
||||
// console.log('open');
|
||||
}
|
||||
|
||||
function close() {
|
||||
// 关闭逻辑,设置 show 为 false
|
||||
showInput.value = false;
|
||||
showInputText.value = false;
|
||||
// console.log('close');
|
||||
}
|
||||
|
||||
const toInput = () => {
|
||||
placeholderInput.value = '发布评论'
|
||||
open();
|
||||
}
|
||||
|
||||
const toAnswer = (toUser) => {
|
||||
placeholderInput.value = '回复:' + toUser;
|
||||
open();
|
||||
}
|
||||
|
||||
const cancelCollection = () => {
|
||||
postValue.likeCount -= 1;
|
||||
postValue.isLike = !postValue.isLike;
|
||||
};
|
||||
|
||||
const addCollection = () => {
|
||||
postValue.likeCount += 1;
|
||||
postValue.isLike = !postValue.isLike;
|
||||
};
|
||||
|
||||
const cancelFavorite = () => {
|
||||
postValue.favoriteCount -= 1;
|
||||
postValue.ifFavorite = !postValue.ifFavorite;
|
||||
};
|
||||
|
||||
const addFavorite = () => {
|
||||
postValue.favoriteCount += 1;
|
||||
postValue.ifFavorite = !postValue.ifFavorite;
|
||||
};
|
||||
|
||||
const deploymentAnswer = (index) => {
|
||||
postList[index].isDeployment = true;
|
||||
};
|
||||
|
||||
const putAnswer = (index) => {
|
||||
postList[index].isDeployment = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.data-v-6fcabaad {
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx !important;
|
||||
/* width: 200rpx !important;
|
||||
height: 200rpx !important; */
|
||||
}
|
||||
|
||||
.center-content-focus-line{
|
||||
height: 8rpx;
|
||||
background: #f4f5f6;
|
||||
}
|
||||
|
||||
.comment{
|
||||
padding: 32rpx;
|
||||
}
|
||||
|
||||
.commentLabel{
|
||||
font-weight: 400;
|
||||
/* width: 265rpx; */
|
||||
/* height: 38rpx; */
|
||||
font-size: 36rpx;
|
||||
/* text-align: left; */
|
||||
color: #000000;
|
||||
|
||||
}
|
||||
|
||||
.report{
|
||||
font-weight: 400;
|
||||
/* width: 52rpx; */
|
||||
/* height: 26rpx; */
|
||||
font-size: 26rpx;
|
||||
/* text-align: left; */
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.no-comment {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center; /* 水平居中 */
|
||||
justify-content: center; /* 垂直居中 */
|
||||
}
|
||||
|
||||
.no-comment-img{
|
||||
margin-top: 44rpx;
|
||||
width: 200rpx;
|
||||
height: 145rpx;
|
||||
}
|
||||
|
||||
.no-comment-text{
|
||||
margin-top: 8rpx;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.no-comment-bt{
|
||||
margin-top: 36rpx;
|
||||
width: 308rpx;
|
||||
height: 82rpx;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
border-width: 2rpx;
|
||||
border-color: #C9F6F5;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
align-items: center; /* 垂直居中 */
|
||||
justify-content: center; /* 水平居中 */
|
||||
}
|
||||
|
||||
.no-comment-bt-text{
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #CBF6F5;
|
||||
}
|
||||
|
||||
.commentInput{
|
||||
width: 364rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
background: #f7f8fa;
|
||||
}
|
||||
|
||||
.commentInput-img{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.commentInput-text{
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.commentInput-txt{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #787878;
|
||||
}
|
||||
|
||||
.commentInput-txt-like{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FA3939;
|
||||
}
|
||||
|
||||
.commentInput-txt-favorite{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FFC729;
|
||||
}
|
||||
|
||||
.have-comment{
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.have-comment-avatar-container {
|
||||
position: relative;
|
||||
width: 60rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.have-comment-avatar-1 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.have-comment-official-1 {
|
||||
position: absolute;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.have-comment-uname{
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.have-comment-address{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.have-comment-content{
|
||||
margin-left: 80rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.have-comment-content-text-1 {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.have-comment-content-text-2 {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.have-comment-content-text-2-hf {
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
|
||||
.have-comment-answer{
|
||||
margin-top: 24rpx;
|
||||
margin-left: 80rpx;
|
||||
}
|
||||
|
||||
.have-comment-answer-avatar-container {
|
||||
position: relative;
|
||||
width: 48rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.have-comment-answer-avatar-1 {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.have-comment-answer-official-1 {
|
||||
position: absolute;
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.have-comment-answer-uname{
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.have-comment-answer-content{
|
||||
margin-left: 80rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.have-comment-answer-content-text-1 {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.have-comment-answer-content-text-2 {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.have-comment-answer-content-text-2-hf {
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
|
||||
.deploymentAnswer-text{
|
||||
margin-left: 80rpx;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.input-in{
|
||||
width: 560rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 37rpx 37rpx 37rpx 37rpx;
|
||||
background: #f7f8fa;
|
||||
}
|
||||
|
||||
.input-in-text{
|
||||
width: 520rpx;
|
||||
}
|
||||
|
||||
.input-bt{
|
||||
width: 120rpx;
|
||||
height: 74rpx;
|
||||
border-radius: 37rpx 37rpx 37rpx 37rpx;
|
||||
background: #3477fc;
|
||||
}
|
||||
|
||||
.input-text{
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.comment-input{
|
||||
padding: 24rpx;
|
||||
// margin-bottom: 800rpx;
|
||||
}
|
||||
|
||||
.comment-po{
|
||||
// height: 500rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
|
||||
<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>
|
||||
<view class="bgc"></view>
|
||||
<view class="cardz">
|
||||
<view class="titleInfo">
|
||||
<up-input placeholder="输入标题会更受欢迎奥~(5~20个字)" v-model="title" border="none" maxlength="20" fontSize="34rpx"
|
||||
color="#C0C0C0" clearable></up-input>
|
||||
<view class="xian"></view>
|
||||
</view>
|
||||
<view class="contentInfo">
|
||||
<up-textarea v-model="content" placeholder="输入你想发布的内容吧
图片精美、有看点的内容更容易获得推荐(最多发布8张照片)
安全指南:请勿发布带有个人信息(如:住址)" count border="none" height="270" maxlength="200"
|
||||
placeholderStyle="color: #c0c0c0;font-size: 30rpx; background:none;"></up-textarea>
|
||||
</view>
|
||||
<view class="cardzfile">
|
||||
<fileUpload v-model="fileList1" :fileTypeInfo="fileTypeInfo1"></fileUpload>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cardx">
|
||||
<up-cell-group :border="false">
|
||||
<up-cell :isLink="true" :center="true">
|
||||
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image :src="tu52" style="width: 30rpx; height: 32rpx;"></image>
|
||||
<span>添加话题(最多可添加2条)</span>
|
||||
</template>
|
||||
</up-cell>
|
||||
<!-- <up-cell :isLink="true" :center="true">
|
||||
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image :src="tu53" style="width: 30rpx; height: 32rpx;"></image>
|
||||
<span>请选择活动结束时间</span>
|
||||
</template>
|
||||
</up-cell> -->
|
||||
<up-cell :border="false" :isLink="true" :center="true">
|
||||
<template #title style="margin-top: 2rpx;width: 100%;height: 30rpx;display: flex;align-items: center;">
|
||||
<image :src="tu51" style="width: 30rpx; height: 32rpx;"></image>
|
||||
<span>添加定位</span>
|
||||
</template>
|
||||
</up-cell>
|
||||
</up-cell-group>
|
||||
</view>
|
||||
<view class="cardxx">
|
||||
<up-button color="#C9F6F5" size="large" shape="circle" @click="publish"><span
|
||||
class="fbText">发布</span></up-button>
|
||||
<view style="width: 26rpx;height: 80rpx;"></view>
|
||||
<up-button color="#F8F8E3" size="large" shape="circle" @click="draft" style="margin-left: 26rpx;"><span
|
||||
class="cgText">存草稿</span></up-button>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import fileUpload from '@/pages/common/file/fileUpload'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||
import { useStore } from 'vuex';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const iconConfig = proxy.iconConfig;
|
||||
const tu51 = iconConfig.tu51;
|
||||
const tu52 = iconConfig.tu52;
|
||||
const tu53 = iconConfig.tu53;
|
||||
const title = ref('')
|
||||
const content = ref('');
|
||||
const fileList1 = ref([])
|
||||
const fileTypeInfo1 = ref('image')
|
||||
const bgColor = ref('');
|
||||
bgColor.value = 'rgba(170, 0, 0, 0)'
|
||||
|
||||
onLoad((options) => {
|
||||
console.log("页面参数:", options.id);
|
||||
})
|
||||
const leftClick = () => {
|
||||
proxy.$tab.navigateBack(1)
|
||||
}
|
||||
const draft = () => {
|
||||
console.log("存草稿");
|
||||
}
|
||||
const publish = () => {
|
||||
console.log("发布");
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
.navbarcenter {
|
||||
font-weight: 400;
|
||||
|
||||
font-size: 36rpx;
|
||||
text-align: left;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.bgc {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
background: linear-gradient(-180deg, #c9f6f5, #ffffff);
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.cardz {
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
|
||||
.titleInfo {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.xian {
|
||||
margin-top: 32rpx;
|
||||
height: 2rpx;
|
||||
border-radius: 1rpx 1rpx 1rpx 1rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.contentInfo {
|
||||
margin-top: 46rpx;
|
||||
}
|
||||
|
||||
.cardzfile {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.cardx {
|
||||
background-color: #FFFFFF;
|
||||
padding-top: 72rpx;
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
|
||||
.c1 {
|
||||
margin-top: 2rpx;
|
||||
width: 100%;
|
||||
height: 102rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.cardxx {
|
||||
display: flex;
|
||||
margin-left: 32rpx;
|
||||
margin-right: 32rpx;
|
||||
margin-top: 80rpx;
|
||||
|
||||
.fbText {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #FBFBFB !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.cgText {
|
||||
font-weight: 400;
|
||||
font-size: 30rpx;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
Loading…
Reference in New Issue