文档中0710的bug修复

This commit is contained in:
wangzimeng 2025-07-10 18:47:30 +08:00
parent a251c2fcc1
commit b25aefce6b
5 changed files with 412 additions and 249 deletions

View File

@ -1,8 +1,8 @@
<template> <template>
<view> <view>
<view class="long-data-picker"> <view class="long-data-picker">
<picker-view indicator-class="select-line" :immediate-change="true" :indicator-style="itemHeight" <picker-view indicator-class="select-line" :immediate-change="true"
@change="bindDateChange"> :indicator-style="itemHeight" @change="bindDateChange">
<picker-view-column> <picker-view-column>
<view class="long-datetime-item" v-for="(item,index) in dates" :key="index">{{item}}</view> <view class="long-datetime-item" v-for="(item,index) in dates" :key="index">{{item}}</view>
@ -15,7 +15,7 @@
<picker-view-column> <picker-view-column>
<view class="long-datetime-item" v-for="(item,index) in minutes" :key="index">{{item}}</view> <view class="long-datetime-item" v-for="(item,index) in minutes" :key="index">{{item}}</view>
</picker-view-column> </picker-view-column>
<!-- <picker-view :key="key" ...> -->
</picker-view> </picker-view>
</view> </view>
</view> </view>
@ -49,7 +49,10 @@
minutes: [], minutes: [],
formatdates: [], formatdates: [],
currentTime: new Date(), currentTime: new Date(),
currentTimePlus8Hours: null // currentTimePlus8Hours: null, //
// valueDate: [0, 0, 0],
currentValue: [0, 0, 0], //
isInitialized: false, //
}; };
}, },
@ -132,68 +135,28 @@
console.log(''); console.log('');
}, },
// //
bindDateChange(e) { // bindDateChange(e) { //
console.log('滚动切换时间',e.detail.value); console.log('滚动切换时间',e.detail.value);
let valueArr = e.detail.value let valueArr = e.detail.value
this.hours = [] this.hours = []
this.minutes = [] this.minutes = []
if (valueArr[0] != 0) {
// valueArr[1] = 0
if (valueArr[0] != 0) { // valueArr[2] = 0
console.log('不是今天'); // e.detail.value[1] =0;
for (let i = 0; i < 24; i++) { // e.detail.value[2] =0;
let str = i; console.log('不是今天',e.detail.value);
if (i < 10) { for (let i = 0; i < 24; i++) {
str = '0' + str;
} else {
str = '' + str;
}
this.hours.push(str);
}
for (let i = 0; i < 60; i++) {
let str = i;
if (i < 10) {
str = '0' + str;
} else {
str = '' + str;
}
this.minutes.push(str);
}
} else {
//
console.log('今天',);
let h = parseInt(moment().format("HH"))
console.log('今天1h',h);
this.hours = []
for (let i = h; i < 24; i++) {
let str = i;
if (i < 10) {
str = '0' + str;
} else {
str = '' + str;
}
this.hours.push(str);
}
this.minutes = []
const current = new Date()
const currentHour = moment(current).hours();
let m = parseInt(moment().format("mm"))
console.log('今天1m',m,currentHour,h);
if(valueArr[1] == 0 ){
for (let i = m; i < 60; i++) {
let str = i; let str = i;
if (i < 10) { if (i < 10) {
str = '0' + str; str = '0' + str;
} else { } else {
str = '' + str; str = '' + str;
} }
this.minutes.push(str); this.hours.push(str);
} }
}else {
for (let i = 0; i < 60; i++) { for (let i = 0; i < 60; i++) {
let str = i; let str = i;
if (i < 10) { if (i < 10) {
@ -203,18 +166,61 @@
} }
this.minutes.push(str); this.minutes.push(str);
} }
} } else {
//
} console.log('今天',);
let h = parseInt(moment().format("HH"))
console.log('今天1h',h);
this.hours = []
for (let i = h; i < 24; i++) {
let str = i;
if (i < 10) {
str = '0' + str;
} else {
str = '' + str;
}
this.hours.push(str);
}
this.minutes = []
const current = new Date()
const currentHour = moment(current).hours();
let m = parseInt(moment().format("mm"))
console.log('今天1m',m,currentHour,h);
if(valueArr[1] == 0 ){
let dateStr = this.formatdates[valueArr[0]]; for (let i = m; i < 60; i++) {
let hourStr = this.hours[valueArr[1]]; let str = i;
let minuteStr = this.minutes[valueArr[2]]; if (i < 10) {
console.log(dateStr + ' ' + hourStr + ':' + minuteStr) str = '0' + str;
this.$emit("select", { } else {
time: moment(dateStr + ' ' + hourStr + ':' + minuteStr).format("YYYY-MM-DD HH:mm") str = '' + str;
}); }
} this.minutes.push(str);
}
}else {
for (let i = 0; i < 60; i++) {
let str = i;
if (i < 10) {
str = '0' + str;
} else {
str = '' + str;
}
this.minutes.push(str);
}
}
}
let dateStr = this.formatdates[valueArr[0]];
let hourStr = this.hours[valueArr[1]];
let minuteStr = this.minutes[valueArr[2]];
console.log(dateStr + ' ' + hourStr + ':' + minuteStr)
this.$emit("select", {
time: moment(dateStr + ' ' + hourStr + ':' + minuteStr).format("YYYY-MM-DD HH:mm")
});
},
}, },

View File

