123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <template>
- <view class="cu-modal bottom-modal" :class="{'show': visible}">
- <view class="mask" @click="close"></view>
- <view class="wrapper cu-dialog">
- <view class="paddingY25 flex-align-center relative">
- <view class="font10 color-theme">
- 确认赠送吗?
- </view>
- <image :src="resource.icon_x" class="x" @click="close" />
- </view>
- <view>
- <view class="paddingB20">
- <scroll-view scroll-x class="scroll-wrapper" v-if="goods.length > 4">
- <view class="item" v-for="(goods, index) in goods" :key="index">
- <image class="super-image translateX" mode="aspectFit" :src="goods.cover" />
- </view>
- </scroll-view>
- <view v-else class="flex-align-around">
- <view class="item" v-for="(goods, index) in goods" :key="index">
- <image class="super-image translateX" mode="aspectFit" :src="goods.cover" />
- </view>
- </view>
- </view>
- </view>
- <view class="bottom flex-align-between color-white" >
- <view class="left">受赠人:</view>
- <view class="right flex-align">
- <image class="img" :src="userData.avatar" mode="aspectFit" />
- <view class="">{{ userData.nickname }}</view>
- </view>
- </view>
- <view class="gift_text">
- 一键转赠仅用于好友间转赠商品,不提供其他任何场景使用,若因操作不当或过分使用造成的损失,本平台概不负责。
- </view>
- <cm-button ::height="44" @click="submit()">确认赠送</cm-button>
- <view class="fill"> </view>
- </view>
- </view>
- </template>
- <script>
- import cmButton from '../../components/cm-button.vue'
- import resource from '@/utils/resource'
- export default {
- components: { cmButton },
- data() {
- return {
- resource,
- visible: false,
- goods: [],
- userData: [],
- param: {}
- }
- },
- mounted() {},
- methods: {
- show(data, goods,param) {
- this.goods = goods
- this.userData = data.toUser
- this.param = param
- this.visible = true
- },
- close() {
- this.visible = false
- this.$emit('close', false)
- },
- async submit() {
- const res = await this.$service.award.transferOrderSubmit(this.param)
- if (res.code === '0') {
- this.$emit('success')
- this.close()
- } else {
- this.$message.error(res.msg)
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .mask {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- }
- .wrapper {
- padding: 0 28rpx;
- background: #171b1e;
- border-radius: 15px 15px 2px 2px;
- .title {
- width: 172rpx;
- height: 28rpx;
- }
- .x {
- position: absolute;
- right: 28rpx;
- top: 50%;
- margin-top: -16rpx;
- width: 32rpx;
- height: 32rpx;
- }
- .fill {
- height: 50rpx;
- }
- }
- .scroll-wrapper {
- padding-left: 28rpx;
- overflow: hidden;
- height: 182rpx;
- white-space: nowrap;
- width: 100%;
- .item {
- display: inline-block;
- margin-right: 8rpx;
- }
- }
- .item {
- width: 120rpx;
- height: 182rpx;
- position: relative;
- .super {
- position: absolute;
- z-index: 0;
- left: 0;
- top: 0;
- width: 120rpx;
- height: 182rpx;
- }
- .super-image {
- position: absolute;
- top: 14rpx;
- width: 109rpx;
- height: 120rpx;
- }
- .bg-title {
- color: #fff;
- font-size: 24rpx;
- text-align: center;
- position: absolute;
- left: 0;
- right: 0;
- bottom: 16rpx;
- // padding: 2rpx 0;
- }
- }
- .bottom {
- height: 60rpx;
- margin-bottom: 10rpx;
- .left {
- width: 100rpx;
- }
- .right {
- .img {
- width: 50rpx;
- height: 50rpx;
- border-radius: 50%;
- margin-right: 10rpx;
- }
- }
- }
- .gift_text {
- color: #999;
- font-size: 22rpx;
- margin-bottom: 20rpx;
- }
- </style>
|