提交
This commit is contained in:
@@ -1,251 +0,0 @@
|
||||
<template>
|
||||
<view
|
||||
class="container commonPageBox commonDetailPage"
|
||||
style="height: auto !important; padding-bottom: 0 !important"
|
||||
>
|
||||
<u-popup :show="show" v-if="show" mode="center" class="popup_box">
|
||||
<div class="product_image" scroll-y="true" style="position: relative">
|
||||
|
||||
<swiper
|
||||
:style="{ height: fullHeight }"
|
||||
class="swiper-tall"
|
||||
:indicator-dots="indicatorDots"
|
||||
:autoplay="autoplay"
|
||||
:previous-margin="previousMargin"
|
||||
:next-margin="nextMargin"
|
||||
:circular="circular"
|
||||
@change="change"
|
||||
:current="swiperCurrentIndex"
|
||||
>
|
||||
<swiper-item
|
||||
class="swiper-container"
|
||||
v-for="(img, index) in list"
|
||||
:key="index"
|
||||
:item-id="index"
|
||||
:data-year="index"
|
||||
>
|
||||
<view
|
||||
@click="gotoDetail(img)"
|
||||
class="swiper-item"
|
||||
:style="{
|
||||
background: img ? 'url(' + img.icon + ') center no-repeat' : '',
|
||||
backgroundSize: '100% 100%',
|
||||
}"
|
||||
:animation="animationData[index]"
|
||||
>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view style="display: flex;align-items: center;justify-content: center;">
|
||||
<view @click="close" style="font-weight: bold;background-color: rgba(255, 255, 255, 0.8); color: #333;padding:20rpx 10rpx;width: 200rpx;font-size: 30rpx;border-radius: 40rpx;text-align: center;letter-spacing: 0.5rpx;">
|
||||
关闭
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</div>
|
||||
</u-popup></view
|
||||
>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const stopPenetrate = () => {
|
||||
return;
|
||||
};
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
props: ["list"],
|
||||
data() {
|
||||
return {
|
||||
screenHeight: 0,
|
||||
animationData: {
|
||||
0: {},
|
||||
1: {},
|
||||
2: {},
|
||||
},
|
||||
title: "0",
|
||||
indicatorDots: false,
|
||||
autoplay: false,
|
||||
previousMargin: uni.upx2px(82) + "px",
|
||||
nextMargin: uni.upx2px(82) + "px",
|
||||
circular: true,
|
||||
zoomParam: 1.1,
|
||||
swiperCurrentIndex: 0,
|
||||
data: [],
|
||||
max: 0,
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.show = false;
|
||||
},
|
||||
onLoad() {},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
|
||||
fullHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
return (
|
||||
res.windowHeight - uni.upx2px(60) - (res.statusBarHeight + 44) + "px"
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
gotoDetail(v) {
|
||||
console.log("v at line 58:", v);
|
||||
if (v.relationId) {
|
||||
if (v.type == 0) {
|
||||
if (v.shopProduct) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/bookShop/commodityDetail?id=${v.shopProduct.productId}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (v.type == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/peanut/reCharge`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// if (v.type == 2) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/mine/vip/index`,
|
||||
// });
|
||||
// }
|
||||
|
||||
this.show = false;
|
||||
},
|
||||
// 放大图片
|
||||
previewImage(url) {
|
||||
console.log(url);
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ["很抱歉,暂不支持保存图片到本地"],
|
||||
success: function (res) {
|
||||
// console.log(res,'+++++')
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
change(e) {
|
||||
this.swiperCurrentIndex = e.detail.current;
|
||||
this.title = e.detail.currentItemId;
|
||||
for (let key in this.animationData) {
|
||||
if (e.detail.currentItemId == key) {
|
||||
this.animation.scale(this.zoomParam).step();
|
||||
this.animationData[key] = this.animation.export();
|
||||
} else {
|
||||
this.animation.scale(1.0).step();
|
||||
this.animationData[key] = this.animation.export();
|
||||
}
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
selectGoods(data) {
|
||||
this.$emit("selectGoods", data);
|
||||
},
|
||||
open() {
|
||||
this.animation = uni.createAnimation();
|
||||
this.animation.scale(this.zoomParam).step();
|
||||
this.animationData[0] = this.animation.export();
|
||||
this.show = true;
|
||||
},
|
||||
|
||||
onHandleClickBuy() {
|
||||
this.$emit("selectGoodsData", this.selectGoodsData);
|
||||
this.$emit("onHandleClickBuy");
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
|
||||
components: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.goods_image {
|
||||
width: 70vw;
|
||||
}
|
||||
|
||||
.popup_box {
|
||||
padding-top: 30rpx;
|
||||
|
||||
background-color: transparent;
|
||||
|
||||
.popup_content {
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.product_image {
|
||||
width: 100vw;
|
||||
|
||||
max-height: 90vh;
|
||||
}
|
||||
}
|
||||
/deep/.u-popup__content {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
/deep/.u-popup__content__close {
|
||||
color: #fff !important;
|
||||
}
|
||||
.title_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: 0;
|
||||
.title_price {
|
||||
color: #ef1224;
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
.swiper-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
height: 858upx;
|
||||
width: 530upx;
|
||||
line-height: 300upx;
|
||||
text-align: center;
|
||||
broder-radius: 6upx;
|
||||
margin-bottom: 50upx;
|
||||
}
|
||||
|
||||
.swiper-tall {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swiper-title {
|
||||
width: 750upx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,287 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-for="(item, index) in List" :key="index">
|
||||
<view :class="`youhuiItem ${itemClass}`">
|
||||
<view class="centerbg">
|
||||
<view class="centerView" style="position: relative"
|
||||
><text
|
||||
v-if="source == 'mine'"
|
||||
class="border_radius_10"
|
||||
style="
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
top: 10rpx;
|
||||
font-size: 25rpx;
|
||||
/* background-color: #fad4bd; */
|
||||
color: #ed2a2e;
|
||||
"
|
||||
>{{ item.couponEntity.couponRange | couponType }}</text
|
||||
>
|
||||
<view style="color: #fd4347; width: 200rpx">
|
||||
<view
|
||||
style="position: relative; border-right: 1px dashed #fa8277"
|
||||
>
|
||||
<text
|
||||
style="
|
||||
font-weight: 700;
|
||||
font-size: 40rpx;
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 0rpx;
|
||||
"
|
||||
>¥</text
|
||||
>
|
||||
<text
|
||||
style="
|
||||
font-size: 64rpx;
|
||||
letter-spacing: 0.1px;
|
||||
font-weight: 700;
|
||||
margin-left: 40rpx;
|
||||
"
|
||||
>{{ item.couponEntity.couponAmount }}</text
|
||||
>
|
||||
<text
|
||||
v-if="source == 'mine'"
|
||||
style="
|
||||
display: block;
|
||||
color: #333;
|
||||
font-size: 25rpx;
|
||||
margin-left: 0rpx;
|
||||
margin-top: 0rpx;
|
||||
"
|
||||
>满{{ item.couponEntity.useLevel }}元可用</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: calc(100% - 220rpx)">
|
||||
<view>
|
||||
<view
|
||||
style="color: #fd4347; font-size: 44rpx; font-weight: bold;"
|
||||
>{{
|
||||
item.couponEntity.couponType == 0 ? "现金" : "折扣"
|
||||
}}优惠券
|
||||
|
||||
|
||||
<!-- <text v-if="source == 'mine'" style="box-sizing: border-box;padding:4rpx 20rpx;margin-left: 10rpx;font-size: 24rpx;background-color: #fff;border-radius: 24rpx;float: right;">去使用</text> -->
|
||||
|
||||
|
||||
|
||||
|
||||
</view
|
||||
>
|
||||
|
||||
|
||||
<text
|
||||
v-if="source != 'goodsDetail'"
|
||||
style="
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
>有效期至:{{
|
||||
item.effectType == 0 ? "永久有效" : item.endTime
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottombg">
|
||||
<view
|
||||
style="
|
||||
width: 100%;
|
||||
padding: 16rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
margin-right: 6rpx;
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
text-align: center;
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="title"
|
||||
style="
|
||||
line-height: 34rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
"
|
||||
>
|
||||
{{ item.couponEntity.couponName }}
|
||||
</view>
|
||||
<view
|
||||
v-if="item.couponEntity.remark"
|
||||
style="
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
font-size: 22rpx;
|
||||
color: #fafafa;
|
||||
"
|
||||
>
|
||||
<!-- 详细信息
|
||||
<u-icon
|
||||
size="20rpx"
|
||||
color="#fafafa"
|
||||
style="color: #fafafa; float: right;margin-left: 4rpx;"
|
||||
name="arrow-down-fill"
|
||||
></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-collapse
|
||||
v-if="source != 'goodsDetail'&&item.couponEntity.remark"
|
||||
style="
|
||||
margin-top: 0rpx;
|
||||
z-index: 10 !important;
|
||||
background-color: #fafafa;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
"
|
||||
:border="false"
|
||||
>
|
||||
<u-collapse-item title="详细信息" name="Docs guide">
|
||||
<view
|
||||
style="
|
||||
font-size: 22rpx;
|
||||
width: 100%;
|
||||
margin-right: 20rpx !important;
|
||||
"
|
||||
>使用说明:{{ item.couponEntity.remark }}</view
|
||||
>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
props: ["List", "source", "itemClass"],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
|
||||
filters: {
|
||||
couponType(type) {
|
||||
// 0无限制 1课程卷 2课程品类卷
|
||||
var str = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
str = "全场通用";
|
||||
break;
|
||||
case 1:
|
||||
str = "指定课程可用";
|
||||
break;
|
||||
case 2:
|
||||
str = "指定课程品类可用";
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.youhuiItem {
|
||||
min-height: 320rpx;
|
||||
position: relative;
|
||||
background: linear-gradient(to top right, #fd4c50, #fe393d);
|
||||
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
|
||||
padding: 26rpx;
|
||||
margin: 25rpx 0 0 0;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.centerbg {
|
||||
width: 100%;
|
||||
background-image: linear-gradient(60deg, #ffefd3 0%, #f8be85 100%);
|
||||
|
||||
height: calc(100%);
|
||||
border-radius: 10rpx;
|
||||
padding-bottom: 86rpx;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.centerView {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding: 30rpx 20rpx 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bottombg {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
background-image: url("@/static/icon/coupon/bottom.png") !important;
|
||||
}
|
||||
|
||||
.youhuiItem > view {
|
||||
}
|
||||
|
||||
.youhuiItem.youItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
|
||||
::v-deep .u-cell__body {
|
||||
padding-top: 0 !important ;
|
||||
padding-bottom: 0 !important ;
|
||||
z-index: 10 !important ;
|
||||
.u-cell__title-text {
|
||||
color: #333 !important;
|
||||
font-size: 24rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .u-collapse-item__content__text {
|
||||
padding: 10rpx 20rpx !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
::v-deep.itemCouponClass {
|
||||
min-height: 180rpx !important;
|
||||
.bottombg {
|
||||
.title {
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
.centerbg {
|
||||
padding-bottom: 60rpx !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user