Commit b6b8cf61 by 胡悦

添加产品详情页

1 parent f5d58b18
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1070rpx 876rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: 0rpx -734rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1032rpx -60rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -942rpx 0rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1032rpx -102rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -410rpx 0rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -820rpx -610rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -780rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -106rpx -780rpx;}
......@@ -33,19 +36,16 @@
.icon-new-setting { width: 64rpx; height: 64rpx; background-position: -942rpx -576rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -490rpx -596rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -620rpx -596rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -424rpx -780rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -1016rpx -502rpx;}
.icon-record-active { width: 80rpx; height: 80rpx; background-position: -942rpx -240rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -942rpx -330rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -424rpx -780rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -530rpx -780rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -530rpx -780rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -636rpx -780rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1024rpx -420rpx;}
.icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -596rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -862rpx -716rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -636rpx -780rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -742rpx -780rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -942rpx -650rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -942rpx -720rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -942rpx -790rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -410rpx 0rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: 0rpx -734rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -742rpx -780rpx;}
\ No newline at end of file
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -942rpx -790rpx;}
\ No newline at end of file

937 KB | W: | H:

937 KB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -79,6 +79,13 @@
}
},
{
"path": "pages/boutique/productDetail",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/history",
"style": {
"navigationStyle": "custom",
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-05-30 14:40:39
* @LastEditors: huyue
* @LastEditTime: 2024-06-03 14:49:06
* @LastEditTime: 2024-06-03 18:09:09
-->
<template>
<view style="position: relative;">
......@@ -32,7 +32,7 @@
</view>
</view>
<view class="content" id="content">
<view class="second-tab" ref="secondTab" v-if="views[firstIndex].receptionSourceDetailInfoList">
<view class="second-tab" ref="secondTab" v-if="views[firstIndex].receptionSourceDetailInfoList.length > 0">
<view
v-for="(item, ind) in views[firstIndex].receptionSourceDetailInfoList"
:key="ind"
......@@ -46,47 +46,14 @@
>
</view>
</view>
<template v-if="views[firstIndex].receptionSourceDetailInfoList && views[firstIndex].receptionSourceDetailInfoList[secondIndex].receptionSourceDetailInfoList">
<view class="product-list" :style="{height: views[firstIndex].receptionSourceDetailInfoList ? '908rpx' : '1040rpx'}">
<view class="product-item">
<template v-if="views[firstIndex].receptionSourceDetailInfoList.length > 0 && views[firstIndex].receptionSourceDetailInfoList[secondIndex].receptionSourceDetailInfoList">
<view class="product-list" :style="{height: views[firstIndex].receptionSourceDetailInfoList ? '972rpx' : '1040rpx'}">
<view class="product-item" v-for="(itm, idx) in views[firstIndex].receptionSourceDetailInfoList[secondIndex].receptionSourceDetailInfoList" :key="idx" @click="goDetail(itm)">
<image
:src="require('@/assets/images/boutique/product.png')"
:src="itm.thumbnail"
mode="scaleToFill"
class="product-img"
/>
<view class="product-name">AITO问界 3M车窗膜(M5)</view>
</view>
<view class="product-item">
<image
:src="require('@/assets/images/boutique/product.png')"
mode="scaleToFill"
class="product-img"
/>
<view class="product-name">AITO问界 3M车窗膜(M5)</view>
</view>
<view class="product-item">
<image
:src="require('@/assets/images/boutique/product.png')"
mode="scaleToFill"
class="product-img"
/>
<view class="product-name">AITO问界 3M车窗膜(M5)</view>
</view>
<view class="product-item">
<image
:src="require('@/assets/images/boutique/product.png')"
mode="scaleToFill"
class="product-img"
/>
<view class="product-name">AITO问界 3M车窗膜(M5)</view>
</view>
<view class="product-item">
<image
:src="require('@/assets/images/boutique/product.png')"
mode="scaleToFill"
class="product-img"
/>
<view class="product-name">AITO问界 3M车窗膜(M5)</view>
</view>
</view>
</template>
......@@ -156,6 +123,12 @@ export default {
const data = await uni.$api.boutiqueApi.findSoureList({})
console.log(data)
},
goDetail(data) {
console.log(data)
uni.navigateTo({
url: `/pages/boutique/productDetail?detailUrl=${data.detailUrl}`
})
}
}
}
</script>
......@@ -251,7 +224,7 @@ export default {
position: relative;
background-color: #fff;
width: 100%;
padding: 64rpx 0;
padding-top: 64rpx;
margin-top: -48rpx;
border-radius: 48rpx;
height: calc(100% - 128rpx);
......@@ -287,16 +260,18 @@ export default {
grid-template-columns: repeat(4, 1fr);
gap: 48rpx;
// height: 908rpx;
padding: 0 64rpx;
padding: 0 64rpx 64rpx;
overflow-y: auto;
.product-item {
text-align: center;
background: #FFFFFF;
box-shadow: 0 16rpx 24rpx 0 #2c66f71a;
border-radius: 24rpx;
height: 594rpx;
.product-img {
width: 486rpx;
height: 486rpx;
height: 594rpx;
border-radius: 24rpx;
}
.product-name {
padding-bottom: 48rpx;
......
<template>
<view>
<!-- :src="require('@/assets/images/boutique/detail.webp')" -->
<image
class="detail-img"
:src="detailUrl"
mode="widthFix"
/>
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="32"></uni-icons>
</view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: '',
data() {
return {
detailUrl: ''
}
},
onLoad (options) {
console.log(options, ' =')
this.detailUrl = options.detailUrl
},
methods: {
back() {
uni.navigateBack({
delta: 1
})
}
},
}
</script>
<style scoped lang="scss">
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
}
.title {
width: 100%;
text-align: center;
}
}
.detail-img {
width: 100%;
height: auto;
object-fit: cover;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!