作者 倪静楠

20201210

正在显示 45 个修改的文件 包含 661 行增加398 行删除
1 // component/time-picker/index.js 1 // component/time-picker/index.js
2 -let utils=require("../../utils/util.js") 2 +let utils = require("../../utils/util.js")
  3 +let method = require("../../utils/reuqest.js")
3 const app = getApp() 4 const app = getApp()
4 Component({ 5 Component({
5 /** 6 /**
6 * 组件的属性列表 7 * 组件的属性列表
7 */ 8 */
8 - properties: {  
9 -  
10 - },  
11 - 9 +
12 /** 10 /**
13 * 组件的初始数据 11 * 组件的初始数据
14 */ 12 */
15 data: { 13 data: {
  14 + list:[], //时间数组
16 deliveryTime: "", 15 deliveryTime: "",
17 selfData: [], //自提日期 16 selfData: [], //自提日期
18 showDelivery: false, 17 showDelivery: false,
@@ -23,46 +22,148 @@ Component({ @@ -23,46 +22,148 @@ Component({
23 nowDay: 0, 22 nowDay: 0,
24 selectTime: '', 23 selectTime: '',
25 selectTimeIndex: '', 24 selectTimeIndex: '',
26 - selectDay: 0 25 + selectDay: 0,
  26 + timeLists: ''
27 }, 27 },
28 pageLifetimes: { 28 pageLifetimes: {
29 - show: function() { 29 + show: function () {
30 this.getDliveryTime() 30 this.getDliveryTime()
31 } 31 }
32 }, 32 },
  33 + properties: {
  34 + timeLists: {
  35 + type: Array,
  36 + value: true
  37 + }
  38 + },
33 /** 39 /**
34 * 组件的方法列表 40 * 组件的方法列表
35 */ 41 */
  42 + lifetimes: {
  43 + created() {
  44 + let _this = this;
  45 + if(_this.data.nowDay==0){
  46 + method.getRequest("/myUser/period/" + '1', data => {
  47 + //let list=this
  48 + if (data.statusCode == 0) {
  49 + _this.setData({
  50 + list:data.data
  51 + })
  52 + }
  53 + console.log(_this.data.nowDay,'now')
  54 + console.log(_this.data.deliveryTimeList, 'list')
  55 + })
  56 + }else{
  57 + method.getRequest("/myUser/period/" + '2', data => {
  58 + //let list=this
  59 + if (data.statusCode == 0) {
  60 + _this.setData({
  61 + list:data.data
  62 + })
  63 + }
  64 + console.log(_this.data.nowDay,'now')
  65 + console.log(_this.data.deliveryTimeList, 'list')
  66 + })
  67 + }
  68 +
  69 + },
  70 + attached() {
  71 + console.log("在组件实例进入页面节点树时执行")
  72 + },
  73 + ready() {
  74 +
  75 + console.log("在组件在视图层布局完成后执行")
  76 + },
  77 + moved() {
  78 + console.log("在组件实例被移动到节点树另一个位置时执行")
  79 + },
  80 + detached() {
  81 + console.log("在组件实例被从页面节点树移除时执行")
  82 + },
  83 + error() {
  84 + console.log("每当组件方法抛出错误时执行")
  85 + },
  86 + /*组件所在页面的生命周期 */
  87 + pageLifetimes: {
  88 + show: function () {
  89 + // 页面被展示
  90 + console.log("页面被展示")
  91 + },
  92 + hide: function () {
  93 + // 页面被隐藏
  94 + console.log("页面被隐藏")
  95 + },
  96 + resize: function (size) {
  97 + // 页面尺寸变化
  98 + console.log("页面尺寸变化")
  99 + }
  100 + }
  101 + },
36 methods: { 102 methods: {
37 getnowDay(e) { 103 getnowDay(e) {
38 this.setData({ 104 this.setData({
39 nowDay: e.currentTarget.dataset.index 105 nowDay: e.currentTarget.dataset.index
40 }) 106 })
  107 + console.log(this.data.nowDay,'nowday')
  108 + let _this = this;
  109 + if(_this.data.nowDay==0){
  110 + method.getRequest("/myUser/period/" + '1', data => {
  111 + //let list=this
  112 + if (data.statusCode == 0) {
  113 + _this.setData({
  114 + list:data.data
  115 + })
  116 + }
  117 + console.log(_this.data.nowDay,'now')
  118 + console.log(_this.data.deliveryTimeList, 'list')
  119 + })
  120 + }else{
  121 + method.getRequest("/myUser/period/" + '2', data => {
  122 + //let list=this
  123 + if (data.statusCode == 0) {
  124 + _this.setData({
  125 + list:data.data
  126 + })
  127 + }
  128 + console.log(_this.data.nowDay,'now')
  129 + console.log(_this.data.deliveryTimeList, 'list')
  130 + })
  131 + }
41 }, 132 },
42 clickTime(e) { 133 clickTime(e) {
43 let selfData = this.data.selfData[this.data.nowDay] 134 let selfData = this.data.selfData[this.data.nowDay]
44 - let index = e.currentTarget.dataset.index  
45 - let selectTime = this.data.deliveryTimeList[this.data.nowDay].timeList[index]  
46 - let deliveryTime = selfData.year + '-' + selfData.month + '-' + selfData.day + ' ' + selectTime 135 + let id= e.currentTarget.dataset.id;
  136 + let index= e.currentTarget.dataset.index;
  137 + let _this = this;
  138 + // let selectTime = this.data.deliveryTimeList[this.data.nowDay].timeList[index]
  139 + let deliveryTime = selfData.year + '-' + selfData.month + '-' + selfData.day + ' '
47 let nowDay = this.data.nowDay 140 let nowDay = this.data.nowDay
48 this.setData({ 141 this.setData({
49 selectTimeIndex: index, 142 selectTimeIndex: index,
50 - selectTime: selectTime, 143 + // selectTime: selectTime,
51 deliveryTime: deliveryTime, 144 deliveryTime: deliveryTime,
52 selectDay: nowDay 145 selectDay: nowDay
53 }) 146 })
54 - this.triggerEvent('selectTime', {  
55 - deliveryTime: this.data.deliveryTime 147 + // this.triggerEvent('selectTime', {
  148 + // deliveryTime: this.data.deliveryTime
  149 + // })
  150 + this.data.list.map((item,index)=>{
  151 + if(item.id === id){
  152 + let times = item.start + '-' + item.end
  153 + _this.triggerEvent('selectTime',{time : times,flag : false,timeId:item.id,deliveryTime:this.data. deliveryTime})
  154 + //_this.triggerEvent('showTime',false)
  155 + wx.setStorageSync('selecClick',true)
  156 + }
56 }) 157 })
57 }, 158 },
58 //计算配送时间 159 //计算配送时间
59 getDliveryTime() { 160 getDliveryTime() {
  161 + let that = this;
60 let deliveryTimeList = []; 162 let deliveryTimeList = [];
61 let date = new Date(); 163 let date = new Date();
62 - this.setData({  
63 - selfData: utils.getDates(5)  
64 - // selfData: utils.getDates(5)  
65 - }) 164 + this.setData({
  165 + selfData: utils.getDates(5)
  166 + })
66 //获取时间段 167 //获取时间段
67 let timeDate = new Date(date.getTime()); 168 let timeDate = new Date(date.getTime());
68 let todayList = getTimeList(timeDate.getHours(), 1); 169 let todayList = getTimeList(timeDate.getHours(), 1);
@@ -86,30 +187,40 @@ Component({ @@ -86,30 +187,40 @@ Component({
86 }) 187 })
87 // today 1 是今天 0 不是今天 188 // today 1 是今天 0 不是今天
88 function getTimeList(hour, today) { 189 function getTimeList(hour, today) {
  190 +
89 let timeList = []; 191 let timeList = [];
90 - let startTime = hour <= 9 ? 9 : hour;  
91 - for (let i = 0; i < 8; i++) {  
92 - if (((hour <= 9) && (startTime + 2 * i >21)) || ((hour > 9) && (startTime + 2 * i >= 21))) {  
93 - break;  
94 - } else {  
95 - if (hour <= 9) {  
96 - timeList.push(  
97 - startTime + 2 * i + ":00" + "-" + (startTime + 2 * (i + 1)) + ":00"  
98 - );  
99 - } else {  
100 - if (startTime % 2 === 0) {  
101 - timeList.push(  
102 - startTime + 2 * i + 1 + ":00" + "-" + (startTime + 2 * i + 3) + ":00"  
103 - );  
104 - } else {  
105 - console.log(i,'i')  
106 - timeList.push(  
107 - startTime + 2 * i +2 + ":00" + "-" + (startTime + 2 * i + 4) + ":00"  
108 - );  
109 - }  
110 - } 192 + // let startTime = hour <= 9 ? 9 : hour;
  193 + // for (let i = 0; i < 8; i++) {
  194 + // if (((hour <= 9) && (startTime + 2 * i >21)) || ((hour > 9) && (startTime + 2 * i >= 21))) {
  195 + // break;
  196 + // } else {
  197 + // if (hour <= 9) {
  198 + // timeList.push(
  199 + // startTime + 2 * i + ":00" + "-" + (startTime + 2 * (i + 1)) + ":00"
  200 + // );
  201 + // } else {
  202 + // if (startTime % 2 === 0) {
  203 + // timeList.push(
  204 + // startTime + 2 * i + 1 + ":00" + "-" + (startTime + 2 * i + 3) + ":00"
  205 + // );
  206 + // } else {
  207 + // console.log(i,'i')
  208 + // timeList.push(
  209 + // startTime + 2 * i +2 + ":00" + "-" + (startTime + 2 * i + 4) + ":00"
  210 + // );
  211 + // }
  212 + // }
  213 + // }
  214 + // }
  215 + method.getRequest("/myUser/period/" + '1', data => {
  216 + if (data.statusCode == 0) {
  217 + that.setData({
  218 + deliveryTimeList: data.data
  219 + })
  220 + timeList = data.data
111 } 221 }
112 - } 222 + console.log(timeList, 'list')
  223 + })
113 return timeList; 224 return timeList;
114 } 225 }
115 } 226 }
@@ -6,16 +6,29 @@ @@ -6,16 +6,29 @@
6 <view class="day" wx:for="{{selfData}}" wx:key="index" class='{{nowDay===index?"day active":"day"}}' 6 <view class="day" wx:for="{{selfData}}" wx:key="index" class='{{nowDay===index?"day active":"day"}}'
7 bindtap="getnowDay" data-index='{{index}}'>{{item.month}}月{{item.day}}号【{{item.week}}】</view> 7 bindtap="getnowDay" data-index='{{index}}'>{{item.month}}月{{item.day}}号【{{item.week}}】</view>
8 </view> 8 </view>
9 - <view class="select-time"> 9 + <view class="select-time" wx:if='{{list.length!==0}}'>
  10 + <view wx:for="{{list}}"
  11 + class='{{ nowDay===selectDay&&index===selectTimeIndex?"select-time-item select":"select-time-item"}}'
  12 + data-id="{{item.id}}" bindtap="clickTime" data-index='{{index}}'>
  13 + {{item.start}}-{{item.end}}
  14 + </view>
  15 + </view>
  16 + <view wx:else class="time-title">对不起,今日暂无自提时间
  17 + </view>
  18 + <!-- <view class="select-time">
10 <view wx:if="{{nowDay===0}}"> 19 <view wx:if="{{nowDay===0}}">
11 - <view wx:if='{{deliveryTimeList[nowDay].timeList.length>0}}'>  
12 - <view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}' 20 + <view wx:if='{{deliveryTimeList.length>0}}'> -->
  21 + <!-- <view wx:if='{{timeLists.length}}'> -->
  22 + <!-- <view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}'
  23 + wx:for="timeLists" bindtap="clickTime" wx:key="index" data-index='{{index}}'>
  24 + {{item.start}}
  25 + </view> -->
  26 + <!-- <view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}'
13 wx:for="{{deliveryTimeList[nowDay].timeList}}" bindtap="clickTime" wx:key="index" data-index='{{index}}'> 27 wx:for="{{deliveryTimeList[nowDay].timeList}}" bindtap="clickTime" wx:key="index" data-index='{{index}}'>
14 {{item}} 28 {{item}}
15 - </view>  
16 - </view>  
17 - <view wx:else class="time-title">对不起,今日暂无自提时间  
18 - </view> 29 + </view> -->
  30 + <!-- </view>
  31 +
19 </view> 32 </view>
20 <view wx:if="{{nowDay!==0}}"> 33 <view wx:if="{{nowDay!==0}}">
21 <view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}' 34 <view class='{{index===selectTimeIndex&&nowDay===selectDay?"select-time-item select":"select-time-item"}}'
@@ -23,6 +36,6 @@ @@ -23,6 +36,6 @@
23 {{item}} 36 {{item}}
24 </view> 37 </view>
25 </view> 38 </view>
26 - </view> 39 + </view> -->
27 <!-- </view> --> 40 <!-- </view> -->
28 </view> 41 </view>
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
17 float: left; 17 float: left;
18 width: 300rpx; 18 width: 300rpx;
19 height: 392rpx; 19 height: 392rpx;
  20 + background: rgba(239, 239, 239, 1);
20 } 21 }
21 22
22 .day { 23 .day {
@@ -26,10 +27,12 @@ @@ -26,10 +27,12 @@
26 justify-content: center; 27 justify-content: center;
27 align-items: center; 28 align-items: center;
28 background: rgba(239, 239, 239, 1); 29 background: rgba(239, 239, 239, 1);
  30 + /* background-color: #fff; */
29 } 31 }
30 32
31 .day.active { 33 .day.active {
32 - background-color: #fff; 34 + /* background: rgba(239, 239, 239, 1); */
  35 + background: #fff;
33 } 36 }
34 37
35 .select-time { 38 .select-time {
@@ -38,14 +38,21 @@ Page({ @@ -38,14 +38,21 @@ Page({
38 resposeData: '', 38 resposeData: '',
39 discountText: '', 39 discountText: '',
40 payment: '', 40 payment: '',
41 - storePickupTime:'' 41 + // storePickupTime:''
  42 + deliveryTime: '', //配送时间年月
  43 + timers: '', // 配送时间
  44 + timerId: ''
42 }, 45 },
43 //选择时间 46 //选择时间
44 selectTime(e) { 47 selectTime(e) {
45 - if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) { 48 + console.log(e, 'e')
  49 + if (e.detail.time && e.detail.time !== this.data.timers) {
46 this.setData({ 50 this.setData({
47 - storePickupTime: e.detail.deliveryTime,  
48 - showTime: false 51 + timers: e.detail.time,
  52 + // showTime: e.detail.flag,
  53 + deliveryTime:e.detail.deliveryTime,
  54 + showTime: false,
  55 + timerId: e.detail.timerId
49 }) 56 })
50 } 57 }
51 }, 58 },
@@ -216,7 +223,7 @@ Page({ @@ -216,7 +223,7 @@ Page({
216 let postData = { 223 let postData = {
217 addressId: this.data.userData.id, 224 addressId: this.data.userData.id,
218 couponId: this.data.couponId, 225 couponId: this.data.couponId,
219 - deliveryTime: this.data.storePickupTime, 226 + deliveryTime: this.data.storePickupTime+this.data.timers,
220 note: this.data.leavaWord, 227 note: this.data.leavaWord,
221 num: this.data.count, 228 num: this.data.count,
222 skuId: this.data.skuId 229 skuId: this.data.skuId
@@ -287,7 +294,7 @@ Page({ @@ -287,7 +294,7 @@ Page({
287 title: '请选择收货地址', 294 title: '请选择收货地址',
288 icon: "none" 295 icon: "none"
289 }) 296 })
290 - } else if (this.data.storePickupTime == "") { 297 + } else if (this.data.timers == "") {
291 wx.showToast({ 298 wx.showToast({
292 title: '请选择配送时间', 299 title: '请选择配送时间',
293 icon: "none" 300 icon: "none"
@@ -322,7 +329,7 @@ Page({ @@ -322,7 +329,7 @@ Page({
322 329
323 }, 330 },
324 onLoad: function (options) { 331 onLoad: function (options) {
325 - console.log(this.data.type==''?'true':'fasle','types') 332 + console.log(this.data.type == '' ? 'true' : 'fasle', 'types')
326 this.setData({ 333 this.setData({
327 addressId: options.id 334 addressId: options.id
328 }) 335 })
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <view class="calendar1 " wx:if="{{storePickupTime!==''}}"> 26 <view class="calendar1 " wx:if="{{storePickupTime!==''}}">
27 配送时间: 27 配送时间:
28 </view> 28 </view>
29 - <view class="selectText">{{storePickupTime}}</view> 29 + <view class="selectText">{{timers.length ? timers : ''}}</view>
30 </view> 30 </view>
31 <view class="arrow" bindtap='chooseTime'> 31 <view class="arrow" bindtap='chooseTime'>
32 <image src="/images/04-01/arrow.png"></image> 32 <image src="/images/04-01/arrow.png"></image>
@@ -32,7 +32,9 @@ @@ -32,7 +32,9 @@
32 <view class="name">{{item.listGoodsVoList[0].goodsName}}</view> 32 <view class="name">{{item.listGoodsVoList[0].goodsName}}</view>
33 <view class="describe">{{item.listGoodsVoList[0].goodsAttributes}}</view> 33 <view class="describe">{{item.listGoodsVoList[0].goodsAttributes}}</view>
34 <view class="price"> 34 <view class="price">
35 - <view wx:if="{{item.type==2}}"> ¥{{item.listGoodsVoList[0].goodsPrice}}</view> 35 + <view wx:if="{{item.type==2}}">
  36 + <text class="moneyIcon">¥</text>
  37 + <text class="moneyNum">{{item.listGoodsVoList[0].goodsPrice}}</text></view>
36 <view wx:if="{{item.type==1}}"> 积分{{item.listGoodsVoList[0].goodsPrice}}</view> 38 <view wx:if="{{item.type==1}}"> 积分{{item.listGoodsVoList[0].goodsPrice}}</view>
37 <view class="amount">x{{item.listGoodsVoList[0].goodsQuantity}}</view> 39 <view class="amount">x{{item.listGoodsVoList[0].goodsQuantity}}</view>
38 </view> 40 </view>
@@ -41,8 +43,12 @@ @@ -41,8 +43,12 @@
41 <!-- 合计 --> 43 <!-- 合计 -->
42 <view class="totalMoneyBox"> 44 <view class="totalMoneyBox">
43 合计: 45 合计:
44 - <view class="totalMoney">¥{{item.payAmount}}</view>  
45 - <view>(含运费¥{{item.freightAmount}})</view> 46 + <view class="totalMoney">
  47 + <text class="moneyIcon2">¥</text>
  48 + <text class="moneyNum2">{{item.payAmount}}</text>
  49 + </view>
  50 + <view>(含运费<text class="moneyIcon2">¥</text>
  51 + <text class="moneyNum2">{{item.freightAmount}}</text>)</view>
46 </view> 52 </view>
47 <!-- 按钮 --> 53 <!-- 按钮 -->
48 <view wx:if="{{item.status!==4}}"> 54 <view wx:if="{{item.status!==4}}">
@@ -71,8 +77,8 @@ @@ -71,8 +77,8 @@
71 </view> 77 </view>
72 </view> 78 </view>
73 <view class="bottomHint" wx:if="{{bottomHint}}"> 79 <view class="bottomHint" wx:if="{{bottomHint}}">
74 - 我是有底线的~  
75 -</view> 80 + 我是有底线的~
  81 + </view>
76 <view class="noData" wx:if="{{tabList.length==0}}"> 82 <view class="noData" wx:if="{{tabList.length==0}}">
77 <view class="noDataPic"> 83 <view class="noDataPic">
78 <image src="/images/message@2x.png"></image> 84 <image src="/images/message@2x.png"></image>
@@ -111,7 +111,26 @@ page{ @@ -111,7 +111,26 @@ page{
111 justify-content: space-between; 111 justify-content: space-between;
112 align-items: flex-end; 112 align-items: flex-end;
113 } 113 }
114 - 114 +.moneyIcon{
  115 + font-size: 36rpx;
  116 + color: #FF1717;
  117 + margin-right: -10rpx;
  118 +}
  119 +.moneyNum{
  120 + font-size: 36rpx;
  121 + font-weight: 500;
  122 + color: #FF1717;
  123 +}
  124 +.moneyIcon2{
  125 + font-size:28rpx;
  126 + color: #332333;
  127 + margin-right: -4rpx;
  128 +}
  129 +.moneyNum2{
  130 + font-size: 28rpx;
  131 + font-weight: 500;
  132 + color: #323233;
  133 +}
115 .amount { 134 .amount {
116 font-size: 28rpx; 135 font-size: 28rpx;
117 font-weight: 400; 136 font-weight: 400;
@@ -9,8 +9,11 @@ Page({ @@ -9,8 +9,11 @@ Page({
9 cartList: [], //商品列表 9 cartList: [], //商品列表
10 goodsData: '', 10 goodsData: '',
11 goodsList: '', 11 goodsList: '',
12 - showTime: false , //配送时间  
13 - storePickupTime: '', 12 + showTime: false, //配送时间弹框
  13 + // storePickupTime: '',
  14 + deliveryTime: '', //配送时间年月
  15 + timers: '', // 配送时间
  16 + timerId: '',
14 show: false, 17 show: false,
15 currentDate: '12:00', 18 currentDate: '12:00',
16 currentDateTwo: '13:00', 19 currentDateTwo: '13:00',
@@ -31,7 +34,7 @@ Page({ @@ -31,7 +34,7 @@ Page({
31 cartsId: [], //列表商品id 34 cartsId: [], //列表商品id
32 couponId: '', //优惠券id 35 couponId: '', //优惠券id
33 payment: '', 36 payment: '',
34 - amount:'' //优惠券金额 37 + amount: '' //优惠券金额
35 }, 38 },
36 //商品 39 //商品
37 getList() { 40 getList() {
@@ -74,44 +77,47 @@ Page({ @@ -74,44 +77,47 @@ Page({
74 }) 77 })
75 }, 78 },
76 //选择时间 79 //选择时间
77 - //配送时间  
78 - selectTime(e) {  
79 - if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) { 80 + //配送时间
  81 + selectTime(e) {
  82 + if (e.detail.time && e.detail.time !== this.data.timers) {
  83 + this.setData({
  84 + timers: e.detail.time,
  85 + // showTime: e.detail.flag,
  86 + deliveryTime:e.detail.deliveryTime,
  87 + showTime: false,
  88 + timerId: e.detail.timerId
  89 + })
  90 + }
  91 + },
  92 + onClose() {
80 this.setData({ 93 this.setData({
81 - storePickupTime: e.detail.deliveryTime,  
82 showTime: false 94 showTime: false
  95 + });
  96 + },
  97 + onReady() {
  98 + this.timepicker = this.selectComponent('#aaa')
  99 + },
  100 + chooseTime() {
  101 + this.setData({
  102 + showTime: true
83 }) 103 })
84 - }  
85 -},  
86 -onClose() {  
87 - this.setData({  
88 - showTime: false  
89 - });  
90 -},  
91 -onReady() {  
92 - this.timepicker = this.selectComponent('#aaa')  
93 -},  
94 -chooseTime() {  
95 - this.setData({  
96 - showTime: true  
97 - })  
98 - // this.timepicker.getDliveryTime();  
99 -},  
100 -onClickButton() {  
101 - this.setData({  
102 - showModal: true  
103 - })  
104 -},  
105 -getDayTime() {  
106 - var myDate = new Date();  
107 - var year = myDate.getFullYear();  
108 - var month = myDate.getMonth();  
109 - var day = myDate.getDate();  
110 - var dayNow = year + '-' + (month + 1) + "-" + day;  
111 - this.setData({  
112 - startTime: dayNow  
113 - })  
114 -}, 104 + // this.timepicker.getDliveryTime();
  105 + },
  106 + onClickButton() {
  107 + this.setData({
  108 + showModal: true
  109 + })
  110 + },
  111 + getDayTime() {
  112 + var myDate = new Date();
  113 + var year = myDate.getFullYear();
  114 + var month = myDate.getMonth();
  115 + var day = myDate.getDate();
  116 + var dayNow = year + '-' + (month + 1) + "-" + day;
  117 + this.setData({
  118 + startTime: dayNow
  119 + })
  120 + },
115 //点击减少 121 //点击减少
116 dec() { 122 dec() {
117 let that = this 123 let that = this
@@ -186,33 +192,46 @@ getDayTime() { @@ -186,33 +192,46 @@ getDayTime() {
186 buy() { 192 buy() {
187 //生成订单 193 //生成订单
188 this.getAddress(); 194 this.getAddress();
189 - setTimeout(() => {  
190 - let postData = {  
191 - addressId: this.data.addressId,  
192 - carts: this.data.cartsId,  
193 - couponId: this.data.couponId,  
194 - deliveryTime: this.data.storePickupTime,  
195 - note: this.data.leavaWord,  
196 - }  
197 - method.postRequest("/order/buyNow", postData, data => {  
198 - if (data.statusCode == 0) {  
199 - this.setData({  
200 - cartIds: data.data.id  
201 - })  
202 - // this.buys()  
203 - this.payment();  
204 - } else {  
205 - wx.showToast({  
206 - title: data.msg,  
207 - icon: 'none'  
208 - })  
209 - // setTimeout(() => {  
210 - // util.getUser()  
211 - // }, 2000)  
212 - } 195 + if(this.data.userData == undefined){
  196 + wx.showToast({
  197 + title: '请选择收货地址',
  198 + icon: "none"
213 }) 199 })
214 - }, 500)  
215 - 200 + }else if(this.data.timers == ""){
  201 + wx.showToast({
  202 + title: '请选择配送时间',
  203 + icon: "none"
  204 + })
  205 + }else{
  206 + setTimeout(() => {
  207 + let postData = {
  208 + addressId: this.data.addressId,
  209 + carts: this.data.cartsId,
  210 + couponId: this.data.couponId,
  211 + deliveryTime: this.data.deliveryTime+this.data.timers,
  212 + note: this.data.leavaWord,
  213 + }
  214 + method.postRequest("/order/buyNow", postData, data => {
  215 + if (data.statusCode == 0) {
  216 + this.setData({
  217 + cartIds: data.data.id
  218 + })
  219 + // this.buys()
  220 + this.payment();
  221 + } else {
  222 + wx.showToast({
  223 + title: data.msg,
  224 + icon: 'none'
  225 + })
  226 + // setTimeout(() => {
  227 + // util.getUser()
  228 + // }, 2000)
  229 + }
  230 + })
  231 + }, 500)
  232 +
  233 + }
  234 +
216 }, 235 },
217 //购物车-立即购买 236 //购物车-立即购买
218 buys() { 237 buys() {
@@ -299,7 +318,7 @@ getDayTime() { @@ -299,7 +318,7 @@ getDayTime() {
299 couponId: cardId, 318 couponId: cardId,
300 // date: date, 319 // date: date,
301 type: type, 320 type: type,
302 - amount:amount 321 + amount: amount
303 }) 322 })
304 that.getTotalPrice(); 323 that.getTotalPrice();
305 that.getAddress(); 324 that.getAddress();
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <!-- <image src="/images/04-01/rili.png"></image> --> 22 <!-- <image src="/images/04-01/rili.png"></image> -->
23 请选择配送时间: 23 请选择配送时间:
24 </view> 24 </view>
25 - {{storePickupTime}} 25 + {{timers.length ? timers : ''}}
26 </view> 26 </view>
27 <view class="arrow"> 27 <view class="arrow">
28 <image src="/images/04-01/arrow.png"></image> 28 <image src="/images/04-01/arrow.png"></image>
@@ -296,7 +296,6 @@ page { @@ -296,7 +296,6 @@ page {
296 font-weight: 400; 296 font-weight: 400;
297 text-align: left; 297 text-align: left;
298 color: #ff4444; 298 color: #ff4444;
299 - line-height: 48rpx;  
300 letter-spacing: 1rpx; 299 letter-spacing: 1rpx;
301 display: flex; 300 display: flex;
302 align-items: center; 301 align-items: center;
@@ -306,7 +305,7 @@ page { @@ -306,7 +305,7 @@ page {
306 font-size: 25rpx; 305 font-size: 25rpx;
307 margin-right: -6rpx; 306 margin-right: -6rpx;
308 display: flex; 307 display: flex;
309 - padding-top: 8rpx; 308 + padding-top: 4rpx;
310 } 309 }
311 310
312 .num .addIcon { 311 .num .addIcon {
@@ -361,7 +360,7 @@ page { @@ -361,7 +360,7 @@ page {
361 left: 0; 360 left: 0;
362 border-radius: 10rpx 10rpx 0 0; 361 border-radius: 10rpx 10rpx 0 0;
363 background: #fff; 362 background: #fff;
364 - padding: 30rpx 32rpx; 363 + padding: 56rpx 32rpx;
365 box-sizing: border-box; 364 box-sizing: border-box;
366 max-height: 94%; 365 max-height: 94%;
367 overflow-y: auto; 366 overflow-y: auto;
@@ -17,13 +17,14 @@ @@ -17,13 +17,14 @@
17 height: 246rpx; 17 height: 246rpx;
18 } 18 }
19 .picBox { 19 .picBox {
20 - width: 686rpx; 20 + width:95%;
21 height: 246rpx; 21 height: 246rpx;
22 margin: 0 auto; 22 margin: 0 auto;
23 margin-bottom: 24rpx; 23 margin-bottom: 24rpx;
24 display: flex; 24 display: flex;
25 background-color: #ffffff; 25 background-color: #ffffff;
26 position: relative; 26 position: relative;
  27 + border-radius: 16rpx;
27 } 28 }
28 29
29 .picBox .left { 30 .picBox .left {
@@ -34,6 +35,7 @@ @@ -34,6 +35,7 @@
34 padding-top: 48rpx; 35 padding-top: 48rpx;
35 padding-bottom: 48rpx; 36 padding-bottom: 48rpx;
36 box-sizing: border-box; 37 box-sizing: border-box;
  38 + border-radius: 16rpx;
37 } 39 }
38 40
39 .left>view { 41 .left>view {
@@ -73,7 +75,7 @@ margin-top: 24rpx; @@ -73,7 +75,7 @@ margin-top: 24rpx;
73 .topCircle{ 75 .topCircle{
74 position: absolute; 76 position: absolute;
75 top: -4px; 77 top: -4px;
76 - left: 96px; 78 + left: 28%;
77 width: 20rpx; 79 width: 20rpx;
78 height: 20rpx; 80 height: 20rpx;
79 background-color: #f1f2f4; 81 background-color: #f1f2f4;
@@ -82,7 +84,7 @@ margin-top: 24rpx; @@ -82,7 +84,7 @@ margin-top: 24rpx;
82 .bottomCircle{ 84 .bottomCircle{
83 position: absolute; 85 position: absolute;
84 bottom: -4px; 86 bottom: -4px;
85 - left: 96px; 87 + left: 28%;
86 width: 20rpx; 88 width: 20rpx;
87 height: 20rpx; 89 height: 20rpx;
88 background-color: #f1f2f4; 90 background-color: #f1f2f4;
@@ -58,7 +58,10 @@ @@ -58,7 +58,10 @@
58 <image src="{{item.goodsImg}}"></image> 58 <image src="{{item.goodsImg}}"></image>
59 </view> 59 </view>
60 <view class="countText">{{item.goodsName}}</view> 60 <view class="countText">{{item.goodsName}}</view>
61 - <view class="countPrice">¥{{item.goodsPrice}}</view> 61 + <view class="countPrice">
  62 + <text class="moneyIcon">¥</text>
  63 + <text class="moneyNum">{{item.goodsPrice}}</text>
  64 + </view>
62 <view class="countNum"> 65 <view class="countNum">
63 <view class="num">还剩{{item.goodsStock}}件</view> 66 <view class="num">还剩{{item.goodsStock}}件</view>
64 <view class="icon" bindtap="addCart" data-id="{{item.defaultSku}}" data-type="{{item.type}}"> 67 <view class="icon" bindtap="addCart" data-id="{{item.defaultSku}}" data-type="{{item.type}}">
@@ -102,8 +105,8 @@ @@ -102,8 +105,8 @@
102 <view class="mainlyTitle">{{nameData.label}}</view> 105 <view class="mainlyTitle">{{nameData.label}}</view>
103 </view> 106 </view>
104 <view style="position: relative;"> 107 <view style="position: relative;">
105 - <view bindtap="moreMainly" class="moreMainly">查看更多</view>  
106 - <view class="arrow" bindtap="moreMainly"></view> 108 + <view bindtap="moreMainly" class="moreMainly">查看更多</view>
  109 + <view class="arrow" bindtap="moreMainly"></view>
107 </view> 110 </view>
108 </view> 111 </view>
109 <view class="dayPricePicMain"> 112 <view class="dayPricePicMain">
@@ -129,7 +132,9 @@ @@ -129,7 +132,9 @@
129 <view class="userInfo"> 132 <view class="userInfo">
130 <view class="collectIcon"> 133 <view class="collectIcon">
131 <!-- <image src="{{item.collectIcon}}"></image> --> 134 <!-- <image src="{{item.collectIcon}}"></image> -->
132 - <view style="display:inline-block">¥{{item.goodsPrice}}</view> 135 + <view style="display:inline-block">
  136 + <text class="moneyIcon">¥</text>
  137 + <text class="moneyNum">{{item.goodsPrice}}</text></view>
133 </view> 138 </view>
134 </view> 139 </view>
135 </view> 140 </view>
@@ -166,6 +166,16 @@ page { @@ -166,6 +166,16 @@ page {
166 } 166 }
167 167
168 /* 限时优惠 */ 168 /* 限时优惠 */
  169 +.moneyIcon{
  170 + font-size: 23rpx;
  171 + color: #FF1717;
  172 + margin-right: -4rpx;
  173 +}
  174 +.moneyNum{
  175 + font-size: 28rpx;
  176 + font-weight: 500;
  177 + color: #FF1717;
  178 +}
169 .dayDiscount { 179 .dayDiscount {
170 width: 686rpx; 180 width: 686rpx;
171 height: 414rpx; 181 height: 414rpx;
1 { 1 {
2 "usingComponents": { 2 "usingComponents": {
3 "van-button": "@vant/weapp/button/index" 3 "van-button": "@vant/weapp/button/index"
4 - } 4 + },
  5 + "navigationBarTitleText": "登录"
5 } 6 }
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class="container"> 2 <view class="container">
3 <view class="top"> 3 <view class="top">
4 <view class="storeLogo"> 4 <view class="storeLogo">
5 - <image src=""></image> 5 + <image src="/images/logo.png"></image>
6 </view> 6 </view>
7 <view class="storeName"> 7 <view class="storeName">
8 掌上商城 8 掌上商城
@@ -2,14 +2,19 @@ @@ -2,14 +2,19 @@
2 page{ 2 page{
3 width: 100%; 3 width: 100%;
4 overflow-x: hidden; 4 overflow-x: hidden;
  5 + background-color: #fff !important;
5 } 6 }
6 .storeLogo { 7 .storeLogo {
7 width: 200rpx; 8 width: 200rpx;
8 height: 200rpx; 9 height: 200rpx;
9 border-radius: 34px; 10 border-radius: 34px;
10 - background: #719df0;  
11 margin: 0 auto; 11 margin: 0 auto;
12 } 12 }
  13 +.storeLogo image{
  14 + width: 200rpx;
  15 + height: 200rpx;
  16 + border-radius: 34px;
  17 +}
13 18
14 .storeName { 19 .storeName {
15 margin: 0 auto; 20 margin: 0 auto;
@@ -3,11 +3,14 @@ let method = require("../../utils/reuqest.js"); @@ -3,11 +3,14 @@ let method = require("../../utils/reuqest.js");
3 const util = require("../../utils/util.js"); 3 const util = require("../../utils/util.js");
4 Page({ 4 Page({
5 data: { 5 data: {
6 - showTime: false , //配送时间 6 + showTime: false, //配送时间
7 storePickupTime: '', 7 storePickupTime: '',
8 userData: "", 8 userData: "",
9 - data: '', //配送时间  
10 - startTime: '', 9 + deliveryTime: '', //配送时间年月
  10 + timers: '', // 配送时间
  11 + timerId: '',
  12 + // data: '', //配送时间
  13 + // startTime: '',
11 // endTime: '', 14 // endTime: '',
12 cartList: [], 15 cartList: [],
13 goodsData: '', 16 goodsData: '',
@@ -17,7 +20,7 @@ Page({ @@ -17,7 +20,7 @@ Page({
17 minHour: 1, 20 minHour: 1,
18 maxHour: 23, 21 maxHour: 23,
19 length: 0, 22 length: 0,
20 - maxlength:50, 23 + maxlength: 50,
21 leavaWord: '', 24 leavaWord: '',
22 discountText: '满3减1满3减1', 25 discountText: '满3减1满3减1',
23 allMoney: '4.00', 26 allMoney: '4.00',
@@ -31,10 +34,13 @@ Page({ @@ -31,10 +34,13 @@ Page({
31 }, 34 },
32 //选择时间 35 //选择时间
33 selectTime(e) { 36 selectTime(e) {
34 - if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) { 37 + if (e.detail.time && e.detail.time !== this.data.timers) {
35 this.setData({ 38 this.setData({
36 - storePickupTime: e.detail.deliveryTime,  
37 - showTime: false 39 + timers: e.detail.time,
  40 + // showTime: e.detail.flag,
  41 + deliveryTime: e.detail.deliveryTime,
  42 + showTime: false,
  43 + timerId: e.detail.timerId
38 }) 44 })
39 } 45 }
40 }, 46 },
@@ -72,7 +78,7 @@ Page({ @@ -72,7 +78,7 @@ Page({
72 let index = wx.getStorageSync('addIndex') 78 let index = wx.getStorageSync('addIndex')
73 method.getRequest("/address", data => { 79 method.getRequest("/address", data => {
74 if (data.statusCode == 0) { 80 if (data.statusCode == 0) {
75 - let list=data.data.reverse(); 81 + let list = data.data.reverse();
76 this.setData({ 82 this.setData({
77 userData: list[index], 83 userData: list[index],
78 }) 84 })
@@ -116,7 +122,7 @@ Page({ @@ -116,7 +122,7 @@ Page({
116 this.setData({ 122 this.setData({
117 goodsData: data.data 123 goodsData: data.data
118 }) 124 })
119 - console.log(this.data.goodsData,'goods') 125 + console.log(this.data.goodsData, 'goods')
120 } 126 }
121 }) 127 })
122 }, 128 },
@@ -174,34 +180,41 @@ Page({ @@ -174,34 +180,41 @@ Page({
174 }, 180 },
175 //商品-生成订单 181 //商品-生成订单
176 creatOrder() { 182 creatOrder() {
177 - if(this.data.userData==undefined){  
178 - wx.showToast({  
179 - title: '请选择收货地址',  
180 - icon:'none'  
181 - })  
182 - }  
183 - let postData = {  
184 - addressId: this.data.userData.id,  
185 - couponId: "",  
186 - deliveryTime: this.data.storePickupTime,  
187 - note: this.data.leavaWord,  
188 - num: 1,  
189 - skuId: this.data.skuId  
190 - }  
191 - method.postRequest("/order/generateOrder", postData, data => {  
192 - if (data.statusCode == 0) {  
193 - this.setData({  
194 - orderId: data.data.id  
195 - })  
196 - this.exchange()  
197 - } else {  
198 - wx.showToast({  
199 - title: data.msg,  
200 - icon: 'none'  
201 - })  
202 - return false 183 + if (this.data.userData == undefined) {
  184 + wx.showToast({
  185 + title: '请选择收货地址',
  186 + icon: 'none'
  187 + })
  188 + } else if (this.data.timers == "") {
  189 + wx.showToast({
  190 + title: '请选择配送时间',
  191 + icon: "none"
  192 + })
  193 + } else {
  194 + let postData = {
  195 + addressId: this.data.userData.id,
  196 + couponId: "",
  197 + deliveryTime: this.data.deliveryTime + this.data.timers,
  198 + note: this.data.leavaWord,
  199 + num: 1,
  200 + skuId: this.data.skuId
203 } 201 }
204 - }) 202 + method.postRequest("/order/generateOrder", postData, data => {
  203 + if (data.statusCode == 0) {
  204 + this.setData({
  205 + orderId: data.data.id
  206 + })
  207 + this.exchange()
  208 + } else {
  209 + wx.showToast({
  210 + title: data.msg,
  211 + icon: 'none'
  212 + })
  213 + return false
  214 + }
  215 + })
  216 + }
  217 +
205 }, 218 },
206 //立即兑换 219 //立即兑换
207 exchange() { 220 exchange() {
@@ -249,7 +262,7 @@ Page({ @@ -249,7 +262,7 @@ Page({
249 skuId: defaultSku 262 skuId: defaultSku
250 }) 263 })
251 this.getAddress() 264 this.getAddress()
252 - 265 +
253 }, 266 },
254 267
255 /** 268 /**
@@ -265,7 +278,7 @@ Page({ @@ -265,7 +278,7 @@ Page({
265 onShow: function () { 278 onShow: function () {
266 // this.getList(); 279 // this.getList();
267 this.getAddress(); 280 this.getAddress();
268 - this.getDayTime(); //配送时间 获取当天时间 281 + this.getDayTime(); //配送时间 获取当天时间
269 }, 282 },
270 283
271 /** 284 /**
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <view class="calendar1 " wx:if="{{storePickupTime!==''}}"> 26 <view class="calendar1 " wx:if="{{storePickupTime!==''}}">
27 配送时间: 27 配送时间:
28 </view> 28 </view>
29 - <view class="selectText">{{storePickupTime}}</view> 29 + <view class="selectText">{{timers.length ? timers : ''}}</view>
30 </view> 30 </view>
31 <view class="arrow" bindtap='chooseTime'> 31 <view class="arrow" bindtap='chooseTime'>
32 <image src="/images/04-01/arrow.png"></image> 32 <image src="/images/04-01/arrow.png"></image>
@@ -21,7 +21,9 @@ @@ -21,7 +21,9 @@
21 <view class="pickDesc">{{item.goodsAttributes}}</view> 21 <view class="pickDesc">{{item.goodsAttributes}}</view>
22 <view class="collectIcon"> 22 <view class="collectIcon">
23 <view style="height:10rpx;display:none"></view> 23 <view style="height:10rpx;display:none"></view>
24 - <view style="display:inline-block;font-size: 28rpx; padding: 10rpx 0;">¥{{item.goodsPrice}}</view> 24 + <view style="display:inline-block;font-size: 28rpx; padding: 10rpx 0;">
  25 + <text class="moneyIcon">¥</text>
  26 + <text class="moneyNum">{{item.goodsPrice}}</text></view>
25 </view> 27 </view>
26 </view> 28 </view>
27 </view> 29 </view>
@@ -105,6 +105,16 @@ page{ @@ -105,6 +105,16 @@ page{
105 box-sizing: border-box; 105 box-sizing: border-box;
106 } 106 }
107 /* 每日精选*/ 107 /* 每日精选*/
  108 +.moneyIcon{
  109 + font-size: 23rpx;
  110 + color: #FF1717;
  111 + margin-right: -4rpx;
  112 +}
  113 +.moneyNum{
  114 + font-size: 28rpx;
  115 + font-weight: 500;
  116 + color: #FF1717;
  117 +}
108 .pickContainer { 118 .pickContainer {
109 display: flex; 119 display: flex;
110 justify-content: space-between; 120 justify-content: space-between;
@@ -26,6 +26,7 @@ page{ @@ -26,6 +26,7 @@ page{
26 background: #fff; 26 background: #fff;
27 overflow: hidden; 27 overflow: hidden;
28 margin-bottom: 24rpx; 28 margin-bottom: 24rpx;
  29 + border-radius: 16rpx;
29 } 30 }
30 31
31 movable-area { 32 movable-area {
@@ -107,6 +108,7 @@ movable-view { @@ -107,6 +108,7 @@ movable-view {
107 .left image { 108 .left image {
108 width: 180rpx; 109 width: 180rpx;
109 height: 180rpx; 110 height: 180rpx;
  111 + border-radius: 16rpx;
110 } 112 }
111 113
112 .right { 114 .right {
@@ -81,6 +81,10 @@ Page({ @@ -81,6 +81,10 @@ Page({
81 */ 81 */
82 onShow: function () { 82 onShow: function () {
83 let cardLists = wx.getStorageSync('couponVos') 83 let cardLists = wx.getStorageSync('couponVos')
  84 + cardLists.map((item,index)=>{
  85 + item.startTime = item.startTime.slice(0,10).replace(/-/g,'.');
  86 + item.endTime = item.endTime.slice(0,10).replace(/-/g,'.');
  87 + })
84 this.setData({ 88 this.setData({
85 cardList: cardLists 89 cardList: cardLists
86 }) 90 })
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 </view> 9 </view>
10 <view class="right"> 10 <view class="right">
11 <view>{{item.name}}</view> 11 <view>{{item.name}}</view>
12 - <view class="time">{{startTime}}-{{endTime}}</view> 12 + <view class="time">{{item.startTime}}-{{item.endTime}}</view>
13 <view class="time">{{item.time}}</view> 13 <view class="time">{{item.time}}</view>
14 </view> 14 </view>
15 <view class="topCircle"></view> 15 <view class="topCircle"></view>
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 .picBox .left { 20 .picBox .left {
21 width: 200rpx; 21 width: 200rpx;
22 height: 244rpx; 22 height: 244rpx;
23 - background: linear-gradient(270deg, #fb7900 -100%, #ff4903); 23 + background: linear-gradient(270deg, #f09c4d -70%, #ff4903);
24 padding-top: 48rpx; 24 padding-top: 48rpx;
25 padding-bottom: 48rpx; 25 padding-bottom: 48rpx;
26 box-sizing: border-box; 26 box-sizing: border-box;
@@ -63,11 +63,11 @@ margin-top: 24rpx; @@ -63,11 +63,11 @@ margin-top: 24rpx;
63 .topCircle{ 63 .topCircle{
64 position: absolute; 64 position: absolute;
65 top: -4px; 65 top: -4px;
66 - left: 96px; 66 + left: 98px;
67 width: 20rpx; 67 width: 20rpx;
68 height: 20rpx; 68 height: 20rpx;
69 background-color: #f1f2f4; 69 background-color: #f1f2f4;
70 - border-radius: 50%; 70 + border-radius: 43%;
71 } 71 }
72 .bottomCircle{ 72 .bottomCircle{
73 position: absolute; 73 position: absolute;
@@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
2 <view class="topLine"> 2 <view class="topLine">
3 </view> 3 </view>
4 <!-- 领取会员卡 --> 4 <!-- 领取会员卡 -->
5 -<view class="getCard" wx:if="{{noVip}}" > 5 +<!-- <view class="getCard" wx:if="{{noVip}}" > -->
  6 +<view class="getCard" wx:if="{{true}}" >
6 <view class="title"> 7 <view class="title">
7 {{postData.title}} 8 {{postData.title}}
8 </view> 9 </view>
@@ -36,7 +37,8 @@ @@ -36,7 +37,8 @@
36 </view> 37 </view>
37 </view> 38 </view>
38 <!-- 会员卡详情 --> 39 <!-- 会员卡详情 -->
39 -<view class="cardDetail" wx:if="{{vip}}"> 40 +<view class="cardDetail" wx:if="{{false}}">
  41 +<!-- <view class="cardDetail" wx:if="{{vip}}"> -->
40 <image src="/images/card.png" ></image> 42 <image src="/images/card.png" ></image>
41 <!-- content --> 43 <!-- content -->
42 <view class="cardBox1"> 44 <view class="cardBox1">
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 .line { 30 .line {
31 width: 144rpx; 31 width: 144rpx;
32 height: 2rpx; 32 height: 2rpx;
33 - background: #f2f2f2; 33 + background: #c4c6ca;
34 } 34 }
35 35
36 /* card */ 36 /* card */
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 background-color: antiquewhite; 47 background-color: antiquewhite;
48 z-index: 99; 48 z-index: 99;
49 position: absolute; 49 position: absolute;
50 - top: 137px; 50 + top: 116px;
51 border-radius: 16rpx; 51 border-radius: 16rpx;
52 left: 70rpx; 52 left: 70rpx;
53 background: transparent; 53 background: transparent;
@@ -155,12 +155,12 @@ @@ -155,12 +155,12 @@
155 } 155 }
156 156
157 .cardBox { 157 .cardBox {
158 - position: absolute; 158 + /* position: absolute;
159 top: 230rpx; 159 top: 230rpx;
160 left: 70rpx; 160 left: 70rpx;
161 width: 612px; 161 width: 612px;
162 height: 310rpx; 162 height: 310rpx;
163 - background-color: #ffffff; 163 + background-color: #ffffff; */
164 } 164 }
165 .cardBox { 165 .cardBox {
166 position: absolute; 166 position: absolute;
@@ -168,7 +168,8 @@ @@ -168,7 +168,8 @@
168 left: 70rpx; 168 left: 70rpx;
169 width: 612rpx; 169 width: 612rpx;
170 /* height:816rpx; */ 170 /* height:816rpx; */
171 - background-color: #ffffff; 171 + /* background-color: #ffffff; */
  172 + border-radius: 16rpx;
172 } 173 }
173 .cardBox1 { 174 .cardBox1 {
174 position: absolute; 175 position: absolute;
@@ -205,10 +206,6 @@ @@ -205,10 +206,6 @@
205 } 206 }
206 207
207 .text { 208 .text {
208 - font-size: 36rpx;  
209 - font-weight: 500;  
210 - text-align: center;  
211 - color: #323233;  
212 margin-top: 20rpx; 209 margin-top: 20rpx;
213 } 210 }
214 211
@@ -36,6 +36,13 @@ Page({ @@ -36,6 +36,13 @@ Page({
36 } 36 }
37 }) 37 })
38 }, 38 },
  39 + //商品详情
  40 + goGoodsDetail(e){
  41 + let goodsid=e.currentTarget.dataset.id;
  42 + wx.navigateTo({
  43 + url: '/pages/product-detail/product-detail?id='+goodsid,
  44 + })
  45 + },
39 //再次购买 46 //再次购买
40 buyAgain(){ 47 buyAgain(){
41 console.log(this.data.goodsId,'goods') 48 console.log(this.data.goodsId,'goods')
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 </view> --> 24 </view> -->
25 <!-- 商品列表 --> 25 <!-- 商品列表 -->
26 <view class="cartList"> 26 <view class="cartList">
27 - <view class="cartListItem" wx:for="{{requestData.listGoodsVoList}}"> 27 + <view class="cartListItem" wx:for="{{requestData.listGoodsVoList}}" bindtap="goGoodsDetail" data-id="{{item.goodsId}}">
28 <view class="itemRight"> 28 <view class="itemRight">
29 <view class="productPic"> 29 <view class="productPic">
30 <image src="{{item.goodsPic}}"></image> 30 <image src="{{item.goodsPic}}"></image>
@@ -33,66 +33,69 @@ @@ -33,66 +33,69 @@
33 <view class="productName">{{item.goodsName}}</view> 33 <view class="productName">{{item.goodsName}}</view>
34 <view class="productDetail">{{item.goodsAttributes}}</view> 34 <view class="productDetail">{{item.goodsAttributes}}</view>
35 <view class="productPrice"> 35 <view class="productPrice">
36 - <view class="price">¥{{item.goodsPrice}}</view>  
37 - <view class="num">  
38 - x{{item.goodsQuantity}}  
39 - </view> 36 + <view class="price">
  37 + <text class="moneyIcon">¥</text>
  38 + <text class="moneyNum">{{item.goodsPrice}}</text>
  39 + </view>
  40 + <view class="num">
  41 + x{{item.goodsQuantity}}
40 </view> 42 </view>
41 </view> 43 </view>
42 </view> 44 </view>
43 </view> 45 </view>
44 </view> 46 </view>
45 - <!-- 买家留言 -->  
46 - <view wx:if="{{requestData.note!==''}}">  
47 - <view class="messageBox">  
48 - <view class="messageTitle">买家留言:</view>  
49 - <!-- <textarea name="" id="" cols="30" rows="10" value="{{content}}" placeholder="留言建议提前协商50字之内" maxlength="50" 47 +</view>
  48 +<!-- 买家留言 -->
  49 +<view wx:if="{{requestData.note!==''}}">
  50 + <view class="messageBox">
  51 + <view class="messageTitle">买家留言:</view>
  52 + <!-- <textarea name="" id="" cols="30" rows="10" value="{{content}}" placeholder="留言建议提前协商50字之内" maxlength="50"
50 bindinput="userInput"></textarea> --> 53 bindinput="userInput"></textarea> -->
51 - <view>{{requestData.note}}</view>  
52 - <view class="numLength">{{requestData.note.length}}/50</view>  
53 - </view> 54 + <view>{{requestData.note}}</view>
  55 + <view class="numLength">{{requestData.note.length}}/50</view>
54 </view> 56 </view>
55 - <!-- 优惠券 -->  
56 - <view class="discountCard">  
57 - <view>优惠券抵扣金额</view>  
58 - <view class="discountBox">  
59 - <view class="discountText">{{requestData.couponAmount}}</view>  
60 - <!-- <view class="arrowRight"> 57 +</view>
  58 +<!-- 优惠券 -->
  59 +<view class="discountCard">
  60 + <view>优惠券抵扣金额</view>
  61 + <view class="discountBox">
  62 + <view class="discountText">{{requestData.couponAmount}}</view>
  63 + <!-- <view class="arrowRight">
61 <image src="/images/04-01/arrow.png"></image> 64 <image src="/images/04-01/arrow.png"></image>
62 </view> --> 65 </view> -->
63 - </view>  
64 </view> 66 </view>
65 - <!-- 商品总额 -->  
66 - <view class="allMoney">  
67 - <view class="prodeuctMoney moneyPublic">  
68 - <view class="txt">商品总额</view>  
69 - <view class="money txt">¥{{requestData.payAmount}}</view>  
70 - </view>  
71 - <view class="carriage moneyPublic">  
72 - <view class="txt">配送费</view>  
73 - <view class="money txt">¥{{requestData.freightAmount}}</view>  
74 - </view> 67 +</view>
  68 +<!-- 商品总额 -->
  69 +<view class="allMoney">
  70 + <view class="prodeuctMoney moneyPublic">
  71 + <view class="txt">商品总额</view>
  72 + <view class="money txt">¥{{requestData.payAmount}}</view>
75 </view> 73 </view>
76 - <!-- 订单详情 -->  
77 - <view class="orderBox">  
78 - <view class="number orderPublic innerPublic">  
79 - <view class="title">订单编号 :</view>  
80 - <view class="content">{{requestData.id}}</view>  
81 - </view>  
82 - <view class="time orderPublic innerPublic">  
83 - <view class="title ">配送时间 :</view>  
84 - <view class="content">{{requestData.createTime}}</view>  
85 - </view>  
86 - <view class="mainMoney innerPublic">  
87 - <view class="title ">商品总额 :</view>  
88 - <view class="content">  
89 - <view class="icon">¥</view>  
90 - <view>{{requestData.payAmount}}</view>  
91 - </view>  
92 - </view> 74 + <view class="carriage moneyPublic">
  75 + <view class="txt">配送费</view>
  76 + <view class="money txt">¥{{requestData.freightAmount}}</view>
93 </view> 77 </view>
94 - <!-- 再次购买 -->  
95 - <view class="bottomBox">  
96 - <view bindtap="buyAgain">再次购买</view> 78 +</view>
  79 +<!-- 订单详情 -->
  80 +<view class="orderBox">
  81 + <view class="number orderPublic innerPublic">
  82 + <view class="title">订单编号 :</view>
  83 + <view class="content">{{requestData.id}}</view>
  84 + </view>
  85 + <view class="time orderPublic innerPublic">
  86 + <view class="title ">配送时间 :</view>
  87 + <view class="content">{{requestData.createTime}}</view>
  88 + </view>
  89 + <view class="mainMoney innerPublic">
  90 + <view class="title ">商品总额 :</view>
  91 + <view class="content">
  92 + <view class="icon">¥</view>
  93 + <view>{{requestData.payAmount}}</view>
  94 + </view>
97 </view> 95 </view>
  96 +</view>
  97 +<!-- 再次购买 -->
  98 +<view class="bottomBox">
  99 + <view bindtap="buyAgain">再次购买</view>
  100 +</view>
98 </view> 101 </view>
@@ -164,6 +164,16 @@ page { @@ -164,6 +164,16 @@ page {
164 margin: 0 auto; 164 margin: 0 auto;
165 display: flex; 165 display: flex;
166 } 166 }
  167 +.moneyIcon{
  168 + font-size: 36rpx;
  169 + color: #FF1717;
  170 + margin-right: -4rpx;
  171 +}
  172 +.moneyNum{
  173 + font-size: 36rpx;
  174 + font-weight: 500;
  175 + color: #FF1717;
  176 +}
167 177
168 .itemRight { 178 .itemRight {
169 width: 686rpx; 179 width: 686rpx;
@@ -31,6 +31,7 @@ Page({ @@ -31,6 +31,7 @@ Page({
31 showMaskTwo: false, 31 showMaskTwo: false,
32 showMaskSku: false, 32 showMaskSku: false,
33 count: 1, 33 count: 1,
  34 + cartGoodNum: '', //购物车商品数量
34 payCount: 1, 35 payCount: 1,
35 stockNum: '', 36 stockNum: '',
36 richText: '', 37 richText: '',
@@ -39,7 +40,8 @@ Page({ @@ -39,7 +40,8 @@ Page({
39 ceshi: [], //商品规格 40 ceshi: [], //商品规格
40 idx: 0, //商品规格 41 idx: 0, //商品规格
41 jifenNum: '', //商品积分 42 jifenNum: '', //商品积分
42 - integral: '' 43 + integral: '',
  44 + bottomHint:false //触底提示
43 }, 45 },
44 //倒计时 46 //倒计时
45 onChange1(e) { 47 onChange1(e) {
@@ -144,7 +146,7 @@ Page({ @@ -144,7 +146,7 @@ Page({
144 } 146 }
145 }) 147 })
146 }, 148 },
147 - //查看全部 149 + //查看全部评价
148 openAll() { 150 openAll() {
149 // this.setData({ 151 // this.setData({
150 // flags: !this.data.flags, 152 // flags: !this.data.flags,
@@ -154,7 +156,7 @@ Page({ @@ -154,7 +156,7 @@ Page({
154 url: '/pages/all-evaluate/all-evaluate?goodsid=' + this.data.goodsId, 156 url: '/pages/all-evaluate/all-evaluate?goodsid=' + this.data.goodsId,
155 }) 157 })
156 }, 158 },
157 - //进入购物车 159 + //购物车
158 goCart() { 160 goCart() {
159 if (wx.getStorageSync('Authorization') == " ") { 161 if (wx.getStorageSync('Authorization') == " ") {
160 // setTimeout(() => { 162 // setTimeout(() => {
@@ -166,6 +168,18 @@ Page({ @@ -166,6 +168,18 @@ Page({
166 }) 168 })
167 } 169 }
168 }, 170 },
  171 + getCartNum() {
  172 + method.getRequest("/cart/countCart",data=>{
  173 + if(data.statusCode==0){
  174 + if(data.data!==0){
  175 + this.setData({
  176 + cartGoodNum:data.data
  177 + })
  178 + }
  179 +
  180 + }
  181 + })
  182 + },
169 // 收藏 183 // 收藏
170 collection() { 184 collection() {
171 if (this.data.Authorization) { 185 if (this.data.Authorization) {
@@ -296,6 +310,7 @@ Page({ @@ -296,6 +310,7 @@ Page({
296 icon: 'success', 310 icon: 'success',
297 duration: 1000 311 duration: 1000
298 }) 312 })
  313 + this.getCartNum()
299 } else if (wx.getStorageSync('Authorization')) { 314 } else if (wx.getStorageSync('Authorization')) {
300 315
301 wx.showToast({ 316 wx.showToast({
@@ -540,6 +555,7 @@ Page({ @@ -540,6 +555,7 @@ Page({
540 */ 555 */
541 onShow: function () { 556 onShow: function () {
542 this.countDown() //获取优惠剩余时间 557 this.countDown() //获取优惠剩余时间
  558 + this.getCartNum() //获取购物车商品总数量
543 setTimeout(() => { 559 setTimeout(() => {
544 this.demoDown(); 560 this.demoDown();
545 }, 200) 561 }, 200)
@@ -580,7 +596,14 @@ Page({ @@ -580,7 +596,14 @@ Page({
580 * 页面上拉触底事件的处理函数 596 * 页面上拉触底事件的处理函数
581 */ 597 */
582 onReachBottom: function () { 598 onReachBottom: function () {
583 - 599 + this.setData({
  600 + bottomHint:true
  601 + })
  602 + setTimeout(()=>{
  603 + this.setData({
  604 + bottomHint:false
  605 + })
  606 + },2000)
584 }, 607 },
585 608
586 /** 609 /**
@@ -28,7 +28,11 @@ @@ -28,7 +28,11 @@
28 {{goodsData.goodsName}} 28 {{goodsData.goodsName}}
29 </view> 29 </view>
30 <view class="productPrice"> 30 <view class="productPrice">
31 - <view class="price" wx:if="{{goodsData.type==2}}">¥{{goodsData.goodsPrice}}</view> 31 + <view class="price" wx:if="{{goodsData.type==2}}">
  32 + <text class="moneyIcon">¥</text>
  33 + <text class="moneyNum">{{goodsData.goodsPrice}}</text>
  34 + <text class="moneyIcon">.00</text>
  35 + </view>
32 <view class="jifen" wx:if="{{goodsData.type==1}}">积分{{goodsData.goodsPrice}}</view> 36 <view class="jifen" wx:if="{{goodsData.type==1}}">积分{{goodsData.goodsPrice}}</view>
33 <view class="share" data-id="{{goodsId}}"> 37 <view class="share" data-id="{{goodsId}}">
34 <view class="shareIcon"> 38 <view class="shareIcon">
@@ -89,6 +93,9 @@ @@ -89,6 +93,9 @@
89 <image src="{{item.img}}"></image> 93 <image src="{{item.img}}"></image>
90 </view> --> 94 </view> -->
91 </view> 95 </view>
  96 + <view class="bottomHint" wx:if="{{bottomHint}}">
  97 + 我是有底线的~
  98 + </view>
92 </view> 99 </view>
93 <!--底部 --> 100 <!--底部 -->
94 <!-- <view class="bottomMain"> 101 <!-- <view class="bottomMain">
@@ -107,7 +114,7 @@ @@ -107,7 +114,7 @@
107 <view>客服</view> 114 <view>客服</view>
108 </view> 115 </view>
109 <view class="bottom_left_item" catchtap="goCart"> 116 <view class="bottom_left_item" catchtap="goCart">
110 - <view class="count_cart">{{count}}</view> 117 + <view class="count_cart">{{cartGoodNum}}</view>
111 <image src="/images/01-03/cart.png"></image> 118 <image src="/images/01-03/cart.png"></image>
112 <view>购物车</view> 119 <view>购物车</view>
113 </view> 120 </view>
@@ -167,7 +167,26 @@ @@ -167,7 +167,26 @@
167 margin-right: 6rpx; 167 margin-right: 6rpx;
168 margin-left: 6rpx; 168 margin-left: 6rpx;
169 } */ 169 } */
170 - 170 +.bottomHint{
  171 + background-color: #f1f2f4;
  172 + font-size: 24rpx;
  173 + color: gray;
  174 + display: flex;
  175 + justify-content: center;
  176 + padding: 8rpx;
  177 +}
  178 +.moneyIcon{
  179 + font-size: 24rpx;
  180 + color: #FF1717;
  181 + margin-right: -6rpx;
  182 + font-weight: 600;
  183 +}
  184 +.moneyNum{
  185 + font-size: 36rpx;
  186 + font-weight: 500;
  187 + color: #FF1717;
  188 + font-weight: 600;
  189 +}
171 /* 请选择 */ 190 /* 请选择 */
172 .selectMain { 191 .selectMain {
173 width: 750rpx; 192 width: 750rpx;
@@ -739,7 +758,7 @@ button { @@ -739,7 +758,7 @@ button {
739 /* 购物车弹框 */ 758 /* 购物车弹框 */
740 .mask { 759 .mask {
741 position: fixed; 760 position: fixed;
742 - top: 72rpx; 761 + top:0;
743 left: 0; 762 left: 0;
744 width: 100%; 763 width: 100%;
745 height: 100%; 764 height: 100%;
@@ -750,7 +769,7 @@ button { @@ -750,7 +769,7 @@ button {
750 .diceng { 769 .diceng {
751 width: 100%; 770 width: 100%;
752 position: absolute; 771 position: absolute;
753 - bottom: 40rpx; 772 + bottom: 0;
754 left: 0; 773 left: 0;
755 border-radius: 10rpx 10rpx 0 0; 774 border-radius: 10rpx 10rpx 0 0;
756 background: #fff; 775 background: #fff;
@@ -758,7 +777,6 @@ button { @@ -758,7 +777,6 @@ button {
758 box-sizing: border-box; 777 box-sizing: border-box;
759 max-height: 94%; 778 max-height: 94%;
760 overflow-y: auto; 779 overflow-y: auto;
761 - margin-bottom: 22rpx;  
762 } 780 }
763 781
764 .info { 782 .info {
@@ -18,6 +18,7 @@ page{ @@ -18,6 +18,7 @@ page{
18 width: 750rpx; 18 width: 750rpx;
19 background-color: #f1f2f4; 19 background-color: #f1f2f4;
20 padding-top:26rpx; 20 padding-top:26rpx;
  21 + box-sizing: border-box;
21 } 22 }
22 23
23 .orderItem { 24 .orderItem {
@@ -174,8 +175,8 @@ page{ @@ -174,8 +175,8 @@ page{
174 } 175 }
175 .noData{ 176 .noData{
176 width: 100%; 177 width: 100%;
177 - height: 100%;  
178 - margin-top: 300rpx; 178 + position: absolute;
  179 + top: 25%;
179 } 180 }
180 .noDataPic{ 181 .noDataPic{
181 width: 200rpx; 182 width: 200rpx;
@@ -48,7 +48,8 @@ @@ -48,7 +48,8 @@
48 <view class="collect">{{item.goodsAttributes}}</view> 48 <view class="collect">{{item.goodsAttributes}}</view>
49 <view class="discount"> 49 <view class="discount">
50 <view class="discountPic"> 50 <view class="discountPic">
51 - ¥{{item.goodsPrice}} 51 + <text class="moneyIcon">¥</text>
  52 + <text class="moneyNum">{{item.goodsPrice}}</text>
52 </view> 53 </view>
53 </view> 54 </view>
54 </view> 55 </view>
@@ -146,6 +146,16 @@ @@ -146,6 +146,16 @@
146 } 146 }
147 147
148 /* 猜你喜欢 */ 148 /* 猜你喜欢 */
  149 +.moneyIcon{
  150 + font-size: 23rpx;
  151 + color: #FF1717;
  152 + margin-right: -4rpx;
  153 +}
  154 +.moneyNum{
  155 + font-size: 28rpx;
  156 + font-weight: 500;
  157 + color: #FF1717;
  158 +}
149 .middleLine { 159 .middleLine {
150 width: 750rpx; 160 width: 750rpx;
151 height: 16rpx; 161 height: 16rpx;
@@ -21,7 +21,10 @@ @@ -21,7 +21,10 @@
21 <view class="pickDesc">{{item.goodsAttributes}}</view> 21 <view class="pickDesc">{{item.goodsAttributes}}</view>
22 <view class="collectIcon"> 22 <view class="collectIcon">
23 <view style="height:10rpx;display:none"></view> 23 <view style="height:10rpx;display:none"></view>
24 - <view style="display:inline-block; font-size: 28rpx;padding: 10rpx 0;">¥{{item.goodsPrice}}</view> 24 + <view style="display:inline-block; font-size: 28rpx;padding: 10rpx 0;">
  25 + <text class="moneyIcon">¥</text>
  26 + <text class="moneyNum">{{item.goodsPrice}}</text>
  27 + </view>
25 </view> 28 </view>
26 </view> 29 </view>
27 </view> 30 </view>
@@ -4,92 +4,18 @@ @@ -4,92 +4,18 @@
4 page{ 4 page{
5 background-color: #f1f2f4; 5 background-color: #f1f2f4;
6 } 6 }
7 -.search_center {  
8 - height: 90rpx;  
9 - width: 750rpx;  
10 - margin-bottom: 24rpx;  
11 - position: fixed;  
12 - top: 2rpx;  
13 - left: 0;  
14 - background-color: #f1f2f4;  
15 -}  
16 -  
17 -.real_search_center {  
18 - margin: 0 auto;  
19 - margin-bottom: 24rpx;  
20 - width: 686rpx;  
21 - height: 64rpx;  
22 - background: rgba(255, 255, 255, 1);  
23 - border-radius: 186rpx;  
24 - position: relative;  
25 -}  
26 -  
27 -.icon-sousuo {  
28 - font-size: 32rpx;  
29 - position: absolute;  
30 - top: 50%;  
31 - transform: translateY(-50%);  
32 - left: 20rpx;  
33 -}  
34 7
35 -.real_search_center input {  
36 - width: 676rpx;  
37 - height: 100%;  
38 - margin: 0 auto;  
39 - border-radius: 46rpx;  
40 - font-size: 28rpx;  
41 - font-family: PingFang SC;  
42 - font-weight: 400;  
43 - line-height: 64rpx;  
44 - color: rgba(189, 196, 206, 1);  
45 - padding: 0 60rpx;  
46 - box-sizing: border-box;  
47 - padding-left: 20rpx;  
48 - box-sizing: border-box;  
49 - overflow: hidden;  
50 - text-overflow: ellipsis;  
51 - white-space: nowrap;  
52 - background: #ffffff;  
53 -}  
54 -.search_right {  
55 - width: 66rpx;  
56 - height: 64rpx;  
57 - border-radius: 20rpx;  
58 - text-align: center;  
59 - line-height: 64rpx;  
60 - color: #fff;  
61 - font-size: 28rpx;  
62 - font-family: PingFang SC;  
63 - font-weight: 400;  
64 - display: flex;  
65 - align-items: center;  
66 -}  
67 -.search_right image {  
68 - width: 36rpx;  
69 - height: 36rpx; 8 +/* 商品列表 */
  9 +.moneyIcon{
  10 + font-size: 23rpx;
  11 + color: #FF1717;
  12 + margin-right: -4rpx;
70 } 13 }
71 -.placeholder {  
72 - font-size: 28rpx;  
73 - font-family: PingFang SC;  
74 - font-weight: 400;  
75 - line-height: 64rpx;  
76 - color: rgba(189, 196, 206, 1);  
77 -}  
78 -.search_right {  
79 - width: 104rpx;  
80 - height: 48rpx;  
81 - border-radius: 20rpx;  
82 - text-align: center;  
83 - color: rgb(223, 219, 219); 14 +.moneyNum{
84 font-size: 28rpx; 15 font-size: 28rpx;
85 - font-weight: 400;  
86 - display: inline-block;  
87 - position: absolute;  
88 - top: 3rpx;  
89 - right: 8rpx;  
90 - cursor: progress; 16 + font-weight: 500;
  17 + color: #FF1717;
91 } 18 }
92 -/* 商品列表 */  
93 .productList{ 19 .productList{
94 width: 750rpx; 20 width: 750rpx;
95 height:750rpx; 21 height:750rpx;
@@ -6,7 +6,7 @@ page{ @@ -6,7 +6,7 @@ page{
6 width: 750rpx; 6 width: 750rpx;
7 7
8 border-top: 1rpx solid #f2f2f2; 8 border-top: 1rpx solid #f2f2f2;
9 - padding-bottom:120rpx; 9 + padding-bottom:140rpx;
10 } 10 }
11 11
12 .addressBox { 12 .addressBox {
@@ -14,6 +14,7 @@ page{ @@ -14,6 +14,7 @@ page{
14 justify-content: space-between; 14 justify-content: space-between;
15 background-color: #ffffff; 15 background-color: #ffffff;
16 align-items: center; 16 align-items: center;
  17 + margin-bottom: 20rpx;
17 } 18 }
18 19
19 .left { 20 .left {
@@ -178,15 +179,15 @@ page{ @@ -178,15 +179,15 @@ page{
178 /* 新增地址 */ 179 /* 新增地址 */
179 .bottom { 180 .bottom {
180 width: 750rpx; 181 width: 750rpx;
181 - height: 119rpx;  
182 position: fixed; 182 position: fixed;
183 bottom: 0; 183 bottom: 0;
184 - left: 0 184 + left: 0;
  185 + background-color: #fff;
  186 + padding: 28rpx 0;
185 } 187 }
186 188
187 .addAdress { 189 .addAdress {
188 margin: 0 auto; 190 margin: 0 auto;
189 - margin-top: 16rpx;  
190 width: 622rpx; 191 width: 622rpx;
191 height: 88rpx; 192 height: 88rpx;
192 background: linear-gradient(270deg, #fb7900 -100%, #ff4903); 193 background: linear-gradient(270deg, #fb7900 -100%, #ff4903);
@@ -5,7 +5,8 @@ Page({ @@ -5,7 +5,8 @@ Page({
5 data: { 5 data: {
6 Authorization: false, //判断用户是否登录 6 Authorization: false, //判断用户是否登录
7 showTime: false, //配送时间 7 showTime: false, //配送时间
8 - storePickupTime: '', 8 + // storePickupTime: '',
  9 + timers: '',
9 checkType: 1, 10 checkType: 1,
10 userData: "", 11 userData: "",
11 addHint: false, //判断有没有地址 12 addHint: false, //判断有没有地址
@@ -20,6 +21,7 @@ Page({ @@ -20,6 +21,7 @@ Page({
20 21
21 // 购物车 22 // 购物车
22 goodsId: '', //商品id 23 goodsId: '', //商品id
  24 + goodsNum: '', //商品数量
23 carts: [], // 购物车列表 25 carts: [], // 购物车列表
24 pitchCart: [], //选中商品 26 pitchCart: [], //选中商品
25 pitchList: [], //选中商品id 27 pitchList: [], //选中商品id
@@ -32,6 +34,7 @@ Page({ @@ -32,6 +34,7 @@ Page({
32 }, 34 },
33 title: '产品推荐', 35 title: '产品推荐',
34 bottomHint: false, //上拉提示 36 bottomHint: false, //上拉提示
  37 + flagClick: wx.getStorageSync('selecClick')
35 }, 38 },
36 //登录 39 //登录
37 login() { 40 login() {
@@ -68,10 +71,6 @@ Page({ @@ -68,10 +71,6 @@ Page({
68 }, 71 },
69 // 猜你喜欢 72 // 猜你喜欢
70 youLike() { 73 youLike() {
71 - // let postData = {  
72 - // currPage: 1,  
73 - // pageSize: 10  
74 - // }  
75 method.getRequest("/myUser/cartRecommend", data => { 74 method.getRequest("/myUser/cartRecommend", data => {
76 if (data.statusCode == 0) { 75 if (data.statusCode == 0) {
77 this.setData({ 76 this.setData({
@@ -133,10 +132,12 @@ Page({ @@ -133,10 +132,12 @@ Page({
133 }, 132 },
134 //配送时间 133 //配送时间
135 selectTime(e) { 134 selectTime(e) {
136 - if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) { 135 + console.log(e)
  136 + if (e.detail.time && e.detail.time !== this.data.timers) {
137 this.setData({ 137 this.setData({
138 - storePickupTime: e.detail.deliveryTime,  
139 - showTime: false 138 + timers: e.detail.time,
  139 + // showTime: e.detail.flag,
  140 + showTime: false,
140 }) 141 })
141 } 142 }
142 }, 143 },
@@ -200,10 +201,10 @@ Page({ @@ -200,10 +201,10 @@ Page({
200 if (res.confirm) { 201 if (res.confirm) {
201 const index = e.currentTarget.dataset.index; 202 const index = e.currentTarget.dataset.index;
202 const cartIds = e.currentTarget.dataset.cartid; 203 const cartIds = e.currentTarget.dataset.cartid;
203 - let carts = that.data.carts;  
204 - carts.splice(index, 1); 204 + let cartss = that.data.carts;
  205 + cartss.splice(index, 1);
205 that.setData({ 206 that.setData({
206 - carts: carts 207 + carts: cartss
207 }); 208 });
208 method.deleteRequest("/cart/" + cartIds, data => { 209 method.deleteRequest("/cart/" + cartIds, data => {
209 if (data.statusCode == 0) { 210 if (data.statusCode == 0) {
@@ -213,12 +214,12 @@ Page({ @@ -213,12 +214,12 @@ Page({
213 }) 214 })
214 } 215 }
215 }) 216 })
216 - if (!carts.length) {  
217 - this.setData({ 217 + if (!cartss.length) {
  218 + that.setData({
218 hasList: false 219 hasList: false
219 }); 220 });
220 } else { 221 } else {
221 - this.getTotalPrice(); 222 + that.getTotalPrice();
222 } 223 }
223 } else if (res.cancel) { 224 } else if (res.cancel) {
224 console.log('用户点击取消') 225 console.log('用户点击取消')
@@ -227,20 +228,20 @@ Page({ @@ -227,20 +228,20 @@ Page({
227 }) 228 })
228 }, 229 },
229 // 全选 230 // 全选
230 - selectAll(e) {  
231 - let selectAllStatus = this.data.selectAllStatus;  
232 - selectAllStatus = !selectAllStatus;  
233 - let carts = this.data.carts; 231 + // selectAll(e) {
  232 + // let selectAllStatus = this.data.selectAllStatus;
  233 + // selectAllStatus = !selectAllStatus;
  234 + // let carts = this.data.carts;
234 235
235 - for (let i = 0; i < carts.length; i++) {  
236 - carts[i].selected = selectAllStatus;  
237 - }  
238 - this.setData({  
239 - selectAllStatus: selectAllStatus,  
240 - carts: carts  
241 - });  
242 - this.getTotalPrice();  
243 - }, 236 + // for (let i = 0; i < carts.length; i++) {
  237 + // carts[i].selected = selectAllStatus;
  238 + // }
  239 + // this.setData({
  240 + // selectAllStatus: selectAllStatus,
  241 + // carts: carts
  242 + // });
  243 + // this.getTotalPrice();
  244 + // },
244 245
245 // 数量增加 246 // 数量增加
246 addCount(e) { 247 addCount(e) {
@@ -264,9 +265,7 @@ Page({ @@ -264,9 +265,7 @@ Page({
264 carts: carts 265 carts: carts
265 }); 266 });
266 method.postRequest("/cart/" + goodSkuId, {}, data => { 267 method.postRequest("/cart/" + goodSkuId, {}, data => {
267 - if (data.statusCode == 0) {  
268 -  
269 - } 268 + if (data.statusCode == 0) {}
270 }) 269 })
271 this.getTotalPrice(); 270 this.getTotalPrice();
272 this.getTotalNum(); 271 this.getTotalNum();
@@ -402,7 +401,7 @@ Page({ @@ -402,7 +401,7 @@ Page({
402 pitchCart: [], 401 pitchCart: [],
403 pitchList: [] 402 pitchList: []
404 }) 403 })
405 - 404 + console.log(this.data.flagClick)
406 setTimeout(() => { //判断购物车是否有商品 405 setTimeout(() => { //判断购物车是否有商品
407 if (this.data.carts.length == 0) { 406 if (this.data.carts.length == 0) {
408 this.setData({ 407 this.setData({
@@ -455,6 +454,7 @@ Page({ @@ -455,6 +454,7 @@ Page({
455 * 页面上拉触底事件的处理函数 454 * 页面上拉触底事件的处理函数
456 */ 455 */
457 onReachBottom: function () { 456 onReachBottom: function () {
  457 + console.log('触底')
458 this.setData({ 458 this.setData({
459 bottomHint: true 459 bottomHint: true
460 }) 460 })
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 </view> 18 </view>
19 </view> 19 </view>
20 <!-- 配送时间 --> 20 <!-- 配送时间 -->
21 - <view class="timeBox"> 21 + <view class="timeBox" >
22 <view style="display:flex"> 22 <view style="display:flex">
23 <view class="calendar " bindtap='chooseTime'> 23 <view class="calendar " bindtap='chooseTime'>
24 <view style="display: flex;align-items: center;"> 24 <view style="display: flex;align-items: center;">
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <view wx:if="{{storePickupTime==''}}"> 请选择配送时间</view> 27 <view wx:if="{{storePickupTime==''}}"> 请选择配送时间</view>
28 <view wx:if="{{storePickupTime!==''}}"> 配送时间</view> 28 <view wx:if="{{storePickupTime!==''}}"> 配送时间</view>
29 </view> 29 </view>
30 - {{storePickupTime}} 30 + {{timers.length ? timers : ''}}
31 </view> 31 </view>
32 <!-- <view class="arrow1" style="width:94%"> 32 <!-- <view class="arrow1" style="width:94%">
33 <image src="/images/04-01/arrow.png"></image> 33 <image src="/images/04-01/arrow.png"></image>
@@ -88,16 +88,16 @@ @@ -88,16 +88,16 @@
88 <view class="discount"> 88 <view class="discount">
89 <view class="discountTitle"></view> 89 <view class="discountTitle"></view>
90 <view class="discountPic"> 90 <view class="discountPic">
91 - ¥{{item.goodsPrice}} 91 + <text class="moneyIcon">¥</text>
  92 + <text class="moneyNum">{{item.goodsPrice}}</text>
92 </view> 93 </view>
93 </view> 94 </view>
94 </view> 95 </view>
95 </view> 96 </view>
96 -  
97 - <view class="bottomHint" wx:if="{{bottomHint}}"> 97 + </view>
  98 + <view class="bottomHint" wx:if="{{bottomHint}}">
98 我是有底线的~ 99 我是有底线的~
99 </view> 100 </view>
100 - </view>  
101 <!-- 立即购买 --> 101 <!-- 立即购买 -->
102 <view class="bottom"> 102 <view class="bottom">
103 <!-- <view class="checkPic"> 103 <!-- <view class="checkPic">
@@ -6,9 +6,9 @@ page { @@ -6,9 +6,9 @@ page {
6 .container { 6 .container {
7 background-color: #f1f2f4; 7 background-color: #f1f2f4;
8 width: 100%; 8 width: 100%;
9 - height: 100%;  
10 overflow-x: hidden; 9 overflow-x: hidden;
11 padding-top: 6rpx; 10 padding-top: 6rpx;
  11 + box-sizing: border-box;
12 padding-bottom: 120rpx; 12 padding-bottom: 120rpx;
13 } 13 }
14 14
@@ -272,6 +272,16 @@ page { @@ -272,6 +272,16 @@ page {
272 text-align: center; 272 text-align: center;
273 } 273 }
274 /* 猜你喜欢 */ 274 /* 猜你喜欢 */
  275 +.moneyIcon{
  276 + font-size: 24rpx;
  277 + color: #FF1717;
  278 + margin-right: -2rpx;
  279 +}
  280 +.moneyNum{
  281 + font-size: 28rpx;
  282 + font-weight: 500;
  283 + color: #FF1717;
  284 +}
275 .middleLine { 285 .middleLine {
276 width: 750rpx; 286 width: 750rpx;
277 height: 16rpx; 287 height: 16rpx;
@@ -353,7 +363,7 @@ page { @@ -353,7 +363,7 @@ page {
353 363
354 .collect { 364 .collect {
355 width: 100%; 365 width: 100%;
356 - font-size: 28rpx; 366 + font-size: 24rpx;
357 font-weight: 400; 367 font-weight: 400;
358 text-align: left; 368 text-align: left;
359 color: #7d7e80; 369 color: #7d7e80;
@@ -373,9 +383,10 @@ page { @@ -373,9 +383,10 @@ page {
373 } 383 }
374 384
375 .discountPic { 385 .discountPic {
376 - height: 48rpx; 386 + padding: 6rpx;
377 font-size: 28rpx; 387 font-size: 28rpx;
378 color: #f8633e; 388 color: #f8633e;
  389 + padding-bottom: 16rpx;
379 } 390 }
380 391
381 .discountPic image { 392 .discountPic image {
@@ -415,6 +426,7 @@ page { @@ -415,6 +426,7 @@ page {
415 left: 85rpx; 426 left: 85rpx;
416 width: 185rpx; 427 width: 185rpx;
417 height: 185rpx; 428 height: 185rpx;
  429 + border-radius: 16rpx;
418 } 430 }
419 431
420 .cart-list .cart-pro-name { 432 .cart-list .cart-pro-name {
1 const app = getApp() 1 const app = getApp()
  2 +let method = require("../../utils/reuqest.js")
2 // var numeral = require('numeral'); 3 // var numeral = require('numeral');
3 Page({ 4 Page({
4 5
@@ -6,24 +7,27 @@ Page({ @@ -6,24 +7,27 @@ Page({
6 * 页面的初始数据 7 * 页面的初始数据
7 */ 8 */
8 data: { 9 data: {
9 - showTime: false ,  
10 - storePickupTime: '' 10 + showTime: false,
  11 + storePickupTime: '',
  12 + timeLists: [],
  13 + timers : ''
11 }, 14 },
12 selectTime(e) { 15 selectTime(e) {
13 - if (e.detail.deliveryTime && e.detail.deliveryTime !== this.data.storePickupTime) {  
14 - this.setData({  
15 - storePickupTime: e.detail.deliveryTime,  
16 - showTime: false  
17 - })  
18 - } 16 + console.log(e,'e')
  17 + if(e.detail&& e.detail !== this.data.timers){
  18 + this.setData({
  19 + timers: e.detail,
  20 + showTime: false,
  21 + })
  22 + }
19 }, 23 },
20 onClose() { 24 onClose() {
21 this.setData({ 25 this.setData({
22 showTime: false 26 showTime: false
23 }); 27 });
24 }, 28 },
25 - onReady(){  
26 - this.timepicker=this.selectComponent('#aaa') 29 + onReady() {
  30 + this.timepicker = this.selectComponent('#aaa')
27 }, 31 },
28 chooseTime() { 32 chooseTime() {
29 this.setData({ 33 this.setData({
1 <!--pages/timedmo/timedmo.wxml--> 1 <!--pages/timedmo/timedmo.wxml-->
2 - <view bindtap='chooseTime'> 自提时间{{storePickupTime}}</view> 2 + <view bindtap='chooseTime'>自提时间{{timers.length ? timers : ''}}</view>
3 <van-popup show="{{ showTime }}" bind:close="onClose" position="bottom" style="display:{{showTime ? 'vilative' : 'none'}}"> 3 <van-popup show="{{ showTime }}" bind:close="onClose" position="bottom" style="display:{{showTime ? 'vilative' : 'none'}}">
4 - <timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa"></timepicker> 4 + <timepicker deliveryTime='{{deliveryTime}}' bind:selectTime="selectTime" id="aaa" bind:selectTimes="selectTime"></timepicker>
5 </van-popup> 5 </van-popup>
@@ -290,6 +290,13 @@ @@ -290,6 +290,13 @@
290 "id": -1, 290 "id": -1,
291 "name": "pages/demo1/demo1", 291 "name": "pages/demo1/demo1",
292 "pathName": "pages/demo1/demo1", 292 "pathName": "pages/demo1/demo1",
  293 + "query": "",
  294 + "scene": null
  295 + },
  296 + {
  297 + "id": -1,
  298 + "name": "pages/timedmo/timedmo",
  299 + "pathName": "pages/timedmo/timedmo",
293 "scene": null 300 "scene": null
294 } 301 }
295 ] 302 ]