|
|
@@ -72,6 +72,7 @@
|
|
72
|
72
|
const currentIndex = ref(0)
|
|
73
|
73
|
const tabList = ref([])
|
|
74
|
74
|
const goodsList = ref([])
|
|
|
75
|
+ let id=''
|
|
75
|
76
|
|
|
76
|
77
|
|
|
77
|
78
|
onLoad((option) => {
|
|
|
@@ -111,12 +112,14 @@
|
|
111
|
112
|
})
|
|
112
|
113
|
|
|
113
|
114
|
onPullDownRefresh(() => {
|
|
|
115
|
+ getProductType()
|
|
114
|
116
|
uni.stopPullDownRefresh()
|
|
115
|
117
|
})
|
|
116
|
118
|
|
|
117
|
119
|
function onTabClick(position, id) {
|
|
118
|
120
|
currentIndex.value = position
|
|
119
|
|
- getProductType(id)
|
|
|
121
|
+ id.value = id
|
|
|
122
|
+ getProductType()
|
|
120
|
123
|
}
|
|
121
|
124
|
|
|
122
|
125
|
function goShopClick(id) {
|
|
|
@@ -152,11 +155,11 @@
|
|
152
|
155
|
})
|
|
153
|
156
|
}
|
|
154
|
157
|
|
|
155
|
|
- function getProductType(id) {
|
|
|
158
|
+ function getProductType() {
|
|
156
|
159
|
uni.showLoading({
|
|
157
|
160
|
title:'加载中...'
|
|
158
|
161
|
})
|
|
159
|
|
- apiGetProductType(id).then((res) => {
|
|
|
162
|
+ apiGetProductType(id.value).then((res) => {
|
|
160
|
163
|
if (res && res.pageInfo && res.pageInfo.list) {
|
|
161
|
164
|
goodsList.value = res.pageInfo.list
|
|
162
|
165
|
dealData()
|