补充代码的样式:<template> <view> <view class="choose"> <view class="title">选择地址</view> <view class="user_info"> <view class="name-phone"><text>{{nickname}}</text><text>{{phone}}</text></view> <view class="address">{{address_detail}}</view> </view> </view> <!-- 订单信息 --> <view class="order-content"> <view class="product"> <view class="img"> <image :src="'http://localhost:3000/'+product.img" mode=""></image> </view> <view class="right-info"> <view class="product-name">黑糖拿铁</view> <view class="price-num"> <text>${{product.price}}</text> <text>x{{product.num}}</text> </view> </view> </view> <view class="num-allprice"> <text>共计{{product.num}}件商品</text> <text>订单金额 :{{product.allPrice}}元</text> </view> </view> <button @click="pay">立即结算</button> </view> </template>
时间: 2023-08-14 19:27:25 浏览: 85
cpp代码-模板 泛型 template<typename> template<class>
以下是代码的样式:
```html
<template>
<view>
<view class="choose">
<view class="title">选择地址</view>
<view class="user_info">
<view class="name-phone">
<text>{{nickname}}</text>
<text>{{phone}}</text>
</view>
<view class="address">{{address_detail}}</view>
</view>
</view>
<!-- 订单信息 -->
<view class="order-content">
<view class="product">
<view class="img">
<image :src="'http://localhost:3000/'+product.img" mode=""></image>
</view>
<view class="right-info">
<view class="product-name">黑糖拿铁</view>
<view class="price-num">
<text>${{product.price}}</text>
<text>x{{product.num}}</text>
</view>
</view>
</view>
<view class="num-allprice">
<text>共计{{product.num}}件商品</text>
<text>订单金额 :{{product.allPrice}}元</text>
</view>
</view>
<button @click="pay">立即结算</button>
</view>
</template>
<style>
.choose {
margin-bottom: 20px;
padding: 10px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.title {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}
.user_info {
margin-top: 10px;
}
.name-phone {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.address {
font-size: 14px;
color: #666;
}
.order-content {
padding: 10px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.product {
display: flex;
margin-bottom: 10px;
}
.img {
width: 80px;
height: 80px;
margin-right: 10px;
overflow: hidden;
border-radius: 5px;
}
.img image {
width: 100%;
height: 100%;
object-fit: cover;
}
.right-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.product-name {
font-size: 16px;
font-weight: bold;
margin-bottom: 5px;
}
.price-num {
display: flex;
align-items: center;
font-size: 14px;
color: #666;
}
.price-num text {
margin-right: 10px;
}
.num-allprice {
display: flex;
justify-content: space-between;
margin-top: 10px;
font-size: 14px;
color: #333;
}
button {
width: 100%;
height: 50px;
line-height: 50px;
text-align: center;
color: #fff;
background-color: #f00;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
</style>
```
请注意,这里的样式只是示例,具体的样式需要根据实际情况进行调整。
阅读全文