This commit is contained in:
2019-12-19 15:27:30 +08:00
parent fc42af178c
commit 79afb38a63
6 changed files with 25 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
list:[1,1,1],
list:[],
userid:0
},
@@ -21,6 +21,9 @@ Page({
}
}).then((res)=>{
console.log(res)
this.setData({
list:res.data.result
})
})
},
onLoad: function(options) {

View File

@@ -1,6 +1,6 @@
<view class="shopping">
<view class="item" wx:for="{{list}}" wx:for-index="j" wx:if = "{{item == 1}}" wx:key="{{j}}">
<shopping-item shopname="J`adore - Dior" shopdesc="30支 1.30kg" price="61.78"></shopping-item>
<view class="item" wx:for="{{list}}" wx:for-index="j" wx:key="{{j}}">
<shopping-item shopname="{{item.goods_name}}" shopdesc="{{item.spec_key_name||'默认规格'}}" price="{{item.goods_price}}" pic="{{item.image}}"></shopping-item>
</view>
<!-- <view class="item">
<shopping-item shopname="J`adore - Dior" shopdesc="30支 1.30kg" price="61.78"></shopping-item>