Commit 962708da7afc80d92df5c39af53af505b82d2857

Authored by pengye
1 parent ac90965c

根据当前店铺版本判断提前点餐、优惠券、充值、播报功能

... ... @@ -48,6 +48,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -292,15 +293,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -3,7 +3,7 @@
<nav hasHome backgroundColor="{{themeSixteen}}" color="#fff" class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...
... ... @@ -49,6 +49,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -293,15 +294,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -3,7 +3,7 @@
<nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...
... ... @@ -49,6 +49,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -293,15 +294,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -2,7 +2,7 @@
<nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...
... ... @@ -48,6 +48,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -292,15 +293,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -2,7 +2,7 @@
<nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...
... ... @@ -49,6 +49,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -245,15 +246,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -3,7 +3,7 @@
<nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...
... ... @@ -48,6 +48,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -292,15 +293,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -3,7 +3,7 @@
<nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...
... ... @@ -48,6 +48,7 @@ Page({
hasValueOrder:false,//商家是否开通提前点餐功能
hasValueCertificate:false,//商家是否开通优惠券功能
hasValueRecharge:false,//商家是否开通充值功能
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
},
... ... @@ -291,15 +292,26 @@ Page({
App.SellerVersion.GetSellerVersion({
sellerid
}).then((res) => {
console.log('版本列表',res.data);
if(res.data && res.data.length>0){
const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6');
const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8');
const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9');
let data=res.data;
console.log('版本列表',data);
if(data && data.length>0){
data.sort((a, b) => b.cdate*1 - a.cdate*1);
// 获取店铺当前版本 (cdate最大最后一个充入的 && 当前时间有效 && 当前版本)
let obj = data.find(item => item.vtype == 1 || item.vtype == 2 || item.vtype == 4);
console.log('当前版本',{...obj});
// 提前点餐功能:超能版 || 有提前点餐模块
const hasValueOrder = obj.vtype=='1' || data.some(item => item.vid == '6');
// 优惠券功能:超能版 || 高级版 || 有优惠券模块
const hasValueCertificate = obj.vtype=='1' || obj.vtype=='4' || data.some(item => item.vid == '8');
// 充值功能:超能版 || 有充值模块
const hasValueRecharge = obj.vtype=='1' || data.some(item => item.vid == '9');
// 播报功能:超能版 || 标准版 || 标准版首年 || 高级版
const hasValueBroadcast = obj.vtype=='1' || obj.vid=='4' || obj.vid=='13' || obj.vtype=='4';
this.setData({
hasValueOrder,
hasValueCertificate,
hasValueRecharge,
hasValueBroadcast,
})
}
})
... ...
... ... @@ -3,7 +3,7 @@
<nav hasHome class="navhome" place="{{true}}">{{seller.name||reserve.seller_name}}</nav>
<scroll-view scroll-y class="{{themeColor}}">
<image
wx:if="{{reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
wx:if="{{hasValueBroadcast && reserve && reserve.swich_voice && reserve.swich_voice=='1'}}"
class="musicImg"
src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}"
bindtap="stopMusic"
... ...