添加登录接口

This commit is contained in:
2023-05-08 11:12:18 +08:00
parent c15952e9bc
commit 8e3beb44d9
4 changed files with 81 additions and 3 deletions

View File

@@ -113,6 +113,9 @@ Page({
}
console.log(item1.materials_str)
}
this.setData({
list:res.data
})
// }
}
},

View File

@@ -15,10 +15,10 @@
<view class="lp-card" wx:for="{{list}}" bindtap="toDetailFunc" data-item="{{item}}" wx:for-item="item" wx:key="id">
<view class="lpc-name-box">
<view class="lpc-name text-ellipsis-1" style="margin-bottom: 5px;"> {{item.name}}</view>
<view class="small-text text-ellipsis-1"> {{item.desc}}</view>
<view class="small-text text-ellipsis-1"> {{item.materials_str}}</view>
</view>
<view class="lpc-tag std-small-text text-ellipsis-1">
{{item.tag}}
{{item.chinese_name}}
</view>
</view>
</view>

View File

@@ -1,4 +1,5 @@
// pages/star/star.ts
const api = require("../../api/index")
Page({
/**
@@ -25,7 +26,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad() {
this.getList()
},
/**
@@ -75,5 +76,14 @@ Page({
*/
onShareAppMessage() {
},
async getList() {
const res = await api.getMyWineList({
current:1,
size:10
})
if(res.code === 200) {
}
}
})