作者 倪静楠

样式

正在显示 59 个修改的文件 包含 1310 行增加426 行删除
... ... @@ -33,8 +33,10 @@ App({
}
})
},
//获取屏幕高度
globalData: {
userInfo: null
}
globalData: {
userInfo: null
}
})
\ No newline at end of file
... ...
... ... @@ -28,8 +28,10 @@
"pages/refund-after/refund-after",
"pages/my-discount-card/my-discount-card",
"pages/all-evaluate/all-evaluate",
"pages/index/index"
"pages/index/index",
"components/navbar/navbar",
"pages/timedmo/timedmo",
"components/timepicker/timepicker"
],
"window": {
"backgroundTextStyle": "light",
... ... @@ -40,7 +42,35 @@
"style": "v2",
"sitemapLocation": "sitemap.json",
"selectedColor": "#355DFF",
"tabBar": {
"borderStyle": "white",
"list": [
{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "/images/tab/home.png",
"selectedIconPath": "/images/tab/home (2).png"
},
{
"pagePath": "pages/classify/classify",
"text": "分类",
"iconPath": "/images/tab/classify (2).png",
"selectedIconPath": "/images/tab/classify.png"
},
{
"pagePath": "pages/shopping-cart/shopping-cart",
"text": "购物车",
"iconPath": "/images/tab/cart (2).png",
"selectedIconPath": "/images/tab/cart.png"
},
{
"pagePath": "pages/user/user",
"text": "我的",
"iconPath": "/images/tab/user.png",
"selectedIconPath": "/images/tab/user (2).png"
}
]
},
"plugins": {
"chooseLocation": {
"version": "1.0.5",
... ...
// components/navbar/navbar.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/navbar/navbar.wxml-->
<text>components/navbar/navbar.wxml</text>
... ...
/* components/navbar/navbar.wxss */
\ No newline at end of file
... ...
// component/time-picker/index.js
let utils=require("../../utils/util.js")
const app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
deliveryTime: "",
selfData: [], //自提日期
showDelivery: false,
deliveryTimeList: [{
day: "",
timeList: ""
}],
nowDay: 0,
selectTime: '',
selectTimeIndex: '',
selectDay: 0
},
pageLifetimes: {
show: function() {
this.getDliveryTime()
}
},
/**
* 组件的方法列表
*/
methods: {
getnowDay(e) {
this.setData({
nowDay: e.currentTarget.dataset.index
})
},
clickTime(e) {
let selfData = this.data.selfData[this.data.nowDay]
let index = e.currentTarget.dataset.index
let selectTime = this.data.deliveryTimeList[this.data.nowDay].timeList[index]
let deliveryTime = selfData.year + '-' + selfData.month + '-' + selfData.day + ' ' + selectTime
let nowDay = this.data.nowDay
this.setData({
selectTimeIndex: index,
selectTime: selectTime,
deliveryTime: deliveryTime,
selectDay: nowDay
})
this.triggerEvent('selectTime', {
deliveryTime: this.data.deliveryTime
})
},
//计算配送时间
getDliveryTime() {
let deliveryTimeList = [];
let date = new Date();
this.setData({
selfData: utils.getDates(5)
// selfData: utils.getDates(5)
})
//获取时间段
let timeDate = new Date(date.getTime());
let todayList = getTimeList(timeDate.getHours(), 1);
deliveryTimeList.push({
timeList: todayList
});
let nextDayList = getTimeList(9, 0);
for (let i = 1; i < 5; i++) {
deliveryTimeList.push({
timeList: nextDayList
});
}
this.triggerEvent('selectTime', {
deliveryTime: this.data.deliveryTime
})
this.setData({
deliveryTimeList: []
})
this.setData({
deliveryTimeList: deliveryTimeList
})
// today 1 是今天 0 不是今天
function getTimeList(hour, today) {
let timeList = [];
let startTime = hour <= 9 ? 9 : hour;
for (let i = 0; i < 8; i++) {
if (((hour <= 9) && (startTime + 2 * i >21)) || ((hour > 9) && (startTime + 2 * i >= 21))) {
break;
} else {
if (hour <= 9) {
timeList.push(
startTime + 2 * i + ":00" + "-" + (startTime + 2 * (i + 1)) + ":00"
);
} else {
if (startTime % 2 === 0) {
timeList.push(
startTime + 2 * i + 1 + ":00" + "-" + (startTime + 2 * i + 3) + ":00"
);
} else {
console.log(i,'i')
timeList.push(
startTime + 2 * i +2 + ":00" + "-" + (startTime + 2 * i + 4) + ":00"
);
}
}
}
}
return timeList;
}
}
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
... ...
<!--components/time-picker/time-picker.wxml-->
<!--component/time-picker/index.wxml-->
<view class="select-date">
<view class="time-title">自提时间</view>
<view class="select-day">
<view class="day" wx:for="{{selfData}}" wx:key="index" class='{{nowDay===index?"day active":"day"}}'
bindtap="getnowDay" data-index='{{index}}'>{{item.month}}月{{item.day}}号【{{item.week}}】</view>
</view>
<view class="select-time">
<view wx:if="{{nowDay===0}}">
<view wx:if='{{deliveryTimeList[nowDay].timeList.length>0}}'>
<view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}'
wx:for="{{deliveryTimeList[nowDay].timeList}}" bindtap="clickTime" wx:key="index" data-index='{{index}}'>
{{item}}
</view>
</view>
<view wx:else class="time-title">对不起,今日暂无自提时间
</view>
</view>
<view wx:if="{{nowDay!==0}}">
<view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}'
wx:for="{{deliveryTimeList[nowDay].timeList}}" bindtap="clickTime" wx:key="index" data-index='{{index}}'>
{{item}}
</view>
</view>
</view>
<!-- </view> -->
</view>
\ No newline at end of file
... ...
/* component/time-picker/index.wxss */
.time-title {
font-family: PingFangSC;
font-weight: 600;
color: rgba(50, 50, 50, 1);
font-size: 32rpx;
margin: 40rpx 20rpx 20rpx 20rpx;
}
.select-date {
max-height: 400rpx;
height: 672rpx;
}
.select-day {
float: left;
width: 300rpx;
height: 392rpx;
}
.day {
font-size: 30rpx;
height: 100rpx;
display: flex;
justify-content: center;
align-items: center;
background: rgba(239, 239, 239, 1);
}
.day.active {
background-color: #fff;
}
.select-time {
height: 100%;
margin-left: 330rpx;
background-color: #fff;
overflow-y: auto;
}
.select-time-item {
padding: 30rpx 36rpx;
width: 314rpx;
height: 42rpx;
border-radius: 18rpx;
border: 2px solid rgba(151, 151, 151, 1);
font-size: 30rpx;
margin-bottom: 30rpx;
}
.select-time-item.select {
color: #ff4a00;
}
/* .time {
line-height: 80rpx;
border-bottom: 2px solid #eee;
} */
i {
float: right;
font-size: 30rpx;
color: #ff4a00;
margin-top: 26rpx;
}
\ No newline at end of file
... ...
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
\ No newline at end of file
.van-ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
/* color: #939496; */
}
.van-multi-ellipsis--l2 {
-webkit-line-clamp: 2
}
.van-multi-ellipsis--l2,
.van-multi-ellipsis--l3 {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical
}
.van-multi-ellipsis--l3 {
-webkit-line-clamp: 3
}
.van-clearfix:after {
display: table;
clear: both;
content: ""
}
.van-hairline,
.van-hairline--bottom,
.van-hairline--left,
.van-hairline--right,
.van-hairline--surround,
.van-hairline--top,
.van-hairline--top-bottom {
position: relative
}
.van-hairline--bottom:after,
.van-hairline--left:after,
.van-hairline--right:after,
.van-hairline--surround:after,
.van-hairline--top-bottom:after,
.van-hairline--top:after,
.van-hairline:after {
position: absolute;
box-sizing: border-box;
-webkit-transform-origin: center;
transform-origin: center;
content: " ";
pointer-events: none;
top: -50%;
right: -50%;
bottom: -50%;
left: -50%;
border: 0 solid #ebedf0;
-webkit-transform: scale(.5);
transform: scale(.5)
}
.van-hairline--top:after {
border-top-width: 1px
}
.van-hairline--left:after {
border-left-width: 1px
}
.van-hairline--right:after {
border-right-width: 1px
}
.van-hairline--bottom:after {
border-bottom-width: 1px
}
.van-hairline--top-bottom:after {
border-width: 1px 0
}
.van-hairline--surround:after {
border-width: 1px
}
\ No newline at end of file
... ...
@import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:8px;padding-left:var(--padding-xs,8px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
\ No newline at end of file
@import '../common/index.wxss';
.van-search {
-webkit-align-items: center;
align-items: center;
box-sizing: border-box;
padding: 10px 12px;
padding: var(--search-padding, 10px 12px)
}
.van-search,
.van-search__content {
display: -webkit-flex;
display: flex
}
.van-search__content {
-webkit-flex: 1;
flex: 1;
padding-left: 8px;
padding-left: var(--padding-xs, 8px);
border-radius: 2px;
border-radius: var(--border-radius-sm, 2px);
background-color: #f7f8fa;
background-color: var(--search-background-color, #f7f8fa)
}
.van-search__content--round {
border-radius: 17px;
border-radius: calc(var(--search-input-height, 34px)/2)
}
.van-search__label {
padding: 0 5px;
padding: var(--search-label-padding, 0 5px);
font-size: 14px;
font-size: var(--search-label-font-size, 16px);
line-height: 34px;
line-height: var(--search-input-height, 34px);
color: #323233;
color: var(--search-label-color, #323233)
}
.van-search__field {
-webkit-flex: 1;
flex: 1
}
.van-search__field__left-icon {
color: #969799;
color: var(--search-left-icon-color, #969799)
}
.van-search--withaction {
padding-right: 0
}
.van-search__action {
padding: 0 8px;
padding: var(--search-action-padding, 0 8px);
font-size: 16px;
font-size: var(--search-action-font-size, 16px);
line-height: 34px;
line-height: var(--search-input-height, 34px);
color: #323233;
color: var(--search-action-text-color, #323233)
}
.van-search__action--hover {
background-color: #f2f3f5;
background-color: var(--active-color, #f2f3f5)
}
\ No newline at end of file
... ...
@import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#f7f8fa;background-color:var(--sidebar-background-color,#f7f8fa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
\ No newline at end of file
@import '../common/index.wxss';
.van-sidebar-item {
display: block;
box-sizing: border-box;
overflow: hidden;
word-wrap: break-word;
border-left: 3px solid transparent;
-webkit-user-select: none;
user-select: none;
padding: 20px 12px 20px 8px;
padding: var(--sidebar-padding, 20px 12px 20px 8px);
font-size: 14px;
font-size: var(--sidebar-font-size, 14px);
line-height: 20px;
line-height: var(--sidebar-line-height, 20px);
color: #323233;
color: var(--sidebar-text-color, #7d7e80);
background-color: #f7f8fa;
background-color: var(--sidebar-background-color, #f7f8fa)
}
.van-sidebar-item__text {
position: relative;
display: inline-block
}
.van-sidebar-item--hover:not(.van-sidebar-item--disabled) {
background-color: #f2f3f5;
background-color: var(--sidebar-active-color, #f2f3f5)
}
.van-sidebar-item:after {
border-bottom-width: 1px
}
.van-sidebar-item--selected {
color: #323233;
color: var(--sidebar-selected-text-color, #323233);
font-weight: 500;
font-weight: var(--sidebar-selected-font-weight, 500);
border-color: #ee0a24;
border-color: var(--sidebar-selected-border-color, #ee0a24)
}
.van-sidebar-item--selected:after {
border-right-width: 1px
}
.van-sidebar-item--selected,
.van-sidebar-item--selected.van-sidebar-item--hover {
background-color: #fff;
background-color: var(--sidebar-selected-background-color, #fff)
}
.van-sidebar-item--disabled {
color: #c8c9cc;
color: var(--sidebar-disabled-text-color, #c8c9cc)
}
\ No newline at end of file
... ...
@import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{display:-webkit-flex;display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{-webkit-flex:1 0 auto!important;flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-right:8px;padding-left:8px}.van-tabs__scroll{background-color:#fff;background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{margin:0 16px;margin:0 var(--padding-md,16px)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:30px;height:var(--tabs-card-height,30px);border:1px solid #ee0a24;border:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24);border-radius:2px;border-radius:var(--border-radius-sm,2px)}.van-tabs__nav--card .van-tab{color:#ee0a24;color:var(--tabs-default-color,#ee0a24);line-height:28px;line-height:calc(var(--tabs-card-height, 30px) - var(--border-width-base, 1px)*2);border-right:1px solid #ee0a24;border-right:var(--border-width-base,1px) solid var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;color:var(--white,#fff);background-color:#ee0a24;background-color:var(--tabs-default-color,#ee0a24)}.van-tabs__nav--card .van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;height:var(--tabs-bottom-bar-height,3px);border-radius:3px;border-radius:var(--tabs-bottom-bar-height,3px);background-color:#ee0a24;background-color:var(--tabs-bottom-bar-color,#ee0a24)}.van-tabs__track{position:relative;width:100%;height:100%}.van-tabs__track--animated{display:-webkit-flex;display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:44px;height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:30px;height:var(--tabs-card-height,30px)}.van-tab{position:relative;-webkit-flex:1;flex:1;box-sizing:border-box;min-width:0;padding:0 5px;text-align:center;cursor:pointer;color:#646566;color:var(--tab-text-color,#646566);font-size:14px;font-size:var(--tab-font-size,14px);line-height:44px;line-height:var(--tabs-line-height,44px)}.van-tab--active{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--tab-active-text-color,#323233)}.van-tab--disabled{color:#c8c9cc;color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important}
\ No newline at end of file
@import '../common/index.wxss';
.van-tabs {
position: relative;
-webkit-tap-highlight-color: transparent
}
.van-tabs__wrap {
display: -webkit-flex;
display: flex;
overflow: hidden
}
.van-tabs__wrap--scrollable .van-tab {
-webkit-flex: 0 0 22%;
flex: 0 0 22%
}
.van-tabs__wrap--scrollable .van-tab--complete {
-webkit-flex: 1 0 auto !important;
flex: 1 0 auto !important;
padding: 0 12px
}
.van-tabs__wrap--scrollable .van-tabs__nav--complete {
padding-right: 8px;
padding-left: 8px
}
.van-tabs__scroll {
background-color: #fff;
background-color: var(--tabs-nav-background-color, #fff)
}
.van-tabs__scroll--line {
box-sizing: initial;
height: calc(100% + 15px)
}
.van-tabs__scroll--card {
margin: 0 16px;
margin: 0 var(--padding-md, 16px)
}
.van-tabs__scroll::-webkit-scrollbar {
display: none
}
.van-tabs__nav {
position: relative;
display: -webkit-flex;
display: flex;
-webkit-user-select: none;
user-select: none
}
.van-tabs__nav--card {
box-sizing: border-box;
height: 30px;
height: var(--tabs-card-height, 30px);
border: 1px solid #ee0a24;
border: var(--border-width-base, 1px) solid var(--tabs-default-color, #ee0a24);
border-radius: 2px;
border-radius: var(--border-radius-sm, 2px)
}
.van-tabs__nav--card .van-tab {
color: #ee0a24;
color: var(--tabs-default-color, #ee0a24);
line-height: 28px;
line-height: calc(var(--tabs-card-height, 30px) - var(--border-width-base, 1px)*2);
border-right: 1px solid #ee0a24;
border-right: var(--border-width-base, 1px) solid var(--tabs-default-color, #ee0a24)
}
.van-tabs__nav--card .van-tab:last-child {
border-right: none
}
.van-tabs__nav--card .van-tab.van-tab--active {
color: #fff;
color: var(--white, #fff);
background-color: #ee0a24;
background-color: var(--tabs-default-color, #ee0a24)
}
.van-tabs__nav--card .van-tab--disabled {
color: #c8c9cc;
color: var(--tab-disabled-text-color, #c8c9cc)
}
.van-tabs__line {
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
height: 3px;
height: var(--tabs-bottom-bar-height, 3px);
border-radius: 3px;
border-radius: var(--tabs-bottom-bar-height, 3px);
background-color: #ee0a24;
background-color: var(--tabs-bottom-bar-color, #ee0a24)
}
.van-tabs__track {
position: relative;
width: 100%;
height: 100%
}
.van-tabs__track--animated {
display: -webkit-flex;
display: flex;
transition-property: left
}
.van-tabs__content {
overflow: hidden
}
.van-tabs--line .van-tabs__wrap {
height: 44px;
height: var(--tabs-line-height, 44px)
}
.van-tabs--card .van-tabs__wrap {
height: 30px;
height: var(--tabs-card-height, 30px)
}
.van-tab {
position: relative;
-webkit-flex: 1;
flex: 1;
box-sizing: border-box;
min-width: 0;
padding: 0 5px;
text-align: center;
cursor: pointer;
color: #646566;
color: var(--tab-text-color, #939496);
font-size: 14px;
font-size: var(--tab-font-size, 14px);
line-height: 44px;
line-height: var(--tabs-line-height, 44px)
}
.van-tab--active {
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
color: #323233;
color: var(--tab-active-text-color, #323233)
}
.van-tab--disabled {
color: #c8c9cc;
color: var(--tab-disabled-text-color, #c8c9cc)
}
.van-tab__title__info {
position: relative !important;
top: -1px !important;
display: inline-block;
-webkit-transform: translateX(0) !important;
transform: translateX(0) !important
}
\ No newline at end of file
... ...
... ... @@ -40,65 +40,39 @@ Page({
payment: ''
},
//选择时间
showPopupTwo() {
this.setData({
show: true
});
},
showPopup() {
this.setData({
show: true
});
selectTime(e) {
if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) {
this.setData({
storePickupTime: e.detail.deliveryTime,
showTime: false
})
}
},
onClose() {
this.setData({
show: false
});
},
onInput(e) {
this.setData({
currentDate: e.detail,
});
},
onInputTwo(e) {
this.setData({
currentDateTwo: e.detail,
});
},
cancel() {
this.setData({
show: false
});
},
confirm() {
this.setData({
show: false
showTime: false
});
},
cancelTwo() {
this.setData({
show: false
});
onReady() {
this.timepicker = this.selectComponent('#aaa')
},
confirmTwo() {
chooseTime() {
this.setData({
show: false
});
showTime: true
})
// this.timepicker.getDliveryTime();
},
//配送时间
bindDateChange: function (e) {
onClickButton() {
this.setData({
date: e.detail.value
showModal: true
})
},
//获取当天时间
getDayTime() {
var myDate = new Date();
var year = myDate.getFullYear();
var month = myDate.getMonth();
var day = myDate.getDate();
var dayNow = year + '-' + (month + 1) + "-" + day;
console.log(dayNow, 'daynow')
this.setData({
startTime: dayNow
})
... ... @@ -240,7 +214,7 @@ Page({
let postData = {
addressId: this.data.userData.id,
couponId: this.data.couponId,
deliveryTime: this.data.date,
deliveryTime: this.data.storePickupTime,
note: this.data.leavaWord,
num: this.data.count,
skuId: this.data.skuId
... ...
{
"usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"timepicker":"../../components/timepicker/timepicker",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "确认订单"
... ...
<!--pages/affirm-order/affirm-order.wxml-->
<view class="container">
<!-- 地址 -->
<view class="address" catchtap="selectAdd" >
<view wx:if="{{userData!==''}}">
<view class="address" catchtap="selectAdd">
<view wx:if="{{userData!==''}}" style="width:95%">
<view class="userName">{{userData.name}}</view>
<view class="userTell">{{userData.phone}}</view>
<view class="default" wx:if="{{userData.delFlag==1}}">默认</view>
... ... @@ -19,17 +19,21 @@
<!-- 配送时间 -->
<view class="timeBox">
<view class="calendar ">
<image src="/images/04-01/rili.png"></image>
<view style="width:95%;display:flex">
<view class="calendar " bindtap='chooseTime'>
<!-- <image src="/images/04-01/rili.png"></image> -->
请选择配送时间:
</view>
<view class="selectText">{{storePickupTime}}</view>
</view>
<view class="arrow">
<image src="/images/04-01/arrow.png"></image>
</view>
<!-- <view class="timeTitle">配送时间:</view>
<view class="selectTime">{{}}</view> -->
<view class="section">
<picker mode="date" value="{{date}}" start="{{startTime}}" bindchange="bindDateChange">
<view class="picker">
配送时间: {{date}}
</view>
</picker>
<van-popup show="{{ showTime }}" bind:close="onClose" position="bottom">
<timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa"></timepicker>
</van-popup>
</view>
</view>
<!-- 商品列表 -->
... ...
... ... @@ -90,76 +90,55 @@ page {
}
/* 配送时间 */
/* .timeBox {
width: 686rpx;
height: 104rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 auto;
margin-top: 24rpx;
padding: 0 24rpx;
.container {
padding-top: 34rpx;
width: 750rpx;
height: 1440rpx;
background-color: #f1f2f4;
box-sizing: border-box;
border-radius: 16px;
}
.timeArrow{
width: 20rpx;
height: 20rpx;
margin-bottom: 130rpx;
}
.timeArrow image{
width: 22rpx;
height: 24rpx;
.calendar {
font-size: 28rpx;
font-weight: 400;
text-align: left;
color: #323233;
width: 224rpx;
}
.startTime,.endTime{
display: inline-block;
.selectText{
font-size: 28rpx;
color: #323233;
}
.picker{
width: 340rpx;
.arrow{
width: 5%;
}
.pickerEndTime{
width: 200rpx;
} */
/* 配送时间 */
.picker {
width: 600rpx;
.arrow image{
width: 24rpx;
height: 32rpx;
}
.timeBox {
width: 686rpx;
height: 104rpx;
margin: 0 auto;
margin-top: 24rpx;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 24rpx;
margin: 0 auto;
margin-top: 24rpx;
padding: 0 28rpx;
box-sizing: border-box;
border-radius: 16rpx;
}
.calendar {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
}
.calendar image {
width: 32rpx;
height: 32rpx;
border-radius: 16px;
}
.timeTitle,
.selectTime {
font-size: 28rpx;
font-weight: 400;
text-align: left;
color: #323233;
line-height: 40rpx;
.timeArrow {
width: 20rpx;
height: 20rpx;
}
.selectTime {
margin-left: 16rpx;
.timeArrow image {
width: 22rpx;
height: 24rpx;
}
... ... @@ -171,6 +150,7 @@ page {
background-color: #ffffff;
margin-top: 24rpx;
padding-bottom: 32rpx;
border-radius: 16rpx;
}
.cartListItem {
... ...
... ... @@ -3,12 +3,14 @@ let method = require("../../utils/reuqest.js");
const util = require("../../utils/util.js");
Page({
data: {
userData:"",
userData: "",
addressId: '',
startTime: '',
cartList: [], //商品列表
goodsData: '',
goodsList: '',
showTime: false , //配送时间
storePickupTime: '',
show: false,
currentDate: '12:00',
currentDateTwo: '13:00',
... ... @@ -70,84 +72,44 @@ Page({
})
},
//选择时间
//配送时间
bindDateChange: function (e) {
//配送时间
selectTime(e) {
if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) {
this.setData({
date: e.detail.value
storePickupTime: e.detail.deliveryTime,
showTime: false
})
},
//获取当天时间
getDayTime() {
var myDate = new Date();
var year = myDate.getFullYear();
var month = myDate.getMonth();
var day = myDate.getDate();
var dayNow = year + '-' + (month + 1) + "-" + day;
console.log(dayNow, 'daynow')
this.setData({
startTime: dayNow
})
},
showPopupTwo() {
this.setData({
show: true
});
},
showPopup() {
this.setData({
show: true
});
},
onClose() {
this.setData({
show: false
});
},
onInput(e) {
this.setData({
currentDate: e.detail,
});
},
onInputTwo(e) {
this.setData({
currentDateTwo: e.detail,
});
},
cancel() {
this.setData({
show: false
});
},
confirm() {
this.setData({
show: false
});
},
cancelTwo() {
this.setData({
show: false
});
},
confirmTwo() {
this.setData({
show: false
});
},
//选择时间
selectTime() {
this.bindStartTimeChange()
},
bindStartTimeChange: function (e) {
this.setData({
startTime: e.detail.value
})
},
bindEndTimeChange: function (e) {
this.setData({
endTime: e.detail.value
})
},
}
},
onClose() {
this.setData({
showTime: false
});
},
onReady() {
this.timepicker = this.selectComponent('#aaa')
},
chooseTime() {
this.setData({
showTime: true
})
// this.timepicker.getDliveryTime();
},
onClickButton() {
this.setData({
showModal: true
})
},
getDayTime() {
var myDate = new Date();
var year = myDate.getFullYear();
var month = myDate.getMonth();
var day = myDate.getDate();
var dayNow = year + '-' + (month + 1) + "-" + day;
this.setData({
startTime: dayNow
})
},
//点击减少
dec() {
let that = this
... ... @@ -256,8 +218,7 @@ Page({
if (data.statusCode == 0) {
this.payment();
wx.setStorageSync('cardAmount', "")
}else{
}
} else {}
})
},
//支付
... ...
{
"usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"timepicker":"../../components/timepicker/timepicker",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "确认订单"
... ...
... ... @@ -2,29 +2,31 @@
<view class="container">
<!-- 地址 -->
<view class="address" bindtap="emit">
<view wx:if="{{userData!==''}}">
<view wx:if="{{userData!==''}}" style="width:95%">
<view class="userName">{{userData.name}}</view>
<view class="userTell">{{userData.phone}}</view>
<view class="default" wx:if="{{userData.delFlag==1}}">默认</view>
<view class="userAddress">{{userData.area}}{{userData.address}}</view>
</view>
<view wx:if="{{userData==''}}" class="noAdd">
请选择收货地址
请选择收货地址
</view>
<view class="arrow">
<image src="/images/04-01/arrow.png"></image>
</view>
</view>
<!-- 配送时间 -->
<view class="timeBox">
<view class="section">
<picker mode="date" value="{{date}}" start="{{startTime}}" bindchange="bindDateChange">
<view class="picker">
配送时间: {{date}}
</view>
</picker>
</view>
</view>
<view class="timeBox" bindtap='chooseTime'>
<view class="calendar " >
<!-- <image src="/images/04-01/rili.png"></image> -->
</view>
{{storePickupTime}}
<view class="section">
<van-popup show="{{ showTime }}" bind:close="onClose" position="bottom" >
<timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa"></timepicker>
</van-popup>
</view>
</view>
<!-- 商品列表 -->
<view class="cartList">
<view class="cartListItem" wx:for="{{cartList}}">
... ...
... ... @@ -76,7 +76,7 @@
}
.arrow {
width: 15%;
width: 5%;
display: flex;
align-items: center;
}
... ...
... ... @@ -62,7 +62,7 @@ Page({
method.getRequest("/goods/geocoder/v1/" + str, data => {
if (data.statusCode == 0) {
that.setData({
location: data.data.address
location: data.data.address.split('市')[1]
})
}
})
... ...
... ... @@ -93,7 +93,7 @@
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox">
<!-- <view class="tabbarBox">
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
... ... @@ -120,4 +120,4 @@
<text bindtap="toUser">我的</text>
</li>
</ul>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
... ... @@ -136,7 +136,7 @@ page {
.navContent {
background-color: #fff;
margin-bottom: 100rpx;
/* margin-bottom: 100rpx; */
}
.scroll-view {
... ... @@ -252,6 +252,7 @@ page {
display: flex;
justify-content: center;
background-color: #f1f2f4;
margin-bottom: 250rpx;
}
/* 购物车弹框 */
... ...
<!--pages/discount-card/discount-card.wxml-->
<view class="container">
<view class="picBox" wx:for="{{cardList}}" data-index="{{index}}" data-id="{{item.id}}" data-type="{{item.type}}" data-amount="{{item.fullAmount}}"data-cardamount="{{item.amount}}">
<view class="left">
<view class="price">¥{{item.amount}}</view>
<view wx:if="{{item.fullAmount==undefined}}">无门槛使用</view>
<view wx:if="{{item.fullAmount!==undefined}}">满{{item.fullAmount}}可用</view>
</view>
<view class="right">
<view>{{item.name}}</view>
<view class="time">{{startTime}}-{{endTime}}</view>
<view class="time">{{item.time}}</view>
</view>
<view class="topCircle"></view>
<view class="bottomCircle"></view>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
<view class="listBlank" wx:if="{{cardList.length==0}}">
暂无可用优惠券~
</view>
</view>
<view style="position:relative">
<view class="picBox" wx:for="{{cardList}}" data-index="{{index}}" data-id="{{item.id}}" data-type="{{item.type}}"
data-amount="{{item.fullAmount}}" data-cardamount="{{item.amount}}">
<view class="left">
<view class="price">¥{{item.amount}}</view>
<view wx:if="{{item.fullAmount==undefined}}">无门槛使用</view>
<view wx:if="{{item.fullAmount!==undefined}}">满{{item.fullAmount}}可用</view>
</view>
<view class="right">
<view>{{item.name}}</view>
<view class="time">{{startTime}}-{{endTime}}</view>
<view class="time">{{item.time}}</view>
</view>
<view class="topCircle"></view>
<view class="bottomCircle"></view>
</view>
<!-- <view class="bgPic">
<image src="/images/youhuiquan.png"></image>
</view> -->
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
<view class="listBlank" wx:if="{{cardList.length==0}}">
暂无可用优惠券~
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -6,7 +6,16 @@
padding-top: 16rpx;
box-sizing: border-box;
}
.bgPic{
position: absolute;
top: 0;
left: 0;
z-index: -6;
}
.bgPic image{
width: 686rpx;
height: 246rpx;
}
.picBox {
width: 686rpx;
height: 246rpx;
... ... @@ -20,7 +29,8 @@
.picBox .left {
width: 200rpx;
height: 244rpx;
background: linear-gradient(270deg, #fb7900 -100%, #ff4903);
background: linear-gradient(270deg, #f09c4d -70%, #ff4903);
/* background: linear-gradient(270deg, #fb7900 -100%, #ff4903); */
padding-top: 48rpx;
padding-bottom: 48rpx;
box-sizing: border-box;
... ...
... ... @@ -146,7 +146,6 @@ Page({
endTimess: endTime
})
date = (Number(endTime) - Number(startTime));
console.log(date,'666')
if (date<=0) {
this.setData({
countDownShow: false
... ...
... ... @@ -6,6 +6,7 @@
"van-popup": "@vant/weapp/popup/index",
"van-count-down": "@vant/weapp/count-down/index"
},
"navigationBarTitleText": "首页"
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}
\ No newline at end of file
... ...
<!--pages/home/home.wxml-->
<image src="/images/homeBj.png" class="topImage"></image>
<view class="pageTitle1 "></view>
<view class="pageTitle">世纪华联</view>
<view class="contenter">
<!-- 搜索框 -->
<view>
<view class="search_center" catchtap="goSearch">
<view class="searchBox">
<!-- <view class="search_center" catchtap="goSearch">
<view class="real_search_center">
<view class="iconfont icon-sousuo"></view>
<input placeholder='搜索' placeholder-class="placeholder" disabled />
</view>
</view>
</view> -->
<van-search value="{{ value }}" shape="round" background='linear-gradient(137deg,#5b8eff, #2e55ff 92%)'
placeholder="搜索" bind:focus="goSearch"/>
</view>
<!-- 轮播图 -->
<view>
<view style="margin-top:60rpx">
<swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000">
<block wx:for="{{swiperArray}}" wx:for-index="idx">
<swiper-item bindtap="goBannnerDetail" data-url="{{item.url}}" data-index="{{index}}">
... ... @@ -154,12 +159,12 @@
</view>
</van-popup>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
我是有底线的~
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox" >
<!-- <view class="tabbarBox" >
<ul>
<li>
<view class="tabbarPic">
... ... @@ -186,4 +191,4 @@
<text>我的</text>
</li>
</ul>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
/* pages/home/home.wxss */
.contenter {
margin-bottom: 100rpx;
.topImage {
width: 100%;
position: fixed;
top: 0;
left: 0;
}
page{
padding: 24rpx 32rpx 0 32rpx;
.pageTitle1 {
width: 100%;
height: 88rpx;
font-size: 34rpx;
font-weight: 500;
text-align: center;
color: #ffffff;
line-height: 24px;
position: fixed;
top: 0rpx;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(137deg,#5b8eff, #2e55ff 92%);
z-index: 66;
}
.pageTitle {
width: 100%;
height: 88rpx;
font-size: 34rpx;
font-weight: 500;
text-align: center;
color: #ffffff;
line-height: 24px;
position: fixed;
top: 88rpx;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(137deg,#5b8eff, #2e55ff 92%);
z-index: 66;
}
.van-tabs{
background: #f1f2f4;
}
.contenter {
/* margin-bottom: 100rpx; */
padding: 47rpx 32rpx 0 32rpx;
box-sizing: border-box;
position: relative;
top: 176rpx;
}
page {
/* padding: 24rpx 32rpx 0 32rpx;
box-sizing: border-box; */
}
/* 搜索框 */
.searchBox {
width: 100%;
height: 88rpx;
background: linear-gradient(137deg, #5b8eff, #2e55ff 92%);
position: fixed;
top: 176rpx;
left: 0;
z-index: 66;
box-sizing: border-box;
}
.search_center {
height: 68rpx;
... ... @@ -57,7 +114,7 @@ page{
/* 轮播图 */
.swiper {
height: 306rpx;
height: 320rpx;
width: 100%;
/* background-color: aquamarine; */
}
... ... @@ -130,13 +187,14 @@ page{
}
.countTime {
display:flex;
display: flex;
/* width: 192rpx; */
/* background-color: #9b74fb; */
height: 40rpx;
margin-left: -20rpx;
}
.countTime .maohao{
.countTime .maohao {
color: #ff593c;
width: 20rpx;
display: flex;
... ... @@ -144,6 +202,7 @@ page{
justify-content: center;
padding-bottom: 10rpx;
}
.countTime .textss {
width: 40rpx;
height: 40rpx;
... ... @@ -306,6 +365,7 @@ page{
.dayPriceTime {
display: inline-block;
margin-left: 10rpx;
}
.morePrice {
... ... @@ -381,6 +441,7 @@ page{
break-inside: avoid;
margin-right: 10rpx;
margin-left: 10rpx;
border-radius: 16rpx;
}
.pickPic {
... ... @@ -391,6 +452,7 @@ page{
.pickPic image {
width: 312rpx;
height: 328rpx;
border-radius: 16rpx;
}
.pickTitle {
... ... @@ -558,10 +620,12 @@ page{
color: #ffffff;
margin-top: 24rpx;
}
.discountBox{
.discountBox {
max-height: 350rpx;
overflow: auto;
}
.popupImg {
width: 540rpx;
height: 148rpx;
... ... @@ -631,7 +695,8 @@ page{
align-items: center;
margin-top: 24rpx;
}
.bottomHint{
.bottomHint {
background-color: #f1f2f4;
font-size: 24rpx;
color: gray;
... ... @@ -639,8 +704,9 @@ page{
justify-content: center;
padding: 8rpx;
}
/* tabbar */
.tabbarBox{
.tabbarBox {
width: 100%;
height: 98rpx;
background-color: #fff;
... ... @@ -651,29 +717,35 @@ page{
padding-top: 12rpx;
box-sizing: border-box;
}
.tabbarPic{
.tabbarPic {
display: flex;
justify-content: center;
}
.tabbarBox ul{
.tabbarBox ul {
width: 100%;
display: flex;
}
ul>li{
ul>li {
width: 25%;
}
li text{
li text {
display: block;
display: flex;
justify-content: center;
font-size: 18rpx;
font-weight: 400;
color: #bdc4ce;
display: flex;
justify-content: center;
font-size: 18rpx;
font-weight: 400;
color: #bdc4ce;
}
.check{
.check {
color: #355DFF;
}
.tabbarPic image{
width:48rpx;
.tabbarPic image {
width: 48rpx;
height: 48rpx;
}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,8 @@ let method = require("../../utils/reuqest.js");
const util = require("../../utils/util.js");
Page({
data: {
showTime: false , //配送时间
storePickupTime: '',
userData: "",
data: '', //配送时间
startTime: '',
... ... @@ -28,59 +30,39 @@ Page({
stockNum: ''
},
//选择时间
showPopupTwo() {
this.setData({
show: true
});
},
showPopup() {
this.setData({
show: true
});
selectTime(e) {
if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) {
this.setData({
storePickupTime: e.detail.deliveryTime,
showTime: false
})
}
},
onClose() {
this.setData({
show: false
showTime: false
});
},
onInput(e) {
this.setData({
currentDate: e.detail,
});
},
onInputTwo(e) {
this.setData({
currentDateTwo: e.detail,
});
onReady() {
this.timepicker = this.selectComponent('#aaa')
},
cancel() {
chooseTime() {
this.setData({
show: false
});
},
confirm() {
this.setData({
show: false
});
},
cancelTwo() {
this.setData({
show: false
});
showTime: true
})
// this.timepicker.getDliveryTime();
},
confirmTwo() {
onClickButton() {
this.setData({
show: false
});
showModal: true
})
},
//获取当天时间
getDayTime() {
var myDate = new Date();
var year = myDate.getFullYear();
var month = myDate.getMonth();
var day = myDate.getDate();
var dayNow = year + '-' + (month + 1) + "-" + day;
console.log(dayNow, 'daynow')
this.setData({
startTime: dayNow
})
... ... @@ -105,24 +87,24 @@ Page({
},
//选择时间
//配送时间
bindDateChange: function (e) {
this.setData({
date: e.detail.value
})
},
selectTime() {
this.bindStartTimeChange()
},
bindStartTimeChange: function (e) {
this.setData({
startTime: e.detail.value
})
},
bindEndTimeChange: function (e) {
this.setData({
endTime: e.detail.value
})
},
// bindDateChange: function (e) {
// this.setData({
// date: e.detail.value
// })
// },
// selectTime() {
// this.bindStartTimeChange()
// },
// bindStartTimeChange: function (e) {
// this.setData({
// startTime: e.detail.value
// })
// },
// bindEndTimeChange: function (e) {
// this.setData({
// endTime: e.detail.value
// })
// },
//商品信息
getList(defaultSku) {
let postData = {
... ... @@ -201,7 +183,7 @@ Page({
let postData = {
addressId: this.data.userData.id,
couponId: "",
deliveryTime: this.data.date,
deliveryTime: this.data.storePickupTime,
note: this.data.leavaWord,
num: 1,
skuId: this.data.skuId
... ...
{
"usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"timepicker":"../../components/timepicker/timepicker",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "确认订单"
... ...
... ... @@ -2,7 +2,7 @@
<view class="container">
<!-- 地址 -->
<view class="address" bindtap="emit">
<view class="address_content_left">
<view class="address_content_left" style="width:92%">
<view>
<view class="userName">{{userData.name}}</view>
<view class="userTell">{{userData.phone}}</view>
... ... @@ -18,15 +18,22 @@
</view>
</view>
<!-- 配送时间 -->
<view class="timeBox">
<view class="section">
<picker mode="date" value="{{date}}" start="{{startTime}}" bindchange="bindDateChange">
<view class="picker">
配送时间: {{date}}
</view>
</picker>
<view class="timeBox" >
<view style="width:95%;display:flex" bindtap='chooseTime'>
<view class="calendar " >
请选择配送时间:
</view>
<view class="selectText">{{storePickupTime}}</view>
</view>
<view class="arrow" bindtap='chooseTime'>
<image src="/images/04-01/arrow.png"></image>
</view>
<view class="section">
<van-popup show="{{ showTime }}" bind:close="onClose" position="bottom" >
<timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa"></timepicker>
</van-popup>
</view>
</view>
<!-- 商品列表 -->
<view class="cartList">
<!-- <view class="cartListItem" wx:for="{{cartList}}"> -->
... ...
/* pages/integral-order/integral-order.wxss */
/* pages/affirm-order/affirm-order.wxss */
page {
background-color: #f1f2f4;
}
.container {
padding-top: 34rpx;
width: 750rpx;
height: 1440rpx;
background-color: #f1f2f4;
box-sizing: border-box;
margin-bottom: 130rpx;
}
.calendar {
font-size: 28rpx;
font-weight: 400;
text-align: left;
color: #323233;
width: 204rpx;
}
.selectText {
font-size: 28rpx;
color: #323233;
flex: 1;
}
.arrow {
width: 5%;
}
.arrow image {
width: 32rpx;
height: 32rpx;
}
/* 地址 */
.noAdd {
... ... @@ -21,8 +46,8 @@
}
.address {
width: 90%;
margin-left: 5%;
width: 92%;
margin-left: 4%;
background: #fff;
border-radius: 16rpx;
display: flex;
... ... @@ -79,7 +104,7 @@
}
.arrow {
width: 15%;
width: 5%;
display: flex;
align-items: center;
justify-content: center;
... ... @@ -136,6 +161,7 @@
background-color: #ffffff;
margin-top: 24rpx;
padding-bottom: 32rpx;
border-radius: 16rpx;
}
.cartListItem {
... ... @@ -201,12 +227,16 @@
.productDetail {
width: 304rpx;
height: 36rpx;
font-size: 24rpx;
font-weight: 400;
text-align: left;
color: #999999;
line-height: 36rpx;
margin-bottom: 40rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.productPrice {
... ...
... ... @@ -81,7 +81,7 @@
</view>
<view class="time orderPublic innerPublic">
<view class="title ">配送时间 :</view>
<view class="content">{{requestData.deliveryTime}}</view>
<view class="content">{{requestData.createTime}}</view>
</view>
<view class="mainMoney innerPublic">
<view class="title ">商品总额 :</view>
... ...
... ... @@ -9,12 +9,13 @@ Page({
swiperArray: [{
url: '/images/1.jpg'
}],
countDownShow: '',
time: '', //倒计时
timeData: '',
hour: "",
minute: "",
second: "",
endTimess:'',
endTimess: '',
goodsData: '',
productName: '三好龙虾 招牌泼油小龙虾',
price: '¥688.00',
... ... @@ -54,7 +55,7 @@ Page({
endTime = Date.parse(data.data.endDate);
date = (Number(endTime) - Number(startTime));
this.setData({
endTimess:endTime,
endTimess: endTime,
time: date
})
var str2 = toString(date / 1000 / 3600);
... ... @@ -76,11 +77,18 @@ Page({
var hour = parseInt(downTime / 1000 / 60 / 60) < 10 ? "0" + parseInt(downTime / 1000 / 60 / 60) : parseInt(downTime / 1000 / 60 / 60);
var minute = parseInt(downTime / 1000 / 60 % 60) < 10 ? "0" + parseInt(downTime / 1000 / 60 % 60) : parseInt(downTime / 1000 / 60 % 60)
var second = parseInt(downTime / 1000 % 60) < 10 ? "0" + parseInt(downTime / 1000 % 60) : parseInt(downTime / 1000 % 60)
this.setData({
hour: hour,
minute: minute,
second: second
})
if (date <= 0) {
this.setData({
countDownShow: false
})
} else {
this.setData({
countDownShow: true,
hour: hour,
minute: minute,
second: second
})
}
}, 1000)
})
},
... ... @@ -140,7 +148,7 @@ Page({
// flag: !this.data.flag
// })
wx.navigateTo({
url: '/pages/all-evaluate/all-evaluate?goodsid='+this.data.goodsId,
url: '/pages/all-evaluate/all-evaluate?goodsid=' + this.data.goodsId,
})
},
//进入购物车
... ...
... ... @@ -12,7 +12,7 @@
</block>
</swiper>
</view>
<view class="countDown" wx:if="{{goodsData.youHui}}">
<view class="countDown" wx:if="{{countDownShow}}">
<text class="countDownTxt">距结束仅剩</text>
<!-- 倒计时 -->
<view class="countTime">
... ...
... ... @@ -13,31 +13,14 @@ Page({
title: '香蕉'
}],
title: '猜你喜欢',
list: [{
url: '/images/1.jpg',
title: '商品名称较好的GV接口给大家GV看积极的股份',
num: "2004的缴费人简单缸发动机电话缸发动机的花费更多",
goodsPrice: 20000
}, {
url: '/images/1.jpg',
title: '商品名称',
num: 'jhjkghvjgfjkvgi接收到该附件国'
}, {
url: '/images/1.jpg',
title: '商品名称',
num: 200
}, {
url: '/images/1.jpg',
title: '商品名称',
num: 200
}]
list: []
},
//获取输入的关键字
getKeyWord(e) {
onChange(e) {
this.setData({
keyWord: e.detail.value
keyWord: e.detail
})
console.log(this.data.keyWord, 'keys')
},
//搜索
search() {
... ... @@ -45,6 +28,11 @@ Page({
url: '/pages/searchRequest/searchRequest?keyword=' + this.data.keyWord,
});
},
onCancel() {
wx.switchTab({
url: '/pages/home/home',
})
},
//取消文本框输入
cancel() {
this.setData({
... ... @@ -57,7 +45,7 @@ Page({
url: '/pages/home/home',
})
},
//搜索记录
//搜索历史
searchHistory() {
method.getRequest("/coupon/historySearch", data => {
if (data.statusCode == 0) {
... ... @@ -67,10 +55,36 @@ Page({
}
})
},
//删除搜索历史
delSearch() {
this.setData({
labelArray: []
let that=this;
wx.showModal({
title: '提示',
content: '确认删除所有历史记录吗?',
success (res) {
if (res.confirm) {
method.deleteRequest("/coupon/deleteHistory",data=>{
if(data.statusCode==0){
that.setData({
labelArray:[]
})
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
historyClick(e) {
console.log(e, 'e')
let idx = e.currentTarget.dataset.index;
let list = this.data.labelArray;
list.forEach((item, index) => {
if (idx == index) {
this.setData({
keyWord: list[idx]
})
}
})
},
// 猜你喜欢
... ...
<!--pages/search/search.wxml-->
<view class="container">
<view class="search_center" catchtap="goSearch">
<view class="real_search_center">
<!-- <view class="real_search_center">
<view class="searchIcon">
<image src="/images/01-02/sousuo.png"></image>
</view>
... ... @@ -10,7 +10,8 @@
<image src="/images/01-02/quxiao.png"></image>
</view>
</view>
<view class="search_right" catchtap="unsearch">取消</view>
<view class="search_right" catchtap="unsearch">取消</view> -->
<van-search value="{{keyWord}}" placeholder="请输入搜索关键词" shape="round" show-action bind:search="search" bind:cancel="onCancel" bind:change="onChange"/>
</view>
<!-- 搜索历史 -->
... ... @@ -25,7 +26,7 @@
</view>
</view>
<view class="searchLable">
<view wx:for="{{labelArray}}" class="lableBox">
<view wx:for="{{labelArray}}" class="lableBox" catchtap="historyClick" data-index="{{index}}">
{{item}}
</view>
</view>
... ...
... ... @@ -5,10 +5,8 @@
background: linear-gradient(180deg, #ffffff, #ebedf0);
}
/* 搜索框 */
.search_center {
height: 68rpx;
display: flex;
margin-bottom: 24rpx;
width:750rpx;
}
... ...
... ... @@ -3,9 +3,21 @@ let method = require("../../utils/reuqest.js")
Page({
data: {
list: [],
keyword: ''
keyword: '',
bottomHint:false //触底提示
},
//获取搜索结果
onChange(e) {
this.setData({
keyword: e.detail,
});
},
onSearch() {
this.getSearchResult();
},
onClick() {
this.getSearchResult();
},
getSearchResult() {
let postData = {
keyword: this.data.keyword,
... ... @@ -31,7 +43,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options, 'options')
console.log(options, 'options')
this.setData({
keyword: options.keyword
})
... ... @@ -78,7 +90,14 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.setData({
bottomHint: true
})
setTimeout(() => {
this.setData({
bottomHint: false
})
}, 2000)
},
/**
... ...
{
"usingComponents": {},
"usingComponents": {
"van-search": "@vant/weapp/search/index"
},
"navigationBarTitleText": "搜索"
}
... ...
<!--pages/searchRequest/searchRequest.wxml-->
<!-- 搜索 -->
<view class="search_center" catchtap="goSearch">
<view class="real_search_center">
<input class="weui-input" auto-focus placeholder="{{keyword}}" bindinput="getKeyWord"
placeholder-class="placeholder" />
<view class="search_right" catchtap="search">
取消
</view>
</view>
<!-- <view class="search_right" catchtap="search">搜索</view> -->
<van-search value="{{keyword}}" placeholder="请输入搜索关键词" use-action-slot shape="round" bind:change="onChange"
bind:search="onSearch">
<view slot="action" bind:tap="onClick">搜索</view>
</van-search>
</view>
<!-- 商品列表 -->
<view class="productList" wx:if="{{list.length==0}}">
... ... @@ -30,4 +26,7 @@
</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
\ No newline at end of file
... ...
... ... @@ -7,13 +7,11 @@ page{
.search_center {
height: 90rpx;
width: 750rpx;
display: flex;
margin-bottom: 24rpx;
position: fixed;
top: 0;
top: 2rpx;
left: 0;
background-color: #f1f2f4;
padding-top: 20rpx;
}
.real_search_center {
... ... @@ -102,9 +100,8 @@ page{
color: rgb(206, 208, 209);
}
.listBox{
width: 750rpx;
display: flex;
margin-top: 90rpx;
margin-top: 108rpx;
padding: 0 26rpx;
box-sizing: border-box;
}
... ... @@ -134,6 +131,7 @@ page{
background-color: #ffffff;
margin-bottom: 16rpx;
break-inside: avoid;
border-radius: 16rpx;
}
.pickPic {
... ... @@ -191,3 +189,11 @@ page{
.collectIcon>view {
margin-left: 8rpx;
}
.bottomHint {
background-color: #f1f2f4;
font-size: 24rpx;
color: gray;
display: flex;
justify-content: center;
padding-bottom:16rpx;
}
... ...
... ... @@ -29,6 +29,7 @@ page{
.userInfo {
display: flex;
flex-direction: row;
align-items: center;
}
.name {
... ...
... ... @@ -3,6 +3,8 @@ let method = require("../../utils/reuqest.js")
const util = require("../../utils/util.js")
Page({
data: {
showTime: false , //配送时间
storePickupTime: '',
checkType: 1,
userData: "",
addHint: false, //判断有没有地址
... ... @@ -97,12 +99,33 @@ Page({
},
//配送时间
bindDateChange: function (e) {
selectTime(e) {
if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) {
this.setData({
storePickupTime: e.detail.deliveryTime,
showTime: false
})
}
},
onClose() {
this.setData({
showTime: false
});
},
onReady() {
this.timepicker = this.selectComponent('#aaa')
},
chooseTime() {
this.setData({
showTime: true
})
// this.timepicker.getDliveryTime();
},
onClickButton() {
this.setData({
date: e.detail.value
showModal: true
})
},
//获取当天时间
getDayTime() {
var myDate = new Date();
var year = myDate.getFullYear();
... ...
{
"usingComponents": {
"timepicker":"../../components/timepicker/timepicker",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "购物车",
"enablePullDownRefresh": true
... ...
... ... @@ -2,10 +2,6 @@
<view class="container">
<!-- 地址 -->
<view class="userInfo" bindtap="goAddress1">
<!-- <view class="addHint" wx:if="{{addHint==false}}">
<view class="addItem1">暂未获取到收获地址</view>
<view class="addItem2"> 请选择收货地址</view>
</view> -->
<view>
<view wx:if="{{userData!==''}}">
<view class="userName">{{userData.name}}</view>
... ... @@ -23,15 +19,14 @@
</view>
<!-- 配送时间 -->
<view class="timeBox">
<view class="calendar ">
<view class="calendar " bindtap='chooseTime'>
<image src="/images/04-01/rili.png"></image>
</view>
{{storePickupTime}}
<view class="section">
<picker mode="date" value="{{date}}" bindchange="bindDateChange" start="{{startTime}}">
<view class="picker">
配送时间: {{date}}
</view>
</picker>
<van-popup show="{{ showTime }}" bind:close="onClose" position="bottom" >
<timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa"></timepicker>
</van-popup>
</view>
</view>
... ... @@ -57,11 +52,11 @@
<text class="cart-count-add" catchtap="addCount" data-index="{{index}}"
data-goodSkuId="{{item.goodsSkuId}}">+</text>
</view>
</view>
</view>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
我是有底线的~
</view>
</view>
<!-- <view wx:if="{{carts.length==0}}"> -->
<view wx:if="{{cartnoData}}">
... ... @@ -69,7 +64,7 @@
<view class="cart-no-data-btn" bindtap="goHome">去逛逛</view>
</view>
</view>
<!-- 立即购买 -->
<view class="bottom">
<!-- <view class="checkPic">
... ... @@ -89,7 +84,7 @@
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox" >
<!-- <view class="tabbarBox" >
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
... ... @@ -116,4 +111,4 @@
<text bindtap="toUser">我的</text>
</li>
</ul>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
... ... @@ -77,7 +77,7 @@ page {
font-size: 28prx;
font-weight: 400;
text-align: left;
color: #6c6c6d;
color: #323233;
line-height: 40rpx;
margin-top: 16rpx;
height: 84rpx;
... ... @@ -275,7 +275,7 @@ page {
/* padding-bottom: 120rpx; */
}
.main{
margin-bottom: 120rpx;
margin-bottom: 20rpx;
}
.cart-list {
position: relative;
... ... @@ -446,7 +446,7 @@ page {
display: flex;
align-items: center;
position: fixed;
bottom: 98rpx;
bottom: 0rpx;
left: 0;
background-color: #ffffff;
padding-left: 28rpx;
... ...
const app = getApp()
// var numeral = require('numeral');
Page({
/**
* 页面的初始数据
*/
data: {
showTime: false ,
storePickupTime: ''
},
selectTime(e) {
if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) {
this.setData({
storePickupTime: e.detail.deliveryTime,
showTime: false
})
}
},
onClose() {
this.setData({
showTime: false
});
},
onReady(){
this.timepicker=this.selectComponent('#aaa')
},
chooseTime() {
this.setData({
showTime: true
})
// this.timepicker.getDliveryTime();
},
onClickButton() {
this.setData({
showModal: true
})
},
})
\ No newline at end of file
... ...
{
"usingComponents": {
"timepicker":"../../components/timepicker/timepicker"
}
}
\ No newline at end of file
... ...
<!--pages/timedmo/timedmo.wxml-->
 <view bindtap='chooseTime'> 自提时间{{storePickupTime}}</view>
<van-popup show="{{ showTime }}" bind:close="onClose" position="bottom" style="display:{{showTime ? 'vilative' : 'none'}}">
<timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa"></timepicker>
</van-popup>
\ No newline at end of file
... ...
/* pages/timedmo/timedmo.wxss */
\ No newline at end of file
... ...
... ... @@ -58,7 +58,7 @@
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox" >
<!-- <view class="tabbarBox" >
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
... ... @@ -85,4 +85,4 @@
<text class="check">我的</text>
</li>
</ul>
</view>
\ No newline at end of file
</view> -->
\ No newline at end of file
... ...
... ... @@ -73,7 +73,6 @@
.container {
width: 750rpx;
height: 1106rpx;
background-color: #f1f2f4;
padding-top: 26rpx;
box-sizing: border-box;
... ...
... ... @@ -264,6 +264,12 @@
"pathName": "pages/all-evaluate/all-evaluate",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/timedmo/timedmo",
"pathName": "pages/timedmo/timedmo",
"scene": null
}
]
}
... ...
... ... @@ -14,7 +14,36 @@ const formatNumber = n => {
return n[1] ? n : '0' + n
}
//获取时间
//获取d当前时间多少天后的日期和对应星期
function getDates(days, todate = new Date() ) { //todate默认参数是当前日期,可以传入对应时间
// function getDates(days, todate =getCurrentMonthFirst()) { //todate默认参数是当前日期,可以传入对应时间
var dateArry = [];
for (var i = 0; i < days-3; i++) {
var dateObj = dateLater(todate, i);
console.log(dateObj)
dateArry.push(dateObj)
}
return dateArry;
}
/**
* 传入时间后几天
* param:传入时间:dates:"2018-04-02",later:往后多少天
*/
function dateLater(dates, later) {
let dateObj = {};
let show_day = new Array('周日', '周一', '周二', '周三', '周四', '周五', '周六');
let date = new Date(dates);
date.setDate(date.getDate() + later);
let day = date.getDay();
dateObj.year = date.getFullYear();
dateObj.month = date.getMonth() + 1
// dateObj.month = ((date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : date.getMonth() + 1);
dateObj.day = date.getDate()
// dateObj.day = (date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate());
dateObj.week = show_day[day];
return dateObj;
}
//获取页数
function onReachListData(page, pagenum, data, doFunction) {
var that = page;
... ... @@ -33,12 +62,13 @@ function onReachListData(page, pagenum, data, doFunction) {
}
//获取登录信息
function getUser(msg) {
wx.navigateTo({
url: '/pages/index/index',
})
wx.navigateTo({
url: '/pages/index/index',
})
}
module.exports = {
formatTime: formatTime,
onReachListData: onReachListData,
getUser: getUser
getUser: getUser,
getDates:getDates
}
\ No newline at end of file
... ...