You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
2.2 KiB
54 lines
2.2 KiB
<!--pages/publish/index.wxml-->
|
|
<view class="publish-container">
|
|
<view class="publish-header">
|
|
<text class="header-title">发布新货源</text>
|
|
</view>
|
|
|
|
<view class="form-container">
|
|
<view class="form-item">
|
|
<text class="label">品种 *</text>
|
|
<input class="input" type="text" placeholder="请输入品种" bindinput="onVarietyInput" value="{{variety}}" />
|
|
</view>
|
|
|
|
<view class="form-item">
|
|
<text class="label">价格 (元/斤) *</text>
|
|
<input class="input" type="text" placeholder="请输入商品价格(支持文字描述)" bindinput="onPriceInput" value="{{price}}" />
|
|
</view>
|
|
|
|
<view class="form-item">
|
|
<text class="label">数量 (斤) *</text>
|
|
<input class="input" type="digit" placeholder="请输入商品数量" bindinput="onQuantityInput" value="{{quantity}}" />
|
|
</view>
|
|
|
|
<view class="form-item">
|
|
<text class="label">毛重 (斤)</text>
|
|
<input class="input" type="text" placeholder="请输入商品毛重(可输入文字,如:十斤)" bindinput="onGrossWeightInput" value="{{grossWeight}}" />
|
|
</view>
|
|
|
|
<view class="form-item">
|
|
<text class="label">蛋黄</text>
|
|
<input class="input" type="text" placeholder="请输入蛋黄信息" bindinput="onYolkInput" value="{{yolk}}" />
|
|
</view>
|
|
|
|
<view class="form-item">
|
|
<text class="label">规格</text>
|
|
<input class="input" type="text" placeholder="请输入商品规格" bindinput="onSpecificationInput" value="{{specification}}" />
|
|
</view>
|
|
|
|
<!-- 新增图片上传区域 -->
|
|
<view class="image-upload-container">
|
|
<text class="label">商品图片(最多5张)</text>
|
|
<view class="image-list">
|
|
<view class="image-item" wx:for="{{images}}" wx:key="index">
|
|
<image src="{{item}}" mode="aspectFill"></image>
|
|
<view class="image-delete" bindtap="deleteImage" data-index="{{index}}">×</view>
|
|
</view>
|
|
<view class="image-upload" wx:if="{{images.length < 5}}" bindtap="chooseImage">
|
|
<text>+</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<button class="publish-btn" type="primary" bindtap="onPublishTap">发布商品</button>
|
|
</view>
|
|
</view>
|