更新Note
1. 修复购物车,订单和退单后后置任务正确执行 2. 修复佣金记录金额和详情 3. 修复管理端 移动应用界面下订单管理数据统计不准确的问题 4. 修复短信API升级-后台使用一号通 5. 修复用户管理相关问题 6. 修复核销点核销后核销地址不准确 7. 修复资源同步云服务的问题 新增功能 1. 秒杀 a. 秒杀时段配置 b. 秒杀商品维护 2. 财务管理 a. 申请提现 b. 财务记录 i. 充值记录 ii. 资金监控 c. 佣金记录 3. 普通商品显示该商品正在参加的活动信息[秒杀]
27
README.md
@@ -26,7 +26,7 @@
|
||||
### 加技术交流群
|
||||
|
||||
<!--  -->
|
||||

|
||||

|
||||
|
||||
|
||||
如果群二维码过期请加开发者微信拉你进群
|
||||
@@ -128,7 +128,7 @@ Excel数据导出,导出表格更加美观可视;
|
||||
### 强大的后台权限管理
|
||||
后台多种角色、多重身份权限管理,权限可以控制到每一步操作
|
||||
### 强大的表单生成控件
|
||||
可以自由配置开发表单,减少前端工作量,后端接口统一调用
|
||||
可以自由配置开发表单,减少前端工作量,后端接口统一调
|
||||
|
||||
|
||||
## 安装
|
||||
@@ -179,6 +179,29 @@ Excel数据导出,导出表格更加美观可视;
|
||||
1. [易联云文档](http://doc2.10ss.net/337744 "易联云文档")
|
||||
2. [易联云JAVA SDK](http://doc2.10ss.net/337744 "易联云JAVA SDK gitee文档")
|
||||
3. [如何导入第三方JAVA SDK包](https://blog.csdn.net/weixin_46028577/article/details/106342938?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase "如何导入第三方JAVA SDK包")
|
||||
#
|
||||
|
||||
# v1.2 功能更新列表
|
||||
### 更新Note
|
||||
## 修复内容列表
|
||||
1. 修复购物车,订单和退单后后置任务正确执行
|
||||
2. 修复佣金记录金额和详情
|
||||
3. 修复管理端 移动应用界面下订单管理数据统计不准确的问题
|
||||
4. 修复短信API升级-后台使用一号通
|
||||
5. 修复用户管理相关问题
|
||||
6. 修复核销点核销后核销地址不准确
|
||||
7. 修复资源同步云服务的问题
|
||||
## 新增功能
|
||||
1. 秒杀
|
||||
a. 秒杀时段配置
|
||||
b. 秒杀商品维护
|
||||
2. 财务管理
|
||||
a. 申请提现
|
||||
b. 财务记录
|
||||
i. 充值记录
|
||||
ii. 资金监控
|
||||
c. 佣金记录
|
||||
普通商品显示该商品正在参加的活动信息[秒杀]
|
||||
|
||||
|
||||
## admin项目说明
|
||||
|
||||
@@ -4,7 +4,7 @@ ENV = 'development'
|
||||
# base api
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
# VUE_APP_BASE_API = 'https://api.java.crmeb.net'
|
||||
VUE_APP_BASE_API = 'https://api.java.crmeb.net'
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:8080'
|
||||
|
||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
# CRMEB Admin
|
||||
## 开发规范
|
||||
统一使用ES6 语法
|
||||
方法注释
|
||||
/*
|
||||
* th => 表头
|
||||
* data => 数据
|
||||
* fileName => 文件名
|
||||
* fileType => 文件类型
|
||||
* sheetName => sheet页名
|
||||
*/
|
||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||
行注释 //
|
||||
|
||||
### 命名
|
||||
|
||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||
例如:商品模块
|
||||
store 商品
|
||||
├─ store 商品管理
|
||||
├─index.vue 首页
|
||||
├─ creatStore 新建商品
|
||||
├─ index.vue
|
||||
├─ sort 商品分类
|
||||
├─ index.vue
|
||||
├─storeAttr 商品规格
|
||||
├─ index.vue
|
||||
├─storeComment 商品评论
|
||||
├─ index.vue
|
||||
|
||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||
|
||||
类名函数命名 大驼峰式 例如:addUser
|
||||
变量命名 小驼峰式 例如:user 或者 userInfo
|
||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||
|
||||
### 文件管理规范
|
||||
views 页面模块必须件文件夹区分
|
||||
api 接口一个模块一个文件
|
||||
组建 一个组建一个文件夹
|
||||
plugins 插件一个插件一个文件夹
|
||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
||||
router 一个模块一个模块在modules 中建一个文件夹
|
||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||
|
||||
## 模块命名
|
||||
~~~
|
||||
├─ login 登录
|
||||
├─ dashboard 首页
|
||||
├─ store 商品管理
|
||||
├─ order 系统订单管理
|
||||
├─ distribution 分销
|
||||
├─ user 用户管理
|
||||
├─ content 内容管理
|
||||
├─ appSetting 各个应用模块功能管理公众号、小程序、支付宝、百度小程序、今日头条小程序
|
||||
├─ marketing 营销管理 优惠劵 积分
|
||||
├─ sms 设置 短信设置
|
||||
├─ systemSetting 设置 管理员权限 系统设置 物流设置
|
||||
├─ maintain 维护 配置分类 组合数据 表单配置
|
||||
├─ error-page 错误页
|
||||
|
||||
~~~
|
||||
## 目录结构
|
||||
主要目录结构及说明:
|
||||
~~~
|
||||
├── public # 静态资源
|
||||
│ ├── favicon.ico # favicon图标
|
||||
│ └── index.html # html 模板
|
||||
│ └── UEditor # 富文本编辑器插件
|
||||
├── src # 源代码
|
||||
│ ├── api # 所有请求
|
||||
│ │ └──user.js # 有关登录/用户的接口
|
||||
│ │ └──article.js # 有关内容的接口
|
||||
│ │ └──categoryApi.js # 有关配置的接口
|
||||
│ │ └──configTabApi.js # 有关配置分类的接口
|
||||
│ │ └──dashboard.js # 有关统计的接口
|
||||
│ │ └──distribution.js # 有关分销的接口
|
||||
│ │ └──logistics.js # 有关城市数据、物流配置的接口
|
||||
│ │ └──marketing.js # 有关优惠券的接口
|
||||
│ │ └──order.js # 有关订单的接口
|
||||
│ │ └──role.js # 有关权限的接口
|
||||
│ │ └──roleApi.js # 有关菜单的接口
|
||||
│ │ └──sms.js # 有关短信的接口
|
||||
│ │ └──store.js # 有关商品的接口
|
||||
│ │ └──storePoint.js # 有关提货点的接口
|
||||
│ │ └──productCreateApi.js # 有关附件上传的接口
|
||||
│ │ └──systemadmin.js # 有关管理员的接口
|
||||
│ │ └──systemConfig.js # 有关系统配置的接口
|
||||
│ │ └──systemFormConfig.js # 有关表单配置的接口
|
||||
│ │ └──systemGroup.js # 有关组合数据的接口
|
||||
│ │ └──systemSetting.js # 有关上传文件的接口
|
||||
│ │ └──user.js # 有关用户的接口
|
||||
│ │ └──wxApi.js # 有关微信的接口
|
||||
│ ├── assets # 图片、svg 等静态资源
|
||||
│ ├── components # 公共组件
|
||||
│ │ └──articleList # 文章列表
|
||||
│ │ └──attrFrom # 商品规格
|
||||
│ │ └──Breadcrumb # 头部标题标签
|
||||
│ │ └──cards # 统计小方块
|
||||
│ │ └──echarts # 统计图
|
||||
│ │ └──Category # 分类
|
||||
│ │ └──customerInfo # 用户列表
|
||||
│ │ └──FormGenerator # 表单配置
|
||||
│ │ └──couponList # 优惠劵列表
|
||||
│ │ └──goodsList # 商品列表
|
||||
│ │ └──Hamburger # 导航收缩组件
|
||||
│ │ └──HeaderSearch # 导航搜索组件
|
||||
│ │ └──iconFrom # 导航添加图标
|
||||
│ │ └──RightPanel # 右侧设置按钮,设置导航相关
|
||||
│ │ └──Screenfull # 全屏
|
||||
│ │ └──SvgIcon # svg图标
|
||||
│ │ └──Tinymce # 颜色选择
|
||||
│ │ └──ThemePicker # 右侧设置按钮,设置组题颜色
|
||||
│ │ └──templatesFrom # 运费模板
|
||||
│ │ └──ueditorFrom # 富文本编辑器
|
||||
│ │ └──uploadPicture # 上传图片组件
|
||||
│ │ └──Upload # 上传文件组件
|
||||
│ │ └──UploadExcel # 下载Excel
|
||||
│ │ └──userList # 用户列表
|
||||
│ ├── layouts # 导航布局
|
||||
│ │ ├──index # 主页面
|
||||
│ │ ├──components # 导航组件
|
||||
│ │ └──Settings # 右边小按钮,设置导航等
|
||||
│ │ └──Sidebar # 侧边导航
|
||||
│ │ └──TagsView # tab标签页导航
|
||||
│ │ └──Navbar # 头部导航
|
||||
│ │ └──AppMain # 导航路由
|
||||
│ │ └──index.js # 组件引用
|
||||
│ │ └──mixins # 自适应大小
|
||||
│ ├── libs # 公共js方法
|
||||
│ │ └──settingMer # 配置请求地址
|
||||
│ ├── views # 所有页面
|
||||
│ │ └──login # 登录
|
||||
│ │ └──index # 登录
|
||||
│ │ └──dashboard # 首页
|
||||
│ │ └──store # 商品
|
||||
│ │ └──creatStore # 添加商品
|
||||
│ │ └──storeAttr # 商品规格
|
||||
│ │ └──sort # 商品分类
|
||||
│ │ └──taoBao # 复制商品
|
||||
│ │ └──storeComment # 商品评论
|
||||
│ │ └──order # 订单管理
|
||||
│ │ └──marketing # 营销
|
||||
│ │ └──coupon # 优惠劵
|
||||
│ │ └──systemSetting # 设置
|
||||
│ │ └──administratorAuthority # 管理权限
|
||||
│ │ └──adminList # 管理员列表
|
||||
│ │ └──identityManager# 身份管理
|
||||
│ │ └──permissionRules# 权限规则
|
||||
│ │ └──logistics # 物流设置
|
||||
│ │ └──cityList # 城市数据
|
||||
│ │ └──companyList # 物流公司
|
||||
│ │ └──config # 物流配置
|
||||
│ │ └──shippingTemplates # 运费模板
|
||||
│ │ └──setting # 系统设置
|
||||
│ │ └──systemStore # 提货点设置
|
||||
│ │ └──appSetting # 应用 小程序 公众号设置
|
||||
│ │ └──content # 内容
|
||||
│ │ └──article # 文章管理
|
||||
│ │ └──articleclass # 文章分类
|
||||
│ │ └──datas # 统计数据
|
||||
│ │ └──user # 用户
|
||||
│ │ └──list # 用户管理
|
||||
│ │ └──grade # 用户等级/标签
|
||||
│ │ └──group # 用户分组
|
||||
│ │ └──distribution # 分销设置
|
||||
│ │ └──maintain # 维护
|
||||
│ │ └──devconfig # 组合数据
|
||||
│ │ └──formConfig # 表单配置
|
||||
│ │ └──financial # 财务
|
||||
│ │ └──error-page # 错误页
|
||||
│ │ └──404 # 错误页404
|
||||
│ │ └──403 # 错误页403
|
||||
│ ├── filters # 过滤器
|
||||
│ ├── router # 路由配置
|
||||
│ │ └──modules # 页面路由模块
|
||||
│ │ └──content.js # 有关内容 文章
|
||||
│ │ └──user.js # 有关用户
|
||||
│ │ └──appSetting.js # 有关应用
|
||||
│ │ └──marketing.js # 有关优惠券
|
||||
│ │ └──distribution.js # 有关分销
|
||||
│ │ └──order.js # 有关订单
|
||||
│ │ └──financial.js # 有关财务
|
||||
│ │ └──store.js # 有关商品
|
||||
│ │ └──maintain.js # 有关维护
|
||||
│ │ └──operation.js # 有关设置
|
||||
│ │ └──index.js # 路由的汇总
|
||||
│ ├── store # Vuex 状态管理
|
||||
│ ├── utils # 全局公用方法
|
||||
│ │ └──request.js # 请求封装
|
||||
│ │ └──settingMer.js # 请求地址配置
|
||||
│ ├── styles # 样式管理
|
||||
│ ├── permission.js # 路由拦截
|
||||
│ ├── main.js # 入口文件 加载组件 初始化等
|
||||
│ └── App.vue # 入口页面
|
||||
├── tests # 测试
|
||||
├── .env.xxx # 环境变量配置
|
||||
├── .eslintrc.js # eslint 配置项
|
||||
├── .babelrc # babel-loader 配置
|
||||
├── .travis.yml # 自动化CI配置
|
||||
├── vue.config.js # vue-cli 配置
|
||||
├── postcss.config.js # postcss 配置
|
||||
└── package.json # package.json
|
||||
|
||||
|
||||
~~~
|
||||
## 开发
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clone https://gitee.com/ZhongBangKeJi/crmeb_java/
|
||||
|
||||
# 进入项目目录
|
||||
cd ##
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||
npm install --registry=https://registry.npm.taobao.org
|
||||
|
||||
# 启动服务
|
||||
npm run dev
|
||||
```
|
||||
|
||||
浏览器访问 http://localhost:9527
|
||||
|
||||
## 发布
|
||||
|
||||
```bash
|
||||
# 构建测试环境
|
||||
npm run build:stage
|
||||
|
||||
# 构建生产环境
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## 其它
|
||||
|
||||
```bash
|
||||
# 预览发布环境效果
|
||||
npm run preview
|
||||
|
||||
# 预览发布环境效果 + 静态资源分析
|
||||
npm run preview -- --report
|
||||
|
||||
# 代码格式检查
|
||||
npm run lint
|
||||
|
||||
# 代码格式检查并自动修复
|
||||
npm run lint -- --fix
|
||||
```
|
||||
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
# CRMEB Admin
|
||||
## 开发规范
|
||||
统一使用ES6 语法
|
||||
方法注释
|
||||
/*
|
||||
* th => 表头
|
||||
* data => 数据
|
||||
* fileName => 文件名
|
||||
* fileType => 文件类型
|
||||
* sheetName => sheet页名
|
||||
*/
|
||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||
行注释 //
|
||||
|
||||
### 命名
|
||||
|
||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||
例如:商品模块
|
||||
store 商品
|
||||
├─ store 商品管理
|
||||
├─index.vue 首页
|
||||
├─ creatStore 新建商品
|
||||
├─ index.vue
|
||||
├─ sort 商品分类
|
||||
├─ index.vue
|
||||
├─storeAttr 商品规格
|
||||
├─ index.vue
|
||||
├─storeComment 商品评论
|
||||
├─ index.vue
|
||||
|
||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||
|
||||
类名函数命名 大驼峰式 例如:addUser
|
||||
变量命名 小驼峰式 例如:user 或者 userInfo
|
||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||
|
||||
### 文件管理规范
|
||||
views 页面模块必须件文件夹区分
|
||||
api 接口一个模块一个文件
|
||||
组建 一个组建一个文件夹
|
||||
plugins 插件一个插件一个文件夹
|
||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
||||
router 一个模块一个模块在modules 中建一个文件夹
|
||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||
|
||||
## 模块命名
|
||||
~~~
|
||||
├─ login 登录
|
||||
├─ dashboard 首页
|
||||
├─ store 商品管理
|
||||
├─ order 系统订单管理
|
||||
├─ distribution 分销
|
||||
├─ user 用户管理
|
||||
├─ content 内容管理
|
||||
├─ appSetting 各个应用模块功能管理公众号、小程序、支付宝、百度小程序、今日头条小程序
|
||||
├─ marketing 营销管理 优惠劵 积分
|
||||
├─ sms 设置 短信设置
|
||||
├─ systemSetting 设置 管理员权限 系统设置 物流设置
|
||||
├─ maintain 维护 配置分类 组合数据 表单配置
|
||||
├─ error-page 错误页
|
||||
|
||||
~~~
|
||||
## 目录结构
|
||||
主要目录结构及说明:
|
||||
~~~
|
||||
├── public # 静态资源
|
||||
│ ├── favicon.ico # favicon图标
|
||||
│ └── index.html # html 模板
|
||||
│ └── UEditor # 富文本编辑器插件
|
||||
├── src # 源代码
|
||||
│ ├── api # 所有请求
|
||||
│ │ └──user.js # 有关登录/用户的接口
|
||||
│ │ └──article.js # 有关内容的接口
|
||||
│ │ └──categoryApi.js # 有关配置的接口
|
||||
│ │ └──configTabApi.js # 有关配置分类的接口
|
||||
│ │ └──dashboard.js # 有关统计的接口
|
||||
│ │ └──distribution.js # 有关分销的接口
|
||||
│ │ └──logistics.js # 有关城市数据、物流配置的接口
|
||||
│ │ └──marketing.js # 有关优惠券的接口
|
||||
│ │ └──order.js # 有关订单的接口
|
||||
│ │ └──role.js # 有关权限的接口
|
||||
│ │ └──roleApi.js # 有关菜单的接口
|
||||
│ │ └──sms.js # 有关短信的接口
|
||||
│ │ └──store.js # 有关商品的接口
|
||||
│ │ └──storePoint.js # 有关提货点的接口
|
||||
│ │ └──productCreateApi.js # 有关附件上传的接口
|
||||
│ │ └──systemadmin.js # 有关管理员的接口
|
||||
│ │ └──systemConfig.js # 有关系统配置的接口
|
||||
│ │ └──systemFormConfig.js # 有关表单配置的接口
|
||||
│ │ └──systemGroup.js # 有关组合数据的接口
|
||||
│ │ └──systemSetting.js # 有关上传文件的接口
|
||||
│ │ └──user.js # 有关用户的接口
|
||||
│ │ └──wxApi.js # 有关微信的接口
|
||||
│ ├── assets # 图片、svg 等静态资源
|
||||
│ ├── components # 公共组件
|
||||
│ │ └──articleList # 文章列表
|
||||
│ │ └──attrFrom # 商品规格
|
||||
│ │ └──Breadcrumb # 头部标题标签
|
||||
│ │ └──cards # 统计小方块
|
||||
│ │ └──echarts # 统计图
|
||||
│ │ └──Category # 分类
|
||||
│ │ └──customerInfo # 用户列表
|
||||
│ │ └──FormGenerator # 表单配置
|
||||
│ │ └──couponList # 优惠劵列表
|
||||
│ │ └──goodsList # 商品列表
|
||||
│ │ └──Hamburger # 导航收缩组件
|
||||
│ │ └──HeaderSearch # 导航搜索组件
|
||||
│ │ └──iconFrom # 导航添加图标
|
||||
│ │ └──RightPanel # 右侧设置按钮,设置导航相关
|
||||
│ │ └──Screenfull # 全屏
|
||||
│ │ └──SvgIcon # svg图标
|
||||
│ │ └──Tinymce # 颜色选择
|
||||
│ │ └──ThemePicker # 右侧设置按钮,设置组题颜色
|
||||
│ │ └──templatesFrom # 运费模板
|
||||
│ │ └──ueditorFrom # 富文本编辑器
|
||||
│ │ └──uploadPicture # 上传图片组件
|
||||
│ │ └──Upload # 上传文件组件
|
||||
│ │ └──UploadExcel # 下载Excel
|
||||
│ │ └──userList # 用户列表
|
||||
│ ├── layouts # 导航布局
|
||||
│ │ ├──index # 主页面
|
||||
│ │ ├──components # 导航组件
|
||||
│ │ └──Settings # 右边小按钮,设置导航等
|
||||
│ │ └──Sidebar # 侧边导航
|
||||
│ │ └──TagsView # tab标签页导航
|
||||
│ │ └──Navbar # 头部导航
|
||||
│ │ └──AppMain # 导航路由
|
||||
│ │ └──index.js # 组件引用
|
||||
│ │ └──mixins # 自适应大小
|
||||
│ ├── libs # 公共js方法
|
||||
│ │ └──settingMer # 配置请求地址
|
||||
│ ├── views # 所有页面
|
||||
│ │ └──login # 登录
|
||||
│ │ └──index # 登录
|
||||
│ │ └──dashboard # 首页
|
||||
│ │ └──store # 商品
|
||||
│ │ └──creatStore # 添加商品
|
||||
│ │ └──storeAttr # 商品规格
|
||||
│ │ └──sort # 商品分类
|
||||
│ │ └──taoBao # 复制商品
|
||||
│ │ └──storeComment # 商品评论
|
||||
│ │ └──order # 订单管理
|
||||
│ │ └──marketing # 营销
|
||||
│ │ └──coupon # 优惠劵
|
||||
│ │ └──systemSetting # 设置
|
||||
│ │ └──administratorAuthority # 管理权限
|
||||
│ │ └──adminList # 管理员列表
|
||||
│ │ └──identityManager# 身份管理
|
||||
│ │ └──permissionRules# 权限规则
|
||||
│ │ └──logistics # 物流设置
|
||||
│ │ └──cityList # 城市数据
|
||||
│ │ └──companyList # 物流公司
|
||||
│ │ └──config # 物流配置
|
||||
│ │ └──shippingTemplates # 运费模板
|
||||
│ │ └──setting # 系统设置
|
||||
│ │ └──systemStore # 提货点设置
|
||||
│ │ └──appSetting # 应用 小程序 公众号设置
|
||||
│ │ └──content # 内容
|
||||
│ │ └──article # 文章管理
|
||||
│ │ └──articleclass # 文章分类
|
||||
│ │ └──datas # 统计数据
|
||||
│ │ └──user # 用户
|
||||
│ │ └──list # 用户管理
|
||||
│ │ └──grade # 用户等级/标签
|
||||
│ │ └──group # 用户分组
|
||||
│ │ └──distribution # 分销设置
|
||||
│ │ └──maintain # 维护
|
||||
│ │ └──devconfig # 组合数据
|
||||
│ │ └──formConfig # 表单配置
|
||||
│ │ └──financial # 财务
|
||||
│ │ └──error-page # 错误页
|
||||
│ │ └──404 # 错误页404
|
||||
│ │ └──403 # 错误页403
|
||||
│ ├── filters # 过滤器
|
||||
│ ├── router # 路由配置
|
||||
│ │ └──modules # 页面路由模块
|
||||
│ │ └──content.js # 有关内容 文章
|
||||
│ │ └──user.js # 有关用户
|
||||
│ │ └──appSetting.js # 有关应用
|
||||
│ │ └──marketing.js # 有关优惠券
|
||||
│ │ └──distribution.js # 有关分销
|
||||
│ │ └──order.js # 有关订单
|
||||
│ │ └──financial.js # 有关财务
|
||||
│ │ └──store.js # 有关商品
|
||||
│ │ └──maintain.js # 有关维护
|
||||
│ │ └──operation.js # 有关设置
|
||||
│ │ └──index.js # 路由的汇总
|
||||
│ ├── store # Vuex 状态管理
|
||||
│ ├── utils # 全局公用方法
|
||||
│ │ └──request.js # 请求封装
|
||||
│ │ └──settingMer.js # 请求地址配置
|
||||
│ ├── styles # 样式管理
|
||||
│ ├── permission.js # 路由拦截
|
||||
│ ├── main.js # 入口文件 加载组件 初始化等
|
||||
│ └── App.vue # 入口页面
|
||||
├── tests # 测试
|
||||
├── .env.xxx # 环境变量配置
|
||||
├── .eslintrc.js # eslint 配置项
|
||||
├── .babelrc # babel-loader 配置
|
||||
├── .travis.yml # 自动化CI配置
|
||||
├── vue.config.js # vue-cli 配置
|
||||
├── postcss.config.js # postcss 配置
|
||||
└── package.json # package.json
|
||||
|
||||
|
||||
~~~
|
||||
## 开发
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clone https://gitee.com/ZhongBangKeJi/crmeb_java/
|
||||
|
||||
# 进入项目目录
|
||||
cd ##
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||
npm install --registry=https://registry.npm.taobao.org
|
||||
|
||||
# 启动服务
|
||||
npm run dev
|
||||
```
|
||||
|
||||
浏览器访问 http://localhost:9527
|
||||
|
||||
## 发布
|
||||
|
||||
```bash
|
||||
# 构建测试环境
|
||||
npm run build:stage
|
||||
|
||||
# 构建生产环境
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## 其它
|
||||
|
||||
```bash
|
||||
# 预览发布环境效果
|
||||
npm run preview
|
||||
|
||||
# 预览发布环境效果 + 静态资源分析
|
||||
npm run preview -- --report
|
||||
|
||||
# 代码格式检查
|
||||
npm run lint
|
||||
|
||||
# 代码格式检查并自动修复
|
||||
npm run lint -- --fix
|
||||
```
|
||||
|
||||
|
||||
256
admin/README.md
@@ -1,256 +0,0 @@
|
||||
# CRMEB Admin
|
||||
## 开发规范
|
||||
统一使用ES6 语法
|
||||
方法注释
|
||||
/*
|
||||
* th => 表头
|
||||
* data => 数据
|
||||
* fileName => 文件名
|
||||
* fileType => 文件类型
|
||||
* sheetName => sheet页名
|
||||
*/
|
||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||
行注释 //
|
||||
|
||||
### 命名
|
||||
|
||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||
例如:商品模块
|
||||
store 商品
|
||||
├─ store 商品管理
|
||||
├─index.vue 首页
|
||||
├─ creatStore 新建商品
|
||||
├─ index.vue
|
||||
├─ sort 商品分类
|
||||
├─ index.vue
|
||||
├─storeAttr 商品规格
|
||||
├─ index.vue
|
||||
├─storeComment 商品评论
|
||||
├─ index.vue
|
||||
|
||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||
|
||||
类名函数命名 大驼峰式 例如:addUser
|
||||
变量命名 小驼峰式 例如:user 或者 userInfo
|
||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||
|
||||
### 文件管理规范
|
||||
views 页面模块必须件文件夹区分
|
||||
api 接口一个模块一个文件
|
||||
组建 一个组建一个文件夹
|
||||
plugins 插件一个插件一个文件夹
|
||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
||||
router 一个模块一个模块在modules 中建一个文件夹
|
||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||
|
||||
## 模块命名
|
||||
~~~
|
||||
├─ login 登录
|
||||
├─ dashboard 首页
|
||||
├─ store 商品管理
|
||||
├─ order 系统订单管理
|
||||
├─ distribution 分销
|
||||
├─ user 用户管理
|
||||
├─ content 内容管理
|
||||
├─ appSetting 各个应用模块功能管理公众号、小程序、支付宝、百度小程序、今日头条小程序
|
||||
├─ marketing 营销管理 优惠劵 积分
|
||||
├─ sms 设置 短信设置
|
||||
├─ systemSetting 设置 管理员权限 系统设置 物流设置
|
||||
├─ maintain 维护 配置分类 组合数据 表单配置
|
||||
├─ error-page 错误页
|
||||
|
||||
~~~
|
||||
## 目录结构
|
||||
主要目录结构及说明:
|
||||
~~~
|
||||
├── public # 静态资源
|
||||
│ ├── favicon.ico # favicon图标
|
||||
│ └── index.html # html 模板
|
||||
│ └── UEditor # 富文本编辑器插件
|
||||
├── src # 源代码
|
||||
│ ├── api # 所有请求
|
||||
│ │ └──user.js # 有关登录/用户的接口
|
||||
│ │ └──article.js # 有关内容的接口
|
||||
│ │ └──categoryApi.js # 有关配置的接口
|
||||
│ │ └──configTabApi.js # 有关配置分类的接口
|
||||
│ │ └──dashboard.js # 有关统计的接口
|
||||
│ │ └──distribution.js # 有关分销的接口
|
||||
│ │ └──logistics.js # 有关城市数据、物流配置的接口
|
||||
│ │ └──marketing.js # 有关优惠券的接口
|
||||
│ │ └──order.js # 有关订单的接口
|
||||
│ │ └──role.js # 有关权限的接口
|
||||
│ │ └──roleApi.js # 有关菜单的接口
|
||||
│ │ └──sms.js # 有关短信的接口
|
||||
│ │ └──store.js # 有关商品的接口
|
||||
│ │ └──storePoint.js # 有关提货点的接口
|
||||
│ │ └──productCreateApi.js # 有关附件上传的接口
|
||||
│ │ └──systemadmin.js # 有关管理员的接口
|
||||
│ │ └──systemConfig.js # 有关系统配置的接口
|
||||
│ │ └──systemFormConfig.js # 有关表单配置的接口
|
||||
│ │ └──systemGroup.js # 有关组合数据的接口
|
||||
│ │ └──systemSetting.js # 有关上传文件的接口
|
||||
│ │ └──user.js # 有关用户的接口
|
||||
│ │ └──wxApi.js # 有关微信的接口
|
||||
│ ├── assets # 图片、svg 等静态资源
|
||||
│ ├── components # 公共组件
|
||||
│ │ └──articleList # 文章列表
|
||||
│ │ └──attrFrom # 商品规格
|
||||
│ │ └──Breadcrumb # 头部标题标签
|
||||
│ │ └──cards # 统计小方块
|
||||
│ │ └──echarts # 统计图
|
||||
│ │ └──Category # 分类
|
||||
│ │ └──customerInfo # 用户列表
|
||||
│ │ └──FormGenerator # 表单配置
|
||||
│ │ └──couponList # 优惠劵列表
|
||||
│ │ └──goodsList # 商品列表
|
||||
│ │ └──Hamburger # 导航收缩组件
|
||||
│ │ └──HeaderSearch # 导航搜索组件
|
||||
│ │ └──iconFrom # 导航添加图标
|
||||
│ │ └──RightPanel # 右侧设置按钮,设置导航相关
|
||||
│ │ └──Screenfull # 全屏
|
||||
│ │ └──SvgIcon # svg图标
|
||||
│ │ └──Tinymce # 颜色选择
|
||||
│ │ └──ThemePicker # 右侧设置按钮,设置组题颜色
|
||||
│ │ └──templatesFrom # 运费模板
|
||||
│ │ └──ueditorFrom # 富文本编辑器
|
||||
│ │ └──uploadPicture # 上传图片组件
|
||||
│ │ └──Upload # 上传文件组件
|
||||
│ │ └──UploadExcel # 下载Excel
|
||||
│ │ └──userList # 用户列表
|
||||
│ ├── layouts # 导航布局
|
||||
│ │ ├──index # 主页面
|
||||
│ │ ├──components # 导航组件
|
||||
│ │ └──Settings # 右边小按钮,设置导航等
|
||||
│ │ └──Sidebar # 侧边导航
|
||||
│ │ └──TagsView # tab标签页导航
|
||||
│ │ └──Navbar # 头部导航
|
||||
│ │ └──AppMain # 导航路由
|
||||
│ │ └──index.js # 组件引用
|
||||
│ │ └──mixins # 自适应大小
|
||||
│ ├── libs # 公共js方法
|
||||
│ │ └──settingMer # 配置请求地址
|
||||
│ ├── views # 所有页面
|
||||
│ │ └──login # 登录
|
||||
│ │ └──index # 登录
|
||||
│ │ └──dashboard # 首页
|
||||
│ │ └──store # 商品
|
||||
│ │ └──creatStore # 添加商品
|
||||
│ │ └──storeAttr # 商品规格
|
||||
│ │ └──sort # 商品分类
|
||||
│ │ └──taoBao # 复制商品
|
||||
│ │ └──storeComment # 商品评论
|
||||
│ │ └──order # 订单管理
|
||||
│ │ └──marketing # 营销
|
||||
│ │ └──coupon # 优惠劵
|
||||
│ │ └──systemSetting # 设置
|
||||
│ │ └──administratorAuthority # 管理权限
|
||||
│ │ └──adminList # 管理员列表
|
||||
│ │ └──identityManager# 身份管理
|
||||
│ │ └──permissionRules# 权限规则
|
||||
│ │ └──logistics # 物流设置
|
||||
│ │ └──cityList # 城市数据
|
||||
│ │ └──companyList # 物流公司
|
||||
│ │ └──config # 物流配置
|
||||
│ │ └──shippingTemplates # 运费模板
|
||||
│ │ └──setting # 系统设置
|
||||
│ │ └──systemStore # 提货点设置
|
||||
│ │ └──appSetting # 应用 小程序 公众号设置
|
||||
│ │ └──content # 内容
|
||||
│ │ └──article # 文章管理
|
||||
│ │ └──articleclass # 文章分类
|
||||
│ │ └──datas # 统计数据
|
||||
│ │ └──user # 用户
|
||||
│ │ └──list # 用户管理
|
||||
│ │ └──grade # 用户等级/标签
|
||||
│ │ └──group # 用户分组
|
||||
│ │ └──distribution # 分销设置
|
||||
│ │ └──maintain # 维护
|
||||
│ │ └──devconfig # 组合数据
|
||||
│ │ └──formConfig # 表单配置
|
||||
│ │ └──financial # 财务
|
||||
│ │ └──error-page # 错误页
|
||||
│ │ └──404 # 错误页404
|
||||
│ │ └──403 # 错误页403
|
||||
│ ├── filters # 过滤器
|
||||
│ ├── router # 路由配置
|
||||
│ │ └──modules # 页面路由模块
|
||||
│ │ └──content.js # 有关内容 文章
|
||||
│ │ └──user.js # 有关用户
|
||||
│ │ └──appSetting.js # 有关应用
|
||||
│ │ └──marketing.js # 有关优惠券
|
||||
│ │ └──distribution.js # 有关分销
|
||||
│ │ └──order.js # 有关订单
|
||||
│ │ └──financial.js # 有关财务
|
||||
│ │ └──store.js # 有关商品
|
||||
│ │ └──maintain.js # 有关维护
|
||||
│ │ └──operation.js # 有关设置
|
||||
│ │ └──index.js # 路由的汇总
|
||||
│ ├── store # Vuex 状态管理
|
||||
│ ├── utils # 全局公用方法
|
||||
│ │ └──request.js # 请求封装
|
||||
│ │ └──settingMer.js # 请求地址配置
|
||||
│ ├── styles # 样式管理
|
||||
│ ├── permission.js # 路由拦截
|
||||
│ ├── main.js # 入口文件 加载组件 初始化等
|
||||
│ └── App.vue # 入口页面
|
||||
├── tests # 测试
|
||||
├── .env.xxx # 环境变量配置
|
||||
├── .eslintrc.js # eslint 配置项
|
||||
├── .babelrc # babel-loader 配置
|
||||
├── .travis.yml # 自动化CI配置
|
||||
├── vue.config.js # vue-cli 配置
|
||||
├── postcss.config.js # postcss 配置
|
||||
└── package.json # package.json
|
||||
|
||||
|
||||
~~~
|
||||
## 开发
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clone https://gitee.com/ZhongBangKeJi/crmeb_java/
|
||||
|
||||
# 进入项目目录
|
||||
cd ##
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||
npm install --registry=https://registry.npm.taobao.org
|
||||
|
||||
# 启动服务
|
||||
npm run dev
|
||||
```
|
||||
|
||||
浏览器访问 http://localhost:9527
|
||||
|
||||
## 发布
|
||||
|
||||
```bash
|
||||
# 构建测试环境
|
||||
npm run build:stage
|
||||
|
||||
# 构建生产环境
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## 其它
|
||||
|
||||
```bash
|
||||
# 预览发布环境效果
|
||||
npm run preview
|
||||
|
||||
# 预览发布环境效果 + 静态资源分析
|
||||
npm run preview -- --report
|
||||
|
||||
# 代码格式检查
|
||||
npm run lint
|
||||
|
||||
# 代码格式检查并自动修复
|
||||
npm run lint -- --fix
|
||||
```
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
# CRMEB Admin
|
||||
## 开发规范
|
||||
统一使用ES6 语法
|
||||
方法注释
|
||||
/*
|
||||
* th => 表头
|
||||
* data => 数据
|
||||
* fileName => 文件名
|
||||
* fileType => 文件类型
|
||||
* sheetName => sheet页名
|
||||
*/
|
||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||
行注释 //
|
||||
|
||||
### 命名
|
||||
|
||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||
例如:商品模块
|
||||
store 商品
|
||||
├─ store 商品管理
|
||||
├─index.vue 首页
|
||||
├─ creatStore 新建商品
|
||||
├─ index.vue
|
||||
├─ sort 商品分类
|
||||
├─ index.vue
|
||||
├─storeAttr 商品规格
|
||||
├─ index.vue
|
||||
├─storeComment 商品评论
|
||||
├─ index.vue
|
||||
|
||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||
|
||||
类名函数命名 大驼峰式 例如:addUser
|
||||
变量命名 小驼峰式 例如:user 或者 userInfo
|
||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||
|
||||
### 文件管理规范
|
||||
views 页面模块必须件文件夹区分
|
||||
api 接口一个模块一个文件
|
||||
组建 一个组建一个文件夹
|
||||
plugins 插件一个插件一个文件夹
|
||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
||||
router 一个模块一个模块在modules 中建一个文件夹
|
||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||
|
||||
## 模块命名
|
||||
~~~
|
||||
├─ login 登录
|
||||
├─ dashboard 首页
|
||||
├─ store 商品管理
|
||||
├─ order 系统订单管理
|
||||
├─ distribution 分销
|
||||
├─ user 用户管理
|
||||
├─ content 内容管理
|
||||
├─ appSetting 各个应用模块功能管理公众号、小程序、支付宝、百度小程序、今日头条小程序
|
||||
├─ marketing 营销管理 优惠劵 积分
|
||||
├─ sms 设置 短信设置
|
||||
├─ systemSetting 设置 管理员权限 系统设置 物流设置
|
||||
├─ maintain 维护 配置分类 组合数据 表单配置
|
||||
├─ error-page 错误页
|
||||
|
||||
~~~
|
||||
## 目录结构
|
||||
主要目录结构及说明:
|
||||
~~~
|
||||
├── public # 静态资源
|
||||
│ ├── favicon.ico # favicon图标
|
||||
│ └── index.html # html 模板
|
||||
│ └── UEditor # 富文本编辑器插件
|
||||
├── src # 源代码
|
||||
│ ├── api # 所有请求
|
||||
│ │ └──user.js # 有关登录/用户的接口
|
||||
│ │ └──article.js # 有关内容的接口
|
||||
│ │ └──categoryApi.js # 有关配置的接口
|
||||
│ │ └──configTabApi.js # 有关配置分类的接口
|
||||
│ │ └──dashboard.js # 有关统计的接口
|
||||
│ │ └──distribution.js # 有关分销的接口
|
||||
│ │ └──logistics.js # 有关城市数据、物流配置的接口
|
||||
│ │ └──marketing.js # 有关优惠券的接口
|
||||
│ │ └──order.js # 有关订单的接口
|
||||
│ │ └──role.js # 有关权限的接口
|
||||
│ │ └──roleApi.js # 有关菜单的接口
|
||||
│ │ └──sms.js # 有关短信的接口
|
||||
│ │ └──store.js # 有关商品的接口
|
||||
│ │ └──storePoint.js # 有关提货点的接口
|
||||
│ │ └──productCreateApi.js # 有关附件上传的接口
|
||||
│ │ └──systemadmin.js # 有关管理员的接口
|
||||
│ │ └──systemConfig.js # 有关系统配置的接口
|
||||
│ │ └──systemFormConfig.js # 有关表单配置的接口
|
||||
│ │ └──systemGroup.js # 有关组合数据的接口
|
||||
│ │ └──systemSetting.js # 有关上传文件的接口
|
||||
│ │ └──user.js # 有关用户的接口
|
||||
│ │ └──wxApi.js # 有关微信的接口
|
||||
│ ├── assets # 图片、svg 等静态资源
|
||||
│ ├── components # 公共组件
|
||||
│ │ └──articleList # 文章列表
|
||||
│ │ └──attrFrom # 商品规格
|
||||
│ │ └──Breadcrumb # 头部标题标签
|
||||
│ │ └──cards # 统计小方块
|
||||
│ │ └──echarts # 统计图
|
||||
│ │ └──Category # 分类
|
||||
│ │ └──customerInfo # 用户列表
|
||||
│ │ └──FormGenerator # 表单配置
|
||||
│ │ └──couponList # 优惠劵列表
|
||||
│ │ └──goodsList # 商品列表
|
||||
│ │ └──Hamburger # 导航收缩组件
|
||||
│ │ └──HeaderSearch # 导航搜索组件
|
||||
│ │ └──iconFrom # 导航添加图标
|
||||
│ │ └──RightPanel # 右侧设置按钮,设置导航相关
|
||||
│ │ └──Screenfull # 全屏
|
||||
│ │ └──SvgIcon # svg图标
|
||||
│ │ └──Tinymce # 颜色选择
|
||||
│ │ └──ThemePicker # 右侧设置按钮,设置组题颜色
|
||||
│ │ └──templatesFrom # 运费模板
|
||||
│ │ └──ueditorFrom # 富文本编辑器
|
||||
│ │ └──uploadPicture # 上传图片组件
|
||||
│ │ └──Upload # 上传文件组件
|
||||
│ │ └──UploadExcel # 下载Excel
|
||||
│ │ └──userList # 用户列表
|
||||
│ ├── layouts # 导航布局
|
||||
│ │ ├──index # 主页面
|
||||
│ │ ├──components # 导航组件
|
||||
│ │ └──Settings # 右边小按钮,设置导航等
|
||||
│ │ └──Sidebar # 侧边导航
|
||||
│ │ └──TagsView # tab标签页导航
|
||||
│ │ └──Navbar # 头部导航
|
||||
│ │ └──AppMain # 导航路由
|
||||
│ │ └──index.js # 组件引用
|
||||
│ │ └──mixins # 自适应大小
|
||||
│ ├── libs # 公共js方法
|
||||
│ │ └──settingMer # 配置请求地址
|
||||
│ ├── views # 所有页面
|
||||
│ │ └──login # 登录
|
||||
│ │ └──index # 登录
|
||||
│ │ └──dashboard # 首页
|
||||
│ │ └──store # 商品
|
||||
│ │ └──creatStore # 添加商品
|
||||
│ │ └──storeAttr # 商品规格
|
||||
│ │ └──sort # 商品分类
|
||||
│ │ └──taoBao # 复制商品
|
||||
│ │ └──storeComment # 商品评论
|
||||
│ │ └──order # 订单管理
|
||||
│ │ └──marketing # 营销
|
||||
│ │ └──coupon # 优惠劵
|
||||
│ │ └──systemSetting # 设置
|
||||
│ │ └──administratorAuthority # 管理权限
|
||||
│ │ └──adminList # 管理员列表
|
||||
│ │ └──identityManager# 身份管理
|
||||
│ │ └──permissionRules# 权限规则
|
||||
│ │ └──logistics # 物流设置
|
||||
│ │ └──cityList # 城市数据
|
||||
│ │ └──companyList # 物流公司
|
||||
│ │ └──config # 物流配置
|
||||
│ │ └──shippingTemplates # 运费模板
|
||||
│ │ └──setting # 系统设置
|
||||
│ │ └──systemStore # 提货点设置
|
||||
│ │ └──appSetting # 应用 小程序 公众号设置
|
||||
│ │ └──content # 内容
|
||||
│ │ └──article # 文章管理
|
||||
│ │ └──articleclass # 文章分类
|
||||
│ │ └──datas # 统计数据
|
||||
│ │ └──user # 用户
|
||||
│ │ └──list # 用户管理
|
||||
│ │ └──grade # 用户等级/标签
|
||||
│ │ └──group # 用户分组
|
||||
│ │ └──distribution # 分销设置
|
||||
│ │ └──maintain # 维护
|
||||
│ │ └──devconfig # 组合数据
|
||||
│ │ └──formConfig # 表单配置
|
||||
│ │ └──financial # 财务
|
||||
│ │ └──error-page # 错误页
|
||||
│ │ └──404 # 错误页404
|
||||
│ │ └──403 # 错误页403
|
||||
│ ├── filters # 过滤器
|
||||
│ ├── router # 路由配置
|
||||
│ │ └──modules # 页面路由模块
|
||||
│ │ └──content.js # 有关内容 文章
|
||||
│ │ └──user.js # 有关用户
|
||||
│ │ └──appSetting.js # 有关应用
|
||||
│ │ └──marketing.js # 有关优惠券
|
||||
│ │ └──distribution.js # 有关分销
|
||||
│ │ └──order.js # 有关订单
|
||||
│ │ └──financial.js # 有关财务
|
||||
│ │ └──store.js # 有关商品
|
||||
│ │ └──maintain.js # 有关维护
|
||||
│ │ └──operation.js # 有关设置
|
||||
│ │ └──index.js # 路由的汇总
|
||||
│ ├── store # Vuex 状态管理
|
||||
│ ├── utils # 全局公用方法
|
||||
│ │ └──request.js # 请求封装
|
||||
│ │ └──settingMer.js # 请求地址配置
|
||||
│ ├── styles # 样式管理
|
||||
│ ├── permission.js # 路由拦截
|
||||
│ ├── main.js # 入口文件 加载组件 初始化等
|
||||
│ └── App.vue # 入口页面
|
||||
├── tests # 测试
|
||||
├── .env.xxx # 环境变量配置
|
||||
├── .eslintrc.js # eslint 配置项
|
||||
├── .babelrc # babel-loader 配置
|
||||
├── .travis.yml # 自动化CI配置
|
||||
├── vue.config.js # vue-cli 配置
|
||||
├── postcss.config.js # postcss 配置
|
||||
└── package.json # package.json
|
||||
|
||||
|
||||
~~~
|
||||
## 开发
|
||||
|
||||
```bash
|
||||
# 克隆项目
|
||||
git clone https://gitee.com/ZhongBangKeJi/crmeb_java/
|
||||
|
||||
# 进入项目目录
|
||||
cd ##
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
||||
npm install --registry=https://registry.npm.taobao.org
|
||||
|
||||
# 启动服务
|
||||
npm run dev
|
||||
```
|
||||
|
||||
浏览器访问 http://localhost:9527
|
||||
|
||||
## 发布
|
||||
|
||||
```bash
|
||||
# 构建测试环境
|
||||
npm run build:stage
|
||||
|
||||
# 构建生产环境
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## 其它
|
||||
|
||||
```bash
|
||||
# 预览发布环境效果
|
||||
npm run preview
|
||||
|
||||
# 预览发布环境效果 + 静态资源分析
|
||||
npm run preview -- --report
|
||||
|
||||
# 代码格式检查
|
||||
npm run lint
|
||||
|
||||
# 代码格式检查并自动修复
|
||||
npm run lint -- --fix
|
||||
```
|
||||
894
admin/public/UEditor/dialogs/image/image.css
Normal file
@@ -0,0 +1,894 @@
|
||||
@charset "utf-8";
|
||||
/* dialog样式 */
|
||||
.wrapper {
|
||||
zoom: 1;
|
||||
width: 630px;
|
||||
*width: 626px;
|
||||
height: 380px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
/*tab样式框大小*/
|
||||
.tabhead {
|
||||
float:left;
|
||||
}
|
||||
.tabbody {
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tabbody .panel {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabbody .panel.focus {
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 图片对齐方式 */
|
||||
.alignBar{
|
||||
float:right;
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.alignBar .algnLabel{
|
||||
float:left;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.alignBar #alignIcon{
|
||||
zoom:1;
|
||||
_display: inline;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
.alignBar #alignIcon span{
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
width: 19px;
|
||||
height: 17px;
|
||||
margin-right: 3px;
|
||||
margin-left: 3px;
|
||||
background-image: url(./images/alignicon.jpg);
|
||||
}
|
||||
.alignBar #alignIcon .none-align{
|
||||
background-position: 0 -18px;
|
||||
}
|
||||
.alignBar #alignIcon .left-align{
|
||||
background-position: -20px -18px;
|
||||
}
|
||||
.alignBar #alignIcon .right-align{
|
||||
background-position: -40px -18px;
|
||||
}
|
||||
.alignBar #alignIcon .center-align{
|
||||
background-position: -60px -18px;
|
||||
}
|
||||
.alignBar #alignIcon .none-align.focus{
|
||||
background-position: 0 0;
|
||||
}
|
||||
.alignBar #alignIcon .left-align.focus{
|
||||
background-position: -20px 0;
|
||||
}
|
||||
.alignBar #alignIcon .right-align.focus{
|
||||
background-position: -40px 0;
|
||||
}
|
||||
.alignBar #alignIcon .center-align.focus{
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* 远程图片样式 */
|
||||
#remote {
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
#remote .top{
|
||||
width: 100%;
|
||||
margin-top: 25px;
|
||||
}
|
||||
#remote .left{
|
||||
display: block;
|
||||
float: left;
|
||||
width: 300px;
|
||||
height:10px;
|
||||
}
|
||||
#remote .right{
|
||||
display: block;
|
||||
float: right;
|
||||
width: 300px;
|
||||
height:10px;
|
||||
}
|
||||
#remote .row{
|
||||
margin-left: 20px;
|
||||
clear: both;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#remote .row label{
|
||||
text-align: center;
|
||||
width: 50px;
|
||||
zoom:1;
|
||||
_display: inline;
|
||||
display:inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#remote .row label.algnLabel{
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
#remote input.text{
|
||||
width: 150px;
|
||||
padding: 3px 6px;
|
||||
font-size: 14px;
|
||||
line-height: 1.42857143;
|
||||
color: #555;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
||||
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
}
|
||||
#remote input.text:focus {
|
||||
border-color: #66afe9;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
|
||||
}
|
||||
#remote #url{
|
||||
width: 500px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
#remote #width,
|
||||
#remote #height{
|
||||
width: 20px;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
#remote #border,
|
||||
#remote #vhSpace,
|
||||
#remote #title{
|
||||
width: 180px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#remote #lock{
|
||||
}
|
||||
#remote #lockicon{
|
||||
zoom: 1;
|
||||
_display:inline;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url("../../themes/default/images/lock.gif") -13px -13px no-repeat;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#remote #preview{
|
||||
clear: both;
|
||||
width: 260px;
|
||||
height: 240px;
|
||||
z-index: 9999;
|
||||
margin-top: 10px;
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 上传图片 */
|
||||
.tabbody #upload.panel {
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: absolute !important;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
background: #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabbody #upload.panel.focus {
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
display: block;
|
||||
clip: auto;
|
||||
}
|
||||
|
||||
#upload .queueList {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#upload p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.element-invisible {
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
position: absolute !important;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
}
|
||||
|
||||
#upload .placeholder {
|
||||
margin: 10px;
|
||||
border: 2px dashed #e6e6e6;
|
||||
*border: 0px dashed #e6e6e6;
|
||||
height: 172px;
|
||||
padding-top: 150px;
|
||||
text-align: center;
|
||||
background: url(./images/image.png) center 70px no-repeat;
|
||||
color: #cccccc;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top:0;
|
||||
*top: 10px;
|
||||
}
|
||||
|
||||
#upload .placeholder .webuploader-pick {
|
||||
font-size: 18px;
|
||||
background: #00b7ee;
|
||||
border-radius: 3px;
|
||||
line-height: 44px;
|
||||
padding: 0 30px;
|
||||
*width: 120px;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin: 0 auto 20px auto;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#upload .placeholder .webuploader-pick-hover {
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
|
||||
#filePickerContainer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#upload .placeholder .flashTip {
|
||||
color: #666666;
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
bottom: 20px;
|
||||
}
|
||||
|
||||
#upload .placeholder .flashTip a {
|
||||
color: #0785d1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#upload .placeholder .flashTip a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#upload .placeholder.webuploader-dnd-over {
|
||||
border-color: #999999;
|
||||
}
|
||||
|
||||
#upload .filelist {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
#upload .filelist:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#upload .filelist li {
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
background: url(./images/bg.png);
|
||||
text-align: center;
|
||||
margin: 9px 0 0 9px;
|
||||
*margin: 6px 0 0 6px;
|
||||
position: relative;
|
||||
display: block;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#upload .filelist li p.log {
|
||||
position: relative;
|
||||
top: -45px;
|
||||
}
|
||||
|
||||
#upload .filelist li p.title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
top: 5px;
|
||||
text-indent: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#upload .filelist li p.progress {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 8px;
|
||||
overflow: hidden;
|
||||
z-index: 50;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
-webkit-box-shadow: 0 0 0;
|
||||
}
|
||||
|
||||
#upload .filelist li p.progress span {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
height: 100%;
|
||||
background: #1483d8 url(./images/progress.png) repeat-x;
|
||||
|
||||
-webit-transition: width 200ms linear;
|
||||
-moz-transition: width 200ms linear;
|
||||
-o-transition: width 200ms linear;
|
||||
-ms-transition: width 200ms linear;
|
||||
transition: width 200ms linear;
|
||||
|
||||
-webkit-animation: progressmove 2s linear infinite;
|
||||
-moz-animation: progressmove 2s linear infinite;
|
||||
-o-animation: progressmove 2s linear infinite;
|
||||
-ms-animation: progressmove 2s linear infinite;
|
||||
animation: progressmove 2s linear infinite;
|
||||
|
||||
-webkit-transform: translateZ(0);
|
||||
}
|
||||
|
||||
@-webkit-keyframes progressmove {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 17px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes progressmove {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 17px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progressmove {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 17px 0;
|
||||
}
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
line-height: 113px;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-moz-transform-origin: 50% 50%;
|
||||
-o-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
|
||||
-webit-transition: 200ms ease-out;
|
||||
-moz-transition: 200ms ease-out;
|
||||
-o-transition: 200ms ease-out;
|
||||
-ms-transition: 200ms ease-out;
|
||||
transition: 200ms ease-out;
|
||||
}
|
||||
|
||||
#upload .filelist li img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#upload .filelist li p.error {
|
||||
background: #f43838;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#upload .filelist li .success {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
z-index: 200;
|
||||
background: url(./images/success.png) no-repeat right bottom;
|
||||
background: url(./images/success.gif) no-repeat right bottom \9;
|
||||
}
|
||||
|
||||
#upload .filelist li.filePickerBlock {
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
background: url(./images/image.png) no-repeat center 12px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 0;
|
||||
}
|
||||
#upload .filelist li.filePickerBlock div.webuploader-pick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
background: none;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel {
|
||||
position: absolute;
|
||||
height: 0;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
z-index: 300;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline;
|
||||
float: right;
|
||||
text-indent: -9999px;
|
||||
overflow: hidden;
|
||||
background: url(./images/icons.png) no-repeat;
|
||||
background: url(./images/icons.gif) no-repeat \9;
|
||||
margin: 5px 1px 1px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft {
|
||||
display:none;
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft:hover {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight {
|
||||
display:none;
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight:hover {
|
||||
background-position: -24px 0;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.cancel {
|
||||
background-position: -48px -24px;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.cancel:hover {
|
||||
background-position: -48px 0;
|
||||
}
|
||||
|
||||
#upload .statusBar {
|
||||
height: 45px;
|
||||
border-bottom: 1px solid #dadada;
|
||||
margin: 0 10px;
|
||||
padding: 0;
|
||||
line-height: 45px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress {
|
||||
border: 1px solid #1483d8;
|
||||
width: 198px;
|
||||
background: #fff;
|
||||
height: 18px;
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
display: none;
|
||||
text-align: center;
|
||||
line-height: 18px;
|
||||
color: #6dbfff;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
#upload .statusBar .progress span.percentage {
|
||||
width: 0;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #1483d8;
|
||||
position: absolute;
|
||||
}
|
||||
#upload .statusBar .progress span.text {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#upload .statusBar .info {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 0;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
#filePickerBtn {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
#upload .statusBar .btns .webuploader-pick,
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||
background: #ffffff;
|
||||
border: 1px solid #cfcfcf;
|
||||
color: #565656;
|
||||
padding: 0 18px;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
#upload .statusBar .btns .webuploader-pick-hover,
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused{
|
||||
background: #00b7ee;
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
}
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover{
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn.disabled {
|
||||
pointer-events: none;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
-khtml-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 图片管理样式 */
|
||||
#online {
|
||||
width: 100%;
|
||||
height: 336px;
|
||||
padding: 10px 0 0 0;
|
||||
}
|
||||
#online #imageList{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
#online ul {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#online li {
|
||||
float: left;
|
||||
display: block;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
margin: 0 0 9px 9px;
|
||||
*margin: 0 0 6px 6px;
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
#online li.clearFloat {
|
||||
float: none;
|
||||
clear: both;
|
||||
display: block;
|
||||
width:0;
|
||||
height:0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#online li img {
|
||||
cursor: pointer;
|
||||
}
|
||||
#online li .icon {
|
||||
cursor: pointer;
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
border: 0;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
#online li .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
border: 3px solid #1094fa;
|
||||
}
|
||||
#online li.selected .icon {
|
||||
background-image: url(images/success.png);
|
||||
background-image: url(images/success.gif)\9;
|
||||
background-position: 75px 75px;
|
||||
}
|
||||
#online li.selected .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
border: 3px solid #1094fa;
|
||||
background-position: 72px 72px;
|
||||
}
|
||||
|
||||
|
||||
/* 图片搜索样式 */
|
||||
#search .searchBar {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
margin: 10px 0 5px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#search input.text{
|
||||
width: 150px;
|
||||
padding: 3px 6px;
|
||||
font-size: 14px;
|
||||
line-height: 1.42857143;
|
||||
color: #555;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
||||
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
}
|
||||
#search input.text:focus {
|
||||
border-color: #66afe9;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
|
||||
}
|
||||
#search input.searchTxt {
|
||||
margin-left:5px;
|
||||
padding-left: 5px;
|
||||
background: #FFF;
|
||||
width: 300px;
|
||||
*width: 260px;
|
||||
height: 21px;
|
||||
line-height: 21px;
|
||||
float: left;
|
||||
dislay: block;
|
||||
}
|
||||
|
||||
#search .searchType {
|
||||
width: 65px;
|
||||
height: 28px;
|
||||
padding:0;
|
||||
line-height: 28px;
|
||||
border: 1px solid #d7d7d7;
|
||||
border-radius: 0;
|
||||
vertical-align: top;
|
||||
margin-left: 5px;
|
||||
float: left;
|
||||
dislay: block;
|
||||
}
|
||||
|
||||
#search #searchBtn,
|
||||
#search #searchReset {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
margin-right: 5px;
|
||||
padding: 4px 10px;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
vertical-align: top;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#search #searchBtn {
|
||||
color: white;
|
||||
border-color: #285e8e;
|
||||
background-color: #3b97d7;
|
||||
}
|
||||
#search #searchReset {
|
||||
color: #333;
|
||||
border-color: #ccc;
|
||||
background-color: #fff;
|
||||
}
|
||||
#search #searchBtn:hover {
|
||||
background-color: #3276b1;
|
||||
}
|
||||
#search #searchReset:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#search .msg {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#search .searchList{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
}
|
||||
#search .searchList ul{
|
||||
margin:0;
|
||||
padding:0;
|
||||
list-style:none;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
zoom: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#search .searchList li {
|
||||
list-style:none;
|
||||
float: left;
|
||||
display: block;
|
||||
width: 115px;
|
||||
margin: 5px 10px 5px 20px;
|
||||
*margin: 5px 10px 5px 15px;
|
||||
padding:0;
|
||||
font-size: 12px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
filter: alpha(Opacity=100);
|
||||
-moz-opacity: 1;
|
||||
opacity: 1;
|
||||
border: 2px solid #eee;
|
||||
}
|
||||
|
||||
#search .searchList li.selected {
|
||||
filter: alpha(Opacity=40);
|
||||
-moz-opacity: 0.4;
|
||||
opacity: 0.4;
|
||||
border: 2px solid #00a0e9;
|
||||
}
|
||||
|
||||
#search .searchList li p {
|
||||
background-color: #eee;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
width:100%;
|
||||
height:115px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#search .searchList li p img {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#search .searchList li a {
|
||||
color: #999;
|
||||
border-top: 1px solid #F2F2F2;
|
||||
background: #FAFAFA;
|
||||
text-align: center;
|
||||
display: block;
|
||||
padding: 0 5px;
|
||||
width: 105px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
white-space:nowrap;
|
||||
text-overflow:ellipsis;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
#search .searchList a:hover {
|
||||
text-decoration: underline;
|
||||
color: #333;
|
||||
}
|
||||
#search .searchList .clearFloat{
|
||||
clear: both;
|
||||
}
|
||||
120
admin/public/UEditor/dialogs/image/image.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ueditor图片对话框</title>
|
||||
<script type="text/javascript" src="../internal.js"></script>
|
||||
|
||||
<!-- jquery -->
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
|
||||
|
||||
<!-- webuploader -->
|
||||
<script src="../../third-party/webuploader/webuploader.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
|
||||
|
||||
<!-- image dialog -->
|
||||
<link rel="stylesheet" href="image.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="wrapper">
|
||||
<div id="tabhead" class="tabhead">
|
||||
<span class="tab" data-content-id="remote"><var id="lang_tab_remote"></var></span>
|
||||
<span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
|
||||
<span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
|
||||
<span class="tab" data-content-id="search"><var id="lang_tab_search"></var></span>
|
||||
</div>
|
||||
<div class="alignBar">
|
||||
<label class="algnLabel"><var id="lang_input_align"></var></label>
|
||||
<span id="alignIcon">
|
||||
<span id="noneAlign" class="none-align focus" data-align="none"></span>
|
||||
<span id="leftAlign" class="left-align" data-align="left"></span>
|
||||
<span id="rightAlign" class="right-align" data-align="right"></span>
|
||||
<span id="centerAlign" class="center-align" data-align="center"></span>
|
||||
</span>
|
||||
<input id="align" name="align" type="hidden" value="none"/>
|
||||
</div>
|
||||
<div id="tabbody" class="tabbody">
|
||||
|
||||
<!-- 远程图片 -->
|
||||
<div id="remote" class="panel">
|
||||
<div class="top">
|
||||
<div class="row">
|
||||
<label for="url"><var id="lang_input_url"></var></label>
|
||||
<span><input class="text" id="url" type="text"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="row">
|
||||
<label><var id="lang_input_size"></var></label>
|
||||
<span><var id="lang_input_width"> </var><input class="text" type="text" id="width"/>px </span>
|
||||
<span><var id="lang_input_height"> </var><input class="text" type="text" id="height"/>px </span>
|
||||
<span><input id="lock" type="checkbox" disabled="disabled"><span id="lockicon"></span></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><var id="lang_input_border"></var></label>
|
||||
<span><input class="text" type="text" id="border"/>px </span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><var id="lang_input_vhspace"></var></label>
|
||||
<span><input class="text" type="text" id="vhSpace"/>px </span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label><var id="lang_input_title"></var></label>
|
||||
<span><input class="text" type="text" id="title"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right"><div id="preview"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- 上传图片 -->
|
||||
<div id="upload" class="panel focus">
|
||||
<div id="queueList" class="queueList">
|
||||
<div class="statusBar element-invisible">
|
||||
<div class="progress">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage"></span>
|
||||
</div><div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePickerBtn"></div>
|
||||
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dndArea" class="placeholder">
|
||||
<div class="filePickerContainer">
|
||||
<div id="filePickerReady"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="filelist element-invisible">
|
||||
<li id="filePickerBlock" class="filePickerBlock"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 在线图片 -->
|
||||
<div id="online" class="panel">
|
||||
<div id="imageList"><var id="lang_imgLoading"></var></div>
|
||||
</div>
|
||||
|
||||
<!-- 搜索图片 -->
|
||||
<div id="search" class="panel">
|
||||
<div class="searchBar">
|
||||
<input id="searchTxt" class="searchTxt text" type="text" />
|
||||
<select id="searchType" class="searchType">
|
||||
<option value="&s=4&z=0"></option>
|
||||
<option value="&s=1&z=19"></option>
|
||||
<option value="&s=2&z=0"></option>
|
||||
<option value="&s=3&z=0"></option>
|
||||
</select>
|
||||
<input id="searchReset" type="button" />
|
||||
<input id="searchBtn" type="button" />
|
||||
</div>
|
||||
<div id="searchList" class="searchList"><ul id="searchListUl"></ul></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="image.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1148
admin/public/UEditor/dialogs/image/image.js
Normal file
BIN
admin/public/UEditor/dialogs/image/images/alignicon.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
admin/public/UEditor/dialogs/image/images/bg.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
admin/public/UEditor/dialogs/image/images/icons.gif
Normal file
|
After Width: | Height: | Size: 453 B |
BIN
admin/public/UEditor/dialogs/image/images/icons.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
admin/public/UEditor/dialogs/image/images/image.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
admin/public/UEditor/dialogs/image/images/progress.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
admin/public/UEditor/dialogs/image/images/success.gif
Normal file
|
After Width: | Height: | Size: 445 B |
BIN
admin/public/UEditor/dialogs/image/images/success.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
@@ -79,7 +79,8 @@ export function listCategroy(pram) {
|
||||
export function treeCategroy(pram) {
|
||||
const data = {
|
||||
type: pram.type,
|
||||
status: pram.status
|
||||
status: pram.status,
|
||||
name: pram.name
|
||||
}
|
||||
return request({
|
||||
url: '/admin/category/list/tree',
|
||||
|
||||
133
admin/src/api/financial.js
Normal file
@@ -0,0 +1,133 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 提现申请 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function applyListApi(params) {
|
||||
return request({
|
||||
url: '/admin/finance/apply/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现申请 金额
|
||||
* @param pram
|
||||
*/
|
||||
export function applyBalanceApi(params) {
|
||||
return request({
|
||||
url: '/admin/finance/apply/balance',
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现申请 修改
|
||||
* @param pram
|
||||
*/
|
||||
export function applyUpdateApi(params) {
|
||||
return request({
|
||||
url: '/admin/finance/apply/update',
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现申请 审核
|
||||
* @param pram
|
||||
*/
|
||||
export function applyStatusApi(params, data) {
|
||||
return request({
|
||||
url: '/admin/finance/apply/apply',
|
||||
method: 'post',
|
||||
params,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function topUpLogListApi(params) {
|
||||
return request({
|
||||
url: '/admin/user/topUpLog/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值 金额
|
||||
* @param pram
|
||||
*/
|
||||
export function balanceApi() {
|
||||
return request({
|
||||
url: '/admin/user/topUpLog/balance',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值 删除
|
||||
* @param pram
|
||||
*/
|
||||
export function topUpLogDeleteApi(params) {
|
||||
return request({
|
||||
url: '/admin/user/topUpLog/delete',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 资金监控 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function monitorListApi(params) {
|
||||
return request({
|
||||
url: '/admin/finance/founds/monitor/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 资金监控 佣金详细记录
|
||||
* @param pram
|
||||
*/
|
||||
export function monitorListDetailApi(userId, params) {
|
||||
return request({
|
||||
url: `/admin/finance/founds/monitor/list/user/detail/${userId}`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 资金监控 明细类型
|
||||
* @param pram
|
||||
*/
|
||||
export function monitorListOptionApi() {
|
||||
return request({
|
||||
url: `/admin/finance/founds/monitor/list/option`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 佣金记录 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function brokerageListApi(params) {
|
||||
return request({
|
||||
url: '/admin/finance/founds/monitor/list/user',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -85,3 +85,148 @@ export function integralListApi(params, data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀配置 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillListApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/manger/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀配置 详情
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillInfoApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/manger/info',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀配置 新增
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillSaveApi(data) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/manger/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀配置 修改
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillUpdateApi(params, data) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/manger/update',
|
||||
method: 'post',
|
||||
params,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀配置 删除
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillDeleteApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/manger/delete',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀商品 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillStoreListApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀商品 详情
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillStoreInfoApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/info',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀商品 新增
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillStoreSaveApi(data) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀商品 修改
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillStoreUpdateApi(params, data) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/update',
|
||||
method: 'post',
|
||||
params,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀商品 删除
|
||||
* @param pram
|
||||
*/
|
||||
export function seckillStoreDeleteApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/delete',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀商品 修改状态
|
||||
*/
|
||||
export function seckillStoreStatusApi(params) {
|
||||
return request({
|
||||
url: '/admin/store/seckill/update/status',
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀配置 修改状态
|
||||
*/
|
||||
export function seckillConfigStatusApi(id,params) {
|
||||
return request({
|
||||
url: `/admin/store/seckill/manger/update/status/${id}`,
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
prop="name"
|
||||
:rules="[{ required:true,message:'请输入分类名称',trigger:['blur','change'] }]"
|
||||
>
|
||||
<el-input v-model="editPram.name" :maxlength="biztype.value === 1 ? 5 : 20" placeholder="分类名称" />
|
||||
<el-input v-model="editPram.name" :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="URL">
|
||||
<el-input v-model="editPram.url" placeholder="URL" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父级" v-if="biztype.value!==3">
|
||||
<el-cascader v-model="editPram.pid" :options="biztype.value === 5 ? allTreeList : parentOptions" :props="categoryProps" style="width:100%" />
|
||||
<el-cascader v-model="editPram.pid" :disabled="isCreate ===1 && editPram.pid ===0" :options="biztype.value === 5 ? allTreeList : parentOptions" :props="categoryProps" style="width:100%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单图标" v-if="biztype.value===5">
|
||||
<el-input placeholder="请选择菜单图标" v-model="editPram.extra">
|
||||
@@ -128,11 +128,8 @@ export default {
|
||||
initEditData() {
|
||||
this.parentOptions = [...this.allTreeList]
|
||||
this.addTreeListLabelForCasCard(this.parentOptions, 'child')
|
||||
if (this.isCreate !== 1) {
|
||||
const { id } = this.prent
|
||||
this.editPram.pid = id
|
||||
} else {
|
||||
const { extra, name, pid, sort, status, type, id, url } = this.editData
|
||||
const { extra, name, pid, sort, status, type, id, url } = this.editData
|
||||
if(this.isCreate === 1){
|
||||
this.editPram.extra = extra
|
||||
this.editPram.name = name
|
||||
this.editPram.pid = pid
|
||||
@@ -141,6 +138,9 @@ export default {
|
||||
this.editPram.type = type
|
||||
this.editPram.url = url
|
||||
this.editPram.id = id
|
||||
}else{
|
||||
this.editPram.pid = this.prent.id
|
||||
this.editPram.type = this.biztype.value
|
||||
}
|
||||
},
|
||||
addTreeListLabelForCasCard(arr, child) {
|
||||
@@ -161,12 +161,14 @@ export default {
|
||||
},
|
||||
handlerSaveOrUpdate(isSave) {
|
||||
if (isSave) {
|
||||
this.editPram.pid = this.prent.id
|
||||
// this.editPram.pid = this.prent.id
|
||||
this.loadingBtn = true
|
||||
categoryApi.addCategroy(this.editPram).then(data => {
|
||||
this.$emit('hideEditDialog')
|
||||
this.$message.success('创建目录成功')
|
||||
this.loadingBtn = false
|
||||
}).catch(() => {
|
||||
this.loadingBtn = false
|
||||
})
|
||||
} else {
|
||||
this.editPram.pid = Array.isArray(this.editPram.pid) ? this.editPram.pid[0] : this.editPram.pid
|
||||
@@ -175,6 +177,8 @@ export default {
|
||||
this.$emit('hideEditDialog')
|
||||
this.$message.success('更新目录成功')
|
||||
this.loadingBtn = false
|
||||
}).catch(() => {
|
||||
this.loadingBtn = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="container">
|
||||
<el-form inline size="small">
|
||||
<el-form-item>
|
||||
<el-select v-model="listPram.status" placeholder="状态" clearable class="selWidth">
|
||||
<el-select v-model="listPram.status" placeholder="状态" class="selWidth">
|
||||
<el-option
|
||||
v-for="item in constants.roleListStatus"
|
||||
:key="item.value"
|
||||
@@ -86,7 +86,7 @@
|
||||
<el-table-column label="操作" min-width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="(biztype.value === 1 && scope.row.pid === 0) || (biztype.value !== 1)"
|
||||
v-if="(biztype.value === 1 && scope.row.pid === 0) || biztype.value === 5"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleAddMenu(scope.row)"
|
||||
@@ -179,10 +179,10 @@ export default {
|
||||
dataList: [],
|
||||
treeList: [],
|
||||
listPram: {
|
||||
pid: this.pid,
|
||||
pid: this.pid,
|
||||
type: this.biztype.value,
|
||||
status: null,
|
||||
name: null,
|
||||
status: -1,
|
||||
name: '',
|
||||
page: constants.page.page,
|
||||
limit: constants.page.limit[0]
|
||||
},
|
||||
@@ -193,10 +193,10 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// if(this.biztype.value === 3){
|
||||
// this.listPram.pageSize = constants.page.pageSize[4]
|
||||
// this.handlerGetList()
|
||||
// }else{
|
||||
/* if(this.biztype.value === 3){
|
||||
this.listPram.pageSize = constants.page.pageSize[4]
|
||||
this.handlerGetList()
|
||||
}else{*/
|
||||
this.handlerGetTreeList()
|
||||
// }
|
||||
},
|
||||
@@ -254,13 +254,15 @@ export default {
|
||||
})
|
||||
},
|
||||
handlerGetList() {
|
||||
categoryApi.listCategroy(this.listPram).then(data => {
|
||||
this.treeList = data.list
|
||||
})
|
||||
this.handlerGetTreeList();
|
||||
// categoryApi.listCategroy({status:this.listPram.status, type: 1 }).then(data => {
|
||||
// this.treeList = data.list
|
||||
// })
|
||||
},
|
||||
handlerGetTreeList() {
|
||||
// this.biztype.value === 5 && !this.selectModel) ? -1 : 1
|
||||
const _pram = { type: this.biztype.value, status: !this.selectModel ? -1 : (this.biztype.value === 5 ? -1 : 1) }
|
||||
// const _pram = { type: this.biztype.value, status: !this.selectModel ? -1 : (this.biztype.value === 5 ? -1 : 1) }
|
||||
const _pram = { type: this.biztype.value, status: this.listPram.status, name: this.listPram.name }
|
||||
this.loading = true
|
||||
this.biztype.value!==3 ? categoryApi.treeCategroy(_pram).then(data => {
|
||||
this.treeList = this.handleAddArrt(data)
|
||||
@@ -279,7 +281,6 @@ export default {
|
||||
console.log('data:', data)
|
||||
},
|
||||
handleAddArrt(treeData) {
|
||||
// let _result = this.addTreeListLabel(treeData)
|
||||
const _result = selfUtil.addTreeListLabel(treeData)
|
||||
return _result
|
||||
},
|
||||
|
||||
@@ -384,6 +384,28 @@ export const selectComponents = [
|
||||
format: 'HH:mm:ss',
|
||||
'value-format': 'HH:mm:ss'
|
||||
},
|
||||
{
|
||||
__config__: {
|
||||
label: '固定时间范围',
|
||||
tag: 'time-select',
|
||||
tagIcon: 'time-select',
|
||||
span: 24,
|
||||
showLabel: true,
|
||||
labelWidth: null,
|
||||
layout: 'colFormItem',
|
||||
defaultValue: null,
|
||||
required: true,
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/time-picker'
|
||||
},
|
||||
style: { width: '100%' },
|
||||
disabled: false,
|
||||
clearable: true,
|
||||
placeholder: '请选择',
|
||||
format: 'HH:mm',
|
||||
'value-format': 'HH:mm'
|
||||
},
|
||||
{
|
||||
__config__: {
|
||||
label: '日期选择',
|
||||
|
||||
@@ -57,7 +57,7 @@ function buildFromBtns(scheme, type) {
|
||||
if (scheme.formBtns && type === 'file') {
|
||||
str = `<el-form-item size="large">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button @click="resetForm">取消</el-button>
|
||||
</el-form-item>`
|
||||
if (someSpanIsNot24) {
|
||||
str = `<el-col :span="24">
|
||||
@@ -304,6 +304,11 @@ const tags = {
|
||||
const height = el.height ? `:height="${el.height}"` : ''
|
||||
return `<${tag} ${vModel}${height} >`
|
||||
},
|
||||
'time-select': el => {
|
||||
const { tag, vModel } = attrBuilder(el)
|
||||
const height = el.height ? `:height="${el.height}"` : ''
|
||||
return `<${tag} ${vModel}${height} >`
|
||||
},
|
||||
tinymce: el => {
|
||||
const { tag, vModel } = attrBuilder(el)
|
||||
const branding = el.branding ? `:branding="${el.branding}"` : ''
|
||||
|
||||
@@ -13,5 +13,7 @@ export default {
|
||||
'el-time-picker': 'change',
|
||||
'el-date-picker': 'change',
|
||||
'el-rate': 'change',
|
||||
tinymce: 'blur'
|
||||
tinymce: 'blur',
|
||||
'time-select': 'change'
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ function formBtns(h) {
|
||||
return <el-col>
|
||||
<el-form-item size='mini'>
|
||||
<el-button type='primary' onClick={this.submitForm}>提交</el-button>
|
||||
<el-button onClick={this.resetForm}>重置</el-button>
|
||||
<el-button onClick={this.resetForm}>取消</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
}
|
||||
@@ -188,6 +188,7 @@ export default {
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.$emit('resetForm', this.formConf)
|
||||
this.formConfCopy = JSON.parse(JSON.stringify(this.formConf))
|
||||
this.$refs[this.formConf.formRef].resetFields()
|
||||
},
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:form-conf="formConf"
|
||||
:form-edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
<!-- editData:{{ editData }}-->
|
||||
<!-- formConf:{{ formConf }}-->
|
||||
@@ -54,6 +55,9 @@ export default {
|
||||
},
|
||||
handlerSubmit(formValue) {
|
||||
this.$emit('submit', formValue)
|
||||
},
|
||||
resetForm(formValue){
|
||||
this.$emit('resetForm', formValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
admin/src/components/TimeSelect/index.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-time-select
|
||||
placeholder="起始时间"
|
||||
v-model="startTime"
|
||||
:picker-options="{
|
||||
start: '00:00',
|
||||
step: '01:00',
|
||||
end: '24:00'
|
||||
}">
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
placeholder="结束时间"
|
||||
v-model="endTime"
|
||||
:picker-options="{
|
||||
start: '00:00',
|
||||
step: '01:00',
|
||||
end: '24:00',
|
||||
minTime: startTime
|
||||
}">
|
||||
</el-time-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {}
|
||||
},
|
||||
beforeMount(){
|
||||
// 接收 v-model 数据
|
||||
if(this.value){
|
||||
this.startTime = this.value.split(',')[0]
|
||||
this.endTime = this.value.split(',')[1]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
startTime: function(val) {
|
||||
this.$emit('input', [val, this.endTime].join(','))
|
||||
},
|
||||
endTime: function(val) {
|
||||
this.$emit('input', [this.startTime, val].join(','))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-form inline size="small">
|
||||
<el-form-item label="优惠劵名称:">
|
||||
<el-input v-model="tableFrom.name" placeholder="请输入优惠券名称" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList" />
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -228,8 +228,9 @@ export default {
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
getList() {
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
||||
marketingListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
<div class="container">
|
||||
<el-form inline>
|
||||
<el-form-item label="商品分类:">
|
||||
<el-cascader v-model="tableFrom.cateId" :options="merCateList" :props="props" clearable class="selWidth mr20" @change="getList"/>
|
||||
<el-cascader v-model="tableFrom.cateId" :options="merCateList" :props="props" clearable class="selWidth mr20" @change="getList(1)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品搜索:">
|
||||
<!--<el-input v-model="tableFrom.keywords" placeholder="请输入内容"></el-input>-->
|
||||
|
||||
<el-input v-model="tableFrom.keywords" @input="onInput()" placeholder="请输入商品名称,关键字,产品编号" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList"/>
|
||||
<el-input v-model="tableFrom.keywords" @input="onInput($event)" placeholder="请输入商品名称,关键字,产品编号" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -151,7 +149,7 @@ export default {
|
||||
this.getCategorySelect()
|
||||
},
|
||||
methods: {
|
||||
onInput(){
|
||||
onInput(e){
|
||||
this.$forceUpdate();
|
||||
},
|
||||
changeType(v) {
|
||||
@@ -221,8 +219,9 @@ export default {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
productLstApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<img :src="item.sattDir">
|
||||
<i class="el-icon-error btndel" @click="handleRemove(index)" />
|
||||
</div>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('2')">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('2')" v-show="imageList.length<20">
|
||||
<div class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
@@ -31,7 +31,7 @@
|
||||
:visible.sync="visible"
|
||||
width="896px"
|
||||
:before-close="handleClose"
|
||||
z-index="3004"
|
||||
:modal="false"
|
||||
>
|
||||
<upload-index v-if="visible" :checkedMore="imageList" :isMore="isMore" @getImage="getImage" />
|
||||
</el-dialog>
|
||||
@@ -98,7 +98,7 @@ export default {
|
||||
},
|
||||
handleRemove (i) {
|
||||
this.imageList.splice(i, 1)
|
||||
this.$emit('input', this.imageList.join(','))
|
||||
this.$emit('input', JSON.stringify(this.imageList))
|
||||
},
|
||||
// 移动
|
||||
handleDragStart (e, item) {
|
||||
|
||||
@@ -112,8 +112,9 @@
|
||||
:key="index"
|
||||
class="gridPic"
|
||||
>
|
||||
<img v-if="index === 0" v-lazy="item.localImg?item.localImg:item.sattDir" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
|
||||
<img v-else v-lazy="item.sattDir?item.sattDir:localImg" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
|
||||
<img v-lazy="item.sattDir?item.sattDir:localImg" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
|
||||
<!--<img v-if="index === 0" v-lazy="item.localImg?item.localImg:item.sattDir" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />-->
|
||||
<!--<img v-else v-lazy="item.sattDir?item.sattDir:localImg" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,6 +124,7 @@
|
||||
:page-sizes="[12, 24, 48, 60]"
|
||||
:page-size="tableData.limit"
|
||||
:current-page="tableData.page"
|
||||
:pager-count="5"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pictrueList.total"
|
||||
@size-change="handleSizeChange"
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<el-dialog
|
||||
title="上传图片"
|
||||
:visible.sync="visible"
|
||||
width="896px"
|
||||
width="950px"
|
||||
:modal="false"
|
||||
append-to-body
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<upload-index v-if="visible" :isMore="isMore" :modelName="modelName" @getImage="getImage" />
|
||||
@@ -22,7 +23,8 @@ export default {
|
||||
visible: false,
|
||||
callback: function() {},
|
||||
isMore: '',
|
||||
modelName: ''
|
||||
modelName: '',
|
||||
ISmodal: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -13,10 +13,8 @@ export function filterEmpty(val) {
|
||||
|
||||
// 时间过滤器
|
||||
export function formatDate(time) {
|
||||
console.log(time)
|
||||
if (time !== 0) {
|
||||
const date = new Date(time * 1000);
|
||||
console.log(date)
|
||||
return formatDates(date, 'yyyy-MM-dd hh:mm');
|
||||
}
|
||||
}
|
||||
@@ -96,3 +94,50 @@ export function articleTypeFilter(status) {
|
||||
return arrayList.filter(item => Number(status) === Number(item.id))[0].name
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 支付状态
|
||||
*/
|
||||
export function payStatusFilter(status) {
|
||||
const statusMap = {
|
||||
false: '未支付',
|
||||
true: '已支付'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 提现方式
|
||||
*/
|
||||
export function extractTypeFilter(status) {
|
||||
const statusMap = {
|
||||
'bank': '银行卡',
|
||||
'alipay': '支付宝',
|
||||
'weixin': '微信'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 充值类型
|
||||
*/
|
||||
export function rechargeTypeFilter(status) {
|
||||
const statusMap = {
|
||||
'public': '微信公众号',
|
||||
'weixinh5': '微信H5支付',
|
||||
'routine': '小程序'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 财务审核状态
|
||||
*/
|
||||
export function extractStatusFilter(status) {
|
||||
const statusMap = {
|
||||
'-1': '已拒绝',
|
||||
'0': '审核中',
|
||||
'1': '已提现'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { storeStaffListApi } from '@/api/storePoint'
|
||||
import { seckillListApi } from '@/api/marketing'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
/**
|
||||
* @description 确定操作弹框
|
||||
*/
|
||||
export function modalSure(title) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$confirm(`确定${title || '永久删除该文件'}?`, '提示', {
|
||||
@@ -42,3 +46,14 @@ export function getStoreStaff() {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 秒杀配置列表
|
||||
*/
|
||||
export function getSeckillList(status) {
|
||||
return new Promise((resolve, reject) => {
|
||||
seckillListApi({page: 1, limit: 9999, isDel: false, status: status || null}).then(async res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import "vue-ydui/dist/ydui.base.css";
|
||||
// 懒加载
|
||||
import VueLazyload from 'vue-lazyload'
|
||||
|
||||
Vue.config.devtools=true
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
@@ -31,6 +32,7 @@ import UploadFile from '@/components/Upload/uploadFile.vue'
|
||||
import ueditorFrom from '@/components/ueditorFrom'
|
||||
import VueUeditorWrap from 'vue-ueditor-wrap'
|
||||
import iconFrom from './components/iconFrom'
|
||||
import TimeSelect from '@/components/TimeSelect'
|
||||
import dialog from "@/libs/dialog";
|
||||
import scroll from "@/libs/loading";
|
||||
import schema from "async-validator";
|
||||
@@ -67,6 +69,7 @@ Vue.component('SelfUpload', SelfUpload)
|
||||
Vue.component('iconFrom', iconFrom)
|
||||
Vue.component('ueditorFrom', ueditorFrom)
|
||||
Vue.component('uploadFile', UploadFile)
|
||||
Vue.component('timeSelect', TimeSelect)
|
||||
Vue.prototype.$modalSure = modalSure
|
||||
Vue.prototype.$modalAttr = modalAttr
|
||||
Vue.prototype.$modalIcon = modalIcon
|
||||
|
||||
@@ -5,7 +5,7 @@ import Layout from '@/layout'
|
||||
const marketingRouter = {
|
||||
path: '/marketing',
|
||||
component: Layout,
|
||||
redirect: '/marketing/coupon/list',
|
||||
redirect: '/coupon/list',
|
||||
name: 'Marketing',
|
||||
meta: {
|
||||
title: '营销',
|
||||
@@ -88,23 +88,30 @@ const marketingRouter = {
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'spike',
|
||||
component: () => import('@/views/marketing/spike/index'),
|
||||
name: 'Spike',
|
||||
path: 'seckill',
|
||||
component: () => import('@/views/marketing/seckill/index'),
|
||||
name: 'Seckill',
|
||||
meta: { title: '秒杀管理', icon: '' },
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'spikeconfig',
|
||||
component: () => import('@/views/marketing/spike/config/index'),
|
||||
name: 'spikeConfig',
|
||||
path: 'config',
|
||||
component: () => import('@/views/marketing/seckill/seckillConfig/index'),
|
||||
name: 'SeckillConfig',
|
||||
meta: { title: '秒杀配置', icon: '' }
|
||||
},
|
||||
{
|
||||
path: 'bargainList',
|
||||
component: () => import('@/views/marketing/spike/googs/index'),
|
||||
name: 'bargainList',
|
||||
meta: { title: '秒杀商品', icon: '' }
|
||||
path: 'list/:timeId?',
|
||||
component: () => import('@/views/marketing/seckill/seckillList/index'),
|
||||
name: 'SeckillList',
|
||||
meta: { title: '秒杀商品', icon: '',noCache: true,
|
||||
activeMenu: `/marketing/seckill/list` }
|
||||
},
|
||||
{
|
||||
path: 'creatSeckill/:name?/:timeId?/:id?',
|
||||
component: () => import('@/views/marketing/seckill/seckillList/creatSeckill'),
|
||||
name: 'CreatSeckill',
|
||||
meta: { title: '添加秒杀商品', icon: '', noCache: true,
|
||||
activeMenu: `/marketing/seckill/list` }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@ const mobileRouter = {
|
||||
{
|
||||
path: 'orderStatisticsDetail/:type/:time?',
|
||||
component: () => import('@/views/mobile/orderStatistics/Statistics.vue'),
|
||||
name: 'OrderStatistics',
|
||||
name: 'OrderStatisticsDetail',
|
||||
meta: { title: '订单数据统计' }
|
||||
}
|
||||
]
|
||||
|
||||
@@ -16,36 +16,6 @@ const orderRouter = {
|
||||
component: () => import('@/views/order/index'),
|
||||
name: 'OrderIndex',
|
||||
meta: { title: '订单管理' }
|
||||
},
|
||||
{
|
||||
path: 'statistics',
|
||||
component: () => import('@/views/mobile/orderStatistics/index.vue'),
|
||||
name: 'OrderStatistics',
|
||||
meta: { title: '订单统计' }
|
||||
},
|
||||
{
|
||||
path: 'orderList/:types?',
|
||||
component: () => import('@/views/mobile/orderStatistics/orderList.vue'),
|
||||
name: 'OrderList',
|
||||
meta: { title: '订单列表' }
|
||||
},
|
||||
{
|
||||
path: 'orderDelivery/:oid/:id?',
|
||||
component: () => import('@/views/mobile/orderStatistics/orderDelivery.vue'),
|
||||
name: 'OrderDelivery',
|
||||
meta: { title: '订单发货' }
|
||||
},
|
||||
{
|
||||
path: 'orderDetail/:id?/:goname?',
|
||||
component: () => import('@/views/mobile/orderStatistics/orderDetail.vue'),
|
||||
name: 'OrderDetail',
|
||||
meta: { title: '订单详情' }
|
||||
},
|
||||
{
|
||||
path: 'orderStatistics/:type/:time?',
|
||||
component: () => import('@/views/mobile/orderStatistics/Statistics.vue'),
|
||||
name: 'OrderStatistics',
|
||||
meta: { title: '订单数据统计' }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ table .el-image{
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.selWidth{
|
||||
width: 350px;
|
||||
width: 300px;
|
||||
}
|
||||
//表格字体
|
||||
//.el-table--mini{
|
||||
|
||||
@@ -24,7 +24,7 @@ export const categoryType = [ // 1 产品分类,2 附件分类,3 文章分
|
||||
]
|
||||
|
||||
export const roleListStatus = [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '全部', value: -1 },
|
||||
{ label: '显示', value: 1 },
|
||||
{ label: '不显示', value: 0 }
|
||||
]
|
||||
|
||||
@@ -61,7 +61,7 @@ service.interceptors.response.use(
|
||||
})
|
||||
})
|
||||
}
|
||||
if (res.code !== 200) {
|
||||
if (res.code !== 200 && res.code !== 401) {
|
||||
if (isPhone()) { //移动端
|
||||
return Promise.reject(res || 'Error')
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -183,6 +184,9 @@
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
checkTemp() {
|
||||
this.$modalSure('同步我的模板到小程序').then(() => {
|
||||
tempAsyncApi().then(() => {
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -151,6 +152,9 @@
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
seachList() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="请输入请输入姓名、电话、UID" class="selWidth" size="small">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="请输入姓名、电话、UID" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -139,7 +139,7 @@
|
||||
<el-radio-group v-model="spreadFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChangeSpread(spreadFrom.dateLimit)">
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeValSpread" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTimeSpread" />
|
||||
<el-date-picker v-model="timeValSpread" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTimeSpread" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户类型:">
|
||||
<el-radio-group v-model="spreadFrom.type" size="small" @change="onChanges">
|
||||
@@ -352,15 +352,18 @@
|
||||
selectChangeSpread(tab) {
|
||||
this.timeValSpread = []
|
||||
this.spreadFrom.dateLimit = tab
|
||||
this.spreadFrom.page = 1
|
||||
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTimeSpread(e) {
|
||||
this.timeValSpread = e
|
||||
this.tableFrom.dateLimit = e ? this.timeValSpread.join(',') : ''
|
||||
this.spreadFrom.page = 1
|
||||
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
|
||||
},
|
||||
onChanges() {
|
||||
this.spreadFrom.page = 1
|
||||
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
|
||||
},
|
||||
// 推广人列表
|
||||
|
||||
@@ -1,13 +1,327 @@
|
||||
<template>
|
||||
<div>佣金记录</div>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form size="small" label-width="100px" :inline="true">
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="昵称/ID" class="selWidth" size="small" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="佣金范围:">
|
||||
<el-col :span="11">
|
||||
<el-input v-model="tableFrom.min" placeholder="请输入最小金额" type="number" clearable></el-input>
|
||||
</el-col>
|
||||
<el-col class="line" :span="2" style="text-align: center;">-</el-col>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="tableFrom.max" placeholder="请输入最大金额" type="number" clearable></el-input>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList(1)" size="mini">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="uid"
|
||||
label="会员ID"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="nickname"
|
||||
label="昵称"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="totalBrokerage"
|
||||
label="总佣金金额"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="账户余额"
|
||||
min-width="100"
|
||||
prop="nowMoney"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="brokerage"
|
||||
label="账户佣金"
|
||||
min-width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="totalExtract"
|
||||
label="到账佣金"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="130" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" type="text" @click="handlerOpenInfo(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="佣金详情"
|
||||
:visible.sync="Visible"
|
||||
width="900px"
|
||||
v-if="Visible"
|
||||
:before-close="Close">
|
||||
<div>
|
||||
<div class="acea-row row-middle" v-if="userDetail">
|
||||
<div class="dashboard-workplace-header-tip-desc">
|
||||
<span class="dashboard-workplace-header-tip-desc-sp">姓名: {{ userDetail.nickname }}</span>
|
||||
<span class="dashboard-workplace-header-tip-desc-sp">上级推广人: {{ userDetail.spreadName | filterEmpty }}</span>
|
||||
<span class="dashboard-workplace-header-tip-desc-sp">佣金总收入: {{ userDetail.totalBrokerage }}</span>
|
||||
<span class="dashboard-workplace-header-tip-desc-sp">账户余额: {{ userDetail.nowMoney }}</span>
|
||||
<span class="dashboard-workplace-header-tip-desc-sp">创建时间: {{ userDetail.createTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-form size="small" label-position="left" label-width="90px">
|
||||
<el-form-item label="时间选择:" class="width100">
|
||||
<el-radio-group v-model="userTableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChangeUser(userTableFrom.dateLimit)">
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeValUser" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTimeUser" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="userTableFrom.keywords" placeholder="请输入订单id" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getUserList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-divider></el-divider>
|
||||
<el-table
|
||||
v-loading="tablistLoading"
|
||||
:data="userDetailData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="nickName"
|
||||
label="昵称"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="佣金金额"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="获得时间"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
min-width="150"
|
||||
prop="mark"
|
||||
/>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="userTableFrom.limit"
|
||||
:current-page="userTableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="userDetailData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
import { brokerageListApi, monitorListDetailApi } from '@/api/financial'
|
||||
import { fromList } from '@/utils/constants.js'
|
||||
export default {
|
||||
name: 'AccountsCapital',
|
||||
data() {
|
||||
return {
|
||||
timeVal: [],
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
userDetailData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
min: '',
|
||||
max: '',
|
||||
keywords: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
userTableFrom: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
keywords: '',
|
||||
dateLimit: ''
|
||||
},
|
||||
fromList: fromList,
|
||||
options: [],
|
||||
Visible: false,
|
||||
tablistLoading: false,
|
||||
userDetail: {},
|
||||
timeValUser: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getTypes()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
Close(){
|
||||
this.Visible = false
|
||||
},
|
||||
handlerOpenInfo(row){
|
||||
this.userDetail = row
|
||||
this.Visible = true
|
||||
this.tablistLoading = true
|
||||
this.getUserList()
|
||||
},
|
||||
getUserList(num){
|
||||
this.userTableFrom.page = num ? num : this.userTableFrom.page;
|
||||
monitorListDetailApi(this.userDetail.uid, this.userTableFrom).then(res => {
|
||||
this.userDetailData.data = res.list
|
||||
this.userDetailData.total = res.total
|
||||
this.tablistLoading = false
|
||||
}).catch((res) => {
|
||||
this.tablistLoading = false
|
||||
})
|
||||
},
|
||||
selectChangeUser (tab) {
|
||||
this.userTableFrom.dateLimit = tab
|
||||
this.timeValUser = []
|
||||
this.userTableFrom.page = 1;
|
||||
this.getUserList()
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTimeUser(e) {
|
||||
this.timeValUser = e
|
||||
this.userTableFrom.dateLimit = e ? this.timeValUser.join(',') : ''
|
||||
this.userTableFrom.page = 1;
|
||||
this.getUserList()
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
brokerageListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
}).catch((res) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
getTypes() {
|
||||
billTypeApi().then(res => {
|
||||
this.options = res.data
|
||||
localStorage.setItem('CashKey', JSON.stringify(res.data))
|
||||
}).catch((res) => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
<style scoped lang="scss">
|
||||
.dashboard-workplace {
|
||||
&-header {
|
||||
&-avatar {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
margin-right: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&-tip {
|
||||
width: 82%;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-top: -12px;
|
||||
&-title {
|
||||
font-size: 13px;
|
||||
color: #000000;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
&-desc {
|
||||
width: 100%;
|
||||
&-sp {
|
||||
width: 32%;
|
||||
color: #17233D;
|
||||
font-size: 13px;
|
||||
display: inline-block;
|
||||
line-height: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-extra {
|
||||
.ivu-col {
|
||||
p {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
p:first-child {
|
||||
span:first-child {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
span:last-child {
|
||||
color: #808695;
|
||||
}
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.selWidth{
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,13 +1,351 @@
|
||||
<template>
|
||||
<div>提现申请</div>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="时间选择:" class="width100">
|
||||
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提现状态:">
|
||||
<el-radio-group v-model="tableFrom.status" type="button" size="small" @change="getList(1)">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="0">审核中</el-radio-button>
|
||||
<el-radio-button label="1">已提现</el-radio-button>
|
||||
<el-radio-button label="-1">已拒绝</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="提现方式:">
|
||||
<el-radio-group v-model="tableFrom.extractType" type="button" size="small" @change="getList(1)">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="bank">银行卡</el-radio-button>
|
||||
<el-radio-button label="alipay">支付宝</el-radio-button>
|
||||
<el-radio-button label="weixin">微信</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:" class="width100">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="微信号/姓名/支付宝账号/银行卡号/失败原因" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<cards-data :cardLists="cardLists"></cards-data>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="ID"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
label="用户信息"
|
||||
min-width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<p>用户昵称:{{scope.row.nickName}}</p>
|
||||
<p>用户id:{{scope.row.uid}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="extractPrice"
|
||||
label="提现金额"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="提现方式"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.extractType | extractTypeFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="账号"
|
||||
min-width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.extractType=== 'bank'">
|
||||
<p>姓名:{{scope.row.realName }}</p>
|
||||
<p>卡号:{{scope.row.bankCode }}</p>
|
||||
<p>开户行:{{scope.row.bankName }}</p>
|
||||
</div>
|
||||
<span v-else-if="scope.row.extractType=== 'alipay'">
|
||||
<p>姓名:{{scope.row.realName }}</p>
|
||||
<p>支付宝号:{{scope.row.alipayCode }}</p>
|
||||
<div class="acea-row">
|
||||
收款码:
|
||||
<div class="demo-image__preview" v-if="scope.row.qrcodeUrl">
|
||||
<el-image
|
||||
:src="scope.row.qrcodeUrl"
|
||||
:preview-src-list="[scope.row.qrcodeUrl]"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>无</div>
|
||||
</div>
|
||||
</span>
|
||||
<span v-else-if="scope.row.extractType=== 'weixin'">
|
||||
<p>姓名:{{scope.row.realName }}</p>
|
||||
<p>微信号:{{scope.row.wechat }}</p>
|
||||
<div class="acea-row">
|
||||
收款码:
|
||||
<div class="demo-image__preview" v-if="scope.row.qrcodeUrl">
|
||||
<el-image
|
||||
:src="scope.row.qrcodeUrl"
|
||||
:preview-src-list="[scope.row.qrcodeUrl]"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>无</div>
|
||||
</div>
|
||||
</span>
|
||||
<span v-else>已退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核状态"
|
||||
min-width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="spBlock">{{ scope.row.status | extractStatusFilter }}</span>
|
||||
<span v-if="scope.row.status === -1">拒绝原因:{{scope.row.failMsg}}</span>
|
||||
<template v-if="scope.row.status === 0">
|
||||
<el-button type="danger" icon="el-icon-close" size="mini" @click="onExamine(scope.row.id)">未通过</el-button>
|
||||
<el-button type="primary" icon="el-icon-check" size="mini" @click="ok(scope.row.id)">通过</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
min-width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="spBlock">{{ scope.row.mark | filterEmpty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="80" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!--编辑-->
|
||||
<el-dialog
|
||||
title="编辑"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
:before-close="handleClose">
|
||||
<!--微信-->
|
||||
<zb-parser
|
||||
v-if="dialogVisible && (tableFrom.extractType==='weixin' || extractType==='weixin')"
|
||||
:form-id="124"
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
<!--支付宝-->
|
||||
<zb-parser
|
||||
v-if="dialogVisible && (tableFrom.extractType==='alipay' || extractType==='alipay')"
|
||||
:form-id="126"
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
<!--银行卡-->
|
||||
<zb-parser
|
||||
v-if="dialogVisible && (tableFrom.extractType==='bank' || extractType==='bank')"
|
||||
:form-id="125"
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
import { applyListApi, applyBalanceApi, applyUpdateApi, applyStatusApi } from '@/api/financial'
|
||||
import { fromList } from '@/utils/constants.js'
|
||||
import cardsData from '@/components/cards/index'
|
||||
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
|
||||
export default {
|
||||
name: 'AccountsExtract',
|
||||
components: {
|
||||
cardsData,
|
||||
zbParser
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editData: {},
|
||||
isCreate: 1,
|
||||
dialogVisible: false,
|
||||
timeVal: [],
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
extractType: '',
|
||||
status: '',
|
||||
dateLimit: '',
|
||||
keywords: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
fromList: fromList,
|
||||
cardLists: [],
|
||||
applyId: null,
|
||||
extractType: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getBalance()
|
||||
},
|
||||
methods: {
|
||||
resetForm(){
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.extractType = row.extractType;
|
||||
this.applyId = row.id;
|
||||
this.dialogVisible = true;
|
||||
this.isCreate = 1;
|
||||
this.editData = JSON.parse(JSON.stringify(row));
|
||||
},
|
||||
handlerSubmit(formValue) {
|
||||
formValue.id = this.applyId;
|
||||
formValue.extractType = this.extractType;
|
||||
applyUpdateApi(formValue).then(data => {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible = false
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.editData = {}
|
||||
},
|
||||
onExamine(id) {
|
||||
this.$prompt('未通过', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputErrorMessage: '请输入原因',
|
||||
inputType: 'textarea',
|
||||
inputValue: '输入信息不完整或有误!',
|
||||
inputPlaceholder: '请输入原因',
|
||||
inputValidator: (value) => {
|
||||
if (!value) {
|
||||
return '请输入原因'
|
||||
}
|
||||
}
|
||||
}).then(({ value }) => {
|
||||
applyStatusApi({ id: id, status: -1, backMessage: value }).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '提交成功'
|
||||
})
|
||||
this.getList()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消输入'
|
||||
})
|
||||
})
|
||||
},
|
||||
ok(id) {
|
||||
this.$modalSure('审核通过吗').then(() => {
|
||||
applyStatusApi({id: id, status: 1 }).then(() => {
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
// 金额
|
||||
getBalance() {
|
||||
applyBalanceApi({dateLimit: this.tableFrom.dateLimit}).then(res => {
|
||||
this.cardLists = [
|
||||
{ name: '待提现金额', count: res.toBeWithdrawn },
|
||||
{ name: '佣金总金额', count: res.commissionTotal },
|
||||
{ name: '已提现金额', count: res.withdrawn },
|
||||
{ name: '未提现金额', count: res.unDrawn }
|
||||
]
|
||||
})
|
||||
},
|
||||
// 选择时间
|
||||
selectChange(tab) {
|
||||
this.timeVal = []
|
||||
this.tableFrom.dateLimit = tab
|
||||
this.tableFrom.page = 1;
|
||||
this.getList();
|
||||
this.getBalance();
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
|
||||
this.tableFrom.page = 1;
|
||||
this.getList();
|
||||
this.getBalance();
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
applyListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
||||
<style scoped>
|
||||
.selWidth{
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,13 +1,221 @@
|
||||
<template>
|
||||
<div>充值记录</div>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="时间选择:" class="width100">
|
||||
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否支付:">
|
||||
<el-radio-group v-model="tableFrom.paid" type="button" size="small" @change="getList(1)">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="1">已支付</el-radio-button>
|
||||
<el-radio-button label="0">未支付</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:" class="width100">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/姓名/订单号" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<cards-data :card-lists="cardLists" />
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="ID"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
label="头像"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="scope.row.avatar"
|
||||
:preview-src-list="[scope.row.avatar]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nickname"
|
||||
label="用户昵称"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="orderId"
|
||||
label="订单号"
|
||||
min-width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="支付金额"
|
||||
min-width="120"
|
||||
:sort-method="(a,b)=>{return a.price - b.price}"
|
||||
prop="price"
|
||||
/>
|
||||
<el-table-column
|
||||
sortable
|
||||
label="赠送金额"
|
||||
min-width="120"
|
||||
prop="givePrice"
|
||||
:sort-method="(a,b)=>{return a.givePrice - b.givePrice}"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否支付"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="spBlock">{{ scope.row.paid | payStatusFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="充值类型"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.rechargeType | rechargeTypeFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="支付时间"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="spBlock">{{ scope.row.payTime || '无' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="120" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row)" v-if="!scope.row.paid">删除</el-button>
|
||||
<el-button type="text" size="small" @click="handleRefund(scope.row)" v-else>退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
import { topUpLogListApi, balanceApi, topUpLogDeleteApi } from '@/api/financial'
|
||||
import cardsData from '@/components/cards/index'
|
||||
import { fromList } from '@/utils/constants.js'
|
||||
export default {
|
||||
name: 'AccountsBill',
|
||||
components: { cardsData },
|
||||
data() {
|
||||
return {
|
||||
cardLists: [],
|
||||
timeVal: [],
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
paid: '',
|
||||
dateLimit: '',
|
||||
keywords: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
fromList: fromList
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getStatistics()
|
||||
},
|
||||
methods: {
|
||||
handleRefund(row) {
|
||||
|
||||
}
|
||||
},
|
||||
handleDelete(row, idx) {
|
||||
this.$modalSure().then(() => {
|
||||
topUpLogDeleteApi( {id:row.id} ).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getList(this.tableFrom.page)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择时间
|
||||
selectChange(tab) {
|
||||
this.tableFrom.dateLimit = tab
|
||||
this.timeVal = []
|
||||
this.tableFrom.page = 1;
|
||||
this.getList()
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
|
||||
this.tableFrom.page = 1;
|
||||
this.getList()
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
topUpLogListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
// 统计
|
||||
getStatistics() {
|
||||
balanceApi().then(res => {
|
||||
const stat = res
|
||||
this.cardLists = [
|
||||
{ name: '充值总金额', count: stat.totalPayPrice, icon: 'el-icon-s-goods' },
|
||||
{ name: '充值退款金额', count: stat.totalRefundPrice, icon: 'el-icon-s-order' },
|
||||
{ name: '小程序充值金额', count: stat.totalRoutinePrice, icon: 'el-icon-s-cooperation' },
|
||||
{ name: '公众号充值金额', count: stat.totalWxPrice, icon: 'el-icon-s-finance' }
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
||||
<style scoped>
|
||||
.selWidth{
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,13 +1,165 @@
|
||||
<template>
|
||||
<div>资金监控</div>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="时间选择:" class="width100">
|
||||
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细类型:">
|
||||
<el-select class="selWidth" v-model="tableFrom.type" filterable clearable placeholder="请选择" @change="getList(1)">
|
||||
<el-option
|
||||
v-for="(item, index) in optionList"
|
||||
:key="index"
|
||||
:label="item.title"
|
||||
:value="item.type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:" class="width100">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/ID" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="uid"
|
||||
label="会员ID"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="nickName"
|
||||
label="昵称"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="金额"
|
||||
sortable
|
||||
:sort-method="(a,b)=>{return a.number - b.number}"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="明细类型"
|
||||
min-width="100"
|
||||
prop="title"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="mark"
|
||||
label="备注"
|
||||
min-width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="150"
|
||||
/>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
import { monitorListApi, monitorListOptionApi } from '@/api/financial'
|
||||
import { fromList } from '@/utils/constants.js'
|
||||
export default {
|
||||
name: 'AccountsCapital',
|
||||
data() {
|
||||
return {
|
||||
timeVal: [],
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
type: '',
|
||||
dateLimit: '',
|
||||
keywords: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
categoryId: '',
|
||||
fromList: fromList,
|
||||
optionList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.getTypes()
|
||||
this.getOptionList()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getOptionList() {
|
||||
monitorListOptionApi().then(res => {
|
||||
this.optionList = res
|
||||
})
|
||||
},
|
||||
selectChange(tab) {
|
||||
this.tableFrom.dateLimit = tab
|
||||
this.timeVal = []
|
||||
this.tableFrom.page = 1;
|
||||
this.getList()
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
|
||||
this.tableFrom.page = 1;
|
||||
this.getList()
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
monitorListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
}).catch((res) => {
|
||||
this.$message.error(res.message)
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
||||
<style scoped>
|
||||
.selWidth{
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="page-account">
|
||||
<div class="page-account" :style="backgroundImages ? { backgroundImage: 'url(' + backgroundImages + ')'} : { backgroundImage: 'url(' + backgroundImageMo + ')'}">
|
||||
<div class="container" :class="[ fullWidth > 768 ? 'containerSamll':'containerBig']">
|
||||
<template v-if="fullWidth>768">
|
||||
<swiper :options="swiperOption" class="swiperPross">
|
||||
@@ -119,7 +119,8 @@ export default {
|
||||
captchatImg: '',
|
||||
swiperList: [],
|
||||
loginLogo: '',
|
||||
backgroundImage: '',
|
||||
backgroundImages: '',
|
||||
backgroundImageMo: require("@/assets/imgs/bg.jpg"),
|
||||
fullWidth: document.body.clientWidth,
|
||||
swiperOption: {
|
||||
pagination: {
|
||||
@@ -241,7 +242,7 @@ export default {
|
||||
getLoginPicApi().then(res => {
|
||||
this.swiperList = res.banner
|
||||
this.loginLogo = res.logo
|
||||
this.backgroundImage = res.backgroundImage
|
||||
this.backgroundImages = res.backgroundImage
|
||||
// Cookies.set('MerInfo', JSON.stringify(data))
|
||||
})
|
||||
},
|
||||
@@ -270,7 +271,6 @@ export default {
|
||||
this.$store.dispatch('user/login', this.loginForm)
|
||||
.then(() => {
|
||||
this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
|
||||
console.log('lalaalalala')
|
||||
getStoreStaff()
|
||||
this.loading = false
|
||||
}).catch((err) => {
|
||||
@@ -435,7 +435,6 @@ export default {
|
||||
}
|
||||
@media (min-width: $screen-md) {
|
||||
.page-account {
|
||||
background-image: url('../../assets/imgs/bg.jpg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
v-if="isShow"
|
||||
/>
|
||||
</el-card>
|
||||
@@ -30,6 +31,9 @@
|
||||
this.getFormInfo()
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.isShow = false
|
||||
},
|
||||
handlerSubmit(data) {
|
||||
const tempArr = []
|
||||
for (var key in data) {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small"
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small"
|
||||
type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;"
|
||||
@change="onchangeTime"/>
|
||||
</el-form-item>
|
||||
|
||||
15
admin/src/views/marketing/seckill/index.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
||||
</style>
|
||||
274
admin/src/views/marketing/seckill/seckillConfig/index.vue
Normal file
@@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form inline>
|
||||
<el-form-item label="是否显示">
|
||||
<el-select v-model="tableFrom.status" placeholder="请选择" class="filter-item selWidth mr20" @change="getList(1)" clearable>
|
||||
<el-option label="关闭" :value="0" />
|
||||
<el-option label="开启" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="秒杀名称:">
|
||||
<el-input v-model="tableFrom.name" placeholder="请输入秒杀名称" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button size="mini" type="primary" @click="add">添加秒杀配置</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="ID"
|
||||
min-width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
label="秒杀名称"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="{ path:'/marketing/seckill/list/' + scope.row.id}">
|
||||
<el-button type="text" size="small">{{scope.row.name}}</el-button>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="秒杀时段"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.time.split(',').join(' - ')}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="轮播图" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<div class="acea-row" v-if="scope.row.silderImgs">
|
||||
<div class="demo-image__preview mr5" v-for="item in JSON.parse(scope.row.silderImgs)" :key="item.attId">
|
||||
<el-image
|
||||
style="width: 36px; height: 36px"
|
||||
:src="item.sattDir"
|
||||
:preview-src-list="[item.sattDir]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column-->
|
||||
<!--label="排序"-->
|
||||
<!--min-width="100"-->
|
||||
<!-->-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<div v-if="!scope.row.isEdit" @click="onEditSort(scope.row)" @blur="onBlur(scope.row, scope.row.sort)" style="width: 100%;cursor: pointer;">{{scope.row.sort}}</div>-->
|
||||
<!--<el-input v-model="scope.row.sort" placeholder="请输入排序" v-else @blur="onBlur(scope.row)"></el-input>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column
|
||||
label="状态"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
@change="onchangeIsShow(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleEdit(scope.row.id)">编辑</el-button>
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)" class="mr10">删除</el-button>
|
||||
<router-link :to="{ path:'/marketing/seckill/creatSeckill/creat/' + scope.row.id}">
|
||||
<el-button type="text" size="small">添加商品</el-button>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block mb20">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
:title="isCreate===0 ? '添加数据' : '编辑数据'"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div v-loading="loading">
|
||||
<zb-parser
|
||||
:form-id="formId"
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
v-if="dialogVisible"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
|
||||
import { configSaveForm, configInfo } from '@/api/systemConfig.js'
|
||||
import { seckillListApi, seckillUpdateApi, seckillInfoApi, seckillSaveApi, seckillDeleteApi, seckillConfigStatusApi } from '@/api/marketing'
|
||||
export default {
|
||||
name: "SeckillConfig",
|
||||
components: { zbParser },
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
isShow: true,
|
||||
isCreate: 0,
|
||||
editData: {},
|
||||
formId: 123,
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
name: '',
|
||||
isDel: false,
|
||||
status: ''
|
||||
},
|
||||
seckillId: '',
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 删除
|
||||
handleDelete(id, idx) {
|
||||
this.$modalSure().then(() => {
|
||||
seckillDeleteApi({ id: id }).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData.data.splice(idx, 1)
|
||||
})
|
||||
})
|
||||
},
|
||||
onchangeIsShow(row) {
|
||||
seckillConfigStatusApi(row.id, {status: row.status})
|
||||
.then(async () => {
|
||||
this.$message.success('修改成功');
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
onEditSort(row) {
|
||||
this.$set(row, 'isEdit', true)
|
||||
},
|
||||
onBlur(row) {
|
||||
this.$set(row, 'isEdit', false)
|
||||
this.onEdit(row.id, row)
|
||||
},
|
||||
// 获取表单详情
|
||||
getFormInfo(id) {
|
||||
this.loading = true
|
||||
seckillInfoApi({ id: id }).then(res => {
|
||||
this.editData = res
|
||||
this.dialogVisible = true
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(id) {
|
||||
this.seckillId = id
|
||||
this.getFormInfo(id)
|
||||
this.isCreate = 1
|
||||
},
|
||||
// 编辑
|
||||
onEdit(id, obj) {
|
||||
const data = obj ? obj : this.editData
|
||||
seckillUpdateApi({id}, data).then(res => {
|
||||
this.isSuccess()
|
||||
}).catch((res) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
handlerSubmit(formValue) {
|
||||
if(formValue.time.split(',')[0].split(':')[0] > formValue.time.split(',')[1].split(':')[0]) return this.$message.error('请填写正确的时间范围')
|
||||
this.isCreate === 0 ? seckillSaveApi(formValue).then(res => {
|
||||
this.isSuccess()
|
||||
}) : seckillUpdateApi({id: this.seckillId}, formValue).then(res => {
|
||||
this.isSuccess()
|
||||
})
|
||||
},
|
||||
isSuccess(){
|
||||
this.$message.success('操作成功')
|
||||
this.dialogVisible = false
|
||||
this.getList()
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
seckillListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.tableData.data.map(item => this.$set(item, 'isEdit', false))
|
||||
this.listLoading = false
|
||||
}).catch((res) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
add() {
|
||||
this.isCreate = 0
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.editData = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
816
admin/src/views/marketing/seckill/seckillList/creatSeckill.vue
Normal file
@@ -0,0 +1,816 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-steps :active="currentTab" align-center finish-status="success">
|
||||
<el-step title="选择秒杀商品" />
|
||||
<el-step title="填写基础信息" />
|
||||
<el-step title="修改商品详情" />
|
||||
</el-steps>
|
||||
</div>
|
||||
<el-form
|
||||
ref="formValidate"
|
||||
v-loading="fullscreenLoading"
|
||||
class="formValidate mt20"
|
||||
:rules="ruleValidate"
|
||||
:model="formValidate"
|
||||
label-width="150px"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<!-- 秒杀商品-->
|
||||
<div v-show="currentTab === 0">
|
||||
<el-form-item label="选择商品:" prop="image">
|
||||
<div class="upLoadPicBox" @click="changeGood">
|
||||
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- 商品信息-->
|
||||
<div v-show="currentTab === 1">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品主图:" prop="image">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1')">
|
||||
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
|
||||
<div v-else class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品轮播图:" prop="images">
|
||||
<div class="acea-row">
|
||||
<div
|
||||
v-for="(item,index) in formValidate.imagess"
|
||||
:key="index"
|
||||
class="pictrue"
|
||||
draggable="true"
|
||||
@dragstart="handleDragStart($event, item)"
|
||||
@dragover.prevent="handleDragOver($event, item)"
|
||||
@dragenter="handleDragEnter($event, item)"
|
||||
@dragend="handleDragEnd($event, item)"
|
||||
>
|
||||
<img :src="item">
|
||||
<i class="el-icon-error btndel" @click="handleRemove(index)" />
|
||||
</div>
|
||||
<div class="upLoadPicBox" @click="modalPicTap('2')">
|
||||
<div class="upLoad">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品标题:" prop="title">
|
||||
<el-input v-model="formValidate.title" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="秒杀活动简介:">
|
||||
<el-input v-model="formValidate.info" type="textarea" :rows="3" placeholder="请输入商品简介" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--<el-col v-bind="grid2">-->
|
||||
<!--<el-form-item label="商品分类:" prop="cateIds">-->
|
||||
<!--<el-cascader v-model="formValidate.cateIds" :options="merCateList" :props="props2" clearable class="selWidth" :show-all-levels="false" />-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="单位:" prop="unitName">
|
||||
<el-input v-model="formValidate.unitName" placeholder="请输入单位" class="selWidth"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="运费模板:" prop="tempId">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidth">
|
||||
<el-option
|
||||
v-for="item in shippingList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<!--<el-button class="mr15" @click="addTem">添加运费模板</el-button>-->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="当天参与活动次数:" prop="num">
|
||||
<el-input-number v-model="formValidate.num" :step="1" step-strictly :min="1" placeholder="请输入活动次数" class="selWidth"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="活动日期:" prop="timeVal">
|
||||
<el-date-picker
|
||||
class="selWidth"
|
||||
v-model="formValidate.timeVal"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="daterange"
|
||||
placement="bottom-end"
|
||||
placeholder="请选择活动日期"
|
||||
@change="onchangeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid2">
|
||||
<el-form-item label="活动时间:" prop="timeId">
|
||||
<el-select v-model="formValidate.timeId" placeholder="请选择" class="selWidth">
|
||||
<el-option
|
||||
v-for="item in seckillTime"
|
||||
:key="item.id"
|
||||
:label="item.time"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动状态:" required>
|
||||
<el-radio-group v-model="formValidate.status">
|
||||
<el-radio :label="0" class="radio">关闭</el-radio>
|
||||
<el-radio :label="1">开启</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 规格表格-->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品属性:" class="labeltop" required>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="ManyAttrValue"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
key="1"
|
||||
v-if="formValidate.specType"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<template v-if="manyTabDate && formValidate.specType">
|
||||
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span class="priceBox" v-text="scope.row[iii]" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column align="center" label="图片" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
|
||||
<div v-if="scope.row.image" class="pictrue tabPic"><img :src="scope.row.image"></div>
|
||||
<div v-else class="upLoad tabPic">
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-if="formThead[iii].title === '秒杀价'"
|
||||
v-model="scope.row[iii]"
|
||||
:min="0"
|
||||
:precision="2" :step="0.1"
|
||||
class="priceBox"
|
||||
/>
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-else-if="formThead[iii].title === '限量'"
|
||||
v-model="scope.row[iii]"
|
||||
type="number"
|
||||
:min="1"
|
||||
:max="scope.row.stock"
|
||||
:step="1" step-strictly
|
||||
class="priceBox"
|
||||
@change="inpChange(scope.row[iii], scope.row.id)"
|
||||
/>
|
||||
<span v-else v-text="scope.row[iii]" class="priceBox" />
|
||||
<!--<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<!-- 商品详情-->
|
||||
<div v-show="currentTab === 2">
|
||||
<el-form-item label="商品详情:">
|
||||
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item style="margin-top:30px;">
|
||||
<el-button
|
||||
v-show="(!$route.params.id && currentTab > 0) || ($route.params.id && currentTab===2)"
|
||||
type="primary"
|
||||
class="submission"
|
||||
size="small"
|
||||
@click="handleSubmitUp"
|
||||
>上一步</el-button>
|
||||
<el-button
|
||||
v-show="currentTab == 0"
|
||||
type="primary"
|
||||
class="submission"
|
||||
size="small"
|
||||
@click="handleSubmitNest1('formValidate')"
|
||||
>下一步</el-button>
|
||||
<el-button
|
||||
v-show="currentTab == 1"
|
||||
type="primary"
|
||||
class="submission"
|
||||
size="small"
|
||||
@click="handleSubmitNest2('formValidate')"
|
||||
>下一步</el-button>
|
||||
<el-button
|
||||
v-show="currentTab===2"
|
||||
:loading="loading"
|
||||
type="primary"
|
||||
class="submission"
|
||||
size="small"
|
||||
@click="handleSubmit('formValidate')"
|
||||
>提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<CreatTemplates ref="addTemplates" @getList="getShippingList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { productDetailApi, categoryApi } from '@/api/store'
|
||||
import { shippingTemplatesList } from '@/api/logistics'
|
||||
import { getSeckillList } from '@/libs/public'
|
||||
import { seckillStoreSaveApi, seckillStoreUpdateApi, seckillStoreInfoApi } from '@/api/marketing'
|
||||
import CreatTemplates from '@/views/systemSetting/logistics/shippingTemplates/creatTemplates'
|
||||
const defaultObj = {
|
||||
image: '',
|
||||
images: '',
|
||||
imagess: [],
|
||||
title: '',
|
||||
info: '',
|
||||
num: 1,
|
||||
unitName: '',
|
||||
sort: 0,
|
||||
giveIntegral: 0,
|
||||
ficti: 0,
|
||||
isShow: false,
|
||||
tempId: '',
|
||||
attrValue: [{
|
||||
image: '',
|
||||
price: 0,
|
||||
cost: 0,
|
||||
otPrice: 0,
|
||||
stock: 0,
|
||||
quota: 1,
|
||||
barCode: '',
|
||||
weight: 0,
|
||||
volume: 0,
|
||||
}],
|
||||
attr: [],
|
||||
selectRule: '',
|
||||
content: '',
|
||||
specType: false,
|
||||
id: 0,
|
||||
// productId: 0,
|
||||
timeId: '',
|
||||
startTime: '',
|
||||
stopTime: '',
|
||||
timeVal: [],
|
||||
status: 0
|
||||
}
|
||||
const objTitle = {
|
||||
price: {
|
||||
title: '秒杀价'
|
||||
},
|
||||
cost: {
|
||||
title: '成本价'
|
||||
},
|
||||
otPrice: {
|
||||
title: '原价'
|
||||
},
|
||||
stock: {
|
||||
title: '库存'
|
||||
},
|
||||
quota: {
|
||||
title: "限量",
|
||||
},
|
||||
barCode: {
|
||||
title: '商品编号'
|
||||
},
|
||||
weight: {
|
||||
title: '重量(KG)'
|
||||
},
|
||||
volume: {
|
||||
title: '体积(m³)'
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "creatSeckill",
|
||||
components: { CreatTemplates },
|
||||
data() {
|
||||
return {
|
||||
props2: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
multiple: true,
|
||||
emitPath: false
|
||||
},
|
||||
grid2: {
|
||||
xl: 8,
|
||||
lg: 10,
|
||||
md: 12,
|
||||
sm: 24,
|
||||
xs: 24
|
||||
},
|
||||
currentTab: 0,
|
||||
formThead: Object.assign({}, objTitle),
|
||||
formValidate: Object.assign({}, defaultObj),
|
||||
loading: false,
|
||||
fullscreenLoading: false,
|
||||
merCateList: [], // 商户分类筛选
|
||||
shippingList: [], // 运费模板
|
||||
seckillTime: [],
|
||||
ruleValidate: {
|
||||
productId: [
|
||||
{ required: true, message: '请选择商品', trigger: 'change' }
|
||||
],
|
||||
title: [
|
||||
{ required: true, message: '请输入商品标题', trigger: 'blur' }
|
||||
],
|
||||
attrValue: [
|
||||
{ required: true, message: '请选择商品属相', trigger: 'change', type: 'array', min: '1' }
|
||||
],
|
||||
num: [
|
||||
{ required: true, message: '请输入活动次数', trigger: 'blur' }
|
||||
],
|
||||
unitName: [
|
||||
{ required: true, message: '请输入单位', trigger: 'blur' }
|
||||
],
|
||||
info: [
|
||||
{ required: true, message: '请输入秒杀商品简介', trigger: 'blur' }
|
||||
],
|
||||
tempId: [
|
||||
{ required: true, message: '请选择运费模板', trigger: 'change' }
|
||||
],
|
||||
timeId: [
|
||||
{ required: true, message: '请选择活动时间', trigger: 'change' }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: '请上传商品图', trigger: 'change' }
|
||||
],
|
||||
imagess: [
|
||||
{ required: true, message: '请上传商品轮播图', type: 'array', trigger: 'change' }
|
||||
],
|
||||
specType: [
|
||||
{ required: true, message: '请选择商品规格', trigger: 'change' }
|
||||
],
|
||||
timeVal:[
|
||||
{ required: true, message: '请选择活动日期', trigger: 'change', type: 'array'}
|
||||
]
|
||||
},
|
||||
manyTabDate: {},
|
||||
manyTabTit: {},
|
||||
attrInfo: {},
|
||||
tempRoute: {},
|
||||
multipleSelection: [],
|
||||
productId: 0,
|
||||
OneattrValue: [Object.assign({}, defaultObj.attrValue[0])], // 单规格
|
||||
ManyAttrValue: [Object.assign({}, defaultObj.attrValue[0])], // 多规格
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
attrValue() {
|
||||
const obj = Object.assign({}, defaultObj.attrValue[0])
|
||||
delete obj.image
|
||||
return obj
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$watch('formValidate.attr', this.watCh)
|
||||
this.tempRoute = Object.assign({}, this.$route)
|
||||
},
|
||||
mounted() {
|
||||
getSeckillList(1).then((res) => {
|
||||
this.seckillTime = res.list
|
||||
})
|
||||
this.formValidate.imagess = []
|
||||
if ( this.$route.params.id ) {
|
||||
this.setTagsViewTitle()
|
||||
this.getInfo()
|
||||
this.currentTab = 1
|
||||
}
|
||||
this.getShippingList()
|
||||
this.getCategorySelect()
|
||||
},
|
||||
methods: {
|
||||
inpChange(currentValue, id){
|
||||
// this.ManyAttrValue.map(item => {
|
||||
// if(!currentValue && item.id ===id){
|
||||
// item.quota = 1
|
||||
// this.$set(item, 'quota', 1)
|
||||
// this.ManyAttrValue = Object.assign([], this.ManyAttrValue)
|
||||
// }
|
||||
// })
|
||||
|
||||
console.log(this.ManyAttrValue)
|
||||
// if(!currentValue) item.quota = 1
|
||||
},
|
||||
watCh(val) {
|
||||
const tmp = {}
|
||||
const tmpTab = {}
|
||||
this.formValidate.attr.forEach((o, i) => {
|
||||
tmp['value' + i] = { title: o.attrName }
|
||||
tmpTab['value' + i] = ''
|
||||
})
|
||||
this.manyTabTit = tmp
|
||||
this.manyTabDate = tmpTab
|
||||
this.formThead = Object.assign({}, this.formThead, tmp)
|
||||
},
|
||||
handleRemove (i) {
|
||||
this.formValidate.imagess.splice(i, 1)
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
// 点击商品图
|
||||
modalPicTap (tit, num, i) {
|
||||
const _this = this
|
||||
this.$modalUpload(function(img) {
|
||||
if(tit==='1'&& !num){
|
||||
_this.formValidate.image = img[0].sattDir
|
||||
_this.ManyAttrValue[0].image = img[0].sattDir
|
||||
}
|
||||
if(tit==='2'&& !num){
|
||||
img.map((item) => {
|
||||
_this.formValidate.imagess.push(item.sattDir)
|
||||
});
|
||||
}
|
||||
if(tit==='1'&& num === 'duo' ){
|
||||
_this.specType ? _this.ManyAttrValue[i].image = img[0].sattDir : _this.ManyAttrValue[0].image = img[0].sattDir
|
||||
}
|
||||
},tit, 'content')
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.formValidate.timeVal = e;
|
||||
this.formValidate.startTime = e ? e[0] : "";
|
||||
this.formValidate.stopTime = e ? e[1] : "";
|
||||
},
|
||||
changeGood(){
|
||||
const _this = this
|
||||
this.$modalGoodList(function(row) {
|
||||
_this.formValidate.image = row.image
|
||||
_this.productId = row.id
|
||||
// _this.formValidate.productId = row.id
|
||||
})
|
||||
},
|
||||
handleSubmitNest1() {
|
||||
if (!this.formValidate.image) {
|
||||
this.$message.warning("请选择商品!");
|
||||
return;
|
||||
} else {
|
||||
this.currentTab++;
|
||||
if (!this.$route.params.id) this.getProdect(this.productId);
|
||||
}
|
||||
},
|
||||
// 商品分类;
|
||||
getCategorySelect() {
|
||||
categoryApi({ status: -1, type: 1 }).then(res => {
|
||||
this.merCateList = this.filerMerCateList(res)
|
||||
})
|
||||
},
|
||||
filerMerCateList(treeData) {
|
||||
return treeData.map((item) => {
|
||||
if(!item.child){
|
||||
item.disabled = true
|
||||
}
|
||||
item.label = item.name
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 运费模板;
|
||||
getShippingList() {
|
||||
shippingTemplatesList(this.tempData).then(res => {
|
||||
this.shippingList = res.list
|
||||
})
|
||||
},
|
||||
// 运费模板
|
||||
addTem() {
|
||||
this.$refs.addTemplates.dialogVisible = true
|
||||
this.$refs.addTemplates.getCityList()
|
||||
},
|
||||
// 商品详情
|
||||
getInfo () {
|
||||
if(!this.$route.params.id){
|
||||
this.getProdect(this.productId)
|
||||
}else{
|
||||
this.getSekllProdect(this.$route.params.id)
|
||||
}
|
||||
},
|
||||
getProdect(id) {
|
||||
this.fullscreenLoading = true
|
||||
productDetailApi(id).then(async res => {
|
||||
let info = res
|
||||
this.formValidate = {
|
||||
image: info.image,
|
||||
imagess: JSON.parse(info.sliderImage),
|
||||
title: info.storeName,
|
||||
info: info.storeInfo,
|
||||
quota: '',
|
||||
unitName: info.unitName,
|
||||
sort: info.sort,
|
||||
isShow: info.isShow,
|
||||
tempId: info.tempId,
|
||||
attr: info.attr,
|
||||
selectRule: info.selectRule,
|
||||
content: info.content,
|
||||
specType: info.specType,
|
||||
productId: info.id,
|
||||
giveIntegral: info.giveIntegral,
|
||||
ficti: info.ficti,
|
||||
timeId: this.$route.params.id ? Number(info.timeId) : this.$route.params.timeId ? Number(this.$route.params.timeId) : '',
|
||||
startTime: info.startTime || '',
|
||||
stopTime: info.stopTime || '',
|
||||
timeVal: [],
|
||||
status: 0,
|
||||
num: 1
|
||||
}
|
||||
if(info.specType){
|
||||
info.attrValues.forEach((row) => {
|
||||
row.quota = row.stock;
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
info.attrValues.forEach((row) => {
|
||||
this.$refs.multipleTable.toggleRowSelection(row, true);
|
||||
this.$set(row, 'checked', true)
|
||||
});
|
||||
});
|
||||
this.ManyAttrValue = info.attrValues
|
||||
this.multipleSelection = info.attrValues
|
||||
}else{
|
||||
info.attrValue.forEach((row) => {
|
||||
row.quota = row.stock;
|
||||
});
|
||||
this.ManyAttrValue = info.attrValue
|
||||
this.formValidate.attr = []
|
||||
}
|
||||
this.fullscreenLoading = false
|
||||
}).catch(res => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
getSekllProdect(id) {
|
||||
this.fullscreenLoading = true
|
||||
seckillStoreInfoApi({id:id}).then(async res => {
|
||||
let info = res
|
||||
this.formValidate = {
|
||||
image: info.image,
|
||||
imagess: JSON.parse(info.sliderImage) || [],
|
||||
title: info.title,
|
||||
info: info.info,
|
||||
quota: info.quota,
|
||||
unitName: info.unitName,
|
||||
sort: info.sort,
|
||||
isShow: info.isShow,
|
||||
tempId: info.tempId,
|
||||
attr: info.attr,
|
||||
selectRule: info.selectRule,
|
||||
content: info.content,
|
||||
specType: info.specType,
|
||||
productId: info.productId,
|
||||
giveIntegral: info.giveIntegral,
|
||||
ficti: info.ficti,
|
||||
timeId: Number(info.timeId),
|
||||
startTime: info.startTime || '',
|
||||
stopTime: info.stopTime || '',
|
||||
status: info.status,
|
||||
num: info.num,
|
||||
timeVal: info.startTime && info.stopTime ? [info.startTime, info.stopTime] : []
|
||||
}
|
||||
if(info.specType){
|
||||
this.ManyAttrValue = info.attrValues;
|
||||
this.$nextTick(() => {
|
||||
this.ManyAttrValue.forEach((item, index) => {
|
||||
if (item.checked) {
|
||||
this.$set(item, 'price', item.price)
|
||||
this.$set(item, 'quota', item.quota)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.multipleTable.toggleRowSelection(item, true)
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
}else{
|
||||
this.ManyAttrValue = info.attrValue
|
||||
this.formValidate.attr = []
|
||||
}
|
||||
this.fullscreenLoading = false
|
||||
}).catch(res => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
handleSubmitNest2(name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
if(this.formValidate.specType && this.multipleSelection.length ===0 ) return this.$message.warning("请填选择至少一个商品属性!");
|
||||
this.currentTab++;
|
||||
// this.multipleSelection.every((value, index) => {
|
||||
// if(!value.quota){
|
||||
// this.$message.warning("请填选择至少一个商品属性!");
|
||||
// return false;
|
||||
// }else{
|
||||
// this.currentTab++;
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// for(i = 0; i < this.multipleSelection.length; i++){
|
||||
// if(!this.multipleSelection[i].quota){
|
||||
// break;
|
||||
// }else{
|
||||
// this.currentTab++;
|
||||
// }
|
||||
// }
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 提交
|
||||
handleSubmit(name) {
|
||||
if(!this.formValidate.specType){
|
||||
this.formValidate.attr = []
|
||||
this.formValidate.attrValue = this.ManyAttrValue
|
||||
}else{
|
||||
this.multipleSelection.forEach((row) => {
|
||||
this.$set(row, 'checked', true)
|
||||
});
|
||||
this.formValidate.attrValue = this.multipleSelection
|
||||
}
|
||||
this.formValidate.images = JSON.stringify(this.formValidate.imagess)
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.fullscreenLoading = true;
|
||||
this.loading = true;
|
||||
this.$route.params.id
|
||||
? seckillStoreUpdateApi({id: this.$route.params.id}, this.formValidate)
|
||||
.then(async () => {
|
||||
this.fullscreenLoading = false;
|
||||
this.$message.success('编辑成功');
|
||||
this.$router.push({
|
||||
path: "/marketing/seckill/list",
|
||||
});
|
||||
this.$refs[name].resetFields();
|
||||
this.formValidate.images = [];
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.fullscreenLoading = false;
|
||||
this.loading = false;
|
||||
})
|
||||
: seckillStoreSaveApi(this.formValidate)
|
||||
.then(async (res) => {
|
||||
this.fullscreenLoading = false;
|
||||
this.$message.success('新增成功');
|
||||
this.$router.push({
|
||||
path: "/marketing/seckill/list",
|
||||
});
|
||||
this.$refs[name].resetFields();
|
||||
this.formValidate.images = [];
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.fullscreenLoading = false;
|
||||
this.loading = false;
|
||||
});
|
||||
} else {
|
||||
if (
|
||||
!this.formValidate.storeName ||
|
||||
!this.formValidate.unitName ||
|
||||
!this.formValidate.store_info ||
|
||||
!this.formValidate.image ||
|
||||
!this.formValidate.images
|
||||
) {
|
||||
this.$message.warning("请填写完整商品信息!");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
handleSubmitUp() {
|
||||
if (this.currentTab-- < 0) this.currentTab = 0;
|
||||
},
|
||||
setTagsViewTitle() {
|
||||
const title = '编辑秒杀商品'
|
||||
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
|
||||
this.$store.dispatch('tagsView/updateVisitedView', route)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.labeltop{
|
||||
/deep/.el-input-number--small{
|
||||
/*width: 172px !important;*/
|
||||
min-width: 132px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.proCoupon{
|
||||
/deep/.el-form-item__content{
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
.tabPic{
|
||||
width: 40px !important;
|
||||
height: 40px !important;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.noLeft{
|
||||
/deep/.el-form-item__content{
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
.tabNumWidth{
|
||||
/deep/.el-input-number--medium{
|
||||
width: 121px !important;
|
||||
}
|
||||
/deep/.el-input-number__increase{
|
||||
width: 20px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
/deep/.el-input-number__decrease{
|
||||
width: 20px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
/deep/.el-input-number--medium .el-input__inner {
|
||||
padding-left: 25px !important;
|
||||
padding-right: 25px !important;
|
||||
}
|
||||
/deep/ thead{
|
||||
line-height: normal !important;
|
||||
}
|
||||
/deep/ .el-table .cell{
|
||||
line-height: normal !important;
|
||||
}
|
||||
}
|
||||
.selWidth{
|
||||
width: 80%;
|
||||
}
|
||||
.selWidthd{
|
||||
width: 300px;
|
||||
}
|
||||
.button-new-tag {
|
||||
height: 28px;
|
||||
line-height: 26px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.input-new-tag {
|
||||
width: 90px;
|
||||
margin-left: 10px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.pictrue{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border: 1px dotted rgba(0,0,0,0.1);
|
||||
margin-right: 10px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.btndel{
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width :20px !important;
|
||||
height: 20px !important;
|
||||
left: 46px;
|
||||
top: -4px;
|
||||
}
|
||||
.labeltop{
|
||||
/deep/.el-form-item__label{
|
||||
/*float: none !important;*/
|
||||
/*display: inline-block !important;*/
|
||||
/*margin-left: 120px !important;*/
|
||||
/*width: auto !important;*/
|
||||
}
|
||||
}
|
||||
</style>
|
||||
229
admin/src/views/marketing/seckill/seckillList/index.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form inline>
|
||||
<el-form-item label="是否显示:">
|
||||
<el-select v-model="tableFrom.status" placeholder="请选择" class="filter-item selWidth" @change="getList(1)" clearable>
|
||||
<el-option label="关闭" :value="0" />
|
||||
<el-option label="开启" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="配置名称:">
|
||||
<el-select v-model="tableFrom.timeId" placeholder="请选择" class="selWidth" @change="getList(1)" clearable>
|
||||
<el-option
|
||||
v-for="item in seckillTime"
|
||||
:key="item.id"
|
||||
:label="item.name +' - ' + item.time"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<el-input v-model="tableFrom.name" placeholder="请输入秒杀名称" class="selWidth">-->
|
||||
<!--<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>-->
|
||||
<!--</el-input>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品搜索:">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="请输入商品ID/名称" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<router-link :to=" { path:'/marketing/seckill/creatSeckill/creat' }">
|
||||
<el-button size="small" type="primary" class="mr10">添加秒杀商品</el-button>
|
||||
</router-link>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="ID"
|
||||
min-width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
label="配置"
|
||||
min-width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.storeSeckillManagerResponse ? scope.row.storeSeckillManagerResponse.name : '-'}}</div>
|
||||
<div>{{scope.row.startTime + ' - ' + scope.row.stopTime}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="秒杀时段"
|
||||
min-width="130"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.storeSeckillManagerResponse ? scope.row.storeSeckillManagerResponse.time.split(',').join(' - ') : '-'}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品图片" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
style="width: 36px; height: 36px"
|
||||
:src="scope.row.image"
|
||||
:preview-src-list="[scope.row.image]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="活动标题"
|
||||
prop="title"
|
||||
min-width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="活动简介"
|
||||
min-width="180"
|
||||
prop="info"
|
||||
/>
|
||||
<el-table-column
|
||||
label="原价"
|
||||
prop="otPrice"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="秒杀价"
|
||||
min-width="100"
|
||||
prop="price"
|
||||
/>
|
||||
<el-table-column
|
||||
label="限量"
|
||||
prop="quotaShow"
|
||||
min-width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="限量剩余"
|
||||
min-width="80"
|
||||
prop="quota"
|
||||
/>
|
||||
<el-table-column
|
||||
label="秒杀状态"
|
||||
min-width="100"
|
||||
prop="statusName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
@change="onchangeIsShow(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="{ path:'/marketing/seckill/creatSeckill/updeta/' + scope.row.productId + '/' + scope.row.id}">
|
||||
<el-button type="text" size="small">编辑</el-button>
|
||||
</router-link>
|
||||
<el-button v-if="scope.row.killStatus !== 2 " type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)" class="mr10">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block mb20">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { seckillStoreListApi, seckillStoreDeleteApi, seckillStoreUpdateApi, seckillStoreStatusApi } from '@/api/marketing'
|
||||
import { getSeckillList } from '@/libs/public'
|
||||
export default {
|
||||
name: "SeckillList",
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
timeId: '',
|
||||
status: '',
|
||||
keywords: ''
|
||||
},
|
||||
seckillTime: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getSeckillList().then((res) => {
|
||||
this.seckillTime = res.list
|
||||
})
|
||||
this.tableFrom.timeId = Number(this.$route.params.timeId) || ''
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 订单删除
|
||||
handleDelete(id, idx) {
|
||||
this.$modalSure().then(() => {
|
||||
seckillStoreDeleteApi({ id: id }).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData.data.splice(idx, 1)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
seckillStoreListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
}).catch((res) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
onchangeIsShow(row) {
|
||||
seckillStoreStatusApi({id: row.id, status: row.status})
|
||||
.then(async () => {
|
||||
this.$message.success('修改成功');
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -6,6 +6,7 @@
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
<!-- {{ editData }}-->
|
||||
</div>
|
||||
@@ -47,6 +48,9 @@ export default {
|
||||
this.handlerInitEditData()
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handlerInitEditData() {
|
||||
const { sort, status } = this.editData
|
||||
this.selfForm.sort = sort
|
||||
|
||||
@@ -137,12 +137,14 @@
|
||||
<span>退款时间:{{scope.row.refundReasonTime}}</span>
|
||||
<span class="acea-row">
|
||||
退款凭证:
|
||||
<div class="demo-image__preview" v-if="scope.row.refundReasonWapImg" style="width: 35px;height: auto;display: inline-block;">
|
||||
<template v-if="scope.row.refundReasonWapImg">
|
||||
<div v-for="(item, index) in scope.row.refundReasonWapImg.split(',')" :key="index" class="demo-image__preview" style="width: 35px;height: auto;display: inline-block;">
|
||||
<el-image
|
||||
:src="scope.row.refundReasonWapImg"
|
||||
:preview-src-list="[scope.row.refundReasonWapImg]"
|
||||
:src="item"
|
||||
:preview-src-list="[item]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<!--<img :src="scope.row.refundReasonWapImg" v-if="scope.row.refundReasonWapImg" >-->
|
||||
<span v-else style="display: inline-block">无</span>
|
||||
</span>
|
||||
@@ -264,6 +266,7 @@
|
||||
:is-create="1"
|
||||
:edit-data="RefuseData"
|
||||
@submit="RefusehandlerSubmit"
|
||||
@resetForm="resetFormRefusehand"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
@@ -278,6 +281,7 @@
|
||||
:is-create="1"
|
||||
:edit-data="refundData"
|
||||
@submit="refundhandlerSubmit"
|
||||
@resetForm="resetFormRefundhandler"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -348,6 +352,15 @@
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
resetFormRefundhandler(){
|
||||
this.refundVisible = false
|
||||
},
|
||||
resetFormRefusehand(){
|
||||
this.RefuseVisible = false
|
||||
},
|
||||
resetForm(formValue) {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 核销订单
|
||||
onWriteOff(row) {
|
||||
this.$modalSure('核销订单吗').then(() => {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<el-card v-if="isShowList" v-loading="fullscreenLoading" class="box-card">
|
||||
<div class="content acea-row row-middle">
|
||||
<div class="demo-basic--circle acea-row row-middle">
|
||||
<el-avatar :size="50" :src="circleUrl" class="mr20" />
|
||||
<div class="circleUrl mr20"><img :src="circleUrl"></div>
|
||||
<!--<el-avatar :size="50" :src="circleUrl" class="mr20" />-->
|
||||
<div class="dashboard-workplace-header-tip">
|
||||
<div class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</div>
|
||||
<div class="dashboard-workplace-header-tip-desc">
|
||||
@@ -153,6 +154,16 @@ export default {
|
||||
.content{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.circleUrl{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.circleUrl img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.rR{
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
v-if="isShow"
|
||||
/>
|
||||
</el-card>
|
||||
@@ -30,6 +31,9 @@
|
||||
this.getFormInfo()
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.isShow = false;
|
||||
},
|
||||
handlerSubmit(data) {
|
||||
const tempArr = []
|
||||
for (var key in data) {
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@resetForm="resetForm"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -161,6 +162,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.handleClose();
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
this.editData = {}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<el-col :span="24">
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="排序:">
|
||||
<el-input-number v-model="formValidate.sort" placeholder="请输入排序" />
|
||||
<el-input-number v-model="formValidate.sort" :max="9999" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid">
|
||||
@@ -138,6 +138,23 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动优先级:">
|
||||
<div class="color-list acea-row row-middle">
|
||||
<div
|
||||
class="color-item" :class="activity[item]"
|
||||
v-for="item in formValidate.activity"
|
||||
:key="item"
|
||||
draggable="true"
|
||||
@dragstart="handleDragStart($event, item)"
|
||||
@dragover.prevent="handleDragOver($event, item)"
|
||||
@dragenter="handleDragEnterFont($event, item)"
|
||||
@dragend="handleDragEnd($event, item)"
|
||||
>{{item}}</div>
|
||||
<div class="tip">可拖动按钮调整活动的优先展示顺序</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="currentTab === 3">
|
||||
<el-col :span="24">
|
||||
@@ -386,7 +403,8 @@
|
||||
specType: false,
|
||||
id: 0,
|
||||
couponIds: [],
|
||||
coupons: []
|
||||
coupons: [],
|
||||
activity: ['默认','秒杀','砍价','拼团']
|
||||
}
|
||||
const objTitle = {
|
||||
price: {
|
||||
@@ -417,6 +435,7 @@
|
||||
components: { CreatTemplates },
|
||||
data() {
|
||||
return {
|
||||
activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' },
|
||||
props2: {
|
||||
children: 'child',
|
||||
label: 'name',
|
||||
@@ -867,7 +886,8 @@
|
||||
id: info.id,
|
||||
giveIntegral: info.giveIntegral,
|
||||
ficti: info.ficti,
|
||||
coupons: info.coupons
|
||||
coupons: info.coupons,
|
||||
activity: info.activityStr ? info.activityStr.split(',') : ['默认','秒杀','砍价','拼团']
|
||||
}
|
||||
if(info.isHot) this.checkboxGroup.push('isHot')
|
||||
if(info.isGood) this.checkboxGroup.push('isGood')
|
||||
@@ -1012,11 +1032,41 @@
|
||||
const dst = newItems.indexOf(item)
|
||||
newItems.splice(dst, 0, ...newItems.splice(src, 1))
|
||||
this.formValidate.sliderImages = newItems;
|
||||
},
|
||||
handleDragEnterFont(e, item) {
|
||||
e.dataTransfer.effectAllowed = 'move'
|
||||
if (item === this.dragging) {
|
||||
return
|
||||
}
|
||||
const newItems = [...this.formValidate.activity]
|
||||
const src = newItems.indexOf(this.dragging)
|
||||
const dst = newItems.indexOf(item)
|
||||
newItems.splice(dst, 0, ...newItems.splice(src, 1))
|
||||
this.formValidate.activity = newItems;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.color-item{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 10px;
|
||||
color:#fff;
|
||||
margin-right :10px;
|
||||
}
|
||||
.color-list .color-item.blue{
|
||||
background-color: #1E9FFF;
|
||||
}
|
||||
.color-list .color-item.yellow{
|
||||
background-color: rgb(254, 185, 0);
|
||||
}
|
||||
.color-list .color-item.green{
|
||||
background-color: #009688;
|
||||
}
|
||||
.color-list .color-item.red{
|
||||
background-color: #ed4014;
|
||||
}
|
||||
.proCoupon{
|
||||
/deep/.el-form-item__content{
|
||||
margin-top: 5px;
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<el-dialog
|
||||
title="复制淘宝、天猫、拼多多、京东、苏宁"
|
||||
:visible.sync="dialogVisible"
|
||||
width="1200px"
|
||||
width="1000px"
|
||||
:modal="false"
|
||||
class="taoBaoModal"
|
||||
:before-close="handleClose">
|
||||
@@ -259,6 +259,7 @@ export default {
|
||||
productDeleteApi(id).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
this.goodHeade();
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -267,9 +268,11 @@ export default {
|
||||
? putOnShellApi( row.id ).then(() => {
|
||||
this.$message.success('上架成功')
|
||||
this.getList()
|
||||
this.goodHeade();
|
||||
}) : offShellApi(row.id).then(() => {
|
||||
this.$message.success('下架成功')
|
||||
this.getList()
|
||||
this.goodHeade();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,6 @@
|
||||
if (valid) {
|
||||
replyCreatApi(this.formValidate).then(() => {
|
||||
this.$message.success("新增成功")
|
||||
this.$msgbox.close()
|
||||
setTimeout(() => {
|
||||
// this.clear();
|
||||
this.$emit('getList');
|
||||
|
||||
@@ -82,14 +82,16 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="mb5 content_font">{{scope.row.comment}}</div>
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="item"
|
||||
class='mr5'
|
||||
:preview-src-list="[item]"
|
||||
v-for="(item,index) in scope.row.pics" :key="index"
|
||||
/>
|
||||
</div>
|
||||
<template v-if="scope.row.pics.length && scope.row.pics[0]">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="item"
|
||||
class='mr5'
|
||||
:preview-src-list="[item]"
|
||||
v-for="(item,index) in scope.row.pics" :key="index"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -123,6 +125,14 @@
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px"
|
||||
z-index="4"
|
||||
:before-close="handleClose">
|
||||
<creat-comment :key="timer" @getList="seachList"></creat-comment>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -182,7 +192,9 @@ export default {
|
||||
timeVal: [],
|
||||
loading: false,
|
||||
uids: [],
|
||||
options: []
|
||||
options: [],
|
||||
dialogVisible: false,
|
||||
timer: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -205,6 +217,7 @@ export default {
|
||||
}
|
||||
},
|
||||
seachList() {
|
||||
this.dialogVisible = false
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
},
|
||||
@@ -254,38 +267,11 @@ export default {
|
||||
})
|
||||
},
|
||||
add() {
|
||||
const timer = new Date().getTime()
|
||||
const _this = this
|
||||
this.modalFrom(timer,null,function() {
|
||||
_this.getList()
|
||||
})
|
||||
this.dialogVisible = true
|
||||
this.timer = new Date().getTime()
|
||||
},
|
||||
modalFrom(timer, callback){
|
||||
const h = this.$createElement
|
||||
this.$msgbox({
|
||||
title: '虚拟评论',
|
||||
customClass: 'creatformModel',
|
||||
message: h('div', { class: 'common-form-upload' }, [
|
||||
h('creatComment', {
|
||||
props: {
|
||||
num: timer
|
||||
},
|
||||
on: {
|
||||
getList() {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
})
|
||||
]),
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false
|
||||
}).then(() => {
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
})
|
||||
})
|
||||
handleClose(){
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime (e) {
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="formValidate.specType">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="商品规格:" props="spec_type" label-for="spec_type">
|
||||
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
|
||||
<template v-if="manyTabDate">
|
||||
@@ -453,12 +453,12 @@
|
||||
selectRule: info.selectRule,
|
||||
isSub: false,
|
||||
content: info.content,
|
||||
specType: info.specType,
|
||||
specType: info.specType || false,
|
||||
id: info.id,
|
||||
giveIntegral: info.giveIntegral,
|
||||
ficti: info.ficti
|
||||
}
|
||||
if(this.formValidate.attr){
|
||||
if(this.formValidate.attr.length){
|
||||
for (var i = 0; i < this.formValidate.attr.length; i++) {
|
||||
this.formValidate.attr[i].attrValue = JSON.parse(info.attr[i].attrValues)
|
||||
}
|
||||
|
||||
@@ -187,22 +187,22 @@ export default {
|
||||
this.$message.success('添加数据成功')
|
||||
// 81 82 83
|
||||
// 针对云存储配置特殊处理 切勿随意改动
|
||||
_formId = parseInt(_pram.id)
|
||||
if(_formId === 108 || _formId === 81 || _formId === 82 || _formId === 83){
|
||||
let _value
|
||||
switch (_formId) {
|
||||
case 108: _value = 1
|
||||
break;
|
||||
case 81: _value = 2
|
||||
break;
|
||||
case 82: _value = 3
|
||||
break;
|
||||
case 83: _value = 4
|
||||
break;
|
||||
}
|
||||
const _pram = { key:"uploadType",value:_value }
|
||||
systemConfigApi.configSaveUniq(_pram)
|
||||
}
|
||||
// _formId = parseInt(_pram.id)
|
||||
// if(_formId === 108 || _formId === 81 || _formId === 82 || _formId === 83){
|
||||
// let _value
|
||||
// switch (_formId) {
|
||||
// case 108: _value = 1
|
||||
// break;
|
||||
// case 81: _value = 2
|
||||
// break;
|
||||
// case 82: _value = 3
|
||||
// break;
|
||||
// case 83: _value = 4
|
||||
// break;
|
||||
// }
|
||||
// const _pram = { key:"uploadType",value:_value }
|
||||
// systemConfigApi.configSaveUniq(_pram)
|
||||
// }
|
||||
})
|
||||
},
|
||||
handlerGetTreeList() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选择门店:">
|
||||
<el-select v-model="tableFrom.storeId" clearable filterable placeholder="请选择" class="selWidth" clearable @change="seachList">
|
||||
<el-select v-model="tableFrom.storeId" clearable filterable placeholder="请选择" class="selWidth" clearable @change="getList(1)">
|
||||
<el-option
|
||||
v-for="item in storeSelectList"
|
||||
:key="item.id"
|
||||
@@ -22,7 +22,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="请输入姓名、电话、订单ID" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -159,10 +159,6 @@
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
seachList() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
},
|
||||
storeList() {
|
||||
let artFrom = {
|
||||
page: 1,
|
||||
@@ -197,8 +193,9 @@
|
||||
this.getList()
|
||||
},
|
||||
// 列表
|
||||
getList() {
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
||||
orderListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list.list
|
||||
this.tableData.total = res.list.total
|
||||
|
||||
@@ -153,8 +153,8 @@
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
this.$parent.visible = false
|
||||
this.$refs[formName].resetFields();
|
||||
this.$emit('resetForm');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
:visible.sync="visible"
|
||||
width="600px"
|
||||
>
|
||||
<edit-from v-if="visible" :uid="uid"></edit-from>
|
||||
<edit-from v-if="visible" :uid="uid" @resetForm="resetForm"></edit-from>
|
||||
</el-dialog>
|
||||
<!--积分余额-->
|
||||
<el-dialog
|
||||
@@ -585,6 +585,9 @@
|
||||
this.getCityList()
|
||||
},
|
||||
methods: {
|
||||
resetForm(){
|
||||
this.visible = false;
|
||||
},
|
||||
reset(formName) {
|
||||
this.userFrom = {
|
||||
labelId: '',
|
||||
@@ -755,7 +758,7 @@
|
||||
// 具体日期
|
||||
onchangeTime (e) {
|
||||
this.timeVal = e;
|
||||
this.userFrom.dateLimit = e.join(',');
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : '';
|
||||
},
|
||||
// 分组列表
|
||||
groupLists () {
|
||||
|
||||
29
app/App.vue
@@ -1,4 +1,10 @@
|
||||
|
||||
<!-- <template>
|
||||
<view>
|
||||
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
|
||||
scrolling="no" src="https://java.crmeb.net">
|
||||
</iframe>
|
||||
</view>
|
||||
</template> -->
|
||||
<script>
|
||||
import { checkLogin } from "./libs/login";
|
||||
import { HTTP_REQUEST_URL } from './config/app';
|
||||
@@ -49,6 +55,20 @@
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
onShow: function() {
|
||||
// #ifdef H5
|
||||
uni.getSystemInfo({
|
||||
success(e){
|
||||
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
|
||||
if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){
|
||||
// window.location.pathname = 'https://java.crmeb.net/';
|
||||
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
|
||||
window.location.pathname = '/static/html/pc.html';
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onHide: function() {
|
||||
//console.log('App Hide')
|
||||
}
|
||||
@@ -61,6 +81,13 @@
|
||||
@import 'static/iconfont/iconfont.css';
|
||||
@import 'static/css/guildford.css';
|
||||
@import 'static/css/style.scss';
|
||||
|
||||
/* 条件编译,仅在H5平台生效 */
|
||||
// #ifdef H5
|
||||
body::-webkit-scrollbar,html::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
// #endif
|
||||
view{
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -180,3 +180,11 @@ export function seckillCode(id,data) {
|
||||
export function scombinationCode(id) {
|
||||
return request.get("combination/code/"+id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 秒杀产品时间区间
|
||||
* @param int id
|
||||
*/
|
||||
export function getSeckillHeaderApi(){
|
||||
return request.get('seckill/index',{},{noAuth:true});
|
||||
}
|
||||
@@ -168,11 +168,12 @@ export function orderRefundVerify(data) {
|
||||
* 订单确认获取订单详细信息
|
||||
* @param string cartId
|
||||
*/
|
||||
export function orderConfirm(cartId, isNew, addAgain) {
|
||||
export function orderConfirm(cartId, isNew, addAgain,secKill) {
|
||||
return request.post('order/confirm', {
|
||||
cartIds: cartId,
|
||||
isNew: isNew,
|
||||
addAgain: addAgain
|
||||
addAgain: addAgain,
|
||||
secKill: secKill
|
||||
}, {}, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export function collectDel(id, category) {
|
||||
*
|
||||
*/
|
||||
export function postCartAdd(data) {
|
||||
return request.post('cart/save', data, {},1);
|
||||
return request.post('cart/save', data, {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -128,6 +128,20 @@ export function getCommissionInfo(q, types) {
|
||||
return request.get("spread/commission/" + types, q);
|
||||
}
|
||||
|
||||
/*
|
||||
* 提现记录 getCountApi
|
||||
* */
|
||||
export function getRecordApi(q) {
|
||||
return request.get("extract/record", q);
|
||||
}
|
||||
|
||||
/*
|
||||
* 提现总金额
|
||||
* */
|
||||
export function getCountApi() {
|
||||
return request.get("extract/totalMoney");
|
||||
}
|
||||
|
||||
/*
|
||||
* 积分记录
|
||||
* */
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
}).catch(res=>{
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
title:res.message,
|
||||
icon:'none',
|
||||
duration:2000
|
||||
});
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
<view @click="goDetail(item)" class='item acea-row row-between-wrapper' hover-class="none">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '3'">拼团</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class='underline'>
|
||||
<view class='text'>
|
||||
<view class='line1'>{{item.storeName}}</view>
|
||||
<view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
|
||||
<view class='vip-money acea-row row-middle' v-if="item.vip_price && item.vip_price > 0">¥{{item.vip_price || 0}}
|
||||
<image src='../../static/images/vip.png'></image><text class='num'>已售{{item.sales}}{{item.unitName}}</text>
|
||||
<image src='../../static/images/vip.png'></image><text class='num'>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</text>
|
||||
</view>
|
||||
<view class='vip-money acea-row row-middle' v-else><text class='num'>已售{{item.sales}}{{item.unitName}}</text></view>
|
||||
<view class='vip-money acea-row row-middle' v-else><text class='num'>已售{{Number(item.sales) + Number(item.ficti) || 0}}{{item.unitName}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'></view>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
this.videoContext = uni.createVideoContext('myVideo',this);
|
||||
//this.videoContext = uni.createVideoContext('myVideo',this);
|
||||
},
|
||||
methods: {
|
||||
bindPause:function(){
|
||||
|
||||
@@ -12,46 +12,49 @@
|
||||
<view class="money font-color">
|
||||
¥<text class="num">{{ attr.productSelect.price }}</text>
|
||||
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</text>
|
||||
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quotaShow}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
|
||||
</view>
|
||||
<view class="productWinList">
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attrName }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
|
||||
@click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
<view class="rollTop">
|
||||
<view class="productWinList">
|
||||
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
|
||||
<view class="title">{{ item.attrName }}</view>
|
||||
<view class="listn acea-row row-middle">
|
||||
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''" v-for="(itemn, indexn) in item.attrValue"
|
||||
@click="tapAttr(indexw, indexn)" :key="indexn">
|
||||
{{ itemn.attr }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart">
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
-
|
||||
<view class="cart acea-row row-between-wrapper">
|
||||
<view class="title">数量</view>
|
||||
<view class="carnum acea-row row-left">
|
||||
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
|
||||
-
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus" :class="
|
||||
attr.productSelect.cart_num >= attr.productSelect.stock
|
||||
? 'on'
|
||||
: ''
|
||||
"
|
||||
@click="CartNumAdd">
|
||||
+
|
||||
</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""' @click='CartNumAdd'>+</view>
|
||||
</view>
|
||||
<view class='item num'>
|
||||
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num" @input="bindCode(attr.productSelect.cart_num)"></input>
|
||||
</view>
|
||||
<view v-if="iSplus" class="item plus" :class="
|
||||
attr.productSelect.cart_num >= attr.productSelect.stock
|
||||
? 'on'
|
||||
: ''
|
||||
"
|
||||
@click="CartNumAdd">
|
||||
+
|
||||
</view>
|
||||
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota_show) || (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' @click='CartNumAdd'>+</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.product_stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.product_stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0" @click="goCat">我要参团</view>
|
||||
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">确定</view>
|
||||
<view class="joinBnt on" v-else-if="iScart && !attr.productSelect.stock">已售罄</view>
|
||||
<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat">确定</view>
|
||||
<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
|
||||
</view>
|
||||
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
||||
</view>
|
||||
@@ -89,6 +92,9 @@
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.attr)
|
||||
},
|
||||
methods: {
|
||||
goCat:function(){
|
||||
this.$emit('goCat');
|
||||
@@ -153,7 +159,7 @@
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all .3s cubic-bezier(.25, .5, .5, .9);
|
||||
}
|
||||
|
||||
|
||||
.product-window.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
@@ -164,44 +170,44 @@
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic {
|
||||
padding: 0 130rpx 0 30rpx;
|
||||
margin-top: 29rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text {
|
||||
width: 410rpx;
|
||||
font-size: 32rpx;
|
||||
color: #202020;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money {
|
||||
font-size: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .num {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .text .money .stock {
|
||||
color: #999;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .textpic .iconfont {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
@@ -209,90 +215,98 @@
|
||||
font-size: 35rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
|
||||
.product-window .productWinList {
|
||||
max-height: 395rpx;
|
||||
|
||||
.product-window .rollTop{
|
||||
max-height: 500rpx;
|
||||
overflow: auto;
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
margin-top: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn {
|
||||
padding: 0 30rpx 0 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn {
|
||||
border: 1px solid #bbb;
|
||||
border: 1px solid #F2F2F2;
|
||||
font-size: 26rpx;
|
||||
color: #282828;
|
||||
padding: 7rpx 33rpx;
|
||||
border-radius: 6rpx;
|
||||
margin: 14rpx 0 0 14rpx;
|
||||
border-radius: 25rpx;
|
||||
margin: 20rpx 0 0 14rpx;
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.on {
|
||||
color: #fff;
|
||||
background-color: #ff3700;
|
||||
border-color: #ff3700;
|
||||
color: #E93323;
|
||||
background:rgba(255,244,243,1);
|
||||
border-color: #E93323;
|
||||
}
|
||||
|
||||
|
||||
.product-window .productWinList .item .listn .itemn.limit {
|
||||
color: #999;
|
||||
text-decoration:line-through;
|
||||
}
|
||||
|
||||
.product-window .cart {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .title {
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum {
|
||||
height: 54rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum view {
|
||||
border: 1px solid #a4a4a4;
|
||||
// border: 1px solid #a4a4a4;
|
||||
width: 84rpx;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
line-height: 54rpx;
|
||||
color: #a4a4a4;
|
||||
color: #282828;
|
||||
font-size: 45rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce {
|
||||
border-right: 0;
|
||||
border-radius: 6rpx 0 0 6rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .reduce.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
// border-color: #e3e3e3;
|
||||
color: #DEDEDE;
|
||||
font-size: 60rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus {
|
||||
border-left: 0;
|
||||
border-radius: 0 6rpx 6rpx 0;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .plus.on {
|
||||
border-color: #e3e3e3;
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
|
||||
.product-window .cart .carnum .num {
|
||||
background:rgba(242,242,242,1);
|
||||
color: #282828;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<view class='item acea-row row-between-wrapper' @tap="goDetail(item)" hover-class="none">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activity && item.activity.type === '3'">拼团</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class='text'>
|
||||
<view class='name line1'>{{item.store_name}}</view>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<view class='item' v-for="(item,index) in hostProduct" :key="index" hover-class='none' @tap="goDetail(item)">
|
||||
<view class='pictrue'>
|
||||
<image :src='item.image'></image>
|
||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '2'">砍价</span>
|
||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '3'">拼团</span>
|
||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log_big pictrue_log_class" v-if="item.activityH5 && item.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class='name line1'>{{item.storeName}}</view>
|
||||
<view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;align-items: center; height: 100%;" scroll-with-animation :scroll-left="tabLeft" show-scrollbar="false">
|
||||
<view class="wrapper">
|
||||
<view v-for="(item,index) in tabTitle[tabClick].child?tabTitle[tabClick].child:[]" :key="index" class="child-item" :class="{on:index == childIndex}" @click="childTab(tabClick,index)">
|
||||
<image :src="item.url" mode=""></image>
|
||||
<image :src="item.extra" mode=""></image>
|
||||
<view class="txt line1">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view class="time">{{ item.createTime }} {{ item.suk }}</view>
|
||||
<view class="evaluate-infor">{{ item.comment }}</view>
|
||||
<view class="imgList acea-row">
|
||||
<view class="imgList acea-row" v-if="item.pics.length && item.pics[0]">
|
||||
<view class="pictrue" v-for="(itemn, indexn) in item.pics" :key="indexn">
|
||||
<image :src="itemn" class="image" @click='getpreviewImage(indexw, indexn)'></image>
|
||||
</view>
|
||||
|
||||
@@ -26,4 +26,6 @@ module.exports = {
|
||||
TOKENNAME: 'Authori-zation',
|
||||
// 缓存时间 0 永久
|
||||
EXPIRE:0,
|
||||
//分页最多显示条数
|
||||
LIMIT: 10
|
||||
};
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
export function goShopDetail(item,uid) {
|
||||
return new Promise(resolve => {
|
||||
if (item.activity && item.activity.type === "1") {
|
||||
if (item.activityH5 && item.activityH5.type === "1") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}&time=${item.activityH5.time}&status=2`
|
||||
})
|
||||
} else if (item.activity && item.activity.type === "2") {
|
||||
} else if (item.activityH5 && item.activityH5.type === "2") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}&bargain=${uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${uid}`
|
||||
})
|
||||
} else if (item.activity && item.activity.type === "3") {
|
||||
} else if (item.activityH5 && item.activityH5.type === "3") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
|
||||
url: `/pages/activity/goods_combination_details/index?id=${item.activityH5.id}`
|
||||
})
|
||||
} else {
|
||||
resolve(item);
|
||||
|
||||
@@ -99,6 +99,21 @@ class AuthWechat {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取经纬度;
|
||||
location(){
|
||||
return new Promise((resolve, reject) => {
|
||||
this.wechat().then(wx => {
|
||||
this.toPromise(wx.getLocation,{type: 'wgs84'}).then(res => {
|
||||
resolve(res);
|
||||
}).catch(err => {
|
||||
reject(err);
|
||||
});
|
||||
}).catch(err => {
|
||||
reject(err);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信支付
|
||||
* @param {Object} config
|
||||
|
||||
@@ -497,7 +497,10 @@
|
||||
"navigationBarTitleText": "crmeb",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"titleNView": false
|
||||
"titleNView": false,
|
||||
"rpxCalcMaxDeviceWidth": 960,
|
||||
"rpxCalcBaseDeviceWidth": 375,
|
||||
"rpxCalcIncludeWidth": 750
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#282828",
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
that.loadingList = false;
|
||||
})
|
||||
.catch(res => {
|
||||
that.$dialog.error(res.msg);
|
||||
that.$dialog.error(res);
|
||||
});
|
||||
},
|
||||
getBargainUserCancel: function(bargainId) {
|
||||
@@ -125,7 +125,7 @@
|
||||
that.bargain = [];
|
||||
that.getBargainUserList();
|
||||
that.$util.Tips({
|
||||
title: res.msg
|
||||
title: res
|
||||
})
|
||||
})
|
||||
.catch(res => {
|
||||
|
||||
@@ -593,7 +593,7 @@
|
||||
})
|
||||
.then(res => {
|
||||
that.$util.Tips({
|
||||
title:res.msg
|
||||
title:res
|
||||
},{
|
||||
tab: 3,
|
||||
})
|
||||
|
||||
@@ -2,9 +2,23 @@
|
||||
<div>
|
||||
<view class='flash-sale'>
|
||||
<view class="saleBox"></view>
|
||||
<view class='header' v-if="timeList.length>0">
|
||||
<image :src='timeList[active].slide'></image>
|
||||
<!-- banner -->
|
||||
<view class="header" v-if="timeList.length">
|
||||
<swiper indicator-dots="true" autoplay="true" :circular="circular" interval="3000" duration="1500"
|
||||
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
||||
<block v-for="(item,index) in JSON.parse(timeList[active].slide)" :key="index">
|
||||
<swiper-item>
|
||||
<image :src="item.sattDir" class="slide-image" lazy-load></image>
|
||||
<!-- <navigator :url='item.url' class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
|
||||
<image :src="item.pic" class="slide-image" lazy-load></image>
|
||||
</navigator> -->
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- <view class='header' v-if="timeList.length>0">
|
||||
<image :src='timeList[active].slide'></image>
|
||||
</view> -->
|
||||
<view class="seckillList acea-row row-between-wrapper">
|
||||
<view class="priceTag">
|
||||
<image src="/static/images/priceTag.png"></image>
|
||||
@@ -13,14 +27,14 @@
|
||||
<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;height:106rpx;">
|
||||
<block v-for="(item,index) in timeList" :key='index'>
|
||||
<view @tap='settimeList(item,index)' class='item' :class="active == index?'on':''">
|
||||
<view class='time'>{{item.time}}</view>
|
||||
<view class="state">{{item.state}}</view>
|
||||
<view class='time'>{{item.time.split(',')[0]}}</view>
|
||||
<view class="state">{{item.statusName}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='list'>
|
||||
<view class='list' v-if='seckillList.length>0'>
|
||||
<block v-for="(item,index) in seckillList" :key='index'>
|
||||
<view class='item acea-row row-between-wrapper' @tap='goDetails(item)'>
|
||||
<view class='pictrue'>
|
||||
@@ -30,16 +44,16 @@
|
||||
<view class='name line1'>{{item.title}}</view>
|
||||
<view class='money'>¥
|
||||
<text class='num font-color'>{{item.price}}</text>
|
||||
<text class="y_money">¥{{item.ot_price}}</text>
|
||||
<text class="y_money">¥{{item.otPrice}}</text>
|
||||
</view>
|
||||
<view class="limit">限量 <text class="limitPrice">{{item.quota}}件</text></view>
|
||||
<view class="limit">限量 <text class="limitPrice">{{item.quotaShow}} {{item.unitName}}</text></view>
|
||||
<view class="progress">
|
||||
<view class='bg-reds' :style="'width:'+item.percent+'%;'"></view>
|
||||
<view class='piece'>已抢{{item.percent}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='grab bg-color' v-if="status == 1">马上抢</view>
|
||||
<view class='grab bg-color' v-else-if="status == 2">未开始</view>
|
||||
<view class='grab bg-color' v-if="status == 2">马上抢</view>
|
||||
<view class='grab bg-color' v-else-if="status == 1">未开始</view>
|
||||
<view class='grab bg-color-hui' v-else>已结束</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -56,7 +70,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSeckillIndexTime,
|
||||
getSeckillHeaderApi,
|
||||
getSeckillList
|
||||
} from '../../../api/activity.js';
|
||||
import home from '@/components/home/index.vue'
|
||||
@@ -66,6 +80,10 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
circular: true,
|
||||
autoplay: true,
|
||||
interval: 500,
|
||||
// duration: 500,
|
||||
topImage: '',
|
||||
seckillList: [],
|
||||
timeList: [],
|
||||
@@ -81,6 +99,7 @@
|
||||
loading: false,
|
||||
loadend: false,
|
||||
pageloading: false,
|
||||
seckillHeader: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -89,8 +108,7 @@
|
||||
methods: {
|
||||
getSeckillConfig: function() {
|
||||
let that = this;
|
||||
getSeckillIndexTime().then(res => {
|
||||
that.topImage = res.data.lovely;
|
||||
getSeckillHeaderApi().then(res => {
|
||||
that.timeList = res.data.seckillTime;
|
||||
that.active = res.data.seckillTimeIndex;
|
||||
if (that.timeList.length) {
|
||||
@@ -116,7 +134,7 @@
|
||||
if (that.pageloading) return;
|
||||
this.pageloading = true
|
||||
getSeckillList(that.timeList[that.active].id, data).then(res => {
|
||||
var seckillList = res.data;
|
||||
var seckillList = res.data.list;
|
||||
var loadend = seckillList.length < that.limit;
|
||||
that.page++;
|
||||
that.seckillList = that.seckillList.concat(seckillList),
|
||||
@@ -147,7 +165,7 @@
|
||||
},
|
||||
goDetails(item){
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].stop + '&status=' + this.status
|
||||
url: '/pages/activity/goods_seckill_details/index?id=' + item.id + '&time=' + this.timeList[this.active].timeSwap + '&status=' + this.status + '&productId=' + item.productId
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -263,6 +281,7 @@
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.flash-sale .list .item .pictrue image {
|
||||
|
||||
@@ -19,15 +19,10 @@
|
||||
<view id="past0">
|
||||
<productConSwiper :imgUrls='imgUrls'></productConSwiper>
|
||||
<view class='nav acea-row row-between-wrapper'>
|
||||
<view class='money'>¥<text class='num'>{{storeInfo.price}}</text><text class='y-money'>¥{{storeInfo.ot_price}}</text></view>
|
||||
<view class='money'>¥<text class='num'>{{storeInfo.price}}</text><text class='y-money'>¥{{storeInfo.otPrice}}</text></view>
|
||||
<view class='acea-row row-middle'>
|
||||
<view class='time' v-if="status == 1">
|
||||
<view class='time' v-if="status == 2">
|
||||
<view>距秒杀结束仅剩</view>
|
||||
<!-- <view class='timeCon'>
|
||||
<text class='num'>{{countDownHour}}</text>:
|
||||
<text class='num'>{{countDownMinute}}</text>:
|
||||
<text class='num'>{{countDownSecond}}</text>
|
||||
</view> -->
|
||||
<countDown :is-day="false" :tip-text="' '" :day-text="' '" :hour-text="' : '" :minute-text="' : '" :second-text="' '"
|
||||
:datatime="datatime"></countDown>
|
||||
</view>
|
||||
@@ -43,9 +38,8 @@
|
||||
<view class='iconfont icon-fenxiang' @click="listenerActionSheet"></view>
|
||||
</view>
|
||||
<view class='label acea-row row-middle'>
|
||||
<!-- <view class='stock'>库存:{{storeInfo.stock}}{{storeInfo.unit_name}}</view> -->
|
||||
<view class='stock'>累计销售:{{storeInfo.total?storeInfo.total:0}}件</view>
|
||||
<view>限量: {{ storeInfo.quota ? storeInfo.quota : 0 }} 件</view>
|
||||
<view class='stock'>累计销售:{{Number(storeInfo.sales) + Number(storeInfo.ficti) || 0}}{{storeInfo.unitName}}</view>
|
||||
<view>限量: {{ storeInfo.quotaShow ? storeInfo.quotaShow : 0 }} {{storeInfo.unitName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='attribute acea-row row-between-wrapper' @tap='selecAttr' v-if='attribute.productAttr.length'>
|
||||
@@ -56,7 +50,7 @@
|
||||
<view class='userEvaluation' id="past1">
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view>用户评价({{replyCount}})</view>
|
||||
<navigator class='praise' hover-class='none' :url="'/pages/users/goods_comment_list/index?product_id='+storeInfo.product_id">
|
||||
<navigator class='praise' hover-class='none' :url="'/pages/users/goods_comment_list/index?productId='+ storeInfo.productId">
|
||||
<text class='font-color'>{{replyChance}}%</text>好评率
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</navigator>
|
||||
@@ -67,7 +61,7 @@
|
||||
<view class='title'>产品介绍</view>
|
||||
<view class='conter'>
|
||||
<!-- <template is="wxParse" data="{{wxParseData:description.nodes}}" /> -->
|
||||
<jyf-parser :html="storeInfo.description" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
<jyf-parser :html="storeInfo.content" ref="article" :tag-style="tagStyle"></jyf-parser>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
@@ -90,19 +84,23 @@
|
||||
<view class='iconfont icon-shoucang' v-else></view>
|
||||
<view>收藏</view>
|
||||
</view>
|
||||
<view class="bnt acea-row" v-if="status == 1 && attribute.productSelect.quota > 0 && attribute.productSelect.product_stock>0">
|
||||
<view class="bnt acea-row" v-if="status == 2 && attribute.productSelect.quota > 0 && attribute.productSelect.stock>0">
|
||||
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
|
||||
<view class="buy bnts" @tap="goCat">立即购买</view>
|
||||
</view>
|
||||
<view class="bnt acea-row" v-if="(status == 1 && attribute.productSelect.quota <= 0) || (status == 3 && attribute.productSelect.quota <= 0) || (status == 1 && attribute.productSelect.product_stock <= 0) || (status == 3 && attribute.productSelect.product_stock <= 0)">
|
||||
<view class="bnt acea-row" v-if="status == 2 && (attribute.productSelect.quota <= 0 || attribute.productSelect.stock<= 0)">
|
||||
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
|
||||
<view class="buy bnts bg-color-hui">已售罄</view>
|
||||
</view>
|
||||
<view class="bnt acea-row" v-if="status == 2">
|
||||
<view class="bnt acea-row" v-if="status == 0">
|
||||
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
|
||||
<view class="buy bnts bg-color-hui">已关闭</view>
|
||||
</view>
|
||||
<view class="bnt acea-row" v-if="status == 1">
|
||||
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
|
||||
<view class="buy bnts bg-color-hui">未开始</view>
|
||||
</view>
|
||||
<view class="bnt acea-row" v-if="status == 0">
|
||||
<view class="bnt acea-row" v-if="status == -1">
|
||||
<view class="joinCart bnts" @tap="openAlone">单独购买</view>
|
||||
<view class="buy bnts bg-color-hui">已结束</view>
|
||||
</view>
|
||||
@@ -133,10 +131,11 @@
|
||||
<view class="">生成海报</view>
|
||||
</button>
|
||||
</view>
|
||||
<view class="mask" v-if="posters" @click="listenerActionClose"></view>
|
||||
<view class="mask" v-if="posters" @click="closePosters"></view>
|
||||
<view class="mask" v-if="canvasStatus" @click="listenerActionClose"></view>
|
||||
|
||||
<!-- 海报展示 -->
|
||||
<view class='poster-pop' v-if="posterImageStatus">
|
||||
<view class='poster-pop' v-if="canvasStatus">
|
||||
<image src='/static/images/poster-close.png' class='close' @click="posterImageClose"></image>
|
||||
<image :src='posterImage'></image>
|
||||
<!-- #ifndef H5 -->
|
||||
@@ -146,13 +145,19 @@
|
||||
<view class="keep">长按图片可以保存到手机</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class='mask' v-if="posterImageStatus"></view>
|
||||
<canvas class="canvas" canvas-id='myCanvas' v-if="canvasStatus"></canvas>
|
||||
<view class="canvas" v-else>
|
||||
<canvas style="width:750px;height:1190px;" canvas-id="firstCanvas"></canvas>
|
||||
<canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}"/>
|
||||
</view>
|
||||
<!-- <view class='mask' v-if="canvasStatus"></view> -->
|
||||
<!--
|
||||
<canvas class="canvas" canvas-id='qrcode' v-if="canvasStatus"></canvas> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
@@ -163,13 +168,18 @@
|
||||
import {
|
||||
postCartAdd,
|
||||
collectAdd,
|
||||
collectDel
|
||||
collectDel,
|
||||
getReplyList,
|
||||
getReplyConfig
|
||||
} from '@/api/store.js';
|
||||
import productConSwiper from '@/components/productConSwiper/index.vue'
|
||||
import productWindow from '@/components/productWindow/index.vue'
|
||||
import userEvaluation from '@/components/userEvaluation/index.vue'
|
||||
// #ifdef MP
|
||||
import authorize from '@/components/Authorize';
|
||||
import {
|
||||
getQrcode
|
||||
} from '@/api/api.js';
|
||||
// #endif
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import home from '@/components/home/index.vue'
|
||||
@@ -243,7 +253,14 @@
|
||||
posterImage: '', //海报路径
|
||||
posterbackgd: '/static/images/posterbackgd.png',
|
||||
actionSheetHidden: false,
|
||||
cart_num:''
|
||||
cart_num:'',
|
||||
attrTxt: '',
|
||||
qrcodeSize: 600,
|
||||
productId: 0, //商品id
|
||||
aloneAttrValueId: 0 ,//单规格规格id
|
||||
imagePath:'',//海报路径
|
||||
imgTop:'',
|
||||
buyNum: 1
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -257,7 +274,7 @@
|
||||
authorize
|
||||
// #endif
|
||||
},
|
||||
computed: mapGetters(['isLogin']),
|
||||
computed: mapGetters(['isLogin','uid']),
|
||||
onLoad(options) {
|
||||
|
||||
let that = this
|
||||
@@ -280,7 +297,6 @@
|
||||
//扫码携带参数处理
|
||||
if (options.scene) {
|
||||
let value = this.$util.getUrlParams(decodeURIComponent(options.scene));
|
||||
console.log(value,'options')
|
||||
if (value.id){
|
||||
this.id = value.id;
|
||||
}else{
|
||||
@@ -302,8 +318,11 @@
|
||||
this.datatime = Number(options.time)
|
||||
this.status = options.status
|
||||
}
|
||||
if(options.productId) this.productId = Number(options.productId)
|
||||
if (this.isLogin) {
|
||||
this.getSeckillDetail();
|
||||
this.getProductReplyList();
|
||||
this.getProductReplyCount();
|
||||
} else {
|
||||
// #ifdef H5 || APP-PLUS
|
||||
toLogin();
|
||||
@@ -315,13 +334,34 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getProductReplyList: function() {
|
||||
getReplyList(this.productId, {
|
||||
page: 1,
|
||||
limit: 3,
|
||||
type: 0,
|
||||
}).then(res => {
|
||||
this.reply = res.data.list;
|
||||
})
|
||||
},
|
||||
getProductReplyCount: function() {
|
||||
let that = this;
|
||||
getReplyConfig(that.productId).then(res => {
|
||||
that.$set(that, 'replyChance', res.data.replyChance * 100);
|
||||
that.$set(that, 'replyCount', res.data.sumCount);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 购物车手动填写
|
||||
*
|
||||
*/
|
||||
iptCartNum: function (e) {
|
||||
this.$set(this.attribute.productSelect,'cart_num',e);
|
||||
this.$set(this.attribute.productSelect, 'cart_num', e?e:1);
|
||||
this.$set(this, "cart_num", e);
|
||||
if (e > 1) {
|
||||
return this.$util.Tips({
|
||||
title: `该商品每次限购1${this.storeInfo.unitName}`
|
||||
});
|
||||
}
|
||||
},
|
||||
// 后退
|
||||
returns: function() {
|
||||
@@ -337,33 +377,34 @@
|
||||
getSeckillDetail: function() {
|
||||
let that = this;
|
||||
getSeckillDetail(that.id).then(res => {
|
||||
let title = res.data.storeInfo.title;
|
||||
//let title = res.data.title;
|
||||
this.aloneAttrValueId = res.data.aloneAttrValueId;
|
||||
this.storeInfo = res.data.storeInfo;
|
||||
this.imgUrls = res.data.storeInfo.images;
|
||||
this.imgUrls = JSON.parse(res.data.storeInfo.images) || [];
|
||||
this.attribute.productAttr = res.data.productAttr;
|
||||
this.productValue = res.data.productValue;
|
||||
this.personNum = res.data.storeInfo.num;
|
||||
this.replyCount = res.data.replyCount;
|
||||
this.reply = res.data.reply ? [res.data.reply] : [];
|
||||
this.replyChance = res.data.replyChance
|
||||
this.personNum = res.data.storeInfo.quota;
|
||||
this.attribute.productSelect.num = res.data.storeInfo.num;
|
||||
// #ifdef H5
|
||||
this.PromotionCode = res.data.storeInfo.code_base
|
||||
that.storeImage = that.storeInfo.image
|
||||
that.getImageBase64();
|
||||
that.storeImage = that.storeInfo.image;
|
||||
that.make();
|
||||
that.getImageBase64(that.storeImage);
|
||||
that.setShare();
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
that.getQrcode();
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
that.downloadFilestoreImage();
|
||||
that.downloadFilePromotionCode();
|
||||
//that.downloadFilePromotionCode();
|
||||
// #endif
|
||||
that.DefaultSelect();
|
||||
setTimeout(function() {
|
||||
that.infoScroll();
|
||||
}, 500);
|
||||
app.globalData.openPages = '/pages/activity/goods_seckill_details/index?id=' + that.id + '&time=' + that.time +
|
||||
'&status=' + that.status + '&scene=' + that.storeInfo.uid;
|
||||
// wxParse.wxParse('description', 'html', that.data.storeInfo.description || '', that, 0);
|
||||
// wxh.time(that.data.time, that);
|
||||
'&status=' + that.status + '&scene=' + that.storeInfo.uid;
|
||||
|
||||
}).catch(err => {
|
||||
that.$util.Tips({
|
||||
title:err
|
||||
@@ -385,7 +426,6 @@
|
||||
link: location.href,
|
||||
imgUrl: this.storeInfo.image
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
@@ -398,9 +438,9 @@
|
||||
let self = this
|
||||
let productAttr = self.attribute.productAttr;
|
||||
let value = [];
|
||||
for (var key in this.productValue) {
|
||||
if (this.productValue[key].quota > 0) {
|
||||
value = this.attribute.productAttr.length ? key.split(",") : [];
|
||||
for (var key in self.productValue) {
|
||||
if (self.productValue[key].stock > 0) {
|
||||
value = self.attribute.productAttr.length ? key.split(",") : [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -408,34 +448,35 @@
|
||||
this.$set(productAttr[i], "index", value[i]);
|
||||
}
|
||||
//sort();排序函数:数字-英文-汉字;
|
||||
let productSelect = this.productValue[value.sort().join(",")];
|
||||
let productSelect = this.productValue[value.join(",")];
|
||||
if (productSelect && productAttr.length) {
|
||||
self.$set(
|
||||
self.attribute.productSelect,
|
||||
"store_name",
|
||||
self.storeInfo.title
|
||||
"storeName",
|
||||
self.storeInfo.storeName
|
||||
);
|
||||
self.$set(self.attribute.productSelect, "image", productSelect.image);
|
||||
self.$set(self.attribute.productSelect, "price", productSelect.price);
|
||||
self.$set(self.attribute.productSelect, "stock", productSelect.stock);
|
||||
self.$set(self.attribute.productSelect, "unique", productSelect.unique);
|
||||
self.$set(self.attribute.productSelect, "unique", productSelect.id);
|
||||
self.$set(self.attribute.productSelect, "quota", productSelect.quota);
|
||||
self.$set(self.attribute.productSelect, "quota_show", productSelect.quota_show);
|
||||
self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
|
||||
self.$set(self.attribute.productSelect, "quotaShow", productSelect.quotaShow);
|
||||
self.$set(self.attribute.productSelect, "cart_num", 1);
|
||||
self.$set(self, "attrValue", value.sort().join(","));
|
||||
self.attrValue = value.sort().join(",")
|
||||
self.$set(self, "attrValue", value.join(","));
|
||||
// self.$set(self, "attrValue", value.sort().join(","));
|
||||
this.$set(self, "attrTxt", "已选择")
|
||||
self.attrValue = value.join(",")
|
||||
// self.attrValue = value.sort().join(",")
|
||||
} else if (!productSelect && productAttr.length) {
|
||||
self.$set(
|
||||
self.attribute.productSelect,
|
||||
"store_name",
|
||||
self.storeInfo.title
|
||||
"storeName",
|
||||
self.storeInfo.storeName
|
||||
);
|
||||
self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
|
||||
self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
|
||||
self.$set(self.attribute.productSelect, "quota", 0);
|
||||
self.$set(self.attribute.productSelect, "quota_show", 0);
|
||||
self.$set(self.attribute.productSelect, "product_stock", 0);
|
||||
self.$set(self.attribute.productSelect, "quota", 0);
|
||||
self.$set(self.attribute.productSelect, "stock", 0);
|
||||
self.$set(self.attribute.productSelect, "unique", "");
|
||||
self.$set(self.attribute.productSelect, "cart_num", 0);
|
||||
@@ -444,22 +485,20 @@
|
||||
} else if (!productSelect && !productAttr.length) {
|
||||
self.$set(
|
||||
self.attribute.productSelect,
|
||||
"store_name",
|
||||
self.storeInfo.title
|
||||
"storeName",
|
||||
self.storeInfo.storeName
|
||||
);
|
||||
self.$set(self.attribute.productSelect, "image", self.storeInfo.image);
|
||||
self.$set(self.attribute.productSelect, "price", self.storeInfo.price);
|
||||
self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
|
||||
self.$set(self.attribute.productSelect, "quota", self.storeInfo.quota);
|
||||
self.$set(self.attribute.productSelect, "product_stock", self.storeInfo.product_stock);
|
||||
self.$set(self.attribute.productSelect, "quotaShow", self.storeInfo.quotaShow);
|
||||
self.$set(self.attribute.productSelect, "stock", self.storeInfo.stock);
|
||||
self.$set(
|
||||
self.attribute.productSelect,
|
||||
"unique",
|
||||
self.storeInfo.unique || ""
|
||||
self.aloneAttrValueId || ""
|
||||
);
|
||||
self.$set(self.attribute.productSelect, "cart_num", 1);
|
||||
self.$set(self.attribute.productSelect, "quota", productSelect.quota);
|
||||
self.$set(self.attribute.productSelect, "product_stock", productSelect.product_stock);
|
||||
self.$set(self, "attrValue", "");
|
||||
self.$set(self, "attrTxt", "请选择");
|
||||
}
|
||||
@@ -480,36 +519,40 @@
|
||||
//获取当前变动属性
|
||||
let productSelect = this.productValue[this.attrValue];
|
||||
if (this.cart_num) {
|
||||
productSelect.cart_num = this.cart_num;
|
||||
this.attribute.productSelect.cart_num = this.cart_num;
|
||||
}
|
||||
productSelect.cart_num = this.cart_num;
|
||||
this.attribute.productSelect.cart_num = this.cart_num;
|
||||
}
|
||||
//如果没有属性,赋值给商品默认库存
|
||||
if (productSelect === undefined && !this.attribute.productAttr.length)
|
||||
productSelect = this.attribute.productSelect;
|
||||
//无属性值即库存为0;不存在加减;
|
||||
if (productSelect === undefined) return;
|
||||
let stock = productSelect.stock || 0;
|
||||
let quotaShow = productSelect.quota_show || 0;
|
||||
let productStock = productSelect.product_stock || 0;
|
||||
let quota = productSelect.quota || 0;
|
||||
let num = this.attribute.productSelect;
|
||||
let nums = this.storeInfo.num || 0;
|
||||
//设置默认数据
|
||||
if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
|
||||
if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
|
||||
if (changeValue) {
|
||||
num.cart_num ++;
|
||||
if(quotaShow >= productStock){
|
||||
if (num.cart_num > productStock) {
|
||||
this.$set(this.attribute.productSelect, "cart_num", productStock);
|
||||
this.$set(this, "cart_num", productStock);
|
||||
}
|
||||
}else{
|
||||
if (num.cart_num > quotaShow) {
|
||||
this.$set(this.attribute.productSelect, "cart_num", quotaShow);
|
||||
this.$set(this, "cart_num", quotaShow);
|
||||
}
|
||||
console.log(this.buyNum);
|
||||
if (num.cart_num === 1) {
|
||||
return this.$util.Tips({
|
||||
title: `该商品每次限购1${this.storeInfo.unitName}`
|
||||
});
|
||||
}
|
||||
num.cart_num++;
|
||||
let arrMin = [];
|
||||
arrMin.push(nums);
|
||||
arrMin.push(quota);
|
||||
arrMin.push(stock);
|
||||
let minN = Math.min.apply(null, arrMin);
|
||||
if (num.cart_num >= minN) {
|
||||
this.$set(this.attribute.productSelect, "cart_num", minN ? minN : 1);
|
||||
this.$set(this, "cart_num", minN ? minN : 1);
|
||||
}
|
||||
this.$set(this, "cart_num", num.cart_num);
|
||||
this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
|
||||
|
||||
|
||||
} else {
|
||||
num.cart_num--;
|
||||
if (num.cart_num < 1) {
|
||||
@@ -520,8 +563,52 @@
|
||||
this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
|
||||
}
|
||||
},
|
||||
// ChangeCartNum: function(changeValue) {
|
||||
// //changeValue:是否 加|减
|
||||
// //获取当前变动属性
|
||||
// let productSelect = this.productValue[this.attrValue];
|
||||
// if (this.cart_num) {
|
||||
// productSelect.cart_num = this.cart_num;
|
||||
// this.attribute.productSelect.cart_num = this.cart_num;
|
||||
// }
|
||||
// //如果没有属性,赋值给商品默认库存
|
||||
// if (productSelect === undefined && !this.attribute.productAttr.length)
|
||||
// productSelect = this.attribute.productSelect;
|
||||
// //无属性值即库存为0;不存在加减;
|
||||
// if (productSelect === undefined) return;
|
||||
// let stock = productSelect.stock || 0;
|
||||
// let num = this.attribute.productSelect;
|
||||
// let quota = productSelect.quota || 0;
|
||||
// //设置默认数据
|
||||
// if (productSelect.cart_num == undefined) productSelect.cart_num = 1;
|
||||
// if (changeValue) {
|
||||
// num.cart_num ++;
|
||||
// if(quota >= stock){
|
||||
// if (num.cart_num > stock) {
|
||||
// this.$set(this.attribute.productSelect, "cart_num", stock);
|
||||
// this.$set(this, "cart_num", stock);
|
||||
// }
|
||||
// }else{
|
||||
// if (num.cart_num > quota) {
|
||||
// this.$set(this.attribute.productSelect, "cart_num", quota);
|
||||
// this.$set(this, "cart_num", quota);
|
||||
// }
|
||||
// }
|
||||
// this.$set(this, "cart_num", num.cart_num);
|
||||
// this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
|
||||
|
||||
// } else {
|
||||
// num.cart_num--;
|
||||
// if (num.cart_num < 1) {
|
||||
// this.$set(this.attribute.productSelect, "cart_num", 1);
|
||||
// this.$set(this, "cart_num", 1);
|
||||
// }
|
||||
// this.$set(this, "cart_num", num.cart_num);
|
||||
// this.$set(this.attribute.productSelect, "cart_num", num.cart_num);
|
||||
// }
|
||||
// },
|
||||
attrVal(val) {
|
||||
this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attr_values[val.indexn];
|
||||
this.attribute.productAttr[val.indexw].index = this.attribute.productAttr[val.indexw].attrValues[val.indexn];
|
||||
},
|
||||
/**
|
||||
* 属性变动赋值
|
||||
@@ -534,12 +621,11 @@
|
||||
this.$set(this.attribute.productSelect, "image", productSelect.image);
|
||||
this.$set(this.attribute.productSelect, "price", productSelect.price);
|
||||
this.$set(this.attribute.productSelect, "stock", productSelect.stock);
|
||||
this.$set(this.attribute.productSelect, "unique", productSelect.unique);
|
||||
this.$set(this.attribute.productSelect, "unique", productSelect.id);
|
||||
this.$set(this.attribute.productSelect, "cart_num", 1);
|
||||
this.$set(this.attribute.productSelect, "quota", productSelect.quota);
|
||||
this.$set(this.attribute.productSelect, "quota_show", productSelect.quota_show);
|
||||
this.$set(this.attribute.productSelect, "quotaShow", productSelect.quotaShow);
|
||||
this.$set(this, "attrValue", res);
|
||||
|
||||
this.attrTxt = "已选择"
|
||||
} else {
|
||||
this.$set(this.attribute.productSelect, "image", this.storeInfo.image);
|
||||
@@ -548,7 +634,7 @@
|
||||
this.$set(this.attribute.productSelect, "unique", "");
|
||||
this.$set(this.attribute.productSelect, "cart_num", 0);
|
||||
this.$set(this.attribute.productSelect, "quota", 0);
|
||||
this.$set(this.attribute.productSelect, "quota_show", 0);
|
||||
this.$set(this.attribute.productSelect, "quotaShow", 0);
|
||||
this.$set(this, "attrValue", "");
|
||||
this.attrTxt = "已选择"
|
||||
|
||||
@@ -612,11 +698,11 @@
|
||||
setCollect: function() {
|
||||
var that = this;
|
||||
if (this.storeInfo.userCollect) {
|
||||
collectDel(this.storeInfo.product_id).then(res => {
|
||||
collectDel(this.storeInfo.productId).then(res => {
|
||||
that.storeInfo.userCollect = !that.storeInfo.userCollect
|
||||
})
|
||||
} else {
|
||||
collectAdd(this.storeInfo.product_id).then(res => {
|
||||
collectAdd(this.storeInfo.productId).then(res => {
|
||||
that.storeInfo.userCollect = !that.storeInfo.userCollect
|
||||
})
|
||||
}
|
||||
@@ -626,7 +712,7 @@
|
||||
*/
|
||||
openAlone: function() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${this.storeInfo.product_id}`
|
||||
url: `/pages/goods_details/index?id=${this.storeInfo.productId}`
|
||||
})
|
||||
},
|
||||
/*
|
||||
@@ -635,6 +721,12 @@
|
||||
goCat: function() {
|
||||
var that = this;
|
||||
var productSelect = this.productValue[this.attrValue];
|
||||
var productSelect = this.productValue[this.attrValue];
|
||||
if (that.cart_num > 1) {
|
||||
return this.$util.Tips({
|
||||
title: `该商品每人限购1${this.storeInfo.unitName}`
|
||||
});
|
||||
}
|
||||
//打开属性
|
||||
if (this.isOpen)
|
||||
this.attribute.cartAttr = true
|
||||
@@ -647,17 +739,17 @@
|
||||
title: '请选择属性'
|
||||
});
|
||||
postCartAdd({
|
||||
productId: that.storeInfo.product_id,
|
||||
secKillId: that.id,
|
||||
bargainId: 0,
|
||||
combinationId: 0,
|
||||
cartNum: that.cart_num,
|
||||
uniqueId: productSelect !== undefined ? productSelect.unique : '',
|
||||
'new': 1
|
||||
productId: that.storeInfo.productId,
|
||||
isNew: true,
|
||||
seckillId: Number(that.id),
|
||||
// bargainId: 0,
|
||||
// combinationId: 0,
|
||||
cartNum: that.cart_num ? this.cart_num : this.attribute.productSelect.cart_num,
|
||||
productAttrUnique: productSelect !== undefined ? productSelect.id : this.aloneAttrValueId,
|
||||
}).then(res => {
|
||||
this.isOpen = false
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/order_confirm/index?cartId=' + res.data.cartId
|
||||
url: '/pages/users/order_confirm/index?cartId=' + res.data.cartId + '&secKill=true'
|
||||
});
|
||||
}).catch(err => {
|
||||
return this.$util.Tips({
|
||||
@@ -694,7 +786,7 @@
|
||||
},
|
||||
//隐藏海报
|
||||
posterImageClose: function() {
|
||||
this.posterImageStatus = false
|
||||
this.canvasStatus = false
|
||||
},
|
||||
//替换安全域名
|
||||
setDomain: function(url) {
|
||||
@@ -746,14 +838,11 @@
|
||||
that.$set(that, 'PromotionCode', '');
|
||||
});
|
||||
},
|
||||
getImageBase64: function() {
|
||||
getImageBase64:function(images){
|
||||
let that = this;
|
||||
imageBase64(that.storeImage, that.PromotionCode)
|
||||
.then(res => {
|
||||
that.storeImage = res.data.image;
|
||||
that.PromotionCode = res.data.code;
|
||||
})
|
||||
.catch(() => {});
|
||||
imageBase64({url:images}).then(res=>{
|
||||
that.imgTop = res.data.code
|
||||
})
|
||||
},
|
||||
// 小程序关闭分享弹窗;
|
||||
goFriend: function() {
|
||||
@@ -765,59 +854,50 @@
|
||||
goPoster: function() {
|
||||
let that = this;
|
||||
that.posters = false;
|
||||
that.$set(that, 'canvasStatus', true);
|
||||
let arr2 = [that.posterbackgd, that.storeImage, that.PromotionCode];
|
||||
// #ifndef H5
|
||||
if (that.isDown) return that.$util.Tips({
|
||||
title: '正在下载海报,请稍后再试!'
|
||||
});
|
||||
// #endif
|
||||
uni.getImageInfo({
|
||||
src: that.PromotionCode,
|
||||
fail: function(res) {
|
||||
return that.$util.Tips({
|
||||
title: '小程序二维码需要发布正式版后才能获取到'
|
||||
});
|
||||
},
|
||||
success() {
|
||||
if (arr2[2] == '') {
|
||||
//海报二维码不存在则从新下载
|
||||
// #ifndef H5
|
||||
that.downloadFilePromotionCode(function(msgPromotionCode) {
|
||||
arr2[2] = msgPromotionCode;
|
||||
if (arr2[2] == '')
|
||||
return that.$util.Tips({
|
||||
title: '海报二维码生成失败!'
|
||||
});
|
||||
that.$util.PosterCanvas(arr2, that.storeInfo.title, that.storeInfo.price, function(tempFilePath) {
|
||||
that.$set(that, 'posterImage', tempFilePath);
|
||||
that.$set(that, 'posterImageStatus', true);
|
||||
that.$set(that, 'canvasStatus', false);
|
||||
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
that.$util.PosterCanvas(arr2, that.storeInfo.title, that.storeInfo.price, function(tempFilePath) {
|
||||
that.$set(that, 'posterImage', tempFilePath);
|
||||
that.$set(that, 'posterImageStatus', true);
|
||||
that.$set(that, 'canvasStatus', false);
|
||||
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
//生成推广海报
|
||||
that.$util.PosterCanvas(arr2, that.storeInfo.title, that.storeInfo.price, function(tempFilePath) {
|
||||
that.$set(that, 'posterImage', tempFilePath);
|
||||
that.$set(that, 'posterImageStatus', true);
|
||||
that.$set(that, 'canvasStatus', false);
|
||||
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
|
||||
});
|
||||
}
|
||||
},
|
||||
let arrImages = [that.posterbackgd, that.imgTop, that.PromotionCode];
|
||||
let storeName = that.storeInfo.storeName;
|
||||
let price = that.storeInfo.price;
|
||||
that.$util.PosterCanvas(arrImages, storeName, price, function(tempFilePath) {
|
||||
that.posterImage = tempFilePath;
|
||||
that.canvasStatus = true;
|
||||
});
|
||||
},
|
||||
|
||||
// 小程序二维码
|
||||
getQrcode(){
|
||||
let that = this;
|
||||
let data = {
|
||||
pid: that.uid,
|
||||
id: that.id,
|
||||
path: '/pages/goods_seckill_details/index'
|
||||
}
|
||||
getQrcode(data).then(res=>{
|
||||
that.PromotionCode = res.data.code;
|
||||
})
|
||||
},
|
||||
// 生成二维码;
|
||||
make() {
|
||||
let that = this;
|
||||
let href = location.href;
|
||||
let hrefs = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + that.uid;
|
||||
uQRCode.make({
|
||||
canvasId: 'qrcode',
|
||||
text: hrefs,
|
||||
size: that.qrcodeSize,
|
||||
margin: 10,
|
||||
success: res => {
|
||||
that.PromotionCode = res;
|
||||
|
||||
},
|
||||
complete: (res) => {
|
||||
},
|
||||
fail:res=>{
|
||||
that.$util.Tips({
|
||||
title: '海报二维码生成失败!'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*
|
||||
* 保存到手机相册
|
||||
*/
|
||||
@@ -879,8 +959,8 @@
|
||||
href + "&spread=" + res.data.uid;
|
||||
|
||||
let configAppMessage = {
|
||||
desc: data.store_info,
|
||||
title: data.store_name,
|
||||
desc: data.storeInfo,
|
||||
title: data.storeName,
|
||||
link: href,
|
||||
imgUrl: data.image
|
||||
};
|
||||
@@ -892,7 +972,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped lang="scss">
|
||||
.generate-posters {
|
||||
width: 100%;
|
||||
height: 170rpx;
|
||||
@@ -1146,8 +1226,9 @@
|
||||
background: #bbbbbb !important;
|
||||
}
|
||||
.canvas {
|
||||
width: 750px;
|
||||
height: 1190px;
|
||||
position:fixed;
|
||||
z-index: -5;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.poster-pop {
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
that.delivery = res.data;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error.msg);
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -133,7 +133,7 @@
|
||||
that.logistics = res.data;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error.msg);
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -183,7 +183,7 @@
|
||||
setAdminOrderDelivery(item).then(
|
||||
res => {
|
||||
that.$util.Tips({
|
||||
title:res.msg,
|
||||
title:res,
|
||||
icon:'success',
|
||||
mask:true
|
||||
})
|
||||
@@ -192,7 +192,7 @@
|
||||
},2000)
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error.msg);
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
},
|
||||
err => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
title: error
|
||||
})
|
||||
}
|
||||
);
|
||||
@@ -133,7 +133,7 @@
|
||||
},
|
||||
error => {
|
||||
that.$util.Tips({
|
||||
title: error.msg
|
||||
title: error
|
||||
})
|
||||
},
|
||||
300
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
res => {
|
||||
that.change = false;
|
||||
that.$util.Tips({
|
||||
title: res.msg
|
||||
title: res
|
||||
});
|
||||
that.getIndex();
|
||||
},
|
||||
@@ -319,7 +319,7 @@
|
||||
res => {
|
||||
that.change = false;
|
||||
this.$util.Tips({
|
||||
title: res.msg,
|
||||
title: res,
|
||||
icon: 'success'
|
||||
})
|
||||
that.getIndex();
|
||||
@@ -339,7 +339,7 @@
|
||||
}).then(
|
||||
res => {
|
||||
this.$util.Tips({
|
||||
title: res.msg,
|
||||
title: res,
|
||||
icon: 'success'
|
||||
});
|
||||
this.getIndex();
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
that.where.page = that.where.page + 1;
|
||||
},
|
||||
err => {
|
||||
that.$dialog.error(err.msg);
|
||||
that.$dialog.error(err);
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -224,7 +224,7 @@
|
||||
setOrderRefund(data).then(
|
||||
res => {
|
||||
that.change = false;
|
||||
that.$util.Tips({title: res.msg});
|
||||
that.$util.Tips({title: res});
|
||||
that.init();
|
||||
},
|
||||
err => {
|
||||
@@ -245,7 +245,7 @@
|
||||
res => {
|
||||
that.change = false;
|
||||
this.$util.Tips({
|
||||
title:res.msg,
|
||||
title:res,
|
||||
icon:'success'
|
||||
})
|
||||
that.init();
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
self.verify_code = ''
|
||||
self.iShidden = false
|
||||
self.$util.Tips({
|
||||
title: res.msg
|
||||
title: res
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
that.showLineA("canvasLineA", that.LineA);
|
||||
},
|
||||
error => {
|
||||
that.$dialog.error(error.msg);
|
||||
that.$dialog.error(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -316,7 +316,7 @@
|
||||
that.filter.page = that.filter.page + 1;
|
||||
},
|
||||
error => {
|
||||
that.$dialog.message(error.msg);
|
||||
that.$dialog.message(error);
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
this.$dialog.error("连接失败");
|
||||
});
|
||||
this.$on("err_tip", data => {
|
||||
this.$dialog.error(data.msg);
|
||||
this.$dialog.error(data);
|
||||
});
|
||||
this.$on("socket_open", () => {
|
||||
this.socket.send({
|
||||
@@ -486,8 +486,7 @@
|
||||
},
|
||||
imageuploaded(res) {
|
||||
console.log(res)
|
||||
if (res.status !== 200)
|
||||
return this.$dialog.error(res.msg || "上传图片失败");
|
||||
if (res.status !== 200) return this.$dialog.error(res || "上传图片失败");
|
||||
this.sendMsg(res.data.url, 3);
|
||||
},
|
||||
getHistory() {
|
||||
@@ -513,7 +512,7 @@
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
this.$dialog.error(err.msg || "加载失败");
|
||||
this.$dialog.error(err || "加载失败");
|
||||
});
|
||||
},
|
||||
focus: function() {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<view class='label acea-row row-between-wrapper'>
|
||||
<view>原价:¥{{storeInfo.otPrice}}</view>
|
||||
<view>库存:{{storeInfo.stock}}{{storeInfo.unitName}}</view>
|
||||
<view>销量:{{storeInfo.sales}}{{storeInfo.unitName}}</view>
|
||||
<view>销量:{{Number(storeInfo.sales) + Number(storeInfo.ficti) || 0}}{{storeInfo.unitName}}</view>
|
||||
</view>
|
||||
<!-- <view class='coupon acea-row row-between-wrapper' v-if="storeInfo.give_integral > 0">
|
||||
<view class='hide line1 acea-row'>
|
||||
@@ -46,10 +46,10 @@
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
<view class="coupon acea-row row-between-wrapper" v-if="activity.length">
|
||||
<view class="coupon acea-row row-between-wrapper" v-if="activityH5.length">
|
||||
<view class="line1 acea-row">
|
||||
<text>活 动:</text>
|
||||
<view v-for='(item,index) in activity' :key='index' @click="goActivity(item)">
|
||||
<view v-for='(item,index) in activityH5' :key='index' @click="goActivity(item)">
|
||||
<view v-if="item.type === '1'" :class="index==0?'activity_pin':'' || index==1?'activity_miao':'' || index==2?'activity_kan':''">
|
||||
<text class="iconfonts iconfont icon-pintuan"></text>
|
||||
<text class="activity_title"> 参与秒杀</text>
|
||||
@@ -76,7 +76,7 @@
|
||||
<view class='userEvaluation' id="past1">
|
||||
<view class='title acea-row row-between-wrapper'>
|
||||
<view>用户评价({{replyCount}})</view>
|
||||
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?product_id="+id'>
|
||||
<navigator class='praise' hover-class='none' :url='"/pages/users/goods_comment_list/index?productId="+id'>
|
||||
<text class='font-color'>{{replyChance}}%</text>好评率
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</navigator>
|
||||
@@ -100,9 +100,9 @@
|
||||
<view class="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)">
|
||||
<view class="pictrue">
|
||||
<image :src="val.image"></image>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '3'">拼团</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class="name line1">{{val.storeName}}</view>
|
||||
<view class="money font-color">¥{{val.price}}</view>
|
||||
@@ -326,7 +326,7 @@
|
||||
description: '',
|
||||
navActive: 0,
|
||||
H5ShareBox: false, //公众号分享图片
|
||||
activity: [],
|
||||
activityH5: [],
|
||||
retunTop: true, //顶部返回
|
||||
navH: "",
|
||||
navList: [],
|
||||
@@ -451,7 +451,7 @@
|
||||
let item = e;
|
||||
if (item.type === "1") {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.id}&time=${item.time}&status=1`
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.id}&time=${item.time}&status=2`
|
||||
});
|
||||
} else if (item.type === "2") {
|
||||
uni.navigateTo({
|
||||
@@ -508,36 +508,36 @@
|
||||
*去商品详情页
|
||||
*/
|
||||
goDetail(item) {
|
||||
if(!item.activity){
|
||||
if(!item.activityH5){
|
||||
uni.redirectTo({
|
||||
url: '/pages/goods_details/index?id=' + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
if (item.activity.length == 0) {
|
||||
if (item.activityH5.length == 0) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/goods_details/index?id=' + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
// 砍价
|
||||
if (item.activity && item.activity.type == 2) {
|
||||
if (item.activityH5 && item.activityH5.type == 2) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}&bargain=${this.uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&bargain=${this.uid}`
|
||||
})
|
||||
return
|
||||
}
|
||||
// 拼团
|
||||
if (item.activity && item.activity.type == 3) {
|
||||
if (item.activityH5 && item.activityH5.type == 3) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
|
||||
url: `/pages/activity/goods_combination_details/index?id=${item.activityH5.id}`
|
||||
})
|
||||
return
|
||||
}
|
||||
// 秒杀
|
||||
if (item.activity && item.activity.type == 1) {
|
||||
if (item.activityH5 && item.activityH5.type == 1) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
|
||||
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}&time=${item.activityH5.time}&status=2`
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -668,10 +668,9 @@
|
||||
that.$set(that, 'description', storeInfo.content);
|
||||
that.$set(that.attr, 'productAttr', res.data.productAttr);
|
||||
that.$set(that, 'productValue', res.data.productValue);
|
||||
that.$set(that.sharePacket, 'priceName', res.data.priceName);
|
||||
that.$set(that.sharePacket, 'priceName', res.data.priceName);
|
||||
that.$set(that, 'systemStore', res.data.system_store);
|
||||
that.$set(that, 'good_list', goodArray);
|
||||
that.$set(that, 'good_list', goodArray);
|
||||
that.$set(that, 'activityH5', res.data.storeInfo.activityAllH5 ? res.data.storeInfo.activityAllH5 : []);
|
||||
uni.setNavigationBarTitle({
|
||||
title: storeInfo.storeName.substring(0, 7) + "..."
|
||||
@@ -783,6 +782,7 @@
|
||||
*/
|
||||
DefaultSelect: function() {
|
||||
let productAttr = this.attr.productAttr;
|
||||
let value = [];
|
||||
console.log(this.productValue)
|
||||
for (let key in this.productValue) {
|
||||
if (this.productValue[key].stock > 0) {
|
||||
@@ -994,7 +994,7 @@
|
||||
})
|
||||
.catch(res => {
|
||||
that.isOpen = false;
|
||||
return that.$util.Tips({
|
||||
return that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
@@ -1117,6 +1117,7 @@
|
||||
make(uid) {
|
||||
let that = this;
|
||||
let href = location.href;
|
||||
href = href.indexOf("?") === -1 ? href + "?spread=" + uid : href + "&spread=" + uid;
|
||||
console.log(href)
|
||||
uQRCode.make({
|
||||
canvasId: 'qrcode',
|
||||
|
||||
@@ -99,9 +99,9 @@
|
||||
<view class="item" v-for="(val,indexn) in item.list" :key="indexn" @click="goDetail(val)">
|
||||
<view class="pictrue">
|
||||
<image :src="val.image"></image>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activity && val.activity.type === '3'">拼团</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '1'">秒杀</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '2'">砍价</span>
|
||||
<span class="pictrue_log pictrue_log_class" v-if="val.activityH5 && val.activityH5.type === '3'">拼团</span>
|
||||
</view>
|
||||
<view class="name line1">{{val.storeName}}</view>
|
||||
<view class="money font-color">¥{{val.price}}</view>
|
||||
@@ -948,7 +948,7 @@
|
||||
.catch(res => {
|
||||
that.isOpen = false;
|
||||
return that.$util.Tips({
|
||||
title: res.msg
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||