mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 17:35:53 +08:00
Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a12a29127 | ||
|
|
8d96a3c106 | ||
|
|
41bfd17cd0 | ||
|
|
5614414185 | ||
|
|
7ac4010910 | ||
|
|
ffc5af6d39 | ||
|
|
c64f00fe9e | ||
|
|
d3a49f3f3e | ||
|
|
06c6abe250 | ||
|
|
f54739e337 | ||
|
|
cdc673da06 | ||
|
|
0bd99df26a | ||
|
|
0dcee2f2e2 | ||
|
|
f7f836f5fd | ||
|
|
16d1576c10 | ||
|
|
0d1dbd0350 | ||
|
|
18ea8a4366 | ||
|
|
b9aa720bea | ||
|
|
28473979ec | ||
|
|
dbe5a21f4d | ||
|
|
31d9859f10 | ||
|
|
7cbd2b698c | ||
|
|
6fa3fa7822 | ||
|
|
e80316d43d | ||
|
|
9979b6fd67 | ||
|
|
a36a4cd244 | ||
|
|
f99e2673a6 | ||
|
|
47da7d3b16 | ||
|
|
4f2f6e8d20 | ||
|
|
4da164dcba | ||
|
|
1aab8aa8c8 | ||
|
|
8a2a946bc1 | ||
|
|
038de5ed53 | ||
|
|
0bac362c95 | ||
|
|
04599148fc | ||
|
|
b61faef093 | ||
|
|
642536f83e | ||
|
|
7ebb5e21d2 | ||
|
|
0c18a0f6db | ||
|
|
93768e4014 | ||
|
|
3674b63db4 | ||
|
|
9e8f369da4 | ||
|
|
04cc8b991c | ||
|
|
0342f1d17a | ||
|
|
82838a5ebb | ||
|
|
20042786aa | ||
|
|
2037b57a5d | ||
|
|
2932c7f35d | ||
|
|
53cc6f46d1 | ||
|
|
a5e2ae9a4d | ||
|
|
95beebc5c7 | ||
|
|
f7b8713be1 | ||
|
|
c33d10734f | ||
|
|
edde94af69 | ||
|
|
fbf2b6a6fa | ||
|
|
b84f1b595e | ||
|
|
e4bc52a219 | ||
|
|
ea8c86e2e2 | ||
|
|
70506767ef | ||
|
|
48002d6143 |
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -3,4 +3,7 @@
|
|||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="WebPackConfiguration">
|
||||||
|
<option name="mode" value="DISABLED" />
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
||||||
253
README.md
253
README.md
@@ -1,110 +1,138 @@
|
|||||||
## Lilishop B2B2C商城系统
|
## 🔥 Lilishop B2B2C商城系统
|
||||||
|
|
||||||
|
##### 🌹 开源不易,如有帮助请点Star
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,进群先看文档后提问)
|
||||||
|
|
||||||
|
##### 交流 qq 1群 961316482(已满)
|
||||||
|
|
||||||
|
##### 交流 qq 2群 875294241
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 商城 公众号/小程序体验,扫描二维码
|
||||||
|
|
||||||
##### 官方公众号 & 开源不易,如有帮助请点Star
|
|
||||||

|

