diff --git a/.gitignore b/.gitignore
index 3c3629e..e42107b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
node_modules
+pages/test/
+pages/test-tools/
\ No newline at end of file
diff --git a/pages/seller/index.js b/pages/seller/index.js
index 375897a..1e70991 100644
--- a/pages/seller/index.js
+++ b/pages/seller/index.js
@@ -23,17 +23,1342 @@ Page({
showYolkSelectModal: false, // 控制蛋黄选择弹窗显示
selectedNameIndex: -1, // 商品名称弹窗中选中的索引
selectedYolkIndex: -1,//蛋黄弹窗中选中的索引,
- // 商品名称选项列表
- productNameOptions: ['罗曼粉', '伊莎粉', '罗曼灰', '海蓝灰', '海蓝褐', '绿壳', '粉一', '粉二', '粉八', '京粉1号', '京红', '京粉6号', '京粉3号', '农大系列', '黑鸡土蛋', '双黄蛋', '大午金凤', '黑凤'],
+ // 商品名称选项列表
+ productNameOptions: ['罗曼粉', '伊莎粉', '罗曼灰', '海蓝灰', '海蓝褐', '绿壳', '粉一', '粉二', '粉八', '京粉1号', '京红', '京粉6号', '京粉3号', '农大系列', '黑鸡土蛋', '双黄蛋', '大午金凤', '黑凤'],
// 蛋黄选项
yolkOptions: ['红心', '黄心', '双色'],
// 规格选项
- specOptions: ['格子装', '散托', '不限规格','净重47+', '净重46-47', '净重45-46', '净重44-45', '净重43-44', '净重42-43', '净重41-42', '净重40-41', '净重39-40', '净重38-39', '净重37-39','净重37-38' , '净重36-38', '净重36-37', '净重35-36', '净重34-35', '净重33-34', '净重32-33', '净重32-34', '净重31-32', '净重30-35', '净重30-34', '净重30-32', '净重30-31', '净重29-31', '净重29-30', '净重28-29', '净重28以下', '毛重52以上', '毛重50-51', '毛重48-49', '毛重47-48', '毛重46-47', '毛重45-47', '毛重45-46', '毛重44-45', '毛重43-44', '毛重42-43', '毛重41-42', '毛重40-41', '毛重38-39', '毛重36-37', '毛重34-35', '毛重32-33', '毛重30-31', '毛重30以下'],
+ specOptions: ['格子装', '散托', '不限规格', '净重47+', '净重46-47', '净重45-46', '净重44-45', '净重43-44', '净重42-43', '净重41-42', '净重40-41', '净重39-40', '净重38-39', '净重37-39', '净重37-38', '净重36-38', '净重36-37', '净重35-36', '净重34-35', '净重33-34', '净重32-33', '净重32-34', '净重31-32', '净重30-35', '净重30-34', '净重30-32', '净重30-31', '净重29-31', '净重29-30', '净重28-29', '净重28以下', '毛重52以上', '毛重50-51', '毛重48-49', '毛重47-48', '毛重46-47', '毛重45-47', '毛重45-46', '毛重44-45', '毛重43-44', '毛重42-43', '毛重41-42', '毛重40-41', '毛重38-39', '毛重36-37', '毛重34-35', '毛重32-33', '毛重30-31', '毛重30以下'],
// 规格搜索相关变量
specSearchKeyword: '', // 创建货源弹窗中的规格搜索关键词
editSpecSearchKeyword: '', // 编辑货源弹窗中的规格搜索关键词
filteredSpecOptions: [], // 过滤后的规格选项数组
filteredEditSpecOptions: [], // 编辑货源过滤后的规格选项数组
+ // 地区选择相关变量 - 三级联动
+ showRegionSelectModal: false, // 控制地区选择弹窗显示
+ currentRegionMode: 'create', // 当前地区选择模式:create 或 edit
+ // 三级联动地区数据结构
+ regionOptions: [
+ // 直辖市
+ {
+ name: '北京市',
+ cities: [
+ {
+ name: '北京市',
+ districts: ['东城区', '西城区', '朝阳区', '丰台区', '石景山区', '海淀区', '门头沟区', '房山区', '通州区', '顺义区', '昌平区', '大兴区', '怀柔区', '平谷区', '密云区', '延庆区']
+ }
+ ]
+ },
+ {
+ name: '陕西省',
+ cities: [
+ { name: '西安市', districts: ['新城区', '碑林区', '莲湖区', '灞桥区', '未央区', '雁塔区', '阎良区', '临潼区', '长安区', '高陵区', '鄠邑区', '蓝田县', '周至县'] },
+ { name: '铜川市', districts: ['王益区', '印台区', '耀州区', '宜君县'] },
+ { name: '宝鸡市', districts: ['渭滨区', '金台区', '陈仓区', '凤翔区', '岐山县', '扶风县', '眉县', '陇县', '千阳县', '麟游县', '凤县', '太白县'] },
+ { name: '咸阳市', districts: ['秦都区', '杨陵区', '渭城区', '兴平市', '三原县', '泾阳县', '乾县', '礼泉县', '永寿县', '长武县', '旬邑县', '淳化县', '武功县'] },
+ { name: '渭南市', districts: ['临渭区', '华州区', '韩城市', '华阴市', '潼关县', '大荔县', '合阳县', '澄城县', '蒲城县', '白水县', '富平县'] },
+ { name: '延安市', districts: ['宝塔区', '安塞区', '延长县', '延川县', '子长市', '志丹县', '吴起县', '甘泉县', '富县', '洛川县', '宜川县', '黄龙县', '黄陵县'] },
+ { name: '汉中市', districts: ['汉台区', '南郑区', '城固县', '洋县', '西乡县', '勉县', '宁强县', '略阳县', '镇巴县', '留坝县', '佛坪县'] },
+ { name: '榆林市', districts: ['榆阳区', '横山区', '神木市', '府谷县', '靖边县', '定边县', '绥德县', '米脂县', '佳县', '吴堡县', '清涧县', '子洲县'] },
+ { name: '安康市', districts: ['汉滨区', '汉阴县', '石泉县', '宁陕县', '紫阳县', '岚皋县', '平利县', '镇坪县', '旬阳市', '白河县'] },
+ { name: '商洛市', districts: ['商州区', '洛南县', '丹凤县', '商南县', '山阳县', '镇安县', '柞水县'] }
+ ]
+ },
+ {
+ name: '甘肃省',
+ cities: [
+ { name: '兰州市', districts: ['城关区', '七里河区', '西固区', '安宁区', '红古区', '永登县', '皋兰县', '榆中县'] },
+ { name: '嘉峪关市', districts: ['嘉峪关市'] },
+ { name: '金昌市', districts: ['金川区', '永昌县'] },
+ { name: '白银市', districts: ['白银区', '平川区', '靖远县', '会宁县', '景泰县'] },
+ { name: '天水市', districts: ['秦州区', '麦积区', '清水县', '秦安县', '甘谷县', '武山县', '张家川回族自治县'] },
+ { name: '武威市', districts: ['凉州区', '民勤县', '古浪县', '天祝藏族自治县'] },
+ { name: '张掖市', districts: ['甘州区', '肃南裕固族自治县', '民乐县', '临泽县', '高台县', '山丹县'] },
+ { name: '平凉市', districts: ['崆峒区', '泾川县', '灵台县', '崇信县', '华亭市', '庄浪县', '静宁县'] },
+ { name: '酒泉市', districts: ['肃州区', '金塔县', '瓜州县', '肃北蒙古族自治县', '阿克塞哈萨克族自治县', '玉门市', '敦煌市'] },
+ { name: '庆阳市', districts: ['西峰区', '庆城县', '环县', '华池县', '合水县', '正宁县', '宁县', '镇原县'] },
+ { name: '定西市', districts: ['安定区', '通渭县', '陇西县', '渭源县', '临洮县', '漳县', '岷县'] },
+ { name: '陇南市', districts: ['武都区', '成县', '文县', '宕昌县', '康县', '西和县', '礼县', '徽县', '两当县'] },
+ { name: '临夏回族自治州', districts: ['临夏市', '临夏县', '康乐县', '永靖县', '广河县', '和政县', '东乡族自治县', '积石山保安族东乡族撒拉族自治县'] },
+ { name: '甘南藏族自治州', districts: ['合作市', '临潭县', '卓尼县', '舟曲县', '迭部县', '玛曲县', '碌曲县', '夏河县'] }
+ ]
+ },
+ {
+ name: '青海省',
+ cities: [
+ { name: '西宁市', districts: ['城东区', '城中区', '城西区', '城北区', '大通回族土族自治县', '湟中区', '湟源县'] },
+ { name: '海东市', districts: ['乐都区', '平安区', '民和回族土族自治县', '互助土族自治县', '化隆回族自治县', '循化撒拉族自治县'] },
+ { name: '海北藏族自治州', districts: ['海晏县', '祁连县', '刚察县', '门源回族自治县'] },
+ { name: '黄南藏族自治州', districts: ['同仁市', '尖扎县', '泽库县', '河南蒙古族自治县'] },
+ { name: '海南藏族自治州', districts: ['共和县', '同德县', '贵德县', '兴海县', '贵南县'] },
+ { name: '果洛藏族自治州', districts: ['玛沁县', '班玛县', '甘德县', '达日县', '久治县', '玛多县'] },
+ { name: '玉树藏族自治州', districts: ['玉树市', '杂多县', '称多县', '治多县', '囊谦县', '曲麻莱县'] },
+ { name: '海西蒙古族藏族自治州', districts: ['格尔木市', '德令哈市', '茫崖市', '天峻县', '都兰县', '乌兰县'] }
+ ]
+ },
+ {
+ name: '台湾省',
+ cities: [
+ { name: '台北市', districts: ['中正区', '大同区', '中山区', '松山区', '大安区', '万华区', '信义区', '士林区', '北投区', '内湖区', '南港区', '文山区'] },
+ { name: '高雄市', districts: ['新兴区', '前金区', '苓雅区', '盐埕区', '鼓山区', '旗津区', '前镇区', '三民区', '楠梓区', '小港区', '左营区', '仁武区', '大树区', '鸟松区', '冈山区', '桥头区', '燕巢区', '田寮区', '阿莲区', '路竹区', '湖内区', '茄萣区', '永安区', '弥陀区', '梓官区', '旗山区', '美浓区', '六龟区', '甲仙区', '杉林区', '内门区', '茂林区', '桃源区', '那玛夏区'] },
+ { name: '新北市', districts: ['板桥区', '三重区', '中和区', '永和区', '新庄区', '新店区', '树林区', '莺歌区', '三峡区', '淡水区', '汐止区', '瑞芳区', '土城区', '芦洲区', '五股区', '泰山区', '林口区', '八里区', '三芝区', '石门区', '金山区', '万里区', '金山区', '贡寮区', '坪林区', '乌来区', '深坑区', '石碇区', '新店区', '双溪区', '平溪区', '中山区', '大同区', '中正区', '万华区', '信义区', '松山区', '大安区', '南港区', '内湖区', '士林区', '北投区', '文山区'] },
+ { name: '台中市', districts: ['中区', '东区', '南区', '西区', '北区', '北屯区', '西屯区', '南屯区', '太平区', '大里区', '雾峰区', '乌日区', '丰原区', '后里区', '石冈区', '东势区', '和平区', '新社区', '潭子区', '大雅区', '神冈区', '大肚区', '沙鹿区', '龙井区', '梧栖区', '清水区', '大甲区', '外埔区', '大安区长'] },
+ { name: '台南市', districts: ['中西区', '东区', '南区', '北区', '安平区', '安南区', '永康区', '归仁区', '新化区', '左镇区', '玉井区', '楠西区', '南化区', '仁德区', '关庙区', '龙崎区', '官田区', '麻豆区', '佳里区', '西港区', '七股区', '将军区', '学甲区', '北门区', '新营区', '后壁区', '白河区', '东山区', '六甲区', '下营区', '柳营区', '盐水区', '善化区', '大内区', '山上区', '新市', '安定区'] },
+ { name: '桃园市', districts: ['桃园区', '中坜区', '平镇区', '八德区', '杨梅区', '芦竹区', '大溪区', '龙潭区', '龟山区', '大园区', '观音区', '新屋区', '复兴区'] },
+ { name: '宜兰县', districts: ['宜兰市', '头城镇', '罗东镇', '苏澳镇', '礁溪乡', '壮围乡', '员山乡', '冬山乡', '五结乡', '三星乡', '大同乡', '南澳乡'] },
+ { name: '新竹县', districts: ['竹北市', '竹东镇', '新埔镇', '关西镇', '湖口乡', '新丰乡', '芎林乡', '宝山乡', '北埔乡', '峨眉乡', '尖石乡', '横山乡', '五峰乡'] },
+ { name: '苗栗县', districts: ['苗栗市', '苑里镇', '通霄镇', '后龙镇', '竹南镇', '头份市', '造桥乡', '西湖乡', '头屋乡', '公馆乡', '铜锣乡', '三义乡', '西湖乡', '南庄乡', '大湖乡', '卓兰镇', '泰安乡'] },
+ { name: '彰化县', districts: ['彰化市', '和美镇', '鹿港镇', '溪湖镇', '员林市', '北斗镇', '田中镇', '二林镇', '永靖乡', '伸港乡', '线西乡', '福兴乡', '秀水乡', '花坛乡', '芬园乡', '大村乡', '埔盐乡', '埔心乡', '溪州乡', '竹塘乡', '社头乡', '二水乡', '田尾乡', '埤头乡', '芳苑乡', '大城乡', '竹塘乡', '溪湖乡', '埤头乡'] },
+ { name: '南投县', districts: ['南投市', '埔里镇', '草屯镇', '竹山镇', '集集镇', '名间乡', '鹿谷乡', '中寮乡', '鱼池乡', '国姓乡', '水里乡', '信义乡', '仁爱乡'] },
+ { name: '云林县', districts: ['斗六市', '斗南镇', '虎尾镇', '土库镇', '西螺镇', '北港镇', '古坑乡', '大埤乡', '莿桐乡', '林内乡', '二仑乡', '仑背乡', '麦寮乡', '东势乡', '褒忠乡', '台西乡', '元长乡', '四湖乡', '口湖乡', '水林乡'] },
+ { name: '嘉义县', districts: ['太保市', '朴子市', '布袋镇', '大林镇', '民雄乡', '溪口乡', '新港乡', '六脚乡', '东石乡', '义竹乡', '鹿草乡', '水上乡', '中埔乡', '竹崎乡', '梅山乡', '番路乡', '大埔乡', '阿里山乡'] },
+ { name: '屏东县', districts: ['屏东市', '潮州镇', '东港镇', '恒春镇', '万丹乡', '长治乡', '麟洛乡', '九如乡', '里港乡', '盐埔乡', '高树乡', '万峦乡', '内埔乡', '竹田乡', '新埤乡', '枋寮乡', '枋山乡', '春日乡', '来义乡', '富里乡', '狮子乡', '牡丹乡', '车城乡', '满州乡', '枋寮乡', '三地门乡', '雾台乡'] },
+ { name: '台东县', districts: ['台东市', '成功镇', '关山镇', '卑南乡', '鹿野乡', '池上乡', '东河乡', '长滨乡', '太麻里乡', '金峰乡', '大武乡', '绿岛乡', '兰屿乡', '延平乡', '海端乡', '达仁乡'] },
+ { name: '花莲县', districts: ['花莲市', '凤林镇', '玉里镇', '新城乡', '吉安乡', '寿丰乡', '秀林乡', '光复乡', '丰滨乡', '瑞穗乡', '富里乡', '万荣乡', '卓溪乡'] },
+ { name: '澎湖县', districts: ['马公市', '湖西乡', '白沙乡', '西屿乡', '望安乡', '七美乡'] },
+ { name: '金门县', districts: ['金城镇', '金湖镇', '金沙镇', '金宁乡', '烈屿乡', '乌丘乡'] },
+ { name: '连江县', districts: ['南竿乡', '北竿乡', '莒光乡', '东引乡'] }
+ ]
+ },
+ {
+ name: '云南省',
+ cities: [
+ { name: '昆明市', districts: ['五华区', '盘龙区', '官渡区', '西山区', '东川区', '呈贡区', '晋宁区', '富民县', '宜良县', '石林彝族自治县', '嵩明县', '禄劝彝族苗族自治县', '寻甸回族彝族自治县'] },
+ { name: '曲靖市', districts: ['麒麟区', '沾益区', '马龙区', '宣威市', '富源县', '罗平县', '师宗县', '陆良县', '会泽县'] },
+ { name: '玉溪市', districts: ['红塔区', '江川区', '澄江市', '通海县', '华宁县', '易门县', '峨山彝族自治县', '新平彝族傣族自治县', '元江哈尼族彝族傣族自治县'] },
+ { name: '保山市', districts: ['隆阳区', '腾冲市', '施甸县', '龙陵县', '昌宁县'] },
+ { name: '昭通市', districts: ['昭阳区', '鲁甸县', '巧家县', '盐津县', '大关县', '永善县', '绥江县', '镇雄县', '彝良县', '威信县', '水富市'] },
+ { name: '丽江市', districts: ['古城区', '玉龙纳西族自治县', '永胜县', '华坪县', '宁蒗彝族自治县'] },
+ { name: '普洱市', districts: ['思茅区', '宁洱哈尼族彝族自治县', '墨江哈尼族自治县', '景东彝族自治县', '景谷傣族彝族自治县', '镇沅彝族哈尼族拉祜族自治县', '江城哈尼族彝族自治县', '孟连傣族拉祜族佤族自治县', '澜沧拉祜族自治县', '西盟佤族自治县'] },
+ { name: '临沧市', districts: ['临翔区', '凤庆县', '云县', '永德县', '镇康县', '双江拉祜族佤族布朗族傣族自治县', '耿马傣族佤族自治县', '沧源佤族自治县'] },
+ { name: '楚雄彝族自治州', districts: ['楚雄市', '双柏县', '牟定县', '南华县', '姚安县', '大姚县', '永仁县', '元谋县', '武定县', '禄丰市'] },
+ { name: '红河哈尼族彝族自治州', districts: ['蒙自市', '个旧市', '开远市', '弥勒市', '建水县', '石屏县', '泸西县', '元阳县', '红河县', '金平苗族瑶族傣族自治县', '绿春县', '屏边苗族自治县', '河口瑶族自治县'] },
+ { name: '文山壮族苗族自治州', districts: ['文山市', '砚山县', '西畴县', '麻栗坡县', '马关县', '丘北县', '广南县', '富宁县'] },
+ { name: '西双版纳傣族自治州', districts: ['景洪市', '勐海县', '勐腊县'] },
+ { name: '大理白族自治州', districts: ['大理市', '漾濞彝族自治县', '祥云县', '宾川县', '弥渡县', '南涧彝族自治县', '巍山彝族回族自治县', '永平县', '云龙县', '洱源县', '剑川县', '鹤庆县'] },
+ { name: '德宏傣族景颇族自治州', districts: ['芒市', '瑞丽市', '梁河县', '盈江县', '陇川县'] },
+ { name: '怒江傈僳族自治州', districts: ['泸水市', '福贡县', '贡山独龙族怒族自治县', '兰坪白族普米族自治县'] },
+ { name: '迪庆藏族自治州', districts: ['香格里拉市', '德钦县', '维西傈僳族自治县'] }
+ ]
+ },
+ {
+ name: '贵州省',
+ cities: [
+ { name: '贵阳市', districts: ['南明区', '云岩区', '花溪区', '乌当区', '白云区', '观山湖区', '开阳县', '息烽县', '修文县', '清镇市'] },
+ { name: '六盘水市', districts: ['钟山区', '六枝特区', '水城区', '盘州市'] },
+ { name: '遵义市', districts: ['红花岗区', '汇川区', '播州区', '赤水市', '仁怀市', '桐梓县', '绥阳县', '正安县', '道真仡佬族苗族自治县', '务川仡佬族苗族自治县', '凤冈县', '湄潭县', '余庆县', '习水县'] },
+ { name: '安顺市', districts: ['西秀区', '平坝区', '普定县', '镇宁布依族苗族自治县', '关岭布依族苗族自治县', '紫云苗族布依族自治县'] },
+ { name: '毕节市', districts: ['七星关区', '赫章县', '威宁彝族回族苗族自治县', '纳雍县', '织金县', '黔西县', '金沙县', '大方县'] },
+ { name: '铜仁市', districts: ['碧江区', '万山区', '江口县', '玉屏侗族自治县', '石阡县', '思南县', '印江土家族苗族自治县', '德江县', '沿河土家族自治县', '松桃苗族自治县'] },
+ { name: '黔东南苗族侗族自治州', districts: ['凯里市', '黄平县', '施秉县', '三穗县', '镇远县', '岑巩县', '天柱县', '锦屏县', '剑河县', '台江县', '黎平县', '榕江县', '从江县', '雷山县', '麻江县', '丹寨县'] },
+ { name: '黔南布依族苗族自治州', districts: ['都匀市', '福泉市', '荔波县', '贵定县', '瓮安县', '独山县', '平塘县', '罗甸县', '长顺县', '龙里县', '惠水县', '三都水族自治县'] },
+ { name: '黔西南布依族苗族自治州', districts: ['兴义市', '兴仁市', '普安县', '晴隆县', '贞丰县', '望谟县', '册亨县', '安龙县'] }
+ ]
+ },
+ {
+ name: '海南省',
+ cities: [
+ { name: '海口市', districts: ['秀英区', '龙华区', '琼山区', '美兰区'] },
+ { name: '三亚市', districts: ['吉阳区', '天涯区', '海棠区', '崖州区'] },
+ { name: '三沙市', districts: ['西沙区', '南沙区'] },
+ { name: '儋州市', districts: ['那大镇', '和庆镇', '南丰镇', '大成镇', '雅星镇', '兰洋镇', '光村镇', '木棠镇', '海头镇', '峨蔓镇', '王五镇', '白马井镇', '中和镇', '排浦镇', '东成镇'] },
+ { name: '五指山市', districts: ['通什镇', '南圣镇', '毛阳镇', '番阳镇', '水满乡', '畅好乡', '毛道乡'] },
+ { name: '文昌市', districts: ['文城镇', '重兴镇', '蓬莱镇', '会文镇', '东路镇', '潭牛镇', '东阁镇', '文教镇', '东郊镇', '龙楼镇', '昌洒镇', '翁田镇', '抱罗镇', '冯坡镇', '锦山镇', '铺前镇', '公坡镇'] },
+ { name: '琼海市', districts: ['嘉积镇', '万泉镇', '石壁镇', '中原镇', '博鳌镇', '阳江镇', '龙江镇', '潭门镇', '塔洋镇', '长坡镇', '会山镇', '大路镇'] },
+ { name: '万宁市', districts: ['万城镇', '龙滚镇', '山根镇', '和乐镇', '后安镇', '大茂镇', '东澳镇', '礼纪镇', '长丰镇', '北大镇', '南桥镇', '三更罗镇', '东兴农场', '东和农场'] },
+ { name: '东方市', districts: ['八所镇', '东河镇', '大田镇', '感城镇', '板桥镇', '三家镇', '四更镇', '新龙镇', '天安乡', '江边乡'] },
+ { name: '定安县', districts: ['定城镇', '新竹镇', '龙湖镇', '雷鸣镇', '龙门镇', '岭口镇', '翰林镇', '龙河镇', '黄竹镇', '富文镇'] },
+ { name: '屯昌县', districts: ['屯城镇', '新兴镇', '枫木镇', '乌坡镇', '南吕镇', '南坤镇', '坡心镇', '西昌镇'] },
+ { name: '澄迈县', districts: ['金江镇', '老城镇', '瑞溪镇', '永发镇', '加乐镇', '文儒镇', '中兴镇', '仁兴镇', '福山镇', '桥头镇', '大丰镇', '邦溪镇'] },
+ { name: '临高县', districts: ['临城镇', '波莲镇', '东英镇', '博厚镇', '皇桐镇', '多文镇', '和舍镇', '南宝镇', '新盈镇', '调楼镇', '加来镇'] },
+ { name: '白沙黎族自治县', districts: ['牙叉镇', '七坊镇', '打安镇', '邦溪镇', '南开乡', '元门乡', '阜龙乡', '细水乡', '青松乡', '金波乡', '荣邦乡'] },
+ { name: '昌江黎族自治县', districts: ['石碌镇', '叉河镇', '十月田镇', '乌烈镇', '昌化镇', '海尾镇', '七叉镇', '王下乡'] },
+ { name: '乐东黎族自治县', districts: ['抱由镇', '万冲镇', '大安镇', '志仲镇', '千家镇', '九所镇', '利国镇', '黄流镇', '佛罗镇', '尖峰镇', '莺歌海镇', '尖峰岭', '山荣农场'] },
+ { name: '陵水黎族自治县', districts: ['椰林镇', '新村镇', '英州镇', '本号镇', '隆广镇', '三才镇', '光坡镇', '文罗镇', '黎安镇', '提蒙乡', '群英乡'] },
+ { name: '保亭黎族苗族自治县', districts: ['保城镇', '什玲镇', '加茂镇', '响水镇', '新政镇', '三道镇', '六弓乡', '南林乡', '毛感乡'] },
+ { name: '琼中黎族苗族自治县', districts: ['营根镇', '湾岭镇', '黎母山镇', '和平镇', '长征镇', '红毛镇', '中平镇', '吊罗山乡', '上安乡', '什运乡'] }
+ ]
+ },
+ {
+ name: '内蒙古自治区',
+ cities: [
+ { name: '呼和浩特市', districts: ['新城区', '回民区', '玉泉区', '赛罕区', '土默特左旗', '托克托县', '和林格尔县', '清水河县', '武川县'] },
+ { name: '包头市', districts: ['东河区', '昆都仑区', '青山区', '石拐区', '白云鄂博矿区', '九原区', '土默特右旗', '固阳县', '达尔罕茂明安联合旗'] },
+ { name: '乌海市', districts: ['海勃湾区', '海南区', '乌达区'] },
+ { name: '赤峰市', districts: ['红山区', '元宝山区', '松山区', '阿鲁科尔沁旗', '巴林左旗', '巴林右旗', '林西县', '克什克腾旗', '翁牛特旗', '喀喇沁旗', '宁城县', '敖汉旗'] },
+ { name: '通辽市', districts: ['科尔沁区', '霍林郭勒市', '科尔沁左翼中旗', '科尔沁左翼后旗', '开鲁县', '库伦旗', '奈曼旗', '扎鲁特旗'] },
+ { name: '鄂尔多斯市', districts: ['东胜区', '康巴什区', '达拉特旗', '准格尔旗', '鄂托克前旗', '鄂托克旗', '杭锦旗', '乌审旗', '伊金霍洛旗'] },
+ { name: '呼伦贝尔市', districts: ['海拉尔区', '扎赉诺尔区', '满洲里市', '牙克石市', '扎兰屯市', '额尔古纳市', '根河市', '阿荣旗', '莫力达瓦达斡尔族自治旗', '鄂伦春自治旗', '鄂温克族自治旗', '陈巴尔虎旗', '新巴尔虎左旗', '新巴尔虎右旗'] },
+ { name: '巴彦淖尔市', districts: ['临河区', '五原县', '磴口县', '乌拉特前旗', '乌拉特中旗', '乌拉特后旗', '杭锦后旗'] },
+ { name: '乌兰察布市', districts: ['集宁区', '丰镇市', '卓资县', '化德县', '商都县', '兴和县', '凉城县', '察哈尔右翼前旗', '察哈尔右翼中旗', '察哈尔右翼后旗', '四子王旗'] },
+ { name: '兴安盟', districts: ['乌兰浩特市', '阿尔山市', '科尔沁右翼前旗', '科尔沁右翼中旗', '扎赉特旗', '突泉县'] },
+ { name: '锡林郭勒盟', districts: ['锡林浩特市', '二连浩特市', '阿巴嘎旗', '苏尼特左旗', '苏尼特右旗', '东乌珠穆沁旗', '西乌珠穆沁旗', '太仆寺旗', '镶黄旗', '正镶白旗', '正蓝旗', '多伦县'] },
+ { name: '阿拉善盟', districts: ['阿拉善左旗', '阿拉善右旗', '额济纳旗'] }
+ ]
+ },
+ {
+ name: '广西壮族自治区',
+ cities: [
+ { name: '南宁市', districts: ['兴宁区', '青秀区', '江南区', '西乡塘区', '良庆区', '邕宁区', '武鸣区', '隆安县', '马山县', '上林县', '宾阳县', '横州市'] },
+ { name: '柳州市', districts: ['城中区', '鱼峰区', '柳南区', '柳北区', '柳江区', '柳城县', '鹿寨县', '融安县', '融水苗族自治县', '三江侗族自治县'] },
+ { name: '桂林市', districts: ['秀峰区', '叠彩区', '象山区', '七星区', '雁山区', '临桂区', '阳朔县', '灵川县', '全州县', '兴安县', '永福县', '灌阳县', '龙胜各族自治县', '资源县', '平乐县', '荔浦市', '恭城瑶族自治县'] },
+ { name: '梧州市', districts: ['万秀区', '长洲区', '龙圩区', '苍梧县', '藤县', '蒙山县', '岑溪市'] },
+ { name: '北海市', districts: ['海城区', '银海区', '铁山港区', '合浦县'] },
+ { name: '防城港市', districts: ['港口区', '防城区', '上思县', '东兴市'] },
+ { name: '钦州市', districts: ['钦南区', '钦北区', '灵山县', '浦北县'] },
+ { name: '贵港市', districts: ['港北区', '港南区', '覃塘区', '平南县', '桂平市'] },
+ { name: '玉林市', districts: ['玉州区', '福绵区', '容县', '陆川县', '博白县', '兴业县', '北流市'] },
+ { name: '百色市', districts: ['右江区', '田阳区', '田东县', '德保县', '那坡县', '凌云县', '乐业县', '田林县', '西林县', '隆林各族自治县', '靖西市', '平果市'] },
+ { name: '贺州市', districts: ['八步区', '平桂区', '昭平县', '钟山县', '富川瑶族自治县'] },
+ { name: '河池市', districts: ['金城江区', '宜州区', '南丹县', '天峨县', '凤山县', '东兰县', '罗城仫佬族自治县', '环江毛南族自治县', '巴马瑶族自治县', '都安瑶族自治县', '大化瑶族自治县'] },
+ { name: '来宾市', districts: ['兴宾区', '忻城县', '象州县', '武宣县', '金秀瑶族自治县', '合山市'] },
+ { name: '崇左市', districts: ['江州区', '扶绥县', '宁明县', '龙州县', '大新县', '天等县', '凭祥市'] }
+ ]
+ },
+ {
+ name: '西藏自治区',
+ cities: [
+ { name: '拉萨市', districts: ['城关区', '堆龙德庆区', '达孜区', '林周县', '当雄县', '尼木县', '曲水县', '墨竹工卡县'] },
+ { name: '日喀则市', districts: ['桑珠孜区', '南木林县', '江孜县', '定日县', '萨迦县', '拉孜县', '昂仁县', '谢通门县', '白朗县', '仁布县', '康马县', '定结县', '仲巴县', '亚东县', '吉隆县', '聂拉木县', '萨嘎县', '岗巴县'] },
+ { name: '昌都市', districts: ['卡若区', '江达县', '贡觉县', '类乌齐县', '丁青县', '察雅县', '八宿县', '左贡县', '芒康县', '洛隆县', '边坝县'] },
+ { name: '林芝市', districts: ['巴宜区', '工布江达县', '米林县', '墨脱县', '波密县', '察隅县', '朗县'] },
+ { name: '山南市', districts: ['乃东区', '扎囊县', '贡嘎县', '桑日县', '琼结县', '曲松县', '措美县', '洛扎县', '加查县', '隆子县', '错那市', '浪卡子县'] },
+ { name: '那曲市', districts: ['色尼区', '嘉黎县', '比如县', '聂荣县', '安多县', '申扎县', '索县', '班戈县', '巴青县', '尼玛县', '双湖县'] },
+ { name: '阿里地区', districts: ['噶尔县', '普兰县', '札达县', '日土县', '革吉县', '改则县', '措勤县'] }
+ ]
+ },
+ {
+ name: '宁夏回族自治区',
+ cities: [
+ { name: '银川市', districts: ['兴庆区', '西夏区', '金凤区', '永宁县', '贺兰县', '灵武市'] },
+ { name: '石嘴山市', districts: ['大武口区', '惠农区', '平罗县'] },
+ { name: '吴忠市', districts: ['利通区', '红寺堡区', '盐池县', '同心县', '青铜峡市'] },
+ { name: '固原市', districts: ['原州区', '西吉县', '隆德县', '泾源县', '彭阳县'] },
+ { name: '中卫市', districts: ['沙坡头区', '中宁县', '海原县'] }
+ ]
+ },
+ {
+ name: '新疆维吾尔自治区',
+ cities: [
+ { name: '乌鲁木齐市', districts: ['天山区', '沙依巴克区', '新市区', '水磨沟区', '头屯河区', '达坂城区', '米东区', '乌鲁木齐县'] },
+ { name: '克拉玛依市', districts: ['克拉玛依区', '独山子区', '白碱滩区', '乌尔禾区'] },
+ { name: '吐鲁番市', districts: ['高昌区', '鄯善县', '托克逊县'] },
+ { name: '哈密市', districts: ['伊州区', '巴里坤哈萨克自治县', '伊吾县'] },
+ { name: '昌吉回族自治州', districts: ['昌吉市', '阜康市', '呼图壁县', '玛纳斯县', '奇台县', '吉木萨尔县', '木垒哈萨克自治县'] },
+ { name: '博尔塔拉蒙古自治州', districts: ['博乐市', '阿拉山口市', '精河县', '温泉县'] },
+ { name: '巴音郭楞蒙古自治州', districts: ['库尔勒市', '轮台县', '尉犁县', '若羌县', '且末县', '焉耆回族自治县', '和静县', '和硕县', '博湖县'] },
+ { name: '阿克苏地区', districts: ['阿克苏市', '温宿县', '库车市', '沙雅县', '新和县', '拜城县', '乌什县', '阿瓦提县', '柯坪县'] },
+ { name: '克孜勒苏柯尔克孜自治州', districts: ['阿图什市', '阿克陶县', '阿合奇县', '乌恰县'] },
+ { name: '喀什地区', districts: ['喀什市', '疏附县', '疏勒县', '英吉沙县', '泽普县', '莎车县', '叶城县', '麦盖提县', '岳普湖县', '伽师县', '巴楚县', '塔什库尔干塔吉克自治县'] },
+ { name: '和田地区', districts: ['和田市', '和田县', '墨玉县', '皮山县', '洛浦县', '策勒县', '于田县', '民丰县'] },
+ { name: '伊犁哈萨克自治州', districts: ['伊宁市', '奎屯市', '霍尔果斯市', '伊宁县', '察布查尔锡伯自治县', '霍城县', '巩留县', '新源县', '昭苏县', '特克斯县', '尼勒克县'] },
+ { name: '塔城地区', districts: ['塔城市', '乌苏市', '额敏县', '沙湾市', '托里县', '裕民县', '和布克赛尔蒙古自治县'] },
+ { name: '阿勒泰地区', districts: ['阿勒泰市', '布尔津县', '富蕴县', '福海县', '哈巴河县', '青河县', '吉木乃县'] },
+ { name: '石河子市', districts: ['新城街道', '向阳街道', '红山街道', '老街街道', '东城街道', '北泉镇', '石河子总场'] },
+ { name: '阿拉尔市', districts: ['幸福路街道', '金银川路街道', '青松路街道', '南口街道', '托喀依乡'] },
+ { name: '图木舒克市', districts: ['齐干却勒街道', '前海街道', '永安坝街道', '草湖镇'] },
+ { name: '五家渠市', districts: ['军垦路街道', '青湖路街道', '人民路街道', '梧桐镇', '蔡家湖镇'] },
+ { name: '铁门关市', districts: ['迎宾街道', '二十九团', '三十团'] },
+ { name: '双河市', districts: ['红星路街道', '八十一团', '八十四团'] },
+ { name: '可克达拉市', districts: ['幸福路街道', '六十六团', '六十七团'] },
+ { name: '昆玉市', districts: ['昆泉镇', '二二四团', '四十七团'] },
+ { name: '胡杨河市', districts: ['金山路街道', '一二九团', '一三三团'] },
+ { name: '新星市', districts: ['中心团场'] }
+ ]
+ },
+ {
+ name: '上海市',
+ cities: [
+ {
+ name: '上海市',
+ districts: ['黄浦区', '徐汇区', '长宁区', '静安区', '普陀区', '虹口区', '杨浦区', '闵行区', '宝山区', '嘉定区', '浦东新区', '金山区', '松江区', '青浦区', '奉贤区', '崇明区']
+ }
+ ]
+ },
+ {
+ name: '天津市',
+ cities: [
+ {
+ name: '天津市',
+ districts: ['和平区', '河东区', '河西区', '南开区', '河北区', '红桥区', '东丽区', '西青区', '津南区', '北辰区', '武清区', '宝坻区', '滨海新区', '宁河区', '静海区', '蓟州区']
+ }
+ ]
+ },
+ {
+ name: '重庆市',
+ cities: [
+ {
+ name: '重庆市',
+ districts: ['渝中区', '大渡口区', '江北区', '沙坪坝区', '九龙坡区', '南岸区', '北碚区', '渝北区', '巴南区', '万州区', '涪陵区', '黔江区', '长寿区', '江津区', '合川区', '永川区', '南川区', '綦江区', '大足区', '璧山区', '铜梁区', '潼南区', '荣昌区', '开州区', '梁平区', '武隆区', '城口县', '丰都县', '垫江县', '忠县', '云阳县', '奉节县', '巫山县', '巫溪县', '石柱土家族自治县', '秀山土家族苗族自治县', '酉阳土家族苗族自治县', '彭水苗族土家族自治县']
+ }
+ ]
+ },
+ // 河北省
+ {
+ name: '河北省',
+ cities: [
+ {
+ name: '石家庄市',
+ districts: ['长安区', '桥西区', '新华区', '井陉矿区', '裕华区', '藁城区', '鹿泉区', '栾城区', '井陉县', '正定县', '行唐县', '灵寿县', '高邑县', '深泽县', '赞皇县', '无极县', '平山县', '元氏县', '赵县', '辛集市', '晋州市', '新乐市']
+ },
+ {
+ name: '唐山市',
+ districts: ['路南区', '路北区', '古冶区', '开平区', '丰南区', '丰润区', '曹妃甸区', '滦南县', '乐亭县', '迁西县', '玉田县', '遵化市', '迁安市', '滦州市']
+ },
+ {
+ name: '秦皇岛市',
+ districts: ['海港区', '山海关区', '北戴河区', '抚宁区', '青龙满族自治县', '昌黎县', '卢龙县']
+ },
+ {
+ name: '邯郸市',
+ districts: ['邯山区', '丛台区', '复兴区', '峰峰矿区', '肥乡区', '永年区', '临漳县', '成安县', '大名县', '涉县', '磁县', '邱县', '鸡泽县', '广平县', '馆陶县', '曲周县', '武安市', '魏县']
+ },
+ {
+ name: '邢台市',
+ districts: ['桥东区', '桥西区', '邢台县', '临城县', '内丘县', '柏乡县', '隆尧县', '任县', '南和县', '宁晋县', '巨鹿县', '新河县', '广宗县', '平乡县', '威县', '清河县', '临西县', '南宫市', '沙河市']
+ },
+ {
+ name: '保定市',
+ districts: ['竞秀区', '莲池区', '满城区', '清苑区', '徐水区', '涞水县', '阜平县', '定兴县', '唐县', '高阳县', '容城县', '涞源县', '望都县', '安新县', '易县', '曲阳县', '蠡县', '顺平县', '博野县', '雄县', '涿州市', '定州市', '安国市', '高碑店市']
+ },
+ {
+ name: '张家口市',
+ districts: ['桥东区', '桥西区', '宣化区', '下花园区', '万全区', '崇礼区', '张北县', '康保县', '沽源县', '尚义县', '蔚县', '阳原县', '怀安县', '怀来县', '涿鹿县', '赤城县']
+ },
+ {
+ name: '承德市',
+ districts: ['双桥区', '双滦区', '鹰手营子矿区', '承德县', '兴隆县', '平泉市', '滦平县', '隆化县', '丰宁满族自治县', '宽城满族自治县', '围场满族蒙古族自治县']
+ },
+ {
+ name: '沧州市',
+ districts: ['新华区', '运河区', '沧县', '青县', '东光县', '海兴县', '盐山县', '肃宁县', '南皮县', '吴桥县', '献县', '孟村回族自治县', '泊头市', '任丘市', '黄骅市', '河间市']
+ },
+ {
+ name: '廊坊市',
+ districts: ['安次区', '广阳区', '固安县', '永清县', '香河县', '大城县', '文安县', '大厂回族自治县', '霸州市', '三河市']
+ },
+ {
+ name: '衡水市',
+ districts: ['桃城区', '冀州区', '枣强县', '武邑县', '武强县', '饶阳县', '安平县', '故城县', '景县', '阜城县', '深州市']
+ }
+ ]
+ },
+ // 山西省
+ {
+ name: '山西省',
+ cities: [
+ {
+ name: '太原市',
+ districts: ['小店区', '迎泽区', '杏花岭区', '尖草坪区', '万柏林区', '晋源区', '清徐县', '阳曲县', '娄烦县', '古交市']
+ },
+ {
+ name: '大同市',
+ districts: ['新荣区', '平城区', '云冈区', '云州区', '阳高县', '天镇县', '广灵县', '灵丘县', '浑源县', '左云县']
+ },
+ {
+ name: '阳泉市',
+ districts: ['城区', '矿区', '郊区', '平定县', '盂县']
+ },
+ {
+ name: '长治市',
+ districts: ['潞州区', '上党区', '屯留区', '潞城区', '襄垣县', '平顺县', '黎城县', '壶关县', '长子县', '武乡县', '沁县', '沁源县']
+ },
+ {
+ name: '晋城市',
+ districts: ['城区', '沁水县', '阳城县', '陵川县', '泽州县', '高平市']
+ },
+ {
+ name: '朔州市',
+ districts: ['朔城区', '平鲁区', '山阴县', '应县', '右玉县', '怀仁市']
+ },
+ {
+ name: '晋中市',
+ districts: ['榆次区', '太谷区', '榆社县', '左权县', '和顺县', '昔阳县', '寿阳县', '祁县', '平遥县', '灵石县', '介休市']
+ },
+ {
+ name: '运城市',
+ districts: ['盐湖区', '临猗县', '万荣县', '闻喜县', '稷山县', '新绛县', '绛县', '垣曲县', '夏县', '平陆县', '芮城县', '永济市', '河津市']
+ },
+ {
+ name: '忻州市',
+ districts: ['忻府区', '定襄县', '五台县', '代县', '繁峙县', '宁武县', '静乐县', '神池县', '五寨县', '岢岚县', '河曲县', '保德县', '偏关县', '原平市']
+ },
+ {
+ name: '临汾市',
+ districts: ['尧都区', '曲沃县', '翼城县', '襄汾县', '洪洞县', '古县', '安泽县', '浮山县', '吉县', '乡宁县', '大宁县', '隰县', '永和县', '蒲县', '汾西县', '侯马市', '霍州市']
+ },
+ {
+ name: '吕梁市',
+ districts: ['离石区', '文水县', '交城县', '兴县', '临县', '柳林县', '石楼县', '岚县', '方山县', '中阳县', '交口县', '孝义市', '汾阳市']
+ }
+ ]
+ },
+ // 辽宁省
+ {
+ name: '辽宁省',
+ cities: [
+ {
+ name: '沈阳市',
+ districts: ['和平区', '沈河区', '大东区', '皇姑区', '铁西区', '苏家屯区', '浑南区', '沈北新区', '于洪区', '辽中区', '康平县', '法库县', '新民市']
+ },
+ {
+ name: '大连市',
+ districts: ['中山区', '西岗区', '沙河口区', '甘井子区', '旅顺口区', '金州区', '普兰店区', '长海县', '瓦房店市', '庄河市']
+ },
+ {
+ name: '鞍山市',
+ districts: ['铁东区', '铁西区', '立山区', '千山区', '台安县', '岫岩满族自治县', '海城市']
+ },
+ {
+ name: '抚顺市',
+ districts: ['新抚区', '东洲区', '望花区', '顺城区', '抚顺县', '新宾满族自治县', '清原满族自治县']
+ },
+ {
+ name: '本溪市',
+ districts: ['平山区', '溪湖区', '明山区', '南芬区', '本溪满族自治县', '桓仁满族自治县']
+ },
+ {
+ name: '丹东市',
+ districts: ['元宝区', '振兴区', '振安区', '宽甸满族自治县', '东港市', '凤城市']
+ },
+ {
+ name: '锦州市',
+ districts: ['古塔区', '凌河区', '太和区', '黑山县', '义县', '凌海市', '北镇市']
+ },
+ {
+ name: '营口市',
+ districts: ['站前区', '西市区', '鲅鱼圈区', '老边区', '盖州市', '大石桥市']
+ },
+ {
+ name: '阜新市',
+ districts: ['海州区', '新邱区', '太平区', '清河门区', '细河区', '阜新蒙古族自治县', '彰武县']
+ },
+ {
+ name: '辽阳市',
+ districts: ['白塔区', '文圣区', '宏伟区', '弓长岭区', '太子河区', '辽阳县', '灯塔市']
+ },
+ {
+ name: '盘锦市',
+ districts: ['双台子区', '兴隆台区', '大洼区', '盘山县']
+ },
+ {
+ name: '铁岭市',
+ districts: ['银州区', '清河区', '铁岭县', '西丰县', '昌图县', '调兵山市', '开原市']
+ },
+ {
+ name: '朝阳市',
+ districts: ['双塔区', '龙城区', '朝阳县', '建平县', '喀喇沁左翼蒙古族自治县', '北票市', '凌源市']
+ },
+ {
+ name: '葫芦岛市',
+ districts: ['连山区', '龙港区', '南票区', '绥中县', '建昌县', '兴城市']
+ }
+ ]
+ },
+ // 吉林省
+ {
+ name: '吉林省',
+ cities: [
+ {
+ name: '长春市',
+ districts: ['南关区', '宽城区', '朝阳区', '二道区', '绿园区', '双阳区', '九台区', '农安县', '榆树市', '德惠市', '公主岭市']
+ },
+ {
+ name: '吉林市',
+ districts: ['昌邑区', '龙潭区', '船营区', '丰满区', '永吉县', '蛟河市', '桦甸市', '舒兰市', '磐石市']
+ },
+ {
+ name: '四平市',
+ districts: ['铁西区', '铁东区', '梨树县', '伊通满族自治县', '双辽市']
+ },
+ {
+ name: '辽源市',
+ districts: ['龙山区', '西安区', '东丰县', '东辽县']
+ },
+ {
+ name: '通化市',
+ districts: ['东昌区', '二道江区', '通化县', '辉南县', '柳河县', '梅河口市', '集安市']
+ },
+ {
+ name: '白山市',
+ districts: ['浑江区', '江源区', '抚松县', '靖宇县', '长白朝鲜族自治县', '临江市']
+ },
+ {
+ name: '松原市',
+ districts: ['宁江区', '前郭尔罗斯蒙古族自治县', '长岭县', '乾安县', '扶余市']
+ },
+ {
+ name: '白城市',
+ districts: ['洮北区', '镇赉县', '通榆县', '洮南市', '大安市']
+ },
+ {
+ name: '延边朝鲜族自治州',
+ districts: ['延吉市', '图们市', '敦化市', '珲春市', '龙井市', '和龙市', '汪清县', '安图县']
+ }
+ ]
+ },
+ // 黑龙江省
+ {
+ name: '黑龙江省',
+ cities: [
+ {
+ name: '哈尔滨市',
+ districts: ['道里区', '南岗区', '道外区', '平房区', '松北区', '香坊区', '呼兰区', '阿城区', '双城区', '依兰县', '方正县', '宾县', '巴彦县', '木兰县', '通河县', '延寿县', '尚志市', '五常市']
+ },
+ {
+ name: '齐齐哈尔市',
+ districts: ['龙沙区', '建华区', '铁锋区', '昂昂溪区', '富拉尔基区', '碾子山区', '梅里斯达斡尔族区', '龙江县', '依安县', '泰来县', '甘南县', '富裕县', '克山县', '克东县', '拜泉县', '讷河市']
+ },
+ {
+ name: '鸡西市',
+ districts: ['鸡冠区', '恒山区', '滴道区', '梨树区', '城子河区', '麻山区', '鸡东县', '虎林市', '密山市']
+ },
+ {
+ name: '鹤岗市',
+ districts: ['向阳区', '工农区', '南山区', '兴安区', '东山区', '兴山区', '萝北县', '绥滨县']
+ },
+ {
+ name: '双鸭山市',
+ districts: ['尖山区', '岭东区', '四方台区', '宝山区', '集贤县', '友谊县', '宝清县', '饶河县']
+ },
+ {
+ name: '大庆市',
+ districts: ['萨尔图区', '龙凤区', '让胡路区', '红岗区', '大同区', '肇州县', '肇源县', '林甸县', '杜尔伯特蒙古族自治县']
+ },
+ {
+ name: '伊春市',
+ districts: ['伊美区', '乌翠区', '友好区', '金林区', '汤旺县', '丰林县', '大箐山县', '南岔县', '嘉荫县', '铁力市']
+ },
+ {
+ name: '佳木斯市',
+ districts: ['向阳区', '前进区', '东风区', '郊区', '桦南县', '桦川县', '汤原县', '抚远市', '同江市', '富锦市']
+ },
+ {
+ name: '七台河市',
+ districts: ['新兴区', '桃山区', '茄子河区', '勃利县']
+ },
+ {
+ name: '牡丹江市',
+ districts: ['东安区', '阳明区', '爱民区', '西安区', '东宁市', '绥芬河市', '海林市', '宁安市', '穆棱市', '林口县']
+ },
+ {
+ name: '黑河市',
+ districts: ['爱辉区', '嫩江市', '北安市', '五大连池市', '逊克县', '孙吴县']
+ },
+ {
+ name: '绥化市',
+ districts: ['北林区', '望奎县', '兰西县', '青冈县', '庆安县', '明水县', '绥棱县', '安达市', '肇东市', '海伦市']
+ },
+ {
+ name: '大兴安岭地区',
+ districts: ['加格达奇区', '松岭区', '新林区', '呼中区', '呼玛县', '塔河县', '漠河市']
+ }
+ ]
+ },
+ // 江苏省
+ {
+ name: '江苏省',
+ cities: [
+ {
+ name: '南京市',
+ districts: ['玄武区', '秦淮区', '建邺区', '鼓楼区', '浦口区', '栖霞区', '雨花台区', '江宁区', '六合区', '溧水区', '高淳区']
+ },
+ {
+ name: '无锡市',
+ districts: ['锡山区', '惠山区', '滨湖区', '梁溪区', '新吴区', '江阴市', '宜兴市']
+ },
+ {
+ name: '徐州市',
+ districts: ['鼓楼区', '云龙区', '贾汪区', '泉山区', '铜山区', '丰县', '沛县', '睢宁县', '新沂市', '邳州市']
+ },
+ {
+ name: '常州市',
+ districts: ['天宁区', '钟楼区', '新北区', '武进区', '金坛区', '溧阳市']
+ },
+ {
+ name: '苏州市',
+ districts: ['姑苏区', '虎丘区', '吴中区', '相城区', '吴江区', '苏州工业园区', '昆山市', '常熟市', '张家港市', '太仓市']
+ },
+ {
+ name: '南通市',
+ districts: ['崇川区', '港闸区', '通州区', '如东县', '启东市', '如皋市', '海门市', '海安市']
+ },
+ {
+ name: '连云港市',
+ districts: ['连云区', '海州区', '赣榆区', '东海县', '灌云县', '灌南县']
+ },
+ {
+ name: '淮安市',
+ districts: ['淮安区', '淮阴区', '清江浦区', '洪泽区', '涟水县', '盱眙县', '金湖县']
+ },
+ {
+ name: '盐城市',
+ districts: ['亭湖区', '盐都区', '大丰区', '响水县', '滨海县', '阜宁县', '射阳县', '建湖县', '东台市']
+ },
+ {
+ name: '扬州市',
+ districts: ['广陵区', '邗江区', '江都区', '宝应县', '仪征市', '高邮市']
+ },
+ {
+ name: '镇江市',
+ districts: ['京口区', '润州区', '丹徒区', '丹阳市', '扬中市', '句容市']
+ },
+ {
+ name: '泰州市',
+ districts: ['海陵区', '高港区', '姜堰区', '兴化市', '靖江市', '泰兴市']
+ },
+ {
+ name: '宿迁市',
+ districts: ['宿城区', '宿豫区', '沭阳县', '泗阳县', '泗洪县']
+ }
+ ]
+ },
+ // 浙江省
+ {
+ name: '浙江省',
+ cities: [
+ {
+ name: '杭州市',
+ districts: ['上城区', '下城区', '江干区', '拱墅区', '西湖区', '滨江区', '萧山区', '余杭区', '富阳区', '临安区', '桐庐县', '淳安县', '建德市']
+ },
+ {
+ name: '宁波市',
+ districts: ['海曙区', '江北区', '北仑区', '镇海区', '鄞州区', '奉化区', '象山县', '宁海县', '余姚市', '慈溪市']
+ },
+ {
+ name: '温州市',
+ districts: ['鹿城区', '龙湾区', '瓯海区', '洞头区', '永嘉县', '平阳县', '苍南县', '文成县', '泰顺县', '瑞安市', '乐清市']
+ },
+ {
+ name: '嘉兴市',
+ districts: ['南湖区', '秀洲区', '嘉善县', '海盐县', '海宁市', '平湖市', '桐乡市']
+ },
+ {
+ name: '湖州市',
+ districts: ['吴兴区', '南浔区', '德清县', '长兴县', '安吉县']
+ },
+ {
+ name: '绍兴市',
+ districts: ['越城区', '柯桥区', '上虞区', '新昌县', '诸暨市', '嵊州市']
+ },
+ {
+ name: '金华市',
+ districts: ['婺城区', '金东区', '武义县', '浦江县', '磐安县', '兰溪市', '义乌市', '东阳市', '永康市']
+ },
+ {
+ name: '衢州市',
+ districts: ['柯城区', '衢江区', '常山县', '开化县', '龙游县', '江山市']
+ },
+ {
+ name: '舟山市',
+ districts: ['定海区', '普陀区', '岱山县', '嵊泗县']
+ },
+ {
+ name: '台州市',
+ districts: ['椒江区', '黄岩区', '路桥区', '玉环市', '三门县', '天台县', '仙居县', '温岭市', '临海市']
+ },
+ {
+ name: '丽水市',
+ districts: ['莲都区', '青田县', '缙云县', '遂昌县', '松阳县', '云和县', '庆元县', '景宁畲族自治县', '龙泉市']
+ }
+ ]
+ },
+ // 安徽省
+ {
+ name: '安徽省',
+ cities: [
+ {
+ name: '合肥市',
+ districts: ['瑶海区', '庐阳区', '蜀山区', '包河区', '长丰县', '肥东县', '肥西县', '庐江县', '巢湖市']
+ },
+ {
+ name: '芜湖市',
+ districts: ['镜湖区', '弋江区', '鸠江区', '三山区', '芜湖县', '繁昌县', '南陵县', '无为县']
+ },
+ {
+ name: '蚌埠市',
+ districts: ['龙子湖区', '蚌山区', '禹会区', '淮上区', '怀远县', '五河县', '固镇县']
+ },
+ {
+ name: '淮南市',
+ districts: ['大通区', '田家庵区', '谢家集区', '八公山区', '潘集区', '凤台县', '寿县']
+ },
+ {
+ name: '马鞍山市',
+ districts: ['花山区', '雨山区', '博望区', '当涂县', '含山县', '和县']
+ },
+ {
+ name: '淮北市',
+ districts: ['杜集区', '相山区', '烈山区', '濉溪县']
+ },
+ {
+ name: '铜陵市',
+ districts: ['铜官区', '义安区', '郊区', '枞阳县']
+ },
+ {
+ name: '安庆市',
+ districts: ['迎江区', '大观区', '宜秀区', '怀宁县', '枞阳县', '潜山县', '太湖县', '宿松县', '望江县', '岳西县', '桐城市']
+ },
+ {
+ name: '黄山市',
+ districts: ['屯溪区', '黄山区', '徽州区', '歙县', '休宁县', '黟县', '祁门县']
+ },
+ {
+ name: '滁州市',
+ districts: ['琅琊区', '南谯区', '来安县', '全椒县', '定远县', '凤阳县', '天长市', '明光市']
+ },
+ {
+ name: '阜阳市',
+ districts: ['颍州区', '颍东区', '颍泉区', '临泉县', '太和县', '阜南县', '颍上县', '界首市']
+ },
+ {
+ name: '宿州市',
+ districts: ['埇桥区', '砀山县', '萧县', '灵璧县', '泗县']
+ },
+ {
+ name: '六安市',
+ districts: ['金安区', '裕安区', '叶集区', '霍邱县', '舒城县', '金寨县', '霍山县']
+ },
+ {
+ name: '亳州市',
+ districts: ['谯城区', '涡阳县', '蒙城县', '利辛县']
+ },
+ {
+ name: '池州市',
+ districts: ['贵池区', '东至县', '石台县', '青阳县']
+ },
+ {
+ name: '宣城市',
+ districts: ['宣州区', '郎溪县', '广德县', '泾县', '绩溪县', '旌德县', '宁国市']
+ }
+ ]
+ },
+ // 福建省
+ {
+ name: '福建省',
+ cities: [
+ {
+ name: '福州市',
+ districts: ['鼓楼区', '台江区', '仓山区', '马尾区', '晋安区', '长乐区', '闽侯县', '连江县', '罗源县', '闽清县', '永泰县', '平潭县']
+ },
+ {
+ name: '厦门市',
+ districts: ['思明区', '海沧区', '湖里区', '集美区', '同安区', '翔安区']
+ },
+ {
+ name: '莆田市',
+ districts: ['城厢区', '涵江区', '荔城区', '秀屿区', '仙游县']
+ },
+ {
+ name: '三明市',
+ districts: ['梅列区', '三元区', '明溪县', '清流县', '宁化县', '大田县', '尤溪县', '沙县', '将乐县', '泰宁县', '建宁县', '永安市']
+ },
+ {
+ name: '泉州市',
+ districts: ['鲤城区', '丰泽区', '洛江区', '泉港区', '惠安县', '安溪县', '永春县', '德化县', '金门县', '石狮市', '晋江市', '南安市']
+ },
+ {
+ name: '漳州市',
+ districts: ['芗城区', '龙文区', '云霄县', '漳浦县', '诏安县', '长泰县', '东山县', '南靖县', '平和县', '华安县', '龙海市']
+ },
+ {
+ name: '南平市',
+ districts: ['延平区', '建阳区', '顺昌县', '浦城县', '光泽县', '松溪县', '政和县', '邵武市', '武夷山市', '建瓯市']
+ },
+ {
+ name: '龙岩市',
+ districts: ['新罗区', '永定区', '长汀县', '上杭县', '武平县', '连城县', '漳平市']
+ },
+ {
+ name: '宁德市',
+ districts: ['蕉城区', '霞浦县', '古田县', '屏南县', '寿宁县', '周宁县', '柘荣县', '福安市', '福鼎市']
+ }
+ ]
+ },
+ // 江西省
+ {
+ name: '江西省',
+ cities: [
+ {
+ name: '南昌市',
+ districts: ['东湖区', '西湖区', '青云谱区', '湾里区', '青山湖区', '新建区', '南昌县', '安义县', '进贤县']
+ },
+ {
+ name: '景德镇市',
+ districts: ['昌江区', '珠山区', '浮梁县', '乐平市']
+ },
+ {
+ name: '萍乡市',
+ districts: ['安源区', '湘东区', '莲花县', '上栗县', '芦溪县']
+ },
+ {
+ name: '九江市',
+ districts: ['濂溪区', '浔阳区', '柴桑区', '武宁县', '修水县', '永修县', '德安县', '都昌县', '湖口县', '彭泽县', '瑞昌市', '共青城市', '庐山市']
+ },
+ {
+ name: '新余市',
+ districts: ['渝水区', '分宜县']
+ },
+ {
+ name: '鹰潭市',
+ districts: ['月湖区', '余江区', '贵溪市']
+ },
+ {
+ name: '赣州市',
+ districts: ['章贡区', '南康区', '赣县区', '信丰县', '大余县', '上犹县', '崇义县', '安远县', '龙南县', '定南县', '全南县', '宁都县', '于都县', '兴国县', '会昌县', '寻乌县', '石城县', '瑞金市', '龙南市']
+ },
+ {
+ name: '吉安市',
+ districts: ['吉州区', '青原区', '吉安县', '吉水县', '峡江县', '新干县', '永丰县', '泰和县', '遂川县', '万安县', '安福县', '永新县', '井冈山市']
+ },
+ {
+ name: '宜春市',
+ districts: ['袁州区', '奉新县', '万载县', '上高县', '宜丰县', '靖安县', '铜鼓县', '丰城市', '樟树市', '高安市']
+ },
+ {
+ name: '抚州市',
+ districts: ['临川区', '东乡区', '南城县', '黎川县', '南丰县', '崇仁县', '乐安县', '宜黄县', '金溪县', '资溪县', '广昌县']
+ },
+ {
+ name: '上饶市',
+ districts: ['信州区', '广丰区', '广信区', '玉山县', '铅山县', '横峰县', '弋阳县', '余干县', '鄱阳县', '万年县', '婺源县', '德兴市']
+ }
+ ]
+ },
+ // 山东省
+ {
+ name: '山东省',
+ cities: [
+ {
+ name: '济南市',
+ districts: ['历下区', '市中区', '槐荫区', '天桥区', '历城区', '长清区', '章丘区', '济阳区', '莱芜区', '钢城区', '平阴县', '商河县']
+ },
+ {
+ name: '青岛市',
+ districts: ['市南区', '市北区', '黄岛区', '崂山区', '李沧区', '城阳区', '即墨区', '胶州市', '平度市', '莱西市']
+ },
+ {
+ name: '淄博市',
+ districts: ['淄川区', '张店区', '博山区', '临淄区', '周村区', '桓台县', '高青县', '沂源县']
+ },
+ {
+ name: '枣庄市',
+ districts: ['市中区', '薛城区', '峄城区', '台儿庄区', '山亭区', '滕州市']
+ },
+ {
+ name: '东营市',
+ districts: ['东营区', '河口区', '垦利区', '利津县', '广饶县']
+ },
+ {
+ name: '烟台市',
+ districts: ['芝罘区', '福山区', '牟平区', '莱山区', '蓬莱区', '长岛县', '龙口市', '莱阳市', '莱州市', '蓬莱市', '招远市', '栖霞市', '海阳市']
+ },
+ {
+ name: '潍坊市',
+ districts: ['潍城区', '寒亭区', '坊子区', '奎文区', '临朐县', '昌乐县', '青州市', '诸城市', '寿光市', '安丘市', '高密市', '昌邑市']
+ },
+ {
+ name: '济宁市',
+ districts: ['任城区', '兖州区', '微山县', '鱼台县', '金乡县', '嘉祥县', '汶上县', '泗水县', '梁山县', '曲阜市', '邹城市']
+ },
+ {
+ name: '泰安市',
+ districts: ['泰山区', '岱岳区', '宁阳县', '东平县', '新泰市', '肥城市']
+ },
+ {
+ name: '威海市',
+ districts: ['环翠区', '文登区', '荣成市', '乳山市']
+ },
+ {
+ name: '日照市',
+ districts: ['东港区', '岚山区', '五莲县', '莒县']
+ },
+ {
+ name: '临沂市',
+ districts: ['兰山区', '罗庄区', '河东区', '沂南县', '郯城县', '沂水县', '兰陵县', '费县', '平邑县', '莒南县', '蒙阴县', '临沭县']
+ },
+ {
+ name: '德州市',
+ districts: ['德城区', '陵城区', '宁津县', '庆云县', '临邑县', '齐河县', '平原县', '夏津县', '武城县', '乐陵市', '禹城市']
+ },
+ {
+ name: '聊城市',
+ districts: ['东昌府区', '茌平区', '阳谷县', '莘县', '东阿县', '冠县', '高唐县', '临清市']
+ },
+ {
+ name: '滨州市',
+ districts: ['滨城区', '沾化区', '惠民县', '阳信县', '无棣县', '博兴县', '邹平市']
+ },
+ {
+ name: '菏泽市',
+ districts: ['牡丹区', '定陶区', '曹县', '单县', '成武县', '巨野县', '郓城县', '鄄城县', '东明县']
+ }
+ ]
+ },
+ // 河南省
+ {
+ name: '河南省',
+ cities: [
+ {
+ name: '郑州市',
+ districts: ['中原区', '二七区', '管城回族区', '金水区', '上街区', '惠济区', '中牟县', '巩义市', '荥阳市', '新密市', '新郑市', '登封市']
+ },
+ {
+ name: '开封市',
+ districts: ['龙亭区', '顺河回族区', '鼓楼区', '禹王台区', '祥符区', '杞县', '通许县', '尉氏县', '兰考县']
+ },
+ {
+ name: '洛阳市',
+ districts: ['老城区', '西工区', '瀍河回族区', '涧西区', '吉利区', '洛龙区', '孟津县', '新安县', '栾川县', '嵩县', '汝阳县', '宜阳县', '洛宁县', '伊川县', '偃师市']
+ },
+ {
+ name: '平顶山市',
+ districts: ['新华区', '卫东区', '石龙区', '湛河区', '宝丰县', '叶县', '鲁山县', '郏县', '舞钢市', '汝州市']
+ },
+ {
+ name: '安阳市',
+ districts: ['文峰区', '北关区', '殷都区', '龙安区', '安阳县', '汤阴县', '滑县', '内黄县', '林州市']
+ },
+ {
+ name: '鹤壁市',
+ districts: ['鹤山区', '山城区', '淇滨区', '浚县', '淇县']
+ },
+ {
+ name: '新乡市',
+ districts: ['红旗区', '卫滨区', '凤泉区', '牧野区', '新乡县', '获嘉县', '原阳县', '延津县', '封丘县', '长垣县', '卫辉市', '辉县市']
+ },
+ {
+ name: '焦作市',
+ districts: ['解放区', '中站区', '马村区', '山阳区', '修武县', '博爱县', '武陟县', '温县', '沁阳市', '孟州市']
+ },
+ {
+ name: '濮阳市',
+ districts: ['华龙区', '清丰县', '南乐县', '范县', '台前县', '濮阳县']
+ },
+ {
+ name: '许昌市',
+ districts: ['魏都区', '建安区', '鄢陵县', '襄城县', '禹州市', '长葛市']
+ },
+ {
+ name: '漯河市',
+ districts: ['源汇区', '郾城区', '召陵区', '舞阳县', '临颍县']
+ },
+ {
+ name: '三门峡市',
+ districts: ['湖滨区', '陕州区', '渑池县', '卢氏县', '义马市', '灵宝市']
+ },
+ {
+ name: '南阳市',
+ districts: ['宛城区', '卧龙区', '南召县', '方城县', '西峡县', '镇平县', '内乡县', '淅川县', '社旗县', '唐河县', '新野县', '桐柏县', '邓州市']
+ },
+ {
+ name: '商丘市',
+ districts: ['梁园区', '睢阳区', '民权县', '睢县', '宁陵县', '柘城县', '虞城县', '夏邑县', '永城市']
+ },
+ {
+ name: '信阳市',
+ districts: ['浉河区', '平桥区', '罗山县', '光山县', '新县', '商城县', '固始县', '潢川县', '淮滨县', '息县']
+ },
+ {
+ name: '周口市',
+ districts: ['川汇区', '淮阳区', '扶沟县', '西华县', '商水县', '沈丘县', '郸城县', '太康县', '鹿邑县', '项城市']
+ },
+ {
+ name: '驻马店市',
+ districts: ['驿城区', '西平县', '上蔡县', '平舆县', '正阳县', '确山县', '泌阳县', '汝南县', '遂平县', '新蔡县']
+ },
+ {
+ name: '济源市',
+ districts: ['济源市']
+ }
+ ]
+ },
+ // 湖北省
+ {
+ name: '湖北省',
+ cities: [
+ {
+ name: '武汉市',
+ districts: ['江岸区', '江汉区', '硚口区', '汉阳区', '武昌区', '青山区', '洪山区', '东西湖区', '汉南区', '蔡甸区', '江夏区', '黄陂区', '新洲区']
+ },
+ {
+ name: '黄石市',
+ districts: ['黄石港区', '西塞山区', '下陆区', '铁山区', '阳新县', '大冶市']
+ },
+ {
+ name: '十堰市',
+ districts: ['茅箭区', '张湾区', '郧阳区', '郧西县', '竹山县', '竹溪县', '房县', '丹江口市']
+ },
+ {
+ name: '宜昌市',
+ districts: ['西陵区', '伍家岗区', '点军区', '猇亭区', '夷陵区', '远安县', '兴山县', '秭归县', '长阳土家族自治县', '五峰土家族自治县', '宜都市', '当阳市', '枝江市']
+ },
+ {
+ name: '襄阳市',
+ districts: ['襄城区', '樊城区', '襄州区', '南漳县', '谷城县', '保康县', '老河口市', '枣阳市', '宜城市']
+ },
+ {
+ name: '鄂州市',
+ districts: ['梁子湖区', '华容区', '鄂城区']
+ },
+ {
+ name: '荆门市',
+ districts: ['东宝区', '掇刀区', '京山市', '沙洋县', '钟祥市']
+ },
+ {
+ name: '孝感市',
+ districts: ['孝南区', '孝昌县', '大悟县', '云梦县', '应城市', '安陆市', '汉川市']
+ },
+ {
+ name: '荆州市',
+ districts: ['沙市区', '荆州区', '公安县', '监利县', '江陵县', '石首市', '洪湖市', '松滋市']
+ },
+ {
+ name: '黄冈市',
+ districts: ['黄州区', '团风县', '红安县', '罗田县', '英山县', '浠水县', '蕲春县', '黄梅县', '麻城市', '武穴市']
+ },
+ {
+ name: '咸宁市',
+ districts: ['咸安区', '嘉鱼县', '通城县', '崇阳县', '通山县', '赤壁市']
+ },
+ {
+ name: '随州市',
+ districts: ['曾都区', '随县', '广水市']
+ },
+ {
+ name: '恩施土家族苗族自治州',
+ districts: ['恩施市', '利川市', '建始县', '巴东县', '宣恩县', '咸丰县', '来凤县', '鹤峰县']
+ },
+ {
+ name: '仙桃市',
+ districts: ['仙桃市']
+ },
+ {
+ name: '潜江市',
+ districts: ['潜江市']
+ },
+ {
+ name: '天门市',
+ districts: ['天门市']
+ },
+ {
+ name: '神农架林区',
+ districts: ['神农架林区']
+ }
+ ]
+ },
+ // 湖南省
+ {
+ name: '湖南省',
+ cities: [
+ {
+ name: '长沙市',
+ districts: ['芙蓉区', '天心区', '岳麓区', '开福区', '雨花区', '望城区', '长沙县', '宁乡市', '浏阳市']
+ },
+ {
+ name: '株洲市',
+ districts: ['荷塘区', '芦淞区', '石峰区', '天元区', '株洲县', '攸县', '茶陵县', '炎陵县', '醴陵市']
+ },
+ {
+ name: '湘潭市',
+ districts: ['雨湖区', '岳塘区', '湘潭县', '湘乡市', '韶山市']
+ },
+ {
+ name: '衡阳市',
+ districts: ['珠晖区', '雁峰区', '石鼓区', '蒸湘区', '南岳区', '衡阳县', '衡南县', '衡山县', '衡东县', '祁东县', '耒阳市', '常宁市']
+ },
+ {
+ name: '邵阳市',
+ districts: ['双清区', '大祥区', '北塔区', '邵东县', '新邵县', '邵阳县', '隆回县', '洞口县', '绥宁县', '新宁县', '城步苗族自治县', '武冈市']
+ },
+ {
+ name: '岳阳市',
+ districts: ['岳阳楼区', '云溪区', '君山区', '岳阳县', '华容县', '湘阴县', '平江县', '汨罗市', '临湘市']
+ },
+ {
+ name: '常德市',
+ districts: ['武陵区', '鼎城区', '安乡县', '汉寿县', '澧县', '临澧县', '桃源县', '石门县', '津市市']
+ },
+ {
+ name: '张家界市',
+ districts: ['永定区', '武陵源区', '慈利县', '桑植县']
+ },
+ {
+ name: '益阳市',
+ districts: ['资阳区', '赫山区', '南县', '桃江县', '安化县', '沅江市']
+ },
+ {
+ name: '郴州市',
+ districts: ['北湖区', '苏仙区', '桂阳县', '宜章县', '永兴县', '嘉禾县', '临武县', '汝城县', '桂东县', '安仁县', '资兴市']
+ },
+ {
+ name: '永州市',
+ districts: ['零陵区', '冷水滩区', '祁阳县', '东安县', '双牌县', '道县', '江永县', '宁远县', '蓝山县', '新田县', '江华瑶族自治县']
+ },
+ {
+ name: '怀化市',
+ districts: ['鹤城区', '中方县', '沅陵县', '辰溪县', '溆浦县', '会同县', '麻阳苗族自治县', '新晃侗族自治县', '芷江侗族自治县', '靖州苗族侗族自治县', '通道侗族自治县', '洪江市']
+ },
+ {
+ name: '娄底市',
+ districts: ['娄星区', '双峰县', '新化县', '冷水江市', '涟源市']
+ },
+ {
+ name: '湘西土家族苗族自治州',
+ districts: ['吉首市', '泸溪县', '凤凰县', '花垣县', '保靖县', '古丈县', '永顺县', '龙山县']
+ }
+ ]
+ },
+ // 广东省
+ {
+ name: '广东省',
+ cities: [
+ {
+ name: '广州市',
+ districts: ['荔湾区', '越秀区', '海珠区', '天河区', '白云区', '黄埔区', '番禺区', '花都区', '南沙区', '从化区', '增城区']
+ },
+ {
+ name: '深圳市',
+ districts: ['罗湖区', '福田区', '南山区', '宝安区', '龙岗区', '盐田区', '龙华区', '坪山区', '光明区']
+ },
+ {
+ name: '珠海市',
+ districts: ['香洲区', '斗门区', '金湾区']
+ },
+ {
+ name: '汕头市',
+ districts: ['龙湖区', '金平区', '濠江区', '潮阳区', '潮南区', '澄海区', '南澳县']
+ },
+ {
+ name: '佛山市',
+ districts: ['禅城区', '南海区', '顺德区', '三水区', '高明区']
+ },
+ {
+ name: '韶关市',
+ districts: ['武江区', '浈江区', '曲江区', '始兴县', '仁化县', '翁源县', '乳源瑶族自治县', '新丰县', '乐昌市', '南雄市']
+ },
+ {
+ name: '河源市',
+ districts: ['源城区', '紫金县', '龙川县', '连平县', '和平县', '东源县']
+ },
+ {
+ name: '梅州市',
+ districts: ['梅江区', '梅县区', '大埔县', '丰顺县', '五华县', '平远县', '蕉岭县', '兴宁市']
+ },
+ {
+ name: '惠州市',
+ districts: ['惠城区', '惠阳区', '博罗县', '惠东县', '龙门县']
+ },
+ {
+ name: '汕尾市',
+ districts: ['城区', '海丰县', '陆河县', '陆丰市']
+ },
+ {
+ name: '东莞市',
+ districts: ['东莞市']
+ },
+ {
+ name: '中山市',
+ districts: ['中山市']
+ },
+ {
+ name: '江门市',
+ districts: ['蓬江区', '江海区', '新会区', '台山市', '开平市', '鹤山市', '恩平市']
+ },
+ {
+ name: '阳江市',
+ districts: ['江城区', '阳东区', '阳西县', '阳春市']
+ },
+ {
+ name: '湛江市',
+ districts: ['赤坎区', '霞山区', '坡头区', '麻章区', '遂溪县', '徐闻县', '廉江市', '雷州市', '吴川市']
+ },
+ {
+ name: '茂名市',
+ districts: ['茂南区', '电白区', '高州市', '化州市', '信宜市']
+ },
+ {
+ name: '肇庆市',
+ districts: ['端州区', '鼎湖区', '高要区', '广宁县', '怀集县', '封开县', '德庆县', '四会市']
+ },
+ {
+ name: '清远市',
+ districts: ['清城区', '清新区', '佛冈县', '阳山县', '连山壮族瑶族自治县', '连南瑶族自治县', '英德市', '连州市']
+ },
+ {
+ name: '潮州市',
+ districts: ['湘桥区', '潮安区', '饶平县']
+ },
+ {
+ name: '揭阳市',
+ districts: ['榕城区', '揭东区', '揭西县', '惠来县', '普宁市']
+ },
+ {
+ name: '云浮市',
+ districts: ['云城区', '云安区', '新兴县', '郁南县', '罗定市']
+ },
+ {
+ name: '顺德区',
+ districts: ['顺德区']
+ },
+ {
+ name: '南海区',
+ districts: ['南海区']
+ },
+ {
+ name: '温州市',
+ districts: ['鹿城区', '龙湾区', '瓯海区', '洞头区', '瑞安市', '乐清市', '永嘉县', '平阳县', '苍南县', '文成县', '泰顺县']
+ },
+ {
+ name: '嘉兴市',
+ districts: ['南湖区', '秀洲区', '海宁市', '平湖市', '桐乡市', '嘉善县', '海盐县']
+ },
+ {
+ name: '湖州市',
+ districts: ['吴兴区', '南浔区', '德清县', '长兴县', '安吉县']
+ }
+ ]
+ },
+ {
+ name: '四川省',
+ cities: [
+ {
+ name: '成都市',
+ districts: ['锦江区', '青羊区', '金牛区', '武侯区', '成华区', '龙泉驿区', '青白江区', '新都区', '温江区', '双流区', '郫都区', '新津区', '金堂县', '大邑县', '蒲江县', '都江堰市', '彭州市', '邛崃市', '崇州市', '简阳市']
+ },
+ {
+ name: '绵阳市',
+ districts: ['涪城区', '游仙区', '安州区', '三台县', '盐亭县', '梓潼县', '北川羌族自治县', '平武县', '江油市']
+ },
+ {
+ name: '德阳市',
+ districts: ['旌阳区', '罗江区', '中江县', '广汉市', '什邡市', '绵竹市']
+ },
+ {
+ name: '自贡市',
+ districts: ['自流井区', '贡井区', '大安区', '沿滩区', '荣县', '富顺县']
+ },
+ {
+ name: '攀枝花市',
+ districts: ['东区', '西区', '仁和区', '米易县', '盐边县']
+ },
+ {
+ name: '泸州市',
+ districts: ['江阳区', '纳溪区', '龙马潭区', '泸县', '合江县', '叙永县', '古蔺县']
+ },
+ {
+ name: '广元市',
+ districts: ['利州区', '昭化区', '朝天区', '旺苍县', '青川县', '剑阁县', '苍溪县']
+ },
+ {
+ name: '遂宁市',
+ districts: ['船山区', '安居区', '蓬溪县', '射洪市', '大英县']
+ },
+ {
+ name: '内江市',
+ districts: ['市中区', '东兴区', '威远县', '资中县', '隆昌市']
+ },
+ {
+ name: '乐山市',
+ districts: ['市中区', '沙湾区', '五通桥区', '金口河区', '犍为县', '井研县', '夹江县', '沐川县', '峨边彝族自治县', '马边彝族自治县', '峨眉山市']
+ },
+ {
+ name: '资阳市',
+ districts: ['雁江区', '安岳县', '乐至县']
+ },
+ {
+ name: '宜宾市',
+ districts: ['翠屏区', '南溪区', '叙州区', '江安县', '长宁县', '高县', '珙县', '筠连县', '兴文县', '屏山县']
+ },
+ {
+ name: '南充市',
+ districts: ['顺庆区', '高坪区', '嘉陵区', '南部县', '营山县', '蓬安县', '仪陇县', '西充县', '阆中市']
+ },
+ {
+ name: '广安市',
+ districts: ['广安区', '前锋区', '岳池县', '武胜县', '邻水县', '华蓥市']
+ },
+ {
+ name: '达州市',
+ districts: ['通川区', '达川区', '宣汉县', '开江县', '大竹县', '渠县', '万源市']
+ },
+ {
+ name: '巴中市',
+ districts: ['巴州区', '恩阳区', '通江县', '南江县', '平昌县']
+ },
+ {
+ name: '眉山市',
+ districts: ['东坡区', '彭山区', '仁寿县', '洪雅县', '丹棱县', '青神县']
+ },
+ {
+ name: '雅安市',
+ districts: ['雨城区', '名山区', '荥经县', '汉源县', '石棉县', '天全县', '芦山县', '宝兴县']
+ },
+ {
+ name: '阿坝藏族羌族自治州',
+ districts: ['马尔康市', '汶川县', '理县', '茂县', '松潘县', '九寨沟县', '金川县', '小金县', '黑水县', '壤塘县', '阿坝县', '若尔盖县', '红原县']
+ },
+ {
+ name: '甘孜藏族自治州',
+ districts: ['康定市', '泸定县', '丹巴县', '九龙县', '雅江县', '道孚县', '炉霍县', '甘孜县', '新龙县', '德格县', '白玉县', '石渠县', '色达县', '理塘县', '巴塘县', '乡城县', '稻城县', '得荣县']
+ },
+ {
+ name: '凉山彝族自治州',
+ districts: ['西昌市', '木里藏族自治县', '盐源县', '德昌县', '会理市', '会东县', '宁南县', '普格县', '布拖县', '金阳县', '昭觉县', '喜德县', '冕宁县', '越西县', '甘洛县', '美姑县', '雷波县']
+ }
+ ]
+ },
+ {
+ name: '香港特别行政区',
+ cities: [
+ {
+ name: '香港岛',
+ districts: ['中西区', '湾仔区', '东区', '南区']
+ },
+ {
+ name: '九龙',
+ districts: ['油尖旺区', '深水埗区', '九龙城区', '黄大仙区', '观塘区']
+ },
+ {
+ name: '新界',
+ districts: ['北区', '大埔区', '沙田区', '西贡区', '荃湾区', '屯门区', '元朗区', '葵青区', '离岛区']
+ }
+ ]
+ },
+ {
+ name: '澳门特别行政区',
+ cities: [
+ {
+ name: '澳门半岛',
+ districts: ['花地玛堂区', '圣安多尼堂区', '大堂区', '望德堂区', '风顺堂区']
+ },
+ {
+ name: '氹仔岛',
+ districts: ['嘉模堂区']
+ },
+ {
+ name: '路环岛',
+ districts: ['圣方济各堂区']
+ },
+ {
+ name: '路氹城',
+ districts: ['路氹填海区']
+ }
+ ]
+ }
+ ],
+ // 三级联动选中状态
+ selectedProvinceIndex: 0,
+ selectedCityIndex: 0,
+ selectedDistrictIndex: 0,
+ // 当前显示的市和区选项
+ currentCities: [],
+ currentDistricts: [],
+ // 地区搜索相关
+ regionSearchKeyword: '',
+ editRegionSearchKeyword: '',
+ filteredRegionOptions: [],
+ showSearchResults: false,
newSupply: {
name: '', // 品种
price: '',
@@ -47,7 +1372,7 @@ Page({
imageUrls: [] // 图片URL数组,支持多张图片
},
newSupplyRegionArray: [], // 新创建货源的省市区数组
- editSupplyRegionArray: [], // 编辑货源的省市区数组,
+ editSupplyRegionArray: [], // 编辑货源的省市区数组
editSupply: {
yolkIndex: 0,
specIndex: 0
@@ -137,9 +1462,12 @@ Page({
specSearchKeyword: '',
editSpecSearchKeyword: '',
filteredSpecOptions: this.data.specOptions,
- filteredEditSpecOptions: this.data.specOptions
+ filteredEditSpecOptions: this.data.specOptions,
+ // 初始化三级联动地区数据
+ currentCities: this.data.regionOptions[this.data.selectedProvinceIndex].cities,
+ currentDistricts: this.data.regionOptions[this.data.selectedProvinceIndex].cities[this.data.selectedCityIndex].districts
});
-
+
// 尝试从本地存储加载草稿数据
const draftData = wx.getStorageSync('newSupplyDraft');
if (draftData) {
@@ -148,7 +1476,7 @@ Page({
});
console.log('从本地存储加载了草稿数据');
}
-
+
console.log('卖家页面onLoad执行完毕');
},
@@ -352,7 +1680,7 @@ Page({
// 页面不是初次显示,正常加载数据
this.loadSupplies();
}
-
+
// 更新自定义tabBar状态
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
@@ -1175,10 +2503,10 @@ Page({
try {
const res = await API.uploadUserInfo(uploadData)
console.log('用户信息上传成功:', res)
-
+
// 入驻成功后,将用户类型设置为seller
API.updateUserType('seller');
-
+
return res
} catch (err) {
console.error('用户信息上传失败:', err)
@@ -1236,22 +2564,22 @@ Page({
// 显示添加货源弹窗
showAddSupply(e) {
console.log('点击创建新货源按钮');
-
+
// 阻止事件冒泡,防止触发父元素的点击事件
if (e && e.stopPropagation) {
e.stopPropagation();
}
-
+
// 从本地存储加载之前保存的货源数据
const savedSupply = wx.getStorageSync('newSupplyDraft') || { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] };
-
+
// 直接显示创建货源弹窗,无需登录验证
this.setData({
showImagePreview: false,
showModal: true,
newSupply: savedSupply
});
-
+
// 锁定页面滚动
this.disablePageScroll();
},
@@ -1316,7 +2644,7 @@ Page({
const newSupply = this.data.newSupply
newSupply[field] = value
this.setData({ newSupply })
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', newSupply);
},
@@ -1338,7 +2666,7 @@ Page({
onNewSupplyRegionChange(e) {
const regionArray = e.detail.value
const region = regionArray.join(' ')
-
+
this.setData({
newSupplyRegionArray: regionArray,
newSupply: {
@@ -1346,7 +2674,7 @@ Page({
region: region
}
})
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', this.data.newSupply);
},
@@ -1355,7 +2683,7 @@ Page({
onEditSupplyRegionChange(e) {
const regionArray = e.detail.value
const region = regionArray.join(' ')
-
+
this.setData({
editSupplyRegionArray: regionArray,
editSupply: {
@@ -1364,7 +2692,7 @@ Page({
}
})
},
-
+
// 处理蛋黄选择变更
onYolkChange(e) {
const index = e.detail.value
@@ -1374,24 +2702,24 @@ Page({
'newSupply.yolk': yolk
})
},
-
+
// 处理规格选择变更 - 现在直接打开自定义弹窗
onSpecChange(e) {
// 由于我们使用自定义弹窗,这个函数现在只需要打开弹窗即可
this.openSpecSelectModal({ currentTarget: { dataset: { mode: 'create' } } });
},
-
+
// 处理编辑模式下的蛋黄选择变更
onEditYolkChange(e) {
console.warn('此方法已弃用,请使用openYolkSelectModal替代');
},
-
+
// 处理编辑模式下的规格选择变更 - 现在直接打开自定义弹窗
onEditSpecChange(e) {
// 由于我们使用自定义弹窗,这个函数现在只需要打开弹窗即可
this.openSpecSelectModal({ currentTarget: { dataset: { mode: 'edit' } } });
},
- // 商品名称选择变化处理
+ // 商品名称选择变化处理
onNameChange(e) {
const index = e.detail.value
const productName = this.data.productNameOptions[index]
@@ -1410,7 +2738,7 @@ Page({
const userId = wx.getStorageSync('userId');
const openid = wx.getStorageSync('openid');
const userInfo = wx.getStorageSync('userInfo');
-
+
if (!userId || !openid || !userInfo) {
console.log('用户未登录,显示登录提示');
// 登录前保存当前表单数据到本地存储
@@ -1433,7 +2761,7 @@ Page({
});
return;
}
-
+
const { name, price, minOrder, yolk, spec, region, imageUrls } = this.data.newSupply
if (!name || !price || !minOrder || !yolk) {
wx.showToast({ title: '请填写完整信息', icon: 'none', duration: 2000 })
@@ -1448,22 +2776,22 @@ Page({
.then(response => {
const userInfoRes = response.data;
console.log('获取用户信息成功:', userInfoRes)
-
+
// 检查partnerstatus字段
const partnerStatus = userInfoRes.partnerstatus || 'pending'
console.log('用户合作状态:', partnerStatus)
-
+
if (partnerStatus !== 'approved') {
throw new Error('partnerstatus_not_approved')
}
-
+
// 第一步:先创建商品(不带图片)
const productData = {
productName: name,
price: price, // 保留原始字符串,不进行数字转换
quantity: Number(minOrder),
grossWeight: this.data.newSupply.grossWeight && this.data.newSupply.grossWeight !== '' ? this.data.newSupply.grossWeight : "",
-
+
yolk: yolk,
specification: spec || '',
region: region || '', // 【新增】添加地区字段
@@ -1472,7 +2800,7 @@ Page({
}
console.log('第一步:准备创建商品,数据:', productData)
-
+
// 更新加载提示
wx.showLoading({ title: '正在创建商品...', mask: true })
@@ -1519,10 +2847,10 @@ Page({
showModal: false,
newSupply: { name: '', price: '', minOrder: '', yolk: '', spec: '', imageUrls: [] }
})
-
+
// 清除本地存储的草稿数据
wx.removeStorageSync('newSupplyDraft');
-
+
this.enablePageScroll()
// 重新加载数据
@@ -1785,106 +3113,106 @@ Page({
return Promise.reject(err);
})
.then(() => {
- // 【关键修复】准备商品数据 - 确保包含地区字段
- const productData = {
- productName: editSupply.name,
- price: editSupply.price, // 保留原始字符串,不进行数字转换
- quantity: Number(editSupply.minOrder),
- grossWeight: editSupply.grossWeight !== undefined && editSupply.grossWeight !== null && editSupply.grossWeight !== '' ? editSupply.grossWeight : "",
- yolk: editSupply.yolk,
- specification: editSupply.spec || '',
- region: editSupply.region || '', // 【重要】确保地区字段传递
- imageUrls: editSupply.imageUrls || [],
- created_at: new Date().toISOString(),
- status: autoPublishAfterEdit ? 'pending_review' : ''
- };
-
- console.log('【调试】准备提交的商品数据:', {
- productData: productData,
- hasRegion: !!productData.region,
- regionValue: productData.region
- });
-
- // 判断是编辑现有商品还是创建新商品
- if (editSupply.serverProductId) {
- // 编辑现有商品
- productData.productId = editSupply.serverProductId;
-
- console.log('【调试】调用API.editProduct,商品ID:', editSupply.serverProductId);
+ // 【关键修复】准备商品数据 - 确保包含地区字段
+ const productData = {
+ productName: editSupply.name,
+ price: editSupply.price, // 保留原始字符串,不进行数字转换
+ quantity: Number(editSupply.minOrder),
+ grossWeight: editSupply.grossWeight !== undefined && editSupply.grossWeight !== null && editSupply.grossWeight !== '' ? editSupply.grossWeight : "",
+ yolk: editSupply.yolk,
+ specification: editSupply.spec || '',
+ region: editSupply.region || '', // 【重要】确保地区字段传递
+ imageUrls: editSupply.imageUrls || [],
+ created_at: new Date().toISOString(),
+ status: autoPublishAfterEdit ? 'pending_review' : ''
+ };
+
+ console.log('【调试】准备提交的商品数据:', {
+ productData: productData,
+ hasRegion: !!productData.region,
+ regionValue: productData.region
+ });
- // 【关键修复】使用正确的API调用格式
- const requestData = {
- openid: openid,
- productId: editSupply.serverProductId,
- product: {
- productName: productData.productName,
- price: productData.price,
- quantity: productData.quantity,
- grossWeight: productData.grossWeight,
- yolk: productData.yolk,
- specification: productData.specification,
- region: productData.region, // 【重要】确保在product对象中传递地区字段
- imageUrls: productData.imageUrls
- },
- status: productData.status || ''
- };
+ // 判断是编辑现有商品还是创建新商品
+ if (editSupply.serverProductId) {
+ // 编辑现有商品
+ productData.productId = editSupply.serverProductId;
+
+ console.log('【调试】调用API.editProduct,商品ID:', editSupply.serverProductId);
+
+ // 【关键修复】使用正确的API调用格式
+ const requestData = {
+ openid: openid,
+ productId: editSupply.serverProductId,
+ product: {
+ productName: productData.productName,
+ price: productData.price,
+ quantity: productData.quantity,
+ grossWeight: productData.grossWeight,
+ yolk: productData.yolk,
+ specification: productData.specification,
+ region: productData.region, // 【重要】确保在product对象中传递地区字段
+ imageUrls: productData.imageUrls
+ },
+ status: productData.status || ''
+ };
- console.log('【调试】最终发送的请求数据:', requestData);
+ console.log('【调试】最终发送的请求数据:', requestData);
- // 直接使用wx.request调用,避免API封装层的问题
- wx.request({
- url: API.BASE_URL + '/api/product/edit',
- method: 'POST',
- data: requestData,
- success: (res) => {
- console.log('【调试】编辑商品成功响应:', res);
- wx.hideLoading();
- this.setData({ showEditModal: false });
- this.enablePageScroll();
- wx.showToast({ title: '更新成功', duration: 2000 });
+ // 直接使用wx.request调用,避免API封装层的问题
+ wx.request({
+ url: API.BASE_URL + '/api/product/edit',
+ method: 'POST',
+ data: requestData,
+ success: (res) => {
+ console.log('【调试】编辑商品成功响应:', res);
+ wx.hideLoading();
+ this.setData({ showEditModal: false });
+ this.enablePageScroll();
+ wx.showToast({ title: '更新成功', duration: 2000 });
- // 重新加载数据
- setTimeout(() => {
- this.loadSupplies();
- }, 100);
- },
- fail: (err) => {
- console.error('【调试】编辑商品失败:', err);
- wx.hideLoading();
- wx.showToast({ title: '保存失败,请重试', icon: 'none', duration: 2000 });
- }
- });
- } else {
- // 创建新商品并提交审核
- // 调用添加商品接口
- wx.request({
- url: API.BASE_URL + '/api/product/add',
- method: 'POST',
- data: productData,
- success: (res) => {
- console.log('商品创建成功:', res);
- wx.hideLoading();
+ // 重新加载数据
+ setTimeout(() => {
+ this.loadSupplies();
+ }, 100);
+ },
+ fail: (err) => {
+ console.error('【调试】编辑商品失败:', err);
+ wx.hideLoading();
+ wx.showToast({ title: '保存失败,请重试', icon: 'none', duration: 2000 });
+ }
+ });
+ } else {
+ // 创建新商品并提交审核
+ // 调用添加商品接口
+ wx.request({
+ url: API.BASE_URL + '/api/product/add',
+ method: 'POST',
+ data: productData,
+ success: (res) => {
+ console.log('商品创建成功:', res);
+ wx.hideLoading();
- // 关闭编辑弹窗
- this.setData({ showEditModal: false });
- // 恢复页面滚动
- this.enablePageScroll();
+ // 关闭编辑弹窗
+ this.setData({ showEditModal: false });
+ // 恢复页面滚动
+ this.enablePageScroll();
- wx.showToast({ title: '更新成功,等待审核', duration: 2000 });
+ wx.showToast({ title: '更新成功,等待审核', duration: 2000 });
- // 重新加载商品列表
- setTimeout(() => {
- this.loadSupplies();
- }, 100);
- },
- fail: (err) => {
- console.error('商品创建失败:', err);
- wx.hideLoading();
- wx.showToast({ title: '创建失败,请重试', icon: 'none', duration: 2000 });
+ // 重新加载商品列表
+ setTimeout(() => {
+ this.loadSupplies();
+ }, 100);
+ },
+ fail: (err) => {
+ console.error('商品创建失败:', err);
+ wx.hideLoading();
+ wx.showToast({ title: '创建失败,请重试', icon: 'none', duration: 2000 });
+ }
+ });
}
});
- }
- });
},
// 预览图片
@@ -2025,7 +3353,7 @@ Page({
} else if (e.touches.length === 1) {
// 单指触摸时记录触摸点 - 使用pageX和pageY而非clientX和clientY
const touch = e.touches[0]
- this.setData({
+ this.setData({
lastTouchPoint: {
pageX: touch.pageX,
pageY: touch.pageY
@@ -2110,7 +3438,7 @@ Page({
// 假设屏幕宽度为375px
const screenWidth = 375
let newScale = 2
-
+
this.setData({ scale: newScale })
},
@@ -2223,7 +3551,7 @@ Page({
// 计算蛋黄和规格的索引值
const yolkIndex = this.data.yolkOptions.indexOf(supply.yolk) >= 0 ? this.data.yolkOptions.indexOf(supply.yolk) : 0;
const specIndex = this.data.specOptions.indexOf(supply.spec) >= 0 ? this.data.specOptions.indexOf(supply.spec) : 0;
-
+
// 设置编辑货源数据,显示编辑弹窗
const supplyWithFormattedTime = {
...supply,
@@ -2293,7 +3621,7 @@ Page({
const userId = wx.getStorageSync('userId');
const openid = wx.getStorageSync('openid');
const userInfo = wx.getStorageSync('userInfo');
-
+
if (!userId || !openid || !userInfo) {
wx.showModal({
title: '提示',
@@ -2307,7 +3635,7 @@ Page({
});
return;
}
-
+
// 检查用户合作状态
API.getUserInfo(openid)
.then(response => {
@@ -2332,7 +3660,7 @@ Page({
});
return;
}
-
+
const id = e.currentTarget.dataset.id
// 优先使用编辑中的商品数据
let supply = null
@@ -2355,7 +3683,7 @@ Page({
});
return;
}
-
+
wx.showLoading({ title: '处理中...', mask: true });
// 判断当前货源状态,决定设置什么状态
@@ -2935,25 +4263,25 @@ Page({
// 注意:这里不立即清空 currentRejectSupply,确保后续操作能使用
});
},
-
+
// 打开规格选择弹窗
openSpecSelectModal: function (e) {
const mode = e.currentTarget.dataset.mode || 'create';
const currentSpec = mode === 'create' ? this.data.newSupply.spec : this.data.editSupply.spec;
const specOptions = this.data.specOptions;
let selectedIndex = -1;
-
+
// 查找当前选中规格的索引
if (currentSpec) {
selectedIndex = specOptions.indexOf(currentSpec);
}
-
+
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = false;
}
-
+
this.setData({
showSpecSelectModal: true,
currentSpecMode: mode,
@@ -2963,7 +4291,7 @@ Page({
showTabBar: false // 隐藏底部tab-bar
});
},
-
+
// 关闭规格选择弹窗
closeSpecSelectModal: function () {
// 通过全局数据控制自定义tab-bar的显示状态
@@ -2971,7 +4299,7 @@ Page({
if (app && app.globalData) {
app.globalData.showTabBar = true;
}
-
+
this.setData({
showSpecSelectModal: false,
modalSpecSearchKeyword: '',
@@ -2979,26 +4307,26 @@ Page({
showTabBar: true // 显示底部tab-bar
});
},
-
+
// 弹窗中规格搜索输入
onModalSpecSearchInput: function (e) {
const keyword = e.detail.value;
const specOptions = this.data.specOptions;
let filteredOptions = specOptions;
-
+
if (keyword) {
filteredOptions = specOptions.filter(option => {
return option.toLowerCase().includes(keyword.toLowerCase());
});
}
-
+
this.setData({
modalSpecSearchKeyword: keyword,
filteredModalSpecOptions: filteredOptions,
selectedModalSpecIndex: -1 // 搜索时重置选择
});
},
-
+
// 清除弹窗中的规格搜索关键词
clearModalSpecSearch: function () {
this.setData({
@@ -3007,18 +4335,18 @@ Page({
selectedModalSpecIndex: -1
});
},
-
+
// 双击检测变量
lastTapTime: {},
tapCount: {},
-
+
// 通用双击检测函数
- handleDoubleTap: function(e, type, callback) {
+ handleDoubleTap: function (e, type, callback) {
const currentTime = Date.now();
const tapKey = `${type}-${e.currentTarget.dataset.index}`;
const lastTap = this.lastTapTime[tapKey] || 0;
const tapInterval = currentTime - lastTap;
-
+
if (tapInterval < 300 && tapInterval > 0) {
// 双击事件触发,执行确认选择
callback();
@@ -3030,7 +4358,7 @@ Page({
}, 300);
}
},
-
+
// 弹窗中选择规格
onModalSpecSelect: function (e) {
const index = e.currentTarget.dataset.index;
@@ -3039,13 +4367,13 @@ Page({
selectedModalSpecIndex: index,
modalSpecSearchKeyword: selectedSpec // 自动填充搜索框为当前选择的规格
});
-
+
// 检测双击
this.handleDoubleTap(e, 'spec', () => {
this.confirmSpecSelection();
});
},
-
+
// 确认规格选择
confirmSpecSelection: function () {
if (this.data.selectedModalSpecIndex === -1) {
@@ -3055,11 +4383,11 @@ Page({
});
return;
}
-
+
const selectedSpec = this.data.filteredModalSpecOptions[this.data.selectedModalSpecIndex];
const specOptions = this.data.specOptions;
const originalIndex = specOptions.indexOf(selectedSpec);
-
+
// 根据当前模式更新对应的规格信息
if (this.data.currentSpecMode === 'create') {
const newSupply = this.data.newSupply;
@@ -3068,7 +4396,7 @@ Page({
this.setData({
newSupply: newSupply
});
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', newSupply);
} else if (this.data.currentSpecMode === 'edit') {
@@ -3077,10 +4405,10 @@ Page({
'editSupply.specIndex': originalIndex
});
}
-
+
// 关闭弹窗
this.closeSpecSelectModal();
-
+
// 恢复页面滚动
this.enablePageScroll();
@@ -3199,7 +4527,7 @@ Page({
this.setData({
newSupply: newSupply
});
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', newSupply);
} else {
@@ -3294,7 +4622,7 @@ Page({
this.setData({
newSupply: newSupply
});
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', newSupply);
} else {
@@ -3368,12 +4696,12 @@ Page({
filterSpecOptions(keyword, type) {
const specOptions = this.data.specOptions;
let filteredOptions = specOptions;
-
+
if (keyword) {
filteredOptions = specOptions.filter(option => {
return option.toLowerCase().includes(keyword);
});
-
+
// 如果有匹配的规格选项,自动填充第一个匹配项
if (filteredOptions.length > 0) {
if (type === 'create') {
@@ -3404,7 +4732,7 @@ Page({
});
}
}
-
+
if (type === 'create') {
this.setData({
filteredSpecOptions: filteredOptions
@@ -3436,6 +4764,254 @@ Page({
});
},
+ // 打开创建货源的地区选择弹窗
+ openCreateRegionModal() {
+ // 通过全局数据控制自定义tab-bar的显示状态
+ const app = getApp();
+ if (app && app.globalData) {
+ app.globalData.showTabBar = false;
+ }
+
+ // 重置三级联动选择和搜索
+ this.setData({
+ currentRegionMode: 'create',
+ regionSearchKeyword: '',
+ editRegionSearchKeyword: '',
+ filteredRegionOptions: [],
+ showSearchResults: false,
+ selectedProvinceIndex: 0,
+ selectedCityIndex: 0,
+ selectedDistrictIndex: 0,
+ currentCities: this.data.regionOptions[0].cities,
+ currentDistricts: this.data.regionOptions[0].cities[0].districts,
+ showRegionSelectModal: true,
+ showTabBar: false // 隐藏底部tab-bar
+ });
+ },
+
+ // 打开编辑货源的地区选择弹窗
+ openEditRegionModal() {
+ // 通过全局数据控制自定义tab-bar的显示状态
+ const app = getApp();
+ if (app && app.globalData) {
+ app.globalData.showTabBar = false;
+ }
+
+ // 重置三级联动选择和搜索
+ this.setData({
+ currentRegionMode: 'edit',
+ regionSearchKeyword: '',
+ editRegionSearchKeyword: '',
+ filteredRegionOptions: [],
+ showSearchResults: false,
+ selectedProvinceIndex: 0,
+ selectedCityIndex: 0,
+ selectedDistrictIndex: 0,
+ currentCities: this.data.regionOptions[0].cities,
+ currentDistricts: this.data.regionOptions[0].cities[0].districts,
+ showRegionSelectModal: true,
+ showTabBar: false // 隐藏底部tab-bar
+ });
+ },
+
+ // 关闭地区选择弹窗
+ closeRegionModal() {
+ // 通过全局数据控制自定义tab-bar的显示状态
+ const app = getApp();
+ if (app && app.globalData) {
+ app.globalData.showTabBar = true;
+ }
+
+ this.setData({
+ showRegionSelectModal: false,
+ showTabBar: true, // 显示底部tab-bar
+ showSearchResults: false // 隐藏搜索结果
+ });
+ },
+
+ // 地区搜索输入处理
+ onRegionSearchInput(e) {
+ const keyword = e.detail.value.trim();
+ const mode = this.data.currentRegionMode;
+
+ // 更新搜索关键词
+ this.setData({
+ [mode === 'create' ? 'regionSearchKeyword' : 'editRegionSearchKeyword']: keyword
+ });
+
+ // 过滤地区选项
+ this.filterRegionOptions(keyword);
+ },
+
+ // 地区搜索框聚焦
+ onRegionSearchFocus() {
+ this.setData({
+ showSearchResults: true
+ });
+ },
+
+ // 清除地区搜索
+ clearRegionSearch() {
+ const mode = this.data.currentRegionMode;
+
+ this.setData({
+ [mode === 'create' ? 'regionSearchKeyword' : 'editRegionSearchKeyword']: '',
+ filteredRegionOptions: [],
+ showSearchResults: false
+ });
+ },
+
+ // 过滤地区选项
+ filterRegionOptions(keyword) {
+ if (!keyword) {
+ this.setData({
+ filteredRegionOptions: []
+ });
+ return;
+ }
+
+ const regionOptions = this.data.regionOptions;
+ const filtered = [];
+
+ // 遍历所有省市区进行匹配
+ regionOptions.forEach((province, provinceIndex) => {
+ // 匹配省份
+ if (province.name.includes(keyword)) {
+ filtered.push({
+ region: province.name,
+ provinceIndex,
+ cityIndex: 0,
+ districtIndex: 0
+ });
+ }
+
+ // 匹配城市
+ province.cities.forEach((city, cityIndex) => {
+ const fullCityName = `${province.name} ${city.name}`;
+ if (city.name.includes(keyword) || fullCityName.includes(keyword)) {
+ filtered.push({
+ region: fullCityName,
+ provinceIndex,
+ cityIndex,
+ districtIndex: 0
+ });
+ }
+
+ // 匹配区县
+ city.districts.forEach((district, districtIndex) => {
+ const fullRegionName = `${province.name} ${city.name} ${district}`;
+ if (district.includes(keyword) || fullRegionName.includes(keyword)) {
+ filtered.push({
+ region: fullRegionName,
+ provinceIndex,
+ cityIndex,
+ districtIndex
+ });
+ }
+ });
+ });
+ });
+
+ this.setData({
+ filteredRegionOptions: filtered
+ });
+ },
+
+ // 选择搜索结果
+ selectSearchRegion(e) {
+ const { region, provinceIndex, cityIndex, districtIndex } = e.currentTarget.dataset;
+
+ // 更新三级联动选择状态
+ const province = this.data.regionOptions[provinceIndex];
+ const city = province.cities[cityIndex];
+
+ this.setData({
+ selectedProvinceIndex: parseInt(provinceIndex),
+ selectedCityIndex: parseInt(cityIndex),
+ selectedDistrictIndex: parseInt(districtIndex),
+ currentCities: province.cities,
+ currentDistricts: city.districts,
+ showSearchResults: false // 隐藏搜索结果
+ });
+ },
+
+ // 处理省份选择变化
+ onProvinceChange(e) {
+ const index = e.detail.value;
+ const province = this.data.regionOptions[index];
+
+ this.setData({
+ selectedProvinceIndex: index,
+ selectedCityIndex: 0,
+ selectedDistrictIndex: 0,
+ currentCities: province.cities,
+ currentDistricts: province.cities[0].districts
+ });
+ },
+
+ // 处理城市选择变化
+ onCityChange(e) {
+ const index = e.detail.value;
+ const cities = this.data.currentCities;
+ const province = this.data.regionOptions[this.data.selectedProvinceIndex];
+
+ this.setData({
+ selectedCityIndex: index,
+ selectedDistrictIndex: 0,
+ currentDistricts: province.cities[index].districts
+ });
+ },
+
+ // 处理地区选择变化
+ onDistrictChange(e) {
+ this.setData({
+ selectedDistrictIndex: e.detail.value
+ });
+ },
+
+ // 处理三级联动选择器变化
+ onRegionChange(e) {
+ const value = e.detail.value;
+ const provinceIndex = value[0];
+ const cityIndex = value[1];
+ const districtIndex = value[2];
+
+ const province = this.data.regionOptions[provinceIndex];
+ const city = province.cities[cityIndex];
+
+ // 更新选择状态
+ this.setData({
+ selectedProvinceIndex: provinceIndex,
+ selectedCityIndex: cityIndex,
+ selectedDistrictIndex: districtIndex,
+ currentCities: province.cities,
+ currentDistricts: city.districts
+ });
+ },
+
+ // 确认地区选择
+ confirmRegionSelection() {
+ const province = this.data.regionOptions[this.data.selectedProvinceIndex];
+ const city = province.cities[this.data.selectedCityIndex];
+ const district = city.districts[this.data.selectedDistrictIndex];
+
+ // 组合完整的地区信息
+ const selectedRegion = `${province.name} ${city.name} ${district}`;
+ const mode = this.data.currentRegionMode;
+
+ if (mode === 'create') {
+ this.setData({
+ 'newSupply.region': selectedRegion
+ });
+ } else if (mode === 'edit') {
+ this.setData({
+ 'editSupply.region': selectedRegion
+ });
+ }
+
+ this.closeRegionModal();
+ },
+
/**
* 阻止触摸移动事件(用于WXML绑定)
*/
@@ -3491,7 +5067,7 @@ Page({
return false
}
},
-
+
// 商品名称选择弹窗相关函数
openNameSelectModal() {
// 设置当前选中的索引
@@ -3502,55 +5078,55 @@ Page({
currentName = this.data.newSupply.name;
}
const index = currentName ? this.data.productNameOptions.indexOf(currentName) : -1;
-
+
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = false;
}
-
+
this.setData({
showNameSelectModal: true,
selectedNameIndex: index >= 0 ? index : -1,
showTabBar: false // 隐藏底部tab-bar
});
},
-
+
closeNameSelectModal() {
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = true;
}
-
+
this.setData({
showNameSelectModal: false,
showTabBar: true // 显示底部tab-bar
});
},
-
+
onNameSelect(e) {
const index = e.currentTarget.dataset.index;
this.setData({
selectedNameIndex: index
});
-
+
// 检测双击
this.handleDoubleTap(e, 'name', () => {
this.confirmNameSelection();
});
},
-
+
confirmNameSelection() {
if (this.data.selectedNameIndex >= 0) {
const selectedName = this.data.productNameOptions[this.data.selectedNameIndex];
-
+
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = true;
}
-
+
// 根据当前是编辑还是创建模式,更新对应的对象
if (this.data.showEditModal) {
this.setData({
@@ -3566,13 +5142,13 @@ Page({
showNameSelectModal: false,
showTabBar: true // 显示底部tab-bar
});
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', newSupply);
}
}
},
-
+
// 蛋黄选择弹窗相关函数
openYolkSelectModal() {
// 设置当前选中的索引
@@ -3583,55 +5159,55 @@ Page({
currentYolk = this.data.newSupply.yolk;
}
const index = currentYolk ? this.data.yolkOptions.indexOf(currentYolk) : -1;
-
+
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = false;
}
-
+
this.setData({
showYolkSelectModal: true,
selectedYolkIndex: index >= 0 ? index : -1,
showTabBar: false // 隐藏底部tab-bar
});
},
-
+
closeYolkSelectModal() {
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = true;
}
-
+
this.setData({
showYolkSelectModal: false,
showTabBar: true // 显示底部tab-bar
});
},
-
+
onYolkSelect(e) {
const index = e.currentTarget.dataset.index;
this.setData({
selectedYolkIndex: index
});
-
+
// 检测双击
this.handleDoubleTap(e, 'yolk', () => {
this.confirmYolkSelection();
});
},
-
+
confirmYolkSelection() {
if (this.data.selectedYolkIndex >= 0) {
const selectedYolk = this.data.yolkOptions[this.data.selectedYolkIndex];
-
+
// 通过全局数据控制自定义tab-bar的显示状态
const app = getApp();
if (app && app.globalData) {
app.globalData.showTabBar = true;
}
-
+
// 根据当前是编辑还是创建模式,更新对应的对象
if (this.data.showEditModal) {
this.setData({
@@ -3649,7 +5225,7 @@ Page({
showYolkSelectModal: false,
showTabBar: true // 显示底部tab-bar
});
-
+
// 实时保存到本地存储
wx.setStorageSync('newSupplyDraft', newSupply);
}
@@ -3726,4 +5302,4 @@ Page({
});
}
}
-})
+})
\ No newline at end of file
diff --git a/pages/seller/index.wxml b/pages/seller/index.wxml
index e15eb6f..c935b1c 100644
--- a/pages/seller/index.wxml
+++ b/pages/seller/index.wxml
@@ -534,15 +534,12 @@
地区
-
- {{newSupply.region || '请选择省市区'}}
-
+
+
+ {{newSupply.region || '请选择省市区'}}
+ ▼
+
+
@@ -617,15 +614,13 @@
地区
-
{{editSupply.region || '请选择省市区'}}
-
+
@@ -860,4 +855,90 @@
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+ 🔍
+
+
+
+
+
+
+
+ 当前选择: {{regionOptions[selectedProvinceIndex].name}} {{currentCities[selectedCityIndex].name}} {{currentDistricts[selectedDistrictIndex]}}
+
+
+
+
+
+ {{item.region}}
+
+
+ 未找到匹配的地区
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+ {{item.name}}
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/seller/index.wxss b/pages/seller/index.wxss
index 612d756..7925854 100644
--- a/pages/seller/index.wxss
+++ b/pages/seller/index.wxss
@@ -49,12 +49,37 @@ button {
background-color: white;
}
+/* 紧凑搜索框样式 */
+.search-box-compact {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ background-color: #f8f9fa;
+ border: 2rpx solid #e9ecef;
+ border-radius: 40rpx;
+ padding: 0 16rpx;
+ transition: all 0.3s ease;
+}
+
+.search-box-compact:focus-within {
+ border-color: #07c160;
+ box-shadow: 0 0 0 3rpx rgba(7, 193, 96, 0.1);
+ background-color: white;
+}
+
.search-icon {
font-size: 28rpx;
color: #999;
margin-right: 16rpx;
}
+/* 搜索图标文字 */
+.search-icon-text {
+ font-size: 24rpx;
+ color: #999;
+ margin-right: 12rpx;
+}
+
.search-input {
flex: 1;
padding: 24rpx 0;
@@ -65,8 +90,20 @@ button {
outline: none;
}
-.search-input::placeholder {
+/* 紧凑搜索输入框 */
+.search-input-compact {
+ flex: 1;
+ padding: 16rpx 0;
+ font-size: 26rpx;
+ color: #333;
+ background-color: transparent;
+ border: none;
+ outline: none;
+}
+
+.search-input-compact::placeholder {
color: #ccc;
+ font-size: 24rpx;
}
.clear-icon {
@@ -79,11 +116,38 @@ button {
transition: all 0.2s ease;
}
+/* 紧凑清除图标 */
+.clear-icon-compact {
+ width: 28rpx;
+ height: 28rpx;
+ margin-left: 8rpx;
+ cursor: pointer;
+ transition: all 0.2s ease;
+}
+
.clear-icon:hover {
background-color: transparent;
color: #666;
}
+/* 地区搜索结果项样式 */
+.search-result-item {
+ padding: 24rpx 32rpx;
+ font-size: 28rpx;
+ color: #333;
+ background-color: white;
+ border-bottom: 1rpx solid #f0f0f0;
+ transition: background-color 0.2s ease;
+}
+
+.search-result-item:hover {
+ background-color: #f5f5f5;
+}
+
+.search-result-item:last-child {
+ border-bottom: none;
+}
+
/* 页面标题栏 */
.title-bar {
display: flex;
@@ -825,4 +889,120 @@ button {
-webkit-transform: translateZ(0);
transform: translateZ(0);
will-change: transform;
+}
+
+/* 地区选择弹窗样式 */
+.region-select-modal {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.5);
+ display: flex;
+ justify-content: center;
+ z-index: 9999;
+ overflow: hidden;
+}
+
+.region-select-modal .modal-content {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background: white;
+ border-radius: 20rpx 20rpx 0 0;
+ max-height: 80vh;
+ will-change: transform;
+ -webkit-transition: transform 0.3s ease;
+ transition: transform 0.3s ease;
+}
+
+.region-select-modal .modal-header {
+ padding: 20rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1rpx solid #eee;
+ background-color: white;
+ border-radius: 20rpx 20rpx 0 0;
+}
+
+.region-select-modal .modal-title {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #333;
+}
+
+.region-select-modal .modal-btn {
+ font-size: 32rpx;
+ padding: 10rpx 20rpx;
+}
+
+.region-select-modal .modal-btn.cancel {
+ color: #333;
+}
+
+.region-select-modal .modal-btn.confirm {
+ color: #07c160;
+}
+
+.region-select-modal .search-area {
+ padding: 20rpx;
+ background-color: white;
+ border-bottom: 1rpx solid #f0f0f0;
+}
+
+.region-select-modal .search-box {
+ position: relative;
+ background: #f5f5f5;
+ border-radius: 40rpx;
+ padding: 0 30rpx;
+}
+
+.region-select-modal .search-input {
+ width: 100%;
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 28rpx;
+ background: transparent;
+ -webkit-appearance: none;
+ appearance: none;
+ border: none;
+ outline: none;
+}
+
+.region-select-modal .search-clear {
+ position: absolute;
+ right: 30rpx;
+ top: 50%;
+ transform: translateY(-50%);
+ color: #999;
+ font-size: 32rpx;
+ cursor: pointer;
+}
+
+.region-select-modal .region-list {
+ max-height: 60vh;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
+.region-select-modal .region-item {
+ padding: 32rpx 40rpx;
+ border-bottom: 1rpx solid #f0f0f0;
+ font-size: 32rpx;
+ color: #131413;
+ text-align: center;
+ cursor: pointer;
+ transition: background-color 0.2s ease;
+}
+
+.region-select-modal .region-item:hover {
+ background-color: #f5f5f5;
+}
+
+.region-select-modal .region-item.selected {
+ color: #07c160;
+ background-color: #f0f8f3;
}
\ No newline at end of file