|
|
@@ -18,46 +18,46 @@
|
|
|
<template #title>
|
|
|
<img :src="getImageUrl(item.bannerpicurl)" />
|
|
|
<span>{{ item.wrstandardname }}</span>
|
|
|
- <Button type="primary" round size="small">立即进入</Button>
|
|
|
+ <Button type="primary" round size="small" @click="$router.push({name: 'product-detail', query: { wrstandardid: item.wrstandardid, active: active } })">立即进入</Button>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
</template>
|
|
|
</app-pull-refresh>
|
|
|
</app-view>
|
|
|
- </template>
|
|
|
+</template>
|
|
|
|
|
|
- <script lang="ts" setup>
|
|
|
- import { shallowRef, ref } from 'vue'
|
|
|
- import { Cell, Tabs, Tab, Button, Empty } from 'vant'
|
|
|
- import { getImageUrl } from '@/filters'
|
|
|
- import { useQueryTHJProductLists } from '@/business/goods'
|
|
|
- import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
-
|
|
|
- const { pageIndex, pageCount, getQueryTHJProductLists, active } = useQueryTHJProductLists()
|
|
|
- const pullRefreshRef = shallowRef()
|
|
|
- const dataList = shallowRef<Model.THJProductRsp[]>([])
|
|
|
- const error = shallowRef(false)
|
|
|
+<script lang="ts" setup>
|
|
|
+import { shallowRef } from 'vue'
|
|
|
+import { Cell, Tabs, Tab, Button, Empty } from 'vant'
|
|
|
+import { getImageUrl } from '@/filters'
|
|
|
+import { useQueryTHJProductLists } from '@/business/goods'
|
|
|
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
+
|
|
|
+const { pageIndex, pageCount, getQueryTHJProductLists, active } = useQueryTHJProductLists()
|
|
|
+const pullRefreshRef = shallowRef()
|
|
|
+const dataList = shallowRef<Model.THJProductRsp[]>([])
|
|
|
+const error = shallowRef(false)
|
|
|
|
|
|
- // Tab触发
|
|
|
+// Tab触发
|
|
|
const onClickTab = () => {
|
|
|
- pullRefreshRef.value?.refresh()
|
|
|
+pullRefreshRef.value?.refresh()
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
const onRefresh = (finish: () => void) => {
|
|
|
- /// 获取产品列表
|
|
|
- getQueryTHJProductLists().then((res) => {
|
|
|
- if (pageIndex.value === 1) {
|
|
|
- dataList.value = []
|
|
|
- }
|
|
|
- dataList.value.push(...res)
|
|
|
- }).catch(() => {
|
|
|
- error.value = true
|
|
|
- }).finally(() => {
|
|
|
- finish()
|
|
|
- })
|
|
|
+/// 获取产品列表
|
|
|
+getQueryTHJProductLists().then((res) => {
|
|
|
+ if (pageIndex.value === 1) {
|
|
|
+ dataList.value = []
|
|
|
+ }
|
|
|
+ dataList.value.push(...res)
|
|
|
+}).catch(() => {
|
|
|
+ error.value = true
|
|
|
+}).finally(() => {
|
|
|
+ finish()
|
|
|
+})
|
|
|
}
|
|
|
|
|
|
- </script>
|
|
|
+</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
@import './index.less';
|