|
...
|
...
|
@@ -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,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
...
|
...
|
|