Commit 062c8d56 authored by 华国豪's avatar 华国豪 🙄

新版本优惠券

parent 5c742623
......@@ -59,7 +59,7 @@ export default {
<style>
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_863923_adaetrmddt6.css';
@import '//at.alicdn.com/t/font_863923_efb26gusuoj.css';
@import './assets/global/global.css';
body,html{
padding: 0px;
......
......@@ -209,11 +209,57 @@
padding: 0 65px;
height: 70px;
line-height: 70px;
display: flex;
}
.level .level_bottom ._icon_list ._item{
height: 64px;
width: 64px;
border-radius: 50%;
text-align: center;
background-color: #E9C398;
position: relative;
margin-right: 10px;
z-index: 1;
overflow: hidden;
}
.level .level_bottom ._icon_list i{
font-size: 50px;
font-size: 46px;
color: #F8B04B;
padding-right: 25px;
display: inline-block;
height: 60px;
width: 60px;
border-radius: 50%;
background-color: white;
z-index: 3;
position: absolute;
left: 2px;
top: 2px;
}
.level .level_bottom ._icon_list ._item:hover ._raduis{
width: 64px;
}
.level .level_bottom ._icon_list ._item:hover ._raduis{
width: 64px;
}
.level .level_bottom ._icon_list ._raduis{
position: absolute;
width: 0px;
height: 32px;
background-color: #d58933;
border-radius: 0 0 64px 64px;
margin-right: 10px;
display: inline-block;
bottom: 0;
left: 0;
z-index: 2;
transition: all ease-in .5s ;
}
.level .level_bottom ._icon_list ._raduis._raduis2{
right: -10px;
top: 0;
left: inherit;
border-radius: 64px 64px 0 0;
transition: all .5s ease-out .5s;
}
/* 等级权益 */
.level_equity{
......
.MyCoupon{
background-color: #F5F5F5;
}
.MyCoupon .menu_list ul{
height: 40px;
line-height: 40px;
border-bottom: 1px solid #F2DADA;
}
.MyCoupon .menu_list ul li{
float: left;
width: 137px;
text-align: center;
}
.MyCoupon .menu_list ul li .__cp i{
padding-left: 25px;
}
.MyCoupon .menu_list ul li span.__cp{
font-size: 14px;
}
.MyCoupon .menu_list ul li span.__cp._active{
color: #E73828
}
.MyCoupon ._table_box{
margin-top: 20px;
}
.MyCoupon ._content_item{
display: flex;
flex-wrap: wrap;
min-height: 572px;
}
.MyCoupon ._content_item ._item{
width: 220px;
position: relative;
transition: all linear .5s;
overflow: hidden;
margin: 5px 4px;
}
.MyCoupon ._content_item ._item:hover{
box-shadow: 0px 1px 13px 0px rgb(189, 189, 189);
}
.MyCoupon ._content_item ._top{
background-color: #F1BC69;
}
.MyCoupon ._content_item ._top ._time{
color: #A7711C;
}
.MyCoupon ._content_item ._top._blue{
background-color: #8794E2;
}
.MyCoupon ._content_item ._top._blue ._time{
color: #4C58A4;
}
.MyCoupon ._content_item div._top._gray{
background-color: #C3C3C3 !important;
}
.MyCoupon ._content_item div._top._gray ._overdue,.MyCoupon ._content_item div._top._gray ._info_bottom{
display: none
}
.MyCoupon ._content_item div._top._gray ._info_sale{
color: #FFFFFF !important;
}
.MyCoupon ._content_item div._top._gray ._time{
color: #777777 !important;
}
.MyCoupon ._top_raduis{
display: flex;
justify-content: space-between;
}
.MyCoupon ._top_raduis span{
display: inline-block;
width: 8px;
height: 8px;
margin: 3px;
border-radius: 50%;
background-color: white;
margin-top: -4px;
}
.MyCoupon ._item ._top ._overdue{
background-color: #E9F026;
color: #666666;
padding: 4px 6px;
position: absolute;
left: 0;
top: 0;
font-size: 12px;
}
.MyCoupon ._item ._top ._info_details{
padding: 15px 10px;
}
.MyCoupon ._item ._top ._info_details ._info_sale{
font-size: 30px;
color: white;
}
.MyCoupon ._item ._top ._info_details ._info_sale span{
font-size: 20px;
color: white;
}
.MyCoupon ._item ._top ._info_details ._info_full{
color: #FFFFFF;
font-size: 12px;
padding: 5px 0;
}
.MyCoupon ._item ._top ._info_details ._info_time{
font-size: 12px;
}
.MyCoupon ._item ._top ._info_details ._info_bottom{
padding: 1px 5px;
color: #A7711C;
font-size: 12px;
position: absolute;
border: 1px solid #A7711C;
border-radius: 4px;
right: 13px;
top: 24px;
cursor: pointer;
}
.MyCoupon ._item ._bottom{
padding: 15px 10px;
background-color: #F9F9F9;
}
.MyCoupon ._item ._bottom p{
font-size: 12px;
color: #333333;
font-weight: bold;
margin-bottom: 13px;
}
.MyCoupon ._item ._bottom p._bottom_info{
color: #666666;
font-weight: 300;
}
.MyCoupon ._item ._bottom p._margin_bt0{
margin-bottom: 0 !important;
}
.MyCoupon p._info_coupon_name{
font-size: 18px !important;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: white;
}
/* 分页样式 */
.MyCoupon ._pagination{
height: 45px;
background-color: #EBEBEB;
display: flex;
align-items: center;
justify-content: flex-end;
}
.MyCoupon .el-pagination .btn-next,.MyCoupon .el-pagination .btn-prev{
width:40px !important;
height:20px !important;
border:1px solid rgba(238,68,84,1);
border-radius:10px;
color: #f56c6c;
}
.MyCoupon .el-pagination{
display: flex;
align-items: center;
}
.MyCoupon .el-pager li{
background: transparent;
font-weight: initial;
}
.MyCoupon .el-pager li:hover{
color: #f56c6c;
}
.MyCoupon .el-pager li.active{
color: #f56c6c;
}
\ No newline at end of file
......@@ -165,6 +165,7 @@ ul,li{list-style: none;}
}
.new_header_nav_three ul._t_nav_box li div span.__splice{
float: right;
color:rgba(203,39,54,1);
}
.new_header_nav_three ul._t_nav_box li div .icon-xia{
padding-left: 2px;
......
......@@ -43,9 +43,10 @@
<span class="__cp">个人中心<i class="iconfont icon-xia"></i></span>
</span>
<el-dropdown-menu class="changelanguage" slot="dropdown">
<el-dropdown-item @click.native="goUrl('newPersonalCenter')">个人中心</el-dropdown-item>
<el-dropdown-item @click.native="">会员中心</el-dropdown-item>
<el-dropdown-item @click.native="">个人信息</el-dropdown-item>
<el-dropdown-item @click.native="goUrl('newPersonalCenter', '1')">个人中心</el-dropdown-item>
<el-dropdown-item @click.native="goUrl('newPersonalCenter', '2')">会员中心</el-dropdown-item>
<el-dropdown-item @click.native="goUrl('newPersonalCenter', '8-1')">订单中心</el-dropdown-item>
<el-dropdown-item @click.native="goUrl('newPersonalCenter', '3-1')">个人信息</el-dropdown-item>
<el-dropdown-item @click.native="">我的积分</el-dropdown-item>
<el-dropdown-item @click.native="">我的优惠券</el-dropdown-item>
<el-dropdown-item @click.native="">我的奖品</el-dropdown-item>
......@@ -320,10 +321,10 @@ export default {
this.Error('请输入搜索关键词')
}
},
goUrl(path){ // 个人中心、订单跳转方法
goUrl(path, key){ // 个人中心、订单跳转方法
localStorage.removeItem('navActive')
this.$router.push({name:path});
this.navActive = ''
this.$router.push({name: path, query:{key: key}});
this.MsgBus.$emit('newPersonalCenter', key)
},
goLoginUrl(path, t){ // 登录退出
this.$store.commit('changeLogin',0);
......
......@@ -65,7 +65,7 @@
<p>(1)</p>
</li>
<li>
<div class="_raduis no_color">
<div class="_raduis">
<i class="number">2</i>
<span class="_dot _dot_m _dot_m_t"></span>
<span class="_dot _dot_l"></span>
......@@ -144,11 +144,13 @@
<p>我的会员特权:</p>
<el-carousel indicator-position="none" arrow="always" :autoplay="false" height="70px">
<el-carousel-item v-for="(item, index) in iconList" :key="index">
<p class="_icon_list">
<template v-for="son in item.list">
<div class="_icon_list">
<div class="_item" v-for="son in item.list">
<span class="_raduis _raduis2"></span>
<i :class="['iconfont', son]"></i>
</template>
</p>
<span class="_raduis"></span>
</div>
</div>
</el-carousel-item>
</el-carousel>
</el-row>
......@@ -347,16 +349,16 @@ export default {
userInfo: {},
iconList: [
{
list: ['icon-jifen','icon-jifen','icon-jifen']
list: ['icon-zhekouquan','icon-yuding','icon-qiandao']
},
{
list: ['icon-jifen','icon-jifen','icon-jifen']
list: ['icon-zhekouquan','icon-yuding','icon-qiandao']
},
{
list: ['icon-jifen','icon-jifen','icon-jifen']
list: ['icon-zhekouquan','icon-yuding','icon-qiandao']
},
{
list: ['icon-jifen','icon-jifen','icon-jifen']
list: ['icon-zhekouquan','icon-yuding','icon-qiandao']
},
],
}
......
<style>
@import "../../../assets/css/newPersonalCenter/block/MyCoupon.css";
</style>
<template>
<el-row class="MyCoupon">
<!-- 优惠券 -->
<el-row class="menu_list">
<ul class="clearfix">
<li>
<el-dropdown trigger="click" placement="bottom-start">
<span class="el-dropdown-link">
<span class="__cp">
{{dropdownText}}
<i class="iconfont el-icon-arrow-down"></i>
</span>
</span>
<el-dropdown-menu class="changelanguage" slot="dropdown">
<el-dropdown-item @click.native="dropdownText = '通用', msg.couponsUseScope = 1, getList(), resetPageIndex()">通用</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '跟团游', msg.couponsUseScope = 2, getList(), resetPageIndex()">跟团游</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '当地游'">当地游</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '定制游'">定制游</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '签证', msg.couponsUseScope = 3, getList(), resetPageIndex()">签证</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '机票', msg.couponsUseScope = 4, getList(), resetPageIndex()">机票</el-dropdown-item>
<el-dropdown-item @click.native="dropdownText = '酒店'">酒店</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 1 }" @click="typeActive = 1, msg.couponsType = 0, msg.couponEffectStatus = 1, getList(), resetPageIndex()">全部优惠券</span>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 2 }" @click="typeActive = 2, msg.couponsType = 2, msg.couponEffectStatus = 1, getList(), resetPageIndex()">折扣券</span>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 3 }" @click="typeActive = 3, msg.couponsType = 1, msg.couponEffectStatus = 1, getList(), resetPageIndex()">抵扣券</span>
</li>
<li>
<span class="__cp" :class="{_active: typeActive === 4 }" @click="typeActive = 4, msg.couponEffectStatus = 3, getList(), resetPageIndex()">已过期</span>
</li>
</ul>
</el-row>
<el-row class="_table_box" v-loading="dataLoading">
<div v-if="dataList.length>0" class="_content_item">
<div class="_item" v-for="(item, index) in dataList">
<div
class="_top"
:class="{'_blue':item.couponsType===1,'_gray':item.couponEffectStatus===3,}"
>
<div class="_top_raduis">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="_overdue" v-if="item.warning">即将过期</div>
<div class="_info_details">
<p class="_info_coupon_name" :title="item.couponsName">{{item.couponsName}}</p>
<p class="_info_sale" v-if="item.couponsType !== 1">
{{item.denomination}}
<span></span>
</p>
<p class="_info_sale" v-else>
<span></span>
{{item.denomination}}
</p>
<p class="_info_full">{{item.useCondition}}可用</p>
<p
class="_info_time _time"
>有效时间:{{item.effectDate | YMD}}-{{item.expirationDate | YMD}}</p>
<p class="_info_bottom" @click="goUrl('heel',true)">去使用</p>
</div>
</div>
<div class="_bottom">
<p class="_bottom_tit">可用线路及系列</p>
<p
class="_bottom_info"
>{{item.lineName === '' ? '不限' : item.lineName}}-{{item.lineTeamName === '' ? '不限' : item.lineTeamName}}</p>
<p class="_bottom_tit">优惠券来源</p>
<p class="_bottom_info _margin_bt0">{{item.accessType === 1 ? '抽奖活动' : '其他'}}</p>
</div>
</div>
</div>
<div class="empty-data" v-else>
<i class="iconfont icon-kong"></i>
很抱歉,你想要的信息我们真的找不到了
</div>
<!-- 分页 -->
<el-row class="_pagination" v-if="totalCount > 1 && dataList.length>0">
<el-pagination
:current-page.sync="currentPage"
:page-size="msg.pageSize"
layout="total, prev, pager, next"
:total="Count"
@current-change='handleCurrentChange'>
</el-pagination>
</el-row>
</el-row>
</el-row>
</template>
<script>
export default {
components: {},
data() {
return {
dropdownText: "通用",
typeActive: 1,
totalCount: 1,
pageSize: 1,
msg: {
pageIndex: 1,
pageSize: 8,
useState: 1,
lineId: 0,
lineteamId: 0,
couponsName: "",
couponsType: "",
couponStatus: 1,
couponEffectStatus: 1,
couponsUseScope: 1
},
dataList: [],
dataLoading: false,
currentPage: 1,
Count: 1,
};
},
computed: {},
created() {},
mounted() {
this.getList()
},
methods: {
getList() {
// 获取数据
this.dataLoading = true;
this.msg.orderType = this.active;
this.apiJavaPost(
"/api/b2b/user/getUserCouponAllotList",
this.msg,
res => {
console.log(res);
let nowTime = this.getNowDate();
if (res.data.resultCode == 1) {
let data = res.data.data.pageData;
data.forEach((x, i) => {
let cha = this.DateDiff(nowTime, x.expirationDate);
if (cha < 3) {
x.warning = true;
} else {
x.warning = false;
}
});
this.dataList = data;
this.totalCount = res.data.data.pageCount;
this.Count = res.data.data.count;
this.$forceUpdate()
} else {
this.Error(res.data.message);
}
this.dataLoading = false;
},
null
);
},
goUrl(path,bl){
// console.log("path",path)
if(path=='heel'){
sessionStorage.setItem("defaultKey",'2-1');
this.$emit('forword', '2-1')
}
sessionStorage.setItem("Homepage",bl);
this.$store.commit('HomePage',bl)
this.$router.push({name:path});
},
resetPageIndex() {//查询初始化页码
this.msg.pageIndex = 1;
},
handleCurrentChange(val) {
// 翻页
this.msg.pageIndex = parseInt(val);
this.getList();
}
}
};
</script>
\ No newline at end of file
<style>
.new_personal_center{
padding-top: 25px;
background-color: #F5F5F5;
}
.w1180{
width: 1180px !important;
......@@ -78,14 +79,10 @@
<el-menu-item index="4-1" @click="clickMenu('4-1')">选项1</el-menu-item>
<el-menu-item index="4-2" @click="clickMenu('4-2')">选项2</el-menu-item>
</el-submenu>
<el-submenu index="5">
<template slot="title">
<i class="iconfont icon-youhuiquanicon"></i>
<span>我的优惠券</span>
</template>
<el-menu-item index="5-1" @click="clickMenu('5-1')">选项1</el-menu-item>
<el-menu-item index="5-2" @click="clickMenu('5-2')">选项2</el-menu-item>
</el-submenu>
<el-menu-item index="5" @click="clickMenu('5')">
<i class="iconfont icon-youhuiquanicon"></i>
<span>我的优惠券</span>
</el-menu-item>
<el-menu-item index="6" @click="clickMenu('6')">
<i class="iconfont icon-youhuiquanicon"></i>
<span slot="title">我的奖品</span>
......@@ -106,6 +103,8 @@
<Information v-else-if="active.indexOf('3-') !== -1" :data="active"/>
<!-- 订单中心 -->
<OrderCenter v-else-if="active.indexOf('8-') !== -1" :data="active"/>
<!-- 优惠券 -->
<MyCoupon v-else-if="active === '5'" :data="active"/>
</el-col>
</el-row>
</div>
......@@ -117,12 +116,14 @@ import HomePage from '@/components/newPersonalCenter/block/HomePage'
import Information from '@/components/newPersonalCenter/block/Information'
import MemberCenter from '@/components/newPersonalCenter/block/MemberCenter'
import OrderCenter from '@/components/newPersonalCenter/block/OrderCenter'
import MyCoupon from '@/components/newPersonalCenter/block/MyCoupon'
export default {
components: {
HomePage,
Information,
MemberCenter,
OrderCenter
OrderCenter,
MyCoupon
},
data () {
return {
......@@ -139,13 +140,16 @@ export default {
clickMenu: function (key) {
this.active = key
console.log(key)
},
setActive: function(){
this.active = this.$route.query.key ? this.$route.query.key : '1';
}
},
mounted() {
this.active = this.$route.query.key ? this.$route.query.key : '1';
},
created() {
this.MsgBus.$on('newPersonalCenter', this.setActive)
}
}
</script>
......@@ -15,7 +15,7 @@ import commonUtils from './assets/utils/commonUtils'
import languageUtils from './assets/utils/languageUtils' //引入语言转换帮助类
import moment from 'moment'
import co from 'co'
import MsgBus from './plugins/event-bus'
// 使用Vue.use()方法就会调用工具方法中的install方法
Vue.use(htmlToPdf)
Vue.use(VueLazyload)
......@@ -32,6 +32,7 @@ Vue.use(plug)
Vue.http = Vue.prototype.$http = axios
Vue.commonUtils = Vue.prototype.$commonUtils=commonUtils
Vue.languageUtils=Vue.prototype.$languageUtils=languageUtils
Vue.prototype.MsgBus = MsgBus
Vue.prototype.$echarts = echarts
router.beforeEach((to, from, next) => {
// console.log("from",from.path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment