|
@@ -2,6 +2,7 @@ const _Http = getApp().globalData.http;
|
|
|
|
|
|
Page({
|
|
|
data: {
|
|
|
+ brandList: [], //品牌列表
|
|
|
loading: true,
|
|
|
"content": {
|
|
|
"brandids": [1],
|
|
@@ -13,6 +14,7 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+
|
|
|
getList(init) {
|
|
|
if (init.detail != undefined) init = init.detail;
|
|
|
let content = this.data.content;
|
|
@@ -26,74 +28,46 @@ Page({
|
|
|
console.log("商品列表", res)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- onInput(e) {
|
|
|
- this.setData({
|
|
|
- "content.where.condition": e.detail.value
|
|
|
- })
|
|
|
- },
|
|
|
- onClear() {
|
|
|
- this.setData({
|
|
|
- "content.where.condition": ""
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
onLoad(options) {
|
|
|
setTimeout(() => {
|
|
|
this.setData({
|
|
|
loading: false
|
|
|
})
|
|
|
}, 1000)
|
|
|
+ this.getBrand()
|
|
|
+ },
|
|
|
+ /* 获取品牌 */
|
|
|
+ getBrand() {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20220924163702,
|
|
|
+ "content": {
|
|
|
+ "pageSize": 999,
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("查询品牌", res)
|
|
|
+ this.setData({
|
|
|
+ brandList: res.data
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
|
|
|
+
|
|
|
onReady() {
|
|
|
this.setListHeight()
|
|
|
},
|
|
|
+ onInput(e) {
|
|
|
+ this.setData({
|
|
|
+ "content.where.condition": e.detail.value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClear() {
|
|
|
+ this.setData({
|
|
|
+ "content.where.condition": ""
|
|
|
+ })
|
|
|
+ },
|
|
|
/* 设置页面高度 */
|
|
|
setListHeight() {
|
|
|
this.selectComponent("#ListBox").setHeight(".head", this);
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面显示
|
|
|
- */
|
|
|
- onShow() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面隐藏
|
|
|
- */
|
|
|
- onHide() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面卸载
|
|
|
- */
|
|
|
- onUnload() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 页面相关事件处理函数--监听用户下拉动作
|
|
|
- */
|
|
|
- onPullDownRefresh() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 页面上拉触底事件的处理函数
|
|
|
- */
|
|
|
- onReachBottom() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 用户点击右上角分享
|
|
|
- */
|
|
|
- onShareAppMessage() {
|
|
|
-
|
|
|
- }
|
|
|
})
|