Commit 50efee182919442a287cae28b7b9a2c108a299c7

Authored by vking
1 parent ae6477b5

fix map & api

... ... @@ -10,7 +10,7 @@ Page({
* 页面的初始数据
*/
data: {
list: [],
list: [[],[],[],[],[]],
total: 0,
tabType:1,
hasMore:true,
... ... @@ -55,8 +55,9 @@ Page({
},
getListData() {
let tabType=this.tabType
App.Customer.GetMyOrder({
type: this.tabType,
type: tabType,
openid: getApp().openid,
offset:this.offset,
limit:this.limit,
... ... @@ -68,7 +69,7 @@ Page({
this.offset+=this.limit
}
this.setData({
list: this.data.list.concat(data),
[`list[`+tabType+`]`]: this.data.list[tabType].concat(data),
hasMore:this.hasMore
})
if(res.data.length==0){
... ... @@ -129,7 +130,7 @@ Page({
this.tabType=util.attr(e,'type')
this.setData({
tabType:this.tabType,
list: [],
list: [[],[],[],[],[]],
hasMore:false
})
this.getListData()
... ...
... ... @@ -14,7 +14,7 @@
</view>
</block>
<block wx:else="">
<block wx:for="{{list}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
<block wx:for="{{list[tabType]}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
<view class="card">
<card
hasShowStatus bindevent="gotoDetail"
... ... @@ -23,7 +23,7 @@
</block>
</block>
</view>
<block wx:if="{{list.length==0 && rsl.length>0}}">
<block wx:if="{{list[tabType].length==0 && rsl.length>0}}">
<view class="rsl-block">
<view class="line-push">为你推荐</view>
<view class="transverse-list">
... ...
... ... @@ -47,7 +47,7 @@ class rpcm {
set(key,type='',res=null) {
let nt = new Date().getTime()
this.tasks[key] = {
timeout: nt + 5000
timeout: nt + 1000
}
if(type){
this.tasks[key]['type']=type
... ...