first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
cfc46815-c4a8-4e77-ae6e-45a70f4a91e7

View File

@@ -0,0 +1,68 @@
<template>
<view class="card" :style="cardStyle">
<!-- head -->
<view v-if="showhead" class="p-2 main-border-color d-flex a-center j-sb"
:class="getHeadClass">
<slot name="title">
<text v-if="headTitle" class="font-md"
:class="headTitleWeight?'font-weight':''">{{headTitle}}</text>
</slot>
<slot name="right"></slot>
</view>
<!-- body -->
<view :class="getBodyClass" :style="bodyStyle">
<image v-if="bodyCover" :src="bodyCover"
mode="widthFix"></image>
<slot />
</view>
</view>
</template>
<script>
export default {
props:{
bodyStyle:String,
// 头部标题
headTitle:String,
// 封面图
bodyCover:String,
// 是否显示头部
showhead:{
type:Boolean,
default:true
},
// 是否显示下边线
headBorderBottom:{
type:Boolean,
default:true
},
// 标题是否加粗
headTitleWeight:{
type:Boolean,
default:true
},
// 是否给body加padding
bodyPadding:{
type:Boolean,
default:false
},
cardStyle:{
type:String,
default:""
}
},
computed: {
getHeadClass() {
let BorderBottom = this.headBorderBottom ? 'border-bottom':''
return `${BorderBottom}`
},
getBodyClass(){
let padding = this.bodyPadding ? 'p-2' : ''
return `${padding}`
}
},
}
</script>
<style>
</style>

View File

@@ -0,0 +1,48 @@
<template>
<view class="card">
<!-- head -->
<!-- <view v-if="showhead" class="p-2 main-border-color card_"
:class="getHeadClass"> -->
<view>
<slot name="title">
<text class="font-md "
>{{headTitle}}</text>
</slot>
</view>
</view>
</template>
<script>
export default {
props:{
bodyStyle:String,
// 头部标题
headTitle:String,
// 封面图
bodyCover:String,
// 是否显示头部
showhead:{
type:Boolean,
default:true
},
// 是否显示下边线
headBorderBottom:{
type:Boolean,
default:true
},
},
computed: {
// getHeadClass() {
// let BorderBottom = this.headBorderBottom ? 'border-bottom':''
// return `${BorderBottom}`
// },
},
}
</script>
<style>
.card_{
width: 187upx; height: 25upx;
}
</style>

View File

@@ -0,0 +1,46 @@
<template>
<div>
<div class="col-6 common-list mb-1" @click="openDetail">
<image :src="item.cover" class="common-list-cover"></image>
<text class="font-md text-dark px-2 py-1 common-list-lines">{{item.title}}</text>
<text class="px-2 font text-light-muted common-list-lines">{{item.desc}}</text>
<div class="px-2 pt-1 row a-end">
<price>{{item.pprice}}</price>
<text class="line-through text-light-muted ml-1">¥{{item.oprice}}</text>
</div>
</div>
</div>
</template>
<script>
import price from "@/components/common/price.nvue";
export default {
components:{
price
},
props:{
item:Object,
index:Number
},
methods: {
openDetail() {
uni.navigateTo({
url: '/pages/detail/detail'
});
}
},
}
</script>
<style src="@/common/zcm-main-nvue.css"></style>
<style>
.common-list{
padding-left:2.5px;padding-right: 2.5px;
}
.common-list-cover{
width: 370px;height: 370px;
}
.common-list-lines{
lines: 1;
}
</style>

View File