@ -464,11 +464,13 @@
deleteId: null, //id deleteId: null, //id
draftList: [], //稿 draftList: [], //稿
draftShow: false, draftShow: false,
draftCount: 0,
}; };
}, },
onLoad(option) { onLoad(option) {
this.list = [] this.list = []
this.page = 1 this.page = 1
this.draftList = []
// if (option?.status) { // if (option?.status) {
// this.selected = option.status // this.selected = option.status
// console.log('11'); // console.log('11');
@ -483,6 +485,7 @@
this.list = [] this.list = []
this.page = 1 this.page = 1
this.hotList = [] this.hotList = []
this.draftList = []
console.log('hotList', this.hotList); console.log('hotList', this.hotList);
// this.getHotList(this.selected); // this.getHotList(this.selected);
if (this.status == -2) { if (this.status == -2) {
@ -519,8 +522,11 @@
this.page++; this.page++;
this.getAfterList(); this.getAfterList();
}else if(this.status == 15) { }else if(this.status == 15) {
this.page++; if(this.draftCount > this.draftList.length){
this.getDraftList(); this.page++;
this.getDraftList();
}
} else { } else {
this.page++; this.page++;
this.getHotList(this.selected); this.getHotList(this.selected);
@ -568,6 +574,7 @@
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.cancelsShow = false this.cancelsShow = false
this.deleteId = null
uni.showToast({ uni.showToast({
title: '删除成功', title: '删除成功',
icon: 'success', icon: 'success',
@ -595,7 +602,7 @@
if (!this.deleteId) { if (!this.deleteId) {
this.deleteId = id this.deleteId = id
} }
// this.deleteId = id
console.log('cancelsOpen', this.deleteId); console.log('cancelsOpen', this.deleteId);
}, },
cancelsClose() { cancelsClose() {
@ -877,6 +884,7 @@
console.log('draftShow'); console.log('draftShow');
this.draftShow = true this.draftShow = true
this.hotList = [] this.hotList = []
this.draftList = []
this.getDraftList(status) this.getDraftList(status)
} else { } else {
this.getHotList(status); this.getHotList(status);
@ -896,7 +904,7 @@
}) })
.then((res) => { .then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.count = res.data.count; this.draftCount = res.data.count;
console.log('draft1', res.data.list); console.log('draft1', res.data.list);
const list = res.data.list.data || []; const list = res.data.list.data || [];
this.draftList.push(...list); this.draftList.push(...list);
@ -945,9 +953,9 @@
uni.showToast({ uni.showToast({
title: '删除成功', title: '删除成功',
icon: 'success', icon: 'success',
duration: 2000 duration: 1000
}) })
this.getDraftList('15') this.getDraftList2('15')
// this.toShlist('2') // this.toShlist('2')
// setTimeout(() => { // setTimeout(() => {
// uni.redirectTo({ // uni.redirectTo({
@ -958,11 +966,55 @@
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none', icon: 'none',
duration: 2000 duration: 1000
}) })
} }
}).catch(error => {}); }).catch(error => {});
}, },
//稿
getDraftList2(status) {
uni.$u.http
.get("/api/school.newactivity.activity_drafts/drafts_list", {
params: {
keywords: this.keywords,
page: 1,
limit: this.limit,
order: 'normal'
// status: status,
},
})
.then((res) => {
if (res.code == 1) {
this.count = res.data.count;
console.log('draft1', res.data.list);
// const list = res.data.list.data || [];
// this.draftList.push(...list);
this.draftList = res.data.list.data;
console.log('draft', this.draftList);
for (let i = 0; i < this.draftList.length; i++) {
this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
'YYYY-MM-DD HH:mm')
}
if (this.draftList.length >= res.data.count) {
this.loadStatus = "nomore";
} else {
this.loadStatus = "loading";
}
console.log('draft', this.draftList);
} else {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000,
});
this.loadStatus = "loading";
}
})
.catch((error) => {
console.error("请求失败", error);
this.loadStatus = "loading";
});
},
headerSelected(status) { headerSelected(status) {
return this.selected === status; return this.selected === status;
}, },

View File

