pull/1/head
liudan 1 year ago
parent faee8468b5
commit 499e036b5d
  1. 77
      pages/qianggou/productDetails.vue
  2. 5
      pages/warehouse/buy.vue
  3. 2
      unpackage/dist/build/h5/index.html
  4. 2
      unpackage/dist/build/h5/static/js/index.47f3836d.js
  5. 1
      unpackage/dist/build/h5/static/js/pages-qianggou-productDetails.3b784f92.js
  6. 1
      unpackage/dist/build/h5/static/js/pages-qianggou-productDetails.a9b84d55.js
  7. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-buy.2c2494f3.js
  8. 1
      unpackage/dist/build/h5/static/js/pages-warehouse-buy.d3d9769d.js

@ -43,9 +43,12 @@
</view>
</view>
<!-- 底部 -->
<view class="page-footer" @click="buyHandle">
<view class="page-footer" @click="buyHandle" v-if="isDeadLine">
立即抢购
</view>
<view class="page-footer" v-if="!isDeadLine">
还剩{{secondNum}}秒抢购
</view>
</view>
</template>
@ -72,18 +75,86 @@ export default {
updatetime:null,
warehouse_id:null,
},
secondNum:"",
isDeadLine:true,
timer:null,
};
},
onLoad(params) {
this.getDetailsHandle(params.id)
},
this.getDetailsHandle(params.id);
},
beforeDestroy(){
clearImmediate(this.timer)
this.timer = null;
},
methods: {
dateDifference(expire_time){//
var timestamp = Date.parse(new Date());//
timestamp=timestamp/1000;
expire_time=parseInt(expire_time/1000);//
return expire_time-timestamp;
},
// dateCalculation (second) { //
// if (second > 0) {
// var day = 0;
// var hour = 0;
// var minute = 0;
// var secondNum = 0;
// var data = {};
// minute = Math.floor(second / (60))
// if (parseInt(secondNum) > 60) {
// minute = parseInt(secondNum / 60);
// minute %= 60; //
// }
// if (parseInt(minute) > 60) {
// hour = parseInt(minute / 60);
// minute %= 60; //
// }
// if (parseInt(hour) > 24) {
// day = parseInt(hour / 24);
// hour %= 24; //
// }
// data.day = day;
// data.hour = hour;
// data.minute = minute;
// return data;
// }
// },
timestampToTime(val) {
var date = new Date();
var Y = date.getFullYear() + '-';
var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1):date.getMonth()+1) + '-';
var D = (date.getDate()< 10 ? '0'+date.getDate():date.getDate())+ ' ';
var h = (date.getHours() < 10 ? '0'+date.getHours():date.getHours())+ ':';
var m = (date.getMinutes() < 10 ? '0'+date.getMinutes():date.getMinutes()) + ':';
var s = date.getSeconds() < 10 ? '0'+date.getSeconds():date.getSeconds();
if(val){
return Y+M+D+h+m+s;
}else{
return Y+M+D;
}
},
getDetailsHandle(id){
getgoodsDetail({id:id,custom: { auth: true }}).then(res=>{
this.swiperList.push({
url: res.data.image
})
let timeNum = res.data.warehouse.start
// let timeNum = "16:02";
let time = this.timestampToTime()+timeNum+":00"
let finishTime = this.dateDifference(new Date(time).getTime())
if(finishTime>0){
this.timer = setInterval(()=>{
this.secondNum = finishTime--
},1000)
this.isDeadLine = false;
}else{
clearImmediate(this.timer)
this.timer = null;
this.isDeadLine = true;
}
this.detailsObj = Object.assign({},this.detailsObj,res.data)
})
},

@ -286,9 +286,10 @@
})
},
tiquconfirmHandle(){
console.log(this.tiquSelected)
let params={
pay_voucher:this.tiquSelected.id,
id:item.id,
pay_voucher:this.tiquSelected.pay_voucher,
id:this.tiquSelected.id,
status:4
}
orderPay(params).then(res=>{

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fd0c9014.js></script><script src=/static/js/index.08e28b8c.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fd0c9014.js></script><script src=/static/js/index.47f3836d.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save