Showing
10 changed files
with
185 additions
and
106 deletions
| 1 | // pack-cookbook/pages/favourableList.js | 1 | // pack-cookbook/pages/favourableList.js |
| 2 | import util from '../../utils/util' | 2 | import util from '../../utils/util' |
| 3 | +import App from '../../utils/api'; | ||
| 3 | Page({ | 4 | Page({ |
| 4 | 5 | ||
| 5 | /** | 6 | /** |
| 6 | * 页面的初始数据 | 7 | * 页面的初始数据 |
| 7 | */ | 8 | */ |
| 8 | data: { | 9 | data: { |
| 9 | - sellerName:'', | ||
| 10 | - sellerid:'', | ||
| 11 | - oid:'', | ||
| 12 | - list:[] | 10 | + sellerName: '', |
| 11 | + sellerid: '', | ||
| 12 | + oid: '', | ||
| 13 | + priceInfo: '', | ||
| 14 | + scoreInfo: '', | ||
| 15 | + certificate: '', | ||
| 16 | + list: [] | ||
| 13 | }, | 17 | }, |
| 14 | - | ||
| 15 | /** | 18 | /** |
| 16 | * 生命周期函数--监听页面加载 | 19 | * 生命周期函数--监听页面加载 |
| 17 | */ | 20 | */ |
| @@ -21,26 +24,44 @@ Page({ | @@ -21,26 +24,44 @@ Page({ | ||
| 21 | sellerid: options.sellerid, | 24 | sellerid: options.sellerid, |
| 22 | oid: options.oid, | 25 | oid: options.oid, |
| 23 | }) | 26 | }) |
| 27 | + this.getList() | ||
| 24 | }, | 28 | }, |
| 25 | - | ||
| 26 | /** | 29 | /** |
| 27 | * 生命周期函数--监听页面初次渲染完成 | 30 | * 生命周期函数--监听页面初次渲染完成 |
| 28 | */ | 31 | */ |
| 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 | - ] | 32 | + onReady() {}, |
| 33 | + getList() { | ||
| 34 | + App.Activity.GetNewRechargeList({ | ||
| 35 | + sellerid: this.data.sellerid, | ||
| 36 | + is_expire: '0' | ||
| 37 | + }).then(res => { | ||
| 38 | + let list = res.data; | ||
| 39 | + list.forEach(item => { | ||
| 40 | + item.recharge_lists = item.recharge_list ? JSON.parse(item.recharge_list) : ''; | ||
| 41 | + let recharge_lists = item.recharge_lists; | ||
| 42 | + item.priceInfo = ''; | ||
| 43 | + item.scoreInfo = ''; | ||
| 44 | + item.certificate = ''; | ||
| 45 | + if (recharge_lists.is_price == '1') item.priceInfo = '会员充值满' + item.recharge_money + '元赠送' + item.recharge_lists.price + '元余额'; | ||
| 46 | + if (recharge_lists.is_score == '1') item.scoreInfo = '会员充值满' + item.recharge_money + '元赠送' + item.recharge_lists.score + '积分'; | ||
| 47 | + if (recharge_lists.is_coupons == '1' && recharge_lists.coupons_names.length > 0) item.certificate = recharge_lists.coupons_names.join('、'); | ||
| 48 | + }) | ||
| 49 | + this.setData({ | ||
| 50 | + list | ||
| 51 | + }) | ||
| 37 | }) | 52 | }) |
| 38 | }, | 53 | }, |
| 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') | 54 | + gogoSingle(e) { |
| 55 | + const id = e.currentTarget.dataset['id']; | ||
| 56 | + let url = util.http_build_query({ | ||
| 57 | + sid: this.data.sellerid, | ||
| 58 | + name: this.data.sellerName, | ||
| 59 | + types: '1', | ||
| 60 | + oid: this.data.oid, | ||
| 61 | + id | ||
| 62 | + }, '/pack-activity/pack/vipRecharge') | ||
| 42 | wx.navigateTo({ | 63 | wx.navigateTo({ |
| 43 | - url | 64 | + url |
| 44 | }) | 65 | }) |
| 45 | }, | 66 | }, |
| 46 | /** | 67 | /** |
| 1 | <!--pack-cookbook/pages/favourableList.wxml--> | 1 | <!--pack-cookbook/pages/favourableList.wxml--> |
| 2 | +<wxs src="../../utils/util.wxs" module="util" /> | ||
| 2 | <nav></nav> | 3 | <nav></nav> |
| 3 | -<view class="box"> | 4 | +<view class="box" wx:if="{{list.length>0}}"> |
| 4 | <view wx:for="{{list}}" class="single" bindtap="gogoSingle" data-id="{{item.id}}"> | 5 | <view wx:for="{{list}}" class="single" bindtap="gogoSingle" data-id="{{item.id}}"> |
| 5 | <view class="topBox"> | 6 | <view class="topBox"> |
| 6 | <view class="name font32r"> | 7 | <view class="name font32r"> |
| 7 | - {{item.name}} | 8 | + {{item.rname}} |
| 8 | </view> | 9 | </view> |
| 9 | - <view class="texts info font24r"> | ||
| 10 | - {{item.info}} | ||
| 11 | - {{item.info}} | ||
| 12 | - {{item.info}} | 10 | + <view class="texts info font24r" wx:if="{{item.priceInfo}}"> |
| 11 | + {{item.priceInfo}}{{(item.recharge_lists.is_coupons=='0' && item.recharge_lists.is_score=='0')?'。':';'}} | ||
| 12 | + </view> | ||
| 13 | + <view class="texts info font24r" wx:if="{{item.scoreInfo}}"> | ||
| 14 | + {{item.scoreInfo}}{{item.recharge_lists.is_coupons=='0'?'。':';'}} | ||
| 15 | + </view> | ||
| 16 | + <view class="texts info font24r" wx:if="{{item.recharge_lists.is_coupons=='1'}}"> | ||
| 17 | + {{item.recharge_lists.is_coupons=='1'?'会员充值满'+item.recharge_money+'元赠送'+item.certificate:''}}。 | ||
| 13 | </view> | 18 | </view> |
| 14 | </view> | 19 | </view> |
| 15 | <view class="texts time font24r"> | 20 | <view class="texts time font24r"> |
| 16 | - 有效期限:{{item.etime}}至{{item.stime}} | 21 | + 有效期限:{{util.unixtoTime(item.stime,'YYYY-MM-DD')}}至{{util.unixtoTime(item.etime,'YYYY-MM-DD')}} |
| 17 | </view> | 22 | </view> |
| 18 | </view> | 23 | </view> |
| 19 | </view> | 24 | </view> |
| @@ -7,7 +7,6 @@ page{ | @@ -7,7 +7,6 @@ page{ | ||
| 7 | } | 7 | } |
| 8 | .single{ | 8 | .single{ |
| 9 | width: 100%; | 9 | width: 100%; |
| 10 | - height: 240rpx; | ||
| 11 | border-radius: 16rpx; | 10 | border-radius: 16rpx; |
| 12 | background-color: #FFFFFF; | 11 | background-color: #FFFFFF; |
| 13 | box-shadow: 0rpx 8rpx 8rpx #00000040; | 12 | box-shadow: 0rpx 8rpx 8rpx #00000040; |
| @@ -33,14 +32,13 @@ page{ | @@ -33,14 +32,13 @@ page{ | ||
| 33 | .texts{ | 32 | .texts{ |
| 34 | padding-left: 40rpx; | 33 | padding-left: 40rpx; |
| 35 | color: #999999; | 34 | color: #999999; |
| 36 | - font-family: PingFang SC; | ||
| 37 | - height: 62%; | 35 | + font-family: PingFang SC; |
| 36 | + line-height: 50rpx; | ||
| 38 | } | 37 | } |
| 39 | .topBox{ | 38 | .topBox{ |
| 40 | height: 68%; | 39 | height: 68%; |
| 41 | border-bottom: 2rpx dashed #bfc4d4; | 40 | border-bottom: 2rpx dashed #bfc4d4; |
| 42 | } | 41 | } |
| 43 | .time{ | 42 | .time{ |
| 44 | - height: 70rpx; | ||
| 45 | line-height: 70rpx; | 43 | line-height: 70rpx; |
| 46 | } | 44 | } |
| @@ -57,13 +57,6 @@ Page({ | @@ -57,13 +57,6 @@ Page({ | ||
| 57 | this.checkModal = this.selectComponent("#checkModal"); | 57 | this.checkModal = this.selectComponent("#checkModal"); |
| 58 | this.classifyModal = this.selectComponent("#classifyModal"); | 58 | this.classifyModal = this.selectComponent("#classifyModal"); |
| 59 | }, | 59 | }, |
| 60 | - | ||
| 61 | - /** | ||
| 62 | - * 生命周期函数--监听页面初次渲染完成 | ||
| 63 | - */ | ||
| 64 | - onReady() { | ||
| 65 | - | ||
| 66 | - }, | ||
| 67 | // 已选菜单页面跳转 | 60 | // 已选菜单页面跳转 |
| 68 | gotoShoppingCart() { | 61 | gotoShoppingCart() { |
| 69 | let cookbooklist = this.data.cookbooklist; | 62 | let cookbooklist = this.data.cookbooklist; |
| @@ -111,7 +104,7 @@ Page({ | @@ -111,7 +104,7 @@ Page({ | ||
| 111 | let normsLen = 0; | 104 | let normsLen = 0; |
| 112 | cookbooklist.forEach(items => { | 105 | cookbooklist.forEach(items => { |
| 113 | items.cookbooklist[0].forEach(item => { | 106 | items.cookbooklist[0].forEach(item => { |
| 114 | - if (item.norms.length > 0) { | 107 | + if (item.norms && item.norms.length > 0) { |
| 115 | normsLen += item.norms.length | 108 | normsLen += item.norms.length |
| 116 | } | 109 | } |
| 117 | }) | 110 | }) |
| @@ -120,22 +113,6 @@ Page({ | @@ -120,22 +113,6 @@ Page({ | ||
| 120 | normsLen | 113 | normsLen |
| 121 | }) | 114 | }) |
| 122 | }, | 115 | }, |
| 123 | - // 展示做法规格弹窗 | ||
| 124 | - showModal() { | ||
| 125 | - this.checkModal.showModal() | ||
| 126 | - }, | ||
| 127 | - // 关闭做法规格弹窗 | ||
| 128 | - closeModal() { | ||
| 129 | - this.checkModal.closeModal() | ||
| 130 | - }, | ||
| 131 | - // 展示菜品分类弹框 | ||
| 132 | - showClassifyModal() { | ||
| 133 | - this.classifyModal.showModal() | ||
| 134 | - }, | ||
| 135 | - // 关闭菜品分类弹框 | ||
| 136 | - closeClassifyModal() { | ||
| 137 | - this.classifyModal.closeModal() | ||
| 138 | - }, | ||
| 139 | // 选择菜品分类 | 116 | // 选择菜品分类 |
| 140 | checkItem(e) { | 117 | checkItem(e) { |
| 141 | const item = e.currentTarget.dataset['item']; | 118 | const item = e.currentTarget.dataset['item']; |
| @@ -199,6 +176,10 @@ Page({ | @@ -199,6 +176,10 @@ Page({ | ||
| 199 | let normsNum; | 176 | let normsNum; |
| 200 | // 点击下面的加号并且有规格或者做法的,弹框选规格 下面的直接加 | 177 | // 点击下面的加号并且有规格或者做法的,弹框选规格 下面的直接加 |
| 201 | if (type == '1' && (item.practice.length>1 || item.spec.length>1)) { | 178 | if (type == '1' && (item.practice.length>1 || item.spec.length>1)) { |
| 179 | + this.setData({ | ||
| 180 | + check1:item.practice.length>0?item.practice[0].id:'', | ||
| 181 | + check2:item.spec.length>0?item.spec[0].id:'', | ||
| 182 | + }) | ||
| 202 | return this.showModal() | 183 | return this.showModal() |
| 203 | }else { | 184 | }else { |
| 204 | normsNum = 1; | 185 | normsNum = 1; |
| @@ -366,13 +347,34 @@ Page({ | @@ -366,13 +347,34 @@ Page({ | ||
| 366 | }) | 347 | }) |
| 367 | sortArr.push(item) | 348 | sortArr.push(item) |
| 368 | }) | 349 | }) |
| 369 | - // let image_typeArr=[]; | ||
| 370 | - // sortArr.forEach(item=>{ | ||
| 371 | - // item.cookbooklist[0].sort((a,b)=>{ | ||
| 372 | - // return a.image_type-b.image_type | ||
| 373 | - // }) | ||
| 374 | - // image_typeArr.push(item) | ||
| 375 | - // }) | 350 | + let image_typeArr=[]; |
| 351 | + sortArr.forEach(item=>{ | ||
| 352 | + let num=0; | ||
| 353 | + item.cookbooklist[0].forEach((i,idx)=>{ | ||
| 354 | + if(i.image_type=='2'){ | ||
| 355 | + num++ | ||
| 356 | + i.index=num; | ||
| 357 | + if(i.index%2!=0){ | ||
| 358 | + i.boderNone=false; | ||
| 359 | + }else{ | ||
| 360 | + i.boderNone=true; | ||
| 361 | + } | ||
| 362 | + // 下一个是大图 不是最后一个 | ||
| 363 | + if(item.cookbooklist[0][idx+1].image_type=='1' && idx!=item.cookbooklist[0].length-1){ | ||
| 364 | + // 是奇数 | ||
| 365 | + if(num%2!=0){ | ||
| 366 | + let s=i.index*1+1; | ||
| 367 | + item.cookbooklist[0].splice(idx+1,0,{index:s,boderNone:true}) | ||
| 368 | + } | ||
| 369 | + } | ||
| 370 | + }else if(i.image_type=='1'){ | ||
| 371 | + i.index=0 | ||
| 372 | + num=0 | ||
| 373 | + } | ||
| 374 | + }) | ||
| 375 | + image_typeArr.push(item) | ||
| 376 | + }) | ||
| 377 | + console.log('image_typeArr',image_typeArr); | ||
| 376 | setTimeout(() => { | 378 | setTimeout(() => { |
| 377 | this.setData({ | 379 | this.setData({ |
| 378 | check1, | 380 | check1, |
| @@ -380,7 +382,7 @@ Page({ | @@ -380,7 +382,7 @@ Page({ | ||
| 380 | assortArr | 382 | assortArr |
| 381 | }) | 383 | }) |
| 382 | }, 1); | 384 | }, 1); |
| 383 | - return sortArr; | 385 | + return image_typeArr; |
| 384 | }, | 386 | }, |
| 385 | // 获取所有分类下所有菜品列表 | 387 | // 获取所有分类下所有菜品列表 |
| 386 | getCookList(orderid) { | 388 | getCookList(orderid) { |
| @@ -402,7 +404,7 @@ Page({ | @@ -402,7 +404,7 @@ Page({ | ||
| 402 | }; | 404 | }; |
| 403 | App.Advance.GetCookbookByClass(param).then(json => { | 405 | App.Advance.GetCookbookByClass(param).then(json => { |
| 404 | let cookbooklist=this.formatCookList(json.data[0].list) | 406 | let cookbooklist=this.formatCookList(json.data[0].list) |
| 405 | - console.log('cookbooklist',cookbooklist); | 407 | + // console.log('cookbooklist',cookbooklist); |
| 406 | setTimeout(() => { | 408 | setTimeout(() => { |
| 407 | this.setData({ | 409 | this.setData({ |
| 408 | cookbooklist, | 410 | cookbooklist, |
| @@ -434,7 +436,22 @@ Page({ | @@ -434,7 +436,22 @@ Page({ | ||
| 434 | this.getNormsLen() | 436 | this.getNormsLen() |
| 435 | } | 437 | } |
| 436 | }, | 438 | }, |
| 437 | - | 439 | + // 展示做法规格弹窗 |
| 440 | + showModal() { | ||
| 441 | + this.checkModal.showModal() | ||
| 442 | + }, | ||
| 443 | + // 关闭做法规格弹窗 | ||
| 444 | + closeModal() { | ||
| 445 | + this.checkModal.closeModal() | ||
| 446 | + }, | ||
| 447 | + // 展示菜品分类弹框 | ||
| 448 | + showClassifyModal() { | ||
| 449 | + this.classifyModal.showModal() | ||
| 450 | + }, | ||
| 451 | + // 关闭菜品分类弹框 | ||
| 452 | + closeClassifyModal() { | ||
| 453 | + this.classifyModal.closeModal() | ||
| 454 | + }, | ||
| 438 | /** | 455 | /** |
| 439 | * 生命周期函数--监听页面隐藏 | 456 | * 生命周期函数--监听页面隐藏 |
| 440 | */ | 457 | */ |
| 1 | <!--pack-cookbook/pages/index_new.wxml--> | 1 | <!--pack-cookbook/pages/index_new.wxml--> |
| 2 | <nav backgroundColor="#4d4e50" color="#fff">{{options.sellerName||'提前点菜'}}</nav> | 2 | <nav backgroundColor="#4d4e50" color="#fff">{{options.sellerName||'提前点菜'}}</nav> |
| 3 | <loading wx:if="{{isloading}}">数据加载中</loading> | 3 | <loading wx:if="{{isloading}}">数据加载中</loading> |
| 4 | -<view class="wrapIine"></view> | ||
| 5 | <scroll-view style="height:100vh;" class="content" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true"> | 4 | <scroll-view style="height:100vh;" class="content" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true"> |
| 6 | <block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs"> | 5 | <block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs"> |
| 7 | <view class="dishWrap" id="{{ 'inToView'+item.id}}"> | 6 | <view class="dishWrap" id="{{ 'inToView'+item.id}}"> |
| @@ -20,12 +19,12 @@ | @@ -20,12 +19,12 @@ | ||
| 20 | </block> | 19 | </block> |
| 21 | <block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index"> | 20 | <block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index"> |
| 22 | <!-- name_type 1左侧,2右侧,3顶部分开 image_type 1大图,2小图 --> | 21 | <!-- name_type 1左侧,2右侧,3顶部分开 image_type 1大图,2小图 --> |
| 23 | - <view wx:if="{{item.image_type=='1'}}" class="dishWrap"> | 22 | + <view wx:if="{{item.image_type=='1'}}" class="oneBox" data-idx="{{item.index}}"> |
| 24 | <view class="dishItem flex-lr"> | 23 | <view class="dishItem flex-lr"> |
| 25 | <view class="dishLeft dishTexts">{{item.name}}</view> | 24 | <view class="dishLeft dishTexts">{{item.name}}</view> |
| 26 | - <view class="dishTexts dishRight">{{item.first_name}}</view> | 25 | + <view class="dishTexts dishRight">味型:price</view> |
| 27 | </view> | 26 | </view> |
| 28 | - <view class="norms">{{item.first_name}}</view> | 27 | + <view class="norms">味型:{{item.taste}}</view> |
| 29 | <block wx:if="{{type=='B'}}"> | 28 | <block wx:if="{{type=='B'}}"> |
| 30 | <view class="dishItem typeB"> | 29 | <view class="dishItem typeB"> |
| 31 | <view class="dishLeft dishTexts">{{item.title}}</view> | 30 | <view class="dishLeft dishTexts">{{item.title}}</view> |
| @@ -52,28 +51,42 @@ | @@ -52,28 +51,42 @@ | ||
| 52 | </view> | 51 | </view> |
| 53 | <view class="practice">{{item.practiceName}}</view> | 52 | <view class="practice">{{item.practiceName}}</view> |
| 54 | </view> | 53 | </view> |
| 55 | - <image id="add" src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-norms="{{normsIndex}}" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 54 | + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-norms="{{normsIndex}}" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> |
| 56 | </view> | 55 | </view> |
| 57 | - <view wx:if="{{(item.spec.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr"> | 56 | + <view wx:if="{{(item.spec.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr imgbox"> |
| 58 | <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-norms="{{normsIndex}}" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 57 | <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-norms="{{normsIndex}}" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> |
| 59 | </view> | 58 | </view> |
| 60 | - <view class="wrapIine"></view> | 59 | + <!-- <view class="wrapIine"></view> --> |
| 61 | </view> | 60 | </view> |
| 62 | - <view wx:else class="twoBox flex-rs"> | ||
| 63 | - <view class="twoItem"> | 61 | + <view wx:else class="twoBox" data-idx="{{item.index}}"> |
| 62 | + <view class="{{item.boderNone?'borderNone twoItem':'twoItem'}}"> | ||
| 64 | <view class="twoTitle">{{item.name}}</view> | 63 | <view class="twoTitle">{{item.name}}</view> |
| 65 | <view class="twoInfo">{{item.info}}{{item.vip}}</view>{{item.quantum}} | 64 | <view class="twoInfo">{{item.info}}{{item.vip}}</view>{{item.quantum}} |
| 66 | <image src="{{item.image}}" mode="aspectFill" /> | 65 | <image src="{{item.image}}" mode="aspectFill" /> |
| 67 | - <view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg"> | ||
| 68 | - <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 66 | + <view wx:for="{{item.norms}}" wx:for-index="normsIndex" class="algorithmImg flex-lr calculate"> |
| 67 | + <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-norms="{{normsIndex}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 68 | + <view class="box flex-cc"> | ||
| 69 | + <view class="num flex-cc"> | ||
| 70 | + {{item.quantum}}<view>{{item.unitName}}</view> | ||
| 71 | + </view> | ||
| 72 | + <view class="practice">{{item.practiceName}}</view> | ||
| 73 | + </view> | ||
| 74 | + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-norms="{{normsIndex}}" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 75 | + </view> | ||
| 76 | + <view wx:if="{{(item.spec.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr imgbox"> | ||
| 77 | + <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-norms="{{normsIndex}}" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 69 | </view> | 78 | </view> |
| 70 | - <view wx:else class="algorithmImg flex-lr twoImgs"> | ||
| 71 | - <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 79 | + <!-- <view class="wrapIine"></view> --> |
| 80 | + <!-- <view class="algorithmImg flex-rr oneImg"> | ||
| 81 | + <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="subtraction" data-item="{{item}}" data-norms="{{normsIndex}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 82 | + </view> | ||
| 83 | + <view wx:if="{{(item.spec.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-lr twoImgs"> | ||
| 84 | + <image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-norms="{{normsIndex}}" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 72 | <view class="box flex-cc"> | 85 | <view class="box flex-cc"> |
| 73 | <view class="num flex-cc">{{item.quantum}}</view> | 86 | <view class="num flex-cc">{{item.quantum}}</view> |
| 74 | </view> | 87 | </view> |
| 75 | - <image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 76 | - </view> | 88 | + <image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-norms="{{normsIndex}}" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}"/> |
| 89 | + </view> --> | ||
| 77 | </view> | 90 | </view> |
| 78 | </view> | 91 | </view> |
| 79 | </block> | 92 | </block> |
| @@ -24,12 +24,6 @@ page { | @@ -24,12 +24,6 @@ page { | ||
| 24 | width: 160rpx; | 24 | width: 160rpx; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | -.style_round .line { | ||
| 28 | - width: 100rpx; | ||
| 29 | - height: 2rpx; | ||
| 30 | - background: #dbdbdb; | ||
| 31 | -} | ||
| 32 | - | ||
| 33 | .style_round .round { | 27 | .style_round .round { |
| 34 | width: 8rpx; | 28 | width: 8rpx; |
| 35 | height: 8rpx; | 29 | height: 8rpx; |
| @@ -43,10 +37,18 @@ page { | @@ -43,10 +37,18 @@ page { | ||
| 43 | } | 37 | } |
| 44 | 38 | ||
| 45 | .dishWrap { | 39 | .dishWrap { |
| 40 | + display: flex; | ||
| 41 | + flex-wrap: wrap; | ||
| 46 | color: #fff; | 42 | color: #fff; |
| 43 | +} | ||
| 44 | +.dishWrap:nth-last-of-type(1){ | ||
| 45 | + padding-bottom: 200rpx; | ||
| 46 | +} | ||
| 47 | +.oneBox{ | ||
| 48 | + width: 100%; | ||
| 47 | padding-top: 40rpx; | 49 | padding-top: 40rpx; |
| 50 | + border-top: 4rpx solid #dbdbdb; | ||
| 48 | } | 51 | } |
| 49 | - | ||
| 50 | .dishTexts { | 52 | .dishTexts { |
| 51 | padding: 0 40rpx; | 53 | padding: 0 40rpx; |
| 52 | color: #dbdbdb; | 54 | color: #dbdbdb; |
| @@ -87,18 +89,20 @@ page { | @@ -87,18 +89,20 @@ page { | ||
| 87 | height: 60rpx; | 89 | height: 60rpx; |
| 88 | padding-bottom: 58rpx; | 90 | padding-bottom: 58rpx; |
| 89 | } | 91 | } |
| 92 | +.imgbox{ | ||
| 93 | + margin-right: 20rpx; | ||
| 94 | +} | ||
| 95 | +.twoItem .algorithmImg{ | ||
| 96 | + padding-top: 20rpx; | ||
| 97 | +} | ||
| 90 | 98 | ||
| 91 | .algorithmImg .imgs { | 99 | .algorithmImg .imgs { |
| 92 | width: 60rpx; | 100 | width: 60rpx; |
| 93 | height: 100%; | 101 | height: 100%; |
| 94 | - margin-right: 60rpx; | ||
| 95 | } | 102 | } |
| 96 | 103 | ||
| 97 | -.algorithmImg .imgs { | ||
| 98 | - padding: 20rpx; | ||
| 99 | -} | ||
| 100 | .calculate { | 104 | .calculate { |
| 101 | - padding: 0 60rpx 58rpx 80rpx; | 105 | + padding: 20rpx 20rpx 58rpx 20rpx; |
| 102 | } | 106 | } |
| 103 | 107 | ||
| 104 | .calculate .imgs { | 108 | .calculate .imgs { |
| @@ -123,15 +127,14 @@ page { | @@ -123,15 +127,14 @@ page { | ||
| 123 | } | 127 | } |
| 124 | 128 | ||
| 125 | .twoItem { | 129 | .twoItem { |
| 126 | - width: 50%; | 130 | + width: 100%; |
| 127 | box-sizing: border-box; | 131 | box-sizing: border-box; |
| 128 | - border-bottom: 4rpx solid #dbdbdb; | ||
| 129 | -} | ||
| 130 | - | ||
| 131 | -.twoItem:nth-of-type(odd) { | ||
| 132 | border-right: 4rpx solid #dbdbdb; | 132 | border-right: 4rpx solid #dbdbdb; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | +.borderNone{ | ||
| 136 | + border-right: none; | ||
| 137 | +} | ||
| 135 | .twoTitle { | 138 | .twoTitle { |
| 136 | padding: 30rpx 0 10rpx 20rpx; | 139 | padding: 30rpx 0 10rpx 20rpx; |
| 137 | color: #dbdbdb; | 140 | color: #dbdbdb; |
| @@ -161,7 +164,12 @@ page { | @@ -161,7 +164,12 @@ page { | ||
| 161 | } | 164 | } |
| 162 | 165 | ||
| 163 | .twoBox { | 166 | .twoBox { |
| 164 | - padding-bottom: 118rpx; | 167 | + width: 50%; |
| 168 | + border-top:4rpx solid #dbdbdb; | ||
| 169 | + display: flex; | ||
| 170 | + flex-direction: row; | ||
| 171 | + flex-wrap: wrap; | ||
| 172 | + justify-content: flex-start; | ||
| 165 | } | 173 | } |
| 166 | 174 | ||
| 167 | .twoBox .imgs { | 175 | .twoBox .imgs { |
| @@ -169,9 +177,8 @@ page { | @@ -169,9 +177,8 @@ page { | ||
| 169 | } | 177 | } |
| 170 | 178 | ||
| 171 | .reduceImg { | 179 | .reduceImg { |
| 172 | - width: 90rpx; | 180 | + width: 70rpx; |
| 173 | height: 8rpx !important; | 181 | height: 8rpx !important; |
| 174 | - padding: 20rpx; | ||
| 175 | } | 182 | } |
| 176 | 183 | ||
| 177 | .fixedBox { | 184 | .fixedBox { |
| @@ -39,6 +39,7 @@ Page({ | @@ -39,6 +39,7 @@ Page({ | ||
| 39 | priceInfo:'', | 39 | priceInfo:'', |
| 40 | scoreInfo:'', | 40 | scoreInfo:'', |
| 41 | discount:'', | 41 | discount:'', |
| 42 | + certificate:'', | ||
| 42 | dataStr:Date.now()*1/1000, | 43 | dataStr:Date.now()*1/1000, |
| 43 | }, | 44 | }, |
| 44 | /** | 45 | /** |
| @@ -63,6 +64,17 @@ Page({ | @@ -63,6 +64,17 @@ Page({ | ||
| 63 | "lauchOpts": options, //渠道分析 | 64 | "lauchOpts": options, //渠道分析 |
| 64 | }); | 65 | }); |
| 65 | }, | 66 | }, |
| 67 | + // 点击了解更多会员优惠政策 | ||
| 68 | + gotoFavourableList(){ | ||
| 69 | + let url=util.http_build_query({ | ||
| 70 | + sellerName:this.data.seller.name, | ||
| 71 | + sellerid:this.data.seller.sid, | ||
| 72 | + oid:this.data.detail.id | ||
| 73 | + },'/pack-cookbook/pages/favourableList') | ||
| 74 | + wx.navigateTo({ | ||
| 75 | + url | ||
| 76 | + }) | ||
| 77 | + }, | ||
| 66 | /** | 78 | /** |
| 67 | * 生命周期函数--监听页面初次渲染完成 | 79 | * 生命周期函数--监听页面初次渲染完成 |
| 68 | */ | 80 | */ |
| @@ -269,7 +281,7 @@ Page({ | @@ -269,7 +281,7 @@ Page({ | ||
| 269 | }).then(res => { | 281 | }).then(res => { |
| 270 | let data=res.data | 282 | let data=res.data |
| 271 | console.log('data',data); | 283 | console.log('data',data); |
| 272 | - let home,chef,marketing,reserve,signboard,store,homeColor,coupon_data,priceInfo,scoreInfo,recharge_list,stringifyUse; | 284 | + let home,chef,marketing,reserve,signboard,store,homeColor,coupon_data,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse; |
| 273 | chef = data.chef ? JSON.parse(data.chef) : ''; | 285 | chef = data.chef ? JSON.parse(data.chef) : ''; |
| 274 | reserve = data.reserve ? JSON.parse(data.reserve) : ''; | 286 | reserve = data.reserve ? JSON.parse(data.reserve) : ''; |
| 275 | marketing = data.marketing ? JSON.parse(data.marketing) : ''; | 287 | marketing = data.marketing ? JSON.parse(data.marketing) : ''; |
| @@ -293,10 +305,12 @@ Page({ | @@ -293,10 +305,12 @@ Page({ | ||
| 293 | recharge_list=marketing.recharge_data.recharge_list | 305 | recharge_list=marketing.recharge_data.recharge_list |
| 294 | if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; | 306 | if(recharge_list.is_price=='1') priceInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.price+'元余额'; |
| 295 | if(recharge_list.is_score=='1') scoreInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.score+'积分'; | 307 | if(recharge_list.is_score=='1') scoreInfo='会员充值满'+recharge_data.recharge_money+'元赠送'+recharge_list.score+'积分'; |
| 308 | + if(recharge_list.is_coupons=='1' && recharge_data.recharge_list.coupons_names.length>0) certificate=recharge_data.recharge_list.coupons_names.join('、'); | ||
| 296 | console.log('scoreInfo',scoreInfo); | 309 | console.log('scoreInfo',scoreInfo); |
| 297 | console.log('priceInfo',priceInfo); | 310 | console.log('priceInfo',priceInfo); |
| 298 | this.setData({ | 311 | this.setData({ |
| 299 | - recharge_data:marketing.recharge_data | 312 | + recharge_data:marketing.recharge_data, |
| 313 | + certificate | ||
| 300 | }) | 314 | }) |
| 301 | console.log('recharge_data',recharge_data); | 315 | console.log('recharge_data',recharge_data); |
| 302 | } | 316 | } |
| 1 | <!--pages/customer/detail_owner_invitation_new.wxml--> | 1 | <!--pages/customer/detail_owner_invitation_new.wxml--> |
| 2 | -<wxs src="../../utils/util.wxs" module="util" /> | ||
| 3 | <import src="../tpl/invitation"></import> | 2 | <import src="../tpl/invitation"></import> |
| 4 | <nav hasHome class="navhome" place="{{true}}"> | 3 | <nav hasHome class="navhome" place="{{true}}"> |
| 5 | </nav> | 4 | </nav> |
| @@ -229,7 +228,7 @@ | @@ -229,7 +228,7 @@ | ||
| 229 | {{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}} | 228 | {{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}} |
| 230 | </view> | 229 | </view> |
| 231 | <view class="bottom" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}"> | 230 | <view class="bottom" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}"> |
| 232 | - {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送优惠券':''}}。 | 231 | + {{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。 |
| 233 | </view> | 232 | </view> |
| 234 | </view> | 233 | </view> |
| 235 | <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> | 234 | <navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover"> |
| @@ -244,9 +243,9 @@ | @@ -244,9 +243,9 @@ | ||
| 244 | <view class="news" wx:if="{{marketing && marketing.wecomle}}"> | 243 | <view class="news" wx:if="{{marketing && marketing.wecomle}}"> |
| 245 | {{marketing?marketing.wecomle:''}} | 244 | {{marketing?marketing.wecomle:''}} |
| 246 | </view> | 245 | </view> |
| 247 | - <!-- <view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy"> | 246 | + <view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 248 | 点击了解更多会员优惠政策 | 247 | 点击了解更多会员优惠政策 |
| 249 | - </view> --> | 248 | + </view> |
| 250 | <text style="color: #999; font-size: 26rpx;font-family: PingFang SC;"> | 249 | <text style="color: #999; font-size: 26rpx;font-family: PingFang SC;"> |
| 251 | \n | 250 | \n |
| 252 | 周到安排提供技术支持 400 000 9690 | 251 | 周到安排提供技术支持 400 000 9690 |
| @@ -543,7 +543,7 @@ | @@ -543,7 +543,7 @@ | ||
| 543 | color: #000000; | 543 | color: #000000; |
| 544 | font-family: FangSong; | 544 | font-family: FangSong; |
| 545 | font-size: 40rpx; | 545 | font-size: 40rpx; |
| 546 | - margin: 40rpx 0 0 0; | 546 | + margin: 40rpx 0 100rpx 0; |
| 547 | } | 547 | } |
| 548 | 548 | ||
| 549 | .vips .text { | 549 | .vips .text { |
| @@ -555,7 +555,7 @@ | @@ -555,7 +555,7 @@ | ||
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | .favouredPolicy { | 557 | .favouredPolicy { |
| 558 | - width: 60%; | 558 | + width: 45%; |
| 559 | color: #999999; | 559 | color: #999999; |
| 560 | font-family: PingFang SC; | 560 | font-family: PingFang SC; |
| 561 | font-weight: 500; | 561 | font-weight: 500; |
| @@ -680,4 +680,9 @@ export default { | @@ -680,4 +680,9 @@ export default { | ||
| 680 | 'App.Activity.SetNewRechargeOrderByIsComment':{ | 680 | 'App.Activity.SetNewRechargeOrderByIsComment':{ |
| 681 | openid:'openid' | 681 | openid:'openid' |
| 682 | }, | 682 | }, |
| 683 | + | ||
| 684 | + // 新充值活动列表 | ||
| 685 | + 'App.Activity.GetNewRechargeList':{ | ||
| 686 | + openid:'openid' | ||
| 687 | + }, | ||
| 683 | } | 688 | } |
-
Please register or login to post a comment