From 628ee1926942d01758e141fb0b5393a175968240 Mon Sep 17 00:00:00 2001
From: 26947 <12@1>
Date: Tue, 11 Jun 2024 19:15:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=8B=E5=80=92?=
=?UTF-8?q?=E5=8F=99=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/activity/publish.vue | 70 ++++++++++++++++++++++------------
pages/mine/myActivity/info.vue | 2 +-
2 files changed, 47 insertions(+), 25 deletions(-)
diff --git a/pages/activity/publish.vue b/pages/activity/publish.vue
index 7e18eec..03e41a4 100644
--- a/pages/activity/publish.vue
+++ b/pages/activity/publish.vue
@@ -14,7 +14,8 @@
+ fontSize="34rpx" color="#333333" clearable
+ placeholderStyle="color: #c0c0c0;font-size: 34rpx;">
@@ -23,10 +24,8 @@
+ placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap;" color="#333333"
+ fontSize="30rpx" @linechange="inputtextInfo">
{{ form.acContent.length }}/500
@@ -88,12 +87,12 @@
format="YYYY-MM-DD HH:mm:ss" @cancel="cancel" mode="datetime">
-
+
发布
-
-
+
+
存草稿
-
+
@@ -142,7 +141,6 @@ const data = reactive({
{ 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 {
@@ -172,7 +170,7 @@ const timeFormat = uni.$u.timeFormat;
// 表单引用
const uFormRef = ref(null);
onLoad((options) => {
- console.log("页面参数:", options.id);
+
})
const leftClick = () => {
@@ -206,16 +204,12 @@ 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')
+ rotation(response.data.id);
});
} else {
// 调用存草稿接口
@@ -234,13 +228,38 @@ const submitForm = (type) => {
console.log('表单引用未定义');
}
}
+//轮训
+const rotation = (id) => {
+ setTimeout(() => {
+ getInfo(id).then(response => {
+ if (response.data.auditStatus === 3 | response.data.auditStatus === 4) {
+ proxy.$modal.closeLoading();
+ proxy.$modal.msgError("审核失败");
+ proxy.$tab.navigateTo('/pages/common/talkState/auditFailure')
+ }else if(response.data.auditStatus === 2){
+ proxy.$modal.closeLoading();
+ proxy.$modal.msgSuccess("审核中~");
+ proxy.$tab.navigateTo('/pages/common/talkState/audit')
+ }else if(response.data.auditStatus === 0){
+ proxy.$modal.closeLoading();
+ proxy.$modal.msgSuccess("发布成功");
+ proxy.$tab.navigateTo('/pages/common/talkState/publis')
+ }
+
+ else {
+ rotation(id);
+ }
+ });
+ }, 1000);
+}
+
+
const startTime = (e) => {
showStartTime.value = !showStartTime.value
}
const confirm1 = (e) => {
- console.log(e);
showtext1.value = false;
StartTime.value = e.value
form.value.startTime = timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
@@ -248,7 +267,6 @@ const confirm1 = (e) => {
}
const confirm2 = (e) => {
- console.log(e);
showtext2.value = false;
EndTime.value = e.value
form.value.endTime = timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
@@ -261,9 +279,10 @@ const cancel = (e) => {
}
diff --git a/pages/mine/myActivity/info.vue b/pages/mine/myActivity/info.vue
index f14aa21..d825613 100644
--- a/pages/mine/myActivity/info.vue
+++ b/pages/mine/myActivity/info.vue
@@ -24,7 +24,7 @@
-
+