159 lines
6.5 KiB
Plaintext
159 lines
6.5 KiB
Plaintext
<cu-custom isBack="{{true}}">
|
|
<view slot="content">商品添加</view>
|
|
</cu-custom>
|
|
<scroll-view class="margin-bottom-xxl padding-bottom-xxl ">
|
|
<form>
|
|
<!-- 商品名称 -->
|
|
<view class="cu-form-group margin-top-xs text-left">
|
|
<view class="title">
|
|
<text class="text-gray">商品名称</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<input placeholder="请输入商品名称" bindinput="inputWatch" data-model="goodsName"></input>
|
|
</view>
|
|
<!-- 是否热门 -->
|
|
<view class="cu-form-group block solid-top">
|
|
<view class="title">
|
|
<text class="text-gray">是否热门</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<view>
|
|
<switch class="blue sm" checked="{{isPopular}}" bindchange="selGoodsPopular"></switch>
|
|
</view>
|
|
</view>
|
|
<!-- 商品数量 -->
|
|
<view class="cu-form-group text-left">
|
|
<view class="title">
|
|
<text class="text-gray">商品数量</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<input placeholder="请输入商品数量" bindinput="inputWatch" type="number" data-model="goodsCount"></input>
|
|
</view>
|
|
<!-- 商品单价 -->
|
|
<view class="cu-form-group text-left">
|
|
<view class="title">
|
|
<text class="text-gray">商品单价</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<input placeholder="请输入商品单价" bindinput="inputWatch" type="number" data-model="goodsPrice"></input>
|
|
</view>
|
|
<!-- 商品单位 -->
|
|
<view class="cu-form-group text-left">
|
|
<view class="title">
|
|
<text class="text-gray">商品单位</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<input placeholder="请输入商品单位" bindinput="inputWatch" data-model="goodsUnit"></input>
|
|
</view>
|
|
<!-- 商品状态 -->
|
|
<radio-group class="block solid-top" bindchange="selGoodsStatus">
|
|
<view class="cu-form-group">
|
|
<view class="title">
|
|
<text class="text-gray">商品状态</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<view>
|
|
<radio class="blue radio" value="1" checked="true"></radio>上架
|
|
<radio class="blue radio" value="2"></radio>下架
|
|
</view>
|
|
</view>
|
|
</radio-group>
|
|
<!-- 支付类型 -->
|
|
<radio-group class="block solid-top" bindchange="selGoodsPay">
|
|
<view class="cu-form-group">
|
|
<view class="title">
|
|
<text class="text-gray">支付方式</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<view>
|
|
<radio class="blue radio" value="1" checked="true"></radio>线上
|
|
<radio class="blue radio" value="2"></radio>线下
|
|
</view>
|
|
</view>
|
|
</radio-group>
|
|
<!-- 商品Logo -->
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="action">
|
|
<text class="text-gray">商品Logo</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<view class="action">
|
|
{{goodsLogoPhotos.length}}/1
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="grid col-3 grid-square flex-sub">
|
|
<view class="bg-img" wx:for="{{goodsLogoPhotos}}" wx:key="index" bindtap="viewLogo"
|
|
data-url="{{goodsLogoPhotos[index].path}}">
|
|
<image src='{{goodsLogoPhotos[index].path}}' mode='aspectFill'></image>
|
|
<view class="cu-tag bg-red" catchtap="delLogo" data-index="{{index}}">
|
|
<text class="cuIcon-close"></text>
|
|
</view>
|
|
</view>
|
|
<view class="solids" bindtap="chooseLogo" wx:if="{{goodsLogoPhotos.length<1}}">
|
|
<text class="cuIcon-cameraadd"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 商品图片 -->
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="action">
|
|
<text class="text-gray">商品图片</text><text class="iconfont icon-star-red margin-left-xs"></text>
|
|
</view>
|
|
<view class="action">
|
|
{{goodsPhotos.length}}/9
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="grid col-3 grid-square flex-sub">
|
|
<view class="bg-img" wx:for="{{goodsPhotos}}" wx:key="index" bindtap="viewPhoto"
|
|
data-url="{{goodsPhotos[index].path}}">
|
|
<image src='{{goodsPhotos[index].path}}' mode='aspectFill'></image>
|
|
<view class="cu-tag bg-red" catchtap="delPhoto" data-index="{{index}}">
|
|
<text class="cuIcon-close"></text>
|
|
</view>
|
|
</view>
|
|
<view class="solids" bindtap="choosePhoto" wx:if="{{goodsPhotos.length<9}}">
|
|
<text class="cuIcon-cameraadd"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 商品视频 -->
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="action">
|
|
<text class="text-gray">商品视频</text>
|
|
</view>
|
|
<view class="action">
|
|
{{goodsVideos.length}}/1
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="grid col-3 grid-square flex-sub">
|
|
<view class="bg-img" wx:for="{{goodsVideos}}" wx:key="index" bindtap="viewVideo"
|
|
data-url="{{goodsVideos[index].videoUrl}}">
|
|
<image src='{{goodsVideos[index].path}}' mode='aspectFill'></image>
|
|
<view class="cu-tag bg-red" catchtap="delVideo" data-index="{{index}}">
|
|
<text class="cuIcon-close"></text>
|
|
</view>
|
|
</view>
|
|
<view class="solids" bindtap="chooseVideo" wx:if="{{goodsVideos.length<1}}">
|
|
<text class="cuIcon-cameraadd"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 商品说明 -->
|
|
<view class="cu-bar bg-white margin-top-xs">
|
|
<view class="action">
|
|
<text class="text-gray">商品说明</text>
|
|
</view>
|
|
</view>
|
|
<view class="bg-white">
|
|
<view class="cu-form-group">
|
|
<textarea class="border-line padding-left-xs padding-right-xs margin-left-xs margin-right-xs" maxlength="-1"
|
|
bindinput="goodsSummaryInput" placeholder="请输入商品说明"></textarea>
|
|
</view>
|
|
</view>
|
|
<!-- 商品排序 -->
|
|
<view class="cu-form-group solid-top solid-bottom text-left">
|
|
<view class="title">
|
|
<text class="text-gray">商品排序</text>
|
|
</view>
|
|
<input placeholder="请输入商品排序" bindinput="inputWatch" type="number" data-model="goodsOrder"></input>
|
|
</view>
|
|
</form>
|
|
</scroll-view>
|
|
<view class="padding-xs foot bg-white">
|
|
<button class="cu-btn bg-blue" style="width:100%" bindtap="doAdd">立即添加</button>
|
|
</view> |