初始化

This commit is contained in:
2023-12-29 00:08:10 +08:00
commit 5ed0fc646f
512 changed files with 54378 additions and 0 deletions

49
components/Copy/Copy.vue Normal file
View File

@@ -0,0 +1,49 @@
<template>
<view class="copy" @click="onCopy">
<svg :width="size" :height="size" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 12.4316V7.8125C13 6.2592 14.2592 5 15.8125 5H40.1875C41.7408 5 43 6.2592 43 7.8125V32.1875C43 33.7408 41.7408 35 40.1875 35H35.5163" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M32.1875 13H7.8125C6.2592 13 5 14.2592 5 15.8125V40.1875C5 41.7408 6.2592 43 7.8125 43H32.1875C33.7408 43 35 41.7408 35 40.1875V15.8125C35 14.2592 33.7408 13 32.1875 13Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>
</view>
</template>
<script>
export default {
name:"Copy",
props: {
size: {
default: 14,
type: Number | String
},
text: {
default: '',
type: String
},
successText: {
default: '已复制',
type: String
}
},
data() {
return {
};
},
methods: {
onCopy() {
uni.setClipboardData({
data: this.text,
success: ()=> {
uni.showToast({
title: this.successText,
icon: 'success'
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.copy {
}
</style>

View File

@@ -0,0 +1,46 @@
<template>
<text>
{{ loadText }}
</text>
</template>
<script>
export default {
name:"LoadMessage",
props: {
text: {
type: String,
default: ''
}
},
data() {
return {
loadText: ''
}
},
watch: {
text: {
immediate: true,
handler(newVal) {
let strList = this.text.split('');
let newList = [];
let index = 0;
let timer = setInterval(()=> {
if(index < strList.length) {
newList.push(strList[index]);
index++;
this.loadText = newList.join('');
} else {
clearInterval(timer);
}
}, 50)
}
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,87 @@
<template>
<view class="pay-pattern">
<u-radio-group :value="value" placement="column" @change="groupChange">
<view class="patter-item" v-for="pattern in payPatternList" :key="pattern.id" @click="change(pattern)">
<view class="patter-icon" style="width: 50rpx;height: 50rpx;">
<image :src="pattern.iconUrl" mode="" style="width: 100%;height: 100%"></image>
</view>
<view class="patter-name">
{{pattern.title}}
</view>
<view class="patter-chenck-box">
<u-radio :name="pattern.id" activeColor="#E39B46"></u-radio>
</view>
</view>
</u-radio-group>
</view>
</template>
<script>
export default {
name: "Pay-patter",
props: {
value: {
default: 1
},
payPatternList: {
type: Array,
default: () => [{
title: '微信支付',
iconUrl: '/static/12微信支付@2x.png',
// #ifdef H5
id: 0,
// #endif
// #ifdef MP-WEIXIN
id: 2,
// #endif
}, {
title: '余额支付',
iconUrl: '/static/12余额支付@2x.png',
id: 1,
}]
}
},
data() {
return {
radioValue: 1
};
},
onReady() {
this.radioValue = this.value
},
methods: {
change(pattern) {
this.$emit('change', pattern.id)
this.$emit('input', pattern.id)
},
groupChange(id) {
this.$emit('change', id)
this.$emit('input', id)
},
}
}
</script>
<style scoped lang="scss">
.pay-pattern {
display: flex;
flex-direction: column;
}
.patter-item {
display: flex;
align-items: center;
// padding: ;
margin: 20rpx 0;
}
.patter-name {
flex: 1;
}
.patter-icon {
// height: 100%;
margin-right: 30rpx;
}
</style>

View File

@@ -0,0 +1,87 @@
<template>
<view class="pay-pattern">
<u-radio-group :value="value" placement="column" @change="groupChange">
<view class="patter-item" v-for="pattern in payPatternList" :key="pattern.id" @click="change(pattern)">
<view class="patter-icon" style="width: 50rpx;height: 50rpx;">
<image :src="pattern.iconUrl" mode="" style="width: 100%;height: 100%"></image>
</view>
<view class="patter-name">
{{pattern.title}}
</view>
<view class="patter-chenck-box">
<u-radio :name="pattern.id" activeColor="#E39B46"></u-radio>
</view>
</view>
</u-radio-group>
</view>
</template>
<script>
export default {
name: "PayType",
props: {
value: {
default: 1
},
payPatternList: {
type: Array,
default: () => [{
title: '微信支付',
iconUrl: '/static/12微信支付@2x.png',
// #ifdef H5
id: 'wechat',
// #endif
// #ifdef MP-WEIXIN
id: 'routine',
// #endif
}, {
title: '余额支付',
iconUrl: '/static/12余额支付@2x.png',
id: 1,
}]
}
},
data() {
return {
radioValue: 1
};
},
onReady() {
this.radioValue = this.value
},
methods: {
change(pattern) {
this.$emit('change', pattern.id)
this.$emit('input', pattern.id)
},
groupChange(id) {
this.$emit('change', id)
this.$emit('input', id)
},
}
}
</script>
<style scoped lang="scss">
.pay-pattern {
display: flex;
flex-direction: column;
}
.patter-item {
display: flex;
align-items: center;
// padding: ;
margin: 20rpx 0;
}
.patter-name {
flex: 1;
}
.patter-icon {
// height: 100%;
margin-right: 30rpx;
}
</style>

View File

@@ -0,0 +1,93 @@
<template>
<u-popup
style="position: absolute"
:show="isViewLetter"
@close="close"
:closeable="true"
mode="center"
customStyle="border-radius: 40rpx;"
>
<view class="content-main">
<view class="content-title"> 请选择制作方式 </view>
<view
class="content-item"
v-for="(item ,index) in productionType"
:key="item.id"
>
<view class="content-item-button" @click="$emit('selectPlan', item)">
{{ item.title }}
</view>
<view class="content-item-explain">
{{ item.explain }}
<text style="color: #ce7a2c" v-if="item.price">{{ item.price }}</text
>{{ item.price ? "元/次" : "" }}
</view>
</view>
</view>
</u-popup>
</template>
<script>
export default {
name: "SelectProductionMethod",
created() {
this.productionType = this.$store.productionType;
console.log(this.productionType, "111111111111111");
},
data() {
return {
isViewLetter: true,
productionType: false,
};
},
methods: {
close() {
this.$emit("close");
},
},
};
</script>
<style lang="scss">
.content-main {
width: 600rpx;
height: 654rpx;
box-sizing: border-box;
padding: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.content-title {
width: 238rpx;
height: 45rpx;
font-size: 34rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.content-item-button {
margin-top: 40rpx;
flex: 1;
background: linear-gradient(to bottom right, #e8b648, #e08745);
height: 80rpx;
width: 500rpx;
font-size: 34rpx;
border-radius: 20rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
.content-item-explain {
width: 100%;
font-size: 26rpx;
font-family: OPPOSans Regular-Regular, OPPOSans Regular;
font-weight: 400;
color: #111111;
text-align: center;
margin-top: 10rpx;
}
</style>

View File

@@ -0,0 +1,61 @@
<template>
<view class="event-notice" @click="$emit('click')">
<view class="notice-left-icon">
<slot name="leftIcon"></slot>
</view>
<view class="notice-content">
{{content}}
</view>
<view class="notice-right-icon">
<slot name="rightIcon"></slot>
</view>
</view>
</template>
<script>
export default {
name: "event-notice",
props: {
content: {
type: String,
default: ''
},
},
data() {
return {
};
}
}
</script>
<style lang="scss" scoped>
.event-notice {
display: flex;
background-color: #FFF7F2;
border-radius: 20rpx;
height: 90rpx;
align-items: center;
padding: 10rpx 20rpx;
.notice-left-icon,.notice-right-icon{
width: 66rpx;
height: 66rpx;
line-height: 66rpx;
display: flex;
align-items: center;
justify-content: center; }
.notice-left-icon{
margin-right: 20rpx;
}
.notice-content{
flex: 1;
color: #CE7A2C;
font-weight: bold;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
font-size: 32rpx;
}
}
</style>

View File

@@ -0,0 +1,93 @@
<template>
<scroll-view class="waybill-info" style="height:200rpx;" :scroll-y="true">
<template v-if="WaybillInfo">
<view class="waybill-info-item" v-for="item in [...WaybillInfo.kuaidi.data].reverse()">
<view class="time-line">
</view>
<view class="item-icon">
<image src="../../static/11快递@2x.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
</view>
<view class="item-info">
<view class="item-status">
{{getTitle(item.context)}}
</view>
<view class="item-time">
{{item.time}}
</view>
<view class="item-status-address">
{{item.context}}
</view>
</view>
</view>
</template>
</scroll-view>
</template>
<script>
export default {
props: {
WaybillInfo: {
type: Object,
default: () => {}
}
},
name: "waybill-info",
data() {
return {
getTitle(text) {
const regex = /【(.*?)】/;
const matches = regex.exec(text);
if (matches && matches.length > 1) {
const extractedText = matches[1]; // 提取括号中的字
return extractedText
}
},
};
}
}
</script>
<style scoped lang="scss">
.waybill-info {
flex: 1;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 40rpx;
min-height: 300rpx;
padding: 38rpx;
position: relative;
}
.time-line {
position: absolute;
height: calc(100% - 72rpx);
border-left: 1rpx dashed #ccc;
left: 26rpx;
top: 38rpx;
}
.waybill-info-item {
display: flex;
margin-bottom: 60rpx;
.item-icon {
margin-right: 20rpx;
}
.item-status {
font-size: 30rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.item-time,
.item-status-address {
font-size: 24rpx;
color: #999999;
}
}
</style>

View File

@@ -0,0 +1,111 @@
<template>
<view class="waybill" @click="$emit('click',WaybillInfo)" v-if="WaybillInfo">
<view class="waybill-number">
运单号 {{WaybillInfo.kuaidi.nu}}
</view>
<view class="waybill-address">
<view class="waybill-address-form waybill-address-info">
<view class="address-user-name">
{{WaybillInfo.send_address[2]}}
</view>
<view class="address-name">
{{formatDate(WaybillInfo.create_time)}}
</view>
</view>
<view class="waybill-address-status">
{{'运输中'}}
<image src="../../static/10箭头@2x.png" mode="" style="width: 100%;height: 12rpx;"></image>
</view>
<view class="waybill-address-to waybill-address-info">
<view class="address-user-name">
{{WaybillInfo.take_address[2]}}
</view>
<view class="address-name">
{{formatDate(WaybillInfo.kuaidi.data[WaybillInfo.kuaidi.data.length-1].time)}}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
WaybillInfo: {
type: Object,
default: () => {}
}
},
name: "waybill",
data() {
return {
};
},
methods: {
formatDate(date) {
console.log(date);
let dateArr = date.split('-')
dateArr.splice(0, 1)
return dateArr.join('-')
}
},
}
</script>
<style scoped lang="scss">
.waybill {
height: 260rpx;
background: #FFFFFF;
border-radius: 40rpx 40rpx 40rpx 40rpx;
padding: 38rpx 49rpx;
box-sizing: border-box;
margin: 30rpx 0;
.waybill-number {
font-size: 30rpx;
color: #999999;
margin-bottom: 36rpx;
}
}
.waybill-address {
display: flex;
.waybill-address-info {
// padding: 0 20rpx;
display: flex;
flex-direction: column;
align-items: center;
width: 180rpx;
overflow: hidden;
.address-user-name {
width: 100%;
font-weight: bold;
font-size: 34rpx;
white-space: nowrap;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
}
.address-name {
width: 100%;
font-size: 12rpx;
color: #999999;
white-space: nowrap;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
}
}
.waybill-address-status {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
}
</style>