增加一下倒叙查询

main
26947 2024-06-11 19:15:45 +08:00
parent dba4402115
commit 628ee19269
2 changed files with 47 additions and 25 deletions

View File

@ -14,7 +14,8 @@
<view class="titleInfo"> <view class="titleInfo">
<up-form-item label="" prop="acTitle" borderBottom> <up-form-item label="" prop="acTitle" borderBottom>
<up-input placeholder="输入活动标题~5~20个字" v-model="form.acTitle" border="none" maxlength="20" <up-input placeholder="输入活动标题~5~20个字" v-model="form.acTitle" border="none" maxlength="20"
fontSize="34rpx" color="#333333" clearable placeholderStyle="color: #c0c0c0;font-size: 34rpx;"></up-input> fontSize="34rpx" color="#333333" clearable
placeholderStyle="color: #c0c0c0;font-size: 34rpx;"></up-input>
</up-form-item> </up-form-item>
<view class="xian"></view> <view class="xian"></view>
</view> </view>
@ -23,10 +24,8 @@
<textarea class="text_style" v-model="form.acContent" <textarea class="text_style" v-model="form.acContent"
placeholder="输入活动内容\n活动图片最多可发布两张\n输入准确定位可以更好提供活动信息奥\n安全指南请勿发布带有个人信息住址\n" cols="50" placeholder="输入活动内容\n活动图片最多可发布两张\n输入准确定位可以更好提供活动信息奥\n安全指南请勿发布带有个人信息住址\n" cols="50"
rows="10" maxlength="500" rows="10" maxlength="500"
placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap;" placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap;" color="#333333"
color="#333333" fontSize="30rpx" @linechange="inputtextInfo"></textarea>
fontSize="30rpx"
@linechange="inputtextInfo"></textarea>
<view class="char-count">{{ form.acContent.length }}/500</view> <view class="char-count">{{ form.acContent.length }}/500</view>
</up-form-item> </up-form-item>
</view> </view>
@ -88,12 +87,12 @@
format="YYYY-MM-DD HH:mm:ss" @cancel="cancel" mode="datetime"></up-datetime-picker> format="YYYY-MM-DD HH:mm:ss" @cancel="cancel" mode="datetime"></up-datetime-picker>
<view class="cardxx"> <view class="cardxx">
<view class="cardxx-btn" @click="publish"> <view class="cardxx-btn" @click="publish">
发布 发布
</view> </view>
<view class="cardxx-btn cgText" @click="draft"> <view class="cardxx-btn cgText" @click="draft">
存草稿 存草稿
</view> </view>
</view> </view>
</up-form> </up-form>
</template> </template>
@ -142,7 +141,6 @@ const data = reactive({
{ required: true, message: '请选择活动结束时间', trigger: 'change' }, { required: true, message: '请选择活动结束时间', trigger: 'change' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
console.log(form.value.startTime, " ", value, " ", value <= form.value.startTime)
if (value <= form.value.startTime) { if (value <= form.value.startTime) {
callback(proxy.$modal.msgError('时间选择错误')); callback(proxy.$modal.msgError('时间选择错误'));
} else { } else {
@ -172,7 +170,7 @@ const timeFormat = uni.$u.timeFormat;
// //
const uFormRef = ref(null); const uFormRef = ref(null);
onLoad((options) => { onLoad((options) => {
console.log("页面参数:", options.id);
}) })
const leftClick = () => { const leftClick = () => {
@ -206,16 +204,12 @@ const submitForm = (type) => {
if (uFormRef.value) { if (uFormRef.value) {
uFormRef.value.validate().then(valid => { uFormRef.value.validate().then(valid => {
if (valid) { if (valid) {
console.log('表单验证通过:', form.value);
proxy.$modal.loading('正在提交数据,请稍候...'); proxy.$modal.loading('正在提交数据,请稍候...');
// //
if (type === 'publish') { if (type === 'publish') {
console.log("调用发布接口", form.value);
// //
addInfo(form.value).then(response => { addInfo(form.value).then(response => {
proxy.$modal.closeLoading(); rotation(response.data.id);
proxy.$modal.msgSuccess("发布成功");
proxy.$tab.navigateTo('/pages/common/talkState/publish')
}); });
} else { } else {
// 稿 // 稿
@ -234,13 +228,38 @@ const submitForm = (type) => {
console.log('表单引用未定义'); 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) => { const startTime = (e) => {
showStartTime.value = !showStartTime.value showStartTime.value = !showStartTime.value
} }
const confirm1 = (e) => { const confirm1 = (e) => {
console.log(e);
showtext1.value = false; showtext1.value = false;
StartTime.value = e.value StartTime.value = e.value
form.value.startTime = timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss'); form.value.startTime = timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
@ -248,7 +267,6 @@ const confirm1 = (e) => {
} }
const confirm2 = (e) => { const confirm2 = (e) => {
console.log(e);
showtext2.value = false; showtext2.value = false;
EndTime.value = e.value EndTime.value = e.value
form.value.endTime = timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss'); form.value.endTime = timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
@ -261,9 +279,10 @@ const cancel = (e) => {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page{ page {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.navbarcenter { .navbarcenter {
font-weight: 400; font-weight: 400;
font-size: 36rpx; font-size: 36rpx;
@ -304,14 +323,14 @@ page{
width: 100%; width: 100%;
overflow: auto; overflow: auto;
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
line-height: 46rpx; line-height: 46rpx;
} }
.char-count { .char-count {
z-index:1; z-index: 1;
text-align: right; text-align: right;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
@ -345,7 +364,8 @@ page{
margin-top: 80rpx; margin-top: 80rpx;
justify-content: space-between; justify-content: space-between;
padding-bottom: 32rpx; padding-bottom: 32rpx;
.cardxx-btn{
.cardxx-btn {
width: 330rpx; width: 330rpx;
height: 80rpx; height: 80rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx; border-radius: 40rpx 40rpx 40rpx 40rpx;
@ -357,6 +377,7 @@ page{
align-items: center; align-items: center;
color: #FBFBFB; color: #FBFBFB;
} }
.cgText { .cgText {
background-color: #F8F8E3; background-color: #F8F8E3;
color: #999999; color: #999999;
@ -370,8 +391,9 @@ page{
text-align: left; text-align: left;
color: #C9F6F5 !important; color: #C9F6F5 !important;
} }
.btnInfo1{
.btnInfo1 {
width: 330rpx !important; width: 330rpx !important;
height: 80rpx !important; height: 80rpx !important;
} }
</style> </style>

View File

@ -24,7 +24,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="qrcode" v-if="actiInfoList.state == '2'"> <view class="qrcode" v-if="actiInfoList.state == '2' & actiInfoList.auditStatus == 0 ">
<image :src="basetoimg(actiInfoList.acQrcode)" style="width: 200rpx; height: 200rpx;" <image :src="basetoimg(actiInfoList.acQrcode)" style="width: 200rpx; height: 200rpx;"
@click="showqr = true"> @click="showqr = true">
</image> </image>