Showing
15 changed files
with
188 additions
and
29 deletions
| @@ -45,6 +45,9 @@ Page({ | @@ -45,6 +45,9 @@ Page({ | ||
| 45 | showMoreTip: true, | 45 | showMoreTip: true, |
| 46 | themeColor: '', | 46 | themeColor: '', |
| 47 | screenHeight: '', | 47 | screenHeight: '', |
| 48 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 49 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 50 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 48 | }, | 51 | }, |
| 49 | tablestr: '', | 52 | tablestr: '', |
| 50 | urlsValue: [], | 53 | urlsValue: [], |
| @@ -264,11 +267,30 @@ Page({ | @@ -264,11 +267,30 @@ Page({ | ||
| 264 | this.getSellerTemplateConfFun(reserev.sid); | 267 | this.getSellerTemplateConfFun(reserev.sid); |
| 265 | this.getstaffinfo(res.data.uid) | 268 | this.getstaffinfo(res.data.uid) |
| 266 | this.getroomimage(reserev.sid) | 269 | this.getroomimage(reserev.sid) |
| 270 | + this.getSellerVersionFun(reserev.sid); | ||
| 267 | }, 0); | 271 | }, 0); |
| 268 | }).catch(res => { | 272 | }).catch(res => { |
| 269 | console.log(res, '详情请求失败'); | 273 | console.log(res, '详情请求失败'); |
| 270 | }) | 274 | }) |
| 271 | }, | 275 | }, |
| 276 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 277 | + getSellerVersionFun(sellerid){ | ||
| 278 | + App.SellerVersion.GetSellerVersion({ | ||
| 279 | + sellerid | ||
| 280 | + }).then((res) => { | ||
| 281 | + console.log('版本列表',res.data); | ||
| 282 | + if(res.data && res.data.length>0){ | ||
| 283 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 284 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 285 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 286 | + this.setData({ | ||
| 287 | + hasValueOrder, | ||
| 288 | + hasValueCertificate, | ||
| 289 | + hasValueRecharge, | ||
| 290 | + }) | ||
| 291 | + } | ||
| 292 | + }) | ||
| 293 | + }, | ||
| 272 | // 客户经理获取基本信息 | 294 | // 客户经理获取基本信息 |
| 273 | getstaffinfo(uid) { | 295 | getstaffinfo(uid) { |
| 274 | console.log('sellerid', this.data.detail.seller.id); | 296 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | <view wx:if="{{marketing && marketing.wecomle}}" class="welcome font36r"> | 62 | <view wx:if="{{marketing && marketing.wecomle}}" class="welcome font36r"> |
| 63 | {{marketing.wecomle}} | 63 | {{marketing.wecomle}} |
| 64 | </view> | 64 | </view> |
| 65 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 65 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 66 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 66 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 67 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 67 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 68 | <view class="itemsLeft"> | 68 | <view class="itemsLeft"> |
| @@ -144,7 +144,7 @@ | @@ -144,7 +144,7 @@ | ||
| 144 | <view class="lines"></view> | 144 | <view class="lines"></view> |
| 145 | </view> | 145 | </view> |
| 146 | </view> | 146 | </view> |
| 147 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 147 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 148 | <view class="rubric"> | 148 | <view class="rubric"> |
| 149 | 提前点餐 | 149 | 提前点餐 |
| 150 | </view> | 150 | </view> |
| @@ -159,7 +159,7 @@ | @@ -159,7 +159,7 @@ | ||
| 159 | </view> | 159 | </view> |
| 160 | </view> | 160 | </view> |
| 161 | </view> | 161 | </view> |
| 162 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 162 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 163 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 163 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 164 | 特别优惠 | 164 | 特别优惠 |
| 165 | </view> | 165 | </view> |
| @@ -187,7 +187,7 @@ | @@ -187,7 +187,7 @@ | ||
| 187 | </view> | 187 | </view> |
| 188 | </view> | 188 | </view> |
| 189 | <view class="vips"> | 189 | <view class="vips"> |
| 190 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 190 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 191 | 点击了解更多会员优惠政策 | 191 | 点击了解更多会员优惠政策 |
| 192 | </view> | 192 | </view> |
| 193 | <text class="businessBox"> | 193 | <text class="businessBox"> |
| @@ -46,6 +46,9 @@ Page({ | @@ -46,6 +46,9 @@ Page({ | ||
| 46 | themeColor: '', | 46 | themeColor: '', |
| 47 | screenHeight: '', | 47 | screenHeight: '', |
| 48 | whiteBj: false, | 48 | whiteBj: false, |
| 49 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 50 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 51 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 49 | }, | 52 | }, |
| 50 | tablestr: '', | 53 | tablestr: '', |
| 51 | urlsValue: [], | 54 | urlsValue: [], |
| @@ -265,11 +268,30 @@ Page({ | @@ -265,11 +268,30 @@ Page({ | ||
| 265 | this.getSellerTemplateConfFun(reserev.sid); | 268 | this.getSellerTemplateConfFun(reserev.sid); |
| 266 | this.getstaffinfo(res.data.uid) | 269 | this.getstaffinfo(res.data.uid) |
| 267 | this.getroomimage(reserev.sid) | 270 | this.getroomimage(reserev.sid) |
| 271 | + this.getSellerVersionFun(reserev.sid); | ||
| 268 | }, 0); | 272 | }, 0); |
| 269 | }).catch(res => { | 273 | }).catch(res => { |
| 270 | console.log(res, '详情请求失败'); | 274 | console.log(res, '详情请求失败'); |
| 271 | }) | 275 | }) |
| 272 | }, | 276 | }, |
| 277 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 278 | + getSellerVersionFun(sellerid){ | ||
| 279 | + App.SellerVersion.GetSellerVersion({ | ||
| 280 | + sellerid | ||
| 281 | + }).then((res) => { | ||
| 282 | + console.log('版本列表',res.data); | ||
| 283 | + if(res.data && res.data.length>0){ | ||
| 284 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 285 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 286 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 287 | + this.setData({ | ||
| 288 | + hasValueOrder, | ||
| 289 | + hasValueCertificate, | ||
| 290 | + hasValueRecharge, | ||
| 291 | + }) | ||
| 292 | + } | ||
| 293 | + }) | ||
| 294 | + }, | ||
| 273 | // 客户经理获取基本信息 | 295 | // 客户经理获取基本信息 |
| 274 | getstaffinfo(uid) { | 296 | getstaffinfo(uid) { |
| 275 | console.log('sellerid', this.data.detail.seller.id); | 297 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
| 70 | </view> | 70 | </view> |
| 71 | </view> | 71 | </view> |
| 72 | </view> | 72 | </view> |
| 73 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 73 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 74 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 74 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 75 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 75 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 76 | <view class="itemLeft"> | 76 | <view class="itemLeft"> |
| @@ -152,7 +152,7 @@ | @@ -152,7 +152,7 @@ | ||
| 152 | <view class="lines"></view> | 152 | <view class="lines"></view> |
| 153 | </view> | 153 | </view> |
| 154 | </view> | 154 | </view> |
| 155 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 155 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 156 | <view class="rubric"> | 156 | <view class="rubric"> |
| 157 | 提前点餐 | 157 | 提前点餐 |
| 158 | </view> | 158 | </view> |
| @@ -167,7 +167,7 @@ | @@ -167,7 +167,7 @@ | ||
| 167 | </view> | 167 | </view> |
| 168 | </view> | 168 | </view> |
| 169 | </view> | 169 | </view> |
| 170 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 170 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 171 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 171 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 172 | 特别优惠 | 172 | 特别优惠 |
| 173 | </view> | 173 | </view> |
| @@ -195,7 +195,7 @@ | @@ -195,7 +195,7 @@ | ||
| 195 | </view> | 195 | </view> |
| 196 | </view> | 196 | </view> |
| 197 | <view class="vips"> | 197 | <view class="vips"> |
| 198 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 198 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 199 | 点击了解更多会员优惠政策 | 199 | 点击了解更多会员优惠政策 |
| 200 | </view> | 200 | </view> |
| 201 | <text class="businessBox"> | 201 | <text class="businessBox"> |
| @@ -46,6 +46,9 @@ Page({ | @@ -46,6 +46,9 @@ Page({ | ||
| 46 | themeColor: '', | 46 | themeColor: '', |
| 47 | screenHeight: '', | 47 | screenHeight: '', |
| 48 | whiteBj: false, | 48 | whiteBj: false, |
| 49 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 50 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 51 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 49 | }, | 52 | }, |
| 50 | tablestr: '', | 53 | tablestr: '', |
| 51 | urlsValue: [], | 54 | urlsValue: [], |
| @@ -265,11 +268,30 @@ Page({ | @@ -265,11 +268,30 @@ Page({ | ||
| 265 | this.getSellerTemplateConfFun(reserev.sid); | 268 | this.getSellerTemplateConfFun(reserev.sid); |
| 266 | this.getstaffinfo(res.data.uid) | 269 | this.getstaffinfo(res.data.uid) |
| 267 | this.getroomimage(reserev.sid) | 270 | this.getroomimage(reserev.sid) |
| 271 | + this.getSellerVersionFun(reserev.sid); | ||
| 268 | }, 0); | 272 | }, 0); |
| 269 | }).catch(res => { | 273 | }).catch(res => { |
| 270 | console.log(res, '详情请求失败'); | 274 | console.log(res, '详情请求失败'); |
| 271 | }) | 275 | }) |
| 272 | }, | 276 | }, |
| 277 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 278 | + getSellerVersionFun(sellerid){ | ||
| 279 | + App.SellerVersion.GetSellerVersion({ | ||
| 280 | + sellerid | ||
| 281 | + }).then((res) => { | ||
| 282 | + console.log('版本列表',res.data); | ||
| 283 | + if(res.data && res.data.length>0){ | ||
| 284 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 285 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 286 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 287 | + this.setData({ | ||
| 288 | + hasValueOrder, | ||
| 289 | + hasValueCertificate, | ||
| 290 | + hasValueRecharge, | ||
| 291 | + }) | ||
| 292 | + } | ||
| 293 | + }) | ||
| 294 | + }, | ||
| 273 | // 客户经理获取基本信息 | 295 | // 客户经理获取基本信息 |
| 274 | getstaffinfo(uid) { | 296 | getstaffinfo(uid) { |
| 275 | console.log('sellerid', this.data.detail.seller.id); | 297 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
| 48 | <view wx:if="{{marketing && marketing.wecomle}}" class="chefText font36r"> | 48 | <view wx:if="{{marketing && marketing.wecomle}}" class="chefText font36r"> |
| 49 | {{marketing.wecomle}} | 49 | {{marketing.wecomle}} |
| 50 | </view> | 50 | </view> |
| 51 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 51 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 52 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 52 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 53 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 53 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 54 | <view class="itemsLeft"> | 54 | <view class="itemsLeft"> |
| @@ -127,7 +127,7 @@ | @@ -127,7 +127,7 @@ | ||
| 127 | <view class="lines"></view> | 127 | <view class="lines"></view> |
| 128 | </view> | 128 | </view> |
| 129 | </block> | 129 | </block> |
| 130 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 130 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 131 | <view class="rubric texts"> | 131 | <view class="rubric texts"> |
| 132 | 提前点餐 | 132 | 提前点餐 |
| 133 | </view> | 133 | </view> |
| @@ -142,7 +142,7 @@ | @@ -142,7 +142,7 @@ | ||
| 142 | </view> | 142 | </view> |
| 143 | </view> | 143 | </view> |
| 144 | </view> | 144 | </view> |
| 145 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 145 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 146 | <view class="rubric rubric1 texts" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 146 | <view class="rubric rubric1 texts" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 147 | 特别优惠 | 147 | 特别优惠 |
| 148 | </view> | 148 | </view> |
| @@ -170,7 +170,7 @@ | @@ -170,7 +170,7 @@ | ||
| 170 | </view> | 170 | </view> |
| 171 | </view> | 171 | </view> |
| 172 | <view class="vips"> | 172 | <view class="vips"> |
| 173 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 173 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 174 | 点击了解更多会员优惠政策 | 174 | 点击了解更多会员优惠政策 |
| 175 | </view> | 175 | </view> |
| 176 | <text class="businessBox"> | 176 | <text class="businessBox"> |
| @@ -45,6 +45,9 @@ Page({ | @@ -45,6 +45,9 @@ Page({ | ||
| 45 | showMoreTip: true, | 45 | showMoreTip: true, |
| 46 | themeColor: '', | 46 | themeColor: '', |
| 47 | whiteBj: false, | 47 | whiteBj: false, |
| 48 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 49 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 50 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 48 | }, | 51 | }, |
| 49 | tablestr: '', | 52 | tablestr: '', |
| 50 | urlsValue: [], | 53 | urlsValue: [], |
| @@ -264,11 +267,30 @@ Page({ | @@ -264,11 +267,30 @@ Page({ | ||
| 264 | this.getSellerTemplateConfFun(reserev.sid); | 267 | this.getSellerTemplateConfFun(reserev.sid); |
| 265 | this.getstaffinfo(res.data.uid) | 268 | this.getstaffinfo(res.data.uid) |
| 266 | this.getroomimage(reserev.sid) | 269 | this.getroomimage(reserev.sid) |
| 270 | + this.getSellerVersionFun(reserev.sid); | ||
| 267 | }, 0); | 271 | }, 0); |
| 268 | }).catch(res => { | 272 | }).catch(res => { |
| 269 | console.log(res, '详情请求失败'); | 273 | console.log(res, '详情请求失败'); |
| 270 | }) | 274 | }) |
| 271 | }, | 275 | }, |
| 276 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 277 | + getSellerVersionFun(sellerid){ | ||
| 278 | + App.SellerVersion.GetSellerVersion({ | ||
| 279 | + sellerid | ||
| 280 | + }).then((res) => { | ||
| 281 | + console.log('版本列表',res.data); | ||
| 282 | + if(res.data && res.data.length>0){ | ||
| 283 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 284 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 285 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 286 | + this.setData({ | ||
| 287 | + hasValueOrder, | ||
| 288 | + hasValueCertificate, | ||
| 289 | + hasValueRecharge, | ||
| 290 | + }) | ||
| 291 | + } | ||
| 292 | + }) | ||
| 293 | + }, | ||
| 272 | // 客户经理获取基本信息 | 294 | // 客户经理获取基本信息 |
| 273 | getstaffinfo(uid) { | 295 | getstaffinfo(uid) { |
| 274 | console.log('sellerid', this.data.detail.seller.id); | 296 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | {{marketing.wecomle}} | 45 | {{marketing.wecomle}} |
| 46 | </view> | 46 | </view> |
| 47 | </view> | 47 | </view> |
| 48 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 48 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 49 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 49 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 50 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 50 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 51 | <view class="itemsLeft"> | 51 | <view class="itemsLeft"> |
| @@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
| 124 | <view class="lines"></view> | 124 | <view class="lines"></view> |
| 125 | </view> | 125 | </view> |
| 126 | </block> | 126 | </block> |
| 127 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 127 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 128 | <view class="rubric texts"> | 128 | <view class="rubric texts"> |
| 129 | 提前点餐 | 129 | 提前点餐 |
| 130 | </view> | 130 | </view> |
| @@ -139,7 +139,7 @@ | @@ -139,7 +139,7 @@ | ||
| 139 | </view> | 139 | </view> |
| 140 | </view> | 140 | </view> |
| 141 | </view> | 141 | </view> |
| 142 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 142 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 143 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 143 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 144 | 特别优惠 | 144 | 特别优惠 |
| 145 | </view> | 145 | </view> |
| @@ -167,7 +167,7 @@ | @@ -167,7 +167,7 @@ | ||
| 167 | </view> | 167 | </view> |
| 168 | </view> | 168 | </view> |
| 169 | <view class="vips"> | 169 | <view class="vips"> |
| 170 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 170 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 171 | 点击了解更多会员优惠政策 | 171 | 点击了解更多会员优惠政策 |
| 172 | </view> | 172 | </view> |
| 173 | <text class="businessBox"> | 173 | <text class="businessBox"> |
| @@ -46,6 +46,9 @@ Page({ | @@ -46,6 +46,9 @@ Page({ | ||
| 46 | showMoreTip: true, | 46 | showMoreTip: true, |
| 47 | themeColor: '', | 47 | themeColor: '', |
| 48 | whiteBj: false, | 48 | whiteBj: false, |
| 49 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 50 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 51 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 49 | }, | 52 | }, |
| 50 | screenHeight: '', | 53 | screenHeight: '', |
| 51 | /** | 54 | /** |
| @@ -217,11 +220,30 @@ Page({ | @@ -217,11 +220,30 @@ Page({ | ||
| 217 | setTimeout(() => { | 220 | setTimeout(() => { |
| 218 | this.getSellerTemplateConfFun(reserev.sid); | 221 | this.getSellerTemplateConfFun(reserev.sid); |
| 219 | this.getstaffinfo(res.data.uid) | 222 | this.getstaffinfo(res.data.uid) |
| 223 | + this.getSellerVersionFun(reserev.sid); | ||
| 220 | }, 0); | 224 | }, 0); |
| 221 | }).catch(res => { | 225 | }).catch(res => { |
| 222 | console.log(res, '详情请求失败'); | 226 | console.log(res, '详情请求失败'); |
| 223 | }) | 227 | }) |
| 224 | }, | 228 | }, |
| 229 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 230 | + getSellerVersionFun(sellerid){ | ||
| 231 | + App.SellerVersion.GetSellerVersion({ | ||
| 232 | + sellerid | ||
| 233 | + }).then((res) => { | ||
| 234 | + console.log('版本列表',res.data); | ||
| 235 | + if(res.data && res.data.length>0){ | ||
| 236 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 237 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 238 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 239 | + this.setData({ | ||
| 240 | + hasValueOrder, | ||
| 241 | + hasValueCertificate, | ||
| 242 | + hasValueRecharge, | ||
| 243 | + }) | ||
| 244 | + } | ||
| 245 | + }) | ||
| 246 | + }, | ||
| 225 | getstaffinfo(uid) { | 247 | getstaffinfo(uid) { |
| 226 | console.log('sellerid', this.data.detail.seller.id); | 248 | console.log('sellerid', this.data.detail.seller.id); |
| 227 | App.Activity.GetCustomerActivityBaseinfo({ | 249 | App.Activity.GetCustomerActivityBaseinfo({ |
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | </view> | 69 | </view> |
| 70 | </view> | 70 | </view> |
| 71 | </view> | 71 | </view> |
| 72 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 72 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 73 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 73 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 74 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 74 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 75 | <view class="left"> | 75 | <view class="left"> |
| @@ -202,7 +202,7 @@ | @@ -202,7 +202,7 @@ | ||
| 202 | </view> | 202 | </view> |
| 203 | </view> | 203 | </view> |
| 204 | </view> | 204 | </view> |
| 205 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 205 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 206 | <view class="rubric"> | 206 | <view class="rubric"> |
| 207 | 提前点餐 | 207 | 提前点餐 |
| 208 | </view> | 208 | </view> |
| @@ -217,7 +217,7 @@ | @@ -217,7 +217,7 @@ | ||
| 217 | </view> | 217 | </view> |
| 218 | </view> | 218 | </view> |
| 219 | </view> | 219 | </view> |
| 220 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 220 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 221 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 221 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 222 | 特别优惠 | 222 | 特别优惠 |
| 223 | </view> | 223 | </view> |
| @@ -245,7 +245,7 @@ | @@ -245,7 +245,7 @@ | ||
| 245 | </view> | 245 | </view> |
| 246 | </view> | 246 | </view> |
| 247 | <view class="vips"> | 247 | <view class="vips"> |
| 248 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 248 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 249 | 点击了解更多会员优惠政策 | 249 | 点击了解更多会员优惠政策 |
| 250 | </view> | 250 | </view> |
| 251 | <image wx:if="{{marketing && marketing.logo && (!marketing.is_logo || marketing.is_logo!='0')}}" src="{{marketing.logo?marketing.logo:''}}" mode="aspectFill" /> | 251 | <image wx:if="{{marketing && marketing.logo && (!marketing.is_logo || marketing.is_logo!='0')}}" src="{{marketing.logo?marketing.logo:''}}" mode="aspectFill" /> |
| @@ -45,6 +45,9 @@ Page({ | @@ -45,6 +45,9 @@ Page({ | ||
| 45 | showMoreTip: true, | 45 | showMoreTip: true, |
| 46 | themeColor: '', | 46 | themeColor: '', |
| 47 | screenHeight: '', | 47 | screenHeight: '', |
| 48 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 49 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 50 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 48 | }, | 51 | }, |
| 49 | tablestr: '', | 52 | tablestr: '', |
| 50 | urlsValue: [], | 53 | urlsValue: [], |
| @@ -264,11 +267,30 @@ Page({ | @@ -264,11 +267,30 @@ Page({ | ||
| 264 | this.getSellerTemplateConfFun(reserev.sid); | 267 | this.getSellerTemplateConfFun(reserev.sid); |
| 265 | this.getstaffinfo(res.data.uid) | 268 | this.getstaffinfo(res.data.uid) |
| 266 | this.getroomimage(reserev.sid) | 269 | this.getroomimage(reserev.sid) |
| 270 | + this.getSellerVersionFun(reserev.sid); | ||
| 267 | }, 0); | 271 | }, 0); |
| 268 | }).catch(res => { | 272 | }).catch(res => { |
| 269 | console.log(res, '详情请求失败'); | 273 | console.log(res, '详情请求失败'); |
| 270 | }) | 274 | }) |
| 271 | }, | 275 | }, |
| 276 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 277 | + getSellerVersionFun(sellerid){ | ||
| 278 | + App.SellerVersion.GetSellerVersion({ | ||
| 279 | + sellerid | ||
| 280 | + }).then((res) => { | ||
| 281 | + console.log('版本列表',res.data); | ||
| 282 | + if(res.data && res.data.length>0){ | ||
| 283 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 284 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 285 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 286 | + this.setData({ | ||
| 287 | + hasValueOrder, | ||
| 288 | + hasValueCertificate, | ||
| 289 | + hasValueRecharge, | ||
| 290 | + }) | ||
| 291 | + } | ||
| 292 | + }) | ||
| 293 | + }, | ||
| 272 | // 客户经理获取基本信息 | 294 | // 客户经理获取基本信息 |
| 273 | getstaffinfo(uid) { | 295 | getstaffinfo(uid) { |
| 274 | console.log('sellerid', this.data.detail.seller.id); | 296 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
| 64 | </view> | 64 | </view> |
| 65 | </view> | 65 | </view> |
| 66 | </view> | 66 | </view> |
| 67 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 67 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 68 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 68 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 69 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 69 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 70 | <view class="itemLeft"> | 70 | <view class="itemLeft"> |
| @@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
| 146 | <view class="lines"></view> | 146 | <view class="lines"></view> |
| 147 | </view> | 147 | </view> |
| 148 | </view> | 148 | </view> |
| 149 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 149 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 150 | <view class="rubric"> | 150 | <view class="rubric"> |
| 151 | 提前点餐 | 151 | 提前点餐 |
| 152 | </view> | 152 | </view> |
| @@ -161,7 +161,7 @@ | @@ -161,7 +161,7 @@ | ||
| 161 | </view> | 161 | </view> |
| 162 | </view> | 162 | </view> |
| 163 | </view> | 163 | </view> |
| 164 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 164 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 165 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 165 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 166 | 特别优惠 | 166 | 特别优惠 |
| 167 | </view> | 167 | </view> |
| @@ -189,7 +189,7 @@ | @@ -189,7 +189,7 @@ | ||
| 189 | </view> | 189 | </view> |
| 190 | </view> | 190 | </view> |
| 191 | <view class="vips"> | 191 | <view class="vips"> |
| 192 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 192 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 193 | 点击了解更多会员优惠政策 | 193 | 点击了解更多会员优惠政策 |
| 194 | </view> | 194 | </view> |
| 195 | <text class="businessBox"> | 195 | <text class="businessBox"> |
| @@ -45,6 +45,9 @@ Page({ | @@ -45,6 +45,9 @@ Page({ | ||
| 45 | showMoreTip: true, | 45 | showMoreTip: true, |
| 46 | themeColor: '', | 46 | themeColor: '', |
| 47 | screenHeight: '', | 47 | screenHeight: '', |
| 48 | + hasValueOrder:false,//商家是否开通提前点餐功能 | ||
| 49 | + hasValueCertificate:false,//商家是否开通优惠券功能 | ||
| 50 | + hasValueRecharge:false,//商家是否开通充值功能 | ||
| 48 | }, | 51 | }, |
| 49 | tablestr: '', | 52 | tablestr: '', |
| 50 | urlsValue: [], | 53 | urlsValue: [], |
| @@ -263,11 +266,30 @@ Page({ | @@ -263,11 +266,30 @@ Page({ | ||
| 263 | this.getSellerTemplateConfFun(reserev.sid); | 266 | this.getSellerTemplateConfFun(reserev.sid); |
| 264 | this.getstaffinfo(res.data.uid) | 267 | this.getstaffinfo(res.data.uid) |
| 265 | this.getroomimage(reserev.sid) | 268 | this.getroomimage(reserev.sid) |
| 269 | + this.getSellerVersionFun(reserev.sid); | ||
| 266 | }, 0); | 270 | }, 0); |
| 267 | }).catch(res => { | 271 | }).catch(res => { |
| 268 | console.log(res, '详情请求失败'); | 272 | console.log(res, '详情请求失败'); |
| 269 | }) | 273 | }) |
| 270 | }, | 274 | }, |
| 275 | + // 获取商家版本,不是超能版或者没有开通对应模块,不显示 | ||
| 276 | + getSellerVersionFun(sellerid){ | ||
| 277 | + App.SellerVersion.GetSellerVersion({ | ||
| 278 | + sellerid | ||
| 279 | + }).then((res) => { | ||
| 280 | + console.log('版本列表',res.data); | ||
| 281 | + if(res.data && res.data.length>0){ | ||
| 282 | + const hasValueOrder = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '6'); | ||
| 283 | + const hasValueCertificate = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '8'); | ||
| 284 | + const hasValueRecharge = res.data.some(item => item.vid == '1' || item.vid == '2' || item.vid == '3' || item.vid == '9'); | ||
| 285 | + this.setData({ | ||
| 286 | + hasValueOrder, | ||
| 287 | + hasValueCertificate, | ||
| 288 | + hasValueRecharge, | ||
| 289 | + }) | ||
| 290 | + } | ||
| 291 | + }) | ||
| 292 | + }, | ||
| 271 | // 客户经理获取基本信息 | 293 | // 客户经理获取基本信息 |
| 272 | getstaffinfo(uid) { | 294 | getstaffinfo(uid) { |
| 273 | console.log('sellerid', this.data.detail.seller.id); | 295 | console.log('sellerid', this.data.detail.seller.id); |
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | </view> | 51 | </view> |
| 52 | </view> | 52 | </view> |
| 53 | </view> | 53 | </view> |
| 54 | - <view class="preferential" wx:if="{{marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> | 54 | + <view class="preferential" wx:if="{{hasValueCertificate && marketing && marketing.is_coupon=='1' && coupon_dataList.length>0}}"> |
| 55 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> | 55 | <block wx:for="{{coupon_dataList}}" wx:key="index" wx:for-index="index"> |
| 56 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> | 56 | <view class="preferentialItems" wx:if="{{dataStr<(item.etime*1)}}"> |
| 57 | <view class="itemLeft"> | 57 | <view class="itemLeft"> |
| @@ -133,7 +133,7 @@ | @@ -133,7 +133,7 @@ | ||
| 133 | <view class="lines"></view> | 133 | <view class="lines"></view> |
| 134 | </view> | 134 | </view> |
| 135 | </view> | 135 | </view> |
| 136 | - <view class="specialServices" wx:if="{{detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> | 136 | + <view class="specialServices" wx:if="{{hasValueOrder && detail && detail.seller.is_open_order==1 && marketing && marketing.is_order=='1'}}"> |
| 137 | <view class="rubric"> | 137 | <view class="rubric"> |
| 138 | 提前点餐 | 138 | 提前点餐 |
| 139 | </view> | 139 | </view> |
| @@ -148,7 +148,7 @@ | @@ -148,7 +148,7 @@ | ||
| 148 | </view> | 148 | </view> |
| 149 | </view> | 149 | </view> |
| 150 | </view> | 150 | </view> |
| 151 | - <view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> | 151 | + <view class="preferential" wx:if="{{hasValueRecharge && marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}"> |
| 152 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> | 152 | <view class="rubric rubric1" wx:if="{{marketing && marketing.is_recharge=='1' && recharge_data && (is_fix!='1' || (is_fix=='1' && dataStr<(recharge_data.exp_date.fix_edate*1)))}}"> |
| 153 | 特别优惠 | 153 | 特别优惠 |
| 154 | </view> | 154 | </view> |
| @@ -176,7 +176,7 @@ | @@ -176,7 +176,7 @@ | ||
| 176 | </view> | 176 | </view> |
| 177 | </view> | 177 | </view> |
| 178 | <view class="vips"> | 178 | <view class="vips"> |
| 179 | - <view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> | 179 | + <view wx:if="{{hasValueRecharge && marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList"> |
| 180 | 点击了解更多会员优惠政策 | 180 | 点击了解更多会员优惠政策 |
| 181 | </view> | 181 | </view> |
| 182 | <text class="businessBox"> | 182 | <text class="businessBox"> |
| @@ -730,5 +730,10 @@ export default { | @@ -730,5 +730,10 @@ export default { | ||
| 730 | 'App.SaiYouYun.SendIntention':{ | 730 | 'App.SaiYouYun.SendIntention':{ |
| 731 | openid:'openid' | 731 | openid:'openid' |
| 732 | }, | 732 | }, |
| 733 | - | 733 | + |
| 734 | + // 获取商家的版本信息 | ||
| 735 | + 'App.SellerVersion.GetSellerVersion':{ | ||
| 736 | + openid:'openid' | ||
| 737 | + }, | ||
| 738 | + | ||
| 734 | } | 739 | } |
-
Please register or login to post a comment