<template>
|
<view class="order">
|
<view class="order_address">
|
<view class="top">
|
<view class="order_address_left">
|
<image src="@/static/icon/huodong_ic_didian@2x.png" mode="widthFix"></image>
|
<text>添加收货地址</text>
|
</view>
|
<uni-icons type="forward" size="20" color="#999999"></uni-icons>
|
</view>
|
<view class="bottom" @click="open">
|
<text>订单形式</text>
|
<view class="bottom_right">
|
<text>{{from.name ? from.name : '选择'}}</text>
|
<uni-icons type="forward" size="20" color="#999999"></uni-icons>
|
</view>
|
</view>
|
</view>
|
<view class="order_shop">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<view class="order_shop_info">
|
<view class="info">
|
<text class="title">清澄白河马克杯-节日版定制节日版定制节日版定制</text>
|
<text class="color">白色</text>
|
</view>
|
<view class="price">
|
<text>¥</text>
|
<text>179</text>
|
<text>.98</text>
|
</view>
|
</view>
|
</view>
|
<view class="order_infos">
|
<view class="order_info_top">
|
<text class="label">优惠券</text>
|
<view class="right">
|
<text>-¥5</text>
|
<uni-icons type="forward" size="20" color="#999999"></uni-icons>
|
</view>
|
</view>
|
<view class="order_info_top">
|
<text class="label">实付款</text>
|
<view class="right1">
|
<text>¥</text>
|
<text>174</text>
|
<text>.98</text>
|
</view>
|
</view>
|
<view class="order_info_top">
|
<text class="label">订单留言</text>
|
<input
|
type="text"
|
placeholder="选填,建议与商家协商一致"
|
placeholder-style="text-align: right;font-size: 28rpx;font-weight: 500;color: #999999;"
|
/>
|
</view>
|
</view>
|
<view class="order_footer">
|
<view class="order_footer_price">
|
<text>¥</text>
|
<text>179</text>
|
<text>.98</text>
|
</view>
|
<view class="order_footer_submit">
|
提交订单
|
</view>
|
</view>
|
<!-- 订单形式 -->
|
<uni-popup ref="popup" background-color="#fff">
|
<view class="popup">
|
<view class="popup_head">
|
<text></text>
|
<text>订单形式</text>
|
<uni-icons @click="close" type="closeempty" size="20" color="#999999"></uni-icons>
|
</view>
|
<view class="popup_list">
|
<view class="popup_list_item" v-for="(item, index) in cates" :key="index" @click="changeCate(index)">
|
<text>{{item.name}}</text>
|
<radio color="#D20A0A" :value="item.id" :checked="index === current" />
|
</view>
|
</view>
|
<view class="popup_footer">
|
<view class="popup_footer_btn" @click="define">确定</view>
|
</view>
|
</view>
|
</uni-popup>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
from: {
|
name: '',
|
val: ''
|
},
|
current: 0,
|
cates: [
|
{ name: '延长现有订阅', id: 1 },
|
{ name: '新增订阅计划', id: 2 }
|
]
|
}
|
},
|
methods: {
|
changeCate(index) {
|
this.current = index
|
},
|
define() {
|
this.from.name = this.cates[this.current].name
|
this.from.val = this.cates[this.current].id
|
this.$refs.popup.close()
|
},
|
open() {
|
this.$refs.popup.open('bottom')
|
},
|
close() {
|
this.$refs.popup.close()
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.order {
|
width: 100%;
|
.order_address {
|
width: 100%;
|
padding: 0 32rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
background-color: #ffffff;
|
.top {
|
width: 100%;
|
height: 84rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
border-bottom: 2rpx solid #F4F5F4;
|
.order_address_left {
|
display: flex;
|
align-items: center;
|
image {
|
width: 21rpx;
|
height: 26rpx;
|
margin-right: 8rpx;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
}
|
}
|
.bottom {
|
width: 100%;
|
height: 84rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
.bottom_right {
|
display: flex;
|
align-items: center;
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
margin-right: 12rpx;
|
}
|
}
|
}
|
}
|
.order_shop {
|
padding: 32rpx;
|
box-sizing: border-box;
|
background-color: #ffffff;
|
margin-top: 16rpx;
|
display: flex;
|
align-items: center;
|
image {
|
flex-shrink: 0;
|
border-radius: 10rpx;
|
width: 190rpx;
|
height: 190rpx;
|
margin-right: 30rpx;
|
}
|
.order_shop_info {
|
flex: 1;
|
height: 190rpx;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
.info {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.title {
|
width: 450rpx;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
font-size: 28rpx;
|
font-family: PingFang SC-Bold, PingFang SC;
|
font-weight: bold;
|
color: #333333;
|
}
|
.color {
|
font-size: 24rpx;
|
font-family: PingFang SC-Light, PingFang SC;
|
font-weight: 300;
|
color: #666666;
|
margin-top: 14rpx;
|
}
|
}
|
.price {
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 12rpx;
|
}
|
&:nth-child(2) {
|
font-size: 40rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #D20A0A;
|
}
|
&:nth-child(3) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #D20A0A;
|
margin-top: 12rpx;
|
}
|
}
|
}
|
}
|
}
|
.order_infos {
|
padding: 30rpx 32rpx;
|
background-color: #ffffff;
|
margin-top: 16rpx;
|
display: flex;
|
flex-direction: column;
|
.order_info_top {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
margin-bottom: 30rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.label {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
input {
|
width: 350rpx;
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #000000;
|
text-align: right;
|
}
|
.right1 {
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
margin-top: 12rpx;
|
}
|
&:nth-child(2) {
|
font-size: 40rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
&:nth-child(3) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
margin-top: 12rpx;
|
}
|
}
|
}
|
.right {
|
display: flex;
|
align-items: center;
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-right: 12rpx;
|
}
|
}
|
}
|
}
|
.order_footer {
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
width: 100%;
|
padding: 16rpx 32rpx calc(16rpx + env(safe-area-inset-bottom)) 32rpx;
|
background: #FFFFFF;
|
box-sizing: border-box;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.order_footer_price {
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 12rpx;
|
}
|
&:nth-child(2) {
|
font-size: 40rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #D20A0A;
|
}
|
&:nth-child(3) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #D20A0A;
|
margin-top: 12rpx;
|
}
|
}
|
}
|
.order_footer_submit {
|
width: 184rpx;
|
height: 64rpx;
|
line-height: 64rpx;
|
text-align: center;
|
background: linear-gradient(90deg, #D95A5A 0%, #D20A0A 100%);
|
border-radius: 56rpx;
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #FFFFFF;
|
}
|
}
|
.popup {
|
padding: 48rpx 32rpx 0 32rpx;
|
.popup_head {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
text {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #333333;
|
}
|
}
|
.popup_list {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
margin-top: 68rpx;
|
.popup_list_item {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
margin-bottom: 64rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
}
|
}
|
.popup_footer {
|
padding: 0 56rpx;
|
margin-top: 110rpx;
|
.popup_footer_btn {
|
width: 100%;
|
height: 72rpx;
|
line-height: 72rpx;
|
text-align: center;
|
background: linear-gradient(270deg, #D20A0A 0%, #D95A5A 100%);
|
border-radius: 36rpx;
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #FFFFFF;
|
}
|
}
|
}
|
}
|
</style>
|