Commit 8ec4a7d0b0f121d228514847a9b3b153b5edb4ad

Authored by pengye
1 parent 500c5179

邀请函样式修改、券问题处理

... ... @@ -378,7 +378,7 @@ Page({
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ... @@ -389,8 +389,8 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ...
... ... @@ -114,19 +114,19 @@
</view>
</view>
<!-- 主厨介绍图文分开 -->
<view class="introduce famousChefBox" wx:if="{{chef}}">
<view class="introduce famousChefBox" wx:if="{{chef && (!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="imgMask">
<view class="IntroduceColor" wx:if="{{(!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="chefText font36r">主厨介绍</view>
<view class="IntroduceColor">
<view class="chefText font36r" wx:if="{{chef.is_introduce || chef.is_images}}">主厨介绍</view>
<view class="labelBox" wx:if="{{!chef.is_introduce || chef.is_introduce!='0'}}">
<text class="texts">{{chef.introduce}}
</text>
</view>
</view>
<block wx:if="{{!chef.is_images || chef.is_images!='0'}}">
<block wx:if="{{(!chef.is_images || chef.is_images!='0') && chef.image}}">
<image src="{{chef.image}}" mode="aspectFill" />
</block>
<view class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
<view wx:if="{{chef.is_introduce || chef.is_images}}" class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
</view>
</view>
<!-- 菜品展示 swich为1展示 -->
... ...
... ... @@ -269,7 +269,7 @@
}
.preferential {
margin: 0 40rpx 20rpx 40rpx;
margin: 0 40rpx;
}
.rubric1 {
... ... @@ -353,6 +353,7 @@
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
margin-top: 20rpx;
}
.favouredPolicy {
... ...
... ... @@ -379,7 +379,7 @@ Page({
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ... @@ -390,8 +390,8 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ...
... ... @@ -122,19 +122,19 @@
</view>
</view>
<!-- 主厨介绍图文分开 -->
<view class="introduce famousChefBox" wx:if="{{chef}}">
<view class="introduce famousChefBox" wx:if="{{chef && (!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="imgMask">
<view class="IntroduceColor" wx:if="{{(!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="chefText font36r">主厨介绍</view>
<view class="IntroduceColor">
<view class="chefText font36r" wx:if="{{chef.is_introduce || chef.is_images}}">主厨介绍</view>
<view class="labelBox" wx:if="{{!chef.is_introduce || chef.is_introduce!='0'}}">
<text class="texts">{{chef.introduce}}
</text>
</view>
</view>
<block wx:if="{{!chef.is_images || chef.is_images!='0'}}">
<block wx:if="{{(!chef.is_images || chef.is_images!='0') && chef.image}}">
<image src="{{chef.image}}" mode="aspectFill" />
</block>
<view class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
<view wx:if="{{chef.is_introduce || chef.is_images}}" class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
</view>
</view>
<!-- 菜品展示 swich为1展示 -->
... ...
... ... @@ -310,7 +310,7 @@
}
.preferential {
margin: 16rpx 40rpx 20rpx 40rpx;
margin: 16rpx 40rpx 0 40rpx;
}
.rubric1 {
... ... @@ -393,6 +393,7 @@
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
margin-top: 20rpx;
}
.favouredPolicy {
... ...
... ... @@ -379,7 +379,7 @@ Page({
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ... @@ -390,8 +390,8 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ...
... ... @@ -101,18 +101,18 @@
</view>
</block>
<!-- 主厨介绍图文分开 -->
<block wx:if="{{chef}}">
<block wx:if="{{chef && (!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="imgMask">
<view class="IntroduceColor noneBor" wx:if="{{(!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="text font36r rubric texts">主厨介绍</view>
<view class="IntroduceColor noneBor">
<view class="text font36r rubric texts" wx:if="{{chef.is_introduce || chef.is_images}}">主厨介绍</view>
<view class="labelBox font24r" wx:if="{{!chef.is_introduce || chef.is_introduce!='0'}}">
{{chef.introduce}}
</view>
</view>
<block wx:if="{{!chef.is_images || chef.is_images!='0'}}">
<block wx:if="{{(!chef.is_images || chef.is_images!='0') && chef.image}}">
<image src="{{chef.image}}" mode="aspectFill" />
</block>
<view class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
<view wx:if="{{chef.is_introduce || chef.is_images}}" class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
</view>
</block>
<block wx:if="{{signboard && signboard.swich=='1'}}">
... ...
... ... @@ -265,7 +265,7 @@
}
.preferential {
margin: 0 40rpx 20rpx 40rpx;
margin: 0 40rpx;
}
.preferentialItems {
... ... @@ -351,6 +351,7 @@
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
margin-top: 20rpx;
}
.vips .news {
... ...
... ... @@ -378,7 +378,7 @@ Page({
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ... @@ -389,8 +389,8 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ...
... ... @@ -96,18 +96,18 @@
</view>
</block>
<!-- 主厨介绍图文分开 -->
<block wx:if="{{chef}}">
<block wx:if="{{chef && (!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="imgMask">
<view class="IntroduceColor noneBor" wx:if="{{(!chef.is_introduce || chef.is_introduce!='0') || (!chef.is_images || chef.is_images!='0')}}">
<view class="text font36r rubric texts">主厨介绍</view>
<view class="IntroduceColor noneBor">
<view class="text font36r rubric texts" wx:if="{{chef.is_introduce || chef.is_images}}">主厨介绍</view>
<view class="labelBox font24r" wx:if="{{!chef.is_introduce || chef.is_introduce!='0'}}">
{{chef.introduce}}
</view>
</view>
<block wx:if="{{!chef.is_images || chef.is_images!='0'}}">
<block wx:if="{{(!chef.is_images || chef.is_images!='0') && chef.image}}">
<image src="{{chef.image}}" mode="aspectFill" />
</block>
<view class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
<view wx:if="{{chef.is_introduce || chef.is_images}}" class="{{(!chef.is_images || chef.is_images!='0')?'lines':'lines mtnone'}}"></view>
</view>
</block>
<block wx:if="{{signboard && signboard.swich=='1'}}">
... ...
... ... @@ -165,7 +165,7 @@
.imgMask {
position: relative;
margin: 0 20rpx;
margin: 16rpx 20rpx 0 20rpx;
}
.lines {
... ... @@ -454,7 +454,7 @@
}
.evaluateBox {
margin: 16rpx 84rpx 16rpx 40rpx;
margin: 0 84rpx 16rpx 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
... ...
... ... @@ -324,9 +324,9 @@ Page({
}
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
coupon.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
... ... @@ -336,10 +336,10 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
let cash = item.use.cash * 1;
let price = item.price * 1;
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
item.discount = cash != 0 ? ((price / cash) * 10).toFixed(1) : '';
}
... ...
... ... @@ -378,7 +378,7 @@ Page({
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ... @@ -389,8 +389,8 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ...
... ... @@ -274,7 +274,7 @@
}
.preferential {
margin: 20rpx 40rpx;
margin: 20rpx 40rpx 0 40rpx;
}
.rubric1 {
... ... @@ -357,6 +357,7 @@
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
margin-top: 20rpx;
}
.favouredPolicy {
... ...
... ... @@ -377,7 +377,7 @@ Page({
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if (coupon && util.getType(coupon) == 'object') {
coupon.stringifyUse = JSON.stringify(coupon.use)
if (marketing.is_coupon == '1' && coupon && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
if (marketing.is_coupon == '1' && coupon && coupon.use && (!coupon.use.is_cash || coupon.use.is_cash == '1')) {
let cash = coupon.use.cash * 1;
let price = coupon.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ... @@ -388,8 +388,8 @@ Page({
if (coupon && util.getType(coupon) == 'array') {
if (coupon.length > 0) {
coupon.forEach(item => {
item.stringifyUse = JSON.stringify(item.use)
if ((!item.use.is_cash || item.use.is_cash == '1')) {
item.stringifyUse = item.use?JSON.stringify(item.use):'';
if ((item.use && (!item.use.is_cash || item.use.is_cash == '1'))) {
let cash = item.use.cash * 1;
let price = item.price * 1;
console.log('cash', cash + '---' + 'price', price + '---' + 'discount', ((price / cash) * 10).toFixed(1));
... ...
... ... @@ -297,7 +297,7 @@
}
.preferential {
margin: 20rpx 40rpx;
margin: 20rpx 40rpx 0 40rpx;
}
.rubric1 {
... ... @@ -380,6 +380,7 @@
justify-content: center;
align-items: center;
padding-bottom: 180rpx;
margin-top: 20rpx;
}
.favouredPolicy {
... ...