175 Commits
v4.1 ... v4.2

Author SHA1 Message Date
lemon橪
f87306f6de 合并master 2021-06-29 12:00:05 +08:00
lemon橪
7a080124c6 新增会员提现功能 2021-06-29 11:59:45 +08:00
mabo
0575503687 Merge branch 'ma' 2021-06-29 10:44:40 +08:00
mabo
346c753670 代码格式调整 2021-06-29 10:44:25 +08:00
lifenlong
46a93c5524 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-29 10:10:11 +08:00
lifenlong
b3d9040c02 修改虚拟订单列表按照订单状态筛选 2021-06-29 10:09:58 +08:00
lifenlong
9b83d20b85 修改虚拟订单字段 2021-06-29 10:06:54 +08:00
Chopper
8245b0a38d 虚拟订单查询参数初始化问题处理 2021-06-29 10:03:17 +08:00
Chopper
59a580ccac Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-06-29 09:42:39 +08:00
Chopper
6b0ba4e5ee 页面展示属性问题 2021-06-29 09:42:21 +08:00
mabo
a8aa73760f Merge branch 'ma' 2021-06-29 09:28:36 +08:00
mabo
ebaa75ed15 管理端上架问题,批量设置物流模板 2021-06-29 09:28:21 +08:00
chopper711
fe6ada46d7 !4 对接会员消息
Merge pull request !4 from chopper711/qiuqiu
2021-06-29 01:05:55 +00:00
pikachu
338994fb45 对接会员消息 2021-06-29 08:30:39 +08:00
pikachu
995b0d65fb 对接会员消息 2021-06-29 08:25:02 +08:00
mabo
5ea61a160e Merge branch 'ma' 2021-06-28 18:54:09 +08:00
mabo
25176c36fb 发布商品,商品图片拖拽改变位置 2021-06-28 18:53:57 +08:00
pikachu
75e302bc12 Merge branch 'master' into qiuqiu 2021-06-28 18:46:12 +08:00
lemon橪
78dc8a5e0b 合并Master 2021-06-28 18:17:19 +08:00
lemon橪
3e54f24ddd merge master 2021-06-28 18:16:41 +08:00
mabo
cb14b13c19 管理端,添加店铺,选择会员失败问题 2021-06-28 18:14:53 +08:00
mabo
1e6e7c123c 修改添加商品拖拽改变位置 2021-06-28 18:14:00 +08:00
mabo
edcaa2421b no message 2021-06-28 17:12:18 +08:00
mabo
20e4662961 管理端店铺经纬度改为店铺定位 2021-06-28 17:07:48 +08:00
mabo
2f6380da22 bug修改 2021-06-28 15:47:42 +08:00
lemon橪
37b873ecce 修改当首页空数据显示问题 2021-06-28 15:12:50 +08:00
mabo
b748f467aa 修改api地址 2021-06-28 11:26:30 +08:00
mabo
10fc7d4dd0 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
# Conflicts:
#	manager/src/config/index.js
#	seller/src/config/index.js
2021-06-28 11:25:30 +08:00
mabo
e14ecef05a no message 2021-06-28 11:24:06 +08:00
mabo
c3bd727694 店铺入驻bug修改 2021-06-28 11:23:22 +08:00
Chopper
510cf963a2 对没有支付方式的充值进行一下过滤 2021-06-28 10:15:57 +08:00
Chopper
081d251594 充值方式字段描述 2021-06-28 10:07:46 +08:00
chopper711
cfe9b07fe8 !3 会员消息合并,充值页面参数基本校验合并
Merge pull request !3 from chopper711/qiuqiu
2021-06-28 01:49:06 +00:00
pikachu
f436d17735 修改资金管理接口 2021-06-26 16:49:44 +08:00
pikachu
d7434f3e4a Merge branch 'qiuqiu' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui into qiuqiu 2021-06-26 11:23:45 +08:00
pikachu
f0914960a4 update buyer/src/components/header/Header.vue. 2021-06-26 03:23:26 +00:00
pikachu
c6e8545a03 Merge branch 'dev-ryan' into qiuqiu 2021-06-26 11:19:40 +08:00
pikachu
7d5e1811ab Merge branch 'master' into dev-ryan 2021-06-26 11:19:15 +08:00
pikachu
3c83cc9f50 合并分支 2021-06-26 11:15:23 +08:00
lemon橪
e1000d324e 合并分支 2021-06-25 19:15:45 +08:00
lemon橪
3cb3fd81e7 修改一些看到的bug以及功能上的问题 2021-06-25 19:15:27 +08:00
mabo
c673ab2b5e no message 2021-06-25 19:05:47 +08:00
mabo
b61f5e47df 添加分类id 2021-06-25 19:03:47 +08:00
mabo
c71da0b437 Merge branch 'ma' 2021-06-25 18:47:48 +08:00
mabo
1b2f6e221e 充值功能 2021-06-25 18:47:16 +08:00
mabo
974cc504d9 Merge branch 'ma' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui into ma 2021-06-25 18:31:58 +08:00
mabo
31c585bcaf 添加余额支付 2021-06-25 18:31:55 +08:00
Chopper
0adbde45b9 充值功能支付跳转 2021-06-25 18:30:30 +08:00
mabo
4160ebe004 虚拟商品售后,商品详情参数 2021-06-25 17:36:00 +08:00
Chopper
b48acb9691 Merge branch 'ma' of gitee.com:beijing_hongye_huicheng/lilishop-ui into ma 2021-06-25 17:31:27 +08:00
Chopper
75d4fda92d 增加pc余额支付功能。增加倒计时 2021-06-25 17:31:12 +08:00
mabo
7112f4cd49 Merge branch 'ma' 2021-06-25 16:24:52 +08:00
mabo
b3863568d6 虚拟商品下单 2021-06-25 16:24:38 +08:00
mabo
830cc3e83c Merge branch 'master' into ma 2021-06-25 16:03:21 +08:00
mabo
be611871bc 修改发布商品格式 2021-06-25 16:03:10 +08:00
mabo
73246e1dc6 PC端bug修改 2021-06-25 15:28:31 +08:00
mabo
0a11a25ccd 发布商品小修改 2021-06-25 11:37:54 +08:00
mabo
bb51771898 发布商品页面bug修改 2021-06-25 11:29:48 +08:00
mabo
712e3cd2f2 Merge branch 'ma' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui into ma 2021-06-24 18:36:12 +08:00
mabo
532cbc943d 发布商品回显问题 2021-06-24 18:36:08 +08:00
Chopper
854a04d7f4 商品参数分组名称展示 2021-06-24 18:23:29 +08:00
Chopper
d645f4ea6b 商品参数问题处理,参数回显 2021-06-24 17:46:45 +08:00
mabo
9ef1761c63 虚拟商品不展示重量 2021-06-24 17:45:00 +08:00
Chopper
3cb1edee83 参数相关问题处理 2021-06-24 17:44:43 +08:00
mabo
e0a7bb86a6 模板 2021-06-24 17:13:26 +08:00
mabo
84f3eaea10 商品模板修改 2021-06-24 16:41:04 +08:00
mabo
7b2054206a Merge branch 'master' into ma 2021-06-24 15:56:48 +08:00
mabo
dbd3bb6124 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-24 15:56:33 +08:00
mabo
39fd76ebdc 规格项修改 2021-06-24 15:56:20 +08:00
Chopper
e65d84f95f 管理端订单来源字段处理 2021-06-24 11:54:21 +08:00
Chopper
a337972f7a Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-06-24 10:41:00 +08:00
lemon橪
75ca4de9e1 合并master 2021-06-24 10:35:51 +08:00
lemon橪
4133badc46 修改后台小程序直播查看问题,新增只有自营店可以赠送积分 2021-06-24 10:32:51 +08:00
mabo
f8f205d0e8 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-23 18:19:47 +08:00
mabo
4d7b4eb2b4 发布商品修改 2021-06-23 18:19:43 +08:00
mabo
31295d7cb2 我的订单,去掉用户名展示 2021-06-23 18:18:38 +08:00
lemon橪
b7dd7f1c3b 合并master上面的冲突 2021-06-23 18:13:11 +08:00
lemon橪
2391f71d9a 修改部分页面ui以及bug 2021-06-23 18:08:22 +08:00
lifenlong
6bc0591418 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-23 17:40:44 +08:00
lifenlong
6d94b6fbdc 秒杀活动,状态展示 2021-06-23 17:40:34 +08:00
mabo
ff3f4dd8c0 腾讯云智服标识设置 2021-06-23 17:32:08 +08:00
Chopper
ee5759c86a Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-06-23 16:58:22 +08:00
mabo
752d967a50 修改规格接口 2021-06-23 16:58:15 +08:00
mabo
5d78241b8e Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-23 16:49:39 +08:00
mabo
f2f2984c3e bug修改 2021-06-23 16:49:35 +08:00
Chopper
8032f3bda1 分类规格相关页面跳转 2021-06-23 16:48:43 +08:00
lifenlong
c326431407 商品列表,状态展示优化 2021-06-23 11:46:38 +08:00
lifenlong
d5c96f66ce 优化店铺后台状态展示 2021-06-23 11:34:56 +08:00
mabo
eb5816ff80 Merge branch 'dev-ryan'
# Conflicts:
#	buyer/src/plugins/request.js
2021-06-23 10:48:54 +08:00
mabo
a1fd5be5c4 修改立即购买按钮一直加载bug 2021-06-23 10:45:05 +08:00
mabo
6475be77bc Merge branch 'master' into ma 2021-06-23 08:48:30 +08:00
mabo
8d76128b5a Merge branch 'ma' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui into ma 2021-06-23 08:45:22 +08:00
mabo
e6d2c51252 no message 2021-06-23 08:45:18 +08:00
lifenlong
ea396405df Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-23 00:21:59 +08:00
lifenlong
5b3c89886e 优化运营后台状态展示 2021-06-23 00:21:17 +08:00
lemon橪
b566a2fd4f 合并分支 2021-06-22 18:11:41 +08:00
lemon橪
bce709a57a 解决运营后台出现的bug 2021-06-22 18:11:23 +08:00
Chopper
8e239a5bbf token 解析问题处理 2021-06-22 17:36:07 +08:00
Chopper
d3576b691c 商品属性搜索初始化问题处理 2021-06-22 15:16:02 +08:00
Chopper
3b922839a1 商品列表问题展示搜索字段,展示商品类型 2021-06-22 14:59:20 +08:00
lemon橪
9586eedb56 合并master 2021-06-21 18:12:17 +08:00
lemon橪
d89b984344 修改直播间时间没有判断bug,店铺后台,批量发货没有跳转bug,直播后台添加小程序直播,前台显示小程序直播 2021-06-21 18:11:46 +08:00
Chopper
4a6fd431bc 特殊情况下会报错问题处理 2021-06-21 16:03:23 +08:00
Chopper
597af1a210 保存json excel问题 2021-06-21 14:35:33 +08:00
lemon橪
2b85a5aba1 合并冲突 2021-06-21 14:32:07 +08:00
lemon橪
35094a7ac2 合并冲突 2021-06-21 14:30:06 +08:00
Chopper
d57b33cb4e Merge branch 'dev-ryan'
# Conflicts:
#	buyer/src/components/header/Header.vue
#	buyer/src/components/invoiceModal/index.vue
#	manager/src/config/index.js
2021-06-21 14:26:47 +08:00
lemon橪
c3be931218 提交批量发货没有跳转的Bug 2021-06-21 14:15:52 +08:00
pikachu
4735dbd874 站内信发送会员完成 2021-06-20 10:59:05 +08:00
pikachu
85bfb48c0c 第三部完成不能手动点击 2021-06-20 10:32:35 +08:00
pikachu
861c7f905a 订单区分商品订单和虚拟订单 2021-06-19 16:25:17 +08:00
pikachu
be42bfcf40 虚拟订单和商品订单区分开 2021-06-19 16:10:55 +08:00
pikachu
0b64122c41 合并 2021-06-19 14:51:45 +08:00
lemon橪
d9368b7514 商品分类修改绑定规格八阿哥 2021-06-18 17:11:18 +08:00
Chopper
c4cc078680 分类信息缓存更新时间设定 2021-06-18 17:06:25 +08:00
Chopper
b3fda14322 券活动完善 2021-06-18 16:38:10 +08:00
lemon橪
336643419e 解决商品分类不同步数据问题,解决pc端添加发票问题 2021-06-18 14:52:40 +08:00
lemon橪
99ae898139 解决pc端个人中心跳转问题 2021-06-17 15:24:34 +08:00
lemon橪
76d09c0559 劵活动新增活动范围判断 2021-06-17 14:45:14 +08:00
lemon橪
d16c446070 合并master 2021-06-17 14:15:21 +08:00
lemon橪
57ff6c8d70 取消pc楼层装修提示框,改为无痕更改 2021-06-17 14:11:13 +08:00
lemon橪
0106bc7b75 合并master 2021-06-17 11:59:27 +08:00
lemon橪
d72ce4109d 解决buyer端商品详情没有发送token 2021-06-17 11:58:56 +08:00
lemon橪
c158874c31 合并master 2021-06-17 11:45:53 +08:00
lemon橪
0cbcb4d37a 修改商家端商品发布样式问题,修改楼层装修pc端出现的问题,修改品牌中出现的bug 2021-06-17 11:40:27 +08:00
lemon橪
63e5808a6b 新增劵活动的优惠券回显 2021-06-17 10:42:10 +08:00
lemon橪
44da0ec700 修复错误路径问题 2021-06-17 09:09:19 +08:00
lemon橪
ab53a1ecc2 推荐直播间,修改部分代码,新增劵活动一些部分 2021-06-16 18:21:11 +08:00
Chopper
7711e5ca7b 用户名展示修改为用户昵称 2021-06-16 17:55:05 +08:00
lemon橪
f73bdce1a1 合并分支ma 2021-06-16 09:08:44 +08:00
Chopper
7de01626b8 商家端优惠券活动联动 2021-06-15 18:09:57 +08:00
lemon橪
a59ae41108 后台商家端批量发货下载以及上传excel 2021-06-13 17:56:16 +08:00
lemon橪
0837f5d9d9 优化一些功能 2021-06-11 19:01:05 +08:00
lemon橪
eb2b3a66a0 合并Master 2021-06-11 09:52:47 +08:00
lemon橪
e71ae35b17 合并master 2021-06-11 09:52:05 +08:00
lemon橪
c9ea7ba898 优化部分样式问题,新增部分功能,解决发现的bug,暂未完全测试通过。 2021-06-10 18:31:54 +08:00
Chopper
b7a2a681c2 商家端商品列表展示宽度优化 2021-06-09 09:32:25 +08:00
Chopper
99f4634ef7 物流模版展示问题处理 2021-06-08 14:45:04 +08:00
Chopper
b543ff8278 宽度调整 2021-06-08 11:33:06 +08:00
lemon橪
8b3d19625f 合并master 2021-06-07 11:50:44 +08:00
lemon橪
70f0bafd21 合并ma 2021-06-04 17:36:30 +08:00
lemon橪
40bf9781b1 修改一些发现的问题,新增秒杀活动设置,优惠券动态时间 以及 精准发圈用户和小程序直播页面 2021-06-04 17:35:59 +08:00
mabo
e32e2a92cd 修改管理端地区页面bug 2021-06-03 18:06:28 +08:00
mabo
4ef8287802 添加注释 2021-06-03 18:02:26 +08:00
mabo
43b4c041e4 发布商品可以删除模板 2021-06-03 17:37:36 +08:00
mabo
f97282ad44 添加注释 2021-06-03 17:32:38 +08:00
Chopper
011bcae11a 店铺对账状态默认值问题处理 2021-06-03 16:42:13 +08:00
mabo
7f5d2b41d5 Merge branch 'dev-ryan' into ma 2021-06-03 16:17:40 +08:00
mabo
e1c14af914 添加买家端注释 2021-06-03 16:17:11 +08:00
mabo
33ec809e73 管理、商家添加登录图片验证 2021-06-03 14:35:19 +08:00
lemon橪
3eee6b35e8 合并ma分支解决冲突 2021-06-03 11:51:39 +08:00
lemon橪
837f01e8a1 修改优化一些bug ,新增小程序直播 以及部分商品导出excal 2021-06-03 11:47:51 +08:00
lemon橪
d55d53528e c 2021-06-03 11:47:34 +08:00
mabo
65cb7787a6 Merge branch 'master' into ma 2021-06-03 09:16:29 +08:00
Chopper
d86b5c609b 消息提示中,跳转核对商家账单页面错误问题处理 2021-06-02 17:43:31 +08:00
Chopper
79d5700504 调整平台统计首页获取参数的方式 2021-06-02 16:06:28 +08:00
Chopper
7e634d7eb7 管理端编译问题处理 2021-06-02 11:27:58 +08:00
Chopper
3b113e2039 付款笔数字段读取错误处理 2021-06-02 10:33:47 +08:00
Chopper
0f1c7f39a7 店铺订单展示来源问题处理 2021-06-01 09:05:31 +08:00
Chopper
5f5e24638b Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-06-01 08:53:37 +08:00
Chopper
b9aa8336f9 订单展示来源问题 2021-06-01 08:53:33 +08:00
mabo
411f36150b 积分商城,站内信 2021-05-31 18:03:48 +08:00
mabo
78bd4021a6 api修改 2021-05-28 18:05:38 +08:00
mabo
8163cc5882 tab栏分类切换闪烁问题 2021-05-28 17:26:15 +08:00
mabo
6780654aae im对接,修改bug 2021-05-28 17:25:07 +08:00
mabo
e935d5bcd5 添加注释 2021-05-27 18:03:33 +08:00
mabo
0df88e08e4 table不随屏幕改变尺寸问题 2021-05-27 16:37:00 +08:00
mabo
087ffe230d 商品选择器组件修改,菜单栏调整 2021-05-27 10:32:05 +08:00
mabo
f5786e46c3 运费模板配置 2021-05-26 10:30:08 +08:00
mabo
ff85c3f68f 运费模板修改 2021-05-25 18:58:55 +08:00
mabo
c9c6b1d690 Merge branch 'dev-ryan' into ma 2021-05-25 18:37:55 +08:00
mabo
978db4e624 配送模板修改 2021-05-25 18:37:29 +08:00
mabo
7729031efa 修改一些问题,删除无用文件,商品选择器回显 2021-05-25 17:08:23 +08:00
lemon橪
020ddf0588 合并master 2021-05-25 14:27:45 +08:00
lemon橪
e5dbd18bf3 小程序直播部分,暂未写完 2021-05-25 14:27:18 +08:00
292 changed files with 16485 additions and 12584 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="./static/logo.ico" type="image/x-icon"> <link rel="icon" href="./static/logo.ico" type="image/x-icon">
<!-- <script src = 'https://webapi.amap.com/maps?v=2.0&key=b440952723253aa9fe483e698057bf7d'></script> --> <script src="https://yzf.qq.com/xv/web/static/chat_sdk/yzf_chat.min.js"></script>
<title>LILI</title> <title>LILI</title>
</head> </head>
<body> <body>

View File

@@ -14,9 +14,10 @@
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"less": "^3.12.2", "less": "^3.12.2",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"mv-count-down": "^0.1.15",
"psl": "^1.8.0", "psl": "^1.8.0",
"qs": "^6.9.4", "qs": "^6.9.4",
"swiper": "^6.4.1", "swiper": "^5.2.0",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"v-distpicker": "^1.0.17", "v-distpicker": "^1.0.17",
"view-design": "^4.3.2", "view-design": "^4.3.2",

View File

@@ -36,7 +36,7 @@ export function goodsSkuDetail (params) {
return request({ return request({
url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`, url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`,
method: Method.GET, method: Method.GET,
needToken: false, needToken: true,
params params
}); });
} }

View File

