mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 16:05:53 +08:00
新增部分注释优化一些代码
This commit is contained in:
@@ -17,8 +17,7 @@ export default {
|
||||
modelNavigateTo,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,27 +1,23 @@
|
||||
|
||||
<template>
|
||||
<div class="layout">
|
||||
<u-image height="175rpx" width="175rpx" @click="modelNavigateTo(item)" class="image-mode" :src="item.img" v-for="(item,index) in res.list" :key="index" >
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
|
||||
<u-image height="175rpx" width="175rpx" @click="modelNavigateTo(item)" class="image-mode" :src="item.img" v-for="(item,index) in res.list" :key="index">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {modelNavigateTo} from './tpl'
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
export default {
|
||||
title: "四列单行图片模块",
|
||||
props: ["res"],
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -33,7 +29,7 @@ export default {
|
||||
justify-content: center;
|
||||
background-size: cover;
|
||||
}
|
||||
img{
|
||||
img {
|
||||
width: 84px;
|
||||
}
|
||||
</style>
|
||||
@@ -9,6 +9,7 @@
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
|
||||
export default {
|
||||
title:"单行图片模块",
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
|
||||
@@ -1,31 +1,18 @@
|
||||
|
||||
<template>
|
||||
<div class="layout">
|
||||
|
||||
<div class="goods-cell-title">
|
||||
<div
|
||||
class="goods-item-title"
|
||||
:class="{ 'selected-title': selected.index == index }"
|
||||
@click="handleClickTitle(title, index)"
|
||||
v-for="(title, index) in res.list[0].titleWay"
|
||||
:key="index"
|
||||
>
|
||||
<div class="goods-item-title" :class="{ 'selected-title': selected.index == index }" @click="handleClickTitle(title, index)" v-for="(title, index) in res.list[0].titleWay" :key="index">
|
||||
<h4 class="h4">{{ title.title }}</h4>
|
||||
<div>{{ title.desc }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div
|
||||
v-if="selected.val == item.type"
|
||||
@click="handleClick(item)"
|
||||
class="goods-item"
|
||||
v-for="(item, item_index) in res.list[0].listWay"
|
||||
:key="item_index"
|
||||
>
|
||||
|
||||
<div v-if="selected.val == item.type" @click="handleClick(item)" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index">
|
||||
<div class="goods-img">
|
||||
<u-image :src="item.img" height="350rpx" mode="aspectFit" width="100%">
|
||||
<u-loading slot="loading"></u-loading
|
||||
></u-image>
|
||||
<u-image :src="item.img" height="350rpx" mode="aspectFit" width="100%">
|
||||
<u-loading slot="loading"></u-loading>
|
||||
</u-image>
|
||||
</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
@@ -42,6 +29,7 @@
|
||||
<script>
|
||||
import uImage from "@/uview-ui/components/u-image/u-image.vue";
|
||||
export default {
|
||||
title: "商品分类以及商品",
|
||||
components: { uImage },
|
||||
data() {
|
||||
return {
|
||||
@@ -55,7 +43,6 @@ export default {
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleClick(item) {
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
|
||||
});
|
||||
@@ -102,7 +89,6 @@ $w_94: 94%;
|
||||
|
||||
> h4 {
|
||||
font-size: 32rpx;
|
||||
|
||||
}
|
||||
|
||||
> div {
|
||||
@@ -130,7 +116,7 @@ $w_94: 94%;
|
||||
margin: 0 auto;
|
||||
// width: 158px;
|
||||
width: $w_94;
|
||||
|
||||
|
||||
border-top-left-radius: 20rpx;
|
||||
border-top-right-radius: 20rpx;
|
||||
|
||||
|
||||
@@ -3,18 +3,12 @@
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
|
||||
<div>更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" @click="modelNavigateTo(item)" v-for="item in 4" :key="item">
|
||||
<div class="item-img-box">
|
||||
|
||||
<img
|
||||
class="item-img"
|
||||
src="https://picsum.photos/id/268/200/200"
|
||||
alt
|
||||
/>
|
||||
<img class="item-img" src="https://picsum.photos/id/268/200/200" alt />
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>¥120.00</span>
|
||||
@@ -28,19 +22,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {modelNavigateTo} from './tpl'
|
||||
// TODO 后续版本开发此功能 尽情期待
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
export default {
|
||||
props: ["res"],
|
||||
data () {
|
||||
title: "拼团",
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
}
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
@import './advertising.scss';
|
||||
|
||||
@import "./advertising.scss";
|
||||
</style>
|
||||
@@ -3,18 +3,12 @@
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
|
||||
<div>更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" v-for="item in 4" :key="item">
|
||||
<div class="item-img-box">
|
||||
<img
|
||||
class="item-img"
|
||||
src="https://picsum.photos/id/268/200/200"
|
||||
alt
|
||||
/>
|
||||
|
||||
<img class="item-img" src="https://picsum.photos/id/268/200/200" alt />
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<span>20积分</span>
|
||||
@@ -28,7 +22,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// TODO 后续版本开发此功能 尽情期待
|
||||
export default {
|
||||
title:"积分商品",
|
||||
props: ["res"],
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
|
||||
<div>更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
@@ -28,8 +27,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// TODO 后续版本开发此功能 尽情期待
|
||||
export default {
|
||||
props: ["res"],
|
||||
title:"团购"
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {modelNavigateTo} from './tpl'
|
||||
export default {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<script>
|
||||
import {modelNavigateTo} from './tpl'
|
||||
export default {
|
||||
title:"五列菜单",
|
||||
props: ["res"],
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
title:"搜索栏",
|
||||
props: ["res"],
|
||||
methods: {
|
||||
handleSearch() {
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
<div class="join-list">
|
||||
<div class="join-title">
|
||||
<div>{{ res.list[0].title }}</div>
|
||||
|
||||
<div>更多</div>
|
||||
</div>
|
||||
<div class="join-box">
|
||||
<div class="join-item" v-for="item in 4" :key="item">
|
||||
<div class="item-img-box">
|
||||
|
||||
<img
|
||||
class="item-img"
|
||||
src="https://picsum.photos/id/268/200/200"
|
||||
@@ -28,6 +26,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// TODO 后续版本开发此功能 尽情期待
|
||||
export default {
|
||||
props: ["res"],
|
||||
};
|
||||
|
||||
@@ -1,51 +1,47 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="background">
|
||||
<div class="title" :style="{ color: res.list[0].color }">
|
||||
|
||||
{{ res.list[0].title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout">
|
||||
<div class="background">
|
||||
<div class="title" :style="{ color: res.list[0].color }">
|
||||
{{ res.list[0].title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
title: "标题栏",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
|
||||
},
|
||||
};
|
||||
export default {
|
||||
title: "标题栏",
|
||||
props: ["res"],
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
@import "./tpl.scss";
|
||||
.background {
|
||||
background: url("/static/title.png") no-repeat;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background-position-x: center;
|
||||
background-position-y: center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.background {
|
||||
background: url("/static/title.png") no-repeat;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background-position-x: center;
|
||||
background-position-y: center;
|
||||
background-size: cover;
|
||||
}
|
||||
.layout {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
height: 84rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.layout {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
height: 84rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.title {
|
||||
line-height: 84rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
line-height: 84rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user