mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
Compare commits
155 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b740a6f906 | ||
|
|
7376d4d890 | ||
|
|
81297db7a8 | ||
|
|
b5ca94ab98 | ||
|
|
a220339fd6 | ||
|
|
0994b6659a | ||
|
|
c4037a346d | ||
|
|
45a6e76d4a | ||
|
|
aee67ec317 | ||
|
|
51610546c4 | ||
|
|
e8e7d27c0d | ||
|
|
166e889b6f | ||
|
|
db95647cd8 | ||
|
|
db13814156 | ||
|
|
5cf3956bc8 | ||
|
|
329e6df722 | ||
|
|
8023852b3c | ||
|
|
228935034d | ||
|
|
acff55dc65 | ||
|
|
61a9110c51 | ||
|
|
3a3e14e0a7 | ||
|
|
6ba767419e | ||
|
|
925365018b | ||
|
|
5960df31bd | ||
|
|
21f9fd92e2 | ||
|
|
9765310136 | ||
|
|
51cde2dd0d | ||
|
|
3311568e50 | ||
|
|
e5918b041a | ||
|
|
f46330ecf0 | ||
|
|
846e80f1fa | ||
|
|
631519d7c7 | ||
|
|
bbeb31e8a3 | ||
|
|
52bcf07e25 | ||
|
|
4d725221a5 | ||
|
|
c8a0619141 | ||
|
|
e1d7b1801d | ||
|
|
15456ae377 | ||
|
|
1c3d711298 | ||
|
|
1bee69cefb | ||
|
|
cf740d9605 | ||
|
|
d2aca24d06 | ||
|
|
6e042c4b78 | ||
|
|
1afd1704ab | ||
|
|
d5f81fe5d8 | ||
|
|
fada0a735f | ||
|
|
35de0c031d | ||
|
|
2e5eefc079 | ||
|
|
1fa264b0bf | ||
|
|
d2a0940858 | ||
|
|
4ff8eb6494 | ||
|
|
8ca87cdb2a | ||
|
|
f45b115355 | ||
|
|
7490211340 | ||
|
|
76d028277a | ||
|
|
0a0066fe5c | ||
|
|
4f7e38db3b | ||
|
|
54dcd2d8be | ||
|
|
6c1d7cce8d | ||
|
|
06b090cdf6 | ||
|
|
3653b4e7cb | ||
|
|
c6c890da63 | ||
|
|
75e7bc2d9c | ||
|
|
649f983990 | ||
|
|
193628913a | ||
|
|
cb304d7d53 | ||
|
|
4bb7bd4603 | ||
|
|
1e408eb8ae | ||
|
|
d762d18c7b | ||
|
|
3622c7bb53 | ||
|
|
1b9b2d9c95 | ||
|
|
0d5c60ed8c | ||
|
|
ab2bcb515f | ||
|
|
b3e6eb72eb | ||
|
|
9742aaf0bc | ||
|
|
bc1942c492 | ||
|
|
44facf549a | ||
|
|
09dd9861fd | ||
|
|
8d3b5cf91d | ||
|
|
5a90567e98 | ||
|
|
246ba9057f | ||
|
|
9eecc603db | ||
|
|
1fe4078115 | ||
|
|
ef73a6fe94 | ||
|
|
edef393535 | ||
|
|
97e6fc79ea | ||
|
|
0b82ae7569 | ||
|
|
3cb0e52ca0 | ||
|
|
fd1d32d431 | ||
|
|
8c169489eb | ||
|
|
6ecb6b8055 | ||
|
|
515cd3ebbd | ||
|
|
6c6b89f512 | ||
|
|
1ac5dcfe25 | ||
|
|
ccd5decbf7 | ||
|
|
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">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="WebPackConfiguration">
|
||||
<option name="mode" value="DISABLED" />
|
||||
</component>
|
||||
</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://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 `
|
||||
##### 部署基础环境
|
||||
|
||||
##### 部署商城所需中间件
|
||||
`docker-compose 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 | http://127.0.0.1:8888 |
|
||||
| 商家API | http://127.0.0.1:8889 |
|
||||
| 管理端API | http://127.0.0.1:8887 |
|
||||
| 通用API | http://127.0.0.1:8890 |
|
||||
| 商城买家API | http://127.0.0.1:8888 |
|
||||
| 商城商家API | http://127.0.0.1:8889 |
|
||||
| 商城管理端API | http://127.0.0.1:8887 |
|
||||
| 商城基础API | http://127.0.0.1:8890 |
|
||||
|
||||
| 前端演示 | 地址 |
|
||||
| -------------- | --------------- |
|
||||
| PC | http://127.0.0.1:10000 |
|
||||
| WAP | http://127.0.0.1:10001 |
|
||||
| 商家 | http://127.0.0.1:10002 |
|
||||
| 管理端 | http://127.0.0.1:10003 |
|
||||
| 商城PC端 | http://127.0.0.1:10000 |
|
||||
| 商城WAP端 | http://127.0.0.1:10001 |
|
||||
| 商城卖家端 | http://127.0.0.1:10002 |
|
||||
| 商城管理端 | 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%;" />
|
||||
|
||||
|
||||
|
||||
#### 管理端
|
||||
#### ⚽️ 商城管理端
|
||||
|
||||

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

|
||||
|
||||
##### Java后台
|
||||
##### 🕹 后台技术选型
|
||||
|
||||
| 说明 | 框架 | 说明 | |
|
||||
| -------------- | --------------- | -------------- | ------------- |
|
||||
@@ -149,7 +175,7 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 短信 | 阿里云短信 | 认证 | JWT |
|
||||
| 日志处理 | Log4j | 接口规范 | RESTful |
|
||||
|
||||
##### 前端-运营后台、店铺后台
|
||||
##### 🖥 前端-运营后台、店铺后台
|
||||
|
||||
| 说明 | 框架 | 说明 | 框架 |
|
||||
| ---------- | ---------- | ---------- | ------- |
|
||||
@@ -159,119 +185,34 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
| 基础UI库 | iView | UI界面基于 | iView |
|
||||
| 网络请求 | axios | | |
|
||||
|
||||
##### 前端-移动端
|
||||
##### 📱前端-移动端
|
||||
|
||||
| 说明 | 架构 | 说明 | 架构 |
|
||||
| --------- | ------- | -------- | ------- |
|
||||
| 基础UI库 | uViewui | 基础框架 | uni-app |
|
||||
| CSS预处理 | scss | 地图引擎 | amap |
|
||||
|
||||
### 升级计划
|
||||
|
||||
#### 计划每个月发布一个版本,具体时间可能有出入
|
||||
|
||||
时间:2021年6月15日
|
||||
### 🌟 版本升级
|
||||
|
||||
```
|
||||
新增功能:
|
||||
1.微信小程序直播
|
||||
2.优惠券活动
|
||||
3.新人赠券
|
||||
4.准确发券
|
||||
5.用户等级
|
||||
6.数据导出
|
||||
7.订单批量
|
||||
8.APP版本升级检测
|
||||
9.积分商城
|
||||
|
||||
功能优化:
|
||||
1.优惠券有效期增加类型:设置领取后*内有效。
|
||||
2.秒杀活动设置为每天开启,需设置秒杀活动开启时间。
|
||||
3.店铺配送模板,配送地区如果选择省份则下方的市级地址不展示。
|
||||
4.店铺配送模板支持,店铺包邮。
|
||||
5.普通商品设置去除卖家承担运费。
|
||||
商城后续会持续版本升级,修复bug,完善功能,覆盖更多业务场景 o2o/b2b/s2b2b2c/跨境电商
|
||||
|
||||
后续会考虑推出微服务商城系统/商城中台等
|
||||
```
|
||||
|
||||
时间: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.仅允许用于个人学习研究使用.
|
||||
|
||||
2.禁止将本开源的代码和资源进行任何形式任何名义的出售.
|
||||
|
||||
3.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
3.软件受国家计算机软件著作权保护(登记号:2021SR0805085)。
|
||||
|
||||
### 交流群
|
||||
4.限制商用,如果需要商业使用请联系我们。QQ3409056806.
|
||||
|
||||
**QQ群**:961316482
|
||||
|
||||
### 🐧 交流群
|
||||
|
||||
##### 官方qq 1群 961316482(已满)
|
||||
##### 官方qq 2群 875294241
|
||||
|
||||
|
||||
5
buyer/.npmrc
Normal file
5
buyer/.npmrc
Normal file
@@ -0,0 +1,5 @@
|
||||
# 默认依赖包指定淘宝源
|
||||
registry=https://registry.npm.taobao.org/
|
||||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
|
||||
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
|
||||
electron_mirror=https://npm.taobao.org/mirrors/electron/
|
||||
5
buyer/.yarnrc
Normal file
5
buyer/.yarnrc
Normal file
@@ -0,0 +1,5 @@
|
||||
registry "https://registry.npmmirror.com"
|
||||
sass_binary_site "https://npmmirror.com/mirrors/node-sass"
|
||||
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
|
||||
electron_mirror "https://npmmirror.com/mirrors/electron"
|
||||
|
||||
@@ -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.4.1 .
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
17
buyer/public/config.js
Normal file
17
buyer/public/config.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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) { %>
|
||||
<script src="<%=js%>"></script>
|
||||
<% } %>
|
||||
<script src="/config.js"></script>
|
||||
<noscript>
|
||||
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -5,17 +5,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import storage from '@/plugins/storage';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted () {
|
||||
let uuid = storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
storage.setItem('uuid', uuid);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -11,7 +11,7 @@ import request, {Method} from '@/plugins/request.js'
|
||||
// 获取密码状态
|
||||
export function getPwdStatus (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/check',
|
||||
url: '/buyer/passport/member/wallet/check',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -21,7 +21,7 @@ export function getPwdStatus (params) {
|
||||
// 设置密码
|
||||
export function setPwd (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/set-password',
|
||||
url: '/buyer/passport/member/wallet/set-password',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -31,7 +31,7 @@ export function setPwd (params) {
|
||||
// 设置支付密码
|
||||
export function setUpdatePwdOrdinary (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/update-password/ordinary',
|
||||
url: '/buyer/passport/member/wallet/update-password/ordinary',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -41,7 +41,7 @@ export function setUpdatePwdOrdinary (params) {
|
||||
// 修改会员资料
|
||||
export function editMemberInfo (params) {
|
||||
return request({
|
||||
url: '/buyer/members/editOwn',
|
||||
url: '/buyer/passport/member/editOwn',
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -51,9 +51,18 @@ export function editMemberInfo (params) {
|
||||
// 修改密码
|
||||
export function editPwd (params) {
|
||||
return request({
|
||||
url: `/buyer/members/modifyPass`,
|
||||
url: `/buyer/passport/member/modifyPass`,
|
||||
method: Method.PUT,
|
||||
needToken: true,
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取密码状态
|
||||
export function logout () {
|
||||
return request({
|
||||
url: '/buyer/passport/member/logout',
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 会员收货地址列表
|
||||
export function memberAddress () {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -14,7 +14,7 @@ export function memberAddress () {
|
||||
// 添加收货地址
|
||||
export function newMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.POST,
|
||||
data: params
|
||||
@@ -24,7 +24,7 @@ export function newMemberAddress (params) {
|
||||
// 编辑收货地址
|
||||
export function editMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
url: '/buyer/member/address',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -34,7 +34,7 @@ export function editMemberAddress (params) {
|
||||
// 删除收货地址
|
||||
export function delMemberAddress (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/delById/${id}`,
|
||||
url: `/buyer/member/address/delById/${id}`,
|
||||
needToken: true,
|
||||
method: Method.DELETE
|
||||
});
|
||||
@@ -43,7 +43,7 @@ export function delMemberAddress (id) {
|
||||
// 根据id获取会员地址详情
|
||||
export function getAddrDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/get/${id}`,
|
||||
url: `/buyer/member/address/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -52,7 +52,7 @@ export function getAddrDetail (id) {
|
||||
// 传给后台citycode 获取城市街道等id
|
||||
export function handleRegion (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/region`,
|
||||
url: `${commonUrl}/common/common/region/region`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {Method, commonUrl} from '@/plugins/request.js';
|
||||
*/
|
||||
export function getVerifyImg (verificationEnums) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) {
|
||||
*/
|
||||
export function postVerifyImg (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${params.verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -26,7 +26,7 @@ export function postVerifyImg (params) {
|
||||
*/
|
||||
export function sendSms (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||
url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -45,7 +45,7 @@ export function getLogo () {
|
||||
// 地区数据,用于三级联动
|
||||
export function getRegion (id) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/item/${id}`,
|
||||
url: `${commonUrl}/common/common/region/item/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
@@ -57,7 +57,7 @@ export function getRegion (id) {
|
||||
*/
|
||||
export function articleList (params) {
|
||||
return request({
|
||||
url: `/buyer/article`,
|
||||
url: `/buyer/other/article`,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
@@ -69,7 +69,7 @@ export function articleList (params) {
|
||||
*/
|
||||
export function articleCateList () {
|
||||
return request({
|
||||
url: `/buyer/article/articleCategory/list`,
|
||||
url: `/buyer/other/article/articleCategory/list`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
@@ -77,7 +77,18 @@ export function articleCateList () {
|
||||
// 通过id获取文章
|
||||
export function articleDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/article/get/${id}`,
|
||||
url: `/buyer/other/article/get/${id}`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取IM接口前缀
|
||||
export function getIMDetail () {
|
||||
return request({
|
||||
url: `${commonUrl}/common/IM`,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 商品列表
|
||||
export function goodsList (params) {
|
||||
return request({
|
||||
url: '/buyer/goods/es',
|
||||
url: '/buyer/goods/goods/es',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -15,7 +15,7 @@ export function goodsList (params) {
|
||||
// 商品分类 筛选条件 品牌, 尺寸等
|
||||
export function filterList (params) {
|
||||
return request({
|
||||
url: '/buyer/goods/es/related',
|
||||
url: '/buyer/goods/goods/es/related',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -25,7 +25,7 @@ export function filterList (params) {
|
||||
// id获取商品详情
|
||||
export function goodsDetail (goodsId) {
|
||||
return request({
|
||||
url: `/buyer/goods/get/${goodsId}`,
|
||||
url: `/buyer/goods/goods/get/${goodsId}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function goodsDetail (goodsId) {
|
||||
// id获取商品Sku详情
|
||||
export function goodsSkuDetail (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
url: `/buyer/goods/goods/sku/${params.goodsId}/${params.skuId}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -44,7 +44,7 @@ export function goodsSkuDetail (params) {
|
||||
// 获取所有商品分类
|
||||
export function getCategory (parentId) {
|
||||
return request({
|
||||
url: `/buyer/category/get/${parentId}`,
|
||||
url: `/buyer/goods/category/get/${parentId}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -65,7 +65,7 @@ export function pintuanMembers (pintuanId) {
|
||||
*/
|
||||
export function hotWords (params) {
|
||||
return request({
|
||||
url: `/buyer/goods/hot-words`,
|
||||
url: `/buyer/goods/goods/hot-words`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js'
|
||||
// 获取首页楼层装修数据
|
||||
export function indexData (params) {
|
||||
return request({
|
||||
url: '/buyer/pageData/getIndex',
|
||||
url: '/buyer/other/pageData/getIndex',
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -17,7 +17,7 @@ export function indexData (params) {
|
||||
*/
|
||||
export function pageData (params) {
|
||||
return request({
|
||||
url: `/buyer/pageData`,
|
||||
url: `/buyer/other/pageData`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -28,7 +28,7 @@ export function pageData (params) {
|
||||
*/
|
||||
export function handleRefreshToken (token) {
|
||||
return request({
|
||||
url: `/buyer/members/refresh/${token}`,
|
||||
url: `/buyer/passport/member/refresh/${token}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@ import request, {Method, buyerUrl} from '@/plugins/request.js';
|
||||
*/
|
||||
export function regist (params) {
|
||||
return request({
|
||||
url: '/buyer/members/register',
|
||||
url: '/buyer/passport/member/register',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params
|
||||
@@ -18,7 +18,7 @@ export function regist (params) {
|
||||
*/
|
||||
export function login (params) {
|
||||
return request({
|
||||
url: '/buyer/members/userLogin',
|
||||
url: '/buyer/passport/member/userLogin',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params,
|
||||
@@ -31,7 +31,7 @@ export function login (params) {
|
||||
*/
|
||||
export function smsLogin (params) {
|
||||
return request({
|
||||
url: '/buyer/members/smsLogin',
|
||||
url: '/buyer/passport/member/smsLogin',
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
data: params,
|
||||
@@ -44,7 +44,7 @@ export function smsLogin (params) {
|
||||
*/
|
||||
export function getMemberMsg (params) {
|
||||
return request({
|
||||
url: '/buyer/members',
|
||||
url: '/buyer/passport/member',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -55,7 +55,7 @@ export function getMemberMsg (params) {
|
||||
* 第三方登录 支付宝,微博,qq,微信
|
||||
*/
|
||||
export function webLogin (type) {
|
||||
window.open(`${buyerUrl}/buyer/connect/login/web/${type}`, 'blank');
|
||||
window.open(`${buyerUrl}/buyer/passport/connect/connect/login/web/${type}`, 'blank');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ export function webLogin (type) {
|
||||
*/
|
||||
export function loginCallback (uuid) {
|
||||
return request({
|
||||
url: `/buyer/connect/result?state=${uuid}`,
|
||||
url: `/buyer/passport/connect/connect/result?state=${uuid}`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -74,7 +74,7 @@ export function loginCallback (uuid) {
|
||||
*/
|
||||
export function validateCode (params) {
|
||||
return request({
|
||||
url: `/buyer/members/resetByMobile`,
|
||||
url: `/buyer/passport/member/resetByMobile`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -86,7 +86,7 @@ export function validateCode (params) {
|
||||
*/
|
||||
export function resetPassword (params) {
|
||||
return request({
|
||||
url: `/buyer/members/resetPassword`,
|
||||
url: `/buyer/passport/member/resetPassword`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params
|
||||
|
||||
@@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js';
|
||||
// 查询账户余额
|
||||
export function getMembersWallet () {
|
||||
return request({
|
||||
url: '/buyer/members/wallet',
|
||||
url: '/buyer/passport/member/wallet',
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -22,7 +22,7 @@ export function getDepositLog (params) {
|
||||
// 查询充值记录
|
||||
export function getRecharge (params) {
|
||||
return request({
|
||||
url: '/buyer/member/recharge',
|
||||
url: '/buyer/wallet/recharge',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -52,7 +52,7 @@ export function recharge (params) {
|
||||
// 提现
|
||||
export function withdrawalApply (params) {
|
||||
return request({
|
||||
url: '/buyer/members/wallet/withdrawal',
|
||||
url: '/buyer/passport/member/wallet/withdrawal',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data: params
|
||||
@@ -99,7 +99,7 @@ export function collectList (params) {
|
||||
// 单个商品评价
|
||||
export function goodsComment (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/${params.goodsId}/goodsEvaluation`,
|
||||
url: `/buyer/member/evaluation/${params.goodsId}/goodsEvaluation`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
params
|
||||
@@ -109,7 +109,7 @@ export function goodsComment (params) {
|
||||
// 商品各评价类别数量
|
||||
export function goodsCommentNum (goodsId) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/${goodsId}/evaluationNumber`,
|
||||
url: `/buyer/member/evaluation/${goodsId}/evaluationNumber`,
|
||||
method: Method.GET,
|
||||
needToken: false
|
||||
});
|
||||
@@ -118,7 +118,7 @@ export function goodsCommentNum (goodsId) {
|
||||
// 添加会员评价
|
||||
export function addEvaluation (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation`,
|
||||
url: `/buyer/member/evaluation`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -128,7 +128,7 @@ export function addEvaluation (params) {
|
||||
// 会员评价详情
|
||||
export function evaluationDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation/get/${id}`,
|
||||
url: `/buyer/member/evaluation/get/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -195,7 +195,7 @@ export function receiveCoupon (couponId) {
|
||||
// 获取申请售后列表
|
||||
export function afterSaleList (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/page`,
|
||||
url: `/buyer/order/afterSale/page`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -205,7 +205,7 @@ export function afterSaleList (params) {
|
||||
// 获取申请售后页面信息
|
||||
export function afterSaleInfo (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/applyAfterSaleInfo/${sn}`,
|
||||
url: `/buyer/order/afterSale/applyAfterSaleInfo/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -214,7 +214,7 @@ export function afterSaleInfo (sn) {
|
||||
// 获取申请售后、投诉原因
|
||||
export function afterSaleReason (serviceType) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/afterSaleReason/${serviceType}`,
|
||||
url: `/buyer/order/afterSale/get/afterSaleReason/${serviceType}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) {
|
||||
// 获取申请售后详情
|
||||
export function afterSaleDetail (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/${sn}`,
|
||||
url: `/buyer/order/afterSale/get/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -230,7 +230,7 @@ export function afterSaleDetail (sn) {
|
||||
// 售后日志
|
||||
export function afterSaleLog (sn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/get/getAfterSaleLog/${sn}`,
|
||||
url: `/buyer/order/afterSale/get/getAfterSaleLog/${sn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -239,7 +239,7 @@ export function afterSaleLog (sn) {
|
||||
// 申请售后
|
||||
export function applyAfterSale (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/save/${params.orderItemSn}`,
|
||||
url: `/buyer/order/afterSale/save/${params.orderItemSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -249,7 +249,7 @@ export function applyAfterSale (params) {
|
||||
// 取消售后申请
|
||||
export function cancelAfterSale (afterSaleSn) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/cancel/${afterSaleSn}`,
|
||||
url: `/buyer/order/afterSale/cancel/${afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -258,7 +258,7 @@ export function cancelAfterSale (afterSaleSn) {
|
||||
// 投诉商品
|
||||
export function handleComplain (data) {
|
||||
return request({
|
||||
url: `/buyer/complain`,
|
||||
url: `/buyer/order/complain`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
data
|
||||
@@ -267,7 +267,7 @@ export function handleComplain (data) {
|
||||
// 分页获取我的投诉列表
|
||||
export function complainList (params) {
|
||||
return request({
|
||||
url: `/buyer/complain`,
|
||||
url: `/buyer/order/complain`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -279,7 +279,7 @@ export function complainList (params) {
|
||||
*/
|
||||
export function getComplainDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/complain/${id}`,
|
||||
url: `/buyer/order/complain/${id}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -290,7 +290,7 @@ export function getComplainDetail (id) {
|
||||
*/
|
||||
export function clearComplain (id) {
|
||||
return request({
|
||||
url: `/buyer/complain/status/${id}`,
|
||||
url: `/buyer/order/complain/status/${id}`,
|
||||
method: Method.PUT,
|
||||
needToken: true
|
||||
});
|
||||
@@ -301,7 +301,7 @@ export function clearComplain (id) {
|
||||
*/
|
||||
export function distribution () {
|
||||
return request({
|
||||
url: `/buyer/distribution`,
|
||||
url: `/buyer/distribution/distribution`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -314,7 +314,7 @@ export function distribution () {
|
||||
*/
|
||||
export function applyDistribution (params) {
|
||||
return request({
|
||||
url: `/buyer/distribution`,
|
||||
url: `/buyer/distribution/distribution`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -326,7 +326,7 @@ export function applyDistribution (params) {
|
||||
*/
|
||||
export function getDistOrderList (params) {
|
||||
return request({
|
||||
url: `/buyer/distribution/distributionOrder`,
|
||||
url: `/buyer/distribution/order`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -338,7 +338,7 @@ export function getDistOrderList (params) {
|
||||
*/
|
||||
export function getDistGoodsList (params) {
|
||||
return request({
|
||||
url: `/buyer/distributionGoods`,
|
||||
url: `/buyer/distribution/goods`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -352,7 +352,7 @@ export function getDistGoodsList (params) {
|
||||
*/
|
||||
export function selectDistGoods (params) {
|
||||
return request({
|
||||
url: `/buyer/distributionGoods/checked/${params.distributionGoodsId}`,
|
||||
url: `/buyer/distribution/goods/checked/${params.distributionGoodsId}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -390,7 +390,7 @@ export function distCash (params) {
|
||||
*/
|
||||
export function tracksList (params) {
|
||||
return request({
|
||||
url: `/buyer/footprint`,
|
||||
url: `/buyer/member/footprint`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -402,7 +402,7 @@ export function tracksList (params) {
|
||||
*/
|
||||
export function clearTracks () {
|
||||
return request({
|
||||
url: `/buyer/footprint`,
|
||||
url: `/buyer/member/footprint`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -414,7 +414,7 @@ export function clearTracks () {
|
||||
*/
|
||||
export function clearTracksById (ids) {
|
||||
return request({
|
||||
url: `/buyer/footprint/delByIds/${ids}`,
|
||||
url: `/buyer/member/footprint/delByIds/${ids}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -449,7 +449,7 @@ export function memberPointHistory (params) {
|
||||
*/
|
||||
export function memberMsgList (params) {
|
||||
return request({
|
||||
url: `/buyer/member/message`,
|
||||
url: `/buyer/message/member`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -462,7 +462,7 @@ export function memberMsgList (params) {
|
||||
|
||||
export function readMemberMsg (id) {
|
||||
return request({
|
||||
url: `/buyer/member/message/${id}`,
|
||||
url: `/buyer/message/member/${id}`,
|
||||
method: Method.PUT,
|
||||
needToken: true
|
||||
});
|
||||
@@ -473,7 +473,7 @@ export function readMemberMsg (id) {
|
||||
*/
|
||||
export function delMemberMsg (id) {
|
||||
return request({
|
||||
url: `/buyer/member/message/${id}`,
|
||||
url: `/buyer/message/member/${id}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 查询会员订单列表
|
||||
export function getOrderList (params) {
|
||||
return request({
|
||||
url: `/buyer/orders`,
|
||||
url: `/buyer/order/order`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -18,7 +18,7 @@ export function getOrderList (params) {
|
||||
*/
|
||||
export function orderDetail (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}`,
|
||||
url: `/buyer/order/order/${orderSn}`,
|
||||
method: Method.GET,
|
||||
needToken: true
|
||||
});
|
||||
@@ -31,7 +31,7 @@ export function orderDetail (orderSn) {
|
||||
*/
|
||||
export function cancelOrder (params) {
|
||||
return request({
|
||||
url: `/buyer/orders/${params.orderSn}/cancel`,
|
||||
url: `/buyer/order/order/${params.orderSn}/cancel`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -44,7 +44,7 @@ export function cancelOrder (params) {
|
||||
*/
|
||||
export function delOrder (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}`,
|
||||
url: `/buyer/order/order/${orderSn}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true
|
||||
});
|
||||
@@ -56,7 +56,7 @@ export function delOrder (orderSn) {
|
||||
*/
|
||||
export function sureReceived (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/${orderSn}/receiving`,
|
||||
url: `/buyer/order/order/${orderSn}/receiving`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -68,7 +68,7 @@ export function sureReceived (orderSn) {
|
||||
*/
|
||||
export function getTraces (orderSn) {
|
||||
return request({
|
||||
url: `/buyer/orders/getTraces/${orderSn}`,
|
||||
url: `/buyer/order/order/getTraces/${orderSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true
|
||||
});
|
||||
@@ -80,7 +80,7 @@ export function getTraces (orderSn) {
|
||||
*/
|
||||
export function evolutionList (params) {
|
||||
return request({
|
||||
url: `/buyer/memberEvaluation`,
|
||||
url: `/buyer/member/evaluation`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -90,7 +90,7 @@ export function evolutionList (params) {
|
||||
// 添加交易投诉对话
|
||||
export function communication (params) {
|
||||
return request({
|
||||
url: `/buyer/complain/communication`,
|
||||
url: `/buyer/order/complain/communication`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -100,7 +100,7 @@ export function communication (params) {
|
||||
// 退换货服务 提交物流
|
||||
export function afterSaleDelivery (params) {
|
||||
return request({
|
||||
url: `/buyer/afterSale/delivery/${params.afterSaleSn}`,
|
||||
url: `/buyer/order/afterSale/delivery/${params.afterSaleSn}`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
params
|
||||
@@ -109,7 +109,7 @@ export function afterSaleDelivery (params) {
|
||||
// 获取退货可选物流公司
|
||||
export function getLogisticsCompany () {
|
||||
return request({
|
||||
url: `/buyer/logistics`,
|
||||
url: `/buyer/other/logistics`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' }
|
||||
|
||||
@@ -10,7 +10,7 @@ import request, {
|
||||
*/
|
||||
export function tradeDetail (params) {
|
||||
return request({
|
||||
url: '/buyer/cashier/tradeDetail',
|
||||
url: '/buyer/payment/cashier/tradeDetail',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -26,7 +26,7 @@ export function tradeDetail (params) {
|
||||
*/
|
||||
export function pay (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
url: `/buyer/payment/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -40,7 +40,7 @@ export function pay (params) {
|
||||
*/
|
||||
export function payCallback (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/result`,
|
||||
url: `/buyer/payment/cashier/result`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
|
||||
@@ -5,7 +5,7 @@ import request, {
|
||||
// 店铺分页列表
|
||||
export function shopList (params) {
|
||||
return request({
|
||||
url: '/buyer/store',
|
||||
url: '/buyer/store/store',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
@@ -15,7 +15,7 @@ export function shopList (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyFirst (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/first',
|
||||
url: '/buyer/store/store/apply/first',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -25,7 +25,7 @@ export function applyFirst (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applySecond (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/second',
|
||||
url: '/buyer/store/store/apply/second',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -35,7 +35,7 @@ export function applySecond (params) {
|
||||
// 申请店铺第一步-填写企业信息
|
||||
export function applyThird (params) {
|
||||
return request({
|
||||
url: '/buyer/store/apply/third',
|
||||
url: '/buyer/store/store/apply/third',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
@@ -45,7 +45,7 @@ export function applyThird (params) {
|
||||
// 店铺详情
|
||||
export function getDetailById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/get/detail/${id}`,
|
||||
url: `/buyer/store/store/get/detail/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -53,7 +53,7 @@ export function getDetailById (id) {
|
||||
// 店铺分类
|
||||
export function getCateById (id) {
|
||||
return request({
|
||||
url: `/buyer/store/label/get/${id}`,
|
||||
url: `/buyer/store/store/label/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -61,7 +61,7 @@ export function getCateById (id) {
|
||||
// 店铺入驻协议
|
||||
export function agreement () {
|
||||
return request({
|
||||
url: `/buyer/article/type/STORE_REGISTER`,
|
||||
url: `/buyer/other/article/type/STORE_REGISTER`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
@@ -70,7 +70,7 @@ export function agreement () {
|
||||
// 获取当前登录会员的店铺信息
|
||||
export function applyStatus () {
|
||||
return request({
|
||||
url: `/buyer/store/apply`,
|
||||
url: `/buyer/store/store/apply`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
})
|
||||
|
||||
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 |
@@ -10,7 +10,7 @@ $warning_color: #ff9900;
|
||||
$error_color: #ed3f14;
|
||||
$handle-btn-color: #438cde;
|
||||
|
||||
$theme_color: #ed3f14;
|
||||
$theme_color: #e4393c;
|
||||
|
||||
$border_color: #dddee1;
|
||||
$title_color: #8c8c8c;
|
||||
@@ -336,4 +336,4 @@ li {
|
||||
margin:10px auto ;
|
||||
text-align: right;
|
||||
width: 1200px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,18 @@
|
||||
margin-top: 6px;
|
||||
}
|
||||
.goods-show-detail {
|
||||
height: 36px;
|
||||
font-size: 12px;
|
||||
margin: 6px 0px;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
display:-webkit-box;
|
||||
-webkit-line-clamp:2;
|
||||
-webkit-box-orient:vertical;
|
||||
color:#808080;
|
||||
}
|
||||
.goods-show-detail :hover{
|
||||
color:#E23A3A;
|
||||
}
|
||||
.goods-show-num {
|
||||
font-size: 12px;
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
@import '~view-design/src/styles/index.less';
|
||||
@import "~view-design/src/styles/index.less";
|
||||
// iview 自定义样式
|
||||
|
||||
@primary-color: #ed3f14;
|
||||
@primary-color: #ff5c58;
|
||||
@info-color: #fa6419;
|
||||
@success-color: #68cabe;
|
||||
@error-color: #ff3c2a;
|
||||
@table-thead-bg: #f8f8f9;
|
||||
@table-td-stripe-bg: #f8f8f9;
|
||||
@table-td-hover-bg: #ededed;
|
||||
@table-td-highlight-bg: #ededed;
|
||||
@font-size-base: 12px;
|
||||
|
||||
.ivu-drawer,
|
||||
.drawer,
|
||||
.ivu-drawer-wrap {
|
||||
z-index: 2600 !important;
|
||||
}
|
||||
|
||||
@table-thead-bg : #f8f8f9;
|
||||
@table-td-stripe-bg : #f8f8f9;
|
||||
@table-td-hover-bg : #ededed;
|
||||
@table-td-highlight-bg : #ededed;
|
||||
@@ -147,9 +147,11 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
.store-search{
|
||||
width:63px;
|
||||
padding: 0 9px;
|
||||
border-radius: 0;
|
||||
&:nth-child(2){
|
||||
width:62px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
}
|
||||
@@ -157,6 +159,6 @@ export default {
|
||||
position: relative;
|
||||
height: 0px;
|
||||
top: -38px;
|
||||
left: 339px;
|
||||
left: 352px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,18 +29,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="friend-link">
|
||||
<div class="friend-link flex">
|
||||
<div class="friend-link-item">
|
||||
<ul>
|
||||
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
||||
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="icp">
|
||||
<li v-if="config.icpCard">
|
||||
<a :href='"https://tsm.miit.gov.cn/dxxzsp/xkz/xkzgl/resource/qiyesearch.jsp?num="+config.icpCard+"&type=xuke"' target="_blank">
|
||||
{{config.icpCard}}
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="config.icpMessage" class="footer-bottmom">
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||
{{config.icpMessage}}
|
||||
</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="information footer-bottmom">
|
||||
|
||||
<a class="flex " :href="config.company.href">
|
||||
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.name}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="copyright">
|
||||
<p>Copyright © {{year}} LILI</p>
|
||||
<p>Copyright © {{year}} {{config.title}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -48,28 +68,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Footer',
|
||||
data () {
|
||||
name: "Footer",
|
||||
data() {
|
||||
return {
|
||||
guideArr: [ // 导航链接
|
||||
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题' ],
|
||||
[ '配送方式', '上门自提', '配送服务查询', '收取标准', '物流规则' ],
|
||||
[ '支付方式', '在线支付', '公司转账', '余额支付', '积分支付' ],
|
||||
[ '售后服务', '售后政策', '退款说明', '返修/退货', '取消订单' ]
|
||||
config:require('@/config'),
|
||||
guideArr: [
|
||||
// 导航链接
|
||||
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],
|
||||
["配送方式", "上门自提", "配送服务查询", "收取标准", "物流规则"],
|
||||
["支付方式", "在线支付", "公司转账", "余额支付", "积分支付"],
|
||||
["售后服务", "售后政策", "退款说明", "返修/退货", "取消订单"],
|
||||
],
|
||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
|
||||
year: new Date().getFullYear() // 当前年份
|
||||
moreLink: ["关于我们", "联系我们", "联系客服", "商家帮助", "隐私政策"], // 更多链接
|
||||
year: new Date().getFullYear(), // 当前年份
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goArticle () { // 跳转文章页
|
||||
goArticle() {
|
||||
// 跳转文章页
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/article'
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
}
|
||||
path: "/article",
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -77,11 +101,9 @@ export default {
|
||||
/*****************************底 部 开 始*****************************/
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 380px;
|
||||
padding-top: 30px;
|
||||
|
||||
@include background_color($light_background_color);
|
||||
|
||||
}
|
||||
.icon-row {
|
||||
margin: 15px auto;
|
||||
@@ -112,7 +134,20 @@ export default {
|
||||
.footer-icon-child-4 {
|
||||
background-position: 0 -129px;
|
||||
}
|
||||
.footer-icon-text{
|
||||
.icp {
|
||||
>*{
|
||||
margin: 0 4px;
|
||||
}
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>img{
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.footer-icon-text {
|
||||
margin-left: 45px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
@@ -138,22 +173,39 @@ export default {
|
||||
cursor: pointer;
|
||||
line-height: 26px;
|
||||
}
|
||||
.servece-type-info li:hover{
|
||||
color:#b8b8be;
|
||||
}
|
||||
.servece-type-info li:first-child {
|
||||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.servece-type-info li:first-child:hover{
|
||||
// font-size:15px;
|
||||
// font-weight: bold;
|
||||
color:#b8b8be;
|
||||
}
|
||||
.friend-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
width: 908px;
|
||||
height: 30px;
|
||||
padding: 10px 0;
|
||||
margin: 0px auto;
|
||||
border-top: 1px solid $border_color;
|
||||
}
|
||||
.friend-link-item {
|
||||
margin: 0px auto;
|
||||
.information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
> * {
|
||||
margin: 2px 0;
|
||||
}
|
||||
}
|
||||
.zhizhao {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.friend-link-item ul {
|
||||
list-style: none;
|
||||
@@ -162,6 +214,17 @@ export default {
|
||||
padding: 5px 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.friend-link-item li:hover{
|
||||
color:#b8b8be;
|
||||
margin-top:-2px;
|
||||
}
|
||||
.footer-bottmom:hover{
|
||||
margin-top:0 !important;
|
||||
}
|
||||
.footer-bottmom>a:hover{
|
||||
color:#e4393c;
|
||||
}
|
||||
.link-item {
|
||||
padding: 0px 8px;
|
||||
cursor: pointer;
|
||||
@@ -175,15 +238,17 @@ export default {
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.copyright a{
|
||||
.copyright a {
|
||||
color: #232323;
|
||||
font-size: 20px;
|
||||
}
|
||||
.footer-icon-text{
|
||||
@include title_color($light_title_color)
|
||||
.footer-icon-text {
|
||||
@include title_color($light_title_color);
|
||||
}
|
||||
.copyright,.friend-link,.servece-type-info {
|
||||
@include sub_color($light_sub_color)
|
||||
.copyright,
|
||||
.friend-link,
|
||||
.servece-type-info {
|
||||
@include sub_color($light_sub_color);
|
||||
}
|
||||
/*****************************底 部 结 束*****************************/
|
||||
</style>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
<div class="item-detail-big-img">
|
||||
<pic-zoom :url="imgList[imgIndex].url" :scale="2"></pic-zoom>
|
||||
</div>
|
||||
<div v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'" style="margin-top:10px;rgb(153, 149, 149);">实物商品</div>
|
||||
<div v-else-if="skuDetail.goodsType == 'VIRTUAL_GOODS'" style="margin-top:10px;rgb(153, 149, 149);">虚拟商品</div>
|
||||
<div class="item-detail-img-row">
|
||||
<div
|
||||
class="item-detail-img-small"
|
||||
@@ -19,7 +21,11 @@
|
||||
</div>
|
||||
|
||||
<div class="goodsConfig mt_10">
|
||||
<span @click="collect" ><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{isCollected?'已收藏':'收藏'}}</span>
|
||||
<span @click="collect"
|
||||
><Icon type="ios-heart" :color="isCollected ? '#ed3f14' : '#666'" />{{
|
||||
isCollected ? "已收藏" : "收藏"
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧商品信息、活动信息、操作展示 -->
|
||||
@@ -30,30 +36,40 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="sell-point">
|
||||
{{skuDetail.sellingPoint}}
|
||||
{{ skuDetail.sellingPoint }}
|
||||
</div>
|
||||
<!-- 限时秒杀 -->
|
||||
<Promotion v-if="promotionMap['SECKILL']" :time="promotionMap['SECKILL'].endTime"></Promotion>
|
||||
<Promotion
|
||||
v-if="promotionMap['SECKILL']"
|
||||
:time="promotionMap['SECKILL'].endTime"
|
||||
></Promotion>
|
||||
<!-- 商品详细 价格、优惠券、促销 -->
|
||||
<div class="item-detail-price-row">
|
||||
<div class="item-price-left">
|
||||
<!-- 商品原价 -->
|
||||
<div class="item-price-row" v-if="!skuDetail.promotionPrice">
|
||||
|
||||
<!-- 秒杀价格 -->
|
||||
<div class="item-price-row" v-if="skuDetail.promotionPrice && promotionMap['SECKILL']">
|
||||
<p>
|
||||
<span class="item-price-title">价 格</span>
|
||||
<span class="item-price">{{skuDetail.price | unitPrice("¥")}}</span>
|
||||
<span class="item-price-title" v-if="promotionMap['SECKILL']"
|
||||
>秒 杀 价</span
|
||||
>
|
||||
<span class="item-price">{{
|
||||
skuDetail.promotionPrice | unitPrice("¥")
|
||||
}}</span>
|
||||
<span class="item-price-old">{{
|
||||
skuDetail.price | unitPrice("¥")
|
||||
}}</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 秒杀价格 -->
|
||||
<div class="item-price-row" v-if="skuDetail.promotionPrice">
|
||||
<!-- 商品原价 -->
|
||||
<div class="item-price-row" v-else>
|
||||
<p>
|
||||
<span class="item-price-title" v-if="promotionMap['SECKILL']">秒 杀 价</span>
|
||||
<span class="item-price">{{skuDetail.promotionPrice | unitPrice("¥")}}</span>
|
||||
<span class="item-price-old">{{skuDetail.price | unitPrice("¥")}}</span>
|
||||
<span class="item-price-title">价 格</span>
|
||||
<span class="item-price">{{ skuDetail.price | unitPrice("¥") }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 优惠券展示 -->
|
||||
<div class="item-price-row" v-if="promotionMap['COUPON'].length">
|
||||
<div class="item-price-row" v-if="promotionMap['COUPON'].length">
|
||||
<p>
|
||||
<span class="item-price-title">优 惠 券</span>
|
||||
<span
|
||||
@@ -61,10 +77,14 @@
|
||||
v-for="(item, index) in promotionMap['COUPON']"
|
||||
:key="index"
|
||||
@click="receiveCoupon(item.id)"
|
||||
>
|
||||
<span v-if="item.couponType == 'PRICE'"
|
||||
>满{{ item.consumeThreshold }}减{{ item.price }}</span
|
||||
>
|
||||
<span v-if="item.couponType == 'PRICE'">满{{ item.consumeThreshold }}减{{item.price}}</span>
|
||||
<span v-if="item.couponType == 'DISCOUNT'">满{{ item.consumeThreshold }}打{{item.couponDiscount}}折</span>
|
||||
</span>
|
||||
<span v-if="item.couponType == 'DISCOUNT'"
|
||||
>满{{ item.consumeThreshold }}打{{ item.couponDiscount }}折</span
|
||||
>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- 满减展示 -->
|
||||
@@ -72,8 +92,20 @@
|
||||
<p>
|
||||
<span class="item-price-title">促 销</span>
|
||||
<span class="item-promotion">满减</span>
|
||||
<span class="item-desc-pintuan" v-if="promotionMap['FULL_DISCOUNT'].fullMinus">满{{ promotionMap['FULL_DISCOUNT'].fullMoney }}元,立减现金{{ promotionMap['FULL_DISCOUNT'].fullMinus}}元</span>
|
||||
<span class="item-desc-pintuan" v-if="promotionMap['FULL_DISCOUNT'].fullRate">满{{ promotionMap['FULL_DISCOUNT'].fullMoney }}元,立享{{ promotionMap['FULL_DISCOUNT'].fullRate}}折</span>
|
||||
<span
|
||||
class="item-desc-pintuan"
|
||||
v-if="promotionMap['FULL_DISCOUNT'].fullMinus"
|
||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立减现金{{
|
||||
promotionMap["FULL_DISCOUNT"].fullMinus
|
||||
}}元</span
|
||||
>
|
||||
<span
|
||||
class="item-desc-pintuan"
|
||||
v-if="promotionMap['FULL_DISCOUNT'].fullRate"
|
||||
>满{{ promotionMap["FULL_DISCOUNT"].fullMoney }}元,立享{{
|
||||
promotionMap["FULL_DISCOUNT"].fullRate
|
||||
}}折</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,9 +124,13 @@
|
||||
<p>{{ sku.name }}</p>
|
||||
</div>
|
||||
<div class="item-select-column">
|
||||
<div class="item-select-row" v-for="(item) in sku.values" :key="item.value">
|
||||
<div class="item-select-box" @click="select(index, item.value)"
|
||||
:class="{ 'item-select-box-active': item.value === currentSelceted[index] }"
|
||||
<div class="item-select-row" v-for="item in sku.values" :key="item.value">
|
||||
<div
|
||||
class="item-select-box"
|
||||
@click="select(index, item.value)"
|
||||
:class="{
|
||||
'item-select-box-active': item.value === currentSelceted[index],
|
||||
}"
|
||||
>
|
||||
<div class="item-select-intro">
|
||||
<p>{{ item.value }}</p>
|
||||
@@ -110,26 +146,59 @@
|
||||
<p>数量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<InputNumber :min="1" :disabled="skuDetail.quantity === 0" v-model="count"></InputNumber>
|
||||
<span class="inventory"> 库存{{skuDetail.quantity}}</span>
|
||||
<InputNumber
|
||||
:min="1"
|
||||
:max="skuDetail.quantity"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
v-model="count"
|
||||
:precision="0.1"
|
||||
></InputNumber>
|
||||
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-select" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS' && skuDetail.weight !== 0">
|
||||
<div
|
||||
class="item-select"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS' && skuDetail.weight !== 0"
|
||||
>
|
||||
<div class="item-select-title">
|
||||
<p>重量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<span class="inventory"> {{skuDetail.weight}}kg</span>
|
||||
<span class="inventory"> {{ skuDetail.weight }}kg</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-buy-car" v-if="$route.query.way === 'POINT' && skuDetail.isAuth === 'PASS'">
|
||||
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="pointPay">积分购买</Button>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
v-if="$route.query.way === 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="pointPay"
|
||||
>积分购买</Button
|
||||
>
|
||||
</div>
|
||||
<div class="add-buy-car" v-if="$route.query.way !== 'POINT' && skuDetail.isAuth === 'PASS'">
|
||||
<Button type="error" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button>
|
||||
<Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
v-if="$route.query.way !== 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="addShoppingCartBtn"
|
||||
>加入购物车</Button
|
||||
>
|
||||
<Button
|
||||
type="warning"
|
||||
:loading="loading1"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="buyNow"
|
||||
>立即购买</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,45 +206,52 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from './Promotion.vue';
|
||||
import PicZoom from 'vue-piczoom'; // 图片放大
|
||||
import { collectGoods, isCollection, receiveCoupon, cancelCollect } from '@/api/member.js';
|
||||
import { addCartGoods } from '@/api/cart.js';
|
||||
import Promotion from "./Promotion.vue";
|
||||
import PicZoom from "vue-piczoom"; // 图片放大
|
||||
import {
|
||||
collectGoods,
|
||||
isCollection,
|
||||
receiveCoupon,
|
||||
cancelCollect,
|
||||
} from "@/api/member.js";
|
||||
import { addCartGoods } from "@/api/cart.js";
|
||||
export default {
|
||||
name: 'ShowGoods',
|
||||
name: "ShowGoods",
|
||||
props: {
|
||||
// 商品数据
|
||||
detail: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
count: 1, // 商品数量
|
||||
imgIndex: 0, // 展示图片下标
|
||||
currentSelceted: [], // 当前商品sku
|
||||
imgList: [{}], // 商品图片列表
|
||||
imgList: [{ url: "" }], // 商品图片列表
|
||||
skuDetail: this.detail.data, // sku详情
|
||||
goodsSpecList: this.detail.specs, // 商品spec
|
||||
promotionMap: { // 活动状态
|
||||
promotionMap: {
|
||||
// 活动状态
|
||||
SECKILL: null,
|
||||
FULL_DISCOUNT: null,
|
||||
COUPON: []
|
||||
COUPON: [],
|
||||
}, // 促销活动
|
||||
formatList: [], // 选择商品品类的数组
|
||||
loading: false, // 立即购买loading
|
||||
loading1: false, // 加入购物车loading
|
||||
isCollected: false // 是否收藏
|
||||
isCollected: false, // 是否收藏
|
||||
};
|
||||
},
|
||||
components: { PicZoom, Promotion },
|
||||
methods: {
|
||||
select (index, value) { // 选择规格
|
||||
select(index, value) {
|
||||
// 选择规格
|
||||
this.$set(this.currentSelceted, index, value);
|
||||
let selectedSkuId = this.goodsSpecList.find((i) => {
|
||||
let matched = true;
|
||||
let specValues = i.specValues.filter((j) => j.specName !== 'images');
|
||||
let specValues = i.specValues.filter((j) => j.specName !== "images");
|
||||
for (let n = 0; n < specValues.length; n++) {
|
||||
if (specValues[n].specValue !== this.currentSelceted[n]) {
|
||||
matched = false;
|
||||
@@ -187,76 +263,86 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$router.push({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId: selectedSkuId.skuId, goodsId: this.skuDetail.goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId: selectedSkuId.skuId, goodsId: this.skuDetail.goodsId },
|
||||
});
|
||||
},
|
||||
|
||||
addShoppingCartBtn () { // 添加购物车
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id
|
||||
};
|
||||
this.loading = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
buyNow () { // 立即购买
|
||||
addShoppingCartBtn() {
|
||||
// 添加购物车
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id,
|
||||
cartType: 'BUY_NOW'
|
||||
};
|
||||
this.loading = true;
|
||||
addCartGoods(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.$router.push({
|
||||
path: "/shoppingCart",
|
||||
query: { detail: this.skuDetail, count: this.count },
|
||||
});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
buyNow() {
|
||||
// 立即购买
|
||||
const params = {
|
||||
num: this.count,
|
||||
skuId: this.skuDetail.id,
|
||||
cartType: "BUY_NOW",
|
||||
};
|
||||
// 虚拟商品购买
|
||||
if (this.skuDetail.goodsType === 'VIRTUAL_GOODS') {
|
||||
params.cartType = 'VIRTUAL'
|
||||
if (this.skuDetail.goodsType === "VIRTUAL_GOODS") {
|
||||
params.cartType = "VIRTUAL";
|
||||
}
|
||||
this.loading1 = true;
|
||||
addCartGoods(params).then(res => {
|
||||
this.loading1 = false;
|
||||
if (res.success) {
|
||||
this.$router.push({path: '/pay', query: {way: params.cartType}});
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading1 = false;
|
||||
});
|
||||
addCartGoods(params)
|
||||
.then((res) => {
|
||||
this.loading1 = false;
|
||||
if (res.success) {
|
||||
this.$router.push({ path: "/pay", query: { way: params.cartType } });
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading1 = false;
|
||||
});
|
||||
},
|
||||
async collect () { // 收藏商品
|
||||
async collect() {
|
||||
// 收藏商品
|
||||
if (this.isCollected) {
|
||||
let cancel = await cancelCollect('GOODS', this.skuDetail.id)
|
||||
let cancel = await cancelCollect("GOODS", this.skuDetail.id);
|
||||
if (cancel.success) {
|
||||
this.$Message.success('取消收藏成功')
|
||||
this.isCollected = false
|
||||
this.$Message.success("取消收藏成功");
|
||||
this.isCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectGoods('GOODS', this.skuDetail.id);
|
||||
let collect = await collectGoods("GOODS", this.skuDetail.id);
|
||||
if (collect.code === 200) {
|
||||
this.isCollected = true;
|
||||
this.$Message.success('收藏商品成功,可以前往个人中心我的收藏查看');
|
||||
this.$Message.success("收藏商品成功,可以前往个人中心我的收藏查看");
|
||||
}
|
||||
}
|
||||
},
|
||||
// 格式化数据
|
||||
formatSku (list) {
|
||||
formatSku(list) {
|
||||
let arr = [{}];
|
||||
list.forEach((item, index) => {
|
||||
item.specValues.forEach((spec, specIndex) => {
|
||||
let name = spec.specName;
|
||||
let values = {
|
||||
value: spec.specValue,
|
||||
quantity: item.quantity
|
||||
quantity: item.quantity,
|
||||
};
|
||||
if (name === 'images') {
|
||||
if (name === "images") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -275,7 +361,7 @@ export default {
|
||||
if (!keys.includes(name)) {
|
||||
arr.push({
|
||||
name: name,
|
||||
values: [values]
|
||||
values: [values],
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -286,55 +372,58 @@ export default {
|
||||
|
||||
let cur = list.filter((i) => i.skuId === this.$route.query.skuId)[0];
|
||||
if (cur) {
|
||||
cur.specValues.filter((i) => i.specName !== 'images')
|
||||
cur.specValues
|
||||
.filter((i) => i.specName !== "images")
|
||||
.forEach((value, _index) => {
|
||||
this.currentSelceted[_index] = value.specValue;
|
||||
});
|
||||
}
|
||||
this.skuList = list;
|
||||
},
|
||||
receiveCoupon (id) { // 领取优惠券
|
||||
receiveCoupon(id).then(res => {
|
||||
receiveCoupon(id) {
|
||||
// 领取优惠券
|
||||
receiveCoupon(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('优惠券领取成功')
|
||||
this.$Message.success("优惠券领取成功");
|
||||
} else {
|
||||
this.$Message.warning(res.message)
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
promotion () { // 格式化促销活动,返回当前促销的对象
|
||||
promotion() {
|
||||
// 格式化促销活动,返回当前促销的对象
|
||||
if (!this.detail.promotionMap) return false;
|
||||
let keysArr = Object.keys(this.detail.promotionMap);
|
||||
if (keysArr.length === 0) return false;
|
||||
|
||||
for (let i = 0; i < keysArr.length; i++) {
|
||||
let key = keysArr[i].split('-')[0]
|
||||
if (key === 'COUPON') {
|
||||
this.promotionMap[key].push(this.detail.promotionMap[keysArr[i]])
|
||||
let key = keysArr[i].split("-")[0];
|
||||
if (key === "COUPON") {
|
||||
this.promotionMap[key].push(this.detail.promotionMap[keysArr[i]]);
|
||||
} else {
|
||||
this.promotionMap[key] = this.detail.promotionMap[keysArr[i]]
|
||||
this.promotionMap[key] = this.detail.promotionMap[keysArr[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
// 用户登录才会判断是否收藏
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('GOODS', this.skuDetail.id).then(res => {
|
||||
if (this.Cookies.getItem("userInfo")) {
|
||||
isCollection("GOODS", this.skuDetail.id).then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.isCollected = true;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
this.detail.data.specList.forEach(e => {
|
||||
if (e.specName === 'images') {
|
||||
this.imgList = e.specImage
|
||||
this.detail.data.specList.forEach((e) => {
|
||||
if (e.specName === "images") {
|
||||
this.imgList = e.specImage;
|
||||
}
|
||||
})
|
||||
});
|
||||
this.formatSku(this.goodsSpecList);
|
||||
this.promotion()
|
||||
document.title = this.skuDetail.goodsName
|
||||
}
|
||||
this.promotion();
|
||||
document.title = this.skuDetail.goodsName;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -346,7 +435,6 @@ export default {
|
||||
}
|
||||
.inventory {
|
||||
padding-left: 4px;
|
||||
|
||||
}
|
||||
|
||||
.global_color {
|
||||
@@ -597,7 +685,7 @@ export default {
|
||||
|
||||
.add-buy-car {
|
||||
margin-top: 15px;
|
||||
>*{
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
@@ -607,7 +695,7 @@ export default {
|
||||
justify-content: space-between;
|
||||
> span {
|
||||
padding-right: 10px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<script>
|
||||
import storage from '@/plugins/storage.js';
|
||||
import { cartGoodsAll } from '@/api/cart.js';
|
||||
import { logout } from '@/api/account.js';
|
||||
export default {
|
||||
name: 'M-Header',
|
||||
created () {
|
||||
@@ -120,12 +121,14 @@ export default {
|
||||
window.open(url.href, '_blank');
|
||||
},
|
||||
signOutFun () { // 退出登录
|
||||
storage.removeItem('accessToken');
|
||||
storage.removeItem('refreshToken');
|
||||
storage.removeItem('userInfo');
|
||||
storage.removeItem('cartNum');
|
||||
this.$store.commit('SET_CARTNUM', 0)
|
||||
this.$router.push('/login');
|
||||
logout().then(res => {
|
||||
storage.removeItem('accessToken');
|
||||
storage.removeItem('refreshToken');
|
||||
storage.removeItem('userInfo');
|
||||
storage.removeItem('cartNum');
|
||||
this.$store.commit('SET_CARTNUM', 0)
|
||||
this.$router.push('/login');
|
||||
});
|
||||
},
|
||||
goUserCenter (path) {
|
||||
// 跳转我的订单,我的足迹、收藏等
|
||||
|
||||
@@ -2,92 +2,105 @@
|
||||
<div class="scroll-show">
|
||||
<div class="content clearfix">
|
||||
<cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
|
||||
<Search class="search-con" :hover="true" :showLogo="false" :showTag="false"></Search>
|
||||
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
|
||||
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
<Search
|
||||
class="search-con"
|
||||
:hover="true"
|
||||
:showLogo="false"
|
||||
:showTag="false"
|
||||
></Search>
|
||||
<Icon
|
||||
type="ios-cart-outline"
|
||||
@click="goCartList"
|
||||
class="cart-icon"
|
||||
@mouseenter.native="getCartList"
|
||||
/>
|
||||
<i class="cart-badge">{{ cartNum < 100 ? cartNum : "99" }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {cartCount} from '@/api/cart.js'
|
||||
import storage from '@/plugins/storage.js';
|
||||
import { cartCount } from "@/api/cart.js";
|
||||
import storage from "@/plugins/storage.js";
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {} // 用户信息
|
||||
}
|
||||
userInfo: {}, // 用户信息
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cartNum () { // 购物车商品数量
|
||||
return this.$store.state.cartNum
|
||||
}
|
||||
cartNum() {
|
||||
// 购物车商品数量
|
||||
return this.$store.state.cartNum;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
goCartList () { // 跳转购物车页面
|
||||
goCartList() {
|
||||
// 跳转购物车页面
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/cart'
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
path: "/cart",
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
getCartList () { // 获取购物车列表
|
||||
if (storage.getItem('userInfo')) {
|
||||
cartCount().then(res => {
|
||||
this.$store.commit('SET_CARTNUM', res.result)
|
||||
this.Cookies.setItem('cartNum', res.result)
|
||||
})
|
||||
getCartList() {
|
||||
// 获取购物车列表
|
||||
if (storage.getItem("userInfo")) {
|
||||
cartCount().then((res) => {
|
||||
this.$store.commit("SET_CARTNUM", res.result);
|
||||
this.Cookies.setItem("cartNum", res.result);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (storage.getItem("userInfo")) {
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (storage.getItem('userInfo')) {
|
||||
this.userInfo = JSON.parse(storage.getItem('userInfo'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
position: relative;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px!important;
|
||||
}
|
||||
.search-con{
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 10px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
top: 3px;
|
||||
.content {
|
||||
width: 1200px;
|
||||
height: 40px;
|
||||
margin: 10px auto;
|
||||
position: relative;
|
||||
}
|
||||
.cate {
|
||||
float: left;
|
||||
width: 200px !important;
|
||||
}
|
||||
.search-con {
|
||||
float: left;
|
||||
width: 800px;
|
||||
overflow: hidden;
|
||||
margin-top: -27px;
|
||||
}
|
||||
.cart-icon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
font-size: 25px;
|
||||
margin-top: 8px;
|
||||
color: $theme_color;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.cart-badge {
|
||||
position: absolute;
|
||||
font-style: normal;
|
||||
right: 165px;
|
||||
display: block;
|
||||
background-color: $theme_color;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 10px;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
top: 3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,13 +2,19 @@
|
||||
<div class="model-item" v-if="element && element.key">
|
||||
<!-- 轮播图模块,包括个人信息,快捷导航模块 -->
|
||||
<template v-if="element.type == 'carousel'">
|
||||
<model-carousel :data="element" class="mb_20 width_1200_auto"></model-carousel>
|
||||
<model-carousel
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel1'">
|
||||
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel2'">
|
||||
<model-carousel2 :data="element" class="mb_20 width_1200_auto"></model-carousel2>
|
||||
<model-carousel2
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel2>
|
||||
</template>
|
||||
<!-- 热门广告 -->
|
||||
<template v-if="element.type == 'hotAdvert'">
|
||||
@@ -37,13 +43,16 @@
|
||||
</template>
|
||||
<!-- 限时秒杀 待完善 -->
|
||||
<template v-if="element.type == 'seckill' && element.options.list.length">
|
||||
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
|
||||
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
|
||||
</template>
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{'backgroundImage' :'url(' + require('@/assets/images/decorate.png') + ')'}"
|
||||
:style="{
|
||||
backgroundImage:
|
||||
'url(' + require('@/assets/images/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
@@ -74,41 +83,53 @@
|
||||
</template>
|
||||
<!-- 新品排行 -->
|
||||
<template v-if="element.type == 'newGoodsSort'">
|
||||
<new-goods-sort :data="element" class="mb_20 width_1200_auto"></new-goods-sort>
|
||||
<new-goods-sort
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></new-goods-sort>
|
||||
</template>
|
||||
<!-- 首页广告 -->
|
||||
<template v-if="element.type == 'firstAdvert'">
|
||||
<first-page-advert :data="element" class="mb_20 width_1200_auto"></first-page-advert>
|
||||
<first-page-advert
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></first-page-advert>
|
||||
</template>
|
||||
<!-- 横幅广告 -->
|
||||
<template v-if="element.type == 'bannerAdvert'">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer mb_20"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
<div style="width: 100%; text-align: center">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer mb_20"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="element.type == 'notEnough'">
|
||||
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
|
||||
<template v-if="element.type == 'notEnough'"
|
||||
>
|
||||
<not-enough
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></not-enough>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModelCarousel from './modelList/Carousel.vue';
|
||||
import ModelCarousel1 from './modelList/Carousel1.vue';
|
||||
import ModelCarousel2 from './modelList/Carousel2.vue';
|
||||
import FirstPageAdvert from './modelList/FirstPageAdvert.vue';
|
||||
import NewGoodsSort from './modelList/NewGoodsSort.vue';
|
||||
import Recommend from './modelList/Recommend.vue';
|
||||
import NotEnough from './modelList/NotEnough.vue';
|
||||
import Seckill from './modelList/Seckill.vue';
|
||||
import ModelCarousel from "./modelList/Carousel.vue";
|
||||
import ModelCarousel1 from "./modelList/Carousel1.vue";
|
||||
import ModelCarousel2 from "./modelList/Carousel2.vue";
|
||||
import FirstPageAdvert from "./modelList/FirstPageAdvert.vue";
|
||||
import NewGoodsSort from "./modelList/NewGoodsSort.vue";
|
||||
import Recommend from "./modelList/Recommend.vue";
|
||||
import NotEnough from "./modelList/NotEnough.vue";
|
||||
import Seckill from "./modelList/Seckill.vue";
|
||||
|
||||
export default {
|
||||
name: 'modelFormItem',
|
||||
props: ['element', 'select', 'index', 'data'],
|
||||
name: "modelFormItem",
|
||||
props: ["element", "select", "index", "data"],
|
||||
components: {
|
||||
ModelCarousel,
|
||||
ModelCarousel1,
|
||||
@@ -117,20 +138,20 @@ export default {
|
||||
NewGoodsSort,
|
||||
FirstPageAdvert,
|
||||
NotEnough,
|
||||
Seckill
|
||||
Seckill,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
showModal: false, // 控制模态框显隐
|
||||
selected: {} // 已选数据
|
||||
selected: {}, // 已选数据
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.model-item {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/** 热门广告 */
|
||||
@@ -177,7 +198,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.width_1200_auto{
|
||||
.width_1200_auto {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
|
||||
@@ -23,12 +23,18 @@
|
||||
<div class="person-msg">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<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">
|
||||
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
||||
<Button class="btns" shape="circle" @click="$router.push('home')"
|
||||
>会员中心</Button
|
||||
>
|
||||
</div>
|
||||
<div v-else>
|
||||
<Button type="error" @click="$router.push('login')" shape="circle"
|
||||
<Button class="btns" @click="$router.push('login')" shape="circle"
|
||||
>请登录</Button
|
||||
>
|
||||
</div>
|
||||
@@ -37,8 +43,14 @@
|
||||
<div>
|
||||
<span>常见问题</span>
|
||||
<ul class="article-list">
|
||||
<li class="ellipsis" :alt="article.title" v-for="(article, index) in articleList" :key="index" @click="goArticle(article.id)">
|
||||
{{article.title}}
|
||||
<li
|
||||
class="ellipsis"
|
||||
:alt="article.title"
|
||||
v-for="(article, index) in articleList"
|
||||
:key="index"
|
||||
@click="goArticle(article.id)"
|
||||
>
|
||||
{{ article.title }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -49,43 +61,48 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {articleList} from '@/api/common.js'
|
||||
import storage from '@/plugins/storage';
|
||||
import { articleList } from "@/api/common.js";
|
||||
import storage from "@/plugins/storage";
|
||||
export default {
|
||||
name: 'modelCarousel',
|
||||
props: ['data'],
|
||||
data () {
|
||||
name: "modelCarousel",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
config: require("@/config"),
|
||||
userInfo: {}, // 用户信息
|
||||
articleList: [], // 常见问题
|
||||
params: { // 请求常见问题参数
|
||||
params: {
|
||||
// 请求常见问题参数
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
type: 'ANNOUNCEMENT',
|
||||
sort: 'sort'
|
||||
}
|
||||
type: "ANNOUNCEMENT",
|
||||
sort: "sort",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getArticleList () { // 获取常见问题列表
|
||||
articleList(this.params).then(res => {
|
||||
getArticleList() {
|
||||
// 获取常见问题列表
|
||||
articleList(this.params).then((res) => {
|
||||
if (res.success) {
|
||||
this.articleList = res.result.records
|
||||
this.articleList = res.result.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
goArticle (id) { // 跳转文章详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/article',
|
||||
query: {id}
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
}
|
||||
},
|
||||
goArticle(id) {
|
||||
// 跳转文章详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/article",
|
||||
query: { id },
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (storage.getItem("userInfo"))
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
this.getArticleList();
|
||||
},
|
||||
mounted () {
|
||||
if (storage.getItem('userInfo')) this.userInfo = JSON.parse(storage.getItem('userInfo'));
|
||||
this.getArticleList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -96,6 +113,16 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btns {
|
||||
background-color:#363634 ;
|
||||
line-height:30px;
|
||||
color: white !important;
|
||||
}
|
||||
.btns:hover {
|
||||
background-color: #363634;
|
||||
line-height:32px !important;
|
||||
color: #e5d790 !important;
|
||||
}
|
||||
/* 导航主体 */
|
||||
.nav-body {
|
||||
width: 1200px;
|
||||
@@ -128,12 +155,14 @@ export default {
|
||||
flex-direction: column;
|
||||
margin: 20px auto;
|
||||
button {
|
||||
height: 25px !important;
|
||||
height: 30px !important;
|
||||
margin-top: 10px;
|
||||
line-height: 30px;
|
||||
border: none;
|
||||
}
|
||||
.ivu-btn-default {
|
||||
color: $theme_color;
|
||||
border-color: $theme_color;
|
||||
// color: $theme_color;
|
||||
// border-color: $theme_color;
|
||||
}
|
||||
img {
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="person-msg">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<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">
|
||||
<Button type="error" shape="circle">会员中心</Button>
|
||||
</div>
|
||||
@@ -57,6 +57,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {articleList} from '@/api/common.js'
|
||||
import storage from '@/plugins/storage';
|
||||
export default {
|
||||
@@ -64,6 +65,7 @@ export default {
|
||||
props: ['data'],
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
userInfo: {}, // 用户信息
|
||||
articleList: [], // 常见问题
|
||||
params: { // 请求常见问题参数
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<div class="not-enough">
|
||||
<ul class="nav-bar">
|
||||
<li
|
||||
v-for="(item, index) in conData.options.navList"
|
||||
:class="currentIndex === index ? 'curr' : ''"
|
||||
@click="changeCurr(index)"
|
||||
:key="index"
|
||||
>
|
||||
<p>{{ item.title }}</p>
|
||||
<p>{{ item.desc }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="not-enough" ref="obtain" id="demo">
|
||||
<Affix :offset-top="62" @on-change="change">
|
||||
<ul class="nav-bar" v-show="topSearchShow">
|
||||
<li
|
||||
v-for="(item, index) in conData.options.navList"
|
||||
:class="currentIndex === index ? 'curr' : ''"
|
||||
@click="changeCurr(index)"
|
||||
:key="index"
|
||||
>
|
||||
<p @click="gotoDemo">{{ item.title }}</p>
|
||||
<p @click="gotoDemo">{{ item.desc }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</Affix>
|
||||
<div class="content" v-if="showContent">
|
||||
<div
|
||||
v-for="(item, index) in conData.options.list[currentIndex]"
|
||||
@@ -29,17 +31,26 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
window.addEventListener('scroll',this.handleScrollx,true)
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
screenHeight:document.body.clientHeight,
|
||||
scrollHieght:0,
|
||||
topSearchShow: true, //展示 导航条
|
||||
topIndex: 0, // 当前滚动条位置 (取整)
|
||||
scrollTops: 0,
|
||||
open:'',
|
||||
currentIndex: 0, // 当前分类下标
|
||||
conData: this.data, // 装修数据
|
||||
showContent: true // 是否展示内容
|
||||
showContent: true, // 是否展示内容
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -47,14 +58,40 @@ export default {
|
||||
this.conData = val;
|
||||
},
|
||||
conData: function (val) {
|
||||
this.$emit('content', val);
|
||||
}
|
||||
this.$emit("content", val);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changeCurr (index) { // 选择分类
|
||||
this.currentIndex = index;
|
||||
handleScrollx(){
|
||||
// console.log('滚动高度',window.pageYOffset) // 获取滚动条的高度
|
||||
// console.log(this.$refs.obtain.getBoundingClientRect().top) //获取到距离顶部的距离
|
||||
this.scrollHieght = Number(window.pageYOffset);//获取到距离顶部的距离
|
||||
this.scrollTops = Number(this.$refs.obtain.getBoundingClientRect().top); // 获取到距离顶部的距离
|
||||
this.topSearchShow = true; // 展示图钉
|
||||
if(this.scrollTops < -660){ // 超过隐藏
|
||||
this.topSearchShow = false;
|
||||
}
|
||||
},
|
||||
toguid(path,id){
|
||||
var path =path;
|
||||
var Id = id;
|
||||
localStorage.setItem('toId',Id);
|
||||
this.$router.push(path);
|
||||
},
|
||||
change(status){ //获取是否获取到图钉
|
||||
this.open = status
|
||||
},
|
||||
gotoDemo(){ // 跳转到demo的位置
|
||||
if(this.open){ // 获取到图钉之后在跳转当前位置
|
||||
document.querySelector("#demo").scrollIntoView(true);
|
||||
}
|
||||
}
|
||||
//scrollIntoView()可以在所有的HTML元素上调用,通过滚动浏览器窗口或某个容器元素
|
||||
},
|
||||
changeCurr(index) {
|
||||
// 选择分类
|
||||
this.currentIndex = index;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -63,10 +100,13 @@ export default {
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
background-color: rgb(218, 217, 217);
|
||||
background-color: #f8f8f8;
|
||||
height: 60px;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
position: sticky;
|
||||
position: -webkit-sticky;
|
||||
top: 0;
|
||||
li {
|
||||
padding: 0 30px;
|
||||
text-align: center;
|
||||
@@ -140,5 +180,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<script>
|
||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||
import { handleRegion } from '@/api/address.js';
|
||||
|
||||
export default {
|
||||
name: 'map',
|
||||
props: {
|
||||
@@ -41,6 +42,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
showMap: false, // 展示地图
|
||||
mapSearch: '', // 地图搜索
|
||||
map: null, // 初始化地图
|
||||
@@ -88,7 +90,7 @@ export default {
|
||||
},
|
||||
init () { // 初始化地图
|
||||
AMapLoader.load({
|
||||
key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
key: this.config.aMapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: [
|
||||
'AMap.ToolBar',
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
<template>
|
||||
<div class="cate-nav">
|
||||
<div class="nav-con">
|
||||
<div class="all-categories hover-pointer" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">全部商品分类</div>
|
||||
<div
|
||||
class="all-categories hover-pointer"
|
||||
@mouseenter="showFirstList = true"
|
||||
@mouseleave="showFirstList = false"
|
||||
>
|
||||
全部商品分类
|
||||
</div>
|
||||
<ul class="nav-item" v-if="showNavBar">
|
||||
<li
|
||||
class="nav-lis"
|
||||
v-for="(item, index) in navList.list"
|
||||
:key="index"
|
||||
@click="linkTo(item.url)"
|
||||
@@ -13,15 +20,35 @@
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 全部商品分类 -->
|
||||
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
|
||||
<div
|
||||
class="cate-list"
|
||||
v-show="showAlways || showFirstList"
|
||||
@mouseenter="showFirstList = true"
|
||||
@mouseleave="showFirstList = false"
|
||||
>
|
||||
<!-- 第一级分类 -->
|
||||
<div class="nav-side" :class="{'large-nav': large, 'opacity-nav': opacity}" @mouseleave="panel = false">
|
||||
<div
|
||||
class="nav-side"
|
||||
:class="{ 'large-nav': large, 'opacity-nav': opacity }"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<ul>
|
||||
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
|
||||
<li
|
||||
v-for="(item, index) in cateList"
|
||||
:key="index"
|
||||
@mouseenter="showDetail(index)"
|
||||
>
|
||||
<span class="nav-side-item" @click="goGoodsList(item.id)">{{
|
||||
item.name
|
||||
}}</span>
|
||||
<span v-for="(second, secIndex) in item.children" :key="secIndex">
|
||||
<span v-if="secIndex < 2" > / </span>
|
||||
<span @click="goGoodsList(second.id, second.parentId)" class="nav-side-item" v-if="secIndex < 2">{{second.name}}</span>
|
||||
<span v-if="secIndex < 2"> / </span>
|
||||
<span
|
||||
@click="goGoodsList(second.id, second.parentId)"
|
||||
class="nav-side-item"
|
||||
v-if="secIndex < 2"
|
||||
>{{ second.name }}</span
|
||||
>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -29,14 +56,19 @@
|
||||
<!-- 展开分类 -->
|
||||
<div
|
||||
class="detail-item-panel"
|
||||
:style="{'minHeight': large?'470px':'340px'}"
|
||||
:style="{ minHeight: large ? '470px' : '340px' }"
|
||||
v-show="panel"
|
||||
@mouseenter="panel = true"
|
||||
@mouseleave="panel = false"
|
||||
>
|
||||
<div class="nav-detail-item">
|
||||
<template v-for="(item, index) in panelData">
|
||||
<span @click="goGoodsList(item.id, item.parentId)" v-if="index < 8" :key="index">{{ item.name }}<Icon type="ios-arrow-forward" /></span>
|
||||
<span
|
||||
@click="goGoodsList(item.id, item.parentId)"
|
||||
v-if="index < 8"
|
||||
:key="index"
|
||||
>{{ item.name }}<Icon type="ios-arrow-forward"
|
||||
/></span>
|
||||
</template>
|
||||
</div>
|
||||
<ul>
|
||||
@@ -45,13 +77,21 @@
|
||||
:key="index"
|
||||
class="detail-item-row"
|
||||
>
|
||||
<span class="detail-item-title" @click="goGoodsList(items.id,items.parentId)">
|
||||
<span
|
||||
class="detail-item-title"
|
||||
@click="goGoodsList(items.id, items.parentId)"
|
||||
>
|
||||
{{ items.name }} <Icon type="ios-arrow-forward" />
|
||||
<span class="glyphicon glyphicon-menu-right"></span>
|
||||
</span>
|
||||
<div>
|
||||
<span v-for="(item, subIndex) in items.children" @click="goGoodsList(item.id,items.id,items.parentId)"
|
||||
:key="subIndex" class="detail-item">{{ item.name }}</span>
|
||||
<span
|
||||
v-for="(item, subIndex) in items.children"
|
||||
@click="goGoodsList(item.id, items.id, items.parentId)"
|
||||
:key="subIndex"
|
||||
class="detail-item"
|
||||
>{{ item.name }}</span
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -61,101 +101,116 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCategory } from '@/api/goods';
|
||||
import storage from '@/plugins/storage.js'
|
||||
import { getCategory } from "@/api/goods";
|
||||
import storage from "@/plugins/storage.js";
|
||||
export default {
|
||||
name: 'GoodsListNav',
|
||||
name: "GoodsListNav",
|
||||
props: {
|
||||
showAlways: { // 总是显示下拉分类
|
||||
showAlways: {
|
||||
// 总是显示下拉分类
|
||||
default: false,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
showNavBar: { // 显示全部商品分类右侧导航条
|
||||
showNavBar: {
|
||||
// 显示全部商品分类右侧导航条
|
||||
default: true,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
hover: {
|
||||
default: false,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
large: { // 是否更高的高度
|
||||
large: {
|
||||
// 是否更高的高度
|
||||
default: false,
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
opacity: { // 是否背景透明
|
||||
opacity: {
|
||||
// 是否背景透明
|
||||
default: false,
|
||||
type: Boolean
|
||||
}
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
panel: false, // 二级分类展示
|
||||
panelData: [], // 二级分类数据
|
||||
showFirstList: false, // 始终展示一级列表
|
||||
cateList: [] // 商品分类
|
||||
}
|
||||
cateList: [], // 商品分类
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
navList () { // 导航列表
|
||||
if (storage.getItem('navList')) {
|
||||
return JSON.parse(storage.getItem('navList'))
|
||||
navList() {
|
||||
// 导航列表
|
||||
if (storage.getItem("navList")) {
|
||||
return JSON.parse(storage.getItem("navList"));
|
||||
} else {
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getCate () { // 获取分类数据
|
||||
getCate() {
|
||||
// 获取分类数据
|
||||
if (this.hover) return false;
|
||||
getCategory(0).then(res => {
|
||||
getCategory(0).then((res) => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
this.$store.commit('SET_CATEGORY', res.result)
|
||||
this.$store.commit("SET_CATEGORY", res.result);
|
||||
// 过期时间
|
||||
var expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
// 存放过期时间
|
||||
localStorage.setItem('category_expiration_time', expirationTime);
|
||||
localStorage.setItem("category_expiration_time", expirationTime);
|
||||
// 存放分类信息
|
||||
localStorage.setItem('category', JSON.stringify(res.result))
|
||||
localStorage.setItem("category", JSON.stringify(res.result));
|
||||
}
|
||||
});
|
||||
},
|
||||
showDetail (index) { // 展示全部分类
|
||||
this.panel = true
|
||||
this.panelData = this.cateList[index].children
|
||||
showDetail(index) {
|
||||
// 展示全部分类
|
||||
this.panel = true;
|
||||
this.panelData = this.cateList[index].children;
|
||||
},
|
||||
goGoodsList (id, secondId, firstId) { // 分类共有三级,传全部分类过去
|
||||
const arr = [firstId, secondId, id]
|
||||
goGoodsList(id, secondId, firstId) {
|
||||
// 分类共有三级,传全部分类过去
|
||||
const arr = [firstId, secondId, id];
|
||||
if (!arr[1]) {
|
||||
arr.splice(0, 2)
|
||||
arr.splice(0, 2);
|
||||
}
|
||||
if (!arr[0]) {
|
||||
arr.shift()
|
||||
arr.shift();
|
||||
}
|
||||
let routerUrl = this.$router.resolve({
|
||||
path: '/goodsList',
|
||||
query: {categoryId: arr.toString()}
|
||||
})
|
||||
window.open(routerUrl.href, '_blank')
|
||||
}
|
||||
path: "/goodsList",
|
||||
query: { categoryId: arr.toString() },
|
||||
});
|
||||
window.open(routerUrl.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
if (localStorage.getItem('category') && localStorage.getItem('category_expiration_time')) {
|
||||
mounted() {
|
||||
if (
|
||||
localStorage.getItem("category") &&
|
||||
localStorage.getItem("category_expiration_time")
|
||||
) {
|
||||
// 如果缓存过期,则获取最新的信息
|
||||
if (new Date() > localStorage.getItem('category_expiration_time')) {
|
||||
if (new Date() > localStorage.getItem("category_expiration_time")) {
|
||||
this.getCate();
|
||||
return;
|
||||
}
|
||||
this.cateList = JSON.parse(localStorage.getItem('category'))
|
||||
this.cateList = JSON.parse(localStorage.getItem("category"));
|
||||
} else {
|
||||
this.getCate()
|
||||
this.getCate();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cate-nav{
|
||||
.nav-lis:hover {
|
||||
color: $theme_color !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cate-nav {
|
||||
width: 1200px;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
@@ -173,6 +228,7 @@ export default {
|
||||
background-color: $theme_color;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.nav-item {
|
||||
width: 1000px;
|
||||
@@ -180,22 +236,22 @@ export default {
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
background-color: #eee;
|
||||
// background-color: #eee;
|
||||
display: flex;
|
||||
li {
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
margin-left: 20px;
|
||||
color: rgb(89, 88, 88);
|
||||
color: rgb(129, 127, 127);
|
||||
font-size: 15px;
|
||||
&:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分类列表
|
||||
.cate-list{
|
||||
.cate-list {
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
@@ -210,14 +266,14 @@ export default {
|
||||
height: 335px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.large-nav{
|
||||
.large-nav {
|
||||
height: 470px;
|
||||
ul>li{
|
||||
ul > li {
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.opacity-nav{
|
||||
background-color:rgba(0,0,0,.5);
|
||||
.opacity-nav {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.nav-side ul {
|
||||
width: 100%;
|
||||
@@ -230,13 +286,13 @@ export default {
|
||||
padding-left: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
&:hover{
|
||||
&:hover {
|
||||
background: #999395;
|
||||
}
|
||||
}
|
||||
.nav-side-item:hover {
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
|
||||
/*显示商品详细信息*/
|
||||
@@ -265,7 +321,7 @@ export default {
|
||||
background-color: #6e6568;
|
||||
}
|
||||
.nav-detail-item span:hover {
|
||||
background-color: $theme_color;
|
||||
background-color: #e1251b;
|
||||
}
|
||||
.detail-item-panel li {
|
||||
line-height: 30px;
|
||||
@@ -280,11 +336,13 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
.detail-item-title:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
.detail-item-row {
|
||||
.detail-item-row {
|
||||
display: flex;
|
||||
>div{flex: 1;}
|
||||
> div {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.detail-item {
|
||||
font-size: 12px;
|
||||
@@ -292,12 +350,12 @@ export default {
|
||||
padding-right: 8px;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid #ccc;
|
||||
&:first-child{
|
||||
&:first-child {
|
||||
border: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
.detail-item:hover {
|
||||
color: $theme_color;
|
||||
color: #e1251b;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -545,7 +545,7 @@ export default {
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
float: left;
|
||||
line-height: 50px;
|
||||
line-height: 45px;
|
||||
border: 1px solid #ddd;
|
||||
margin: -1px -1px 0 0;
|
||||
overflow: hidden;
|
||||
@@ -558,6 +558,7 @@ export default {
|
||||
|
||||
&:hover {
|
||||
border-color: $theme_color;
|
||||
border: 2px solid $theme_color;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: relative;
|
||||
@@ -666,7 +667,7 @@ export default {
|
||||
height: 30px;
|
||||
float: left;
|
||||
line-height: 30px;
|
||||
color: $primary_color;
|
||||
color:#4d9cf1;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
font-size: 12px;
|
||||
@@ -716,11 +717,13 @@ export default {
|
||||
}
|
||||
.more-options{
|
||||
margin: 5px;
|
||||
color: #2d8cf0;
|
||||
color: #4d9cf1;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.more-options:hover{
|
||||
color:#0165d1;
|
||||
}
|
||||
/** 其他筛选项 end */
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js';
|
||||
*/
|
||||
export function getVerifyImg (verificationEnums) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${verificationEnums}`,
|
||||
method: Method.GET,
|
||||
needToken: false,
|
||||
headers: {uuid: storage.getItem('uuid')}
|
||||
@@ -19,7 +19,7 @@ export function getVerifyImg (verificationEnums) {
|
||||
*/
|
||||
export function postVerifyImg (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/slider/${params.verificationEnums}`,
|
||||
url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
|
||||
method: Method.POST,
|
||||
needToken: false,
|
||||
params,
|
||||
|
||||
@@ -1,49 +1,12 @@
|
||||
export default {
|
||||
/**
|
||||
* @description 配置显示在浏览器标签的title
|
||||
*/
|
||||
title: 'Lili电商',
|
||||
/**
|
||||
* @description token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
cookieExpires: 1,
|
||||
/**
|
||||
* @description 是否使用国际化,默认为false
|
||||
* 如果不使用,则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
|
||||
* 用来在菜单中显示文字
|
||||
*/
|
||||
useI18n: false,
|
||||
/**
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// 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 需要加载的插件
|
||||
*/
|
||||
plugin: {
|
||||
'error-store': {
|
||||
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
||||
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
title: "lili-shop", //配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||
icpCard: "", // icp证
|
||||
company: {
|
||||
href: "https://pickmall.cn",
|
||||
name: "北京宏业汇成科技有限公司",
|
||||
}, //公司信息
|
||||
icpMessage: "京ICP备20009696号-1", //icp备案
|
||||
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
|
||||
enableCDN: false, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10000, //端口
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ import storage from '@/plugins/storage';
|
||||
// 全局引入封装组件
|
||||
import {InstallAll} from '@/components/global.js';
|
||||
|
||||
let title = require('@/config').title
|
||||
Vue.use(ViewUI);
|
||||
Vue.use(InstallAll);
|
||||
Vue.config.productionTip = false;
|
||||
@@ -20,7 +21,7 @@ Object.keys(filters).forEach(key => {
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
ViewUI.LoadingBar.start();
|
||||
window.document.title = to.meta.title === undefined ? 'lili shop' : to.meta.title
|
||||
window.document.title = to.meta.title === undefined ? title : to.meta.title
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<!-- LOGO 搜索 -->
|
||||
<div class="width_1200 logo">
|
||||
<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>
|
||||
购物车(<span>{{ goodsTotal }}</span>)
|
||||
购物车(<span>{{ goodsTotal }}</span
|
||||
>)
|
||||
</div>
|
||||
</div>
|
||||
<Search :showTag="false" :showLogo="false"></Search>
|
||||
@@ -17,9 +18,15 @@
|
||||
<div class="available-area">
|
||||
<div class="cart-steps">
|
||||
<span :class="stepIndex == 0 ? 'active' : ''">1.我的购物车</span>
|
||||
<Icon :class="stepIndex == 0 ? 'active-arrow' : ''" custom="icomoon icon-next"></Icon>
|
||||
<Icon
|
||||
:class="stepIndex == 0 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 1 ? 'active' : ''">2.填写订单信息</span>
|
||||
<Icon :class="stepIndex == 1 ? 'active-arrow' : ''" custom="icomoon icon-next"></Icon>
|
||||
<Icon
|
||||
:class="stepIndex == 1 ? 'active-arrow' : ''"
|
||||
custom="icomoon icon-next"
|
||||
></Icon>
|
||||
<span :class="stepIndex == 2 ? 'active' : ''">3.成功提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +34,9 @@
|
||||
<div class="cart-goods">
|
||||
<div class="cart-goods-title">
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')">全选</Checkbox>
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')"
|
||||
>全选</Checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="goods-title">商品</div>
|
||||
<div class="width_150">单价(元)</div>
|
||||
@@ -39,97 +48,156 @@
|
||||
<p>购物车空空如也</p>
|
||||
<router-link to="/">去选购></router-link>
|
||||
</div>
|
||||
<div v-else class="cart-goods-items" v-for="(shop, index) in cartList" :key="index">
|
||||
<div
|
||||
v-else
|
||||
class="cart-goods-items"
|
||||
v-for="(shop, index) in cartList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="shop-name">
|
||||
<div>
|
||||
<Checkbox v-model="shop.checked" @on-change="changeChecked(shop.checked, 'shop', shop.storeId)"></Checkbox>
|
||||
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{shop.storeName}}</span>
|
||||
<Checkbox
|
||||
v-model="shop.checked"
|
||||
@on-change="changeChecked(shop.checked, 'shop', shop.storeId)"
|
||||
></Checkbox>
|
||||
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{
|
||||
shop.storeName
|
||||
}}</span>
|
||||
</div>
|
||||
<span class="shop-coupon" v-if="shop.couponList.length" :class="couponAvailable === index ? 'shop-coupon-show' : ''" @click.stop="showCoupon(shop.id, index)">
|
||||
<span
|
||||
class="shop-coupon"
|
||||
v-if="shop.couponList.length"
|
||||
:class="couponAvailable === index ? 'shop-coupon-show' : ''"
|
||||
@click.stop="showCoupon(shop.id, index)"
|
||||
>
|
||||
<!-- 优惠券模态框 -->
|
||||
<div v-if="couponAvailable === index">
|
||||
<div class="coupon-item" v-for="(item, index) in shop.couponList" :key="index">
|
||||
<div
|
||||
class="coupon-item"
|
||||
v-for="(item, index) in shop.couponList"
|
||||
:key="index"
|
||||
>
|
||||
<span v-if="item.couponType === 'PRICE'">¥{{ item.price }}</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span>满{{item.consumeThreshold}}元可用</span>
|
||||
<Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button>
|
||||
<span v-if="item.couponType === 'DISCOUNT'"
|
||||
>{{ item.couponDiscount }}折</span
|
||||
>
|
||||
<span>满{{ item.consumeThreshold }}元可用</span>
|
||||
<Button
|
||||
class="coupon-btn"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="receiveShopCoupon(item)"
|
||||
:disabled="item.disabled"
|
||||
>{{ item.disabled ? "已领取" : "领取" }}</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<div class="promotion-notice">{{shop.promotionNotice}}</div>
|
||||
<div class="promotion-notice">{{ shop.promotionNotice }}</div>
|
||||
</div>
|
||||
<template v-for="(goods, goodsIndex) in shop.skuList">
|
||||
<div class="goods-item" :key="goodsIndex">
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="goods.checked" @on-change="changeChecked(goods.checked, 'goods', goods.goodsSku.id)"></Checkbox>
|
||||
<Checkbox
|
||||
v-model="goods.checked"
|
||||
@on-change="changeChecked(goods.checked, 'goods', goods.goodsSku.id)"
|
||||
></Checkbox>
|
||||
</div>
|
||||
<div class="goods-title" @click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)">
|
||||
<img :src="
|
||||
goods.goodsSku.thumbnail || '../assets/images/goodsDetail/item-detail-1.jpg'
|
||||
" />
|
||||
<div
|
||||
class="goods-title"
|
||||
@click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)"
|
||||
>
|
||||
<img
|
||||
:src="
|
||||
goods.goodsSku.thumbnail ||
|
||||
'../assets/images/goodsDetail/item-detail-1.jpg'
|
||||
"
|
||||
/>
|
||||
<div>
|
||||
<p>{{ goods.goodsSku.goodsName }}</p>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'SECKILL'">
|
||||
<div
|
||||
class="promotion"
|
||||
:key="promotionIndex"
|
||||
v-if="promotion.promotionType === 'SECKILL'"
|
||||
>
|
||||
<span>秒杀</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'FULL_DISCOUNT'">
|
||||
<div
|
||||
class="promotion"
|
||||
:key="promotionIndex"
|
||||
v-if="promotion.promotionType === 'FULL_DISCOUNT'"
|
||||
>
|
||||
<span>满优惠活动</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
</div>
|
||||
</template>
|
||||
<template v-for="(promotion, promotionIndex) in goods.promotions">
|
||||
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'COUPON'">
|
||||
<span>优惠券</span>
|
||||
<promotion :time="promotion.endTime" type="cart"></promotion>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="width_150">
|
||||
{{ goods.purchasePrice | unitPrice("¥") }}
|
||||
</div>
|
||||
<div class="width_100">
|
||||
<InputNumber :min="1" size="small" v-model="goods.num" @on-change="changeNum(goods.num, goods.goodsSku.id)"></InputNumber>
|
||||
<div class="fontsize_12">{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}</div>
|
||||
<InputNumber
|
||||
:min="1"
|
||||
size="small"
|
||||
v-model="goods.num"
|
||||
@on-change="changeNum(goods.num, goods.goodsSku.id)"
|
||||
></InputNumber>
|
||||
<div class="fontsize_12">
|
||||
{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="width_150">
|
||||
{{ goods.subTotal | unitPrice("¥") }}
|
||||
</div>
|
||||
<div class="width_100">
|
||||
<span class="handle-btn" v-if="!goods.errorMessage" @click="delGoods(goods.goodsSku.id)">删除</span>
|
||||
<span class="handle-btn" v-if="!goods.errorMessage" @click="collectGoods(goods.goodsSku.id)">收藏</span>
|
||||
<span
|
||||
class="handle-btn"
|
||||
v-if="!goods.errorMessage"
|
||||
@click="delGoods(goods.goodsSku.id)"
|
||||
>删除</span
|
||||
>
|
||||
<span
|
||||
class="handle-btn"
|
||||
v-if="!goods.errorMessage"
|
||||
@click="collectGoods(goods.goodsSku.id)"
|
||||
>收藏</span
|
||||
>
|
||||
</div>
|
||||
<div class="error-goods" v-if="goods.errorMessage">
|
||||
<div>{{goods.errorMessage}}</div>
|
||||
<div>{{ goods.errorMessage }}</div>
|
||||
<Button type="primary" @click="delGoods(goods.goodsSku.id)">删除</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
<!-- 底部支付栏 -->
|
||||
<div class="cart-goods-footer">
|
||||
<div>
|
||||
<div class="width_60">
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')">全选</Checkbox>
|
||||
<Checkbox v-model="allChecked" @on-change="changeChecked(allChecked, 'all')"
|
||||
>全选</Checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="width_100 handle-btn" @click="delGoods">删除选中商品</div>
|
||||
<div class="width_100 handle-btn" @click="delGoods()">删除选中商品</div>
|
||||
<!-- <div class="width_100 handle-btn" @click="collectGoods">移到我的收藏</div> -->
|
||||
<div class="width_100 handle-btn" @click="clearCart">清空购物车</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="selected-count">
|
||||
已选择<span>{{ checkedNum }}</span>件商品
|
||||
已选择<span>{{ checkedNum }}</span
|
||||
>件商品
|
||||
</div>
|
||||
<div class="ml_20 save-price">
|
||||
已节省<span>{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div class="ml_20 total-price">
|
||||
总价(不含运费):<div>{{ priceDetailDTO.flowPrice | unitPrice("¥") }}</div>
|
||||
总价(不含运费):
|
||||
<div>{{ priceDetailDTO.flowPrice | unitPrice("¥") }}</div>
|
||||
</div>
|
||||
<div class="pay ml_20" @click="pay">去结算</div>
|
||||
</div>
|
||||
@@ -142,21 +210,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from '@/components/goodsDetail/Promotion';
|
||||
import Search from '@/components/Search';
|
||||
import * as APICart from '@/api/cart';
|
||||
import * as APIMember from '@/api/member';
|
||||
import Promotion from "@/components/goodsDetail/Promotion";
|
||||
import Search from "@/components/Search";
|
||||
import * as APICart from "@/api/cart";
|
||||
import * as APIMember from "@/api/member";
|
||||
export default {
|
||||
name: 'Cart',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "Cart",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
components: {
|
||||
Search,
|
||||
Promotion
|
||||
Promotion,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
couponAvailable: false, // 展示优惠券
|
||||
stepIndex: 0, // 当前处于哪一步,购物车==0,填写订单信息==1,成功提交订单==2
|
||||
@@ -167,101 +235,103 @@ export default {
|
||||
cartList: [], // 购物车列表
|
||||
couponList: [], // 优惠券列表
|
||||
priceDetailDTO: {}, // 价格明细
|
||||
skuList: [] // sku列表
|
||||
skuList: [], // sku列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 跳转商品详情
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage (id) {
|
||||
goShopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: { id }
|
||||
path: "/Merchant",
|
||||
query: { id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 收藏商品
|
||||
collectGoods (id) {
|
||||
collectGoods(id) {
|
||||
this.$Modal.confirm({
|
||||
title: '收藏',
|
||||
content: '<p>商品收藏后可在个人中心我的收藏查看</p>',
|
||||
title: "收藏",
|
||||
content: "<p>商品收藏后可在个人中心我的收藏查看</p>",
|
||||
onOk: () => {
|
||||
APIMember.collectGoods('GOODS', id).then((res) => {
|
||||
APIMember.collectGoods("GOODS", id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('收藏商品成功');
|
||||
this.$Message.success("收藏商品成功");
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {}
|
||||
onCancel: () => {},
|
||||
});
|
||||
},
|
||||
// 删除商品
|
||||
delGoods (id) {
|
||||
delGoods(id) {
|
||||
const idArr = [];
|
||||
if (!id) {
|
||||
const list = this.cartList;
|
||||
list.forEach((shop) => {
|
||||
shop.skuList.forEach((goods) => {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
if(goods.checked) {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
idArr.push(id);
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: '删除',
|
||||
content: '<p>确定要删除该商品吗?</p>',
|
||||
title: "删除",
|
||||
content: "<p>确定要删除该商品吗?</p>",
|
||||
onOk: () => {
|
||||
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.$Message.success("删除成功");
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 清空购物车
|
||||
clearCart () {
|
||||
clearCart() {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
|
||||
title: "提示",
|
||||
content: "<p>确定要清空购物车吗?清空后不可恢复</p>",
|
||||
onOk: () => {
|
||||
APICart.clearCart().then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('清空购物车成功');
|
||||
this.$Message.success("清空购物车成功");
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 跳转支付页面
|
||||
pay () {
|
||||
pay() {
|
||||
if (this.checkedNum) {
|
||||
this.$router.push({ path: '/pay', query: { way: 'CART' } });
|
||||
this.$router.push({ path: "/pay", query: { way: "CART" } });
|
||||
} else {
|
||||
this.$Message.warning('请至少选择一件商品');
|
||||
this.$Message.warning("请至少选择一件商品");
|
||||
}
|
||||
},
|
||||
// 展示优惠券
|
||||
showCoupon (storeId, index) {
|
||||
showCoupon(storeId, index) {
|
||||
this.couponAvailable = index;
|
||||
},
|
||||
// 设置购买数量
|
||||
changeNum (val, id) {
|
||||
changeNum(val, id) {
|
||||
console.log(val, id);
|
||||
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
|
||||
console.log(res);
|
||||
@@ -271,12 +341,12 @@ export default {
|
||||
});
|
||||
},
|
||||
// 设置商品选中状态
|
||||
async changeChecked (status, type, id) {
|
||||
async changeChecked(status, type, id) {
|
||||
const check = status ? 1 : 0;
|
||||
if (type === 'all') {
|
||||
if (type === "all") {
|
||||
// 全选
|
||||
await APICart.setCheckedAll({ checked: check });
|
||||
} else if (type === 'shop') {
|
||||
} else if (type === "shop") {
|
||||
// 选中店铺所有商品
|
||||
await APICart.setCheckedSeller({ checked: check, storeId: id });
|
||||
} else {
|
||||
@@ -287,17 +357,17 @@ export default {
|
||||
this.getCartList();
|
||||
},
|
||||
// 领取优惠券
|
||||
async receiveShopCoupon (item) {
|
||||
async receiveShopCoupon(item) {
|
||||
let res = await APIMember.receiveCoupon(item.id);
|
||||
if (res.success) {
|
||||
this.$set(item, 'disabled', true);
|
||||
this.$Message.success('领取成功');
|
||||
this.$set(item, "disabled", true);
|
||||
this.$Message.success("领取成功");
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
},
|
||||
// 购物车列表
|
||||
async getCartList () {
|
||||
async getCartList() {
|
||||
this.loading = true;
|
||||
try {
|
||||
let res = await APICart.cartGoodsAll();
|
||||
@@ -326,15 +396,15 @@ export default {
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.getCartList();
|
||||
APICart.cartCount().then((res) => {
|
||||
// 购物车商品数量
|
||||
if (res.success) this.goodsTotal = res.result;
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -657,12 +727,12 @@ export default {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.cart-goods-footer > div{
|
||||
.cart-goods-footer > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.total-price{
|
||||
.total-price {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ export default {
|
||||
list: [], // 优惠券列表
|
||||
total: 0, // 优惠券总数
|
||||
params: { // 请求参数
|
||||
getType: 'FREE',
|
||||
pageNumber: 1,
|
||||
pageSize: 20
|
||||
}
|
||||
@@ -95,6 +96,7 @@ export default {
|
||||
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
|
||||
okText: '我的优惠券',
|
||||
cancelText: '立即使用',
|
||||
closable: true,
|
||||
onOk: () => {
|
||||
this.$router.push('/home/Coupons')
|
||||
},
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © {{year}} - Present
|
||||
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||
>lili-shop</a
|
||||
>{{config.title}}</a
|
||||
>
|
||||
版权所有
|
||||
</Row>
|
||||
@@ -108,6 +108,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as RegExp from '@/plugins/RegExp.js';
|
||||
import { md5 } from '@/plugins/md5.js';
|
||||
import * as apiLogin from '@/api/login.js';
|
||||
@@ -118,6 +119,7 @@ export default {
|
||||
components: { Verify },
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
loading: false, // 加载状态
|
||||
loading1: false, // 第二步加载状态
|
||||
formFirst: { // 手机验证码表单
|
||||
|
||||
@@ -13,14 +13,24 @@
|
||||
</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
<div class="store-collect">
|
||||
<span class="mr_10" v-if="goodsMsg.data"><router-link
|
||||
:to="'Merchant?id=' + goodsMsg.data.storeId">{{ goodsMsg.data.storeName }}</router-link></span>
|
||||
<span @click="collect"><Icon type="ios-heart"
|
||||
:color="storeCollected ? '#ed3f14' : '#666'"/>
|
||||
{{storeCollected ? '已收藏店铺' : '收藏店铺'}}
|
||||
</span>
|
||||
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon
|
||||
custom="icomoon icon-customer-service"/>联系客服</span>
|
||||
<span class="mr_10" v-if="goodsMsg.data">
|
||||
|
||||
<router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{ goodsMsg.data.storeName }}</router-link>
|
||||
</span>
|
||||
<span @click="collect">
|
||||
<Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />
|
||||
{{storeCollected ? '已收藏店铺' : '收藏店铺'}}
|
||||
</span>
|
||||
<!--
|
||||
先看下udesk merchantEuid 是否有值
|
||||
有的话 链接udesk
|
||||
没有的话 显示云智服
|
||||
-->
|
||||
<span class="ml_10" v-if="storeMsg.merchantEuid" @click="IMService()">联系客服</span>
|
||||
|
||||
<span v-else @click="connectCs(storeMsg.yzfSign)" class="ml_10">
|
||||
<Icon custom="icomoon icon-customer-service" />联系客服
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,128 +45,158 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from '@/components/Search';
|
||||
import ShopHeader from '@/components/header/ShopHeader';
|
||||
import ShowGoods from '@/components/goodsDetail/ShowGoods';
|
||||
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
|
||||
import {goodsSkuDetail} from '@/api/goods';
|
||||
import {cancelCollect, collectGoods, isCollection, getGoodsDistribution} from '@/api/member';
|
||||
import {getDetailById} from '@/api/shopentry'
|
||||
|
||||
import Search from "@/components/Search";
|
||||
import ShopHeader from "@/components/header/ShopHeader";
|
||||
import ShowGoods from "@/components/goodsDetail/ShowGoods";
|
||||
import ShowGoodsDetail from "@/components/goodsDetail/ShowGoodsDetail";
|
||||
import { goodsSkuDetail } from "@/api/goods";
|
||||
import {
|
||||
cancelCollect,
|
||||
collectGoods,
|
||||
isCollection,
|
||||
getGoodsDistribution,
|
||||
} from "@/api/member";
|
||||
import { getDetailById } from "@/api/shopentry";
|
||||
import { getIMDetail } from "@/api/common";
|
||||
export default {
|
||||
name: 'GoodsDetail',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "GoodsDetail",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
created () {
|
||||
created() {
|
||||
this.getGoodsDetail();
|
||||
// this.getIMDetailMethods();
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
goodsMsg: {}, // 商品信息
|
||||
isLoading: false, // 加载状态
|
||||
categoryBar: [], // 分类
|
||||
storeCollected: false, // 商品收藏
|
||||
storeMsg: {} // 店铺信息
|
||||
storeMsg: {}, // 店铺信息
|
||||
IMLink: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 跳转im客服
|
||||
IMService() {
|
||||
window.open(this.IM);
|
||||
},
|
||||
// 获取im信息
|
||||
async getIMDetailMethods() {
|
||||
let res = await getIMDetail();
|
||||
if (res.success) {
|
||||
this.IMLink = res.result;
|
||||
}
|
||||
},
|
||||
// 获取商品详情
|
||||
getGoodsDetail () {
|
||||
getGoodsDetail() {
|
||||
this.isLoading = true;
|
||||
const params = this.$route.query;
|
||||
// 分销员id
|
||||
let distributionId = (params && params.distributionId) ? params.distributionId : this.Cookies.getItem('distributionId');
|
||||
let distributionId =
|
||||
params && params.distributionId
|
||||
? params.distributionId
|
||||
: this.Cookies.getItem("distributionId");
|
||||
// 如果有分销信息
|
||||
if (distributionId) {
|
||||
console.log(distributionId)
|
||||
console.log(distributionId);
|
||||
// 先存储
|
||||
this.Cookies.setItem('distributionId', params.distributionId)
|
||||
this.Cookies.setItem("distributionId", params.distributionId);
|
||||
let _this = this;
|
||||
// 绑定关系
|
||||
getGoodsDistribution(params.distributionId).then(res => {
|
||||
getGoodsDistribution(params.distributionId).then((res) => {
|
||||
// 绑定成功,则清除关系
|
||||
if (res.success) {
|
||||
_this.Cookies.removeItem('distributionId');
|
||||
_this.Cookies.removeItem("distributionId");
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
goodsSkuDetail(params).then((res) => {
|
||||
this.isLoading = false;
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
const cateName = res.result.categoryName;
|
||||
const cateId = result.data.categoryPath.split(',');
|
||||
const cateArr = [];
|
||||
cateId.forEach((e, index) => { // 插入分类id和name
|
||||
cateArr.push({
|
||||
id: e,
|
||||
name: cateName[index]
|
||||
goodsSkuDetail(params)
|
||||
.then((res) => {
|
||||
this.isLoading = false;
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
const cateName = res.result.categoryName;
|
||||
const cateId = result.data.categoryPath.split(",");
|
||||
const cateArr = [];
|
||||
cateId.forEach((e, index) => {
|
||||
// 插入分类id和name
|
||||
cateArr.push({
|
||||
id: e,
|
||||
name: cateName[index],
|
||||
});
|
||||
});
|
||||
});
|
||||
this.categoryBar = cateArr;
|
||||
this.goodsMsg = res.result;
|
||||
// 判断是否收藏
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取店铺信息
|
||||
getDetailById(this.goodsMsg.data.storeId).then(res => {
|
||||
if (res.success) {
|
||||
this.storeMsg = res.result
|
||||
this.categoryBar = cateArr;
|
||||
this.goodsMsg = res.result;
|
||||
// 判断是否收藏
|
||||
if (this.Cookies.getItem("userInfo")) {
|
||||
isCollection("STORE", this.goodsMsg.data.storeId).then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$Message.error(res.message)
|
||||
this.$router.push('/')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$router.push('/')
|
||||
});
|
||||
// 获取店铺信息
|
||||
getDetailById(this.goodsMsg.data.storeId).then((res) => {
|
||||
if (res.success) {
|
||||
this.storeMsg = res.result;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
this.$router.push("/");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$router.push("/");
|
||||
});
|
||||
},
|
||||
goGoodsList (currIndex) { // 跳转商品列表
|
||||
const arr = []
|
||||
goGoodsList(currIndex) {
|
||||
// 跳转商品列表
|
||||
const arr = [];
|
||||
this.categoryBar.forEach((e, index) => {
|
||||
if (index <= currIndex) {
|
||||
arr.push(e.id)
|
||||
arr.push(e.id);
|
||||
}
|
||||
})
|
||||
return location.origin + '/goodsList?categoryId=' + arr.toString()
|
||||
});
|
||||
return location.origin + "/goodsList?categoryId=" + arr.toString();
|
||||
},
|
||||
async collect () { // 收藏店铺
|
||||
async collect() {
|
||||
// 收藏店铺
|
||||
if (this.storeCollected) {
|
||||
let cancel = await cancelCollect('STORE', this.goodsMsg.data.storeId)
|
||||
let cancel = await cancelCollect("STORE", this.goodsMsg.data.storeId);
|
||||
if (cancel.success) {
|
||||
this.$Message.success('已取消收藏')
|
||||
this.$Message.success("已取消收藏");
|
||||
this.storeCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectGoods('STORE', this.goodsMsg.data.storeId);
|
||||
let collect = await collectGoods("STORE", this.goodsMsg.data.storeId);
|
||||
if (collect.code === 200) {
|
||||
this.storeCollected = true;
|
||||
this.$Message.success('收藏店铺成功,可以前往个人中心我的收藏查看');
|
||||
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$route.query.skuId': function (val) {
|
||||
"$route.query.skuId": function (val) {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
IM() {
|
||||
return this.IMLink + this.storeMsg.merchantEuid;
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
components: {
|
||||
Search,
|
||||
ShopHeader,
|
||||
ShowGoods,
|
||||
ShowGoodsDetail
|
||||
}
|
||||
ShowGoodsDetail,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -69,7 +69,30 @@
|
||||
>人评价
|
||||
</div>
|
||||
<div class="goods-show-seller">
|
||||
<Tag v-if="item.content.selfOperated" style="padding:0 4px;" size="default" color="error">自营</Tag><span>{{ item.content.storeName }}</span>
|
||||
<Tag
|
||||
class="goods-show-buyer"
|
||||
v-if="item.content.selfOperated"
|
||||
size="default"
|
||||
color="error"
|
||||
>自营
|
||||
</Tag>
|
||||
<div class="goods-show-right">
|
||||
<div
|
||||
class="goods-show-middle"
|
||||
v-if="goodsListType.content.goodsType == 'VIRTUAL_GOODS'"
|
||||
>
|
||||
虚拟
|
||||
</div>
|
||||
<div
|
||||
class="goods-show-middle"
|
||||
v-else-if="goodsListType.content.goodsType == 'PHYSICAL_GOODS'"
|
||||
>
|
||||
实物
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-bottom" style="color: #e4393c">{{
|
||||
item.content.storeName
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,127 +115,153 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GoodsClassNav from '@/components/nav/GoodsClassNav';
|
||||
import * as apiGoods from '@/api/goods';
|
||||
import GoodsClassNav from "@/components/nav/GoodsClassNav";
|
||||
import * as apiGoods from "@/api/goods";
|
||||
export default {
|
||||
name: 'GoodsList',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
name: "GoodsList",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
sortIndex: 0, // 排序状态
|
||||
sortPriceIndex: false, // 判断价格升序还是降序
|
||||
goodsTool: [ // 排序类型
|
||||
{ title: '综合', en: '' },
|
||||
{ title: '销量', en: 'buyCount' },
|
||||
{ title: '评论数', en: 'commentNum' },
|
||||
{ title: '新品', en: 'releaseTime' }
|
||||
goodsTool: [
|
||||
// 排序类型
|
||||
{ title: "综合", en: "" },
|
||||
{ title: "销量", en: "buyCount" },
|
||||
{ title: "评论数", en: "commentNum" },
|
||||
{ title: "新品", en: "releaseTime" },
|
||||
],
|
||||
goodsList: [], // 商品列表
|
||||
loading: false, // 加载状态
|
||||
goodsListType: "",
|
||||
total: 0, // 列表总数
|
||||
params: { // 请求参数
|
||||
params: {
|
||||
// 请求参数
|
||||
pageNumber: 0,
|
||||
pageSize: 20,
|
||||
categoryId: ''
|
||||
}
|
||||
categoryId: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route () {
|
||||
const keyword = this.$route.query.keyword
|
||||
this.handleSearch(keyword)
|
||||
}
|
||||
$route() {
|
||||
const keyword = this.$route.query.keyword;
|
||||
this.handleSearch(keyword);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
handleSearch (key) {
|
||||
this.params.keyword = key
|
||||
this.params.pageNumber = 0
|
||||
this.getGoodsList()
|
||||
handleSearch(key) {
|
||||
this.params.keyword = key;
|
||||
this.params.pageNumber = 0;
|
||||
this.getGoodsList();
|
||||
},
|
||||
orderBy (data, index) {
|
||||
orderBy(data, index) {
|
||||
// 排序
|
||||
this.sortIndex = index;
|
||||
this.params.sort = data;
|
||||
this.params.order = 'desc';
|
||||
if (data === 'price') {
|
||||
this.params.order = "desc";
|
||||
if (data === "price") {
|
||||
if (!this.sortPriceIndex) {
|
||||
this.sortPriceIndex = 'asc';
|
||||
this.sortPriceIndex = "asc";
|
||||
} else {
|
||||
this.sortPriceIndex === 'desc' ? (this.sortPriceIndex = 'asc') : (this.sortPriceIndex = 'desc');
|
||||
this.sortPriceIndex === "desc"
|
||||
? (this.sortPriceIndex = "asc")
|
||||
: (this.sortPriceIndex = "desc");
|
||||
}
|
||||
this.params.order = this.sortPriceIndex
|
||||
this.params.order = this.sortPriceIndex;
|
||||
} else {
|
||||
this.sortPriceIndex = false
|
||||
this.sortPriceIndex = false;
|
||||
}
|
||||
this.getGoodsList();
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 分页 修改页码
|
||||
changePageNum (val) {
|
||||
changePageNum(val) {
|
||||
this.params.pageNumber = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
// 分页 修改页数
|
||||
changePageSize (val) {
|
||||
changePageSize(val) {
|
||||
this.params.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getGoodsList();
|
||||
},
|
||||
// 获取商品列表
|
||||
getGoodsList () {
|
||||
getGoodsList() {
|
||||
this.loading = true;
|
||||
apiGoods.goodsList(this.params)
|
||||
apiGoods
|
||||
.goodsList(this.params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.goodsList = res.result.content;
|
||||
this.total = res.result.totalElements;
|
||||
for (var i = 0; i < this.goodsList.length; i++) {
|
||||
this.goodsListType = this.goodsList[i];
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getParams (val) {
|
||||
getParams(val) {
|
||||
// 筛选条件回显
|
||||
Object.assign(this.params, val)
|
||||
this.getGoodsList()
|
||||
}
|
||||
Object.assign(this.params, val);
|
||||
this.getGoodsList();
|
||||
},
|
||||
},
|
||||
created () {
|
||||
created() {
|
||||
if (this.$route.query.categoryId) {
|
||||
let cateId = this.$route.query.categoryId.split(',')
|
||||
Object.assign(this.params, this.$route.query)
|
||||
this.params.categoryId = cateId[cateId.length - 1]
|
||||
let cateId = this.$route.query.categoryId.split(",");
|
||||
Object.assign(this.params, this.$route.query);
|
||||
this.params.categoryId = cateId[cateId.length - 1];
|
||||
} else {
|
||||
Object.assign(this.params, this.$route.query)
|
||||
Object.assign(this.params, this.$route.query);
|
||||
}
|
||||
this.getGoodsList()
|
||||
this.getGoodsList();
|
||||
},
|
||||
components: {
|
||||
GoodsClassNav
|
||||
}
|
||||
GoodsClassNav,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '../assets/styles/goodsList.scss';
|
||||
@import "../assets/styles/goodsList.scss";
|
||||
.goods-show-info > .goods-show-seller > .goods-show-buyer {
|
||||
height: 16px;
|
||||
width: 30px;
|
||||
white-space: nowrap;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
padding: 0 3px;
|
||||
background-color: #e23a3a;
|
||||
}
|
||||
.goods-show-seller {
|
||||
// padding:3px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.container {
|
||||
margin: 15px auto;
|
||||
width: 1200px;
|
||||
min-width: 1000px;
|
||||
position: relative;
|
||||
}
|
||||
.price-sort:hover {
|
||||
color: #e23a3a;
|
||||
}
|
||||
.goods-box {
|
||||
display: flex;
|
||||
}
|
||||
@@ -221,6 +270,28 @@ export default {
|
||||
width: 200px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.goods-show-right {
|
||||
width: 35px;
|
||||
height: 17px;
|
||||
// vertical-align:middle;
|
||||
overflow: hidden;
|
||||
margin-top: 1.5px;
|
||||
margin-right: 5px;
|
||||
line-height: 16px;
|
||||
background: white;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
border: 1px solid rgba(112, 123, 187, 0.8);
|
||||
color: rgba(112, 123, 187, 0.8);
|
||||
}
|
||||
.goods-show-middle:hover {
|
||||
color: rgba(2, 15, 88, 0.6);
|
||||
border: 0.2px solid rgba(0, 13, 87, 0.6);
|
||||
border-radius: 4px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.item-as-title {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
@@ -235,7 +306,7 @@ export default {
|
||||
float: right;
|
||||
margin-right: 15px;
|
||||
font-size: 10px;
|
||||
color: #ccc;
|
||||
color: rgb(204, 204, 204);
|
||||
}
|
||||
.item-as {
|
||||
width: 160px;
|
||||
@@ -284,6 +355,7 @@ export default {
|
||||
display: block;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.price-sort {
|
||||
span {
|
||||
display: inline-block;
|
||||
|
||||
@@ -95,14 +95,15 @@
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as RegExp from "@/plugins/RegExp.js";
|
||||
import { md5 } from "@/plugins/md5.js";
|
||||
import * as apiLogin from "@/api/login.js";
|
||||
@@ -118,6 +119,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
type: true, // true 账号登录 false 验证码登录
|
||||
formData: {
|
||||
// 登录表单
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
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>
|
||||
</div>
|
||||
@@ -97,6 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as RegExp from '@/plugins/RegExp.js';
|
||||
import { md5 } from '@/plugins/md5.js';
|
||||
import * as apiLogin from '@/api/login.js';
|
||||
@@ -107,6 +108,7 @@ export default {
|
||||
components: { Verify },
|
||||
data () {
|
||||
return {
|
||||
config:require('@/config'),
|
||||
year: new Date().getFullYear(),
|
||||
formRegist: {
|
||||
// 注册表单
|
||||
|
||||
88
buyer/src/pages/article/detail.vue
Normal file
88
buyer/src/pages/article/detail.vue
Normal file
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="wrapper">
|
||||
<div class="nav" @click="back">
|
||||
<img src="@/assets/images/logo2.png" alt="" class="logo" />
|
||||
<div class="title">{{ detail.title }}</div>
|
||||
</div>
|
||||
<div v-html="detail.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { articleDetail } from "@/api/common.js";
|
||||
const config = require("@/config/index");
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
detail: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push("/");
|
||||
},
|
||||
// 初始化文章
|
||||
init() {
|
||||
const id = this.$route.query.id;
|
||||
|
||||
articleDetail(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.detail = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.logo {
|
||||
max-width: 200px;
|
||||
}
|
||||
.box {
|
||||
min-height: 100vh;
|
||||
width: 1200px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 32px;
|
||||
}
|
||||
.wrapper {
|
||||
width: 1200px;
|
||||
min-height: 600px;
|
||||
padding: 32px;
|
||||
background: #fff;
|
||||
}
|
||||
.nav {
|
||||
text-align: center;
|
||||
font-size: 21px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
|
||||
font-size: 21px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
// iphone
|
||||
@media screen and (max-width: 767px) {
|
||||
.box {
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
padding: 0 16px;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
.subTips {
|
||||
|
||||
margin-left: 10px;
|
||||
}
|
||||
.fontsize_48 {
|
||||
font-size: 48px;
|
||||
|
||||
@@ -150,6 +150,9 @@ export default {
|
||||
}
|
||||
.goodsBuy {
|
||||
margin-left: 80px;
|
||||
>*{
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
.page-size{
|
||||
text-align: right;
|
||||
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }]
|
||||
},
|
||||
formItem: {}, // 表单数据
|
||||
action: commonUrl + '/common/upload/file', // 上传接口
|
||||
action: commonUrl + '/common/common/upload/file', // 上传接口
|
||||
accessToken: {} // 验证token
|
||||
}
|
||||
},
|
||||
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
descriptionScore: 5
|
||||
}, // 表单
|
||||
visible: false, // 图片预览
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
previewImage: '', // 预览图片地址
|
||||
loading: false // 提交加载状态
|
||||
|
||||
@@ -2,39 +2,23 @@
|
||||
<div>
|
||||
<card _Title="收货地址" />
|
||||
<div class="add-box">
|
||||
<Form
|
||||
:model="formData"
|
||||
ref="form"
|
||||
label-position="left"
|
||||
:label-width="100"
|
||||
:rules="ruleInline"
|
||||
>
|
||||
<Form :model="formData" ref="form" label-position="left" :label-width="100" :rules="ruleInline">
|
||||
<FormItem label="收件人" prop="name">
|
||||
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="收件地区" prop="address">
|
||||
<i-input
|
||||
v-model="formData.address"
|
||||
disabled
|
||||
placeholder="请选择收货地址"
|
||||
style="width: 600px"
|
||||
></i-input>
|
||||
<i-input v-model="formData.address" disabled placeholder="请选择收货地址" style="width: 600px"></i-input>
|
||||
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
|
||||
</FormItem>
|
||||
<FormItem label="详细地址" prop="detail">
|
||||
<i-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></i-input>
|
||||
<i-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></i-input>
|
||||
</FormItem>
|
||||
<FormItem label="手机号码" prop="mobile">
|
||||
<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 label="地址别名">
|
||||
<i-input
|
||||
v-model="formData.alias"
|
||||
length
|
||||
:maxlength="4"
|
||||
placeholder="请输入地址别名,例如公司"
|
||||
style="width: 600px"
|
||||
></i-input>
|
||||
<i-input v-model="formData.alias" length :maxlength="4" placeholder="请输入地址别名,例如公司" style="width: 600px">
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem label="默认地址">
|
||||
<i-switch v-model="formData.isDefault" />
|
||||
@@ -42,9 +26,7 @@
|
||||
</Form>
|
||||
</div>
|
||||
<div class="mt_20">
|
||||
<Button type="primary" class="mr_10" :loading="loading" @click="save"
|
||||
>保存收货地址</Button
|
||||
>
|
||||
<Button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</Button>
|
||||
<Button @click="$router.back()">返回</Button>
|
||||
</div>
|
||||
<lili-map ref="map" @getAddress="getAddress"></lili-map>
|
||||
@@ -52,89 +34,108 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import card from '@/components/card';
|
||||
import liliMap from '@/components/map';
|
||||
import card from "@/components/card";
|
||||
import liliMap from "@/components/map";
|
||||
|
||||
import * as RegExp from "@/plugins/RegExp.js";
|
||||
import {
|
||||
newMemberAddress,
|
||||
editMemberAddress,
|
||||
getAddrDetail
|
||||
} from '@/api/address';
|
||||
getAddrDetail,
|
||||
} from "@/api/address";
|
||||
export default {
|
||||
name: 'AddAddress',
|
||||
data () {
|
||||
name: "AddAddress",
|
||||
data() {
|
||||
return {
|
||||
formData: { // 添加地址表单
|
||||
isDefault: false
|
||||
formData: {
|
||||
// 添加地址表单
|
||||
isDefault: false,
|
||||
},
|
||||
ruleInline: { // 验证规则
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
address: [{ required: true, message: '请输入地址', trigger: 'change' }],
|
||||
ruleInline: {
|
||||
// 验证规则
|
||||
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||
address: [{ required: true, message: "请输入地址", trigger: "change" }],
|
||||
detail: [
|
||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }
|
||||
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||
],
|
||||
mobile: [
|
||||
]
|
||||
{ required: true, message: "请输入手机号码" },
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
trigger: "blur",
|
||||
message: "请输入正确的手机号",
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false, // 加载状态
|
||||
mapMsg: {} // 地图信息
|
||||
mapMsg: {}, // 地图信息
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save () { // 保存地址
|
||||
save() {
|
||||
// 保存地址
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
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;
|
||||
this.loading = true;
|
||||
if (this.$route.query.id) {
|
||||
editMemberAddress(params).then((res) => {
|
||||
if (res.success) {
|
||||
editMemberAddress(params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.$router.push("/home/MyAddress");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.$router.push('/home/MyAddress');
|
||||
}
|
||||
}).catch(() => { this.loading = false; });
|
||||
});
|
||||
} else {
|
||||
newMemberAddress(params).then((res) => {
|
||||
if (res.success) {
|
||||
newMemberAddress(params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.$router.push("/home/MyAddress");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.$router.push('/home/MyAddress');
|
||||
}
|
||||
}).catch(() => { this.loading = false; });
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getAddrById (id) {
|
||||
getAddrById(id) {
|
||||
// 获取地址详情
|
||||
getAddrDetail(id).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res);
|
||||
const data = res.result;
|
||||
data.address = res.result.consigneeAddressPath.replace(/,/g, ' ');
|
||||
data.address = res.result.consigneeAddressPath.replace(/,/g, " ");
|
||||
this.formData = data;
|
||||
}
|
||||
});
|
||||
},
|
||||
getAddress (item) {
|
||||
getAddress(item) {
|
||||
// 获取地图选择信息
|
||||
console.log(item);
|
||||
this.mapMsg = item;
|
||||
this.$set(this.formData, 'address', item.addr);
|
||||
this.$set(this.formData, 'consigneeAddressIdPath', item.addrId);
|
||||
this.$set(this.formData, 'detail', item.detail);
|
||||
this.$set(this.formData, "address", item.addr);
|
||||
this.$set(this.formData, "consigneeAddressIdPath", item.addrId);
|
||||
this.$set(this.formData, "detail", item.detail);
|
||||
this.formData.lat = item.position.lat;
|
||||
this.formData.lon = item.position.lng;
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
const id = this.$route.query.id;
|
||||
if (id) this.getAddrById(id);
|
||||
},
|
||||
components: {
|
||||
card,
|
||||
liliMap
|
||||
}
|
||||
liliMap,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class="width_300"
|
||||
search
|
||||
enter-button
|
||||
v-model="params.keywords"
|
||||
v-model="params.sn"
|
||||
@on-search="getList"
|
||||
placeholder="请输入订单号搜索"
|
||||
/>
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
keywords: '',
|
||||
sn: '',
|
||||
sort: 'createTime',
|
||||
order: 'desc'
|
||||
},
|
||||
@@ -345,7 +345,7 @@ export default {
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
width: 500px;
|
||||
// width: 500px;
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -362,6 +362,5 @@ export default {
|
||||
|
||||
.modal-goods {
|
||||
padding: 5px;
|
||||
background-color: #eee;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
num: 1
|
||||
},
|
||||
uploadList: [], // 上传列表
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
visible: false, // 图片预览
|
||||
previewImage: '', // 预览图片url
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
content: ''
|
||||
}, // 表单
|
||||
visible: false, // 图片预览
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
previewImage: '', // 图片地址
|
||||
loading: false, // 加载状态
|
||||
|
||||
@@ -35,6 +35,17 @@
|
||||
<h3>配送信息</h3>
|
||||
<p>配送方式:{{order.deliveryMethodValue}}</p>
|
||||
<p>配送状态:{{order.deliverStatusValue}}</p>
|
||||
<p v-if="logistics">物流信息:{{logistics.shipper || '暂无物流信息'}}</p>
|
||||
<p v-if="logistics">物流单号:{{logistics.logisticCode || '暂无物流单号'}}</p>
|
||||
<div class="div-express-log" v-if="logistics">
|
||||
<div class="express-log">
|
||||
<p>订单日志:</p>
|
||||
<div v-for="(item, index) in logistics.traces" :key="index">
|
||||
<span class="time">{{ item.AcceptTime }}</span>
|
||||
<span class="detail">{{ item.AcceptStation }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-card">
|
||||
<h3>发票信息</h3>
|
||||
@@ -66,9 +77,9 @@
|
||||
<tbody>
|
||||
<tr v-for="(goods, goodsIndex) in order.orderItems" :key="goodsIndex">
|
||||
<td>
|
||||
<img @click="goodsDetail(goods.id, goods.goodsId)" :src="goods.image" alt="" />
|
||||
<img @click="goodsDetail(goods.skuId, goods.goodsId)" :src="goods.image" alt="" />
|
||||
<div>
|
||||
<p @click="goodsDetail(goods.id, goods.goodsId)" class="hover-color">
|
||||
<p @click="goodsDetail(goods.skuId, goods.goodsId)" class="hover-color">
|
||||
{{ goods.goodsName }}
|
||||
</p>
|
||||
</div>
|
||||
@@ -78,7 +89,7 @@
|
||||
<td>{{ goods.num }}</td>
|
||||
<td>{{ (goods.goodsPrice * goods.num) | unitPrice('¥') }}</td>
|
||||
<td>
|
||||
<Button v-if="goods.afterSaleStatus.includes('NOT_APPLIED')" @click="applyAfterSale(goods.sn)" type="info" size="small" class="mb_5">申请售后</Button>
|
||||
<Button v-if="goods.afterSaleStatus.includes('NOT_APPLIED') || goods.afterSaleStatus.includes('PART_AFTER_SALE')" @click="applyAfterSale(goods.sn)" type="info" size="small" class="mb_5">申请售后</Button>
|
||||
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.order.sn, goodsIndex)" size="small" type="success" class="fontsize_12 mb_5" >评价</Button>
|
||||
<Button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.order.sn, goodsIndex)" type="warning" class="fontsize_12" size="small">投诉</Button>
|
||||
</td>
|
||||
@@ -122,7 +133,7 @@ export default {
|
||||
return {
|
||||
order: {}, // 订单详情数据
|
||||
progressList: [], // 订单流程
|
||||
logistics: [], // 物流数据
|
||||
logistics: "", // 物流数据
|
||||
cancelParams: { // 取消售后参数
|
||||
orderSn: '',
|
||||
reason: ''
|
||||
|
||||
@@ -496,7 +496,7 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
.subTips {
|
||||
|
||||
margin-left: 10px;
|
||||
}
|
||||
.account-btns {
|
||||
margin: 10px 0;
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
<!-- LOGO 步骤条 -->
|
||||
<div class="width_1200 logo">
|
||||
<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>
|
||||
</div>
|
||||
<div class="cart-steps">
|
||||
@@ -23,7 +21,7 @@
|
||||
<span :class="stepIndex == 2 ? 'active' : ''">3.成功提交订单</span>
|
||||
</div>
|
||||
</div>
|
||||
<Divider/>
|
||||
<Divider />
|
||||
<div class="content width_1200">
|
||||
<!-- 收货地址 -->
|
||||
<div class="address">
|
||||
@@ -45,31 +43,23 @@
|
||||
<div>
|
||||
<span>{{ item.name }}</span>
|
||||
<Tag class="ml_10" v-if="item.isDefault" color="red">默认</Tag>
|
||||
<Tag class="ml_10" v-if="item.alias" color="warning">{{
|
||||
item.alias
|
||||
}}
|
||||
</Tag>
|
||||
<Tag class="ml_10" v-if="item.alias" color="warning">{{ item.alias }} </Tag>
|
||||
</div>
|
||||
<div>{{ item.mobile }}</div>
|
||||
<div>
|
||||
{{ item.consigneeAddressPath | unitAddress }} {{ item.detail }}
|
||||
</div>
|
||||
<div>{{ item.consigneeAddressPath | unitAddress }} {{ item.detail }}</div>
|
||||
<div class="edit-btn" v-show="showEditBtn === index">
|
||||
<span @click.stop="editAddress(item.id)">修改</span>
|
||||
<span
|
||||
class="ml_10"
|
||||
v-if="!item.isDefault"
|
||||
@click.stop="delAddress(item)"
|
||||
>删除</span
|
||||
<span class="ml_10" v-if="!item.isDefault" @click.stop="delAddress(item)"
|
||||
>删除</span
|
||||
>
|
||||
</div>
|
||||
<div class="corner-icon" v-show="selectedAddress.id === item.id">
|
||||
<div></div>
|
||||
<Icon type="md-checkmark"/>
|
||||
<Icon type="md-checkmark" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="add-address" @click="editAddress('')">
|
||||
<Icon type="ios-add-circle-outline"/>
|
||||
<Icon type="ios-add-circle-outline" />
|
||||
<div>添加新地址</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,8 +70,8 @@
|
||||
v-if="addressList.length > 3"
|
||||
>
|
||||
{{ moreAddr ? "收起地址" : "更多地址" }}
|
||||
<Icon v-show="!moreAddr" type="md-arrow-dropdown"/>
|
||||
<Icon v-show="moreAddr" type="md-arrow-dropup"/>
|
||||
<Icon v-show="!moreAddr" type="md-arrow-dropdown" />
|
||||
<Icon v-show="moreAddr" type="md-arrow-dropup" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 商品信息 -->
|
||||
@@ -90,16 +80,12 @@
|
||||
<span>商品信息</span>
|
||||
<span @click="$router.push('/cart')">返回购物车</span>
|
||||
</div>
|
||||
<div
|
||||
class="goods-msg"
|
||||
v-for="(shop, shopIndex) in goodsList"
|
||||
:key="shopIndex"
|
||||
>
|
||||
<div class="goods-msg" v-for="(shop, shopIndex) in goodsList" :key="shopIndex">
|
||||
<div class="shop-name">
|
||||
<span>
|
||||
<span class="hover-color" @click="goShopPage(shop.storeId)">{{
|
||||
shop.storeName
|
||||
}}</span
|
||||
shop.storeName
|
||||
}}</span
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
@@ -111,23 +97,15 @@
|
||||
>
|
||||
<span
|
||||
class="hover-color"
|
||||
@click="
|
||||
goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)
|
||||
"
|
||||
@click="goGoodsDetail(goods.goodsSku.id, goods.goodsSku.goodsId)"
|
||||
>
|
||||
<img :src="goods.goodsSku.thumbnail" alt=""/>
|
||||
<span style="vertical-align: top">{{
|
||||
goods.goodsSku.goodsName
|
||||
}}</span>
|
||||
<img :src="goods.goodsSku.thumbnail" alt="" />
|
||||
<span style="vertical-align: top">{{ goods.goodsSku.goodsName }}</span>
|
||||
</span>
|
||||
<span class="goods-price">{{
|
||||
goods.purchasePrice | unitPrice("¥")
|
||||
}}</span>
|
||||
<span class="goods-price">{{ goods.purchasePrice | unitPrice("¥") }}</span>
|
||||
<span>x{{ goods.num }}</span>
|
||||
<span>{{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}</span>
|
||||
<span class="goods-price">{{
|
||||
goods.subTotal | unitPrice("¥")
|
||||
}}</span>
|
||||
<span class="goods-price">{{ goods.subTotal | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-mark">
|
||||
@@ -139,7 +117,7 @@
|
||||
placeholder="订单备注"
|
||||
/>
|
||||
<span style="font-size: 12px; color: #999"
|
||||
>提示:请勿填写有关支付、收货、发票方面的信息</span
|
||||
>提示:请勿填写有关支付、收货、发票方面的信息</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,7 +126,7 @@
|
||||
<div class="invoice">
|
||||
<div class="card-head mt_20 mb_20">
|
||||
<span class="relative"
|
||||
>发票信息<span class="inv-tips">
|
||||
>发票信息<span class="inv-tips">
|
||||
<Icon
|
||||
type="ios-alert-outline"
|
||||
/>开企业抬头发票须填写纳税人识别号,以免影响报销
|
||||
@@ -168,29 +146,19 @@
|
||||
</div>
|
||||
<div v-if="couponList.length === 0">无可用优惠券</div>
|
||||
<ul v-else class="coupon-list">
|
||||
<li
|
||||
v-for="(item, index) in couponList"
|
||||
class="coupon-item"
|
||||
:key="index"
|
||||
>
|
||||
<li v-for="(item, index) in couponList" class="coupon-item" :key="index">
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span
|
||||
v-if="item.couponType === 'PRICE'"
|
||||
class="fontsize_12 global_color"
|
||||
>¥<span class="price">{{
|
||||
item.price | unitPrice
|
||||
}}</span></span
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color"
|
||||
>¥<span class="price">{{ item.price | unitPrice }}</span></span
|
||||
>
|
||||
<span
|
||||
v-if="item.couponType === 'DISCOUNT'"
|
||||
class="fontsize_12 global_color"
|
||||
><span class="price">{{ item.discount }}</span
|
||||
>折</span
|
||||
>
|
||||
<span class="describe"
|
||||
>满{{ item.consumeThreshold }}元可用</span
|
||||
><span class="price">{{ item.discount }}</span
|
||||
>折</span
|
||||
>
|
||||
<span class="describe">满{{ item.consumeThreshold }}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{ useScope(item.scopeType) }}</p>
|
||||
<p>有效期:{{ item.endTime }}</p>
|
||||
@@ -207,7 +175,7 @@
|
||||
class="c-right"
|
||||
v-if="usedCouponId.includes(item.id)"
|
||||
@click="useCoupon(item.id, false)"
|
||||
>放弃优惠</a
|
||||
>放弃优惠</a
|
||||
>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
@@ -220,32 +188,22 @@
|
||||
<span>{{ totalNum }}件商品,总商品金额:</span
|
||||
><span>{{ priceDetailDTO.goodsPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="priceDetailDTO.freightPrice>0">
|
||||
<div v-if="priceDetailDTO.freightPrice > 0">
|
||||
<span>运费:</span
|
||||
><span>{{ priceDetailDTO.freightPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="priceDetailDTO.discountPrice>0">
|
||||
<div v-if="priceDetailDTO.discountPrice > 0">
|
||||
<span>优惠金额:</span
|
||||
><span
|
||||
>-{{
|
||||
priceDetailDTO.discountPrice | unitPrice("¥")
|
||||
}}</span
|
||||
>
|
||||
><span>-{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
<div v-if="priceDetailDTO.couponPrice>0">
|
||||
<div v-if="priceDetailDTO.couponPrice > 0">
|
||||
<span>优惠券金额:</span
|
||||
><span
|
||||
>-{{
|
||||
priceDetailDTO.couponPrice | unitPrice("¥")
|
||||
}}</span
|
||||
>
|
||||
><span>-{{ priceDetailDTO.couponPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="$route.query.way === 'POINTS'">
|
||||
<span>应付积分:</span
|
||||
><span class="actrual-price">{{
|
||||
priceDetailDTO.payPoint
|
||||
}}</span>
|
||||
><span class="actrual-price">{{ priceDetailDTO.payPoint }}</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span>应付金额:</span
|
||||
@@ -267,73 +225,65 @@
|
||||
</div>
|
||||
<BaseFooter></BaseFooter>
|
||||
<!-- 添加发票模态框 -->
|
||||
<invoice-modal
|
||||
ref="invModal"
|
||||
:invoiceData="invoiceData"
|
||||
@change="getInvMsg"
|
||||
/>
|
||||
<invoice-modal ref="invModal" :invoiceData="invoiceData" @change="getInvMsg" />
|
||||
<!-- 选择地址模态框 -->
|
||||
<address-manage
|
||||
ref="address"
|
||||
:id="addrId"
|
||||
@change="addrChange"
|
||||
></address-manage>
|
||||
<address-manage ref="address" :id="addrId" @change="addrChange"></address-manage>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import invoiceModal from '@/components/invoiceModal';
|
||||
import addressManage from '@/components/addressManage';
|
||||
import {memberAddress, delMemberAddress} from '@/api/address';
|
||||
import invoiceModal from "@/components/invoiceModal";
|
||||
import addressManage from "@/components/addressManage";
|
||||
import { memberAddress, delMemberAddress } from "@/api/address";
|
||||
import {
|
||||
cartGoodsPay,
|
||||
createTrade,
|
||||
selectAddr,
|
||||
selectCoupon,
|
||||
couponNum
|
||||
} from '@/api/cart';
|
||||
import {canUseCouponList} from '@/api/member.js';
|
||||
couponNum,
|
||||
} from "@/api/cart";
|
||||
import { canUseCouponList } from "@/api/member.js";
|
||||
|
||||
export default {
|
||||
name: 'Pay',
|
||||
components: {invoiceModal, addressManage},
|
||||
data () {
|
||||
name: "Pay",
|
||||
components: { invoiceModal, addressManage },
|
||||
data() {
|
||||
return {
|
||||
stepIndex: 1, // 顶部步骤条状态
|
||||
invoiceAvailable: false, // 发票编辑按钮
|
||||
showEditBtn: '', // 鼠标移入显示编辑按钮
|
||||
orderMark: '', // 订单备注
|
||||
showEditBtn: "", // 鼠标移入显示编辑按钮
|
||||
orderMark: "", // 订单备注
|
||||
invoiceData: {
|
||||
// 发票数据
|
||||
receiptTitle: '个人',
|
||||
receiptContent: '不开发票'
|
||||
receiptTitle: "个人",
|
||||
receiptContent: "不开发票",
|
||||
},
|
||||
addressList: [], // 地址列表
|
||||
selectedAddress: {}, // 所选地址
|
||||
goodsList: [], // 商品列表
|
||||
priceDetailDTO: {}, // 商品价格
|
||||
totalNum: 0, // 购买数量
|
||||
addrId: '', // 编辑地址传入的id
|
||||
addrId: "", // 编辑地址传入的id
|
||||
moreAddr: false, // 更多地址
|
||||
canUseCouponNum: 0, // 可用优惠券数量
|
||||
couponList: [], // 可用优惠券列表
|
||||
usedCouponId: [], // 已使用优惠券id
|
||||
selectedCoupon: {} // 已选优惠券对象
|
||||
selectedCoupon: {}, // 已选优惠券对象
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init () {
|
||||
init() {
|
||||
this.getGoodsDetail();
|
||||
},
|
||||
goAddressManage () {
|
||||
goAddressManage() {
|
||||
// 跳转地址管理页面
|
||||
this.$router.push('/home/MyAddress');
|
||||
this.$router.push("/home/MyAddress");
|
||||
},
|
||||
getAddress () {
|
||||
getAddress() {
|
||||
// 获取收货地址列表
|
||||
memberAddress().then((res) => {
|
||||
if (res.success) {
|
||||
@@ -346,10 +296,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getGoodsDetail () {
|
||||
getGoodsDetail() {
|
||||
// 订单商品详情
|
||||
this.$Spin.show();
|
||||
cartGoodsPay({way: this.$route.query.way})
|
||||
cartGoodsPay({ way: this.$route.query.way })
|
||||
.then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
@@ -358,22 +308,27 @@ export default {
|
||||
this.skuList = res.result.skuList;
|
||||
|
||||
if (res.result.receiptVO) {
|
||||
this.invoiceData = res.result.receiptVO
|
||||
this.invoiceData = res.result.receiptVO;
|
||||
}
|
||||
let notSupArea = res.result.notSupportFreight;
|
||||
this.selectedCoupon = {};
|
||||
if (res.result.platformCoupon) this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
||||
Object.assign(this.selectedCoupon, res.result.storeCoupons);
|
||||
if (res.result.platformCoupon)
|
||||
this.selectedCoupon[res.result.platformCoupon.memberCoupon.id] = res.result.platformCoupon;
|
||||
if (res.result.storeCoupons && Object.keys(res.result.storeCoupons)[0]) {
|
||||
let storeMemberCouponsId = Object.keys(res.result.storeCoupons)[0];
|
||||
let storeCouponId = res.result.storeCoupons[storeMemberCouponsId].memberCoupon.id;
|
||||
this.selectedCoupon[storeCouponId] = res.result.storeCoupons[storeMemberCouponsId];
|
||||
}
|
||||
if (notSupArea) {
|
||||
let content = [];
|
||||
let title = '';
|
||||
let title = "";
|
||||
notSupArea.forEach((e) => {
|
||||
title = e.errorMessage;
|
||||
content.push(e.goodsSku.goodsName);
|
||||
});
|
||||
this.$Modal.warning({
|
||||
title: '以下商品超出配送区域' || title,
|
||||
content: content.toString()
|
||||
title: "以下商品超出配送区域" || title,
|
||||
content: content.toString(),
|
||||
});
|
||||
}
|
||||
if (res.result.memberAddress) {
|
||||
@@ -384,16 +339,28 @@ export default {
|
||||
for (let i = 0; i < this.skuList.length; i++) {
|
||||
this.totalNum += this.skuList[i].num;
|
||||
}
|
||||
this.getCouponNum();
|
||||
this.usedCouponId = [];
|
||||
this.couponList = res.result.canUseCoupons;
|
||||
const couponKeys = Object.keys(this.selectedCoupon);
|
||||
if (couponKeys.length) {
|
||||
this.couponList.forEach((e) => {
|
||||
if (this.selectedCoupon[e.id] && e.id === this.selectedCoupon[e.id].memberCoupon.id) {
|
||||
this.usedCouponId.push(e.id);
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$forceUpdate();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$Spin.hide();
|
||||
});
|
||||
},
|
||||
getCouponNum () {
|
||||
getCouponNum() {
|
||||
// 获取可用优惠券数量
|
||||
couponNum({way: this.$route.query.way}).then((res) => {
|
||||
couponNum({ way: this.$route.query.way }).then((res) => {
|
||||
this.canUseCouponNum = res.result;
|
||||
if (res.result) {
|
||||
let storeArr = [];
|
||||
@@ -407,10 +374,10 @@ export default {
|
||||
let params = {
|
||||
pageNumber: 1,
|
||||
pageSize: 100,
|
||||
memberCouponStatus: 'NEW',
|
||||
memberCouponStatus: "NEW",
|
||||
scopeId: skuArr.toString(),
|
||||
storeId: storeArr.toString(),
|
||||
totalPrice: this.priceDetailDTO.goodsPrice
|
||||
totalPrice: this.priceDetailDTO.goodsPrice,
|
||||
};
|
||||
canUseCouponList(params).then((res) => {
|
||||
// 可用优惠券列表
|
||||
@@ -431,78 +398,77 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
selectAddress (item) {
|
||||
selectAddress(item) {
|
||||
// 选择地址
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
shippingAddressId: item.id
|
||||
shippingAddressId: item.id,
|
||||
};
|
||||
selectAddr(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('选择收货地址成功');
|
||||
this.$Message.success("选择收货地址成功");
|
||||
this.selectedAddress = item;
|
||||
this.getGoodsDetail();
|
||||
}
|
||||
});
|
||||
},
|
||||
editAddress (id) {
|
||||
editAddress(id) {
|
||||
// 编辑地址
|
||||
this.addrId = id;
|
||||
this.$refs.address.show();
|
||||
},
|
||||
addrChange () {
|
||||
addrChange() {
|
||||
// 添加,编辑地址回显
|
||||
this.getAddress();
|
||||
},
|
||||
delAddress (item) {
|
||||
delAddress(item) {
|
||||
// 删除地址
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '你确定删除这个收货地址',
|
||||
title: "提示",
|
||||
content: "你确定删除这个收货地址",
|
||||
onOk: () => {
|
||||
delMemberAddress(item.id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('删除成功');
|
||||
this.$Message.success("删除成功");
|
||||
this.getAddress();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
onCancel: () => {},
|
||||
});
|
||||
},
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
// 跳转商品详情
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
query: {skuId, goodsId}
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage (id) {
|
||||
goShopPage(id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: '/Merchant',
|
||||
query: {id: id}
|
||||
path: "/Merchant",
|
||||
query: { id: id },
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
window.open(routeUrl.href, "_blank");
|
||||
},
|
||||
useCoupon (id, used) {
|
||||
useCoupon(id, used) {
|
||||
// 使用优惠券
|
||||
let params = {
|
||||
way: this.$route.query.way,
|
||||
memberCouponId: id,
|
||||
used: used // true 为使用, false为弃用
|
||||
used: used, // true 为使用, false为弃用
|
||||
};
|
||||
selectCoupon(params).then((res) => {
|
||||
if (res.success) this.init();
|
||||
});
|
||||
},
|
||||
editInvoice () {
|
||||
editInvoice() {
|
||||
// 编辑发票信息
|
||||
this.$refs.invModal.invoiceAvailable = true;
|
||||
},
|
||||
getInvMsg (item) {
|
||||
getInvMsg(item) {
|
||||
// 获取发票信息
|
||||
if (item) {
|
||||
this.init();
|
||||
@@ -510,18 +476,18 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
pay () {
|
||||
pay() {
|
||||
// 结算
|
||||
const params = {
|
||||
client: 'PC',
|
||||
client: "PC",
|
||||
remark: [],
|
||||
way: this.$route.query.way
|
||||
way: this.$route.query.way,
|
||||
};
|
||||
this.goodsList.forEach((e) => {
|
||||
if (e.remark) {
|
||||
params.remark.push({
|
||||
remark: e.remark,
|
||||
storeId: e.storeId
|
||||
storeId: e.storeId,
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -533,12 +499,13 @@ export default {
|
||||
.then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
if (params.way === 'POINTS') { // 积分支付不需要跳转支付页面
|
||||
this.$router.push('/payDone')
|
||||
if (params.way === "POINTS") {
|
||||
// 积分支付不需要跳转支付页面
|
||||
this.$router.push("/payDone");
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: '/payment',
|
||||
query: {orderType: 'TRADE', sn: res.result.sn}
|
||||
path: "/payment",
|
||||
query: { orderType: "TRADE", sn: res.result.sn },
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -548,27 +515,30 @@ export default {
|
||||
});
|
||||
},
|
||||
// 优惠券可用范围
|
||||
useScope (type) {
|
||||
let goods = '全部商品';
|
||||
useScope(type) {
|
||||
let goods = "全部商品";
|
||||
switch (type) {
|
||||
case 'ALL':
|
||||
goods = '全部商品';
|
||||
case "ALL":
|
||||
goods = "全部商品";
|
||||
break;
|
||||
case 'PORTION_GOODS':
|
||||
goods = '部分商品';
|
||||
case "PORTION_GOODS":
|
||||
goods = "部分商品";
|
||||
break;
|
||||
case 'PORTION_GOODS_CATEGORY':
|
||||
goods = '部分分类商品';
|
||||
case "PORTION_GOODS_CATEGORY":
|
||||
goods = "部分分类商品";
|
||||
break;
|
||||
}
|
||||
return `${goods}可用`;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "../../assets/styles/coupon.scss";
|
||||
.goods-msg {
|
||||
overflow: hidden;
|
||||
}
|
||||
/** logo start */
|
||||
.logo {
|
||||
height: 40px;
|
||||
@@ -772,11 +742,13 @@ export default {
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
width: 1150px;
|
||||
background-color: #f8f8f8;
|
||||
margin: 10px 0 20px 0;
|
||||
|
||||
.goods-item {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
@@ -799,8 +771,12 @@ export default {
|
||||
|
||||
> span:nth-child(1) {
|
||||
font-size: 12px;
|
||||
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
> span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
> span:last-child {
|
||||
@@ -891,6 +867,7 @@ export default {
|
||||
/** content end */
|
||||
/** 底部支付栏 */
|
||||
.order-footer {
|
||||
z-index: 20;
|
||||
height: 50px;
|
||||
@include background_color($light_white_background_color);
|
||||
@include title_color($title_color);
|
||||
|
||||
@@ -205,7 +205,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
visible: false, // 预览图片
|
||||
loading: false, // 加载状态
|
||||
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
return {
|
||||
loading: false, // 加载状态
|
||||
uploadLoading: false, // 上传加载状态
|
||||
action: commonUrl + '/common/upload/file', // 上传地址
|
||||
action: commonUrl + '/common/common/upload/file', // 上传地址
|
||||
accessToken: {}, // 验证token
|
||||
previewPicture: '', // 预览图片
|
||||
address: '', // 回显地址
|
||||
|
||||
@@ -15,10 +15,15 @@
|
||||
>
|
||||
<div class="user-icon">
|
||||
<div class="user-img">
|
||||
<img :src="userInfo.face" style="width:100%;height:100%;" v-if="userInfo.face" alt />
|
||||
<img
|
||||
:src="userInfo.face"
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="userInfo.face"
|
||||
alt
|
||||
/>
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="96" />
|
||||
</div>
|
||||
<p>{{userInfo.nickName}}</p>
|
||||
<p>{{ userInfo.nickName }}</p>
|
||||
</div>
|
||||
|
||||
<!-- 循环导航栏 -->
|
||||
@@ -38,7 +43,6 @@
|
||||
>{{ chlidren.title }}</MenuItem
|
||||
>
|
||||
</Submenu>
|
||||
|
||||
</Menu>
|
||||
</Sider>
|
||||
<Layout class="layout ml_10">
|
||||
@@ -54,32 +58,33 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import menuList from './menu';
|
||||
import Storage from '@/plugins/storage.js';
|
||||
import menuList from "./menu";
|
||||
import Storage from "@/plugins/storage.js";
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
data () {
|
||||
name: "Home",
|
||||
data() {
|
||||
return {
|
||||
menuList // 会员中心左侧列表
|
||||
menuList, // 会员中心左侧列表
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userInfo () { // 用户信息
|
||||
return JSON.parse(Storage.getItem('userInfo'));
|
||||
}
|
||||
userInfo() {
|
||||
// 用户信息
|
||||
if (Storage.getItem("userInfo")) {
|
||||
return JSON.parse(Storage.getItem("userInfo"));
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 每次点击左侧bar的callback
|
||||
onSelect (name) {
|
||||
this.$router.push({name: name});
|
||||
onSelect(name) {
|
||||
this.$router.push({ name: name });
|
||||
},
|
||||
// 跳转到个人中心的首页
|
||||
toUserMain () {
|
||||
this.$router.push(`/home`);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,28 +2,29 @@ import axios from 'axios';
|
||||
import https from 'https';
|
||||
import { Message, Spin, Modal } from 'view-design';
|
||||
import Storage from './storage';
|
||||
import config from '@/config';
|
||||
import router from '../router/index.js';
|
||||
import store from '../vuex/store';
|
||||
import { handleRefreshToken } from '@/api/index';
|
||||
import { v4 as uuidv4} from 'uuid';
|
||||
|
||||
const qs = require('qs');
|
||||
// api地址
|
||||
export const buyerUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.buyer
|
||||
: config.api_prod.buyer;
|
||||
? BASE.API_DEV.buyer
|
||||
: BASE.API_PROD.buyer;
|
||||
export const commonUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.common
|
||||
: config.api_prod.common;
|
||||
? BASE.API_DEV.common
|
||||
: BASE.API_PROD.common;
|
||||
export const managerUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.manager
|
||||
: config.api_prod.manager;
|
||||
? BASE.API_DEV.manager
|
||||
: BASE.API_PROD.manager;
|
||||
export const sellerUrl =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? config.api_dev.seller
|
||||
: config.api_prod.seller;
|
||||
? BASE.API_DEV.seller
|
||||
: BASE.API_PROD.seller;
|
||||
// 创建axios实例
|
||||
var isRefreshToken = 0;
|
||||
const refreshToken = getTokenDebounce();
|
||||
@@ -60,7 +61,11 @@ service.interceptors.request.use(
|
||||
config.loading = Spin.show();
|
||||
}
|
||||
|
||||
const uuid = Storage.getItem('uuid');
|
||||
let uuid = Storage.getItem('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
Storage.setItem('uuid', uuid);
|
||||
}
|
||||
config.headers['uuid'] = uuid;
|
||||
|
||||
// 获取访问Token
|
||||
@@ -83,7 +88,7 @@ service.interceptors.request.use(
|
||||
}
|
||||
);
|
||||
|
||||
async function refresh (error) {
|
||||
async function refresh(error) {
|
||||
const getTokenRes = await refreshToken();
|
||||
if (getTokenRes === 'success') {
|
||||
// 刷新token
|
||||
@@ -116,7 +121,8 @@ async function refresh (error) {
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
router.go(0)
|
||||
// router.go(0)
|
||||
router.push("/");
|
||||
Modal.remove();
|
||||
}
|
||||
});
|
||||
@@ -136,7 +142,7 @@ service.interceptors.response.use(
|
||||
const errorResponse = error.response || {};
|
||||
const errorData = errorResponse.data || {};
|
||||
|
||||
if (errorResponse.status === 403) {
|
||||
if (errorResponse.status === 403 || error.response.data.code === 20004) {
|
||||
isRefreshToken++;
|
||||
|
||||
if (isRefreshToken === 1) {
|
||||
|
||||
@@ -1,344 +1,383 @@
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import Index from '@/pages/Index';
|
||||
const Login = resolve => require(['@/pages/Login'], resolve);
|
||||
const SignUp = resolve => require(['@/pages/SignUp'], resolve);
|
||||
const ForgetPassword = resolve => require(['@/pages/ForgetPassword'], resolve);
|
||||
const GoodsList = resolve => require(['@/pages/GoodsList'], resolve);
|
||||
const GoodsDetail = resolve => require(['@/pages/GoodsDetail'], resolve);
|
||||
const PointGoodsDetail = resolve => require(['@/pages/promotion/PointGoodsDetail'], resolve);
|
||||
const ShoppingCart = resolve => require(['@/pages/ShoppingCart'], resolve);
|
||||
const Cart = resolve => require(['@/pages/Cart'], resolve);
|
||||
const Pay = resolve => require(['@/pages/payment/Pay'], resolve);
|
||||
const PayDone = resolve => require(['@/pages/payment/PayDone'], resolve);
|
||||
const PayMent = resolve => require(['@/pages/payment/PayMent'], resolve);
|
||||
const ThirdPay = resolve => require(['@/pages/payment/ThirdPay'], resolve);
|
||||
const Coupon = resolve => require(['@/pages/CouponCenter'], resolve);
|
||||
const seckill = resolve => require(['@/pages/promotion/seckill'], resolve);
|
||||
const article = resolve => require(['@/pages/article/index'], resolve);
|
||||
const PointMall = resolve => require(['@/pages/promotion/PointMall'], resolve);
|
||||
import Vue from "vue";
|
||||
import Router from "vue-router";
|
||||
import Index from "@/pages/Index";
|
||||
const Login = (resolve) => require(["@/pages/Login"], resolve);
|
||||
const SignUp = (resolve) => require(["@/pages/SignUp"], resolve);
|
||||
const ForgetPassword = (resolve) =>
|
||||
require(["@/pages/ForgetPassword"], resolve);
|
||||
const GoodsList = (resolve) => require(["@/pages/GoodsList"], resolve);
|
||||
const GoodsDetail = (resolve) => require(["@/pages/GoodsDetail"], resolve);
|
||||
const PointGoodsDetail = (resolve) =>
|
||||
require(["@/pages/promotion/PointGoodsDetail"], resolve);
|
||||
const ShoppingCart = (resolve) => require(["@/pages/ShoppingCart"], resolve);
|
||||
const Cart = (resolve) => require(["@/pages/Cart"], resolve);
|
||||
const Pay = (resolve) => require(["@/pages/payment/Pay"], resolve);
|
||||
const PayDone = (resolve) => require(["@/pages/payment/PayDone"], resolve);
|
||||
const PayMent = (resolve) => require(["@/pages/payment/PayMent"], resolve);
|
||||
const ThirdPay = (resolve) => require(["@/pages/payment/ThirdPay"], resolve);
|
||||
const Coupon = (resolve) => require(["@/pages/CouponCenter"], resolve);
|
||||
const seckill = (resolve) => require(["@/pages/promotion/seckill"], resolve);
|
||||
const article = (resolve) => require(["@/pages/article/index"], resolve);
|
||||
const articleDetail = (resolve) => require(["@/pages/article/detail"], resolve);
|
||||
const PointMall = (resolve) =>
|
||||
require(["@/pages/promotion/PointMall"], resolve);
|
||||
|
||||
/*
|
||||
* 会员中心
|
||||
* 订单列表
|
||||
*/
|
||||
const MyOrder = resolve => require([`@/pages/home/orderCenter/MyOrder`], resolve);
|
||||
const OrderDetail = resolve => require([`@/pages/home/orderCenter/OrderDetail`], resolve);
|
||||
const MyAddress = resolve => require(['@/pages/home/orderCenter/MyAddress'], resolve);
|
||||
const AddAddress = resolve => require(['@/pages/home/orderCenter/AddAddress'], resolve);
|
||||
const Complain = resolve => require(['@/pages/home/orderCenter/Complain'], resolve);
|
||||
const AfterSale = resolve => require(['@/pages/home/orderCenter/AfterSale'], resolve);
|
||||
const AfterSaleDetail = resolve => require(['@/pages/home/orderCenter/AfterSaleDetail'], resolve);
|
||||
const ApplyAfterSale = resolve => require(['@/pages/home/orderCenter/ApplyAfterSale'], resolve);
|
||||
const MyOrder = (resolve) =>
|
||||
require([`@/pages/home/orderCenter/MyOrder`], resolve);
|
||||
const OrderDetail = (resolve) =>
|
||||
require([`@/pages/home/orderCenter/OrderDetail`], resolve);
|
||||
const MyAddress = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/MyAddress"], resolve);
|
||||
const AddAddress = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/AddAddress"], resolve);
|
||||
const Complain = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/Complain"], resolve);
|
||||
const AfterSale = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/AfterSale"], resolve);
|
||||
const AfterSaleDetail = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/AfterSaleDetail"], resolve);
|
||||
const ApplyAfterSale = (resolve) =>
|
||||
require(["@/pages/home/orderCenter/ApplyAfterSale"], resolve);
|
||||
|
||||
/*
|
||||
* 会员中心
|
||||
*/
|
||||
const Profile = resolve => require(['@/pages/home/memberCenter/Profile'], resolve);
|
||||
const AccountSafe = resolve => require(['@/pages/home/memberCenter/AccountSafe'], resolve);
|
||||
const ModifyPwd = resolve => require(['@/pages/home/memberCenter/ModifyPwd'], resolve);
|
||||
const Favorites = resolve => require(['@/pages/home/memberCenter/Favorites'], resolve);
|
||||
const Distribution = resolve => require(['@/pages/home/memberCenter/Distribution'], resolve);
|
||||
const CommentList = resolve => require(['@/pages/home/memberCenter/CommentList'], resolve); // 评价列表
|
||||
const AddEval = resolve => require(['@/pages/home/memberCenter/evaluation/AddEval'], resolve); // 添加评价
|
||||
const EvalDetail = resolve => require(['@/pages/home/memberCenter/evaluation/EvalDetail'], resolve);
|
||||
const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList'], resolve);
|
||||
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
|
||||
const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve);
|
||||
const MsgList = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgList'], resolve);
|
||||
const MsgDetail = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgDetail'], resolve);
|
||||
const Profile = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Profile"], resolve);
|
||||
const AccountSafe = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/AccountSafe"], resolve);
|
||||
const ModifyPwd = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/ModifyPwd"], resolve);
|
||||
const Favorites = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Favorites"], resolve);
|
||||
const Distribution = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Distribution"], resolve);
|
||||
const CommentList = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/CommentList"], resolve); // 评价列表
|
||||
const AddEval = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/evaluation/AddEval"], resolve); // 添加评价
|
||||
const EvalDetail = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/evaluation/EvalDetail"], resolve);
|
||||
const ComplainList = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/ComplainList"], resolve);
|
||||
const ComplainDetail = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/ComplainDetail"], resolve);
|
||||
const Point = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/Point"], resolve);
|
||||
const MsgList = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/memberMsg/MsgList"], resolve);
|
||||
const MsgDetail = (resolve) =>
|
||||
require(["@/pages/home/memberCenter/memberMsg/MsgDetail"], resolve);
|
||||
|
||||
/*
|
||||
* 会员中心
|
||||
* 账户中心
|
||||
* */
|
||||
const Coupons = resolve => require(['@/pages/home/userCenter/Coupons'], resolve);
|
||||
const MyTracks = resolve => require(['@/pages/home/userCenter/MyTracks'], resolve);
|
||||
const MoneyManagement = resolve => require(['@/pages/home/userCenter/MoneyManagement'], resolve);
|
||||
const Coupons = (resolve) =>
|
||||
require(["@/pages/home/userCenter/Coupons"], resolve);
|
||||
const MyTracks = (resolve) =>
|
||||
require(["@/pages/home/userCenter/MyTracks"], resolve);
|
||||
const MoneyManagement = (resolve) =>
|
||||
require(["@/pages/home/userCenter/MoneyManagement"], resolve);
|
||||
|
||||
const Home = resolve => require(['@/pages/user/Home'], resolve);
|
||||
const Home = (resolve) => require(["@/pages/user/Home"], resolve);
|
||||
|
||||
const Merchant = resolve => require(['@/pages/Merchant'], resolve);
|
||||
const UserMain = resolve => require(['@/pages/home/Main'], resolve);
|
||||
const Merchant = (resolve) => require(["@/pages/Merchant"], resolve);
|
||||
const UserMain = (resolve) => require(["@/pages/home/Main"], resolve);
|
||||
|
||||
/**
|
||||
* 店铺入驻
|
||||
*/
|
||||
const ShopEntry = resolve => require(['@/pages/shopEntry/ShopEntry'], resolve);
|
||||
const ShopEntry = (resolve) =>
|
||||
require(["@/pages/shopEntry/ShopEntry"], resolve);
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
routes: [{
|
||||
path: '/', // 首页
|
||||
name: 'Index',
|
||||
component: Index
|
||||
},
|
||||
{
|
||||
path: '/login', // 登陆
|
||||
name: 'login',
|
||||
component: Login,
|
||||
meta: {
|
||||
title: 'LiLi 登录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/SignUp', // 注册
|
||||
name: 'SignUp',
|
||||
component: SignUp,
|
||||
meta: {
|
||||
title: 'LiLi 注册'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/forgetPassword', // 忘记密码
|
||||
name: 'forgetPassword',
|
||||
component: ForgetPassword,
|
||||
meta: {
|
||||
title: 'LiLi 忘记密码'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/goodsList', // 商品列表
|
||||
name: 'GoodsList',
|
||||
component: GoodsList
|
||||
},
|
||||
{
|
||||
path: '/goodsDetail', // 商品详情
|
||||
name: 'GoodsDetail',
|
||||
component: GoodsDetail,
|
||||
meta: {title: '商品详情'}
|
||||
},
|
||||
{
|
||||
path: '/pointGoodsDetail', // 商品详情
|
||||
name: 'PointGoodsDetail',
|
||||
component: PointGoodsDetail,
|
||||
meta: {title: '积分商品'}
|
||||
},
|
||||
{
|
||||
path: '/shoppingCart', // 头部购物车
|
||||
name: 'ShoppingCart',
|
||||
component: ShoppingCart
|
||||
},
|
||||
{
|
||||
path: '/cart', // 购物车
|
||||
name: 'Cart',
|
||||
component: Cart,
|
||||
meta: {title: '购物车'}
|
||||
},
|
||||
{
|
||||
path: '/pay', // 支付页面
|
||||
name: 'Pay',
|
||||
component: Pay,
|
||||
meta: {title: '订单结算'}
|
||||
},
|
||||
{
|
||||
path: '/payMent',
|
||||
name: 'PayMent',
|
||||
component: PayMent
|
||||
},
|
||||
{
|
||||
path: '/PointMall',
|
||||
name: 'PointMall',
|
||||
component: PointMall,
|
||||
meta: {title: '积分商城'}
|
||||
},
|
||||
{
|
||||
path: '/qrpay', // 三方支付
|
||||
name: 'qrpay',
|
||||
component: ThirdPay
|
||||
},
|
||||
{
|
||||
path: '/payDone', // 支付成功页面
|
||||
name: 'PayDone',
|
||||
component: PayDone
|
||||
},
|
||||
{
|
||||
path: '/article', // 文章页面
|
||||
name: 'article',
|
||||
component: article,
|
||||
meta: {
|
||||
title: '帮助中心'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/shopEntry',
|
||||
name: 'shopEntry',
|
||||
component: ShopEntry,
|
||||
meta: {
|
||||
title: '店铺入驻'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/coupon',
|
||||
name: 'coupon',
|
||||
component: Coupon,
|
||||
meta: {
|
||||
title: '领券中心'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/seckill',
|
||||
name: 'seckill',
|
||||
component: seckill,
|
||||
meta: {
|
||||
title: '限时秒杀'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/home', // 主页
|
||||
component: Home,
|
||||
children: [{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: UserMain,
|
||||
mode: "history",
|
||||
routes: [
|
||||
{
|
||||
path: "/", // 首页
|
||||
name: "Index",
|
||||
component: Index,
|
||||
},
|
||||
{
|
||||
path: "/login", // 登陆
|
||||
name: "login",
|
||||
component: Login,
|
||||
meta: {
|
||||
title: '会员中心'
|
||||
}
|
||||
title: "登录",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'MyTracks',
|
||||
name: 'MyTracks',
|
||||
component: MyTracks,
|
||||
meta: {title: '我的足迹'}
|
||||
path: "/SignUp", // 注册
|
||||
name: "SignUp",
|
||||
component: SignUp,
|
||||
meta: {
|
||||
title: "注册",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'MoneyManagement',
|
||||
name: 'MoneyManagement',
|
||||
component: MoneyManagement
|
||||
path: "/forgetPassword", // 忘记密码
|
||||
name: "forgetPassword",
|
||||
component: ForgetPassword,
|
||||
meta: {
|
||||
title: "忘记密码",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'Complain',
|
||||
name: 'Complain',
|
||||
component: Complain
|
||||
path: "/goodsList", // 商品列表
|
||||
name: "GoodsList",
|
||||
component: GoodsList,
|
||||
},
|
||||
{
|
||||
path: 'Coupons',
|
||||
name: 'Coupons',
|
||||
component: Coupons
|
||||
path: "/goodsDetail", // 商品详情
|
||||
name: "GoodsDetail",
|
||||
component: GoodsDetail,
|
||||
meta: { title: "商品详情" },
|
||||
},
|
||||
{
|
||||
path: 'CommentList',
|
||||
name: 'CommentList',
|
||||
component: CommentList,
|
||||
mate: {title: '评价列表'}
|
||||
path: "/pointGoodsDetail", // 商品详情
|
||||
name: "PointGoodsDetail",
|
||||
component: PointGoodsDetail,
|
||||
meta: { title: "积分商品" },
|
||||
},
|
||||
{
|
||||
path: 'AddEval',
|
||||
name: 'AddEval',
|
||||
component: AddEval,
|
||||
mate: {title: '添加评价'}
|
||||
path: "/shoppingCart", // 头部购物车
|
||||
name: "ShoppingCart",
|
||||
component: ShoppingCart,
|
||||
},
|
||||
{
|
||||
path: 'EvalDetail',
|
||||
name: 'EvalDetail',
|
||||
component: EvalDetail,
|
||||
mate: {title: '评价详情'}
|
||||
path: "/cart", // 购物车
|
||||
name: "Cart",
|
||||
component: Cart,
|
||||
meta: { title: "购物车" },
|
||||
},
|
||||
{
|
||||
path: 'ComplainList',
|
||||
name: 'ComplainList',
|
||||
component: ComplainList
|
||||
path: "/pay", // 支付页面
|
||||
name: "Pay",
|
||||
component: Pay,
|
||||
meta: { title: "订单结算" },
|
||||
},
|
||||
{
|
||||
path: 'ComplainDetail',
|
||||
name: 'ComplainDetail',
|
||||
component: ComplainDetail
|
||||
path: "/payMent",
|
||||
name: "PayMent",
|
||||
component: PayMent,
|
||||
},
|
||||
{
|
||||
path: 'AccountSafe',
|
||||
name: 'AccountSafe',
|
||||
component: AccountSafe
|
||||
path: "/PointMall",
|
||||
name: "PointMall",
|
||||
component: PointMall,
|
||||
meta: { title: "积分商城" },
|
||||
},
|
||||
{
|
||||
path: 'ModifyPwd',
|
||||
name: 'ModifyPwd',
|
||||
component: ModifyPwd
|
||||
path: "/qrpay", // 三方支付
|
||||
name: "qrpay",
|
||||
component: ThirdPay,
|
||||
},
|
||||
{
|
||||
path: 'Favorites',
|
||||
name: 'Favorites',
|
||||
component: Favorites,
|
||||
meta: {title: '我的收藏'}
|
||||
path: "/payDone", // 支付成功页面
|
||||
name: "PayDone",
|
||||
component: PayDone,
|
||||
},
|
||||
{
|
||||
path: 'Distribution',
|
||||
name: 'Distribution',
|
||||
component: Distribution,
|
||||
meta: {title: '分销推荐'}
|
||||
path: "/article", // 文章页面
|
||||
name: "article",
|
||||
component: article,
|
||||
meta: {
|
||||
title: "帮助中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'Point',
|
||||
name: 'Point',
|
||||
component: Point,
|
||||
meta: {title: '我的积分'}
|
||||
path: "/article/detail", // 文章页面
|
||||
name: "articleDetail",
|
||||
component: articleDetail,
|
||||
meta: {
|
||||
title: "帮助中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'Profile',
|
||||
name: 'Profile',
|
||||
component: Profile
|
||||
path: "/shopEntry",
|
||||
name: "shopEntry",
|
||||
component: ShopEntry,
|
||||
meta: {
|
||||
title: "店铺入驻",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'AfterSale',
|
||||
name: 'AfterSale',
|
||||
component: AfterSale,
|
||||
meta: {title: 'LiLi 售后'}
|
||||
path: "/coupon",
|
||||
name: "coupon",
|
||||
component: Coupon,
|
||||
meta: {
|
||||
title: "领券中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'ApplyAfterSale',
|
||||
name: 'ApplyAfterSale',
|
||||
component: ApplyAfterSale,
|
||||
meta: {title: '申请售后'}
|
||||
path: "/seckill",
|
||||
name: "seckill",
|
||||
component: seckill,
|
||||
meta: {
|
||||
title: "限时秒杀",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/home/MyAddress',
|
||||
name: 'MyAddress',
|
||||
component: MyAddress,
|
||||
meta: {title: '收货地址'}
|
||||
path: "/home", // 主页
|
||||
component: Home,
|
||||
children: [
|
||||
{
|
||||
path: "/",
|
||||
name: "Home",
|
||||
component: UserMain,
|
||||
meta: {
|
||||
title: "会员中心",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "MyTracks",
|
||||
name: "MyTracks",
|
||||
component: MyTracks,
|
||||
meta: { title: "我的足迹" },
|
||||
},
|
||||
{
|
||||
path: "MoneyManagement",
|
||||
name: "MoneyManagement",
|
||||
component: MoneyManagement,
|
||||
},
|
||||
{
|
||||
path: "Complain",
|
||||
name: "Complain",
|
||||
component: Complain,
|
||||
},
|
||||
{
|
||||
path: "Coupons",
|
||||
name: "Coupons",
|
||||
component: Coupons,
|
||||
},
|
||||
{
|
||||
path: "CommentList",
|
||||
name: "CommentList",
|
||||
component: CommentList,
|
||||
mate: { title: "评价列表" },
|
||||
},
|
||||
{
|
||||
path: "AddEval",
|
||||
name: "AddEval",
|
||||
component: AddEval,
|
||||
mate: { title: "添加评价" },
|
||||
},
|
||||
{
|
||||
path: "EvalDetail",
|
||||
name: "EvalDetail",
|
||||
component: EvalDetail,
|
||||
mate: { title: "评价详情" },
|
||||
},
|
||||
{
|
||||
path: "ComplainList",
|
||||
name: "ComplainList",
|
||||
component: ComplainList,
|
||||
},
|
||||
{
|
||||
path: "ComplainDetail",
|
||||
name: "ComplainDetail",
|
||||
component: ComplainDetail,
|
||||
},
|
||||
{
|
||||
path: "AccountSafe",
|
||||
name: "AccountSafe",
|
||||
component: AccountSafe,
|
||||
},
|
||||
{
|
||||
path: "ModifyPwd",
|
||||
name: "ModifyPwd",
|
||||
component: ModifyPwd,
|
||||
},
|
||||
{
|
||||
path: "Favorites",
|
||||
name: "Favorites",
|
||||
component: Favorites,
|
||||
meta: { title: "我的收藏" },
|
||||
},
|
||||
{
|
||||
path: "Distribution",
|
||||
name: "Distribution",
|
||||
component: Distribution,
|
||||
meta: { title: "分销推荐" },
|
||||
},
|
||||
{
|
||||
path: "Point",
|
||||
name: "Point",
|
||||
component: Point,
|
||||
meta: { title: "我的积分" },
|
||||
},
|
||||
{
|
||||
path: "Profile",
|
||||
name: "Profile",
|
||||
component: Profile,
|
||||
},
|
||||
{
|
||||
path: "AfterSale",
|
||||
name: "AfterSale",
|
||||
component: AfterSale,
|
||||
meta: { title: "售后" },
|
||||
},
|
||||
{
|
||||
path: "ApplyAfterSale",
|
||||
name: "ApplyAfterSale",
|
||||
component: ApplyAfterSale,
|
||||
meta: { title: "申请售后" },
|
||||
},
|
||||
{
|
||||
path: "/home/MyAddress",
|
||||
name: "MyAddress",
|
||||
component: MyAddress,
|
||||
meta: { title: "收货地址" },
|
||||
},
|
||||
{
|
||||
path: "AddAddress",
|
||||
name: "AddAddress",
|
||||
component: AddAddress,
|
||||
},
|
||||
{
|
||||
path: "MsgList",
|
||||
name: "MsgList",
|
||||
component: MsgList,
|
||||
meta: { title: "我的消息" },
|
||||
},
|
||||
{
|
||||
path: "MsgDetail",
|
||||
name: "MsgDetail",
|
||||
component: MsgDetail,
|
||||
meta: { title: "我的消息" },
|
||||
},
|
||||
{
|
||||
path: "MyOrder",
|
||||
name: "MyOrder",
|
||||
component: MyOrder,
|
||||
meta: { title: "我的订单" },
|
||||
},
|
||||
{
|
||||
path: "OrderDetail",
|
||||
name: "OrderDetail",
|
||||
component: OrderDetail,
|
||||
meta: { title: "订单详情" },
|
||||
},
|
||||
{
|
||||
path: "AfterSaleDetail",
|
||||
name: "AfterSaleDetail",
|
||||
component: AfterSaleDetail,
|
||||
meta: { title: "售后详情" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'AddAddress',
|
||||
name: 'AddAddress',
|
||||
component: AddAddress
|
||||
path: "/merchant",
|
||||
name: "Merchant",
|
||||
component: Merchant,
|
||||
meta: { title: "店铺" },
|
||||
},
|
||||
{
|
||||
path: 'MsgList',
|
||||
name: 'MsgList',
|
||||
component: MsgList,
|
||||
meta: {title: '我的消息'}
|
||||
},
|
||||
{
|
||||
path: 'MsgDetail',
|
||||
name: 'MsgDetail',
|
||||
component: MsgDetail,
|
||||
meta: {title: '我的消息'}
|
||||
},
|
||||
{
|
||||
path: 'MyOrder',
|
||||
name: 'MyOrder',
|
||||
component: MyOrder,
|
||||
meta: {title: '我的订单'}
|
||||
},
|
||||
{
|
||||
path: 'OrderDetail',
|
||||
name: 'OrderDetail',
|
||||
component: OrderDetail,
|
||||
meta: {title: '订单详情'}
|
||||
},
|
||||
{
|
||||
path: 'AfterSaleDetail',
|
||||
name: 'AfterSaleDetail',
|
||||
component: AfterSaleDetail,
|
||||
meta: {title: '售后详情'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/merchant',
|
||||
name: 'Merchant',
|
||||
component: Merchant,
|
||||
meta: {title: '店铺'}
|
||||
}
|
||||
]
|
||||
],
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
const resolve = dir => {
|
||||
return path.join(__dirname, dir);
|
||||
};
|
||||
const configs = require('./src/config')
|
||||
/**
|
||||
* 在项目开发的时候将生产环境以及开发环境进行判断
|
||||
* 将生产环境中的路径用cdn来进行优化处理
|
||||
@@ -12,6 +13,7 @@ const resolve = dir => {
|
||||
*/
|
||||
const enableProduction = process.env.NODE_ENV === "production"; // 是否生产环境
|
||||
|
||||
|
||||
let externals = {
|
||||
vue: "Vue",
|
||||
axios: "axios",
|
||||
@@ -52,8 +54,8 @@ let jsPlugin = [
|
||||
})
|
||||
];
|
||||
// 判断是否需要加载CDN
|
||||
cdn = enableProduction ? cdn : { css: [], js: [] };
|
||||
externals = enableProduction ? externals : {};
|
||||
cdn = enableProduction && configs.enableCDN ? cdn : { css: [], js: [] };
|
||||
externals = enableProduction && configs.enableCDN ? externals : {};
|
||||
jsPlugin = enableProduction ? jsPlugin : [];
|
||||
|
||||
module.exports = {
|
||||
@@ -79,7 +81,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
port: 10000
|
||||
port: configs.port
|
||||
},
|
||||
|
||||
// 打包时不生成.map文件 避免看到源码
|
||||
@@ -128,6 +130,7 @@ module.exports = {
|
||||
config.resolve.alias.set("@", resolve("src"));
|
||||
config.plugin("html").tap(args => {
|
||||
args[0].cdn = cdn;
|
||||
args[0].title = configs.title;
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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/wap-ui-4.2.0:0.0.2
|
||||
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/manager-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.4.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.2.4.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.4.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.4.1
|
||||
|
||||
|
||||
5
manager/.npmrc
Normal file
5
manager/.npmrc
Normal file
@@ -0,0 +1,5 @@
|
||||
# 默认依赖包指定淘宝源
|
||||
registry=https://registry.npm.taobao.org/
|
||||
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
|
||||
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
|
||||
electron_mirror=https://npm.taobao.org/mirrors/electron/
|
||||
5
manager/.yarnrc
Normal file
5
manager/.yarnrc
Normal file
@@ -0,0 +1,5 @@
|
||||
registry "https://registry.npmmirror.com"
|
||||
sass_binary_site "https://npmmirror.com/mirrors/node-sass"
|
||||
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
|
||||
electron_mirror "https://npmmirror.com/mirrors/electron"
|
||||
|
||||
@@ -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.4.1 .
|
||||
|
||||
29
manager/public/config.js
Normal file
29
manager/public/config.js
Normal file
@@ -0,0 +1,29 @@
|
||||
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 name="viewport" content="width=device-width,initial-scale=1.0"> -->
|
||||
<link rel="icon" href="./logo.ico" type="image/x-icon" />
|
||||
<title>lili admin</title>
|
||||
<title>admin</title>
|
||||
<meta name="keywords" content="keywords" />
|
||||
<meta name="description" content="description" />
|
||||
<% for(var css of htmlWebpackPlugin.options.cdn.css) { %>
|
||||
@@ -67,9 +67,10 @@
|
||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||
<script src="<%=js%>"></script>
|
||||
<% } %>
|
||||
<script src="/config.js"></script>
|
||||
<noscript>
|
||||
<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
|
||||
>
|
||||
</noscript>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import {getCategoryTree} from '@/api/goods.js'
|
||||
export default {
|
||||
updated() {
|
||||
@@ -17,13 +16,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let uuid = this.getStore('uuid');
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
this.setStore('uuid', uuid);
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,20 +2,20 @@ import {commonUrl, getRequest, getRequestWithNoToken, postRequestWithNoToken} fr
|
||||
|
||||
// 通过id获取子地区
|
||||
export const getChildRegion = (id) => {
|
||||
return getRequest(`${commonUrl}/common/region/item/${id}`);
|
||||
return getRequest(`${commonUrl}/common/common/region/item/${id}`);
|
||||
};
|
||||
|
||||
// 点地图获取地址信息
|
||||
export const getRegion = (params) => {
|
||||
return getRequest(`${commonUrl}/common/region/region`, params);
|
||||
return getRequest(`${commonUrl}/common/common/region/region`, params);
|
||||
};
|
||||
|
||||
// 获取拼图验证
|
||||
export const getVerifyImg = (verificationEnums) => {
|
||||
return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`);
|
||||
return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
|
||||
};
|
||||
|
||||
// 拼图验证
|
||||
export const postVerifyImg = (params) => {
|
||||
return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params);
|
||||
return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
|
||||
};
|
||||
|
||||
@@ -4,21 +4,21 @@ import {getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios';
|
||||
|
||||
//查询分销商
|
||||
export const getDistributionListData = (params) => {
|
||||
return getRequest('/distribution/getByPage', params)
|
||||
return getRequest('/distribution/distribution/getByPage', params)
|
||||
}
|
||||
//审核分销商
|
||||
export const auditDistribution = (id, params) => {
|
||||
return putRequest(`/distribution/audit/${id}`, params)
|
||||
return putRequest(`/distribution/distribution/audit/${id}`, params)
|
||||
}
|
||||
// 清退分销商
|
||||
export const retreatDistribution = (id, params) => {
|
||||
return putRequest(`/distribution/retreat/${id}`, params)
|
||||
return putRequest(`/distribution/distribution/retreat/${id}`, params)
|
||||
}
|
||||
|
||||
|
||||
// 恢复分销商
|
||||
export const resumeDistribution = (id, params) => {
|
||||
return putRequest(`/distribution/resume/${id}`, params)
|
||||
return putRequest(`/distribution/distribution/resume/${id}`, params)
|
||||
}
|
||||
|
||||
//保存更新分销设置
|
||||
|
||||
@@ -26,15 +26,15 @@ export const disableBrand = (id, params) => {
|
||||
}
|
||||
//根据分类id获取关联品牌
|
||||
export const getCategoryBrandListData = (category_id, params) => {
|
||||
return getRequest(`/category/brand/${category_id}`, params)
|
||||
return getRequest(`/goods/categoryBrand/${category_id}`, params)
|
||||
}
|
||||
//保存获取关联品牌
|
||||
export const saveCategoryBrand = (category_id, params) => {
|
||||
return postRequest(`/category/brand/${category_id}`, params)
|
||||
return postRequest(`/goods/categoryBrand/${category_id}`, params)
|
||||
}
|
||||
//保存获取关联规格
|
||||
export const saveCategorySpec = (category_id, params) => {
|
||||
return postRequest(`/goods/category/spec/${category_id}`, params)
|
||||
return postRequest(`/goods/categorySpec/${category_id}`, params)
|
||||
}
|
||||
|
||||
//获取所有可用品牌
|
||||
@@ -88,7 +88,7 @@ export const updateSpec = (id,params) => {
|
||||
}
|
||||
//根据分类id获取关联规格
|
||||
export const getCategorySpecListData = (category_id, params) => {
|
||||
return getRequest(`/goods/category/spec/${category_id}`, params)
|
||||
return getRequest(`/goods/categorySpec/${category_id}`, params)
|
||||
}
|
||||
//删除gUI个
|
||||
export const delSpec = (id, params) => {
|
||||
@@ -102,35 +102,35 @@ export const getGoodsCategory = (parent_id) => {
|
||||
|
||||
// 上架商品
|
||||
export const upGoods = (id, params) => {
|
||||
return putRequest(`/goods/${id}/up`, params)
|
||||
return putRequest(`/goods/goods/${id}/up`, params)
|
||||
}
|
||||
// 下架商品
|
||||
export const lowGoods = (id, params) => {
|
||||
return putRequest(`/goods/${id}/under`, params)
|
||||
return putRequest(`/goods/goods/${id}/under`, params)
|
||||
}
|
||||
|
||||
// 获取商品sku分页列表
|
||||
export const getGoodsSkuData = (params) => {
|
||||
return getRequest('/goods/sku/list', params)
|
||||
return getRequest('/goods/goods/sku/list', params)
|
||||
}
|
||||
|
||||
|
||||
// 获取商品分页列表
|
||||
export const getGoodsListData = (params) => {
|
||||
return getRequest('/goods/list', params)
|
||||
return getRequest('/goods/goods/list', params)
|
||||
}
|
||||
// 获取待审核商品分页列表
|
||||
export const getAuthGoodsListData = (params) => {
|
||||
return getRequest('/goods/auth/list', params)
|
||||
return getRequest('/goods/goods/auth/list', params)
|
||||
}
|
||||
// 审核商品
|
||||
export const authGoods = (id, params) => {
|
||||
return putRequest(`/goods/${id}/auth`, params)
|
||||
return putRequest(`/goods/goods/${id}/auth`, params)
|
||||
}
|
||||
|
||||
//查询分类绑定参数信息
|
||||
export const getCategoryParamsListData = (id, params) => {
|
||||
return getRequest(`/goods/category/parameters/${id}`, params)
|
||||
return getRequest(`/goods/categoryParameters/${id}`, params)
|
||||
}
|
||||
|
||||
//查询商品绑定参数信息
|
||||
@@ -151,20 +151,20 @@ export const deleteParams = (id, params) => {
|
||||
}
|
||||
//保存参数组
|
||||
export const insertParamsGroup = (params) => {
|
||||
return postRequest('/goods/category/parameters', params)
|
||||
return postRequest('/goods/categoryParameters', params)
|
||||
}
|
||||
//更新参数组
|
||||
export const updateParamsGroup = (params) => {
|
||||
return putRequest('/goods/category/parameters', params)
|
||||
return putRequest('/goods/categoryParameters', params)
|
||||
}
|
||||
//删除参数组
|
||||
export const deleteParamsGroup = (id, params) => {
|
||||
return deleteRequest(`/goods/category/parameters/${id}`, params)
|
||||
return deleteRequest(`/goods/categoryParameters/${id}`, params)
|
||||
}
|
||||
|
||||
//保存获取关联规格
|
||||
export const getGoodsSpecInfo = (category_id, params) => {
|
||||
return getRequest(`/goods/category/spec/goods/${category_id}`, params)
|
||||
return getRequest(`/goods/categorySpec/goods/${category_id}`, params)
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ export const getSkuPage = (params) => {
|
||||
|
||||
//查看商品详情
|
||||
export const getGoodsDetail = (id) => {
|
||||
return getRequest(`/goods/get/${id}`)
|
||||
return getRequest(`/goods/goods/get/${id}`)
|
||||
}
|
||||
|
||||
|
||||
@@ -225,4 +225,3 @@ export const refundStatistics = (params) => {
|
||||
export const refundPriceStatistics = (params) => {
|
||||
return getRequest(`/statistics/refund/order/getPrice`, params)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,21 +7,22 @@ import {
|
||||
importRequest,
|
||||
getRequestWithNoToken,
|
||||
putRequestWithNoForm,
|
||||
postRequestWithNoTokenData,
|
||||
postRequestWithNoForm,
|
||||
managerUrl
|
||||
} 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/common/upload/file";
|
||||
// Websocket
|
||||
export const ws = managerUrl + "/ws";
|
||||
|
||||
//获取所有city
|
||||
export const getAllCity = (params) => {
|
||||
return getRequest(commonUrl + '/common/region/allCity', params)
|
||||
return getRequest(commonUrl + '/common/common/region/allCity', params)
|
||||
}
|
||||
|
||||
|
||||
@@ -47,15 +48,21 @@ export const getNoticePage = (params) => {
|
||||
|
||||
// 登陆
|
||||
export const login = (params) => {
|
||||
return getRequestWithNoToken("/user/login", params);
|
||||
return postRequestWithNoTokenData("/passport/user/login", params);
|
||||
};
|
||||
|
||||
// 登出
|
||||
export const logout = () => {
|
||||
return postRequest("/passport/user/logout");
|
||||
};
|
||||
|
||||
// 刷新token
|
||||
export const handleRefreshToken = (token) => {
|
||||
return getRequestWithNoToken(`/user/refresh/${token}`);
|
||||
return getRequestWithNoToken(`/passport/user/refresh/${token}`);
|
||||
};
|
||||
// 获取用户登录信息
|
||||
export const userInfo = (params) => {
|
||||
return getRequest("/user/info", params);
|
||||
return getRequest("/passport/user/info", params);
|
||||
};
|
||||
// 注册
|
||||
export const regist = (params) => {
|
||||
@@ -92,131 +99,131 @@ export const ipInfo = (params) => {
|
||||
};
|
||||
// 个人中心编辑
|
||||
export const userInfoEdit = (params) => {
|
||||
return putRequest("/user/edit", params);
|
||||
return putRequest("/passport/user/edit", params);
|
||||
};
|
||||
// 个人中心修改密码
|
||||
export const changePass = (params) => {
|
||||
return putRequest("/user/editPassword", params);
|
||||
return putRequest("/passport/user/editPassword", params);
|
||||
};
|
||||
// 个人中心修改手机
|
||||
export const changeMobile = (params) => {
|
||||
return postRequest("/user/changeMobile", params);
|
||||
return postRequest("/passport/user/changeMobile", params);
|
||||
};
|
||||
// 获取用户数据 多条件
|
||||
export const getUserListData = (params) => {
|
||||
return getRequest("/user", params);
|
||||
return getRequest("/passport/user", params);
|
||||
};
|
||||
// 通过用户名搜索
|
||||
export const searchUserByName = (username, params) => {
|
||||
return getRequest("/user/searchByName/" + username, params);
|
||||
return getRequest("/passport/user/searchByName/" + username, params);
|
||||
};
|
||||
// 获取全部用户数据
|
||||
export const getAllUserData = (params) => {
|
||||
return getRequest("/user/getAll", params);
|
||||
return getRequest("/passport/user/getAll", params);
|
||||
};
|
||||
|
||||
// 添加用户
|
||||
export const addUser = (params) => {
|
||||
return postRequest("/user", params);
|
||||
return postRequest("/passport/user", params);
|
||||
};
|
||||
// 编辑管理员自身
|
||||
export const editUser = (params) => {
|
||||
return putRequest("/user/edit", params);
|
||||
return putRequest("/passport/user/edit", params);
|
||||
};
|
||||
// 编辑用户
|
||||
export const editOtherUser = (params) => {
|
||||
return putRequest("/user/admin/edit", params);
|
||||
return putRequest("/passport/user/admin/edit", params);
|
||||
};
|
||||
// 启用用户
|
||||
export const enableUser = (id, params) => {
|
||||
return putRequest(`/user/enable/${id}`, params);
|
||||
return putRequest(`/passport/user/enable/${id}`, params);
|
||||
};
|
||||
// 删除用户
|
||||
export const deleteUser = (ids, params) => {
|
||||
return deleteRequest(`/user/${ids}`, params);
|
||||
return deleteRequest(`/passport/user/${ids}`, params);
|
||||
};
|
||||
// 导入用户
|
||||
export const importUserData = (params) => {
|
||||
return importRequest("/user/importData", params);
|
||||
return importRequest("/passport/user/importData", params);
|
||||
};
|
||||
/****************************** 部门 */
|
||||
// 通过部门获取全部角色数据
|
||||
export const getUserByDepartmentId = (id, params) => {
|
||||
return getRequest(`/departmentRole/${id}`, params);
|
||||
return getRequest(`/permission/departmentRole/${id}`, params);
|
||||
};
|
||||
|
||||
// 通过部门修改绑定角色
|
||||
export const updateDepartmentRole = (id, params) => {
|
||||
return putRequestWithNoForm(`/departmentRole/${id}`, params);
|
||||
return putRequestWithNoForm(`/permission/departmentRole/${id}`, params);
|
||||
};
|
||||
|
||||
// 获取一级部门
|
||||
export const initDepartment = (params) => {
|
||||
return getRequest("/department", params);
|
||||
return getRequest("/permission/department", params);
|
||||
};
|
||||
// 加载部门子级数据
|
||||
export const loadDepartment = (id) => {
|
||||
return getRequest(`/department/${id}`);
|
||||
return getRequest(`/permission/department/${id}`);
|
||||
};
|
||||
// 添加部门
|
||||
export const addDepartment = (params) => {
|
||||
return postRequest("/department", params);
|
||||
return postRequest("/permission/department", params);
|
||||
};
|
||||
// 编辑部门
|
||||
export const editDepartment = (ids, params) => {
|
||||
return putRequest(`/department/${ids} `, params);
|
||||
return putRequest(`/permission/department/${ids} `, params);
|
||||
};
|
||||
// 删除部门
|
||||
export const deleteDepartment = (ids, params) => {
|
||||
return deleteRequest(`/department/${ids}`, params);
|
||||
return deleteRequest(`/permission/department/${ids}`, params);
|
||||
};
|
||||
// 搜索部门
|
||||
export const searchDepartment = (params) => {
|
||||
return getRequest("/department/search", params);
|
||||
return getRequest("/permission/department/search", params);
|
||||
};
|
||||
|
||||
/****************************** 部门结束 */
|
||||
|
||||
// 获取全部角色数据
|
||||
export const getAllRoleList = (params) => {
|
||||
return getRequest("/role", params);
|
||||
return getRequest("/permission/role", params);
|
||||
};
|
||||
// 分页获取角色数据
|
||||
export const getRoleList = (params) => {
|
||||
return getRequest("/role", params);
|
||||
return getRequest("/permission/role", params);
|
||||
};
|
||||
|
||||
// 添加角色
|
||||
export const addRole = (params) => {
|
||||
return postRequest("/role", params);
|
||||
return postRequest("/permission/role", params);
|
||||
};
|
||||
|
||||
// 编辑角色
|
||||
export const editRole = (params) => {
|
||||
return putRequest(`/role/${params.roleId}`, params);
|
||||
return putRequest(`/permission/role/${params.roleId}`, params);
|
||||
};
|
||||
|
||||
// 查看某角色拥有的菜单
|
||||
export const selectRoleMenu = (params) => {
|
||||
return getRequest(`/roleMenu/${params}`);
|
||||
return getRequest(`/permission/roleMenu/${params}`);
|
||||
};
|
||||
|
||||
// 保存角色菜单
|
||||
export const saveRoleMenu = (id, params) => {
|
||||
return postRequestWithNoForm(`/roleMenu/${id}`, params);
|
||||
return postRequestWithNoForm(`/permission/roleMenu/${id}`, params);
|
||||
};
|
||||
|
||||
// 分配角色权限
|
||||
export const editRolePerm = (params) => {
|
||||
return postRequest("/role/editRolePerm", params);
|
||||
return postRequest("/permission/role/editRolePerm", params);
|
||||
};
|
||||
// 分配角色数据权限
|
||||
export const editRoleDep = (params) => {
|
||||
return postRequest("/role/editRoleDep", params);
|
||||
return postRequest("/permission/role/editRoleDep", params);
|
||||
};
|
||||
// 删除角色
|
||||
export const deleteRole = (ids, params) => {
|
||||
return deleteRequest(`/role/${ids}`, params);
|
||||
return deleteRequest(`/permission/role/${ids}`, params);
|
||||
};
|
||||
|
||||
/****************************** 角色结束 */
|
||||
@@ -225,30 +232,30 @@ export const deleteRole = (ids, params) => {
|
||||
/****************************** 权限 */
|
||||
// 获取全部权限数据
|
||||
export const getAllPermissionList = (params) => {
|
||||
return getRequest("/menu/tree", params);
|
||||
return getRequest("/permission/menu/tree", params);
|
||||
};
|
||||
|
||||
// 获取全部权限数据
|
||||
export const getCurrentPermissionList = (params) => {
|
||||
return getRequest("/menu/memberMenu", params);
|
||||
return getRequest("/permission/menu/memberMenu", params);
|
||||
};
|
||||
|
||||
// 添加权限
|
||||
export const addPermission = (params) => {
|
||||
return postRequest("/menu", params);
|
||||
return postRequest("/permission/menu", params);
|
||||
};
|
||||
|
||||
// 编辑权限
|
||||
export const editPermission = (params) => {
|
||||
return putRequest(`/menu/${params.id}`, params);
|
||||
return putRequest(`/permission/menu/${params.id}`, params);
|
||||
};
|
||||
// 删除权限
|
||||
export const deletePermission = (ids, params) => {
|
||||
return deleteRequest(`/menu/${ids}`, params);
|
||||
return deleteRequest(`/permission/menu/${ids}`, params);
|
||||
};
|
||||
// 搜索权限
|
||||
export const searchPermission = (params) => {
|
||||
return getRequest("/menu", params);
|
||||
return getRequest("/permission/menu", params);
|
||||
};
|
||||
|
||||
/****************************** 权限结束 */
|
||||
@@ -256,25 +263,25 @@ export const searchPermission = (params) => {
|
||||
|
||||
// 分页获取日志数据
|
||||
export const getLogListData = (params) => {
|
||||
return getRequest("/log/getAllByPage", params);
|
||||
return getRequest("/setting/log/getAllByPage", params);
|
||||
};
|
||||
// 删除日志
|
||||
export const deleteLog = (ids, params) => {
|
||||
return deleteRequest(`/log/${ids}`, params);
|
||||
return deleteRequest(`/setting/log/${ids}`, params);
|
||||
};
|
||||
// 清空日志
|
||||
export const deleteAllLog = (params) => {
|
||||
return deleteRequest("/log", params);
|
||||
return deleteRequest("/setting/log", params);
|
||||
};
|
||||
|
||||
|
||||
// 分页获取消息数据
|
||||
export const getMessageData = (params) => {
|
||||
return getRequest("/message/getByCondition", params);
|
||||
return getRequest("/other/message/getByCondition", params);
|
||||
};
|
||||
// 获取单个消息详情
|
||||
export const getMessageDataById = (id, params) => {
|
||||
return getRequest(`/message/get/${id}`, params);
|
||||
return getRequest(`/other/message/get/${id}`, params);
|
||||
};
|
||||
// 发送消息
|
||||
export const addMessage = (params) => {
|
||||
@@ -282,11 +289,11 @@ export const addMessage = (params) => {
|
||||
};
|
||||
// 编辑消息
|
||||
export const editMessage = (params) => {
|
||||
return postRequest("/message/edit", params);
|
||||
return postRequest("/other/message/edit", params);
|
||||
};
|
||||
// 删除消息
|
||||
export const deleteMessage = (ids, params) => {
|
||||
return deleteRequest(`/message/delByIds/${ids}`, params);
|
||||
return deleteRequest(`/other/message/delByIds/${ids}`, params);
|
||||
};
|
||||
// 编辑发送消息
|
||||
export const editMessageSend = (params) => {
|
||||
@@ -299,16 +306,16 @@ export const deleteMessageSend = (ids, params) => {
|
||||
|
||||
// 分页获取文件数据
|
||||
export const getFileListData = (params) => {
|
||||
return getRequest("/file", params);
|
||||
return getRequest("/common/file", params);
|
||||
};
|
||||
|
||||
// 重命名文件
|
||||
export const renameFile = (params) => {
|
||||
return postRequest("/file/rename", params);
|
||||
return postRequest("/common/file/rename", params);
|
||||
};
|
||||
// 删除文件
|
||||
export const deleteFile = (ids, params) => {
|
||||
return deleteRequest(`/file/delete/${ids}`, params);
|
||||
return deleteRequest(`/common/file/delete/${ids}`, params);
|
||||
};
|
||||
// 下载文件
|
||||
export const aliDownloadFile = (fKey, params) => {
|
||||
@@ -317,37 +324,37 @@ export const aliDownloadFile = (fKey, params) => {
|
||||
|
||||
// base64上传
|
||||
export const base64Upload = (params) => {
|
||||
return postRequest("/upload/file", params);
|
||||
return postRequest("/common/common/upload/file", params);
|
||||
};
|
||||
|
||||
// 系统设置
|
||||
export const getSetting = (key) => {
|
||||
return getRequest(`/system/setting/get/${key}`);
|
||||
return getRequest(`/setting/setting/get/${key}`);
|
||||
};
|
||||
// 更新系统配置
|
||||
export const setSetting = (key, params) => {
|
||||
return putRequestWithNoForm(`/system/setting/put/${key}`, params);
|
||||
return putRequestWithNoForm(`/setting/setting/put/${key}`, params);
|
||||
};
|
||||
|
||||
// 分页查询敏感词
|
||||
|
||||
export const getSensitiveWordsPage = (params) => {
|
||||
return getRequest(`/sensitiveWords`, params);
|
||||
return getRequest(`/other/sensitiveWords`, params);
|
||||
};
|
||||
|
||||
// 分页查询敏感词
|
||||
export const insertSensitiveWords = (params) => {
|
||||
return postRequest(`/sensitiveWords`, params);
|
||||
return postRequest(`/other/sensitiveWords`, params);
|
||||
};
|
||||
|
||||
// 修改
|
||||
export const updateSensitiveWords = (id, params) => {
|
||||
return putRequest(`/sensitiveWords/${id}`, params);
|
||||
return putRequest(`/other/sensitiveWords/${id}`, params);
|
||||
};
|
||||
|
||||
// 删除敏感词
|
||||
export const delSensitive = (ids) => {
|
||||
return deleteRequest(`/sensitiveWords/delByIds/${ids}`);
|
||||
return deleteRequest(`/other/sensitiveWords/delByIds/${ids}`);
|
||||
};
|
||||
|
||||
// 添加商品计量单位
|
||||
@@ -369,71 +376,74 @@ export const delGoodsUnit = (ids) => {
|
||||
|
||||
// 同步高德行政地区数据
|
||||
export const asyncRegion = () => {
|
||||
return postRequest(`/region/sync`);
|
||||
return postRequest(`/setting/region/sync`);
|
||||
};
|
||||
|
||||
// 批量id删除
|
||||
export const delRegion = (ids) => {
|
||||
return deleteRequest(`/region/${ids}`);
|
||||
return deleteRequest(`/setting/region/${ids}`);
|
||||
};
|
||||
|
||||
// 更新地区
|
||||
export const updateRegion = (id, params) => {
|
||||
return putRequest(`/region/${id}`, params);
|
||||
return putRequest(`/setting/region/${id}`, params);
|
||||
};
|
||||
// 添加地区
|
||||
export const addRegion = (params) => {
|
||||
return postRequest(`/region`, params);
|
||||
return postRequest(`/setting/region`, params);
|
||||
};
|
||||
|
||||
// 通过id获取子地区
|
||||
export const getChildRegion = (id) => {
|
||||
return getRequest(`/region/item/${id}`);
|
||||
return getRequest(`/setting/region/item/${id}`);
|
||||
};
|
||||
|
||||
// 重置用户密码
|
||||
export const resetPassword = (params) => {
|
||||
return postRequest(`/user/resetPassword/${params}"`);
|
||||
return postRequest(`/passport/user/resetPassword/${params}"`);
|
||||
};
|
||||
|
||||
// 初始化商品索引
|
||||
export const createIndex = () => {
|
||||
return getRequest(`/elasticsearch`);
|
||||
return getRequest(`/other/elasticsearch`);
|
||||
};
|
||||
|
||||
// 初始化商品索引
|
||||
export const getProgress = () => {
|
||||
return getRequest(`/elasticsearch/progress`);
|
||||
return getRequest(`/other/elasticsearch/progress`);
|
||||
};
|
||||
|
||||
// 分页查询自定义分词
|
||||
export const getCustomWordsPage = (params) => {
|
||||
return getRequest(`/manager/custom-words`, params);
|
||||
return getRequest(`/other/customWords/page`, params);
|
||||
};
|
||||
|
||||
// 添加自定义分词
|
||||
export const insertCustomWords = (params) => {
|
||||
return postRequest(`/manager/custom-words`, params);
|
||||
return postRequest(`/other/customWords`, params);
|
||||
};
|
||||
|
||||
// 修改自定义分词
|
||||
export const updateCustomWords = (params) => {
|
||||
return putRequest(`/manager/custom-words`, params);
|
||||
return putRequest(`/other/customWords`, params);
|
||||
};
|
||||
|
||||
// 删除自定义分词
|
||||
export const delCustom = (id) => {
|
||||
return deleteRequest(`/manager/custom-words/${id}`);
|
||||
return deleteRequest(`/other/customWords/${id}`);
|
||||
};
|
||||
|
||||
// 设置热搜词
|
||||
export const setHotWords = (params) => {
|
||||
return postRequest(`/hotwords`, params);
|
||||
return postRequest(`/hotwords/hotwords`, params);
|
||||
};
|
||||
|
||||
// 删除热搜词
|
||||
export const deleteHotWords = (words) => {
|
||||
return deleteRequest(`/hotwords/hotwords/${words}`);
|
||||
};
|
||||
|
||||
// 获取热搜词
|
||||
export const getHotWords = () => {
|
||||
return getRequest(`/hotwords`);
|
||||
return getRequest(`/hotwords/hotwords`);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,23 +10,23 @@ import {
|
||||
|
||||
// 分页获取物流公司
|
||||
export const getLogisticsPage = params => {
|
||||
return getRequest(`/logistics/getByPage`, params);
|
||||
return getRequest(`/other/logistics/getByPage`, params);
|
||||
};
|
||||
// 删除
|
||||
export const delLogistics = id => {
|
||||
return deleteRequest(`/logistics/delete/${id}`);
|
||||
return deleteRequest(`/other/logistics/delete/${id}`);
|
||||
};
|
||||
// 添加
|
||||
export const addLogistics = params => {
|
||||
return postRequest(`/logistics/save`,params);
|
||||
return postRequest(`/other/logistics/save`,params);
|
||||
};
|
||||
// 通过id查询详情
|
||||
export const getLogisticsDetail = id => {
|
||||
return getRequest(`/logistics/get/${id}`);
|
||||
return getRequest(`/other/logistics/get/${id}`);
|
||||
};
|
||||
// 编辑
|
||||
export const updateLogistics = (id,params) => {
|
||||
return putRequest(`/logistics/${id}`,params);
|
||||
return putRequest(`/other/logistics/${id}`,params);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -9,22 +9,22 @@ export const getMember = params => {
|
||||
|
||||
// 分页获取会员评价
|
||||
export const getMemberReview = params => {
|
||||
return getRequest("/memberEvaluation/getByPage", params);
|
||||
return getRequest("/member/evaluation/getByPage", params);
|
||||
};
|
||||
|
||||
// 获取id
|
||||
export const getMemberInfoReview = id => {
|
||||
return getRequest(`/memberEvaluation/get/${id}`);
|
||||
return getRequest(`/member/evaluation/get/${id}`);
|
||||
};
|
||||
|
||||
|
||||
// 删除评论
|
||||
export const delMemberReview = id => {
|
||||
return putRequest(`/memberEvaluation/delete/${id}`);
|
||||
return putRequest(`/member/evaluation/delete/${id}`);
|
||||
};
|
||||
// 修改评价状态
|
||||
export const updateMemberReview = (id, params) => {
|
||||
return getRequest(`/memberEvaluation/updateStatus/${id}`, params);
|
||||
return getRequest(`/member/evaluation/updateStatus/${id}`, params);
|
||||
};
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ export const insertOrUpdateSpec = params => {
|
||||
|
||||
// 获取会员列表
|
||||
export const getMemberListData = params => {
|
||||
return getRequest("/member", params);
|
||||
return getRequest("/passport/member", params);
|
||||
};
|
||||
|
||||
// 获取会员详情
|
||||
export const getMemberInfoData = (id) => {
|
||||
return getRequest(`/member/${id}`);
|
||||
return getRequest(`/passport/member/${id}`);
|
||||
};
|
||||
|
||||
// 修改会员基本信息
|
||||
@@ -50,26 +50,26 @@ export const updateMember = (params) => {
|
||||
|
||||
// 添加会员基本信息
|
||||
export const addMember = params => {
|
||||
return postRequest(`/member`, params);
|
||||
return postRequest(`/passport/member`, params);
|
||||
};
|
||||
|
||||
// 获取会员列表
|
||||
export const getMemberAll = () => {
|
||||
return getRequest("/member/getAll");
|
||||
return getRequest("/passport/member/getAll");
|
||||
};
|
||||
|
||||
// 增加或修改会员列表
|
||||
export const operationMemberListData = params => {
|
||||
return postRequest("/member/insertOrUpdate", params);
|
||||
return postRequest("/passport/member/insertOrUpdate", params);
|
||||
};
|
||||
|
||||
// 增加或修改会员列表
|
||||
export const deleteMemberListData = ids => {
|
||||
return deleteRequest(`/member/delByIds/${ids}`);
|
||||
return deleteRequest(`/passport/member/delByIds/${ids}`);
|
||||
};
|
||||
// 获取充值记录列表数据
|
||||
export const getUserRecharge = params => {
|
||||
return getRequest("/recharge", params);
|
||||
return getRequest("/wallet/recharge", params);
|
||||
};
|
||||
|
||||
// 获取预存款明细列表数据
|
||||
@@ -79,17 +79,17 @@ export const getUserWallet = params => {
|
||||
|
||||
// 获取提现申请列表数据
|
||||
export const getUserWithdrawApply = params => {
|
||||
return getRequest("/members/withdraw-apply", params);
|
||||
return getRequest("/wallet/withdrawApply", params);
|
||||
};
|
||||
|
||||
// 审核提现申请
|
||||
export const withdrawApply = params => {
|
||||
return postRequest("/members/withdraw-apply", params);
|
||||
return postRequest("/wallet/withdrawApply", params);
|
||||
};
|
||||
|
||||
//会员状态修改
|
||||
export const updateMemberStatus = params => {
|
||||
return putRequest("/member/updateMemberStatus", params);
|
||||
return putRequest("/passport/member/updateMemberStatus", params);
|
||||
};
|
||||
|
||||
// 获取会员注册统计列表
|
||||
@@ -110,7 +110,7 @@ export const historyMemberChartList = () => {
|
||||
|
||||
//查询会员数量
|
||||
export const getMemberNum = params => {
|
||||
return getRequest("/member/num", params);
|
||||
return getRequest("/passport/member/num", params);
|
||||
};
|
||||
//查询会员历史积分
|
||||
export const getHistoryPointData = (params) => {
|
||||
@@ -134,7 +134,7 @@ export const editMemberAddress = (params) => {
|
||||
}
|
||||
//查询会员预存款
|
||||
export const getMemberWallet = (params) => {
|
||||
return getRequest(`/members/wallet`, params)
|
||||
return getRequest(`/wallet/wallet`, params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,88 +9,88 @@ import {
|
||||
|
||||
// 交由商家申诉
|
||||
export const storeComplain = (params) => {
|
||||
return putRequest(`/complain/status`, params)
|
||||
return putRequest(`/order/complain/status`, params)
|
||||
}
|
||||
|
||||
|
||||
// 获取售后原因分页列表
|
||||
export const getAfterSaleReasonPage = (params) => {
|
||||
return getRequest('/afterSaleReason/getByPage', params)
|
||||
return getRequest('/order/afterSaleReason/getByPage', params)
|
||||
}
|
||||
|
||||
// 删除售后原因
|
||||
export const delAfterSaleReason = (id) => {
|
||||
return deleteRequest(`/afterSaleReason/delByIds/${id}`)
|
||||
return deleteRequest(`/order/afterSaleReason/delByIds/${id}`)
|
||||
}
|
||||
|
||||
// 添加售后原因
|
||||
export const addAfterSaleReason = (params) => {
|
||||
return postRequest(`/afterSaleReason`, params)
|
||||
return postRequest(`/order/afterSaleReason`, params)
|
||||
}
|
||||
|
||||
// 修改售后原因
|
||||
export const editAfterSaleReason = (id, params) => {
|
||||
return putRequest(`/afterSaleReason/update/${id}`, params)
|
||||
return putRequest(`/order/afterSaleReason/update/${id}`, params)
|
||||
}
|
||||
|
||||
// 售后服务单详情
|
||||
export const afterSaleOrderDetail = (sn) => {
|
||||
return getRequest(`/afterSale/${sn}`)
|
||||
return getRequest(`/order/afterSale/${sn}`)
|
||||
}
|
||||
|
||||
// 商家审核
|
||||
export const afterSaleSellerReview = (sn, params) => {
|
||||
return putRequest(`/afterSale/review/${sn}`, params)
|
||||
return putRequest(`/order/afterSale/review/${sn}`, params)
|
||||
}
|
||||
|
||||
// 商家确认收货
|
||||
export const afterSaleSellerConfirm = (sn, params) => {
|
||||
return putRequest(`/afterSale/confirm/${sn}`, params)
|
||||
return putRequest(`/order/afterSale/confirm/${sn}`, params)
|
||||
}
|
||||
|
||||
// 商家换货业务发货
|
||||
export const afterSaleSellerDelivery = (sn, params) => {
|
||||
return putRequest(`/afterSale/${sn}/delivery`, params)
|
||||
return putRequest(`/order/afterSale/${sn}/delivery`, params)
|
||||
}
|
||||
|
||||
// 获取交易投诉信息
|
||||
export const getOrderComplain = (params) => {
|
||||
return getRequest('/complain', params)
|
||||
return getRequest('/order/complain', params)
|
||||
}
|
||||
|
||||
// 获取交易投诉详细信息
|
||||
export const getOrderComplainDetail = (id) => {
|
||||
return getRequest(`/complain/${id}`)
|
||||
return getRequest(`/order/complain/${id}`)
|
||||
}
|
||||
|
||||
// 交易投诉对话
|
||||
export const addOrderCommunication = (params) => {
|
||||
return postRequest(`/complain/communication`, params)
|
||||
return postRequest(`/order/complain/communication`, params)
|
||||
}
|
||||
|
||||
// 平台仲裁
|
||||
export const orderComplete = (id, params) => {
|
||||
return putRequest(`/complain/complete/${id}`, params)
|
||||
return putRequest(`/order/complain/complete/${id}`, params)
|
||||
}
|
||||
|
||||
// 查询订单列表
|
||||
export const getOrderList = (params) => {
|
||||
return getRequest(`/orders`, params)
|
||||
return getRequest(`/order/order`, params)
|
||||
}
|
||||
|
||||
// 订单付款
|
||||
export const orderPay = (sn) => {
|
||||
return postRequest(`/orders/${sn}/pay`)
|
||||
return postRequest(`/order/order/${sn}/pay`)
|
||||
}
|
||||
|
||||
// 订单付款
|
||||
export const orderDetail = (sn) => {
|
||||
return getRequest(`/orders/${sn}`)
|
||||
return getRequest(`/order/order/${sn}`)
|
||||
}
|
||||
|
||||
// 修改订单价格
|
||||
export const updateOrderPrice = (sn, params) => {
|
||||
return putRequest(`/orders/update/${sn}/price`, params)
|
||||
return putRequest(`/order/order/update/${sn}/price`, params)
|
||||
}
|
||||
|
||||
// 获取订单日志
|
||||
@@ -100,63 +100,58 @@ export const getOrderLog = (params) => {
|
||||
|
||||
// 订单取消
|
||||
export const orderCancel = (sn, params) => {
|
||||
return postRequest(`/orders/${sn}/cancel`, params)
|
||||
return postRequest(`/order/order/${sn}/cancel`, params)
|
||||
}
|
||||
|
||||
// 修改收货地址
|
||||
export const editOrderConsignee = (sn, params) => {
|
||||
return postRequest(`/orders/update/${sn}/consignee`, params)
|
||||
return postRequest(`/order/order/update/${sn}/consignee`, params)
|
||||
}
|
||||
|
||||
// 获取售后订单列表
|
||||
export const getAfterSaleOrderPage = (params) => {
|
||||
return getRequest('/afterSale/page', params)
|
||||
return getRequest('/order/afterSale/page', params)
|
||||
}
|
||||
|
||||
// 获取售后订单详情
|
||||
export const getAfterSaleOrderDetail = (sn) => {
|
||||
return getRequest(`/afterSale/get/${sn}`)
|
||||
return getRequest(`/order/afterSale/get/${sn}`)
|
||||
}
|
||||
//售后单查询物流
|
||||
export const getAfterSaleTraces = (sn) => {
|
||||
return getRequest(`/afterSale/getDeliveryTraces/${sn}`)
|
||||
return getRequest(`/order/afterSale/getDeliveryTraces/${sn}`)
|
||||
}
|
||||
// 获取商家选中的物流公司
|
||||
export const getLogisticsChecked = () => {
|
||||
return getRequest(`/logistics/getChecked`)
|
||||
return getRequest(`/other/logistics/getChecked`)
|
||||
}
|
||||
|
||||
//查询物流
|
||||
export const getTraces = (sn, params) => {
|
||||
return postRequest(`/orders/getTraces/${sn}`, params)
|
||||
return postRequest(`/order/order/getTraces/${sn}`, params)
|
||||
}
|
||||
//获取发票列表
|
||||
export const getReceiptPage = (params) => {
|
||||
return getRequest(`/receipt`, params)
|
||||
return getRequest(`/trade/receipt`, params)
|
||||
}
|
||||
//平台退款
|
||||
export const refundPrice = (afterSaleSn, params) => {
|
||||
return putRequest(`/afterSale/refund/${afterSaleSn}`, params)
|
||||
return putRequest(`/order/afterSale/refund/${afterSaleSn}`, params)
|
||||
}
|
||||
|
||||
|
||||
//平台收款记录
|
||||
export const paymentLog = (params) => {
|
||||
return getRequest(`/paymentLog`, params)
|
||||
return getRequest(`/order/paymentLog`, params)
|
||||
}
|
||||
|
||||
|
||||
//平台退款记录
|
||||
export const refundLog = (params) => {
|
||||
return getRequest(`/refundLog`, params)
|
||||
return getRequest(`/order/refundLog`, params)
|
||||
}
|
||||
|
||||
//售后单商家收货信息
|
||||
export const storeAddress = (sn) => {
|
||||
return getRequest(`/afterSale/getStoreAfterSaleAddress/${sn}`)
|
||||
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
*/
|
||||
export const setHomeSetup = params => {
|
||||
|
||||
return postRequest("/pageData/add", params);
|
||||
return postRequest("/other/pageData/add", params);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,7 @@ export const setHomeSetup = params => {
|
||||
*/
|
||||
export const getHomeData = params => {
|
||||
|
||||
return getRequest(`/pageData/${params}`);
|
||||
return getRequest(`/other/pageData/${params}`);
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export const getHomeData = params => {
|
||||
*/
|
||||
export const getHomeList = params => {
|
||||
|
||||
return getRequest("/pageData/pageDataList", params);
|
||||
return getRequest("/other/pageData/pageDataList", params);
|
||||
};
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export const getHomeList = params => {
|
||||
*/
|
||||
export const updateHome = (id, params) => {
|
||||
|
||||
return putRequest(`/pageData/update/${id}`, params);
|
||||
return putRequest(`/other/pageData/update/${id}`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ export const updateHome = (id, params) => {
|
||||
*/
|
||||
export const removePageHome = (id) => {
|
||||
|
||||
return deleteRequest(`/pageData/remove/${id}`);
|
||||
return deleteRequest(`/other/pageData/remove/${id}`);
|
||||
};
|
||||
|
||||
|
||||
@@ -60,35 +60,33 @@ export const removePageHome = (id) => {
|
||||
*/
|
||||
export const releasePageHome = (id) => {
|
||||
|
||||
return putRequest(`/pageData/release/${id}`);
|
||||
return putRequest(`/other/pageData/release/${id}`);
|
||||
};
|
||||
|
||||
//管理员获取发送列表
|
||||
export const getMessagePage = (params) => {
|
||||
return getRequest(`/message`, params);
|
||||
return getRequest(`/other/message`, params);
|
||||
};
|
||||
//管理员获取发送列表
|
||||
export const sendMessage = (params) => {
|
||||
return postRequest(`/message`, params);
|
||||
return postRequest(`/other/message`, params);
|
||||
};
|
||||
//管理员获取发送详情列表
|
||||
export const getShopMessage = (params) => {
|
||||
return getRequest(`/message/store`, params);
|
||||
return getRequest(`/other/storeMessage`, params);
|
||||
};
|
||||
|
||||
//管理员获取会员意见反馈
|
||||
export const getMemberFeedback = (params) => {
|
||||
return getRequest(`/feedback`, params);
|
||||
return getRequest(`/other/feedback`, params);
|
||||
};
|
||||
|
||||
//管理员获取会员意见反馈
|
||||
export const getMemberFeedbackDetail = (id) => {
|
||||
return getRequest(`/feedback/${id}`);
|
||||
return getRequest(`/other/feedback/${id}`);
|
||||
};
|
||||
|
||||
//管理员获取发送详情列表
|
||||
export const getMemberMessage = (params) => {
|
||||
return getRequest(`/message/member`, params);
|
||||
return getRequest(`/other/memberMessage`, params);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -63,54 +63,45 @@ export const savePageData = (params) => {
|
||||
}
|
||||
//获取分类列表数据
|
||||
export const getArticleCategory = () => {
|
||||
return getRequest(`/article-category/all-children`)
|
||||
return getRequest(`/other/articleCategory/all-children`)
|
||||
}
|
||||
//文章分类添加
|
||||
export const saveArticleCategory = (params) => {
|
||||
return postRequest('/article-category', params)
|
||||
return postRequest('/other/articleCategory', params)
|
||||
}
|
||||
|
||||
//删除文章分类
|
||||
export const delArticleCategory = (id) => {
|
||||
return deleteRequest(`/article-category/${id}`)
|
||||
return deleteRequest(`/other/articleCategory/${id}`)
|
||||
}
|
||||
//修改文章分类
|
||||
export const updateArticleCategory = (params, id) => {
|
||||
return putRequest(`/article-category/update/${id}`, params)
|
||||
return putRequest(`/other/articleCategory/update/${id}`, params)
|
||||
}
|
||||
//文章添加
|
||||
export const saveArticle = (params) => {
|
||||
return postRequest('/article', params, {"Content-Type": "application/json"})
|
||||
return postRequest('/other/article', params, {"Content-Type": "application/json"})
|
||||
}
|
||||
//文章修改
|
||||
export const updateArticle = (params) => {
|
||||
return putRequest(`/article/update/${params.id}`, params, {"Content-Type": "application/json"})
|
||||
return putRequest(`/other/article/update/${params.id}`, params, {"Content-Type": "application/json"})
|
||||
}
|
||||
//文章是否展示修改
|
||||
export const updateArticleStatus = (id,params) => {
|
||||
return putRequest(`/article/update/status/${id}`, params)
|
||||
return putRequest(`/other/article/update/status/${id}`, params)
|
||||
}
|
||||
//查看文章
|
||||
export const seeArticle = (id) => {
|
||||
return getRequest(`/article/${id}`)
|
||||
return getRequest(`/other/article/${id}`)
|
||||
}
|
||||
//获取文章列表数据
|
||||
export const getArticle = (params) => {
|
||||
return getRequest('/article/getByPage', params)
|
||||
return getRequest('/other/article/getByPage', params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//删除文章数据
|
||||
export const delArticle = (ids) => {
|
||||
return deleteRequest(`/article/delByIds/${ids}`)
|
||||
return deleteRequest(`/other/article/delByIds/${ids}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,35 +60,35 @@ export const getPintuanGoodsList = params => {
|
||||
};
|
||||
|
||||
// 关闭拼团活动
|
||||
export const closePintuan = pintuanId => {
|
||||
return putRequest(`/promotion/pintuan/close/${pintuanId}`);
|
||||
export const updatePintuanStatus = (pintuanId, params) => {
|
||||
return putRequest(`/promotion/pintuan/status/${pintuanId}`, params);
|
||||
};
|
||||
|
||||
// 修改砍价活动商品
|
||||
export const saveKanJiaActivityGoods = params => {
|
||||
return postRequest("/promotion/kan-jia-goods", params, {
|
||||
return postRequest("/promotion/kanJiaGoods", params, {
|
||||
"Content-type": "application/json"
|
||||
});
|
||||
};
|
||||
// 修改砍价活动商品
|
||||
export const editKanJiaActivityGoods = params => {
|
||||
return putRequest("/promotion/kan-jia-goods", params, {
|
||||
return putRequest("/promotion/kanJiaGoods", params, {
|
||||
"Content-type": "application/json"
|
||||
});
|
||||
};
|
||||
// 获取砍价活动商品
|
||||
export const getKanJiaGoodsList = params => {
|
||||
return getRequest(`/promotion/kan-jia-goods`, params);
|
||||
return getRequest(`/promotion/kanJiaGoods`, params);
|
||||
};
|
||||
|
||||
//删除砍价活动商品
|
||||
export const delKanJiaGoods = ids => {
|
||||
return deleteRequest(`/promotion/kan-jia-goods/${ids}`);
|
||||
return deleteRequest(`/promotion/kanJiaGoods/${ids}`);
|
||||
};
|
||||
|
||||
// 砍价活动商品详情
|
||||
export const getKanJiaActivityGoodsById = id => {
|
||||
return getRequest(`/promotion/kan-jia-goods/${id}`);
|
||||
return getRequest(`/promotion/kanJiaGoods/${id}`);
|
||||
};
|
||||
|
||||
// 保存平台优惠券
|
||||
@@ -187,12 +187,14 @@ export const saveSeckill = params => {
|
||||
|
||||
// 修改秒杀活动
|
||||
export const updateSeckill = params => {
|
||||
return putRequest("/promotion/seckill", params);
|
||||
return putRequest("/promotion/seckill", params, {
|
||||
"Content-type": "application/json"
|
||||
});
|
||||
};
|
||||
|
||||
// 关闭秒杀活动
|
||||
export const closeSeckill = id => {
|
||||
return putRequest(`/promotion/seckill/close/${id}`);
|
||||
export const updateSeckillStatus = (id, params) => {
|
||||
return putRequest(`/promotion/seckill/status/${id}`, params);
|
||||
};
|
||||
// 删除秒杀商品
|
||||
export const delSeckillGoods = params => {
|
||||
@@ -213,7 +215,7 @@ export const getFullDiscountById = id => {
|
||||
};
|
||||
// 开启、关闭满额活动
|
||||
export const updateFullDiscount = (id, promotionStatus) => {
|
||||
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
|
||||
return putRequest(`/promotion/fullDiscount/status/${id}`)
|
||||
}
|
||||
// 积分商品列表
|
||||
export const getPointsGoodsList = params => {
|
||||
@@ -237,7 +239,7 @@ export const updatePointsGoods = params => {
|
||||
};
|
||||
// 修改积分商品状态
|
||||
export const editPointsGoodsStatus = (id, params) => {
|
||||
return putRequest(`/promotion/pointsGoods/${id}`, params);
|
||||
return putRequest(`/promotion/pointsGoods/status/${id}`, params);
|
||||
};
|
||||
// 删除积分商品
|
||||
export const deletePointsGoodsStatus = id => {
|
||||
|
||||
@@ -7,69 +7,69 @@ import {
|
||||
|
||||
// 查询短信站内信信息
|
||||
export const getMessageData = params => {
|
||||
return getRequest("/message", params);
|
||||
return getRequest("/other/message", params);
|
||||
};
|
||||
//修改短信模板
|
||||
export const editSmsMessageTemplate = (id, params) => {
|
||||
return putRequest(`/message/sms/${id}`, params)
|
||||
return putRequest(`/sms/sms/${id}`, params)
|
||||
}
|
||||
//修改站内信模板
|
||||
export const editNoticeMessage = (id, params) => {
|
||||
return putRequest(`/noticeMessage/${id}`, params)
|
||||
return putRequest(`/setting/noticeMessage/${id}`, params)
|
||||
}
|
||||
|
||||
//微信消息同步
|
||||
export const wechatMessageSync = (params) => {
|
||||
return getRequest("/message/wechat/init", params)
|
||||
return getRequest("/wechat/wechatMessage/init", params)
|
||||
}
|
||||
//分页获取微信消息
|
||||
export const getWechatMessagePage = (params) => {
|
||||
return getRequest("/message/wechat", params)
|
||||
return getRequest("/wechat/wechatMessage", params)
|
||||
}
|
||||
//编辑微信消息模版
|
||||
export const editWechatMessageTemplate = (id, params) => {
|
||||
return putRequest(`/message/wechat/${id}`, params)
|
||||
return putRequest(`/wechat/wechatMessage/${id}`, params)
|
||||
}
|
||||
//删除微信消息模版
|
||||
export const delWechatMessageTemplate = (id, params) => {
|
||||
return deleteRequest(`/message/wechat/${id}`, params)
|
||||
return deleteRequest(`/wechat/wechatMessage/${id}`, params)
|
||||
}
|
||||
|
||||
|
||||
//微信消息订阅同步
|
||||
export const wechatMPMessageSync = (params) => {
|
||||
return getRequest("/message/wechatMPMessage/init", params)
|
||||
return getRequest("/wechat/wechatMPMessage/init", params)
|
||||
}
|
||||
//分页获取微信消息订阅
|
||||
export const getWechatMPMessagePage = (params) => {
|
||||
return getRequest("/message/wechatMPMessage", params)
|
||||
return getRequest("/wechat/wechatMPMessage", params)
|
||||
}
|
||||
//编辑微信消息订阅模版
|
||||
export const editWechatMPMessageTemplate = (id, params) => {
|
||||
return putRequest(`/message/wechatMPMessage/${id}`, params)
|
||||
return putRequest(`/wechat/wechatMPMessage/${id}`, params)
|
||||
}
|
||||
//删除微信消息订阅模版
|
||||
export const delWechatMPMessageTemplate = (id, params) => {
|
||||
return deleteRequest(`/message/wechatMPMessage/${id}`, params)
|
||||
return deleteRequest(`/wechat/wechatMPMessage/${id}`, params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询站内信模板信息
|
||||
export const getNoticeMessageData = params => {
|
||||
return getRequest("/noticeMessage", params);
|
||||
return getRequest("/setting/noticeMessage", params);
|
||||
};
|
||||
//删除站内信
|
||||
export const deleteMessage = (id) => {
|
||||
return deleteRequest(`message/${id}`);
|
||||
return deleteRequest(`/other/message/${id}`);
|
||||
};
|
||||
// 开启站内信模板
|
||||
export const openNoticeMessage = (id) => {
|
||||
return putRequest(`/noticeMessage/${id}/open`);
|
||||
return putRequest(`/setting/noticeMessage/${id}/open`);
|
||||
};
|
||||
// 修改站内信状态
|
||||
export const updateMessageStatus = (id,status) => {
|
||||
return putRequest(`/noticeMessage/${id}/${status}`);
|
||||
return putRequest(`/setting/noticeMessage/${id}/${status}`);
|
||||
};
|
||||
//获取短信模板
|
||||
export const getSmsTemplatePage = (params) => {
|
||||
@@ -118,19 +118,19 @@ export const smsSignDetail = (id) => {
|
||||
|
||||
//分页查询app版本信息
|
||||
export const appVersionPage = (params) => {
|
||||
return getRequest(`systems/app/version`, params);
|
||||
return getRequest(`/other/appVersion`, params);
|
||||
};
|
||||
//添加app版本信息
|
||||
export const addVersion = (params) => {
|
||||
return postRequest(`systems/app/version`, params);
|
||||
return postRequest(`/other/appVersion`, params);
|
||||
};
|
||||
//修改app版本信息
|
||||
export const editVersion = (params, id) => {
|
||||
return putRequest(`systems/app/version/${id}`, params);
|
||||
return putRequest(`/other/appVersion/${id}`, params);
|
||||
};
|
||||
//删除app版本信息
|
||||
export const deleteVersion = (id) => {
|
||||
return deleteRequest(`systems/app/version/${id}`);
|
||||
return deleteRequest(`/other/appVersion/${id}`);
|
||||
};
|
||||
//查询同城配送列表
|
||||
export const getInstantDelivery = (params) => {
|
||||
@@ -153,46 +153,46 @@ export const editInstantDeliveryImage = (bean, params) => {
|
||||
|
||||
//查询短信发送记录
|
||||
export const getSmsPage = (params) => {
|
||||
return getRequest(`sms`, params);
|
||||
return getRequest(`sms/sms`, params);
|
||||
};
|
||||
|
||||
//发送短信
|
||||
export const sendSms = (params) => {
|
||||
return postRequest(`sms`, params);
|
||||
return postRequest(`sms/sms`, params);
|
||||
};
|
||||
/*
|
||||
* 获取 支付支持设置开关
|
||||
*/
|
||||
export const getPaymentSupportForm = () => {
|
||||
return getRequest(`system/settingx/paymentSupport`);
|
||||
return getRequest(`setting/settingx/paymentSupport`);
|
||||
}
|
||||
|
||||
// 验证码源文件删除
|
||||
export const delVerification = (id) => {
|
||||
return deleteRequest(`/verificationSource/${id}`)
|
||||
return deleteRequest(`/other/verificationSource/${id}`)
|
||||
}
|
||||
|
||||
// 添加验证码源文件
|
||||
export const addVerification = (params) => {
|
||||
return postRequest(`/verificationSource`, params)
|
||||
return postRequest(`/other/verificationSource`, params)
|
||||
}
|
||||
|
||||
// 修改验证码源文件
|
||||
export const editVerification = (id, params) => {
|
||||
return putRequest(`/verificationSource/${id}`, params)
|
||||
return putRequest(`/other/verificationSource/${id}`, params)
|
||||
}
|
||||
|
||||
// 验证码源文件详情
|
||||
export const verificationDetail = (id) => {
|
||||
return getRequest(`/verificationSource/${id}`)
|
||||
return getRequest(`/other/verificationSource/${id}`)
|
||||
}
|
||||
|
||||
// 验证码源文件列表
|
||||
export const verificationPage = (params) => {
|
||||
return getRequest(`/verificationSource`, params)
|
||||
return getRequest(`/other/verificationSource`, params)
|
||||
}
|
||||
|
||||
//获取通知类站内信
|
||||
export const getNoticeMessageDetail = (id, params) => {
|
||||
return getRequest(`/noticeMessage/${id}`, params)
|
||||
return getRequest(`/setting/noticeMessage/${id}`, params)
|
||||
}
|
||||
|
||||
@@ -7,77 +7,77 @@ export const getBillPage = (params) => {
|
||||
}
|
||||
//查询店铺列表
|
||||
export const getShopListData = (params) => {
|
||||
return getRequest('/store', params)
|
||||
return getRequest('/store/store', params)
|
||||
}
|
||||
//禁用店铺
|
||||
export const disableShop = (id) => {
|
||||
return putRequest(`/store/disable/${id}`)
|
||||
return putRequest(`/store/store/disable/${id}`)
|
||||
}
|
||||
//开启店铺
|
||||
export const enableBrand = (id) => {
|
||||
return putRequest(`/store/enable/${id}`)
|
||||
return putRequest(`/store/store/enable/${id}`)
|
||||
}
|
||||
|
||||
//查询店铺详细
|
||||
export const getShopDetailData = (id, params) => {
|
||||
return getRequest(`/store/get/detail/${id}`, params)
|
||||
return getRequest(`/store/store/get/detail/${id}`, params)
|
||||
}
|
||||
|
||||
//增加店铺列表
|
||||
export const shopAdd = (params) => {
|
||||
return postRequest(`/store/add`, params)
|
||||
return postRequest(`/store/store/add`, params)
|
||||
}
|
||||
|
||||
//修改店铺列表
|
||||
export const shopEdit = (id,params) => {
|
||||
return putRequest(`/store/edit/${id}`, params)
|
||||
return putRequest(`/store/store/edit/${id}`, params)
|
||||
}
|
||||
|
||||
//审核店铺
|
||||
export const shopAudit = (id, passed) => {
|
||||
return putRequest(`/store/audit/${id}/${passed}`)
|
||||
return putRequest(`/store/store/audit/${id}/${passed}`)
|
||||
}
|
||||
|
||||
//查询店铺详情
|
||||
export const shopDetail = (id) => {
|
||||
return getRequest(`/store/get/detail/${id}`)
|
||||
return getRequest(`/store/store/get/detail/${id}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取结算单分页
|
||||
export const getBuyBillPage = (params) => {
|
||||
return getRequest(`/store/bill/getByPage`,params)
|
||||
return getRequest(`/order/bill/getByPage`,params)
|
||||
}
|
||||
|
||||
// 获取结算单详情
|
||||
export const getBuyBillDetail = (id) => {
|
||||
return getRequest(`/store/bill/get/${id}`)
|
||||
return getRequest(`/order/bill/get/${id}`)
|
||||
}
|
||||
|
||||
|
||||
// 获取商家结算单流水分页
|
||||
export const getStoreFlow = (id,params) => {
|
||||
return getRequest(`/store/bill/${id}/getStoreFlow`,params)
|
||||
return getRequest(`/order/bill/${id}/getStoreFlow`,params)
|
||||
}
|
||||
|
||||
// 审核结算单
|
||||
|
||||
export const examine = (id) => {
|
||||
return putRequest(`/store/bill/examine/${id}`)
|
||||
return putRequest(`/order/bill/examine/${id}`)
|
||||
}
|
||||
// 审核结算单
|
||||
|
||||
export const pay = (id) => {
|
||||
return putRequest(`/store/bill/pay/${id}`)
|
||||
return putRequest(`/order/bill/pay/${id}`)
|
||||
}
|
||||
|
||||
//获取所有商家
|
||||
export const getShopList = () => {
|
||||
return getRequest(`/store/all`)
|
||||
return getRequest(`/store/store/all`)
|
||||
}
|
||||
|
||||
//根据id获取店铺信息
|
||||
export const getShopByMemberId = (id) => {
|
||||
return getRequest(`/store/${id}/member`)
|
||||
return getRequest(`/store/store/${id}/member`)
|
||||
}
|
||||
|
||||
@@ -1,48 +1,7 @@
|
||||
export default {
|
||||
/**
|
||||
* @description 配置显示在浏览器标签的title
|
||||
*/
|
||||
title: "Lili电商",
|
||||
/**
|
||||
* @description token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
cookieExpires: 1,
|
||||
/**
|
||||
* @description 是否使用国际化,默认为false
|
||||
* 如果不使用,则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
|
||||
* 用来在菜单中显示文字
|
||||
*/
|
||||
useI18n: true,
|
||||
/**
|
||||
* @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请求基础路径前缀
|
||||
*/
|
||||
baseUrlPrefix: "/manager",
|
||||
/**
|
||||
* @description 需要加载的插件
|
||||
*/
|
||||
plugin: {
|
||||
"error-store": {
|
||||
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
|
||||
developmentOff: true // 设为true后在开发环境不会收集错误信息,方便开发中排查错误
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
title: "lilishop", //配置显示在浏览器标签的title
|
||||
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
|
||||
website: "https://www.pickmall.cn", //官网地址
|
||||
enableCDN: false, //生产环境 是否启用cdn加载 vue等js
|
||||
port: 10003, //端口
|
||||
};
|
||||
|
||||
@@ -1,31 +1,41 @@
|
||||
import axios from "axios";
|
||||
import config from "@/config";
|
||||
import {getStore, setStore} from "./storage.js";
|
||||
import {router} from "../router/index";
|
||||
import {Message} from "view-design";
|
||||
import { getStore, setStore } from "./storage.js";
|
||||
import { router } from "../router/index";
|
||||
import { Message } from "view-design";
|
||||
import Cookies from "js-cookie";
|
||||
import {handleRefreshToken} from "../api/index"
|
||||
import { handleRefreshToken } from "../api/index";
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
|
||||
// 统一请求路径前缀
|
||||
export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
|
||||
export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager) + config.baseUrlPrefix;
|
||||
export const commonUrl =
|
||||
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({
|
||||
timeout: 8000,
|
||||
baseURL: managerUrl
|
||||
})
|
||||
});
|
||||
var isRefreshToken = 0;
|
||||
const refreshToken = getTokenDebounce()
|
||||
const refreshToken = getTokenDebounce();
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
if (config.method == 'get') {
|
||||
if (config.method == "get") {
|
||||
config.params = {
|
||||
_t: Date.parse(new Date()) / 1000,
|
||||
...config.params
|
||||
}
|
||||
};
|
||||
}
|
||||
const uuid = getStore('uuid');
|
||||
config.headers['uuid'] = uuid;
|
||||
let uuid = getStore("uuid");
|
||||
if (!uuid) {
|
||||
uuid = uuidv4();
|
||||
setStore('uuid', uuid);
|
||||
}
|
||||
config.headers["uuid"] = uuid;
|
||||
return config;
|
||||
},
|
||||
err => {
|
||||
@@ -36,7 +46,7 @@ service.interceptors.request.use(
|
||||
|
||||
// http response 拦截器
|
||||
service.interceptors.response.use(
|
||||
(response) => {
|
||||
response => {
|
||||
const data = response.data;
|
||||
// 根据返回的code值来做不同的处理(和后端约定)
|
||||
if (!data.success && data.message) {
|
||||
@@ -50,6 +60,7 @@ service.interceptors.response.use(
|
||||
Message.error("系统异常");
|
||||
}
|
||||
break;
|
||||
case 20004:
|
||||
case 401:
|
||||
// 未登录 清除已登录状态
|
||||
Cookies.set("userInfoManager", "");
|
||||
@@ -76,89 +87,88 @@ service.interceptors.response.use(
|
||||
return data;
|
||||
}
|
||||
},
|
||||
async (error) => {
|
||||
async error => {
|
||||
// 返回状态码不为200时候的错误处理
|
||||
if (error.response) {
|
||||
if (error.response.status === 401) {
|
||||
// 这种情况一般调到登录页
|
||||
} else if (error.response.status === 404) {
|
||||
// 避免刷新token报错
|
||||
} else if (error.response.status === 403) {
|
||||
} else if (error.response.status === 403 || error.response.data.code === 20004) {
|
||||
isRefreshToken++;
|
||||
if(isRefreshToken === 1) {
|
||||
if (isRefreshToken === 1) {
|
||||
const getTokenRes = await refreshToken();
|
||||
if (getTokenRes === 'success') { // 刷新token
|
||||
if (getTokenRes === "success") {
|
||||
// 刷新token
|
||||
if (isRefreshToken === 1) {
|
||||
error.response.config.headers.accessToken = getStore('accessToken')
|
||||
return service(error.response.config)
|
||||
error.response.config.headers.accessToken = getStore(
|
||||
"accessToken"
|
||||
);
|
||||
return service(error.response.config);
|
||||
} else {
|
||||
router.go(0)
|
||||
router.go(0);
|
||||
}
|
||||
} else {
|
||||
Cookies.set("userInfoManager", "");
|
||||
router.push('/login')
|
||||
router.push("/login");
|
||||
}
|
||||
isRefreshToken = 0
|
||||
isRefreshToken = 0;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 其他错误处理
|
||||
console.log(error.response.data);
|
||||
Message.error(error.response.data.message)
|
||||
Message.error(error.response.data.message);
|
||||
}
|
||||
}
|
||||
/* router.push("/login") */
|
||||
return Promise.resolve(error);
|
||||
}
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
// 防抖闭包来一波
|
||||
function getTokenDebounce() {
|
||||
let lock = false
|
||||
let success = false
|
||||
return function () {
|
||||
let lock = false;
|
||||
let success = false;
|
||||
return function() {
|
||||
if (!lock) {
|
||||
lock = true
|
||||
lock = true;
|
||||
let oldRefreshToken = getStore("refreshToken");
|
||||
handleRefreshToken(oldRefreshToken).then(res => {
|
||||
if (res.success) {
|
||||
let {
|
||||
accessToken,
|
||||
refreshToken
|
||||
} = res.result;
|
||||
setStore("accessToken", accessToken);
|
||||
setStore("refreshToken", refreshToken);
|
||||
handleRefreshToken(oldRefreshToken)
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
let { accessToken, refreshToken } = res.result;
|
||||
setStore("accessToken", accessToken);
|
||||
setStore("refreshToken", refreshToken);
|
||||
|
||||
success = true
|
||||
lock = false
|
||||
} else {
|
||||
success = false
|
||||
lock = false
|
||||
router.push('/login')
|
||||
}
|
||||
}).catch((err) => {
|
||||
success = false
|
||||
lock = false
|
||||
})
|
||||
success = true;
|
||||
lock = false;
|
||||
} else {
|
||||
success = false;
|
||||
lock = false;
|
||||
router.push("/login");
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
success = false;
|
||||
lock = false;
|
||||
});
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
// 一直看lock,直到请求失败或者成功
|
||||
const timer = setInterval(() => {
|
||||
if (!lock) {
|
||||
clearInterval(timer)
|
||||
clearInterval(timer);
|
||||
if (success) {
|
||||
resolve('success')
|
||||
resolve("success");
|
||||
} else {
|
||||
resolve('fail')
|
||||
resolve("fail");
|
||||
}
|
||||
}
|
||||
}, 500) // 轮询时间间隔
|
||||
})
|
||||
}
|
||||
}, 500); // 轮询时间间隔
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export const getRequest = (url, params) => {
|
||||
let accessToken = getStore("accessToken");
|
||||
return service({
|
||||
@@ -180,19 +190,19 @@ export const postRequest = (url, params, headers) => {
|
||||
transformRequest: headers
|
||||
? undefined
|
||||
: [
|
||||
function (data) {
|
||||
let ret = "";
|
||||
for (let it in data) {
|
||||
ret +=
|
||||
encodeURIComponent(it) +
|
||||
"=" +
|
||||
encodeURIComponent(data[it]) +
|
||||
"&";
|
||||
function(data) {
|
||||
let ret = "";
|
||||
for (let it in data) {
|
||||
ret +=
|
||||
encodeURIComponent(it) +
|
||||
"=" +
|
||||
encodeURIComponent(data[it]) +
|
||||
"&";
|
||||
}
|
||||
ret = ret.substring(0, ret.length - 1);
|
||||
return ret;
|
||||
}
|
||||
ret = ret.substring(0, ret.length - 1);
|
||||
return ret;
|
||||
}
|
||||
],
|
||||
],
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
accessToken: accessToken,
|
||||
@@ -238,19 +248,19 @@ export const putRequest = (url, params, headers) => {
|
||||
transformRequest: headers
|
||||
? undefined
|
||||
: [
|
||||
function (data) {
|
||||
let ret = "";
|
||||
for (let it in data) {
|
||||
ret +=
|
||||
encodeURIComponent(it) +
|
||||
"=" +
|
||||
encodeURIComponent(data[it]) +
|
||||
"&";
|
||||
function(data) {
|
||||
let ret = "";
|
||||
for (let it in data) {
|
||||
ret +=
|
||||
encodeURIComponent(it) +
|
||||
"=" +
|
||||
encodeURIComponent(data[it]) +
|
||||
"&";
|
||||
}
|
||||
ret = ret.substring(0, ret.length - 1);
|
||||
return ret;
|
||||
}
|
||||
ret = ret.substring(0, ret.length - 1);
|
||||
return ret;
|
||||
}
|
||||
],
|
||||
],
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
accessToken: accessToken,
|
||||
@@ -321,7 +331,6 @@ export const getRequestWithNoToken = (url, params) => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 无需token验证的请求 避免旧token过期导致请求失败
|
||||
* @param {*} url
|
||||
@@ -335,3 +344,18 @@ export const postRequestWithNoToken = (url, params) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 无需token验证的请求 避免旧token过期导致请求失败
|
||||
* @param {*} url
|
||||
* @param {*} params
|
||||
*/
|
||||
export const postRequestWithNoTokenData = (url, params) => {
|
||||
return service({
|
||||
method: "post",
|
||||
url: `${url}`,
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
data: params
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
@@ -1,21 +1,16 @@
|
||||
import axios from 'axios';
|
||||
import {
|
||||
getCurrentPermissionList
|
||||
} from '@/api/index';
|
||||
import lazyLoading from './lazyLoading.js';
|
||||
import router from '@/router/index';
|
||||
import { getCurrentPermissionList } from "@/api/index";
|
||||
import lazyLoading from "./lazyLoading.js";
|
||||
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
let util = {
|
||||
let util = {};
|
||||
|
||||
};
|
||||
|
||||
util.title = function (title) {
|
||||
title = title || 'lili 运营后台';
|
||||
util.title = function(title) {
|
||||
title = title || "运营后台";
|
||||
window.document.title = title;
|
||||
};
|
||||
// 判断元素是否存在于数组中
|
||||
util.oneOf = function (ele, targetArr) {
|
||||
util.oneOf = function(ele, targetArr) {
|
||||
if (targetArr.indexOf(ele) >= 0) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -24,7 +19,7 @@ util.oneOf = function (ele, targetArr) {
|
||||
};
|
||||
|
||||
// 打开新的页面
|
||||
util.openNewPage = function (vm, name, argu, query) {
|
||||
util.openNewPage = function(vm, name, argu, query) {
|
||||
if (!vm.$store) {
|
||||
return;
|
||||
}
|
||||
@@ -33,8 +28,9 @@ util.openNewPage = function (vm, name, argu, query) {
|
||||
let i = 0;
|
||||
let tagHasOpened = false;
|
||||
while (i < openedPageLen) {
|
||||
if (name == pageOpenedList[i].name) { // 页面已经打开
|
||||
vm.$store.commit('pageOpenedList', {
|
||||
if (name == pageOpenedList[i].name) {
|
||||
// 页面已经打开
|
||||
vm.$store.commit("pageOpenedList", {
|
||||
index: i,
|
||||
argu: argu,
|
||||
query: query
|
||||
@@ -45,7 +41,7 @@ util.openNewPage = function (vm, name, argu, query) {
|
||||
i++;
|
||||
}
|
||||
if (!tagHasOpened) {
|
||||
let tag = vm.$store.state.app.tagsList.filter((item) => {
|
||||
let tag = vm.$store.state.app.tagsList.filter(item => {
|
||||
if (item.children) {
|
||||
return name == item.children[0].name;
|
||||
} else {
|
||||
@@ -61,17 +57,21 @@ util.openNewPage = function (vm, name, argu, query) {
|
||||
if (query) {
|
||||
tag.query = query;
|
||||
}
|
||||
vm.$store.commit('increateTag', tag);
|
||||
vm.$store.commit("increateTag", tag);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
util.toDefaultPage = function (routers, name, route, next) {
|
||||
util.toDefaultPage = function(routers, name, route, next) {
|
||||
let len = routers.length;
|
||||
let i = 0;
|
||||
let notHandle = true;
|
||||
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({
|
||||
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 otherRoutes = [];
|
||||
|
||||
// 404路由需要和动态路由一起加载
|
||||
const otherRouter = [{
|
||||
path: '/*',
|
||||
name: 'error-404',
|
||||
meta: {
|
||||
title: '404-页面不存在'
|
||||
},
|
||||
frontRoute: 'error-page/404'
|
||||
}];
|
||||
const otherRouter = [
|
||||
{
|
||||
path: "/*",
|
||||
name: "error-404",
|
||||
meta: {
|
||||
title: "404-页面不存在"
|
||||
},
|
||||
frontRoute: "error-page/404"
|
||||
}
|
||||
];
|
||||
// 判断用户是否登录
|
||||
let userInfo = Cookies.get('userInfoManager')
|
||||
let userInfo = Cookies.get("userInfoManager");
|
||||
if (!userInfo) {
|
||||
// 未登录
|
||||
return;
|
||||
@@ -114,13 +117,13 @@ util.initRouter = function (vm) { // 初始化路由
|
||||
|
||||
// 格式化数据,设置 空children 为 null
|
||||
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++) {
|
||||
let tt = t[k].children;
|
||||
for (let z = 0; z < tt.length; z++) {
|
||||
tt[z].children = null
|
||||
tt[z].children = null;
|
||||
// 给所有三级路由添加字段,显示一级菜单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.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);
|
||||
// 缓存数据 修改加载标识
|
||||
window.localStorage.setItem('menuData', JSON.stringify(menuData));
|
||||
vm.$store.commit('setAdded', true);
|
||||
window.localStorage.setItem("menuData", JSON.stringify(menuData));
|
||||
vm.$store.commit("setAdded", true);
|
||||
});
|
||||
} else {
|
||||
// 读取缓存数据
|
||||
let data = window.localStorage.getItem('menuData');
|
||||
let data = window.localStorage.getItem("menuData");
|
||||
if (!data) {
|
||||
vm.$store.commit('setAdded', false);
|
||||
vm.$store.commit("setAdded", false);
|
||||
return;
|
||||
}
|
||||
let menuData = JSON.parse(data);
|
||||
@@ -154,21 +160,20 @@ util.initRouter = function (vm) { // 初始化路由
|
||||
};
|
||||
|
||||
// 添加所有顶部导航栏下的菜单路由
|
||||
util.initAllMenuData = function (constRoutes, data) {
|
||||
|
||||
util.initAllMenuData = function(constRoutes, data) {
|
||||
let allMenuData = [];
|
||||
data.forEach(e => {
|
||||
if (e.level == 0) {
|
||||
e.children.forEach(item => {
|
||||
allMenuData.push(item);
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
util.initRouterNode(constRoutes, allMenuData);
|
||||
}
|
||||
};
|
||||
|
||||
// 生成菜单格式数据
|
||||
util.initMenuData = function (vm, data) {
|
||||
util.initMenuData = function(vm, data) {
|
||||
const menuRoutes = [];
|
||||
let menuData = data;
|
||||
// 顶部菜单
|
||||
@@ -177,29 +182,29 @@ util.initMenuData = function (vm, data) {
|
||||
let nav = {
|
||||
name: e.name,
|
||||
title: e.title
|
||||
}
|
||||
};
|
||||
navList.push(nav);
|
||||
})
|
||||
});
|
||||
if (navList.length < 1) {
|
||||
return;
|
||||
}
|
||||
// 存入vuex
|
||||
vm.$store.commit('setNavList', navList);
|
||||
let currNav = window.localStorage.getItem('currNav')
|
||||
vm.$store.commit("setNavList", navList);
|
||||
let currNav = window.localStorage.getItem("currNav");
|
||||
if (currNav) {
|
||||
// 读取缓存title
|
||||
for (var item of navList) {
|
||||
if (item.name == currNav) {
|
||||
vm.$store.commit('setCurrNavTitle', item.title);
|
||||
vm.$store.commit("setCurrNavTitle", item.title);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 默认第一个
|
||||
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) {
|
||||
if (item.name == currNav) {
|
||||
// 过滤
|
||||
@@ -209,21 +214,25 @@ util.initMenuData = function (vm, data) {
|
||||
}
|
||||
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 = [];
|
||||
vm.$store.state.app.routers.map((item) => {
|
||||
vm.$store.state.app.routers.map(item => {
|
||||
if (item.children.length <= 1) {
|
||||
tagsList.push(item.children[0]);
|
||||
} else {
|
||||
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) {
|
||||
let menu = Object.assign({}, item);
|
||||
@@ -237,8 +246,8 @@ util.initRouterNode = function (routers, data) { // data为所有子菜单数据
|
||||
|
||||
let meta = {};
|
||||
// 给页面添加标题、父级菜单name(方便左侧菜单选中)
|
||||
meta.title = menu.title ? menu.title + " - lilishop 运营后台" : null;
|
||||
meta.firstRouterName = item.firstRouterName
|
||||
meta.title = menu.title ? menu.title + " - 运营后台" : null;
|
||||
meta.firstRouterName = item.firstRouterName;
|
||||
menu.meta = meta;
|
||||
|
||||
routers.push(menu);
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "zh",
|
||||
"options": {
|
||||
"months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
||||
"shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
||||
"days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
|
||||
"shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
"toolbar": {
|
||||
"exportToSVG": "下载图表 SVG",
|
||||
"exportToPNG": "下载图表 PNG",
|
||||
"menu": "菜单",
|
||||
"selection": "选择",
|
||||
"selectionZoom": "区域缩放",
|
||||
"zoomIn": "缩小",
|
||||
"zoomOut": "放大",
|
||||
"pan": "移动",
|
||||
"reset": "重置缩放"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
export default {
|
||||
lili: 'lili',
|
||||
usernameLogin: 'UsernameLogin',
|
||||
mobileLogin: 'MobileLogin',
|
||||
autoLogin: 'Auto Login',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
export default {
|
||||
lili: 'lili',
|
||||
usernameLogin: '账户密码登录',
|
||||
mobileLogin: '手机号登录',
|
||||
autoLogin: '自动登录',
|
||||
|
||||
@@ -11,23 +11,24 @@ import App from './App'
|
||||
import { router } from './router/index'
|
||||
import store from './store'
|
||||
import i18n from '@/locale'
|
||||
import vueQr from 'vue-qr'
|
||||
|
||||
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'
|
||||
import { setStore, getStore, removeStore } from '@/libs/storage'
|
||||
import util from '@/libs/util'
|
||||
|
||||
import * as filters from '@/utils/filters' // global filter
|
||||
import liliDialog from '@/views/lili-dialog'
|
||||
import i18nBox from '@/views/lili-components/i18n-translate'
|
||||
import {md5} from '@/utils/md5.js';
|
||||
Vue.config.devtools = true;
|
||||
Vue.config.productionTip = false
|
||||
const buyerUrlPC = 'https://pc-b2b2c.pickmall.cn' // 跳转买家端地址 pc端
|
||||
const buyerUrlWap = 'https://m-b2b2c.pickmall.cn' // 跳转买家端地址 wap端
|
||||
const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端
|
||||
const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端
|
||||
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端二维码
|
||||
return `${buyerUrlWap}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
||||
return `${WAP_URL}/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
||||
};
|
||||
|
||||
Vue.use(ViewUI, {
|
||||
@@ -35,7 +36,8 @@ Vue.use(ViewUI, {
|
||||
});
|
||||
|
||||
Vue.component('liliDialog',liliDialog)
|
||||
Vue.component(vueQr)
|
||||
Vue.component('i18nBox',i18nBox)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import Main from "@/views/Main.vue";
|
||||
|
||||
const config = require('@/config/index')
|
||||
// 不作为Main组件的子页面展示的页面单独写,如下
|
||||
export const loginRouter = {
|
||||
path: "/login",
|
||||
name: "login",
|
||||
meta: {
|
||||
title: "登录 - lili运营后台"
|
||||
title: `登录 - ${config.title}运营后台`
|
||||
},
|
||||
component: () => import("@/views/login.vue")
|
||||
};
|
||||
@@ -154,103 +155,103 @@ export const otherRouter = {
|
||||
component: () => import("@/views/goods/goods-info/goodsDetail.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/add-points-goods",
|
||||
path: "promotions/add-points-goods",
|
||||
title: "添加积分商品",
|
||||
name: "add-points-goods",
|
||||
component: () =>
|
||||
import("@/views/promotion/pointsGoods/addPointsGoods.vue")
|
||||
import("@/views/promotions/points-goods/points-goods-add.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/edit-points-goods",
|
||||
path: "promotions/edit-points-goods",
|
||||
title: "修改积分商品",
|
||||
name: "edit-points-goods",
|
||||
component: () =>
|
||||
import("@/views/promotion/pointsGoods/editPointsGoods.vue")
|
||||
import("@/views/promotions/points-goods/points-goods-edit.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/manager-points-goods-category",
|
||||
path: "promotions/manager-points-goods-category",
|
||||
title: "积分商品分类",
|
||||
name: "manager-points-goods-category",
|
||||
component: () =>
|
||||
import("@/views/promotion/pointsGoodsCategory/pointsGoodsCategory.vue")
|
||||
import("@/views/promotions/points-goods-category/points-goods-category.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/add-kanJia-activity-goods",
|
||||
path: "promotions/add-kanJia-activity-goods",
|
||||
title: "添加砍价活动",
|
||||
name: "add-kanJia-activity-goods",
|
||||
component: () => import("@/views/promotion/kanjia/kanjiaActivityAddGoods.vue")
|
||||
component: () => import("@/views/promotions/kanjia/kanjia-activity-add-goods.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/edit-kanJia-activity-goods",
|
||||
path: "promotions/edit-kanJia-activity-goods",
|
||||
title: "修改砍价活动",
|
||||
name: "edit-kanJia-activity-goods",
|
||||
component: () => import("@/views/promotion/kanjia/kanjiaActivityEditGoods.vue")
|
||||
component: () => import("@/views/promotions/kanjia/kanjia-activity-edit-goods.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/manager-coupon",
|
||||
path: "promotions/manager-coupon",
|
||||
title: "平台优惠券",
|
||||
name: "manager-coupon",
|
||||
component: () => import("@/views/promotion/coupon/coupon.vue")
|
||||
component: () => import("@/views/promotions/coupon/coupon.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/add-platform-coupon",
|
||||
path: "promotions/add-platform-coupon",
|
||||
title: "添加平台优惠券",
|
||||
name: "add-platform-coupon",
|
||||
component: () => import("@/views/promotion/coupon/couponPublish.vue")
|
||||
component: () => import("@/views/promotions/coupon/coupon-publish.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/edit-platform-coupon",
|
||||
path: "promotions/edit-platform-coupon",
|
||||
title: "编辑平台优惠券",
|
||||
name: "edit-platform-coupon",
|
||||
component: () => import("@/views/promotion/coupon/couponPublish.vue")
|
||||
component: () => import("@/views/promotions/coupon/coupon-publish.vue")
|
||||
},
|
||||
{
|
||||
path: "coupon-activity/add",
|
||||
path: "promotions/add-coupon-activity",
|
||||
title: "添加优惠券活动",
|
||||
name: "add-coupon-activity",
|
||||
component: () => import("@/views/promotion/couponActivity/couponPublish.vue")
|
||||
component: () => import("@/views/promotions/coupon-activity/coupon-publish.vue")
|
||||
},
|
||||
{
|
||||
path: "coupon-activity/edit",
|
||||
path: "promotions/edit-coupon-activity",
|
||||
title: "编辑平台优惠券活动",
|
||||
name: "edit-coupon-activity",
|
||||
component: () => import("@/views/promotion/couponActivity/couponPublish.vue")
|
||||
component: () => import("@/views/promotions/coupon-activity/coupon-publish.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/coupon-activity-info",
|
||||
path: "promotions/coupon-activity-info",
|
||||
title: "券活动详情",
|
||||
name: "coupon-activity-info",
|
||||
component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
|
||||
component: () => import("@/views/promotions/coupon-activity/coupon-info.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/manager-pintuan",
|
||||
path: "promotions/manager-pintuan",
|
||||
title: "平台拼团",
|
||||
name: "manager-pintuan",
|
||||
component: () => import("@/views/promotion/pintuan/pintuan.vue")
|
||||
component: () => import("@/views/promotions/pintuan/pintuan.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/pintuan/pintuan-goods",
|
||||
path: "promotions/pintuan/pintuan-goods",
|
||||
title: "拼团商品",
|
||||
name: "pintuan-goods",
|
||||
component: () => import("@/views/promotion/pintuan/pintuanGoods.vue")
|
||||
component: () => import("@/views/promotions/pintuan/pintuan-goods.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/full-cut-detail",
|
||||
path: "promotions/full-discount-detail",
|
||||
title: "满减满折详情",
|
||||
name: "full-cut-detail",
|
||||
component: () => import("@/views/promotion/fullCut/fullCutDetail.vue")
|
||||
name: "full-discount-detail",
|
||||
component: () => import("@/views/promotions/full-discount/full-discount-detail.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/seckill/manager-seckill-add",
|
||||
path: "promotions/seckill/manager-seckill-add",
|
||||
title: "编辑秒杀活动",
|
||||
name: "manager-seckill-add",
|
||||
component: () => import("@/views/promotion/seckill/addSeckill.vue")
|
||||
component: () => import("@/views/promotions/seckill/seckill-add.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/seckill/seckill-goods",
|
||||
path: "promotions/seckill/seckill-goods",
|
||||
title: "秒杀商品",
|
||||
name: "seckill-goods",
|
||||
component: () => import("@/views/promotion/seckill/seckillGoods.vue")
|
||||
component: () => import("@/views/promotions/seckill/seckill-goods.vue")
|
||||
},
|
||||
{
|
||||
path: "/floorList/renovation",
|
||||
@@ -271,10 +272,10 @@ export const otherRouter = {
|
||||
component: () => import("@/views/sys/message/smsSign.vue")
|
||||
},
|
||||
{
|
||||
path: "liveDetail",
|
||||
path: "live-detail",
|
||||
title: "查看直播",
|
||||
name: "liveDetail",
|
||||
component: () => import("@/views/promotion/live/liveDetail.vue")
|
||||
name: "live-detail",
|
||||
component: () => import("@/views/promotions/live/live-detail.vue")
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
$theme_color: #804ed1;
|
||||
|
||||
|
||||
//自动移滚动条样式
|
||||
@@ -89,113 +88,15 @@ ul,li{
|
||||
text-overflow:ellipsis;
|
||||
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
|
||||
*/
|
||||
|
||||
// 主题颜色
|
||||
|
||||
// 明亮主题颜色
|
||||
$primary_color: #2d8cf0;
|
||||
$primary_light_color: #0f1011;
|
||||
$primary_dark_color: #2b85e4;
|
||||
$success_color: #19be6b;
|
||||
$warning_color: #ff9900;
|
||||
$error_color: #ed3f14;
|
||||
$handle-btn-color: #438cde;
|
||||
|
||||
$theme_color: #ed3f14;
|
||||
.theme_color{
|
||||
color: #ed3f14 !important;
|
||||
$success_color: #68cabe;
|
||||
$warning_color: #fa6419;
|
||||
$error_color: #ff3c2a;
|
||||
$theme_color: #FF5C58;
|
||||
.theme_color {
|
||||
color: $theme_color !important;
|
||||
}
|
||||
$border_color: #dddee1;
|
||||
$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;
|
||||
$bg_color: #f1f6fa;
|
||||
|
||||
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
|
||||
|
||||
// 背景颜色
|
||||
@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";
|
||||
@@ -3,10 +3,7 @@
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
||||
.select-count {
|
||||
font-weight: 600;
|
||||
color: #40a9ff;
|
||||
}
|
||||
|
||||
|
||||
.select-clear {
|
||||
margin-left: 10px;
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
@import "~view-design/src/styles/index.less";
|
||||
// iview 自定义样式
|
||||
|
||||
@primary-color: #ed3f14;
|
||||
|
||||
@primary-color: #ff5c58;
|
||||
@info-color: #fa6419;
|
||||
@success-color: #68cabe;
|
||||
@error-color: #ff3c2a;
|
||||
@table-thead-bg: #f8f8f9;
|
||||
@table-td-stripe-bg: #f8f8f9;
|
||||
@table-td-hover-bg: #ededed;
|
||||
@table-td-highlight-bg: #ededed;
|
||||
@font-size-base: 12px;
|
||||
|
||||
.ivu-drawer,
|
||||
.drawer,
|
||||
.ivu-drawer-wrap {
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
||||
.select-title {
|
||||
font-weight: 600;
|
||||
color: #40a9ff;
|
||||
}
|
||||
|
||||
.select-clear {
|
||||
margin-left: 10px;
|
||||
|
||||
60
manager/src/utils/promotions.js
Normal file
60
manager/src/utils/promotions.js
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
export function promotionsStatusRender(h, params) {
|
||||
let text = "未知",
|
||||
color = "red";
|
||||
if (params.row.promotionStatus == "NEW") {
|
||||
text = "未开始";
|
||||
color = "geekblue";
|
||||
} else if (params.row.promotionStatus == "START") {
|
||||
text = "已开始";
|
||||
color = "green";
|
||||
} else if (params.row.promotionStatus == "END") {
|
||||
text = "已结束";
|
||||
color = "red";
|
||||
} else if (params.row.promotionStatus == "CLOSE") {
|
||||
text = "已关闭";
|
||||
color = "red";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: color,
|
||||
},
|
||||
},
|
||||
text
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
export function promotionsScopeTypeRender(h, params) {
|
||||
let text = "未知",
|
||||
color = "red";
|
||||
if (params.row.scopeType == "ALL") {
|
||||
text = "全品类";
|
||||
color = "default";
|
||||
} else if (params.row.scopeType == "PORTION_GOODS_CATEGORY") {
|
||||
text = "商品分类";
|
||||
color = "yellow";
|
||||
} else if (params.row.scopeType == "PORTION_SHOP_CATEGORY") {
|
||||
text = "店铺分类";
|
||||
color = "pink";
|
||||
} else if (params.row.scopeType == "PORTION_GOODS") {
|
||||
text = "指定商品";
|
||||
color = "magenta";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: color,
|
||||
},
|
||||
},
|
||||
text
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,3 +57,39 @@ export const URL =
|
||||
|
||||
// 固话
|
||||
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">
|
||||
<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>
|
||||
<!-- 用户头像 -->
|
||||
<div class="user-dropdown-menu-con">
|
||||
|
||||
<Row type="flex" justify="end" align="middle" class="user-dropdown-innercon">
|
||||
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
|
||||
<div class="dropList">
|
||||
<span class="main-user-name">{{ userInfo.nickName }}</span>
|
||||
<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>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem name="personalCenter">{{ $t('userCenter') }}</DropdownItem>
|
||||
<DropdownItem name="changePass">{{ $t('changePass') }}</DropdownItem>
|
||||
<DropdownItem name="loginOut" divided>{{ $t('logout') }}</DropdownItem>
|
||||
<DropdownItem name="personalCenter">{{
|
||||
$t("userCenter")
|
||||
}}</DropdownItem>
|
||||
<DropdownItem name="changePass">{{ $t("changePass") }}</DropdownItem>
|
||||
<DropdownItem name="loginOut" divided>{{ $t("logout") }}</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</Row>
|
||||
@@ -60,7 +69,7 @@ import messageTip from "./main-components/message-tip.vue";
|
||||
import circleLoading from "@/views/my-components/lili/circle-loading.vue";
|
||||
import Cookies from "js-cookie";
|
||||
import util from "@/libs/util.js";
|
||||
import { getNoticePage } from "@/api/index";
|
||||
import { getNoticePage, logout } from "@/api/index";
|
||||
|
||||
var client;
|
||||
export default {
|
||||
@@ -90,7 +99,7 @@ export default {
|
||||
},
|
||||
lang() {
|
||||
return this.$store.state.app.lang;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -131,11 +140,13 @@ export default {
|
||||
}
|
||||
// 退出登录
|
||||
else if (name === "loginOut") {
|
||||
this.$store.commit("logout", this);
|
||||
this.$store.commit('setAdded', false);
|
||||
this.setStore("accessToken", "");
|
||||
this.setStore("refreshToken", "");
|
||||
this.$router.push({ path: "/login" });
|
||||
logout().then((res) => {
|
||||
this.$store.commit("logout", this);
|
||||
this.$store.commit("setAdded", false);
|
||||
this.setStore("accessToken", "");
|
||||
this.setStore("refreshToken", "");
|
||||
this.$router.push({ path: "/login" });
|
||||
});
|
||||
}
|
||||
},
|
||||
//切换标签
|
||||
@@ -147,12 +158,7 @@ export default {
|
||||
});
|
||||
if (!openpageHasTag) {
|
||||
// 解决关闭当前标签后再点击回退按钮会退到当前页时没有标签的问题
|
||||
util.openNewPage(
|
||||
this,
|
||||
name,
|
||||
this.$route.params || {},
|
||||
this.$route.query || {}
|
||||
);
|
||||
util.openNewPage(this, name, this.$route.params || {}, this.$route.query || {});
|
||||
}
|
||||
},
|
||||
//宽度动态计算
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
:width="500"
|
||||
>
|
||||
<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%" />
|
||||
</FormItem>
|
||||
</Form>
|
||||
@@ -56,6 +56,8 @@ import {
|
||||
insertCustomWords,
|
||||
updateCustomWords
|
||||
} from "@/api/index";
|
||||
|
||||
import { regular } from "@/utils";
|
||||
export default {
|
||||
name: "customWords",
|
||||
data() {
|
||||
@@ -79,11 +81,8 @@ export default {
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入自定义分词",
|
||||
trigger: "blur",
|
||||
},
|
||||
regular.REQUIRED,
|
||||
regular.VARCHAR20
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user