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> |
<view> |
||||||
<image src="{{product.attributes['image-url']}}" mode="aspectFill"/> |
<view> |
||||||
<text>{{product.attributes.name}}</text> |
<image class="head-img" src="{{product.attributes['image-url']}}" mode="aspectFit" /> |
||||||
|
|
||||||
<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> |
||||||
|
|
||||||
|
<text>{{product.attributes.name}}</text> |
||||||
|
|
||||||
<view> |
<view> |
||||||
<form bindsubmit="formSubmit" bindreset="formReset" data-sku="{{product.attributes.sku}}"> |
<form bindsubmit="formSubmit" data-sku="{{product.attributes.sku}}"> |
||||||
<view class="section"> |
<view class="section quantity"> |
||||||
<text class="">数量</text> |
<view class="quantity">数量:</view> |
||||||
<input name="quantity" value="1" /> |
<input id="quantity" name="quantity" bindinput="bindQuantityInput" value="1" /> |
||||||
</view> |
</view> |
||||||
<view class="section"> |
<view class="section"> |
||||||
<text>¥{{product.attributes.price || '无法获取价格'}}</text> |
<text id="price" >¥{{product.attributes.price || '无法获取价格'}}</text> |
||||||
</view> |
</view> |
||||||
<view class="btn-area"> |
<view class="btn-area"> |
||||||
<button formType="submit">buy it!</button> |
<button formType="submit" type='primary'>立即购买</button> |
||||||
<button formType="reset">Reset</button> |
<button bindtap="bindAddToCart">加入购物车</button> |
||||||
</view> |
</view> |
||||||
</form> |
</form> |
||||||
</view> |
</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> |
</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