// pages/home / home.js
var app = getApp()
Page({
data: {
navbar: ['今世缘', '国缘', '高沟', '红酒'],
currentTab: 0,
// banner
imgUrls: [
"http://jsyxqj.img-cn-hangzhou.aliyuncs.com/wsc/2017/07/18/c0302b416d314a25a7c785e5ae4b13a4.jpg",
"http://m.jinshiyuan.com.cn/images/jsy_customized/banner4.jpg",
"http://jsyxqj.img-cn-hangzhou.aliyuncs.com/wsc/2018/06/27/45636820b22d4b779093b4de063547e1.jpg"
],
indicatorDots: true, //是否显示面板指示点
autoplay: true, //是否自动切换
interval: 3000, //自动切换时间间隔,3s
duration: 1000, // 滑动动画时长1s
// navItems
navItems: [
{
typeId: 0,
name: '品牌馆',
url: 'bill',
imageurl: 'http://m.jinshiyuan.com.cn/images/kingsluck/c.png',
},
{
typeId: 1,
name: '类目',
url: 'bill',
imageurl: 'http://m.jinshiyuan.com.cn/images/kingsluck/d.png',
},
{
typeId: 2,
name: '特惠专场',
url: 'bill',
imageurl: 'http://m.jinshiyuan.com.cn/images/kingsluck/f.png'
},
{
typeId: 3,
name: '推荐好友',
url: 'bill',
imageurl: 'http://m.jinshiyuan.com.cn/images/kingsluck/all.png'
}
],
// 新品上架
goodsItems: [
{
goodId: 0,
name: '【今世缘A3】42度浓香型白酒750ml',
url: 'bill',
imageurl: 'http://jsyxqj.img-cn-hangzhou.aliyuncs.com/goods/main/101374_1.jpg',
newprice: "¥200.00",
oldprice: "¥300.00",
},
{
goodId: 1,
name: '【今世缘典藏15】 41.8度柔雅型500ml',
url: 'bill',
imageurl: 'http://jsyxqj.img-cn-hangzhou.aliyuncs.com/goods/main/100121_1.jpg',
newprice: "¥120.00",
oldprice: "¥200.00",
},
{
goodId: 2,
name: '2.42度今世缘典藏福缘(宝贝回家)',
url: 'bill',
imageurl: 'http://jsyxqj.img-cn-hangzhou.aliyuncs.com/goods/main/101580_1.jpg',
newprice: "¥320.00",
oldprice: "¥400.00",
},
{
goodId: 3,
name: '【今世缘典藏10】 42度浓香型白酒',
url: 'bill',
imageurl: 'http://jsyxqj.img-cn-hangzhou.aliyuncs.com/goods/main/101217_1.jpg',
newprice: "¥350.00",
oldprice: "¥850.00",
},
{
goodId: 4,
name: '【今世缘典藏5】 42度浓香型白酒',
url: 'bill',
imageurl: 'http://jsyxqj.img-cn-hangzhou.aliyuncs.com/goods/main/101219_1.jpg',
newprice: "¥30.00",
oldprice: "¥80.00",
}, {
goodId: 5,
name: '2.5L58度今世缘封坛酒',
url: 'bill',
imageurl: 'http://jsyxqj.img-cn-hangzhou.aliyuncs.com/goods/main/101498_1.jpg',
newprice: "¥300.00",
oldprice: "¥800.00",
}
],
newgoods_head_url: "http://jsyxqj.img-cn-hangzhou.aliyuncs.com/wsc/2018/08/03/5bfa11dc28234bffbbf05637fbc1e175.jpg",
// 新品上架
recommends: [
{
goodId: 7,
name: 'OLAY玉兰油精油沐浴露玫瑰滋养二合一450ml',
url: 'bill',
imageurl: 'http://mz.djmall.xmisp.cn/files/product/20161213/148162245074.jpg',
newprice: "¥36.60",
oldprice: "¥40.00",
},
{
goodId: 10,
name: '兰蔻玫瑰清滢保湿柔肤水嫩肤水化妆水400ml补水保湿温和不刺激',
url: 'bill',
imageurl: 'http://mz.djmall.xmisp.cn/files/product/20161201/148057937593.jpg',
newprice: "¥30.00",
oldprice: "¥80.00",
}, {
goodId: 11,
name: 'Lancome/兰蔻清莹柔肤爽肤水/粉水400ml补水保湿玫瑰水化妆水',
url: 'bill',
imageurl: 'http://mz.djmall.xmisp.cn/files/product/20161201/148057953326.jpg',
newprice: "¥30.00",
oldprice: "¥80.00",
},
{
goodId: 12,
name: '美国CLINIQUE倩碧黄油无油/特效润肤露125ml',
url: 'bill',
imageurl: 'http://mz.djmall.xmisp.cn/files/product/20161201/14805828016.jpg',
newprice: "¥239.00",
oldprice: "¥320.00",
},
{
goodId: 13,
name: '法国LANCOME兰蔻柔皙轻透隔离防晒乳霜50ML2017年3月到期',
url: 'bill',
imageurl: 'http://mz.djmall.xmisp.cn/files/product/20161201/148058014894.jpg',
newprice: "¥130.00",
oldprice: "¥180.00",
},
],
},
// 导航切换监听
navbarTap: function (e) {
console.debug(e);
this.setData({
currentTab: e.currentTarget.dataset.idx
})
},
})