@ -147,7 +147,7 @@
</u-upload> </u-upload>
</view> </view>
</view> </view>
<span class="line-row"></span> <span class="line-row" style="background-color: #ffffff;"></span>
</view> </view>
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;"> <view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
@ -162,7 +162,7 @@
</span> </span>
</view> </view>
<span class="line-row"></span> <span class="line-row"></span>
<view class="row flex align-items" style="margin-top: 25rpx;margin-bottom: 20rpx;"> <view class="row flex align-items" style="margin-top: 25rpx;">
<view class="label flex align-items "> <view class="label flex align-items ">
<span style="color: #3D3D3D;">*</span> <span style="color: #3D3D3D;">*</span>
活动价格 活动价格
@ -186,7 +186,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <span class="line-row"></span> --> <span class="line-row" style="background-color: #ffffff;"></span>
</view> </view>
</scroll-view> </scroll-view>
@ -203,8 +203,10 @@
style="color: #ff4810;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;"> style="color: #ff4810;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;">
({{draftCount}})</view> ({{draftCount}})</view>
</view> </view>
<view class="submitPublish" @click="apply()" v-if="type != 0">确认发布</view> <view class="submitPublish" @click="apply()" v-if="type != 0 && agreeAdd == true">确认发布</view>
<view class="submitPublish" @click="apply()" v-else>保存</view> <view class="submitPublish" @click="apply()" v-if="agreeAdd == true && type == 0">保存</view>
<view class="submitPublish" @click="apply()" v-if="type != 0 && agreeAdd == false" style="background: #EEEEEE;color: #9C9C9C;">确认发布</view>
<view class="submitPublish" @click="apply()" v-if="type == 0 && agreeAdd == false" style="background: #EEEEEE;color: #9C9C9C;">保存</view>
</view> </view>
<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span> <!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
<span class="flex align-items justify-center" v-if="agreeAdd == false" <span class="flex align-items justify-center" v-if="agreeAdd == false"
@ -334,7 +336,7 @@
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false" :customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
@close="dateShow = false" :closeOnClickOverlay="false"> @close="dateShow = false" :closeOnClickOverlay="false">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
<view style="font-size: 28rpx;color: #9C9C9C;" @click="dateShow = false">取消</view> <view style="font-size: 28rpx;color: #9C9C9C;" @click="dateShowCancel">取消</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 1">开始时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 1">开始时间</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 2">结束时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 2">结束时间</view>
<view style="font-size: 28rpx;color: #3D3D3D;" @click="hdnext()" v-if="hdIndex == 1">下一步</view> <view style="font-size: 28rpx;color: #3D3D3D;" @click="hdnext()" v-if="hdIndex == 1">下一步</view>
@ -351,7 +353,7 @@
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false" :customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
@close="birthShow = false" :closeOnClickOverlay="false"> @close="birthShow = false" :closeOnClickOverlay="false">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
<view style="font-size: 28rpx;color: #9C9C9C;" @click="birthShow = false">取消</view> <view style="font-size: 28rpx;color: #9C9C9C;" @click="birthShowCancel">取消</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 1">开始时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 1">开始时间</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 2">结束时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 2">结束时间</view>
<view style="font-size: 28rpx;color: #3D3D3D;" @click="bmnext()" v-if="bmIndex == 1">下一步</view> <view style="font-size: 28rpx;color: #3D3D3D;" @click="bmnext()" v-if="bmIndex == 1">下一步</view>
@ -362,6 +364,8 @@
<long-date v-if="birthShow" :default-time="defaultTime" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date> <long-date v-if="birthShow" :default-time="defaultTime" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date>
</view> </view>
</u-popup> </u-popup>
<!-- 活动价格 -->
<u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;"> <u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 0px 40rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 0px 40rpx;">
<view style="color: #9C9C9C;font-size: 28rpx;" @click="priceShow = false">取消</view> <view style="color: #9C9C9C;font-size: 28rpx;" @click="priceShow = false">取消</view>
@ -404,7 +408,7 @@
:custom-style="popupStyletkDraft"> :custom-style="popupStyletkDraft">
<view class="popup_tkallDraft"> <view class="popup_tkallDraft">
<view class="popup_tkDraft" style="display: flex;justify-content: center;"> <view class="popup_tkDraft" style="display: flex;justify-content: center;">
<view style="font-weight: 400;font-size: 28rpx;margin-right: 220rpx;">取消</view> <view style="font-weight: 400;font-size: 28rpx;margin-right: 220rpx;" @click="closeDraftShow">取消</view>
<view style="font-weight: 800;">草稿箱</view> <view style="font-weight: 800;">草稿箱</view>
<view style="font-weight: 400;font-size: 28rpx;margin-left: 220rpx;" @click="selectSureDraft()"> <view style="font-weight: 400;font-size: 28rpx;margin-left: 220rpx;" @click="selectSureDraft()">
确定</view> 确定</view>
@ -643,26 +647,27 @@
console.log('this.id', this.id); console.log('this.id', this.id);
console.log('this.original_activity_id ', this.original_activity_id); console.log('this.original_activity_id ', this.original_activity_id);
console.log('this.type', this.type); console.log('this.type', this.type);
if (this.type == 0) {
//
this.agree = true
this.isFormValid = false
this.getDetail()
} else {
//
this.agree = true
this.isFormValid = false
this.getDetail()
}
// if(this.original_activity_id){
// }
uni.hideShareMenu(); uni.hideShareMenu();
this.getAgreement() this.getAgreement()
this.getBqList(); this.getBqList();
this.getrefund_list(); this.getrefund_list();
this.getitembq(); this.getitembq();
this.selectItemTuikuan(); this.selectItemTuikuan();
if (this.type == 0) {
//
this.agree = false
this.isFormValid = false
this.getDetail()
} else {
//
this.agree = false
this.isFormValid = false
this.getDetail()
}
// if(this.original_activity_id){
// }
// this.getDraftList(); // this.getDraftList();
//var c=uni.getSystemInfoSync(); //var c=uni.getSystemInfoSync();
//844-94-70-100 = 580 //844-94-70-100 = 580
@ -671,6 +676,7 @@
}, },
onShow() { onShow() {
this.draftList = [];
this.show = false; this.show = false;
this.getCardInfo(); this.getCardInfo();
this.getDraftList(); this.getDraftList();
@ -716,9 +722,8 @@
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.form = res.data.detail this.form = res.data.detail
console.log('cate_ids', this.form.cate_ids);
this.form.content = this.form.content.replace(/<[^>]+>/g, ''); // : "" this.form.cate_idsName = this.form.classes_cate.join(',');
this.value_slide = res.data.detail.join_info.percent;
const idBqSet = new Set(this.form.cate_ids); const idBqSet = new Set(this.form.cate_ids);
const bqArray = this.bqList.reduce((acc, obj) => { const bqArray = this.bqList.reduce((acc, obj) => {
if (this.form.cate_ids.includes(obj.id)) { if (this.form.cate_ids.includes(obj.id)) {
@ -727,15 +732,19 @@
return acc; return acc;
}, []); }, []);
console.log('bqArray', bqArray); console.log('bqArray', bqArray);
let arrIdsName = bqArray.map((item) => { // let arrIdsName = bqArray.map((item) => {
return item.name // return item.name
}) // })
this.form.cate_idsName = arrIdsName.join(','); // this.form.cate_idsName = arrIdsName.join(',');
console.log('cate_idsName', this.form.cate_idsName); console.log('cate_idsName', this.form.cate_idsName);
this.list = bqArray this.list = bqArray
console.log('getDetail list', this.list);
this.form.cate_ids = res.data.detail.cate_ids; this.form.cate_ids = res.data.detail.cate_ids;
console.log('cate_ids', this.form.cate_ids); console.log('cate_ids', this.form.cate_ids);
this.form.content = this.form.content.replace(/<[^>]+>/g, ''); // : ""
this.value_slide = res.data.detail.join_info.percent;
this.price = this.form.price this.price = this.form.price
this.priceDo() this.priceDo()
@ -773,6 +782,7 @@
console.log('qunQrcode', this.qunQrcode); console.log('qunQrcode', this.qunQrcode);
if (!this.original_activity_id) { if (!this.original_activity_id) {
//
this.times_b_int = this.form.start_time_text this.times_b_int = this.form.start_time_text
this.times_e_int = this.form.end_time_text this.times_e_int = this.form.end_time_text
this.times_sinb_int = this.form.sign_start_time_text this.times_sinb_int = this.form.sign_start_time_text
@ -1201,7 +1211,19 @@
//this.dateShow = false //this.dateShow = false
//this.dateShow1 = true //this.dateShow1 = true
}, },
//
dateShowCancel() {
this.dateShow = false;
// this.times_b = '';
// this.times_b_int = '';
// this.times_e = '';
// this.times_e_int = '';
// //this.dateShow = false
// this.form.time = ''
const time_start = this.form.start_time_text.slice(5, 16)
const time_end = this.form.end_time_text.slice(5, 16)
this.form.time = time_start + ' - ' + time_end
},
hdnext() { hdnext() {
// //
const currentTime = dayjs().format('YYYY-MM-DD HH'); const currentTime = dayjs().format('YYYY-MM-DD HH');
@ -1318,6 +1340,19 @@
this.form.sign_time = this.times_sinb + ' - ' + this.times_sine this.form.sign_time = this.times_sinb + ' - ' + this.times_sine
} }
}, },
//
birthShowCancel() {
const signTime_start = this.form.sign_start_time_text.slice(5, 16)
const signTime_end = this.form.sign_end_time_text.slice(5, 16)
this.form.sign_time = signTime_start + ' - ' + signTime_end
this.birthShow = false
// this.times_sinb = '';
// this.times_sinb_int = '';
// this.times_sine = '';
// this.times_sine_int = '';
// //this.dateShow = false
// this.form.sign_time = ''
},
bmnext() { bmnext() {
// //
const currentTime = dayjs().format('YYYY-MM-DD HH'); const currentTime = dayjs().format('YYYY-MM-DD HH');
@ -1761,6 +1796,7 @@
let params = {}; let params = {};
let hdtime = '' let hdtime = ''
let bmtime = '' let bmtime = ''
console.log('addDraft',this.list);
this.form.cate_ids = this.list.map(item => item.id).join(','); this.form.cate_ids = this.list.map(item => item.id).join(',');
if (this.times_b_int && this.times_e_int) { if (this.times_b_int && this.times_e_int) {
hdtime = this.times_b_int + ' - ' + this.times_e_int; hdtime = this.times_b_int + ' - ' + this.times_e_int;
@ -1780,6 +1816,8 @@
stock: this.form.stock, stock: this.form.stock,
sign_time: bmtime || '', sign_time: bmtime || '',
time: hdtime || '', time: hdtime || '',
// time:this.form.time,
// sign_time: this.form.sign_time,
images: this.list1, images: this.list1,
longitude: this.form.longitude, longitude: this.form.longitude,
latitude: this.form.latitude, latitude: this.form.latitude,
@ -2124,9 +2162,9 @@
let params = {}; let params = {};
console.log('平台分类',this.form.cate_ids,this.list); console.log('平台分类',this.form.cate_ids,this.list);
this.form.cate_ids = this.list.map(item => item.id).join(','); this.form.cate_ids = this.list.map(item => item.id).join(',');
if (!this.id) { // if (!this.id) {
this.form.cate_ids = this.list.map(item => item.id).join(','); // this.form.cate_ids = this.list.map(item => item.id).join(',');
} // }
// //
if (this.form.address_detail == '') { if (this.form.address_detail == '') {
uni.showToast({ uni.showToast({
@ -2262,9 +2300,9 @@
console.log('params00', params); console.log('params00', params);
console.log('params01', this.id); console.log('params01', this.id);
console.log('params01', this.original_activity_id); console.log('params01', this.original_activity_id);
//
if (this.id) { if (Array.isArray(params.images)) {
console.log('编辑', params.images); console.log('这是一个数组', params.images);
for (let i = 0; i < params.images.length; i++) { for (let i = 0; i < params.images.length; i++) {
if (/^https?:\/\//i.test(params.images[i])) { if (/^https?:\/\//i.test(params.images[i])) {
params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, ''); params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
@ -2275,20 +2313,32 @@
} }
console.log('params.images排查数组的url的路径', params.images); console.log('params.images排查数组的url的路径', params.images);
params.images = params.images.join(','); params.images = params.images.join(',');
// params.images = params.images.map(url => { } else if (typeof params.images === 'string') {
// // 使URL console.log('这是一个字符串', params.images);
// // const urlObj = new URL(url); const imags = params.images
// const urlObj = url.split('qingchunta.hschool.com.cn')[1] params.images = imags.split(',')
// console.log('urlObj', urlObj); for (let i = 0; i < params.images.length; i++) {
// return urlObj; if (/^https?:\/\//i.test(params.images[i])) {
// }).join(','); params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
console.log('params', params.images); console.log('params.images[i].url', params.images[i]);
// params.image = new URL(params.image).pathname ; } else {
// params.image = params.image.replace(/^https?:\/\/[^/]+/, '') params.images[i] = params.images[i]
// params.image }
if (typeof params.image === 'object' && params.image.url) {
params.image = params.image.url; // url
} }
console.log('params.images排查数组的url的路径', params.images);
params.images = params.images.join(',');
console.log('这是一个字符串2', params.images);
} else if (typeof params.images === 'object' && this.myField !== null) {
console.log('这是一个对象', params.images);
}
if (typeof params.image === 'object' && params.image.url) {
params.image = params.image.url; // url
}
//
if (this.id) {
console.log('编辑', params.images);
// //
params.image = params.image.replace(/^https?:\/\/[^/]+/, ''); params.image = params.image.replace(/^https?:\/\/[^/]+/, '');
console.log('params', params.image); console.log('params', params.image);
@ -2364,25 +2414,16 @@
console.log('新增', params.images); console.log('新增', params.images);
if (this.type == 1 || this.type == 2) { if (this.type == 1 || this.type == 2) {
console.log('新增11', params.images); console.log('新增11', params.images);
for (let j = 0; j < params.images.length; j++) { // for (let j = 0; j < params.images.length; j++) {
if (/^https?:\/\//i.test(params.images[j])) { // if (/^https?:\/\//i.test(params.images[j])) {
params.images[j] = params.images[j].replace(/^https?:\/\/[^/]+/, ''); // params.images[j] = params.images[j].replace(/^https?:\/\/[^/]+/, '');
console.log('params.images[i].url', params.images[j]); // console.log('params.images[i].url', params.images[j]);
} // }
} // }
params.images = params.images.join(',') // params.images = params.images.join(',')
console.log('params.images排查数组的url的路径', params.images); // console.log('params.imagesurl', params.images);
// params.images = params.images.map(url => {
// // 使URL
// // const urlObj = new URL(url);
// const urlObj = url.split('qingchunta.hschool.com.cn')[1]
// console.log('urlObj', urlObj);
// return urlObj;
// }).join(',');
console.log('params', params.images); console.log('params', params.images);
// params.image = new URL(params.image).pathname ;
// params.image = params.image.replace(/^https?:\/\/[^/]+/, '')
// params.image
if (typeof params.image === 'object' && params.image.url) { if (typeof params.image === 'object' && params.image.url) {
params.image = params.image.url; // url params.image = params.image.url; // url
} }
@ -2472,13 +2513,13 @@
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 20px;
z-index: 1; z-index: 1;
/* 确保在.allbg之上 */ /* 确保在.allbg之上 */
overflow: visible; overflow: visible;
/* 允许内容溢出 */ /* 允许内容溢出 */
margin-top: 104rpx; margin-top: 104rpx;
margin-bottom: 254rpx; margin-bottom: 250rpx;
} }
.title_logo { .title_logo {
@ -2708,7 +2749,7 @@
.saveDraft { .saveDraft {
width: 235rpx; width: 235rpx;
height: 90rpx; height: 84rpx;
border: 2rpx solid #323232; border: 2rpx solid #323232;
background-color: #ffffff; background-color: #ffffff;
text-align: center; text-align: center;
@ -2724,9 +2765,7 @@
.draftBox { .draftBox {
width: 235rpx; width: 235rpx;
height: 70rpx; height: 84rpx;
position: relative;
top: 10rpx;
border: 2rpx solid #323232; border: 2rpx solid #323232;
background-color: #ffffff; background-color: #ffffff;
text-align: center; text-align: center;
@ -2745,7 +2784,7 @@
margin-left: 20rpx; margin-left: 20rpx;
width: 435rpx; width: 435rpx;
height: 90rpx; height: 90rpx;
border: 2rpx solid #323232; // border: 2rpx solid #323232;
background-color: #323232; background-color: #323232;
color: #BBFC5B; color: #BBFC5B;
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;

View File

@ -147,7 +147,7 @@
</u-upload> </u-upload>
</view> </view>
</view> </view>
<span class="line-row"></span> <span class="line-row" style="background-color: #ffffff;"></span>
</view> </view>
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;"> <view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
@ -186,7 +186,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <span class="line-row"></span> --> <span class="line-row" style="background-color: #ffffff;"></span>
</view> </view>
</scroll-view> </scroll-view>
@ -199,7 +199,10 @@
<view class="btns"> <view class="btns">
<view class="saveDraft" @click="editDraft()">存草稿</view> <view class="saveDraft" @click="editDraft()">存草稿</view>
<!-- <view class="draftBox">草稿箱</view> --> <!-- <view class="draftBox">草稿箱</view> -->
<view class="submitPublish" @click="apply()">确认发布</view> <view class="submitPublish" @click="apply()" v-if="agreeAdd == true">确认发布</view>
<!-- <view class="saveDraft" @click="editDraft()" v-if="agreeAdd == false" style="background: #EEEEEE;color: #9C9C9C;">存草稿</view> -->
<!-- <view class="draftBox">草稿箱</view> -->
<view class="submitPublish" @click="apply()" v-if="agreeAdd == false" style="background: #EEEEEE;color: #9C9C9C;">确认发布</view>
</view> </view>
<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span> <!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
<span class="flex align-items justify-center" v-if="agreeAdd == false" <span class="flex align-items justify-center" v-if="agreeAdd == false"
@ -329,7 +332,7 @@
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false" :customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
@close="dateShow = false" :closeOnClickOverlay="false"> @close="dateShow = false" :closeOnClickOverlay="false">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
<view style="font-size: 28rpx;color: #9C9C9C;" @click="dateShow = false">取消</view> <view style="font-size: 28rpx;color: #9C9C9C;" @click="dateShowCancel">取消</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 1">开始时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 1">开始时间</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 2">结束时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 2">结束时间</view>
<view style="font-size: 28rpx;color: #3D3D3D;" @click="hdnext()" v-if="hdIndex == 1">下一步</view> <view style="font-size: 28rpx;color: #3D3D3D;" @click="hdnext()" v-if="hdIndex == 1">下一步</view>
@ -346,7 +349,7 @@
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false" :customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
@close="birthShow = false" :closeOnClickOverlay="false"> @close="birthShow = false" :closeOnClickOverlay="false">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
<view style="font-size: 28rpx;color: #9C9C9C;" @click="birthShow = false">取消</view> <view style="font-size: 28rpx;color: #9C9C9C;" @click="birthShowCancel">取消</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 1">开始时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 1">开始时间</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 2">结束时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 2">结束时间</view>
<view style="font-size: 28rpx;color: #3D3D3D;" @click="bmnext()" v-if="bmIndex == 1">下一步</view> <view style="font-size: 28rpx;color: #3D3D3D;" @click="bmnext()" v-if="bmIndex == 1">下一步</view>
@ -357,6 +360,7 @@
<long-date v-if="birthShow" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date> <long-date v-if="birthShow" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date>
</view> </view>
</u-popup> </u-popup>
<!-- 价格 -->
<u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;"> <u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 0px 40rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 0px 40rpx;">
<view style="color: #9C9C9C;font-size: 28rpx;" @click="priceShow = false">取消</view> <view style="color: #9C9C9C;font-size: 28rpx;" @click="priceShow = false">取消</view>
@ -403,7 +407,7 @@
alignItems: 'center', alignItems: 'center',
flexColumn: 'column' flexColumn: 'column'
}" }"
@close="baoDraftShow = false" @open="baoDraftShow = true" :safeAreaInsetBottom="false" :closeable="false"> @close="baoDraftCancel" @open="baoDraftShow = true" :safeAreaInsetBottom="false" :closeable="false">
<view style="text-align: center;margin-top: 30rpx;"> <view style="text-align: center;margin-top: 30rpx;">
<image src="/static/fabu/renzheng.png" style="width: 140rpx;height: 140rpx;"></image> <image src="/static/fabu/renzheng.png" style="width: 140rpx;height: 140rpx;"></image>
</view> </view>
@ -414,7 +418,7 @@
</view> </view>
<view <view
style="gap: 20px;width: 100%;display: flex;justify-content: center;align-items: center;padding-bottom: 30rpx;"> style="gap: 20px;width: 100%;display: flex;justify-content: center;align-items: center;padding-bottom: 30rpx;">
<view class="btn_2" @click="baoDraftShow = false">知道了</view> <view class="btn_2" @click="baoDraftCancel">知道了</view>
</view> </view>
</u-popup> </u-popup>
@ -595,7 +599,7 @@
console.log('this.type', this.type); console.log('this.type', this.type);
if(this.draftId) { if(this.draftId) {
console.log('this.draftId', this.draftId); console.log('this.draftId', this.draftId);
this.agree = true this.agree = false
this.getDraftDetail() this.getDraftDetail()
} }
uni.hideShareMenu(); uni.hideShareMenu();
@ -732,6 +736,7 @@
this.form = res.data.detail this.form = res.data.detail
console.log('selectSureDraft',this.form.cate_ids); console.log('selectSureDraft',this.form.cate_ids);
console.log('cate_ids',this.form.cate_ids); console.log('cate_ids',this.form.cate_ids);
this.form.cate_idsName = this.form.classes_cate.join(',');
const idBqSet = new Set(this.form.cate_ids); const idBqSet = new Set(this.form.cate_ids);
const bqArray = this.bqList.reduce((acc, obj) => { const bqArray = this.bqList.reduce((acc, obj) => {
if (this.form.cate_ids.includes(obj.id)) { if (this.form.cate_ids.includes(obj.id)) {
@ -740,18 +745,37 @@
return acc; return acc;
}, []); }, []);
console.log('bqArray', bqArray); console.log('bqArray', bqArray);
let arrIdsName = bqArray.map((item) => {
return item.name
})
this.form.cate_idsName = arrIdsName.join(',');
console.log('cate_idsName', this.form.cate_idsName);
this.list = bqArray this.list = bqArray
this.form.cate_ids = res.data.detail.cate_ids; // this.form.cate_ids = res.data.detail.cate_ids;
console.log('cate_ids', this.list);
console.log('cate_ids', this.form.cate_ids);
if(res.data.detail.start_time_text != ''){
console.log('活动时间接参');
const time_start = this.form.start_time_text.slice(5, 16)
const time_end = this.form.end_time_text.slice(5, 16)
this.form.time = time_start + ' - ' + time_end
this.times_b_int = this.form.start_time_text;
this.times_e_int = this.form.end_time_text
}
if(res.data.detail.sign_start_time_text != '' && res.data.detail.sign_end_time_text != ''){
const signTime_start = this.form.sign_start_time_text.slice(5, 16)
const signTime_end = this.form.sign_end_time_text.slice(5, 16)
this.form.sign_time = signTime_start + ' - ' + signTime_end
this.times_sinb_int = this.form.sign_start_time_text;
this.times_sine_int = this.form.sign_end_time_text;
console.log('报名时间接参',this.times_sinb_int ,this.times_sine_int);
}
if(this.form.refund_info != null){
this.form.refund_idn = this.form.refund_info.title;
console.log('refund_idn',this.form.refund_idn);
}
this.form.refund_idn = this.form.refund_info.title;
console.log('refund_idn',this.form.refund_idn);
// fileList // fileList
if(this.form.images != ''){ if(this.form.images != ''){
this.fileList1 = this.form.images.map(url => ({ this.fileList1 = this.form.images.map(url => ({
@ -772,17 +796,7 @@
console.log('qunQrcode', this.qunQrcode); console.log('qunQrcode', this.qunQrcode);
} }
if(this.form.start_time_text != '' && this.form.end_time_text != ''){
const time_start = this.form.start_time_text.slice(5, 16)
const time_end = this.form.end_time_text.slice(5, 16)
this.form.time = time_start + ' - ' + time_end
}
if(this.form.sign_start_time_text != '' && this.form.sign_end_time_text != ''){
const signTime_start = this.form.sign_start_time_text.slice(5, 16)
const signTime_end = this.form.sign_end_time_text.slice(5, 16)
this.form.sign_time = signTime_start + ' - ' + signTime_end
}
this.price = this.form.price this.price = this.form.price
this.priceDo() this.priceDo()
@ -1106,7 +1120,19 @@
//this.dateShow = false //this.dateShow = false
//this.dateShow1 = true //this.dateShow1 = true
}, },
//
dateShowCancel() {
this.dateShow = false;
// this.times_b = '';
// this.times_b_int = '';
// this.times_e = '';
// this.times_e_int = '';
// //this.dateShow = false
// this.form.time = ''
const time_start = this.form.start_time_text.slice(5, 16)
const time_end = this.form.end_time_text.slice(5, 16)
this.form.time = time_start + ' - ' + time_end
},
hdnext() { hdnext() {
// //
const currentTime = dayjs().format('YYYY-MM-DD HH'); const currentTime = dayjs().format('YYYY-MM-DD HH');
@ -1222,8 +1248,22 @@
this.form.sign_time = this.times_sinb + ' - ' + this.times_sine this.form.sign_time = this.times_sinb + ' - ' + this.times_sine
} }
}, },
//
birthShowCancel() {
const signTime_start = this.form.sign_start_time_text.slice(5, 16)
const signTime_end = this.form.sign_end_time_text.slice(5, 16)
this.form.sign_time = signTime_start + ' - ' + signTime_end
this.birthShow = false
// this.times_sinb = '';
// this.times_sinb_int = '';
// this.times_sine = '';
// this.times_sine_int = '';
// //this.dateShow = false
// this.form.sign_time = ''
},
bmnext() { bmnext() {
// //
console.log('校验时间');
const currentTime = dayjs().format('YYYY-MM-DD HH'); const currentTime = dayjs().format('YYYY-MM-DD HH');
if (this.times_sinb == '' || this.times_sinb == null) { if (this.times_sinb == '' || this.times_sinb == null) {
var b = currentTime + ':00'; var b = currentTime + ':00';
@ -1714,12 +1754,12 @@
birth: '', // birth: '', //
birth1: '', // birth1: '', //
} }
setTimeout(function() { // setTimeout(function() {
// uni.navigateTo({ // // uni.navigateTo({
// url: "/packageA/my/orderList" // // url: "/packageA/my/orderList"
// }) // // })
uni.navigateBack() // uni.navigateBack()
}, 2000); // }, 1000);
} else { } else {
this.$u.toast(res.msg); this.$u.toast(res.msg);
// uni.showToast({ // uni.showToast({
@ -1736,8 +1776,11 @@
}); });
}); });
}, },
//稿
baoDraftCancel() {
this.baoDraftShow = false
uni.navigateBack()
},
apply() { apply() {
if (this.cardStatus == -1) { if (this.cardStatus == -1) {
@ -1747,9 +1790,10 @@
let url = '/api/school.new_activity/add'; let url = '/api/school.new_activity/add';
let urlEdit = '/api/school.new_activity/edit' let urlEdit = '/api/school.new_activity/edit'
let params = {}; let params = {};
if (!this.id) { if (this.list.length != 0) {
this.form.cate_ids = this.list.map(item => item.id).join(','); this.form.cate_ids = this.list.map(item => item.id).join(',');
} }
console.log('paramsthis.list',this.list,this.form.cate_ids);
// //
if (this.form.address_detail == '') { if (this.form.address_detail == '') {
uni.showToast({ uni.showToast({
@ -1860,8 +1904,12 @@
}); });
return; return;
} }
console.log('time',this.form.sign_time,this.form.time);
console.log('hdtime',this.times_b_int ,this.times_e_int);
console.log('hdtime',this.times_b_int , this.times_e_int);
let hdtime = this.times_b_int + ' - ' + this.times_e_int; let hdtime = this.times_b_int + ' - ' + this.times_e_int;
let bmtime = this.times_sinb_int + ' - ' + this.times_sine_int; let bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
console.log('formparams', this.form, this.form.cate_ids); console.log('formparams', this.form, this.form.cate_ids);
console.log('images', this.form.images); console.log('images', this.form.images);
params = { params = {
@ -1874,6 +1922,8 @@
stock: this.form.stock, stock: this.form.stock,
sign_time: bmtime, sign_time: bmtime,
time: hdtime, time: hdtime,
// time:this.form.time,
// sign_time: this.form.sign_time,
images: this.list1, images: this.list1,
longitude: this.form.longitude, longitude: this.form.longitude,
latitude: this.form.latitude, latitude: this.form.latitude,
@ -1885,6 +1935,7 @@
console.log('params00', params); console.log('params00', params);
console.log('params01', this.id); console.log('params01', this.id);
console.log('params01', this.original_activity_id); console.log('params01', this.original_activity_id);
// debugger
if (typeof params.image === 'object' && params.image.url) { if (typeof params.image === 'object' && params.image.url) {
params.image = params.image.url; // url params.image = params.image.url; // url
} }
@ -1903,6 +1954,7 @@
} }
console.log('params.images排查数组的url的路径', params.images); console.log('params.images排查数组的url的路径', params.images);
params.images = params.images.join(','); params.images = params.images.join(',');
uni.$u.http.post(url, params).then(res => { uni.$u.http.post(url, params).then(res => {
if (res.code == 1) { if (res.code == 1) {
// //
@ -2174,13 +2226,13 @@
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 20px;
z-index: 1; z-index: 1;
/* 确保在.allbg之上 */ /* 确保在.allbg之上 */
overflow: visible; overflow: visible;
/* 允许内容溢出 */ /* 允许内容溢出 */
margin-top: 50rpx; margin-top: 50rpx;
margin-bottom: 254rpx; margin-bottom: 250rpx;
} }
.title_logo { .title_logo {
@ -2428,7 +2480,7 @@
margin-left: 20rpx; margin-left: 20rpx;
width: 435rpx; width: 435rpx;
height: 90rpx; height: 90rpx;
border: 2rpx solid #323232; // border: 2rpx solid #323232;
background-color: #323232; background-color: #323232;
color: #BBFC5B; color: #BBFC5B;
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;

View File

@ -39,7 +39,7 @@
</u-upload> </u-upload>
</view> </view>
<span class="line-row"></span> <span class="line-row" style="margin-top: 42rpx;"></span>
<view class="row flex align-items" style="margin-top: 25rpx; "> <view class="row flex align-items" style="margin-top: 25rpx; ">
<view class="label flex align-items" style="width: auto;"> <view class="label flex align-items" style="width: auto;">
<image src="@/static/fabu/jhdd.png" mode="widthFix" <image src="@/static/fabu/jhdd.png" mode="widthFix"
@ -140,7 +140,7 @@
</u-upload> </u-upload>
</view> </view>
</view> </view>
<span class="line-row"></span> <span class="line-row" style="background-color: #ffffff;"></span>
</view> </view>
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;"> <view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
@ -183,21 +183,10 @@
</view> </view>
</view> </view>
</view> </view>
<span class="line-row"></span> <span class="line-row" style="background-color: #ffffff;"></span>
<!-- <view class="row flex align-items" style="margin: 25rpx 0;">
<span class="label flex align-items ">
<span style="color: #3D3D3D;">*</span>
报名时间
</span>
<span class="row-right" @click="birthShowHidden()">
<input type="text" placeholder="请选择报名时间" class="input" disabled="true"
v-model="form.sign_time" placeholder-class="plasty" />
<u-icon name="arrow-right" color="#323232"></u-icon>
</span>
</view> -->
</view> </view>
</scroll-view> </scroll-view>
<view style="height: 500rpx;"></view> <!-- <view style="height: 500rpx;"></view> -->
<view class="bottom " v-if="status == -1 || status == 2"> <view class="bottom " v-if="status == -1 || status == 2">
<view style="margin:30rpx 0 0 0;"> <view style="margin:30rpx 0 0 0;">
<cc-protocolBox :agree="agree" :name="protocolArr" @click="protocolClick" <cc-protocolBox :agree="agree" :name="protocolArr" @click="protocolClick"
@ -210,9 +199,12 @@
style="color: #ff4810;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;"> style="color: #ff4810;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;">
({{draftCount}})</view> ({{draftCount}})</view>
</view> </view>
<span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span> <view class="submitPublish" @click="apply()" v-if="agreeAdd == true">确认发布</view>
<span class="flex align-items justify-center" v-if="agreeAdd == false" <view class="submitPublish" v-if="agreeAdd == false" style="background: #EEEEEE;color: #9C9C9C;">
style="background: #EEEEEE;color: #9C9C9C;">确认发布</span> 确认发布</view>
<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
<span class="flex align-items justify-center" v-if="agreeAdd == false"
style="background: #EEEEEE;color: #9C9C9C;">确认发布</span> -->
</view> </view>
</view> </view>
@ -340,7 +332,7 @@
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false" :customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
@close="dateShow = false" :closeOnClickOverlay="false"> @close="dateShow = false" :closeOnClickOverlay="false">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
<view style="font-size: 28rpx;color: #9C9C9C;" @click="dateShow = false">取消</view> <view style="font-size: 28rpx;color: #9C9C9C;" @click="dateShowCancel">取消</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 1">开始时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 1">开始时间</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 2">结束时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="hdIndex == 2">结束时间</view>
<view style="font-size: 28rpx;color: #3D3D3D;" @click="hdnext()" v-if="hdIndex == 1">下一步</view> <view style="font-size: 28rpx;color: #3D3D3D;" @click="hdnext()" v-if="hdIndex == 1">下一步</view>
@ -349,7 +341,8 @@
<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view> <view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
<view style="height: 700rpx;"> <view style="height: 700rpx;">
<long-date v-if="dateShow" :default-time="defaultTime" chooseNum="90" <long-date v-if="dateShow" :default-time="defaultTime" chooseNum="90"
@select="datefirm($event, hdIndex)"></long-date> @select="datefirm($event, hdIndex)" @change="handleDatePickerChange"
></long-date>
</view> </view>
</u-popup> </u-popup>
@ -358,7 +351,7 @@
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false" :customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
@close="birthShow = false" :closeOnClickOverlay="false"> @close="birthShow = false" :closeOnClickOverlay="false">
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;"> <view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
<view style="font-size: 28rpx;color: #9C9C9C;" @click="birthShow = false">取消</view> <view style="font-size: 28rpx;color: #9C9C9C;" @click="birthShowCancel">取消</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 1">开始时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 1">开始时间</view>
<view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 2">结束时间</view> <view style="font-size: 36rpx;color: #3D3D3D;font-weight: 600;" v-if="bmIndex == 2">结束时间</view>
<view style="font-size: 28rpx;color: #3D3D3D;" @click="bmnext()" v-if="bmIndex == 1">下一步</view> <view style="font-size: 28rpx;color: #3D3D3D;" @click="bmnext()" v-if="bmIndex == 1">下一步</view>
@ -616,28 +609,6 @@
loadStatus: "loading", loadStatus: "loading",
selectHeadIndex: null, selectHeadIndex: null,
draftSelectIndex: null, draftSelectIndex: null,
selectDradtForm: {
cate_ids: '',
//
cate_idsName: "",
content: '',
refund_id: '',
refund_idn: '',
price: '',
stock: '',
sign_time: '',
time: '',
images: '',
title: '',
address: '',
latitude: '',
longitude: '',
address_detail: '', //
date: dayjs().add(4, 'hour').valueOf(), //
date1: dayjs().add(8, 'hour').valueOf(), //
birth: dayjs().add(4, 'hour').valueOf(), //
birth1: dayjs().add(8, 'hour').valueOf(), //
},
draftId: null, draftId: null,
defaultTime: null, defaultTime: null,
draftType: 0, draftType: 0,
@ -645,19 +616,18 @@
draftCount: 0, draftCount: 0,
page: 1, page: 1,
limit: 10, limit: 10,
pickerValue: null,
previousDayIndex: 0,
currentSelectedValues: [0, 0, 0]
}; };
}, },
onLoad() { onLoad() {
// this.tofb();
// this.searchStatus()
uni.hideShareMenu(); uni.hideShareMenu();
this.getAgreement() this.getAgreement()
this.getBqList(); this.getBqList();
this.getrefund_list(); this.getrefund_list();
this.getitembq(); this.getitembq();
this.selectItemTuikuan(); this.selectItemTuikuan();
// this.getDraftList('15');
//var c=uni.getSystemInfoSync(); //var c=uni.getSystemInfoSync();
//844-94-70-100 = 580 //844-94-70-100 = 580
//763-47-(100-47)-34-50 //763-47-(100-47)-34-50
@ -665,6 +635,8 @@
}, },
onShow() { onShow() {
this.draftList = [];
this.show = false; this.show = false;
this.isFormValid = false this.isFormValid = false
this.getCardInfo(); this.getCardInfo();
@ -969,6 +941,24 @@
this.defaultTime = defaultTime; this.defaultTime = defaultTime;
}, },
//
handleDatePickerChange(e) {
console.log('handleDatePickerChange', e.value);
// picker
this.pickerValue = e.value;
// picker-view
// this.$refs.datePicker.forceUpdate();
},
// forceUpdate() {
// this.key = Date.now();
// },
//
resetDatePicker() {
if (this.$refs.datePicker) {
this.$refs.datePicker.forceUpdate();
}
},
// //
datefirm(e, index) { datefirm(e, index) {
console.log(e) console.log(e)
@ -990,7 +980,16 @@
//this.dateShow = false //this.dateShow = false
//this.dateShow1 = true //this.dateShow1 = true
}, },
//
dateShowCancel() {
this.dateShow = false;
this.times_b = '';
this.times_b_int = '';
this.times_e = '';
this.times_e_int = '';
//this.dateShow = false
this.form.time = ''
},
hdnext() { hdnext() {
// //
const currentTime = dayjs().format('YYYY-MM-DD HH'); const currentTime = dayjs().format('YYYY-MM-DD HH');
@ -1106,6 +1105,16 @@
this.form.sign_time = this.times_sinb + ' - ' + this.times_sine this.form.sign_time = this.times_sinb + ' - ' + this.times_sine
} }
}, },
//
birthShowCancel() {
this.birthShow = false
this.times_sinb = '';
this.times_sinb_int = '';
this.times_sine = '';
this.times_sine_int = '';
//this.dateShow = false
this.form.sign_time = ''
},
bmnext() { bmnext() {
// //
const currentTime = dayjs().format('YYYY-MM-DD HH'); const currentTime = dayjs().format('YYYY-MM-DD HH');
@ -1171,6 +1180,7 @@
this.birthShow = false; this.birthShow = false;
this.checkFormValidity(); this.checkFormValidity();
}, },
birthCancel() { birthCancel() {
this.birthShow = false this.birthShow = false
}, },
@ -1647,7 +1657,7 @@
this.times_e = ''; this.times_e = '';
this.times_e_int = ''; this.times_e_int = '';
this.times_sine = ''; this.times_sine = '';
this.times_sine_int =''; this.times_sine_int = '';
this.form = { this.form = {
cate_ids: '', cate_ids: '',
@ -1673,7 +1683,7 @@
} }
console.log('置空的form', ); console.log('置空的form', );
uni.showToast({ uni.showToast({
title: '发布成功!', title: '发布成功!',
icon: 'none', icon: 'none',
@ -1819,11 +1829,14 @@
} else if (typeof params.images === 'object' && this.myField !== null) { } else if (typeof params.images === 'object' && this.myField !== null) {
console.log('这是一个对象', params.images); console.log('这是一个对象', params.images);
} }
if (typeof params.image === 'object' && params.image == null) { console.log('params判断image属性', params.image);
//params.image == null
if (typeof params.image === 'object') {
console.log('typeof', params.image); console.log('typeof', params.image);
params.image = params.image.url; params.image = params.image.url;
} }
console.log('params判断image属性后', params.image);
// //
params.image = params.image.replace(/^https?:\/\/[^/]+/, ''); params.image = params.image.replace(/^https?:\/\/[^/]+/, '');
console.log('params', params.image); console.log('params', params.image);
@ -1850,7 +1863,7 @@
this.times_e = ''; this.times_e = '';
this.times_e_int = ''; this.times_e_int = '';
this.times_sine = ''; this.times_sine = '';
this.times_sine_int =''; this.times_sine_int = '';
this.form = { this.form = {
cate_ids: '', cate_ids: '',
// //
@ -1884,6 +1897,7 @@
this.isFormValid = false this.isFormValid = false
this.draftList = [];
this.getDraftList(); this.getDraftList();
setTimeout(function() { setTimeout(function() {
// uni.navigateTo({ // uni.navigateTo({
@ -2041,13 +2055,13 @@
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 10px;
z-index: 1; z-index: 1;
/* 确保在.allbg之上 */ /* 确保在.allbg之上 */
overflow: visible; overflow: visible;
/* 允许内容溢出 */ /* 允许内容溢出 */
margin-top: 200rpx; margin-top: 200rpx;
margin-bottom: 420rpx; margin-bottom: 360rpx;
} }
.title_logo { .title_logo {
@ -2250,7 +2264,7 @@
background: #FFFFFF; background: #FFFFFF;
// box-shadow: 0rpx -6rpx 12rpx 0rpx rgba(111, 190, 255, 0.1); // box-shadow: 0rpx -6rpx 12rpx 0rpx rgba(111, 190, 255, 0.1);
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
bottom: 148rpx; bottom: 120rpx;
position: fixed; position: fixed;
z-index: 10; z-index: 10;
@ -2293,9 +2307,9 @@
.saveDraft { .saveDraft {
width: 235rpx; width: 235rpx;
height: 70rpx; height: 84rpx;
position: relative; // position: relative;
top: 10rpx; // top: 10rpx;
border: 2rpx solid #323232; border: 2rpx solid #323232;
background-color: #ffffff; background-color: #ffffff;
text-align: center; text-align: center;
@ -2311,9 +2325,9 @@
.draftBox { .draftBox {
width: 235rpx; width: 235rpx;
height: 70rpx; height: 84rpx;
position: relative; // position: relative;
top: 10rpx; // top: 10rpx;
border: 2rpx solid #323232; border: 2rpx solid #323232;
background-color: #ffffff; background-color: #ffffff;
text-align: center; text-align: center;
@ -2332,7 +2346,7 @@
margin-left: 20rpx; margin-left: 20rpx;
width: 435rpx; width: 435rpx;
height: 90rpx; height: 90rpx;
border: 2rpx solid #323232; // border: 2rpx solid #323232;
background-color: #323232; background-color: #323232;
color: #BBFC5B; color: #BBFC5B;
font-family: YouSheBiaoTiHei; font-family: YouSheBiaoTiHei;