增加一下倒叙查询

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">
<up-form-item label="" prop="acTitle" borderBottom>
<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>
<view class="xian"></view>
</view>
@ -23,10 +24,8 @@
<textarea class="text_style" v-model="form.acContent"
placeholder="输入活动内容\n活动图片最多可发布两张\n输入准确定位可以更好提供活动信息奥\n安全指南请勿发布带有个人信息住址\n" cols="50"
rows="10" maxlength="500"
placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap;"
color="#333333"
fontSize="30rpx"
@linechange="inputtextInfo"></textarea>
placeholderStyle="color: #c0c0c0;font-size: 30rpx; white-space: pre-wrap;" color="#333333"
fontSize="30rpx" @linechange="inputtextInfo"></textarea>
<view class="char-count">{{ form.acContent.length }}/500</view>
</up-form-item>
</view>
@ -88,12 +87,12 @@
format="YYYY-MM-DD HH:mm:ss" @cancel="cancel" mode="datetime"></up-datetime-picker>
<view class="cardxx">
<view class="cardxx-btn" @click="publish">
<view class="cardxx-btn" @click="publish">
发布
</view>
<view class="cardxx-btn cgText" @click="draft">
</view>
<view class="cardxx-btn cgText" @click="draft">
存草稿
</view>
</view>
</view>
</up-form>
</template>
@ -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) => {
}
</script>
<style lang="scss">
page{
page {
background-color: #FFFFFF;
}
.navbarcenter {
font-weight: 400;
font-size: 36rpx;
@ -311,7 +330,7 @@ page{
}
.char-count {
z-index:1;
z-index: 1;
text-align: right;
font-size: 24rpx;
color: #999999;
@ -345,7 +364,8 @@ page{
margin-top: 80rpx;
justify-content: space-between;
padding-bottom: 32rpx;
.cardxx-btn{
.cardxx-btn {
width: 330rpx;
height: 80rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx;
@ -357,6 +377,7 @@ page{
align-items: center;
color: #FBFBFB;
}
.cgText {
background-color: #F8F8E3;
color: #999999;
@ -370,7 +391,8 @@ page{
text-align: left;
color: #C9F6F5 !important;
}
.btnInfo1{
.btnInfo1 {
width: 330rpx !important;
height: 80rpx !important;
}

View File

@ -24,7 +24,7 @@
</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;"
@click="showqr = true">
</image>