Project Progress 08

1. Today's work:

   Today, addition and subtraction functions to achieve the dishes, and you can click the button displayed on the shopping cart. In addition also added a home page slide.

Code: http: //202.119.84.104: 8088 / Ljy02 / etb

 

2. Tomorrow Plan:

  Ready to submit orders to increase page tomorrow. Including a lower display the set of dishes and prices, as well as display line to pay, so that our customers ordering a preliminary molding process.

3. Today Summary:

 This morning has been downloaded getlab, but always at a speed of a few kb, and 70 percent faster when finished next direct stopped, successive, and later had to move to four-station computer before is finished. Afternoon make a la carte page on the micro-channel developer tools, we found a small program that reduced the normal function buttons dish always adds a menu to appear later. So these two components can not be defined in parallel, to set the trigger method enables the user clicks the button after dish appears cut dish food to eat. Solve the code is as follows:

if (params.types == 'onemore') {
let orders = wx.getStorageSync('orders'),
dishes = this.data.dishes;
let order = {},
needcost, totalcost, totalnum;
for (let i = 0; i < orders.length; i++) {
if (orders[i].sid == params.sid) {
order = JSON.parse(JSON.stringify(orders[i].orderLists));
totalcost = orders[i].cost;
totalnum orders = [i] .totalnum;
break;
}
}
// change dishnum

for (let j = 0; j < order.length; j++) {
for (let i = 0; i < dishes.length; i++) {
if (dishes[i].id == order[j].mid) {
console.log(order[j].num);
dishes[i].dishNum = order[j].num;
break;
}
}
}
needcost = (this.data.currentSto.startDispatch - totalcost).toFixed(1);
this.setData({
orderList: order,
dishes,
totalnum,
totalcost,
needcost,
cartSvg: '/img/cart.svg',
orderDetail: true
})
}

Guess you like

Origin www.cnblogs.com/ysf0743/p/11413406.html