|
||||||
|
|
||||||
[](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
|
[](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
### 介绍
|
### 🔥 商城介绍
|
||||||
**官网**:https://pickmall.cn
|
**官网**:https://pickmall.cn
|
||||||
|
|
||||||
Lilishop 是一款Java开发,基于SpringBoot研发的B2B2C多用户商城,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
Lilishop 商城系统 基于SpringBoot 研发,B2B2C多用户商城系统,前端使用 Vue、uniapp开发 **系统全端全部代码开源**
|
||||||
|
|
||||||
产品前后端分离、支持分布式部署。
|
业务兼容O2O商城/B2B商城/B2B2C商城/F2B2C商城/S2B2C商城。支持小程序商城、H5商城、APP商城、 PC商城。
|
||||||
|
|
||||||
商城展示端包含 PC、H5、微信小程序、APP。
|
|
||||||
|
商城前后端分离、支持分布式部署。
|
||||||
|
|
||||||
商城包含 会员模块、**第三方登录模块**、**第三方支付模块**、**楼层装修模块**、订单模块、分销模块、文章模块、系统设置模块、流量分析模块
|
商城包含 会员模块、**第三方登录模块**、**第三方支付模块**、**楼层装修模块**、订单模块、分销模块、文章模块、系统设置模块、流量分析模块
|
||||||
|
|
||||||
系统包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发等商城系统。
|
商城包含各种中间件、搜索引擎、多级缓存、分布式事务、分布式任务调度等,支持Docker,支持k8s。是一款高性能,支持高并发的商城系统。
|
||||||
|
|
||||||
开箱即用,简单配置即可部署一套属于您的系统。
|
##### 商城 API/消费者 聚合版
|
||||||
|
api不需要单独部署,只需启动一个jar包就可以正常运转 如有需要,可以点击跳转https://gitee.com/beijing_hongye_huicheng/lilishop-simplify
|
||||||
|
|
||||||
### 文档
|
### ☃️ 商城 开发/使用/常见问题 帮助文档
|
||||||
|
|
||||||
**产品文档**(需求、架构、使用、部署、开发):https://docs.pickmall.cn
|
https://docs.pickmall.cn
|
||||||
|
|
||||||
|
### 💧 开源商城项目地址(gitee)
|
||||||
|
|
||||||
|
**API(商城所有API)**:https://gitee.com/beijing_hongye_huicheng/lilishop.git
|
||||||
|
|
||||||
|
**UI(商城管理端/商家端/买家PC端)**: https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
|
||||||
|
|
||||||
|
**uniapp(商城移动端,支持小程序/APP/H5)**:https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
|
||||||
|
|
||||||
|
**docker一键部署(商城部署脚本)**:https://gitee.com/beijing_hongye_huicheng/docker.git
|
||||||
|
|
||||||
|
### 💧 开源商城项目地址(github)
|
||||||
|
|
||||||
|
**API(商城所有API)**:https://github.com/hongyehuicheng/lilishop.git
|
||||||
|
|
||||||
|
**UI(商城管理端/商家端/买家PC端)**: https://github.com/hongyehuicheng/lilishop-ui.git
|
||||||
|
|
||||||
|
**uniapp(商城移动端,支持小程序/APP/H5)**:https://github.com/hongyehuicheng/lilishop-uniapp.git
|
||||||
|
|
||||||
|
**docker一键部署(商城部署脚本)**:https://github.com/hongyehuicheng/docker.git
|
||||||
|
|
||||||
|
|
||||||
### 项目链接(gitee)
|
☃️ UI 项目下3个文件夹 buyer:买家PC端,seller:商家端,manager:后台管理端
|
||||||
|
|
||||||
**Java后台**:https://gitee.com/beijing_hongye_huicheng/lilishop.git
|
|
||||||
|
|
||||||
**Vue后台前端**: https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
|
### 💧 演示地址(手机验证码为 ‘111111’)
|
||||||
|
|
||||||
**Uni-app**:https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
|
**商城管理端**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
||||||
|
|
||||||
**docker一键部署**:https://gitee.com/beijing_hongye_huicheng/docker.git
|
**商城店铺后台**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
||||||
|
|
||||||
### 项目链接(github)
|
**商城PC页面**:https://pc-b2b2c.pickmall.cn
|
||||||
|
|
||||||
**Java后台**:https://github.com/hongyehuicheng/lilishop.git
|
**商城移动端(请使浏览器手机模式,或者用手机浏览器打开)**:https://m-b2b2c.pickmall.cn
|
||||||
|
|
||||||
**Vue后台前端**: https://github.com/hongyehuicheng/lilishop-ui.git
|
**小程序/公众号**:扫描二维码
|
||||||
|
|
||||||
**Uni-app**:https://github.com/hongyehuicheng/lilishop-uniapp.git
|
|
||||||
|
|
||||||
**docker一键部署**:https://github.com/hongyehuicheng/docker.git
|
|
||||||
|
|
||||||
### 演示地址
|
|
||||||
|
|
||||||
**运营后台**:https://admin-b2b2c.pickmall.cn 账号:admin/123456
|
|
||||||
|
|
||||||
**店铺后台**:https://store-b2b2c.pickmall.cn 账号:13011111111/111111
|
|
||||||
|
|
||||||
**用户前台**:https://pc-b2b2c.pickmall.cn
|
|
||||||
|
|
||||||
**移动端**:https://m-b2b2c.pickmall.cn
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 3行命令搭建本地环境
|
### 🚙 3行命令搭建本地商城(注:只能本机访问,如需调整,请自行操作镜像)
|
||||||
|
|
||||||
温馨提示:由于服务较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
温馨提示:由于服务中间件较多,如果笔记本环境启动内存没有32g可能无法启动成功(macbookpro 2020 16g内存启动无法成功),台式机在16g内存、AMD 3700x 的ubuntu系统成功运行。
|
||||||
|
|
||||||
##### 下载docker脚本
|
|
||||||
|
|
||||||
|
##### docker环境安装 [点击跳转](https://docs.pickmall.cn/deploy/%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87.html)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 下载docker-compose脚本
|
||||||
`git clone https://gitee.com/beijing_hongye_huicheng/docker.git `
|
`git clone https://gitee.com/beijing_hongye_huicheng/docker.git `
|
||||||
##### 部署基础环境
|
|
||||||
|
##### 部署商城所需中间件
|
||||||
`docker-compose up -d`
|
`docker-compose up -d`
|
||||||
|
|
||||||
##### 部署应用
|
##### 部署商城应用
|
||||||
`docker-compose -f docker-compose-application.yml up -d`
|
`docker-compose -f docker-compose-application.yml up -d`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql
|
PS:商城数据库单独部署 https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql 这里有与tag版本一致的sql,根据tag获取sql,如果使用master代码,则需要在lilishop项目根目录的DB目录中,获取对应的升级sql。
|
||||||
|
|
||||||
##### 各个地址
|
##### 商城 API/UI 地址
|
||||||
|
|
||||||
| API | 地址 |
|
| API | 地址 |
|
||||||
| -------------- | --------------- |
|
| -------------- | --------------- |
|
||||||
| 买家API | http://127.0.0.1:8888 |
|
| 商城买家API | http://127.0.0.1:8888 |
|
||||||
| 商家API | http://127.0.0.1:8889 |
|
| 商城商家API | http://127.0.0.1:8889 |
|
||||||
| 管理端API | http://127.0.0.1:8887 |
|
| 商城管理端API | http://127.0.0.1:8887 |
|
||||||
| 通用API | http://127.0.0.1:8890 |
|
| 商城基础API | http://127.0.0.1:8890 |
|
||||||
|
|
||||||
| 前端演示 | 地址 |
|
| 前端演示 | 地址 |
|
||||||
| -------------- | --------------- |
|
| -------------- | --------------- |
|
||||||
| PC | http://127.0.0.1:10000 |
|
| 商城PC端 | http://127.0.0.1:10000 |
|
||||||
| WAP | http://127.0.0.1:10001 |
|
| 商城WAP端 | http://127.0.0.1:10001 |
|
||||||
| 商家 | http://127.0.0.1:10002 |
|
| 商城卖家端 | http://127.0.0.1:10002 |
|
||||||
| 管理端 | http://127.0.0.1:10003 |
|
| 商城管理端 | http://127.0.0.1:10003 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 功能列表
|
### ⚾️ 功能列表
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 平台功能
|
#### 🥎 商城平台功能
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 商家端功能
|
#### 🥎 商城卖家功能
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -112,30 +140,28 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 功能展示
|
### 🧩 商城前端功能展示
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 移动端
|
#### ⚽️ 商城移动端
|
||||||
|
|
||||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="管理端功能展示" style="zoom:50%;" />
|
|
||||||
|
|
||||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### 管理端
|
#### ⚽️ 商城管理端
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### 技术选型
|
### 商城技术选型
|
||||||
|
|
||||||
#### 架构图
|
#### 🥅 架构图
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
##### Java后台
|
##### 🕹 后台技术选型
|
||||||
|
|
||||||
| 说明 | 框架 | 说明 | |
|
| 说明 | 框架 | 说明 | |
|
||||||
| -------------- | --------------- | -------------- | ------------- |
|
| -------------- | --------------- | -------------- | ------------- |
|
||||||
@@ -149,7 +175,7 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
|||||||
| 短信 | 阿里云短信 | 认证 | JWT |
|
| 短信 | 阿里云短信 | 认证 | JWT |
|
||||||
| 日志处理 | Log4j | 接口规范 | RESTful |
|
| 日志处理 | Log4j | 接口规范 | RESTful |
|
||||||
|
|
||||||
##### 前端-运营后台、店铺后台
|
##### 🖥 前端-运营后台、店铺后台
|
||||||
|
|
||||||
| 说明 | 框架 | 说明 | 框架 |
|
| 说明 | 框架 | 说明 | 框架 |
|
||||||
| ---------- | ---------- | ---------- | ------- |
|
| ---------- | ---------- | ---------- | ------- |
|
||||||
@@ -159,119 +185,34 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
|||||||
| 基础UI库 | iView | UI界面基于 | iView |
|
| 基础UI库 | iView | UI界面基于 | iView |
|
||||||
| 网络请求 | axios | | |
|
| 网络请求 | axios | | |
|
||||||
|
|
||||||
##### 前端-移动端
|
##### 📱前端-移动端
|
||||||
|
|
||||||
| 说明 | 架构 | 说明 | 架构 |
|
| 说明 | 架构 | 说明 | 架构 |
|
||||||
| --------- | ------- | -------- | ------- |
|
| --------- | ------- | -------- | ------- |
|
||||||
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
||||||
| CSS预处理 | scss | 地图引擎 | amap |
|
| CSS预处理 | scss | 地图引擎 | amap |
|
||||||
|
|
||||||
### 升级计划
|
### 🌟 版本升级
|
||||||
|
|
||||||
#### 计划每个月发布一个版本,具体时间可能有出入
|
|
||||||
|
|
||||||
时间:2021年6月15日
|
|
||||||
|
|
||||||
```
|
```
|
||||||
新增功能:
|
商城后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||||
1.微信小程序直播
|
|
||||||
2.优惠券活动
|
|
||||||
3.新人赠券
|
|
||||||
4.准确发券
|
|
||||||
5.用户等级
|
|
||||||
6.数据导出
|
|
||||||
7.订单批量
|
|
||||||
8.APP版本升级检测
|
|
||||||
9.积分商城
|
|
||||||
|
|
||||||
功能优化:
|
|
||||||
1.优惠券有效期增加类型:设置领取后*内有效。
|
|
||||||
2.秒杀活动设置为每天开启,需设置秒杀活动开启时间。
|
|
||||||
3.店铺配送模板,配送地区如果选择省份则下方的市级地址不展示。
|
|
||||||
4.店铺配送模板支持,店铺包邮。
|
|
||||||
5.普通商品设置去除卖家承担运费。
|
|
||||||
|
|
||||||
|
后续会考虑推出微服务商城系统/商城中台等
|
||||||
```
|
```
|
||||||
|
|
||||||
时间:2021年7月15日
|
|
||||||
|
|
||||||
```
|
### ⚠️ 开源须知
|
||||||
新增功能:
|
|
||||||
1.会员权益
|
|
||||||
2.支持用户升级会员
|
|
||||||
3.供求单
|
|
||||||
4.IM:腾讯云智服
|
|
||||||
5.服务商品
|
|
||||||
6.店铺支持订单核销
|
|
||||||
7.店铺自提点
|
|
||||||
功能优化:
|
|
||||||
1.用户分享商城、关注店铺、邀请新用户可获取积分、经验值。
|
|
||||||
```
|
|
||||||
|
|
||||||
时间:2021年8月16日
|
|
||||||
|
|
||||||
```
|
|
||||||
新增功能:
|
|
||||||
1.微淘功能
|
|
||||||
2.店铺移动端
|
|
||||||
3.店铺发货单
|
|
||||||
```
|
|
||||||
|
|
||||||
时间:2021年9月15日
|
|
||||||
|
|
||||||
```
|
|
||||||
新增功能:
|
|
||||||
增加供应商功能
|
|
||||||
```
|
|
||||||
|
|
||||||
### 版本升级
|
|
||||||
|
|
||||||
```
|
|
||||||
后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
|
||||||
|
|
||||||
后续会考虑推出微服务/中台等 企业级版本
|
|
||||||
```
|
|
||||||
|
|
||||||
### 技术亮点
|
|
||||||
|
|
||||||
|
|
||||||
1.后端框架基于Springboot,构建基于maven,持久层使用MyBatisPlus。使用elasticsearch、redis、mongodb、rocketmq 等各种中间健。都是主流架构,轻松应对各种环境。
|
|
||||||
|
|
||||||
2.支持集群、分布式,支持docker 轻松部署,解决各种复杂场景!
|
|
||||||
|
|
||||||
3.代码模块清晰,主要分为三端api(买家、卖家、管理),各端API互相隔离,自己鉴权,自己操作业务。
|
|
||||||
|
|
||||||
4.使用阿里开源的RocketMQ,基于mq解决各种并发场景,解决事务一致性,解决搞并发延迟场景问题。
|
|
||||||
|
|
||||||
5.项目使用多级缓存,应用不同场景,redis缓存业务数据、mongodb缓存关系型多对多关系问题、nginx缓存高频访问低频修改的页面。
|
|
||||||
|
|
||||||
6.支持各种联合登陆,支持各种客户端的支付问题,灵活配置灵活开启。
|
|
||||||
|
|
||||||
7.内置完善的楼层装修机制,各种拖拉拽,维护跳转页面或外网,即便是一个什么都不懂的运营也可以轻松掌握。
|
|
||||||
|
|
||||||
8.内置阿里短信接口,可以在线申请短信模版。内置阿里oss系统,可以对文件执行各种操作。oss商家端资源相互隔离。
|
|
||||||
|
|
||||||
10.强大的统计报表,统计效果,可以实现各个场景,包含在线人数,历史在线人数,活跃人数等信息。
|
|
||||||
|
|
||||||
11.标准Api接口、提供swagger文档,快速二开。
|
|
||||||
|
|
||||||
12.分布式调度任务中心,解决分布式定时任务多次执行问题。
|
|
||||||
|
|
||||||
13.代码注释完善,快速上手。
|
|
||||||
|
|
||||||
14.非移动端采用IView框架,各种自定义插件、选择器实现。移动端采用uniapp,一次编写,全端使用
|
|
||||||
|
|
||||||
15.已经对接好各种第三方插件,支持各种复杂等联合登陆,联合支付等场景。
|
|
||||||
|
|
||||||
|
|
||||||
### 开源须知
|
|
||||||
1.仅允许用于个人学习研究使用.
|
1.仅允许用于个人学习研究使用.
|
||||||
|
|
||||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||||
|
|
||||||
3.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
3.软件受国家计算机软件著作权保护(登记号:2021SR0805085)。
|
||||||
|
|
||||||
### 交流群
|
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||||
|
|
||||||
**QQ群**:961316482
|
|
||||||
|
### 🐧 交流群
|
||||||
|
|
||||||
|
##### 官方qq 1群 961316482(已满)
|
||||||
|
##### 官方qq 2群 875294241
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2 .
|
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.2.1 .
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
18
buyer/public/config.js
Normal file
18
buyer/public/config.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
var BASE = {
|
||||||
|
/**
|
||||||
|
* @description api请求基础路径
|
||||||
|
*/
|
||||||
|
API_DEV: {
|
||||||
|
common: "https://common-api.pickmall.cn",
|
||||||
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
|
seller: "https://store-api.pickmall.cn",
|
||||||
|
manager: "https://admin-api.pickmall.cn"
|
||||||
|
},
|
||||||
|
API_PROD: {
|
||||||
|
common: "https://common-api.pickmall.cn",
|
||||||
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
|
seller: "https://store-api.pickmall.cn",
|
||||||
|
manager: "https://admin-api.pickmall.cn"
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
@@ -14,7 +14,9 @@
|
|||||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||||
<script src="<%=js%>"></script>
|
<script src="<%=js%>"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<script src="/config.js"></script>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|
||||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -57,3 +57,12 @@ export function editPwd (params) {
|
|||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取密码状态
|
||||||
|
export function logout () {
|
||||||
|
return request({
|
||||||
|
url: '/buyer/members/logout',
|
||||||
|
method: Method.POST,
|
||||||
|
needToken: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
BIN
buyer/src/assets/images/jinghui.png
Normal file
BIN
buyer/src/assets/images/jinghui.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
BIN
buyer/src/assets/images/zhizhao.jpg
Normal file
BIN
buyer/src/assets/images/zhizhao.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 374 KiB |
@@ -29,18 +29,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="friend-link">
|
<div class="friend-link flex">
|
||||||
<div class="friend-link-item">
|
<div class="friend-link-item">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
||||||
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="icp">
|
||||||
|
<li v-if="config.icpCard">
|
||||||
|
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li v-if="config.icpMessage">
|
||||||
|
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||||
|
{{config.icpMessage}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="information">
|
||||||
|
|
||||||
|
<a class="flex " :href="config.company.href">
|
||||||
|
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.title}}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
<p>Copyright © {{year}} LILI</p>
|
<p>Copyright © {{year}} {{config.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
@@ -48,28 +68,32 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
name: 'Footer',
|
name: "Footer",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
guideArr: [ // 导航链接
|
config,
|
||||||
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题' ],
|
guideArr: [
|
||||||
[ '配送方式', '上门自提', '配送服务查询', '收取标准', '物流规则' ],
|
// 导航链接
|
||||||
[ '支付方式', '在线支付', '公司转账', '余额支付', '积分支付' ],
|
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],
|
||||||
[ '售后服务', '售后政策', '退款说明', '返修/退货', '取消订单' ]
|
["配送方式", "上门自提", "配送服务查询", "收取标准", "物流规则"],
|
||||||
|
["支付方式", "在线支付", "公司转账", "余额支付", "积分支付"],
|
||||||
|
["售后服务", "售后政策", "退款说明", "返修/退货", "取消订单"],
|
||||||
],
|
],
|
||||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
|
moreLink: ["关于我们", "联系我们", "联系客服", "商家帮助", "隐私政策"], // 更多链接
|
||||||
year: new Date().getFullYear() // 当前年份
|
year: new Date().getFullYear(), // 当前年份
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goArticle () { // 跳转文章页
|
goArticle() {
|
||||||
|
// 跳转文章页
|
||||||
let routeUrl = this.$router.resolve({
|
let routeUrl = this.$router.resolve({
|
||||||
path: '/article'
|
path: "/article",
|
||||||
})
|
});
|
||||||
window.open(routeUrl.href, '_blank')
|
window.open(routeUrl.href, "_blank");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -77,11 +101,9 @@ export default {
|
|||||||
/*****************************底 部 开 始*****************************/
|
/*****************************底 部 开 始*****************************/
|
||||||
.footer {
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 380px;
|
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
|
|
||||||
@include background_color($light_background_color);
|
@include background_color($light_background_color);
|
||||||
|
|
||||||
}
|
}
|
||||||
.icon-row {
|
.icon-row {
|
||||||
margin: 15px auto;
|
margin: 15px auto;
|
||||||
@@ -112,6 +134,19 @@ export default {
|
|||||||
.footer-icon-child-4 {
|
.footer-icon-child-4 {
|
||||||
background-position: 0 -129px;
|
background-position: 0 -129px;
|
||||||
}
|
}
|
||||||
|
.icp {
|
||||||
|
>*{
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.flex{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
>img{
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.footer-icon-text {
|
.footer-icon-text {
|
||||||
margin-left: 45px;
|
margin-left: 45px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@@ -146,14 +181,24 @@ export default {
|
|||||||
|
|
||||||
.friend-link {
|
.friend-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
width: 908px;
|
width: 908px;
|
||||||
height: 30px;
|
padding: 10px 0;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
border-top: 1px solid $border_color;
|
border-top: 1px solid $border_color;
|
||||||
}
|
}
|
||||||
.friend-link-item {
|
.information {
|
||||||
margin: 0px auto;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
> * {
|
||||||
|
margin: 2px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.zhizhao {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.friend-link-item ul {
|
.friend-link-item ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@@ -180,10 +225,12 @@ export default {
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.footer-icon-text {
|
.footer-icon-text {
|
||||||
@include title_color($light_title_color)
|
@include title_color($light_title_color);
|
||||||
}
|
}
|
||||||
.copyright,.friend-link,.servece-type-info {
|
.copyright,
|
||||||
@include sub_color($light_sub_color)
|
.friend-link,
|
||||||
|
.servece-type-info {
|
||||||
|
@include sub_color($light_sub_color);
|
||||||
}
|
}
|
||||||
/*****************************底 部 结 束*****************************/
|
/*****************************底 部 结 束*****************************/
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -86,6 +86,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import storage from '@/plugins/storage.js';
|
import storage from '@/plugins/storage.js';
|
||||||
import { cartGoodsAll } from '@/api/cart.js';
|
import { cartGoodsAll } from '@/api/cart.js';
|
||||||
|
import { logout } from '@/api/account.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'M-Header',
|
name: 'M-Header',
|
||||||
created () {
|
created () {
|
||||||
@@ -120,12 +121,14 @@ export default {
|
|||||||
window.open(url.href, '_blank');
|
window.open(url.href, '_blank');
|
||||||
},
|
},
|
||||||
signOutFun () { // 退出登录
|
signOutFun () { // 退出登录
|
||||||
|
logout().then(res => {
|
||||||
storage.removeItem('accessToken');
|
storage.removeItem('accessToken');
|
||||||
storage.removeItem('refreshToken');
|
storage.removeItem('refreshToken');
|
||||||
storage.removeItem('userInfo');
|
storage.removeItem('userInfo');
|
||||||
storage.removeItem('cartNum');
|
storage.removeItem('cartNum');
|
||||||
this.$store.commit('SET_CARTNUM', 0)
|
this.$store.commit('SET_CARTNUM', 0)
|
||||||
this.$router.push('/login');
|
this.$router.push('/login');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
goUserCenter (path) {
|
goUserCenter (path) {
|
||||||
// 跳转我的订单,我的足迹、收藏等
|
// 跳转我的订单,我的足迹、收藏等
|
||||||
|
|||||||
@@ -82,13 +82,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- 横幅广告 -->
|
<!-- 横幅广告 -->
|
||||||
<template v-if="element.type == 'bannerAdvert'">
|
<template v-if="element.type == 'bannerAdvert'">
|
||||||
|
<div style="width:100%; text-align: center;">
|
||||||
<img
|
<img
|
||||||
width="1200"
|
width="1200"
|
||||||
class="hover-pointer mb_20"
|
class="hover-pointer mb_20"
|
||||||
|
|
||||||
@click="linkTo(element.options.url)"
|
@click="linkTo(element.options.url)"
|
||||||
:src="element.options.img"
|
:src="element.options.img"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="element.type == 'notEnough'">
|
<template v-if="element.type == 'notEnough'">
|
||||||
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
|
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<div class="person-msg">
|
<div class="person-msg">
|
||||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
<div>Hi,{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
|
||||||
<div v-if="userInfo.id">
|
<div v-if="userInfo.id">
|
||||||
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import {articleList} from '@/api/common.js'
|
import {articleList} from '@/api/common.js'
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
export default {
|
export default {
|
||||||
@@ -56,6 +57,7 @@ export default {
|
|||||||
props: ['data'],
|
props: ['data'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
userInfo: {}, // 用户信息
|
userInfo: {}, // 用户信息
|
||||||
articleList: [], // 常见问题
|
articleList: [], // 常见问题
|
||||||
params: { // 请求常见问题参数
|
params: { // 请求常见问题参数
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="person-msg">
|
<div class="person-msg">
|
||||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
<div>Hi,{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
|
||||||
<div v-if="userInfo.id">
|
<div v-if="userInfo.id">
|
||||||
<Button type="error" shape="circle">会员中心</Button>
|
<Button type="error" shape="circle">会员中心</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import {articleList} from '@/api/common.js'
|
import {articleList} from '@/api/common.js'
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
export default {
|
export default {
|
||||||
@@ -64,6 +65,7 @@ export default {
|
|||||||
props: ['data'],
|
props: ['data'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
userInfo: {}, // 用户信息
|
userInfo: {}, // 用户信息
|
||||||
articleList: [], // 常见问题
|
articleList: [], // 常见问题
|
||||||
params: { // 请求常见问题参数
|
params: { // 请求常见问题参数
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
import { handleRegion } from '@/api/address.js';
|
import { handleRegion } from '@/api/address.js';
|
||||||
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
name: 'map',
|
name: 'map',
|
||||||
props: {
|
props: {
|
||||||
@@ -41,6 +42,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
showMap: false, // 展示地图
|
showMap: false, // 展示地图
|
||||||
mapSearch: '', // 地图搜索
|
mapSearch: '', // 地图搜索
|
||||||
map: null, // 初始化地图
|
map: null, // 初始化地图
|
||||||
@@ -88,7 +90,7 @@ export default {
|
|||||||
},
|
},
|
||||||
init () { // 初始化地图
|
init () { // 初始化地图
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: this.config.aMapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||||
plugins: [
|
plugins: [
|
||||||
'AMap.ToolBar',
|
'AMap.ToolBar',
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* @description 配置显示在浏览器标签的title
|
* @description 配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||||
*/
|
*/
|
||||||
title: 'Lili电商',
|
title: "lili-shop",
|
||||||
|
/**
|
||||||
|
* @description icp证
|
||||||
|
*/
|
||||||
|
icpCard: "",
|
||||||
|
|
||||||
|
company:{
|
||||||
|
href:"https://pickmall.cn",
|
||||||
|
name:"北京宏业汇成科技有限公司"
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description icp备案号
|
||||||
|
*/
|
||||||
|
icpMessage: "京ICP备20009696号-1",
|
||||||
/**
|
/**
|
||||||
* @description token在Cookie中存储的天数,默认1天
|
* @description token在Cookie中存储的天数,默认1天
|
||||||
*/
|
*/
|
||||||
@@ -14,34 +27,14 @@ export default {
|
|||||||
*/
|
*/
|
||||||
useI18n: false,
|
useI18n: false,
|
||||||
/**
|
/**
|
||||||
* @description api请求基础路径
|
* @description 高德web端申请的api key
|
||||||
*/
|
*/
|
||||||
api_dev: {
|
aMapKey: "b440952723253aa9fe483e698057bf7d",
|
||||||
// common: 'http://192.168.0.101:8890',
|
|
||||||
// buyer: 'http://192.168.0.101:8888',
|
|
||||||
// seller: 'http://192.168.0.101:8889',
|
|
||||||
// manager: 'http://192.168.0.101:8887'
|
|
||||||
|
|
||||||
common: 'https://common-api.pickmall.cn',
|
|
||||||
buyer: 'https://buyer-api.pickmall.cn',
|
|
||||||
seller: 'https://store-api.pickmall.cn',
|
|
||||||
manager: 'https://admin-api.pickmall.cn'
|
|
||||||
},
|
|
||||||
api_prod: {
|
|
||||||
common: 'https://common-api.pickmall.cn',
|
|
||||||
buyer: 'https://buyer-api.pickmall.cn',
|
|
||||||
seller: 'https://store-api.pickmall.cn',
|
|
||||||
manager: 'https://admin-api.pickmall.cn'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* @description api请求基础路径前缀
|
|
||||||
*/
|
|
||||||
baseUrlPrefix: '/buyer',
|
|
||||||
/**
|
/**
|
||||||
* @description 需要加载的插件
|
* @description 需要加载的插件
|
||||||
*/
|
*/
|
||||||
plugin: {
|
plugin: {
|
||||||
'error-store': {
|
"error-store": {
|
||||||
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
||||||
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<!-- LOGO 搜索 -->
|
<!-- LOGO 搜索 -->
|
||||||
<div class="width_1200 logo">
|
<div class="width_1200 logo">
|
||||||
<div>
|
<div>
|
||||||
<router-link to="/"><img :src="$store.state.logoImg" alt="lili shop" title="lilishop" /></router-link>
|
<router-link to="/"><img :src="$store.state.logoImg" /></router-link>
|
||||||
<div>
|
<div>
|
||||||
购物车(<span>{{ goodsTotal }}</span>)
|
购物车(<span>{{ goodsTotal }}</span>)
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||||
>lili-shop</a
|
>{{config.title}}</a
|
||||||
>
|
>
|
||||||
版权所有
|
版权所有
|
||||||
</Row>
|
</Row>
|
||||||
@@ -108,6 +108,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import * as RegExp from '@/plugins/RegExp.js';
|
import * as RegExp from '@/plugins/RegExp.js';
|
||||||
import { md5 } from '@/plugins/md5.js';
|
import { md5 } from '@/plugins/md5.js';
|
||||||
import * as apiLogin from '@/api/login.js';
|
import * as apiLogin from '@/api/login.js';
|
||||||
@@ -118,6 +119,7 @@ export default {
|
|||||||
components: { Verify },
|
components: { Verify },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
loading1: false, // 第二步加载状态
|
loading1: false, // 第二步加载状态
|
||||||
formFirst: { // 手机验证码表单
|
formFirst: { // 手机验证码表单
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
|
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">{{config.title}}</a>
|
||||||
版权所有
|
版权所有
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,6 +103,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import * as RegExp from "@/plugins/RegExp.js";
|
import * as RegExp from "@/plugins/RegExp.js";
|
||||||
import { md5 } from "@/plugins/md5.js";
|
import { md5 } from "@/plugins/md5.js";
|
||||||
import * as apiLogin from "@/api/login.js";
|
import * as apiLogin from "@/api/login.js";
|
||||||
@@ -118,6 +119,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
type: true, // true 账号登录 false 验证码登录
|
type: true, // true 账号登录 false 验证码登录
|
||||||
formData: {
|
formData: {
|
||||||
// 登录表单
|
// 登录表单
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
|
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">{{config.title}}</a>
|
||||||
版权所有
|
版权所有
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
@@ -97,6 +97,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import * as RegExp from '@/plugins/RegExp.js';
|
import * as RegExp from '@/plugins/RegExp.js';
|
||||||
import { md5 } from '@/plugins/md5.js';
|
import { md5 } from '@/plugins/md5.js';
|
||||||
import * as apiLogin from '@/api/login.js';
|
import * as apiLogin from '@/api/login.js';
|
||||||
@@ -107,6 +108,7 @@ export default {
|
|||||||
components: { Verify },
|
components: { Verify },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
formRegist: {
|
formRegist: {
|
||||||
// 注册表单
|
// 注册表单
|
||||||
|
|||||||
@@ -2,23 +2,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<card _Title="收货地址" />
|
<card _Title="收货地址" />
|
||||||
<div class="add-box">
|
<div class="add-box">
|
||||||
<Form
|
<Form :model="formData" ref="form" label-position="left" :label-width="100" :rules="ruleInline">
|
||||||
:model="formData"
|
|
||||||
ref="form"
|
|
||||||
label-position="left"
|
|
||||||
:label-width="100"
|
|
||||||
:rules="ruleInline"
|
|
||||||
>
|
|
||||||
<FormItem label="收件人" prop="name">
|
<FormItem label="收件人" prop="name">
|
||||||
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
|
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="收件地区" prop="address">
|
<FormItem label="收件地区" prop="address">
|
||||||
<i-input
|
<i-input v-model="formData.address" disabled placeholder="请选择收货地址" style="width: 600px"></i-input>
|
||||||
v-model="formData.address"
|
|
||||||
disabled
|
|
||||||
placeholder="请选择收货地址"
|
|
||||||
style="width: 600px"
|
|
||||||
></i-input>
|
|
||||||
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
|
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="详细地址" prop="detail">
|
<FormItem label="详细地址" prop="detail">
|
||||||
@@ -28,13 +17,8 @@
|
|||||||
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
|
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="地址别名">
|
<FormItem label="地址别名">
|
||||||
<i-input
|
<i-input v-model="formData.alias" length :maxlength="4" placeholder="请输入地址别名,例如公司" style="width: 600px">
|
||||||
v-model="formData.alias"
|
</i-input>
|
||||||
length
|
|
||||||
:maxlength="4"
|
|
||||||
placeholder="请输入地址别名,例如公司"
|
|
||||||
style="width: 600px"
|
|
||||||
></i-input>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="默认地址">
|
<FormItem label="默认地址">
|
||||||
<i-switch v-model="formData.isDefault" />
|
<i-switch v-model="formData.isDefault" />
|
||||||
@@ -42,9 +26,7 @@
|
|||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt_20">
|
<div class="mt_20">
|
||||||
<Button type="primary" class="mr_10" :loading="loading" @click="save"
|
<Button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</Button>
|
||||||
>保存收货地址</Button
|
|
||||||
>
|
|
||||||
<Button @click="$router.back()">返回</Button>
|
<Button @click="$router.back()">返回</Button>
|
||||||
</div>
|
</div>
|
||||||
<lili-map ref="map" @getAddress="getAddress"></lili-map>
|
<lili-map ref="map" @getAddress="getAddress"></lili-map>
|
||||||
@@ -52,55 +34,74 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import card from '@/components/card';
|
import card from "@/components/card";
|
||||||
import liliMap from '@/components/map';
|
import liliMap from "@/components/map";
|
||||||
|
|
||||||
|
import * as RegExp from "@/plugins/RegExp.js";
|
||||||
import {
|
import {
|
||||||
newMemberAddress,
|
newMemberAddress,
|
||||||
editMemberAddress,
|
editMemberAddress,
|
||||||
getAddrDetail
|
getAddrDetail,
|
||||||
} from '@/api/address';
|
} from "@/api/address";
|
||||||
export default {
|
export default {
|
||||||
name: 'AddAddress',
|
name: "AddAddress",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formData: { // 添加地址表单
|
formData: {
|
||||||
isDefault: false
|
// 添加地址表单
|
||||||
|
isDefault: false,
|
||||||
},
|
},
|
||||||
ruleInline: { // 验证规则
|
ruleInline: {
|
||||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
// 验证规则
|
||||||
address: [{ required: true, message: '请输入地址', trigger: 'change' }],
|
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||||
|
address: [{ required: true, message: "请输入地址", trigger: "change" }],
|
||||||
detail: [
|
detail: [
|
||||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }
|
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||||
],
|
],
|
||||||
mobile: [
|
mobile: [
|
||||||
]
|
{ required: true, message: "请输入手机号码" },
|
||||||
|
{
|
||||||
|
pattern: RegExp.mobile,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "请输入正确的手机号",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
mapMsg: {} // 地图信息
|
mapMsg: {}, // 地图信息
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
save () { // 保存地址
|
save() {
|
||||||
|
// 保存地址
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const params = JSON.parse(JSON.stringify(this.formData));
|
const params = JSON.parse(JSON.stringify(this.formData));
|
||||||
params.consigneeAddressPath = params.address.replace(/\s/g, ',');
|
params.consigneeAddressPath = params.address.replace(/\s/g, ",");
|
||||||
delete params.address;
|
delete params.address;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
editMemberAddress(params).then((res) => {
|
editMemberAddress(params)
|
||||||
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$router.push('/home/MyAddress');
|
this.$router.push("/home/MyAddress");
|
||||||
}
|
}
|
||||||
}).catch(() => { this.loading = false; });
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
newMemberAddress(params).then((res) => {
|
newMemberAddress(params)
|
||||||
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$router.push('/home/MyAddress');
|
this.$router.push("/home/MyAddress");
|
||||||
}
|
}
|
||||||
}).catch(() => { this.loading = false; });
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -111,7 +112,7 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
const data = res.result;
|
const data = res.result;
|
||||||
data.address = res.result.consigneeAddressPath.replace(/,/g, ' ');
|
data.address = res.result.consigneeAddressPath.replace(/,/g, " ");
|
||||||
this.formData = data;
|
this.formData = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -120,12 +121,12 @@ export default {
|
|||||||
// 获取地图选择信息
|
// 获取地图选择信息
|
||||||
console.log(item);
|
console.log(item);
|
||||||
this.mapMsg = item;
|
this.mapMsg = item;
|
||||||
this.$set(this.formData, 'address', item.addr);
|
this.$set(this.formData, "address", item.addr);
|
||||||
this.$set(this.formData, 'consigneeAddressIdPath', item.addrId);
|
this.$set(this.formData, "consigneeAddressIdPath", item.addrId);
|
||||||
this.$set(this.formData, 'detail', item.detail);
|
this.$set(this.formData, "detail", item.detail);
|
||||||
this.formData.lat = item.position.lat;
|
this.formData.lat = item.position.lat;
|
||||||
this.formData.lon = item.position.lng;
|
this.formData.lon = item.position.lng;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
@@ -133,8 +134,8 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
card,
|
card,
|
||||||
liliMap
|
liliMap,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,15 @@
|
|||||||
<h3>配送信息</h3>
|
<h3>配送信息</h3>
|
||||||
<p>配送方式:{{order.deliveryMethodValue}}</p>
|
<p>配送方式:{{order.deliveryMethodValue}}</p>
|
||||||
<p>配送状态:{{order.deliverStatusValue}}</p>
|
<p>配送状态:{{order.deliverStatusValue}}</p>
|
||||||
|
<div class="div-express-log" v-if="logistics">
|
||||||
|
<p class="express-log">
|
||||||
|
<p>订单日志:</p>
|
||||||
|
<p v-for="(item, index) in logistics.traces" :key="index">
|
||||||
|
<span class="time">{{ item.AcceptTime }}</span>
|
||||||
|
<span class="detail">{{ item.AcceptStation }}</span>
|
||||||
|
</p>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="order-card">
|
<div class="order-card">
|
||||||
<h3>发票信息</h3>
|
<h3>发票信息</h3>
|
||||||
@@ -122,7 +131,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
order: {}, // 订单详情数据
|
order: {}, // 订单详情数据
|
||||||
progressList: [], // 订单流程
|
progressList: [], // 订单流程
|
||||||
logistics: [], // 物流数据
|
logistics: "", // 物流数据
|
||||||
cancelParams: { // 取消售后参数
|
cancelParams: { // 取消售后参数
|
||||||
orderSn: '',
|
orderSn: '',
|
||||||
reason: ''
|
reason: ''
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="width_1200 logo">
|
<div class="width_1200 logo">
|
||||||
<div>
|
<div>
|
||||||
<router-link to="/"
|
<router-link to="/"
|
||||||
><img :src="$store.state.logoImg" alt="lili shop" title="lilishop"
|
><img :src="$store.state.logoImg"
|
||||||
/></router-link>
|
/></router-link>
|
||||||
<div>结算页</div>
|
<div>结算页</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -569,6 +569,9 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "../../assets/styles/coupon.scss";
|
@import "../../assets/styles/coupon.scss";
|
||||||
|
.goods-msg{
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
/** logo start */
|
/** logo start */
|
||||||
.logo {
|
.logo {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -772,11 +775,13 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goods-list {
|
.goods-list {
|
||||||
|
width: 1150px;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
margin: 10px 0 20px 0;
|
margin: 10px 0 20px 0;
|
||||||
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
width:100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
@@ -799,9 +804,14 @@ export default {
|
|||||||
|
|
||||||
> span:nth-child(1) {
|
> span:nth-child(1) {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
>span{
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
> span:last-child {
|
> span:last-child {
|
||||||
color: $theme_color;
|
color: $theme_color;
|
||||||
@@ -891,6 +901,7 @@ export default {
|
|||||||
/** content end */
|
/** content end */
|
||||||
/** 底部支付栏 */
|
/** 底部支付栏 */
|
||||||
.order-footer {
|
.order-footer {
|
||||||
|
z-index: 20;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
@include background_color($light_white_background_color);
|
@include background_color($light_white_background_color);
|
||||||
@include title_color($title_color);
|
@include title_color($title_color);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import axios from 'axios';
|
|||||||
import https from 'https';
|
import https from 'https';
|
||||||
import { Message, Spin, Modal } from 'view-design';
|
import { Message, Spin, Modal } from 'view-design';
|
||||||
import Storage from './storage';
|
import Storage from './storage';
|
||||||
import config from '@/config';
|
|
||||||
import router from '../router/index.js';
|
import router from '../router/index.js';
|
||||||
import store from '../vuex/store';
|
import store from '../vuex/store';
|
||||||
import { handleRefreshToken } from '@/api/index';
|
import { handleRefreshToken } from '@/api/index';
|
||||||
@@ -10,20 +9,20 @@ const qs = require('qs');
|
|||||||
// api地址
|
// api地址
|
||||||
export const buyerUrl =
|
export const buyerUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.buyer
|
? BASE.API_DEV.buyer
|
||||||
: config.api_prod.buyer;
|
: BASE.API_PROD.buyer;
|
||||||
export const commonUrl =
|
export const commonUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.common
|
? BASE.API_DEV.common
|
||||||
: config.api_prod.common;
|
: BASE.API_PROD.common;
|
||||||
export const managerUrl =
|
export const managerUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.manager
|
? BASE.API_DEV.manager
|
||||||
: config.api_prod.manager;
|
: BASE.API_PROD.manager;
|
||||||
export const sellerUrl =
|
export const sellerUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.seller
|
? BASE.API_DEV.seller
|
||||||
: config.api_prod.seller;
|
: BASE.API_PROD.seller;
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
var isRefreshToken = 0;
|
var isRefreshToken = 0;
|
||||||
const refreshToken = getTokenDebounce();
|
const refreshToken = getTokenDebounce();
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default new Router({
|
|||||||
name: 'login',
|
name: 'login',
|
||||||
component: Login,
|
component: Login,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'LiLi 登录'
|
title: '登录'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -88,7 +88,7 @@ export default new Router({
|
|||||||
name: 'SignUp',
|
name: 'SignUp',
|
||||||
component: SignUp,
|
component: SignUp,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'LiLi 注册'
|
title: '注册'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -96,7 +96,7 @@ export default new Router({
|
|||||||
name: 'forgetPassword',
|
name: 'forgetPassword',
|
||||||
component: ForgetPassword,
|
component: ForgetPassword,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'LiLi 忘记密码'
|
title: '忘记密码'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -283,7 +283,7 @@ export default new Router({
|
|||||||
path: 'AfterSale',
|
path: 'AfterSale',
|
||||||
name: 'AfterSale',
|
name: 'AfterSale',
|
||||||
component: AfterSale,
|
component: AfterSale,
|
||||||
meta: {title: 'LiLi 售后'}
|
meta: {title: '售后'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'ApplyAfterSale',
|
path: 'ApplyAfterSale',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2
|
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.2.1
|
||||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui-4.2.0:0.0.2
|
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.2.2.1
|
||||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2
|
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.2.1
|
||||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2
|
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.2.1
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2 .
|
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.2.1 .
|
||||||
|
|||||||
30
manager/public/config.js
Normal file
30
manager/public/config.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
var BASE = {
|
||||||
|
/**
|
||||||
|
* @description api请求基础路径
|
||||||
|
*/
|
||||||
|
API_DEV: {
|
||||||
|
common: "https://common-api.pickmall.cn",
|
||||||
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
|
seller: "https://store-api.pickmall.cn",
|
||||||
|
manager: "https://admin-api.pickmall.cn"
|
||||||
|
},
|
||||||
|
API_PROD: {
|
||||||
|
common: "https://common-api.pickmall.cn",
|
||||||
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
|
seller: "https://store-api.pickmall.cn",
|
||||||
|
manager: "https://admin-api.pickmall.cn"
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description // 跳转买家端地址 pc端
|
||||||
|
*/
|
||||||
|
PC_URL: "https://pc-b2b2c.pickmall.cn",
|
||||||
|
/**
|
||||||
|
* @description // 跳转买家端地址 wap端
|
||||||
|
*/
|
||||||
|
WAP_URL: "https://m-b2b2c.pickmall.cn",
|
||||||
|
/**
|
||||||
|
* @description api请求基础路径前缀
|
||||||
|
*/
|
||||||
|
PREFIX: "/manager"
|
||||||
|
};
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
|
<!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
|
||||||
<link rel="icon" href="./logo.ico" type="image/x-icon" />
|
<link rel="icon" href="./logo.ico" type="image/x-icon" />
|
||||||
<title>lili admin</title>
|
<title>admin</title>
|
||||||
<meta name="keywords" content="keywords" />
|
<meta name="keywords" content="keywords" />
|
||||||
<meta name="description" content="description" />
|
<meta name="description" content="description" />
|
||||||
<% for(var css of htmlWebpackPlugin.options.cdn.css) { %>
|
<% for(var css of htmlWebpackPlugin.options.cdn.css) { %>
|
||||||
@@ -67,9 +67,10 @@
|
|||||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||||
<script src="<%=js%>"></script>
|
<script src="<%=js%>"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<script src="/config.js"></script>
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong
|
<strong
|
||||||
>We're sorry but lili-admin doesn't work properly without JavaScript
|
>We're sorry but admin doesn't work properly without JavaScript
|
||||||
enabled. Please enable it to continue.</strong
|
enabled. Please enable it to continue.</strong
|
||||||
>
|
>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import {
|
|||||||
postRequestWithNoForm,
|
postRequestWithNoForm,
|
||||||
managerUrl
|
managerUrl
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
import config from "@/config";
|
|
||||||
|
|
||||||
let commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common)
|
|
||||||
|
let commonUrl = (process.env.NODE_ENV === 'development' ? BASE.API_DEV.common : BASE.API_PROD.common)
|
||||||
|
|
||||||
// 文件上传接口
|
// 文件上传接口
|
||||||
export const uploadFile = commonUrl+ "/common/upload/file";
|
export const uploadFile = commonUrl+ "/common/upload/file";
|
||||||
@@ -49,6 +49,12 @@ export const getNoticePage = (params) => {
|
|||||||
export const login = (params) => {
|
export const login = (params) => {
|
||||||
return getRequestWithNoToken("/user/login", params);
|
return getRequestWithNoToken("/user/login", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 登出
|
||||||
|
export const logout = () => {
|
||||||
|
return postRequest("/user/logout");
|
||||||
|
};
|
||||||
|
|
||||||
// 刷新token
|
// 刷新token
|
||||||
export const handleRefreshToken = (token) => {
|
export const handleRefreshToken = (token) => {
|
||||||
return getRequestWithNoToken(`/user/refresh/${token}`);
|
return getRequestWithNoToken(`/user/refresh/${token}`);
|
||||||
@@ -408,22 +414,22 @@ export const getProgress = () => {
|
|||||||
|
|
||||||
// 分页查询自定义分词
|
// 分页查询自定义分词
|
||||||
export const getCustomWordsPage = (params) => {
|
export const getCustomWordsPage = (params) => {
|
||||||
return getRequest(`/manager/custom-words`, params);
|
return getRequest(`/custom-words/page`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 添加自定义分词
|
// 添加自定义分词
|
||||||
export const insertCustomWords = (params) => {
|
export const insertCustomWords = (params) => {
|
||||||
return postRequest(`/manager/custom-words`, params);
|
return postRequest(`/custom-words`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 修改自定义分词
|
// 修改自定义分词
|
||||||
export const updateCustomWords = (params) => {
|
export const updateCustomWords = (params) => {
|
||||||
return putRequest(`/manager/custom-words`, params);
|
return putRequest(`/custom-words`, params);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除自定义分词
|
// 删除自定义分词
|
||||||
export const delCustom = (id) => {
|
export const delCustom = (id) => {
|
||||||
return deleteRequest(`/manager/custom-words/${id}`);
|
return deleteRequest(`/custom-words/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 设置热搜词
|
// 设置热搜词
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* @description 配置显示在浏览器标签的title
|
* @description 配置显示在浏览器标签的title
|
||||||
*/
|
*/
|
||||||
title: "Lili电商",
|
title: "lilishop",
|
||||||
/**
|
/**
|
||||||
* @description token在Cookie中存储的天数,默认1天
|
* @description token在Cookie中存储的天数,默认1天
|
||||||
*/
|
*/
|
||||||
@@ -16,26 +16,14 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
api_dev: {
|
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
|
||||||
seller: "https://store-api.pickmall.cn",
|
|
||||||
manager: "https://admin-api.pickmall.cn"
|
|
||||||
// common: 'http://192.168.0.100:8890',
|
|
||||||
// buyer: 'http://192.168.0.100:8888',
|
|
||||||
// seller: 'http://192.168.0.100:8889',
|
|
||||||
// manager: 'http://192.168.0.100:8887'
|
|
||||||
},
|
|
||||||
api_prod: {
|
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
|
||||||
seller: "https://store-api.pickmall.cn",
|
|
||||||
manager: "https://admin-api.pickmall.cn"
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* @description api请求基础路径前缀
|
* @description 高德web端申请的api key
|
||||||
*/
|
*/
|
||||||
baseUrlPrefix: "/manager",
|
aMapKey: "b440952723253aa9fe483e698057bf7d",
|
||||||
|
/**
|
||||||
|
* @description 官网地址
|
||||||
|
*/
|
||||||
|
website: "https://www.pickmall.cn",
|
||||||
/**
|
/**
|
||||||
* @description 需要加载的插件
|
* @description 需要加载的插件
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,31 +1,36 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import config from "@/config";
|
|
||||||
import { getStore, setStore } from "./storage.js";
|
import { getStore, setStore } from "./storage.js";
|
||||||
import { router } from "../router/index";
|
import { router } from "../router/index";
|
||||||
import { Message } from "view-design";
|
import { Message } from "view-design";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import {handleRefreshToken} from "../api/index"
|
import { handleRefreshToken } from "../api/index";
|
||||||
|
|
||||||
// 统一请求路径前缀
|
// 统一请求路径前缀
|
||||||
export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
|
export const commonUrl =
|
||||||
export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager) + config.baseUrlPrefix;
|
process.env.NODE_ENV === "development"
|
||||||
|
? BASE.API_DEV.common
|
||||||
|
: BASE.API_PROD.common;
|
||||||
|
export const managerUrl =
|
||||||
|
(process.env.NODE_ENV === "development"
|
||||||
|
? BASE.API_DEV.manager
|
||||||
|
: BASE.API_PROD.manager) + BASE.PREFIX;
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
timeout: 8000,
|
timeout: 8000,
|
||||||
baseURL: managerUrl
|
baseURL: managerUrl
|
||||||
})
|
});
|
||||||
var isRefreshToken = 0;
|
var isRefreshToken = 0;
|
||||||
const refreshToken = getTokenDebounce()
|
const refreshToken = getTokenDebounce();
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
if (config.method == 'get') {
|
if (config.method == "get") {
|
||||||
config.params = {
|
config.params = {
|
||||||
_t: Date.parse(new Date()) / 1000,
|
_t: Date.parse(new Date()) / 1000,
|
||||||
...config.params
|
...config.params
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
const uuid = getStore("uuid");
|
||||||
const uuid = getStore('uuid');
|
config.headers["uuid"] = uuid;
|
||||||
config.headers['uuid'] = uuid;
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@@ -36,7 +41,7 @@ service.interceptors.request.use(
|
|||||||
|
|
||||||
// http response 拦截器
|
// http response 拦截器
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
(response) => {
|
response => {
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
// 根据返回的code值来做不同的处理(和后端约定)
|
// 根据返回的code值来做不同的处理(和后端约定)
|
||||||
if (!data.success && data.message) {
|
if (!data.success && data.message) {
|
||||||
@@ -76,7 +81,7 @@ service.interceptors.response.use(
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async (error) => {
|
async error => {
|
||||||
// 返回状态码不为200时候的错误处理
|
// 返回状态码不为200时候的错误处理
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
if (error.response.status === 401) {
|
if (error.response.status === 401) {
|
||||||
@@ -87,77 +92,76 @@ service.interceptors.response.use(
|
|||||||
isRefreshToken++;
|
isRefreshToken++;
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
const getTokenRes = await refreshToken();
|
const getTokenRes = await refreshToken();
|
||||||
if (getTokenRes === 'success') { // 刷新token
|
if (getTokenRes === "success") {
|
||||||
|
// 刷新token
|
||||||
if (isRefreshToken === 1) {
|
if (isRefreshToken === 1) {
|
||||||
error.response.config.headers.accessToken = getStore('accessToken')
|
error.response.config.headers.accessToken = getStore(
|
||||||
return service(error.response.config)
|
"accessToken"
|
||||||
|
);
|
||||||
|
return service(error.response.config);
|
||||||
} else {
|
} else {
|
||||||
router.go(0)
|
router.go(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Cookies.set("userInfoManager", "");
|
Cookies.set("userInfoManager", "");
|
||||||
router.push('/login')
|
router.push("/login");
|
||||||
}
|
}
|
||||||
isRefreshToken = 0
|
isRefreshToken = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 其他错误处理
|
// 其他错误处理
|
||||||
console.log(error.response.data);
|
console.log(error.response.data);
|
||||||
Message.error(error.response.data.message)
|
Message.error(error.response.data.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* router.push("/login") */
|
/* router.push("/login") */
|
||||||
return Promise.resolve(error);
|
return Promise.resolve(error);
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
|
|
||||||
// 防抖闭包来一波
|
// 防抖闭包来一波
|
||||||
function getTokenDebounce() {
|
function getTokenDebounce() {
|
||||||
let lock = false
|
let lock = false;
|
||||||
let success = false
|
let success = false;
|
||||||
return function() {
|
return function() {
|
||||||
if (!lock) {
|
if (!lock) {
|
||||||
lock = true
|
lock = true;
|
||||||
let oldRefreshToken = getStore("refreshToken");
|
let oldRefreshToken = getStore("refreshToken");
|
||||||
handleRefreshToken(oldRefreshToken).then(res => {
|
handleRefreshToken(oldRefreshToken)
|
||||||
|
.then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let {
|
let { accessToken, refreshToken } = res.result;
|
||||||
accessToken,
|
|
||||||
refreshToken
|
|
||||||
} = res.result;
|
|
||||||
setStore("accessToken", accessToken);
|
setStore("accessToken", accessToken);
|
||||||
setStore("refreshToken", refreshToken);
|
setStore("refreshToken", refreshToken);
|
||||||
|
|
||||||
success = true
|
success = true;
|
||||||
lock = false
|
lock = false;
|
||||||
} else {
|
} else {
|
||||||
success = false
|
success = false;
|
||||||
lock = false
|
lock = false;
|
||||||
router.push('/login')
|
router.push("/login");
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
|
||||||
success = false
|
|
||||||
lock = false
|
|
||||||
})
|
})
|
||||||
|
.catch(err => {
|
||||||
|
success = false;
|
||||||
|
lock = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 一直看lock,直到请求失败或者成功
|
// 一直看lock,直到请求失败或者成功
|
||||||
const timer = setInterval(() => {
|
const timer = setInterval(() => {
|
||||||
if (!lock) {
|
if (!lock) {
|
||||||
clearInterval(timer)
|
clearInterval(timer);
|
||||||
if (success) {
|
if (success) {
|
||||||
resolve('success')
|
resolve("success");
|
||||||
} else {
|
} else {
|
||||||
resolve('fail')
|
resolve("fail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 500) // 轮询时间间隔
|
}, 500); // 轮询时间间隔
|
||||||
})
|
});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export const getRequest = (url, params) => {
|
export const getRequest = (url, params) => {
|
||||||
let accessToken = getStore("accessToken");
|
let accessToken = getStore("accessToken");
|
||||||
@@ -321,7 +325,6 @@ export const getRequestWithNoToken = (url, params) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 无需token验证的请求 避免旧token过期导致请求失败
|
* 无需token验证的请求 避免旧token过期导致请求失败
|
||||||
* @param {*} url
|
* @param {*} url
|
||||||
@@ -334,4 +337,3 @@ export const postRequestWithNoToken = (url, params) => {
|
|||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
import axios from 'axios';
|
import { getCurrentPermissionList } from "@/api/index";
|
||||||
import {
|
import lazyLoading from "./lazyLoading.js";
|
||||||
getCurrentPermissionList
|
|
||||||
} from '@/api/index';
|
|
||||||
import lazyLoading from './lazyLoading.js';
|
|
||||||
import router from '@/router/index';
|
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
|
|
||||||
let util = {
|
let util = {};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
util.title = function(title) {
|
util.title = function(title) {
|
||||||
title = title || 'lili 运营后台';
|
title = title || "运营后台";
|
||||||
window.document.title = title;
|
window.document.title = title;
|
||||||
};
|
};
|
||||||
// 判断元素是否存在于数组中
|
// 判断元素是否存在于数组中
|
||||||
@@ -33,8 +28,9 @@ util.openNewPage = function (vm, name, argu, query) {
|
|||||||
let i = 0;
|
let i = 0;
|
||||||
let tagHasOpened = false;
|
let tagHasOpened = false;
|
||||||
while (i < openedPageLen) {
|
while (i < openedPageLen) {
|
||||||
if (name == pageOpenedList[i].name) { // 页面已经打开
|
if (name == pageOpenedList[i].name) {
|
||||||
vm.$store.commit('pageOpenedList', {
|
// 页面已经打开
|
||||||
|
vm.$store.commit("pageOpenedList", {
|
||||||
index: i,
|
index: i,
|
||||||
argu: argu,
|
argu: argu,
|
||||||
query: query
|
query: query
|
||||||
@@ -45,7 +41,7 @@ util.openNewPage = function (vm, name, argu, query) {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
if (!tagHasOpened) {
|
if (!tagHasOpened) {
|
||||||
let tag = vm.$store.state.app.tagsList.filter((item) => {
|
let tag = vm.$store.state.app.tagsList.filter(item => {
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
return name == item.children[0].name;
|
return name == item.children[0].name;
|
||||||
} else {
|
} else {
|
||||||
@@ -61,7 +57,7 @@ util.openNewPage = function (vm, name, argu, query) {
|
|||||||
if (query) {
|
if (query) {
|
||||||
tag.query = query;
|
tag.query = query;
|
||||||
}
|
}
|
||||||
vm.$store.commit('increateTag', tag);
|
vm.$store.commit("increateTag", tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -71,7 +67,11 @@ util.toDefaultPage = function (routers, name, route, next) {
|
|||||||
let i = 0;
|
let i = 0;
|
||||||
let notHandle = true;
|
let notHandle = true;
|
||||||
while (i < len) {
|
while (i < len) {
|
||||||
if (routers[i].name == name && routers[i].children && routers[i].redirect == undefined) {
|
if (
|
||||||
|
routers[i].name == name &&
|
||||||
|
routers[i].children &&
|
||||||
|
routers[i].redirect == undefined
|
||||||
|
) {
|
||||||
route.replace({
|
route.replace({
|
||||||
name: routers[i].children[0].name
|
name: routers[i].children[0].name
|
||||||
});
|
});
|
||||||
@@ -86,21 +86,24 @@ util.toDefaultPage = function (routers, name, route, next) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
util.initRouter = function (vm) { // 初始化路由
|
util.initRouter = function(vm) {
|
||||||
|
// 初始化路由
|
||||||
const constRoutes = [];
|
const constRoutes = [];
|
||||||
const otherRoutes = [];
|
const otherRoutes = [];
|
||||||
|
|
||||||
// 404路由需要和动态路由一起加载
|
// 404路由需要和动态路由一起加载
|
||||||
const otherRouter = [{
|
const otherRouter = [
|
||||||
path: '/*',
|
{
|
||||||
name: 'error-404',
|
path: "/*",
|
||||||
|
name: "error-404",
|
||||||
meta: {
|
meta: {
|
||||||
title: '404-页面不存在'
|
title: "404-页面不存在"
|
||||||
},
|
},
|
||||||
frontRoute: 'error-page/404'
|
frontRoute: "error-page/404"
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
// 判断用户是否登录
|
// 判断用户是否登录
|
||||||
let userInfo = Cookies.get('userInfoManager')
|
let userInfo = Cookies.get("userInfoManager");
|
||||||
if (!userInfo) {
|
if (!userInfo) {
|
||||||
// 未登录
|
// 未登录
|
||||||
return;
|
return;
|
||||||
@@ -114,13 +117,13 @@ util.initRouter = function (vm) { // 初始化路由
|
|||||||
|
|
||||||
// 格式化数据,设置 空children 为 null
|
// 格式化数据,设置 空children 为 null
|
||||||
for (let i = 0; i < menuData.length; i++) {
|
for (let i = 0; i < menuData.length; i++) {
|
||||||
let t = menuData[i].children
|
let t = menuData[i].children;
|
||||||
for (let k = 0; k < t.length; k++) {
|
for (let k = 0; k < t.length; k++) {
|
||||||
let tt = t[k].children;
|
let tt = t[k].children;
|
||||||
for (let z = 0; z < tt.length; z++) {
|
for (let z = 0; z < tt.length; z++) {
|
||||||
tt[z].children = null
|
tt[z].children = null;
|
||||||
// 给所有三级路由添加字段,显示一级菜单name,方便点击页签时的选中筛选
|
// 给所有三级路由添加字段,显示一级菜单name,方便点击页签时的选中筛选
|
||||||
tt[z].firstRouterName = menuData[i].name
|
tt[z].firstRouterName = menuData[i].name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,20 +134,23 @@ util.initRouter = function (vm) { // 初始化路由
|
|||||||
util.initAllMenuData(constRoutes, menuData);
|
util.initAllMenuData(constRoutes, menuData);
|
||||||
util.initRouterNode(otherRoutes, otherRouter);
|
util.initRouterNode(otherRoutes, otherRouter);
|
||||||
// 添加所有主界面路由
|
// 添加所有主界面路由
|
||||||
vm.$store.commit('updateAppRouter', constRoutes.filter(item => item.children.length > 0));
|
vm.$store.commit(
|
||||||
|
"updateAppRouter",
|
||||||
|
constRoutes.filter(item => item.children.length > 0)
|
||||||
|
);
|
||||||
// 添加全局路由
|
// 添加全局路由
|
||||||
vm.$store.commit('updateDefaultRouter', otherRoutes);
|
vm.$store.commit("updateDefaultRouter", otherRoutes);
|
||||||
// 添加菜单路由
|
// 添加菜单路由
|
||||||
util.initMenuData(vm, menuData);
|
util.initMenuData(vm, menuData);
|
||||||
// 缓存数据 修改加载标识
|
// 缓存数据 修改加载标识
|
||||||
window.localStorage.setItem('menuData', JSON.stringify(menuData));
|
window.localStorage.setItem("menuData", JSON.stringify(menuData));
|
||||||
vm.$store.commit('setAdded', true);
|
vm.$store.commit("setAdded", true);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 读取缓存数据
|
// 读取缓存数据
|
||||||
let data = window.localStorage.getItem('menuData');
|
let data = window.localStorage.getItem("menuData");
|
||||||
if (!data) {
|
if (!data) {
|
||||||
vm.$store.commit('setAdded', false);
|
vm.$store.commit("setAdded", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let menuData = JSON.parse(data);
|
let menuData = JSON.parse(data);
|
||||||
@@ -155,17 +161,16 @@ util.initRouter = function (vm) { // 初始化路由
|
|||||||
|
|
||||||
// 添加所有顶部导航栏下的菜单路由
|
// 添加所有顶部导航栏下的菜单路由
|
||||||
util.initAllMenuData = function(constRoutes, data) {
|
util.initAllMenuData = function(constRoutes, data) {
|
||||||
|
|
||||||
let allMenuData = [];
|
let allMenuData = [];
|
||||||
data.forEach(e => {
|
data.forEach(e => {
|
||||||
if (e.level == 0) {
|
if (e.level == 0) {
|
||||||
e.children.forEach(item => {
|
e.children.forEach(item => {
|
||||||
allMenuData.push(item);
|
allMenuData.push(item);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
util.initRouterNode(constRoutes, allMenuData);
|
util.initRouterNode(constRoutes, allMenuData);
|
||||||
}
|
};
|
||||||
|
|
||||||
// 生成菜单格式数据
|
// 生成菜单格式数据
|
||||||
util.initMenuData = function(vm, data) {
|
util.initMenuData = function(vm, data) {
|
||||||
@@ -177,29 +182,29 @@ util.initMenuData = function (vm, data) {
|
|||||||
let nav = {
|
let nav = {
|
||||||
name: e.name,
|
name: e.name,
|
||||||
title: e.title
|
title: e.title
|
||||||
}
|
};
|
||||||
navList.push(nav);
|
navList.push(nav);
|
||||||
})
|
});
|
||||||
if (navList.length < 1) {
|
if (navList.length < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 存入vuex
|
// 存入vuex
|
||||||
vm.$store.commit('setNavList', navList);
|
vm.$store.commit("setNavList", navList);
|
||||||
let currNav = window.localStorage.getItem('currNav')
|
let currNav = window.localStorage.getItem("currNav");
|
||||||
if (currNav) {
|
if (currNav) {
|
||||||
// 读取缓存title
|
// 读取缓存title
|
||||||
for (var item of navList) {
|
for (var item of navList) {
|
||||||
if (item.name == currNav) {
|
if (item.name == currNav) {
|
||||||
vm.$store.commit('setCurrNavTitle', item.title);
|
vm.$store.commit("setCurrNavTitle", item.title);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 默认第一个
|
// 默认第一个
|
||||||
currNav = navList[0].name;
|
currNav = navList[0].name;
|
||||||
vm.$store.commit('setCurrNavTitle', navList[0].title);
|
vm.$store.commit("setCurrNavTitle", navList[0].title);
|
||||||
}
|
}
|
||||||
vm.$store.commit('setCurrNav', currNav);
|
vm.$store.commit("setCurrNav", currNav);
|
||||||
for (let item of menuData) {
|
for (let item of menuData) {
|
||||||
if (item.name == currNav) {
|
if (item.name == currNav) {
|
||||||
// 过滤
|
// 过滤
|
||||||
@@ -209,21 +214,25 @@ util.initMenuData = function (vm, data) {
|
|||||||
}
|
}
|
||||||
util.initRouterNode(menuRoutes, menuData);
|
util.initRouterNode(menuRoutes, menuData);
|
||||||
// 刷新界面菜单
|
// 刷新界面菜单
|
||||||
vm.$store.commit('updateMenulist', menuRoutes.filter(item => item.children.length > 0));
|
vm.$store.commit(
|
||||||
|
"updateMenulist",
|
||||||
|
menuRoutes.filter(item => item.children.length > 0)
|
||||||
|
);
|
||||||
|
|
||||||
let tagsList = [];
|
let tagsList = [];
|
||||||
vm.$store.state.app.routers.map((item) => {
|
vm.$store.state.app.routers.map(item => {
|
||||||
if (item.children.length <= 1) {
|
if (item.children.length <= 1) {
|
||||||
tagsList.push(item.children[0]);
|
tagsList.push(item.children[0]);
|
||||||
} else {
|
} else {
|
||||||
tagsList.push(...item.children);
|
tagsList.push(...item.children);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vm.$store.commit('setTagsList', tagsList);
|
vm.$store.commit("setTagsList", tagsList);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 生成路由节点
|
// 生成路由节点
|
||||||
util.initRouterNode = function (routers, data) { // data为所有子菜单数据
|
util.initRouterNode = function(routers, data) {
|
||||||
|
// data为所有子菜单数据
|
||||||
|
|
||||||
for (let item of data) {
|
for (let item of data) {
|
||||||
let menu = Object.assign({}, item);
|
let menu = Object.assign({}, item);
|
||||||
@@ -237,8 +246,8 @@ util.initRouterNode = function (routers, data) { // data为所有子菜单数据
|
|||||||
|
|
||||||
let meta = {};
|
let meta = {};
|
||||||
// 给页面添加标题、父级菜单name(方便左侧菜单选中)
|
// 给页面添加标题、父级菜单name(方便左侧菜单选中)
|
||||||
meta.title = menu.title ? menu.title + " - lilishop 运营后台" : null;
|
meta.title = menu.title ? menu.title + " - 运营后台" : null;
|
||||||
meta.firstRouterName = item.firstRouterName
|
meta.firstRouterName = item.firstRouterName;
|
||||||
menu.meta = meta;
|
menu.meta = meta;
|
||||||
|
|
||||||
routers.push(menu);
|
routers.push(menu);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
|
import config from '@/config/index'
|
||||||
export default {
|
export default {
|
||||||
lili: 'lili',
|
lili: config.title,
|
||||||
usernameLogin: 'UsernameLogin',
|
usernameLogin: 'UsernameLogin',
|
||||||
mobileLogin: 'MobileLogin',
|
mobileLogin: 'MobileLogin',
|
||||||
autoLogin: 'Auto Login',
|
autoLogin: 'Auto Login',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
import config from '@/config/index'
|
||||||
export default {
|
export default {
|
||||||
lili: 'lili',
|
lili: config.title,
|
||||||
usernameLogin: '账户密码登录',
|
usernameLogin: '账户密码登录',
|
||||||
mobileLogin: '手机号登录',
|
mobileLogin: '手机号登录',
|
||||||
autoLogin: '自动登录',
|
autoLogin: '自动登录',
|
||||||
|
|||||||
@@ -11,23 +11,24 @@ import App from './App'
|
|||||||
import { router } from './router/index'
|
import { router } from './router/index'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import i18n from '@/locale'
|
import i18n from '@/locale'
|
||||||
import vueQr from 'vue-qr'
|
|
||||||
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'
|
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'
|
||||||
import { setStore, getStore, removeStore } from '@/libs/storage'
|
import { setStore, getStore, removeStore } from '@/libs/storage'
|
||||||
import util from '@/libs/util'
|
import util from '@/libs/util'
|
||||||
|
|
||||||
import * as filters from '@/utils/filters' // global filter
|
import * as filters from '@/utils/filters' // global filter
|
||||||
import liliDialog from '@/views/lili-dialog'
|
import liliDialog from '@/views/lili-dialog'
|
||||||
|
import i18nBox from '@/views/lili-components/i18n-translate'
|
||||||
import {md5} from '@/utils/md5.js';
|
import {md5} from '@/utils/md5.js';
|
||||||
Vue.config.devtools = true;
|
Vue.config.devtools = true;
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
const buyerUrlPC = 'https://pc-b2b2c.pickmall.cn' // 跳转买家端地址 pc端
|
const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端
|
||||||
const buyerUrlWap = 'https://m-b2b2c.pickmall.cn' // 跳转买家端地址 wap端
|
const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端
|
||||||
Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品
|
Vue.prototype.linkTo = function (goodsId, skuId) { // 跳转买家端商品
|
||||||
window.open(`${buyerUrlPC}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
window.open(`${PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
||||||
};
|
};
|
||||||
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
||||||
return `${buyerUrlWap}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
||||||
};
|
};
|
||||||
|
|
||||||
Vue.use(ViewUI, {
|
Vue.use(ViewUI, {
|
||||||
@@ -35,7 +36,8 @@ Vue.use(ViewUI, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Vue.component('liliDialog',liliDialog)
|
Vue.component('liliDialog',liliDialog)
|
||||||
Vue.component(vueQr)
|
Vue.component('i18nBox',i18nBox)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import Main from "@/views/Main.vue";
|
import Main from "@/views/Main.vue";
|
||||||
|
import config from '@/config/index'
|
||||||
// 不作为Main组件的子页面展示的页面单独写,如下
|
// 不作为Main组件的子页面展示的页面单独写,如下
|
||||||
export const loginRouter = {
|
export const loginRouter = {
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "login",
|
name: "login",
|
||||||
meta: {
|
meta: {
|
||||||
title: "登录 - lili运营后台"
|
title: `登录 - ${config.title}运营后台`
|
||||||
},
|
},
|
||||||
component: () => import("@/views/login.vue")
|
component: () => import("@/views/login.vue")
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
$theme_color: #804ed1;
|
|
||||||
|
|
||||||
|
|
||||||
//自动移滚动条样式
|
//自动移滚动条样式
|
||||||
@@ -89,113 +88,15 @@ ul,li{
|
|||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @Author: LMR
|
|
||||||
* @Date: 2020-08-14 11:04:12
|
|
||||||
* @Last Modified by: LMR
|
|
||||||
* @Last Modified time: 2020-08-18 14:21:41
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 主题颜色
|
// 主题颜色
|
||||||
|
|
||||||
// 明亮主题颜色
|
$success_color: #68cabe;
|
||||||
$primary_color: #2d8cf0;
|
$warning_color: #fa6419;
|
||||||
$primary_light_color: #0f1011;
|
$error_color: #ff3c2a;
|
||||||
$primary_dark_color: #2b85e4;
|
$theme_color: #FF5C58;
|
||||||
$success_color: #19be6b;
|
|
||||||
$warning_color: #ff9900;
|
|
||||||
$error_color: #ed3f14;
|
|
||||||
$handle-btn-color: #438cde;
|
|
||||||
|
|
||||||
$theme_color: #ed3f14;
|
|
||||||
.theme_color {
|
.theme_color {
|
||||||
color: #ed3f14 !important;
|
color: $theme_color !important;
|
||||||
}
|
}
|
||||||
$border_color: #dddee1;
|
$bg_color: #f1f6fa;
|
||||||
$title_color: #8c8c8c;
|
|
||||||
$light_title_color: #1c2438;
|
|
||||||
$light_content_color: #495060;
|
|
||||||
$light_sub_color: #80848f;
|
|
||||||
$light_background_color: #f8f8f9;
|
|
||||||
$light_white_background_color: #fff;
|
|
||||||
// 暗黑主题颜色
|
|
||||||
$dark_background_color: #141414;
|
|
||||||
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
|
|
||||||
$dark_content_color: #d5d5d5;
|
|
||||||
|
|
||||||
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
|
|
||||||
|
|
||||||
// 背景颜色
|
|
||||||
@mixin background_color($color) {
|
|
||||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
|
||||||
background-color: $color;
|
|
||||||
transition: 0.35s;
|
|
||||||
[data-theme="dark"] & {
|
|
||||||
background-color: $dark_background_color;
|
|
||||||
}
|
|
||||||
[data-theme="light"] & {
|
|
||||||
background-color: $light_background_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 辅助背景颜色
|
|
||||||
@mixin sub_background_color($color) {
|
|
||||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
|
||||||
background-color: $color;
|
|
||||||
transition: 0.35s;
|
|
||||||
[data-theme="dark"] & {
|
|
||||||
background-color: $dark_sub_background_color;
|
|
||||||
}
|
|
||||||
[data-theme="light"] & {
|
|
||||||
background-color: $light_background_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin white_background_color() {
|
|
||||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
|
||||||
background-color: $light_white_background_color;
|
|
||||||
transition: 0.35s;
|
|
||||||
[data-theme="dark"] & {
|
|
||||||
background-color: $dark_sub_background_color;
|
|
||||||
}
|
|
||||||
[data-theme="light"] & {
|
|
||||||
background-color: $light_white_background_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 正文颜色
|
|
||||||
@mixin content_color($color) {
|
|
||||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
|
||||||
color: $color;
|
|
||||||
[data-theme="dark"] & {
|
|
||||||
color: $dark_content_color;
|
|
||||||
}
|
|
||||||
[data-theme="light"] & {
|
|
||||||
color: $light_content_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 辅助颜色
|
|
||||||
@mixin sub_color($color) {
|
|
||||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
|
||||||
color: $color;
|
|
||||||
[data-theme="dark"] & {
|
|
||||||
color: $dark_content_color;
|
|
||||||
}
|
|
||||||
[data-theme="light"] & {
|
|
||||||
color: $light_sub_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 标题颜色
|
|
||||||
@mixin title_color($color) {
|
|
||||||
/*通过该函数设置字体颜色,后期方便统一管理;*/
|
|
||||||
color: $color;
|
|
||||||
[data-theme="dark"] & {
|
|
||||||
color: $dark_content_color;
|
|
||||||
}
|
|
||||||
[data-theme="light"] & {
|
|
||||||
color: $light_title_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@import "./table-common.scss";
|
@import "./table-common.scss";
|
||||||
@@ -1,13 +1,16 @@
|
|||||||
@import "~view-design/src/styles/index.less";
|
@import "~view-design/src/styles/index.less";
|
||||||
// iview 自定义样式
|
// iview 自定义样式
|
||||||
|
|
||||||
@primary-color: #ed3f14;
|
@primary-color: #ff5c58;
|
||||||
|
@info-color: #fa6419;
|
||||||
|
@success-color: #68cabe;
|
||||||
|
@error-color: #ff3c2a;
|
||||||
@table-thead-bg: #f8f8f9;
|
@table-thead-bg: #f8f8f9;
|
||||||
@table-td-stripe-bg: #f8f8f9;
|
@table-td-stripe-bg: #f8f8f9;
|
||||||
@table-td-hover-bg: #ededed;
|
@table-td-hover-bg: #ededed;
|
||||||
@table-td-highlight-bg: #ededed;
|
@table-td-highlight-bg: #ededed;
|
||||||
@font-size-base: 12px;
|
@font-size-base: 12px;
|
||||||
|
|
||||||
.ivu-drawer,
|
.ivu-drawer,
|
||||||
.drawer,
|
.drawer,
|
||||||
.ivu-drawer-wrap {
|
.ivu-drawer-wrap {
|
||||||
|
|||||||
@@ -57,3 +57,39 @@ export const URL =
|
|||||||
|
|
||||||
// 固话
|
// 固话
|
||||||
export const TEL = /0\d{2,3}-\d{7,8}/
|
export const TEL = /0\d{2,3}-\d{7,8}/
|
||||||
|
|
||||||
|
|
||||||
|
// 正整数
|
||||||
|
export const INTEGER = {
|
||||||
|
|
||||||
|
pattern: /^[0-9]\d{0,10}|0$/,
|
||||||
|
message:'请输入正整数'
|
||||||
|
}
|
||||||
|
// 正整数
|
||||||
|
export const NUMBER = {
|
||||||
|
pattern: /^(\-|\+)?\d{0,10}$/,
|
||||||
|
message:'请输入数字'
|
||||||
|
}
|
||||||
|
export const VARCHAR5 = {
|
||||||
|
pattern:/^.{1,5}$/,
|
||||||
|
message:'长度应该限制在1-5个字符'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const VARCHAR20 = {
|
||||||
|
pattern:/^.{1,20}$/,
|
||||||
|
message:'长度应该限制在1-20个字符'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const VARCHAR255 = {
|
||||||
|
pattern:/^.{1,255}$/,
|
||||||
|
message:'超出最大长度限制'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const URL200 = {
|
||||||
|
pattern:/[a-zA-z]+\:\/\/[^\s]{1,190}/,
|
||||||
|
message:'请输入长度不超过200的URL地址'
|
||||||
|
}
|
||||||
|
export const REQUIRED = {
|
||||||
|
required: true,
|
||||||
|
message:'请填写参数'
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,23 +13,32 @@
|
|||||||
<!-- 顶部标题栏主体 -->
|
<!-- 顶部标题栏主体 -->
|
||||||
<div class="main-header-con">
|
<div class="main-header-con">
|
||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
|
<div
|
||||||
|
:class="{
|
||||||
|
'header-avator-con': navType != 4,
|
||||||
|
'header-avator-con nav4': navType == 4,
|
||||||
|
}"
|
||||||
|
>
|
||||||
<!-- 通知消息 -->
|
<!-- 通知消息 -->
|
||||||
<message-tip v-if="tipsMessage" :res="tipsMessage"></message-tip>
|
<message-tip v-if="tipsMessage" :res="tipsMessage"></message-tip>
|
||||||
<!-- 用户头像 -->
|
<!-- 用户头像 -->
|
||||||
<div class="user-dropdown-menu-con">
|
<div class="user-dropdown-menu-con">
|
||||||
|
|
||||||
<Row type="flex" justify="end" align="middle" class="user-dropdown-innercon">
|
<Row type="flex" justify="end" align="middle" class="user-dropdown-innercon">
|
||||||
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
|
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
|
||||||
<div class="dropList">
|
<div class="dropList">
|
||||||
<span class="main-user-name">{{ userInfo.nickName }}</span>
|
<span class="main-user-name">{{ userInfo.nickName }}</span>
|
||||||
<Icon type="md-arrow-dropdown" />
|
<Icon type="md-arrow-dropdown" />
|
||||||
<Avatar :src="avatarPath" style="background: #fff;margin-left: 10px;"></Avatar>
|
<Avatar
|
||||||
|
:src="avatarPath"
|
||||||
|
style="background: #fff; margin-left: 10px"
|
||||||
|
></Avatar>
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
<DropdownItem name="personalCenter">{{ $t('userCenter') }}</DropdownItem>
|
<DropdownItem name="personalCenter">{{
|
||||||
<DropdownItem name="changePass">{{ $t('changePass') }}</DropdownItem>
|
$t("userCenter")
|
||||||
<DropdownItem name="loginOut" divided>{{ $t('logout') }}</DropdownItem>
|
}}</DropdownItem>
|
||||||
|
<DropdownItem name="changePass">{{ $t("changePass") }}</DropdownItem>
|
||||||
|
<DropdownItem name="loginOut" divided>{{ $t("logout") }}</DropdownItem>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</Row>
|
</Row>
|
||||||
@@ -60,7 +69,7 @@ import messageTip from "./main-components/message-tip.vue";
|
|||||||
import circleLoading from "@/views/my-components/lili/circle-loading.vue";
|
import circleLoading from "@/views/my-components/lili/circle-loading.vue";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import util from "@/libs/util.js";
|
import util from "@/libs/util.js";
|
||||||
import { getNoticePage } from "@/api/index";
|
import { getNoticePage, logout } from "@/api/index";
|
||||||
|
|
||||||
var client;
|
var client;
|
||||||
export default {
|
export default {
|
||||||
@@ -90,7 +99,7 @@ export default {
|
|||||||
},
|
},
|
||||||
lang() {
|
lang() {
|
||||||
return this.$store.state.app.lang;
|
return this.$store.state.app.lang;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -131,11 +140,13 @@ export default {
|
|||||||
}
|
}
|
||||||
// 退出登录
|
// 退出登录
|
||||||
else if (name === "loginOut") {
|
else if (name === "loginOut") {
|
||||||
|
logout().then((res) => {
|
||||||
this.$store.commit("logout", this);
|
this.$store.commit("logout", this);
|
||||||
this.$store.commit('setAdded', false);
|
this.$store.commit("setAdded", false);
|
||||||
this.setStore("accessToken", "");
|
this.setStore("accessToken", "");
|
||||||
this.setStore("refreshToken", "");
|
this.setStore("refreshToken", "");
|
||||||
this.$router.push({ path: "/login" });
|
this.$router.push({ path: "/login" });
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//切换标签
|
//切换标签
|
||||||
@@ -147,12 +158,7 @@ export default {
|
|||||||
});
|
});
|
||||||
if (!openpageHasTag) {
|
if (!openpageHasTag) {
|
||||||
// 解决关闭当前标签后再点击回退按钮会退到当前页时没有标签的问题
|
// 解决关闭当前标签后再点击回退按钮会退到当前页时没有标签的问题
|
||||||
util.openNewPage(
|
util.openNewPage(this, name, this.$route.params || {}, this.$route.query || {});
|
||||||
this,
|
|
||||||
name,
|
|
||||||
this.$route.params || {},
|
|
||||||
this.$route.query || {}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//宽度动态计算
|
//宽度动态计算
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
:width="500"
|
:width="500"
|
||||||
>
|
>
|
||||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||||
<FormItem label="自定义分词" prop="sn">
|
<FormItem label="自定义分词" prop="name">
|
||||||
<Input v-model="form.name" clearable style="width: 100%" />
|
<Input v-model="form.name" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
@@ -56,6 +56,8 @@ import {
|
|||||||
insertCustomWords,
|
insertCustomWords,
|
||||||
updateCustomWords
|
updateCustomWords
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
|
|
||||||
|
import { regular } from "@/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "customWords",
|
name: "customWords",
|
||||||
data() {
|
data() {
|
||||||
@@ -79,11 +81,8 @@ export default {
|
|||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
name: [
|
name: [
|
||||||
{
|
regular.REQUIRED,
|
||||||
required: true,
|
regular.VARCHAR20
|
||||||
message: "请输入自定义分词",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ export const cashStatusList = [
|
|||||||
label:'待处理'
|
label:'待处理'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:'REFUSE',
|
value:'FAIL_AUDITING',
|
||||||
label:'拒绝'
|
label:'拒绝'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:'PASS',
|
value:'VIA_AUDITING',
|
||||||
label:'通过'
|
label:'通过'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Card>
|
<Card>
|
||||||
<Row @keydown.enter.native="handleSearch" >
|
<Form ref="searchForm" :model="searchForm" class="search-form">
|
||||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
<Form-item label="会员名称" class="flex" prop="memberName">
|
||||||
<Form-item label="会员名称">
|
<Input
|
||||||
<Input class="search-input" v-model="searchForm.memberName"></Input>
|
type="text" v-model="searchForm.memberName"
|
||||||
|
style="width: 200px"></Input>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="编号">
|
<Form-item label="编号" class="flex">
|
||||||
<Input class="search-input" v-model="searchForm.sn"></Input>
|
<Input
|
||||||
|
type="text" v-model="searchForm.sn"
|
||||||
|
style="width: 200px"></Input>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="状态" style="margin-left: -20px">
|
<Form-item label="状态"
|
||||||
<Select v-model="searchForm.distributionCashStatus" style="width:150px;">
|
style="width: 200px">
|
||||||
|
<Select v-model="searchForm.distributionCashStatus" clearable style="width: 150px">
|
||||||
<Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
<Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item style="margin-left:-35px;" class="br">
|
<Form-item>
|
||||||
<Button @click="handleSearch" type="primary">搜索</Button>
|
<Button @click="handleSearch" type="primary">搜索</Button>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
|
||||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
|
||||||
<Row type="flex" justify="end" class="page padding-row">
|
<Row type="flex" justify="end" class="page padding-row">
|
||||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("img", {
|
return h("img", {
|
||||||
attrs: {
|
attrs: {
|
||||||
src: params.row.thumbnail,
|
src: params.row.thumbnail || '',
|
||||||
alt: "加载图片失败",
|
alt: "加载图片失败",
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
@@ -107,20 +107,23 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "库存",
|
title: "库存",
|
||||||
key: "quantity",
|
key: "quantity",
|
||||||
|
minWidth: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "添加时间",
|
title: "添加时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 170,
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "店铺名称",
|
title: "店铺名称",
|
||||||
key: "storeName",
|
key: "storeName",
|
||||||
|
minWidth: 100,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "佣金金额",
|
title: "佣金金额",
|
||||||
key: "commission",
|
key: "commission",
|
||||||
|
minWidth: 100,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h(
|
return h(
|
||||||
@@ -134,7 +137,7 @@ export default {
|
|||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 150,
|
minWidth: 100,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("div", [
|
return h("div", [
|
||||||
h(
|
h(
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="店铺名称">
|
<Form-item label="店铺名称">
|
||||||
<Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable
|
<Select v-model="searchForm.storeId" placeholder="请选择" @on-query-change="searchChange" filterable
|
||||||
clearable style="width: 150px">
|
clearable style="width: 150px">
|
||||||
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
|
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
@@ -86,22 +86,26 @@
|
|||||||
searchForm: { // 搜索框初始化对象
|
searchForm: { // 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 10, // 页面大小
|
pageSize: 10, // 页面大小
|
||||||
|
sort:"create_time",
|
||||||
|
order:"desc"
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: "订单编号",
|
title: "订单编号",
|
||||||
key: "orderSn",
|
key: "orderSn",
|
||||||
minWidth: 100,
|
minWidth: 180,
|
||||||
|
fixed: "left",
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '商品信息',
|
title: '商品信息',
|
||||||
slot: 'goodsMsg',
|
slot: 'goodsMsg',
|
||||||
minWidth: 120
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "退款金额",
|
title: "退款金额",
|
||||||
key: "returnMoney",
|
key: "returnMoney",
|
||||||
|
minWidth:80,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if(params.row.sellBackRebate == null){
|
if(params.row.sellBackRebate == null){
|
||||||
@@ -114,23 +118,24 @@
|
|||||||
{
|
{
|
||||||
title: "分销商",
|
title: "分销商",
|
||||||
key: "distributionName",
|
key: "distributionName",
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
|
minWidth:80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "店铺名称",
|
title: "店铺名称",
|
||||||
key: "storeName",
|
key: "storeName",
|
||||||
|
minWidth:80,
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
slot: "distributionOrderStatus",
|
slot: "distributionOrderStatus",
|
||||||
width: 120,
|
minWidth:80,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "佣金金额",
|
title: "佣金金额",
|
||||||
key: "rebateGrade",
|
key: "rebateGrade",
|
||||||
width: 120,
|
minWidth:80,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if(params.row.rebate == null){
|
if(params.row.rebate == null){
|
||||||
@@ -142,9 +147,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
fixed: "right",
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 180,
|
minWidth:100,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="background-color: #fff;">
|
<div style="background-color: #fff;">
|
||||||
|
|
||||||
<Form ref="form" :model="form" :label-width="120" style="padding: 10px;">
|
<Form ref="form" :model="form" :rules="formRule" :label-width="120" style="padding: 10px;">
|
||||||
|
|
||||||
<Divider orientation="left">分销设置</Divider>
|
<Divider orientation="left">分销设置</Divider>
|
||||||
<FormItem label="是否开启分销" prop="distribution">
|
<FormItem label="是否开启分销" prop="isOpen">
|
||||||
<i-switch size="large" v-model="form.isOpen" :true-value="true" :false-value="false">
|
<i-switch size="large" v-model="form.isOpen" :true-value="true" :false-value="false">
|
||||||
<span slot="open">开启</span>
|
<span slot="open">开启</span>
|
||||||
<span slot="close">关闭</span>
|
<span slot="close">关闭</span>
|
||||||
</i-switch>
|
</i-switch>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="分销关系绑定天数" prop="distributionDay">
|
<FormItem label="分销关系绑定天数" prop="distributionDay">
|
||||||
<InputNumber :min="1" style="width:100px;" v-model="form.distributionDay"></InputNumber>
|
<InputNumber :min="1" :max="365" style="width:100px;" v-model="form.distributionDay"></InputNumber>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="分销结算天数" prop="cashDay">
|
<FormItem label="分销结算天数" prop="cashDay">
|
||||||
<InputNumber :min="1" style="width:100px;" v-model="form.cashDay"></InputNumber>
|
<InputNumber :min="1" :max="365" style="width:100px;" v-model="form.cashDay"></InputNumber>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Button type="primary" @click="submit">保存</Button>
|
<Button type="primary" @click="submit">保存</Button>
|
||||||
@@ -25,15 +25,27 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { setSetting, getSetting } from "@/api/index";
|
import { setSetting, getSetting } from "@/api/index";
|
||||||
|
import { regular } from "@/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "distributionSetting",
|
name: "distributionSetting",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
// 添加或编辑表单对象初始化数据
|
// 添加或编辑表单对象初始化数据
|
||||||
isOpen: "",
|
isOpen: true,
|
||||||
distributionDay: 0, //分销关系绑定天数
|
distributionDay: 0, //分销关系绑定天数
|
||||||
cashDay: 0, //分销结算天数
|
cashDay: 0, //分销结算天数
|
||||||
|
},
|
||||||
|
formRule: {
|
||||||
|
isOpen: [
|
||||||
|
regular.REQUIRED
|
||||||
|
],
|
||||||
|
distributionDay: [
|
||||||
|
regular.REQUIRED
|
||||||
|
],
|
||||||
|
cashDay: [
|
||||||
|
regular.REQUIRED
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ import {
|
|||||||
updateGoodsUnit,
|
updateGoodsUnit,
|
||||||
delGoodsUnit
|
delGoodsUnit
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
|
|
||||||
|
import {regular} from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "goods-unit",
|
name: "goods-unit",
|
||||||
data() {
|
data() {
|
||||||
@@ -79,12 +82,9 @@ export default {
|
|||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
name: [
|
name: [
|
||||||
{
|
regular.REQUIRED,
|
||||||
required: true,
|
regular.VARCHAR5
|
||||||
message: "请输入计量单位",
|
]
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
selectList: [], // 多选数据
|
selectList: [], // 多选数据
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
/>
|
/>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="商品编号" prop="sn">
|
<Form-item label="商品编号" prop="id">
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
v-model="searchForm.sn"
|
v-model="searchForm.id"
|
||||||
placeholder="请输入商品编号"
|
placeholder="请输入商品编号"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
@@ -149,21 +149,10 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "商品编号",
|
title: "商品编号",
|
||||||
key: "sn",
|
key: "id",
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "成本价",
|
|
||||||
key: "price",
|
|
||||||
width: 130,
|
|
||||||
render: (h, params) => {
|
|
||||||
return h(
|
|
||||||
"div",
|
|
||||||
this.$options.filters.unitPrice(params.row.cost, "¥")
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "价格",
|
title: "价格",
|
||||||
key: "price",
|
key: "price",
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
/>
|
/>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="商品编号" prop="sn">
|
<Form-item label="商品编号" prop="id">
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
v-model="searchForm.sn"
|
v-model="searchForm.id"
|
||||||
placeholder="请输入商品编号"
|
placeholder="请输入商品编号"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
@@ -101,21 +101,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "商品编号",
|
title: "商品编号",
|
||||||
key: "sn",
|
key: "id",
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
tooltip: true
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "成本价",
|
|
||||||
key: "price",
|
|
||||||
minWidth: 130,
|
|
||||||
render: (h, params) => {
|
|
||||||
return h(
|
|
||||||
"div",
|
|
||||||
this.$options.filters.unitPrice(params.row.cost, "¥")
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "价格",
|
title: "价格",
|
||||||
key: "price",
|
key: "price",
|
||||||
|
|||||||
@@ -25,9 +25,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<h4>商品规格及图片</h4>
|
<h4>商品规格及图片</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<FormItem label="商品编号"> {{ goods.sn }}</FormItem>
|
<FormItem label="商品编号"> {{ goods.id }}</FormItem>
|
||||||
<FormItem label="商品价格"> ¥{{ goods.price | unitPrice }} </FormItem>
|
<FormItem label="商品价格"> ¥{{ goods.price | unitPrice }} </FormItem>
|
||||||
<FormItem label="市场价格"> ¥{{ goods.cost | unitPrice }} </FormItem>
|
|
||||||
<FormItem label="商品图片">
|
<FormItem label="商品图片">
|
||||||
<div class="demo-upload-list" v-for="(item, __index) in goods.goodsGalleryList" :key="__index">
|
<div class="demo-upload-list" v-for="(item, __index) in goods.goodsGalleryList" :key="__index">
|
||||||
<img :src="item"/>
|
<img :src="item"/>
|
||||||
@@ -69,14 +68,6 @@
|
|||||||
<div v-html="goods.mobileIntro"></div>
|
<div v-html="goods.mobileIntro"></div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<h4>商品物流信息</h4>
|
|
||||||
<div class="form-item-view">
|
|
||||||
<FormItem label="商品重量">
|
|
||||||
<Input v-model="goods.weight">
|
|
||||||
<span slot="append">kg</span>
|
|
||||||
</Input>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<Card>
|
<Card>
|
||||||
<Form ref="searchForm" @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70" class="search-form">
|
<Form ref="searchForm" @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70"
|
||||||
|
class="search-form">
|
||||||
<Form-item label="品牌名称">
|
<Form-item label="品牌名称">
|
||||||
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px"/>
|
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px"/>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
@@ -12,7 +13,8 @@
|
|||||||
</Row>
|
</Row>
|
||||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
|
||||||
<Row type="flex" justify="end" class="mt_10">
|
<Row type="flex" justify="end" class="mt_10">
|
||||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
||||||
|
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||||
show-total show-elevator show-sizer></Page>
|
show-total show-elevator show-sizer></Page>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -43,6 +45,8 @@ import {
|
|||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||||
|
|
||||||
|
import {regular} from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "brand",
|
name: "brand",
|
||||||
components: {
|
components: {
|
||||||
@@ -68,7 +72,16 @@ export default {
|
|||||||
deleteFlag: "",
|
deleteFlag: "",
|
||||||
},
|
},
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {},
|
formValidate: {
|
||||||
|
name: [
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR20
|
||||||
|
],
|
||||||
|
logo: [
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.URL200
|
||||||
|
],
|
||||||
|
},
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -85,7 +98,7 @@ export default {
|
|||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
return h("img", {
|
return h("img", {
|
||||||
attrs: {
|
attrs: {
|
||||||
src: params.row.logo,
|
src: params.row.logo || '',
|
||||||
alt: "加载图片失败",
|
alt: "加载图片失败",
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
|
|||||||
@@ -171,9 +171,17 @@ export default {
|
|||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
commissionRate: [
|
commissionRate: [
|
||||||
{ required: true, message: "请填写佣金比例" },
|
regular.REQUIRED,
|
||||||
{ pattern: regular.Integer, message: "佣金比例不能为负" },
|
regular.INTEGER
|
||||||
],
|
],
|
||||||
|
name:[
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR20,
|
||||||
|
],
|
||||||
|
sortOrder:[
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.INTEGER
|
||||||
|
]
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%">
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
<Button @click="handleAddParamsGroup" type="primary">添加</Button>
|
<Button @click="handleAddParamsGroup" type="primary">添加</Button>
|
||||||
|
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<Card v-if="paramsGroup.length==0">
|
<Card v-if="paramsGroup.length == 0"> 暂无参数绑定信息 </Card>
|
||||||
暂无参数绑定信息
|
|
||||||
</Card>
|
|
||||||
<div class="paramsGroup" v-else>
|
<div class="paramsGroup" v-else>
|
||||||
|
<Card
|
||||||
<Card style="width: 350px; margin:7px;" v-for="group in paramsGroup" :key="group.groupId" :bordered="false">
|
style="width: 350px; margin: 7px"
|
||||||
|
v-for="(group, index) in paramsGroup"
|
||||||
|
:key="index"
|
||||||
|
:bordered="false"
|
||||||
|
>
|
||||||
<p slot="title">
|
<p slot="title">
|
||||||
<Icon type="ios-film-outline"></Icon> {{ group.groupName }}
|
<Icon type="ios-film-outline"></Icon> {{ group.groupName }}
|
||||||
</p>
|
</p>
|
||||||
@@ -23,34 +23,60 @@
|
|||||||
<Icon type="ios-arrow-down"></Icon>
|
<Icon type="ios-arrow-down"></Icon>
|
||||||
</a>
|
</a>
|
||||||
<Dropdown-menu slot="list">
|
<Dropdown-menu slot="list">
|
||||||
<Dropdown-item @click.native="handleEditParamsGroup(group)">编辑</Dropdown-item>
|
<Dropdown-item @click.native="handleEditParamsGroup(group)"
|
||||||
<Dropdown-item @click.native="handleDeleteParamGroup(group)">删除</Dropdown-item>
|
>编辑</Dropdown-item
|
||||||
|
>
|
||||||
|
<Dropdown-item @click.native="handleDeleteParamGroup(group)"
|
||||||
|
>删除</Dropdown-item
|
||||||
|
>
|
||||||
</Dropdown-menu>
|
</Dropdown-menu>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<Icon type="arrow-down-b"></Icon>
|
<Icon type="arrow-down-b"></Icon>
|
||||||
</p>
|
</p>
|
||||||
<template v-if="group.params && group.params.length > 0">
|
<template v-if="group.params && group.params.length > 0">
|
||||||
<div v-for="param in group.params" :key="param.param_id" class="params">
|
<div
|
||||||
|
v-for="(param, paramId) in group.params"
|
||||||
|
:key="paramId"
|
||||||
|
class="params"
|
||||||
|
>
|
||||||
<span>{{ param.paramName }}</span>
|
<span>{{ param.paramName }}</span>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<i-button type="text" @click="handleEditParams(group, param)">编辑</i-button>
|
<i-button type="text" @click="handleEditParams(group, param)"
|
||||||
<i-button type="text" size="small" style="color: #f56c6c" @click="handleDeleteParam(group, param)">删除</i-button>
|
>编辑</i-button
|
||||||
|
>
|
||||||
|
<i-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
style="color: #f56c6c"
|
||||||
|
@click="handleDeleteParam(group, param)"
|
||||||
|
>删除</i-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div v-else style="align-content: center">暂无数据...</div>
|
<div v-else style="align-content: center">暂无数据...</div>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<i-button type="text" @click="handleAddParams(group)">添加</i-button>
|
<i-button type="text" @click="handleAddParams(group)"
|
||||||
|
>添加</i-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Modal :title="modalTitle" v-model="dialogParamsVisible" :mask-closable="false" :width="500">
|
<Modal
|
||||||
<Form ref="paramForm" :model="paramForm" :label-width="100" :rules="formValidate">
|
:title="modalTitle"
|
||||||
|
v-model="dialogParamsVisible"
|
||||||
|
:mask-closable="false"
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
|
<Form
|
||||||
|
ref="paramForm"
|
||||||
|
:model="paramForm"
|
||||||
|
:label-width="100"
|
||||||
|
:rules="formValidate"
|
||||||
|
>
|
||||||
<FormItem label="参数名称" prop="paramName">
|
<FormItem label="参数名称" prop="paramName">
|
||||||
<Input v-model="paramForm.paramName" style="width: 100%" />
|
<Input v-model="paramForm.paramName" style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -66,9 +92,9 @@
|
|||||||
style="width: 100%; text-align: left; margin-right: 10px"
|
style="width: 100%; text-align: left; margin-right: 10px"
|
||||||
>
|
>
|
||||||
<Option
|
<Option
|
||||||
v-for="item in ops"
|
v-for="(item, itemIndex) in ops.options"
|
||||||
:value="item"
|
:value="item"
|
||||||
:key="item"
|
:key="itemIndex"
|
||||||
:label="item"
|
:label="item"
|
||||||
>
|
>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
@@ -76,32 +102,61 @@
|
|||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="选项" prop="specName3">
|
<FormItem label="选项" prop="specName3">
|
||||||
<Checkbox label=1 v-model="paramForm.required">必填</Checkbox>
|
<Checkbox label="1" v-model="paramForm.required">必填</Checkbox>
|
||||||
<Checkbox label=1 v-model="paramForm.isIndex">可索引</Checkbox>
|
<Checkbox label="1" v-model="paramForm.isIndex">可索引</Checkbox>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="排序" prop="specName3">
|
<FormItem label="排序" prop="sort">
|
||||||
<Input type="number" v-model="paramForm.sort" style="width: 100%" />
|
<InputNumber
|
||||||
|
:min="0"
|
||||||
|
type="number"
|
||||||
|
v-model="paramForm.sort"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="dialogParamsVisible = false">取消</Button>
|
<Button type="text" @click="dialogParamsVisible = false">取消</Button>
|
||||||
<Button type="primary" :loading="submitLoading" @click="submitParamForm">提交</Button>
|
<Button
|
||||||
|
type="primary"
|
||||||
|
:loading="submitLoading"
|
||||||
|
@click="submitParamForm"
|
||||||
|
>提交</Button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Modal :title="modalTitle" v-model="dialogParamsGroupVisible" :mask-closable="false" :width="500">
|
<Modal
|
||||||
<Form ref="paramGroupForm" :model="paramGroupForm" :label-width="100" :rules="paramGroupValidate">
|
:title="modalTitle"
|
||||||
|
v-model="dialogParamsGroupVisible"
|
||||||
|
:mask-closable="false"
|
||||||
|
:width="500"
|
||||||
|
>
|
||||||
|
<Form
|
||||||
|
@submit.native.prevent
|
||||||
|
@keydown.enter.native="submitParamGroupForm"
|
||||||
|
ref="paramGroupForm"
|
||||||
|
:model="paramGroupForm"
|
||||||
|
:label-width="100"
|
||||||
|
:rules="paramGroupValidate"
|
||||||
|
>
|
||||||
<FormItem label="参数名称" prop="groupName">
|
<FormItem label="参数名称" prop="groupName">
|
||||||
<Input v-model="paramGroupForm.groupName" style="width: 100%" />
|
<Input v-model="paramGroupForm.groupName" style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="text" @click="dialogParamsGroupVisible = false">取消</Button>
|
<Button type="text" @click="dialogParamsGroupVisible = false"
|
||||||
<Button type="primary" :loading="submitLoading" @click="submitParamGroupForm">提交</Button>
|
>取消</Button
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
:loading="submitLoading"
|
||||||
|
@click="submitParamGroupForm"
|
||||||
|
>提交</Button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,10 +172,14 @@ import {
|
|||||||
updateParamsGroup,
|
updateParamsGroup,
|
||||||
deleteParamsGroup,
|
deleteParamsGroup,
|
||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
|
|
||||||
|
import { regular } from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "categoryParams",
|
name: "categoryParams",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
submitLoading: false,
|
||||||
/** 分类ID */
|
/** 分类ID */
|
||||||
categoryId: this.$route.query.id,
|
categoryId: this.$route.query.id,
|
||||||
/** 参数组 */
|
/** 参数组 */
|
||||||
@@ -134,24 +193,24 @@ export default {
|
|||||||
/** 参数组添加或编辑弹出框 */
|
/** 参数组添加或编辑弹出框 */
|
||||||
dialogParamsGroupVisible: false,
|
dialogParamsGroupVisible: false,
|
||||||
//参数表单
|
//参数表单
|
||||||
paramForm: {},
|
paramForm: {
|
||||||
|
sort: 1,
|
||||||
|
},
|
||||||
/** 参数值 **/
|
/** 参数值 **/
|
||||||
ops: {
|
ops: {
|
||||||
options: []
|
options: [],
|
||||||
},
|
},
|
||||||
// 参数表单
|
// 参数表单
|
||||||
paramGroupForm: {},
|
paramGroupForm: {},
|
||||||
/** 添加、编辑参数 规格 */
|
/** 添加、编辑参数 规格 */
|
||||||
formValidate: {
|
formValidate: {
|
||||||
paramName: [
|
paramName: [regular.REQUIRED, regular.VARCHAR5],
|
||||||
{ required: true, message: "参数名称不能为空", trigger: "blur" },
|
options: [regular.REQUIRED, regular.VARCHAR255],
|
||||||
],
|
sort: [regular.REQUIRED, regular.INTEGER],
|
||||||
},
|
},
|
||||||
/** 参数组*/
|
/** 参数组*/
|
||||||
paramGroupValidate: {
|
paramGroupValidate: {
|
||||||
groupName: [
|
groupName: [regular.REQUIRED, regular.VARCHAR5],
|
||||||
{ required: true, message: "参数组名称不能为空", trigger: "blur" },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -160,6 +219,7 @@ export default {
|
|||||||
return val === 1 ? "输入项" : "选择项";
|
return val === 1 ? "输入项" : "选择项";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
init() {
|
init() {
|
||||||
@@ -183,17 +243,18 @@ export default {
|
|||||||
},
|
},
|
||||||
//弹出修改参数框
|
//弹出修改参数框
|
||||||
handleEditParams(group, param) {
|
handleEditParams(group, param) {
|
||||||
|
console.log(group, param);
|
||||||
this.paramForm = {
|
this.paramForm = {
|
||||||
paramName: param.paramName,
|
paramName: param.paramName,
|
||||||
options: param.options.split(","),
|
options: param.options.split(","),
|
||||||
required: param.required == 1 ? true : false,
|
required: param.required == 1 ? true : false,
|
||||||
isIndex: param.isIndex == 1 ? true : false,
|
isIndex: param.isIndex == 1 ? true : false,
|
||||||
groupId: group.groupId,
|
groupId: param.groupId || "",
|
||||||
categoryId: this.categoryId,
|
categoryId: param.categoryId || "",
|
||||||
sort: param.sort,
|
sort: param.sort || 1,
|
||||||
id: param.id,
|
id: param.id,
|
||||||
};
|
};
|
||||||
this.ops = this.paramForm.options
|
this.ops.options = this.paramForm.options;
|
||||||
this.modalType = 1;
|
this.modalType = 1;
|
||||||
this.modalTitle = "修改参数";
|
this.modalTitle = "修改参数";
|
||||||
this.dialogParamsVisible = true;
|
this.dialogParamsVisible = true;
|
||||||
@@ -211,12 +272,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 添加参数
|
// 添加参数
|
||||||
handleAddParamsGroup() {
|
handleAddParamsGroup() {
|
||||||
this.paramGroupForm = {
|
this.paramGroupForm = {};
|
||||||
|
this.ops = {};
|
||||||
};
|
|
||||||
this.ops = {
|
|
||||||
|
|
||||||
};
|
|
||||||
(this.paramGroupForm.categoryId = this.categoryId), (this.modalType = 0);
|
(this.paramGroupForm.categoryId = this.categoryId), (this.modalType = 0);
|
||||||
|
|
||||||
this.modalTitle = "添加参数组";
|
this.modalTitle = "添加参数组";
|
||||||
@@ -236,7 +293,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.warn(this.paramGroupForm)
|
console.warn(this.paramGroupForm);
|
||||||
updateParamsGroup(this.paramGroupForm).then((res) => {
|
updateParamsGroup(this.paramGroupForm).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -255,10 +312,11 @@ export default {
|
|||||||
this.$refs.paramForm.validate((valid) => {
|
this.$refs.paramForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.submitLoading = true;
|
this.submitLoading = true;
|
||||||
|
let data = JSON.parse(JSON.stringify(this.paramForm));
|
||||||
|
data.isIndex = Number(data.isIndex);
|
||||||
|
data.required = Number(data.required);
|
||||||
if (this.modalType === 0) {
|
if (this.modalType === 0) {
|
||||||
this.paramForm.isIndex = Number(this.paramForm.isIndex);
|
insertGoodsParams(data).then((res) => {
|
||||||
this.paramForm.required = Number(this.paramForm.required);
|
|
||||||
insertGoodsParams(this.paramForm).then((res) => {
|
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("参数添加成功");
|
this.$Message.success("参数添加成功");
|
||||||
@@ -267,10 +325,10 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.warn(this.paramForm.isIndex)
|
console.warn(data.isIndex);
|
||||||
this.paramForm.isIndex = Number(this.paramForm.isIndex);
|
data.isIndex = Number(data.isIndex);
|
||||||
this.paramForm.required = Number(this.paramForm.required);
|
data.required = Number(data.required);
|
||||||
updateGoodsParams(this.paramForm).then((res) => {
|
updateGoodsParams(data).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("参数修改成功");
|
this.$Message.success("参数修改成功");
|
||||||
@@ -339,6 +397,7 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.params {
|
.params {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -347,6 +406,7 @@ export default {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ivu-card-head {
|
.ivu-card-head {
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
}
|
}
|
||||||
@@ -354,6 +414,7 @@ export default {
|
|||||||
.ivu-btn {
|
.ivu-btn {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.paramsGroup {
|
.paramsGroup {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -56,7 +56,8 @@
|
|||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:width="500"
|
:width="500"
|
||||||
>
|
>
|
||||||
<Form ref="form" :model="form" :label-width="100">
|
<Form ref="form" :model="form" :label-width="100"
|
||||||
|
:rules="formValidate">
|
||||||
<FormItem label="规格名称" prop="specName">
|
<FormItem label="规格名称" prop="specName">
|
||||||
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
|
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -92,6 +93,7 @@ import {
|
|||||||
delSpec
|
delSpec
|
||||||
} from "@/api/goods";
|
} from "@/api/goods";
|
||||||
|
|
||||||
|
import {regular} from "@/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "spec",
|
name: "spec",
|
||||||
components: {},
|
components: {},
|
||||||
@@ -108,6 +110,17 @@ export default {
|
|||||||
sort: "createTime", // 默认排序字段
|
sort: "createTime", // 默认排序字段
|
||||||
order: "asc", // 默认排序方式
|
order: "asc", // 默认排序方式
|
||||||
},
|
},
|
||||||
|
// 表单验证规则
|
||||||
|
formValidate: {
|
||||||
|
specName: [
|
||||||
|
regular.REQUIRED,
|
||||||
|
// regular.VARCHAR20
|
||||||
|
],
|
||||||
|
specValue: [
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR255
|
||||||
|
],
|
||||||
|
},
|
||||||
form: {
|
form: {
|
||||||
// 添加或编辑表单对象初始化数据
|
// 添加或编辑表单对象初始化数据
|
||||||
specName: "",
|
specName: "",
|
||||||
@@ -280,6 +293,7 @@ export default {
|
|||||||
this.modalType = 0;
|
this.modalType = 0;
|
||||||
this.modalTitle = "添加";
|
this.modalTitle = "添加";
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
|
this.specValue = '';
|
||||||
delete this.form.id;
|
delete this.form.id;
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ h4 {
|
|||||||
color: #ffaa71;
|
color: #ffaa71;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.count-list {
|
|
||||||
}
|
|
||||||
|
|
||||||
.flow-list {
|
.flow-list {
|
||||||
height: 330px;
|
height: 330px;
|
||||||
|
|||||||
@@ -197,6 +197,7 @@
|
|||||||
<Table stripe :columns="tophotShopsColumns" :data="topHotShopsData"></Table>
|
<Table stripe :columns="tophotShopsColumns" :data="topHotShopsData"></Table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -205,11 +206,22 @@ import { homeStatistics, hotGoods, hotShops, getNoticePage } from "@/api/index";
|
|||||||
import * as API_Goods from "@/api/goods";
|
import * as API_Goods from "@/api/goods";
|
||||||
import { Chart } from "@antv/g2";
|
import { Chart } from "@antv/g2";
|
||||||
import * as API_Member from "@/api/member";
|
import * as API_Member from "@/api/member";
|
||||||
|
// import i18nBox from '@/views/lili-components/i18n-translate'
|
||||||
export default {
|
export default {
|
||||||
name: "home",
|
name: "home",
|
||||||
|
// components:{
|
||||||
|
// i18nBox
|
||||||
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tophotShopsColumns: [ // 表格表头
|
// 测试数据
|
||||||
|
test: {
|
||||||
|
a: "test",
|
||||||
|
languages:[]
|
||||||
|
},
|
||||||
|
// 测试数据结束
|
||||||
|
tophotShopsColumns: [
|
||||||
|
// 表格表头
|
||||||
{
|
{
|
||||||
type: "index",
|
type: "index",
|
||||||
width: 100,
|
width: 100,
|
||||||
@@ -275,7 +287,8 @@ export default {
|
|||||||
pvChart: "", // 流量统计
|
pvChart: "", // 流量统计
|
||||||
orderChart: "", // 订单统计
|
orderChart: "", // 订单统计
|
||||||
historyMemberChart: "", // 最近会员流量统计
|
historyMemberChart: "", // 最近会员流量统计
|
||||||
params: { // 请求参数
|
params: {
|
||||||
|
// 请求参数
|
||||||
searchType: "LAST_SEVEN",
|
searchType: "LAST_SEVEN",
|
||||||
},
|
},
|
||||||
// 订单传参
|
// 订单传参
|
||||||
@@ -480,10 +493,8 @@ export default {
|
|||||||
let data = this.chartList;
|
let data = this.chartList;
|
||||||
|
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
|
|
||||||
item.title = "历史在线人数";
|
item.title = "历史在线人数";
|
||||||
item.date = item.date.substring(5)
|
item.date = item.date.substring(5);
|
||||||
|
|
||||||
});
|
});
|
||||||
this.historyMemberChart.data(data);
|
this.historyMemberChart.data(data);
|
||||||
|
|
||||||
@@ -495,16 +506,14 @@ export default {
|
|||||||
this.historyMemberChart
|
this.historyMemberChart
|
||||||
.line()
|
.line()
|
||||||
.position("date*num")
|
.position("date*num")
|
||||||
.color("title",['#ffaa71'])
|
.color("title", ["#ffaa71"])
|
||||||
.shape("smooth")
|
.shape("smooth");
|
||||||
;
|
|
||||||
|
|
||||||
this.historyMemberChart
|
this.historyMemberChart
|
||||||
.point()
|
.point()
|
||||||
.position("date*num")
|
.position("date*num")
|
||||||
.color("title",['#ffaa71'])
|
.color("title", ["#ffaa71"])
|
||||||
.shape("circle")
|
.shape("circle");
|
||||||
;
|
|
||||||
this.historyMemberChart.render();
|
this.historyMemberChart.render();
|
||||||
},
|
},
|
||||||
// 初始化信息
|
// 初始化信息
|
||||||
|
|||||||
55
manager/src/views/lili-components/i18n-translate.vue
Normal file
55
manager/src/views/lili-components/i18n-translate.vue
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Button @click="enable = true">语言设定</Button>
|
||||||
|
<Modal v-model="enable" draggable sticky scrollable :mask="false" :title="title">
|
||||||
|
|
||||||
|
<Tabs closable type="card" @on-tab-remove="handleTabRemove" :value="language[0].title">
|
||||||
|
<TabPane v-for="(item,index) in language" :key="index" :label="item.title" :name="item.title">
|
||||||
|
<Input v-model="item.___i18n" />
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {language} from "./languages";
|
||||||
|
export default {
|
||||||
|
/**
|
||||||
|
* tabs 循环的语言内容格式 [{'title':'test','value':'val'}]
|
||||||
|
*/
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: null,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
language: {
|
||||||
|
handler(val) {
|
||||||
|
this.$emit("language", { language: [...val], val: this.value });
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
language,
|
||||||
|
tabVal: "",
|
||||||
|
enable: false, //是否开启modal
|
||||||
|
title: "转换语言",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 删除tab标签将没有用的语音进行删除
|
||||||
|
handleTabRemove(tab) {
|
||||||
|
this.language = this.language.filter((item) => {
|
||||||
|
return item.value != tab;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
1
manager/src/views/lili-components/languages.js
Normal file
1
manager/src/views/lili-components/languages.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const language = [{ title: "中文",value:1 }, { title: "英文" ,value:2}];
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="wap-content-desc-title">{{ item.storeName }}</div>
|
<div class="wap-content-desc-title">{{ item.storeName }}</div>
|
||||||
|
|
||||||
<div class="self-operated" :class="{'theme_color':item.selfOperated }">{{ item.selfOperated ? '自营' : '非自营' }}</div>
|
<div class="self-operated" :class="{'theme_color':item.selfOperated }">{{ item.selfOperated ? '自营' : '非自营' }}</div>
|
||||||
<div class="wap-sku" :class="{'theme_color':!item.storeDisable }">{{ item.storeDisable ? '开启中' : '关闭' }}</div>
|
<div class="wap-sku" :class="{'theme_color':(item.storeDisable === 'OPEN' ? true : false) }">{{ item.storeDisable === 'OPEN' ? '开启中' : '未开启' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Spin size="large" fix v-if="loading"></Spin>
|
<Spin size="large" fix v-if="loading"></Spin>
|
||||||
@@ -41,6 +41,7 @@ export default {
|
|||||||
params: { // 请求参数
|
params: { // 请求参数
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
storeDisable: "OPEN",
|
||||||
storeName: "",
|
storeName: "",
|
||||||
},
|
},
|
||||||
shopsData: [], // 店铺数据
|
shopsData: [], // 店铺数据
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ export const modelData = [{
|
|||||||
icon: 'md-image',
|
icon: 'md-image',
|
||||||
options: {
|
options: {
|
||||||
list: [{
|
list: [{
|
||||||
name: 'LILI生鲜',
|
name: '生鲜',
|
||||||
describe: "年货带回家 满199减60",
|
describe: "年货带回家 满199减60",
|
||||||
img: require('@/assets/nav/decorate8.png'),
|
img: require('@/assets/nav/decorate8.png'),
|
||||||
url: '',
|
url: '',
|
||||||
@@ -624,8 +624,8 @@ export const modelData = [{
|
|||||||
size: '170*170'
|
size: '170*170'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'LILI众筹',
|
name: '众筹',
|
||||||
describe: "备孕有孕检测仪",
|
describe: "年货带回家",
|
||||||
img: require('@/assets/nav/decorate9.png'),
|
img: require('@/assets/nav/decorate9.png'),
|
||||||
url: '',
|
url: '',
|
||||||
fromColor: "#325bb4",
|
fromColor: "#325bb4",
|
||||||
@@ -633,7 +633,7 @@ export const modelData = [{
|
|||||||
size: '170*170'
|
size: '170*170'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'LILI生鲜',
|
name: '生鲜',
|
||||||
describe: "年货带回家 满199减60",
|
describe: "年货带回家 满199减60",
|
||||||
img: require('@/assets/nav/decorate8.png'),
|
img: require('@/assets/nav/decorate8.png'),
|
||||||
url: '',
|
url: '',
|
||||||
@@ -642,7 +642,7 @@ export const modelData = [{
|
|||||||
size: '170*170'
|
size: '170*170'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'LILI众筹',
|
name: '众筹',
|
||||||
describe: "备孕有孕检测仪",
|
describe: "备孕有孕检测仪",
|
||||||
img: require('@/assets/nav/decorate9.png'),
|
img: require('@/assets/nav/decorate9.png'),
|
||||||
url: '',
|
url: '',
|
||||||
@@ -651,7 +651,7 @@ export const modelData = [{
|
|||||||
size: '170*170'
|
size: '170*170'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'LILI生鲜',
|
name: '生鲜',
|
||||||
describe: "年货带回家 满199减60",
|
describe: "年货带回家 满199减60",
|
||||||
img: require('@/assets/nav/decorate8.png'),
|
img: require('@/assets/nav/decorate8.png'),
|
||||||
url: '',
|
url: '',
|
||||||
@@ -660,7 +660,7 @@ export const modelData = [{
|
|||||||
size: '170*170'
|
size: '170*170'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'LILI众筹',
|
name: '众筹',
|
||||||
describe: "备孕有孕检测仪",
|
describe: "备孕有孕检测仪",
|
||||||
img: require('@/assets/nav/decorate9.png'),
|
img: require('@/assets/nav/decorate9.png'),
|
||||||
url: '',
|
url: '',
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="person-msg">
|
<div class="person-msg">
|
||||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
<div>Hi,{{ userInfo.nickName || "欢迎来到管理后台" | secrecyMobile }}</div>
|
||||||
<div v-if="userInfo.id">
|
<div v-if="userInfo.id">
|
||||||
<Button type="error" shape="circle">会员中心</Button>
|
<Button type="error" shape="circle">会员中心</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -263,7 +263,7 @@ export default {
|
|||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
@include content_color($theme_color);
|
color: $theme_color;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
span:nth-child(2) {
|
span:nth-child(2) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<div class="person-msg">
|
<div class="person-msg">
|
||||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
<div>Hi,{{ userInfo.nickName || "欢迎来到管理后台" | secrecyMobile }}</div>
|
||||||
<div v-if="userInfo.id">
|
<div v-if="userInfo.id">
|
||||||
<Button type="error" shape="circle">会员中心</Button>
|
<Button type="error" shape="circle">会员中心</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -343,7 +343,7 @@ export default {
|
|||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
@include content_color($theme_color);
|
color: $theme_color;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
span:nth-child(2) {
|
span:nth-child(2) {
|
||||||
|
|||||||
@@ -141,15 +141,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.ivu-tabs-nav-container {
|
|
||||||
line-height: 2;
|
|
||||||
font-size: 17px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
.verify-con {
|
.verify-con {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 150px;
|
top: 150px;
|
||||||
@@ -159,37 +151,27 @@ export default {
|
|||||||
.form {
|
.form {
|
||||||
padding-top: 1vh;
|
padding-top: 1vh;
|
||||||
|
|
||||||
.input-verify {
|
|
||||||
width: 67%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.forget-pass,
|
.login-btn {
|
||||||
.other-way {
|
background: linear-gradient(135deg, $theme_color 0%, $warning_color 100%);
|
||||||
font-size: 14px;
|
height: 40px;
|
||||||
}
|
|
||||||
|
|
||||||
.login-btn,
|
|
||||||
.other-login {
|
|
||||||
margin-top: 3vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icons {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.other-icon {
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 10px;
|
border-radius: 4px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: rgba(0, 0, 0, 0.2);
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
transition: 0.35s;
|
||||||
|
}
|
||||||
|
.login-btn:hover {
|
||||||
|
opacity: .9;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
:hover {
|
|
||||||
color: #2d8cf0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.flex {
|
.flex {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -1,28 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<Row type="flex" justify="space-around" class="help">
|
<Row type="flex" justify="space-around" class="help">
|
||||||
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('help') }}</a>
|
<a class="item" :href="config.website" target="_blank">帮助</a>
|
||||||
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('privacy') }}</a>
|
<a class="item" :href="config.website" target="_blank">隐私</a>
|
||||||
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a>
|
<a class="item" :href="config.website" target="_blank">条款</a>
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a
|
<a :href="config.website" class="href" target="_blank" style="margin:0 5px;">{{config.title}}</a>
|
||||||
href="https://pickmall.cn/"
|
|
||||||
target="_blank"
|
|
||||||
style="margin:0 5px;"
|
|
||||||
>lili-shop</a> {{ $t('rights') }}
|
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config/index'
|
||||||
export default {
|
export default {
|
||||||
|
name: "footer",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
year: new Date().getFullYear()
|
config,
|
||||||
}
|
year: new Date().getFullYear(), // 年
|
||||||
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -46,4 +44,5 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<DropdownItem v-if="res.complain" @click.native="navigateTo('orderComplaint')">
|
<DropdownItem v-if="res.complain" @click.native="navigateTo('orderComplaint')">
|
||||||
<Badge :count="res.complain">待处理投诉审核 </Badge>
|
<Badge :count="res.complain">待处理投诉审核 </Badge>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem v-if="res.distributionCash" @click.native="navigateTo('distribution')">
|
<DropdownItem v-if="res.distributionCash" @click.native="navigateTo('distributionCash')">
|
||||||
<Badge :count="res.distributionCash">待处理分销商提现申请 </Badge>
|
<Badge :count="res.distributionCash">待处理分销商提现申请 </Badge>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem v-if="res.goods" @click.native="navigateTo('applyGoods')">
|
<DropdownItem v-if="res.goods" @click.native="navigateTo('applyGoods')">
|
||||||
|
|||||||
@@ -248,6 +248,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ivu-tag-primary, .ivu-tag-primary.ivu-tag-dot .ivu-tag-dot-inner{
|
.ivu-tag-primary, .ivu-tag-primary.ivu-tag-dot .ivu-tag-dot-inner{
|
||||||
background: red;
|
background: $theme_color;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -31,9 +31,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||||
import { getRegion } from "@/api/common.js";
|
import { getRegion } from "@/api/common.js";
|
||||||
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
showMap: false, // modal显隐
|
showMap: false, // modal显隐
|
||||||
mapSearch: "", // 地图搜索
|
mapSearch: "", // 地图搜索
|
||||||
map: null, // 初始化地图
|
map: null, // 初始化地图
|
||||||
@@ -71,7 +73,7 @@ export default {
|
|||||||
// 初始化地图组件
|
// 初始化地图组件
|
||||||
init() {
|
init() {
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: "b440952723253aa9fe483e698057bf7d", // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: this.config.aMapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
version: "", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
version: "", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||||
plugins: [
|
plugins: [
|
||||||
"AMap.ToolBar",
|
"AMap.ToolBar",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
>删除
|
>删除
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
v-show="scope.row.level != 2"
|
v-show="scope.row.level != 1"
|
||||||
type="success"
|
type="success"
|
||||||
@click="addChildren(scope.row)"
|
@click="addChildren(scope.row)"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -65,14 +65,14 @@
|
|||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<FormItem label="分类名称" prop="name">
|
<FormItem label="分类名称" prop="articleCategoryName">
|
||||||
<Input
|
<Input
|
||||||
v-model="formAdd.articleCategoryName"
|
v-model="formAdd.articleCategoryName"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="排序值" prop="sort" style="width: 345px">
|
<FormItem label="排序值" prop="sort">
|
||||||
<InputNumber v-model="formAdd.sort"></InputNumber>
|
<InputNumber v-model="formAdd.sort"></InputNumber>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
@@ -94,7 +94,7 @@ import {
|
|||||||
} from "@/api/pages";
|
} from "@/api/pages";
|
||||||
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
||||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||||
|
import { regular } from "@/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "lili-components",
|
name: "lili-components",
|
||||||
components: {
|
components: {
|
||||||
@@ -114,12 +114,21 @@ export default {
|
|||||||
formAdd: {
|
formAdd: {
|
||||||
// 添加或编辑表单对象初始化数据
|
// 添加或编辑表单对象初始化数据
|
||||||
parentId: "",
|
parentId: "",
|
||||||
name: "",
|
|
||||||
sort: 1,
|
sort: 1,
|
||||||
level: 0,
|
level: 0,
|
||||||
|
articleCategoryName:""
|
||||||
},
|
},
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {},
|
formValidate: {
|
||||||
|
articleCategoryName:[
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR20,
|
||||||
|
],
|
||||||
|
sort:[
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.INTEGER
|
||||||
|
]
|
||||||
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: "分类名称",
|
title: "分类名称",
|
||||||
|
|||||||
@@ -48,12 +48,13 @@
|
|||||||
<Input v-model="form.title" clearable style="width: 40%" />
|
<Input v-model="form.title" clearable style="width: 40%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="文章分类" prop="categoryId">
|
<FormItem label="文章分类" prop="categoryId">
|
||||||
|
|
||||||
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
|
<Select v-model="treeValue" placeholder="请选择" clearable style="width: 180px">
|
||||||
<Option :value="treeValue" style="display: none">{{
|
<Option :value="treeValue" style="display: none">{{
|
||||||
treeValue
|
treeValue
|
||||||
}}
|
}}
|
||||||
</Option>
|
</Option>
|
||||||
<Tree :data="treeData" @on-select-change="handleCheckChange"></Tree>
|
<Tree :data="treeDataDefault" @on-select-change="handleCheckChange"></Tree>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="文章排序" prop="sort">
|
<FormItem label="文章排序" prop="sort">
|
||||||
@@ -108,7 +109,7 @@ export default {
|
|||||||
modalType: 0, // 添加或编辑标识
|
modalType: 0, // 添加或编辑标识
|
||||||
modalVisible: false, // 添加或编辑显示
|
modalVisible: false, // 添加或编辑显示
|
||||||
modalTitle: "", // 添加或编辑标题
|
modalTitle: "", // 添加或编辑标题
|
||||||
|
treeDataDefault: [],
|
||||||
searchForm: {
|
searchForm: {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
@@ -308,6 +309,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.treeData = this.getTree(res.result);
|
this.treeData = this.getTree(res.result);
|
||||||
|
this.treeDataDefault = this.getTree(res.result);
|
||||||
this.treeData.unshift({
|
this.treeData.unshift({
|
||||||
title: "全部",
|
title: "全部",
|
||||||
level: 0,
|
level: 0,
|
||||||
@@ -350,7 +352,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.total = this.data.length;
|
this.total = this.data?.length;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
// 添加文章
|
// 添加文章
|
||||||
@@ -388,6 +390,7 @@ export default {
|
|||||||
this.modalType = 0;
|
this.modalType = 0;
|
||||||
this.modalTitle = "添加文章";
|
this.modalTitle = "添加文章";
|
||||||
this.treeValue = '';
|
this.treeValue = '';
|
||||||
|
|
||||||
this.form = {
|
this.form = {
|
||||||
sort: 1,
|
sort: 1,
|
||||||
content:''
|
content:''
|
||||||
|
|||||||
@@ -20,11 +20,12 @@
|
|||||||
|
|
||||||
</Card>
|
</Card>
|
||||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||||
<Form ref="form" :model="form" :label-width="100" >
|
<Form ref="form" :model="form" :label-width="100"
|
||||||
<FormItem label="热词" prop="name">
|
:rules="formValidate">
|
||||||
|
<FormItem label="热词" prop="keywords">
|
||||||
<Input v-model="form.keywords" clearable style="width: 100%" />
|
<Input v-model="form.keywords" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="分数" prop="name">
|
<FormItem label="分数" prop="point">
|
||||||
<Input v-model="form.point" clearable style="width: 100%" />
|
<Input v-model="form.point" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getHotWords, setHotWords } from "@/api/index";
|
import { getHotWords, setHotWords } from "@/api/index";
|
||||||
|
|
||||||
|
import { regular } from "@/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "hotWords",
|
name: "hotWords",
|
||||||
components: {},
|
components: {},
|
||||||
@@ -53,6 +55,18 @@ export default {
|
|||||||
point: 0,
|
point: 0,
|
||||||
},
|
},
|
||||||
data: [], // 表单数据
|
data: [], // 表单数据
|
||||||
|
|
||||||
|
// 表单验证规则
|
||||||
|
formValidate: {
|
||||||
|
keywords:[
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR20,
|
||||||
|
],
|
||||||
|
point:[
|
||||||
|
regular.REQUIRED,
|
||||||
|
regular.NUMBER
|
||||||
|
]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -94,7 +108,6 @@ export default {
|
|||||||
this.form.keywords = "";
|
this.form.keywords = "";
|
||||||
}
|
}
|
||||||
this.form.point = 1;
|
this.form.point = 1;
|
||||||
this.$refs.form.resetFields();
|
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("优惠券活动已停止");
|
this.$Message.success("优惠券活动已停止");
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
|
this.$Modal.remove()
|
||||||
}
|
}
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 0,
|
pageNumber: 0,
|
||||||
couponName: query,
|
couponName: query,
|
||||||
|
promotionStatus:"START"
|
||||||
};
|
};
|
||||||
this.couponLoading = true;
|
this.couponLoading = true;
|
||||||
getPlatformCouponList(params).then((res) => {
|
getPlatformCouponList(params).then((res) => {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
<FormItem label="选择商品" prop="scopeType">
|
<FormItem label="选择商品" prop="scopeType">
|
||||||
<Button type="primary" @click="openSkuList">选择商品</Button>
|
<Button type="primary" @click="openSkuList">选择商品</Button>
|
||||||
<Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods">批量删除
|
<!-- <Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods">批量删除
|
||||||
</Button>
|
</Button> -->
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem astyle="width: 100%">
|
<FormItem astyle="width: 100%">
|
||||||
@@ -19,22 +19,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ index }" slot="settlementPrice">
|
<template slot-scope="{ index }" slot="settlementPrice">
|
||||||
<Input type="number" v-model="form.promotionGoodsList[index].settlementPrice" />
|
<InputNumber :min="0" v-model="form.promotionGoodsList[index].settlementPrice" />
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ index }" slot="lowestPrice">
|
<template slot-scope="{ index }" slot="lowestPrice">
|
||||||
<Input type="number" v-model="form.promotionGoodsList[index].lowestPrice" />
|
<InputNumber :min="0" v-model="form.promotionGoodsList[index].lowestPrice" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ index }" slot="highestPrice">
|
<template slot-scope="{ index }" slot="highestPrice">
|
||||||
<Input type="number" v-model="form.promotionGoodsList[index].highestPrice" />
|
<InputNumber :min="0" v-model="form.promotionGoodsList[index].highestPrice" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ index }" slot="purchasePrice">
|
|
||||||
<Input type="number" v-model="form.promotionGoodsList[index].purchasePrice" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template slot-scope="{ index }" slot="stock">
|
<template slot-scope="{ index }" slot="stock">
|
||||||
<Input type="number" v-model="form.promotionGoodsList[index].stock" />
|
<InputNumber :min="0" v-model="form.promotionGoodsList[index].stock" />
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -122,12 +118,6 @@ export default {
|
|||||||
slot: "highestPrice",
|
slot: "highestPrice",
|
||||||
width: 110,
|
width: 110,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
title: "最低购买金额",
|
|
||||||
slot: "purchasePrice",
|
|
||||||
width: 110,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "活动库存",
|
title: "活动库存",
|
||||||
slot: "stock",
|
slot: "stock",
|
||||||
@@ -209,11 +199,7 @@ export default {
|
|||||||
this.$Message.error("活动库存不能为0且不能超过商品库存");
|
this.$Message.error("活动库存不能为0且不能超过商品库存");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 最低购买金额格式校验
|
|
||||||
if (!regular.money.test(res.purchasePrice)) {
|
|
||||||
checkResult = false;
|
|
||||||
this.$Message.error("最低购买金额格式不正确");
|
|
||||||
}
|
|
||||||
// 结算价格金额格式校验
|
// 结算价格金额格式校验
|
||||||
if (!regular.money.test(res.settlementPrice)) {
|
if (!regular.money.test(res.settlementPrice)) {
|
||||||
checkResult = false;
|
checkResult = false;
|
||||||
@@ -292,28 +278,28 @@ export default {
|
|||||||
// 已选商品批量选择
|
// 已选商品批量选择
|
||||||
this.selectedGoods = e;
|
this.selectedGoods = e;
|
||||||
},
|
},
|
||||||
delSelectGoods() {
|
// delSelectGoods() {
|
||||||
// 多选删除商品
|
// // 多选删除商品
|
||||||
if (this.selectedGoods.length <= 0) {
|
// if (this.selectedGoods.length <= 0) {
|
||||||
this.$Message.warning("您还未选择要删除的数据");
|
// this.$Message.warning("您还未选择要删除的数据");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
this.$Modal.confirm({
|
// this.$Modal.confirm({
|
||||||
title: "确认删除",
|
// title: "确认删除",
|
||||||
content: "您确认要删除所选商品吗?",
|
// content: "您确认要删除所选商品吗?",
|
||||||
onOk: () => {
|
// onOk: () => {
|
||||||
let ids = [];
|
// let ids = [];
|
||||||
this.selectedGoods.forEach(function (e) {
|
// this.selectedGoods.forEach(function (e) {
|
||||||
ids.push(e.id);
|
// ids.push(e.id);
|
||||||
});
|
// });
|
||||||
this.form.promotionGoodsList = this.form.promotionGoodsList.filter(
|
// this.form.promotionGoodsList = this.form.promotionGoodsList.filter(
|
||||||
(item) => {
|
// (item) => {
|
||||||
return !ids.includes(item.id);
|
// return !ids.includes(item.id);
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
delGoods(index) {
|
delGoods(index) {
|
||||||
// 删除商品
|
// 删除商品
|
||||||
this.form.promotionGoodsList.splice(index, 1);
|
this.form.promotionGoodsList.splice(index, 1);
|
||||||
@@ -324,7 +310,7 @@ export default {
|
|||||||
item.forEach((e) => {
|
item.forEach((e) => {
|
||||||
list.push({
|
list.push({
|
||||||
settlementPrice: e.settlementPrice || 0,
|
settlementPrice: e.settlementPrice || 0,
|
||||||
purchasePrice: e.purchasePrice || 0,
|
purchasePrice: 0,
|
||||||
lowestPrice: e.lowestPrice || 0,
|
lowestPrice: e.lowestPrice || 0,
|
||||||
highestPrice: e.highestPrice || 0,
|
highestPrice: e.highestPrice || 0,
|
||||||
stock: e.stock || 0,
|
stock: e.stock || 0,
|
||||||
|
|||||||
@@ -30,16 +30,7 @@
|
|||||||
style="width: 260px"
|
style="width: 260px"
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="最低购买金额" prop="purchasePrice">
|
|
||||||
<Input
|
|
||||||
:disabled="onlyView"
|
|
||||||
type="number"
|
|
||||||
v-model="form.purchasePrice"
|
|
||||||
placeholder="请填写最低购买金额"
|
|
||||||
clearable
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem label="最低可砍" prop="lowestPrice">
|
<FormItem label="最低可砍" prop="lowestPrice">
|
||||||
<Input
|
<Input
|
||||||
:disabled="onlyView"
|
:disabled="onlyView"
|
||||||
@@ -156,6 +147,7 @@
|
|||||||
return {
|
return {
|
||||||
modalType: 0, // 是否编辑
|
modalType: 0, // 是否编辑
|
||||||
form: {
|
form: {
|
||||||
|
purchasePrice:0,
|
||||||
goodsSku: {},
|
goodsSku: {},
|
||||||
},
|
},
|
||||||
id: this.$route.query.id, // 砍价活动id
|
id: this.$route.query.id, // 砍价活动id
|
||||||
@@ -166,10 +158,7 @@
|
|||||||
{required: true, message: "请输入结算金额"},
|
{required: true, message: "请输入结算金额"},
|
||||||
{validator: checkSettlementPrice},
|
{validator: checkSettlementPrice},
|
||||||
],
|
],
|
||||||
purchasePrice: [
|
|
||||||
{required: true, message: "请输入最低购买金额"},
|
|
||||||
{validator: checkPurchasePrice},
|
|
||||||
],
|
|
||||||
lowestPrice: [
|
lowestPrice: [
|
||||||
{required: true, message: "请输入最低可砍金额"},
|
{required: true, message: "请输入最低可砍金额"},
|
||||||
{validator: checkLowestPrice},
|
{validator: checkLowestPrice},
|
||||||
@@ -227,10 +216,7 @@
|
|||||||
this.$Message.error("活动库存不能为0且不能超过商品库存");
|
this.$Message.error("活动库存不能为0且不能超过商品库存");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 最低购买金额格式校验
|
|
||||||
if (!regular.money.test(params.purchasePrice)) {
|
|
||||||
this.$Message.error("最低购买金额格式不正确");
|
|
||||||
}
|
|
||||||
// 结算价格金额格式校验
|
// 结算价格金额格式校验
|
||||||
if (!regular.money.test(params.settlementPrice)) {
|
if (!regular.money.test(params.settlementPrice)) {
|
||||||
this.$Message.error("结算价格金额格式不正确");
|
this.$Message.error("结算价格金额格式不正确");
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="排序值" prop="sortOrder">
|
<FormItem label="排序值" prop="sortOrder">
|
||||||
<Input v-model="formAdd.sortOrder" clearable style="width: 100%" />
|
<InputNumber v-model="formAdd.sortOrder" :min="0" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
@@ -80,6 +80,7 @@ export default {
|
|||||||
name: "",
|
name: "",
|
||||||
deleteFlag: 0,
|
deleteFlag: 0,
|
||||||
level: 0,
|
level: 0,
|
||||||
|
sortOrder:1
|
||||||
},
|
},
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
format="yyyy-MM-dd HH:mm:ss"
|
format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
clearable
|
clearable
|
||||||
@on-change="applyTimeChange"
|
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
@@ -33,7 +32,6 @@
|
|||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
clearable
|
clearable
|
||||||
@on-change="startTimeChange"
|
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
>
|
>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
@@ -176,6 +174,7 @@ export default {
|
|||||||
delete this.form.createTime;
|
delete this.form.createTime;
|
||||||
delete this.form.updateTime;
|
delete this.form.updateTime;
|
||||||
delete this.form.endTime;
|
delete this.form.endTime;
|
||||||
|
delete this.form.seckillApplyList;
|
||||||
// 编辑
|
// 编辑
|
||||||
updateSeckill(this.form).then((res) => {
|
updateSeckill(this.form).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if (!this.times[i]) {
|
if (!this.times[i]) {
|
||||||
this.times.push({
|
this.times.push({
|
||||||
time: i,
|
time: i,
|
||||||
@@ -103,7 +104,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 选中时间
|
* 选中时间
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<p slot="title">账单详细</p>
|
<p slot="title">账单详细</p>
|
||||||
|
|
||||||
<div class="tips-status">
|
<div class="tips-status">
|
||||||
<span>商品状态</span>
|
<span>账单状态</span>
|
||||||
<span class="theme_color">{{bill.billStatus | unixSellerBillStatus}}</span>
|
<span class="theme_color">{{bill.billStatus | unixSellerBillStatus}}</span>
|
||||||
<Button
|
<Button
|
||||||
v-if="bill.billStatus == 'CHECK'"
|
v-if="bill.billStatus == 'CHECK'"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
</Form>
|
</Form>
|
||||||
<Row class="operation padding-row">
|
<Row class="operation padding-row">
|
||||||
<Button @click="delAll">批量删除</Button>
|
|
||||||
</Row>
|
</Row>
|
||||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
|
||||||
</Table>
|
</Table>
|
||||||
|
|||||||
@@ -21,10 +21,9 @@
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="是否自营" prop="selfOperated">
|
<FormItem label="是否自营" prop="selfOperated">
|
||||||
|
|
||||||
<RadioGroup type="button" button-style="solid" v-model="shopForm.selfOperated" >
|
<RadioGroup type="button" button-style="solid" v-model="shopForm.selfOperated" >
|
||||||
<Radio :label=true>自营</Radio>
|
<Radio :label="1">自营</Radio>
|
||||||
<Radio :label=false>非自营</Radio>
|
<Radio :label="0">非自营</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
@@ -81,7 +80,6 @@
|
|||||||
<FormItem label="小程序唯一标识">
|
<FormItem label="小程序唯一标识">
|
||||||
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<Spin fix v-if="loading"></Spin>
|
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
||||||
@@ -167,7 +165,7 @@
|
|||||||
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
|
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<Spin fix v-if="loading"></Spin>
|
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane label="经营范围" class="tab" name="category">
|
<TabPane label="经营范围" class="tab" name="category">
|
||||||
@@ -361,11 +359,12 @@ export default {
|
|||||||
indeterminate: true, // 复选框全选样式
|
indeterminate: true, // 复选框全选样式
|
||||||
checkAll: false, // 全选
|
checkAll: false, // 全选
|
||||||
checkAllGroup: [], // 全选数组
|
checkAllGroup: [], // 全选数组
|
||||||
|
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
settlementCycle: [], // 结算周期
|
settlementCycle: [], // 结算周期
|
||||||
shopForm: { // 店铺数据
|
shopForm: { // 店铺数据
|
||||||
settlementCycle: "",
|
settlementCycle: "",
|
||||||
selfOperated: false,
|
selfOperated: 0,
|
||||||
memberName: "",
|
memberName: "",
|
||||||
companyName: "",
|
companyName: "",
|
||||||
addressPath: "",
|
addressPath: "",
|
||||||
@@ -517,6 +516,8 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.infoResult = res.result;
|
this.infoResult = res.result;
|
||||||
this.shopForm = res.result;
|
this.shopForm = res.result;
|
||||||
|
this.shopForm.selfOperated ? this.shopForm.selfOperated = 1 : this.shopForm.selfOperated = 0
|
||||||
|
|
||||||
this.checkAllGroup = this.shopForm.goodsManagementCategory.split(",");
|
this.checkAllGroup = this.shopForm.goodsManagementCategory.split(",");
|
||||||
if (this.shopForm.settlementCycle) {
|
if (this.shopForm.settlementCycle) {
|
||||||
this.settlementCycle = this.shopForm.settlementCycle.split(',')
|
this.settlementCycle = this.shopForm.settlementCycle.split(',')
|
||||||
@@ -574,7 +575,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击定位获取店铺地址
|
// 点击定位获取店铺地址
|
||||||
getAddress(item) {
|
getAddress(item) {
|
||||||
this.shopForm.storeCenter = item.position.lat + "," + item.position.lng;
|
this.shopForm.storeCenter = item.position.lng + ',' + item.position.lat;
|
||||||
this.$set(this.shopForm, "storeAddressPath", item.addr);
|
this.$set(this.shopForm, "storeAddressPath", item.addr);
|
||||||
this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
|
this.$set(this.shopForm, "storeAddressIdPath", item.addrId);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -141,6 +141,7 @@
|
|||||||
v-model="messageSendForm.content"
|
v-model="messageSendForm.content"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
maxlength="200"
|
||||||
style="max-height:60vh;overflow:auto;width: 70%"
|
style="max-height:60vh;overflow:auto;width: 70%"
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -288,7 +289,7 @@
|
|||||||
import * as API_Other from "@/api/other.js";
|
import * as API_Other from "@/api/other.js";
|
||||||
import * as API_Shop from "@/api/shops.js";
|
import * as API_Shop from "@/api/shops.js";
|
||||||
import userList from "@/views/member/list/index";
|
import userList from "@/views/member/list/index";
|
||||||
|
import { regular } from "@/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "noticeMessageTemplate",
|
name: "noticeMessageTemplate",
|
||||||
components: {
|
components: {
|
||||||
@@ -316,10 +317,12 @@
|
|||||||
},
|
},
|
||||||
messageFormValidate: {
|
messageFormValidate: {
|
||||||
title: [
|
title: [
|
||||||
{required: true, message: '请输入消息标题', trigger: 'blur'},
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR20
|
||||||
],
|
],
|
||||||
content: [
|
content: [
|
||||||
{required: true, message: '请输入消息内容', trigger: 'blur'},
|
regular.REQUIRED,
|
||||||
|
regular.VARCHAR255
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
//管理端消息汇总
|
//管理端消息汇总
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<Upload
|
<Upload
|
||||||
style="display:inline-block;"
|
style="display:inline-block;"
|
||||||
:action="baseUrl + '/common/upload/file'"
|
:action="commonUrl + '/common/upload/file'"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:on-error="handleError"
|
:on-error="handleError"
|
||||||
@@ -257,6 +257,7 @@ import {
|
|||||||
import DPlayer from "dplayer";
|
import DPlayer from "dplayer";
|
||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
|
|
||||||
|
import { commonUrl } from "@/libs/axios";
|
||||||
var dp;
|
var dp;
|
||||||
export default {
|
export default {
|
||||||
name: "oss-manage",
|
name: "oss-manage",
|
||||||
@@ -268,8 +269,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
commonUrl, // 上传文件路径
|
||||||
config, // api地址
|
config, // api地址
|
||||||
baseUrl: "", // 基础路径
|
|
||||||
selectImage: false, //是否是选择
|
selectImage: false, //是否是选择
|
||||||
accessToken: {}, // 上传token鉴权
|
accessToken: {}, // 上传token鉴权
|
||||||
loading: false, // 表单加载状态
|
loading: false, // 表单加载状态
|
||||||
@@ -342,7 +343,7 @@ export default {
|
|||||||
if (params.row.fileType.includes("image") > 0) {
|
if (params.row.fileType.includes("image") > 0) {
|
||||||
return h("img", {
|
return h("img", {
|
||||||
attrs: {
|
attrs: {
|
||||||
src: params.row.url,
|
src: params.row.url || '',
|
||||||
alt: "加载图片失败",
|
alt: "加载图片失败",
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
@@ -813,10 +814,6 @@ export default {
|
|||||||
if(!this.isComponent) { // 是组件的话,初始化不调用接口
|
if(!this.isComponent) { // 是组件的话,初始化不调用接口
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
this.baseUrl =
|
|
||||||
process.env.NODE_ENV === "development"
|
|
||||||
? this.config.api_dev.common
|
|
||||||
: this.config.api_prod.common;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
87
manager/src/views/sys/setting-manage/setting/IM_SETTING.vue
Normal file
87
manager/src/views/sys/setting-manage/setting/IM_SETTING.vue
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout">
|
||||||
|
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||||
|
<FormItem label="云IM地址" prop="httpUrl">
|
||||||
|
<Input v-model="formValidate.httpUrl"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="平台ID" class="label-item" prop="tenantId">
|
||||||
|
<Input v-model="formValidate.tenantId"/>
|
||||||
|
</FormItem>
|
||||||
|
<div class="label-btns">
|
||||||
|
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {setSetting} from "@/api/index";
|
||||||
|
import {handleSubmit} from "./validate";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
ruleValidate: {}, // 验证规则
|
||||||
|
formValidate: { // 表单数据
|
||||||
|
httpUrl: "",
|
||||||
|
tenantId: ""
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: ["res", "type"],
|
||||||
|
created() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 保存
|
||||||
|
submit(name) {
|
||||||
|
let that = this;
|
||||||
|
if (handleSubmit(that, name)) {
|
||||||
|
this.setupSetting()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 保存设置
|
||||||
|
setupSetting() {
|
||||||
|
setSetting(this.type, this.formValidate).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("保存成功!");
|
||||||
|
} else {
|
||||||
|
this.$Message.error("保存失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 实例化数据
|
||||||
|
init() {
|
||||||
|
this.res = JSON.parse(this.res);
|
||||||
|
|
||||||
|
this.$set(this, "formValidate", {...this.res});
|
||||||
|
Object.keys(this.formValidate).forEach((item) => {
|
||||||
|
this.ruleValidate[item] = [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请填写必填项",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./style.scss";
|
||||||
|
|
||||||
|
.label-item {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .ivu-input {
|
||||||
|
width: 300px !important;
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ivu-input-wrapper {
|
||||||
|
width: 300px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -101,10 +101,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.formValidate.pointSettingItems.push({
|
this.formValidate.pointSettingItems.push({
|
||||||
point: "0",
|
point: "0",
|
||||||
day:
|
day: this.formValidate.pointSettingItems.length ,
|
||||||
this.formValidate.pointSettingItems[
|
|
||||||
this.formValidate.pointSettingItems.length - 1
|
|
||||||
].day + 1,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 实例化数据
|
// 实例化数据
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ export default {
|
|||||||
show: true, // 是否显示
|
show: true, // 是否显示
|
||||||
setting: [
|
setting: [
|
||||||
//基础配置
|
//基础配置
|
||||||
{
|
// {
|
||||||
type: "BASE_SETTING",
|
// type: "BASE_SETTING",
|
||||||
name: "基础配置",
|
// name: "基础配置",
|
||||||
},
|
// },
|
||||||
//商品设置
|
//商品设置
|
||||||
{
|
{
|
||||||
type: "GOODS_SETTING",
|
type: "GOODS_SETTING",
|
||||||
@@ -57,6 +57,11 @@ export default {
|
|||||||
type: "SMS_SETTING",
|
type: "SMS_SETTING",
|
||||||
name: "阿里短信配置",
|
name: "阿里短信配置",
|
||||||
},
|
},
|
||||||
|
//阿里短信配置
|
||||||
|
{
|
||||||
|
type: "IM_SETTING",
|
||||||
|
name: "客服设置",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
authLogin: [
|
authLogin: [
|
||||||
// 微信设置
|
// 微信设置
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import POINT_SETTING from "./setting/POINT_SETTING";
|
|||||||
import KUAIDI_SETTING from "./setting/KUAIDI_SETTING";
|
import KUAIDI_SETTING from "./setting/KUAIDI_SETTING";
|
||||||
import OSS_SETTING from "./setting/OSS_SETTING";
|
import OSS_SETTING from "./setting/OSS_SETTING";
|
||||||
import SMS_SETTING from "./setting/SMS_SETTING";
|
import SMS_SETTING from "./setting/SMS_SETTING";
|
||||||
|
import IM_SETTING from "./setting/IM_SETTING";
|
||||||
import WITHDRAWAL_SETTING from "./setting/WITHDRAWAL_SETTING";
|
import WITHDRAWAL_SETTING from "./setting/WITHDRAWAL_SETTING";
|
||||||
import ALIPAY_PAYMENT from "./pay/ALIPAY_PAYMENT";
|
import ALIPAY_PAYMENT from "./pay/ALIPAY_PAYMENT";
|
||||||
import WECHAT_PAYMENT from "./pay/WECHAT_PAYMENT";
|
import WECHAT_PAYMENT from "./pay/WECHAT_PAYMENT";
|
||||||
@@ -20,6 +21,7 @@ export default {
|
|||||||
KUAIDI_SETTING,
|
KUAIDI_SETTING,
|
||||||
OSS_SETTING,
|
OSS_SETTING,
|
||||||
SMS_SETTING,
|
SMS_SETTING,
|
||||||
|
IM_SETTING,
|
||||||
WITHDRAWAL_SETTING,
|
WITHDRAWAL_SETTING,
|
||||||
PAYMENT_SUPPORT,
|
PAYMENT_SUPPORT,
|
||||||
WECHAT_PAYMENT,
|
WECHAT_PAYMENT,
|
||||||
|
|||||||
@@ -155,6 +155,9 @@ export default {
|
|||||||
username: [
|
username: [
|
||||||
{required: true, message: "用户名不能为空", trigger: "blur"}
|
{required: true, message: "用户名不能为空", trigger: "blur"}
|
||||||
],
|
],
|
||||||
|
password: [
|
||||||
|
{required: true, message: "密码不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
mobile: [
|
mobile: [
|
||||||
{required: true, message: "手机号不能为空", trigger: "blur"},
|
{required: true, message: "手机号不能为空", trigger: "blur"},
|
||||||
{validator: validateMobile, trigger: "blur"}
|
{validator: validateMobile, trigger: "blur"}
|
||||||
@@ -410,6 +413,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 重置密码
|
// 重置密码
|
||||||
resetPass() {
|
resetPass() {
|
||||||
|
if(this.selectCount==0) {this.$Message.warning('请选中数据后重试!'); return}
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "确认重置",
|
title: "确认重置",
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2 .
|
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.2.1 .
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<script src="/config.js"></script>
|
<script src="/config.js"></script>
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong
|
<strong
|
||||||
>We're sorry but lili-admin doesn't work properly without JavaScript
|
>We're sorry doesn't work properly without JavaScript
|
||||||
enabled. Please enable it to continue.</strong
|
enabled. Please enable it to continue.</strong
|
||||||
>
|
>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 统一请求路径前缀在libs/axios.js中修改
|
// 统一请求路径前缀在libs/axios.js中修改
|
||||||
import {getRequest, postRequest, putRequest, deleteRequest, importRequest, getRequestWithNoToken} from '@/libs/axios';
|
import {getRequest} from '@/libs/axios';
|
||||||
|
|
||||||
|
|
||||||
// 传给后台citycode 获取城市街道等id
|
// 传给后台citycode 获取城市街道等id
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ export const getChildRegion = (id) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 点地图获取地址信息
|
// 点地图获取地址信息
|
||||||
export const getRegion = (parpams) => {
|
export const getRegion = (params) => {
|
||||||
return getRequest(`${commonUrl}/common/region/region`, parpams);
|
return getRequest(`${commonUrl}/common/region/region`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ export const getSellerHomeData = params => {
|
|||||||
export const login = params => {
|
export const login = params => {
|
||||||
return postRequestWithNoToken("/login/userLogin", params);
|
return postRequestWithNoToken("/login/userLogin", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 登出
|
||||||
|
export const logout = () => {
|
||||||
|
return postRequest("/login/logout");
|
||||||
|
};
|
||||||
|
|
||||||
// 获取用户登录信息
|
// 获取用户登录信息
|
||||||
export const userInfo = params => {
|
export const userInfo = params => {
|
||||||
return getRequest("/user/info", params);
|
return getRequest("/user/info", params);
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ export default {
|
|||||||
* 用来在菜单中显示文字
|
* 用来在菜单中显示文字
|
||||||
*/
|
*/
|
||||||
useI18n: true,
|
useI18n: true,
|
||||||
|
/**
|
||||||
|
* @description 高德web端申请的api key
|
||||||
|
*/
|
||||||
|
aMapKey: "b440952723253aa9fe483e698057bf7d",
|
||||||
|
/**
|
||||||
|
* @description 官网地址
|
||||||
|
*/
|
||||||
|
website: "https://www.pickmall.cn",
|
||||||
/**
|
/**
|
||||||
* @description 需要加载的插件
|
* @description 需要加载的插件
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
import axios from 'axios';
|
|
||||||
import { getDictData } from '@/api/index';
|
|
||||||
|
|
||||||
let dictUtil = {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取常用的数据字典保存至vuex
|
|
||||||
dictUtil.initDictData = function (vm) {
|
|
||||||
// axios.get(getDictData + "sex").then(res => {
|
|
||||||
// if(res.success){
|
|
||||||
// vm.$store.commit("setSex", res.result);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// axios.get(getDictData + "message_type").then(res => {
|
|
||||||
// if(res.success){
|
|
||||||
// vm.$store.commit("setMessageType", res.result);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// axios.get(getDictData + "priority").then(res => {
|
|
||||||
// if(res.success){
|
|
||||||
// vm.$store.commit("setPriority", res.result);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// axios.get(getDictData + "leave_type").then(res => {
|
|
||||||
// if(res.success){
|
|
||||||
// vm.$store.commit("setLeaveType", res.result);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
export default dictUtil;
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
const hasPermission = {
|
|
||||||
install (Vue, options) {
|
|
||||||
Vue.directive('has', {
|
|
||||||
inserted (el, binding, vnode) {
|
|
||||||
let permTypes = vnode.context.$route.meta.permTypes;
|
|
||||||
if (permTypes&&!permTypes.includes(binding.value)) {
|
|
||||||
el.parentNode.removeChild(el);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default hasPermission;
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import { getStore } from './storage';
|
|
||||||
|
|
||||||
const hasRole = {
|
|
||||||
install (Vue, options) {
|
|
||||||
Vue.directive('hasRole', {
|
|
||||||
inserted (el, binding) {
|
|
||||||
let roles = getStore("roles");
|
|
||||||
if (roles&&!roles.includes(binding.value)) {
|
|
||||||
el.parentNode.removeChild(el);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default hasRole;
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
// 导入表格模版数据
|
|
||||||
export const userColumns = [
|
|
||||||
{
|
|
||||||
title: "username",
|
|
||||||
key: "username"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "password",
|
|
||||||
key: "password"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "avatar",
|
|
||||||
key: "avatar"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "departmentId",
|
|
||||||
key: "departmentId"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "mobile",
|
|
||||||
key: "mobile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "email",
|
|
||||||
key: "email"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "sex",
|
|
||||||
key: "sex"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "address",
|
|
||||||
key: "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "type",
|
|
||||||
key: "type"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "status",
|
|
||||||
key: "status"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "delFlag",
|
|
||||||
key: "delFlag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "defaultRole",
|
|
||||||
key: "defaultRole"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
export const userData = [
|
|
||||||
{
|
|
||||||
username: "【记得删除该说明行】唯一用户名不能为空",
|
|
||||||
password: "密码不能为空",
|
|
||||||
avatar: "头像图片链接",
|
|
||||||
departmentId: "部门表主键id",
|
|
||||||
email: "邮箱",
|
|
||||||
mobile: "手机",
|
|
||||||
sex: "性别 0(女) 1(男)",
|
|
||||||
address: "地址数据省市编号 请勿乱填",
|
|
||||||
type: "用户类型 0(普通用户) 1(管理员)",
|
|
||||||
status: "用户状态 0(正常) -1(禁用)",
|
|
||||||
delFlag: "删除标志 0(正常) 1(已删)",
|
|
||||||
defaultRole: "角色 0(不分配默认角色) 1(分配默认注册用户角色)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
username: "lili",
|
|
||||||
password: "123456",
|
|
||||||
avatar: "https://s1.ax1x.com/2018/05/19/CcdVQP.png",
|
|
||||||
departmentId: "40652338142121984",
|
|
||||||
email: "1012139570@qq.com",
|
|
||||||
sex: 1,
|
|
||||||
address: "[\"510000\",\"510100\",\"510104\"]",
|
|
||||||
mobile: "18782059038",
|
|
||||||
type: 0,
|
|
||||||
status: 0,
|
|
||||||
delFlag: 0,
|
|
||||||
defaultRole: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
var idTmr;
|
|
||||||
function getExplorer () {
|
|
||||||
var explorer = window.navigator.userAgent;
|
|
||||||
if (explorer.indexOf('MSIE') >= 0) {
|
|
||||||
// ie
|
|
||||||
return 'ie';
|
|
||||||
} else if (explorer.indexOf('Firefox') >= 0) {
|
|
||||||
// firefox
|
|
||||||
return 'Firefox';
|
|
||||||
} else if (explorer.indexOf('Chrome') >= 0) {
|
|
||||||
// Chrome
|
|
||||||
return 'Chrome';
|
|
||||||
} else if (explorer.indexOf('Opera') >= 0) {
|
|
||||||
// Opera
|
|
||||||
return 'Opera';
|
|
||||||
} else if (explorer.indexOf('Safari') >= 0) {
|
|
||||||
// Safari
|
|
||||||
return 'Safari';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
function tranform (table, aId, name) {
|
|
||||||
let tableHead = table.$children[0].$el;
|
|
||||||
let tableBody = table.$children[1].$el;
|
|
||||||
let tableInnerHTML = '<thead><tr>';
|
|
||||||
if (table.$children.length !== 1) {
|
|
||||||
let len = tableBody.rows.length;
|
|
||||||
let i = -1;
|
|
||||||
while (i < len) {
|
|
||||||
if (i == -1) {
|
|
||||||
Array.from(tableHead.rows[0].children).forEach((td) => {
|
|
||||||
tableInnerHTML = tableInnerHTML + '<th>' + td.children[0].children[0].innerHTML + '</th>';
|
|
||||||
});
|
|
||||||
tableInnerHTML += '</tr><thead><tbody>';
|
|
||||||
} else {
|
|
||||||
tableInnerHTML += '<tr>';
|
|
||||||
Array.from(tableBody.rows[i].children).forEach((td) => {
|
|
||||||
tableInnerHTML = tableInnerHTML + '<td>' + td.children[0].children[0].innerHTML + '</td>';
|
|
||||||
});
|
|
||||||
tableInnerHTML += '</tr>';
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
tableInnerHTML += '</tbody>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getExplorer() !== 'Safari' && name.substr(-1, 4) !== '.xls') {
|
|
||||||
name += '.xls';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getExplorer() == 'ie') {
|
|
||||||
var curTbl = table;
|
|
||||||
var oXL = new ActiveXObject('Excel.Application');
|
|
||||||
var oWB = oXL.Workbooks.Add();
|
|
||||||
var xlsheet = oWB.Worksheets(1);
|
|
||||||
var sel = document.body.createTextRange();
|
|
||||||
sel.moveToElementText(curTbl);
|
|
||||||
sel.select();
|
|
||||||
sel.execCommand('Copy');
|
|
||||||
xlsheet.Paste();
|
|
||||||
oXL.Visible = true;
|
|
||||||
|
|
||||||
try {
|
|
||||||
var fname = oXL.Application.GetSaveAsFilename('Excel.xls', 'Excel Spreadsheets (*.xls), *.xls');
|
|
||||||
} catch (e) {
|
|
||||||
print('Nested catch caught ' + e);
|
|
||||||
} finally {
|
|
||||||
oWB.SaveAs(fname);
|
|
||||||
// oWB.Close(savechanges = false);
|
|
||||||
oXL.Quit();
|
|
||||||
oXL = null;
|
|
||||||
idTmr = setInterval(Cleanup(), 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tableToExcel(tableInnerHTML, aId, name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function Cleanup () {
|
|
||||||
window.clearInterval(idTmr);
|
|
||||||
// CollectGarbage();
|
|
||||||
}
|
|
||||||
let tableToExcel = (function () {
|
|
||||||
let uri = 'data:application/vnd.ms-excel;base64,';
|
|
||||||
let template = '<html><head><meta charset="UTF-8"></head><body><table>{table}</table></body></html>';
|
|
||||||
let base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))); };
|
|
||||||
let format = function (s, c) {
|
|
||||||
return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; });
|
|
||||||
};
|
|
||||||
return function (table, aId, name) {
|
|
||||||
let ctx = {worksheet: name || 'Worksheet', table: table};
|
|
||||||
document.getElementById(aId).href = uri + base64(format(template, ctx));
|
|
||||||
document.getElementById(aId).download = name;
|
|
||||||
document.getElementById(aId).click();
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
const table2excel = {};
|
|
||||||
|
|
||||||
table2excel.transform = tranform;
|
|
||||||
|
|
||||||
export default table2excel;
|
|
||||||
@@ -8,8 +8,6 @@ import vueQr from "vue-qr";
|
|||||||
import App from "./App";
|
import App from "./App";
|
||||||
import { router } from "./router/index";
|
import { router } from "./router/index";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
import config from '@/config/index'
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getRequest,
|
getRequest,
|
||||||
postRequest,
|
postRequest,
|
||||||
@@ -20,8 +18,9 @@ import {
|
|||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
import { setStore, getStore, removeStore } from "@/libs/storage";
|
import { setStore, getStore, removeStore } from "@/libs/storage";
|
||||||
|
|
||||||
|
import i18nBox from '@/views/lili-components/i18n-translate'
|
||||||
import util from "@/libs/util";
|
import util from "@/libs/util";
|
||||||
import dictUtil from "@/libs/dictUtil";
|
|
||||||
|
|
||||||
import VueLazyload from "vue-lazyload";
|
import VueLazyload from "vue-lazyload";
|
||||||
|
|
||||||
@@ -36,7 +35,7 @@ Vue.use(VueLazyload, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Vue.use(ViewUI);
|
Vue.use(ViewUI);
|
||||||
|
Vue.component('i18nBox',i18nBox)
|
||||||
Vue.component("vue-qr", vueQr); //此处将vue-qr添加为全局组件
|
Vue.component("vue-qr", vueQr); //此处将vue-qr添加为全局组件
|
||||||
|
|
||||||
// 挂载全局使用的方法
|
// 挂载全局使用的方法
|
||||||
@@ -50,8 +49,8 @@ Vue.prototype.setStore = setStore;
|
|||||||
Vue.prototype.getStore = getStore;
|
Vue.prototype.getStore = getStore;
|
||||||
Vue.prototype.removeStore = removeStore;
|
Vue.prototype.removeStore = removeStore;
|
||||||
Vue.prototype.md5 = md5;
|
Vue.prototype.md5 = md5;
|
||||||
const PC_URL = config.PC_URL; // 跳转买家端地址 pc端
|
const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端
|
||||||
const WAP_URL = config.WAP_URL; // 跳转买家端地址 wap端
|
const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端
|
||||||
Vue.prototype.linkTo = function(goodsId, skuId) {
|
Vue.prototype.linkTo = function(goodsId, skuId) {
|
||||||
// 跳转买家端商品
|
// 跳转买家端商品
|
||||||
window.open(
|
window.open(
|
||||||
@@ -85,8 +84,7 @@ new Vue({
|
|||||||
mounted() {
|
mounted() {
|
||||||
// 初始化菜单
|
// 初始化菜单
|
||||||
util.initRouter(this);
|
util.initRouter(this);
|
||||||
// 初始化全局数据字典
|
|
||||||
dictUtil.initDictData(this);
|
|
||||||
this.currentPageName = this.$route.name;
|
this.currentPageName = this.$route.name;
|
||||||
// 显示打开的页面的列表
|
// 显示打开的页面的列表
|
||||||
this.$store.commit("setOpenedList");
|
this.$store.commit("setOpenedList");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user