Commit 7eb92c21f290bd3b0862264c627d45768ced5da6

Authored by yiren
1 parent b6c96dca

我的卡券入口

... ... @@ -43,14 +43,14 @@
<view class="notice" wx:if="{{shownotice==true}}"></view>
</view>
</block>
<block wx:if="{{'pages/me/coupon'!=url}}">
<view class="menu-item white-font font30r smooth flex-vc {{menuhidden ? '' : 'menu-item-card-active'}}" bindtap="topage" data-path="/pages/me/coupon">
<block wx:if="{{'pages/me/coupon_news'!=url}}">
<view class="menu-item white-font font30r smooth flex-vc {{menuhidden ? '' : 'menu-item-card-active'}}" bindtap="topage" data-path="/pages/me/coupon_news">
<view>卡包</view>
<view>({{user.customer_activity}})</view>
</view>
</block>
<block wx:else>
<view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-card-active'}}" data-path="/pages/me/coupon">
<view class="menu-item gray-font font30r smooth flex-cc {{menuhidden ? '' : 'menu-item-card-active'}}" data-path="/pages/me/coupon_news">
<view>卡包</view>
<view>({{user.customer_activity}})</view>
</view>
... ...
... ... @@ -9,6 +9,7 @@ Page({
probablyPrice: '',
sellerid: '',
notes: '',
noData: false,
},
/**
* 生命周期函数--监听页面加载
... ... @@ -16,6 +17,7 @@ Page({
onLoad(options) {
console.log('options', options);
let obj = JSON.parse(options.obj);
let noData = false;
let cookbooklist = JSON.parse(options.cookbooklist);
let probablyPrice = 0;
cookbooklist.forEach(items => {
... ... @@ -24,6 +26,7 @@ Page({
let price = item.quantum * 1 * (item.price * 1);
probablyPrice += price;
if (item.quantum > 0) {
noData = true
items.is_show = true
}
})
... ... @@ -32,19 +35,22 @@ Page({
cookbooklist,
sellerName: obj.sellerName,
sellerid: obj.sellerid,
probablyPrice
probablyPrice,
noData
})
},
// 确认下单
determineFun() {
let obj = {
sellerName: this.data.sellerName,
sellerid: this.data.sellerid,
notes: this.data.notes
if (this.data.noData) {
let obj = {
sellerName: this.data.sellerName,
sellerid: this.data.sellerid,
notes: this.data.notes
}
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?cookbooklist=${JSON.stringify(this.data.cookbooklist)}&obj=${JSON.stringify(obj)}`,
})
}
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?cookbooklist=${JSON.stringify(this.data.cookbooklist)}&obj=${JSON.stringify(obj)}`,
})
},
// 加
addDdish() {
... ...
... ... @@ -37,9 +37,9 @@
</block>
</block>
</view>
<view class="probably">预计金额:{{probablyPrice}}元</view>
<view wx:if="{{noData}}" class="probably">预计金额:{{probablyPrice}}元</view>
</scroll-view>
<view class="btns flex-cc">
<button class="font32r continue flex-cc" bindtap="continueOrdering">继续点菜</button>
<button class="font32r determine flex-cc" bindtap="determineFun">确认下单</button>
<button class="font32r flex-cc {{noData?'determine':'determine1'}}" bindtap="determineFun">确认下单</button>
</view>
\ No newline at end of file
... ...
... ... @@ -111,5 +111,9 @@ page {
.determine {
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
.determine1 {
background: #DBDBDB;
color:#BFC4D4;
}
\ No newline at end of file
... ...