Commit f4fff9b1c7d0f9ad960e4180f1f0907c82c4250a

Authored by yiren
1 parent 9a0ce286

提前点餐

@@ -102,7 +102,8 @@ @@ -102,7 +102,8 @@
102 "pages/remark", 102 "pages/remark",
103 "pages/index_new", 103 "pages/index_new",
104 "pages/cart_new", 104 "pages/cart_new",
105 - "pages/success_new" 105 + "pages/success_new",
  106 + "pages/favourableList"
106 ] 107 ]
107 }, 108 },
108 { 109 {
@@ -105,11 +105,15 @@ page { @@ -105,11 +105,15 @@ page {
105 .btns button { 105 .btns button {
106 width: 50%; 106 width: 50%;
107 box-sizing: border-box; 107 box-sizing: border-box;
108 - color: #fff; 108 + color: #BFC4D4;
109 height: 100%; 109 height: 100%;
110 border-radius: 0; 110 border-radius: 0;
111 } 111 }
112 112
  113 +.btns button:nth-of-type(1) {
  114 + color: #fff;
  115 +}
  116 +
113 .continue { 117 .continue {
114 background: #4d4e50; 118 background: #4d4e50;
115 border: 2rpx solid #094ba4; 119 border: 2rpx solid #094ba4;
  1 +// pack-cookbook/pages/favourableList.js
  2 +import util from '../../utils/util'
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + sellerName:'',
  10 + sellerid:'',
  11 + oid:'',
  12 + list:[]
  13 + },
  14 +
  15 + /**
  16 + * 生命周期函数--监听页面加载
  17 + */
  18 + onLoad(options) {
  19 + this.setData({
  20 + sellerName: options.sellerName,
  21 + sellerid: options.sellerid,
  22 + oid: options.oid,
  23 + })
  24 + },
  25 +
  26 + /**
  27 + * 生命周期函数--监听页面初次渲染完成
  28 + */
  29 + onReady() {
  30 + this.setData({
  31 + list:[
  32 + {id:'1',name:'充500赠100',info:'会员充值满500元赠余额100元。',stime:'2022年12月18日',etime:'2023年10月30日'},
  33 + {id:'2',name:'充500赠100',info:'会员充值满500元赠余额100元。',stime:'2022年12月18日',etime:'2023年10月30日'},
  34 + {id:'3',name:'充500赠100',info:'会员充值满500元赠余额100元。',stime:'2022年12月18日',etime:'2023年10月30日'},
  35 + {id:'4',name:'充500赠100',info:'会员充值满500元赠余额100元。',stime:'2022年12月18日',etime:'2023年10月30日'},
  36 + ]
  37 + })
  38 + },
  39 + gogoSingle(e){
  40 + const id= e.currentTarget.dataset['id'];
  41 + let url=util.http_build_query({sid:this.data.sellerid,name:this.data.sellerName,types:'1',oid:this.data.oid,id},'/pack-activity/pack/vipRecharge')
  42 + wx.navigateTo({
  43 + url
  44 + })
  45 + },
  46 + /**
  47 + * 生命周期函数--监听页面显示
  48 + */
  49 + onShow() {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 生命周期函数--监听页面隐藏
  55 + */
  56 + onHide() {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 生命周期函数--监听页面卸载
  62 + */
  63 + onUnload() {
  64 +
  65 + },
  66 +
  67 + /**
  68 + * 页面相关事件处理函数--监听用户下拉动作
  69 + */
  70 + onPullDownRefresh() {
  71 +
  72 + },
  73 +
  74 + /**
  75 + * 页面上拉触底事件的处理函数
  76 + */
  77 + onReachBottom() {
  78 +
  79 + },
  80 +
  81 + /**
  82 + * 用户点击右上角分享
  83 + */
  84 + onShareAppMessage() {
  85 +
  86 + }
  87 +})
  1 +{
  2 + "backgroundTextStyle": "light",
  3 + "navigationBarBackgroundColor": "#fff",
  4 + "navigationBarTextStyle": "white",
  5 + "usingComponents": {
  6 + "nav": "/components/nav/nav"
  7 + }
  8 +}
  1 +<!--pack-cookbook/pages/favourableList.wxml-->
  2 +<nav></nav>
  3 +<view class="box">
  4 + <view wx:for="{{list}}" class="single" bindtap="gogoSingle" data-id="{{item.id}}">
  5 + <view class="topBox">
  6 + <view class="name font32r">
  7 + {{item.name}}
  8 + </view>
  9 + <view class="texts info font24r">
  10 + {{item.info}}
  11 + {{item.info}}
  12 + {{item.info}}
  13 + </view>
  14 + </view>
  15 + <view class="texts time font24r">
  16 + 有效期限:{{item.etime}}至{{item.stime}}
  17 + </view>
  18 + </view>
  19 +</view>
  1 +/* pack-cookbook/pages/favourableList.wxss */
  2 +page{
  3 + background: #F3F3F3;
  4 +}
  5 +.box{
  6 + padding: 32rpx 40rpx;
  7 +}
  8 +.single{
  9 + width: 100%;
  10 + height: 240rpx;
  11 + border-radius: 16rpx;
  12 + background-color: #FFFFFF;
  13 + box-shadow: 0rpx 8rpx 8rpx #00000040;
  14 + margin-bottom: 32rpx;
  15 +}
  16 +.topBox{
  17 + width: 100%;
  18 + display: flex;
  19 + flex-direction: column;
  20 + justify-content: space-between;
  21 +}
  22 +.name{
  23 + background-color: #0143A3;
  24 + height: 37%;
  25 + line-height: 60rpx;
  26 + padding-left: 40rpx;
  27 + color: #ffffff;
  28 + font-family: PingFang SC;
  29 + font-weight: 500;
  30 + border-top-left-radius: 10rpx;
  31 + border-top-right-radius: 10rpx;
  32 +}
  33 +.texts{
  34 + padding-left: 40rpx;
  35 + color: #999999;
  36 + font-family: PingFang SC;
  37 + height: 62%;
  38 +}
  39 +.topBox{
  40 + height: 68%;
  41 + border-bottom: 2rpx dashed #bfc4d4;
  42 +}
  43 +.time{
  44 + height: 70rpx;
  45 + line-height: 70rpx;
  46 +}
@@ -285,7 +285,9 @@ Page({ @@ -285,7 +285,9 @@ Page({
285 } 285 }
286 cook.item_clear_num = item_clear_num; 286 cook.item_clear_num = item_clear_num;
287 cook.index = n; //分类下菜品的下标 287 cook.index = n; //分类下菜品的下标
288 - cook.norms = []; //做法规格 288 + if(cook.norms.length==0){
  289 + cook.norms = []; //做法规格
  290 + }
289 // let type;//模拟种类 1为一行显示1个 2为一行显示2个 291 // let type;//模拟种类 1为一行显示1个 2为一行显示2个
290 // if(n=='0' || n=='3'){ 292 // if(n=='0' || n=='3'){
291 // type='1' 293 // type='1'
@@ -331,12 +333,11 @@ Page({ @@ -331,12 +333,11 @@ Page({
331 // 获取所有分类下所有菜品列表 333 // 获取所有分类下所有菜品列表
332 getCookList(orderid) { 334 getCookList(orderid) {
333 let cookbooklist=wx.getStorageSync('cookbooklist'); 335 let cookbooklist=wx.getStorageSync('cookbooklist');
334 - console.log(cookbooklist,'cookbooklistcookbooklist');  
335 let cookbooklistStorage=cookbooklist?JSON.parse(cookbooklist):''; 336 let cookbooklistStorage=cookbooklist?JSON.parse(cookbooklist):'';
336 console.log('cookbooklist历史数据',cookbooklistStorage); 337 console.log('cookbooklist历史数据',cookbooklistStorage);
337 if(cookbooklistStorage.length>0){ 338 if(cookbooklistStorage.length>0){
338 this.setData({ 339 this.setData({
339 - cookbooklist:cookbooklistStorage, 340 + cookbooklist:this.formatCookList(cookbooklistStorage),
340 isloading: false, 341 isloading: false,
341 showSkeleton: false, 342 showSkeleton: false,
342 }) 343 })
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 </view> 39 </view>
40 <view class="norms">{{item.first_name}}</view> 40 <view class="norms">{{item.first_name}}</view>
41 </block> 41 </block>
42 - <image src="{{item.image}}" class="dishImg" mode="aspectFill" /> 42 + <image wx:if="{{item.image}}" src="{{item.image}}" class="dishImg" mode="aspectFill" />
43 <view class="greens"> 43 <view class="greens">
44 <view class="news">{{item.first_name}}</view> 44 <view class="news">{{item.first_name}}</view>
45 </view> 45 </view>
@@ -332,67 +332,6 @@ page { @@ -332,67 +332,6 @@ page {
332 width: 100rpx; 332 width: 100rpx;
333 height: 100rpx; 333 height: 100rpx;
334 } 334 }
335 -  
336 -  
337 -  
338 -  
339 -  
340 -  
341 -  
342 -  
343 -  
344 -/* .tui-fixed-x{  
345 - width: 100%;  
346 - position: fixed;  
347 - top: 0;  
348 - left: 0;  
349 - }  
350 - .tui-city-scroll{  
351 - height: 220rpx;  
352 - line-height: 80rpx;  
353 - width: 100%;  
354 - white-space: nowrap;  
355 - }  
356 - .tui-city-scroll text{  
357 - height: 120rpx;  
358 - line-height: 80rpx;  
359 - width: 100%;  
360 - white-space: nowrap;  
361 - }  
362 - .tui-nav-li{  
363 - font-size: 33rpx;  
364 - padding: 0 10rpx;  
365 - }  
366 - .tui-nav-li:first-child{padding-left: 16rpx;}  
367 - .tui-nav-li:last-child{padding-right: 16rpx;}  
368 - .tui-nav-active{  
369 - color: red;  
370 - border-bottom: 3rpx solid red;  
371 - }  
372 -  
373 - .tui-fixed-y{  
374 - width: 100%;  
375 - height: calc(100% - 80rpx);  
376 - position: fixed;  
377 - bottom: 0;  
378 - left: 0;  
379 - }  
380 - .tui-city-scroll-y{  
381 - padding: 0 20rpx;  
382 - height: 100%;  
383 - box-sizing: border-box;  
384 - }  
385 - .tui-list-head{  
386 - height: 50px;  
387 - line-height: 50px;  
388 - text-align: center;  
389 - font-size: 30rpx;  
390 - color: blue;  
391 - }  
392 - .tui-list-li{  
393 - height: 400px;  
394 - padding: 10rpx;  
395 - color: #fff;  
396 - font-size: 50rpx;  
397 - background-color: #2EB3FF;  
398 - } */  
  335 +.determine{
  336 + color: #E34D59;
  337 +}
@@ -75,10 +75,21 @@ Page({ @@ -75,10 +75,21 @@ Page({
75 }, 75 },
76 // 菜品更换 76 // 菜品更换
77 continueOrdering(){ 77 continueOrdering(){
78 - // wx.nextTick(()=>{  
79 - // })  
80 - // wx.navigateBack()  
81 - // console.log(getCurrentPages()); 78 + wx.reLaunch({
  79 + url: `/pack-cookbook/pages/index_new?rid=${this.data.rid}&sid=${this.data.sellerid}&oid=${this.data.oid}&sellerName=${this.data.sellerName}&identity=1`,
  80 + })
  81 + },
  82 + // 点击了解更多会员优惠政策
  83 + gotoFavourableList(){
  84 + let url=util.http_build_query({
  85 + sellerName:this.data.sellerName,
  86 + sellerid:this.data.sellerid,
  87 + oid:this.data.oid
  88 + },'/pack-cookbook/pages/favourableList')
  89 + console.log(url);
  90 + wx.navigateTo({
  91 + url
  92 + })
82 }, 93 },
83 getSellerTemplateConfFun(sid) { 94 getSellerTemplateConfFun(sid) {
84 console.log(sid, 'sidsidsidsid'); 95 console.log(sid, 'sidsidsidsid');
@@ -91,9 +91,11 @@ @@ -91,9 +91,11 @@
91 </navigator> 91 </navigator>
92 </view> 92 </view>
93 </view> 93 </view>
94 - <!-- <view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy">  
95 - 点击了解更多会员优惠政策  
96 - </view> --> 94 + <view class="favouredPolicy">
  95 + <view class="font24r policy" bindtap="gotoFavourableList">
  96 + 点击了解更多会员优惠政策
  97 + </view>
  98 + </view>
97 </view> 99 </view>
98 </scroll-view> 100 </scroll-view>
99 <view class="btns flex-cc"> 101 <view class="btns flex-cc">
@@ -212,8 +212,14 @@ page { @@ -212,8 +212,14 @@ page {
212 color: #E34D59; 212 color: #E34D59;
213 } 213 }
214 214
215 -.favouredPolicy {  
216 - width: 60%; 215 +.favouredPolicy{
  216 + display: flex;
  217 + justify-content: flex-end;
  218 + margin-right: 60rpx;
  219 +}
  220 +
  221 +.policy{
  222 + width: 50%;
217 color: #999999; 223 color: #999999;
218 font-family: PingFang SC; 224 font-family: PingFang SC;
219 font-weight: 500; 225 font-weight: 500;