|
@@ -18,6 +18,7 @@ Page({
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.getBrand()
|
|
|
+ this.getNum();
|
|
|
},
|
|
|
/* 切换分类 */
|
|
|
typeChange({
|
|
@@ -97,12 +98,6 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- /* 去购物车 */
|
|
|
- toShopping() {
|
|
|
- wx.navigateTo({
|
|
|
- url: '/packageA/shopping/index',
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
startFiltration() {
|
|
|
/* _Http.basic().then(res => {
|
|
@@ -110,9 +105,11 @@ Page({
|
|
|
}) */
|
|
|
},
|
|
|
/* 搜索 */
|
|
|
- onSearch({detail}){
|
|
|
+ onSearch({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
this.setData({
|
|
|
- "content.where.condition":detail
|
|
|
+ "content.where.condition": detail
|
|
|
});
|
|
|
this.getList(true)
|
|
|
},
|
|
@@ -123,4 +120,18 @@ Page({
|
|
|
setListHeight() {
|
|
|
this.selectComponent("#ListBox").setHeight(".division", this);
|
|
|
},
|
|
|
+ /* 获取购物车数量 */
|
|
|
+ getNum() {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20220927093202,
|
|
|
+ "content": {}
|
|
|
+ }).then(res => {
|
|
|
+ console.log("购物车数量", res)
|
|
|
+ getApp().globalData.num = res.data.num;
|
|
|
+ this.selectComponent("#Float").setNum(res.data.num)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ if (getApp().globalData.num) this.selectComponent("#Float").setNum(getApp().globalData.num)
|
|
|
+ }
|
|
|
})
|