|
@@ -155,10 +155,10 @@
|
|
|
onLoad(opt) {
|
|
|
console.log(getApp().globalData.shopcategoryID)
|
|
|
//this.userInfo = uni.getStorageSync("userInfo");
|
|
|
- this.shopcategoryID=getApp().globalData.shopcategoryID;
|
|
|
+ /* this.shopcategoryID=getApp().globalData.shopcategoryID;
|
|
|
if(this.shopcategoryID){
|
|
|
this.categoryID=this.shopcategoryID
|
|
|
- }
|
|
|
+ } */
|
|
|
this.userInfo=this.$store.state.userInfo;
|
|
|
this.wxOpenData=this.$store.state.wxOpenData;
|
|
|
this.themeColor = uni.getStorageSync("themeColor");
|
|
@@ -211,7 +211,13 @@
|
|
|
this.topIndex=index
|
|
|
}
|
|
|
})
|
|
|
- this.categoryID=shopcategoryID;
|
|
|
+ console.log("this.categoryID"+this.categoryID)
|
|
|
+ if(this.topIndex){
|
|
|
+ this.categoryID=shopcategoryID;
|
|
|
+ }else{
|
|
|
+ this.categoryID=''
|
|
|
+ }
|
|
|
+
|
|
|
this.list=[];
|
|
|
this.page=1;
|
|
|
this.getlistOpenGoodsPage()
|
|
@@ -342,6 +348,7 @@
|
|
|
img.onerror = null; //防止闪图 */
|
|
|
},
|
|
|
topClick(index,item){
|
|
|
+ //console.log(item)
|
|
|
this.topIndex=index;
|
|
|
this.list=[];
|
|
|
this.page=1;
|
|
@@ -375,7 +382,8 @@
|
|
|
name:'全部'
|
|
|
}
|
|
|
this.categoryList.unshift(obj);
|
|
|
- if(this.shopcategoryID){
|
|
|
+ var shopcategoryID = uni.getStorageSync("shopcategoryID")
|
|
|
+ if(shopcategoryID){
|
|
|
//console.log(this.shopcategoryID)
|
|
|
this.categoryList.forEach((item,index)=>{
|
|
|
//console.log(item.id)
|
|
@@ -383,12 +391,18 @@
|
|
|
this.topIndex=index
|
|
|
}
|
|
|
})
|
|
|
+ if(this.topIndex){
|
|
|
+ this.categoryID=shopcategoryID;
|
|
|
+ }else{
|
|
|
+ this.categoryID=''
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
getlistOpenGoodsPage(){
|
|
|
uni.showLoading({ title: '加载中'});
|
|
|
+ console.log(this.categoryID)
|
|
|
var that=this;
|
|
|
this.$http('openMall/listOpenGoodsPage', {
|
|
|
page:this.page,
|