@@ -0,0 +1,29 @@
<template>
<view style="width: 372.5upx;">
<image :src="item.cover" mode="widthFix" lazy-load></image>
<view class="p-2 pt-1">
<view class="font-md">{{item.title}}</view>
<text class="d-block font text-light-muted">{{item.desc}}</text>
<view class="d-flex my-1">
<price>{{item.pprice}}</price>
<view class="font-sm text-light-muted line-through ml-1 a-self-end line-h" >{{item.oprice}}</view>
</view>
</view>
</view>
</template>
<script>
import price from "@/components/common/price.vue";
export default {
components:{
price
},
props:{
item:Object,
index:Number
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,85 @@
<template>
<view class="_popup" :class="popupClass">
<view class="_mask" @tap.stop="$emit('hide')"></view>
<view class="_body">
<slot />
</view>
</view>
</template>
<script>
export default {
props: {
popupClass: {
type: String,
default:'none'
},
},
}
</script>
<style scoped>
._popup ,._mask{
position: fixed;
top: 0;
width: 100%;
height: 100%;
}
._popup{
z-index: 2000;
display: none;
}
._mask{
z-index: 2002;
background: rgba(0,0,0,0.5);
}
._popup ._body{
position: fixed;
bottom: -1035rpx;
width: 100%;
padding: 0 4%;
height: 750rpx;
z-index: 2003;
border-radius: 20rpx 20rpx 0 0;
background: #FFFFFF;
display: flex;
flex-direction: column;
}
._popup.show{
display: block;
}
.show ._mask{
animation: showPopupMask 0.2s linear both;
}
.show ._body{
animation: showPopupBody 0.2s linear both;
}
._popup.hide{
display: block;
}
.hide ._mask{
animation: hidePopupMask 0.2s linear both;
}
.hide ._body{
animation: hidePopupBody 0.2s linear both;
}
@keyframes showPopupBody{
0%{ transform: translateY(0); }
100%{ transform: translateY(-100%); }
}
@keyframes hidePopupBody{
0%{ transform: translateY(-100%); }
100%{ transform: translateY(0); }
}
@keyframes showPopupMask{
0%{ opacity: 0; }
100%{ opacity: 1; }
}
@keyframes hidePopupMask{
0%{ opacity: 1; }
100%{ opacity: 0; }
}
._popup.none{
display: none;
}
</style>

View File

@@ -0,0 +1,15 @@
<template>
<div>
<div class="w-100" style="height: 18px;background-color: #F5F5F5;"></div>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@@ -0,0 +1,12 @@
<template>
<view class="divider"></view>
</template>
<script>
</script>
<style>
.divider{
height: 18upx;background: #F5F5F5;
}
</style>

View File

@@ -0,0 +1,61 @@
<template>
<view class="position-fixed top-0 left-0 right-0 bottom-0 loading-model"
v-if="show">
<view class="spinner">
<view class="double-bounce1"></view>
<view class="double-bounce2"></view>
</view>
</view>
</template>
<script>
export default {
props:{
show:{
type:Boolean,
default:false
}
}
}
</script>
<style scoped>
.loading-model{
background: rgba(255, 255, 255, 0.6);
z-index: 1000;
}
.spinner {
width: 60px;
height: 60px;
position: relative;
margin: 300upx auto;
z-index: 1000;
}
.double-bounce1, .double-bounce2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #FD6801;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
animation: bounce 2.0s infinite ease-in-out;
z-index: 1000;
}
.double-bounce2 {
animation-delay: -1.0s;
}
@keyframes bounce {
0%, 100% {
transform: scale(0.0);
} 50% {
transform: scale(1.0);
}
}
</style>

View File

@@ -0,0 +1,30 @@
<template>
<view class="position-absolute d-flex flex-column a-center j-center top-0 left-0 right-0 bottom-0" style="background-color: #F5F5F5;">
<image :src="getIcon"
mode="widthFix" style="width: 250rpx;"></image>
<view style="color: #B2B2B2;">{{msg}}</view>
</view>
</template>
<script>
export default {
props: {
icon: {
type: String,
default: "no_comment"
},
msg:{
type:String,
default:"您还没有待付款订单"
}
},
computed: {
getIcon() {
return `/static/images/nothing/${this.icon}.png`
}
},
}
</script>
<style>
</style>

View File

@@ -0,0 +1,18 @@
<template>
<div>
<div class="flex-row">
<text class="font" style="color: #FD6801;">¥</text>
<text style="color: #FD6801;font-size: 32px;"><slot /></text>
</div>
</div>
</template>
<script>
export default {
}
</script>
<style src="@/common/zcm-main-nvue.css"></style>
<style>
</style>

View File

@@ -0,0 +1,27 @@
<template>
<view class="d-flex line-h" :class="priceSize+' '+color">
<text class="a-self-start" :class="unitSize"></text><slot />
</view>
</template>
<script>
export default {
props:{
priceSize:{
type:String,
default:"font-md"
},
unitSize:{
type:String,
default:"font-sm"
},
color:{
type:String,
default:"main-text-color"
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,33 @@
<template>
<view class="row">
<view class="span24-8 px-2 mb-2" :key="index"
v-for="(item,index) in label.list">
<view class="rounded px-2 py-1 bg-light-secondary font-md text-center border"
:class="label.selected === index ? 'radio-active':'border-light-secondary'"
@click="changeRadio(index)">
{{item == 0?"零售":'整售'}}
</view>
</view>
</view>
</template>
<script>
export default {
props: {
label: Object,
},
methods: {
changeRadio(index) {
this.$emit('update:selected',index)
}
},
}
</script>
<style scoped>
.radio-active{
background: #FCE0D5!important;
color: #EB7320!important;
border-color: #EB7320!important;;
}
</style>

View File

@@ -0,0 +1,33 @@
<template>
<view class="row">
<view class="span24-8 px-2 mb-2" :key="index"
v-for="(item,index) in label.list">
<view class="rounded px-2 py-1 bg-light-secondary font-md text-center border"
:class="label.selected === index ? 'radio-active':'border-light-secondary'"
@click="changeRadio(index)">
{{item.name}}
</view>
</view>
</view>
</template>
<script>
export default {
props: {
label: Object,
},
methods: {
changeRadio(index) {
this.$emit('update:selected',index)
}
},
}
</script>
<style scoped>
.radio-active{
background: #FCE0D5!important;
color: #EB7320!important;
border-color: #EB7320!important;;
}
</style>

View File

@@ -0,0 +1,39 @@
<template>
<view class="row">
<view class="px-2 mb-2" :key="index"
v-for="(item,index) in label.list">
<view class="ml-2 mt-1 rounded bg-light-secondary font-md text-center border radio_size"
:class="label.selected === index ? 'radio-active':'border-light-secondary'"
@click="changeRadio(index)">
{{item.name}}
</view>
</view>
</view>
</template>
<script>
export default {
props: {
label: Object,
},
methods: {
changeRadio(index) {
this.$emit('update:selected',index)
}
},
}
</script>
<style scoped>
.radio-active{
background: #FCE0D5!important;
color: #EB7320!important;
border-color: #EB7320!important;
}
.radio_size{
width: 119.7upx;height: 50upx;
}
</style>

View File

@@ -0,0 +1,33 @@
<template>
<view class="row">
<view class="span24-8 px-2 mb-2" :key="index"
v-for="(item,index) in label.list">
<view class="rounded px-2 py-1 bg-light-secondary font-md text-center border"
:class="label.selected === index ? 'radio-active':'border-light-secondary'"
@click="changeRadio(index)">
{{item}}
</view>
</view>
</view>
</template>
<script>
export default {
props: {
label: Object,
},
methods: {
changeRadio(index) {
this.$emit('update:selected',index)
}
},
}
</script>
<style scoped>
.radio-active{
background: #FCE0D5!important;
color: #EB7320!important;
border-color: #EB7320!important;;
}
</style>