Showing
14 changed files
with
126 additions
and
42 deletions
| @@ -48,6 +48,7 @@ Page({ | @@ -48,6 +48,7 @@ Page({ | ||
| 48 | hasValueOrder:false,//商家是否开通提前点餐功能 | 48 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 49 | hasValueCertificate:false,//商家是否开通优惠券功能 | 49 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 50 | hasValueRecharge:false,//商家是否开通充值功能 | 50 | hasValueRecharge:false,//商家是否开通充值功能 |
| 51 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 51 | _attentionAnim: {}, | 52 | _attentionAnim: {}, |
| 52 | isPlay: '1', | 53 | isPlay: '1', |
| 53 | }, | 54 | }, |
| @@ -292,15 +293,26 @@ Page({ | @@ -292,15 +293,26 @@ Page({ | ||
| 292 | App.SellerVersion.GetSellerVersion({ | 293 | App.SellerVersion.GetSellerVersion({ |
| 293 | sellerid | 294 | sellerid |
| 294 | }).then((res) => { | 295 | }).then((res) => { |
| 295 | - console.log('版本列表',res.data); | ||
| 296 | - if(res.data && res.data.length>0){ | ||
| 297 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 298 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 299 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 296 | + let data=res.data; |
| 297 | + console.log('版本列表',data); | ||
| 298 | + if(data && data.length>0){ | ||
| 299 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 300 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 301 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 302 | + console.log('当前版本',{...obj}); | ||
| 303 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 304 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 305 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 306 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 307 | + // 充值功能:超能版 || 有充值模块 | ||
| 308 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 309 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 310 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 300 | this.setData({ | 311 | this.setData({ |
| 301 | hasValueOrder, | 312 | hasValueOrder, |
| 302 | hasValueCertificate, | 313 | hasValueCertificate, |
| 303 | hasValueRecharge, | 314 | hasValueRecharge, |
| 315 | + hasValueBroadcast, | ||
| 304 | }) | 316 | }) |
| 305 | } | 317 | } |
| 306 | }) | 318 | }) |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome backgroundColor="{{themeSixteen}}" color="#fff" class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 3 | <nav hasHome backgroundColor="{{themeSixteen}}" color="#fff" class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 4 | <scroll-view scroll-y class="{{themeColor}}"> | 4 | <scroll-view scroll-y class="{{themeColor}}"> |
| 5 | <image | 5 | <image |
| 6 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 6 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 7 | class="musicImg" | 7 | class="musicImg" |
| 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 9 | bindtap="stopMusic" | 9 | bindtap="stopMusic" |
| @@ -49,6 +49,7 @@ Page({ | @@ -49,6 +49,7 @@ Page({ | ||
| 49 | hasValueOrder:false,//商家是否开通提前点餐功能 | 49 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 50 | hasValueCertificate:false,//商家是否开通优惠券功能 | 50 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 51 | hasValueRecharge:false,//商家是否开通充值功能 | 51 | hasValueRecharge:false,//商家是否开通充值功能 |
| 52 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 52 | _attentionAnim: {}, | 53 | _attentionAnim: {}, |
| 53 | isPlay: '1', | 54 | isPlay: '1', |
| 54 | }, | 55 | }, |
| @@ -293,15 +294,26 @@ Page({ | @@ -293,15 +294,26 @@ Page({ | ||
| 293 | App.SellerVersion.GetSellerVersion({ | 294 | App.SellerVersion.GetSellerVersion({ |
| 294 | sellerid | 295 | sellerid |
| 295 | }).then((res) => { | 296 | }).then((res) => { |
| 296 | - console.log('版本列表',res.data); | ||
| 297 | - if(res.data && res.data.length>0){ | ||
| 298 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 299 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 300 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 297 | + let data=res.data; |
| 298 | + console.log('版本列表',data); | ||
| 299 | + if(data && data.length>0){ | ||
| 300 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 301 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 302 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 303 | + console.log('当前版本',{...obj}); | ||
| 304 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 305 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 306 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 307 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 308 | + // 充值功能:超能版 || 有充值模块 | ||
| 309 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 310 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 311 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 301 | this.setData({ | 312 | this.setData({ |
| 302 | hasValueOrder, | 313 | hasValueOrder, |
| 303 | hasValueCertificate, | 314 | hasValueCertificate, |
| 304 | hasValueRecharge, | 315 | hasValueRecharge, |
| 316 | + hasValueBroadcast, | ||
| 305 | }) | 317 | }) |
| 306 | } | 318 | } |
| 307 | }) | 319 | }) |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 4 | <scroll-view scroll-y class="{{themeColor}}"> | 4 | <scroll-view scroll-y class="{{themeColor}}"> |
| 5 | <image | 5 | <image |
| 6 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 6 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 7 | class="musicImg" | 7 | class="musicImg" |
| 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 9 | bindtap="stopMusic" | 9 | bindtap="stopMusic" |
| @@ -49,6 +49,7 @@ Page({ | @@ -49,6 +49,7 @@ Page({ | ||
| 49 | hasValueOrder:false,//商家是否开通提前点餐功能 | 49 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 50 | hasValueCertificate:false,//商家是否开通优惠券功能 | 50 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 51 | hasValueRecharge:false,//商家是否开通充值功能 | 51 | hasValueRecharge:false,//商家是否开通充值功能 |
| 52 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 52 | _attentionAnim: {}, | 53 | _attentionAnim: {}, |
| 53 | isPlay: '1', | 54 | isPlay: '1', |
| 54 | }, | 55 | }, |
| @@ -293,15 +294,26 @@ Page({ | @@ -293,15 +294,26 @@ Page({ | ||
| 293 | App.SellerVersion.GetSellerVersion({ | 294 | App.SellerVersion.GetSellerVersion({ |
| 294 | sellerid | 295 | sellerid |
| 295 | }).then((res) => { | 296 | }).then((res) => { |
| 296 | - console.log('版本列表',res.data); | ||
| 297 | - if(res.data && res.data.length>0){ | ||
| 298 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 299 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 300 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 297 | + let data=res.data; |
| 298 | + console.log('版本列表',data); | ||
| 299 | + if(data && data.length>0){ | ||
| 300 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 301 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 302 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 303 | + console.log('当前版本',{...obj}); | ||
| 304 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 305 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 306 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 307 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 308 | + // 充值功能:超能版 || 有充值模块 | ||
| 309 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 310 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 311 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 301 | this.setData({ | 312 | this.setData({ |
| 302 | hasValueOrder, | 313 | hasValueOrder, |
| 303 | hasValueCertificate, | 314 | hasValueCertificate, |
| 304 | hasValueRecharge, | 315 | hasValueRecharge, |
| 316 | + hasValueBroadcast, | ||
| 305 | }) | 317 | }) |
| 306 | } | 318 | } |
| 307 | }) | 319 | }) |
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 2 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 3 | <scroll-view scroll-y class="{{themeColor}}"> | 3 | <scroll-view scroll-y class="{{themeColor}}"> |
| 4 | <image | 4 | <image |
| 5 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 5 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 6 | class="musicImg" | 6 | class="musicImg" |
| 7 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 7 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 8 | bindtap="stopMusic" | 8 | bindtap="stopMusic" |
| @@ -48,6 +48,7 @@ Page({ | @@ -48,6 +48,7 @@ Page({ | ||
| 48 | hasValueOrder:false,//商家是否开通提前点餐功能 | 48 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 49 | hasValueCertificate:false,//商家是否开通优惠券功能 | 49 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 50 | hasValueRecharge:false,//商家是否开通充值功能 | 50 | hasValueRecharge:false,//商家是否开通充值功能 |
| 51 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 51 | _attentionAnim: {}, | 52 | _attentionAnim: {}, |
| 52 | isPlay: '1', | 53 | isPlay: '1', |
| 53 | }, | 54 | }, |
| @@ -292,15 +293,26 @@ Page({ | @@ -292,15 +293,26 @@ Page({ | ||
| 292 | App.SellerVersion.GetSellerVersion({ | 293 | App.SellerVersion.GetSellerVersion({ |
| 293 | sellerid | 294 | sellerid |
| 294 | }).then((res) => { | 295 | }).then((res) => { |
| 295 | - console.log('版本列表',res.data); | ||
| 296 | - if(res.data && res.data.length>0){ | ||
| 297 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 298 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 299 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 296 | + let data=res.data; |
| 297 | + console.log('版本列表',data); | ||
| 298 | + if(data && data.length>0){ | ||
| 299 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 300 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 301 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 302 | + console.log('当前版本',{...obj}); | ||
| 303 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 304 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 305 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 306 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 307 | + // 充值功能:超能版 || 有充值模块 | ||
| 308 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 309 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 310 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 300 | this.setData({ | 311 | this.setData({ |
| 301 | hasValueOrder, | 312 | hasValueOrder, |
| 302 | hasValueCertificate, | 313 | hasValueCertificate, |
| 303 | hasValueRecharge, | 314 | hasValueRecharge, |
| 315 | + hasValueBroadcast, | ||
| 304 | }) | 316 | }) |
| 305 | } | 317 | } |
| 306 | }) | 318 | }) |
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 2 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 3 | <scroll-view scroll-y class="{{themeColor}}"> | 3 | <scroll-view scroll-y class="{{themeColor}}"> |
| 4 | <image | 4 | <image |
| 5 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 5 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 6 | class="musicImg" | 6 | class="musicImg" |
| 7 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 7 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 8 | bindtap="stopMusic" | 8 | bindtap="stopMusic" |
| @@ -49,6 +49,7 @@ Page({ | @@ -49,6 +49,7 @@ Page({ | ||
| 49 | hasValueOrder:false,//商家是否开通提前点餐功能 | 49 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 50 | hasValueCertificate:false,//商家是否开通优惠券功能 | 50 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 51 | hasValueRecharge:false,//商家是否开通充值功能 | 51 | hasValueRecharge:false,//商家是否开通充值功能 |
| 52 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 52 | _attentionAnim: {}, | 53 | _attentionAnim: {}, |
| 53 | isPlay: '1', | 54 | isPlay: '1', |
| 54 | }, | 55 | }, |
| @@ -245,15 +246,26 @@ Page({ | @@ -245,15 +246,26 @@ Page({ | ||
| 245 | App.SellerVersion.GetSellerVersion({ | 246 | App.SellerVersion.GetSellerVersion({ |
| 246 | sellerid | 247 | sellerid |
| 247 | }).then((res) => { | 248 | }).then((res) => { |
| 248 | - console.log('版本列表',res.data); | ||
| 249 | - if(res.data && res.data.length>0){ | ||
| 250 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 251 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 252 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 249 | + let data=res.data; |
| 250 | + console.log('版本列表',data); | ||
| 251 | + if(data && data.length>0){ | ||
| 252 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 253 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 254 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 255 | + console.log('当前版本',{...obj}); | ||
| 256 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 257 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 258 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 259 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 260 | + // 充值功能:超能版 || 有充值模块 | ||
| 261 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 262 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 263 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 253 | this.setData({ | 264 | this.setData({ |
| 254 | hasValueOrder, | 265 | hasValueOrder, |
| 255 | hasValueCertificate, | 266 | hasValueCertificate, |
| 256 | hasValueRecharge, | 267 | hasValueRecharge, |
| 268 | + hasValueBroadcast, | ||
| 257 | }) | 269 | }) |
| 258 | } | 270 | } |
| 259 | }) | 271 | }) |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 4 | <scroll-view scroll-y class="{{themeColor}}"> | 4 | <scroll-view scroll-y class="{{themeColor}}"> |
| 5 | <image | 5 | <image |
| 6 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 6 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 7 | class="musicImg" | 7 | class="musicImg" |
| 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 9 | bindtap="stopMusic" | 9 | bindtap="stopMusic" |
| @@ -48,6 +48,7 @@ Page({ | @@ -48,6 +48,7 @@ Page({ | ||
| 48 | hasValueOrder:false,//商家是否开通提前点餐功能 | 48 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 49 | hasValueCertificate:false,//商家是否开通优惠券功能 | 49 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 50 | hasValueRecharge:false,//商家是否开通充值功能 | 50 | hasValueRecharge:false,//商家是否开通充值功能 |
| 51 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 51 | _attentionAnim: {}, | 52 | _attentionAnim: {}, |
| 52 | isPlay: '1', | 53 | isPlay: '1', |
| 53 | }, | 54 | }, |
| @@ -292,15 +293,26 @@ Page({ | @@ -292,15 +293,26 @@ Page({ | ||
| 292 | App.SellerVersion.GetSellerVersion({ | 293 | App.SellerVersion.GetSellerVersion({ |
| 293 | sellerid | 294 | sellerid |
| 294 | }).then((res) => { | 295 | }).then((res) => { |
| 295 | - console.log('版本列表',res.data); | ||
| 296 | - if(res.data && res.data.length>0){ | ||
| 297 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 298 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 299 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 296 | + let data=res.data; |
| 297 | + console.log('版本列表',data); | ||
| 298 | + if(data && data.length>0){ | ||
| 299 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 300 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 301 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 302 | + console.log('当前版本',{...obj}); | ||
| 303 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 304 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 305 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 306 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 307 | + // 充值功能:超能版 || 有充值模块 | ||
| 308 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 309 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 310 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 300 | this.setData({ | 311 | this.setData({ |
| 301 | hasValueOrder, | 312 | hasValueOrder, |
| 302 | hasValueCertificate, | 313 | hasValueCertificate, |
| 303 | hasValueRecharge, | 314 | hasValueRecharge, |
| 315 | + hasValueBroadcast, | ||
| 304 | }) | 316 | }) |
| 305 | } | 317 | } |
| 306 | }) | 318 | }) |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 4 | <scroll-view scroll-y class="{{themeColor}}"> | 4 | <scroll-view scroll-y class="{{themeColor}}"> |
| 5 | <image | 5 | <image |
| 6 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 6 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 7 | class="musicImg" | 7 | class="musicImg" |
| 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 9 | bindtap="stopMusic" | 9 | bindtap="stopMusic" |
| @@ -48,6 +48,7 @@ Page({ | @@ -48,6 +48,7 @@ Page({ | ||
| 48 | hasValueOrder:false,//商家是否开通提前点餐功能 | 48 | hasValueOrder:false,//商家是否开通提前点餐功能 |
| 49 | hasValueCertificate:false,//商家是否开通优惠券功能 | 49 | hasValueCertificate:false,//商家是否开通优惠券功能 |
| 50 | hasValueRecharge:false,//商家是否开通充值功能 | 50 | hasValueRecharge:false,//商家是否开通充值功能 |
| 51 | + hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报 | ||
| 51 | _attentionAnim: {}, | 52 | _attentionAnim: {}, |
| 52 | isPlay: '1', | 53 | isPlay: '1', |
| 53 | }, | 54 | }, |
| @@ -291,15 +292,26 @@ Page({ | @@ -291,15 +292,26 @@ Page({ | ||
| 291 | App.SellerVersion.GetSellerVersion({ | 292 | App.SellerVersion.GetSellerVersion({ |
| 292 | sellerid | 293 | sellerid |
| 293 | }).then((res) => { | 294 | }).then((res) => { |
| 294 | - console.log('版本列表',res.data); | ||
| 295 | - if(res.data && res.data.length>0){ | ||
| 296 | - const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 297 | - const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 298 | - const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | 295 | + let data=res.data; |
| 296 | + console.log('版本列表',data); | ||
| 297 | + if(data && data.length>0){ | ||
| 298 | + data.sort((a, b) => b.cdate*1 - a.cdate*1); | ||
| 299 | + // 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本) | ||
| 300 | + let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4); | ||
| 301 | + console.log('当前版本',{...obj}); | ||
| 302 | + // 提前点餐功能:超能版 || 有提前点餐模块 | ||
| 303 | + const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6'); | ||
| 304 | + // 优惠券功能:超能版 || 高级版 || 有优惠券模块 | ||
| 305 | + const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8'); | ||
| 306 | + // 充值功能:超能版 || 有充值模块 | ||
| 307 | + const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9'); | ||
| 308 | + // 播报功能:超能版 || 标准版 || 标准版首年 || 高级版 | ||
| 309 | + const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4'; | ||
| 299 | this.setData({ | 310 | this.setData({ |
| 300 | hasValueOrder, | 311 | hasValueOrder, |
| 301 | hasValueCertificate, | 312 | hasValueCertificate, |
| 302 | hasValueRecharge, | 313 | hasValueRecharge, |
| 314 | + hasValueBroadcast, | ||
| 303 | }) | 315 | }) |
| 304 | } | 316 | } |
| 305 | }) | 317 | }) |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> | 3 | <nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav> |
| 4 | <scroll-view scroll-y class="{{themeColor}}"> | 4 | <scroll-view scroll-y class="{{themeColor}}"> |
| 5 | <image | 5 | <image |
| 6 | - wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" | 6 | + wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}" |
| 7 | class="musicImg" | 7 | class="musicImg" |
| 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" | 8 | src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" |
| 9 | bindtap="stopMusic" | 9 | bindtap="stopMusic" |
-
Please register or login to post a comment