feat: 跳转
This commit is contained in:
@@ -90,12 +90,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import shopHeader from '@/components/common/shopHeader.vue';
|
import shopHeader from "@/components/common/shopHeader.vue";
|
||||||
import TopSafe from '@/components/common/top-safe.nvue';
|
import TopSafe from "@/components/common/top-safe.nvue";
|
||||||
import MyBtn from '@/components/common/my-btn.vue';
|
import MyBtn from "@/components/common/my-btn.vue";
|
||||||
import YouItem from '@/components/shop/you-item.vue';
|
import YouItem from "@/components/shop/you-item.vue";
|
||||||
import { searchList } from '@/api/product.js';
|
import { searchList } from "@/api/product.js";
|
||||||
import { getCarouselImage } from '@/api/common.js';
|
import { getCarouselImage } from "@/api/common.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { shopHeader, TopSafe, MyBtn, YouItem },
|
components: { shopHeader, TopSafe, MyBtn, YouItem },
|
||||||
@@ -103,8 +103,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
faddishProduct: [], // 爆款专区
|
faddishProduct: [], // 爆款专区
|
||||||
swiperList: ['https://cdn.uviewui.com/uview/swiper/swiper1.png'],
|
swiperList: ["https://cdn.uviewui.com/uview/swiper/swiper1.png"],
|
||||||
swiperListData:[],
|
swiperListData: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
@@ -131,22 +131,36 @@ export default {
|
|||||||
},
|
},
|
||||||
jumpSearch() {
|
jumpSearch() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/rwa_package/dongjian/search',
|
url: "/pages/rwa_package/dongjian/search",
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 跳转到商品详情
|
// 跳转到商品详情
|
||||||
jumpInfo(item) {
|
jumpInfo(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/other_package/productInfo/productInfo?id=' + item.id,
|
url: "/pages/other_package/productInfo/productInfo?id=" + item.id,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
goShare(){
|
goShare() {
|
||||||
console.log('go 的地址')
|
console.log("go 的地址");
|
||||||
|
if (swiperList[0]?.goodsUrl) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pages/other_package/productInfo/productInfo?id=" +
|
||||||
|
swiperList[0].goodsUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onSwiperClick(index){
|
onSwiperClick(index) {
|
||||||
console.log('banner 图',this.swiperListData,index);
|
console.log("banner 图", this.swiperListData, index);
|
||||||
// swiperList[index].goodsUrl
|
swiperList[index].goodsUrl;
|
||||||
|
if (swiperList[index]?.goodsUrl) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pages/other_package/productInfo/productInfo?id=" +
|
||||||
|
swiperList[index].goodsUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async getSearchList() {
|
async getSearchList() {
|
||||||
const params = {
|
const params = {
|
||||||
@@ -167,17 +181,18 @@ export default {
|
|||||||
if (resp && resp.bizcode === 100) {
|
if (resp && resp.bizcode === 100) {
|
||||||
const data = resp.data || [];
|
const data = resp.data || [];
|
||||||
this.swiperListData = data;
|
this.swiperListData = data;
|
||||||
this.swiperList = data.length !== 0 ? data.map((obj) => obj.carouselImage) : [];
|
this.swiperList =
|
||||||
|
data.length !== 0 ? data.map((obj) => obj.carouselImage) : [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onJumpShop(id) {
|
onJumpShop(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/other_package/productInfo/productInfo?id=' + id,
|
url: "/pages/other_package/productInfo/productInfo?id=" + id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onShare() {
|
onShare() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/other_package/invite_friends/invite_friends',
|
url: "/pages/other_package/invite_friends/invite_friends",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -215,7 +230,12 @@ export default {
|
|||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
border: 2rpx solid;
|
border: 2rpx solid;
|
||||||
border-image: linear-gradient(270deg, rgba(174, 57, 196, 1), rgba(119, 50, 255, 1)) 1 1;
|
border-image: linear-gradient(
|
||||||
|
270deg,
|
||||||
|
rgba(174, 57, 196, 1),
|
||||||
|
rgba(119, 50, 255, 1)
|
||||||
|
)
|
||||||
|
1 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user