diff --git a/App.vue b/App.vue index 84beff36..4d7b6fca 100644 --- a/App.vue +++ b/App.vue @@ -7,10 +7,10 @@ data: { // 基础配置 // 数据接口请求地址 - request_url:'https://d1.shopxo.vip/', + request_url:'http://shopxo.com/', // 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/) - static_url:'https://d1.shopxo.vip/', + static_url:'http://shopxo.com/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', diff --git a/common/js/common/common.js b/common/js/common/common.js index e20cbc5b..ccd293c6 100644 --- a/common/js/common/common.js +++ b/common/js/common/common.js @@ -4,6 +4,11 @@ export const old_radius = { radius: 0, radius_top_left: 0, radius_top_right: 0, export const old_padding = { padding: 0, padding_top: 0, padding_bottom: 0, padding_left: 0, padding_right: 0 }; export const old_margin = { margin: 0, margin_top: 0, margin_bottom: 0, margin_left: 0, margin_right: 0 }; export const old_border_and_box_shadow = { border_is_show: '0', border_color: '#FF3F3F', border_style: 'solid',border_size: { padding: 1, padding_top: 1, padding_right: 1, padding_bottom: 1, padding_left: 1, }, box_shadow_color: '', box_shadow_x: 0, box_shadow_y: 0, box_shadow_blur: 0, box_shadow_spread: 0 }; +export const old_data_style = { color_list: [{ color: 'rgb(244, 252, 255)', color_percentage: undefined }], direction: '180deg', background_img_style: '2', background_img: [], radius: 0, radius_top_left: 0, radius_top_right: 0, radius_bottom_left: 0, radius_bottom_right: 0, padding: 0, padding_top: 0, padding_bottom: 0, padding_left: 0, padding_right: 0, margin: 0, margin_top: 0, margin_bottom: 0, margin_left: 0, margin_right: 0} +// 工具函数:确保变量为数字,否则返回默认值 +export function ensureNumber(value, defaultValue = 0) { + return typeof value === 'number' && !isNaN(value) ? value : defaultValue; +} /** * 判断一个对象是否为空。 diff --git a/pages/diy/components/diy/custom.vue b/pages/diy/components/diy/custom.vue index 5ecd48ba..594ad0da 100644 --- a/pages/diy/components/diy/custom.vue +++ b/pages/diy/components/diy/custom.vue @@ -20,10 +20,10 @@ - + - - + +