160 lines
4.5 KiB
Plaintext
160 lines
4.5 KiB
Plaintext
<view class="publish-page">
|
||
<!-- TDesign 选项卡:普通发布 / 内推码发布 -->
|
||
<t-tabs
|
||
defaultValue="{{0}}"
|
||
theme="card"
|
||
class="publish-tabs"
|
||
bind:change="handleTabChange"
|
||
>
|
||
<!-- 第一个选项卡:普通发布 -->
|
||
<t-tab-panel label="普通发布" value="{{0}}" class="tab-panel">
|
||
<view class="input-example">
|
||
<view class="input-example__label"> 文评标题 </view>
|
||
<t-input
|
||
placeholder="请输入标题"
|
||
borderless="{{true}}"
|
||
|
||
style="{{style}}"
|
||
/>
|
||
</view>
|
||
<view class="wenping-label"> 选择文评类型 </view>
|
||
<t-radio-group
|
||
t-class="horizontal-box"
|
||
value="{{value1}}"
|
||
bind:change="onChange1"
|
||
>
|
||
<view
|
||
wx:for="{{2}}"
|
||
wx:key="index"
|
||
class="card {{value1 == index ? 'card--active' : ''}}"
|
||
>
|
||
<!-- 选中时显示对勾图标 -->
|
||
<t-icon
|
||
wx:if="{{value1 == index}}"
|
||
name="check"
|
||
t-class="card__icon"
|
||
/>
|
||
<!-- 单选按钮(隐藏原生图标,用自定义样式替代) -->
|
||
<t-radio
|
||
value="{{index}}"
|
||
label="{{index == 0 ? '单选' : '多选'}}"
|
||
icon="none"
|
||
borderless
|
||
/>
|
||
</view>
|
||
</t-radio-group>
|
||
|
||
<view class="options-container">
|
||
<view class="options-header">
|
||
<view class="options-label">选项设置</view>
|
||
<t-button theme="primary" size="large" variant="text"
|
||
bindtap="addOption1" style="margin-left: 40vw;"
|
||
>添加选项</t-button>
|
||
</view>
|
||
|
||
<!-- 选项列表 - 绑定到form.options -->
|
||
<view class="options-list">
|
||
<view wx:for="{{form.options}}" wx:key="index" class="option-item">
|
||
<t-input
|
||
placeholder="请输入选项内容"
|
||
value="{{item.content}}"
|
||
bind:change="onOptionInput"
|
||
data-index="{{index}}"
|
||
class="option-input"
|
||
/>
|
||
<t-icon
|
||
name="delete"
|
||
size="24rpx"
|
||
class="delete-option"
|
||
bind:tap="removeOption"
|
||
data-index="{{index}}"
|
||
wx:if="{{form.options.length > 1}}"
|
||
/>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="options-hint" wx:if="{{form.options.length > 0}}">
|
||
已添加 {{form.options.length}}/5 个选项
|
||
</view>
|
||
</view>
|
||
|
||
<t-cell
|
||
title="截止时间"
|
||
hover
|
||
note="{{datetimeText}}"
|
||
arrow
|
||
data-mode="datetime"
|
||
bindtap="showPicker"
|
||
t-class="panel-item"
|
||
/>
|
||
|
||
<!-- 年月日时分 -->
|
||
<t-date-time-picker
|
||
title="截止时间"
|
||
visible="{{datetimeVisible}}"
|
||
mode="second"
|
||
value="{{datetime}}"
|
||
format="YYYY-MM-DD HH:mm:ss"
|
||
bindchange="onConfirm"
|
||
bindpick="onColumnChange"
|
||
bindcancel="hidePicker"
|
||
/>
|
||
|
||
|
||
<view class="button-example">
|
||
<t-button theme="primary" size="large" block>发布文评</t-button>
|
||
</view>
|
||
|
||
|
||
|
||
</t-tab-panel>
|
||
|
||
<!-- 第二个选项卡:内推码发布 -->
|
||
<t-tab-panel label="内推码发布" value="{{1}}" class="tab-panel">
|
||
<t-form class="referral-publish-form" bind:submit="handleReferralSubmit">
|
||
<!-- 内推码发布表单内容 -->
|
||
<t-form-item label="公司名称" required>
|
||
<t-cell class="mb-16" title="选择内推码类型" arrow hover note="{{cityText}}" bind:click="onCityPicker" />
|
||
<t-picker
|
||
visible="{{cityVisible}}"
|
||
value="{{cityValue}}"
|
||
data-key="city"
|
||
title="选择内推码类型"
|
||
cancelBtn="取消"
|
||
confirmBtn="确认"
|
||
usingCustomNavbar
|
||
bindchange="onPickerChange"
|
||
bindpick="onColumnChange"
|
||
bindcancel="onPickerCancel"
|
||
>
|
||
<t-picker-item options="{{citys}}" format="{{formatter}}">
|
||
<block wx:for="{{citys}}" wx:key="index" wx:for-item="option">
|
||
<view wx:if="{{option.tag}}" slot="label-suffix--{{index}}" class="label-suffix">
|
||
<t-tag size="small" theme="primary">{{option.tag}}</t-tag>
|
||
</view>
|
||
</block>
|
||
</t-picker-item>
|
||
</t-picker>
|
||
</t-form-item>
|
||
|
||
|
||
<t-form-item>
|
||
<t-button type="primary" form-type="submit" class="submit-btn">
|
||
发布内推码
|
||
</t-button>
|
||
</t-form-item>
|
||
</t-form>
|
||
|
||
<t-divider t-class="{{skylineRender?'skyline-dashed':''}}" />
|
||
|
||
<t-collapse theme="card" defaultValue="{{[3]}}" expandIcon>
|
||
<t-collapse-panel header="邀请码须知" value="{{0}}">
|
||
当有用户使用您的邀请码后,您可以获得10积分奖励,使用您邀请码的用户可以获得3积分奖励,同时您可以无限使用别人的邀请码,您可以在"用户"->"邀请码"中查看您的邀请码的使用情况
|
||
</t-collapse-panel>
|
||
|
||
</t-collapse>
|
||
|
||
|
||
</t-tab-panel>
|
||
</t-tabs>
|
||
</view> |