反馈更改

dev
lion 2 months ago
parent d4d6363bd3
commit 653e810bdd

@ -17,7 +17,7 @@
<view class="cell" v-for="cell in row" :key="cell.fullDate" :style="'height:'+cellHeight+'rpx'" @tap="onDayClick(cell.fullDate)">
<text class="date-num" :class="{ dim: !cell.inMonth }">{{ cell.date }}</text>
<view class="cell-events" :style="'padding-top:'+getCellPadding(cell.fullDate)+'rpx'">
<view v-for="ev in eventsForDate(cell.fullDate)" :key="ev.id" class="event-chip" :class="['event-type-' + (ev.type || 'default'), { 'single-line-open': isSingleEvent(cell.fullDate), 'conflict': hasSpanConflict(cell.fullDate) }]" :style="'background:' + ((ev && ev.color) ? ev.color : '#ddba99') + ';'+ (hasSpanConflict(cell.fullDate) ? 'margin-top:6rpx;' : '')" @tap="onEventClick(ev)">
<view v-for="ev in eventsForDate(cell.fullDate)" :key="ev.id" class="event-chip" :class="['event-type-' + (ev.type || 'default'), { 'single-line-open': isSingleEvent(cell.fullDate), 'conflict': hasSpanConflict(cell.fullDate), 'has-multi-day': hasSpanConflict(cell.fullDate) }]" :style="'background:' + ((ev && ev.color) ? ev.color : '#ddba99') + ';' + (hasSpanConflict(cell.fullDate) ? 'transform: translateY(10px) !important; padding-top: 10px !important;' : '')" @tap="onEventClick(ev)">
{{ formatTitle(ev.title) }}
</view>
</view>
@ -348,6 +348,7 @@ export default {
// &
this.laneCountByDate = laneCountByDate
this.segCountByDate = segCountByDate
return segs
}
},
@ -356,7 +357,13 @@ export default {
//
const lanes = this.laneCountByDate && this.laneCountByDate[fullDate] ? this.laneCountByDate[fullDate] : 0
if (!lanes) return 0
return lanes * (this.barHeight + this.barSpacing)
//
const hasConflict = this.hasSpanConflict(fullDate)
const basePadding = lanes * (this.barHeight + this.barSpacing)
const extraPadding = hasConflict ? 40 : 0 // 40rpx
return basePadding + extraPadding
},
isSingleEvent(fullDate) {
try {
@ -370,7 +377,9 @@ export default {
//
const hasMulti = !!(this.segCountByDate && this.segCountByDate[fullDate] > 0)
const hasSingle = (this.eventsForDate(fullDate) || []).length > 0
return hasMulti && hasSingle
const result = hasMulti && hasSingle
return result
},
onEventClick(ev) {
this.$emit('eventClick', ev)
@ -452,7 +461,7 @@ export default {
eventsForDate(fullDate) {
const d0 = new Date(fullDate)
d0.setHours(0,0,0,0)
return (this.events || []).filter(ev => {
const result = (this.events || []).filter(ev => {
if (!ev || !ev.start_time) return false
const s = this.parseDateTime(ev.start_time)
const e = ev.end_time ? this.parseDateTime(ev.end_time) : this.parseDateTime(ev.start_time)
@ -462,6 +471,13 @@ export default {
if (isMulti) return false
return d0.getTime() === s.getTime()
})
//
if (result.length > 0) {
console.log(`日期 ${fullDate} 的单天事件:`, result)
}
return result
},
pad2(n) {
n = Number(n) || 0
@ -610,15 +626,16 @@ export default {
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 与跨天冲突时,单日事件强制两行省略并稍作下移 */
/* 与跨天冲突时,单日事件强制一行省略 */
.event-chip.conflict {
white-space: normal !important;
display: -webkit-box !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2 !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
margin-top: 6rpx;
}
/* 当有跨天事件时,单天事件需要更多上边距 */
.event-chip.has-multi-day {
padding-top: 10px !important;
}
.overlay {

@ -1,6 +1,6 @@
<template>
<view class="container">
<image style="width:100%" :show-menu-by-longpress="true" :src="base.imgHost('hr.png')" mode="widthFix" alt=""/>
<image style="width:100%" :show-menu-by-longpress="true" :src="base.imgHost('hr1.png')" mode="widthFix" alt=""/>
</view>
</template>

@ -128,7 +128,7 @@
<u-popup v-model="showSetting" mode="center" border-radius="20" width="80%">
<view class="setting-popup">
<view class="setting-title">设置</view>
<view class="setting-tip">您想以下哪些学员能够查看到您的联系方式</view>
<view class="setting-tip">您想给哪些校友展示联系电话</view>
<view class="setting-list">
<!-- 同班同学 - 固定项 -->
<view class="setting-item setting-item-fixed">

@ -23,15 +23,15 @@
</view>
<view class="finance-row">
<text class="label">金额</text>
<text class="value">{{ formatAmount(detail.amount) }}</text>
<text class="value">{{ formatAmount(detail.amount) }}万元</text>
</view>
<view class="finance-row" v-if="detail.fund_stage">
<text class="label">融资阶段</text>
<text class="value">{{ detail.fund_stage }}</text>
</view>
<view class="finance-row" v-if="detail.expect_fund_attr">
<text class="label">期望资金属性</text>
<text class="value">{{ detail.expect_fund_attr }}</text>
<view class="finance-row" v-if="detail.fund_company">
<text class="label">公司名称</text>
<text class="value">{{ detail.fund_company }}</text>
</view>
<view class="finance-row" v-if="detail.industry_type">
<text class="label">行业类型</text>
@ -118,10 +118,10 @@
</scroll-view>
<view class="footer">
<view class="footer-action" @click="toggleCollect">
<!-- <view class="footer-action" @click="toggleCollect">
<u-icon :name="isCollected ? 'star-fill' : 'star'" size="40" :color="isCollected ? '#f29100' : '#606266'"></u-icon>
<text :style="{ color: isCollected ? '#f29100' : '#606266' }">收藏</text>
</view>
</view> -->
<u-button v-if="!isExpired" type="primary" shape="circle" class="message-btn" @click="goToChat"></u-button>
<view v-else class="expired-notice">
<text class="expired-text">已过期</text>

@ -21,7 +21,7 @@
<text class="time">{{ item.created_at }}</text>
</view>
<text class="item-title">{{ item.title }}</text>
<text class="description">{{ item.content }}</text>
<text class="description">{{ item.content?item.content:'' }}</text>
<view class="tags" v-if="item.tag">
<text v-for="tag in item.tag.split(',')" :key="tag" class="tag">{{ tag }}</text>
</view>
@ -35,9 +35,13 @@
<view class="view-button view-button-check" @click="goToDetail(item.id)">
<text class="button-text">查看</text>
</view>
<view v-if="item.status === 3 || item.status === 2" class="view-button view-button-edit" @click="goToEdit(item.id)">
<!-- v-if="item.status === 3 || item.status === 2" -->
<view class="view-button view-button-edit" @click="goToEdit(item.id)">
<text class="button-text">编辑</text>
</view>
<view v-if="item.status === 1" class="view-button view-button-delete" @click="goToDelete(item.id)">
<text class="button-text">取消发布</text>
</view>
</view>
</view>
</view>
@ -72,13 +76,16 @@
statusTabs: [
{ name: '全部' },
{ name: '已发布' },
{ name: '退回修改' },
// { name: '退' },
{ name: '已拒绝' }
]
}
},
onLoad() {
onShow(){
this.fetchMyPosts();
},
onLoad() {
},
onReachBottom() {
if (this.status === 'loadmore' && !this.loading) {
@ -150,6 +157,25 @@
url: '/packages/supply/publish'
})
},
goToDelete(id) {
this.$u.api.supplyDemandSave({
id: id,
status: 4
}).then(res => {
uni.showToast({
title: '取消发布成功',
icon: 'success',
success: () => {
setTimeout(() => {
this.fetchMyPosts();
}, 1200);
}
});
}).catch(err => {
console.error('取消发布失败:', err);
this.$u.toast('取消发布失败,请重试');
})
},
changeStatusTab(index) {
this.currentStatusTab = index;
this.page = 1;
@ -184,7 +210,7 @@
case 3:
return '退回修改';
case 4:
return '永久隐藏';
return '取消发布';
default:
return '未知';
}
@ -361,6 +387,10 @@
background: linear-gradient(to right, #5d5ebc, #12099a);
}
.view-button-delete {
background: linear-gradient(to right, #d32f2f, #b71c1c);
}
.button-text {
color: white;
font-size: 26rpx;

@ -35,13 +35,13 @@
</u-radio-group>
</u-form-item>
<u-form-item label="金额" label-width="150" prop="amount" :border-bottom="false">
<u-input v-model="form.amount" type="number" placeholder="请输入金额(元)" :custom-style="inputStyle('amount')" @focus="activeInput='amount'" @blur="activeInput=null" />
<u-input v-model="form.amount" type="number" placeholder="请输入金额(元)" :custom-style="inputStyle('amount')" @focus="activeInput='amount'" @blur="activeInput=null" />
</u-form-item>
<u-form-item label="融资阶段" label-width="150" prop="fund_stage" :border-bottom="false">
<u-input v-model="form.fund_stage" placeholder="如:天使轮/A轮/B轮..." :custom-style="inputStyle('fund_stage')" @focus="activeInput='fund_stage'" @blur="activeInput=null" />
</u-form-item>
<u-form-item label="期望资金属性" label-width="150" prop="expect_fund_attr" :border-bottom="false">
<u-input v-model="form.expect_fund_attr" placeholder="如:国资、基金、民营等..." :custom-style="inputStyle('expect_fund_attr')" @focus="activeInput='expect_fund_attr'" @blur="activeInput=null" />
<u-form-item label="公司名称" label-width="150" prop="fund_company" :border-bottom="false">
<u-input v-model="form.fund_company" placeholder="请输入公司名称" :custom-style="inputStyle('fund_company')" @focus="activeInput='fund_company'" @blur="activeInput=null" />
</u-form-item>
<u-form-item label="行业类型" label-width="150" prop="industry_type" :border-bottom="false">
<u-input v-model="form.industry_type" placeholder="如:智能制造/生物医药..." :custom-style="inputStyle('industry_type')" @focus="activeInput='industry_type'" @blur="activeInput=null" />
@ -156,7 +156,7 @@
</view>
<view class="footer-button">
<u-button type="primary" shape="circle" @click="submit">{{ form.type === 'supply' ? '' : '' }}</u-button>
<u-button type="primary" shape="circle" @click="submit"></u-button>
</view>
<!-- 日期选择器 -->
@ -176,6 +176,7 @@
activeInput: null,
tagInput: '',
header: {}, // header
id:'',
form: {
type: 'supply', // supply or demand or finance or industry
title: '',
@ -184,7 +185,7 @@
fund_type: '投资',
amount: '',
fund_stage: '',
expect_fund_attr: '',
fund_company: '',
industry_type: '',
product: '',
finance_desc: '',
@ -197,6 +198,7 @@
expiryDate: '', //
images: [], //
},
existingFiles: [], // idurl
showDatePicker: false,
dateParams: {
year: true,
@ -218,7 +220,11 @@
return placeholders[this.form.contactType]
}
},
onLoad() {
onLoad(options) {
this.id = options.id;
if(this.id){
this.getDetail();
}
//
const currentUser = this.$store.state.vuex_user;
if (currentUser && currentUser.name) {
@ -258,6 +264,7 @@
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: (res) => {
// images
this.form.images.push(...res.tempFilePaths);
}
});
@ -302,6 +309,41 @@
});
});
},
//
async getDetail() {
const res = await this.$u.api.supplyDemandDetail({
id: this.id
});
//
this.form = {
type: res.type === 1 ? 'supply' : res.type === 2 ? 'demand' : res.type === 3 ? 'finance' : 'industry',
title: res.title || '',
description: res.content || '',
//
fund_type: res.fund_type || '投资',
amount: res.amount || '',
fund_stage: res.fund_stage || '',
fund_company: res.fund_company || '',
industry_type: res.industry_type || '',
product: res.product || '',
finance_desc: res.desc || res.content || '',
tags: res.tag ? res.tag.split(',').filter(t => t.trim()) : [],
contactType: res.wechat ? 'wechat' : res.mobile ? 'phone' : res.email ? 'email' : 'wechat',
contactValue: res.wechat || res.mobile || res.email || '',
contactName: res.contact_name || '',
publicWay: res.public_way || 1,
expiryType: res.expire_time ? 'specific' : 'longterm',
expiryDate: res.expire_time ? res.expire_time.split(' ')[0] : '',
images: res.files ? res.files.map(f => f.url) : []
};
//
this.existingFiles = res.files ? res.files.map(f => ({
id: f.id,
url: f.url
})) : [];
},
async submit() {
//
if (!this.form.title.trim()) {
@ -331,11 +373,19 @@
});
try {
//
//
const fileIds = [];
if (this.form.images.length > 0) {
for (let i = 0; i < this.form.images.length; i++) {
const imagePath = this.form.images[i];
//
const existingFile = this.existingFiles.find(f => f.url === imagePath);
if (existingFile) {
// 使ID
fileIds.push(existingFile.id);
} else {
//
try {
const uploadResult = await this.uploadImage(imagePath);
// coursePay.vue使result.id
@ -351,6 +401,7 @@
}
}
}
}
//
const params = {
@ -371,7 +422,7 @@
params.fund_type = this.form.fund_type || ''
params.amount = this.form.amount || ''
params.fund_stage = this.form.fund_stage || ''
params.expect_fund_attr = this.form.expect_fund_attr || ''
params.fund_company = this.form.fund_company || ''
params.industry_type = this.form.industry_type || ''
params.product = this.form.product || ''
params.desc = this.form.finance_desc || ''
@ -383,11 +434,15 @@
}
//
if(this.id){
params.id = this.id;
}
params.status = 1
const res = await this.$u.api.supplyDemandSave(params);
uni.hideLoading();
uni.showToast({
title: '发布成功, 请等待审核',
title: this.id ? '更新成功' : '发布成功',
icon: 'success',
success: () => {
setTimeout(() => {

@ -143,8 +143,7 @@
this.base.imgHost('type1.png'),
this.base.imgHost('type2.png'),
this.base.imgHost('type3.png'),
this.base.imgHost('type4.png'),
this.base.imgHost('type5.png')
this.base.imgHost('type4.png')
],
swiperCurrent: 0,
hasMobile: false,

Loading…
Cancel
Save