Browse Source

Merge branch 'master' of ssh://8.134.10.79:222/Leadfyy.co/ec.uniapp-master

master
邓平艺 4 years ago
parent
commit
d3f31a81e3
  1. 90
      common/styles/iconfont.css
  2. 8
      pages/discover/discoverdetails.vue
  3. 1
      pages/order/newdetail/newdetail.vue
  4. 181
      pages/shop/seckillList.vue
  5. 14
      pages/user/my/center.vue

90
common/styles/iconfont.css

@ -1,8 +1,8 @@
@font-face {
font-family: "lf-iconfont"; /* Project id 2779107 */
src: url('//at.alicdn.com/t/font_2779107_e1lp09zkffc.woff2?t=1632308314645') format('woff2'),
url('//at.alicdn.com/t/font_2779107_e1lp09zkffc.woff?t=1632308314645') format('woff'),
url('//at.alicdn.com/t/font_2779107_e1lp09zkffc.ttf?t=1632308314645') format('truetype');
src: url('//at.alicdn.com/t/font_2779107_gbe0eg36e0e.woff2?t=1632969325882') format('woff2'),
url('//at.alicdn.com/t/font_2779107_gbe0eg36e0e.woff?t=1632969325882') format('woff'),
url('//at.alicdn.com/t/font_2779107_gbe0eg36e0e.ttf?t=1632969325882') format('truetype');
}
.lf-iconfont {
@ -13,94 +13,66 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-jiazai:before {
content: "\e7ba";
}
.icon-daifahuo:before {
content: "\e642";
}
.icon-daishouhuo:before {
content: "\e636";
}
.icon-fanhui:before {
content: "\e613";
.icon-dianshangjiashangcheng-xianxing:before {
content: "\e79d";
}
.icon-shouye:before {
content: "\e61d";
}
.icon-faxian:before {
content: "\e6b8";
.icon-zhuanjifen:before {
content: "\e616";
}
.icon-yingerche:before {
content: "\e603";
.icon-Bookmark:before {
content: "\e619";
}
.icon-fenleiorguangchangorqitatianchong:before {
content: "\e67d";
.icon-Location:before {
content: "\e61f";
}
.icon-jifen1:before {
content: "\e6a4";
.icon-Star:before {
content: "\e625";
}
.icon-tingchechang:before {
content: "\e6ca";
.icon-huiyuan4:before {
content: "\fc38";
}
.icon-VIP:before {
content: "\e68e";
.icon-31daifahuo:before {
content: "\e604";
}
.icon-tubiao-:before {
content: "\e610";
.icon-a-Group21:before {
content: "\e615";
}
.icon-packing:before {
content: "\e625";
.icon-a-Group16:before {
content: "\e614";
}
.icon-liwu:before {
content: "\e674";
.icon-jiazai:before {
content: "\e7ba";
}
.icon-activity-s:before {
content: "\e641";
.icon-daishouhuo:before {
content: "\e636";
}
.icon-peishi-shoubiao:before {
content: "\e60a";
.icon-fanhui:before {
content: "\e613";
}
.icon-shujia:before {
content: "\e620";
.icon-shouye:before {
content: "\e61d";
}
.icon-V:before {
content: "\e719";
.icon-faxian:before {
content: "\e6b8";
}
.icon-huiyuan2:before {
content: "\e731";
}
.icon-yinliao:before {
content: "\e60e";
}
.icon-meishi:before {
content: "\e611";
}
.icon-shuji:before {
content: "\fbb7";
}
.icon-jian1:before {
content: "\e633";
}

8
pages/discover/discoverdetails.vue

@ -106,7 +106,7 @@
<!-- 底部tab -->
<view class="comment-tab">
<view>
<input class="rom-search" type="text" v-if="ifApply" :focus="ifApply" @confirm="applyComment(apply_userid,apply_commentid)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
<input class="rom-search" confirm-type="send" type="text" v-if="ifApply" :focus="ifApply" @confirm="applyComment(apply_userid,apply_commentid)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
<input class="rom-search" type="text" v-else @confirm="sendComment(discover_details.id)" :cursor-spacing="8" v-model="comment" placeholder="说点什么" />
</view>
<view class="lf-row-center">
@ -181,7 +181,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('点赞成功').then(() => {
this.$msg('点赞成功',{icon: 'success', duration: 2500}).then(() => {
console.log('更新点赞列表')
this.getCommentList()
})
@ -264,7 +264,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('回复成功').then(() => {
this.$msg('回复成功',{icon: 'success', duration: 2500}).then(() => {
console.log('更新回复列表');
this.comment = '';
this.ifApply = false;
@ -310,7 +310,7 @@
.then(res => {
if (res.data.code == 200) {
if (res.data.status) {
this.$msg('评论成功').then(() => {
this.$msg('评论成功',{icon: 'success', duration: 2500}).then(() => {
console.log('更新评论列表')
this.comment = '';
this.getCommentList();

1
pages/order/newdetail/newdetail.vue

@ -210,7 +210,6 @@
order_no: '',
order_details: '',
countdown_minute: '',
time: '',
show: false,
pick_type: 0,
config: {

181
pages/shop/seckillList.vue

@ -19,10 +19,38 @@
<view class="desc" v-if="item.seckill.start_left_time.length==0">距离结束还剩余
{{item.seckill.end_left_time[0]}}{{item.seckill.end_left_time[1]}}{{item.seckill.end_left_time[2]}}{{item.seckill.end_left_time[3]}}
</view> -->
<view class="desc" v-if="item.seckill.start_left_time.length==0">距离结束还剩余
{{ item.seckill.ends_at | timeStamp }}
<view class="desc" v-if="item.ifStart">距离结束还剩余
<countdown-timer :time="item.countTime" :autoStart="true" @finish="dateFinish">
<template v-slot="{day,hour,minute, second}">
<view class="lf-flex">
<view class="lf-font-24">{{ day >= 10 ? day : "0" + day }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ hour >= 10 ? hour : "0" + hour }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ minute >= 10 ? minute : "0" + minute }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ second >= 10 ? second : "0" + second }}</view>
<view class="lf-font-24"></view>
</view>
</template>
</countdown-timer>
</view>
<view class="desc" v-else>距离开始还剩余
<countdown-timer :time="item.countTime" :autoStart="true" @finish="dateFinish">
<template v-slot="{day,hour,minute, second}">
<view class="lf-flex">
<view class="lf-font-24">{{ day >= 10 ? day : "0" + day }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ hour >= 10 ? hour : "0" + hour }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ minute >= 10 ? minute : "0" + minute }}</view>
<view class="lf-font-24"></view>
<view class="lf-font-24">{{ second >= 10 ? second : "0" + second }}</view>
<view class="lf-font-24"></view>
</view>
</template>
</countdown-timer>
</view>
</view>
<view class="lf-row-between">
<view class="price">
@ -45,6 +73,7 @@
</template>
<script>
import countdownTimer from '@/components/countdown-timer/countdown-timer';
export default {
data() {
return {
@ -64,6 +93,9 @@
second: ''
}
},
components: {
countdownTimer
},
computed: {
autoHeight() {
return `calc(${this.scrollH}px - ${this.nav_height}px - 180rpx)`;
@ -73,89 +105,6 @@
let info = uni.getSystemInfoSync();
this.scrollH = info.screenHeight;
this.getSeckillList();
// setInterval(() => {
// //
// this.timer = this.timeStamp('2021-09-29 21:27:00')
// }, 1000)
},
filters: {
timeStamp(times) {
// setInterval(() => {
// }, 1000)
//
let timestamp = Date.parse(new Date());
timestamp = timestamp/1000;
let timestap1 = Date.parse(new Date(times));
let letime = (timestap1/1000) - timestamp;
let time = parseInt(letime);
if (parseInt(letime) > 60) {
let second = parseInt(letime) % 60;
let min = parseInt(letime / 60);
//
// time = min + "" + second + "";
//
time = {
min: min,
second: second
};
if (min > 60) {
min = parseInt(letime / 60) % 60;
let hour = parseInt(parseInt(letime / 60) / 60);
//
// time = hour + "" + min + "" + second + "";
//
time = {
hour: hour,
min: min,
second: second
}
if (hour >= 24) {
hour = parseInt(parseInt(letime / 60) / 60) % 24;
let day = parseInt(parseInt(parseInt(letime / 60) / 60) / 24);
//
// time = day + "" + hour + "" + min + "" + second + "";
//
time = {
day: day,
hour: hour,
min: min,
second: second
}
}
}
}
// 1010
if (time.day < 10) {
time.day = '0' + time.day
} else if (time.day == undefined) {
time.day = '00'
}
if (time.hour < 10) {
time.hour = '0' + time.hour
} else if (time.hour == undefined) {
time.hour = '00'
}
if (time.min < 10) {
time.min = '0' + time.min
} else if (time.min == undefined) {
time.min = '00'
}
if (time.second < 10) {
time.second = '0' + time.second
}
console.log(time)
// this.day = time.day
// this.hour = time.hour
// this.min = time.min
// this.second = time.second
//
return time.day+'天'+time.hour+'时'+time.min+'分'+time.second+'秒';
},
},
methods: {
//
@ -181,6 +130,19 @@
type: 'scrollRefresh'
});
},
getTime(){
var date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
var timer = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
return timer;
},
getSeckillList(options = {}) {
this.$http.get({
api: 'api/seckill/all'
@ -198,9 +160,50 @@
this.isRefresher = false;
}
if (this.page == 1) {
this.list = res.data.data;
let list = res.data.data;
list.forEach((item,index) => {
let now_date = new Date(new Date().toLocaleDateString()).getTime();
let start_date = new Date(new Date(item.seckill.starts_at).toLocaleDateString()).getTime();
console.log(now_date)
console.log(start_date)
console.log(item)
if(now_date < start_date) {
this.$set(item,'ifStart',false)
var date = this.getTime()
let time = new Date(item.seckill.starts_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}else {
this.$set(item,'ifStart',true)
var date = this.getTime()
let time = new Date(item.seckill.ends_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}
})
this.list = list
console.log(this.list)
} else {
this.list.push(...res.data.data);
let list = res.data.data;
list.forEach((item,index) => {
let now_date = new Date(new Date().toLocaleDateString()).getTime();
let start_date = new Date(new Date(item.seckill.starts_at).toLocaleDateString()).getTime();
console.log(now_date)
console.log(start_date)
console.log(item)
if(now_date < start_date) {
this.$set(item,'ifStart',false)
var date = this.getTime()
let time = new Date(item.seckill.starts_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}else {
this.$set(item,'ifStart',true)
var date = this.getTime()
let time = new Date(item.seckill.ends_at).getTime() - new Date(date).getTime()
this.$set(item,'countTime',time)
}
})
this.list.push(...list);
}
})
@ -277,7 +280,7 @@
}
.desc {
width: 281rpx;
// width: 281rpx;
height: max-content;
border-radius: 3rpx;
background-color: #E9F2F2;

14
pages/user/my/center.vue

@ -118,7 +118,7 @@
icon: 'icon-daifukuan'
},{
name: '待发货',
icon: 'icon-daifahuo'
icon: 'icon-31daifahuo'
},{
name: '待收货',
icon: 'icon-daishouhuo'
@ -128,27 +128,27 @@
}],
my_service_list: [{
name: '会员服务',
icon: 'icon-huiyuan1',
icon: 'icon-huiyuan4',
path: '/pages/user/member/service'
},{
name: '我的收藏',
icon: 'icon-shoucang',
icon: 'icon-Star',
path: '/pages/user/my/collect'
},{
name: '地址管理',
icon: 'icon-dizhi',
icon: 'icon-Location',
path: '/pages/address/list/list'
},{
name: '活动报名',
icon: 'icon-fabujilu',
icon: 'icon-Bookmark',
path: '/pages/user/my/myEventRegistrationList'
},{
name: '积分商城订单',
icon: 'icon-jifen',
icon: 'icon-zhuanjifen',
path: '/pages/point/exchangeRecord/exchangeRecord'
},{
name: '商家中心',
icon: 'icon-Group-',
icon: 'icon-dianshangjiashangcheng-xianxing',
path: '/pages/business/center/center'
}],
userInfo: {mobile_replace: '正在获取'}, //

Loading…
Cancel
Save