|
@@ -3,24 +3,73 @@
|
|
<u-navbar title="兑换详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
<u-navbar title="兑换详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
|
|
<view class="detail">
|
|
<view class="detail">
|
|
<view class="detail-top">
|
|
<view class="detail-top">
|
|
- <u-swiper :list="picUrlArr" height="320" :indicator="true" :circular="true"></u-swiper>
|
|
|
|
|
|
+ <u-swiper :list="picUrlArr" height="348" :indicator="true" :circular="true"></u-swiper>
|
|
</view>
|
|
</view>
|
|
- <view class="detail-sku">
|
|
|
|
- <view class="detail-sku-title">参数</view>
|
|
|
|
|
|
+ <view class="detail-title">
|
|
|
|
+ <view class="txt">Apple iPhone 13 (A2634) 128GB 星光色 支持移动联通电信5G 双卡双待手机</view>
|
|
|
|
+ <view class="coin">
|
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
|
+ <view>x 6800</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="detail-goods">商品详情</view>
|
|
</view>
|
|
</view>
|
|
<view class="footer-fixed">
|
|
<view class="footer-fixed">
|
|
<view class="flex btn">
|
|
<view class="flex btn">
|
|
- <view class="btn-left" @click="toCart">
|
|
|
|
- <u-icon name="shopping-cart" color="#808080" size="20"></u-icon>
|
|
|
|
- <view>购物车</view>
|
|
|
|
|
|
+ <button type="default" @click="exChange">立即兑换</button>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <!-- 兑换选择 -->
|
|
|
|
+ <u-popup :show="choiceShow" mode="bottom" @close="close" :closeable="true">
|
|
|
|
+ <view class="choiceShow-wrap">
|
|
|
|
+ <view class="flex goods">
|
|
|
|
+ <view class="flex image-wrap">
|
|
|
|
+ <image src="../../static/logo.png" mode="aspectFill"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="info">
|
|
|
|
+ <view class="info-title">Apple iPhone 13 (A2634) 128GB 星光色 支持移动联通电信5G 双卡双待手机</view>
|
|
|
|
+ <view class="info-coin">
|
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
|
+ <view>x 6800</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="info-stock">库存:234</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="sku">
|
|
|
|
+ <view class="sku-title">颜色</view>
|
|
|
|
+ <view class="flex sku-list">
|
|
|
|
+ <view class="sku-list-item">红色</view>
|
|
|
|
+ <view class="sku-list-item">黑色</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="sku">
|
|
|
|
+ <view class="sku-title">颜色</view>
|
|
|
|
+ <view class="flex sku-list">
|
|
|
|
+ <view class="sku-list-item">红色</view>
|
|
|
|
+ <view class="sku-list-item">黑色</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex quantity">
|
|
|
|
+ <view class="quantity-title">兑换数量</view>
|
|
|
|
+ <view class="quantity-title">
|
|
|
|
+ <u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="btn-right">
|
|
|
|
- <text @click="addCart">加入购物车</text>
|
|
|
|
- <text @click="toSettlement">立即购票</text>
|
|
|
|
|
|
+ <view class="flex btn">
|
|
|
|
+ <view class="flex btn-left">
|
|
|
|
+ <view class="title">应付:</view>
|
|
|
|
+ <view class="flex coin">
|
|
|
|
+ <image src="../../static/logo.png" mode=""></image>
|
|
|
|
+ <view>x 6800</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="btn-right">
|
|
|
|
+ <view class="confirm">立即兑换</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
|
|
+ </u-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -38,6 +87,11 @@
|
|
],
|
|
],
|
|
info: {},
|
|
info: {},
|
|
prizeList: [],
|
|
prizeList: [],
|
|
|
|
+
|
|
|
|
+ choiceShow: false,
|
|
|
|
+
|
|
|
|
+ value: 1,
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad(opthios) {
|
|
onLoad(opthios) {
|
|
@@ -67,180 +121,187 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- addCart(id) {
|
|
|
|
- let data = {
|
|
|
|
- boxId: this.info.boxId,
|
|
|
|
- orderNum: 1
|
|
|
|
- }
|
|
|
|
- $http.post(`/api/v1/mp/channel/mall/cart/add`, data).then(res => {
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- uni.$u.toast('加入购物车成功');
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ exChange() {
|
|
|
|
+ this.choiceShow = true
|
|
},
|
|
},
|
|
|
|
|
|
- toCart() {
|
|
|
|
- uni.switchTab({
|
|
|
|
- url: "/pages/index/cart"
|
|
|
|
- })
|
|
|
|
|
|
+ close() {
|
|
|
|
+ this.choiceShow = false
|
|
},
|
|
},
|
|
|
|
|
|
- toSettlement() {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: `/pages/order/settlement?boxId=${ this.info.boxId }`
|
|
|
|
- })
|
|
|
|
|
|
+ valChange(e) {
|
|
|
|
+ console.log(e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-
|
|
|
|
|
|
+
|
|
</style>
|
|
</style>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.detail {
|
|
.detail {
|
|
padding-bottom: 100rpx;
|
|
padding-bottom: 100rpx;
|
|
|
|
|
|
&-top {
|
|
&-top {
|
|
- margin-bottom: 20rpx;
|
|
|
|
|
|
+ height: 696rpx;
|
|
|
|
+ background-color: #FFFFFF;
|
|
}
|
|
}
|
|
|
|
|
|
- &-info {
|
|
|
|
- justify-content: space-between;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- padding: 24rpx 16rpx;
|
|
|
|
- background-color: #fff;
|
|
|
|
- margin: 10rpx 10rpx 20rpx;
|
|
|
|
- border-radius: 10rpx;
|
|
|
|
|
|
+ &-title {
|
|
|
|
+ padding: 24rpx;
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
+
|
|
|
|
+ .txt {
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
|
+ margin-bottom: 24rpx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
|
|
- &__left {
|
|
|
|
|
|
+ .coin {
|
|
display: flex;
|
|
display: flex;
|
|
- flex-direction: column;
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ color: rgba(235, 112, 9, 100);
|
|
|
|
+ }
|
|
|
|
|
|
- text {
|
|
|
|
- font-size: 24rpx;
|
|
|
|
- line-height: 24rpx;
|
|
|
|
- display: inline-block;
|
|
|
|
- }
|
|
|
|
|
|
+ image {
|
|
|
|
+ width: 42rpx;
|
|
|
|
+ height: 42rpx;
|
|
|
|
+ margin-right: 20rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- .title {
|
|
|
|
- color: rgba(16, 16, 16, 100);
|
|
|
|
- font-size: 32rpx;
|
|
|
|
- line-height: 32rpx;
|
|
|
|
- font-weight: bold;
|
|
|
|
- margin-bottom: 40rpx;
|
|
|
|
- }
|
|
|
|
|
|
+ &-goods {
|
|
|
|
+ height: 88rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 88rpx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- .num {
|
|
|
|
- width: 220rpx;
|
|
|
|
- height: 34rpx;
|
|
|
|
- color: $uni-text-color;
|
|
|
|
- text-align: center;
|
|
|
|
- line-height: 34rpx;
|
|
|
|
- border: 1px solid $uni-bg-color;
|
|
|
|
- border-radius: 6rpx;
|
|
|
|
|
|
+ .choiceShow-wrap {
|
|
|
|
+ min-height: 400rpx;
|
|
|
|
+ padding: 80rpx 20rpx 60rpx;
|
|
|
|
+
|
|
|
|
+ .goods {
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
+
|
|
|
|
+ .image-wrap {
|
|
|
|
+ width: 220rpx;
|
|
|
|
+ height: 220rpx;
|
|
|
|
+ border: 1px solid rgba(236, 236, 236, 100);
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+
|
|
|
|
+ image {
|
|
|
|
+ width: 174rpx;
|
|
|
|
+ height: 174rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- &__right {
|
|
|
|
|
|
+ .info {
|
|
|
|
+ flex: 1;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- align-items: flex-end;
|
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
+ padding-left: 26rpx;
|
|
|
|
|
|
- text {
|
|
|
|
- color: rgba(157, 157, 157, 100);
|
|
|
|
- font-size: 14px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .money {
|
|
|
|
- font-size: 40rpx;
|
|
|
|
- font-weight: bold;
|
|
|
|
- line-height: 40rpx;
|
|
|
|
|
|
+ &-title {
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 44rpx;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
- color: $uni-text-color;
|
|
|
|
- margin-bottom: 40rpx;
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- &-sku {
|
|
|
|
- background-color: #fff;
|
|
|
|
- border-radius: 10rpx;
|
|
|
|
- margin: 10rpx 10rpx 20rpx;
|
|
|
|
|
|
|
|
- &-title {
|
|
|
|
- padding: 24rpx 16rpx 12rpx;
|
|
|
|
- }
|
|
|
|
|
|
+ &-coin {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ color: rgba(235, 112, 9, 100);
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
|
- &-item {
|
|
|
|
- padding-bottom: 10rpx;
|
|
|
|
|
|
+ image {
|
|
|
|
+ width: 42rpx;
|
|
|
|
+ height: 42rpx;
|
|
|
|
+ margin-right: 20rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- view {
|
|
|
|
- padding-left: 50rpx;
|
|
|
|
- line-height: 50rpx;
|
|
|
|
|
|
+ &-stock {
|
|
|
|
+ line-height: 44rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- &-goods {
|
|
|
|
- margin: 10rpx 10rpx 20rpx;
|
|
|
|
|
|
+ .sku {
|
|
|
|
+ margin-bottom: 30rpx;
|
|
|
|
|
|
&-title {
|
|
&-title {
|
|
- margin-bottom: 20rpx;
|
|
|
|
|
|
+ line-height: 42rpx;
|
|
}
|
|
}
|
|
|
|
|
|
&-list {
|
|
&-list {
|
|
- background-color: #FFFFFF;
|
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
|
&-item {
|
|
&-item {
|
|
- position: relative;
|
|
|
|
- margin: 16rpx 0;
|
|
|
|
- border-bottom: 1px solid rgba(236, 236, 236, 100);
|
|
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ padding: 0 20rpx;
|
|
|
|
+ border: 1px solid rgba(187, 187, 187, 100);
|
|
|
|
+ margin-left: 36rpx;
|
|
|
|
+ }
|
|
|
|
|
|
- &__value {
|
|
|
|
- display: flex;
|
|
|
|
- }
|
|
|
|
|
|
+ &-item:first-child {
|
|
|
|
+ margin-left: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- .image-wrap {
|
|
|
|
- width: 250rpx;
|
|
|
|
- height: 250rpx;
|
|
|
|
- margin-right: 30rpx;
|
|
|
|
|
|
+ .quantity {
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ margin-bottom: 40rpx;
|
|
|
|
+ }
|
|
|
|
|
|
- image {
|
|
|
|
- width: 180rpx;
|
|
|
|
- height: 120rpx;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .btn {
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .name {
|
|
|
|
- position: absolute;
|
|
|
|
- line-height: 28rpx;
|
|
|
|
- padding: 6rpx 20rpx;
|
|
|
|
- background-color: $uni-bg-color;
|
|
|
|
- }
|
|
|
|
|
|
+ &-left {
|
|
|
|
+ .coin {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 44rpx;
|
|
|
|
+ color: rgba(235, 112, 9, 100);
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ margin-left: 20rpx;
|
|
|
|
|
|
- .info {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- font-size: 24rpx;
|
|
|
|
-
|
|
|
|
- text {
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- text:first-child {
|
|
|
|
- font-size: 28rpx;
|
|
|
|
- margin-top: 24rpx;
|
|
|
|
- margin-bottom: 30rpx;
|
|
|
|
- font-weight: bold;
|
|
|
|
- }
|
|
|
|
|
|
+ image {
|
|
|
|
+ width: 42rpx;
|
|
|
|
+ height: 42rpx;
|
|
|
|
+ margin-right: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
- &-item:last-child {
|
|
|
|
- border: none;
|
|
|
|
|
|
+ &-right {
|
|
|
|
+ .confirm {
|
|
|
|
+ width: 250rpx;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+ border-radius: 8px;
|
|
|
|
+ background-color: rgba(235, 112, 9, 100);
|
|
|
|
+ color: rgba(255, 255, 255, 100);
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ text-align: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -251,52 +312,25 @@
|
|
bottom: var(--window-bottom);
|
|
bottom: var(--window-bottom);
|
|
left: 0;
|
|
left: 0;
|
|
right: 0;
|
|
right: 0;
|
|
- // min-height: 120rpx;
|
|
|
|
z-index: 11;
|
|
z-index: 11;
|
|
box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
|
|
box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
|
|
background: #fff;
|
|
background: #fff;
|
|
- // margin-bottom: 40rpx;
|
|
|
|
-
|
|
|
|
// 设置ios刘海屏底部横线安全区域
|
|
// 设置ios刘海屏底部横线安全区域
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
|
|
|
|
.btn {
|
|
.btn {
|
|
- justify-content: space-between;
|
|
|
|
- padding: 10rpx 40rpx;
|
|
|
|
-
|
|
|
|
- &-left {
|
|
|
|
- display: flex;
|
|
|
|
- line-height: 28rpx;
|
|
|
|
- flex-direction: column;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- color: #808080;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- &-right {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: flex-end;
|
|
|
|
-
|
|
|
|
- text {
|
|
|
|
- width: 190rpx;
|
|
|
|
- height: 60rpx;
|
|
|
|
- line-height: 60rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- text-align: center;
|
|
|
|
- margin-left: 40rpx;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- text:first-child {
|
|
|
|
- background-color: rgba(236, 153, 84, 100);
|
|
|
|
- color: rgba(255, 255, 255, 100);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- text:last-child {
|
|
|
|
- background-color: rgba(235, 112, 9, 100);
|
|
|
|
- color: rgba(255, 255, 255, 100);
|
|
|
|
- }
|
|
|
|
|
|
+ padding: 20rpx 40rpx;
|
|
|
|
+
|
|
|
|
+ /deep/ button {
|
|
|
|
+ width: 100%;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ color: #fff;
|
|
|
|
+ background-color: $uni-bg-color;
|
|
|
|
+ border: none;
|
|
|
|
+ border-radius: 100rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|