|
|
@ -7,7 +7,7 @@ |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="bigCate" class="cate-list-right"> |
|
|
|
<view v-if="bigCate && goodsCateList.length > 0" class="cate-list-right"> |
|
|
|
<!-- <view v-for="(item, index) in goodsCateList.filter(item => item.name === bigCate)[0].list" class="small-cate-content"> --> |
|
|
|
<!-- <view v-for="(item, index) in goodsCateList.filter(item => item.name === bigCate)[0].list" class="small-cate-content"> --> |
|
|
|
<view class="small-cate-content"> |
|
|
|
<view class="small-cate-content"> |
|
|
|
<!-- <view class="small-cate-title">{{ bigCate }} + {{ item.title }}</view> --> |
|
|
|
<!-- <view class="small-cate-title">{{ bigCate }} + {{ item.title }}</view> --> |
|
|
@ -38,8 +38,10 @@ |
|
|
|
type: '', |
|
|
|
type: '', |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
onLoad({type, cate}) { |
|
|
|
this.type = options.type; |
|
|
|
this.type = type; |
|
|
|
|
|
|
|
this.bigCate = cate || ''; |
|
|
|
|
|
|
|
console.log(type, cate); |
|
|
|
if (this.type === 'store') { |
|
|
|
if (this.type === 'store') { |
|
|
|
this.getGoodsCateList(); |
|
|
|
this.getGoodsCateList(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -59,7 +61,7 @@ |
|
|
|
children: data.recommend, |
|
|
|
children: data.recommend, |
|
|
|
}, |
|
|
|
}, |
|
|
|
].concat(data.category_list); |
|
|
|
].concat(data.category_list); |
|
|
|
this.bigCate = '特别推荐'; |
|
|
|
this.bigCate = this.bigCate || '特别推荐'; |
|
|
|
console.log(this.goodsCateList); |
|
|
|
console.log(this.goodsCateList); |
|
|
|
} catch (err) { } |
|
|
|
} catch (err) { } |
|
|
|
}, |
|
|
|
}, |
|
|
@ -74,7 +76,7 @@ |
|
|
|
children: data.recommend, |
|
|
|
children: data.recommend, |
|
|
|
}, |
|
|
|
}, |
|
|
|
].concat(data.category_list); |
|
|
|
].concat(data.category_list); |
|
|
|
this.bigCate = '特别推荐'; |
|
|
|
this.bigCate = this.bigCate || '特别推荐'; |
|
|
|
console.log(this.goodsCateList); |
|
|
|
console.log(this.goodsCateList); |
|
|
|
} catch (err) { |
|
|
|
} catch (err) { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
@ -95,12 +97,15 @@ |
|
|
|
case 'learning': |
|
|
|
case 'learning': |
|
|
|
try { |
|
|
|
try { |
|
|
|
const { data } = await changeCategory({ subject_id: con.id}); |
|
|
|
const { data } = await changeCategory({ subject_id: con.id}); |
|
|
|
let pages = getCurrentPages(); |
|
|
|
// let pages = getCurrentPages(); |
|
|
|
let prevPage = pages[pages.length - 2]; |
|
|
|
// let prevPage = pages[pages.length - 2]; |
|
|
|
prevPage.$vm.learningData.exam.name = con.name; |
|
|
|
// prevPage.$vm.learningData.exam.name = con.name; |
|
|
|
prevPage.$vm.learningData.exam.grade_id = con.grade_id; |
|
|
|
// prevPage.$vm.learningData.exam.grade_id = con.grade_id; |
|
|
|
prevPage.$vm.learningData.exam.subject_id = con.id; |
|
|
|
// prevPage.$vm.learningData.exam.subject_id = con.id; |
|
|
|
uni.navigateBack(); |
|
|
|
// uni.navigateBack(); |
|
|
|
|
|
|
|
uni.switchTab({ |
|
|
|
|
|
|
|
url: '/pages/learning/index', |
|
|
|
|
|
|
|
}); |
|
|
|
} catch (err) { |
|
|
|
} catch (err) { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
} |
|
|
|
} |
|
|
|