first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<template lang="pug">
.header
van-nav-bar(:title='navTitle', left-arrow, @click-left="onClickLeft")
template(#right v-if="isShowText")
van-icon(:name='rightIcon', size='18')
template(#right v-else)
span(@click="TextEdit") {{ShowText}}
</template>
<script>
export default {
props: {
navTitle: {
type: String,
default: ''
},
ShowText: {
type: String,
default: '编辑'
},
isShowText: {
type: Boolean,
default: true
},
rightIcon: {
type: String,
default: 'search'
}
},
methods: {
onClickLeft() {
this.$router.back()
},
TextEdit() {
this.$emit("textClick")
}
}
}
</script>
<style scoped lang="less">
.header {
position: fixed;
width: 100%;
left: 0;
right: 0;
top: 0;
z-index: 999;
}
</style>

View File

@@ -0,0 +1,78 @@
<template lang="pug">
.ListItem
van-row
van-col(span='12' class="item" v-for="(item,index) in list" @click="enterInfo(item.wares_id)")
img(:src="item.wares_masterimg | firstImg")
h2 {{item.wares_title}}
span {{item.wares_conf | subStr}}
.price ¥{{item.wares_nowprice}}起
.buy 立即购买
</template>
<script>
export default {
props: {
list: {
type: Array,
default: []
}
},
data() {
return {}
},
created() {
},
filters: {
subStr(val) {
return val[0].substring(0,20)+'..'
},
firstImg(val) {
return val[0]
},
},
methods: {
enterInfo(id) {
this.$router.push({
path: '/info',
query: {
id: id
}
})
},
}
}
</script>
<style scoped lang="less">
.item {
text-align: center;
margin-bottom: 25px;
img {
width: 173px;
}
h2 {
color: rgba(0,0,0,.87);
font-size: 16.1px;
}
span {
color: rgba(0,0,0,.54);
font-size: 12.65px;
margin-top: 3.450px;
}
.price {
color: #ea625b;
font-size: 16.1px;
}
.buy {
width: 115px;
height: 33px;
color: #fff;
text-align: center;
line-height: 33px;
border-radius: 3px;
font-size: 13px;
background: #ea625b;
margin: 0 auto;
}
}
</style>

View File

@@ -0,0 +1,37 @@
<template lang="pug">
.swiper
van-swipe.my-swipe(:autoplay='3000', indicator-color='white')
van-swipe-item(v-for="(item,index) in list")
img(:src="item.hasOwnProperty('imgUrl') ? item.imgUrl : item ")
</template>
<script>
export default {
props: {
list: {
type: Array,
default: []
}
},
data() {
return {}
},
created() {
},
methods: {
async getTvList() {
}
}
}
</script>
<style scoped lang="less">
.van-swipe {
img {
width: 100%;
}
}
</style>