fix: bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m43s

This commit is contained in:
sexygoat
2026-03-14 15:16:21 +08:00
parent d43de4cd06
commit 8f31526499
11 changed files with 489 additions and 119 deletions

View File

@@ -45,3 +45,25 @@ export function generatePackageCode(): string {
return `PKG${year}${month}${day}${hours}${minutes}${seconds}${randomChars}`
}
/**
* 生成店铺编码
* 规则: SHOP + 年月日时分秒 + 4位随机数
* 示例: SHOP20260314143025ABCD
*/
export function generateShopCode(): string {
const now = new Date()
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0')
const day = String(now.getDate()).padStart(2, '0')
const hours = String(now.getHours()).padStart(2, '0')
const minutes = String(now.getMinutes()).padStart(2, '0')
const seconds = String(now.getSeconds()).padStart(2, '0')
// 生成4位随机大写字母
const randomChars = Array.from({ length: 4 }, () =>
String.fromCharCode(65 + Math.floor(Math.random() * 26))
).join('')
return `SHOP${year}${month}${day}${hours}${minutes}${seconds}${randomChars}`
}

View File

@@ -0,0 +1,220 @@
/**
* 省市区三级联动数据
* 简化版数据,包含主要省市区
*/
export interface RegionItem {
value: string
label: string
children?: RegionItem[]
}
export const regionData: RegionItem[] = [
{
value: '北京市',
label: '北京市',
children: [
{
value: '北京市',
label: '北京市',
children: [
{ value: '东城区', label: '东城区' },
{ value: '西城区', label: '西城区' },
{ value: '朝阳区', label: '朝阳区' },
{ value: '丰台区', label: '丰台区' },
{ value: '石景山区', label: '石景山区' },
{ value: '海淀区', label: '海淀区' },
{ value: '门头沟区', label: '门头沟区' },
{ value: '房山区', label: '房山区' },
{ value: '通州区', label: '通州区' },
{ value: '顺义区', label: '顺义区' },
{ value: '昌平区', label: '昌平区' },
{ value: '大兴区', label: '大兴区' },
{ value: '怀柔区', label: '怀柔区' },
{ value: '平谷区', label: '平谷区' },
{ value: '密云区', label: '密云区' },
{ value: '延庆区', label: '延庆区' }
]
}
]
},
{
value: '上海市',
label: '上海市',
children: [
{
value: '上海市',
label: '上海市',
children: [
{ value: '黄浦区', label: '黄浦区' },
{ value: '徐汇区', label: '徐汇区' },
{ value: '长宁区', label: '长宁区' },
{ value: '静安区', label: '静安区' },
{ value: '普陀区', label: '普陀区' },
{ value: '虹口区', label: '虹口区' },
{ value: '杨浦区', label: '杨浦区' },
{ value: '闵行区', label: '闵行区' },
{ value: '宝山区', label: '宝山区' },
{ value: '嘉定区', label: '嘉定区' },
{ value: '浦东新区', label: '浦东新区' },
{ value: '金山区', label: '金山区' },
{ value: '松江区', label: '松江区' },
{ value: '青浦区', label: '青浦区' },
{ value: '奉贤区', label: '奉贤区' },
{ value: '崇明区', label: '崇明区' }
]
}
]
},
{
value: '广东省',
label: '广东省',
children: [
{
value: '广州市',
label: '广州市',
children: [
{ value: '荔湾区', label: '荔湾区' },
{ value: '越秀区', label: '越秀区' },
{ value: '海珠区', label: '海珠区' },
{ value: '天河区', label: '天河区' },
{ value: '白云区', label: '白云区' },
{ value: '黄埔区', label: '黄埔区' },
{ value: '番禺区', label: '番禺区' },
{ value: '花都区', label: '花都区' },
{ value: '南沙区', label: '南沙区' },
{ value: '从化区', label: '从化区' },
{ value: '增城区', label: '增城区' }
]
},
{
value: '深圳市',
label: '深圳市',
children: [
{ value: '罗湖区', label: '罗湖区' },
{ value: '福田区', label: '福田区' },
{ value: '南山区', label: '南山区' },
{ value: '宝安区', label: '宝安区' },
{ value: '龙岗区', label: '龙岗区' },
{ value: '盐田区', label: '盐田区' },
{ value: '龙华区', label: '龙华区' },
{ value: '坪山区', label: '坪山区' },
{ value: '光明区', label: '光明区' }
]
},
{
value: '东莞市',
label: '东莞市',
children: [
{ value: '莞城区', label: '莞城区' },
{ value: '南城区', label: '南城区' },
{ value: '东城区', label: '东城区' },
{ value: '万江区', label: '万江区' }
]
},
{
value: '佛山市',
label: '佛山市',
children: [
{ value: '禅城区', label: '禅城区' },
{ value: '南海区', label: '南海区' },
{ value: '顺德区', label: '顺德区' },
{ value: '三水区', label: '三水区' },
{ value: '高明区', label: '高明区' }
]
}
]
},
{
value: '浙江省',
label: '浙江省',
children: [
{
value: '杭州市',
label: '杭州市',
children: [
{ value: '上城区', label: '上城区' },
{ value: '拱墅区', label: '拱墅区' },
{ value: '西湖区', label: '西湖区' },
{ value: '滨江区', label: '滨江区' },
{ value: '萧山区', label: '萧山区' },
{ value: '余杭区', label: '余杭区' },
{ value: '临平区', label: '临平区' },
{ value: '钱塘区', label: '钱塘区' },
{ value: '富阳区', label: '富阳区' },
{ value: '临安区', label: '临安区' }
]
},
{
value: '宁波市',
label: '宁波市',
children: [
{ value: '海曙区', label: '海曙区' },
{ value: '江北区', label: '江北区' },
{ value: '北仑区', label: '北仑区' },
{ value: '镇海区', label: '镇海区' },
{ value: '鄞州区', label: '鄞州区' },
{ value: '奉化区', label: '奉化区' }
]
}
]
},
{
value: '江苏省',
label: '江苏省',
children: [
{
value: '南京市',
label: '南京市',
children: [
{ value: '玄武区', label: '玄武区' },
{ value: '秦淮区', label: '秦淮区' },
{ value: '建邺区', label: '建邺区' },
{ value: '鼓楼区', label: '鼓楼区' },
{ value: '浦口区', label: '浦口区' },
{ value: '栖霞区', label: '栖霞区' },
{ value: '雨花台区', label: '雨花台区' },
{ value: '江宁区', label: '江宁区' },
{ value: '六合区', label: '六合区' },
{ value: '溧水区', label: '溧水区' },
{ value: '高淳区', label: '高淳区' }
]
},
{
value: '苏州市',
label: '苏州市',
children: [
{ value: '姑苏区', label: '姑苏区' },
{ value: '虎丘区', label: '虎丘区' },
{ value: '吴中区', label: '吴中区' },
{ value: '相城区', label: '相城区' },
{ value: '吴江区', label: '吴江区' }
]
}
]
},
{
value: '四川省',
label: '四川省',
children: [
{
value: '成都市',
label: '成都市',
children: [
{ value: '锦江区', label: '锦江区' },
{ value: '青羊区', label: '青羊区' },
{ value: '金牛区', label: '金牛区' },
{ value: '武侯区', label: '武侯区' },
{ value: '成华区', label: '成华区' },
{ value: '龙泉驿区', label: '龙泉驿区' },
{ value: '青白江区', label: '青白江区' },
{ value: '新都区', label: '新都区' },
{ value: '温江区', label: '温江区' },
{ value: '双流区', label: '双流区' },
{ value: '郫都区', label: '郫都区' },
{ value: '新津区', label: '新津区' }
]
}
]
}
]