parent
1f539b6787
commit
2bacc5bd16
5 changed files with 85 additions and 19 deletions
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@ -1,28 +1,32 @@ |
||||
<view> |
||||
<image src="{{product.attributes['image-url']}}" mode="aspectFill"/> |
||||
<text>{{product.attributes.name}}</text> |
||||
|
||||
<view wx:if="{{ address > 0 }}" bindtap="bindTapAddress"> |
||||
<text>{{address}}</text> |
||||
<text>修改地址</text> |
||||
</view> |
||||
<view wx:else bindtap="bindTapAddress"> |
||||
<text>add new address</text> |
||||
<view> |
||||
<image class="head-img" src="{{product.attributes['image-url']}}" mode="aspectFit" /> |
||||
</view> |
||||
|
||||
<text>{{product.attributes.name}}</text> |
||||
|
||||
<view> |
||||
<form bindsubmit="formSubmit" bindreset="formReset" data-sku="{{product.attributes.sku}}"> |
||||
<view class="section"> |
||||
<text class="">数量</text> |
||||
<input name="quantity" value="1" /> |
||||
<form bindsubmit="formSubmit" data-sku="{{product.attributes.sku}}"> |
||||
<view class="section quantity"> |
||||
<view class="quantity">数量:</view> |
||||
<input id="quantity" name="quantity" bindinput="bindQuantityInput" value="1" /> |
||||
</view> |
||||
<view class="section"> |
||||
<text>¥{{product.attributes.price || '无法获取价格'}}</text> |
||||
<text id="price" >¥{{product.attributes.price || '无法获取价格'}}</text> |
||||
</view> |
||||
<view class="btn-area"> |
||||
<button formType="submit">buy it!</button> |
||||
<button formType="reset">Reset</button> |
||||
<button formType="submit" type='primary'>立即购买</button> |
||||
<button bindtap="bindAddToCart">加入购物车</button> |
||||
</view> |
||||
</form> |
||||
</view> |
||||
|
||||
<view wx:if="{{ address > 0 }}" bindtap="bindTapAddress"> |
||||
<text>{{address}}</text> |
||||
<text>修改地址</text> |
||||
</view> |
||||
<view wx:else bindtap="bindTapAddress"> |
||||
<text>add new address</text> |
||||
</view> |
||||
|
||||
</view> |
||||
|
@ -0,0 +1,28 @@ |
||||
.head-img { |
||||
width: 100%; |
||||
} |
||||
|
||||
.quantity { |
||||
display: flex; |
||||
height: 60rpx; |
||||
line-height: 60rpx; |
||||
} |
||||
|
||||
#quantity { |
||||
width: 80rpx; |
||||
border: 1rpx solid lightskyblue; |
||||
} |
||||
|
||||
#price { |
||||
color: #FF0000; |
||||
} |
||||
|
||||
.btn-area { |
||||
display: flex; |
||||
} |
||||
|
||||
.btn-area button { |
||||
width: 100%; |
||||
border-radius: 0; |
||||
border-width: 0; |
||||
} |
Loading…
Reference in new issue