//logs.js
var util = require('../../utils/util.js')
var sliderWidth = 190// 需要设置slider的宽度,用于计算中间位置
// 最大行数
var max_row_height = 5;
// 行高
var food_row_height = 50;
// 底部栏偏移量
var cart_offset = 90;
Page({
data: {
logs: [],
tabs: ["今日菜单", "我的订单"],
activeIndex: 0,
sliderOffset: 0,
sliderLeft: 0,
sliderWidth: 0.5,
// 右菜单
menu_list: [],
// 左菜单
foodList: [],//展示菜品
allFoodList: [],//所有获取到的菜品
//我的订单列表
orderList: [],
// 购物车
cartList: [],
hasList: false,// 列表是否有数据
totalPrice: 0,// 总价,初始为0
totalNum: 0, //总数,初始为0
// 购物车动画
animationData: {},
animationMask: {},
maskVisual: "hidden",
maskFlag: true,
// 左右两侧菜单的初始显示次序
curNav: 0,
//判断是否登录会员
loginFlag: true,
//判断是否已经发送验证码
sendingF: false,
// 倒计时时间
second: 60,
},
onLoad: function (options) {
var that = this
// 获取购物车缓存数据
var arr = wx.getStorageSync('cart') || [];
// 左分类菜单
var menu_list = this.data.menu_list;
// 获取左侧分类菜单数据
var categories = [
{
"id": 0,
"name": "全部"
},
{
"id": 9,
"name": "活动品"
},
{
"id": 1,
"name": "汤·粥"
},
{
"id": 2,
"name": "热菜"
},
{
"id": 5,
"name": "面点"
},
{
"id": 6,
"name": "特色"
},
{
"id": 7,
"name": "小吃"
},
{
"id": 8,
"name": "水吧"
}
]
that.setData({
menu_list: categories,
})
// 右菜品菜单
var foodList = this.data.foodList;
var allFoodList = this.data.allFoodList;
// 购物车总量、总价
var totalPrice = this.data.totalPrice
var totalNum = this.data.totalNum
// 获取右侧菜品列表数据
var resFood = [
{
"id": 6,
"name": "美地麻辣小龙虾",
"thumb": "",
"imageUrl":"../../image/1.jpg",
"price": "98.00",
"unit": "份",
"catid": 6,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 7,
"name": "水吧鸡尾酒",
"thumb": "",
"imageUrl": "../../image/2.jpg",
"price": "39.00",
"unit": "杯",
"catid": 8,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 9,
"name": "九塔香辣子鸡",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "68.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 10,
"name": "跳舞茄盒",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "40.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 12,
"name": "土匪猪肝",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "40.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 13,
"name": "小炒黄牛肉",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "58.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 14,
"name": "小酥肉",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "19.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 15,
"name": "橄榄油腊鲜有机花菜\t",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "28.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 19,
"name": "榴莲面包",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "29.80",
"unit": "份",
"catid": 5,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 20,
"name": "泡芙",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "6.00",
"unit": "斤",
"catid": 5,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 21,
"name": "手撕包菜",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "19.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 22,
"name": "糖醋里脊",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "97.90",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 24,
"name": "我是热菜区的new菜",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "25.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 25,
"name": "美地麻辣小龙虾",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "125.00",
"unit": "份",
"catid": 6,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 26,
"name": "美地甜点",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "20.00",
"unit": "15",
"catid": 7,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 27,
"name": "特色小龙虾",
"thumb": "/uploads/20178/201708311002557FPpnEyE.jpg",
"imageUrl": "../../image/3.jpg",
"price": "89.90",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 28,
"name": "雕黄醉蟹钳",
"thumb": "/uploads/20178/20170831165625IyWlwdFM.jpg",
"imageUrl": "../../image/3.jpg",
"price": "48.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 29,
"name": "雕黄醉蟹钳1",
"thumb": "/uploads/20178/20170831165711bLN478bK.jpg",
"imageUrl": "../../image/3.jpg",
"price": "48.00",
"unit": "份",
"catid": 2,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 30,
"name": "百合莲子红豆露",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "32.00",
"unit": "扎",
"catid": 8,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 31,
"name": "屈臣氏香草苏打水",
"thumb": "",
"imageUrl": "../../image/3.jpg",
"price": "15.00",
"unit": "瓶",
"catid": 8,
"sales": 0,
"note": "",
"quantity": 0
},
{
"id": 32,
"name": "赫默父子夏瑟尼蒙哈榭干白",
"thumb": "",
没有合适的资源?快使用搜索试试~ 我知道了~
点餐小程序(优化版)
共80个文件
png:35个
json:12个
wxss:11个
4星 · 超过85%的资源 需积分: 44 396 下载量 19 浏览量
2018-07-03
16:16:39
上传
评论 69
收藏 197KB ZIP 举报
温馨提示
这是一款点餐小程序,里面包含主页,购物车,订单页面,支付模拟,最重要是都是纯静态的,没有接入后台,完全是通过缓存数据进行操作,页面绝对好看,不好看不要积分(添加了登录页面,个人中心,购物车的基本操作,界面更加好看)
资源推荐
资源详情
资源评论
收起资源包目录
daincan.zip (80个子文件)
daincan
新建文件夹
app.js 2KB
project.config.json 430B
list.json 4KB
utils
util.js 481B
image
success.png 3KB
add.png 2KB
addr-line.png 826B
home-off.png 1KB
addr-active.png 1KB
addr-edit.png 1KB
index-active.png 725B
dizhi.png 2KB
home-on.png 1KB
箭头.png 274B
order.png 721B
qianbao.png 954B
order-active.png 736B
logo60.png 2KB
delete.png 1KB
cart-off.png 1KB
hongbao.png 1KB
mine.png 1KB
add-addr.png 2KB
3.jpg 34KB
noP.gif 3KB
sopCart.png 5KB
ico-addr.png 2KB
mine-active.png 1KB
shopCart.png 5KB
1.jpg 24KB
kefu.png 1KB
index.png 702B
header.png 6KB
zuanshi.png 1KB
reduce.png 2KB
shangcheng.png 1KB
jinbi.png 3KB
cart-on.png 1KB
2.jpg 27KB
arrow-right.png 567B
ico-add-addr.png 1KB
shopart.png 7KB
cart.png 2KB
weui.wxss 18KB
categories.json 460B
common.wxss 3KB
pages
login
login.js 2KB
login.wxml 694B
login.json 49B
login.wxss 598B
confirmOrder
confirmOrder.wxml 5KB
confirmOrder.json 48B
confirmOrder.wxss 4KB
confirmOrder.js 5KB
mine
mine.js 1KB
mine.wxml 2KB
mine.wxss 1KB
mine.json 36B
index
index.wxml 365B
index.js 517B
index.wxss 288B
index.json 2B
order
order.wxml 2KB
order.wxss 3KB
order.js 897B
order.json 43B
message
message.wxss 926B
message.wxml 1KB
message.json 48B
message.js 1KB
logs
logs.wxml 179B
logs.js 276B
logs.wxss 114B
logs.json 54B
home
home.wxml 6KB
home.js 23KB
home.json 38B
home.wxss 7KB
app.json 1KB
app.wxss 459B
共 80 条
- 1
喵喵简历
- 粉丝: 367
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页