Commit b56a084a authored by 张娇(东信)'s avatar 张娇(东信)

详情页立即购买跳转结算页面

parent abd34f0a
...@@ -94,7 +94,7 @@ const selectItem = (selectItem) => { ...@@ -94,7 +94,7 @@ const selectItem = (selectItem) => {
} }
.active { .active {
color: #fa5151; color: #fa5151;
background: #FEEEEE; background: #feeeee;
} }
} }
} }
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<!-- </view>--> <!-- </view>-->
<view class="btn"> <view class="btn">
<wd-button type="warning" size="small" style="margin-right: 10rpx">加入购物车</wd-button> <wd-button type="warning" size="small" style="margin-right: 10rpx">加入购物车</wd-button>
<wd-button type="error" size="small">立即购买</wd-button> <wd-button type="error" size="small" @tap="toSettle">立即购买</wd-button>
</view> </view>
</view> </view>
</view> </view>
...@@ -142,9 +142,18 @@ function toCart() { ...@@ -142,9 +142,18 @@ function toCart() {
url: '/pages/assistingAgriculture/cart/cart', url: '/pages/assistingAgriculture/cart/cart',
}); });
} }
function toSettle() {
// TODO: 跳转到结算页面
xma.navigateTo({
url: '/pages/assistingAgriculture/cart/ConfirmOrder',
});
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page {
background-color: #f3f3f3;
}
.container { .container {
position: relative; position: relative;
left: 0rpx; left: 0rpx;
...@@ -306,12 +315,13 @@ function toCart() { ...@@ -306,12 +315,13 @@ function toCart() {
} }
.detail-info { .detail-info {
width: 750rpx; width: 750rpx;
height: 1168px;
border-radius: 16rpx; border-radius: 16rpx;
background: #ffffff; background: #ffffff;
margin-top: 20rpx; margin-top: 20rpx;
position: relative; position: relative;
z-index: 9; z-index: 9;
top: -8rpx;
padding-bottom: 120rpx;
} }
.info-title { .info-title {
width: 64rpx; width: 64rpx;
...@@ -330,7 +340,6 @@ function toCart() { ...@@ -330,7 +340,6 @@ function toCart() {
} }
.info-img { .info-img {
width: 710rpx; width: 710rpx;
height: 1168rpx;
border-radius: 16rpx; border-radius: 16rpx;
position: relative; position: relative;
margin-top: 40rpx; margin-top: 40rpx;
......
...@@ -196,7 +196,7 @@ const getList = () => { ...@@ -196,7 +196,7 @@ const getList = () => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.icon; item.icon = import.meta.env.VITE_APP_IMG_URL + item.icon;
item.pic = import.meta.env.VITE_APP_IMG_URL + item.pic; item.pic = import.meta.env.VITE_APP_IMG_URL + item.pic;
}); });
sortList.value = res.data; sortList.value = res.data.splice(0, 4);
console.log(list.value, 111); console.log(list.value, 111);
}); });
}; };
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</text> </text>
</scroll-view> </scroll-view>
</view> </view>
<view class="tab-list" v-for="(item, index) in buyList" :key="index"> <view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail">
<img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" /> <img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" />
<view> <view>
<text class="retail-price">零售价:¥{{ item.price }}/盒</text> <text class="retail-price">零售价:¥{{ item.price }}/盒</text>
...@@ -65,12 +65,7 @@ ...@@ -65,12 +65,7 @@
</view> </view>
<view class="waterfall"> <view class="waterfall">
<view class="wt-left wt-list"> <view class="wt-left wt-list">
<view <view class="wt-item" v-for="(good, index) in LeftList" :key="index" @tap="toDetail">
class="wt-item"
v-for="(good, index) in LeftList"
:key="index"
@click="ToDetail(good.id)"
>
<view class="item-img"> <view class="item-img">
<image :src="good.image" mode="widthFix"></image> <image :src="good.image" mode="widthFix"></image>
<image <image
...@@ -105,12 +100,7 @@ ...@@ -105,12 +100,7 @@
</view> </view>
<view class="vt-right wt-list"> <view class="vt-right wt-list">
<view <view class="wt-item" v-for="(good, index) in RightList" :key="index" @tap="toDetail">
class="wt-item"
v-for="(good, index) in RightList"
:key="index"
@click="ToDetail(good.id)"
>
<view class="item-img"> <view class="item-img">
<image :src="good.image" mode="widthFix"></image> <image :src="good.image" mode="widthFix"></image>
<image <image
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment