Files
code-bang/frontend/miniapp/pages/demand/publish/index.wxml
T

125 lines
3.3 KiB
Plaintext

<!--pages/demand/publish/index.wxml-->
<view class="page-content">
<!-- 开发类型 -->
<view class="form-card">
<view class="form-card__head">
<text class="form-card__title">开发类型</text>
<text class="form-card__require">*</text>
</view>
<view class="dev-type-list">
<view
wx:for="{{tabList}}"
wx:for-index="index"
wx:key="index"
wx:if="{{item.key != -1}}"
class="dev-type-item {{developType == item.key ? 'dev-type-item--active' : ''}}"
data-key="{{item.key}}"
bindtap="onDevelopTypeTap"
>{{item.text}}</view>
</view>
</view>
<!-- 需求描述 -->
<view class="form-card">
<view class="form-card__head">
<text class="form-card__title">需求描述</text>
<text class="form-card__require">*</text>
</view>
<t-textarea
autosize="{{ { maxHeight: 120, minHeight: 50 } }}"
disableDefaultPadding="{{true}}"
data-field="content"
bindchange="onInputChange"
placeholder="请描述你的需求,如具体功能、技术要求、期望效果等"
/>
</view>
<!-- 预算 / 工期 / 联系方式 -->
<view class="form-card form-card--plain">
<t-input
label="预算"
placeholder="0.00"
suffix="元"
align="right"
type="number"
data-field="budgetAmount"
bindchange="onInputChange"
/>
<t-input
label="工期"
placeholder="0"
suffix="天"
align="right"
type="number"
data-field="limitTime"
bindchange="onInputChange"
/>
<t-input
label="联系方式"
placeholder="请输入微信号或电话"
borderless="{{true}}"
data-field="contact"
bindchange="onInputChange"
/>
</view>
<!-- 上传图片 -->
<view class="form-card">
<view class="form-card__head">
<text class="form-card__title">上传图片</text>
<text class="form-card__extra">最多 5 张</text>
</view>
<t-upload
media-type="{{['image']}}"
files="{{originFiles}}"
gridConfig="{{gridConfig}}"
bind:success="handleSuccess"
max="5"
size-limit="{{sileLimt}}"
bind:remove="handleRemove"
bind:click="handleClick"
bind:sort-end="handleSortEnd"
/>
</view>
<!-- 从聊天记录上传附件 -->
<view class="form-card">
<view class="form-card__head">
<text class="form-card__title">上传附件(从聊天记录选择文件)</text>
<text class="form-card__extra">选填</text>
</view>
<view class="attach-list" wx:if="{{attachFiles.length}}">
<t-tag
wx:for="{{attachFiles}}"
wx:for-index="index"
wx:key="index"
class="file-tag-margin"
max-width="{{220}}"
size="medium"
variant="light"
data-index="{{index}}"
bind:close="handleRemoveAttach"
closable
>{{item.name}}</t-tag>
</view>
<t-upload
files="{{[]}}"
gridConfig="{{gridConfig}}"
config="{{config}}"
source="messageFile"
bind:success="handleSuccessAttach"
/>
</view>
</view>
<!-- 底部提交栏 -->
<view class="wx-pay-cover">
<view class="wx-pay">
<view class="submit-btn {{ content ? '':'btn-gray'}}" bindtap="onSubmit">
确认提交
</view>
</view>
</view>