@@ -441,3 +441,37 @@ export function memberPointHistory (params) {
params params
}); });
} }
/**
* 分页获取会员站内信
* @param {Object} params 请求参数包括pageNumber、pageSize、status
*/
export function memberMsgList (params) {
return request({
url: `/buyer/member/message`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 设置消息为已读
* @param {String} messageId 消息id
*/
export function readMemberMsg (id) {
return request({
url: `/buyer/member/message/${id}`,
method: Method.PUT,
needToken: true
});
}
/**
* 删除会员消息
* @param {String} messageId 消息id
*/
export function delMemberMsg (id) {
return request({
url: `/buyer/member/message/${id}`,
method: Method.DELETE,
needToken: true
});
}

View File

@@ -61,7 +61,7 @@ export function getCateById (id) {
// 店铺入驻协议 // 店铺入驻协议
export function agreement () { export function agreement () {
return request({ return request({
url: `/buyer/article/get/1349291301250293760`, url: `/buyer/article/type/STORE_REGISTER`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}) })

View File

@@ -11,4 +11,6 @@
<glyph unicode="&#xe901;" glyph-name="next" horiz-adv-x="1025" d="M1024.951 448c0 2.706-1.097 5.193-1.536 7.826-0.585 3.145-0.658 6.363-1.902 9.362l-0.146 0.366c-1.682 3.95-4.389 7.314-7.022 10.606-1.024 1.317-1.463 2.926-2.706 4.096 0 0-0.146 0-0.146 0.146l-241.591 240.274c-8.15 7.642-19.145 12.336-31.236 12.336-25.247 0-45.714-20.467-45.714-45.714 0-12.218 4.793-23.317 12.602-31.518l-0.018 0.019 162.889-162.085h-821.76c-25.247 0-45.714-20.467-45.714-45.714s20.467-45.714 45.714-45.714h821.76l-162.889-162.085c-8.921-8.364-14.479-20.222-14.479-33.379 0-25.247 20.467-45.714 45.714-45.714 13.029 0 24.785 5.451 33.112 14.196l0.018 0.019 241.737 240.421c1.17 1.243 1.682 2.779 2.706 4.096 2.633 3.291 5.339 6.583 7.022 10.606l0.146 0.366c1.243 2.926 1.317 6.217 1.902 9.362 0.439 2.633 1.463 5.12 1.463 7.753v0.073c0 0.073 0 0 0 0z" /> <glyph unicode="&#xe901;" glyph-name="next" horiz-adv-x="1025" d="M1024.951 448c0 2.706-1.097 5.193-1.536 7.826-0.585 3.145-0.658 6.363-1.902 9.362l-0.146 0.366c-1.682 3.95-4.389 7.314-7.022 10.606-1.024 1.317-1.463 2.926-2.706 4.096 0 0-0.146 0-0.146 0.146l-241.591 240.274c-8.15 7.642-19.145 12.336-31.236 12.336-25.247 0-45.714-20.467-45.714-45.714 0-12.218 4.793-23.317 12.602-31.518l-0.018 0.019 162.889-162.085h-821.76c-25.247 0-45.714-20.467-45.714-45.714s20.467-45.714 45.714-45.714h821.76l-162.889-162.085c-8.921-8.364-14.479-20.222-14.479-33.379 0-25.247 20.467-45.714 45.714-45.714 13.029 0 24.785 5.451 33.112 14.196l0.018 0.019 241.737 240.421c1.17 1.243 1.682 2.779 2.706 4.096 2.633 3.291 5.339 6.583 7.022 10.606l0.146 0.366c1.243 2.926 1.317 6.217 1.902 9.362 0.439 2.633 1.463 5.12 1.463 7.753v0.073c0 0.073 0 0 0 0z" />
<glyph unicode="&#xe902;" glyph-name="qq" d="M512 929.009c-265.653 0-480.989-215.345-480.989-481.012 0-265.662 215.335-481.006 480.989-481.006s480.989 215.345 480.989 481.006c-0.001 265.668-215.335 481.012-480.989 481.012v0zM776.822 298.086c-12.422-11.596-33.749 1.033-54.249 29.4-8.901-24.019-20.497-46.171-33.956-66.051 28.987-10.353 47.626-26.505 47.626-44.726 0-31.473-55.699-56.942-124.443-56.942-40.79 0-76.819 8.899-99.593 22.777-22.565-13.877-58.799-22.777-99.59-22.777-68.745 0-124.443 25.469-124.443 56.942 0 18.014 18.637 34.373 47.626 44.726-13.666 19.877-25.056 42.033-33.959 66.051-20.496-28.156-41.822-40.997-54.249-29.4-16.978 15.94-10.555 72.263 14.702 125.688 5.799 12.215 12.010 23.188 18.428 32.716 3.518 155.297 105.805 279.947 231.281 279.947h0.413c125.475 0 227.762-124.443 231.281-279.947 6.417-9.527 12.634-20.501 18.427-32.716 25.055-53.425 31.684-109.748 14.701-125.688v0z" /> <glyph unicode="&#xe902;" glyph-name="qq" d="M512 929.009c-265.653 0-480.989-215.345-480.989-481.012 0-265.662 215.335-481.006 480.989-481.006s480.989 215.345 480.989 481.006c-0.001 265.668-215.335 481.012-480.989 481.012v0zM776.822 298.086c-12.422-11.596-33.749 1.033-54.249 29.4-8.901-24.019-20.497-46.171-33.956-66.051 28.987-10.353 47.626-26.505 47.626-44.726 0-31.473-55.699-56.942-124.443-56.942-40.79 0-76.819 8.899-99.593 22.777-22.565-13.877-58.799-22.777-99.59-22.777-68.745 0-124.443 25.469-124.443 56.942 0 18.014 18.637 34.373 47.626 44.726-13.666 19.877-25.056 42.033-33.959 66.051-20.496-28.156-41.822-40.997-54.249-29.4-16.978 15.94-10.555 72.263 14.702 125.688 5.799 12.215 12.010 23.188 18.428 32.716 3.518 155.297 105.805 279.947 231.281 279.947h0.413c125.475 0 227.762-124.443 231.281-279.947 6.417-9.527 12.634-20.501 18.427-32.716 25.055-53.425 31.684-109.748 14.701-125.688v0z" />
<glyph unicode="&#xe903;" glyph-name="wechat" d="M579.6 448.4c-11.7 0-23.4-10.8-23.4-24.2 0-10.8 11.7-21.7 23.4-21.7 17.5 0 30 10.8 30 21.7 0 13.4-12.5 24.2-30 24.2zM502.8 561c18.4 0 30 11.7 30 29.2 0 18.4-11.7 29.2-30 29.2-17.5 0-34.2-10.8-34.2-29.2 0-17.5 16.7-29.2 34.2-29.2zM512 960c-282.8 0-512-229.2-512-512s229.2-512 512-512 512 229.2 512 512-229.2 512-512 512zM415.2 318.3c-30.9 0-53.4 5-82.6 13.3l-84.3-42.5 24.2 71.7c-59.2 41.7-94.3 94.3-94.3 158.5 0 113.5 106.8 200.2 236.9 200.2 115.1 0 217.7-68.4 237.7-165.2-8.3 1.7-15.9 2.5-22.5 2.5-113.5 0-201-85.1-201-187.7 0-17.5 2.5-33.4 6.7-50.1-6.6-0.7-14.1-0.7-20.8-0.7zM763.1 236.5l16.7-60.1-63.4 35.9c-24.2-5-47.5-12.5-71.7-12.5-111.8 0-200.2 76.7-200.2 171.8s88.4 171.8 200.2 171.8c105.9 0 201-76.7 201-171.8 0-53.3-35.9-100.9-82.6-135.1zM337.7 619.4c-17.5 0-35.9-10.8-35.9-29.2 0-17.5 18.4-29.2 35.9-29.2 16.7 0 30 11.7 30 29.2 0 18.4-13.4 29.2-30 29.2zM710.5 448.4c-12.5 0-23.4-10.8-23.4-24.2 0-10.8 10.8-21.7 23.4-21.7 16.7 0 29.2 10.8 29.2 21.7 0 13.4-12.5 24.2-29.2 24.2z" /> <glyph unicode="&#xe903;" glyph-name="wechat" d="M579.6 448.4c-11.7 0-23.4-10.8-23.4-24.2 0-10.8 11.7-21.7 23.4-21.7 17.5 0 30 10.8 30 21.7 0 13.4-12.5 24.2-30 24.2zM502.8 561c18.4 0 30 11.7 30 29.2 0 18.4-11.7 29.2-30 29.2-17.5 0-34.2-10.8-34.2-29.2 0-17.5 16.7-29.2 34.2-29.2zM512 960c-282.8 0-512-229.2-512-512s229.2-512 512-512 512 229.2 512 512-229.2 512-512 512zM415.2 318.3c-30.9 0-53.4 5-82.6 13.3l-84.3-42.5 24.2 71.7c-59.2 41.7-94.3 94.3-94.3 158.5 0 113.5 106.8 200.2 236.9 200.2 115.1 0 217.7-68.4 237.7-165.2-8.3 1.7-15.9 2.5-22.5 2.5-113.5 0-201-85.1-201-187.7 0-17.5 2.5-33.4 6.7-50.1-6.6-0.7-14.1-0.7-20.8-0.7zM763.1 236.5l16.7-60.1-63.4 35.9c-24.2-5-47.5-12.5-71.7-12.5-111.8 0-200.2 76.7-200.2 171.8s88.4 171.8 200.2 171.8c105.9 0 201-76.7 201-171.8 0-53.3-35.9-100.9-82.6-135.1zM337.7 619.4c-17.5 0-35.9-10.8-35.9-29.2 0-17.5 18.4-29.2 35.9-29.2 16.7 0 30 11.7 30 29.2 0 18.4-13.4 29.2-30 29.2zM710.5 448.4c-12.5 0-23.4-10.8-23.4-24.2 0-10.8 10.8-21.7 23.4-21.7 16.7 0 29.2 10.8 29.2 21.7 0 13.4-12.5 24.2-29.2 24.2z" />
<glyph unicode="&#xe904;" glyph-name="qrcode" d="M445.077 845.495h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-20.056 16.27-36.327 36.327-36.327h290.715c20.056 0 36.327 16.27 36.327 36.327v290.613c0 20.056-16.27 36.429-36.327 36.429zM449.784 518.351c0-2.558-2.149-4.707-4.707-4.707h-290.715c-2.558 0-4.707 2.149-4.707 4.707v290.715c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715zM350.219 737.231h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.335-22.922 22.922-22.922h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0.102 12.586-10.233 22.922-22.922 22.922zM341.521 621.907h-83.705v83.705h83.705v-83.705zM350.219 306.122h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.335-22.922 22.922-22.922h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0.102 12.689-10.233 22.922-22.922 22.922zM341.521 190.798h-83.705v83.705h83.705v-83.705zM673.474 590.288h101.1c12.689 0 22.922 10.335 22.922 22.922v101.1c0 12.689-10.335 22.922-22.922 22.922h-101.1c-12.689 0-22.922-10.335-22.922-22.922v-101.1c0-12.689 10.233-22.922 22.922-22.922zM682.172 705.612h83.705v-83.705h-83.705v83.705zM445.077 417.148h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-20.056 16.27-36.327 36.327-36.327h290.715c20.056 0 36.327 16.27 36.327 36.327v290.715c0 20.056-16.27 36.327-36.327 36.327zM449.784 90.107c0-2.558-2.149-4.707-4.707-4.707h-290.715c-2.558 0-4.707 2.149-4.707 4.707v290.715c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715zM580.458 416.022c-20.056 0-36.327-16.27-36.327-36.327v-167.205c0-8.698 7.061-15.861 15.861-15.861 8.698 0 15.861 7.061 15.861 15.861v167.102c0 2.558 2.149 4.707 4.707 4.707h176.005c8.698 0 15.861 7.061 15.861 15.861s-7.061 15.861-15.861 15.861h-176.107zM578.616 482.024h290.715c20.056 0 36.327 16.27 36.327 36.327v290.715c0 20.056-16.27 36.327-36.327 36.327h-290.715c-20.056 0-36.327-16.27-36.327-36.327v-290.715c0-19.954 16.373-36.327 36.327-36.327zM574.011 809.066c0 2.558 2.149 4.707 4.707 4.707h290.715c2.558 0 4.707-2.149 4.707-4.707v-290.715c0-2.558-2.149-4.707-4.707-4.707h-290.817c-2.558 0-4.707 2.149-4.707 4.707v290.715h0.102zM905.964 400.161c0 8.698-7.061 15.861-15.861 15.861h-58.020c-8.698 0-15.861-7.061-15.861-15.861s7.061-15.861 15.861-15.861h42.159v-60.988h-131.492c-8.698 0-15.861-7.061-15.861-15.861 0-8.698 7.061-15.861 15.861-15.861h147.353c8.698 0 15.861 7.061 15.861 15.861v92.71zM614.226 84.888h-38.475v44.104c0 8.698-7.061 15.861-15.861 15.861s-15.861-7.061-15.861-15.861v-59.862c0-8.698 7.061-15.861 15.861-15.861h54.336c8.698 0 15.861 7.061 15.861 15.861 0 8.698-7.061 15.759-15.861 15.759zM789.412 207.579c0 8.698-7.061 15.861-15.861 15.861h-99.975c-8.698 0-15.861-7.061-15.861-15.861v-140.088c0-8.698 7.061-15.861 15.861-15.861s15.861 7.061 15.861 15.861v124.227h84.114c8.8 0 15.861 7.061 15.861 15.861zM890.001 265.088c-8.698 0-15.861-7.061-15.861-15.861v-166.898h-143.26c-8.698 0-15.861-7.061-15.861-15.861 0-8.698 7.061-15.861 15.861-15.861h159.018c8.698 0 15.861 7.061 15.861 15.861v182.758c0 8.8-7.061 15.861-15.759 15.861zM636.431 350.839c-8.698 0-15.861-7.061-15.861-15.861v-51.471c0-8.698 7.061-15.861 15.861-15.861 8.698 0 15.861 7.061 15.861 15.861v51.471c0 8.8-7.163 15.861-15.861 15.861z" />
<glyph unicode="&#xe905;" glyph-name="uniE905" horiz-adv-x="1055" d="M745.891 349.28c0-26.168 21.214-47.382 47.382-47.382s47.382 21.214 47.382 47.382c0 26.168-21.214 47.382-47.382 47.382v0c-26.168 0-47.382-21.214-47.382-47.382v0zM759.195 244.935c-44.978 0.149-81.399 36.571-81.548 81.534v52.143c0.149 44.978 36.571 81.399 81.534 81.548h296.231v168.518c-0.149 44.978-36.571 81.399-81.534 81.548h-892.329c-44.978-0.149-81.399-36.571-81.548-81.534v-611.144c0.149-44.978 36.571-81.399 81.534-81.548h892.329c44.978 0.149 81.399 36.571 81.548 81.534v227.4zM905.15 762.004l-86.061 155.918c-14.23 25.257-40.876 42.035-71.44 42.035-14.412 0-27.953-3.731-39.71-10.279l0.416 0.213-339.907-187.887z" />
</font></defs></svg> </font></defs></svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -1,10 +1,10 @@
@font-face { @font-face {
font-family: 'icomoon'; font-family: 'icomoon';
src: url('icomoon.eot?4ejtdc'); src: url('icomoon.eot?jvagvf');
src: url('icomoon.eot?4ejtdc#iefix') format('embedded-opentype'), src: url('icomoon.eot?jvagvf#iefix') format('embedded-opentype'),
url('icomoon.ttf?4ejtdc') format('truetype'), url('icomoon.ttf?jvagvf') format('truetype'),
url('icomoon.woff?4ejtdc') format('woff'), url('icomoon.woff?jvagvf') format('woff'),
url('icomoon.svg?4ejtdc#icomoon') format('svg'); url('icomoon.svg?jvagvf#icomoon') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
@@ -25,6 +25,14 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-wallet:before {
content: "\e905";
color: #3c56c6;
}
.icon-qrcode:before {
content: "\e904";
color: #999;
}
.icon-customer-service:before { .icon-customer-service:before {
content: "\e900"; content: "\e900";
} }

View File

@@ -63,17 +63,17 @@ export default {
}; };
}, },
methods: { methods: {
selectTags (item) { selectTags (item) { // 选择热门标签
this.searchData = item; this.searchData = item;
this.search(); this.search();
}, },
search () { search () { // 全平台搜索商品
this.$router.push({ this.$router.push({
path: '/goodsList', path: '/goodsList',
query: { keyword: this.searchData } query: { keyword: this.searchData }
}); });
}, },
searchStore () { searchStore () { // 店铺搜索商品
this.$emit('search', this.searchData) this.$emit('search', this.searchData)
} }
}, },

View File

@@ -57,7 +57,7 @@ import {
export default { export default {
name: 'addressManage', name: 'addressManage',
props: { props: {
id: { id: { // 传入的地址id
defalut: '', defalut: '',
type: String type: String
} }
@@ -89,7 +89,7 @@ export default {
}; };
}, },
methods: { methods: {
save () { save () { // 保存地址
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const params = JSON.parse(JSON.stringify(this.formData)); const params = JSON.parse(JSON.stringify(this.formData));
@@ -138,15 +138,15 @@ export default {
this.formData.lat = item.position.lat; this.formData.lat = item.position.lat;
this.formData.lon = item.position.lng; this.formData.lon = item.position.lng;
}, },
show () { show () { // 地址模态框显示
this.showAddr = true; this.showAddr = true;
}, },
hide () { hide () { // 地址模态框隐藏
this.showAddr = false; this.showAddr = false;
} }
}, },
watch: { watch: {
id: { id: { // 传入的地址id
handler: function (v) { handler: function (v) {
if (v) { if (v) {
this.getAddrById(v); this.getAddrById(v);

View File

@@ -59,7 +59,6 @@ export default {
isActive: 0 // 已激活tab栏下标 isActive: 0 // 已激活tab栏下标
}; };
}, },
mounted () {},
methods: { methods: {
// 点击右侧的回调 // 点击右侧的回调
callBack () { callBack () {

View File

@@ -44,7 +44,7 @@ export default {
}; };
}, },
methods: { methods: {
getList () { getList () { // 获取优惠券列表
this.loading = true this.loading = true
memberCouponList(this.params).then(res => { memberCouponList(this.params).then(res => {
this.loading = false this.loading = false
@@ -67,18 +67,18 @@ export default {
} }
}, },
changePageNum (val) { changePageNum (val) { // 分页改变页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { // 分页改变页数
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()
}, },
useScope (type, storeName) { useScope (type, storeName) { // 根据字段返回 优惠券适用范围
let shop = '平台'; let shop = '平台';
let goods = '全部商品' let goods = '全部商品'
if (storeName !== 'platform') shop = storeName if (storeName !== 'platform') shop = storeName
@@ -104,7 +104,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '../../assets/styles/coupon.scss'; @import '../../assets/styles/coupon.scss';
.pageration{ .pageration {
text-align: right; text-align: right;
} }
</style> </style>

View File

@@ -151,8 +151,6 @@ export default {
] ]
}; };
}, },
components: {},
mounted () {},
methods: { methods: {
getCartList () { // 获取购物车列表 getCartList () { // 获取购物车列表
this.loading = true this.loading = true

View File

@@ -44,12 +44,12 @@ export default {
} }
}, },
methods: { methods: {
showCartNum (item) { showCartNum (item) { // 获取购物车数量
if (this.userInfo && item.title === '购物车') { if (this.userInfo && item.title === '购物车') {
this.getCartList() this.getCartList()
} }
}, },
clickBar (val) { clickBar (val) { // tabbar点击操作
if (!this.userInfo) { if (!this.userInfo) {
this.$Modal.confirm({ this.$Modal.confirm({
title: '请登录', title: '请登录',
@@ -83,7 +83,7 @@ export default {
} }
} }
}, },
openBlank (path) { openBlank (path) { // 新页面打开地址
let routerUrl = this.$router.resolve({ let routerUrl = this.$router.resolve({
path: path path: path
}) })

View File

@@ -13,11 +13,6 @@
<script> <script>
export default { export default {
name: 'Main', name: 'Main',
data () {
return {
};
},
props: { props: {
_Title: { // 描述内容 _Title: { // 描述内容
type: null, type: null,

View File

@@ -62,7 +62,7 @@ export default {
}; };
}, },
methods: { methods: {
goArticle () { // 跳转 goArticle () { // 跳转文章页
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/article' path: '/article'
}) })

View File

@@ -19,7 +19,7 @@ export default {
time: { // 传入的初始时间 time: { // 传入的初始时间
default: 1718977559428 default: 1718977559428
}, },
type: { type: { // 区分是在详情还是购物车调用
default: 'goodsDetail', // 设置两个值goodsDetail和cart样式不同 default: 'goodsDetail', // 设置两个值goodsDetail和cart样式不同
type: String type: String
} }
@@ -37,7 +37,7 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
countDown (val) { countDown (val) { // 倒计时方法
function addZero (i) { function addZero (i) {
return i < 10 ? '0' + i : i + ''; return i < 10 ? '0' + i : i + '';
} }
@@ -58,8 +58,8 @@ export default {
clearInterval(this.interval) clearInterval(this.interval)
} }
}, },
init () { init () { // 初始化
this.interval = setInterval((item) => { this.interval = setInterval(() => {
this.countDown(this.time); this.countDown(this.time);
}, 1000); }, 1000);
} }

View File

@@ -20,7 +20,6 @@
<div class="goodsConfig mt_10"> <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>
<!-- <span>举报</span> -->
</div> </div>
</div> </div>
<!-- 右侧商品信息活动信息操作展示 --> <!-- 右侧商品信息活动信息操作展示 -->
@@ -60,7 +59,7 @@
:key="index" :key="index"
@click="receiveCoupon(item.id)" @click="receiveCoupon(item.id)"
> >
<span v-if="item.couponType == 'PRICE'">{{ item.consumeThreshold }}{{item.price | unitPrice}}</span> <span v-if="item.couponType == 'PRICE'">{{ item.consumeThreshold }}{{item.price}}</span>
<span v-if="item.couponType == 'DISCOUNT'">{{ item.consumeThreshold }}{{item.couponDiscount}}</span> <span v-if="item.couponType == 'DISCOUNT'">{{ item.consumeThreshold }}{{item.couponDiscount}}</span>
</span> </span>
</p> </p>
@@ -112,7 +111,7 @@
<span class="inventory"> 库存{{skuDetail.quantity}}</span> <span class="inventory"> 库存{{skuDetail.quantity}}</span>
</div> </div>
</div> </div>
<div class="item-select"> <div class="item-select" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'">
<div class="item-select-title"> <div class="item-select-title">
<p>重量</p> <p>重量</p>
</div> </div>
@@ -120,38 +119,16 @@
<span class="inventory"> {{skuDetail.weight}}kg</span> <span class="inventory"> {{skuDetail.weight}}kg</span>
</div> </div>
</div> </div>
<div class="add-buy-car"> <div class="add-buy-car" v-if="$route.query.way === 'POINT' && skuDetail.isAuth === 'PASS'">
<Button type="error" :loading="loading" :disabled="skuDetail.quantity === 0" @click="addShoppingCartBtn">加入购物车</Button> <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> <Button type="warning" :loading="loading1" :disabled="skuDetail.quantity === 0" @click="buyNow">立即购买</Button>
</div> </div>
</div>
</div>
<!-- <div class="item-detail-see"> </div>
<Divider>更多推荐</Divider> </div>
<Row>
<Col :span="24" class="see-Item">
<img class="see-Img" src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg" alt="" />
<p>
名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
升6GB独显 送正版WIN10 一年上门
</p>
<p class="global_color">2500.00</p>
</Col>
<Col :span="24" class="see-Item">
<img
class="see-Img"
src="https://demo.dscmall.cn/storage/images/201703/thumb_img/0_thumb_G_1489099128797.jpg"
alt=""
/>
<p>
名龙堂i7 6700升7700 GTX1060 6G台式电脑主机DIY游戏组装整机
升6GB独显 送正版WIN10 一年上门
</p>
<p class="global_color">2500.00</p>
</Col>
</Row>
</div> -->
</div> </div>
</div> </div>
</template> </template>
@@ -174,7 +151,7 @@ export default {
count: 1, // 商品数量 count: 1, // 商品数量
imgIndex: 0, // 展示图片下标 imgIndex: 0, // 展示图片下标
currentSelceted: [], // 当前商品sku currentSelceted: [], // 当前商品sku
imgList: this.detail.data.specList[0].specImage, // 商品图片列表 imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表
skuDetail: this.detail.data, // sku详情 skuDetail: this.detail.data, // sku详情
goodsSpecList: this.detail.specs, // 商品spec goodsSpecList: this.detail.specs, // 商品spec
promotionMap: { // 活动状态 promotionMap: { // 活动状态
@@ -223,15 +200,41 @@ export default {
}; };
this.loading = true; this.loading = true;
addCartGoods(params).then(res => { addCartGoods(params).then(res => {
debugger;
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}}); this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
} else { } else {
this.$Message.warning(res.message); this.$Message.warning(res.message);
} }
}).catch(() => {
console.log('catch');
this.loading = false;
}); });
}, },
buyNow () { // 立即购买 buyNow () { // 立即购买
const params = {
num: this.count,
skuId: this.skuDetail.id,
cartType: 'BUY_NOW'
};
// 虚拟商品购买
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;
});
},
pointPay () { // 积分购买
const params = { const params = {
num: this.count, num: this.count,
skuId: this.skuDetail.id, skuId: this.skuDetail.id,
@@ -241,7 +244,7 @@ export default {
addCartGoods(params).then(res => { addCartGoods(params).then(res => {
this.loading1 = false; this.loading1 = false;
if (res.success) { if (res.success) {
this.$router.push({path: '/pay', query: {way: 'BUY_NOW'}}); this.$router.push({path: '/pay', query: {way: 'POINT'}});
} else { } else {
this.$Message.warning(res.message); this.$Message.warning(res.message);
} }
@@ -324,6 +327,7 @@ export default {
}) })
}, },
promotion () { // 格式化促销活动,返回当前促销的对象 promotion () { // 格式化促销活动,返回当前促销的对象
if (!this.detail.promotionMap) return false;
let keysArr = Object.keys(this.detail.promotionMap); let keysArr = Object.keys(this.detail.promotionMap);
if (keysArr.length === 0) return false; if (keysArr.length === 0) return false;
@@ -338,6 +342,7 @@ export default {
} }
}, },
mounted () { mounted () {
// 用户登录才会判断是否收藏
if (this.Cookies.getItem('userInfo')) { if (this.Cookies.getItem('userInfo')) {
isCollection('GOODS', this.skuDetail.id).then(res => { isCollection('GOODS', this.skuDetail.id).then(res => {
if (res.success && res.result) { if (res.success && res.result) {

View File

@@ -38,10 +38,10 @@
</div> </div>
</div> </div>
<div class="remarks-bar"> <div class="remarks-bar">
<span @click="searchByGrade('')" :class="{selectedBar: commentParams.grade === ''}">全部({{commentTypeNum.all}})</span> <span @click="viewByGrade('')" :class="{selectedBar: commentParams.grade === ''}">全部({{commentTypeNum.all}})</span>
<span @click="searchByGrade('GOOD')" :class="{selectedBar: commentParams.grade === 'GOOD'}">好评({{commentTypeNum.good}})</span> <span @click="viewByGrade('GOOD')" :class="{selectedBar: commentParams.grade === 'GOOD'}">好评({{commentTypeNum.good}})</span>
<span @click="searchByGrade('MODERATE')" :class="{selectedBar: commentParams.grade === 'MODERATE'}">中评({{commentTypeNum.moderate}})</span> <span @click="viewByGrade('MODERATE')" :class="{selectedBar: commentParams.grade === 'MODERATE'}">中评({{commentTypeNum.moderate}})</span>
<span @click="searchByGrade('WORSE')" :class="{selectedBar: commentParams.grade === 'WORSE'}">差评({{commentTypeNum.worse}})</span> <span @click="viewByGrade('WORSE')" :class="{selectedBar: commentParams.grade === 'WORSE'}">差评({{commentTypeNum.worse}})</span>
</div> </div>
<div style="text-align: center;margin-top: 20px;" v-if="commentList.length === 0"> <div style="text-align: center;margin-top: 20px;" v-if="commentList.length === 0">
暂无评价数据 暂无评价数据
@@ -86,9 +86,14 @@
</div> </div>
</div> </div>
</TabPane> </TabPane>
<!-- <TabPane label="商品问答"> <TabPane label="商品参数">
<ShowGoodsQuestion/> <table class="mt_10" border="1" cellpadding='0' cellspacing="0" v-if="skuDetail.goodsParamsList && skuDetail.length">
</TabPane> --> <tr v-for="param in skuDetail.goodsParamsList" :key="param">
<td>{{param.paramName}}</td><td>{{param.paramValue}}</td>
</tr>
</table>
<!-- <div v-else>暂无商品参数</div> -->
</TabPane>
</Tabs> </Tabs>
</div> </div>
</div> </div>
@@ -97,7 +102,6 @@
</template> </template>
<script> <script>
import ShowGoodsQuestion from '@/components/goodsDetail/ShowGoodsQuestion';
import { goodsComment, goodsCommentNum } from '@/api/member.js'; import { goodsComment, goodsCommentNum } from '@/api/member.js';
export default { export default {
name: 'ShowGoodsDetail', name: 'ShowGoodsDetail',
@@ -122,21 +126,21 @@ export default {
}; };
}, },
computed: { computed: {
skuDetail () { skuDetail () { // skuId
return this.detail.data; return this.detail.data;
} }
}, },
methods: { methods: {
changeHeight (name) { changeHeight (name) { // 设置商品详情高度
let heightCss = window.getComputedStyle(this.$refs[name]).height; let heightCss = window.getComputedStyle(this.$refs[name]).height;
heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89; heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89;
this.$refs.itemIntroDetail.style.height = heightCss + 'px'; this.$refs.itemIntroDetail.style.height = heightCss + 'px';
}, },
changePageNum (val) { changePageNum (val) { // 修改评论页码
this.commentParams.pageNumber = val; this.commentParams.pageNumber = val;
this.getList(); this.getList();
}, },
changePageSize (val) { changePageSize (val) { // 修改评论页数
this.commentParams.pageNumber = 1; this.commentParams.pageNumber = 1;
this.commentParams.pageSize = val; this.commentParams.pageSize = val;
this.getList(); this.getList();
@@ -155,12 +159,12 @@ export default {
} }
}); });
}, },
searchByGrade (grade) { viewByGrade (grade) { // 好中差评切换
this.$set(this.commentParams, 'grade', grade); this.$set(this.commentParams, 'grade', grade);
this.commentParams.pageNumber = 1; this.commentParams.pageNumber = 1;
this.getList(); this.getList();
}, },
tabClick (name) { tabClick (name) { // 商品详情和评价之间的tab切换
if (name === 0) { if (name === 0) {
this.$nextTick(() => { this.$nextTick(() => {
this.changeHeight('itemIntroGoods') this.changeHeight('itemIntroGoods')
@@ -198,7 +202,7 @@ export default {
} }
} }
}, },
handleScroll () { handleScroll () { // 监听页面滚动
if (this.onceFlag) { if (this.onceFlag) {
this.$nextTick(() => { this.$nextTick(() => {
this.changeHeight('itemIntroGoods') this.changeHeight('itemIntroGoods')
@@ -208,15 +212,12 @@ export default {
} }
}, },
mounted () { mounted () {
this.$nextTick(() => { this.$nextTick(() => { // 手动设置详情高度,解决无法撑开问题
setTimeout(this.changeHeight('itemIntroGoods'), 2000); setTimeout(this.changeHeight('itemIntroGoods'), 2000);
}); });
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
this.getList(); this.getList();
}, },
components: {
ShowGoodsQuestion
}
}; };
</script> </script>
@@ -283,14 +284,12 @@ export default {
} }
.item-intro-detail{ .item-intro-detail{
margin: 0 30px; margin: 0 30px;
// min-height: 1500px;
width: 100%; width: 100%;
} }
.item-intro-nav{ .item-intro-nav{
width: 100%; width: 100%;
height: 38px; height: 38px;
background-color: #F7F7F7; background-color: #F7F7F7;
// border-bottom: 1px solid $theme_color;
} }
.item-intro-nav ul{ .item-intro-nav ul{
margin: 0px; margin: 0px;
@@ -329,8 +328,6 @@ export default {
width: 240px; width: 240px;
height: 36px; height: 36px;
font-size: 14px; font-size: 14px;
/* text-align: center; */
/* background-color: #ccc; */
} }
.item-param-title { .item-param-title {
color: #232323; color: #232323;
@@ -486,4 +483,18 @@ export default {
.ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before { .ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before {
color: $theme_color; color: $theme_color;
} }
table{
border-color: #eee;
color: #999;
width: 70%;
margin-left: 10px;
tr{
td:nth-child(1){
width: 200px;
}
}
td{
padding: 5px;
}
}
</style> </style>

View File

@@ -1,53 +0,0 @@
<template>
<div class="wrapper">
<div v-if="true" class="question-list">
<div class="-item" v-for="index in 6" :key="index">
<!-- 提问 -->
<div class="-item-put -item-div">
<div class="-item-div-l blod">
<Tag color="warning"></Tag>
有屏幕调节亮度吗
</div>
<div class="-item-div-r">2020年10月21日17:03:35</div>
</div>
<!-- 解答 -->
<div class="-item-reply -item-div">
<div class="-item-div-l">
<Tag color="success"></Tag>
能调节点屏幕上方有一条调整带可正负2调整
</div>
<div class="-item-div-r">2020年10月21日17:03:35</div>
</div>
</div>
</div>
<div v-else class="question-empty">
<empty></empty>
</div>
</div>
</template>
<script>
export default {};
</script>
<style scoped lang="scss">
.-item-div {
padding: 10px 0;
display: flex;
align-items: center;
justify-content: space-between;
margin: 10px 0;
}
.-item-div-l {
display: flex;
@include content_color($light_content_color);
}
.-item-div-r {
@include sub_color($light_content_color);
}
.blod {
font-weight: bold;
}
.-item {
margin: 10px 0;
border-bottom: 1px solid $border_color;
}
</style>

View File

@@ -1,85 +0,0 @@
<template>
<div>
<div class="remarks-title">
<span>售后保障</span>
</div>
<div class="item-protect-container">
<div class="item-protect-box">
<p class="item-protect-title-box">
<Avatar style="background-color: #e4393c" icon="ribbon-a" />
<span class="item-protect-title">卖家服务</span>
</p>
<p class="item-protect-detail">
高品质敢承诺7天无理由退货30天免费换新质量问题商家承担来回运费换新如需发票请在确认收货无误后联系商家开出*发票不随货品一同发出
</p>
</div>
<div class="item-protect-box">
<p class="item-protect-title-box">
<Avatar style="background-color: #e4393c" icon="cash" />
<span class="item-protect-title">平台承诺</span>
</p>
<p class="item-protect-detail">
平台卖家销售并发货的商品由平台卖家提供发票和相应的售后服务请您放心购买<br> 因厂家会在没有任何提前通知的情况下更改产品包装产地或者一些附件本司不能确保客户收到的货物与商城图片产地附件说明完全一致只能确保为原厂正货并且保证与当时市场上同样主流新品一致若本商城没有及时更新请大家谅解
</p>
</div>
<div class="item-protect-box">
<p class="item-protect-title-box">
<Avatar style="background-color: #e4393c" icon="locked" />
<span class="item-protect-title">正品行货</span>
</p>
<p class="item-protect-detail">
BIT商城向您保证所售商品均为正品行货BIT自营商品开具机打发票或电子发票
</p>
</div>
<div class="item-protect-box">
<p class="item-protect-title-box">
<Avatar style="background-color: #e4393c" icon="settings" />
<span class="item-protect-title">全国联保</span>
</p>
<p class="item-protect-detail">
凭质保证书及BIT商城发票可享受全国联保服务奢侈品钟表除外奢侈品钟表由BIT联系保修享受法定三包售后服务与您亲临商场选购的商品享受相同的质量保证BIT商城还为您提供具有竞争力的商品价格和运费政策请您放心购买<br><br> 因厂家会在没有任何提前通知的情况下更改产品包装产地或者一些附件本司不能确保客户收到的货物与商城图片产地附件说明完全一致只能确保为原厂正货并且保证与当时市场上同样主流新品一致若本商城没有及时更新请大家谅解
</p>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'ShowProductWarranty'
};
</script>
<style scoped lang="scss">
.remarks-title {
padding-left: 15px;
height: 36px;
font-size: 16px;
font-weight: bolder;
line-height: 36px;
color: #666666;
background-color: #F7F7F7;
}
.item-protect-container {
padding: 15px;
}
.item-protect-box {
margin-bottom: 30px;
}
.item-protect-title-box {
display: flex;
align-items: center;
}
.item-protect-title {
padding-left: 15px;
font-size: 20px;
font-weight: bolder;
color: $theme_color;
}
.item-protect-detail {
padding-top: 5px;
padding-left: 46px;
font-size: 14px;
color: #999;
}
</style>

View File

@@ -2,30 +2,13 @@
<div class="box"> <div class="box">
<div class="nav"> <div class="nav">
<ul class="location"> <ul class="location">
<li><router-link to="/" v-if="$route.path !== '/'" class="home-page" ><Icon type="md-home" />首页</router-link></li>
<li> <li>
<Dropdown placement="bottom-start"> <router-link to="/" v-if="$route.path !== '/'" class="home-page">
<a href="javascript:void(0)"> <Icon type="md-home" />首页
<Icon type="ios-pin" class="icon"></Icon> </router-link>
{{ city }}
</a>
<DropdownMenu slot="list">
<div class="city">
<p v-for="(items, index) in cityArr" :key="index">
<span
v-for="(item, index) in items"
class="city-item"
:key="index"
@click="changeCity(item)"
>{{ item }}</span>
</p>
</div>
</DropdownMenu>
</Dropdown>
</li> </li>
</ul> </ul>
<ul class="detail"> <ul class="detail">
<!-- <li class="first hover-pointer" @click="handleClickTheme()">切换主题</li> -->
<li class="first" v-show="!userInfo.username"> <li class="first" v-show="!userInfo.username">
<router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`"> <router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
<span style="border:none" class="tipsLogin">请登录</span> <span style="border:none" class="tipsLogin">请登录</span>
@@ -51,16 +34,16 @@
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</li> </li>
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li> <li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
<li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li> <li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;" > <li @click="goUserCenter('/home/MsgList')"><span class="nav-item hover-color">我的消息</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;">
<i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i> <i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
<Dropdown placement="bottom-start"> <Dropdown placement="bottom-start">
<router-link to="cart" target="_blank" > <router-link to="/cart" target="_blank">
<span @mouseenter="getCartList"> <span @mouseenter="getCartList">
<Icon <Icon
size="18" size="18"
class="cart-icon"
type="ios-cart-outline" type="ios-cart-outline"
></Icon> ></Icon>
购物车 购物车
@@ -75,12 +58,7 @@
<span>赶快去添加商品吧~</span> <span>赶快去添加商品吧~</span>
</div> </div>
<div class="shopping-cart-list" v-show="shoppingCart.length > 0"> <div class="shopping-cart-list" v-show="shoppingCart.length > 0">
<div <div class="shopping-cart-box" v-for="(item, index) in shoppingCart" @click="goToPay" :key="index">
class="shopping-cart-box"
v-for="(item, index) in shoppingCart"
@click="goToPay"
:key="index"
>
<div class="shopping-cart-img"> <div class="shopping-cart-img">
<img :src="item.goodsSku.thumbnail" class="hover-pointer" /> <img :src="item.goodsSku.thumbnail" class="hover-pointer" />
</div> </div>
@@ -117,62 +95,46 @@
</template> </template>
<script> <script>
import storage from '@/plugins/storage.js'; import storage from "@/plugins/storage.js";
import {cartGoodsAll} from '@/api/cart.js' import { cartGoodsAll } from "@/api/cart.js";
export default { export default {
name: 'M-Header', name: "M-Header",
created () { created() {
if (storage.getItem('userInfo')) { if (storage.getItem("userInfo")) {
this.userInfo = JSON.parse(storage.getItem('userInfo')); this.userInfo = JSON.parse(storage.getItem("userInfo"));
} }
}, },
data () { data() {
return { return {
// 主题颜色切换 // 主题颜色切换
themeType: 'light', themeType: "light",
city: '珠海', // 展示城市
cityArr: [
['北京', '上海', '天津', '重庆', '广州'],
['深圳', '河南', '辽宁', '吉林', '江苏'],
['江西', '四川', '海南', '贵州', '云南'],
['西藏', '陕西', '甘肃', '青海', '珠海']
],
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
shoppingCart: [] // 购物车 shoppingCart: [], // 购物车
}; };
}, },
computed: { computed: {
cartNum () { cartNum() {
return this.$store.state.cartNum return this.$store.state.cartNum;
} },
}, },
methods: { methods: {
handleClickTheme () { changeCity (city) { // 选择所在城市
this.themeType === 'light'
? (this.themeType = 'dark')
: (this.themeType = 'light');
window.document.documentElement.setAttribute(
'data-theme',
this.themeType
);
},
changeCity (city) {
this.city = city; this.city = city;
}, },
goToPay () { goToPay () { // 跳转购物车
let url = this.$router.resolve({ let url = this.$router.resolve({
path: '/cart' path: "/cart",
}) });
window.open(url.href, '_blank') window.open(url.href, "_blank");
}, },
myInfo () { myInfo () { // 跳转会员中心
let url = this.$router.resolve({ let url = this.$router.resolve({
path: '/home' path: "/home",
}) });
window.open(url.href, '_blank') window.open(url.href, "_blank");
}, },
signOutFun () { signOutFun () { // 退出登录
storage.removeItem('accessToken'); storage.removeItem('accessToken');
storage.removeItem('refreshToken'); storage.removeItem('refreshToken');
storage.removeItem('userInfo'); storage.removeItem('userInfo');
@@ -180,49 +142,51 @@ export default {
this.$store.commit('SET_CARTNUM', 0) this.$store.commit('SET_CARTNUM', 0)
this.$router.push('/login'); this.$router.push('/login');
}, },
goUserCenter (path) { // 跳转我的订单,我的足迹 goUserCenter(path) {
// 跳转我的订单,我的足迹
if (this.userInfo.username) { if (this.userInfo.username) {
this.$router.push({path: path}) this.$router.push({ path: path });
} else { } else {
this.$Modal.confirm({ this.$Modal.confirm({
title: '请登录', title: "请登录",
content: '<p>请登录后执行此操作</p>', content: "<p>请登录后执行此操作</p>",
okText: '立即登录', okText: "立即登录",
cancelText: '继续浏览', cancelText: "继续浏览",
onOk: () => { onOk: () => {
this.$router.push({ this.$router.push({
path: '/login', path: "/login",
query: { query: {
rePath: this.$router.history.current.path, rePath: this.$router.history.current.path,
query: JSON.stringify(this.$router.history.current.query) query: JSON.stringify(this.$router.history.current.query),
} },
}); });
} },
}); });
} }
}, },
shopEntry () { // 店铺入驻 shopEntry() {
if (storage.getItem('accessToken')) { // 店铺入驻
if (storage.getItem("accessToken")) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/shopEntry', path: "/shopEntry",
query: {id: 1} query: { id: 1 },
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, "_blank");
} else { } else {
this.$router.push('login'); this.$router.push("login");
} }
}, },
getCartList () { // 获取购物车列表 getCartList() {
// 获取购物车列表
if (this.userInfo.username) { if (this.userInfo.username) {
cartGoodsAll().then((res) => {
cartGoodsAll().then(res => { this.shoppingCart = res.result.skuList;
this.shoppingCart = res.result.skuList this.$store.commit("SET_CARTNUM", this.shoppingCart.length);
this.$store.commit('SET_CARTNUM', this.shoppingCart.length) this.Cookies.setItem("cartNum", this.shoppingCart.length);
this.Cookies.setItem('cartNum', this.shoppingCart.length) });
})
}
}
} }
},
},
}; };
</script> </script>
@@ -260,12 +224,13 @@ export default {
float: left; float: left;
font-size: 14px; font-size: 14px;
line-height: 35px; line-height: 35px;
margin-right: 15px; margin-right: 10px;
font-weight: bold; font-weight: bold;
} }
.nav a,.nav-item { .nav a,
.nav-item {
text-decoration: none; text-decoration: none;
padding-left: 15px; padding-left: 10px;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
color: #999; color: #999;
cursor: pointer; cursor: pointer;
@@ -406,9 +371,6 @@ export default {
.sign-out p { .sign-out p {
font-size: 12px; font-size: 12px;
} }
.cart-icon{
padding: 0 6px;
}
.goods-title:hover { .goods-title:hover {
color: $theme_color; color: $theme_color;
} }

View File

@@ -1,10 +1,10 @@
<template> <template>
<div class="shop-box"> <div class="shop-box">
<div class="shop-container"> <div class="shop-container">
<div class="shop-title">
<div class="shop-title-content"> <div class="shop-title-content">
<p><router-link :to="`/merchant?id=${skuDetail.storeId}`">{{ skuDetail.storeName }}</router-link></p> <img class="hover-pointer" @click="linkTo(`/merchant?id=${storeDetail.storeId}`)" :src="storeDetail.storeLogo" height="40" alt="">
</div> <p><router-link :to="`/merchant?id=${storeDetail.storeId}`">{{ storeDetail.storeName }}</router-link></p>
<div class="ml_20" v-html="storeDetail.storeDesc"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -20,7 +20,7 @@ export default {
} }
}, },
computed: { computed: {
skuDetail () { storeDetail () { // 店铺详情
return this.detail; return this.detail;
} }
} }
@@ -46,57 +46,17 @@ export default {
color: #fff; color: #fff;
} }
.shop-title {
display: flex;
flex-direction: row;
}
.shop-title-icon {
font-size: 46px;
}
.shop-title-content { .shop-title-content {
padding-top: 8px;
margin-left: 15px;
display: flex; display: flex;
align-items: center;
} }
.shop-title-content p { .shop-title-content p {
line-height: 26px;
font-size: 20px; font-size: 20px;
}
.shop-title-content p:nth-child(2) {
font-size: 16px;
margin-left: 20px; margin-left: 20px;
} }
.shop-title-content a { .shop-title-content a {
color: #fff; color: #fff;
} }
.shop-another-item {
display: flex;
flex-direction: row;
}
.shop-another-item-detail {
display: flex;
flex-direction: row;
align-items: center;
margin-left: 15px;
}
.shop-another-item-img {
height: 80px;
border-radius: 40px;
overflow: hidden;
}
.shop-another-item-img img {
width: 80px;
}
.shop-anoter-item-intro {
margin-left: 15px;
}
</style> </style>

View File

@@ -23,7 +23,7 @@ export default {
} }
}, },
methods: { methods: {
goCartList () { goCartList () { // 跳转购物车页面
let routerUrl = this.$router.resolve({ let routerUrl = this.$router.resolve({
path: '/cart' path: '/cart'
}) })

View File

@@ -67,14 +67,14 @@ export default {
}; };
}, },
methods: { methods: {
getArticleList () { getArticleList () { // 获取常见问题列表
articleList(this.params).then(res => { articleList(this.params).then(res => {
if (res.success) { if (res.success) {
this.articleList = res.result.records this.articleList = res.result.records
} }
}) })
}, },
goArticle (id) { goArticle (id) { // 跳转文章详情
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/article', path: '/article',
query: {id} query: {id}

View File

@@ -32,7 +32,6 @@ export default {
options: this.data.options // 装修数据 options: this.data.options // 装修数据
}; };
}, },
methods: {}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -50,9 +50,8 @@ export default {
this.$emit('content', val); this.$emit('content', val);
} }
}, },
mounted () {},
methods: { methods: {
changeCurr (index) { changeCurr (index) { // 选择分类
this.currentIndex = index; this.currentIndex = index;
} }
} }

View File

@@ -36,7 +36,7 @@
</template> </template>
<script> <script>
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'; import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper';
import 'swiper/swiper-bundle.css'; // import 'swiper/swiper-bundle.css';
export default { export default {
components: { components: {
Swiper, Swiper,
@@ -71,7 +71,7 @@ export default {
}; };
}, },
watch: { watch: {
diffSeconds (val) { diffSeconds (val) { // 秒杀倒计时
const hours = Math.floor(val / 3600); const hours = Math.floor(val / 3600);
// 当前秒数 / 60向下取整 // 当前秒数 / 60向下取整
// 获取到所有分钟数 3600 / 60 = 60分钟 // 获取到所有分钟数 3600 / 60 = 60分钟
@@ -139,7 +139,7 @@ export default {
}, 1000); }, 1000);
} }
}, },
goPromotion () { goPromotion () { // 跳转秒杀页面
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/seckill' path: '/seckill'
}); });

View File

@@ -1,3 +1 @@
## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面 ## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面
### 目前没有参数,之后会设置一个参数接收历史的单位发票数据

View File

@@ -11,42 +11,37 @@
</div> --> </div> -->
<!-- 普通发票 --> <!-- 普通发票 -->
<div class="nav-content"> <div class="nav-content">
<Form <Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
:model="invoiceForm"
ref="form"
label-position="left"
:rules="ruleInline"
:label-width="110"
>
<FormItem label="发票类型"> <FormItem label="发票类型">
<RadioGroup v-model="invoiceForm.type" type="button" button-style="solid"> <RadioGroup v-model="invoice" type="button" button-style="solid">
<Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
<Radio :label="2" :disabled="true">增值税专用发票</Radio>
</RadioGroup>
</FormItem>
<FormItem label="发票抬头">
<RadioGroup v-model="type" @on-change="changeInvoice" type="button" button-style="solid">
<Radio :label="1">个人</Radio> <Radio :label="1">个人</Radio>
<Radio :label="2">单位</Radio> <Radio :label="2">单位</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem <FormItem label="个人名称" v-if="type === 1" prop="receiptTitle">
label="发票抬头"
v-if="invoiceForm.type == 2"
prop="receiptTitle"
>
<i-input v-model="invoiceForm.receiptTitle"></i-input> <i-input v-model="invoiceForm.receiptTitle"></i-input>
</FormItem> </FormItem>
<FormItem <FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
label="纳税人识别号" <i-input v-model="invoiceForm.receiptTitle"></i-input>
v-if="invoiceForm.type == 2" </FormItem>
prop="taxpayerId" <FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
>
<i-input v-model="invoiceForm.taxpayerId"></i-input> <i-input v-model="invoiceForm.taxpayerId"></i-input>
</FormItem> </FormItem>
<FormItem label="发票内容"> <FormItem label="发票内容">
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid"> <RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
<Radio label="不开发票">不开发票</Radio>
<Radio label="商品明细">商品明细</Radio> <Radio label="商品明细">商品明细</Radio>
<Radio label="商品类别">商品类别</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Form> </Form>
<div style="text-align: center"> <div style="text-align: center">
<Button type="primary" :loading="loading" @click="save">保存发票信息</Button> <Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
<Button type="default" @click="invoiceAvailable = false">取消</Button> <Button type="default" @click="invoiceAvailable = false">取消</Button>
</div> </div>
</div> </div>
@@ -54,23 +49,24 @@
</div> </div>
</template> </template>
<script> <script>
import { saveReceipt } from '@/api/member.js'; import { receiptSelect } from '@/api/cart.js';
import { TINumber } from '@/plugins/RegExp.js'; import { TINumber } from '@/plugins/RegExp.js';
export default { export default {
name: 'invoiceModal', name: 'invoiceModal',
data () { data () {
return { return {
invoice: 1,
invoiceAvailable: false, // 模态框显隐 invoiceAvailable: false, // 模态框显隐
loading: false, // 提交状态 loading: false, // 提交状态
invoiceForm: { // 发票表单 invoiceForm: {
// 发票表单
// 普票表单 // 普票表单
receiptTitle: '', // 发票抬头 receiptTitle: '', // 发票抬头
taxpayerId: '', // 纳税人识别号 taxpayerId: '', // 纳税人识别号
receiptContent: '不开发票', // 发票内容 receiptContent: '商品明细', // 发票内容
type: 1 // 1 个人 2 单位
}, },
type: 1, // 1 个人 2 单位
ruleInline: { ruleInline: {
receiptTitle: [{ required: true, message: '请填写公司名称' }],
taxpayerId: [ taxpayerId: [
{ required: true, message: '请填写纳税人识别号' }, { required: true, message: '请填写纳税人识别号' },
{ pattern: TINumber, message: '请填写正确的纳税人识别号' } { pattern: TINumber, message: '请填写正确的纳税人识别号' }
@@ -78,73 +74,76 @@ export default {
} }
}; };
}, },
methods: { props: ['invoiceData'],
save () { watch: {
if (this.invoiceForm.type === 1) { invoiceData: {
// 个人 handler (val) {
let flag = true; this.invoiceForm = { ...val };
this.receiptItems.forEach((e) => {
if (
e.receiptTitle === '个人' &&
e.receiptContent === this.invoiceForm.receiptContent
) {
this.$emit('change', e);
flag = false;
this.invoiceAvailable = false;
}
});
if (flag) { if (val.taxpayerId) {
let params = { this.type = 2;
receiptTitle: '个人',
receiptContent: this.invoiceForm.receiptContent
};
this.loading = true;
saveReceipt(params)
.then((res) => {
this.loading = false;
if (res.success) {
this.$emit('change', res.result);
this.invoiceAvailable = false;
}
})
.catch(() => {
this.loading = false;
});
}
} else { } else {
// 单位 this.type = 1;
}
},
deep: true,
immeadite: true
}
},
methods: {
/**
* 选择发票抬头
*/
changeInvoice (val) {
this.$nextTick(() => {
this.type = val;
});
},
/**
* 保存判断
*/
save () {
let flage = true;
// 保存分为两种类型,个人以及企业
const { type, receiptTitle, receiptContent } = JSON.parse(
JSON.stringify(this.invoiceForm)
);
// 判断是否填写发票抬头
if (!receiptTitle) {
this.$Message.error('请填写发票抬头!');
flage = false;
return false;
}
if (type === 2) {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (!valid) {
this.loading = true; flage = false;
let params = {
receiptTitle: this.invoiceForm.receiptTitle,
taxpayerId: this.invoiceForm.taxpayerId,
receiptContent: this.invoiceForm.receiptContent
};
let flag = true;
this.receiptItems.forEach((e) => {
if (e.taxpayerId === params.taxpayerId) {
flag = false;
} }
}); });
if (!flag) {
this.$Message.error('已有当前税号的发票信息,请直接选择已有发票');
} else { } else {
saveReceipt(params) delete this.invoiceForm.taxpayerId;
.then((res) => { }
return flage;
},
async submit () {
if (this.save()) {
this.loading = true;
let submit = {
way: this.$route.query.way,
...this.invoiceForm
};
let receipt = await receiptSelect(submit);
if (receipt.success) {
this.$emit('change', true);
}
this.loading = false; this.loading = false;
if (res.success) {
this.$emit('change', res.result);
this.invoiceAvailable = false;
}
})
.catch(() => {
this.loading = false;
});
}
}
});
} }
} }
} }

View File

@@ -85,7 +85,7 @@ export default {
this.$emit('getAddress', this.addrContent); this.$emit('getAddress', this.addrContent);
} }
}, },
init () { init () { // 初始化地图
AMapLoader.load({ AMapLoader.load({
key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key首次调用 load 时必填 key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key首次调用 load 时必填
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15

View File

@@ -21,7 +21,7 @@ export default {
props: ['addressId'], props: ['addressId'],
mounted () {}, mounted () {},
methods: { methods: {
change (val, selectedData) { change (val, selectedData) { // 选择地区
/** /**
* @returns [regionId,region] * @returns [regionId,region]
*/ */
@@ -30,7 +30,7 @@ export default {
selectedData[selectedData.length - 1].__label.split('/') selectedData[selectedData.length - 1].__label.split('/')
]); ]);
}, },
loadData (item, callback) { loadData (item, callback) { // 加载数据
item.loading = true; item.loading = true;
getRegion(item.value).then((res) => { getRegion(item.value).then((res) => {
if (res.result.length <= 0) { if (res.result.length <= 0) {
@@ -59,7 +59,7 @@ export default {
} }
}); });
}, },
async init () { async init () { // 初始化地图数据
let data = await getRegion(0); let data = await getRegion(0);
let arr = []; let arr = [];
data.result.forEach((item) => { data.result.forEach((item) => {

View File

@@ -209,7 +209,7 @@ export default {
}, },
deep: true deep: true
}, },
'$route': { '$route': { // 监听路由
handler (val, oVal) { handler (val, oVal) {
if (this.$route.query.categoryId) { if (this.$route.query.categoryId) {
let cateId = this.$route.query.categoryId.split(',') let cateId = this.$route.query.categoryId.split(',')
@@ -373,6 +373,7 @@ export default {
} }
}, },
mounted () { mounted () {
// 有分类id就根据id搜索
if (this.$route.query.categoryId) { if (this.$route.query.categoryId) {
let cateId = this.$route.query.categoryId.split(',') let cateId = this.$route.query.categoryId.split(',')
Object.assign(this.params, this.$route.query) Object.assign(this.params, this.$route.query)

View File

@@ -13,11 +13,12 @@
</li> </li>
</ul> </ul>
</div> </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"> <!-- 第一级分类 -->
<div class="nav-side" @mouseleave="panel = false">
<ul> <ul>
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" @mouseleave="panel = false"> <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 class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
<span v-for="(second, secIndex) in item.children" :key="secIndex"> <span v-for="(second, secIndex) in item.children" :key="secIndex">
<span v-if="secIndex < 2" > / </span> <span v-if="secIndex < 2" > / </span>
@@ -26,13 +27,11 @@
</li> </li>
</ul> </ul>
</div> </div>
<transition name="fade"> <!-- 展开分类 -->
<div <div
class="detail-item-panel" class="detail-item-panel"
:duration="{ enter: 100, leave: 100 }"
v-show="panel" v-show="panel"
@mouseenter="panel = true" @mouseenter="panel = true"
ref="itemPanel1"
@mouseleave="panel = false" @mouseleave="panel = false"
> >
<div class="nav-detail-item"> <div class="nav-detail-item">
@@ -57,7 +56,6 @@
</li> </li>
</ul> </ul>
</div> </div>
</transition>
</div> </div>
</div> </div>
</template> </template>
@@ -86,20 +84,25 @@ export default {
} }
}, },
computed: { computed: {
navList () { navList () { // 导航列表
return JSON.parse(storage.getItem('navList')) || [] return JSON.parse(storage.getItem('navList')) || []
} }
}, },
methods: { methods: {
getCate () { getCate () { // 获取分类数据
getCategory(0).then(res => { getCategory(0).then(res => {
if (res.success) { if (res.success) {
this.cateList = res.result; this.cateList = res.result;
// 过期时间
var expirationTime = new Date().setHours(new Date().getHours() + 1);
// 存放过期时间
localStorage.setItem('category_expiration_time', expirationTime);
// 存放分类信息
localStorage.setItem('category', JSON.stringify(res.result)) localStorage.setItem('category', JSON.stringify(res.result))
} }
}); });
}, },
showDetail (index) { showDetail (index) { // 展示全部分类
this.panel = true this.panel = true
this.panelData = this.cateList[index].children this.panelData = this.cateList[index].children
}, },
@@ -119,7 +122,12 @@ export default {
} }
}, },
mounted () { mounted () {
if (localStorage.getItem('category')) { if (localStorage.getItem('category') && 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 { } else {
this.getCate() this.getCate()
@@ -245,9 +253,6 @@ export default {
.nav-detail-item span:hover { .nav-detail-item span:hover {
background-color: $theme_color; background-color: $theme_color;
} }
.detail-item-panel ul {
list-style: none;
}
.detail-item-panel li { .detail-item-panel li {
line-height: 30px; line-height: 30px;
// margin-left: 40px; // margin-left: 40px;

View File

@@ -6,7 +6,7 @@
#### 在组件上添加v-if来判断组件显隐 #### 在组件上添加v-if来判断组件显隐
#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]等,详情看接口文档 #### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ]
#### @change方法 获取回调,参数为对象 {status:false,distance:100} status 为回调状态distance为移动距离 #### @change方法 获取回调,参数为对象 {status:false,distance:100} status 为回调状态distance为移动距离

View File

@@ -43,11 +43,11 @@ export default {
}; };
}, },
methods: { methods: {
mouseDown (e) { mouseDown (e) { // 鼠标按下操作,
this.downX = e.clientX; this.downX = e.clientX;
this.flag = true; this.flag = true;
}, },
mouseMove (e) { mouseMove (e) { // 鼠标移动
if (this.flag) { if (this.flag) {
let offset = e.clientX - this.downX; let offset = e.clientX - this.downX;
@@ -60,7 +60,7 @@ export default {
} }
} }
}, },
mouseUp () { mouseUp () { // 鼠标抬起
if (!this.flag) return false; if (!this.flag) return false;
this.flag = false; this.flag = false;
let params = { let params = {
@@ -83,7 +83,7 @@ export default {
} }
}); });
}, },
refresh () { refresh () { // 刷新验证图片
this.flag = false; this.flag = false;
this.downX = 0; this.downX = 0;
this.distance = 0; this.distance = 0;
@@ -91,21 +91,21 @@ export default {
this.verifyText = '拖动滑块解锁'; this.verifyText = '拖动滑块解锁';
this.getImg(); this.getImg();
}, },
getImg () { getImg () { // 获取验证图片
getVerifyImg(this.type).then(res => { getVerifyImg(this.type).then(res => {
this.data = res.result; this.data = res.result;
}); });
} }
}, },
created () { created () {
this.getImg(); // this.getImg();
}, },
watch: { watch: {
verifyType: { verifyType: {
immediate: true, immediate: true,
handler: function (v) { handler: function (v) {
this.type = v; this.type = v;
this.refresh(); // this.refresh();
} }
}, },
show (v) { show (v) {

View File

@@ -26,7 +26,3 @@ export function postVerifyImg (params) {
headers: {uuid: storage.getItem('uuid')} headers: {uuid: storage.getItem('uuid')}
}); });
} }
export function mouseup () {
console.log(111);
}

View File

@@ -17,15 +17,15 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
// common: 'http://192.168.0.103:8890', common: 'http://192.168.0.100:8890',
// buyer: 'http://192.168.0.103:8888', buyer: 'http://192.168.0.100:8888',
// seller: 'http://192.168.0.103:8889', seller: 'http://192.168.0.100:8889',
// manager: 'http://192.168.0.103:8887' manager: 'http://192.168.0.100:8887'
common: 'https://common-api.pickmall.cn', // common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn', // buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn', // seller: 'https://store-api.pickmall.cn',
manager: 'https://admin-api.pickmall.cn' // manager: 'https://admin-api.pickmall.cn'
}, },
api_prod: { api_prod: {
common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',

View File

@@ -37,6 +37,11 @@ Vue.prototype.linkTo = function (url) {
window.open(url, '_blank') window.open(url, '_blank')
} }
} }
// 联系客服
Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') {
const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign
window.open(url, '_blank')
}
Vue.prototype.Cookies = storage Vue.prototype.Cookies = storage
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({

View File

@@ -117,7 +117,7 @@
已节省<span>{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span> 已节省<span>{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
</div> </div>
<div class="ml_20 total-price"> <div class="ml_20 total-price">
总价不含运费:<span>{{ priceDetailDTO.billPrice | unitPrice("¥") }}</span> 总价不含运费:<div>{{ priceDetailDTO.billPrice | unitPrice("¥") }}</div>
</div> </div>
<div class="pay ml_20" @click="pay">去结算</div> <div class="pay ml_20" @click="pay">去结算</div>
</div> </div>
@@ -136,26 +136,26 @@
</template> </template>
<script> <script>
import Promotion from '@/components/goodsDetail/Promotion' import Promotion from "@/components/goodsDetail/Promotion";
import Search from '@/components/Search'; import Search from "@/components/Search";
import ShowLikeGoods from '@/components/like'; import ShowLikeGoods from "@/components/like";
import * as APICart from '@/api/cart'; import * as APICart from "@/api/cart";
import * as APIMember from '@/api/member'; import * as APIMember from "@/api/member";
import {getLogo} from '@/api/common.js' import { getLogo } from "@/api/common.js";
export default { export default {
name: 'Cart', name: "Cart",
beforeRouteEnter (to, from, next) { beforeRouteEnter(to, from, next) {
window.scrollTo(0, 0); window.scrollTo(0, 0);
next(); next();
}, },
components: { components: {
Search, Search,
ShowLikeGoods, ShowLikeGoods,
Promotion Promotion,
}, },
data () { data() {
return { return {
logoImg: '', // logo图 logoImg: "", // logo图
couponAvailable: false, // 展示优惠券 couponAvailable: false, // 展示优惠券
stepIndex: 0, // 当前处于哪一步,购物车==0填写订单信息==1成功提交订单==2 stepIndex: 0, // 当前处于哪一步,购物车==0填写订单信息==1成功提交订单==2
goodsTotal: 1, // 商品数量 goodsTotal: 1, // 商品数量
@@ -165,45 +165,45 @@ export default {
cartList: [], // 购物车列表 cartList: [], // 购物车列表
couponList: [], // 优惠券列表 couponList: [], // 优惠券列表
priceDetailDTO: {}, // 价格明细 priceDetailDTO: {}, // 价格明细
skuList: [] // sku列表 skuList: [], // sku列表
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
// 跳转商品详情 // 跳转商品详情
goGoodsDetail (skuId, goodsId) { goGoodsDetail(skuId, goodsId) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/goodsDetail', path: "/goodsDetail",
query: { skuId, goodsId } query: { skuId, goodsId },
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, "_blank");
}, },
// 跳转店铺首页 // 跳转店铺首页
goShopPage (id) { goShopPage(id) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/Merchant', path: "/Merchant",
query: { id } query: { id },
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, "_blank");
}, },
// 收藏商品 // 收藏商品
collectGoods (id) { collectGoods(id) {
this.$Modal.confirm({ this.$Modal.confirm({
title: '收藏', title: "收藏",
content: '<p>商品收藏后可在个人中心我的收藏查看</p>', content: "<p>商品收藏后可在个人中心我的收藏查看</p>",
onOk: () => { onOk: () => {
APIMember.collectGoods('GOODS', id).then((res) => { APIMember.collectGoods("GOODS", id).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('收藏商品成功'); this.$Message.success("收藏商品成功");
this.getCartList(); this.getCartList();
} }
}); });
}, },
onCancel: () => { } onCancel: () => {},
}); });
}, },
// 删除商品 // 删除商品
delGoods (id) { delGoods(id) {
const idArr = []; const idArr = [];
if (!id) { if (!id) {
const list = this.cartList; const list = this.cartList;
@@ -216,49 +216,50 @@ export default {
idArr.push(id); idArr.push(id);
} }
this.$Modal.confirm({ this.$Modal.confirm({
title: '删除', title: "删除",
content: '<p>确定要删除该商品吗?</p>', content: "<p>确定要删除该商品吗?</p>",
onOk: () => { onOk: () => {
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => { APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('删除成功'); this.$Message.success("删除成功");
this.getCartList(); this.getCartList();
} else { } else {
this.$Message.error(res.message); this.$Message.error(res.message);
} }
}); });
} },
}); });
}, },
clearCart () { // 清空购物车 clearCart() {
// 清空购物车
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: "提示",
content: '<p>确定要清空购物车吗?清空后不可恢复</p>', content: "<p>确定要清空购物车吗?清空后不可恢复</p>",
onOk: () => { onOk: () => {
APICart.clearCart().then((res) => { APICart.clearCart().then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('清空购物车成功'); this.$Message.success("清空购物车成功");
this.getCartList(); this.getCartList();
} else { } else {
this.$Message.error(res.message); this.$Message.error(res.message);
} }
}); });
} },
}); });
}, },
// 跳转支付页面 // 跳转支付页面
pay () { pay() {
if (this.checkedNum) { if (this.checkedNum) {
this.$router.push({ path: '/pay', query: { way: 'CART' } }); this.$router.push({ path: "/pay", query: { way: "CART" } });
} else { } else {
this.$Message.warning('请至少选择一件商品'); this.$Message.warning("请至少选择一件商品");
} }
}, },
// 展示优惠券 // 展示优惠券
showCoupon (storeId, index) { showCoupon(storeId, index) {
this.couponAvailable = index; this.couponAvailable = index;
}, },
changeNum (val, id) { changeNum(val, id) {
// 设置购买数量 // 设置购买数量
console.log(val, id); console.log(val, id);
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => { APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
@@ -268,13 +269,13 @@ export default {
} }
}); });
}, },
async changeChecked (status, type, id) { async changeChecked(status, type, id) {
// 设置商品选中状态 // 设置商品选中状态
const check = status ? 1 : 0; const check = status ? 1 : 0;
if (type === 'all') { if (type === "all") {
// 全选 // 全选
await APICart.setCheckedAll({ checked: check }); await APICart.setCheckedAll({ checked: check });
} else if (type === 'shop') { } else if (type === "shop") {
// 选中店铺所有商品 // 选中店铺所有商品
await APICart.setCheckedSeller({ checked: check, storeId: id }); await APICart.setCheckedSeller({ checked: check, storeId: id });
} else { } else {
@@ -285,16 +286,17 @@ export default {
this.getCartList(); this.getCartList();
}, },
async receiveShopCoupon (item) { // 领取优惠券 async receiveShopCoupon(item) {
let res = await APIMember.receiveCoupon(item.id) // 领取优惠券
let res = await APIMember.receiveCoupon(item.id);
if (res.success) { if (res.success) {
this.$set(item, 'disabled', true) this.$set(item, "disabled", true);
this.$Message.success('领取成功') this.$Message.success("领取成功");
} else { } else {
this.$Message.error(res.message) this.$Message.error(res.message);
} }
}, },
async getCartList () { async getCartList() {
// 购物车列表 // 购物车列表
this.loading = true; this.loading = true;
try { try {
@@ -307,9 +309,9 @@ export default {
this.checkedNum = 0; this.checkedNum = 0;
let allChecked = true; let allChecked = true;
for (let k = 0; k < this.cartList.length; k++) { for (let k = 0; k < this.cartList.length; k++) {
let shop = this.cartList[k] let shop = this.cartList[k];
let list = await APIMember.couponList({storeId: shop.storeId}) let list = await APIMember.couponList({ storeId: shop.storeId });
shop.couponList.push(...list.result.records) shop.couponList.push(...list.result.records);
} }
for (let i = 0; i < this.skuList.length; i++) { for (let i = 0; i < this.skuList.length; i++) {
if (this.skuList[i].checked) { if (this.skuList[i].checked) {
@@ -318,30 +320,31 @@ export default {
allChecked = false; allChecked = false;
} }
} }
this.$forceUpdate() this.$forceUpdate();
this.allChecked = allChecked; this.allChecked = allChecked;
} }
} catch (error) { } catch (error) {
this.loading = false; this.loading = false;
} }
}
}, },
mounted () { },
mounted() {
this.getCartList(); this.getCartList();
APICart.cartCount().then(res => { // 购物车商品数量 APICart.cartCount().then((res) => {
// 购物车商品数量
if (res.success) this.goodsTotal = res.result; if (res.success) this.goodsTotal = res.result;
}); });
if (!this.Cookies.getItem('logo')) { if (!this.Cookies.getItem("logo")) {
getLogo().then(res => { getLogo().then((res) => {
if (res.success) { if (res.success) {
let logoObj = JSON.parse(res.result.settingValue) let logoObj = JSON.parse(res.result.settingValue);
this.Cookies.setItem('logo', logoObj.buyerSideLogo) this.Cookies.setItem("logo", logoObj.buyerSideLogo);
} }
}) });
} else { } else {
this.logoImg = this.Cookies.getItem('logo') this.logoImg = this.Cookies.getItem("logo");
}
} }
},
}; };
</script> </script>
@@ -544,7 +547,7 @@ export default {
width: 70px; width: 70px;
height: 70px; height: 70px;
} }
>div>p { > div > p {
@include content_color($light_content_color); @include content_color($light_content_color);
font-size: 13px; font-size: 13px;
text-align: left; text-align: left;
@@ -567,12 +570,12 @@ export default {
} }
} }
} }
.error-goods{ .error-goods {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
margin-left: -20px; margin-left: -20px;
background-color: rgba($color: #999, $alpha: .5); background-color: rgba($color: #999, $alpha: 0.5);
z-index: 10; z-index: 10;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -603,7 +606,7 @@ export default {
.save-price span { .save-price span {
color: #000; color: #000;
} }
.total-price span { .total-price div {
color: $theme_color; color: $theme_color;
font-size: 20px; font-size: 20px;
} }
@@ -651,23 +654,31 @@ export default {
display: flex; display: flex;
margin-top: 5px; margin-top: 5px;
margin-left: 5px; margin-left: 5px;
>span{ > span {
border: 1px solid $theme_color; border: 1px solid $theme_color;
color: $theme_color; color: $theme_color;
font-size: 12px; font-size: 12px;
border-radius: 2px; border-radius: 2px;
padding: 0 2px; padding: 0 2px;
} }
>p{ > p {
font-size: 12px; font-size: 12px;
margin-left: 10px; margin-left: 10px;
color: #999; color: #999;
} }
} }
.cart-goods-footer > div{
display: flex;
align-items: center;
overflow: hidden;
}
.total-price{
display: flex;
align-items: center;
}
</style> </style>
<style> <style>
.ivu-input-number-input { .ivu-input-number-input {
text-align: center; text-align: center;
} }
</style> </style>

View File

@@ -3,7 +3,7 @@
<BaseHeader></BaseHeader> <BaseHeader></BaseHeader>
<Search></Search> <Search></Search>
<drawer></drawer> <drawer></drawer>
<ShopHeader v-if="goodsMsg.data" :detail="goodsMsg.data"></ShopHeader> <ShopHeader :detail="storeMsg"></ShopHeader>
<div class="shop-item-path"> <div class="shop-item-path">
<div class="shop-nav-container"> <div class="shop-nav-container">
<Breadcrumb> <Breadcrumb>
@@ -11,8 +11,9 @@
<BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem> <BreadcrumbItem v-for="(item, index) in categoryBar" :to="goGoodsList(index)" target="_blank" :key="index">{{item.name}}</BreadcrumbItem>
</Breadcrumb> </Breadcrumb>
<div class="store-collect"> <div class="store-collect">
<span class="mr_10"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></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> <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>
</div> </div>
</div> </div>
</div> </div>
@@ -40,6 +41,7 @@ import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
import ShowLikeGoods from '@/components/like'; import ShowLikeGoods from '@/components/like';
import { goodsSkuDetail } from '@/api/goods'; import { goodsSkuDetail } from '@/api/goods';
import { cancelCollect, collectGoods, isCollection } from '@/api/member'; import { cancelCollect, collectGoods, isCollection } from '@/api/member';
import {getDetailById} from '@/api/shopentry'
export default { export default {
name: 'GoodsDetail', name: 'GoodsDetail',
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
@@ -48,20 +50,14 @@ export default {
}, },
created () { created () {
this.getGoodsDetail(); this.getGoodsDetail();
if (this.Cookies.getItem('userInfo')) {
isCollection('STORE', this.goodsMsg.data.storeId).then(res => {
if (res.success && res.result) {
this.storeCollected = true;
}
})
}
}, },
data () { data () {
return { return {
goodsMsg: {}, // 商品信息 goodsMsg: {}, // 商品信息
isLoading: false, // 加载状态 isLoading: false, // 加载状态
categoryBar: [], // 分类 categoryBar: [], // 分类
storeCollected: false // 商品收藏 storeCollected: false, // 商品收藏
storeMsg: {} // 店铺信息
}; };
}, },
methods: { methods: {
@@ -81,8 +77,23 @@ export default {
name: cateName[index] name: cateName[index]
}); });
}); });
console.log(cateArr);
this.categoryBar = cateArr; this.categoryBar = cateArr;
this.goodsMsg = res.result; 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
}
})
} else { } else {
this.$Message.error(res.message) this.$Message.error(res.message)
this.$router.push('/') this.$router.push('/')
@@ -91,7 +102,7 @@ export default {
this.$router.push('/') this.$router.push('/')
}); });
}, },
goGoodsList (currIndex) { goGoodsList (currIndex) { // 跳转商品列表
const arr = [] const arr = []
this.categoryBar.forEach((e, index) => { this.categoryBar.forEach((e, index) => {
if (index <= currIndex) { if (index <= currIndex) {
@@ -132,7 +143,6 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.shop-item-path { .shop-item-path {
height: 38px; height: 38px;
@@ -146,6 +156,7 @@ export default {
padding: 20px 0; padding: 20px 0;
@include white_background_color(); @include white_background_color();
} }
.shop-nav-container { .shop-nav-container {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;

View File

@@ -69,7 +69,7 @@
>人评价 >人评价
</div> </div>
<div class="goods-show-seller"> <div class="goods-show-seller">
<span>{{ item.storeName }}</span> <Tag v-if="item.selfOperated" style="padding:0 4px;" size="small" color="error">自营</Tag><span>{{ item.storeName }}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -9,9 +9,12 @@
<img :src="storeMsg.storeLogo" height="50" alt=""> <img :src="storeMsg.storeLogo" height="50" alt="">
<div> <div>
<p>{{storeMsg.storeName || 'xx店铺'}}</p> <p>{{storeMsg.storeName || 'xx店铺'}}</p>
<p>{{storeMsg.storeDesc || 'xx店铺描述'}}</p> <p class="ellipsis" :alt="storeMsg.storeDesc" v-html="storeMsg.storeDesc"></p>
</div>
<div>
<span class="hover-pointer" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
<span style="width:80px" class="hover-pointer ml_10" @click="connectCs(storeMsg.yzfSign)"><Icon custom="icomoon icon-customer-service" />联系客服</span>
</div> </div>
<div class="store-collect" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</div>
</div> </div>
</div> </div>
<div class="store-category"> <div class="store-category">
@@ -182,15 +185,25 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
background-color: #666; background-color: #666;
padding: 10px; padding: 4px;
color: #fff; color: #fff;
>div{ >div{
display: flex; display: flex;
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
align-items: center; align-items: center;
>div{
img {
width: 80px;
}
>div:nth-child(2){
margin-left: 10px; margin-left: 10px;
flex: 1;
}
>div:nth-child(3){
width: 200px;
} }
} }
img { img {
@@ -201,14 +214,11 @@ export default {
} }
p:nth-child(2){ p:nth-child(2){
font-size: 14px; font-size: 14px;
max-height: 40px;
max-width: 400px;
} }
} }
.store-collect{
margin-left: 20px!important;
&:hover{
cursor: pointer;
}
}
.store-category { .store-category {
background-color: #005aa0; background-color: #005aa0;
color: #fff; color: #fff;

View File

@@ -4,7 +4,7 @@
<Search></Search> <Search></Search>
<cateNav></cateNav> <cateNav></cateNav>
<ul class="category"> <ul class="category">
<li @click="selectCate(cate.id)" v-for="(cate, index) in cateList" :key="index">{{cate.name}}</li> <li @click="selectCate(cate.id)" :class="{'selected-cate': cate.id === params.pointsGoodsCategoryId}" v-for="(cate, index) in cateList" :key="index">{{cate.name}}</li>
</ul> </ul>
<h3 class="promotion-decorate">积分商品</h3> <h3 class="promotion-decorate">积分商品</h3>
<!-- 列表 --> <!-- 列表 -->
@@ -39,6 +39,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="page-size">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
</div>
<BaseFooter></BaseFooter> <BaseFooter></BaseFooter>
</div> </div>
</template> </template>
@@ -56,7 +63,8 @@ export default {
pageNumber: 1, pageNumber: 1,
pageSize: 20, pageSize: 20,
pointsGoodsCategoryId: '' pointsGoodsCategoryId: ''
} },
total: 0 // 商品总数
} }
}, },
mounted () { mounted () {
@@ -69,6 +77,7 @@ export default {
pointGoods(this.params).then(res => { pointGoods(this.params).then(res => {
if (res.success) { if (res.success) {
this.goodsList = res.result.records this.goodsList = res.result.records
this.total = res.result.total
} }
}) })
}, },
@@ -79,10 +88,26 @@ export default {
} }
}) })
}, },
selectCate (id) { selectCate (id) { // 选择商品分类
this.params.pointsGoodsCategoryId = id this.params.pointsGoodsCategoryId = id
this.getList() this.getList()
this.$router.push({query: {categoryId: id}}) this.$router.push({query: {categoryId: id}})
},
goGoodsDetail (skuId, goodsId) { // 跳转商品详情
let routerUrl = this.$router.resolve({
path: '/goodsDetail',
query: {skuId, goodsId, way: 'POINT'}
})
window.open(routerUrl.href, '_blank')
},
changePageNum (val) { // 修改页码
this.params.pageNumber = val;
this.getList()
},
changePageSize (val) { // 修改页数
this.pageNumber = 1;
this.params.pageSize = val;
this.getList()
} }
} }
} }
@@ -104,8 +129,19 @@ export default {
margin: 0 10px; margin: 0 10px;
&:hover{ &:hover{
cursor: pointer; cursor: pointer;
color: $theme_color;
} }
} }
.selected-cate{
color: $theme_color;
}
}
.page-size {
width: 1200px;
margin: 10px auto;
display: flex;
justify-content: flex-end;
} }
.promotion-decorate::before,.promotion-decorate::after{ .promotion-decorate::before,.promotion-decorate::after{
background-image: url('../../static/sprite@2x.png'); background-image: url('../../static/sprite@2x.png');

View File

@@ -34,33 +34,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="other-user-buy-box">
<div class="other-user-buy-title">
<p>可以顺便看下其他商品哦 ~</p>
</div>
<div class="other-user-buy-row" v-for="(items,index1) in recommend" :key="index1">
<div class="other-user-buy-item-box" v-for="(item,index2) in items" :key="index2">
<div class="other-user-buy-item-img">
<a href="item_detail.html"><img :src="item.img" alt=""></a>
</div>
<div class="other-buy-detail-box">
<div class="other-buy-title">
<a href="item_detail.html">
<p>{{item.intro}}</p>
</a>
</div>
<div class="other-buy-price">
<p>{{item.price}}</p>
</div>
<div class="other-buy-btn-box">
<router-link to="/goodsDetail">
<button class="other-buy-btn"><Icon type="ios-cart"></Icon> 加入购物车</button>
</router-link>
</div>
</div>
</div>
</div>
</div> -->
<BaseFooter></BaseFooter> <BaseFooter></BaseFooter>
</div> </div>
</template> </template>

View File

@@ -1,15 +1,14 @@
<template> <template>
<div class="login"> <div class="login">
<div style="height:50px;"></div>
<!-- 顶部logo --> <!-- 顶部logo -->
<div class="top-content">
<div class="logo-box"> <div class="logo-box">
<img <img
src="../assets/images/logo1.png" :src="logoImg" width='150'
@click="$router.push('/')" @click="$router.push('/')"
/> />
<div>修改密码</div> <div>修改密码</div>
</div> </div>
</div>
<div class="login-container"> <div class="login-container">
<!-- 验证手机号 --> <!-- 验证手机号 -->
<Form <Form
@@ -93,13 +92,13 @@
</div> </div>
<div class="foot"> <div class="foot">
<Row type="flex" justify="space-around" class="help"> <Row type="flex" justify="space-around" class="help">
<a class="item" href="https://lilishop.com" target="_blank">帮助</a> <a class="item" href="https://pickmall.cn/" target="_blank">帮助</a>
<a class="item" href="https://lilishop.com" target="_blank">隐私</a> <a class="item" href="https://pickmall.cn/" target="_blank">隐私</a>
<a class="item" href="https://lilishop.com" target="_blank">条款</a> <a class="item" href="https://pickmall.cn/" target="_blank">条款</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © 2020 - Present
<a href="http://lili.cn" target="_blank" style="margin: 0 5px" <a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
>lili-shop</a >lili-shop</a
> >
版权所有 版权所有
@@ -119,6 +118,7 @@ export default {
components: { Verify }, components: { Verify },
data () { data () {
return { return {
logoImg: '', // logo图
loading: false, // 加载状态 loading: false, // 加载状态
loading1: false, // 第二步加载状态 loading1: false, // 第二步加载状态
formFirst: { // 手机验证码表单 formFirst: { // 手机验证码表单
@@ -242,35 +242,23 @@ export default {
}, },
mounted () { mounted () {
this.$refs.formFirst.resetFields(); this.$refs.formFirst.resetFields();
this.logoImg = this.Cookies.getItem('logo')
}, },
watch: { watch: {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.login { .logo-box {
height: 100%; width: 600px;
}
.top-content {
width: 100%;
height: 80px;
position: relative;
z-index: 1;
box-shadow: 0 1px 1px #ddd;
background-color: #fff;
.logo-box {
width: 80%;
max-width: 1200px;
height: 80px; height: 80px;
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
align-items: center; align-items: center;
img { img {
width: 200px; width: 150px;
cursor: pointer; cursor: pointer;
} }
}
div { div {
font-size: 20px; font-size: 20px;
margin-top: 10px; margin-top: 10px;
@@ -278,22 +266,23 @@ export default {
} }
.login-container { .login-container {
border-top: 2px solid $theme_color;
position: relative; position: relative;
margin: 10px auto; margin: 0 auto;
width: 1200px; width: 600px;
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px 150px;
.login-btn{ .login-btn{
position: absolute; position: absolute;
right: 20px; right: 20px;
top: 20px; top: -45px;
} }
} }
.verify-con{ .verify-con{
position: absolute; position: absolute;
left: 400px; left: 140px;
top: 50px; top: -30px;
z-index: 10; z-index: 10;
} }

View File

@@ -25,13 +25,6 @@
<script> <script>
export default { export default {
name: 'AccountBind', name: 'AccountBind',
data () {
return {}
},
mounted () {
},
methods: {}
} }
</script> </script>

View File

@@ -1,7 +1,6 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<card _Title="账户安全"/> <card _Title="账户安全"/>
<div class="safeList"> <div class="safeList">
<!-- 密码 --> <!-- 密码 -->
<Row class="safeItem"> <Row class="safeItem">
@@ -16,102 +15,11 @@
<Button @click="modifyPwd">修改密码</Button> <Button @click="modifyPwd">修改密码</Button>
</Col> </Col>
</Row> </Row>
<!-- 邮箱 -->
<!-- <Row class="safeItem">
<Col :span="2">
<Icon size="40" type="md-mail" />
</Col>
<Col :span="16">
<div class="setDivItem">
邮箱验证
</div>
<div class="setDivItem " v-if="true">
您的验证邮箱<span>xxxxx</span>
</div>
<div class="setDivItem " v-else>
</div>
</Col>
<Col :span="4">
<Button>修改邮箱</Button>
</Col>
</Row> -->
<!-- 手机验证 -->
<!-- <Row class="safeItem">
<Col :span="2">
<Icon size="40" type="ios-phone-portrait" />
</Col>
<Col :span="16">
<div class="setDivItem">
手机验证
</div>
<div class="setDivItem " v-if="true">
您的手机号<span>xxxxx</span>
</div>
<div class="setDivItem " v-else>
</div>
</Col>
<Col :span="4">
<Button>立即验证</Button>
</Col>
</Row> -->
<!-- 支付密码 -->
<!-- <Row class="safeItem">
<Col :span="2">
<Icon size="40" type="md-lock" />
</Col>
<Col :span="16">
<div class="setDivItem">
支付密码
</div>
<div class="setDivItem " v-if="true">
安全认证<span>xxxxx</span>
</div>
<div class="setDivItem " v-else>
</div>
</Col>
<Col :span="4">
<Button @click="goModifyPwd" v-if="pwdStatus == '设置密码'" type="error">{{pwdStatus}}</Button>
<Dropdown style="margin-left: 20px" v-if="pwdStatus == '修改密码'" @on-click="selectPwd">
<Button type="primary">
修改密码
<Icon type="ios-arrow-down"></Icon>
</Button>
<DropdownMenu slot="list" on-click="selectPwd">
<DropdownItem name = "1">修改密码</DropdownItem>
<DropdownItem name = "2">重置密码</DropdownItem>
</DropdownMenu>
</Dropdown>
</Col>
</Row> -->
<!-- 实名 -->
<!-- <Row class="safeItem">
<Col :span="2">
<Icon size="40" type="md-card" />
</Col>
<Col :span="16">
<div class="setDivItem">
实名认证
</div>
<div class="setDivItem " v-if="true">
已认证<span>xxxxx</span>
</div>
<div class="setDivItem " v-else>
您还未实名认证该账户立即实名认证可加快提现速度
</div>
</Col>
<Col :span="4">
<Button>立即认证</Button>
</Col>
</Row> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import card from '@/components/card'
import { import {
getPwdStatus getPwdStatus
} from '@/api/account'; } from '@/api/account';
@@ -122,7 +30,6 @@ export default {
pwdStatus: '' // 密码状态 pwdStatus: '' // 密码状态
} }
}, },
components: {card},
mounted () { mounted () {
this.getPwdStatus() this.getPwdStatus()
}, },
@@ -131,10 +38,7 @@ export default {
goModifyPwd () { goModifyPwd () {
this.$router.push({name: 'ModifyPwd', query: { status: 2 }}) this.$router.push({name: 'ModifyPwd', query: { status: 2 }})
}, },
selectPwd (value) { modifyPwd () { // 修改密码
this.$router.push({name: 'ModifyPwd', query: { status: value }})
},
modifyPwd () {
this.$router.push({name: 'ModifyPwd', query: { status: 1 }}) this.$router.push({name: 'ModifyPwd', query: { status: 1 }})
}, },
// 获取密码状态 // 获取密码状态

View File

@@ -18,7 +18,7 @@
<div class="title order-item-title"> <div class="title order-item-title">
<span>订单号:{{item.orderNo}}</span> <span>订单号:{{item.orderNo}}</span>
<span class="color999 ml_10">{{item.createTime}}</span> <span class="color999 ml_10">{{item.createTime}}</span>
<span class="hover-pointer fontsize_12 eval-detail" @click="evaluate(item.id)">评价详情</span> <span class="hover-pointer fontsize_12 eval-detail" @click="evaluateDetail(item.id)">评价详情</span>
</div> </div>
<Row class="order-item-view"> <Row class="order-item-view">
<i-col span="12" class="item-view-name"> <i-col span="12" class="item-view-name">
@@ -80,7 +80,7 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getList () { getList () { // 获取评价列表
evolutionList(this.params).then(res => { evolutionList(this.params).then(res => {
if (res.success) { if (res.success) {
const list = res.result.records; const list = res.result.records;
@@ -92,19 +92,16 @@ export default {
} }
}) })
}, },
changePageNum (val) { changePageNum (val) { // 修改页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { // 修改页数
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()
}, },
changeIndex (index) { evaluateDetail (id) { // 跳转评价详情
console.log(index);
},
evaluate (id) {
this.$router.push({path: '/home/evalDetail', query: { id }}) this.$router.push({path: '/home/evalDetail', query: { id }})
} }
} }
@@ -112,6 +109,10 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page-size {
display: flex;
justify-content: flex-end;
}
.order-img { .order-img {
> img { > img {
width: 60px; width: 60px;

View File

@@ -141,23 +141,23 @@ export default {
} }
}, },
methods: { methods: {
getDetail () { getDetail () { // 获取投诉详情
getComplainDetail(this.$route.query.id).then(res => { getComplainDetail(this.$route.query.id).then(res => {
if (res.success) this.detail = res.result if (res.success) this.detail = res.result
}) })
}, },
goGoodsDetail (skuId, goodsId) { goGoodsDetail (skuId, goodsId) { // 跳转商品详情
let routerUrl = this.$router.resolve({ let routerUrl = this.$router.resolve({
path: '/goodsDetail', path: '/goodsDetail',
query: {skuId, goodsId} query: {skuId, goodsId}
}) })
window.open(routerUrl.href, '_blank') window.open(routerUrl.href, '_blank')
}, },
handleView (name) { handleView (name) { // 预览图片
this.previewImage = name; this.previewImage = name;
this.visible = true; this.visible = true;
}, },
// 回复 // 回复消息
handleSubmit () { handleSubmit () {
if (this.params.content === '') { if (this.params.content === '') {
this.$Message.error('请填写对话内容'); this.$Message.error('请填写对话内容');

View File

@@ -18,7 +18,7 @@
<div class="title order-item-title"> <div class="title order-item-title">
<span>投诉单号:{{item.id}}</span> <span>投诉单号:{{item.id}}</span>
<span class="color999 ml_10">{{item.createTime}}</span> <span class="color999 ml_10">{{item.createTime}}</span>
<span class="hover-pointer fontsize_12 eval-detail" @click="detail(item.id)">投诉详情</span> <span class="hover-pointer fontsize_12 eval-detail" @click="goDetail(item.id)">投诉详情</span>
<span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'" @click="cancel(item.id)">取消投诉</span> <span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus != 'EXPIRED' && item.complainStatus != 'CANCEL'" @click="cancel(item.id)">取消投诉</span>
</div> </div>
<Row class="order-item-view"> <Row class="order-item-view">
@@ -93,7 +93,7 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getList () { getList () { // 获取投诉列表
complainList(this.params).then(res => { complainList(this.params).then(res => {
if (res.success) { if (res.success) {
const list = res.result.records; const list = res.result.records;
@@ -102,16 +102,16 @@ export default {
} }
}) })
}, },
changePageNum (val) { changePageNum (val) { // 改变页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { // 改变页数
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()
}, },
cancel (id) { cancel (id) { // 取消投诉
this.$Modal.confirm({ this.$Modal.confirm({
title: '取消投诉', title: '取消投诉',
content: '<p>确定取消投诉吗?</p>', content: '<p>确定取消投诉吗?</p>',
@@ -126,7 +126,7 @@ export default {
onCancel: () => { } onCancel: () => { }
}); });
}, },
detail (id) { goDetail (id) { // 跳转投诉详情
this.$router.push({path: '/home/complainDetail', query: { id }}) this.$router.push({path: '/home/complainDetail', query: { id }})
} }
} }

View File

@@ -213,7 +213,7 @@ export default {
this.distribution() this.distribution()
}, },
methods: { methods: {
apply () { apply () { // 申请成为分销商
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
this.applyLoading = true this.applyLoading = true
@@ -239,10 +239,10 @@ export default {
} }
}) })
}, },
qrcodeData (data64) { qrcodeData (data64) { // 二维码base64地址
this.base64Img = data64 this.base64Img = data64
}, },
downloadQrcode () { downloadQrcode () { // 下载二维码
let a = document.createElement('a'); // 生成一个a元素 let a = document.createElement('a'); // 生成一个a元素
let event = new MouseEvent('click'); // 创建一个单击事件 let event = new MouseEvent('click'); // 创建一个单击事件
a.download = this.goodsNameCurr || 'photo' a.download = this.goodsNameCurr || 'photo'
@@ -265,11 +265,11 @@ export default {
this.getLog() this.getLog()
} }
}, },
changePage (val) { changePage (val) { // 修改页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getGoodsData() this.getGoodsData()
}, },
changePageLog (val) { changePageLog (val) { // 修改页码 日志
this.logParams.pageNumber = val; this.logParams.pageNumber = val;
this.getLog() this.getLog()
}, },

View File

@@ -30,13 +30,13 @@
</div> </div>
<empty v-else /> <empty v-else />
<!-- 分页 --> <!-- 分页 -->
<div class="page-size mt_10" v-if="paging"> <!-- <div class="page-size mt_10" v-if="paging">
<Page :total="total" @on-change="changePageNum" <Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize" @on-page-size-change="changePageSize"
:page-size="params.pageSize" :page-size="params.pageSize"
show-sizer> show-sizer>
</Page> </Page>
</div> </div> -->
</div> </div>
</template> </template>
@@ -61,26 +61,26 @@ export default {
total: 0, // 收藏总数 total: 0, // 收藏总数
params: { // 请求参数 params: { // 请求参数
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 100,
type: 'GOODS' type: 'GOODS'
}, },
spinShow: false // 加载状态 spinShow: false // 加载状态
}; };
}, },
methods: { methods: {
getList () { getList () { // 获取收藏列表
this.spinShow = true this.spinShow = true
collectList(this.params).then(res => { collectList(this.params).then(res => {
this.spinShow = false this.spinShow = false
if (res.success) this.list = res.result.records; if (res.success) this.list = res.result.records;
}) })
}, },
change (index) { change (index) { // tab栏切换
if (index === 0) { this.params.type = 'GOODS' } if (index === 0) { this.params.type = 'GOODS' }
if (index === 1) { this.params.type = 'SHOP' } if (index === 1) { this.params.type = 'SHOP' }
this.getList() this.getList()
}, },
cancel (id) { cancel (id) { // 取消收藏
let typeName = this.params.type === 'GOODS' ? '商品' : '店铺' let typeName = this.params.type === 'GOODS' ? '商品' : '店铺'
this.$Modal.confirm({ this.$Modal.confirm({
title: 'Title', title: 'Title',
@@ -94,23 +94,23 @@ export default {
} }
}); });
}, },
changePageNum (val) { changePageNum (val) { // 修改页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { // 修改页数
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()
}, },
buynow (skuId, goodsId) { buynow (skuId, goodsId) { // 跳转详情
let url = this.$router.resolve({ let url = this.$router.resolve({
path: '/goodsDetail', path: '/goodsDetail',
query: {skuId, goodsId} query: {skuId, goodsId}
}) })
window.open(url.href, '_blank') window.open(url.href, '_blank')
}, },
goShop (id) { goShop (id) { // 跳转店铺页面
let url = this.$router.resolve({ let url = this.$router.resolve({
path: '/merchant', path: '/merchant',
query: {id} query: {id}

View File

@@ -78,12 +78,12 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getList () { getList () { // 获取发票列表
receiptList().then(res => { receiptList().then(res => {
this.list = res.result.records; this.list = res.result.records;
}) })
}, },
save () { save () { // 保存发票
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
@@ -105,7 +105,7 @@ export default {
} }
}); });
}, },
resetData () { resetData () { // 重置表单数据
this.$refs.form.resetFields(); this.$refs.form.resetFields();
} }
} }

View File

@@ -99,7 +99,7 @@ export default {
againPassword: '', againPassword: '',
newPassword: '' newPassword: ''
}, },
ruleInLines: { ruleInLines: { // 验证规则
picture: [ picture: [
{required: true, message: '请输入图片验证码', trigger: 'blur'} {required: true, message: '请输入图片验证码', trigger: 'blur'}
], ],
@@ -107,7 +107,7 @@ export default {
{required: true, message: '请输入短信验证码', trigger: 'blur'} {required: true, message: '请输入短信验证码', trigger: 'blur'}
] ]
}, },
ruleIn: { ruleIn: { // 验证规则
newPassword: [ newPassword: [
{required: true, message: '请输入新密码', trigger: 'blur'}, {required: true, message: '请输入新密码', trigger: 'blur'},
{type: 'string', min: 6, message: '密码不能少于6位'} {type: 'string', min: 6, message: '密码不能少于6位'}
@@ -117,7 +117,7 @@ export default {
{type: 'string', min: 6, message: '密码不能少于6位'} {type: 'string', min: 6, message: '密码不能少于6位'}
] ]
}, },
ruleInline: { ruleInline: { // 验证规则
password: [ password: [
{required: true, message: '请输入旧密码', trigger: 'blur'} {required: true, message: '请输入旧密码', trigger: 'blur'}
], ],

View File

@@ -63,7 +63,7 @@ export default {
this.getPoint() this.getPoint()
}, },
methods: { methods: {
getHistory () { getHistory () { // 获取积分历史
memberPointHistory(this.params).then(res => { memberPointHistory(this.params).then(res => {
this.logData = res.result; this.logData = res.result;
}) })
@@ -73,11 +73,11 @@ export default {
if (res.success) this.pointObj = res.result if (res.success) this.pointObj = res.result
}) })
}, },
changePage (val) { changePage (val) { // 修改页码
this.pageNumber = val this.pageNumber = val
this.getHistory() this.getHistory()
}, },
changePageSize (val) { changePageSize (val) { // 修改页数
this.param.pageSize = val this.param.pageSize = val
this.params.pageNumber = 1 this.params.pageNumber = 1
this.getHistory() this.getHistory()

View File

@@ -8,7 +8,6 @@
<Upload <Upload
:show-upload-list="false" :show-upload-list="false"
:on-success="handleSuccess" :on-success="handleSuccess"
:before-upload="handleBeforeUpload"
:format="['jpg','jpeg','png']" :format="['jpg','jpeg','png']"
:action="action" :action="action"
:headers="accessToken" :headers="accessToken"
@@ -58,7 +57,7 @@ export default {
this.accessToken.accessToken = storage.getItem('accessToken'); this.accessToken.accessToken = storage.getItem('accessToken');
}, },
methods: { methods: {
save () { save () { // 保存
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
let params = { let params = {
@@ -76,10 +75,9 @@ export default {
} }
}) })
}, },
handleSuccess (res, file) { handleSuccess (res, file) { // 上传成功
this.$set(this.formItem, 'face', res.result) this.$set(this.formItem, 'face', res.result)
}, },
handleBeforeUpload () {}
} }
} }

View File

@@ -88,7 +88,7 @@ export default {
} }
}, },
methods: { methods: {
getOrderDetail () { getOrderDetail () { // 获取订单详情
orderDetail(this.$route.query.sn).then(res => { orderDetail(this.$route.query.sn).then(res => {
this.order = res.result this.order = res.result
this.orderGoods = res.result.orderItems[this.$route.query.index] this.orderGoods = res.result.orderItems[this.$route.query.index]
@@ -96,7 +96,7 @@ export default {
this.orderGoods.uploadList = [] this.orderGoods.uploadList = []
}) })
}, },
save () { save () { // 保存评价
if (!this.form.serviceScore || !this.form.deliveryScore) { if (!this.form.serviceScore || !this.form.deliveryScore) {
this.$Message.warning('物流服务评价不能为空') this.$Message.warning('物流服务评价不能为空')
return false; return false;
@@ -129,26 +129,26 @@ export default {
this.loading = false; this.loading = false;
}) })
}, },
goGoodsDetail (skuId, goodsId) { goGoodsDetail (skuId, goodsId) { // 跳转商品详情
let routerUrl = this.$router.resolve({ let routerUrl = this.$router.resolve({
path: '/goodsDetail', path: '/goodsDetail',
query: {skuId, goodsId} query: {skuId, goodsId}
}) })
window.open(routerUrl.href, '_blank') window.open(routerUrl.href, '_blank')
}, },
handleView (name) { handleView (name) { // 预览图片
this.previewImage = name; this.previewImage = name;
this.visible = true; this.visible = true;
}, },
handleRemove (index) { handleRemove (index) { // 移除图片
this.orderGoods.uploadList.splice(index, 1) this.orderGoods.uploadList.splice(index, 1)
this.$forceUpdate() this.$forceUpdate()
}, },
handleSuccess (res, file) { handleSuccess (res, file) { // 上传成功回调
this.orderGoods.uploadList.push(res.result) this.orderGoods.uploadList.push(res.result)
this.$forceUpdate() this.$forceUpdate()
}, },
handleBeforeUpload () { handleBeforeUpload () { // 上传之前钩子
const check = this.orderGoods.uploadList.length < 10; const check = this.orderGoods.uploadList.length < 10;
if (!check) { if (!check) {
this.$Notice.warning({ this.$Notice.warning({

View File

@@ -65,19 +65,19 @@ export default {
} }
}, },
methods: { methods: {
getDetail () { getDetail () { // 获取评价详情
evaluationDetail(this.$route.query.id).then(res => { evaluationDetail(this.$route.query.id).then(res => {
if (res.success) this.orderGoods = res.result if (res.success) this.orderGoods = res.result
}) })
}, },
goGoodsDetail (skuId, goodsId) { goGoodsDetail (skuId, goodsId) { // 跳转商品详情
let routerUrl = this.$router.resolve({ let routerUrl = this.$router.resolve({
path: '/goodsDetail', path: '/goodsDetail',
query: {skuId, goodsId} query: {skuId, goodsId}
}) })
window.open(routerUrl.href, '_blank') window.open(routerUrl.href, '_blank')
}, },
handleView (name) { handleView (name) { // 预览图片
this.previewImage = name; this.previewImage = name;
this.visible = true; this.visible = true;
} }

View File

@@ -0,0 +1,17 @@
<template>
<div class="msg-list">
会员消息详情
</div>
</template>
<script>
export default {
data() {
return {
detail: {}, // 消息详情
}
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,201 @@
<template>
<div class="msg-list">
<card _Title="我的消息" :_Tabs="status" :_Size="16" @_Change="statusChange"/>
<Table v-if="params.status != 'ALREADY_REMOVE' " :columns="messageColumns" :data="messageData.records"></Table>
<Table v-if="params.status == 'ALREADY_REMOVE' " :columns="messageDelColumns" :data="messageData.records"></Table>
<!-- 分页 -->
<Page
style="float:right;margin-top:10px"
:current="params.pageNumber"
:total="messageData.total"
:page-size="params.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
></Page>
</div>
</template>
<script>
import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
export default {
data() {
return {
messageData: {}, // 消息数据
status: ['未读', '已读', '回收站'],
params: { // 请求参数
pageNumber: 1,
pageSize: 10,
status: 'UN_READY'
},
messageDelColumns: [ // table展示数据
{
title: '消息标题',
key: 'title',
align: 'left',
tooltip: true,
},
{
title: '消息内容',
key: 'content',
align: 'left',
tooltip: true
},
{
title: '发送时间',
key: 'createTime',
align: 'left',
width: 240
},
],
messageColumns: [ // table展示数据
{
title: '消息标题',
key: 'title',
align: 'left',
tooltip: true,
},
{
title: '消息内容',
key: 'content',
align: 'left',
tooltip: true
},
{
title: '发送时间',
key: 'createTime',
align: 'left',
width: 240
},
{
title: '操作',
key: 'action',
align: 'center',
fixed: 'right',
width: 150,
render: (h, params) => {
if (params.row.status === 'UN_READY') {
return h('div', [
h(
'Button',
{
props: {
type: 'info',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.setRead(params.row.id);
}
}
},
'已读'
), h(
'Button',
{
props: {
size: 'small',
type: 'error'
},
on: {
click: () => {
this.removeMessage(params.row.id);
}
}
},
'删除'
)
]);
} else if (params.row.status === 'ALREADY_READY') {
return h('div', [
h(
'Button',
{
props: {
size: 'small',
type: 'error'
},
on: {
click: () => {
this.removeMessage(params.row.id);
}
}
},
'删除'
)
]);
} else {
}
}
}
]
}
},
methods: {
// 消息状态发生变化
statusChange (index) {
if (index === 0) { this.params.status = 'UN_READY' }
if (index === 1) { this.params.status = 'ALREADY_READY' }
if (index === 2) { this.params.status = 'ALREADY_REMOVE' }
this.getList()
},
// 修改页码
changePage (v) {
this.params.pageNumber = v;
this.getList();
},
// 修改页数
changePageSize (v) {
this.params.pageSize = v;
this.getList();
},
getList () { // 获取消息列表
memberMsgList(this.params).then(res => {
if (res.success) {
this.messageData = res.result;
}
})
},
// 设置消息已读
setRead (id) {
readMemberMsg(id).then(res => {
if (res.success) {
this.getList()
}
})
},
// 消息放入回收站
removeMessage (id) {
this.$Modal.confirm({
title: '确认删除',
// 记得确认修改此处
content: '确认要删除此消息?',
loading: true,
onOk: () => {
// 删除
delMemberMsg(id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success('消息已成功放入回收站');
this.getList();
}
});
},
});
}
},
mounted () {
this.getList()
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -79,7 +79,7 @@ export default {
}; };
}, },
methods: { methods: {
save () { save () { // 保存地址
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const params = JSON.parse(JSON.stringify(this.formData)); const params = JSON.parse(JSON.stringify(this.formData));

View File

@@ -133,7 +133,7 @@ export default {
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, '_blank');
}, },
getList () { getList () { // 获取售后列表
this.spinShow = true; this.spinShow = true;
let params = JSON.parse(JSON.stringify(this.params)) let params = JSON.parse(JSON.stringify(this.params))
afterSaleList(params).then(res => { afterSaleList(params).then(res => {
@@ -144,11 +144,11 @@ export default {
} }
}); });
}, },
changePageNum (val) { changePageNum (val) { // 修改页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { // 修改页数
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()

View File

@@ -44,6 +44,12 @@
</tr> </tr>
</table> </table>
</div> </div>
<div class="order-card" v-if="afterSale.afterSaleImage">
<h3 class="mb_10">图片信息</h3>
<div v-for="img in afterSale.afterSaleImage.split(',')" :key="img">
<img :src="img" width="200" height="200" @click="perviewImg(img)" class="hover-pointer" alt="">
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
@@ -75,7 +81,7 @@ export default {
} }
}) })
}, },
getLog () { getLog () { // 获取售后日志
afterSaleLog(this.$route.query.sn).then(res => { afterSaleLog(this.$route.query.sn).then(res => {
this.logList = res.result; this.logList = res.result;
}) })
@@ -83,6 +89,9 @@ export default {
filterOrderStatus (status) { // 获取订单状态中文 filterOrderStatus (status) { // 获取订单状态中文
const ob = this.afterSaleStatusList.filter(e => { return e.status === status }); const ob = this.afterSaleStatusList.filter(e => { return e.status === status });
return ob[0].name return ob[0].name
},
perviewImg (img) {
window.open(img, '_blank')
} }
}, },
mounted () { mounted () {

View File

@@ -16,11 +16,11 @@
</template> </template>
</Table> </Table>
<div> <div>
<Form :model="form" ref="form" :rules="rules" :label-width="80"> <Form :model="form" ref="form" class="mt_10" :rules="rules" :label-width="80">
<FormItem label="售后类别"> <FormItem label="售后类别">
<RadioGroup v-model="form.serviceType" @on-change="changeReason" type="button" button-style="solid"> <RadioGroup v-model="form.serviceType" @on-change="changeReason" type="button" button-style="solid">
<Radio label="RETURN_GOODS">退货</Radio> <Radio v-if="info.returnGoods" label="RETURN_GOODS">退货</Radio>
<Radio label="RETURN_MONEY">退款</Radio> <Radio v-if="info.returnMoney" label="RETURN_MONEY">退款</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem label="提交数量" prop="num"> <FormItem label="提交数量" prop="num">
@@ -139,23 +139,27 @@ export default {
} }
}, },
methods: { methods: {
getInfo () { getInfo () { // 获取售后信息
afterSaleInfo(this.$route.query.sn).then(res => { afterSaleInfo(this.$route.query.sn).then(res => {
if (res.success) { if (res.success) {
this.info = res.result this.info = res.result
this.goodsData.push(res.result) this.goodsData.push(res.result)
if (!this.info.returnGoods && this.info.returnMoney) {
this.form.serviceType = 'RETURN_MONEY'
}
this.getReason(this.form.serviceType)
} }
}) })
}, },
getReason (type) { getReason (type) { // 获取售后原因
afterSaleReason(type).then(res => { afterSaleReason(type).then(res => {
if (res.success) this.reasonList = res.result if (res.success) this.reasonList = res.result
}) })
}, },
changeReason (type) { changeReason (type) { // 改变售后原因列表
this.getReason(type) this.getReason(type)
}, },
apply () { apply () { // 售后申请提交
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
let params = Object.assign(this.info, this.form) let params = Object.assign(this.info, this.form)
@@ -170,19 +174,19 @@ export default {
} }
}) })
}, },
handleView (name) { handleView (name) { // 预览图片
this.previewImage = name; this.previewImage = name;
this.visible = true; this.visible = true;
}, },
handleRemove (index) { handleRemove (index) { // 移除图片
this.uploadList.splice(index, 1) this.uploadList.splice(index, 1)
this.$forceUpdate() this.$forceUpdate()
}, },
handleSuccess (res, file) { handleSuccess (res, file) { // 上传成功回调
this.uploadList.push(res.result) this.uploadList.push(res.result)
this.$forceUpdate() this.$forceUpdate()
}, },
handleBeforeUpload () { handleBeforeUpload () { // 上传之前钩子函数
const check = this.uploadList.length < 6; const check = this.uploadList.length < 6;
if (!check) { if (!check) {
this.$Notice.warning({ this.$Notice.warning({
@@ -195,7 +199,6 @@ export default {
mounted () { mounted () {
this.accessToken.accessToken = storage.getItem('accessToken'); this.accessToken.accessToken = storage.getItem('accessToken');
this.getInfo() this.getInfo()
this.getReason('RETURN_GOODS')
} }
} }
</script> </script>

View File

@@ -78,7 +78,7 @@ export default {
} }
}, },
methods: { methods: {
getOrderDetail () { getOrderDetail () { // 获取订单详情
orderDetail(this.$route.query.sn).then(res => { orderDetail(this.$route.query.sn).then(res => {
this.order = res.result this.order = res.result
this.orderGoods = res.result.orderItems[this.$route.query.index] this.orderGoods = res.result.orderItems[this.$route.query.index]
@@ -92,7 +92,7 @@ export default {
} }
}) })
}, },
save () { save () { // 提交投诉信息
let params = { let params = {
goodsId: this.orderGoods.goodsId, goodsId: this.orderGoods.goodsId,
complainTopic: this.form.complainTopic, complainTopic: this.form.complainTopic,
@@ -108,26 +108,26 @@ export default {
} }
}) })
}, },
goGoodsDetail (skuId, goodsId) { goGoodsDetail (skuId, goodsId) { // 跳转商品详情
let routerUrl = this.$router.resolve({ let routerUrl = this.$router.resolve({
path: '/goodsDetail', path: '/goodsDetail',
query: {skuId, goodsId} query: {skuId, goodsId}
}) })
window.open(routerUrl.href, '_blank') window.open(routerUrl.href, '_blank')
}, },
handleView (name) { handleView (name) { // 预览图片
this.previewImage = name; this.previewImage = name;
this.visible = true; this.visible = true;
}, },
handleRemove (index) { handleRemove (index) { // 移除图片
this.orderGoods.uploadList.splice(index, 1) this.orderGoods.uploadList.splice(index, 1)
this.$forceUpdate() this.$forceUpdate()
}, },
handleSuccess (res, file) { handleSuccess (res, file) { // 上传成功回调
this.orderGoods.uploadList.push(res.result) this.orderGoods.uploadList.push(res.result)
this.$forceUpdate() this.$forceUpdate()
}, },
handleBeforeUpload () { handleBeforeUpload () { // 上传之前钩子函数
const check = this.orderGoods.uploadList.length < 6; const check = this.orderGoods.uploadList.length < 6;
if (!check) { if (!check) {
this.$Notice.warning({ this.$Notice.warning({

View File

@@ -29,7 +29,6 @@
<div>{{ filterOrderStatus(order.orderStatus) }}</div> <div>{{ filterOrderStatus(order.orderStatus) }}</div>
<div> <div>
订单号{{ order.sn }} &nbsp; &nbsp; &nbsp;{{order.createTime}} 订单号{{ order.sn }} &nbsp; &nbsp; &nbsp;{{order.createTime}}
&nbsp; &nbsp;{{ order.memberName | secrecyMobile }}
</div> </div>
</div> </div>
<div> <div>
@@ -240,7 +239,7 @@ export default {
complainResult (sn) { // 投诉结果 complainResult (sn) { // 投诉结果
}, },
delOrder (sn) { delOrder (sn) { // 删除订单
this.$Modal.confirm({ this.$Modal.confirm({
title: '删除订单', title: '删除订单',
content: '<p>确认删除当前订单吗?</p>', content: '<p>确认删除当前订单吗?</p>',
@@ -255,7 +254,7 @@ export default {
onCancel: () => {} onCancel: () => {}
}); });
}, },
getList () { getList () { // 获取订单列表
this.spinShow = true; this.spinShow = true;
let params = JSON.parse(JSON.stringify(this.params)) let params = JSON.parse(JSON.stringify(this.params))
if (params.orderStatus === 'ALL') { if (params.orderStatus === 'ALL') {
@@ -269,11 +268,11 @@ export default {
} }
}); });
}, },
changePageNum (val) { changePageNum (val) { // 修改页码
this.params.pageNumber = val; this.params.pageNumber = val;
this.getList() this.getList()
}, },
changePageSize (val) { changePageSize (val) { // 修改页数
this.pageNumber = 1; this.pageNumber = 1;
this.params.pageSize = val; this.params.pageSize = val;
this.getList() this.getList()
@@ -289,7 +288,7 @@ export default {
} }
}) })
}, },
sureCancel () { sureCancel () { // 确定取消
cancelOrder(this.cancelParams).then(res => { cancelOrder(this.cancelParams).then(res => {
if (res.success) { if (res.success) {
this.$Message.success('取消订单成功') this.$Message.success('取消订单成功')

View File

@@ -2,7 +2,7 @@
<div class="order-detail" v-if="order.order"> <div class="order-detail" v-if="order.order">
<card _Title="订单详情" :_Size="16"></card> <card _Title="订单详情" :_Size="16"></card>
<div class="order-card"> <div class="order-card">
<p class="global_color fontsize_18">{{ order.orderStatusValue }}</p> <p class="global_color fontsize_18">{{ order.orderStatusValue }} <span class="verificationCode" v-if="order.order.verificationCode">核验码{{order.order.verificationCode}}</span></p>
<p class="global_color">订单号{{ order.order.sn }}</p> <p class="global_color">订单号{{ order.order.sn }}</p>
<div style="color:#999;" class="operation-time">操作时间{{order.order.updateTime}}</div> <div style="color:#999;" class="operation-time">操作时间{{order.order.updateTime}}</div>
<Steps class="progress" :current="progressList.length" direction="vertical"> <Steps class="progress" :current="progressList.length" direction="vertical">
@@ -22,8 +22,8 @@
</div> </div>
<div class="order-card"> <div class="order-card">
<h3>付款信息</h3> <h3>付款信息</h3>
<p>支付方式在线支付</p> <p>支付方式{{order.paymentMethodValue}}</p>
<p>付款状态未付款</p> <p>付款状态{{order.payStatusValue}}</p>
</div> </div>
<div class="order-card"> <div class="order-card">
<h3>配送信息</h3> <h3>配送信息</h3>
@@ -128,7 +128,7 @@ export default {
} }
}) })
}, },
traces () { traces () { // 物流信息
getTraces(this.$route.query.sn).then(res => { getTraces(this.$route.query.sn).then(res => {
if (res.success) { if (res.success) {
this.logistics = res.result this.logistics = res.result
@@ -234,7 +234,12 @@ table {
font-size: 20px; font-size: 20px;
} }
} }
.verificationCode {
font-size: 16px;
margin-left: 240px;
color: rgb(65, 63, 63);
font-weight: bold;
}
/** 订单进度条 */ /** 订单进度条 */
.progress { .progress {
margin: 15px 0; margin: 15px 0;

View File

@@ -188,10 +188,10 @@ export default {
}, },
formValidate: { formValidate: {
price: [ price: [
{ required: true, message: '请输入大于0小于9999的合法充值金额' }, { required: true, message: '请输入大于等于1小于9999的合法充值金额' },
{ {
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/, pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
message: '请输入大于0小于9999的合法充值金额', message: '请输入大于等于1小于9999的合法充值金额',
trigger: 'change' trigger: 'change'
} }
] ]
@@ -200,11 +200,13 @@ export default {
logColumns: [ logColumns: [
{ {
title: '时间', title: '时间',
width: 190,
key: 'createTime' key: 'createTime'
}, },
{ {
title: '金额', title: '金额',
key: 'money', key: 'money',
width: 180,
render: (h, params) => { render: (h, params) => {
if (params.row.money > 0) { if (params.row.money > 0) {
return h('div', [ return h('div', [
@@ -215,7 +217,7 @@ export default {
color: 'green' color: 'green'
} }
}, },
params.row.money this.$options.filters.unitPrice(params.row.money, '+ ¥')
) )
]); ]);
} else if (params.row.money < 0) { } else if (params.row.money < 0) {
@@ -227,7 +229,7 @@ export default {
color: 'red' color: 'red'
} }
}, },
params.row.money this.$options.filters.unitPrice(0 - params.row.money, '- ¥')
) )
]); ]);
} }
@@ -241,18 +243,30 @@ export default {
logColumnsData: {}, // 余额日志 logColumnsData: {}, // 余额日志
// 充值记录 // 充值记录
rechargeListColumns: [ rechargeListColumns: [
{
title: '充值时间',
key: 'createTime',
width: 168
},
{ {
title: '支付单号', title: '支付单号',
key: 'rechargeSn', key: 'rechargeSn',
width: 200 width: 200
}, },
{
title: '支付方式',
key: 'rechargeWay'
},
{ {
title: '充值金额', title: '充值金额',
key: 'rechargeMoney' key: 'rechargeMoney',
render: (h, params) => {
if (params.row.payStatus === 'PAID') {
return h('div', [h('span', {
style: {
color: 'green'
}
}, this.$options.filters.unitPrice(params.row.rechargeMoney, '+ ¥'))]);
} else {
return h('div', [h('span', this.$options.filters.unitPrice(params.row.rechargeMoney, '¥'))]);
}
}
}, },
{ {
title: '支付状态', title: '支付状态',
@@ -265,27 +279,60 @@ export default {
} }
} }
}, },
{
title: '支付方式',
key: 'rechargeWay',
render: (h, params) => {
if (params.row.rechargeWay === 'ALIPAY') {
return h('div', [h('span', {}, '支付宝')]);
} else if (params.row.rechargeWay === 'WECHAT') {
return h('div', [h('span', {}, '微信')]);
} else if (params.row.rechargeWay === 'BANK_TRANSFER') {
return h('div', [h('span', {}, '线下转账')]);
} else {
return h('div', [h('span', {}, '')]);
}
}
},
{ {
title: '支付时间', title: '支付时间',
key: 'payTime' key: 'payTime',
width: 180
} }
], ],
rechargeListData: {}, // 充值记录数据 rechargeListData: {}, // 充值记录数据
// 提现记录 // 提现记录
withdrawApplyColumns: [ withdrawApplyColumns: [
{
title: '申请时间',
key: 'createTime',
width: 168
},
{ {
title: '提现单号', title: '提现单号',
key: 'sn', key: 'sn',
width: 215 width: 200
}, },
{ {
title: '提现金额', title: '提现金额',
key: 'applyMoney', key: 'applyMoney',
width: 120 width: 110,
render: (h, params) => {
if (params.row.applyStatus === 'VIA_AUDITING') {
return h('div', [h('span', {
style: {
color: 'green'
}
}, this.$options.filters.unitPrice(params.row.applyMoney, '+ ¥'))]);
} else {
return h('div', [h('span', this.$options.filters.unitPrice(params.row.applyMoney, '¥'))]);
}
}
}, },
{ {
title: '提现状态', title: '提现状态',
key: 'applyStatus', key: 'applyStatus',
width: 95,
render: (h, params) => { render: (h, params) => {
if (params.row.applyStatus === 'APPLY') { if (params.row.applyStatus === 'APPLY') {
return h('div', [h('span', {}, '申请中')]); return h('div', [h('span', {}, '申请中')]);
@@ -297,12 +344,14 @@ export default {
} }
}, },
{ {
title: '提现时间', title: '审核时间',
key: 'inspectTime' key: 'inspectTime',
width: 168
}, },
{ {
title: '审核备注', title: '审核备注',
key: 'inspectRemark' key: 'inspectRemark'
} }
], ],
withdrawApplyColumnsListData: {} // 提现记录 withdrawApplyColumnsListData: {} // 提现记录
@@ -392,9 +441,10 @@ export default {
if (valid) { if (valid) {
recharge(this.formData).then((res) => { recharge(this.formData).then((res) => {
if (res.message === 'success') { if (res.message === 'success') {
// TODO 根据返回的值跳转到收银台进行支付,一下是输出sn this.$router.push({
console.warn(res.result.rechargeSn); path: '/payment',
this.modal = false; query: { orderType: 'RECHARGE', sn: res.result.rechargeSn }
});
} }
}); });
} }

View File

@@ -15,6 +15,14 @@
</span> </span>
</li> </li>
</ul> </ul>
<!-- 分页 -->
<div class="page-size">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
</div>
</div> </div>
</template> </template>
@@ -25,7 +33,14 @@ export default {
data () { data () {
return { return {
list: [], // 我的足迹,商品列表 list: [], // 我的足迹,商品列表
spinShow: false // 控制loading是否加载 spinShow: false, // 控制loading是否加载
params: {
pageNumber: 1,
pageSize: 30,
order: 'desc',
sort: 'createTime'
},
total: 0
}; };
}, },
mounted () { mounted () {
@@ -71,7 +86,16 @@ export default {
} }
}) })
}, },
getList () { changePageNum (val) { // 修改页码
this.params.pageNumber = val;
this.getList()
},
changePageSize (val) { // 修改页数
this.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
getList () { // 获取足迹列表
this.spinShow = true; this.spinShow = true;
tracksList(this.params).then(res => { tracksList(this.params).then(res => {
this.spinShow = false this.spinShow = false

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,8 @@
</div> </div>
<div class="pay-btn"> <div class="pay-btn">
<Button type="primary" @click="$router.push('/')">继续逛逛</Button> <Button type="primary" @click="$router.push('/')">继续逛逛</Button>
<Button type="info" @click="$router.push('home/myOrder')">查看订单</Button> <Button type="info" v-if="$route.query.orderType ==='RECHARGE'" @click="$router.push('/home/MoneyManagement')">查看余额</Button>
<Button type="info" v-else @click="$router.push('/home/myOrder')">查看订单</Button>
</div> </div>
</div> </div>
</template> </template>

View File

@@ -5,31 +5,64 @@
<div class="head-left"> <div class="head-left">
<div class="left-tips">订单提交成功请尽快付款</div> <div class="left-tips">订单提交成功请尽快付款</div>
<div class="left-tips-time">请您尽快完成支付否则订单会被自动取消</div> <div class="left-tips-time">请您尽快完成支付否则订单会被自动取消</div>
<div class="left-tips-count-down">
<mv-count-down :startTime="startTime" class="count-down"
:endTime="endTime"
:endText="endText"
:dayTxt="'天'"
:hourTxt="'小时'"
:minutesTxt="'分钟'"
:secondsTxt="'秒'"
:isStart="isStart"></mv-count-down>
</div>
</div> </div>
<div class="head-right"> <div class="head-right">
<div>应付金额 <span class="price">{{payDetail.price | unitPrice}}</span></div> <div>应付金额 <span class="price">{{ payDetail.price | unitPrice }}</span></div>
</div> </div>
</div> </div>
<div class="wrapper-box"> <div class="wrapper-box">
<div class="-box-item" @click="handlePay('ALIPAY')"> <div v-if="support.includes('ALIPAY')" class="-box-item" @click="handlePay('ALIPAY')">
<img src="https://ss3.bdstatic.com/yrwDcj7w0QhBkMak8IuT_XF5ehU5bvGh7c50/logopic/a9936a369e82e0c6c42112674a5220e8_fullsize.jpg" alt=""> <img
src="https://ss3.bdstatic.com/yrwDcj7w0QhBkMak8IuT_XF5ehU5bvGh7c50/logopic/a9936a369e82e0c6c42112674a5220e8_fullsize.jpg"
alt="">
<span>支付宝</span> <span>支付宝</span>
</div> </div>
<div class="-box-item" @click="handlePay('WECHAT')"> <div v-if="support.includes('WECHAT')" class="-box-item" @click="handlePay('WECHAT')">
<img src="https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=3774939867,2826752539&fm=74&app=80&f=JPEG&size=f121,121?sec=1880279984&t=796e842a5ef2d16d9edc872d6f1147ef" alt=""> <img
src="https://dss1.bdstatic.com/6OF1bjeh1BF3odCf/it/u=3774939867,2826752539&fm=74&app=80&f=JPEG&size=f121,121?sec=1880279984&t=796e842a5ef2d16d9edc872d6f1147ef"
alt="">
<span>微信</span> <span>微信</span>
</div> </div>
<div v-if="support.includes('WALLET') && $route.query.orderType !== 'RECHARGE'" class="-box-item" @click="handlePay('WALLET')">
<Icon custom="icomoon icon-wallet" size="60"/>
<span>余额支付</span>
<span>当前剩余({{ walletValue | unitPrice('¥') }})</span>
</div>
</div> </div>
<BaseFooter></BaseFooter> <BaseFooter></BaseFooter>
</div> </div>
</template> </template>
<script> <script>
import { tradeDetail } from '@/api/pay.js';
import {tradeDetail, pay} from '@/api/pay.js';
import MvCountDown from 'mv-count-down'
import {Message} from 'view-design';
export default { export default {
components: {
MvCountDown
},
data () { data () {
return { return {
payDetail: {}, // 支付详情 payDetail: {}, // 支付详情
qrcode: '' // 支付二维码 support: [], // 支持配送方式
walletValue: 0, // 当前余额
qrcode: '', // 支付二维码
startTime: new Date().getTime(), // 开始时间(时间戳)
endTime: 0, // 完成的时间(时间戳)
endText: '订单已超时取消', // 倒计时完成的提示文本
isStart: false // 控制倒计时开始的时机(异步请求完成开启)
}; };
}, },
methods: { methods: {
@@ -39,16 +72,46 @@ export default {
tradeDetail(params).then(res => { tradeDetail(params).then(res => {
if (res.success) { if (res.success) {
this.payDetail = res.result; this.payDetail = res.result;
this.endTime = this.payDetail.autoCancel
this.isStart = true
this.support = this.payDetail.support
this.walletValue = this.payDetail.walletValue
} }
}); });
}, },
// 支付
handlePay (way) { handlePay (way) {
// 余额支付则直接跳转
if (way === 'WALLET') {
// 如果待支付金额大于余额,则报错
if (this.payDetail.price > this.walletValue) {
Message.error('余额不足以支付当前订单,如需充值请前往会员中心');
return;
}
}
const params = this.$route.query; const params = this.$route.query;
params.paymentMethod = way; params.paymentMethod = way;
params.paymentClient = 'NATIVE'; params.paymentClient = 'NATIVE';
params.price = this.payDetail.price; params.price = this.payDetail.price;
if (way === 'WALLET') {
this.$Modal.confirm({
title: '支付确认',
content: '<p>确认使用余额支付吗?</p>',
onOk: () => {
pay(params).then(res => {
if (res.success) {
this.$Message.warning(res.message)
this.$router.push('/payDone');
} else {
this.$Message.warning(res.message)
}
})
}
});
} else {
this.$router.push({path: '/qrpay', query: params}); this.$router.push({path: '/qrpay', query: params});
} }
}
}, },
mounted () { mounted () {
this.getTradeDetail(); this.getTradeDetail();
@@ -56,64 +119,83 @@ export default {
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.head-left{ .head-left {
font-weight: bold; font-weight: bold;
} }
.left-tips{
.left-tips {
font-size: 21px; font-size: 21px;
} }
.-box-item{
margin-right: 30px; .-box-item {
display: flex; display: flex;
font-size: 21px; font-size: 18px;
font-weight: bold; font-weight: bold;
align-items: center; align-items: center;
margin: 20px 20px; margin: 20px 20px;
cursor: pointer; cursor: pointer;
@include content_color($light_content_color); @include content_color($light_content_color);
&:hover{color: $theme_color;} &:hover {
color: $theme_color;
>span{
margin-left: 10px;
} }
>img{
> span {
margin-left: 15px;
}
> img {
border-radius: 10px; border-radius: 10px;
width: 60px; width: 60px;
height: 60px; height: 60px;
} }
} }
.left-tips-time{
.left-tips-time {
font-size: 16px; font-size: 16px;
} }
.wrapper-head{
.left-tips-count-down {
font-size: 10px;
color: red;
}
.wrapper-head {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
line-height: 1.75; line-height: 1.75;
} }
.wrapper-head, .wrapper-head,
.wrapper-box { .wrapper-box {
padding: 20px 40px; padding: 20px 40px;
width: 1200px; width: 1200px;
margin: 20px auto; margin: 20px auto;
} }
.wrapper-box { .wrapper-box {
@include white_background_color(); @include white_background_color();
height: auto; height: auto;
display: flex;
} }
.wrapper { .wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.price{
.price {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
color: $theme_color; color: $theme_color;
} }
.head-right{
.head-right {
font-weight: bold; font-weight: bold;
font-size: 18px;
}
.count-down{
font-size: 16px!important;
} }
</style> </style>

View File

@@ -63,6 +63,7 @@ export default {
this.num++; this.num++;
if (this.num >= 7) { if (this.num >= 7) {
clearInterval(this.interval); clearInterval(this.interval);
this.interval = null;
} }
let params = JSON.parse(JSON.stringify(this.$route.query)); let params = JSON.parse(JSON.stringify(this.$route.query));
delete params.paymentMethod; delete params.paymentMethod;
@@ -70,7 +71,8 @@ export default {
payCallback(params).then(res => { payCallback(params).then(res => {
if (res.result) { if (res.result) {
clearInterval(this.interval); clearInterval(this.interval);
this.$router.push('/payDone'); this.interval = null;
this.$router.push({path: '/payDone', query: {orderType: this.$route.query.orderType}});
} }
}); });
} }

View File

@@ -10,7 +10,6 @@
/> />
</FormItem> </FormItem>
<FormItem prop="storeAddressIdPath" label="公司所在地"> <FormItem prop="storeAddressIdPath" label="公司所在地">
<!-- <Input type="text" v-model="form.storeAddressIdPath" placeholder="请选择公司所在地" /> -->
<region <region
style="width: 250px" style="width: 250px"
@selected="selectedRegion" @selected="selectedRegion"
@@ -32,6 +31,13 @@
><span slot="append"></span> ><span slot="append"></span>
</Input> </Input>
</FormItem> </FormItem>
<FormItem prop="linkPhone" label="公司电话">
<Input
type="text"
v-model="form.companyPhone"
placeholder="请填写公司电话"
></Input>
</FormItem>
<FormItem prop="registeredCapital" label="注册资金"> <FormItem prop="registeredCapital" label="注册资金">
<Input <Input
type="text" type="text"

View File

@@ -3,29 +3,17 @@
<div style="height: 20px"></div> <div style="height: 20px"></div>
<div class="content"> <div class="content">
<h3>店铺入驻</h3> <h3>店铺入驻</h3>
<Steps :current="currentIndex" size="small" class="margin"> <Steps :current="currentIndex" class="margin">
<Step title="企业资质信息"></Step> <Step title="企业资质信息"></Step>
<Step title="财务资质信息"></Step> <Step title="财务资质信息"></Step>
<Step title="其他信息"></Step> <Step title="其他信息"></Step>
<Step title="提交审核"></Step> <Step title="提交审核"></Step>
</Steps> </Steps>
<first-apply <first-apply v-if="currentIndex == 0 && dataReview" :content="firstData" @change="nextPage"></first-apply>
v-if="currentIndex == 0 && dataReview"
:content="firstData"
@change="nextPage"
></first-apply>
<second-apply <second-apply v-if="currentIndex == 1 && dataReview" :content="secondData" @change="nextPage"></second-apply>
v-if="currentIndex == 1 && dataReview"
:content="secondData"
@change="nextPage"
></second-apply>
<third-apply <third-apply v-if="currentIndex == 2 && dataReview" :content="thirdData" @change="nextPage"></third-apply>
v-if="currentIndex == 2 && dataReview"
:content="thirdData"
@change="nextPage"
></third-apply>
<div class="success-page" v-if="currentIndex == 3"> <div class="success-page" v-if="currentIndex == 3">
<span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功等待平台审核</span> <span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功等待平台审核</span>
@@ -37,24 +25,14 @@
<Button type="primary" @click='currentIndex = 0' v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button> <Button type="primary" @click='currentIndex = 0' v-if="storeDisable === 'REFUSED' && currentIndex === 3">重新申请</Button>
</div> </div>
<Modal <Modal title="店铺入驻协议" v-model="showAgreement" width="1200" :closable="false" :mask-closable="false">
title="店铺入驻协议"
v-model="showAgreement"
width="1200"
:closable="false"
:mask-closable="false"
>
<div class="agreeent-con" v-html="agreementCon"></div> <div class="agreeent-con" v-html="agreementCon"></div>
<div slot="footer" style="text-align: center"> <div slot="footer" style="text-align: center">
<p><Checkbox v-model="checked">我已同意以上协议</Checkbox></p> <p>
<Button <Checkbox v-model="checked">我已同意以上协议</Checkbox>
type="primary" </p>
:disabled="!checked" <Button type="primary" :disabled="!checked" class="margin" @click="showAgreement = false">同意协议填写资质信息</Button>
class="margin"
@click="showAgreement = false"
>同意协议填写资质信息</Button
>
</div> </div>
</Modal> </Modal>
</div> </div>
@@ -76,7 +54,6 @@ export default {
showAgreement: false, // 协议显示 showAgreement: false, // 协议显示
agreementCon: '', // 协议内容 agreementCon: '', // 协议内容
checked: false, // 选中协议 checked: false, // 选中协议
applyData: {}, // 申请数据
firstData: {}, // 第一步数据 firstData: {}, // 第一步数据
secondData: {}, // 第二步数据 secondData: {}, // 第二步数据
thirdData: {}, // 第三步数据 thirdData: {}, // 第三步数据
@@ -88,11 +65,10 @@ export default {
getArticle () { getArticle () {
// 入驻协议 // 入驻协议
agreement().then((res) => { agreement().then((res) => {
console.log(res); this.agreementCon = res.result.content;
this.agreementCon = res.result;
}); });
}, },
getData () { getData () { // 获取已填写店铺信息
applyStatus().then((res) => { applyStatus().then((res) => {
if (res.success) { if (res.success) {
if (!res.result) { if (!res.result) {
@@ -101,9 +77,9 @@ export default {
this.dataReview = false; this.dataReview = false;
let data = res.result; let data = res.result;
let first = [ let first = [
'addressIdPath', 'storeAddressIdPath',
'addressPath', 'storeAddressPath',
'companyAddress', 'storeAddressDetail',
'companyEmail', 'companyEmail',
'companyName', 'companyName',
'employeeNum', 'employeeNum',
@@ -148,9 +124,12 @@ export default {
} else { } else {
this.currentIndex = 3; this.currentIndex = 3;
} }
this.$nextTick(() => {
this.dataReview = true; this.dataReview = true;
this.$forceUpdate(); this.$forceUpdate();
})
} }
console.log(33333333333333);
} }
}); });
}, },
@@ -160,6 +139,7 @@ export default {
}, },
mounted () { mounted () {
this.getData(); this.getData();
this.getArticle();
} }
}; };
</script> </script>
@@ -181,7 +161,7 @@ export default {
} }
.margin { .margin {
margin: 10px 0; margin: 30px 0;
} }
.agreeent-con { .agreeent-con {
max-height: 500px; max-height: 500px;

View File

@@ -60,17 +60,23 @@
> >
</Select> </Select>
</FormItem> </FormItem>
<FormItem prop="storeCenter" label="经纬度"> <FormItem prop="storeCenter" label="店铺定位">
<Input <!-- <Input
type="text" type="text"
v-model="form.storeCenter" v-model="form.storeCenter"
readonly readonly
placeholder="点击右侧按钮选择店铺位置" placeholder="点击右侧按钮选择店铺位置"
/> /> -->
<Button <Button
icon="ios-locate-outline" type="info"
v-if="!form.storeCenter"
@click="$refs.liliMap.showMap = true" @click="$refs.liliMap.showMap = true"
></Button> >点击获取店铺定位</Button>
<Button
type="success"
v-else
@click="$refs.liliMap.showMap = true"
>已定位</Button>
</FormItem> </FormItem>
<FormItem prop="storeDesc" label="店铺简介"> <FormItem prop="storeDesc" label="店铺简介">
<Input <Input

View File

@@ -15,9 +15,10 @@
> >
<div class="user-icon"> <div class="user-icon">
<div class="user-img"> <div class="user-img">
<img :src="userInfo.face" /> <img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="96" />
</div> </div>
<p>{{userInfo.username | secrecyMobile}}</p> <p>{{userInfo.nickName}}</p>
</div> </div>
<!-- 循环导航栏 --> <!-- 循环导航栏 -->
@@ -125,10 +126,6 @@ export default {
align-items: center; align-items: center;
} }
.user-icon span {
font-size: 96px;
}
.user-img { .user-img {
margin-bottom: 15px; margin-bottom: 15px;
width: 96px; width: 96px;
@@ -137,10 +134,6 @@ export default {
overflow: hidden; overflow: hidden;
} }
.user-img img {
width: 100%;
}
.layout-footer-center { .layout-footer-center {
padding: 0px 15px; padding: 0px 15px;

View File

@@ -41,6 +41,11 @@ const member = [{
title: '账户安全', title: '账户安全',
path: 'AccountSafe' path: 'AccountSafe'
}, },
{
icon: '',
title: '我的消息',
path: 'MsgList'
},
{ {
icon: '', icon: '',
title: '我的足迹', title: '我的足迹',

View File

@@ -1,43 +1,48 @@
// import Vue from 'vue'; // import Vue from 'vue';
import axios from 'axios'; import axios from 'axios';
import https from 'https'; import https from 'https';
import { import { Message, Spin, Modal } from 'view-design';
Message,
Spin,
Modal
} from 'view-design';
import Storage from './storage'; import Storage from './storage';
import config from '@/config'; import config from '@/config';
import router from '../router/index.js'; import router from '../router/index.js';
import store from '../vuex/store'; import store from '../vuex/store';
import { import { handleRefreshToken } from '@/api/index';
handleRefreshToken
} from '@/api/index';
const qs = require('qs'); const qs = require('qs');
export const buyerUrl =
export const buyerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.buyer : config.api_prod.buyer); process.env.NODE_ENV === 'development'
export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common); ? config.api_dev.buyer
export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager); : config.api_prod.buyer;
export const sellerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.seller : config.api_prod.seller); 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;
export const sellerUrl =
process.env.NODE_ENV === 'development'
? config.api_dev.seller
: config.api_prod.seller;
// 创建axios实例 // 创建axios实例
var isRefreshToken = 0; var isRefreshToken = 0;
const refreshToken = getTokenDebounce() const refreshToken = getTokenDebounce();
const service = axios.create({ const service = axios.create({
timeout: 10000, // 请求超时时间 timeout: 10000, // 请求超时时间
baseURL: buyerUrl, // API baseURL: buyerUrl, // API
httpsAgent: new https.Agent({ httpsAgent: new https.Agent({
rejectUnauthorized: false rejectUnauthorized: false
}), }),
paramsSerializer: params => qs.stringify(params, { paramsSerializer: params =>
qs.stringify(params, {
arrayFormat: 'repeat' arrayFormat: 'repeat'
}) })
}); });
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(
const { config => {
loading const { loading } = config;
} = config;
// 如果是put/post请求用qs.stringify序列化参数 // 如果是put/post请求用qs.stringify序列化参数
const isPutPost = config.method === 'put' || config.method === 'post'; const isPutPost = config.method === 'put' || config.method === 'post';
const isJson = config.headers['Content-Type'] === 'application/json'; const isJson = config.headers['Content-Type'] === 'application/json';
@@ -62,43 +67,40 @@ service.interceptors.request.use(config => {
let accessToken = Storage.getItem('accessToken'); let accessToken = Storage.getItem('accessToken');
if (accessToken && config.needToken) { if (accessToken && config.needToken) {
config.headers['accessToken'] = accessToken; config.headers['accessToken'] = accessToken;
// 解析当前token时间
let jwtData = JSON.parse(
decodeURIComponent(escape(window.atob(accessToken.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
);
if (jwtData.exp < Math.round(new Date() / 1000)) {
refresh(config)
} }
}
return config; return config;
}, error => {
Promise.reject(error);
});
// respone拦截器
service.interceptors.response.use(
async response => {
await closeLoading(response);
return response.data;
}, },
async error => { error => {
if (process.server) return Promise.reject(error); Promise.reject(error);
await closeLoading(error); }
const errorResponse = error.response || {}; );
const errorData = errorResponse.data || {};
if (errorResponse.status === 403) { async function refresh (error) {
isRefreshToken++;
if (isRefreshToken === 1) {
const getTokenRes = await refreshToken(); const getTokenRes = await refreshToken();
if (getTokenRes === 'success') { // 刷新token if (getTokenRes === 'success') {
// 刷新token
if (isRefreshToken === 1) { if (isRefreshToken === 1) {
error.response.config.headers.accessToken = Storage.getItem('accessToken') error.response.config.headers.accessToken = Storage.getItem(
return service(error.response.config) 'accessToken'
);
return service(error.response.config);
} else { } else {
router.go(0) router.go(0);
} }
} else { } else {
Storage.removeItem('accessToken'); Storage.removeItem('accessToken');
Storage.removeItem('refreshToken'); Storage.removeItem('refreshToken');
Storage.removeItem('userInfo'); Storage.removeItem('userInfo');
Storage.setItem('cartNum', 0) Storage.setItem('cartNum', 0);
store.commit('SET_CARTNUM', 0) store.commit('SET_CARTNUM', 0);
console.log('1111');
Modal.confirm({ Modal.confirm({
title: '请登录', title: '请登录',
content: '<p>请登录后执行此操作</p>', content: '<p>请登录后执行此操作</p>',
@@ -114,15 +116,41 @@ service.interceptors.response.use(
}); });
}, },
onCancel: () => { onCancel: () => {
router.go(0)
Modal.remove(); Modal.remove();
} }
}); });
} }
isRefreshToken = 0 }
// respone拦截器
service.interceptors.response.use(
async response => {
await closeLoading(response);
return response.data;
},
async error => {
if (process.server) return Promise.reject(error);
await closeLoading(error);
const errorResponse = error.response || {};
const errorData = errorResponse.data || {};
if (errorResponse.status === 403) {
isRefreshToken++;
if (isRefreshToken === 1) {
refresh(error)
isRefreshToken = 0;
} }
} else if (errorResponse.status === 404) {
// 避免刷新token时也提示报错信息
} else { } else {
if (error.message) { if (error.message) {
let _message = error.code === 'ECONNABORTED' ? '连接超时,请稍候再试!' : '网络错误,请稍后再试!'; let _message =
error.code === 'ECONNABORTED'
? '连接超时,请稍候再试!'
: '网络错误,请稍后再试!';
Message.error(errorData.message || _message); Message.error(errorData.message || _message);
} }
} }
@@ -134,7 +162,7 @@ service.interceptors.response.use(
* 关闭全局加载 * 关闭全局加载
* @param target * @param target
*/ */
const closeLoading = (target) => { const closeLoading = target => {
if (!target.config || !target.config.loading) return true; if (!target.config || !target.config.loading) return true;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
@@ -161,46 +189,45 @@ export default function request (options) {
// 防抖闭包来一波 // 防抖闭包来一波
function getTokenDebounce () { function getTokenDebounce () {
let lock = false let lock = false;
let success = false let success = false;
return function () { return function () {
if (!lock) { if (!lock) {
lock = true lock = true;
let oldRefreshToken = Storage.getItem('refreshToken'); let oldRefreshToken = Storage.getItem('refreshToken');
handleRefreshToken(oldRefreshToken).then(res => { handleRefreshToken(oldRefreshToken)
.then(res => {
if (res.success) { if (res.success) {
let { let { accessToken, refreshToken } = res.result;
accessToken,
refreshToken
} = res.result;
Storage.setItem('accessToken', accessToken); Storage.setItem('accessToken', accessToken);
Storage.setItem('refreshToken', refreshToken); Storage.setItem('refreshToken', refreshToken);
success = true success = true;
lock = false lock = false;
} else { } else {
success = false success = false;
lock = false lock = false;
// router.push('/login') // router.push('/login')
} }
}).catch((err) => {
console.log(err);
success = false
lock = false
}) })
.catch(err => {
console.log(err);
success = false;
lock = false;
});
} }
return new Promise(resolve => { return new Promise(resolve => {
// 一直看lock,直到请求失败或者成功 // 一直看lock,直到请求失败或者成功
const timer = setInterval(() => { const timer = setInterval(() => {
if (!lock) { if (!lock) {
clearInterval(timer) clearInterval(timer);
if (success) { if (success) {
resolve('success') resolve('success');
} else { } else {
resolve('fail') resolve('fail');
} }
} }
}, 500) // 轮询时间间隔 }, 500); // 轮询时间间隔
}) });
} };
} }

View File

@@ -47,6 +47,8 @@ const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve); const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve);
const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve); const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve);
const Point = resolve => require(['@/pages/home/memberCenter/Point'], 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);
/* /*
* 会员中心 * 会员中心
@@ -316,6 +318,18 @@ export default new Router({
name: 'AddAddress', name: 'AddAddress',
component: AddAddress component: AddAddress
}, },
{
path: 'MsgList',
name: 'MsgList',
component: MsgList,
meta: {title: '我的消息'}
},
{
path: 'MsgDetail',
name: 'MsgDetail',
component: MsgDetail,
meta: {title: '我的消息'}
},
{ {
path: 'MyOrder', path: 'MyOrder',
name: 'MyOrder', name: 'MyOrder',

View File

@@ -2051,7 +2051,7 @@ copy-webpack-plugin@^4.0.1:
p-limit "^1.0.0" p-limit "^1.0.0"
serialize-javascript "^1.4.0" serialize-javascript "^1.4.0"
core-js@^2.4.0, core-js@^2.5.0: core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5:
version "2.6.12" version "2.6.12"
resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1607216048810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1607216048810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw= integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw=
@@ -2621,12 +2621,12 @@ dom-serializer@0:
domelementtype "^2.0.1" domelementtype "^2.0.1"
entities "^2.0.0" entities "^2.0.0"
dom7@^3.0.0: dom7@^2.1.5:
version "3.0.0" version "2.1.5"
resolved "https://registry.npm.taobao.org/dom7/download/dom7-3.0.0.tgz#b861ce5d67a6becd7aaa3ad02942ff14b1240331" resolved "https://registry.yarnpkg.com/dom7/-/dom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377"
integrity sha1-uGHOXWemvs16qjrQKUL/FLEkAzE= integrity sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==
dependencies: dependencies:
ssr-window "^3.0.0-alpha.1" ssr-window "^2.0.0"
domain-browser@^1.1.1: domain-browser@^1.1.1:
version "1.2.0" version "1.2.0"
@@ -5150,6 +5150,16 @@ mute-stream@0.0.7:
resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
mv-count-down@^0.1.15:
version "0.1.15"
resolved "https://registry.npmjs.org/mv-count-down/-/mv-count-down-0.1.15.tgz#a3f3c1677576e592c7710b441b2dda96acac2702"
integrity sha512-7poh86i27D/u4AvE9Ne8QHhy61p4MYAhSf4XAVyxzL0gXVCyccJ0NtJferEOxBP6C2q9jImknpKLGdwnEeJ7qQ==
dependencies:
core-js "^2.6.5"
vue "^2.6.10"
vue-router "^3.0.3"
vuex "^3.0.1"
nan@^2.12.1, nan@^2.13.2: nan@^2.12.1, nan@^2.13.2:
version "2.14.2" version "2.14.2"
resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591700047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591700047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
@@ -7477,10 +7487,10 @@ sshpk@^1.7.0:
safer-buffer "^2.0.2" safer-buffer "^2.0.2"
tweetnacl "~0.14.0" tweetnacl "~0.14.0"
ssr-window@^3.0.0, ssr-window@^3.0.0-alpha.1: ssr-window@^2.0.0:
version "3.0.0" version "2.0.0"
resolved "https://registry.npm.taobao.org/ssr-window/download/ssr-window-3.0.0.tgz#fd5b82801638943e0cc704c4691801435af7ac37" resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4"
integrity sha1-/VuCgBY4lD4MxwTEaRgBQ1r3rDc= integrity sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==
ssri@^5.2.4: ssri@^5.2.4:
version "5.3.0" version "5.3.0"
@@ -7743,14 +7753,13 @@ svgo@^1.0.0:
unquote "~1.1.1" unquote "~1.1.1"
util.promisify "~1.0.0" util.promisify "~1.0.0"
swiper@^6.4.1: swiper@^5.2.0:
version "6.4.1" version "5.4.5"
resolved "https://registry.npm.taobao.org/swiper/download/swiper-6.4.1.tgz?cache=0&sync_timestamp=1607518804170&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fswiper%2Fdownload%2Fswiper-6.4.1.tgz#6d4e9252ed4226821d4005e77924e929848de8af" resolved "https://registry.yarnpkg.com/swiper/-/swiper-5.4.5.tgz#a350f654bf68426dbb651793824925512d223c0f"
integrity sha1-bU6SUu1CJoIdQAXneSTpKYSN6K8= integrity sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==
dependencies: dependencies:
dom7 "^3.0.0" dom7 "^2.1.5"
ssr-window "^3.0.0" ssr-window "^2.0.0"
tslib "^2.0.0"
table@4.0.2: table@4.0.2:
version "4.0.2" version "4.0.2"
@@ -7932,11 +7941,6 @@ tslib@^1.10.0:
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1602286724979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz?cache=0&sync_timestamp=1602286724979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=
tslib@^2.0.0:
version "2.0.3"
resolved "https://registry.npm.taobao.org/tslib/download/tslib-2.0.3.tgz?cache=0&sync_timestamp=1602286724979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftslib%2Fdownload%2Ftslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c"
integrity sha1-jgdBrEX8DCJuWKF7/D5kubxsphw=
tty-browserify@0.0.0: tty-browserify@0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" resolved "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
@@ -8315,6 +8319,11 @@ vue-router@^3.0.1:
resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.9.tgz?cache=0&sync_timestamp=1607347231238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66" resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.9.tgz?cache=0&sync_timestamp=1607347231238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66"
integrity sha1-wBb0IDCuKTLxTkdIs5odmg4lDmY= integrity sha1-wBb0IDCuKTLxTkdIs5odmg4lDmY=
vue-router@^3.0.3:
version "3.5.2"
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c"
integrity sha512-807gn82hTnjCYGrnF3eNmIw/dk7/GE4B5h69BlyCK9KHASwSloD1Sjcn06zg9fVG4fYH2DrsNBZkpLtb25WtaQ==
vue-style-loader@^3.0.0, vue-style-loader@^3.0.1: vue-style-loader@^3.0.0, vue-style-loader@^3.0.1:
version "3.1.2" version "3.1.2"
resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a" resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a"

View File

@@ -27,11 +27,11 @@
"print-js": "^1.0.63", "print-js": "^1.0.63",
"qrcodejs2": "0.0.2", "qrcodejs2": "0.0.2",
"quill": "^1.3.7", "quill": "^1.3.7",
"vue-qr": "^2.3.0",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"sockjs-client": "^1.4.0", "sockjs-client": "^1.4.0",
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"swiper": "^6.3.5", "swiper": "^6.3.5",
"uuid": "^8.3.2",
"view-design": "^4.2.0", "view-design": "^4.2.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-apexcharts": "^1.5.1", "vue-apexcharts": "^1.5.1",
@@ -40,8 +40,10 @@
"vue-clipboard2": "^0.3.0", "vue-clipboard2": "^0.3.0",
"vue-cropper": "^0.4.9", "vue-cropper": "^0.4.9",
"vue-i18n": "^8.15.1", "vue-i18n": "^8.15.1",
"vue-json-excel": "^0.3.0",
"vue-json-pretty": "^1.4.1", "vue-json-pretty": "^1.4.1",
"vue-lazyload": "^1.3.3", "vue-lazyload": "^1.3.3",
"vue-qr": "^2.3.0",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuedraggable": "^2.23.2", "vuedraggable": "^2.23.2",
"vuex": "^3.4.0", "vuex": "^3.4.0",

View File

@@ -5,6 +5,7 @@
</template> </template>
<script> <script>
import {v4 as uuidv4} from 'uuid';
import {getCategoryTree} from '@/api/goods.js' import {getCategoryTree} from '@/api/goods.js'
export default { export default {
updated() { updated() {
@@ -15,7 +16,14 @@ export default {
} }
}) })
} }
},
mounted() {
let uuid = this.getStore('uuid');
if (!uuid) {
uuid = uuidv4();
this.setStore('uuid', uuid);
} }
},
}; };
</script> </script>

View File

@@ -1,4 +1,4 @@
import {commonUrl, getRequest} from '@/libs/axios'; import {commonUrl, getRequest, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios';
// 通过id获取子地区 // 通过id获取子地区
export const getChildRegion = (id) => { export const getChildRegion = (id) => {
@@ -6,6 +6,16 @@ export const getChildRegion = (id) => {
}; };
// 点地图获取地址信息 // 点地图获取地址信息
export const getRegion = (parpams) => { export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/region/region`, parpams); return getRequest(`${commonUrl}/common/region/region`, params);
};
// 获取拼图验证
export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`);
};
// 拼图验证
export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params);
}; };

View File

@@ -5,10 +5,21 @@ import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios'
export const getManagerBrandPage = (params) => { export const getManagerBrandPage = (params) => {
return getRequest('/goods/brand/getByPage', params) return getRequest('/goods/brand/getByPage', params)
} }
// 添加或修改品牌设置
// 批量删除
export const delBrand = (ids) =>{
return deleteRequest(`/goods/brand/delByIds/${ids}`)
}
// 添加
export const addBrand = (params) => { export const addBrand = (params) => {
return postRequest('/goods/brand', params) return postRequest('/goods/brand', params)
} }
// 修改品牌设置
export const updateBrand = (params) => {
return putRequest(`/goods/brand/${params.id}`, params)
}
// 禁用品牌 // 禁用品牌
export const disableBrand = (id, params) => { export const disableBrand = (id, params) => {
return putRequest(`/goods/brand/disable/${id}`, params) return putRequest(`/goods/brand/disable/${id}`, params)
@@ -65,15 +76,15 @@ export const disableCategory = (id, type) => {
// 获取商品规格分页列表 // 获取商品规格分页列表
export const getSpecListData = (params) => { export const getSpecListData = (params) => {
return getRequest('/goods/spec/page', params) return getRequest('/goods/spec', params)
} }
// 添加或修改规格设置 // 添加或修改规格设置
export const insertSpec = (params) => { export const insertSpec = (params) => {
return postRequest('/goods/spec', params) return postRequest('/goods/spec', params)
} }
// 添加或修改规格设置 // 添加或修改规格设置
export const updateSpec = (params) => { export const updateSpec = (id,params) => {
return putRequest('/goods/spec', params) return putRequest(`/goods/spec/${id}`, params)
} }
//根据分类id获取关联规格 //根据分类id获取关联规格
export const getCategorySpecListData = (category_id, params) => { export const getCategorySpecListData = (category_id, params) => {
@@ -83,15 +94,6 @@ export const getCategorySpecListData = (category_id, params) => {
export const delSpec = (id, params) => { export const delSpec = (id, params) => {
return deleteRequest(`/goods/spec/${id}`, params) return deleteRequest(`/goods/spec/${id}`, params)
} }
// 获取商品规格值列表
export const getSpecValuesListData = (id, params) => {
return getRequest(`/goods/specValues/values/${id}`, params)
}
// 添加商品规格值
export const saveSpecValues = (id, params) => {
return postRequest(`/goods/specValues/save/${id}`, params)
}
// 查询某分类下的全部子分类列表 // 查询某分类下的全部子分类列表
export const getGoodsCategory = (parent_id) => { export const getGoodsCategory = (parent_id) => {

View File

@@ -98,11 +98,16 @@ export const getMemberStatistics = params => {
}; };
// 获取会员注册统计列表 // 获取会员注册统计列表
export const getStatisticsList = params => { export const getStatisticsList = params => {
return getRequest("/statistics/view/list", params); return getRequest("/statistics/view/list", params);
}; };
// 获取会员历史流量
export const historyMemberChartList = () => {
return getRequest("/statistics/view/online/history");
}
//查询会员数量 //查询会员数量
export const getMemberNum = params => { export const getMemberNum = params => {
return getRequest("/member/num", params); return getRequest("/member/num", params);
@@ -121,15 +126,15 @@ export const removeMemberAddress = (id) => {
} }
//添加会员收货地址 //添加会员收货地址
export const addMemberAddress = (params) => { export const addMemberAddress = (params) => {
return postRequest(`/member/address`,params) return postRequest(`/member/address`, params)
} }
//修改会员收货地址 //修改会员收货地址
export const editMemberAddress = (params) => { export const editMemberAddress = (params) => {
return putRequest(`/member/address`,params) return putRequest(`/member/address`, params)
} }
//查询会员预存款 //查询会员预存款
export const getMemberWallet = (params) => { export const getMemberWallet = (params) => {
return getRequest(`/members/wallet`,params) return getRequest(`/members/wallet`, params)
} }

View File

@@ -86,4 +86,9 @@ export const getMemberFeedbackDetail = (id) => {
return getRequest(`/feedback/${id}`); return getRequest(`/feedback/${id}`);
}; };
//管理员获取发送详情列表
export const getMemberMessage = (params) => {
return getRequest(`/message/member`, params);
};

View File

@@ -1,174 +1,231 @@
// 统一请求路径前缀在libs/axios.js中修改 // 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest } from '@/libs/axios'; import {
getRequest,
postRequest,
putRequest,
deleteRequest
} from "@/libs/axios";
// 获取限时抢购申请列表 // 获取限时抢购申请列表
export const getPromotionSeckill = (params) => { export const getPromotionSeckill = params => {
return getRequest(`/promotion/seckill/apply`, params);
};
return getRequest(`/promotion/seckill/apply`, params) // 是否推荐直播间
} export const whetherStar = params => {
return putRequest(`/broadcast/studio/recommend/${params.id}`,params);
};
// 添加优惠券活动
export const addCouponActivity = params => {
return postRequest(`/promotion/couponActivity/addCouponActivity`, params);
};
// 获取店铺直播间列表
export const getLiveList = params => {
return getRequest("/broadcast/studio", params);
};
// 获取直播间详情
export const getLiveInfo = studioId => {
return getRequest(`/broadcast/studio/${studioId}`);
};
// 获取当前进行中的促销活动商品 // 获取当前进行中的促销活动商品
export const getPromotionGoods = (promotionId,params) => { export const getPromotionGoods = (promotionId, params) => {
return getRequest(`/promotion/${promotionId}/goods`, params) return getRequest(`/promotion/${promotionId}/goods`, params);
} };
// 获取当前进行中的促销活动 // 获取当前进行中的促销活动
export const getAllPromotion = (params) => { export const getAllPromotion = params => {
return getRequest('/promotion/current', params) return getRequest("/promotion/current", params);
} };
// 获取拼团数据 // 获取拼团数据
export const getPintuanList = (params) => { export const getPintuanList = params => {
return getRequest('/promotion/pintuan', params) return getRequest("/promotion/pintuan", params);
} };
// 获取拼团详情 // 获取拼团详情
export const getPintuanDetail = (id) => { export const getPintuanDetail = id => {
return getRequest(`/promotion/pintuan/${id}`) return getRequest(`/promotion/pintuan/${id}`);
} };
// 获取拼团商品数据 // 获取拼团商品数据
export const getPintuanGoodsList = (params) => { export const getPintuanGoodsList = params => {
return getRequest(`/promotion/pintuan/goods/${params.pintuanId}`,params) return getRequest(`/promotion/pintuan/goods/${params.pintuanId}`, params);
} };
// 关闭拼团活动 // 关闭拼团活动
export const closePintuan = (pintuanId) => { export const closePintuan = pintuanId => {
return putRequest(`/promotion/pintuan/close/${pintuanId}`) return putRequest(`/promotion/pintuan/close/${pintuanId}`);
} };
// 保存平台优惠券 // 保存平台优惠券
export const savePlatformCoupon = (params) => { export const savePlatformCoupon = params => {
return postRequest('/promotion/coupon', params,{'Content-type': 'application/json'}) return postRequest("/promotion/coupon", params, {
} "Content-type": "application/json"
});
};
// 修改平台优惠券 // 修改平台优惠券
export const editPlatformCoupon = (params) => { export const editPlatformCoupon = params => {
return putRequest('/promotion/coupon', params,{'Content-type': 'application/json'}) return putRequest("/promotion/coupon", params, {
} "Content-type": "application/json"
});
};
// 获取平台优惠券 // 获取平台优惠券
export const getPlatformCouponList = (params) => { export const getPlatformCouponList = params => {
return getRequest('/promotion/coupon', params) return getRequest("/promotion/coupon", params);
} };
// 作废优惠券 // 作废优惠券
export const deletePlatformCoupon = (ids) => { export const deletePlatformCoupon = ids => {
return deleteRequest(`/promotion/coupon/${ids}`) return deleteRequest(`/promotion/coupon/${ids}`);
} };
// 更新优惠券状态 // 更新优惠券状态
export const updatePlatformCouponStatus = ( params) => { export const updatePlatformCouponStatus = params => {
return putRequest(`/promotion/coupon/status`, params) return putRequest(`/promotion/coupon/status`, params);
} };
// 获取单个优惠券 // 获取单个优惠券
export const getPlatformCoupon = (id) => { export const getPlatformCoupon = id => {
return getRequest(`/promotion/coupon/${id}`) return getRequest(`/promotion/coupon/${id}`);
} };
// 获取优惠券领取详情 // 获取优惠券领取详情
export const getMemberReceiveCouponList = (id) => { export const getMemberReceiveCouponList = id => {
return getRequest(`/promotion/coupon/member/${id}`) return getRequest(`/promotion/coupon/member/${id}`);
} };
// 作废会员优惠券 // 作废会员优惠券
export const deleteMemberReceiveCoupon = (id) => { export const deleteMemberReceiveCoupon = id => {
return putRequest(`/promotion/coupon/member/cancellation/${id}`) return putRequest(`/promotion/coupon/member/cancellation/${id}`);
} };
// 保存平台优惠券
export const saveActivityCoupon = params => {
return postRequest("/promotion/couponActivity", params, {
"Content-type": "application/json"
});
};
// 获取活动优惠券列表
export const getActivityCouponList = params => {
return getRequest("/promotion/couponActivity/activityCoupons", params);
};
// 获取平台优惠券活动
export const getCouponActivityList = params => {
return getRequest("/promotion/couponActivity", params);
};
// 作废优惠券
export const closeActivity = id => {
return deleteRequest(`/promotion/couponActivity/${id}`);
};
// 更新优惠券活动
export const updateCouponActivity = params => {
return putRequest(`/promotion/couponActivity/status`, params);
};
// 获取单个优惠券活动
export const getCouponActivity = id => {
return getRequest(`/promotion/couponActivity/${id}`);
};
// 获取限时抢购数据 // 获取限时抢购数据
export const getSeckillList = (params) => { export const getSeckillList = params => {
return getRequest('/promotion/seckill', params) return getRequest("/promotion/seckill", params);
} };
// 获取限时抢购审核列表 // 获取限时抢购审核列表
export const seckillGoodsList = (params) => { export const seckillGoodsList = params => {
return getRequest('/promotion/seckill/apply', params) return getRequest("/promotion/seckill/apply", params);
} };
// 获取限时抢购详情数据 // 获取限时抢购详情数据
export const seckillDetail = (id, params) => { export const seckillDetail = (id, params) => {
return getRequest(`/promotion/seckill/${id}`, params) return getRequest(`/promotion/seckill/${id}`, params);
} };
// 删除限时抢购 // 删除限时抢购
export const delSeckill = (id) => { export const delSeckill = id => {
return deleteRequest(`/promotion/seckill/${id}`) return deleteRequest(`/promotion/seckill/${id}`);
} };
// 保存限时抢购 // 保存限时抢购
export const saveSeckill = (params) => { export const saveSeckill = params => {
return postRequest('/promotion/seckill', params) return postRequest("/promotion/seckill", params);
} };
// 修改限时抢购 // 修改限时抢购
export const updateSeckill = (params) => { export const updateSeckill = params => {
return putRequest('/promotion/seckill', params) return putRequest("/promotion/seckill", params);
} };
// 关闭限时抢购 // 关闭限时抢购
export const closeSeckill = (id) => { export const closeSeckill = id => {
return putRequest(`/promotion/seckill/close/${id}`) return putRequest(`/promotion/seckill/close/${id}`);
} };
// 审核限时抢购 // 审核限时抢购
export const auditApplySeckill = (params) => { export const auditApplySeckill = params => {
return putRequest(`/promotion/seckill/apply/audit/${params.ids}`, params) return putRequest(`/promotion/seckill/apply/audit/${params.ids}`, params);
} };
// 满优惠列表 // 满优惠列表
export const getFullDiscountList = (params) => { export const getFullDiscountList = params => {
return getRequest(`/promotion/fullDiscount`,params) return getRequest(`/promotion/fullDiscount`, params);
} };
// 满优惠列表 // 满优惠列表
export const getFullDiscountById = (id) => { export const getFullDiscountById = id => {
return getRequest(`/promotion/fullDiscount/${id}`) return getRequest(`/promotion/fullDiscount/${id}`);
} };
// 积分商品列表 // 积分商品列表
export const getPointsGoodsList = (params) => { export const getPointsGoodsList = params => {
return getRequest(`/promotion/pointsGoods`,params) return getRequest(`/promotion/pointsGoods`, params);
} };
// 积分商品详情 // 积分商品详情
export const getPointsGoodsById = (id) => { export const getPointsGoodsById = id => {
return getRequest(`/promotion/pointsGoods/${id}`) return getRequest(`/promotion/pointsGoods/${id}`);
} };
// 添加积分商品 // 添加积分商品
export const addPointsGoods = (params) => { export const addPointsGoods = params => {
return postRequest(`/promotion/pointsGoods`,params, {'Content-type': 'application/json'}) return postRequest(`/promotion/pointsGoods`, params, {
} "Content-type": "application/json"
});
};
// 修改积分商品 // 修改积分商品
export const updatePointsGoods = (params) => { export const updatePointsGoods = params => {
return putRequest(`/promotion/pointsGoods`,params, {'Content-type': 'application/json'}) return putRequest(`/promotion/pointsGoods`, params, {
} "Content-type": "application/json"
});
};
// 修改积分商品状态 // 修改积分商品状态
export const editPointsGoodsStatus = (id, params) => { export const editPointsGoodsStatus = (id, params) => {
return putRequest(`/promotion/pointsGoods/${id}`,params) return putRequest(`/promotion/pointsGoods/${id}`, params);
} };
// 删除积分商品 // 删除积分商品
export const deletePointsGoodsStatus = (id) => { export const deletePointsGoodsStatus = id => {
return deleteRequest(`/promotion/pointsGoods/${id}`) return deleteRequest(`/promotion/pointsGoods/${id}`);
} };
// 积分商品分类列表 // 积分商品分类列表
export const getPointsGoodsCategoryList = (params) => { export const getPointsGoodsCategoryList = params => {
return getRequest(`/promotion/pointsGoodsCategory`,params) return getRequest(`/promotion/pointsGoodsCategory`, params);
} };
// 积分商品分类详情 // 积分商品分类详情
export const getPointsGoodsCategoryById = (id) => { export const getPointsGoodsCategoryById = id => {
return getRequest(`/promotion/pointsGoodsCategory/${id}`) return getRequest(`/promotion/pointsGoodsCategory/${id}`);
} };
// 添加积分商品分类 // 添加积分商品分类
export const addPointsGoodsCategory = (params) => { export const addPointsGoodsCategory = params => {
return postRequest(`/promotion/pointsGoodsCategory`, params) return postRequest(`/promotion/pointsGoodsCategory`, params);
} };
// 更新积分商品分类 // 更新积分商品分类
export const updatePointsGoodsCategory = (params) => { export const updatePointsGoodsCategory = params => {
return putRequest(`/promotion/pointsGoodsCategory`, params) return putRequest(`/promotion/pointsGoodsCategory`, params);
} };
// 删除积分商品分类 // 删除积分商品分类
export const deletePointsGoodsCategoryById = (id) => { export const deletePointsGoodsCategoryById = id => {
return deleteRequest(`/promotion/pointsGoodsCategory/${id}`) return deleteRequest(`/promotion/pointsGoodsCategory/${id}`);
} };

View File

@@ -2,7 +2,7 @@ export default {
/** /**
* @description 配置显示在浏览器标签的title * @description 配置显示在浏览器标签的title
*/ */
title: 'Lili电商', title: "Lili电商",
/** /**
* @description token在Cookie中存储的天数默认1天 * @description token在Cookie中存储的天数默认1天
*/ */
@@ -17,29 +17,32 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'https://common-api.pickmall.cn', common: "https://common-api.pickmall.cn",
buyer: 'https://buyer-api.pickmall.cn', buyer: "https://buyer-api.pickmall.cn",
seller: 'https://store-api.pickmall.cn', seller: "https://store-api.pickmall.cn",
manager: 'https://admin-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: { api_prod: {
common: 'https://common-api.pickmall.cn', common: "https://common-api.pickmall.cn",
buyer: 'https://buyer-api.pickmall.cn', buyer: "https://buyer-api.pickmall.cn",
seller: 'https://store-api.pickmall.cn', seller: "https://store-api.pickmall.cn",
manager: 'https://admin-api.pickmall.cn' manager: "https://admin-api.pickmall.cn"
}, },
/** /**
* @description api请求基础路径前缀 * @description api请求基础路径前缀
*/ */
baseUrlPrefix: '/manager', baseUrlPrefix: "/manager",
/** /**
* @description 需要加载的插件 * @description 需要加载的插件
*/ */
plugin: { plugin: {
'error-store': { "error-store": {
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标 showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误 developmentOff: true // 设为true后在开发环境不会收集错误信息方便开发中排查错误
} }
} }
} };

View File

@@ -24,6 +24,8 @@ service.interceptors.request.use(
...config.params ...config.params
} }
} }
const uuid = getStore('uuid');
config.headers['uuid'] = uuid;
return config; return config;
}, },
err => { err => {
@@ -62,14 +64,6 @@ service.interceptors.response.use(
} }
return data; return data;
break; break;
case 403:
// 权限不足
if (data.message !== null) {
Message.error(data.message);
} else {
Message.error("权限不足");
}
break;
case 500: case 500:
// 系统异常 // 系统异常
if (data.message !== null) { if (data.message !== null) {
@@ -87,6 +81,8 @@ service.interceptors.response.use(
if (error.response) { if (error.response) {
if (error.response.status === 401) { if (error.response.status === 401) {
// 这种情况一般调到登录页 // 这种情况一般调到登录页
} else if (error.response.status === 404) {
// 避免刷新token报错
} else if (error.response.status === 403) { } else if (error.response.status === 403) {
isRefreshToken++; isRefreshToken++;
if(isRefreshToken === 1) { if(isRefreshToken === 1) {

View File

@@ -6,7 +6,7 @@ import ViewUI from 'view-design'
import './styles/theme.less'; import './styles/theme.less';
import "core-js/stable" import "core-js/stable"
import "regenerator-runtime/runtime" // import "regenerator-runtime/runtime"
import App from './App' import App from './App'
import { router } from './router/index' import { router } from './router/index'
import store from './store' import store from './store'

View File

@@ -5,7 +5,7 @@ export const loginRouter = {
path: "/login", path: "/login",
name: "login", name: "login",
meta: { meta: {
title: "登录 - lili " title: "登录 - lili运营后台"
}, },
component: () => import("@/views/login.vue") component: () => import("@/views/login.vue")
}; };
@@ -243,6 +243,43 @@ export const otherRouter = {
name: "platform-coupon-info", name: "platform-coupon-info",
component: () => import("@/views/promotion/coupon/couponInfo.vue") component: () => import("@/views/promotion/coupon/couponInfo.vue")
}, },
{
path: "coupon-activity/add",
title: "添加优惠券活动",
name: "add-coupon-activity",
component: () => import("@/views/promotion/couponActivity/couponPublish.vue")
},
{
path: "coupon-activity/edit",
title: "编辑平台优惠券活动",
name: "edit-coupon-activity",
component: () => import("@/views/promotion/couponActivity/couponPublish.vue")
},
{
path: "promotion/coupon-activity-info",
title: "券活动详情",
name: "coupon-activity-info",
component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
},
{
path: "promotion/member-receive-coupon",
title: "领取详情",
name: "member-coupon-activity",
component: () =>
import("@/views/promotion/coupon/memberReceiveCoupon.vue")
},
{
path: "promotion/platform-coupon-info",
title: "详情",
name: "platform-coupon-activity",
component: () => import("@/views/promotion/coupon/couponInfo.vue")
},
{
path: "promotion/add-coupon-specify",
title: "精准发劵",
name: "add-coupon-specify",
component: () => import("@/views/promotion/coupon/couponSpecify.vue")
},
{ {
path: "promotion/manager-pintuan", path: "promotion/manager-pintuan",
title: "平台拼团", title: "平台拼团",
@@ -296,6 +333,12 @@ export const otherRouter = {
title: "短信签名", title: "短信签名",
name: "add-sms-sign", name: "add-sms-sign",
component: () => import("@/views/sys/message/smsSign.vue") component: () => import("@/views/sys/message/smsSign.vue")
},
{
path: "liveDetail",
title: "查看直播",
name: "liveDetail",
component: () => import("@/views/promotion/live/liveDetail.vue")
} }
] ]
}; };

View File

@@ -16,6 +16,88 @@ export function unitPrice(val, unit, location) {
return (unit || '') + price return (unit || '') + price
} }
/**
* 订单来源
*/
export function clientTypeWay(val) {
if (val == "H5") {
return "移动端";
} else if (val == "PC") {
return "PC端";
} else if (val == "WECHAT_MP") {
return "小程序端";
} else if (val == "APP") {
return "移动应用端";
} else {
return val;
}
}
let timer, flag;
/**
* 节流原理:在一定时间内,只能触发一次
*
* @param {Function} func 要执行的回调函数
* @param {Number} wait 延时的时间
* @param {Boolean} immediate 是否立即执行
* @return null
*/
export function throttle(func, wait = 500, immediate = true) {
if (immediate) {
if (!flag) {
flag = true;
// 如果是立即执行则在wait毫秒内开始时执行
typeof func === 'function' && func();
timer = setTimeout(() => {
flag = false;
}, wait);
}
} else {
if (!flag) {
flag = true
// 如果是非立即执行则在wait毫秒内的结束处执行
timer = setTimeout(() => {
flag = false
typeof func === 'function' && func();
}, wait);
}
}
};
let timeout = null;
/**
* 防抖原理一定时间内只有最后一次操作再过wait毫秒后才执行函数
*
* @param {Function} func 要执行的回调函数
* @param {Number} wait 延时的时间
* @param {Boolean} immediate 是否立即执行
* @return null
*/
export function debounce(func, wait = 500, immediate = false) {
// 清除定时器
if (timeout !== null) clearTimeout(timeout);
// 立即执行,此类情况一般用不到
if (immediate) {
var callNow = !timeout;
timeout = setTimeout(function() {
timeout = null;
}, wait);
if (callNow) typeof func === 'function' && func();
} else {
// 设置定时器当最后一次操作后timeout不会再被清除所以在延时wait毫秒后执行func回调方法
timeout = setTimeout(function() {
typeof func === 'function' && func();
}, wait);
}
}
/** /**

View File

@@ -12,7 +12,7 @@
<shrinkable-menu></shrinkable-menu> <shrinkable-menu></shrinkable-menu>
</div> </div>
<!-- 顶部标题栏主体 --> <!-- 顶部标题栏主体 -->
<div class="main-header-con" style="padding-left:240px"> <div class="main-header-con">
<div class="main-header"> <div class="main-header">
<div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}"> <div :class="{'header-avator-con':navType!=4, 'header-avator-con nav4':navType == 4}">
<!-- 通知消息 --> <!-- 通知消息 -->

View File

@@ -1,10 +1,14 @@
<template> <template>
<div class="search"> <div class="search">
<Row>
<Col>
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="会员名称" prop="memberName"> <Form-item label="会员名称" prop="memberName">
<Input <Input
type="text" type="text"
@@ -15,44 +19,73 @@
/> />
</Form-item> </Form-item>
<Form-item label="状态"> <Form-item label="状态">
<Select v-model="searchForm.distributionStatus" style="width:200px"> <Select
<Option v-for="item in distributionStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option> v-model="searchForm.distributionStatus"
style="width: 200px"
>
<Option
v-for="item in distributionStatusList"
:value="item.value"
:key="item.value"
>{{ item.label }}</Option
>
</Select> </Select>
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button
@click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form> </Form>
</Row> </Row>
<Row class="padding-row"> <Table
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> :loading="loading"
</Row> border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page> <Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row> </Row>
</Card> </Card>
</Col>
</Row>
</div> </div>
</template> </template>
<script> <script>
import { import {
getDistributionListData, getDistributionListData,
retreatDistribution, retreatDistribution,
resumeDistribution, resumeDistribution,
auditDistribution, auditDistribution,
} from "@/api/distribution"; } from "@/api/distribution";
import {distributionStatusList} from './dataJson.js'; import { distributionStatusList } from "./dataJson.js";
export default { export default {
name: "distribution", name: "distribution",
components: { components: {},
},
data() { data() {
return { return {
distributionStatusList, // 分销状态 distributionStatusList, // 分销状态
openSearch: true, // 显示搜索 openSearch: true, // 显示搜索
loading: true, // 表单加载状态 loading: true, // 表单加载状态
searchForm: { // 搜索框初始化对象 searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数 pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小 pageSize: 10, // 页面大小
}, },
@@ -63,7 +96,7 @@
title: "会员名称", title: "会员名称",
key: "memberName", key: "memberName",
minWidth: 120, minWidth: 120,
tooltip: true tooltip: true,
}, },
{ {
title: "推广单数", title: "推广单数",
@@ -77,8 +110,11 @@
width: 150, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥')) return h(
} "div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
);
},
}, },
{ {
title: "可用金额", title: "可用金额",
@@ -86,8 +122,11 @@
width: 150, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥')) return h(
} "div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
);
},
}, },
{ {
title: "冻结金额", title: "冻结金额",
@@ -95,8 +134,11 @@
width: 150, width: 150,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.rebateTotal, '¥')) return h(
} "div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
);
},
}, },
{ {
title: "状态", title: "状态",
@@ -105,16 +147,16 @@
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
if (params.row.distributionStatus == "PASS") { if (params.row.distributionStatus == "PASS") {
return h( "Badge", {props: { status: "success",text: "审核通过" } }) return h("Tag", {props: {color: "green",},},"通过");
} else if (params.row.distributionStatus == "APPLY") { } else if (params.row.distributionStatus == "APPLY") {
return h( "Badge", {props: { status: "processing",text: "申请中" } }) return h("Tag", {props: {color: "geekblue",},},"待审核");
} else if (params.row.distributionStatus == "RETREAT") { } else if (params.row.distributionStatus == "RETREAT") {
return h( "Badge", {props: { status: "warning",text: "清退" } }) return h("Tag", {props: {color: "volcano",},},"清退");
} else if (params.row.distributionStatus == "REFUSE") { } else if (params.row.distributionStatus == "REFUSE") {
return h( "Badge", {props: { status: "error",text: "审核拒绝" } }) return h("Tag", {props: {color: "red",},},"拒绝");
}
} }
}, },
},
{ {
title: "操作", title: "操作",
key: "action", key: "action",
@@ -122,11 +164,13 @@
fixed: "right", fixed: "right",
width: 140, width: 140,
render: (h, params) => { render: (h, params) => {
return h("div",{ return h(
style:{ "div",
display:'flex', {
justifyContent:'center' style: {
} display: "flex",
justifyContent: "center",
},
}, },
[ [
h( h(
@@ -134,14 +178,20 @@
{ {
props: { props: {
type: "error", type: "error",
size: "small" size: "small",
},
style: {
marginRight: "5px",
display:
params.row.distributionStatus != "RETREAT"
? "block"
: "none",
}, },
style:{marginRight:'5px', display:params.row.distributionStatus!='RETREAT'?'block':'none'},
on: { on: {
click: () => { click: () => {
this.retreat(params.row); this.retreat(params.row);
} },
} },
}, },
"清退" "清退"
), ),
@@ -150,23 +200,30 @@
{ {
props: { props: {
type: "success", type: "success",
size: "small" size: "small",
},
style: {
marginRight: "5px",
display:
params.row.distributionStatus == "RETREAT"
? "block"
: "none",
}, },
style:{marginRight:'5px', display:params.row.distributionStatus=='RETREAT'?'block':'none'},
on: { on: {
click: () => { click: () => {
this.resume(params.row); this.resume(params.row);
} },
} },
}, },
"恢复" "恢复"
) ),
]); ]
} );
} },
},
], ],
data: [], // 表单数据 data: [], // 表单数据
total: 0 // 表单数据总数 total: 0, // 表单数据总数
}; };
}, },
methods: { methods: {
@@ -176,7 +233,7 @@
see(v) { see(v) {
this.$router.push({ this.$router.push({
name: "distributionOrder", name: "distributionOrder",
query: { id:v.memberId } query: { id: v.memberId },
}); });
}, },
changePage(v) { changePage(v) {
@@ -194,7 +251,8 @@
this.getDataList(); this.getDataList();
}, },
clearSelectAll() { // 清空 clearSelectAll() {
// 清空
this.$refs.table.selectAll(false); this.$refs.table.selectAll(false);
}, },
changeSelect(e) { changeSelect(e) {
@@ -206,7 +264,7 @@
this.loading = true; this.loading = true;
this.searchForm.status = "PASS"; this.searchForm.status = "PASS";
// 带多条件搜索参数获取表单数据 请自行修改接口 // 带多条件搜索参数获取表单数据 请自行修改接口
getDistributionListData(this.searchForm).then(res => { getDistributionListData(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records;
@@ -223,41 +281,41 @@
loading: true, loading: true,
onOk: () => { onOk: () => {
// 删除 // 删除
retreatDistribution(v.id).then(res => { retreatDistribution(v.id).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList(); this.getDataList();
} }
}); });
} },
}); });
}, },
// 恢复分销商 // 恢复分销商
resume(v){ resume(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: "提示",
// 记得确认修改此处 // 记得确认修改此处
content: "您确认要恢复 " + v.memberName + " ?", content: "您确认要恢复 " + v.memberName + " ?",
loading: true, loading: true,
onOk: () => { onOk: () => {
// 删除 // 删除
resumeDistribution(v.id).then(res => { resumeDistribution(v.id).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList(); this.getDataList();
} }
}); });
} },
}); });
} },
}, },
mounted() { mounted() {
this.init(); this.init();
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
</style> </style>

View File

@@ -1,10 +1,14 @@
<template> <template>
<div class="search"> <div class="search">
<Row>
<Col>
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="会员名称" prop="memberName"> <Form-item label="会员名称" prop="memberName">
<Input <Input
type="text" type="text"
@@ -14,45 +18,64 @@
style="width: 200px" style="width: 200px"
/> />
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button
@click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form> </Form>
</Row> </Row>
<Row style="margin-top: 10px"> <Table
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" class="mt_10"
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> :loading="loading"
</Row> border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" :current="searchForm.pageNumber"
size="small" show-total show-elevator show-sizer></Page> :total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row> </Row>
</Card> </Card>
</Col>
</Row>
</div> </div>
</template> </template>
<script> <script>
import { import { getDistributionListData, auditDistribution } from "@/api/distribution";
getDistributionListData,
auditDistribution
} from "@/api/distribution";
export default { export default {
name: "distributionApply", name: "distributionApply",
components: {}, components: {},
data() { data() {
return { return {
loading: true, // 表单加载状态 loading: true, // 表单加载状态
searchForm: { // 搜索框初始化对象 searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数 pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小 pageSize: 10, // 页面大小
sort: "createTime", // 默认排序字段 sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式 order: "desc", // 默认排序方式
startDate: "", // 起始时间 startDate: "", // 起始时间
endDate: "" // 终止时间 endDate: "", // 终止时间
}, },
form: { // 添加或编辑表单对象初始化数据 form: {
// 添加或编辑表单对象初始化数据
memberName: "", memberName: "",
}, },
// 表单验证规则 // 表单验证规则
@@ -92,13 +115,13 @@
size: "small", size: "small",
}, },
style: { style: {
marginRight: "5px" marginRight: "5px",
}, },
on: { on: {
click: () => { click: () => {
this.audit(params.row, "PASS"); this.audit(params.row, "PASS");
} },
} },
}, },
"通过" "通过"
), ),
@@ -112,17 +135,17 @@
on: { on: {
click: () => { click: () => {
this.audit(params.row, "REFUSE"); this.audit(params.row, "REFUSE");
} },
} },
}, },
"拒绝" "拒绝"
) ),
]); ]);
} },
} },
], ],
data: [], // 表单数据 data: [], // 表单数据
total: 0 // 表单数据总数 total: 0, // 表单数据总数
}; };
}, },
methods: { methods: {
@@ -168,7 +191,7 @@
this.loading = true; this.loading = true;
this.searchForm.distributionStatus = "APPLY"; this.searchForm.distributionStatus = "APPLY";
// 带多条件搜索参数获取表单数据 请自行修改接口 // 带多条件搜索参数获取表单数据 请自行修改接口
getDistributionListData(this.searchForm).then(res => { getDistributionListData(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records;
@@ -183,35 +206,35 @@
}, },
//审核 //审核
audit(v, status) { audit(v, status) {
let test = "拒绝" let test = "拒绝";
if (status == "PASS") { if (status == "PASS") {
test = "通过" test = "通过";
} }
let params = { let params = {
status : status status: status,
} };
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认" + test, title: "确认" + test,
// 记得确认修改此处 // 记得确认修改此处
content: "您确认要" + test + " " + v.memberName + " ?", content: "您确认要" + test + " " + v.memberName + " ?",
loading: true, loading: true,
onOk: () => { onOk: () => {
auditDistribution(v.id, params).then(res => { auditDistribution(v.id, params).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList(); this.getDataList();
} }
}); });
} },
}); });
} },
}, },
mounted() { mounted() {
this.init(); this.init();
} },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
</style> </style>

View File

@@ -1,7 +1,5 @@
<template> <template>
<div class="search"> <div class="search">
<Row>
<Col>
<Card> <Card>
<Row @keydown.enter.native="handleSearch" > <Row @keydown.enter.native="handleSearch" >
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
@@ -21,15 +19,11 @@
</Form-item> </Form-item>
</Form> </Form>
</Row> </Row>
<Row class="padding-row">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
</Row>
<Row type="flex" justify="end" class="page padding-row"> <Row type="flex" justify="end" class="page padding-row">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page> <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>
</Col>
</Row>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500"> <Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate" > <Form ref="form" :model="form" :label-width="100" :rules="formValidate" >
<FormItem label="编号"> <FormItem label="编号">

Some files were not shown because too many files have changed in this diff Show More