mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
Merge branch 'sit-Leung' into sit-jiamin-v2
This commit is contained in:
commit
fb61b06bde
@ -21,12 +21,10 @@ body {
|
|||||||
.fade-leave-active {
|
.fade-leave-active {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-no-data {
|
.ts-no-data {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 3rem 0;
|
margin: 3rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-mask {
|
.ts-mask {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -38,7 +36,15 @@ body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
.ts-mask-close{
|
||||||
|
position:absolute;
|
||||||
|
top:1rem;
|
||||||
|
right:1rem;
|
||||||
|
width:1rem;
|
||||||
|
height:1rem;
|
||||||
|
background: url("../image/btn-close.png") center center no-repeat;
|
||||||
|
background-size:contain;
|
||||||
|
}
|
||||||
.ts-mask-bg {
|
.ts-mask-bg {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
@ -54,10 +60,11 @@ input[type=checkbox]{
|
|||||||
position:relative;
|
position:relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border:none;
|
border:none;
|
||||||
border: 1px solid #d7d7d7;
|
//border: 1px solid #d7d7d7;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
height: 1.5rem;
|
height: 1.5rem;
|
||||||
|
-webkit-appearance:none;
|
||||||
&:before {
|
&:before {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -327,12 +334,12 @@ picture {
|
|||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
z-index:11;
|
z-index:11;
|
||||||
ul{
|
ul{
|
||||||
width: 60px;
|
width: 3.75rem;
|
||||||
height: 181px;
|
height: 11.3rem;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
li {
|
li {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -354,7 +361,7 @@ picture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 0.12rem;
|
font-size: .75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tuntop {
|
.tuntop {
|
||||||
@ -415,7 +422,7 @@ picture {
|
|||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
top:.25rem;
|
top:0rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rc-header__nav--primary{
|
.rc-header__nav--primary{
|
||||||
@ -523,7 +530,12 @@ picture {
|
|||||||
max-width: 768px;
|
max-width: 768px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
div[data-js-modal-menu] {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
aside div[data-js-modal-menu] {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
html {
|
html {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@ -808,7 +820,11 @@ picture {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
.el-dialog{
|
.el-dialog{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-dialog__body{
|
||||||
|
max-height:50vh;
|
||||||
|
overflow-x:hidden;
|
||||||
|
overflow-y:auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#tns2-iw {
|
#tns2-iw {
|
||||||
|
@ -20,6 +20,14 @@
|
|||||||
}
|
}
|
||||||
.ts-position-identifier{
|
.ts-position-identifier{
|
||||||
|
|
||||||
|
}
|
||||||
|
.ts-mobile-player-container {
|
||||||
|
video {
|
||||||
|
width:100%;
|
||||||
|
height:auto;
|
||||||
|
position: relative;
|
||||||
|
z-index:2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.ul-zhuan,.ul-dog{
|
.ul-zhuan,.ul-dog{
|
||||||
li{
|
li{
|
||||||
@ -83,6 +91,7 @@
|
|||||||
}
|
}
|
||||||
li{
|
li{
|
||||||
margin-top:1.875rem;
|
margin-top:1.875rem;
|
||||||
|
margin-left:0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ts-banner-swiper-container{
|
.ts-banner-swiper-container{
|
||||||
@ -211,9 +220,29 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height:auto;
|
height:auto;
|
||||||
display: block;
|
display: block;
|
||||||
video{
|
position:relative;
|
||||||
max-width:100%;
|
z-index:0;
|
||||||
max-height:100%;
|
&:before{
|
||||||
|
content:"";
|
||||||
|
background:#000;
|
||||||
|
opacity:.6;
|
||||||
|
position:absolute;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
z-index:1;
|
||||||
|
}
|
||||||
|
&:after{
|
||||||
|
content:"";
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
background:url("../image/btn-play.png") center center no-repeat;
|
||||||
|
background-size:90px 90px;
|
||||||
|
z-index:2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,19 +254,32 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
border: 1px solid #d7d7d7;
|
border: 1px solid #d7d7d7;
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
|
img{
|
||||||
|
object-fit: cover;
|
||||||
|
display: block;
|
||||||
|
z-index:0;
|
||||||
|
}
|
||||||
.rc-click{
|
.rc-click{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
img{
|
.click-zone{
|
||||||
width: 10rem;
|
align-items: center;
|
||||||
height: 10rem;
|
display: flex;
|
||||||
object-fit: cover;
|
flex-direction: column;
|
||||||
display: block;
|
img{
|
||||||
margin-top: 2.5rem;
|
width: 10rem;
|
||||||
|
height: 10rem;
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
@ -348,13 +390,13 @@
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
font-size: 0.14rem;
|
font-size: .875rem;
|
||||||
img{
|
img{
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.unactive {
|
.unactive {
|
||||||
font-size: 0.14rem;
|
font-size: .875rem;
|
||||||
img{
|
img{
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
@ -253,6 +253,9 @@ ul li ol li em strong i {
|
|||||||
width: 440px;
|
width: 440px;
|
||||||
height: 652px;
|
height: 652px;
|
||||||
}
|
}
|
||||||
|
.ts-crumbs {
|
||||||
|
padding-left:.25rem;
|
||||||
|
}
|
||||||
.ts-mypersonal{
|
.ts-mypersonal{
|
||||||
margin-left:0;
|
margin-left:0;
|
||||||
.rc-column{
|
.rc-column{
|
||||||
|
@ -288,12 +288,12 @@
|
|||||||
border: 1px solid #D8D8D8;
|
border: 1px solid #D8D8D8;
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
display: block;
|
display: block;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rc-right {
|
.rc-right {
|
||||||
|
@ -451,7 +451,6 @@
|
|||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
font-size: 45px;
|
font-size: 45px;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
strong {
|
strong {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
@ -289,7 +289,7 @@ border-radius: 100px;
|
|||||||
.rc-bottom{
|
.rc-bottom{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: white;
|
background: white;
|
||||||
height: 617px;
|
height: 21.875rem;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
@ -236,6 +236,7 @@ color: #333333;
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
span {
|
span {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
@ -251,6 +252,10 @@ color: #333333;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ts-right-arr {
|
||||||
|
line-height:1rem;
|
||||||
|
height:1.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,10 +152,11 @@ ul li ol li em strong i {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-value{
|
.rc-value{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.usermember{
|
.usermember{
|
||||||
|
@ -326,7 +326,7 @@ margin-right: 20px;
|
|||||||
|
|
||||||
|
|
||||||
//pc端
|
//pc端
|
||||||
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
@media screen and (min-width: 768px){
|
||||||
|
|
||||||
//快递列表
|
//快递列表
|
||||||
.delivery {
|
.delivery {
|
||||||
@ -518,7 +518,7 @@ margin-right: 20px;
|
|||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
|
justify-content: end;
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-userright {
|
.rc-userright {
|
||||||
|
BIN
rc-busness/assets/image/btn-close.png
Normal file
BIN
rc-busness/assets/image/btn-close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
rc-busness/assets/image/btn-play.png
Normal file
BIN
rc-busness/assets/image/btn-play.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
@ -304,7 +304,7 @@
|
|||||||
<div class="rc-column rc-padding-x--none">
|
<div class="rc-column rc-padding-x--none">
|
||||||
<ul class="rc-list rc-list--blank rc-list--align rc-btn-offset--top" role="menu">
|
<ul class="rc-list rc-list--blank rc-list--align rc-btn-offset--top" role="menu">
|
||||||
<li class="rc-list__item">
|
<li class="rc-list__item">
|
||||||
<a class="rc-list__link rc-icon ts-login--xs rc-iconography--xs" role="menuitem" href="javascript:void();" @click="turnlogin">
|
<a class="rc-list__link rc-icon ts-login--xs rc-iconography--xs" role="menuitem" @click="turnlogin">
|
||||||
个人中心
|
个人中心
|
||||||
<em class="rc-screen-reader" v-if="loginornot"></em>
|
<em class="rc-screen-reader" v-if="loginornot"></em>
|
||||||
</a>
|
</a>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div v-if='error.statusCode!=404'>
|
<div v-if='error.statusCode!=404'>
|
||||||
<h2>{{ error.statusCode }} 发现未知错误</h2>
|
<h2>{{ error.statusCode }} 发现未知错误</h2>
|
||||||
<div>
|
<div>
|
||||||
<nuxt-link to="/">返回首页</nuxt-link>
|
<a href="/">返回首页</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,17 +97,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sw-center" >
|
<div class="sw-center" >
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<div class="rc-click">
|
||||||
<div class="uservideo">
|
<div class="uservideo" @click="playMobileVideo(item)">
|
||||||
<video controls="controls" :poster=item.catimage preload="none">
|
<img :src="item.catimage">
|
||||||
<source :src= item.video type="video/ogg">
|
</div>
|
||||||
</video>
|
<div class='click-zone' @click="selectproduce(item,index)">
|
||||||
|
<img :src=item.productimage alt="">
|
||||||
|
<span>{{item.title}}</span>
|
||||||
|
<p>{{item.detail}}</p>
|
||||||
|
<em>{{item.price}}</em>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img :src=item.productimage alt="">
|
|
||||||
<span>{{item.title}}</span>
|
|
||||||
<p>{{item.detail}}</p>
|
|
||||||
<em>{{item.price}}</em>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
@ -331,17 +330,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sw-center" >
|
<div class="sw-center" >
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<div class="rc-click" >
|
||||||
<div class="uservideo">
|
<div class="uservideo" @click="playMobileVideo(item)">
|
||||||
<video controls="controls" preload="none" :poster="item.catimage">
|
<img :src="item.catimage">
|
||||||
<source :src= item.video type="video/ogg">
|
</div>
|
||||||
</video>
|
<div class='click-zone' @click="selectproduce(item,index)">
|
||||||
|
<img :src=item.productimage alt="">
|
||||||
|
<span>{{item.title}}</span>
|
||||||
|
<p>{{item.detail}}</p>
|
||||||
|
<em>{{item.price}}</em>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img :src=item.productimage alt="">
|
|
||||||
<span>{{item.title}}</span>
|
|
||||||
<p>{{item.detail}}</p>
|
|
||||||
<em>{{item.price}}</em>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
@ -694,8 +692,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ts-mask ts-mobile-player-container" v-show="mobileVideoPlaying">
|
||||||
|
<div class="ts-mask-bg"></div>
|
||||||
|
<div class="ts-mask-close" @click="closeMobileVideo"></div>
|
||||||
|
<video controls="controls" ref="mobile-video-player"></video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -752,7 +753,7 @@
|
|||||||
fixedHeader:false,
|
fixedHeader:false,
|
||||||
dataLoaded:true,
|
dataLoaded:true,
|
||||||
useraindex:0,
|
useraindex:0,
|
||||||
|
mobileVideoPlaying:false,
|
||||||
usertitle:'明星猫粮',
|
usertitle:'明星猫粮',
|
||||||
dogtitle:'明星犬粮',
|
dogtitle:'明星犬粮',
|
||||||
processinformation:[],
|
processinformation:[],
|
||||||
@ -1096,7 +1097,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
catStarProductswiperOption: {
|
catStarProductswiperOption: {
|
||||||
loop: true,
|
//loop: true,
|
||||||
slidesPerView: 'auto',
|
slidesPerView: 'auto',
|
||||||
centeredSlides: true,
|
centeredSlides: true,
|
||||||
speed:1000,
|
speed:1000,
|
||||||
@ -1120,7 +1121,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dogStarProductswiperOption: {
|
dogStarProductswiperOption: {
|
||||||
loop: true,
|
//loop: true,
|
||||||
slidesPerView: 'auto',
|
slidesPerView: 'auto',
|
||||||
centeredSlides: true,
|
centeredSlides: true,
|
||||||
speed:1000,
|
speed:1000,
|
||||||
@ -1177,6 +1178,19 @@
|
|||||||
window.removeEventListener('scroll', this.scrollToTop);
|
window.removeEventListener('scroll', this.scrollToTop);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
playMobileVideo(item){
|
||||||
|
let videoPath=item.video;
|
||||||
|
let player = this.$refs['mobile-video-player'];
|
||||||
|
let _self = this;
|
||||||
|
player.src=videoPath;
|
||||||
|
player.play();
|
||||||
|
this.mobileVideoPlaying = true;
|
||||||
|
},
|
||||||
|
closeMobileVideo(){
|
||||||
|
this.mobileVideoPlaying = false;
|
||||||
|
let player = this.$refs['mobile-video-player'];
|
||||||
|
player.pause();
|
||||||
|
},
|
||||||
ifAdoid(item,index){
|
ifAdoid(item,index){
|
||||||
//console.log(index);
|
//console.log(index);
|
||||||
this.userindex=index;
|
this.userindex=index;
|
||||||
|
@ -231,6 +231,5 @@ import Myheader from "~/components/header.vue";
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
// 手机端
|
// 手机端
|
||||||
@import url("../../assets/css/global.less");
|
|
||||||
@import url("../../assets/css/discount.less");
|
@import url("../../assets/css/discount.less");
|
||||||
</style>
|
</style>
|
@ -3,7 +3,7 @@
|
|||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<!-- <tabs></tabs> -->
|
<!-- <tabs></tabs> -->
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<tabs :crumbs="crumbs" :crumbStyle="`padding-left:0;`"></tabs>
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
|
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
<!-- <div class="rc-title">
|
<!-- <div class="rc-title">
|
||||||
|
@ -6,13 +6,98 @@ ul li ol li em strong i {
|
|||||||
.rc-header {
|
.rc-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.settlement {
|
.settlement {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.rc-merchandise {
|
||||||
|
li {
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.discountInfo {
|
||||||
|
i,em {
|
||||||
|
font-size:.875rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-discount {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-contair {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #e1001a;
|
||||||
|
width: 34%;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 5px 10px;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
.rc-main {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-right: 10px;
|
||||||
|
span {
|
||||||
|
width: 72px;
|
||||||
|
height: 25px;
|
||||||
|
background: #e2001a;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-radius: 100px;
|
||||||
|
margin-right: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.rc-main {
|
.rc-main {
|
||||||
width: 92%;
|
width: 92%;
|
||||||
@ -255,7 +340,7 @@ ul li ol li em strong i {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
width: 25%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -342,7 +427,7 @@ ul li ol li em strong i {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: self-end;
|
align-items: self-end;
|
||||||
|
text-align: right;
|
||||||
i {
|
i {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
@ -354,7 +439,15 @@ ul li ol li em strong i {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
|
display:inline-block;
|
||||||
|
width:5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.discountInfo {
|
||||||
|
i,em {
|
||||||
|
font-size:1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -65,12 +65,12 @@
|
|||||||
<span>配送方式:</span>
|
<span>配送方式:</span>
|
||||||
<i>{{ shopprice.price }}</i>
|
<i>{{ shopprice.price }}</i>
|
||||||
</li>
|
</li>
|
||||||
<!--
|
|
||||||
<li>
|
<li>
|
||||||
<span> 活动促销:</span>
|
<span> 活动促销:</span>
|
||||||
<i>{{ shopprice.distribution }}</i>
|
<i class="ts-right-arr ts-right-arr--two" @click="userget()">{{ curCoupon.couponName }}</i>
|
||||||
</li>
|
</li>
|
||||||
-->
|
|
||||||
<li>
|
<li>
|
||||||
<span>商品总价:</span>
|
<span>商品总价:</span>
|
||||||
<i class="red">{{ sumPrice }}</i>
|
<i class="red">{{ sumPrice }}</i>
|
||||||
@ -88,8 +88,12 @@
|
|||||||
<div class="rc-foot">
|
<div class="rc-foot">
|
||||||
<div class="rc-foo">
|
<div class="rc-foo">
|
||||||
<div>
|
<div>
|
||||||
|
<div class="discountInfo" v-if="discountAmount">
|
||||||
|
<i>优惠金额:</i>
|
||||||
|
<em>{{ discountAmount }}</em>
|
||||||
|
</div>
|
||||||
<i>合计金额:</i>
|
<i>合计金额:</i>
|
||||||
<em>{{ sumPrice }}</em>
|
<em>{{ discountedSumPrice }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-weight: bold">
|
<div style="font-weight: bold">
|
||||||
<span @click="preJiesuan()">提交订单</span>
|
<span @click="preJiesuan()">提交订单</span>
|
||||||
@ -147,12 +151,50 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog :visible.sync="dialogInfo1" class="pop_coupon" :close-on-click-modal="false">
|
||||||
|
<div class="ts-no-data" v-if="drawlist.length<=0">您还没有优惠券,可在商品的详情页面中领取</div>
|
||||||
|
<div class="rs-dis">
|
||||||
|
<div
|
||||||
|
class="rc-discount"
|
||||||
|
v-for="(item, index) in drawlist"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<img :src="userimage" alt="" />
|
||||||
|
<div class="rc-contair">
|
||||||
|
<div class="rc-left" :style='usercolor'>
|
||||||
|
<div>
|
||||||
|
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||||
|
¥
|
||||||
|
</i>
|
||||||
|
<span>
|
||||||
|
{{item.couponTypeId=='4'?parseInt(((item.discount)*10))+'折':item.couponAmount}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<strong>{{ item.couponName }}</strong>
|
||||||
|
</div>
|
||||||
|
<div class="rc-right">
|
||||||
|
<i :style='usercolor'>
|
||||||
|
{{ item.couponName }}
|
||||||
|
</i>
|
||||||
|
<div class="rc-userfont">
|
||||||
|
<strong>有效期</strong>
|
||||||
|
<span>{{item.validFrom}}至</span>
|
||||||
|
<em>{{item.validTo}}</em>
|
||||||
|
</div>
|
||||||
|
<div class="rc-footer">
|
||||||
|
<span @click="pickCoupon(item)">立即使用</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
import { userin, memberAddress, generateOrderWX, getdraw } from "../../ajax/getData";
|
||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
import myAddress from "~/components/address.vue";
|
import myAddress from "~/components/address.vue";
|
||||||
import { mapMutations } from "vuex";
|
import { mapMutations } from "vuex";
|
||||||
@ -170,6 +212,11 @@ export default {
|
|||||||
path:'/personal/settlement'
|
path:'/personal/settlement'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
usercolor:{color:'#e1001a'},
|
||||||
|
userimage: require("../../assets/image/unused.png"),
|
||||||
|
curCoupon:{couponName:'未选择可用优惠券'},
|
||||||
|
drawlist:[],
|
||||||
|
dialogInfo1:false,
|
||||||
goldmedal: [],
|
goldmedal: [],
|
||||||
dialogAddTitle: "",
|
dialogAddTitle: "",
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
@ -204,15 +251,71 @@ export default {
|
|||||||
promotion: "¥167.00",
|
promotion: "¥167.00",
|
||||||
payment: "¥0.00 ",
|
payment: "¥0.00 ",
|
||||||
},
|
},
|
||||||
|
discountAmount:0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 总价计算
|
sumPrice() {
|
||||||
sumPrice() {
|
return this.goldmedal.reduce((pre, cur) => {
|
||||||
return this.goldmedal.reduce((pre, cur) => {
|
return pre + cur.buyCount * cur.productPrice;
|
||||||
console.log(pre);
|
}, 0);
|
||||||
return pre + cur.buyCount * cur.productPrice;
|
},
|
||||||
}, 0);
|
// 折扣计算
|
||||||
|
discountedSumPrice() {
|
||||||
|
let total = 0;
|
||||||
|
if(this.curCoupon.couponId) {
|
||||||
|
//Coupon Calculation
|
||||||
|
let couponUsed=false;
|
||||||
|
for(let itemInCart of this.goldmedal) {
|
||||||
|
if((!this.curCoupon.productCodes || this.curCoupon.productCodes.indexOf(itemInCart.productCode)>-1) && !couponUsed) {
|
||||||
|
if(this.curCoupon.minQuantity && this.curCoupon.minQuantity>itemInCart.buyCount) {
|
||||||
|
//Check minQuantity
|
||||||
|
total+=(itemInCart.buyCount * itemInCart.productPrice);
|
||||||
|
} else if(this.curCoupon.minPrice && this.curCoupon.minPrice > (itemInCart.buyCount * itemInCart.productPrice)) {
|
||||||
|
//Check minPrice
|
||||||
|
total+=(itemInCart.buyCount * itemInCart.productPrice);
|
||||||
|
} else {
|
||||||
|
//Into coupon discount calculation
|
||||||
|
switch(this.curCoupon.couponTypeId) {
|
||||||
|
case 1: //Amount deduct
|
||||||
|
total = total + (itemInCart.productPrice * itemInCart.buyCount - this.curCoupon.couponAmount);
|
||||||
|
this.discountAmount = this.curCoupon.couponAmount;
|
||||||
|
couponUsed=true;
|
||||||
|
break;
|
||||||
|
case 2: //Amount deduct with minPrice restriction
|
||||||
|
case 6:
|
||||||
|
total = total + (itemInCart.productPrice * itemInCart.buyCount) - this.curCoupon.couponAmount;
|
||||||
|
this.discountAmount = this.curCoupon.couponAmount;
|
||||||
|
couponUsed=true;
|
||||||
|
break;
|
||||||
|
case 3: //Limited product % discount
|
||||||
|
case 4: //% discount
|
||||||
|
total = total + (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
||||||
|
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * ( 1 - this.curCoupon.discount);
|
||||||
|
couponUsed=true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
total += itemInCart.productPrice * itemInCart.buyCount;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Into coupon discount calculation end
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
total += itemInCart.productPrice * itemInCart.buyCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//Normal Calculation
|
||||||
|
total=this.goldmedal.reduce((pre, cur) => {
|
||||||
|
return pre + cur.buyCount * cur.productPrice;
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
if(this.discountAmount)
|
||||||
|
this.discountAmount = this.discountAmount.toFixed(2);
|
||||||
|
if(!total)
|
||||||
|
total=0;
|
||||||
|
total = total.toFixed(2);
|
||||||
|
return total;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -229,6 +332,55 @@ export default {
|
|||||||
});
|
});
|
||||||
this.useraddress = data;
|
this.useraddress = data;
|
||||||
},
|
},
|
||||||
|
userget(){
|
||||||
|
let user = this.$store.state.userInfo;
|
||||||
|
if (user) {
|
||||||
|
this.userdraw(user.data.mobile);
|
||||||
|
this.dialogInfo1 = true;
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/userlogin/login",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取用户领取的优惠券
|
||||||
|
async userdraw(mobile) {
|
||||||
|
let data = await getdraw(mobile);
|
||||||
|
let _self = this;
|
||||||
|
let curTime = new Date().getTime();
|
||||||
|
let valDateFromTime=0;
|
||||||
|
let valDateToTime=0;
|
||||||
|
let dateChecked=true;
|
||||||
|
if (data) {
|
||||||
|
this.drawlist=[];
|
||||||
|
for(let itemInCart of this.goldmedal) {
|
||||||
|
for(let myCoupon of data.data) {
|
||||||
|
valDateFromTime=0;
|
||||||
|
valDateToTime=0;
|
||||||
|
dateChecked=true;
|
||||||
|
if(myCoupon.fValidFrom) {
|
||||||
|
valDateFromTime = new Date(myCoupon.fValidFrom).getTime();
|
||||||
|
}
|
||||||
|
if(myCoupon.fValidTo) {
|
||||||
|
valDateToTime = new Date(myCoupon.fValidTo).getTime();
|
||||||
|
}
|
||||||
|
if(valDateFromTime && curTime < valDateFromTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(valDateToTime && curTime > valDateToTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(dateChecked && myCoupon.status == 0 && (myCoupon.productCodes.indexOf(itemInCart.productCode)>-1 || !myCoupon.productCodes)) {
|
||||||
|
_self.drawlist.push(myCoupon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickCoupon(item){
|
||||||
|
this.curCoupon = item;
|
||||||
|
this.dialogInfo1 = false;
|
||||||
|
},
|
||||||
editAddress(item) {
|
editAddress(item) {
|
||||||
this.dialogAddTitle = "修改收货地址";
|
this.dialogAddTitle = "修改收货地址";
|
||||||
this.editAddressData = {
|
this.editAddressData = {
|
||||||
@ -313,7 +465,7 @@ export default {
|
|||||||
basePoint:basePoint,
|
basePoint:basePoint,
|
||||||
productName: item.productName,
|
productName: item.productName,
|
||||||
buyCount: item.buyCount,
|
buyCount: item.buyCount,
|
||||||
productId: item.productCode,
|
productCode: item.productCode,
|
||||||
payAmount: item.productPrice,
|
payAmount: item.productPrice,
|
||||||
memberId: userInfo.data.id,
|
memberId: userInfo.data.id,
|
||||||
phoneNumber: userInfo.data.mobile,
|
phoneNumber: userInfo.data.mobile,
|
||||||
@ -331,6 +483,13 @@ export default {
|
|||||||
addressDetailInfo: orderAddress[0].detailAddress,
|
addressDetailInfo: orderAddress[0].detailAddress,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
if(this.curCoupon.couponId) {
|
||||||
|
oneProduct.couponId = this.curCoupon.couponId;
|
||||||
|
oneProduct.couponTypeId = this.curCoupon.couponTypeId;
|
||||||
|
oneProduct.couponName = this.curCoupon.couponName;
|
||||||
|
oneProduct.couponCode = this.curCoupon.couponCode;
|
||||||
|
oneProduct.couponAmount = (this.curCoupon.couponAmount?this.curCoupon.couponAmount:this.curCoupon.discount);
|
||||||
|
}
|
||||||
postData.push(oneProduct);
|
postData.push(oneProduct);
|
||||||
});
|
});
|
||||||
// let postData = [
|
// let postData = [
|
||||||
@ -380,8 +539,8 @@ export default {
|
|||||||
let res = await generateOrderWX(postData);
|
let res = await generateOrderWX(postData);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
orderId: res.data.orderNumber,
|
||||||
userprice: this.sumPrice,
|
userprice: parseFloat(res.data.orderAmount).toFixed(2),
|
||||||
userinformation:
|
userinformation:
|
||||||
postData[0].orderAddress.addressUserName +
|
postData[0].orderAddress.addressUserName +
|
||||||
" " +
|
" " +
|
||||||
@ -405,9 +564,6 @@ export default {
|
|||||||
},
|
},
|
||||||
async canceldanhao(orderNumber) {
|
async canceldanhao(orderNumber) {
|
||||||
let data = await userin(orderNumber);
|
let data = await userin(orderNumber);
|
||||||
console.log(data);
|
|
||||||
// this.goldmedal=data;
|
|
||||||
console.log(this.goldmedal);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -486,6 +486,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../assets/css/global.less");
|
|
||||||
@import url("../../assets/css/orderquantity.less");
|
@import url("../../assets/css/orderquantity.less");
|
||||||
</style>
|
</style>
|
@ -4,46 +4,42 @@
|
|||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<tabs :crumbs="crumbs"></tabs>
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="rc-full-width rc-max-width--xl rc-padding-bottom--lg">
|
<div class="rc-full-width rc-max-width--xl rc-padding-bottom--lg">
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
|
<div class="rc-center" >
|
||||||
<div class="rc-center" >
|
<van-swipe @change="onChange">
|
||||||
<van-swipe @change="onChange">
|
<van-swipe-item v-for="(banner, index) in banners" :key="index">
|
||||||
<van-swipe-item v-for="(banner, index) in banners" :key="index">
|
<img :src="banner.src" class="useraimg"/>
|
||||||
<img :src="banner.src" class="useraimg"/>
|
</van-swipe-item>
|
||||||
</van-swipe-item>
|
</van-swipe>
|
||||||
</van-swipe>
|
<!-- <img :src='userimage' /> -->
|
||||||
<!-- <img :src='userimage' /> -->
|
|
||||||
</div>
|
|
||||||
<div class="rc-order">
|
|
||||||
<span>当前等级:{{userorder}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="rc-cordd">
|
|
||||||
<span>距离升级还差:{{ rcvalue }} </span>
|
|
||||||
<div class="block">
|
|
||||||
<div class="r-block" ref="userblock"></div>
|
|
||||||
|
|
||||||
<!-- <el-slider v-model="value" range show-stops :max="10"> </el-slider> -->
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="rc-value">
|
|
||||||
<span>新手铲屎官</span>
|
|
||||||
<span>资深铲屎官</span>
|
|
||||||
<span>金牌铲屎官</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="rc-layout-container">
|
|
||||||
<div class="usermember rc-column" v-for="(item,index) in newlist" :key="index">
|
|
||||||
<div class="rc-image">
|
|
||||||
<img :src="item.catimage" alt="" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userorder">
|
<div class="rc-order">
|
||||||
<em>{{item.title}}</em>
|
<span>当前等级:{{userorder}}</span>
|
||||||
<span>{{item.usereat}}</span>
|
</div>
|
||||||
|
<div class="rc-cordd">
|
||||||
|
<span>距离升级还差:{{ rcvalue }} </span>
|
||||||
|
<div class="block">
|
||||||
|
<div class="r-block" ref="userblock"></div>
|
||||||
|
<!-- <el-slider v-model="value" range show-stops :max="10"> </el-slider> -->
|
||||||
|
</div>
|
||||||
|
<div class="rc-value">
|
||||||
|
<span class="rc-styled-link" @click="onChange(0)">新手铲屎官</span>
|
||||||
|
<span class="rc-styled-link" @click="onChange(1)">资深铲屎官</span>
|
||||||
|
<span class="rc-styled-link" @click="onChange(2)">金牌铲屎官</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="rc-layout-container">
|
||||||
|
<div class="usermember rc-column" v-for="(item,index) in newlist" :key="index">
|
||||||
|
<div class="rc-image">
|
||||||
|
<img :src="item.catimage" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="rc-userorder">
|
||||||
|
<em>{{item.title}}</em>
|
||||||
|
<span>{{item.usereat}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Myfooter></Myfooter>
|
<Myfooter></Myfooter>
|
||||||
@ -246,17 +242,17 @@ data(){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
onChange(index){
|
onChange(index){
|
||||||
console.log(index);
|
console.log(index);
|
||||||
if(index==0){
|
if(index==0){
|
||||||
this.newlist=this.newlista;
|
this.newlist=this.newlista;
|
||||||
}else if(index==1){
|
}else if(index==1){
|
||||||
this.newlist=this.senior
|
this.newlist=this.senior
|
||||||
}else if(index==2){
|
}else if(index==2){
|
||||||
this.newlist=this.goldmedal
|
this.newlist=this.goldmedal
|
||||||
}
|
}
|
||||||
console.log(this.newlist)
|
console.log(this.newlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<el-col :span="6" class="ready_right">
|
<el-col :span="6" class="ready_right">
|
||||||
<div class="inline_right">
|
<div class="inline_right">
|
||||||
<p>付款金额:</p>
|
<p>付款金额:</p>
|
||||||
<p class="price">¥{{ userPayData.userprice }}</p>
|
<p class="price" v-if="userPayData.userprice">¥{{ userPayData.userprice }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline_right">
|
<div class="inline_right">
|
||||||
<p>收货信息:</p>
|
<p>收货信息:</p>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<tabs :crumbs="crumbs"></tabs>
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="online" id="fixed-catbar-seperator"></div>
|
<div class="online" id="fixed-catbar-seperator rc-margin--none"></div>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div
|
<div
|
||||||
class="
|
class="
|
||||||
@ -147,7 +147,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="rc-produnnum">
|
<div class="rc-produnnum" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||||
<div><i class="ts-row-title">商品数量:</i></div>
|
<div><i class="ts-row-title">商品数量:</i></div>
|
||||||
<img
|
<img
|
||||||
src="../../assets/image/userjian.png"
|
src="../../assets/image/userjian.png"
|
||||||
@ -208,7 +208,8 @@
|
|||||||
<FixRight></FixRight>
|
<FixRight></FixRight>
|
||||||
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon">
|
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon" :close-on-click-modal="false">
|
||||||
|
<div class="ts-no-data" v-if="usernewlist.length<=0">目前还没有可用的优惠券</div>
|
||||||
<div class="rs-dis">
|
<div class="rs-dis">
|
||||||
<div
|
<div
|
||||||
class="rc-discount"
|
class="rc-discount"
|
||||||
@ -216,25 +217,32 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<img :src="userimage" alt="" />
|
<img :src="userimage" alt="" />
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<div class="rc-left">
|
<div class="rc-left">
|
||||||
<div v-if="item.couponAmount">
|
<div>
|
||||||
<i>¥</i><span>{{ item.couponAmount }}</span>
|
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||||
</div>
|
¥
|
||||||
</div>
|
</i>
|
||||||
<div class="rc-right">
|
<span>
|
||||||
<i>
|
{{item.couponTypeId=='4'?parseInt(((item.discount)*10))+'折':item.couponAmount}}
|
||||||
{{ item.couponDesc }}
|
</span>
|
||||||
</i>
|
</div>
|
||||||
<div>
|
<strong>{{ item.couponName }}</strong>
|
||||||
<span>有效期</span>
|
</div>
|
||||||
<em>{{ item.validTo }}</em>
|
<div class="rc-right">
|
||||||
</div>
|
<i>
|
||||||
<div class="rc-footer">
|
{{ item.couponName }}
|
||||||
<span @click="usergetconf(item)">立即领取</span>
|
</i>
|
||||||
</div>
|
<div class="rc-userfont">
|
||||||
</div>
|
<strong>有效期</strong>
|
||||||
</div>
|
<span>{{item.validFrom}}至</span>
|
||||||
|
<em>{{item.validTo}}</em>
|
||||||
|
</div>
|
||||||
|
<div class="rc-footer">
|
||||||
|
<span @click="usergetconf(item)">立即领取</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -471,6 +479,7 @@ export default {
|
|||||||
|
|
||||||
userclose() {
|
userclose() {
|
||||||
this.userlist = [];
|
this.userlist = [];
|
||||||
|
this.dialogInfo1=false;
|
||||||
},
|
},
|
||||||
async userquery() {
|
async userquery() {
|
||||||
let data = await goodsmessage(this.productCode);
|
let data = await goodsmessage(this.productCode);
|
||||||
@ -517,7 +526,7 @@ export default {
|
|||||||
let alllist = [];
|
let alllist = [];
|
||||||
this.userlist = this.alldraw.data;
|
this.userlist = this.alldraw.data;
|
||||||
this.userlist.forEach((element, index) => {
|
this.userlist.forEach((element, index) => {
|
||||||
if (typeof element.productCodes == "string") {
|
if (typeof element.productCodes == "string" || !element.productCodes) {
|
||||||
userlist.push(element);
|
userlist.push(element);
|
||||||
// let s=element.productCodes.split(',');
|
// let s=element.productCodes.split(',');
|
||||||
// console.log(s.indexOf(this.productCode) != -1 )
|
// console.log(s.indexOf(this.productCode) != -1 )
|
||||||
@ -526,14 +535,36 @@ export default {
|
|||||||
});
|
});
|
||||||
let menualist = [];
|
let menualist = [];
|
||||||
userlist.filter((item) => {
|
userlist.filter((item) => {
|
||||||
item.productCodes = item.productCodes.split(",");
|
let valDateFromTime=0;
|
||||||
item.productCodes.forEach((element) => {
|
let valDateToTime=0;
|
||||||
if (element == this.productCode && item.activityId !== 10) {
|
let curTime = new Date().getTime();
|
||||||
console.log(element);
|
let dateChecked=true;
|
||||||
console.log(this.productCode);
|
if(item.fValidFrom) {
|
||||||
menualist.push(item);
|
valDateFromTime = new Date(item.fValidFrom).getTime();
|
||||||
}
|
}
|
||||||
});
|
if(item.fValidTo) {
|
||||||
|
valDateToTime = new Date(item.fValidTo).getTime();
|
||||||
|
}
|
||||||
|
if(valDateFromTime && curTime < valDateFromTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(valDateToTime && curTime > valDateToTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(dateChecked) {
|
||||||
|
if(!item.productCodes) {
|
||||||
|
menualist.push(item);
|
||||||
|
} else {
|
||||||
|
item.productCodes = item.productCodes.split(",");
|
||||||
|
item.productCodes.forEach((element) => {
|
||||||
|
if (element == this.curItem.productCode && item.activityId !== 10) {
|
||||||
|
menualist.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//Expired coupons
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.usernewlist = menualist;
|
this.usernewlist = menualist;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user