|
|
@@ -117,9 +117,7 @@
|
|
|
},
|
|
|
watch: {
|
|
|
isNew(newVal) {
|
|
|
- if (newVal) {
|
|
|
- this.getAllCategory();
|
|
|
- }
|
|
|
+ this.getAllCategory(1);
|
|
|
}
|
|
|
},
|
|
|
computed: mapGetters(['isLogin', 'uid']),
|
|
|
@@ -168,15 +166,7 @@
|
|
|
storeInfo: {}
|
|
|
}
|
|
|
},
|
|
|
- // onShow(){
|
|
|
- // if(this.isLogin){
|
|
|
- // this.getCartNum();
|
|
|
- // this.getCartList(1);
|
|
|
- // }
|
|
|
- // this.getAllCategory();
|
|
|
- // },
|
|
|
mounted() {
|
|
|
- // this.getAllCategory();
|
|
|
let that = this;
|
|
|
// 获取设备宽度
|
|
|
uni.getSystemInfo({
|
|
|
@@ -642,9 +632,9 @@
|
|
|
closeTap() {
|
|
|
this.iSlong = true
|
|
|
},
|
|
|
- getAllCategory: function() {
|
|
|
+ getAllCategory: function(type) {
|
|
|
let that = this;
|
|
|
- if (this.isNew || !uni.getStorageSync('CAT2_DATA')) {
|
|
|
+ if (type|| !uni.getStorageSync('CAT2_DATA')) {
|
|
|
getCategoryList().then(res => {
|
|
|
uni.setStorageSync('CAT2_DATA', res.data)
|
|
|
let data = res.data;
|