|
@@ -12,7 +12,7 @@
|
|
<div class="price_box" v-if="summery['act_type'] == 0">
|
|
<div class="price_box" v-if="summery['act_type'] == 0">
|
|
<div class="bonus_price"><span class="symbols">¥</span>{{summery["bonus_price"]}}</div>
|
|
<div class="bonus_price"><span class="symbols">¥</span>{{summery["bonus_price"]}}</div>
|
|
<div class="price_desc">
|
|
<div class="price_desc">
|
|
- <span class="f_left">专柜价{{summery["goods_price"]}}</span>
|
|
|
|
|
|
+ <span class="f_left">天猫价 {{summery["goods_price"]}}</span>
|
|
<span class="f_right">红包抵{{conserve}}元</span>
|
|
<span class="f_right">红包抵{{conserve}}元</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -20,8 +20,18 @@
|
|
<div class="price_box" v-if="summery['act_type'] == 1">
|
|
<div class="price_box" v-if="summery['act_type'] == 1">
|
|
<div class="bonus_price"><span class="symbols">¥</span>{{parseFloat(getgroupbuy.promotion_price)}}</div>
|
|
<div class="bonus_price"><span class="symbols">¥</span>{{parseFloat(getgroupbuy.promotion_price)}}</div>
|
|
<div class="price_desc">
|
|
<div class="price_desc">
|
|
- <span class="f_left">专柜价{{summery["goods_price"]}}</span>
|
|
|
|
- <span class="f_right">仅剩{{grouptime}}天</span>
|
|
|
|
|
|
+ <span class="f_left">天猫价 {{summery["goods_price"]}}</span>
|
|
|
|
+ <span class="f_right" v-if="less_one_day">仅剩{{grouptime}}</span>
|
|
|
|
+ <span class="f_right" v-else>{{count_h_m_s}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="price_box" v-if="summery['act_type'] == 2">
|
|
|
|
+ <div class="bonus_price"><span class="symbols">¥</span>{{summery["goods_promotion_price"]}}</div>
|
|
|
|
+ <div class="price_desc">
|
|
|
|
+ <span class="f_left">天猫价 {{summery["goods_price"]}}</span>
|
|
|
|
+ <span class="f_right" v-if="less_one_day">仅剩{{limitTime}}</span>
|
|
|
|
+ <span class="f_right" v-else>{{limit_count_h_m_s}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -40,7 +50,10 @@
|
|
return {
|
|
return {
|
|
summery:this.proxy.getSummery(this.item.data),
|
|
summery:this.proxy.getSummery(this.item.data),
|
|
groupbuy:this.getGroupbuy,
|
|
groupbuy:this.getGroupbuy,
|
|
- defaultImg:DefaultImg
|
|
|
|
|
|
+ defaultImg:DefaultImg,
|
|
|
|
+ count_h_m_s:'',
|
|
|
|
+ less_one_day:true,
|
|
|
|
+ limit_count_h_m_s:''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components:{
|
|
components:{
|
|
@@ -50,6 +63,28 @@
|
|
},
|
|
},
|
|
|
|
|
|
props:['item','proxy'],
|
|
props:['item','proxy'],
|
|
|
|
+ methods:{
|
|
|
|
+ group_count(endtime){
|
|
|
|
+ let _self = this;
|
|
|
|
+ setInterval(function(){
|
|
|
|
+ let count_time = parseInt(endtime-(new Date().getTime()/1000));
|
|
|
|
+ let h = Math.floor(count_time/60/60%24) < 10?'0'+ Math.floor(count_time/60/60%24):Math.floor(count_time/60/60%24);
|
|
|
|
+ let m = Math.floor(count_time/60%60) < 10?'0'+Math.floor(count_time/60%60):Math.floor(count_time/60%60);
|
|
|
|
+ let s = Math.floor(count_time%60) < 10?'0'+Math.floor(count_time%60):Math.floor(count_time%60);
|
|
|
|
+ _self.count_h_m_s = h + ':' + m + ':' + s;
|
|
|
|
+ },1000);
|
|
|
|
+ },
|
|
|
|
+ limit_count(endtime){
|
|
|
|
+ let _self = this;
|
|
|
|
+ setInterval(function(){
|
|
|
|
+ let count_time = parseInt(endtime-(new Date().getTime()/1000));
|
|
|
|
+ let h = Math.floor(count_time/60/60%24) < 10?'0'+ Math.floor(count_time/60/60%24):Math.floor(count_time/60/60%24);
|
|
|
|
+ let m = Math.floor(count_time/60%60) < 10?'0'+Math.floor(count_time/60%60):Math.floor(count_time/60%60);
|
|
|
|
+ let s = Math.floor(count_time%60) < 10?'0'+Math.floor(count_time%60):Math.floor(count_time%60);
|
|
|
|
+ _self.limit_count_h_m_s = h + ':' + m + ':' + s;
|
|
|
|
+ },1000);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
computed:{
|
|
computed:{
|
|
getgroupbuy(){
|
|
getgroupbuy(){
|
|
return this.proxy.getGroupbuy(this.summery["act_id"]);
|
|
return this.proxy.getGroupbuy(this.summery["act_id"]);
|
|
@@ -59,7 +94,26 @@
|
|
let endtime = groupbuygoods["end_time"];
|
|
let endtime = groupbuygoods["end_time"];
|
|
let localtime = new Date().getTime()/1000;
|
|
let localtime = new Date().getTime()/1000;
|
|
let surplustime = parseInt((endtime-localtime)/60/60/24);
|
|
let surplustime = parseInt((endtime-localtime)/60/60/24);
|
|
- return surplustime;
|
|
|
|
|
|
+ if(surplustime <= 0) {
|
|
|
|
+ this.less_one_day = false;
|
|
|
|
+ this.group_count(endtime);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return surplustime+'天';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ limitTime(){
|
|
|
|
+ let limitbuygoods = this.proxy.getLimitTime(this.summery["act_id"]);
|
|
|
|
+ let endtime = limitbuygoods["end_time"];
|
|
|
|
+ let localtime = new Date().getTime()/1000;
|
|
|
|
+ let surplustime = parseInt((endtime-localtime)/60/60/24);
|
|
|
|
+ if(surplustime <= 0) {
|
|
|
|
+ this.less_one_day = false;
|
|
|
|
+ this.limit_count(endtime);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return surplustime+'天';
|
|
|
|
+ }
|
|
},
|
|
},
|
|
discount(){
|
|
discount(){
|
|
let discount;
|
|
let discount;
|