diff --git a/im/.env b/im/.env index d3d57600b..434dd8ade 100644 --- a/im/.env +++ b/im/.env @@ -1,10 +1,37 @@ +# ============================================================================== +# lilishop-im 生产环境默认环境变量配置 +# 执行 npm run build 进行生产打包时,默认会加载此文件中的环境变量 +# 注意:以 VUE_APP_ 开头的变量会被 webpack.DefinePlugin 静态嵌入客户端代码中 +# 变量修改后需要重新构建/运行项目方可生效 +# +# 【协议提示】 +# - 线上生产环境配置了 SSL/HTTPS 证书时,WebSocket 使用 wss:// 协议 +# - 本地开发环境未配置 SSL 证书时,WebSocket 必须使用 ws:// 协议,否则会连接失败 +# ============================================================================== + +# 当前运行环境模式:production (生产环境) NODE_ENV=production + +# 是否开启预览模式 (true: 开启, false: 关闭) VUE_APP_PREVIEW=false + +# IM 服务的 HTTP 接口请求基准地址 (用于登录认证、好友、群组、聊天记录查询等) VUE_APP_API_BASE_URL=https://im-api.pickmall.cn + +# IM 服务的 WebSocket 实时通讯地址 (支持 ws:// 或 wss://,生产环境已配置 SSL 证书使用 wss://;本地无证书环境必须使用 ws://) VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket -VUE_APP_COMMON=https://buyer-api.pickmall.cn + +# 买家端业务接口基准地址 (用于获取买家用户信息、商品信息、订单信息等) VUE_APP_BUYER=https://buyer-api.pickmall.cn -VUE_APP_SELLER=https://store-api.pickmall.cn + +# 商家端业务接口基准地址 (用于获取店铺资料、商家客服相关信息等) +VUE_APP_SELLER=https://admin-api.pickmall.cn + +# IM 网站/系统标题名称 (显示在浏览器标题栏与系统头部) VUE_APP_WEBSITE_NAME="LiLi IM" + +# PC 端商城前台首页及商品详情跳转前缀地址 (点击聊天中的商品卡片时跳转) VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/ -VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/ \ No newline at end of file + +# PC 端商家管理后台跳转前缀地址 (点击聊天中的订单信息时跳转商家端订单页面) +VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/ diff --git a/im/.env.development b/im/.env.development index 980a72a15..e40259255 100644 --- a/im/.env.development +++ b/im/.env.development @@ -1,10 +1,44 @@ +# ============================================================================== +# lilishop-im 本地开发环境配置文件 +# 执行 npm run serve 启动本地开发服务时,会优先加载此文件并覆盖 .env 中的同名变量 +# 注意:以 VUE_APP_ 开头的变量会被 webpack.DefinePlugin 静态嵌入客户端代码中 +# 变量修改后需要重新启动开发服务方可生效 +# +# 【重要提示】 +# 1. 本地联调如果使用本地或局域网服务(如 127.0.0.1 / localhost),WebSocket 必须使用 ws:// 协议! +# 例如: ws://127.0.0.1:8885/lili/webSocket +# 切勿在无 SSL 证书的本地环境下使用 wss://,否则会导致 WebSocket 握手失败、聊天无法连通! +# 2. 只有在线上域名并配置了 SSL/HTTPS 证书的情况下才使用 wss:// 协议。 +# ============================================================================== + +# 当前运行环境模式:development (本地开发环境) NODE_ENV=development + +# 是否开启预览模式 (true: 开启, false: 关闭) VUE_APP_PREVIEW=false + +# IM 服务的 HTTP 接口请求基准地址 +# 线上演示示例: https://im-api.pickmall.cn +# 本地联调示例: http://127.0.0.1:8885 VUE_APP_API_BASE_URL=https://im-api.pickmall.cn + +# IM 服务的 WebSocket 实时通讯地址 +# 【重要提示】本地联调未配置 SSL 证书时务必使用 ws:// 协议,切勿写成 wss://! +# 本地联调推荐配置: ws://127.0.0.1:8885/lili/webSocket +# 线上已配置证书时: wss://im-api.pickmall.cn/lili/webSocket VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket -VUE_APP_COMMON=https://buyer-api.pickmall.cn + +# 买家端业务接口基准地址 (本地联调示例: http://127.0.0.1:8888) VUE_APP_BUYER=https://buyer-api.pickmall.cn -VUE_APP_SELLER=https://store-api.pickmall.cn + +# 商家端业务接口基准地址 (本地联调示例: http://127.0.0.1:8889) +VUE_APP_SELLER=https://admin-api.pickmall.cn + +# IM 网站/系统标题名称 (显示在浏览器标题栏与系统头部) VUE_APP_WEBSITE_NAME="LiLi IM" + +# PC 端商城前台首页及商品详情跳转前缀地址 (点击聊天中的商品卡片时跳转) VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/ -VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/ \ No newline at end of file + +# PC 端商家管理后台跳转前缀地址 (点击聊天中的订单信息时跳转商家端订单页面) +VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/ diff --git a/im/babel.config.js b/im/babel.config.js index bf4102ee8..1d4478aa7 100644 --- a/im/babel.config.js +++ b/im/babel.config.js @@ -1,40 +1,58 @@ +/** + * ============================================================================== + * Babel 转译器配置文件 (babel.config.js) + * ============================================================================== + * + * 主要功能: + * 1. 采用 Vue CLI 官方预设进行现代 JavaScript (ES6+) 向下兼容转译 + * 2. 集成 PrismJS 插件,用于在 IM 聊天对话框中展示富文本代码块时的多语言语法高亮 + */ + module.exports = { + // Vue CLI 官方 Babel 预设,自动包含常用语法转换与 polyfill 支持 presets: ["@vue/cli-plugin-babel/preset"], + plugins: [ + /** + * PrismJS 语法高亮插件配置 + * babel-plugin-prismjs: 按需加载 PrismJS 的语言包和样式主题,优化打包体积 + */ [ "prismjs", { + // 需要按需引入并支持语法高亮的编程/标记语言列表 languages: [ - "html", - "css", - "less", - "javascript", - "typescript", - "json", - "xml", - "bash", - "nginx", - "sql", - "docker", - "php", - "java", - "go", - "python", - "ruby", - "rust", - "objectivec", - "c", - "csharp", - "cpp", - "lua", - "shell", - "vim", - "yaml", - "yml", - "md", - "erlang", - "ini", + "html", // HTML 标记语言 + "css", // CSS 样式表 + "less", // Less 预处理样式 + "javascript", // JavaScript 脚本语言 + "typescript", // TypeScript + "json", // JSON 数据格式 + "xml", // XML 文档 + "bash", // Bash 脚本 + "nginx", // Nginx 服务器配置文件 + "sql", // 数据库 SQL 语句 + "docker", // Dockerfile 配置 + "php", // PHP 语言 + "java", // Java 语言 + "go", // Go 语言 + "python", // Python 语言 + "ruby", // Ruby 语言 + "rust", // Rust 语言 + "objectivec", // Objective-C 语言 + "c", // C 语言 + "csharp", // C# 语言 + "cpp", // C++ 语言 + "lua", // Lua 脚本 + "shell", // Shell 命令行脚本 + "vim", // Vim 配置与脚本 + "yaml", // YAML 配置 + "yml", // YML 配置 + "md", // Markdown 文本 + "erlang", // Erlang 语言 + "ini", // INI 配置文件 ], + // 代码高亮使用的默认主题 (采用深色风格的 okaidia 主题) theme: "okaidia", }, ], diff --git a/im/jsconfig.json b/im/jsconfig.json index 09ea75623..3c969284a 100644 --- a/im/jsconfig.json +++ b/im/jsconfig.json @@ -1,18 +1,28 @@ { - "compilerOptions": { - "target": "es6", - "baseUrl": ".", - "paths": { - "@/*": [ - "src/*" - ] - } - }, - "exclude": [ - "node_modules", - "dist" - ], - "include": [ - "src/**/*" - ] -} \ No newline at end of file + // ============================================================================== + // JavaScript 项目语言服务配置文件 (jsconfig.json) + // 用于指导 VS Code 等 IDE 进行代码跳转、智能提示和路径别名映射解析 + // ============================================================================== + "compilerOptions": { + // 指定编译后的 JavaScript 目标语言版本 + "target": "es6", + // 解析非相对模块名称的基准目录(当前根目录) + "baseUrl": ".", + // 配置模块名到基于 baseUrl 的路径映射(与 vue.config.js 中的 webpack alias 保持一致) + "paths": { + // 将 @/* 映射至 src/*,以便在编辑器中编写 import ... from '@/...' 时支持快捷跳转 + "@/*": [ + "src/*" + ] + } + }, + // 排除在代码智能索引和语法检查之外的目录 + "exclude": [ + "node_modules", + "dist" + ], + // 包含在智能提示与类型检查范围内的源文件匹配规则 + "include": [ + "src/**/*" + ] +} diff --git a/im/src/config/config.js b/im/src/config/config.js index d53961299..01a1cbaf7 100644 --- a/im/src/config/config.js +++ b/im/src/config/config.js @@ -1,30 +1,74 @@ - /** - * 读取公共配置API路径。 - * 工程会读取根目录下的 env 。 - * 根目录下的.env文件是用来定义环境变量的。 - * 它可以包含各种键值对,每个键代表一个环境变量。 - * 这些环境变量可以在应用程序的整个生命周期内使用,例如在代码中访问、配置webpack或在构建部署过程中使用不同的值。 - * env中的 ODE_ENV指定当前的环境。 - * 可以分别创建.env.development、.env.production等文件。 - * 默认.env 文件中的变量作为开发环境的环境变量。 - * env文件修改的话需要重新编译项目。 + * ============================================================================== + * 全局业务配置文件 + * ============================================================================== + * + * 说明: + * 1. 本文件整合并导出了项目运行所需的全局配置参数,统一由环境变量 process.env 读取。 + * 2. 环境变量定义在项目根目录下的 .env(生产)与 .env.development(开发)文件中。 + * 3. 只有以 VUE_APP_ 开头的环境变量才会被 Vue CLI 编译并暴露给前端客户端代码。 + * 4. 修改 .env 或 .env.development 文件后,必须重新启动开发服务或重新打包构建方可生效。 + * + * 核心配置项包含: + * - 站点名称 + * - 后端 IM 服务 API 接口与 WebSocket 实时通讯地址 + * - 买家端/商家端跨系统接口基准地址 + * - PC 端前台商城与商家端管理后台的外链跳转地址 */ export default { - // 网站名称 + /** + * 站点/系统标题名称 + * 用于页面 document.title 设置及系统头部品牌展示 + * 默认值: "LiLi IM" + */ WEBSITE_NAME: process.env.VUE_APP_WEBSITE_NAME || "LiLi IM", - // 默认请求IM的API - BASE_API_URL: process.env.VUE_APP_API_BASE_URL || "", - // 默认请求的WS - BASE_WS_URL: process.env.VUE_APP_WEB_SOCKET_URL || "", - // 默认请求公有接口相关 API - BASE_COMMON: process.env.VUE_APP_COMMON || "", - // 默认请求用户相关API - BASE_BUYER: process.env.VUE_APP_BUYER || "", - // 默认请求卖家相关的API + + /** + * IM 专属后端 HTTP API 接口基准请求地址 + * 用于 Axios 请求实例 (如获取会话历史、发送单聊/群聊富文本、撤回消息、好友列表等) + * 对应环境变量: VUE_APP_API_BASE_URL + */ + BASE_API_URL: process.env.VUE_APP_API_BASE_URL || "", + + /** + * IM 实时通讯 WebSocket 连接基准地址 + * 用于前端与后端建立长连接,实时收发在线聊天消息、输入状态提示、系统通知等 + * + * 【重要提示】协议选用原则: + * - 本地开发/联调环境(无 SSL 证书)必须使用 "ws://" 协议(如 ws://127.0.0.1:8885/lili/webSocket),切勿写成 wss:// 导致握手失败! + * - 生产/线上环境配置了 HTTPS/SSL 证书时,必须使用 "wss://" 协议(如 wss://im-api.pickmall.cn/lili/webSocket) + * + * 对应环境变量: VUE_APP_WEB_SOCKET_URL + */ + BASE_WS_URL: process.env.VUE_APP_WEB_SOCKET_URL || "", + + /** + * 买家端 (Buyer) 接口基准地址 + * 用于在聊天窗口中查询买家用户信息、买家端商品详情、买家订单卡片数据等 + * 对应环境变量: VUE_APP_BUYER + */ + BASE_BUYER: process.env.VUE_APP_BUYER || "", + + /** + * 商家端/卖家端 (Seller) 接口基准地址 + * 用于获取当前店铺信息、客服坐席列表、商家端关联配置等 + * 对应环境变量: VUE_APP_SELLER + */ BASE_SELLER: process.env.VUE_APP_SELLER || "", - // 点击商品跳转到的地址 + + /** + * PC 买家端商城首页/商品详情页面跳转基准前缀 + * 当用户在聊天窗口中点击商品链接或商品卡片时,在新窗口打开对应的商城商品详情页 + * 默认值: "https://pc-b2b2c.pickmall.cn" + * 对应环境变量: VUE_APP_PC_URL + */ PC_URL: process.env.VUE_APP_PC_URL || "https://pc-b2b2c.pickmall.cn", - // 订单跳转商家订单页面 - PC_STORE: process.env.VUE_APP_PC_STORE || 'https://store-b2b2c.pickmall.cn', + + /** + * PC 商家管理后台跳转基准前缀 + * 当客服人员在聊天面板中点击买家咨询的订单卡片时,跳转至商家管理后台对应的订单详情页 + * 默认值: "https://store-b2b2c.pickmall.cn" + * 对应环境变量: VUE_APP_PC_STORE + */ + PC_STORE: process.env.VUE_APP_PC_STORE || "https://store-b2b2c.pickmall.cn", }; diff --git a/im/src/utils/request.js b/im/src/utils/request.js index b07a4b714..9e65224b6 100644 --- a/im/src/utils/request.js +++ b/im/src/utils/request.js @@ -154,7 +154,7 @@ export const del = (url, data = {}, options = {}) => { */ export const upload = (url, data = {}, options = {}) => { return request({ - url: config.BASE_COMMON + url, + url: config.BASE_BUYER + url, method: "post", data: data, ...options, diff --git a/im/vue.config.js b/im/vue.config.js index 8c7b5faa1..b2f6a8746 100644 --- a/im/vue.config.js +++ b/im/vue.config.js @@ -1,58 +1,118 @@ +/** + * ============================================================================== + * Vue CLI 配置文件 (vue.config.js) + * ============================================================================== + * + * 官方文档: https://cli.vuejs.org/zh/config/ + * 主要配置功能: + * 1. 部署子路径与打包输出目录设置 + * 2. 本地开发服务器 (devServer) 端口及代理跨域规则 + * 3. Gzip 打包压缩插件 (CompressionWebpackPlugin) 配置 + * 4. SVG 图标雪碧图 (svg-sprite-loader) 解析 + * 5. 全局 Less 样式变量自动注入 (style-resources-loader) + * 6. 构建优化与 SourceMap 控制 + */ + const path = require('path') -// compression-webpack-plugin,添加压缩文件类型 +// 引入 Gzip 压缩插件,用于生产环境减小打包产物体积,提升加载速度 const CompressionWebpackPlugin = require('compression-webpack-plugin') + +// 需要进行 Gzip 压缩的文件后缀类型 const productionGzipExtensions = ['js', 'css'] + +// 判断当前是否为生产构建环境 const isProd = process.env.NODE_ENV === 'production' +/** + * 路径转换辅助函数:将相对路径转换为绝对路径 + * @param {string} dir 相对 src 或根目录的路径 + * @returns {string} 绝对路径 + */ function resolve(dir) { return path.join(__dirname, dir) } -// vue.config.js const vueConfig = { - // 公共路径(必须有的) + /** + * 部署应用包时的基本 URL (部署路径) + * 默认使用根路径 '/',若部署在二级子目录下(例如 '/im/'),可通过环境变量 VUE_APP_PUBLIC_PATH 指定 + */ publicPath: process.env.VUE_APP_PUBLIC_PATH || '/', - // 输出文件目录 + + /** + * 生产环境构建输出文件的目录名称 (执行 npm run build 后的打包产物目录) + */ outputDir: 'dist', - // 静态资源存放的文件夹(相对于ouputDir) + + /** + * 放置生成的静态资源 (js、css、img、fonts) 的相对于 outputDir 的目录 + */ assetsDir: 'static', + + /** + * 是否使用包含运行时编译器的 Vue 构建版本 + * 设置为 false 可以减少打包体积约 10KB + */ runtimeCompiler: false, + + /** + * 本地开发服务器配置 + */ devServer: { + // 本地开发运行端口号,默认为 8000 port: 8000, + + /** + * 本地开发跨域代理配置 (Proxy) + * 若本地直接请求后端 API 遇到跨域 (CORS) 限制,可在此开启反向代理 + */ // proxy: { - // //配置跨域 // '/api': { - // target: 'http://api.xxxx.com', // 后台接口域名 - // ws: false, //如果要代理 websockets,配置这个参数 - // secure: false, // 如果是https接口,需要配置这个参数 - // changeOrigin: true, //是否跨域 + // target: 'http://127.0.0.1:8885', // 后台 IM 接口域名或 IP + // ws: true, // 是否代理 websockets + // secure: false, // 若为 https 自签名证书接口设为 false + // changeOrigin: true, // 是否允许跨域改变 host 来源 // pathRewrite: { - // '^/api': '/api', + // '^/api': '/api', // 路径重写规则 // }, // }, // }, }, + + /** + * Webpack 原生对象式配置 + */ configureWebpack: { - // webpack plugins + // Webpack 插件列表 plugins: [ - // 配置大文件压缩相关参数 + /** + * 配置 Gzip 压缩插件 + * 对体积大于 10KB 的 JS/CSS 文件生成对应的 .gz 预压缩文件 + * 需配合 Nginx 的 gzip_static on 指令直接下发,减少服务器 CPU 动态压缩消耗 + */ new CompressionWebpackPlugin({ - filename: '[path][base].gz', - algorithm: 'gzip', - test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'), - threshold: 10240, - minRatio: 0.8, + filename: '[path][base].gz', // 压缩后的文件命名规则 + algorithm: 'gzip', // 压缩算法 + test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'), // 匹配要压缩的文件类型 + threshold: 10240, // 仅对超过 10KB 的资源进行压缩 (单位: 字节) + minRatio: 0.8, // 只有压缩率好于 0.8 时才生成压缩文件 }), ], - }, + /** + * Webpack 链式配置 (Chain Webpack),细粒度修改内部 loader 与规则 + */ chainWebpack: config => { + // 1. 配置路径别名:设置 '@' 指向 'src' 目录,便于在代码中快速引入组件和工具库 config.resolve.alias.set('@', resolve('src')) + // 2. 配置内置 svg 规则:排除 src/icons/svg 目录,避免与下面的 svg-sprite-loader 冲突 config.module.rule('svg').exclude.add(resolve('src/icons/svg')).end() + // 3. 配置自定义 svg-icon 规则:将 src/icons/svg 下的 SVG 文件打包为 SVG Sprite 雪碧图 + // 可以在项目中使用 统一渲染矢量图标 config.module .rule('icons') .test(/\.svg$/) @@ -61,35 +121,54 @@ const vueConfig = { .use('svg-sprite-loader') .loader('svg-sprite-loader') .options({ - symbolId: 'icon-[name]', + symbolId: 'icon-[name]', // 生成的 symbol ID 命名规则 }) - }, + + /** + * 第三方插件配置项 + */ pluginOptions: { + // 自动在所有单文件组件中引入 Less 全局变量,无需在每个 .vue 文件手动 @import 'style-resources-loader': { preProcessor: 'less', patterns: [ - //全局加载 less 变量 + // 全局 Less 主题变量文件绝对路径 path.resolve(__dirname, './src/assets/css/variable.less'), ], }, }, + + /** + * CSS 预处理器相关配置 + */ css: { loaderOptions: { less: { lessOptions: { - modifyVars: {}, - javascriptEnabled: true, + modifyVars: {}, // Less 变量覆盖 + javascriptEnabled: true, // 允许 Less 中执行 JavaScript 表达式 (Ant Design / 部分组件库必需) }, }, }, }, - // 是否为生产环境构建生成 source map? + /** + * 是否为生产环境构建生成 Source Map + * 设置为 false 可以大幅加速生产打包速度,并防止源码泄露 + */ productionSourceMap: false, - // lintOnSave: undefined, + + /** + * 是否在保存代码时通过 eslint-loader 执行检查 + * 设置为 false 关闭保存时的编译中断 + */ lintOnSave: false, - // babel-loader no-ignore node_modules/* + + /** + * 默认情况下 babel-loader 会忽略所有 node_modules 中的文件 + * 若依赖库使用了 ES6+ 特性需要被转译,可在此数组中显式配置该依赖名称 + */ transpileDependencies: [], } diff --git a/manager/public/demo/double11/banner-1.png b/manager/public/demo/double11/banner-1.png deleted file mode 100644 index f6b0a2463..000000000 Binary files a/manager/public/demo/double11/banner-1.png and /dev/null differ diff --git a/manager/public/demo/double11/banner-2.png b/manager/public/demo/double11/banner-2.png deleted file mode 100644 index 3ea0c6bfa..000000000 Binary files a/manager/public/demo/double11/banner-2.png and /dev/null differ diff --git a/manager/public/demo/double11/banner-3.png b/manager/public/demo/double11/banner-3.png deleted file mode 100644 index 99c90123c..000000000 Binary files a/manager/public/demo/double11/banner-3.png and /dev/null differ diff --git a/manager/public/demo/double11/banner-4.png b/manager/public/demo/double11/banner-4.png deleted file mode 100644 index ad4c41b91..000000000 Binary files a/manager/public/demo/double11/banner-4.png and /dev/null differ diff --git a/manager/public/demo/double11/cube-left.png b/manager/public/demo/double11/cube-left.png deleted file mode 100644 index f60861bcf..000000000 Binary files a/manager/public/demo/double11/cube-left.png and /dev/null differ diff --git a/manager/public/demo/double11/cube-right-1.png b/manager/public/demo/double11/cube-right-1.png deleted file mode 100644 index bd29544ce..000000000 Binary files a/manager/public/demo/double11/cube-right-1.png and /dev/null differ diff --git a/manager/public/demo/double11/cube-right-2.png b/manager/public/demo/double11/cube-right-2.png deleted file mode 100644 index 9c8516177..000000000 Binary files a/manager/public/demo/double11/cube-right-2.png and /dev/null differ diff --git a/manager/public/demo/double11/logo-1111-fix.png b/manager/public/demo/double11/logo-1111-fix.png deleted file mode 100644 index 4c889eb64..000000000 Binary files a/manager/public/demo/double11/logo-1111-fix.png and /dev/null differ diff --git a/manager/public/demo/double11/logo-1111.png b/manager/public/demo/double11/logo-1111.png deleted file mode 100644 index 84f441ae8..000000000 Binary files a/manager/public/demo/double11/logo-1111.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-1.png b/manager/public/demo/double11/nav-1.png deleted file mode 100644 index 3d60b6cc8..000000000 Binary files a/manager/public/demo/double11/nav-1.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-10.png b/manager/public/demo/double11/nav-10.png deleted file mode 100644 index d8deff9ef..000000000 Binary files a/manager/public/demo/double11/nav-10.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-2.png b/manager/public/demo/double11/nav-2.png deleted file mode 100644 index 1269e8271..000000000 Binary files a/manager/public/demo/double11/nav-2.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-3.png b/manager/public/demo/double11/nav-3.png deleted file mode 100644 index 9664c192b..000000000 Binary files a/manager/public/demo/double11/nav-3.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-4.png b/manager/public/demo/double11/nav-4.png deleted file mode 100644 index becd0d39f..000000000 Binary files a/manager/public/demo/double11/nav-4.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-5.png b/manager/public/demo/double11/nav-5.png deleted file mode 100644 index 03661d575..000000000 Binary files a/manager/public/demo/double11/nav-5.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-6.png b/manager/public/demo/double11/nav-6.png deleted file mode 100644 index 859abd1ad..000000000 Binary files a/manager/public/demo/double11/nav-6.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-7.png b/manager/public/demo/double11/nav-7.png deleted file mode 100644 index da88034fe..000000000 Binary files a/manager/public/demo/double11/nav-7.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-8.png b/manager/public/demo/double11/nav-8.png deleted file mode 100644 index a606f859d..000000000 Binary files a/manager/public/demo/double11/nav-8.png and /dev/null differ diff --git a/manager/public/demo/double11/nav-9.png b/manager/public/demo/double11/nav-9.png deleted file mode 100644 index 29fbcaf76..000000000 Binary files a/manager/public/demo/double11/nav-9.png and /dev/null differ diff --git a/manager/public/demo/double11/notice-1111.png b/manager/public/demo/double11/notice-1111.png deleted file mode 100644 index 43e6adfb7..000000000 Binary files a/manager/public/demo/double11/notice-1111.png and /dev/null differ diff --git a/manager/public/demo/double11/strip-1111.png b/manager/public/demo/double11/strip-1111.png deleted file mode 100644 index d3c4fe339..000000000 Binary files a/manager/public/demo/double11/strip-1111.png and /dev/null differ diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelAdCube.vue b/manager/src/views/page-decoration/wap/config-panel/PanelAdCube.vue index ee56b6f19..642f77d25 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelAdCube.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelAdCube.vue @@ -114,7 +114,7 @@ const DEFAULTS = { paddingTop: 10, paddingBottom: 10, paddingX: 12, - pageGap: 10, + pageGap: 0, contentGap: 0, borderRadius: 0, imgRadius: 0, diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelArticle.vue b/manager/src/views/page-decoration/wap/config-panel/PanelArticle.vue index fcd9dc606..7d13cd33c 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelArticle.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelArticle.vue @@ -98,7 +98,7 @@ const DEFAULTS = { paddingBottom: 10, contentGap: 10, paddingX: 0, - pageGap: 10, + pageGap: 0, borderRadius: 0, }; const DEFAULT_ITEM = { title: "文章列表", categoryId: "", count: 6 }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelBlank.vue b/manager/src/views/page-decoration/wap/config-panel/PanelBlank.vue index 8a27e4d4c..1a8b519c7 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelBlank.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelBlank.vue @@ -37,7 +37,7 @@ const DEFAULTS = { bgColor2: "#f5f5f5", height: 10, paddingX: 0, - pageGap: 10, + pageGap: 0, }; export default { diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelCoupon.vue b/manager/src/views/page-decoration/wap/config-panel/PanelCoupon.vue index b642b581b..cc1e620f0 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelCoupon.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelCoupon.vue @@ -89,7 +89,7 @@ const DEFAULTS = { paddingBottom: 10, contentGap: 5, paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0, }; const DEFAULT_ITEM = { title: "优惠券", count: 5 }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelFlexOne.vue b/manager/src/views/page-decoration/wap/config-panel/PanelFlexOne.vue index d050e91b9..67624d75a 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelFlexOne.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelFlexOne.vue @@ -108,7 +108,7 @@ const DEFAULTS = { paddingTop: 10, paddingBottom: 10, paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0, imgRadius: 0, }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelGoods.vue b/manager/src/views/page-decoration/wap/config-panel/PanelGoods.vue index d19b81267..0bbd4117f 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelGoods.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelGoods.vue @@ -339,7 +339,7 @@ const DEFAULTS = { paddingBottom: 10, paddingX: 12, contentGap: 10, - pageGap: 10, + pageGap: 0, borderRadius: 0, contentRadius: 7, }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelLine.vue b/manager/src/views/page-decoration/wap/config-panel/PanelLine.vue index 1859c7ced..80781e630 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelLine.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelLine.vue @@ -47,7 +47,7 @@ const DEFAULTS = { lineStyle: "dashed", lineHeight: 1, paddingX: 0, - pageGap: 10, + pageGap: 0, }; export default { diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelMenu.vue b/manager/src/views/page-decoration/wap/config-panel/PanelMenu.vue index 81c4b13f4..ad8474e27 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelMenu.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelMenu.vue @@ -179,7 +179,7 @@ const DEFAULTS = { paddingBottom: 10, paddingX: 12, contentGap: 10, - pageGap: 10, + pageGap: 0, borderRadius: 0, imgRadius: 30, }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelNotice.vue b/manager/src/views/page-decoration/wap/config-panel/PanelNotice.vue index 905bb849e..58a7439e1 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelNotice.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelNotice.vue @@ -164,7 +164,7 @@ const DEFAULTS = { paddingTop: 0, paddingBottom: 0, paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0, itemColor: "#333333", }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelPromotion.vue b/manager/src/views/page-decoration/wap/config-panel/PanelPromotion.vue index b0acb264d..608c5b432 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelPromotion.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelPromotion.vue @@ -231,7 +231,7 @@ const DEFAULTS = { paddingBottom: 10, contentGap: 10, paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0, imgRadius: 10, showGoodsName: true, diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelRichText.vue b/manager/src/views/page-decoration/wap/config-panel/PanelRichText.vue index 8948916d0..4612b14bb 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelRichText.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelRichText.vue @@ -58,7 +58,7 @@ const DEFAULTS = { bgColor1: "#FFFFFF", bgColor2: "#FFFFFF", paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0, }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelShop.vue b/manager/src/views/page-decoration/wap/config-panel/PanelShop.vue index a6127e1e0..d5cc6104f 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelShop.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelShop.vue @@ -228,7 +228,7 @@ const DEFAULTS = { paddingTop: 10, paddingBottom: 10, paddingX: 0, - pageGap: 10, + pageGap: 0, borderRadius: 0, imgRadius: 7, }; diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelTitle.vue b/manager/src/views/page-decoration/wap/config-panel/PanelTitle.vue index cdcbec055..876594bb4 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelTitle.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelTitle.vue @@ -157,7 +157,7 @@ const DEFAULTS = { paddingTop: 10, paddingBottom: 10, paddingX: 12, - pageGap: 10, + pageGap: 0, radiusTop: 0, radiusBottom: 0, color: "#282828", diff --git a/manager/src/views/page-decoration/wap/config-panel/PanelVideo.vue b/manager/src/views/page-decoration/wap/config-panel/PanelVideo.vue index 3c7d6e5c3..d76b553c4 100644 --- a/manager/src/views/page-decoration/wap/config-panel/PanelVideo.vue +++ b/manager/src/views/page-decoration/wap/config-panel/PanelVideo.vue @@ -115,7 +115,7 @@ const DEFAULTS = { paddingTop: 10, paddingBottom: 10, paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0, imgRadius: 0, }; diff --git a/manager/src/views/page-decoration/wap/config.js b/manager/src/views/page-decoration/wap/config.js index 2774a91c2..9d3bbb4b1 100644 --- a/manager/src/views/page-decoration/wap/config.js +++ b/manager/src/views/page-decoration/wap/config.js @@ -851,7 +851,7 @@ export const modelData = [ bgColor: "#f5f5f5", height: 10, paddingX: 0, - pageGap: 10 + pageGap: 0 } }, { @@ -866,7 +866,7 @@ export const modelData = [ lineStyle: "dashed", lineHeight: 1, paddingX: 0, - pageGap: 10 + pageGap: 0 } }, { @@ -879,7 +879,7 @@ export const modelData = [ content: "", bgColor: "#FFFFFF", paddingX: 12, - pageGap: 10, + pageGap: 0, borderRadius: 0 } }, @@ -988,7 +988,7 @@ export const modelData = [ list: [{ title: "文章列表", categoryId: "", count: 3 }], bgColor: "#FFFFFF", paddingX: 0, - pageGap: 10, + pageGap: 0, borderRadius: 0 } }, @@ -1002,7 +1002,7 @@ export const modelData = [ list: [{ title: "店铺列表", count: 4 }], bgColor: "#FFFFFF", paddingX: 0, - pageGap: 10, + pageGap: 0, borderRadius: 0 } }, @@ -1044,7 +1044,7 @@ export const modelData = [ paddingBottom: 10, paddingX: 12, contentGap: 10, - pageGap: 10, + pageGap: 0, borderRadius: 0, contentRadius: 7 } diff --git a/manager/src/views/page-decoration/wap/navbar.vue b/manager/src/views/page-decoration/wap/navbar.vue index e88506943..3772b3cfa 100644 --- a/manager/src/views/page-decoration/wap/navbar.vue +++ b/manager/src/views/page-decoration/wap/navbar.vue @@ -34,12 +34,13 @@ 保存页面
@@ -56,7 +57,7 @@
将当前装修内容写入到本地缓存中,下次进入页面时可继续使用 - 写入 + 写入
保存 @@ -84,7 +85,7 @@ const appStore = useAppStore(); const hasCache = ref(false); // 是否有缓存 const progress = ref(true); // 展示进度 -const num = ref(20); // 提交进度 +const num = ref(0); // 提交进度 const saveDialog = ref(false); // 加载状态 const way = ref([ // 装修tab栏切换 @@ -119,10 +120,17 @@ function startEditName() { const submitWay = reactive({ // 表单信息 - pageShow: route.query.type || false, + pageShow: route.query.type === "true" || route.query.type === true || route.query.type === "OPEN", pageClientType: "H5" }); +watch( + () => route.query.type, + (val) => { + submitWay.pageShow = val === "true" || val === true || val === "OPEN"; + } +); + // 模板名称与「页面设置」面板共用 store 中的同一份数据,双向同步 const pageName = computed({ get() { @@ -191,9 +199,16 @@ function clickBtn(val) { * 加载,并保存模板 */ function handleSpinShow() { + progress.value = true; + num.value = 0; saveDialog.value = true; } +function handleDialogClosed() { + progress.value = true; + num.value = 0; +} + // 填写是否发布,模板名称之后保存 function save() { // 楼层装修页面(非开屏/弹窗广告)需校验页面设置的必填项 @@ -220,49 +235,57 @@ function save() { return false; } - submitWay?.pageShow === true - ? (submitWay.pageShow = "OPEN") - : (submitWay.pageShow = "CLOSE"); - - submitWay.name = pageName.value; - submitWay.pageData = JSON.stringify(appStore.styleStore); - submitWay.pageType = "INDEX"; - submitWay.pageType = route.query.pagetype || "INDEX"; - // submitWay.pageType = props.pagetype; + const payload = { + ...submitWay, + pageShow: submitWay.pageShow ? "OPEN" : "CLOSE", + name: pageName.value, + pageData: JSON.stringify(appStore.styleStore), + pageType: route.query.pagetype || "INDEX", + }; if (route.query.pagetype == 'ALERT' || route.query.pagetype == 'OPEN_SCREEN_ANIMATION') { - update(submitWay); + update(payload); } else { - route.query.id ? updateHome() : submit(submitWay); + route.query.id ? updateHome(payload) : submit(payload); } - - // route.query.id ? update() : submit(submitWay); } // 更新 -function updateHome() { +function updateHome(payload) { progress.value = false; - API_Other.updateHome(route.query.id, { + num.value = 20; + const data = payload || { pageData: JSON.stringify(appStore.styleStore), name: pageName.value, - pageShow: submitWay.pageShow, - pageType: submitWay.pageType, + pageShow: submitWay.pageShow ? "OPEN" : "CLOSE", + pageType: submitWay.pageType || route.query.pagetype || "INDEX", pageClientType: "H5", - }) + }; + API_Other.updateHome(route.query.id, data) .then(res => { - num.value = 50; + num.value = 60; if (res.success) { - num.value = 80; + num.value = 100; /**制作保存成功动画¸ */ setTimeout(() => { saveDialog.value = false; + progress.value = true; + num.value = 0; Message.success("修改成功"); goBack(); - }, 1000); + }, 800); } else { + progress.value = true; + num.value = 0; saveDialog.value = false; Message.error("修改失败,请稍后重试"); } + }) + .catch(() => { + progress.value = true; + num.value = 0; + saveDialog.value = false; + Message.error("修改失败,请稍后重试"); }); } @@ -274,6 +297,7 @@ function update(submitWay) { return false; } progress.value = false; + num.value = 20; let id = route.query.id; const pagetype = route.query.pagetype; @@ -283,29 +307,40 @@ function update(submitWay) { OPEN_SCREEN_ANIMATION: "OPEN_SCREEN_ANIMATION", }[pagetype ? pagetype : "INDEX"]; + const payload = { ...submitWay }; if (pagetype) { - submitWay.pageData = JSON.stringify( + payload.pageData = JSON.stringify( appStore.openStyleStore[0] ); - submitWay.pageType = pageType; + payload.pageType = pageType; id = appStore.openStoreId; } - API_Other.updateHome(id, submitWay) + API_Other.updateHome(id, payload) .then((res) => { - num.value = 50; + num.value = 60; if (res.success) { - num.value = 80; + num.value = 100; /**制作保存成功动画¸ */ setTimeout(() => { saveDialog.value = false; + progress.value = true; + num.value = 0; Message.success("修改成功"); goBack(); - }, 1000); + }, 800); } else { + progress.value = true; + num.value = 0; saveDialog.value = false; Message.error("修改失败,请稍后重试"); } + }) + .catch(() => { + progress.value = true; + num.value = 0; + saveDialog.value = false; + Message.error("修改失败,请稍后重试"); }); } @@ -313,28 +348,42 @@ function update(submitWay) { // 返回查询数据页面 function goBack() { - router.go(-1); + if (window.history.state?.back) { + router.go(-1); + } else { + window.close(); + } } // 保存 function submit(submitWay) { progress.value = false; + num.value = 20; API_Other.setHomeSetup(submitWay) .then(res => { - num.value = 50; + num.value = 60; if (res.success) { - num.value = 80; + num.value = 100; /**制作保存成功动画¸ */ setTimeout(() => { saveDialog.value = false; + progress.value = true; + num.value = 0; Message.success("保存成功"); goBack(); - }, 1000); + }, 800); } else { progress.value = true; + num.value = 0; saveDialog.value = false; Message.error("保存失败,请稍后重试"); } + }) + .catch(() => { + progress.value = true; + num.value = 0; + saveDialog.value = false; + Message.error("保存失败,请稍后重试"); }); } diff --git a/manager/src/views/page-decoration/wap/template/tpl.scss b/manager/src/views/page-decoration/wap/template/tpl.scss index 638dd1cc1..7a2ad958e 100644 --- a/manager/src/views/page-decoration/wap/template/tpl.scss +++ b/manager/src/views/page-decoration/wap/template/tpl.scss @@ -6,7 +6,7 @@ } .layout { padding: 8px; - margin: 4px 0; + margin: 0; background: #fff; } .layout, diff --git a/manager/src/views/page-decoration/wap/template/tpl_article.vue b/manager/src/views/page-decoration/wap/template/tpl_article.vue index 0a012c07e..94b1306a1 100644 --- a/manager/src/views/page-decoration/wap/template/tpl_article.vue +++ b/manager/src/views/page-decoration/wap/template/tpl_article.vue @@ -58,7 +58,7 @@ export default { return { background: this.res.bgColor || "#FFFFFF", padding: `10px ${this.res.paddingX || 0}px`, - marginBottom: `${this.res.pageGap !== undefined ? this.res.pageGap : 10}px`, + marginBottom: `${this.res.pageGap !== undefined ? this.res.pageGap : 0}px`, borderRadius: `${this.res.borderRadius || 0}px`, overflow: "hidden", }; diff --git a/manager/src/views/page-decoration/wap/template/tpl_blank.vue b/manager/src/views/page-decoration/wap/template/tpl_blank.vue index ba918ce58..4d2d7aff5 100644 --- a/manager/src/views/page-decoration/wap/template/tpl_blank.vue +++ b/manager/src/views/page-decoration/wap/template/tpl_blank.vue @@ -4,7 +4,7 @@ :style="{ background: blankBg, height: px(res.height ?? 10), - margin: `0 ${px(res.paddingX ?? 0)} ${px(res.pageGap ?? 10)}`, + margin: `0 ${px(res.paddingX ?? 0)} ${px(res.pageGap ?? 0)}`, }" >
diff --git a/manager/src/views/page-decoration/wap/template/tpl_coupon.vue b/manager/src/views/page-decoration/wap/template/tpl_coupon.vue index 4ca6a2811..14d7645a4 100644 --- a/manager/src/views/page-decoration/wap/template/tpl_coupon.vue +++ b/manager/src/views/page-decoration/wap/template/tpl_coupon.vue @@ -145,7 +145,7 @@ export default { return { background: this.res.bgColor || "#FFFFFF", padding: `10px ${this.res.paddingX || 0}px`, - marginBottom: `${this.res.pageGap !== undefined ? this.res.pageGap : 10}px`, + marginBottom: `${this.res.pageGap !== undefined ? this.res.pageGap : 0}px`, borderRadius: `${this.res.borderRadius || 0}px`, overflow: "hidden", }; diff --git a/manager/src/views/page-decoration/wap/template/tpl_integral.vue b/manager/src/views/page-decoration/wap/template/tpl_integral.vue index 6892a271a..052eaca19 100644 --- a/manager/src/views/page-decoration/wap/template/tpl_integral.vue +++ b/manager/src/views/page-decoration/wap/template/tpl_integral.vue @@ -9,11 +9,11 @@ />
{{ title }}
-
更多 >
+
更多 >
-
+
+ + diff --git a/manager/src/views/sys/setting-manage/setting/VERIFICATION_SETTING.vue b/manager/src/views/sys/setting-manage/setting/VERIFICATION_SETTING.vue new file mode 100644 index 000000000..8fed1c939 --- /dev/null +++ b/manager/src/views/sys/setting-manage/setting/VERIFICATION_SETTING.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/manager/src/views/sys/setting-manage/settingManage.vue b/manager/src/views/sys/setting-manage/settingManage.vue index e01c12359..c878b0163 100644 --- a/manager/src/views/sys/setting-manage/settingManage.vue +++ b/manager/src/views/sys/setting-manage/settingManage.vue @@ -75,6 +75,14 @@ const setting = ref([ type: "LIVE_SETTING", name: "直播设置", }, + { + type: "VERIFICATION_SETTING", + name: "验证码设置", + }, + { + type: "SECURITY_SETTING", + name: "安全设置", + }, ]); const authLogin = ref([ // 登录设置 diff --git a/manager/src/views/sys/setting-manage/template.js b/manager/src/views/sys/setting-manage/template.js index 6312741e7..b71a3db98 100644 --- a/manager/src/views/sys/setting-manage/template.js +++ b/manager/src/views/sys/setting-manage/template.js @@ -9,6 +9,8 @@ import SMS_SETTING from "./setting/SMS_SETTING"; import IM_SETTING from "./setting/IM_SETTING"; import LIVE_SETTING from "./setting/LIVE_SETTING"; import WITHDRAWAL_SETTING from "./setting/WITHDRAWAL_SETTING"; +import VERIFICATION_SETTING from "./setting/VERIFICATION_SETTING"; +import SECURITY_SETTING from "./setting/SECURITY_SETTING"; import ALIPAY_PAYMENT from "./pay/ALIPAY_PAYMENT"; import WECHAT_PAYMENT from "./pay/WECHAT_PAYMENT"; import PAYMENT_SUPPORT from "./pay/PAYMENT_SUPPORT"; @@ -27,6 +29,8 @@ export default { IM_SETTING: markRaw(IM_SETTING), LIVE_SETTING: markRaw(LIVE_SETTING), WITHDRAWAL_SETTING: markRaw(WITHDRAWAL_SETTING), + VERIFICATION_SETTING: markRaw(VERIFICATION_SETTING), + SECURITY_SETTING: markRaw(SECURITY_SETTING), PAYMENT_SUPPORT: markRaw(PAYMENT_SUPPORT), WECHAT_PAYMENT: markRaw(WECHAT_PAYMENT), ALIPAY_PAYMENT: markRaw(ALIPAY_PAYMENT), diff --git a/seller/src/views/shop/wap/config-panel/PanelAdCube.vue b/seller/src/views/shop/wap/config-panel/PanelAdCube.vue new file mode 100644 index 000000000..5b62babb7 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelAdCube.vue @@ -0,0 +1,350 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelBlank.vue b/seller/src/views/shop/wap/config-panel/PanelBlank.vue new file mode 100644 index 000000000..1a8b519c7 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelBlank.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelCarousel.vue b/seller/src/views/shop/wap/config-panel/PanelCarousel.vue new file mode 100644 index 000000000..06d5d6aa2 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelCarousel.vue @@ -0,0 +1,461 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelCoupon.vue b/seller/src/views/shop/wap/config-panel/PanelCoupon.vue new file mode 100644 index 000000000..cc1e620f0 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelCoupon.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelFlexOne.vue b/seller/src/views/shop/wap/config-panel/PanelFlexOne.vue new file mode 100644 index 000000000..a2e752a17 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelFlexOne.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelGoods.vue b/seller/src/views/shop/wap/config-panel/PanelGoods.vue new file mode 100644 index 000000000..f8f3fbc8a --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelGoods.vue @@ -0,0 +1,619 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelLine.vue b/seller/src/views/shop/wap/config-panel/PanelLine.vue new file mode 100644 index 000000000..80781e630 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelLine.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelNotice.vue b/seller/src/views/shop/wap/config-panel/PanelNotice.vue new file mode 100644 index 000000000..80eb53aae --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelNotice.vue @@ -0,0 +1,427 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelPageSetting.vue b/seller/src/views/shop/wap/config-panel/PanelPageSetting.vue new file mode 100644 index 000000000..5f3169092 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelPageSetting.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelRichText.vue b/seller/src/views/shop/wap/config-panel/PanelRichText.vue new file mode 100644 index 000000000..f07886f5a --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelRichText.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelSearch.vue b/seller/src/views/shop/wap/config-panel/PanelSearch.vue new file mode 100644 index 000000000..32a061d6d --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelSearch.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelTitle.vue b/seller/src/views/shop/wap/config-panel/PanelTitle.vue new file mode 100644 index 000000000..082762b41 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelTitle.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/PanelVideo.vue b/seller/src/views/shop/wap/config-panel/PanelVideo.vue new file mode 100644 index 000000000..d76b553c4 --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/PanelVideo.vue @@ -0,0 +1,300 @@ + + + + + diff --git a/seller/src/views/shop/wap/config-panel/index.js b/seller/src/views/shop/wap/config-panel/index.js new file mode 100644 index 000000000..5354d161b --- /dev/null +++ b/seller/src/views/shop/wap/config-panel/index.js @@ -0,0 +1,43 @@ +// 店铺端组件配置面板映射:type → 面板组件 +// 面板契约:props res(整个楼层条目),直接修改 res.options.*,保存链路自动感知 +import PanelBlank from "./PanelBlank.vue"; +import PanelLine from "./PanelLine.vue"; +import PanelRichText from "./PanelRichText.vue"; +import PanelCoupon from "./PanelCoupon.vue"; +import PanelFlexOne from "./PanelFlexOne.vue"; +import PanelCarousel from "./PanelCarousel.vue"; +import PanelAdCube from "./PanelAdCube.vue"; +import PanelSearch from "./PanelSearch.vue"; +import PanelNotice from "./PanelNotice.vue"; +import PanelVideo from "./PanelVideo.vue"; +import PanelTitle from "./PanelTitle.vue"; +import PanelGoods from "./PanelGoods.vue"; + +// 图片魔方及其全部可选风格共用 PanelAdCube +const adCubeTypes = [ + "tpl_ad_list", + "leftOneRightTwo", + "leftTwoRightOne", + "flexThree", + "flexTwo", + "topOneBottomTwo", + "topTwoBottomOne", + "flexFive", + "flexFour", + "textPicture", +]; + +export default { + blank: PanelBlank, + line: PanelLine, + richText: PanelRichText, + coupon: PanelCoupon, + flexOne: PanelFlexOne, + carousel: PanelCarousel, + search: PanelSearch, + notice: PanelNotice, + video: PanelVideo, + title: PanelTitle, + goods: PanelGoods, + ...Object.fromEntries(adCubeTypes.map((t) => [t, PanelAdCube])), +}; diff --git a/seller/src/views/shop/wap/config.js b/seller/src/views/shop/wap/config.js index 740d946f2..23f50cc77 100644 --- a/seller/src/views/shop/wap/config.js +++ b/seller/src/views/shop/wap/config.js @@ -1,3 +1,12 @@ +/** + * 店铺端楼层装修组件清单配置 + * drawer: true 广告右侧打开抽屉中显示 + * notAdd: true 没有添加按钮 + * notLink: true 没有链接功能 + * notImg: true 没有选择图片功能 + * close: true 右侧关闭按钮 + * group: 'base' | 'marketing' | 'tools' 组件面板分组(无 group 的条目不在面板显示,仅供抽屉使用) + */ import * as API_Other from "@/api/other"; // 获取楼层装修信息 @@ -9,581 +18,637 @@ export function initData(id) { export let homeData = {}; -/** - * drawer:true 广告右侧打开抽屉中显示 - * ad_drawer:true 活动魔方右侧显示 - * notAdd: true 没有添加按钮 - * notLink: true 没有连接功能 - * notImg: true 没有选择图片功能 - * close:true 右侧关闭按钮 - */ - export const modelData = [ { - type: "flexOne", - name: "图片", - notAdd: true, - onlyImg: true, - img: "md-image", - options: { - list: [ + "type": "flexOne", + "name": "热区", + "icon": "Picture", + "group": "base", + "notAdd": true, + "onlyImg": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2020/12/05/8wSNWbnqujDh6HL.png", - url: "", - link: "", - size: "750*280", - model: "link" + "img": "https://i.loli.net/2020/12/05/8wSNWbnqujDh6HL.png", + "url": "", + "link": "", + "size": "750*280", + "model": "hotzone" } ] } }, { - type: "carousel", - name: "图片轮播", - img: "md-image", - notTitle: false, - close: true, - options: { - list: [ + "type": "carousel", + "name": "轮播图", + "icon": "PictureFilled", + "group": "base", + "img": "md-image", + "notTitle": false, + "close": true, + "options": { + "list": [ { - img: "https://i.loli.net/2020/12/05/fKH4CwImpbuD5Xj.png", - url: "", - link: "", - size: "750*350" + "img": "https://i.loli.net/2020/12/05/fKH4CwImpbuD5Xj.png", + "url": "", + "link": "", + "size": "750*350", + "model": "link" }, { - img: "https://i.loli.net/2020/12/05/12kleCgrSLfKoQs.png", - url: "", - link: "", - size: "750*350" + "img": "https://i.loli.net/2020/12/05/12kleCgrSLfKoQs.png", + "url": "", + "link": "", + "size": "750*350", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/ZlzcCdnpejtN9gL.png", - url: "", - link: "", - size: "750*350" + "img": "https://i.loli.net/2021/05/14/ZlzcCdnpejtN9gL.png", + "url": "", + "link": "", + "size": "750*350", + "model": "link" } ] } }, { - type: "leftOneRightTwo", - name: "左一右二", - notAdd: true, - drawer: true, - view: "tpl_ad_list", - img: "md-image", - options: { - list: [ + "type": "leftOneRightTwo", + "name": "左一右二", + "notAdd": true, + "drawer": true, + "view": "tpl_ad_list", + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*335" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*335", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/kdB3AE9ay4c1SnN.png", - url: "", - link: "", - size: "335*177" + "img": "https://i.loli.net/2021/05/14/kdB3AE9ay4c1SnN.png", + "url": "", + "link": "", + "size": "335*177", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/FmDr9ksiXeEqYLU.png", - url: "", - link: "", - size: "335*177" + "img": "https://i.loli.net/2021/05/14/FmDr9ksiXeEqYLU.png", + "url": "", + "link": "", + "size": "335*177", + "model": "link" } ] } }, { - type: "title", - name: "标题栏", - img: "md-image", - notAdd: true, - notLink: true, - notImg: true, - options: { - list: [ + "type": "title", + "name": "标题栏", + "icon": "Collection", + "group": "tools", + "img": "md-image", + "notAdd": true, + "notImg": true, + "options": { + "list": [ { - title: "标题", - color: "#000000" + "title": "标题", + "color": "#282828", + "title1": "副标题", + "color1": "#999999", + "bk_color": "#FFFFFF", + "textAlign": "left", + "link": "", + "url": "", + "model": "link" } ] } }, { - type: "leftTwoRightOne", - name: "左二右一", - notAdd: true, - drawer: true, - - img: "md-image", - options: { - list: [ + "type": "leftTwoRightOne", + "name": "左二右一", + "notAdd": true, + "drawer": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/kdB3AE9ay4c1SnN.png", - url: "", - link: "", - size: "335*177" + "img": "https://i.loli.net/2021/05/14/kdB3AE9ay4c1SnN.png", + "url": "", + "link": "", + "size": "335*177", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/FmDr9ksiXeEqYLU.png", - url: "", - link: "", - size: "335*177" + "img": "https://i.loli.net/2021/05/14/FmDr9ksiXeEqYLU.png", + "url": "", + "link": "", + "size": "335*177", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*335" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*335", + "model": "link" } ] } }, { - type: "flexThree", - name: "三列单行", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "flexThree", + "name": "三列单行", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "226*226 (1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "226*226 (1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "226*226 (1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "226*226 (1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "226*226 (1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "226*226 (1:1)", + "model": "link" } ] } }, { - type: "flexOne", - name: "一张大图", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "flexTwo", + "name": "两张横图", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2020/12/05/8wSNWbnqujDh6HL.png", - url: "", - link: "", - size: "750*280" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*220", + "model": "link" + }, + { + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*220", + "model": "link" } ] } }, { - type: "flexTwo", - name: "两张横图", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "topOneBottomTwo", + "name": "上一下二", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*220" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "710*170", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*220" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*170", + "model": "link" + }, + { + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*170", + "model": "link" } ] } }, { - type: "topOneBottomTwo", - name: "上一下二", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "topTwoBottomOne", + "name": "上二下一", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "710*170" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*170", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*170" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "335*170", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*170" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "710*170", + "model": "link" } ] } }, { - type: "topTwoBottomOne", - name: "上二下一", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "flexFive", + "name": "五列单行", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - - size: "335*170" + "img": "https://picsum.photos/id/127/200/200", + "url": "", + "link": "", + "size": "75*75(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "335*170" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "75*75(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "710*170" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "75*75(1:1)", + "model": "link" + }, + { + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "75*75(1:1)", + "model": "link" + }, + { + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "75*75(1:1)", + "model": "link" } ] } }, { - type: "flexFive", - name: "五列单行", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "flexFour", + "name": "四列单行", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://picsum.photos/id/127/200/200", - url: "", - link: "", - size: "75*75(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "88*88(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "75*75(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "88*88(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "75*75(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "88*88(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "75*75(1:1)" - }, - { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "75*75(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "size": "88*88(1:1)", + "model": "link" } ] } }, { - type: "flexFour", - name: "四列单行", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "textPicture", + "name": "文字图片", + "icon": "Document", + "group": "base", + "drawer": true, + "notAdd": true, + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "88*88(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "title": "文字", + "size": "88*88(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "88*88(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "title": "文字", + "size": "88*88(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "88*88(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "title": "文字", + "size": "88*88(1:1)", + "model": "link" }, { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - size: "88*88(1:1)" + "img": "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", + "url": "", + "link": "", + "title": "文字", + "size": "88*88(1:1)", + "model": "link" } ] } }, { - type: "textPicture", - name: "文字图片", - drawer: true, - notAdd: true, - - img: "md-image", - options: { - list: [ + "type": "tpl_ad_list", + "name": "图片魔方", + "icon": "Grid", + "group": "base", + "img": "md-image", + "options": { + "list": [ { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - title: "文字", - size: "88*88(1:1)" - }, - { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - title: "文字", - size: "88*88(1:1)" - }, - { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - title: "文字", - size: "88*88(1:1)" - }, - { - img: "https://i.loli.net/2021/05/14/dtNvI5UxchXn8gz.png", - url: "", - link: "", - title: "文字", - size: "88*88(1:1)" - } - ] - } - }, - - { - type: "tpl_ad_list", - name: "广告魔方", - img: "md-image", - options: { - list: [ - { - bg_img: "", - name: "", - url: "" + "bg_img": "", + "name": "", + "url": "" } ] } }, { - type: "menu", - name: "宫格导航", - img: "md-image", - close: true, - options: { - list: [ + "type": "search", + "name": "搜索", + "icon": "Search", + "group": "base", + "img": "md-image", + "notAdd": true, + "notLink": true, + "notImg": true, + "options": { + "list": [ { - img: "https://i.loli.net/2020/12/05/SoGAv7gYybuWzED.png", - url: "", - link: "", - title: "标题", - size: "88*88 (1:1)" - }, - { - img: "https://i.loli.net/2020/12/05/JXR5K3sbIeENjqH.png", - url: "", - link: "", - title: "标题", - size: "88*88 (1:1)" - }, - { - img: "https://i.loli.net/2020/12/05/KlZfnCFIdEV231Y.png", - url: "", - link: "", - title: "标题", - size: "88*88 (1:1)" - }, - { - img: "https://i.loli.net/2020/12/05/GfmMyN2wrUVIlci.png", - url: "", - link: "", - title: "标题", - size: "88*88 (1:1)" - }, - { - img: "https://i.loli.net/2020/12/05/eznDa3iNby5FkYL.png", - url: "", - link: "", - title: "标题", - size: "88*88 (1:1)" + "title": "搜索" } ] } }, - // { - // type: "search", - // name: "搜索", - // img: "md-image", - // notAdd: true, - // notLink: true, - // notImg: true, - // options: { - // list: [ - // { - // title: "搜索" - // } - // ] - // } - // }, { - type: "goods", - name: "商品分类", - img: "md-image", - notAdd: true, - notLink: true, - notImg: true, - options: { - list: [ + "type": "notice", + "name": "公告", + "icon": "Bell", + "group": "base", + "img": "md-image", + "notAdd": false, + "notLink": true, + "notImg": true, + "options": { + "list": [ { - /** - * 2021/12/9 - * 新增索引(‘index’)判断商品归属分类 - * 之前代码没有配置index也不会收到印象 - * 新建的楼层将采用索引判断分类 - */ - titleWay: [ + "title": [ { - title: "精选", - desc: "电子推荐", - ___index:0, - }, - { - title: "实惠", - desc: "便宜好货", - ___index:1, - }, - { - title: "进口", - desc: "国际自营", - ___index:2, - }, - { - title: "推荐", - desc: "喂奶推荐", - ___index:3, + "context": "这是一条公告" } ], - listWay: [ + "color": "#666", + "bk_color": "#FFF", + "direction": "horizontal", + "img": "http://files.sxcfx.cn/upload/20220318/71e5d27aca82aeedf647052e1e4ceaaa.png" + } + ] + } + }, + { + "type": "video", + "name": "视频", + "icon": "VideoCamera", + "group": "base", + "img": "md-image", + "notAdd": true, + "notImg": true, + "notLink": true, + "notTitle": true, + "options": { + "list": [ + { + "videoUrl": "", + "poster": "", + "autoplay": false, + "aspectRatio": "16:9", + "style": { + "bgType": "color", + "bgColorStart": "#F5F5F5", + "bgColorEnd": "#F5F5F5", + "bgGradientDir": "horizontal", + "bgRadius": 0, + "bottomBgColor": "#F5F5F5", + "bgImage": "", + "margin": 0, + "padding": 0, + "borderShow": false, + "borderStyle": "solid", + "borderWidth": 1, + "borderColor": "#e5e5e5", + "shadowShow": false, + "shadowColor": "rgba(0,0,0,0.1)", + "shadowX": 0, + "shadowY": 0, + "shadowBlur": 10, + "shadowSpread": 0 + } + } + ] + } + }, + { + "type": "blank", + "name": "辅助空白", + "icon": "Crop", + "group": "tools", + "img": "md-image", + "options": { + "bgColor": "#f5f5f5", + "height": 10, + "paddingX": 0, + "pageGap": 0 + } + }, + { + "type": "line", + "name": "辅助线", + "icon": "Minus", + "group": "tools", + "img": "md-image", + "options": { + "bgColor": "#FFFFFF", + "lineColor": "#979797", + "lineStyle": "dashed", + "lineHeight": 1, + "paddingX": 0, + "pageGap": 0 + } + }, + { + "type": "richText", + "name": "富文本", + "icon": "EditPen", + "group": "tools", + "img": "md-image", + "options": { + "content": "", + "bgColor": "#FFFFFF", + "paddingX": 12, + "pageGap": 0, + "borderRadius": 0 + } + }, + { + "type": "coupon", + "name": "优惠券", + "icon": "Ticket", + "group": "marketing", + "img": "md-image", + "options": { + "layoutStyle": "1", + "list": [ + { + "title": "优惠券", + "count": 5, + "data": [ { - img: "https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png", - price: "120", - title: - " 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用", - type: "精选", - ___index:0 + "id": 1, + "couponType": "PRICE", + "price": 70, + "consumeThreshold": 500, + "storeName": "platform" }, { - img: "https://i.loli.net/2020/12/05/c9mptI5Pg8qJ6ny.png", - title: - "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", - price: "190", - type: "精选", - ___index:0 + "id": 2, + "couponType": "PRICE", + "price": 50, + "consumeThreshold": 300, + "storeName": "platform" }, - + { + "id": 3, + "couponType": "PRICE", + "price": 30, + "consumeThreshold": 200, + "storeName": "platform" + }, + { + "id": 4, + "couponType": "PRICE", + "price": 20, + "consumeThreshold": 100, + "storeName": "platform" + }, + { + "id": 5, + "couponType": "PRICE", + "price": 10, + "consumeThreshold": 0, + "storeName": "platform" + } ] } ] } + }, + { + "type": "goods", + "name": "商品列表", + "icon": "Goods", + "group": "marketing", + "img": "md-image", + "notAdd": true, + "notLink": true, + "notImg": true, + "options": { + "list": [ + { + "layout": "list", + "showName": true, + "showPrice": true, + "showSales": true, + "cartShow": true, + "cartStyle": "plus", + "cartAction": "detail", + "dataMode": "category", + "categoryId": "", + "brandId": "", + "storeId": "", + "goodsList": [], + "count": 6, + "sortType": "default" + } + ], + "bgColor1": "#FFFFFF", + "bgColor2": "#FFFFFF", + "titleColor": "#282828", + "toneMode": "theme", + "priceColor": "#FF5C58", + "salesColor": "#666666", + "paddingTop": 10, + "paddingBottom": 10, + "paddingX": 12, + "contentGap": 10, + "pageGap": 0, + "borderRadius": 0, + "contentRadius": 7 + } } - // TODO 第一版本隐藏暂无此功能 - // { - // notAdd: true, - // notImg: true, - // type: "joinGroup", - // name: "拼团活动", - // img: "md-image", - // options: { - // list: [ - // { - // title: "测试拼团" - // } - // ] - // } - // }, - // { - // notAdd: true, - // notImg: true, - // type: "integral", - // name: "积分活动", - // img: "md-image", - // options: { - // list: [ - // { - // title: "测试积分" - // } - // ] - // } - // }, - // { - // notAdd: true, - // notImg: true, - // type: "spike", - // name: "秒杀活动", - // img: "md-image", - // options: { - // list: [ - // { - // title: "测试秒杀" - // } - // ] - // } - // }, - // { - // notAdd: true, - // notImg: true, - // type: "group", - // name: "团购活动", - // img: "md-image", - // options: { - // list: [ - // { - // title: "测试团购" - // } - // ] - // } - // } ]; diff --git a/seller/src/views/shop/wap/controls/ColorField.vue b/seller/src/views/shop/wap/controls/ColorField.vue new file mode 100644 index 000000000..3b6bcd8a9 --- /dev/null +++ b/seller/src/views/shop/wap/controls/ColorField.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/seller/src/views/shop/wap/controls/GradientField.vue b/seller/src/views/shop/wap/controls/GradientField.vue new file mode 100644 index 000000000..618788752 --- /dev/null +++ b/seller/src/views/shop/wap/controls/GradientField.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/seller/src/views/shop/wap/controls/SegmentField.vue b/seller/src/views/shop/wap/controls/SegmentField.vue new file mode 100644 index 000000000..b9e526563 --- /dev/null +++ b/seller/src/views/shop/wap/controls/SegmentField.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/seller/src/views/shop/wap/controls/SliderField.vue b/seller/src/views/shop/wap/controls/SliderField.vue new file mode 100644 index 000000000..21f429a99 --- /dev/null +++ b/seller/src/views/shop/wap/controls/SliderField.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/seller/src/views/shop/wap/controls/field-common.scss b/seller/src/views/shop/wap/controls/field-common.scss new file mode 100644 index 000000000..c9b5dead0 --- /dev/null +++ b/seller/src/views/shop/wap/controls/field-common.scss @@ -0,0 +1,28 @@ +.ctrl-row { + display: flex; + align-items: flex-start; + margin-bottom: 16px; + gap: 12px; +} + +.ctrl-label { + width: 90px; + flex-shrink: 0; + line-height: 32px; + color: #606266; + font-size: 14px; + white-space: nowrap; +} + +.ctrl-body { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; +} + +.ctrl-color-input { + width: 110px; +} diff --git a/seller/src/views/shop/wap/controls/panel-common.scss b/seller/src/views/shop/wap/controls/panel-common.scss new file mode 100644 index 000000000..fff458153 --- /dev/null +++ b/seller/src/views/shop/wap/controls/panel-common.scss @@ -0,0 +1,179 @@ +// 新配置面板共用的骨架样式(灰底 + 白色卡片 + 头部 tabs) +// 使用方式:面板根类名需与 .panel-root 一起用,或在面板 scoped 样式里 @import 后把根类加上 +.panel-search, +.panel-promotion, +.panel-coupon, +.panel-title, +.panel-shop, +.panel-goods, +.panel-notice, +.panel-video, +.panel-article, +.panel-page-setting { + background: #f5f7fa; + margin: 0 -20px; + padding: 0 12px 12px; + min-height: 100%; + box-sizing: border-box; +} +.panel-header { + display: flex; + align-items: center; + justify-content: space-between; + height: 50px; + margin-bottom: 12px; + padding: 0 14px; + background: #ffffff; + border-radius: 8px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); + box-sizing: border-box; + .panel-name { + font-size: 16px; + font-weight: bold; + color: #303133; + } +} +.panel-tabs { + display: inline-flex; + background: #f4f4f5; + border-radius: 8px; + padding: 3px; + .panel-tab { + padding: 5px 14px; + font-size: 13px; + border-radius: 6px; + cursor: pointer; + color: #606266; + transition: all 0.2s ease; + &.active { + background: #ffffff; + color: #409eff; + font-weight: 600; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); + } + } +} +.panel-card { + background: #ffffff; + border-radius: 8px; + padding: 14px; + margin-bottom: 12px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); +} +.panel-card-fill { + flex: 1; + margin-bottom: 0; +} +// 面板根容器改为纵向 flex,让最后一张卡片可撑满到底 +.panel-flex-one, +.panel-carousel, +.panel-ad-cube, +.panel-menu, +.panel-search, +.panel-notice, +.panel-video, +.panel-title, +.panel-integral, +.panel-coupon, +.panel-article, +.panel-shop, +.panel-goods, +.panel-blank, +.panel-line, +.panel-rich-text, +.panel-promotion, +.panel-page-setting { + display: flex; + flex-direction: column; +} +.section-title { + font-size: 14px; + font-weight: 600; + color: #303133; + margin: 0 0 12px; +} +.section-tip { + font-size: 13px; + color: #909399; + margin-bottom: 10px; +} +.setting-row { + display: flex; + align-items: center; + justify-content: space-between; + margin: 14px 0; + .setting-label { + font-size: 14px; + color: #606266; + .setting-value { + margin-left: 8px; + color: #303133; + } + } +} +.seg { + display: inline-flex; + border: 1px solid #dcdfe6; + border-radius: 6px; + overflow: hidden; + .seg-item { + padding: 6px 14px; + font-size: 13px; + color: #606266; + cursor: pointer; + border-left: 1px solid #dcdfe6; + transition: all 0.2s ease; + &:first-child { + border-left: none; + } + &.active { + background: #ecf5ff; + color: #409eff; + font-weight: 600; + } + } +} +// 选项平铺选择器:一行两个,超出换行 +.layout-seg { + display: flex; + flex-wrap: wrap; + width: 100%; + .seg-item { + flex: 1 0 40%; + padding: 6px 0; + text-align: center; + white-space: nowrap; + box-sizing: border-box; + &:nth-child(3) { + border-left: none; + } + &:nth-child(n + 3) { + border-top: 1px solid #dcdfe6; + } + } + &.layout-seg-3 { + flex-wrap: nowrap; + .seg-item { + flex: 1 1 0; + &:nth-child(3) { + border-left: 1px solid #dcdfe6; + } + &:nth-child(n + 3) { + border-top: none; + } + } + } +} +// 选项平铺选择器(独立用法):一行三个 +.layout-seg-3 { + display: flex; + flex-wrap: nowrap; + width: 100%; + .seg-item { + flex: 1 1 0; + padding: 6px 0; + text-align: center; + white-space: nowrap; + box-sizing: border-box; + } +} diff --git a/seller/src/views/shop/wap/decorate.scss b/seller/src/views/shop/wap/decorate.scss index b9368017a..bc7389a04 100644 --- a/seller/src/views/shop/wap/decorate.scss +++ b/seller/src/views/shop/wap/decorate.scss @@ -1,13 +1,13 @@ - :deep(.el-overlay) { z-index: 2000; } -.decorate-view-link{ - font-size: 12px; - margin: 0 4px; - flex: 1; - min-width: 0; - color: #999; + +.decorate-view-link { + font-size: 12px; + margin: 0 4px; + flex: 1; + min-width: 0; + color: #999; } .decorate-view-btn { flex-shrink: 0; @@ -22,111 +22,179 @@ margin: 0; } } + .decorate-view-style { - border: 1px solid #ededed; - background: #f7f7fa; - text-align: center; - width: 100%; - padding: 30px 0 0 0; - margin-bottom: 20px; - cursor: pointer; - > .select-style { - background: #ededed; - padding: 15px 0; - font-size: 15px; - } - } - .decorate-border { - border: 1px solid #ededed; - margin: 10px 0; - padding: 0 10px; - } - .drawer { - width: 100%; - display: flex; - flex-wrap: wrap; - gap: 14px; - > .drawer-item { - cursor: pointer; - border: 1px solid #ededed; - background: #f9f0ff; - width: calc(50% - 7px); - box-sizing: border-box; - color: #9254de; - border-radius: 0.8em; - height: 60px; - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - } - } - .hidden-input { - display: none; - } - .decorate { - padding: 0 20px; - height: calc(100vh - 120px); - overflow-y: auto; - padding-bottom: 120px; - } - .decorate-title { - height: 50px; - line-height: 50px; - font-weight: bold; - } - .decorate-list { - overflow: hidden; - } - .decorate-view { - display: flex; - margin: 20px 0; - align-items: center; - } - .decorate-item-box { - background: #fff; - padding: 10px; - border: 1px solid #ededed; - } - .decorate-item-title { - height: 40px; - display: flex; - align-items: center; - justify-content: space-between; - line-height: 40px; - padding: 0 10px; - } - .decorate-view-title { - margin-right: 10px; - } - .decorate-item { + border: 1px solid #ededed; + background: #f7f7fa; + text-align: center; + width: 100%; + padding: 30px 0 0 0; + margin-bottom: 20px; + cursor: pointer; + + >.select-style { background: #ededed; - border-top-left-radius: 0.4em; - margin-bottom: 20px; - border-top-right-radius: 0.4em; + padding: 15px 0; + font-size: 15px; } - .show-image { - max-width: 50px; - } - .tips { - font-size: 12px; - color: #999; - > span { - color: $theme_color; - } - } - .selectBtn { - margin-left: 10px; - } - .bing-goods-list { +} + +.decorate-border { + border: 1px solid #ededed; + margin: 10px 0; + padding: 0 10px; +} + +.drawer { + width: 100%; + display: flex; + flex-wrap: wrap; + gap: 14px; + + >.drawer-item { + cursor: pointer; + border: 1px solid #ededed; + background: #f9f0ff; + width: calc(50% - 7px); + box-sizing: border-box; + color: #9254de; + border-radius: 0.8em; + height: 60px; display: flex; - > .bing-goods-item { - width: 50px; - height: 50px; - > img { - width: 100%; - height: 100%; - display: block; - } + align-items: center; + flex-direction: column; + justify-content: center; + } +} + +.hidden-input { + display: none; +} + +.decorate { + padding: 0 20px; + height: calc(100vh - 96px); + overflow-y: auto; + background: #f5f7fa; +} + +.decorate-title { + height: 50px; + line-height: 50px; + font-weight: bold; +} + +.decorate-list { + overflow: hidden; +} + +.decorate-view { + display: flex; + margin: 12px 0; + align-items: center; +} + +.decorate-item-box { + background: #fff; + padding: 10px; + border: 1px solid #ededed; +} + +.decorate-item-title { + height: 40px; + display: flex; + align-items: center; + justify-content: space-between; + line-height: 40px; + padding: 0 10px; +} + +.decorate-view-title { + margin-right: 10px; + +} + +.decorate-item { + background: #ededed; + border-top-left-radius: 0.4em; + margin-bottom: 20px; + border-top-right-radius: 0.4em; +} + +.show-image { + max-width: 50px; +} + +.tips { + font-size: 12px; + color: #999; + + >span { + color: $theme_color; + } +} + +.selectBtn { + margin-left: 10px; +} + +.bing-goods-list { + display: flex; + + >.bing-goods-item { + width: 50px; + height: 50px; + + >img { + width: 100%; + height: 100%; + display: block; } } +} + +.align-text { + width: 30px; + height: 30px; + display: block; +} + +.card-box { + display: flex; +} + +.decorate-notice { + margin-top: 10px; +} + +.card {} + +.card:hover { + background: #ededed; +} + +.active { + background: #ededed; +} +.title-item{ + border-bottom: 1px solid #ededed; + padding:10px 10px 10px 0; + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + >.title-btn{ + display: flex; + } +} +.title-goodsName{ + /* 适用于webkit内核和移动端 */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + +} +.title-tooltip{ + white-space: normal; +} diff --git a/seller/src/views/shop/wap/decorate.vue b/seller/src/views/shop/wap/decorate.vue index 4e3380c21..50b91f682 100644 --- a/seller/src/views/shop/wap/decorate.vue +++ b/seller/src/views/shop/wap/decorate.vue @@ -1,6 +1,6 @@ diff --git a/seller/src/views/shop/wap/navbar.vue b/seller/src/views/shop/wap/navbar.vue index 0d036e145..fb69cadca 100644 --- a/seller/src/views/shop/wap/navbar.vue +++ b/seller/src/views/shop/wap/navbar.vue @@ -1,7 +1,26 @@ diff --git a/seller/src/views/shop/wap/template/tpl_banner.vue b/seller/src/views/shop/wap/template/tpl_banner.vue index 0d04f7bbc..207e5ec07 100644 --- a/seller/src/views/shop/wap/template/tpl_banner.vue +++ b/seller/src/views/shop/wap/template/tpl_banner.vue @@ -1,17 +1,151 @@ \ No newline at end of file +.banner-box { + position: relative; + overflow: hidden; +} +.slide-wrap { + height: 100%; + padding: 0 3px; + box-sizing: border-box; +} +.image-mode { + width: 100%; + display: block; + overflow: hidden; +} +.card-preview { + overflow: hidden; + height: 150px; + display: flex; + align-items: center; +} +.card-track { + display: flex; + align-items: center; + transition: transform 0.5s ease; + width: 100%; +} +.card-slide { + flex: 0 0 82%; + padding: 0 3px; + box-sizing: border-box; + transform: scale(0.9); + transition: transform 0.4s ease; + &.active { + transform: scale(1); + } +} +.card-img { + width: 100%; + height: 150px; + display: block; + overflow: hidden; +} +.indicator { + position: absolute; + bottom: 8px; + display: flex; + align-items: center; + z-index: 2; + &.pos-left { + left: 12px; + } + &.pos-center { + left: 50%; + transform: translateX(-50%); + } + &.pos-right { + right: 12px; + } + .dot { + background: rgba(255, 255, 255, 0.7); + transition: background 0.3s ease; + &.round { + width: 6px; + height: 6px; + border-radius: 50%; + margin: 0 3px; + } + &.line { + width: 12px; + height: 3px; + border-radius: 2px; + margin: 0 2px; + } + } +} + diff --git a/seller/src/views/shop/wap/template/tpl_blank.vue b/seller/src/views/shop/wap/template/tpl_blank.vue new file mode 100644 index 000000000..4d2d7aff5 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_blank.vue @@ -0,0 +1,35 @@ + + + diff --git a/seller/src/views/shop/wap/template/tpl_coupon.vue b/seller/src/views/shop/wap/template/tpl_coupon.vue new file mode 100644 index 000000000..14d7645a4 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_coupon.vue @@ -0,0 +1,441 @@ + + + + + diff --git a/seller/src/views/shop/wap/template/tpl_flex_five.vue b/seller/src/views/shop/wap/template/tpl_flex_five.vue index 24408f7f3..395e9e3de 100644 --- a/seller/src/views/shop/wap/template/tpl_flex_five.vue +++ b/seller/src/views/shop/wap/template/tpl_flex_five.vue @@ -1,17 +1,24 @@ diff --git a/seller/src/views/shop/wap/template/tpl_flex_four.vue b/seller/src/views/shop/wap/template/tpl_flex_four.vue index 36a980c34..ca43457a3 100644 --- a/seller/src/views/shop/wap/template/tpl_flex_four.vue +++ b/seller/src/views/shop/wap/template/tpl_flex_four.vue @@ -1,19 +1,23 @@ diff --git a/seller/src/views/shop/wap/template/tpl_flex_one.vue b/seller/src/views/shop/wap/template/tpl_flex_one.vue index e82a5f754..a53b7bac9 100644 --- a/seller/src/views/shop/wap/template/tpl_flex_one.vue +++ b/seller/src/views/shop/wap/template/tpl_flex_one.vue @@ -1,12 +1,32 @@ \ No newline at end of file + diff --git a/seller/src/views/shop/wap/template/tpl_flex_three.vue b/seller/src/views/shop/wap/template/tpl_flex_three.vue index c2ff11e8c..567112ed3 100644 --- a/seller/src/views/shop/wap/template/tpl_flex_three.vue +++ b/seller/src/views/shop/wap/template/tpl_flex_three.vue @@ -1,18 +1,22 @@ diff --git a/seller/src/views/shop/wap/template/tpl_flex_two.vue b/seller/src/views/shop/wap/template/tpl_flex_two.vue index ad65cef0d..59f3b619b 100644 --- a/seller/src/views/shop/wap/template/tpl_flex_two.vue +++ b/seller/src/views/shop/wap/template/tpl_flex_two.vue @@ -1,18 +1,25 @@ diff --git a/seller/src/views/shop/wap/template/tpl_home_comb.vue b/seller/src/views/shop/wap/template/tpl_home_comb.vue new file mode 100644 index 000000000..cf7009d22 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_home_comb.vue @@ -0,0 +1,564 @@ + + + + + diff --git a/seller/src/views/shop/wap/template/tpl_hot_area.vue b/seller/src/views/shop/wap/template/tpl_hot_area.vue new file mode 100644 index 000000000..b65751a6a --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_hot_area.vue @@ -0,0 +1,29 @@ + + + \ No newline at end of file diff --git a/seller/src/views/shop/wap/template/tpl_integral.vue b/seller/src/views/shop/wap/template/tpl_integral.vue index 0979feae1..052eaca19 100644 --- a/seller/src/views/shop/wap/template/tpl_integral.vue +++ b/seller/src/views/shop/wap/template/tpl_integral.vue @@ -1,37 +1,250 @@ \ No newline at end of file +.ig-g2-item { + width: calc((100% - var(--ig-gap, 5px)) / 2); + background: #fff; + border-radius: 8px; + overflow: hidden; + padding-bottom: 8px; + box-sizing: border-box; +} +.ig-g2-img-box { + width: 100%; + height: 150px; + background: #f5f5f5; +} +.ig-g2-name { + margin: 8px 8px 0; + font-size: 13px; + color: #282828; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ig-price-row { + display: flex; + align-items: baseline; + margin: 5px 8px 0; + min-width: 0; +} +.ig-price { + display: flex; + align-items: center; + font-size: 14px; + font-weight: bold; + color: #f5483a; + white-space: nowrap; +} +.ig-price-sm { + font-size: 12px; + margin-top: 5px; +} +.ig-coin { + width: 14px; + height: 14px; + border-radius: 50%; + background: linear-gradient(135deg, #ffe29a, #f5a623); + color: #fff; + font-size: 9px; + font-weight: bold; + display: inline-flex; + align-items: center; + justify-content: center; + margin-right: 3px; + flex-shrink: 0; +} +.ig-coin-sm { + width: 12px; + height: 12px; + font-size: 8px; +} +.ig-original { + font-size: 11px; + color: #999; + margin-left: 5px; + white-space: nowrap; +} +.ig-grid3 { + display: flex; + flex-wrap: wrap; +} +.ig-g3-item { + width: calc((100% - var(--ig-gap, 5px) * 2) / 3); + background: #fff; + border-radius: 8px; + overflow: hidden; + padding-bottom: 8px; + box-sizing: border-box; +} +.ig-g3-item .ig-price { + margin: 5px 8px 0; +} +.ig-g3-img-box { + width: 100%; + height: 92px; + background: #f5f5f5; +} +.ig-g3-name { + margin: 4px 8px 0; + font-size: 12px; + color: #282828; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + diff --git a/seller/src/views/shop/wap/template/tpl_left_one_right_two.vue b/seller/src/views/shop/wap/template/tpl_left_one_right_two.vue index 19a563961..a853d03e6 100644 --- a/seller/src/views/shop/wap/template/tpl_left_one_right_two.vue +++ b/seller/src/views/shop/wap/template/tpl_left_one_right_two.vue @@ -1,14 +1,14 @@ diff --git a/seller/src/views/shop/wap/template/tpl_left_two_right_one.vue b/seller/src/views/shop/wap/template/tpl_left_two_right_one.vue index 81398e0ad..8f70929ae 100644 --- a/seller/src/views/shop/wap/template/tpl_left_two_right_one.vue +++ b/seller/src/views/shop/wap/template/tpl_left_two_right_one.vue @@ -1,22 +1,30 @@ diff --git a/seller/src/views/shop/wap/template/tpl_promotion_detail.vue b/seller/src/views/shop/wap/template/tpl_promotion_detail.vue new file mode 100644 index 000000000..e7a17eb96 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_promotion_detail.vue @@ -0,0 +1,1334 @@ + + + \ No newline at end of file diff --git a/seller/src/views/shop/wap/template/tpl_promotions.vue b/seller/src/views/shop/wap/template/tpl_promotions.vue new file mode 100644 index 000000000..4eb9ade29 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_promotions.vue @@ -0,0 +1,30 @@ + + + diff --git a/seller/src/views/shop/wap/template/tpl_rich_text.vue b/seller/src/views/shop/wap/template/tpl_rich_text.vue new file mode 100644 index 000000000..fdc76be15 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_rich_text.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/seller/src/views/shop/wap/template/tpl_search.vue b/seller/src/views/shop/wap/template/tpl_search.vue index db9945727..5220d7082 100644 --- a/seller/src/views/shop/wap/template/tpl_search.vue +++ b/seller/src/views/shop/wap/template/tpl_search.vue @@ -1,25 +1,144 @@ \ No newline at end of file + diff --git a/seller/src/views/shop/wap/template/tpl_shop.vue b/seller/src/views/shop/wap/template/tpl_shop.vue new file mode 100644 index 000000000..28cf8a923 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_shop.vue @@ -0,0 +1,513 @@ + + + + + diff --git a/seller/src/views/shop/wap/template/tpl_text_picture.vue b/seller/src/views/shop/wap/template/tpl_text_picture.vue index cfc1ec6e5..647f79003 100644 --- a/seller/src/views/shop/wap/template/tpl_text_picture.vue +++ b/seller/src/views/shop/wap/template/tpl_text_picture.vue @@ -1,30 +1,30 @@ \ No newline at end of file + diff --git a/seller/src/views/shop/wap/template/tpl_top_two_bottom_one.vue b/seller/src/views/shop/wap/template/tpl_top_two_bottom_one.vue index 5eff16db0..42a9521d6 100644 --- a/seller/src/views/shop/wap/template/tpl_top_two_bottom_one.vue +++ b/seller/src/views/shop/wap/template/tpl_top_two_bottom_one.vue @@ -1,22 +1,29 @@ diff --git a/seller/src/views/shop/wap/template/tpl_video.vue b/seller/src/views/shop/wap/template/tpl_video.vue new file mode 100644 index 000000000..8e5e666e9 --- /dev/null +++ b/seller/src/views/shop/wap/template/tpl_video.vue @@ -0,0 +1,135 @@ + + + diff --git a/seller/src/views/shop/wap/video-config.vue b/seller/src/views/shop/wap/video-config.vue new file mode 100644 index 000000000..e6ff3ca34 --- /dev/null +++ b/seller/src/views/shop/wap/video-config.vue @@ -0,0 +1,386 @@ + + + + + diff --git a/seller/src/views/shop/wap/video-style.js b/seller/src/views/shop/wap/video-style.js new file mode 100644 index 000000000..be2955759 --- /dev/null +++ b/seller/src/views/shop/wap/video-style.js @@ -0,0 +1,102 @@ +export const DEFAULT_VIDEO_STYLE = { + bgType: "color", + bgColorStart: "#F5F5F5", + bgColorEnd: "#F5F5F5", + bgGradientDir: "horizontal", + bgRadius: 0, + bottomBgColor: "#F5F5F5", + bgImage: "", + margin: 0, + padding: 0, + borderShow: false, + borderStyle: "solid", + borderWidth: 1, + borderColor: "#e5e5e5", + shadowShow: false, + shadowColor: "rgba(0,0,0,0.1)", + shadowX: 0, + shadowY: 0, + shadowBlur: 10, + shadowSpread: 0, +}; + +export const ASPECT_RATIO_MAP = { + "16:9": 56.25, + "4:3": 75, + "1:1": 100, +}; + +export function ensureVideoItem(item) { + if (!item.aspectRatio) item.aspectRatio = "16:9"; + if (!item.style) { + item.style = { ...DEFAULT_VIDEO_STYLE }; + return; + } + Object.keys(DEFAULT_VIDEO_STYLE).forEach((key) => { + if (item.style[key] === undefined) { + item.style[key] = DEFAULT_VIDEO_STYLE[key]; + } + }); +} + +export function getVideoGradient(style) { + const start = style.bgColorStart || "#F5F5F5"; + const end = style.bgColorEnd || start; + const colors = `${start}, ${end}`; + const dirMap = { + horizontal: `linear-gradient(to right, ${colors})`, + vertical: `linear-gradient(to bottom, ${colors})`, + skewLeft: `linear-gradient(135deg, ${colors})`, + skewRight: `linear-gradient(45deg, ${colors})`, + }; + return dirMap[style.bgGradientDir] || dirMap.horizontal; +} + +export function getVideoWrapperStyle(item) { + ensureVideoItem(item); + const style = item.style; + const wrapper = { + margin: `${style.margin || 0}px`, + padding: `${style.padding || 0}px`, + background: style.bottomBgColor || "#F5F5F5", + boxSizing: "border-box", + }; + return wrapper; +} + +export function getVideoBoxStyle(item) { + ensureVideoItem(item); + const style = item.style; + const box = { + borderRadius: `${style.bgRadius || 0}px`, + overflow: "hidden", + position: "relative", + width: "100%", + }; + + if (style.bgType === "image" && style.bgImage) { + box.backgroundImage = `url(${style.bgImage})`; + box.backgroundSize = "cover"; + box.backgroundPosition = "center"; + } else { + box.background = getVideoGradient(style); + } + + if (style.borderShow) { + box.border = `${style.borderWidth || 1}px ${style.borderStyle || "solid"} ${ + style.borderColor || "#e5e5e5" + }`; + } + + if (style.shadowShow) { + box.boxShadow = `${style.shadowX || 0}px ${style.shadowY || 0}px ${ + style.shadowBlur || 10 + }px ${style.shadowSpread || 0}px ${style.shadowColor || "rgba(0,0,0,0.1)"}`; + } + + return box; +} + +export function getAspectPadding(ratio) { + return ASPECT_RATIO_MAP[ratio] || ASPECT_RATIO_MAP["16:9"]; +}