diff --git a/components/dynamic-form/FormItemImage.vue b/components/dynamic-form/FormItemImage.vue
index 9bf1f8f..3439c93 100644
--- a/components/dynamic-form/FormItemImage.vue
+++ b/components/dynamic-form/FormItemImage.vue
@@ -1,122 +1,49 @@
-
-
-
-
-
- ×
-
-
-
- +
-
-
-
+
-
-
diff --git a/components/dynamic-form/FormItemVideo.vue b/components/dynamic-form/FormItemVideo.vue
index 7165281..345887d 100644
--- a/components/dynamic-form/FormItemVideo.vue
+++ b/components/dynamic-form/FormItemVideo.vue
@@ -1,50 +1,59 @@
-
-
-
+
+
+
+
×
-
- +
-
diff --git a/components/dynamic-form/dynamic-form.vue b/components/dynamic-form/dynamic-form.vue
index 54a391f..a9390c4 100644
--- a/components/dynamic-form/dynamic-form.vue
+++ b/components/dynamic-form/dynamic-form.vue
@@ -1,89 +1,118 @@
-
-
-
- {{ field.label }}
-
-
-
-
-
-
- {{ field.label }}
-
-
- {{ (formData[field.key] || '').length }}/200
+
+
+
+
+ {{ group.field.label }}
+
+
+
+ {{ group.field.label }}
+
+ {{ group.field.tips }}
+
+ {{ group.field.tip }}
-
-
-
-
- {{ field.label }}
-
- {{ field.tips }}
-
- {{ field.tip }}
+
+
+ {{ group.field.label }}
+ (仅可上传{{ group.field.maxCount || 9 }}个图片)
+
+
+
+
-
-
-
-
-
- {{ field.label }}
- (仅可上传{{ field.maxCount || 9 }}个图片)
+
+
+ {{ group.field.label }}
+ (仅可上传1个视频)
+
+
+
+
-
-
+
+ {{ group.field.label }}
+
-
-
-
-
-
- {{ field.label }}
- (仅可上传1个视频)
+
+
+
+
+ {{ group.sectionTitle }}
-
-
+
+
+ {{ field.label }}
+
+
+
+ {{ field.label }}
+
+
+ {{ (formData[field.key] || "").length }}/200
+
+
+
+ {{ field.label }}
+
+ {{ field.tips }}
+
+ {{ field.tip }}
+
+
+
+ {{ field.label }}
+
+
+
+ {{ field.label }}
+
+
+
+
+
+ {{ field.label }}
+
+
+
+
+
+
+ {{ field.label }}
+ (仅可上传{{ field.maxCount || 9 }}个图片)
+
+
+
+
+
+
+
+ {{ field.label }}
+ (仅可上传1个视频)
+
+
+
+
+
+
+ {{ field.label }}
+
+
-
-
-
- {{ field.label }}
-
-
-
-
-
- {{ field.label }}
-
-
-
-
-
-
-
- {{ field.label }}
-
-
-
-
-
-
-
- {{ field.label }}
-
-
@@ -138,15 +167,13 @@ export default {
handler: function () {
var self = this;
var data = {};
- this.fields.forEach(function (field) {
- if (self.formData[field.key] !== undefined) {
- data[field.key] = self.formData[field.key];
- } else if (field.default_value !== undefined) {
- data[field.key] = field.default_value;
- } else if (field.type === 'multi_select' || field.type === 'image_multi') {
- data[field.key] = [];
- } else {
- data[field.key] = '';
+ this.fields.forEach(function (group) {
+ if (group.type === 'single' && group.field) {
+ self._initFieldData(data, group.field);
+ } else if (group.type === 'section' && group.fields) {
+ group.fields.forEach(function (field) {
+ self._initFieldData(data, field);
+ });
}
});
this.formData = Object.assign({}, this.formData, data);
@@ -155,6 +182,17 @@ export default {
}
},
methods: {
+ _initFieldData: function (data, field) {
+ if (this.formData[field.key] !== undefined) {
+ data[field.key] = this.formData[field.key];
+ } else if (field.default_value !== undefined) {
+ data[field.key] = field.default_value;
+ } else if (field.type === 'multi_select' || field.type === 'image_multi') {
+ data[field.key] = [];
+ } else {
+ data[field.key] = '';
+ }
+ },
onInput: function (key, event) {
var value = event;
if (event && event.target && event.target.value !== undefined) {
@@ -169,15 +207,24 @@ export default {
validate: function () {
var self = this;
for (var i = 0; i < this.fields.length; i++) {
- var field = this.fields[i];
- if (field.is_required === true) {
- var value = self.formData[field.key];
- if (!value || (Array.isArray(value) && value.length === 0)) {
- uni.showToast({
- title: field.label + '不能为空',
- icon: 'none'
- });
- return false;
+ var group = this.fields[i];
+ var fieldsToCheck = [];
+ if (group.type === 'single' && group.field) {
+ fieldsToCheck.push(group.field);
+ } else if (group.type === 'section' && group.fields) {
+ fieldsToCheck = group.fields;
+ }
+ for (var j = 0; j < fieldsToCheck.length; j++) {
+ var field = fieldsToCheck[j];
+ if (field.is_required === true) {
+ var value = self.formData[field.key];
+ if (!value || (Array.isArray(value) && value.length === 0)) {
+ uni.showToast({
+ title: field.label + '不能为空',
+ icon: 'none'
+ });
+ return false;
+ }
}
}
}
@@ -192,7 +239,7 @@ export default {
width: 100%;
}
-.form-section {
+.form-group {
width: 100%;
}
@@ -221,8 +268,8 @@ export default {
.form-tips {
font-size: 24rpx;
- color: #999999;
- margin-left: 10rpx;
+ color: #333333;
+ margin-left: 0;
}
.price-tip {
@@ -272,17 +319,55 @@ export default {
margin-top: 16rpx;
}
-.detail-card {
+.section-card {
background: #ffffff;
border-radius: 20rpx;
- padding: 0 24rpx 8rpx;
+ padding: 0 24rpx 24rpx;
margin-bottom: 24rpx;
box-sizing: border-box;
overflow: hidden;
}
+/* section内字段间距20rpx,通过section-field包装器控制 */
+.section-field + .section-field {
+ padding-top: 12rpx;
+}
+
+/* section内字段去掉独立白色背景和底部间距 */
+.section-card .form-item,
+.section-card .form-item-up {
+ background-color: transparent;
+ padding-left: 0;
+ padding-right: 0;
+ margin-bottom: 0;
+ border-radius: 0;
+}
+
+.section-card .detail-row {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.section-title-bar {
+ padding: 0;
+ margin: 0;
+}
+
+.section-title {
+ padding: 24rpx 0 20rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #333;
+ line-height: 40rpx;
+ display: block;
+}
+
.detail-row {
- padding: 24rpx 0 36rpx;
+ padding: 20rpx 0 0;
+}
+
+.detail-row:first-child {
+ padding-top: 0;
}
.detail-row .form-label {
diff --git a/pages/shop/add-service.vue b/pages/shop/add-service.vue
index 1458dd4..7ff817b 100644
--- a/pages/shop/add-service.vue
+++ b/pages/shop/add-service.vue
@@ -106,12 +106,15 @@ export default {
};
},
onShow() {
- uni.$on("updateGraphicDetails", (data) => {
- this.$set(this.formData, "graphic_details", JSON.stringify(data));
- // 这里可以添加其他处理逻辑
- });
},
onLoad(options) {
+ // 监听图文详情编辑回调(在onLoad注册,确保navigateBack时能收到事件)
+ uni.$on("updateGraphicDetails", (data) => {
+ // 替换整个formData对象引用,确保dynamic-form的watch.value能触发
+ this.formData = Object.assign({}, this.formData, {
+ graphic_details: JSON.stringify(data)
+ });
+ });
this.state = options.state || "";
// 接收分类参数
if (options.first_class_id) {
@@ -130,6 +133,9 @@ export default {
const notShow = uni.getStorageSync('addServiceReminderNotShow');
this.getUserInfo();
},
+ onUnload() {
+ uni.$off("updateGraphicDetails");
+ },
computed: {
showShopPrice() {
return (
@@ -147,39 +153,155 @@ export default {
},
},
methods: {
+ // 字段类型映射:接口类型 -> dynamic-form类型
+ mapFieldType(fieldType) {
+ const typeMap = {
+ 'text': 'text',
+ 'number': 'number',
+ 'image_multi': 'image_multi',
+ 'video': 'video',
+ 'richtext_editor': 'richtext_editor',
+ 'select': 'select',
+ 'single_select': 'single_select',
+ 'multi_select': 'multi_select',
+ 'textarea': 'textarea',
+ };
+ return typeMap[fieldType] || 'text';
+ },
+
+ // 将接口config_data转换为dynamic-form需要的分组格式
+ transformConfigToFields(configData) {
+ const groups = [];
+ let customFieldIndex = 0;
+
+ // 1. 处理presetFields(预设字段)- 每个字段独立一组
+ if (configData.presetFields && Array.isArray(configData.presetFields)) {
+ configData.presetFields.forEach((preset) => {
+ if (!preset.enabled) return;
+
+ const field = {
+ key: preset.key,
+ type: this.mapFieldType(preset.fieldType),
+ label: preset.title,
+ is_required: preset.required,
+ placeholder: preset.placeholder || `请输入${preset.title}`,
+ };
+
+ if (preset.showHint && preset.hint) {
+ field.tip = preset.hint;
+ }
+
+ if (preset.key === 'line_price' || preset.key === 'server_price') {
+ field.tips = '(元)';
+ field.tip = preset.key === 'line_price' ? '服务的基础定价,未参与任何优惠的价格' : '服务参与单品优惠后的价格';
+ } else if (preset.key === 'server_time') {
+ field.placeholder = '请输入服务时长';
+ field.tips = '分钟';
+ }
+
+ if (preset.maxCount) {
+ field.maxCount = preset.maxCount;
+ }
+ if (preset.maxLength && preset.fieldType === 'text') {
+ field.maxLength = preset.maxLength;
+ }
+ if (preset.maxFileSize) {
+ field.maxFileSize = preset.maxFileSize;
+ }
+
+ field._hasOriginalKey = !!preset.key;
+ groups.push({ type: 'single', field });
+ });
+ }
+
+ // 2. 处理sections(区段)- 整个section为一组
+ if (configData.sections && Array.isArray(configData.sections)) {
+ configData.sections.forEach((section) => {
+ const sectionFields = [];
+ if (section.fields && Array.isArray(section.fields)) {
+ section.fields.forEach((sectionField) => {
+ const fieldKey = sectionField.key || `custom_${sectionField.id || customFieldIndex++}`;
+
+ const field = {
+ key: fieldKey,
+ type: this.mapFieldType(sectionField.fieldType),
+ label: sectionField.title,
+ is_required: sectionField.required,
+ placeholder: sectionField.placeholder || `请输入${sectionField.title}`,
+ };
+
+ if (sectionField.key === 'server_time') {
+ field.placeholder = '请输入服务时长';
+ field.tips = '分钟';
+ }
+
+ if (sectionField.options && Array.isArray(sectionField.options) && sectionField.options.length > 0) {
+ field.options = sectionField.options;
+ }
+
+ if (sectionField.maxCount && (sectionField.fieldType === 'multi_select' || sectionField.fieldType === 'image_multi')) {
+ field.maxCount = sectionField.maxCount;
+ }
+
+ if (sectionField.maxLength && (sectionField.fieldType === 'text' || sectionField.fieldType === 'textarea')) {
+ field.maxLength = sectionField.maxLength;
+ }
+
+ if (sectionField.maxLength && sectionField.fieldType === 'number') {
+ field.maxLength = sectionField.maxLength;
+ }
+
+ if (sectionField.maxFileSize) {
+ field.maxFileSize = sectionField.maxFileSize;
+ }
+
+ field._hasOriginalKey = !!sectionField.key;
+ field._original = {
+ id: sectionField.id,
+ sectionId: section.id,
+ sectionType: section.sectionType,
+ userDefined: sectionField.userDefined,
+ };
+
+ sectionFields.push(field);
+ });
+ }
+
+ groups.push({
+ type: 'section',
+ sectionTitle: section.sectionTitle || '',
+ fields: sectionFields,
+ });
+ });
+ }
+
+ return groups;
+ },
+
// 获取服务模板
async getTemplate() {
- // 模拟数据
- const mockFields = [
- { key: 'title', type: 'text', label: '服务名称', is_required: true, placeholder: '请输入服务名称' },
- { key: 'service_price', type: 'number', label: '服务定价', is_required: true, placeholder: '请输入定价,最多两位小数', tips: '(元)', tip: '服务的基础定价,未参与任何优惠的价格' },
- { key: 'sale_price', type: 'number', label: '服务售价', is_required: true, placeholder: '请输入售价,最多两位小数', tips: '(元)', tip: '服务参与单品优惠后的价格' },
- { key: 'service_time', type: 'number', label: '服务时长', is_required: true, placeholder: '请输入服务时间', tips: '(分钟)' },
- { key: 'effect', type: 'textarea', label: '服务功效', is_required: true, placeholder: '请输入服务功效' },
- { key: 'crowd', type: 'textarea', label: '适用人群', is_required: true, placeholder: '请输入不适用人群,例如:未成年人/孕妇不适用' },
- { key: 'product', type: 'textarea', label: '产品清单', is_required: false, placeholder: '请输入产品清单' },
- { key: 'scope', type: 'textarea', label: '适用范围', is_required: false, placeholder: '请输入使用时间/适用人数' },
- { key: 'tips_text', type: 'textarea', label: '温馨提示', is_required: false, placeholder: '请输入其他注意事项' },
- { key: 'images', type: 'image_multi', label: '服务图片', is_required: true, maxCount: 9 },
- { key: 'video', type: 'video', label: '上传短视频', is_required: false },
- { key: 'service_type', type: 'single_select', label: '服务类型', is_required: true, options: ['到店服务', '上门服务'] },
- { key: 'features', type: 'multi_select', label: '服务特色', is_required: false, options: ['一对一服务', '免费咨询', '售后保障'], maxCount: 2 },
- { key: 'graphic_details', type: 'richtext_editor', label: '图文详情', is_required: false },
- ];
try {
const res = await request.post("/sj/servers/getTemplate", {
first_class_id: this.formData.first_class_id,
});
- if (res.data && res.data.fields && res.data.fields.length > 0) {
+ console.log("模板接口返回数据:", res);
+ if (res.data && res.data.config_data) {
+ // 使用接口返回的config_data转换为表单字段
+ // config_data 可能是字符串,需要解析
+ const configData = typeof res.data.config_data === 'string'
+ ? JSON.parse(res.data.config_data)
+ : res.data.config_data;
+ console.log("解析后的config_data:", configData);
+ console.log("presetFields类型:", typeof configData.presetFields, Array.isArray(configData.presetFields));
+ const fields = this.transformConfigToFields(configData);
+ console.log("转换后的fields数组:", fields, "长度:", fields.length);
+ this.formFields = fields;
+ } else if (res.data && res.data.fields && res.data.fields.length > 0) {
+ // 兼容旧格式
this.formFields = res.data.fields;
- } else {
- // 接口返回空数据时使用模拟数据
- this.formFields = mockFields;
}
} catch (e) {
console.error("获取模板失败", e);
- // 接口失败时使用模拟数据
- this.formFields = mockFields;
}
// 初始化表单数据
const initialData = {};
@@ -261,36 +383,35 @@ export default {
},
syncDetailForm() {
- // 将 detailForm 的值映射到 formData 的新字段
- this.formData.efficacy = (this.detailForm.effect || "").trim();
- this.formData.crowd = (this.detailForm.crowd || "").trim();
- this.formData.product = (this.detailForm.product || "").trim();
- this.formData.scope = (this.detailForm.scope || "").trim();
- this.formData.prompt = (this.detailForm.tips || "").trim();
+ // 双向同步:如果formData有值(来自dynamic-form),同步到detailForm;否则从detailForm同步到formData
+ if (this.formData.efficacy) {
+ this.detailForm.effect = this.formData.efficacy;
+ } else {
+ this.formData.efficacy = (this.detailForm.effect || "").trim();
+ }
+ if (this.formData.crowd) {
+ this.detailForm.crowd = this.formData.crowd;
+ } else {
+ this.formData.crowd = (this.detailForm.crowd || "").trim();
+ }
+ if (this.formData.product) {
+ this.detailForm.product = this.formData.product;
+ } else {
+ this.formData.product = (this.detailForm.product || "").trim();
+ }
+ if (this.formData.scope) {
+ this.detailForm.scope = this.formData.scope;
+ } else {
+ this.formData.scope = (this.detailForm.scope || "").trim();
+ }
+ if (this.formData.prompt) {
+ this.detailForm.tips = this.formData.prompt;
+ } else {
+ this.formData.prompt = (this.detailForm.tips || "").trim();
+ }
},
checkDetailForm() {
- if (!this.detailForm.effect || !this.detailForm.effect.trim()) {
- uni.showToast({
- title: "请输入服务功效",
- icon: "none",
- });
- return false;
- }
- if (!this.detailForm.crowd || !this.detailForm.crowd.trim()) {
- uni.showToast({
- title: "请输入适用人群",
- icon: "none",
- });
- return false;
- }
- // if (!this.detailForm.product || !this.detailForm.product.trim()) {
- // uni.showToast({
- // title: "请输入产品清单",
- // icon: "none",
- // });
- // return false;
- // }
return true;
},
@@ -498,103 +619,116 @@ export default {
});
}, 500),
+ // 验证动态表单字段
+ validateDynamicForm() {
+ // 遍历 formGroups(分组结构)按顺序验证必填项
+ for (let i = 0; i < this.formFields.length; i++) {
+ const group = this.formFields[i];
+ const fieldsToCheck = [];
+ if (group.type === 'single' && group.field) {
+ fieldsToCheck.push(group.field);
+ } else if (group.type === 'section' && group.fields) {
+ fieldsToCheck.push(...group.fields);
+ }
+
+ for (let j = 0; j < fieldsToCheck.length; j++) {
+ const field = fieldsToCheck[j];
+ if (!field.is_required) continue;
+
+ const value = this.formData[field.key];
+ const isEmpty = value === undefined || value === null || value === '' ||
+ (Array.isArray(value) && value.length === 0);
+
+ if (isEmpty) {
+ // 根据字段类型显示不同的提示语
+ const prefix = (field.type === 'image_multi' || field.type === 'video') ? '请上传' : '请输入';
+ uni.showToast({
+ title: `${prefix}${field.label}`,
+ icon: "none",
+ });
+ return false;
+ }
+
+ // 服务时长特殊验证
+ if (field.key === 'server_time') {
+ if (value < 10) {
+ uni.showToast({
+ title: "服务时长最短为10分钟",
+ icon: "none",
+ });
+ return false;
+ }
+ if (value > 240) {
+ uni.showToast({
+ title: "服务时长最长为240分钟",
+ icon: "none",
+ });
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ },
+ // 构建提交数据:有key的字段直接作为参数,没有key的字段放入intro数组
+ buildSubmitData() {
+ const submitData = {};
+ const introArr = [];
+
+ // 添加固定字段
+ if (this.formData.id) submitData.id = this.formData.id;
+ if (this.formData.first_class_id) submitData.first_class_id = this.formData.first_class_id;
+ if (this.formData.second_class_id) submitData.second_class_id = this.formData.second_class_id;
+ submitData.server_kind = this.formData.server_kind || getApp().globalData.artisanType;
+
+ // 遍历分组,按顺序处理字段
+ for (let i = 0; i < this.formFields.length; i++) {
+ const group = this.formFields[i];
+ let fieldsToProcess = [];
+ if (group.type === 'single' && group.field) {
+ fieldsToProcess.push(group.field);
+ } else if (group.type === 'section' && group.fields) {
+ fieldsToProcess = group.fields;
+ }
+ for (let j = 0; j < fieldsToProcess.length; j++) {
+ const field = fieldsToProcess[j];
+ const value = this.formData[field.key];
+ if (value === undefined || value === null || value === '') continue;
+ if (Array.isArray(value) && value.length === 0) continue;
+
+ if (field._hasOriginalKey) {
+ // 有key的字段直接作为请求参数
+ submitData[field.key] = value;
+ } else {
+ // 没有key的字段放入intro数组
+ introArr.push({
+ id: field._original ? field._original.id : field.key,
+ title: field.label,
+ value: value,
+ });
+ }
+ }
+ }
+
+ if (introArr.length > 0) {
+ submitData.intro = JSON.stringify(introArr);
+ }
+
+ return submitData;
+ },
+
// 提交表单
submitForm: debounce(function () {
if (this.isAdd) return;
- this.syncDetailForm();
- // 表单验证
- if (!this.formData.title) {
- uni.showToast({
- title: "请输入服务名称",
- icon: "none",
- });
- return;
- }
- if (!this.formData.line_price) {
- uni.showToast({
- title: '请输入服务定价',
- icon: 'none'
- })
- return
- }
- if (!this.formData.server_price) {
- uni.showToast({
- title: '请输入服务售价',
- icon: 'none'
- })
- return
- }
-
- if (!this.formData.server_time) {
- uni.showToast({
- title: "请输入服务时长",
- icon: "none",
- });
- return;
- }
- if (this.formData.server_time < 10) {
- uni.showToast({
- title: "服务时长最短为10分钟",
- icon: "none",
- });
- return;
- }
- if (this.formData.server_time > 240) {
- uni.showToast({
- title: "服务时长最长为240分钟",
- icon: "none",
- });
- return;
- }
- if (!this.formData.sj_see && this.artisanType == 1) {
- uni.showToast({
- title: "请选择是否允许在门店端售卖",
- icon: "none",
- });
- return;
- }
-
- // 检查服务简介
- if (!this.checkDetailForm()) {
- return;
- }
+ // 先同步服务简介数据到formData
this.syncDetailForm();
- // 检查服务流程数组
- if (this.formData.process && this.formData.process.length > 0) {
- for (let item of this.formData.process) {
- if (!item.text) {
- uni.showToast({
- title: "请完善服务流程内容",
- icon: "none",
- });
- return;
- }
- }
- } else {
- uni.showToast({
- title: "请添加服务流程内容",
- icon: "none",
- });
+ // 验证动态表单字段
+ if (!this.validateDynamicForm()) {
return;
}
- // 检查视频和图片
- // if (!this.formData.video) {
- // uni.showToast({
- // title: '请上传服务视频',
- // icon: 'none'
- // })
- // return
- // }
- if (!this.formData.photo || this.formData.photo.length === 0) {
- uni.showToast({
- title: "请上传服务图片",
- icon: "none",
- });
- return;
- }
if (this.artisanType == 2) {
delete this.formData.sj_see;
}
@@ -607,16 +741,8 @@ export default {
url = "/user/serverupdate";
}
console.log(this.formData, '-0-0-0-0-0-');
- delete this.formData.shop_business_time
- delete this.formData.shop_head_photo
- delete this.formData.shop_address
- delete this.formData.shop_dependency
- delete this.formData.shop_class
- delete this.formData.team_buy
-
-
-
- request.post(url, this.formData).then((res) => {
+ const submitData = this.buildSubmitData();
+ request.post(url, submitData).then((res) => {
if (res.state == 1) {
const pages = getCurrentPages();
const prevPage = pages[pages.length - 2]; // 上一个页面
diff --git a/utils/request.js b/utils/request.js
index da106d8..af48dd0 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -120,13 +120,13 @@ const request = async (options, isUpdate) => {
if (process.env.NODE_ENV === "development") {
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
- baseURL = "http://116.63.163.121:93"; // 发布到生产环境时,此处代码会被摇树移除掉。
- //baseURL = 'http://116.63.163.121:96'; // 发布到生产环境时,此处代码会被摇树移除掉。
+ // baseURL = "http://116.63.163.121:93"; // 发布到生产环境时,此处代码会被摇树移除掉。
+ baseURL = "http://116.63.163.121:96"; // 发布到生产环境时,此处代码会被摇树移除掉。
// baseURL = "https://app.mrrweb.com.cn";
} else {
baseURL = url; // 发布到生产环境时,此处代码会被摇树移除掉。
- baseURL = "http://116.63.163.121:93"; // 发布到生产环境时,此处代码会被摇树移除掉。
- //baseURL = 'http://116.63.163.121:96'; // 发布到生产环境时,此处代码会被摇树移除掉。
+ // baseURL = "http://116.63.163.121:93"; // 发布到生产环境时,此处代码会被摇树移除掉。
+ baseURL = "http://116.63.163.121:96"; // 发布到生产环境时,此处代码会被摇树移除掉。
// baseURL = "https://app.mrrweb.com.cn";
console.log("生产环境");