Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pages/brand/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ Page({
});
}
})
},

onReady: function(options) {
console.log('************************');
console.log(options);
console.log('************************');
}

})
6 changes: 5 additions & 1 deletion pages/classify/index.wxml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<view class="container">
<view class="nav_left">
<block wx:for="{{navLeftItems}}">
<view class="nav_left_items {{curNav == item.id ? 'active' : ''}}" bindtap="switchRightTab" data-index="{{index}}" data-id="{{item.id}}">{{item.tree.desc}}</view>
<view class="nav_left_items {{curNav == item.id ? 'active' : ''}}"
bindtap="switchRightTab"
data-index="{{index}}"
data-id="{{item.id}}">{{item.tree.desc}}
</view>
</block>
</view>
<view class="nav_right">
Expand Down
26 changes: 11 additions & 15 deletions pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Page({
autoplay: true,
interval: 3000,
duration: 1000,
loadingHidden: false // loading
circular: true,
hasGotSliderDatas: false,
hasGotVenuesDatas: false,
hasChoiceGotDatas: false
},

//事件处理函数
Expand All @@ -34,9 +37,10 @@ Page({
header: {
'Accept': 'application/json'
},
success: function(res) {
success: function (res) {
that.setData({
images: res.data
images: res.data,
hasGotSliderDatas: true
})
}
})
Expand All @@ -51,13 +55,9 @@ Page({
},
success: function(res) {
that.setData({
venuesItems: res.data.data
venuesItems: res.data.data,
hasGotVenuesDatas: true
})
setTimeout(function () {
that.setData({
loadingHidden: true
})
}, 1500)
}
})

Expand All @@ -71,13 +71,9 @@ Page({
},
success: function(res) {
that.setData({
choiceItems: res.data.data.dataList
choiceItems: res.data.data.dataList,
hasChoiceGotDatas: true
})
setTimeout(function () {
that.setData({
loadingHidden: true
})
}, 1500)
}
})

Expand Down
15 changes: 11 additions & 4 deletions pages/index/index.wxml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<!--index.wxml-->
<view class="container">
<view>
<swiper class="swiper_box" indicator-dots="{{indicatorDots}}" vertical="{{vertical}}"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperchange">
<swiper class="swiper_box"
indicator-dots="{{indicatorDots}}"
vertical="{{vertical}}"
autoplay="{{autoplay}}"
interval="{{interval}}"
duration="{{duration}}"
bindchange="swiperchange"
circular="{{circular}}">
<block wx:for="{{images}}">
<swiper-item>
<image src="{{item.picurl}}" class="slide-image"/>
<image wx:if="{{item.picurl}}" src="{{item.picurl}}" class="slide-image"></image>
<image wx:else src= "http://placeholder.qiniudn.com/100x50" class="slide-image"></image>
</swiper-item>
</block>
</swiper>
Expand Down Expand Up @@ -46,7 +53,7 @@
</view>
</view>

<loading hidden="{{loadingHidden}}">
<loading hidden="{{hasGotSliderDatas && hasGotVenuesDatas && hasChoiceGotDatas}}">
加载中...
</loading>

Expand Down
1 change: 0 additions & 1 deletion pages/index/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ view.text:before {

.line_flag {
width: 3px;
height: 100%;
height: 15px;
display: inline-block;
background-color: #f9f027;
Expand Down
1 change: 0 additions & 1 deletion pages/list/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<block wx:for="{{list}}">
<navigator url="../details/index?id={{item.id}}">
<view class="brand_item">

<image src="{{item.goodspics}}" class="pic"></image>
<view class="right_cont">
<text class="country">{{item.country}}直采 {{item.bigname}}发货</text>
Expand Down
27 changes: 27 additions & 0 deletions project.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"description": "项目配置文件。",
"setting": {
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true
},
"compileType": "weapp",
"libVersion": "1.5.4",
"appid": "wx0f7b2572e5e3363b",
"projectname": "mall",
"condition": {
"weapp": {
"current": -1,
"list": []
},
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
}
}
}