feat: 验证码

This commit is contained in:
2026-06-01 17:26:13 +08:00
parent 4d16af0ad6
commit 6e6d41a25c
11 changed files with 385 additions and 277 deletions
+20
View File
@@ -0,0 +1,20 @@
<template>
<view class="p-t-16 p-b-24">
<view class="m-b-24" v-for="(v, i) in list" :key="i">
<aiOrder :data="v" @addCar="emit('addCar', $event)" :source="0" @update="emit('update')" @shipment="emit('shipment')" />
</view>
</view>
</template>
<script setup>
import aiOrder from '@/components/ai_order/ai_order';
defineProps({
list: {
type: Array,
default: () => [],
},
});
const emit = defineEmits(['addCar', 'update', 'shipment']);
</script>
+20 -138
View File
@@ -1,151 +1,33 @@
<template>
<view class="content">
<view class="border-card" v-for="item in list" :key="item.name">
<view class="card_top flex-between">
<view class="title">{{ item.name }}</view>
<view class="QR_code_img">
<image src="/static/index/2.png" mode="scaleToFill"></image>
</view>
</view>
<view class="info_text flex-row-start">
等级:
<view class="tag">{{ item.grade }}</view>
<text>|</text>
达成时间:{{ item.createTime }}
</view>
<view class="chart_box flex-between">
<view class="chart_item">
<view class="chart_title flex-between">
<view>店铺总收益</view>
<image src="/static/aiStore/earnings.png" mode="scaleToFill"></image>
</view>
<view class="num_text">¥{{ item.price || 0.0 }}</view>
</view>
<view class="chart_item">
<view class="chart_title flex-between">
<view>绿色积分</view>
<image src="/static/aiStore/leaf.png" mode="scaleToFill"></image>
</view>
<view class="num_text">{{ item.leaf }}</view>
</view>
</view>
<view class="p-t-16 p-b-24">
<view class="m-b-24" v-for="(v, i) in list" :key="i">
<aiOrder
:data="v"
@addCar="emit('addCar', $event)"
:source="source"
@update="emit('update')"
@shipment="emit('shipment')"
/>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
import aiOrder from '@/components/ai_order/ai_order';
const list = ref([
{
name: '卓玛阳光防断洗发水',
price: 220.0,
leaf: 4200,
grade: '超级店长',
createTime: '2026-01-15 09:15:00',
defineProps({
list: {
type: Array,
default: () => [],
},
{
name: '治山贡鸡源头旗舰店',
price: 870.0,
leaf: 5600,
grade: '高级店长',
createTime: '2026-01-15 09:15:00',
source: {
type: Number,
default: 1,
},
]);
});
const emit = defineEmits(['addCar', 'update', 'shipment']);
</script>
<style lang="scss" scoped>
$primary-start: #ff7a45c6;
$primary-end: #ff4d7c7d;
.content {
padding: 0 10rpx 30rpx;
}
.border-card {
margin: 30rpx 0;
padding: 30rpx 40rpx;
border-radius: 22rpx;
color: #ffffff;
background: linear-gradient(90deg, $primary-start 0%, $primary-end 100%);
box-sizing: border-box;
}
.card_top {
.title {
font-size: 35rpx;
position: relative;
padding-left: 35rpx;
&::before {
content: '';
width: 20rpx;
height: 20rpx;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.95);
border-radius: 50%;
}
}
.QR_code_img {
width: 55rpx;
height: 55rpx;
padding: 10rpx;
border: rgba(255, 255, 255, 0.9) 1rpx solid;
border-radius: 10rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
}
}
}
.info_text {
font-size: 20rpx;
color: rgba(255, 255, 255, 0.85);
margin: 10rpx 0 20rpx;
.tag {
padding: 5rpx 15rpx;
color: $primary-start;
border-radius: 15rpx;
background: #fff;
}
text {
margin: 0 25rpx;
opacity: 0.9;
}
}
.chart_box {
.chart_item {
width: 48%;
padding: 20rpx 30rpx 10rpx;
border-radius: 20rpx;
box-sizing: border-box;
border: rgba(255, 255, 255, 0.6) 1rpx solid;
background: rgba(255, 255, 255, 0.18);
.chart_title {
font-size: 20rpx;
image {
width: 30rpx;
height: 30rpx;
margin-left: 10rpx;
}
}
.num_text {
font-size: 40rpx;
margin: 10rpx 0;
}
}
}
</style>