182 Commits

Author SHA1 Message Date
lemon橪
dc55e0983a 优化部分代码,修改发布商品部分bug 2021-09-15 13:48:35 +08:00
lemon橪
f3914b63b3 解决iview Radio 报错问题 2021-09-10 11:26:50 +08:00
lemon橪
1ad729ca0e 修改权限已知问题 2021-09-10 11:18:01 +08:00
lemon橪
8c864c207a 修改部分样式问题,新增解析转义,修改buyer端没有第三方登录问题 2021-09-09 10:43:41 +08:00
lemon橪
aaadc90b09 cdn axios版本升级 2021-09-07 11:46:54 +08:00
lemon橪
575e7b3297 修改验证价格问题 2021-09-06 17:19:17 +08:00
lemon橪
49b1252a1f seller在public文件夹下配置全局变量时,刷新页面失效 2021-09-06 17:08:32 +08:00
lemon橪
b0021a759f vue版本升级为2.6 优化cdn加载,优化部分样式,删除某部分图片,修改店铺bug 2021-09-06 17:01:38 +08:00
lemon橪
43349a51d1 修改部分样式,分离seller端config文件,配置部分冗余数据,删除部分没用的图片 2021-09-03 14:58:03 +08:00
lemon橪
a6052bcd9d 合并Master 2021-09-03 11:38:35 +08:00
lemon橪
3d418fa9e1 修改楼层装修中需要的js cdn不加载问题 2021-09-03 11:37:54 +08:00
Chopper
9feff82451 merge master 2021-09-03 09:42:19 +08:00
Chopper
647ed90eac 价格展示相关优化,拼团活动返回不刷新问题处理 2021-09-03 09:40:57 +08:00
OceansDeep
30b968b3e5 !1 add goods parameter sort
Merge pull request !1 from OceansDeep/dev-gl
2021-09-02 08:45:29 +00:00
paulGao
c8edf9c1bd add goods parameter sort 2021-09-02 16:37:46 +08:00
lemon橪
a2c6a1d46d 删除seller mode模式 2021-09-02 15:04:15 +08:00
lemon橪
6d5428317f 修改统计出现的bug 2021-09-02 15:01:54 +08:00
lemon橪
b829d2cd05 seller线上删除console 2021-09-02 11:18:49 +08:00
lemon橪
7f46528086 删除部分manager不用的图片,压缩图片大小,修改统计时测出的bug 2021-09-02 11:17:11 +08:00
lemon橪
71e4c49c3e 优化cdn动态加载管理端,修复砍价金额bug,删除部分不规范代码 2021-09-01 10:11:12 +08:00
lemon橪
84cfb26512 i18n问题解决 2021-08-31 09:46:18 +08:00
lemon橪
07445e42e3 合并Master 2021-08-30 18:26:01 +08:00
lemon橪
201348202a 解决seller报错问题 2021-08-30 18:25:42 +08:00
Chopper
01d2ecda39 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-08-30 18:14:51 +08:00
Chopper
34967921a5 店铺首页展示字段问题处理,以及描述处理 2021-08-30 18:14:24 +08:00
lemon橪
692f7b6dbf 提交商品发布错误bug 2021-08-30 17:20:09 +08:00
lemon橪
8dc3923a4f 合并master 2021-08-30 16:21:23 +08:00
lemon橪
b5b74e8b3b 修改上星期提交的bug 2021-08-30 16:21:05 +08:00
Chopper
a7ee9a6444 双减号问题处理 2021-08-30 14:46:01 +08:00
lemon橪
5ac39d0e93 合并master修改 2021-08-27 18:11:52 +08:00
lemon橪
e6d8d87c31 优化店铺端代码,减少报错信息,动态cdn加载,优化速度30%+ 2021-08-27 18:10:33 +08:00
Chopper
bed539d16f 优惠金额,优惠券金额管理端展示问题处理 2021-08-27 17:29:26 +08:00
Chopper
abaefc59a6 领取数量调整描述为已领取数量,明确含义。
购物车无法渲染哪个商品参与了满减活动问题处理
2021-08-26 11:15:07 +08:00
Chopper
8d60a40688 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-08-25 14:18:50 +08:00
Chopper
589b7fc7c5 售后信息展示,单价展示问题处理 2021-08-25 14:18:35 +08:00
lemon橪
7caa2fd40d 优化店铺段报错问题,后续会配置开发环境以及生产环境动态CDN优化 2021-08-20 17:45:57 +08:00
lemon橪
b59da2c101 合并砍价功能 2021-08-19 14:48:19 +08:00
lemon橪
72ad898a6c 满额活动解决修改Cookie中的字段导致新增活动出现的问题 2021-08-17 15:46:59 +08:00
pikachu
db919a57f3 修改在已有秒杀商品情况下添加新的秒杀商品 数据保存错误问题 2021-08-16 19:54:18 +08:00
lemon橪
f33efac045 合并分支 2021-08-16 11:32:15 +08:00
lemon橪
334a27a12b 修改楼层装修中商品装修出现的默认不显示bug 2021-08-16 11:31:59 +08:00
mabo
08fcbe9acf Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-13 18:03:10 +08:00
mabo
14a8695cc9 删除debugger,证照信息需要上传正反面,修改店铺信息,地址回显,bug修改,代码优化,店铺详情展示优化 2021-08-13 18:03:07 +08:00
lemon橪
9e4449257e 新增收款流水 店铺展示,修改菜单权限ui样式 2021-08-13 14:30:24 +08:00
lemon橪
826454e164 合并master 2021-08-13 11:30:47 +08:00
lemon橪
4c11e448f1 修改菜单权限, 新增版本更新提示 2021-08-13 11:30:33 +08:00
mabo
cfc5c94f5a Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-13 10:38:08 +08:00
mabo
e6588af790 积分扣减展示问题,pc商品详情图片不展示问题,pc楼层装修提示修改,代码优化 2021-08-13 10:38:04 +08:00
lemon橪
9b81a70808 合并master 2021-08-13 09:19:07 +08:00
lemon橪
fb50143ec2 新增app版本描述 2021-08-13 09:18:46 +08:00
mabo
736c5ecd2c 结算单添加砍价,积分商品金额 2021-08-12 18:39:34 +08:00
mabo
e88c75d0b7 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-12 17:42:16 +08:00
mabo
a849d8906a 投诉详情取消投诉规则改变,商品分类2级分类没有图片 2021-08-12 17:42:05 +08:00
Chopper
2d2448ebba Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui
# Conflicts:
#	seller/src/views/promotion/seckill/seckill.vue
2021-08-12 17:12:13 +08:00
mabo
9b0a089e29 选择品牌,品牌绑定时候可以搜索 2021-08-12 16:41:43 +08:00
Chopper
682bd13b6e add elasticsearch progress 2021-08-12 02:17:28 +08:00
mabo
71ab63e047 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-12 01:03:43 +08:00
mabo
2e27a2fb85 好评率展示问题,申请售后图片变形,清除足迹不刷新列表,结算单筛选条件展示错误,店铺审核按钮调整到详情 2021-08-12 01:03:39 +08:00
Chopper
02bf570f08 商家端售后排序问题处理 2021-08-12 00:09:01 +08:00
Chopper
e52ac06fb3 pc支持分销 2021-08-11 22:53:47 +08:00
Chopper
c1a741466c 商家端查看秒杀活动列表问题处理 2021-08-11 22:29:27 +08:00
mabo
81ab58e009 店铺入驻bug修改 2021-08-11 22:13:25 +08:00
mabo
a42a7515dc Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-11 21:41:19 +08:00
mabo
2dabff65ed 店铺入驻没有回显问题 2021-08-11 21:41:15 +08:00
pikachu
71d8fbd5fe Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-11 21:32:54 +08:00
pikachu
7763abd591 拼团活动相关校验 2021-08-11 21:32:42 +08:00
mabo
6bbba6bd35 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-11 21:18:26 +08:00
mabo
c7ce4e72c6 店铺入驻bug修改,订单详情添加修改金额展示 2021-08-11 21:18:22 +08:00
pikachu
9e365c27b5 新增充值取消状态 2021-08-11 19:28:47 +08:00
mabo
4557b1d5c1 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-11 18:48:03 +08:00
mabo
e9163e4247 管理、商家,添加删除秒杀商品接口,管理端切换账号菜单权限不生效问题,代码优化 2021-08-11 18:47:59 +08:00
lemon橪
328bceec2c 合并master 2021-08-11 18:12:53 +08:00
lemon橪
82bb5577b2 修改统计错误信息 2021-08-11 18:12:36 +08:00
mabo
3e505a8a4e Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-11 14:56:06 +08:00
mabo
cc80242896 pc端添加2个轮播代码,楼层装修跟pc端样式不一致,楼层装修无法添加的bug修改 2021-08-11 14:56:02 +08:00
lemon橪
e521e723d5 修改移动端楼层装修bug 2021-08-11 11:57:02 +08:00
lemon橪
9213aed8e0 修改部分移动端楼层装修bug 2021-08-11 10:19:45 +08:00
mabo
d104baf426 管理端,装修页面添加两种新轮播 2021-08-10 18:01:07 +08:00
mabo
b89fb8b2ba Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-10 17:39:20 +08:00
mabo
bb8ea94850 pc收藏店铺字段变更,添加修改秒杀页面 2021-08-10 17:39:15 +08:00
lemon橪
783c6df0a4 修改统计上店铺不加载bug 修改统计图antV加载数据不齐全bug 2021-08-10 16:50:55 +08:00
lemon橪
06a6b77d2e pull最新代码 修改店铺简介的富文本框 2021-08-10 16:30:55 +08:00
mabo
924de43227 删除文件 buyer/src/pages/payment/thirdPay.vue 2021-08-10 08:11:21 +00:00
mabo
0597531c72 删除文件 buyer/src/pages/forgetPassword.vue 2021-08-10 08:11:11 +00:00
mabo
07e75f71cc 删除文件 buyer/src/pages/couponCenter.vue 2021-08-10 08:11:04 +00:00
mabo
c9d42755ef 删除文件 buyer/src/components/nav/cateNav.vue 2021-08-10 08:10:15 +00:00
mabo
9e45c45688 删除文件 buyer/src/components/indexDecorate/modelList/seckill.vue 2021-08-10 08:09:05 +00:00
mabo
75fd42e152 删除文件 buyer/src/components/indexDecorate/modelList/recommend.vue 2021-08-10 08:08:59 +00:00
mabo
97bc68ad26 删除文件 buyer/src/components/indexDecorate/modelList/notEnough.vue 2021-08-10 08:08:54 +00:00
mabo
05a25bd80f 删除文件 buyer/src/components/indexDecorate/modelList/newGoodsSort.vue 2021-08-10 08:08:45 +00:00
mabo
ffde03bc21 删除文件 buyer/src/components/indexDecorate/modelList/firstPageAdvert.vue 2021-08-10 08:08:39 +00:00
mabo
0d42bce536 删除文件 buyer/src/components/indexDecorate/modelList/carousel.vue 2021-08-10 08:08:31 +00:00
mabo
bf2eb82728 删除文件 buyer/src/components/indexDecorate/modelFormItem.vue 2021-08-10 08:07:02 +00:00
mabo
a62530d7b8 删除文件 buyer/src/components/indexDecorate/modelForm.vue 2021-08-10 08:06:57 +00:00
mabo
3e1fa0b937 修改秒杀页面展示名 2021-08-10 11:53:28 +08:00
mabo
604a918fd1 商家端代码优化 2021-08-10 10:17:48 +08:00
mabo
1f02b45600 管理端代码优化 2021-08-10 09:59:53 +08:00
lemon橪
ebb048f1a7 修改付款日志订单创建时间 2021-08-09 11:57:57 +08:00
lemon橪
c58d70524d 更改seller上面之前配置出错的问题 2021-08-09 11:11:57 +08:00
pikachu
86fed0db41 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-06 19:19:01 +08:00
pikachu
7cbca93d3d 积分字段修改 2021-08-06 19:18:55 +08:00
lemon橪
c1f846a633 修改虚拟订单不能时间筛选问题 2021-08-06 17:34:57 +08:00
lemon橪
7a43087ae0 合并master 2021-08-06 17:17:56 +08:00
lemon橪
f281f8e65a 修改售后原因bug 2021-08-06 17:17:40 +08:00
mabo
4d26bf08b2 修改提示信息 2021-08-06 16:13:48 +08:00
mabo
146854b098 导出订单默认导出一万条,优化代码 2021-08-06 16:12:41 +08:00
mabo
5cfbfdf67c 修改上传图片大小限制,最大1M 2021-08-06 15:35:07 +08:00
mabo
00a64c4d2a Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-06 14:12:35 +08:00
mabo
ba7e711a88 删除无用字段 2021-08-06 14:12:30 +08:00
lemon橪
10dcf4473c 合并master 2021-08-06 11:59:20 +08:00
lemon橪
4c217b85e9 优化菜单设置权限功能,懒人版一件选中权限 2021-08-06 11:58:53 +08:00
mabo
c75bd5208b 买家端商品分类,导航加载报错问题,商家端跳转买家端商品地址代码优化,文件上传地址调用位置修改 2021-08-06 11:32:29 +08:00
mabo
1fe7c050a4 分销商品添加移除功能,删除无用接口 2021-08-06 09:40:12 +08:00
mabo
c6874acb1b pc端修改我的优惠券bug,样式,管理端删除添加秒杀活动功能 2021-08-05 18:07:11 +08:00
mabo
ffeef640da 店铺列表,搜索项,店铺状态字段错误 2021-08-05 17:35:52 +08:00
mabo
1f054b796d 积分商品流程完成,billpirce改为flowprice,必填项提示错误 2021-08-05 17:10:10 +08:00
mabo
35881e30e0 积分商品,搜索热词为null问题 2021-08-05 11:19:12 +08:00
pikachu
a8e55d230a Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-04 19:08:33 +08:00
pikachu
083576ab3f 更改微信提现状态 2021-08-04 19:08:04 +08:00
mabo
0387ac510a 管理端和商家端userInfo字段名变更,管理端会员详情,他的积分字段调整 2021-08-04 17:51:43 +08:00
mabo
726ae1f856 1. 第一次进入商品列表,商品分类未展示
2. 链接选择器,店铺开启状态展示错误
3. 从新装修楼层,楼层bug修改
4. 搜索热词为空是返回null,导致报错
5. 首页全部商品分类缓存问题
6. 修改菜单项缓存、添加设置
7. 店铺分类二级分类修改时无父级分类
2021-08-04 17:07:39 +08:00
mabo
483d8c3aef 链接选择器,店铺开启状态展示错误 2021-08-03 18:12:27 +08:00
mabo
db42d19f44 买家端订单详情添加操作,商品选择器,categoryId传参错误 2021-08-03 18:08:18 +08:00
mabo
d822c3c809 swiper问题 2021-08-03 10:40:38 +08:00
mabo
94719d58cd lock文件添加 2021-08-03 10:20:54 +08:00
mabo
307153801d 取消pakcge-lock.json的忽略 2021-08-03 10:08:07 +08:00
mabo
a771189939 swiper 报错 2021-08-03 09:53:50 +08:00
mabo
98c65eab46 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-08-03 09:23:39 +08:00
mabo
21a37db1da 删除无用代码 2021-08-03 09:23:36 +08:00
Chopper
4008816c66 Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2021-08-02 18:45:01 +08:00
Chopper
925e84528c 修改结算页面展示字段 2021-08-02 18:44:28 +08:00
mabo
8d6ee03d88 首页展示秒杀商品,楼层装修页面调整 2021-08-02 18:13:08 +08:00
mabo
8cec0e6ab8 商家端列表页缓存 2021-07-31 15:49:54 +08:00
mabo
ad17d8b743 文件名大小写修改 2021-07-31 11:05:34 +08:00
mabo
2792d24e98 添加注释 2021-07-31 09:49:17 +08:00
mabo
ff92fd8d76 添加pc端代码注释 2021-07-30 18:17:01 +08:00
mabo
93ba1c134f 热搜词缓存 2021-07-30 17:11:36 +08:00
mabo
dc08d545a2 删除like模块引用 2021-07-30 16:13:31 +08:00
mabo
ca3cf71c6d 搜索热词,pc端注释,管理端结算单订单号字段错误 2021-07-30 15:59:14 +08:00
lemon橪
96beccad82 修改退款金额有问题bug 2021-07-29 17:39:35 +08:00
lemon橪
f63c21b17a 订单详情不加载问题 2021-07-29 15:49:10 +08:00
lemon橪
6b27278e6e 订单详情 不触发加载问题 2021-07-29 15:48:41 +08:00
mabo
cd0cd14f77 代码注释添加 2021-07-28 17:07:37 +08:00
mabo
94a9404b39 结算单添加积分,砍价价格字段 2021-07-28 10:56:37 +08:00
mabo
2385bbd912 积分展示问题 2021-07-28 09:24:37 +08:00
mabo
327d911f80 买家图片地址问题 2021-07-28 09:02:48 +08:00
mabo
83f0f01233 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-27 18:13:48 +08:00
mabo
877ccc059e 楼层装修接口多次调用,发票管理状态错误,售后详情打开多个会为空 2021-07-27 18:13:45 +08:00
lemon橪
9313d5a886 新增商品楼层装修模块 2021-07-27 18:13:24 +08:00
mabo
5fb6986a18 菜单管理保存时删除无用字段 2021-07-27 16:13:38 +08:00
mabo
eb4a5e4fdc 管理端注释添加完成 2021-07-27 15:59:34 +08:00
mabo
59e1aedbf3 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-26 18:12:17 +08:00
mabo
87980277bf 添加注释,删除无用代码,bug修改 2021-07-26 18:12:13 +08:00
Chopper
30fbe6ca83 no message 2021-07-26 16:03:39 +08:00
Chopper
31d28627f1 热词功能完善 2021-07-26 16:02:31 +08:00
mabo
df9ea021b3 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-26 14:47:22 +08:00
mabo
a198fc0161 添加注释,测试功能,选择部门组件报错,会员详情积分字段展示错误,售后原因添加标识判断是新增还是编辑 2021-07-26 14:47:18 +08:00
chopper711
64bfe1cdc2 !5 提现审核功能
Merge pull request !5 from pipi
2021-07-26 06:15:36 +00:00
pikachu
6a716fa531 提现申请审核 2021-07-24 17:38:19 +08:00
pikachu
05b4f67bd3 修复提现记录不展示 2021-07-24 11:46:41 +08:00
mabo
9130485631 添加注释,修改分销设置提交方式,左侧菜单无法选中问题 2021-07-23 18:05:05 +08:00
mabo
ae329419a6 页签切换,一级菜单也要选中,报错信息提示多个问题 2021-07-23 11:46:01 +08:00
mabo
66462b9085 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-22 18:05:59 +08:00
mabo
80d070bb67 管理端售后,添加跳转链接 2021-07-22 18:05:55 +08:00
lemon橪
916dd1a398 合并Master 2021-07-22 18:03:04 +08:00
lemon橪
502c77fb6e 优化角色权限样式 2021-07-22 18:02:47 +08:00
mabo
2f8946f372 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-22 14:25:59 +08:00
mabo
abc58298a3 logo替换为本地文件,商品搜索项折叠,售后展示平台退款订单 2021-07-22 14:25:55 +08:00
lemon橪
4809c3839b 修改售后单部分样式以及逻辑 2021-07-22 14:23:31 +08:00
lemon橪
7fbcdafa9b 合并master 2021-07-22 09:10:42 +08:00
lemon橪
b2180ecaf7 更改退货列表间距 2021-07-22 09:10:15 +08:00
mabo
6351bdb633 买家优惠券页面调整,订单导出添加参数,订单详情样式调整 2021-07-22 09:01:59 +08:00
mabo
75bff1edc4 会员中心添加首页按钮,pclogo改为阿里云地址,编辑折扣券没有传折扣值, 2021-07-21 15:27:39 +08:00
paulGao
f512caa81d 添加自定义分词管理 2021-07-21 08:00:24 +08:00
lemon橪
c3178eb7d0 合并master 2021-07-20 18:03:28 +08:00
lemon橪
562679b366 新增楼层装修砍价的编辑 2021-07-20 18:02:49 +08:00
mabo
eee0258061 物流公司切换禁用无效问题,pc退货添加物流信息回填,保存发票回显错误 2021-07-20 18:00:35 +08:00
mabo
0a248d89d5 物流公司switch切换无效,代码注释添加 2021-07-20 14:06:53 +08:00
mabo
5062cad2b0 商家端添加注释,删除无用代码,优化样式 2021-07-19 18:03:35 +08:00
pikachu
d7da00582a Merge branch 'master' into qiuqiu 2021-07-12 23:44:29 +08:00
pikachu
953320526e 砍价第一版本 2021-07-12 23:43:59 +08:00
pikachu
726b11eb82 砍价第一版本 2021-07-12 23:42:59 +08:00
495 changed files with 34875 additions and 35603 deletions

1
buyer/.gitignore vendored
View File

@@ -12,4 +12,3 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
package-lock.json

View File

@@ -1,10 +0,0 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

View File

View File

@@ -1,25 +1,19 @@
### 全局css src/assets/styles
# new
### 工具类 src/plugins
## Project setup
```
npm install
```
### 顶部广告页 src/components/advertising
### 全部商品分类 components/nav
### 底部导航栏 components/footer
### 发票模态框 components/invoiceModal
### 商品详情 pages/GoodsDetail.vue
#### 商品详情组件 components/goodsDetail
### 全部商品分类 pages/AllCategories.vue
### 意见反馈 pages/Feedback.vue
### 卡片的封装 components/card
### 购物车 pages/Cart.vue
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5
buyer/babel.config.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View File

@@ -1,41 +0,0 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})

View File

@@ -1,54 +0,0 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

View File

@@ -1,110 +0,0 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader',
publicPath: '../../'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less' , { javascriptEnabled : true }),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass').concat(
{
loader: 'sass-resources-loader',
options: {
//你自己的scss全局文件的路径
resources: path.resolve(__dirname, '../src/assets/styles/global.scss')
}
}
),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

View File

@@ -1,22 +0,0 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

View File

@@ -1,111 +0,0 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
}
},
module: {
rules: [
// ...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
},
// {
// test: /\.less$/,
// loader: "style-loader!css-loader!less-loader",
// },
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test: /\.(cur)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('cur/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

View File

@@ -1,95 +0,0 @@
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})

View File

@@ -1,145 +0,0 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: false,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig

View File

@@ -1,8 +0,0 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
BASE_URL:''
})

View File

@@ -1,84 +0,0 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
// const api = 'http://www.baidu.com'
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
// '/api': {
// target:api,
// changeOrigin:true,
// pathRewrite:{
// '^/api':''
// }
// }
},
// Various Dev Server settings
host: '0.0.0.0', // can be overwritten by process.env.HOST
port: 10000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

View File

@@ -1,5 +0,0 @@
'use strict'
module.exports = {
NODE_ENV: '"production"',
BASE_URL:'http://www.baidu.com'
}

BIN
buyer/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="./static/logo.ico" type="image/x-icon">
<script src="https://yzf.qq.com/xv/web/static/chat_sdk/yzf_chat.min.js"></script>
<title>LILI</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

9902
buyer/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,91 +1,42 @@
{
"name": "lilishop-vue",
"name": "lilishop",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@amap/amap-jsapi-loader": "0.0.7",
"axios": "^0.19.2",
"js-cookie": "^2.2.1",
"less": "^3.12.2",
"less": "^2.7.0",
"less-loader": "^5.0.0",
"mv-count-down": "^0.1.15",
"node-sass": "^4.14.1",
"psl": "^1.8.0",
"qs": "^6.9.4",
"swiper": "^5.2.0",
"sass-loader": "^7.3.1",
"uuid": "^8.3.2",
"v-distpicker": "^1.0.17",
"view-design": "^4.3.2",
"vue": "^2.5.2",
"vue-awesome": "^4.0.2",
"vue-awesome-swiper": "^4.1.1",
"vue": "^2.6.11",
"vue-awesome-swiper": "^3.1.3",
"vue-piczoom": "^1.0.6",
"vue-qr": "^2.3.0",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"@vue/cli-service": "~4.5.0",
"compression-webpack-plugin": "^5.0.0",
"sass-loader": "^7.3.1",
"sass-resources-loader": "^2.0.3",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
"not dead"
]
}

23
buyer/public/index.html Normal file
View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<% for(var css of htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%=css%>" />
<% } %>
</head>
<body>
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%=js%>"></script>
<% } %>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

BIN
buyer/public/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -7,7 +7,6 @@
<script>
import {v4 as uuidv4} from 'uuid';
import storage from '@/plugins/storage';
import {getLogo} from '@/api/common.js';
export default {
name: 'App',
mounted () {
@@ -16,16 +15,6 @@ export default {
uuid = uuidv4();
storage.setItem('uuid', uuid);
}
if (!this.Cookies.getItem('logo')) {
setTimeout(() => {
getLogo().then(res => {
if (res.success) {
let logoObj = JSON.parse(res.result.settingValue)
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
}
})
}, 1000)
}
}
};
</script>

View File

@@ -33,7 +33,7 @@ export function sendSms (params) {
});
}
/**
* 发送短信验证码
* 获取logo图标
*/
export function getLogo () {
return request({

View File

@@ -60,8 +60,8 @@ export function pintuanMembers (pintuanId) {
}
/**
* @param {Number} start 搜索起始下标
* @param {Number} end 搜索结束下标
* 获取搜索热词
* @param {Number} count 获取搜索热词数量
*/
export function hotWords (params) {
return request({

View File

@@ -346,14 +346,16 @@ export function getDistGoodsList (params) {
}
/**
* 选择分销商品
* 绑定、解绑分销商品
* @param distributionGoodsId 分销商品id
* @param checked 分销商品id,true为绑定false为解绑
*/
export function selectDistGoods (distributionGoodsId) {
export function selectDistGoods (params) {
return request({
url: `/buyer/distributionGoods/checked/${distributionGoodsId}`,
url: `/buyer/distributionGoods/checked/${params.distributionGoodsId}`,
method: Method.GET,
needToken: true
needToken: true,
params
});
}
@@ -457,7 +459,8 @@ export function memberMsgList (params) {
* 设置消息为已读
* @param {String} messageId 消息id
*/
export function readMemberMsg (id) {
export function readMemberMsg (id) {
return request({
url: `/buyer/member/message/${id}`,
method: Method.PUT,
@@ -468,10 +471,22 @@ export function memberMsgList (params) {
* 删除会员消息
* @param {String} messageId 消息id
*/
export function delMemberMsg (id) {
export function delMemberMsg (id) {
return request({
url: `/buyer/member/message/${id}`,
method: Method.DELETE,
needToken: true
});
}
/**
* 绑定分销
* @param distributionId 商品分销ID
*/
export function getGoodsDistribution (distributionId) {
return request({
url: `/buyer/distribution/bindingDistribution/${distributionId}`,
method: Method.GET,
needToken: true
});
}

View File

@@ -96,3 +96,22 @@ export function communication (params) {
params
});
}
// 退换货服务 提交物流
export function afterSaleDelivery (params) {
return request({
url: `/buyer/afterSale/delivery/${params.afterSaleSn}`,
method: Method.POST,
needToken: true,
params
});
}
// 获取退货可选物流公司
export function getLogisticsCompany () {
return request({
url: `/buyer/logistics`,
method: Method.GET,
needToken: true,
params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' }
});
}

View File

@@ -46,3 +46,14 @@ export function pointGoods (params) {
params
});
}
/**
* 获取积分商品详情
*/
export function pointGoodsDetail (id) {
return request({
url: `/buyer/promotion/pointsGoods/${id}`,
method: Method.GET,
needToken: true,
id
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,92 +1,91 @@
// coupon
.coupon-list {
display: flex;
flex-wrap: wrap;
display: flex;
flex-wrap: wrap;
}
.coupon-item {
width: 380px;
height: 145px;
margin-bottom: 20px;
margin-right: 10px;
margin-left: 10px;
position: relative;
border: 1px solid #eee;
.c-left {
width: 100%;
padding: 20px;
>div, > p {
margin-bottom: 10px;
}
>div {
.price{
color: $theme_color;
font-size: 20px;
}
.describe{
background-color: #fff4ec;
color: $theme_color;
padding: 0 5px;
margin-left: 10px;
font-size: 13px;
}
}
p:nth-of-type(1){
font-weight: bold;
}
p:nth-of-type(2){
color: #999;
}
}
b{
position: absolute;
z-index: 2;
top: 0;
right: 50px;
display: block;
width: 3px;
height: 100%;
}
.c-right {
position: absolute;
right: 0;
top: 0;
width: 52px;
height: 100%;
background-color: $theme_color;
color: #fff;
font-size: 16px;
padding: 20px;
&:hover{
font-weight: bold;
}
}
i{
position: absolute;
width: 20px;
height: 20px;
right: 42px;
width: 380px;
height: 145px;
margin-bottom: 20px;
margin-right: 10px;
margin-left: 10px;
position: relative;
border: 1px solid #eee;
background-color: #fff;
border-radius: 20px;
&:after{
content: '';
position: absolute;
width: 25px;
height: 20px;
left: -2px;
background-color: #fff;
.c-left {
width: 100%;
padding: 20px;
> div,
> p {
margin-bottom: 10px;
}
> div {
.price {
color: $theme_color;
font-size: 20px;
}
.describe {
background-color: #fff4ec;
color: $theme_color;
padding: 0 5px;
margin-left: 10px;
font-size: 13px;
}
}
p:nth-of-type(1) {
font-weight: bold;
}
p:nth-of-type(2) {
color: #999;
}
}
}
i.circle-top{
top: -10px;
&::after{
top: -11px;
b {
position: absolute;
z-index: 2;
top: 0;
right: 50px;
display: block;
width: 3px;
height: 100%;
}
}
i.circle-bottom{
bottom: -10px;
&::after{
bottom: -11px;
.c-right {
position: absolute;
right: 0;
top: 0;
width: 52px;
height: 100%;
background-color: $theme_color;
color: #fff;
font-size: 16px;
padding: 20px;
}
}
}
i {
position: absolute;
width: 20px;
height: 20px;
right: 42px;
border: 1px solid #eee;
background-color: #fff;
border-radius: 20px;
&:after {
content: "";
position: absolute;
width: 25px;
height: 20px;
left: -2px;
background-color: #fff;
}
}
i.circle-top {
top: -10px;
&::after {
top: -11px;
}
}
i.circle-bottom {
bottom: -10px;
&::after {
bottom: -11px;
}
}
}

View File

@@ -1,18 +1,112 @@
/*
* @Author: LMR
* @Date: 2020-08-11 10:12:34
* @Last Modified by: LMR
* @Last Modified time: 2020-08-18 16:00:10
*/
//引入主题色
@import "./theme.scss";
.global_color{
color: $theme_color;
// 明亮主题颜色
$primary_color: #2d8cf0;
$primary_light_color: #0f1011;
$primary_dark_color: #2b85e4;
$success_color: #19be6b;
$warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #ed3f14;
$border_color: #dddee1;
$title_color: #8c8c8c;
$light_title_color: #1c2438;
$light_content_color: #495060;
$light_sub_color: #80848f;
$light_background_color: #f8f8f9;
$light_white_background_color: #fff;
// 暗黑主题颜色
$dark_background_color: #141414;
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
$dark_content_color: #d5d5d5;
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
// 背景颜色
@mixin background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
.global_background_color{
background-color: $theme_color;
// 辅助背景颜色
@mixin sub_background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
@mixin white_background_color() {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $light_white_background_color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_white_background_color;
}
}
// 正文颜色
@mixin content_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_content_color;
}
}
// 辅助颜色
@mixin sub_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_sub_color;
}
}
// 标题颜色
@mixin title_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_title_color;
}
}
// 全局变量
.global_color {
color: $theme_color;
}
.global_background_color {
background-color: $theme_color;
}
.global_text_left {
text-align: left;
@@ -26,44 +120,96 @@
.global_float_right {
float: right;
}
.clearfix::after{
content: '';
.clearfix::after {
content: "";
display: block;
clear: both;
}
.width_1200{width: 1200px;}
.width_800{width: 800px;}
.width_400{width: 400px;}
.width_300{width: 300px;}
.width_200{width: 200px;}
.width_100{width: 100px;}
.width_1200 {
width: 1200px;
}
.width_800 {
width: 800px;
}
.width_400 {
width: 400px;
}
.width_300 {
width: 300px;
}
.width_200 {
width: 200px;
}
.width_100 {
width: 100px;
}
.fontsize_12{font-size: 12px;}
.fontsize_14{font-size: 14px;}
.fontsize_16{font-size: 16px;}
.fontsize_18{font-size: 18px;}
.fontsize_12 {
font-size: 12px;
}
.fontsize_14 {
font-size: 14px;
}
.fontsize_16 {
font-size: 16px;
}
.fontsize_18 {
font-size: 18px;
}
.mb_20{margin-bottom: 20px;}
.mt_20{margin-top: 20px;}
.ml_20{margin-left: 20px;}
.mr_20{margin-right: 20px;}
.mb_20 {
margin-bottom: 20px;
}
.mt_20 {
margin-top: 20px;
}
.ml_20 {
margin-left: 20px;
}
.mr_20 {
margin-right: 20px;
}
.mb_10{margin-bottom: 10px;}
.mt_10{margin-top: 10px;}
.ml_10{margin-left: 10px;}
.mr_10{margin-right: 10px;}
.mb_10 {
margin-bottom: 10px;
}
.mt_10 {
margin-top: 10px;
}
.ml_10 {
margin-left: 10px;
}
.mr_10 {
margin-right: 10px;
}
.pb_20{padding-bottom: 20px;}
.pt_20{padding-top: 20px;}
.pl_20{padding-left: 20px;}
.pr_20{padding-right: 20px;}
.pb_20 {
padding-bottom: 20px;
}
.pt_20 {
padding-top: 20px;
}
.pl_20 {
padding-left: 20px;
}
.pr_20 {
padding-right: 20px;
}
.pb_10{padding-bottom: 10px;}
.pt_10{padding-top: 10px;}
.pl_10{padding-left: 10px;}
.pr_10{padding-right: 10px;}
.pb_10 {
padding-bottom: 10px;
}
.pt_10 {
padding-top: 10px;
}
.pl_10 {
padding-left: 10px;
}
.pr_10 {
padding-right: 10px;
}
.color999{
.color999 {
color: #999;
}
@@ -71,55 +217,123 @@ html,
body {
height: 100%;
width: 100%;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial,
sans-serif;
// overflow: hidden;
margin: 0;
padding: 0;
}
li{
li {
list-style: none;
}
.hover-color:hover{
color: $theme_color!important;
.hover-color:hover {
color: $theme_color !important;
cursor: pointer;
}
.hover-pointer{
.hover-pointer {
cursor: pointer;
}
.center{
.center {
margin: 0 auto;
}
.relative{
.relative {
position: relative;
}
.ellipsis{
.ellipsis {
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
}
.promotion-decorate{
.promotion-decorate {
width: 200px;
text-align: center;
font-size: 25px;
position: relative;
font-weight: bold;
margin: 30px auto 30px;
&::before,&::after{
content: '';
display: inline-block;
width: 25px;
height: 20px;
background-size: 50px 20px;
background-repeat: no-repeat;
background-position: 0 0;
position: absolute;
top: 10px;
left: -3px;
&::before,
&::after {
content: "";
display: inline-block;
width: 25px;
height: 20px;
background-size: 50px 20px;
background-repeat: no-repeat;
background-position: 0 0;
position: absolute;
top: 10px;
left: -3px;
}
&::after{
background-position: -24px 0;
right: -3px;
left: auto;
&::after {
background-position: -24px 0;
right: -3px;
left: auto;
}
}
// goodsList
.text-danger {
color: $theme_color;
}
.seckill-price{
margin-right: 5px;
font-size: 25px;
font-weight: bold;
}
.goods-list {
display: flex;
flex-wrap: wrap;
width: 1200px;
margin: 0 auto;
}
.goods-show-info {
width: 235px;
padding: 6px;
margin: 10px 0px;
margin-left: 5px;
position: relative;
border: 1px solid #fff;
cursor: pointer;
background-color: #fff;
}
.goods-show-info:hover {
border: 1px solid #ccc;
box-shadow: 0px 0px 15px #ccc;
}
.goods-show-price {
margin-top: 6px;
}
.goods-show-detail {
font-size: 12px;
margin: 6px 0px;
}
.goods-show-num {
font-size: 12px;
margin-bottom: 6px;
color: #666;
}
.goods-show-num {
font-size: 12px;
margin-bottom: 6px;
color: #009688;
}
.goods-show-num span {
color: #005aa0;
font-weight: bold;
}
.goods-show-seller {
font-size: 12px;
color: $theme_color;
}
.goods-page {
margin:10px auto ;
text-align: right;
width: 1200px;
}

View File

@@ -6,79 +6,4 @@
@table-thead-bg : #f8f8f9;
@table-td-stripe-bg : #f8f8f9;
@table-td-hover-bg : #ededed;
@table-td-highlight-bg : #ededed;
//
//.colorPaletteMixin() {
// @functions: ~`(function() {
// var hueStep = 2;
// var saturationStep = 0.16;
// var saturationStep2 = 0.05;
// var brightnessStep1 = 0.05;
// var brightnessStep2 = 0.15;
// var lightColorCount = 5;
// var darkColorCount = 4;
//
// var getHue = function(hsv, i, isLight) {
// var hue;
// if (hsv.h >= 60 && hsv.h <= 240) {
// hue = isLight ? hsv.h - hueStep * i : hsv.h + hueStep * i;
// } else {
// hue = isLight ? hsv.h + hueStep * i : hsv.h - hueStep * i;
// }
// if (hue < 0) {
// hue += 360;
// } else if (hue >= 360) {
// hue -= 360;
// }
// return Math.round(hue);
// };
// var getSaturation = function(hsv, i, isLight) {
// var saturation;
// if (isLight) {
// saturation = hsv.s - saturationStep * i;
// } else if (i === darkColorCount) {
// saturation = hsv.s + saturationStep;
// } else {
// saturation = hsv.s + saturationStep2 * i;
// }
// if (saturation > 1) {
// saturation = 1;
// }
// if (isLight && i === lightColorCount && saturation > 0.1) {
// saturation = 0.1;
// }
// if (saturation < 0.06) {
// saturation = 0.06;
// }
// return Number(saturation.toFixed(2));
// };
// var getValue = function(hsv, i, isLight) {
// var value;
// if (isLight) {
// value = hsv.v + brightnessStep1 * i;
// }else{
// value = hsv.v - brightnessStep2 * i
// }
// if (value > 1) {
// value = 1;
// }
// return Number(value.toFixed(2))
// };
//
// this.colorPalette = function(color, index) {
// var isLight = index <= 6;
// var hsv = tinycolor(color).toHsv();
// var i = isLight ? lightColorCount + 1 - index : index - lightColorCount - 1;
// return tinycolor({
// h: getHue(hsv, i, isLight),
// s: getSaturation(hsv, i, isLight),
// v: getValue(hsv, i, isLight),
// }).toHexString();
// };
//})()`;
//}
//.colorPaletteMixin();
@table-td-highlight-bg : #ededed;

View File

@@ -1,114 +0,0 @@
/*
* @Author: LMR
* @Date: 2020-08-14 11:04:12
* @Last Modified by: LMR
* @Last Modified time: 2020-08-18 14:21:41
*/
// 主题颜色
// 明亮主题颜色
$primary_color: #2d8cf0;
$primary_light_color: #0f1011;
$primary_dark_color: #2b85e4;
$success_color: #19be6b;
$warning_color: #ff9900;
$error_color: #ed3f14;
$handle-btn-color: #438cde;
$theme_color: #ed3f14;
$border_color: #dddee1;
$title_color: #8c8c8c;
$light_title_color: #1c2438;
$light_content_color: #495060;
$light_sub_color: #80848f;
$light_background_color: #f8f8f9;
$light_white_background_color :#fff;
// 暗黑主题颜色
$dark_background_color: #141414;
$dark_sub_background_color: #1d1d1d; //稍微浅一点的
$dark_content_color: #d5d5d5;
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
// 背景颜色
@mixin background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
// 辅助背景颜色
@mixin sub_background_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_background_color;
}
}
@mixin white_background_color() {
/*通过该函数设置字体颜色,后期方便统一管理;*/
background-color: $light_white_background_color;
transition: 0.35s;
[data-theme="dark"] & {
background-color: $dark_sub_background_color;
}
[data-theme="light"] & {
background-color: $light_white_background_color;
}
}
// 正文颜色
@mixin content_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_content_color;
}
}
// 辅助颜色
@mixin sub_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_sub_color;
}
}
// 标题颜色
@mixin title_color($color) {
/*通过该函数设置字体颜色,后期方便统一管理;*/
color: $color;
[data-theme="dark"] & {
color: $dark_content_color;
}
[data-theme="light"] & {
color: $light_title_color;
}
}

View File

@@ -2,7 +2,7 @@
<div>
<div class="container">
<img
:src="logoImg"
:src="$store.state.logoImg"
v-if="showLogo"
class="logo-img"
alt=""
@@ -27,6 +27,7 @@
<Tag
v-for="(item, index) in promotionTags"
:key="index"
class="mr_10"
>
<span class="hover-color" @click="selectTags(item)">{{ item }}</span>
</Tag>
@@ -37,7 +38,7 @@
</template>
<script>
import {getLogo} from '@/api/common.js'
import storage from '@/plugins/storage.js'
import {hotWords} from '@/api/goods.js'
export default {
name: 'search',
@@ -61,9 +62,7 @@ export default {
},
data () {
return {
searchData: '', // 搜索内容
logoImg: '', // pc端展示logo
promotionTags: [] // 热门搜索列表
searchData: '' // 搜索内容
};
},
methods: {
@@ -81,30 +80,36 @@ export default {
this.$emit('search', this.searchData)
}
},
mounted () {
if (!this.Cookies.getItem('logo')) {
getLogo().then(res => {
if (res.success) {
let logoObj = JSON.parse(res.result.settingValue)
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
this.logoImg = logoObj.buyerSideLogo
}
})
} else {
this.logoImg = this.Cookies.getItem('logo')
computed: {
promotionTags () {
if (this.$store.state.hotWordsList) {
return JSON.parse(this.$store.state.hotWordsList)
} else {
return []
}
}
},
created () {
this.searchData = this.$route.query.keyword
if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口
hotWords({start: 1, end: 5}).then(res => {
if (res.success) this.promotionTags = res.result
})
// 搜索热词每5分钟请求一次
const reloadTime = storage.getItem('hotWordsReloadTime')
const time = new Date().getTime() - 5 * 60 * 1000
if (!reloadTime) {
hotWords({count: 5}).then(res => {
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
})
storage.setItem('hotWordsReloadTime', new Date().getTime())
} else if (reloadTime && time > reloadTime) {
hotWords({count: 5}).then(res => {
if (res.success && res.result) storage.setItem('hotWordsList', res.result)
})
storage.setItem('hotWordsReloadTime', new Date().getTime())
}
}
}
};
</script>
<style scoped lang="scss">
.container {
margin: 30px auto;
@@ -152,6 +157,6 @@ export default {
position: relative;
height: 0px;
top: -38px;
left: 336px;
left: 339px;
}
</style>

View File

@@ -1,110 +0,0 @@
<template>
<div class="wrapper">
<empty v-if="list.length==0" />
<ul class="coupon-list" v-else>
<li v-for="(item, index) in list" class="coupon-item" :key="index">
<div class="c-left">
<div>
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span></span>
<span class="describe">{{item.consumeThreshold}}元可用</span>
</div>
<p>使用范围{{useScope(item.scopeType, item.storeName)}}</p>
<p>有效期{{item.endTime}}</p>
</div>
<b></b>
<a class="c-right" @click="go(item)">立即使用</a>
<i class="circle-top"></i>
<i class="circle-bottom"></i>
</li>
</ul>
<Page :total="total" @on-change="changePageNum"
v-if="list.length && total > params.pageNumber"
class="pageration"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
<Spin v-if="loading" fix></Spin>
</div>
</template>
<script>
import { memberCouponList } from '@/api/member.js';
export default {
data () {
return {
loading: false, // 列表加载状态
params: { // 请求参数
pageNumber: 1,
pageSize: 10
},
total: 0, // 优惠券总数
list: [] // 优惠券列表
};
},
methods: {
getList () { // 获取优惠券列表
this.loading = true
memberCouponList(this.params).then(res => {
this.loading = false
if (res.success) {
this.list = res.result.records
this.total = res.result.total
}
})
},
go (item) { // 根据使用条件跳转商品列表页面
if (item.storeId !== 'platform') {
this.$router.push({path: '/merchant', query: {id: item.storeId}})
} else {
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
this.$router.push({path: '/goodsList', query: {categoryId: item.scopeId}})
} else {
this.$router.push({path: '/goodsList'})
}
}
},
changePageNum (val) { // 分页改变页码
this.params.pageNumber = val;
this.getList()
},
changePageSize (val) { // 分页改变页数
this.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
useScope (type, storeName) { // 根据字段返回 优惠券适用范围
let shop = '平台';
let goods = '全部商品'
if (storeName !== 'platform') shop = storeName
switch (type) {
case 'ALL':
goods = '全部商品'
break;
case 'PORTION_GOODS':
goods = '部分商品'
break;
case 'PORTION_GOODS_CATEGORY':
goods = '部分分类商品'
break;
}
return `${shop}${goods}可用`
}
},
mounted () {
this.getList()
}
};
</script>
<style scoped lang="scss">
@import '../../assets/styles/coupon.scss';
.pageration {
text-align: right;
}
</style>

View File

@@ -36,9 +36,11 @@ export default {
},
components: {drawerPage},
computed: {
// 用户信息
userInfo () {
return Storage.getItem('userInfo');
},
// 购物车商品数量
cartNum () {
return this.$store.state.cartNum
}

View File

@@ -35,6 +35,6 @@ export default {
}
p {
cursor: pointer;
@include sub_color($light_sub_color);
}
</style>

View File

@@ -53,10 +53,10 @@ export default {
data () {
return {
guideArr: [ // 导航链接
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题', '大家电', '联系客服' ],
[ '配送方式', '上门自提', '211限时达', '配送服务查询', '收取标准', '海外配送' ],
[ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ],
[ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退货', '取消订单' ]
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题' ],
[ '配送方式', '上门自提', '配送服务查询', '收取标准', '物流规则' ],
[ '支付方式', '在线支付', '公司转账', '余额支付', '积分支付' ],
[ '售后服务', '售后政策', '退款说明', '返修/退货', '取消订单' ]
],
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
year: new Date().getFullYear() // 当前年份
@@ -77,7 +77,7 @@ export default {
/*****************************底 部 开 始*****************************/
.footer {
width: 100%;
height: 450px;
height: 380px;
padding-top: 30px;
@include background_color($light_background_color);
@@ -124,7 +124,6 @@ export default {
}
.servece-type {
margin: 15px auto;
height: 200px;
width: 800px;
display: flex;
flex-direction: row;

View File

@@ -7,7 +7,7 @@ import FixedTopPage from '@/components/advertising/FixedTop'; // 顶部广告
import Footer from '@/components/footer/Footer'; // 底部栏
import Search from '@/components/Search' // 搜索框
import card from '@/components/card' // 个人中心 卡片
import cateNav from '@/components/nav/cateNav' // 个人中心 卡片
import cateNav from '@/components/nav/CateNav' // 个人中心 卡片
empty.install = function (Vue) {
Vue.component('empty', empty);

View File

@@ -8,7 +8,7 @@
<div v-else>{{end}}</div>
</div>
<span v-else class="cart-promotion">
<span v-if="end === ''">活动结束<span>{{ hours }}</span> : <span>{{ minutes }}</span> : <span>{{ seconds }}</span></span>
<span v-if="end === ''">活动结束<span>{{ hours }}</span> : <span>{{ minutes }}</span> : <span>{{ seconds }}</span></span>
<span v-else>活动已结束</span>
</span>
</div>

View File

@@ -138,12 +138,13 @@
<script>
import Promotion from './Promotion.vue';
import PicZoom from 'vue-piczoom'; // 图片放大 https://github.com/826327700/vue-piczoom
import PicZoom from 'vue-piczoom'; // 图片放大
import { collectGoods, isCollection, receiveCoupon, cancelCollect } from '@/api/member.js';
import { addCartGoods } from '@/api/cart.js';
export default {
name: 'ShowGoods',
props: {
// 商品数据
detail: {
type: Object,
default: null
@@ -154,7 +155,7 @@ export default {
count: 1, // 商品数量
imgIndex: 0, // 展示图片下标
currentSelceted: [], // 当前商品sku
imgList: this.detail.data.specList[0].specImage || [{}], // 商品图片列表
imgList: [{}], // 商品图片列表
skuDetail: this.detail.data, // sku详情
goodsSpecList: this.detail.specs, // 商品spec
promotionMap: { // 活动状态
@@ -168,14 +169,10 @@ export default {
isCollected: false // 是否收藏
};
},
components: {
PicZoom,
Promotion
},
components: { PicZoom, Promotion },
methods: {
select (index, value) { // 选择规格
this.$set(this.currentSelceted, index, value);
let selectedSkuId = this.goodsSpecList.find((i) => {
let matched = true;
let specValues = i.specValues.filter((j) => j.specName !== 'images');
@@ -189,7 +186,6 @@ export default {
return i;
}
});
console.log(selectedSkuId);
this.$router.push({
path: '/goodsDetail',
query: { skuId: selectedSkuId.skuId, goodsId: this.skuDetail.goodsId }
@@ -203,7 +199,6 @@ export default {
};
this.loading = true;
addCartGoods(params).then(res => {
debugger;
this.loading = false;
if (res.success) {
this.$router.push({path: '/shoppingCart', query: {detail: this.skuDetail, count: this.count}});
@@ -211,7 +206,6 @@ export default {
this.$Message.warning(res.message);
}
}).catch(() => {
console.log('catch');
this.loading = false;
});
},
@@ -237,22 +231,6 @@ export default {
this.loading1 = false;
});
},
pointPay () { // 积分购买
const params = {
num: this.count,
skuId: this.skuDetail.id,
cartType: 'BUY_NOW'
};
this.loading1 = true;
addCartGoods(params).then(res => {
this.loading1 = false;
if (res.success) {
this.$router.push({path: '/pay', query: {way: 'POINT'}});
} else {
this.$Message.warning(res.message);
}
});
},
async collect () { // 收藏商品
if (this.isCollected) {
let cancel = await cancelCollect('GOODS', this.skuDetail.id)
@@ -268,10 +246,9 @@ export default {
}
}
},
// 格式化数据
formatSku (list) {
// 格式化数据
let arr = [{}];
list.forEach((item, index) => {
item.specValues.forEach((spec, specIndex) => {
let name = spec.specName;
@@ -349,7 +326,11 @@ export default {
}
})
}
this.detail.data.specList.forEach(e => {
if (e.specName === 'images') {
this.imgList = e.specImage
}
})
this.formatSku(this.goodsSpecList);
this.promotion()
document.title = this.skuDetail.goodsName
@@ -365,7 +346,7 @@ export default {
}
.inventory {
padding-left: 4px;
@include sub_color($light_sub_color);
}
.global_color {
@@ -492,10 +473,8 @@ export default {
.item-detail-price-row {
padding: 10px;
display: flex;
// width: 555px;
flex-direction: row;
justify-content: space-between;
// @include background_color($light_background_color);
background: url("../../assets/images/goodsDetail/price-bg.png");
}
@@ -579,9 +558,6 @@ export default {
}
.item-select-row {
// display: flex;
// flex-direction: row;
// flex-wrap: wrap;
margin-bottom: 8px;
}
@@ -591,10 +567,6 @@ export default {
align-items: center;
}
.item-select-img {
width: 36px;
}
.item-select-box {
padding: 5px;
margin-right: 8px;
@@ -612,31 +584,11 @@ export default {
border: 0.5px solid $theme_color;
}
.item-select-box-disabled {
background-color: gray;
}
.item-select-img img {
width: 100%;
}
.item-select-intro p {
margin: 0px;
padding: 5px;
}
.item-select-class {
padding: 5px;
margin-right: 8px;
@include sub_background_color($light_background_color);
border: 0.5px solid #ccc;
cursor: pointer;
}
.item-select-class:hover {
border: 0.5px solid $theme_color;
}
.add-buy-car-box {
width: 100%;
margin-top: 15px;
@@ -645,6 +597,9 @@ export default {
.add-buy-car {
margin-top: 15px;
>*{
margin: 0 4px;
}
}
.goodsConfig {

View File

@@ -1,23 +1,6 @@
<template>
<div>
<div class="item-intro-show">
<!-- <div class="item-intro-recommend">
<div class="item-recommend-title">
<p>店铺热销</p>
</div>
<div class="item-intro-recommend-column">
<div class="item-recommend-column" v-for="(item, index) in hotList" :key="index">
<div class="item-recommend-img">
<img :src="item.img" alt="">
</div>
<div class="item-recommend-intro">
<span>
<span class="item-recommend-top-num">{{index + 1}}</span> 热销{{item.sale}}</span>
<span class="item-recommend-price">{{item.price | unitPrice}}</span>
</div>
</div>
</div>
</div> -->
<div class="item-intro-detail" ref="itemIntroDetail">
<div class="item-intro-nav item-tabs">
<Tabs :animated="false" @on-click="tabClick">
@@ -31,8 +14,8 @@
<div class="remarks-container" ref="itemGoodsComment">
<div class="remarks-analyse-box">
<div class="remarks-analyse-goods">
<i-circle :percent="skuDetail.grade || 100" stroke-color="#5cb85c">
<span class="remarks-analyse-num">{{skuDetail.grade || 100}}%</span>
<i-circle :percent="skuDetail.grade" stroke-color="#5cb85c">
<span class="remarks-analyse-num">{{skuDetail.grade}}%</span>
<p class="remarks-analyse-title">好评率</p>
</i-circle>
</div>
@@ -131,7 +114,8 @@ export default {
};
},
computed: {
skuDetail () { // skuId
// 商品详情
skuDetail () {
return this.detail.data;
}
},
@@ -222,6 +206,9 @@ export default {
});
window.addEventListener('scroll', this.handleScroll)
this.getList();
if (this.skuDetail.grade === null || this.skuDetail.grade === undefined) {
this.skuDetail.grade = 100
}
}
};
</script>
@@ -406,7 +393,8 @@ export default {
margin-right: 5px;
width: 50px;
height: 50px;
img{width: 100%;}
overflow: hidden;
img{width: 100%;height: 100%;}
}
}
.preview-img{
@@ -433,9 +421,6 @@ export default {
}
}
img:hover{
cursor: url(require('../../../static/small.cur')),auto;
}
}
}

View File

@@ -2,6 +2,7 @@
<div class="box">
<div class="nav">
<ul class="location">
<li v-if="$route.path.includes('home')" style="margin-left:10px"><router-link to="/">首页</router-link></li>
</ul>
<ul class="detail">
<li class="first" v-show="!userInfo.username">
@@ -16,10 +17,10 @@
</li>
<li v-show="!!userInfo.username">
<div class="username-p">
<p>
<div>
<Avatar class="person-icon" :src="userInfo.face" icon="person" size="small" />
<span class="username">{{ userInfo.nickName? userInfo.nickName : userInfo.username | secrecyMobile }}</span>
</p>
</div>
<transition name='fade'>
<ul class="drop-items">
<li @click="goUserCenter('/home')">我的主页</li>
@@ -38,15 +39,10 @@
<Dropdown placement="bottom-start">
<router-link to="/cart" target="_blank">
<span @mouseenter="getCartList">
<Icon
size="18"
type="ios-cart-outline"
></Icon>
<Icon size="18" type="ios-cart-outline"></Icon>
购物车
</span>
</router-link>
<DropdownMenu slot="list">
<div class="shopping-cart-null" style="width:200px" v-show="shoppingCart.length <= 0">
<Icon type="ios-cart-outline" class="cart-null-icon"></Icon>
@@ -82,9 +78,6 @@
<li>
<span class="nav-item" @click="shopEntry">店铺入驻</span>
</li>
<!-- <li>
<router-link to="/feedback">意见反馈</router-link>
</li>-->
</ul>
</div>
</div>
@@ -103,21 +96,17 @@ export default {
data () {
return {
// 主题颜色切换
themeType: 'light',
userInfo: {}, // 用户信息
shoppingCart: [] // 购物车
};
},
computed: {
// 购物车商品数量
cartNum () {
return this.$store.state.cartNum;
}
},
methods: {
changeCity (city) { // 选择所在城市
this.city = city;
},
goToPay () { // 跳转购物车
let url = this.$router.resolve({
path: '/cart'
@@ -139,7 +128,7 @@ export default {
this.$router.push('/login');
},
goUserCenter (path) {
// 跳转我的订单,我的足迹
// 跳转我的订单,我的足迹、收藏等
if (this.userInfo.username) {
this.$router.push({ path: path });
} else {
@@ -195,7 +184,7 @@ export default {
.first,
.username,
.shopping-cart-null span {
@include sub_color($light_sub_color);
}
.box {
@@ -319,8 +308,11 @@ export default {
}
.username-p {
position: relative;
p{
div{
cursor: pointer;
>span{
margin-left: 5px;
}
}
.drop-items {
position: absolute;

View File

@@ -18,7 +18,7 @@ export default {
}
},
computed: {
cartNum () { // 购物车数量
cartNum () { // 购物车商品数量
return this.$store.state.cartNum
}
},

View File

@@ -14,7 +14,7 @@
</div>
</template>
<script>
import ModelFormItem from './modelFormItem.vue';
import ModelFormItem from './ModelFormItem.vue';
export default {
name: 'modelForm',
components: {
@@ -25,9 +25,7 @@ export default {
</script>
<style lang="scss" scoped>
.model-content {
width: 1200px;
margin: 0 auto;
// background: #fff;
width: 100%;
min-height: 1200px;
}
</style>

View File

@@ -2,11 +2,17 @@
<div class="model-item" v-if="element && element.key">
<!-- 轮播图模块包括个人信息快捷导航模块 -->
<template v-if="element.type == 'carousel'">
<model-carousel :data="element" class="mb_20"></model-carousel>
<model-carousel :data="element" class="mb_20 width_1200_auto"></model-carousel>
</template>
<template v-if="element.type == 'carousel1'">
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
</template>
<template v-if="element.type == 'carousel2'">
<model-carousel2 :data="element" class="mb_20 width_1200_auto"></model-carousel2>
</template>
<!-- 热门广告 -->
<template v-if="element.type == 'hotAdvert'">
<div class="mb_20">
<div class="mb_20 width_1200_auto">
<img
style="display: block"
class="hover-pointer"
@@ -16,7 +22,7 @@
alt=""
/>
</div>
<ul class="advert-list">
<ul class="advert-list width_1200_auto">
<template v-for="(item, index) in element.options.list">
<li
v-if="index !== 0"
@@ -30,16 +36,14 @@
</ul>
</template>
<!-- 限时秒杀 待完善 -->
<!-- <template v-if="element.type == 'seckill'">
<seckill :data="element"></seckill>
</template> -->
<template v-if="element.type == 'seckill' && element.options.list.length">
<seckill :data="element" class="mb_20 width_1200_auto"></seckill>
</template>
<!-- 折扣广告 -->
<template v-if="element.type == 'discountAdvert'">
<div
class="discountAdvert mb_20"
:style="{
'background-image': 'url(' + element.options.bgImg.img + ')',
}"
class="discountAdvert"
:style="{'backgroundImage' :'url(' + require('@/assets/images/decorate.png') + ')'}"
>
<img
@click="linkTo(item.url)"
@@ -66,15 +70,15 @@
<!-- 好货推荐 -->
<template v-if="element.type == 'recommend'">
<recommend :data="element" class="mb_20"></recommend>
<recommend :data="element" class="mb_20 width_1200_auto"></recommend>
</template>
<!-- 新品排行 -->
<template v-if="element.type == 'newGoodsSort'">
<new-goods-sort :data="element" class="mb_20"></new-goods-sort>
<new-goods-sort :data="element" class="mb_20 width_1200_auto"></new-goods-sort>
</template>
<!-- 首页广告 -->
<template v-if="element.type == 'firstAdvert'">
<first-page-advert :data="element" class="mb_20"></first-page-advert>
<first-page-advert :data="element" class="mb_20 width_1200_auto"></first-page-advert>
</template>
<!-- 横幅广告 -->
<template v-if="element.type == 'bannerAdvert'">
@@ -87,24 +91,28 @@
/>
</template>
<template v-if="element.type == 'notEnough'">
<not-enough :data="element" class="mb_20"></not-enough>
<not-enough :data="element" class="mb_20 width_1200_auto"></not-enough>
</template>
</div>
</template>
<script>
import ModelCarousel from './modelList/carousel.vue';
import FirstPageAdvert from './modelList/firstPageAdvert.vue';
import NewGoodsSort from './modelList/newGoodsSort.vue';
import Recommend from './modelList/recommend.vue';
import NotEnough from './modelList/notEnough.vue';
import Seckill from './modelList/seckill.vue';
import ModelCarousel from './modelList/Carousel.vue';
import ModelCarousel1 from './modelList/Carousel1.vue';
import ModelCarousel2 from './modelList/Carousel2.vue';
import FirstPageAdvert from './modelList/FirstPageAdvert.vue';
import NewGoodsSort from './modelList/NewGoodsSort.vue';
import Recommend from './modelList/Recommend.vue';
import NotEnough from './modelList/NotEnough.vue';
import Seckill from './modelList/Seckill.vue';
export default {
name: 'modelFormItem',
props: ['element', 'select', 'index', 'data'],
components: {
ModelCarousel,
ModelCarousel1,
ModelCarousel2,
Recommend,
NewGoodsSort,
FirstPageAdvert,
@@ -120,9 +128,9 @@ export default {
};
</script>
<style lang="scss" scoped>
.model-item {
position: relative;
background-color: #fff;
}
/** 热门广告 */
@@ -144,25 +152,20 @@ export default {
}
}
}
/** 限时秒杀 */
.limit-img {
display: flex;
flex-direction: row;
img {
width: 300px;
height: 100px;
}
}
/** 折扣广告 */
.discountAdvert {
width: 1300px;
height: 566px;
margin: 0 auto;
margin-bottom: 20px;
background-repeat: no-repeat;
margin-left: -97px;
position: relative;
left: -47px;
padding-left: 295px;
display: flex;
flex-wrap: wrap;
align-items: start;
align-items: flex-start;
img {
margin-top: 10px;
margin-right: 10px;
@@ -173,113 +176,10 @@ export default {
}
}
}
/** 首页品牌 */
.brand {
.brand-view {
display: flex;
margin-top: 10px;
.brand-view-content {
width: 470px;
margin-left: 10px;
img {
width: 100%;
height: 316px;
}
.brand-view-title {
height: 50px;
padding: 0 5px;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.brand-view-content:first-child {
width: 240px;
margin-left: 0;
}
}
.brand-list {
margin-top: 10px;
display: flex;
align-items: center;
flex-wrap: wrap;
li {
width: 121px;
height: 112px;
position: relative;
overflow: hidden;
border: 1px solid #f5f5f5;
margin: -1px -1px 0 0;
&:hover {
.brand-mash {
display: flex;
}
}
.brand-img {
text-align: center;
margin-top: 30px;
img {
width: 100px;
height: auto;
}
}
.brand-mash {
display: none;
position: absolute;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
width: inherit;
height: inherit;
font-size: 12px;
font-weight: bold;
.ivu-icon {
position: absolute;
right: 10px;
top: 10px;
font-size: 15px;
}
align-items: center;
justify-content: center;
flex-direction: column;
color: #fff;
cursor: pointer;
div:last-child {
background-color: $theme_color;
border-radius: 9px;
padding: 0 10px;
margin-top: 5px;
}
}
}
.refresh {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
.ivu-icon {
font-size: 18px;
transition: all 0.3s ease-out;
}
&:hover {
background-color: $theme_color;
color: #fff;
.ivu-icon {
transform: rotateZ(360deg);
}
}
}
}
}
/** 装修模态框 内部样式start */
.modal-top-advert {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
> * {
margin-bottom: 10px;
}
.width_1200_auto{
width: 1200px;
margin: 0 auto;
background-color: #fff;
}
</style>

View File

@@ -0,0 +1,76 @@
<template>
<div class="model-carousel1" :style="{background: bgColor}">
<div class="nav-body clearfix">
<!-- 侧边导航 -->
<div class="nav-side"></div>
<div class="nav-content">
<!-- 轮播图 -->
<Carousel autoplay @on-change="autoChange">
<CarouselItem v-for="(item, index) in data.options.list" :key="index" >
<div style="overflow: hidden">
<img :src="item.img" width="1200" height="470" />
</div>
</CarouselItem>
</Carousel>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'modelCarousel1',
props: ['data'],
data () {
return {
showModal: false, // modal显隐
selected: null, // 已选数据
picModelFlag: false, // 选择图片modal
bgColor: '#fff' // 轮播背景色
};
},
mounted () {
this.bgColor = this.data.options.list[0].bgColor
},
methods: {
// 自动切换时改变背景色
autoChange (oVal, val) {
this.bgColor = this.data.options.list[val].bgColor
}
}
};
</script>
<style scoped lang="scss">
.model-carousel1 {
width: 100%;
height: 470px;
background: #fff;
}
/*大的导航信息,包含导航,幻灯片等*/
.nav-body {
width: 1200px;
height: 470px;
margin: 0px auto;
}
.nav-side {
height: 470px;
width: 200px;
padding: 0px;
color: #fff;
line-height: 470px;
text-align: center;
position: absolute;
z-index: 1;
}
/*导航内容*/
.nav-content {
width: 1200px;
height: 470px;
overflow: hidden;
float: left;
position: relative;
}
</style>

View File

@@ -0,0 +1,211 @@
<template>
<div class="model-carousel2">
<div class="nav-body clearfix">
<!-- 侧边导航 -->
<div class="nav-side"></div>
<div class="nav-content">
<!-- 轮播图 -->
<Carousel autoplay>
<CarouselItem v-for="(item, index) in data.options.list" :key="index">
<div style="overflow: hidden">
<img :src="item.img" width="590" height="470" />
</div>
</CarouselItem>
</Carousel>
</div>
<div class="nav-content1">
<!-- 轮播图 -->
<Carousel autoplay :autoplay-speed="5000">
<CarouselItem v-for="(item, index) in data.options.listRight" :key="index">
<div class="mb_10">
<img :src="item[0].img" width="190" height="150" />
</div>
<div class="mb_10">
<img :src="item[1].img" width="190" height="150" />
</div>
<div>
<img :src="item[2].img" width="190" height="150" />
</div>
</CarouselItem>
</Carousel>
</div>
<div class="nav-right">
<div class="person-msg">
<img :src="userInfo.face" v-if="userInfo.face" alt />
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
<div>Hi{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
<div v-if="userInfo.id">
<Button type="error" shape="circle">会员中心</Button>
</div>
<div v-else>
<Button type="error" shape="circle">请登录</Button>
</div>
</div>
<div class="shop-msg">
<div>
<span>常见问题</span>
<ul class="article-list">
<li class="ellipsis" :alt="article.title" v-for="(article, index) in articleList" :key="index" @click="goArticle(article.id)">
{{article.title}}
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {articleList} from '@/api/common.js'
import storage from '@/plugins/storage';
export default {
name: 'modelCarousel2',
props: ['data'],
data () {
return {
userInfo: {}, // 用户信息
articleList: [], // 常见问题
params: { // 请求常见问题参数
pageNumber: 1,
pageSize: 10,
type: 'ANNOUNCEMENT',
sort: 'sort'
}
};
},
methods: {
getArticleList () { // 获取常见问题列表
articleList(this.params).then(res => {
if (res.success) {
this.articleList = res.result.records
}
})
},
goArticle (id) { // 跳转文章详情
let routeUrl = this.$router.resolve({
path: '/article',
query: {id}
});
window.open(routeUrl.href, '_blank');
}
},
mounted () {
if (storage.getItem('userInfo')) this.userInfo = JSON.parse(storage.getItem('userInfo'));
this.getArticleList()
}
};
</script>
<style scoped lang="scss">
.model-carousel2 {
width: 1200px;
height: 470px;
overflow: hidden;
}
.nav-item li {
float: left;
font-size: 16px;
font-weight: bold;
margin-left: 30px;
}
.nav-item a {
text-decoration: none;
color: #555555;
}
.nav-item a:hover {
color: $theme_color;
}
/*大的导航信息,包含导航,幻灯片等*/
.nav-body {
width: 1200px;
height: 470px;
margin: 0px auto;
}
.nav-side {
height: 100%;
width: 200px;
padding: 0px;
color: #fff;
float: left;
background-color: #6e6568;
line-height: 470px;
text-align: center;
}
/*导航内容*/
.nav-content,.nav-content1 {
width: 590px;
height: 470px;
overflow: hidden;
float: left;
position: relative;
margin-left: 10px;
}
.nav-content1{
width: 190px;
}
.nav-right {
float: left;
width: 190px;
margin-left: 10px;
.person-msg {
display: flex;
align-items: center;
flex-direction: column;
margin: 20px auto;
button {
height: 25px !important;
margin-top: 10px;
}
.ivu-btn-default {
color: $theme_color;
border-color: $theme_color;
}
img {
margin-bottom: 10px;
width: 80px;
height: 80px;
border-radius: 50%;
}
}
.shop-msg {
div {
width: 100%;
margin: 10px 27px;
span {
cursor: pointer;
text-align: center;
font-weight: bold;
margin-left: 5px;
}
span:nth-child(1) {
@include content_color($theme_color);
margin-left: 0;
}
span:nth-child(2) {
font-weight: normal;
}
span:nth-child(3):hover {
color: $theme_color;
}
}
ul {
li {
cursor: pointer;
margin: 5px 0;
color: #999395;
width: 150px;
font-size: 12px;
&:hover {
color: $theme_color;
}
}
}
}
}
</style>

View File

@@ -231,4 +231,4 @@ export default {
margin-top: 15px;
}
}
</style>
</style>

View File

@@ -0,0 +1,323 @@
<template>
<div class="seckill">
<div class="aside hover-pointer" @click="goToSeckill">
<div class="title">{{ actName }}</div>
<div class="hour">
<span>{{ currHour }}:00</span>点场 倒计时
</div>
<div class="count-down" v-if="actStatus === 1">
<span>{{ hours }}</span>
<span>{{ minutes }}</span>
<span>{{ seconds }}</span>
</div>
<div class="act-status" v-else>未开始</div>
</div>
<swiper :options="swiperOption" ref="mySwiper">
<swiper-slide v-for="(item,index) in goodsList" :key="index">
<div class="content hover-pointer" @click="goToSeckill">
<img :src="item.goodsImage" width="140" height="140" :alt="item.goodsName">
<div class="ellipsis">{{item.goodsName}}</div>
<div>
<span>{{ item.price | unitPrice('¥') }}</span>
<span>{{ item.originalPrice | unitPrice('¥') }}</span>
</div>
</div>
</swiper-slide>
<div class="swiper-button-prev" slot="button-prev">
<Icon type="ios-arrow-back" />
</div>
<div class="swiper-button-next" slot="button-next">
<Icon type="ios-arrow-forward" />
</div>
</swiper>
</div>
</template>
<script>
// 引入插件
import { swiper, swiperSlide } from 'vue-awesome-swiper';
import 'swiper/dist/css/swiper.css';
export default {
components: {
swiper,
swiperSlide
},
props: {
data: Object
},
data () {
return {
list: [], // 秒杀时段列表
goodsList: [], // 商品列表
actStatus: 0, // 0 未开始 1 进行中
actName: '限时秒杀', // 活动名称
currIndex: 0, // 当前时间段的下标
currHour: '00', // 当前秒杀场
diffSeconds: 0, // 倒计时秒数
hours: 0, // 小时
minutes: 0, // 分钟
seconds: 0, // 秒
interval: null, // 定时器
swiperOption: { // 轮播图参数
loop: true,
slidesPerView: 5,
// 设置点击箭头
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
}
}
};
},
watch: {
currIndex (val) {
clearInterval(this.interval)
this.interval = null
this.countDown(val)
this.goodsList = this.list[val].seckillGoodsList
},
diffSeconds (val) {
const hours = Math.floor(val / 3600);
// 当前秒数 / 60向下取整
// 获取到所有分钟数 3600 / 60 = 60分钟
// 对60取模超过小时数的分钟数
const minutes = Math.floor(val / 60) % 60;
// 当前的秒数 % 60获取到 超过小时数、分钟数的秒数(秒数)
const seconds = val % 60;
this.hours = filteTime(hours)
this.minutes = filteTime(minutes)
this.seconds = filteTime(seconds)
if (val <= 0) {
clearInterval(this.interval)
this.interval = null
}
function filteTime (time) {
if (time < 10) {
return '0' + time
} else {
return time
}
}
}
},
computed: {
swiper () { // 轮播组件
return this.$refs.mySwiper.swiper;
}
},
beforeDestroy () {
// 销毁前清除定时器
clearInterval(this.interval);
},
mounted () {
this.getListByDay()
},
methods: {
goToSeckill () { // 跳转秒杀页面
let routeUrl = this.$router.resolve({
path: '/seckill'
});
window.open(routeUrl.href, '_blank');
},
countDown (currIndex) { // 倒计时
// 0点时间戳
let zeroTime = new Date(new Date().toLocaleDateString()).getTime();
let currTime = new Date().getTime()
let actTime = 0;
let nowHour = new Date().getHours(); // 当前小时数
if (this.list[currIndex].timeLine > nowHour) { // 活动未开始
this.actStatus = 0;
actTime = zeroTime + this.list[currIndex].timeLine * 3600 * 1000
} else if (this.list[currIndex].timeLine <= nowHour) { // 活动进行中
this.actStatus = 1;
if (currIndex === this.list.length - 1) { // 如果是最后一个活动直到24点结束
actTime = zeroTime + 24 * 3600 * 1000
} else {
actTime = zeroTime + this.list[currIndex + 1].timeLine * 3600 * 1000
}
}
this.currHour = this.list[this.currIndex].timeLine
this.diffSeconds = Math.floor((actTime - currTime) / 1000)
this.interval = setInterval(() => {
this.diffSeconds--
}, 1000)
},
getListByDay () { // 当天秒杀活动
// const list = [
// {
// timeLine: 18,
// seckillGoodsList: [
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12}
// ]
// }
// ]
this.list = this.data.options.list
this.goodsList = this.list[0].seckillGoodsList
this.countDown(this.currIndex)
}
}
};
</script>
<style lang="scss" scoped>
.seckill {
width: 100%;
height: 260px;
display: flex;
background-color: #eee;
.aside {
overflow: hidden;
width: 190px;
height: 100%;
color: #fff;
background-image: url("../../../assets/images/seckillBg.png");
.title {
width: 100%;
text-align: center;
font-size: 28px;
margin-top: 31px;
}
.hour {
margin-top: 90px;
text-align: center;
span {
font-size: 18px;
}
}
.count-down {
margin: 10px 0 0 30px;
> span {
position: relative;
float: left;
width: 30px;
height: 30px;
text-align: center;
background-color: #2f3430;
margin-right: 20px;
color: white;
font-size: 20px;
&::after {
content: ":";
display: block;
position: absolute;
right: -20px;
font-weight: bolder;
font-size: 18px;
width: 20px;
height: 100%;
top: 0;
}
}
> span:last-child::after {
content: "";
}
}
.act-status {
margin: 10px 0 0 65px;
font-size: 20px;
}
}
.content {
width: 200px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: relative;
&::after {
content: "";
display: block;
position: absolute;
top: 50%;
right: 0;
width: 1px;
height: 200px;
transform: translateY(-50%);
background: linear-gradient(180deg, white, #eeeeee, white);
}
img {
margin-top: 30px;
}
> div {
width: 160px;
margin-top: 10px;
font-size: 12px;
position: relative;
}
> div:nth-of-type(1):hover {
color: $theme_color;
cursor: pointer;
}
> div:nth-of-type(2) {
border: 1px solid $theme_color;
line-height: 24px;
display: flex;
text-align: center;
span:nth-child(1) {
color: #fff;
font-size: 16px;
width: 92px;
background-color: $theme_color;
position: relative;
&::before {
content: " ";
width: 0;
height: 0;
border-color: transparent white transparent transparent;
border-style: solid;
border-width: 24px 8px 0 0;
position: absolute;
top: 0;
left: 84px;
}
}
span:nth-child(2) {
color: #999;
width: 66px;
text-decoration: line-through;
}
}
}
}
.swiper-container {
height: 260px;
width: 1000px;
margin-left: 10px;
background-color: #fff;
}
.swiper-button-prev, .swiper-button-next {
background: #ccc;
width: 25px;
height: 35px;
font-size: 16px;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.swiper-button-prev:hover, .swiper-button-next:hover {
background: #aaa;
}
.swiper-button-prev {
left: 0;
border-bottom-right-radius: 18px;
border-top-right-radius: 18px;
padding-right: 5px;
}
.swiper-button-next {
right: 0;
border-top-left-radius: 18px;
border-bottom-left-radius: 18px;
padding-left: 5px;
}
</style>

View File

@@ -1,289 +0,0 @@
<template>
<div class="seckill">
<div class="aside hover-pointer" @click="goPromotion">
<div class="title">{{ actName }}</div>
<div class="hour">
<span>{{ currHour }}:00</span>点场 倒计时
</div>
<div class="count-down" v-if="actStatus === 1">
<span>{{ hours }}</span
><span>{{ minutes }}</span
><span>{{ seconds }}</span>
</div>
<div class="act-status" v-else>
{{ actStatus == 0 ? "未开始" : "已结束" }}
</div>
</div>
<div class="section">
<swiper ref="mySwiper" :options="swiperOptions">
<swiper-slide
v-for="(item, index) in options.list[0].goodsList"
:key="index"
class="swiper-slide"
>
<div class="content hover-pointer" @click="goPromotion">
<img :src="item.img" width="140" height="140" :alt="item.name" />
<div class="ellipsis">{{ item.name }}</div>
<div>
<span>{{ item.price | unitPrice("¥") }}</span>
<span>{{ item.originalPrice | unitPrice("¥") }}</span>
</div>
</div>
</swiper-slide>
</swiper>
</div>
</div>
</template>
<script>
import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper';
// import 'swiper/swiper-bundle.css';
export default {
components: {
Swiper,
SwiperSlide
},
directives: {
swiper: directive
},
props: {
data: {
type: Object,
default: null
}
},
data () {
return {
options: this.data.options, // 装修数据
actStatus: 0, // 0 未开始 1 进行中 2 已结束
actName: '限时秒杀', // 活动名称
currHour: '00', // 当前秒杀场
diffSeconds: 0, // 倒计时秒数
days: 0, // 天
hours: 0, // 小时
minutes: 0, // 分钟
seconds: 0, // 秒
interval: undefined, // 定时器
swiperOptions: { // 轮播图参数
slidesPerView: 5,
autoplay: true,
loop: true
}
};
},
watch: {
diffSeconds (val) { // 秒杀倒计时
const hours = Math.floor(val / 3600);
// 当前秒数 / 60向下取整
// 获取到所有分钟数 3600 / 60 = 60分钟
// 对60取模超过小时数的分钟数
const minutes = Math.floor(val / 60) % 60;
// 当前的秒数 % 60获取到 超过小时数、分钟数的秒数(秒数)
const seconds = val % 60;
this.hours = hours < 10 ? '0' + hours : hours;
this.minutes = minutes < 10 ? '0' + minutes : minutes;
this.seconds = seconds < 10 ? '0' + seconds : seconds;
if (val === 0) {
clearInterval(this.interval);
this.hours = 0;
this.minutes = 0;
this.seconds = 0;
this.countDown(this.options.list);
}
}
},
mounted () {
this.countDown(this.options.list);
},
beforeDestroy () {
clearInterval(this.interval);
},
methods: {
// 倒计时
countDown (list) {
/**
* 默认倒计时两小时
* 如果没有开始,则显示未开始
* 进行中显示倒计时 + 时间
* 今天的秒杀结束则显示已结束
*/
let nowHour = new Date().getHours();
if (nowHour < Number(list[0].time)) {
// 活动未开始
this.currHour = list[0].time;
this.actStatus = 0;
} else if (nowHour >= Number(list[list.length - 1].time + 2)) {
// 活动已结束
this.actStatus = 2;
this.currHour = list[list.length - 1].time;
} else {
// 活动进行中
this.actStatus = 1;
for (let i = 0; i < list.length; i++) {
if (nowHour === Number(list[i].time)) {
this.currHour = list[i].time;
}
if (
nowHour > Number(list[i].time) &&
nowHour < Number(list[i].time + 2)
) {
this.currHour = list[i].time;
}
}
// 当前0点时间戳
let zeroTime = new Date(new Date().toLocaleDateString()).getTime();
// 活动倒计时
this.diffSeconds = Math.floor((zeroTime + 3600 * 1000 * (this.currHour + 2) - new Date().getTime()) / 1000);
this.interval = setInterval(() => {
this.diffSeconds--;
}, 1000);
}
},
goPromotion () { // 跳转秒杀页面
let routeUrl = this.$router.resolve({
path: '/seckill'
});
window.open(routeUrl.href, '_blank');
}
}
};
</script>
<style lang="scss" scoped>
.seckill {
width: 100%;
height: 260px;
display: flex;
.aside {
overflow: hidden;
width: 190px;
height: 100%;
color: #fff;
background-image: url("../../../assets/images/seckillBg.png");
.title {
width: 100%;
text-align: center;
font-size: 28px;
margin-top: 31px;
}
.hour {
margin-top: 90px;
text-align: center;
span {
font-size: 18px;
}
}
.count-down {
margin: 10px 0 0 30px;
> span {
position: relative;
float: left;
width: 30px;
height: 30px;
text-align: center;
background-color: #2f3430;
margin-right: 20px;
color: white;
font-size: 20px;
&::after {
content: ":";
display: block;
position: absolute;
right: -20px;
font-weight: bolder;
font-size: 18px;
width: 20px;
height: 100%;
top: 0;
}
}
> span:last-child::after {
content: "";
}
}
.act-status {
margin: 10px 0 0 65px;
font-size: 20px;
}
}
.section {
width: 1000px;
// background: #efefef;
.swiper-slide {
height: 260px;
.content {
width: 200px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: relative;
&::after {
content: "";
display: block;
position: absolute;
top: 50%;
right: 0;
width: 1px;
height: 200px;
transform: translateY(-50%);
background: linear-gradient(180deg, white, #eeeeee, white);
}
img {
margin-top: 30px;
}
> div {
width: 160px;
margin-top: 10px;
font-size: 12px;
position: relative;
}
> div:nth-of-type(1):hover {
color: $theme_color;
cursor: pointer;
}
> div:nth-of-type(2) {
border: 1px solid $theme_color;
line-height: 24px;
display: flex;
text-align: center;
span:nth-child(1) {
color: #fff;
font-size: 16px;
width: 92px;
background-color: $theme_color;
position: relative;
&::before {
content: " ";
width: 0;
height: 0;
border-color: transparent white transparent transparent;
border-style: solid;
border-width: 24px 8px 0 0;
position: absolute;
top: 0;
left: 84px;
}
}
span:nth-child(2) {
color: #999;
width: 66px;
text-decoration: line-through;
}
}
}
}
}
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>

View File

@@ -4,11 +4,6 @@
<p slot="header">
<span>发票信息</span>
</p>
<!-- <div>
<div>为响应环保自营全面启用电子普通发票非自营发票由第三方商家实际开具</div>
<div>电子普通发票是税务机关认可的有效收付款凭证与纸质普通发票具有同等法律效力可用于报销入账售后维权等</div>
<div>如商品由第三方卖家销售发票类型及内容将由该卖家决定</div>
</div> -->
<!-- 普通发票 -->
<div class="nav-content">
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
@@ -55,15 +50,14 @@ export default {
name: 'invoiceModal',
data () {
return {
invoice: 1,
invoice: 1, // 发票类型
invoiceAvailable: false, // 模态框显隐
loading: false, // 提交状态
invoiceForm: {
// 发票表单
// 普票表单
receiptTitle: '', // 发票抬头
taxpayerId: '', // 纳税人识别号
receiptContent: '商品明细', // 发票内容
receiptContent: '商品明细' // 发票内容
},
type: 1, // 1 个人 2 单位
ruleInline: {
@@ -76,6 +70,7 @@ export default {
},
props: ['invoiceData'],
watch: {
// 回显的发票信息
invoiceData: {
handler (val) {
this.invoiceForm = { ...val };
@@ -107,10 +102,9 @@ export default {
let flage = true;
// 保存分为两种类型,个人以及企业
const { type, receiptTitle, receiptContent } = JSON.parse(
const { receiptTitle } = JSON.parse(
JSON.stringify(this.invoiceForm)
);
// 判断是否填写发票抬头
if (!receiptTitle) {
this.$Message.error('请填写发票抬头!');
@@ -118,7 +112,7 @@ export default {
return false;
}
if (type === 2) {
if (this.type === 2) {
this.$refs.form.validate((valid) => {
if (!valid) {
flage = false;
@@ -130,7 +124,7 @@ export default {
return flage;
},
// 保存发票信息
async submit () {
if (this.save()) {
this.loading = true;

View File

@@ -1,65 +0,0 @@
<template>
<div class="wrapper">
<card _Title="猜你喜欢" :_Size="16"> </card>
<Row :gutter="12" class="likeList">
<Col
:span="4"
class="likeItem"
v-for="(item, index) in goodsData"
:key="index"
>
<img :src="item.img" alt="" />
<div class="likeTitle">{{ item.title }}</div>
<div class="likePrice">{{ item.price | unitPrice }}</div>
</Col>
</Row>
</div>
</template>
<script>
export default {
name: 'like',
data () {
}
};
</script>
<style scoped lang="scss">
.wrapper {
@include white_background_color();
}
.likeList {
padding: 0 12px;
display: flex;
flex-wrap: wrap;
> .likeItem {
/*width: 210px;*/
/*margin: 10px 5px;*/
> img {
display: block;
width: 100%;
height: auto;
}
> .likeTitle,
.likePrice {
margin: 6px 0;
text-align: center;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
> .likePrice {
color: $theme_color;
}
}
}
</style>

View File

@@ -53,6 +53,7 @@ export default {
};
},
watch: {
// 监听搜索框搜索地图
mapSearch: function (val) {
this.searchOfMap(val);
}

View File

@@ -167,7 +167,6 @@ export default {
watch: {
addressId: {
handler: function (v) {
console.log(v);
if (v) {
this.reviewData();
} else {
@@ -175,9 +174,6 @@ export default {
}
},
immediate: true
},
addr (v) {
console.log(v);
}
}
};

View File

@@ -4,7 +4,6 @@
<div class="all-categories hover-pointer" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">全部商品分类</div>
<ul class="nav-item" v-if="showNavBar">
<li
class="hover-color"
v-for="(item, index) in navList.list"
:key="index"
@click="linkTo(item.url)"
@@ -16,7 +15,7 @@
<!-- 全部商品分类 -->
<div class="cate-list" v-show="showAlways || showFirstList" @mouseenter="showFirstList = true" @mouseleave="showFirstList = false">
<!-- 第一级分类 -->
<div class="nav-side" @mouseleave="panel = false">
<div class="nav-side" :class="{'large-nav': large, 'opacity-nav': opacity}" @mouseleave="panel = false">
<ul>
<li v-for="(item, index) in cateList" :key="index" @mouseenter="showDetail(index)" >
<span class="nav-side-item" @click="goGoodsList(item.id)">{{item.name}}</span>
@@ -30,6 +29,7 @@
<!-- 展开分类 -->
<div
class="detail-item-panel"
:style="{'minHeight': large?'470px':'340px'}"
v-show="panel"
@mouseenter="panel = true"
@mouseleave="panel = false"
@@ -77,19 +77,31 @@ export default {
hover: {
default: false,
type: Boolean
},
large: { //
default: false,
type: Boolean
},
opacity: { //
default: false,
type: Boolean
}
},
data () {
return {
cateList: [], //
panel: false, //
panelData: [], //
showFirstList: false //
showFirstList: false, //
cateList: [] //
}
},
computed: {
navList () { //
return JSON.parse(storage.getItem('navList')) || []
if (storage.getItem('navList')) {
return JSON.parse(storage.getItem('navList'))
} else {
return []
}
}
},
methods: {
@@ -98,6 +110,7 @@ export default {
getCategory(0).then(res => {
if (res.success) {
this.cateList = res.result;
this.$store.commit('SET_CATEGORY', res.result)
//
var expirationTime = new Date().setHours(new Date().getHours() + 1);
//
@@ -151,7 +164,6 @@ export default {
.nav-con {
width: 1200px;
height: 40px;
// background: #eee;
margin: 0 auto;
display: flex;
.all-categories {
@@ -171,7 +183,7 @@ export default {
background-color: #eee;
display: flex;
li {
font-size: 16px;
float: left;
font-weight: bold;
margin-left: 20px;
color: rgb(89, 88, 88);
@@ -182,24 +194,12 @@ export default {
}
}
}
//
.cate-list{
margin: 0 auto;
position: absolute;
z-index: 1000;
}
.nav-item li {
float: left;
font-size: 16px;
font-weight: bold;
margin-left: 30px;
}
.nav-item a {
text-decoration: none;
color: #555555;
}
.nav-item a:hover {
color: $theme_color;
}
.nav-side {
width: 200px;
@@ -210,6 +210,15 @@ export default {
height: 335px;
overflow: hidden;
}
.large-nav{
height: 470px;
ul>li{
line-height: 20px;
}
}
.opacity-nav{
background-color:rgba(0,0,0,.5);
}
.nav-side ul {
width: 100%;
padding: 0px;
@@ -221,9 +230,9 @@ export default {
padding-left: 12px;
font-size: 13px;
line-height: 18px;
}
.nav-side li:hover {
background: #999395;
&:hover{
background: #999395;
}
}
.nav-side-item:hover {
cursor: pointer;
@@ -232,7 +241,7 @@ export default {
/*显示商品详细信息*/
.detail-item-panel {
width: 815px;
width: 1000px;
min-height: 340px;
background-color: #fff;
box-shadow: 0px 0px 15px #ccc;
@@ -260,7 +269,6 @@ export default {
}
.detail-item-panel li {
line-height: 30px;
// margin-left: 40px;
}
.detail-item-title {
font-weight: bold;

View File

@@ -95,7 +95,7 @@
<!-- 其他筛选项 -->
<template v-for="(tag, tagIndex) in tagsContent">
<div class="other" v-if="tag.show && tagIndex !== 0" :key="tagIndex">
<div class="other" v-if="tag.show && tagIndex !== 0" v-show="tagIndex < showTagCount" :key="tagIndex">
<div>
<strong>{{ tag.key }}</strong>
</div>
@@ -153,6 +153,7 @@
</div>
</div>
</template>
<div @click="moreOptions" v-if="tagsContent.length>4" class="more-options">{{showTagCount===5?'更多筛选项':'收起筛选项'}}<Icon :type="showTagCount===5?'ios-arrow-down':'ios-arrow-up'" /></div>
</div>
</div>
</template>
@@ -168,6 +169,7 @@ export default {
first: {},
second: {}
},
showTagCount: 5, // 展示的搜索项数量
multiple: false, // 多选
tagsContent: [
// 标签
@@ -181,10 +183,14 @@ export default {
multSelected: [], // 多选分类
selectedItem: [], // 已选分类集合 顶部展示
brandIds: [], // 品牌id合集
params: {}, // 请求参数
cateList: [] // 全部商品分类
params: {} // 请求参数
};
},
computed: {
cateList () { // 商品分类
return this.$store.state.category || []
}
},
watch: {
selectedItem: {
// 监听已选条件,来调用列表接口
@@ -226,8 +232,12 @@ export default {
methods: {
getNav () { // 获取商品分类,分类下展示
if (!this.$route.query.categoryId) return
this.cateList = JSON.parse(localStorage.getItem('category'))
if (!this.cateList.length) { // 商品分类存储在localstorage接口未调用成功前再次刷新数据
setTimeout(() => {
this.getNav()
}, 500)
return
}
const arr = this.$route.query.categoryId.split(',')
if (arr.length > 0) {
this.tabBar = this.cateList.filter(e => {
@@ -369,6 +379,10 @@ export default {
});
}
});
},
// 展示更多搜索项
moreOptions () {
this.showTagCount = this.showTagCount === 5 ? 100 : 5
}
},
mounted () {
@@ -410,7 +424,7 @@ export default {
background: #fff;
border: 1px solid #999;
padding: 0 8px;
width: 85px;
min-width: 85px;
text-align: center;
margin: 0 3px;
&:hover {
@@ -502,8 +516,8 @@ export default {
/** 筛选主体 */
.content {
background: #fff;
border-top: 1px solid #999;
border-bottom: 1px solid #999;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 10px 0;
}
/** 品牌 start */
@@ -700,6 +714,13 @@ export default {
}
}
}
.more-options{
margin: 5px;
color: #2d8cf0;
font-size: 12px;
cursor: pointer;
text-align: right;
}
/** 其他筛选项 end */
</style>

View File

@@ -12,15 +12,15 @@ export default {
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
* 用来在菜单中显示文字
*/
useI18n: true,
useI18n: false,
/**
* @description api请求基础路径
*/
api_dev: {
// common: 'http://192.168.0.106:8890',
// buyer: 'http://192.168.0.106:8888',
// seller: 'http://192.168.0.106:8889',
// manager: 'http://192.168.0.106:8887'
// common: 'http://192.168.0.101:8890',
// buyer: 'http://192.168.0.101:8888',
// seller: 'http://192.168.0.101:8889',
// manager: 'http://192.168.0.101:8887'
common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn',

View File

@@ -1,11 +1,9 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import ViewUI from 'view-design';
import './assets/styles/theme.less';
import './assets/iconfont/iconfont.css';
// import './assets/iconfont/iconfont.css';
import * as filters from './plugins/filters';
import store from '@/vuex/store'
import storage from '@/plugins/storage';
@@ -49,9 +47,7 @@ Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d2
Vue.prototype.Cookies = storage
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>'
});
render: h => h(App)
}).$mount("#app")

View File

@@ -4,7 +4,7 @@
<!-- LOGO 搜索 -->
<div class="width_1200 logo">
<div>
<router-link to="/"><img :src="logoImg" alt="lili shop" title="lilishop" /></router-link>
<router-link to="/"><img :src="$store.state.logoImg" alt="lili shop" title="lilishop" /></router-link>
<div>
购物车(<span>{{ goodsTotal }}</span>)
</div>
@@ -75,17 +75,29 @@
<promotion :time="promotion.endTime" type="cart"></promotion>
</div>
</template>
<template v-for="(promotion, promotionIndex) in goods.promotions">
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'FULL_DISCOUNT'">
<span>满优惠活动</span>
<promotion :time="promotion.endTime" type="cart"></promotion>
</div>
</template>
<template v-for="(promotion, promotionIndex) in goods.promotions">
<div class="promotion" :key="promotionIndex" v-if="promotion.promotionType === 'COUPON'">
<span>优惠券</span>
<promotion :time="promotion.endTime" type="cart"></promotion>
</div>
</template>
</div>
</div>
<div class="width_150">
{{ goods.goodsSku.price | unitPrice("¥") }}
{{ goods.purchasePrice | unitPrice("¥") }}
</div>
<div class="width_100">
<InputNumber :min="1" size="small" v-model="goods.num" @on-change="changeNum(goods.num, goods.goodsSku.id)"></InputNumber>
<div class="fontsize_12">{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}</div>
</div>
<div class="width_150">
{{ goods.num * goods.goodsSku.price | unitPrice("¥") }}
{{ goods.subTotal | unitPrice("¥") }}
</div>
<div class="width_100">
<span class="handle-btn" v-if="!goods.errorMessage" @click="delGoods(goods.goodsSku.id)">删除</span>
@@ -117,7 +129,7 @@
已节省<span>{{ priceDetailDTO.discountPrice | unitPrice("¥") }}</span>
</div>
<div class="ml_20 total-price">
总价不含运费:<div>{{ priceDetailDTO.billPrice | unitPrice("¥") }}</div>
总价不含运费:<div>{{ priceDetailDTO.flowPrice | unitPrice("¥") }}</div>
</div>
<div class="pay ml_20" @click="pay">去结算</div>
</div>
@@ -125,37 +137,27 @@
</div>
<Spin size="large" fix v-if="loading"></Spin>
</div>
<!-- 猜你喜欢 -->
<!-- <div class="like">
<div class="likeGoods">
<ShowLikeGoods />
</div>
</div> -->
<BaseFooter></BaseFooter>
</div>
</template>
<script>
import Promotion from "@/components/goodsDetail/Promotion";
import Search from "@/components/Search";
import ShowLikeGoods from "@/components/like";
import * as APICart from "@/api/cart";
import * as APIMember from "@/api/member";
import { getLogo } from "@/api/common.js";
import Promotion from '@/components/goodsDetail/Promotion';
import Search from '@/components/Search';
import * as APICart from '@/api/cart';
import * as APIMember from '@/api/member';
export default {
name: "Cart",
beforeRouteEnter(to, from, next) {
name: 'Cart',
beforeRouteEnter (to, from, next) {
window.scrollTo(0, 0);
next();
},
components: {
Search,
ShowLikeGoods,
Promotion,
Promotion
},
data() {
data () {
return {
logoImg: "", // logo图
couponAvailable: false, // 展示优惠券
stepIndex: 0, // 当前处于哪一步,购物车==0填写订单信息==1成功提交订单==2
goodsTotal: 1, // 商品数量
@@ -165,45 +167,44 @@ export default {
cartList: [], // 购物车列表
couponList: [], // 优惠券列表
priceDetailDTO: {}, // 价格明细
skuList: [], // sku列表
skuList: [] // sku列表
};
},
computed: {},
methods: {
// 跳转商品详情
goGoodsDetail(skuId, goodsId) {
goGoodsDetail (skuId, goodsId) {
let routeUrl = this.$router.resolve({
path: "/goodsDetail",
query: { skuId, goodsId },
path: '/goodsDetail',
query: { skuId, goodsId }
});
window.open(routeUrl.href, "_blank");
window.open(routeUrl.href, '_blank');
},
// 跳转店铺首页
goShopPage(id) {
goShopPage (id) {
let routeUrl = this.$router.resolve({
path: "/Merchant",
query: { id },
path: '/Merchant',
query: { id }
});
window.open(routeUrl.href, "_blank");
window.open(routeUrl.href, '_blank');
},
// 收藏商品
collectGoods(id) {
collectGoods (id) {
this.$Modal.confirm({
title: "收藏",
content: "<p>商品收藏后可在个人中心我的收藏查看</p>",
title: '收藏',
content: '<p>商品收藏后可在个人中心我的收藏查看</p>',
onOk: () => {
APIMember.collectGoods("GOODS", id).then((res) => {
APIMember.collectGoods('GOODS', id).then((res) => {
if (res.success) {
this.$Message.success("收藏商品成功");
this.$Message.success('收藏商品成功');
this.getCartList();
}
});
},
onCancel: () => {},
onCancel: () => {}
});
},
// 删除商品
delGoods(id) {
delGoods (id) {
const idArr = [];
if (!id) {
const list = this.cartList;
@@ -216,51 +217,51 @@ export default {
idArr.push(id);
}
this.$Modal.confirm({
title: "删除",
content: "<p>确定要删除该商品吗?</p>",
title: '删除',
content: '<p>确定要删除该商品吗?</p>',
onOk: () => {
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
if (res.success) {
this.$Message.success("删除成功");
this.$Message.success('删除成功');
this.getCartList();
} else {
this.$Message.error(res.message);
}
});
},
}
});
},
clearCart() {
// 清空购物车
// 清空购物车
clearCart () {
this.$Modal.confirm({
title: "提示",
content: "<p>确定要清空购物车吗?清空后不可恢复</p>",
title: '提示',
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
onOk: () => {
APICart.clearCart().then((res) => {
if (res.success) {
this.$Message.success("清空购物车成功");
this.$Message.success('清空购物车成功');
this.getCartList();
} else {
this.$Message.error(res.message);
}
});
},
}
});
},
// 跳转支付页面
pay() {
pay () {
if (this.checkedNum) {
this.$router.push({ path: "/pay", query: { way: "CART" } });
this.$router.push({ path: '/pay', query: { way: 'CART' } });
} else {
this.$Message.warning("请至少选择一件商品");
this.$Message.warning('请至少选择一件商品');
}
},
// 展示优惠券
showCoupon(storeId, index) {
showCoupon (storeId, index) {
this.couponAvailable = index;
},
changeNum(val, id) {
// 设置购买数量
// 设置购买数量
changeNum (val, id) {
console.log(val, id);
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
console.log(res);
@@ -269,13 +270,13 @@ export default {
}
});
},
async changeChecked(status, type, id) {
// 设置商品选中状态
// 设置商品选中状态
async changeChecked (status, type, id) {
const check = status ? 1 : 0;
if (type === "all") {
if (type === 'all') {
// 全选
await APICart.setCheckedAll({ checked: check });
} else if (type === "shop") {
} else if (type === 'shop') {
// 选中店铺所有商品
await APICart.setCheckedSeller({ checked: check, storeId: id });
} else {
@@ -285,19 +286,18 @@ export default {
this.getCartList();
},
async receiveShopCoupon(item) {
// 领取优惠券
// 领取优惠券
async receiveShopCoupon (item) {
let res = await APIMember.receiveCoupon(item.id);
if (res.success) {
this.$set(item, "disabled", true);
this.$Message.success("领取成功");
this.$set(item, 'disabled', true);
this.$Message.success('领取成功');
} else {
this.$Message.error(res.message);
}
},
async getCartList() {
// 购物车列表
// 购物车列表
async getCartList () {
this.loading = true;
try {
let res = await APICart.cartGoodsAll();
@@ -326,25 +326,15 @@ export default {
} catch (error) {
this.loading = false;
}
},
}
},
mounted() {
mounted () {
this.getCartList();
APICart.cartCount().then((res) => {
// 购物车商品数量
if (res.success) this.goodsTotal = res.result;
});
if (!this.Cookies.getItem("logo")) {
getLogo().then((res) => {
if (res.success) {
let logoObj = JSON.parse(res.result.settingValue);
this.Cookies.setItem("logo", logoObj.buyerSideLogo);
}
});
} else {
this.logoImg = this.Cookies.getItem("logo");
}
},
}
};
</script>

View File

@@ -32,10 +32,10 @@
</li>
</ul>
<Page :total="total" @on-change="changePageNum"
v-if="list.length && total > params.pageNumber"
class="pageration"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
</div>
@@ -57,11 +57,13 @@ export default {
}
},
methods: {
//
search (item) {
this.params.couponName = item
this.params.pageNumber = 1
this.getList()
},
//
getList () {
this.$Spin.show()
couponList(this.params).then(res => {
@@ -73,18 +75,18 @@ export default {
}
}).catch(() => { this.$Spin.hide() })
},
//
changePageNum (val) {
this.params.pageNumber = val;
this.getList()
},
//
changePageSize (val) {
this.pageNumber = 1;
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
//
receive (item) {
receiveCoupon(item.id).then(res => {
if (res.success) {
@@ -111,7 +113,7 @@ export default {
}
})
},
//
useScope (type, storeName) {
let shop = '平台';
let goods = '全部商品'

View File

@@ -1,89 +0,0 @@
<template>
<div>
<div class="feedback-container">
<div class="feedback-img-box">
<img src="../assets/images/feedback.png" />
</div>
<div class="feedback-box-border">
<div class="feedback-box">
<div class="feedback-title">
<h1>意见反馈</h1>
<h2>感谢你的反馈我们会积极改善做出更好的服务的</h2>
</div>
<div class="feedback-content">
<div class="feedback-form">
<Form :model="formItem" :label-width="80">
<FormItem label="标题">
<i-input v-model="formItem.title" placeholder="请输入标题"></i-input>
</FormItem>
<FormItem label="反馈信息">
<i-input
v-model="formItem.content"
type="textarea"
:autosize="{minRows: 8,maxRows: 10}"
placeholder="请输入反馈信息"
></i-input>
</FormItem>
<FormItem>
<Button type="primary">提交</Button>
<Button type="ghost">清空信息</Button>
</FormItem>
</Form>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Feedback',
data () {
return {
formItem: { // 表单数据
title: '',
content: ''
}
};
}
};
</script>
<style scoped>
.feedback-container {
margin: 15px auto;
width: 80%;
height: 600px;
display: flex;
align-items: center;
/* background-color: #ccc; */
}
.feedback-img-box {
width: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.feedback-img-box img {
width: 80%;
}
.feedback-box-border {
width: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.feedback-box {
width: 480px;
}
.feedback-content {
margin: 15px auto;
border: 1px #ccc dotted;
}
.feedback-form {
margin: 30px auto;
width: 90%;
}
</style>

View File

@@ -4,7 +4,7 @@
<!-- 顶部logo -->
<div class="logo-box">
<img
:src="logoImg" width='150'
:src="$store.state.logoImg" width='150'
@click="$router.push('/')"
/>
<div>修改密码</div>
@@ -114,11 +114,10 @@ import * as apiLogin from '@/api/login.js';
import { sendSms } from '@/api/common.js';
import Verify from '@/components/verify';
export default {
name: 'Login',
name: 'ForgetPassword',
components: { Verify },
data () {
return {
logoImg: '', // logo
loading: false, //
loading1: false, //
formFirst: { //
@@ -242,8 +241,8 @@ export default {
}
},
mounted () {
document.querySelector('.forget-password').style.height = window.innerHeight + 'px'
this.$refs.formFirst.resetFields();
this.logoImg = this.Cookies.getItem('logo')
},
watch: {
}
@@ -252,7 +251,7 @@ export default {
<style scoped lang="scss">
.forget-password{
height: 100%;
min-height: 700px;
}
.logo-box {
width: 600px;

View File

@@ -8,12 +8,19 @@
<div class="shop-nav-container">
<Breadcrumb>
<BreadcrumbItem to="/">首页</BreadcrumbItem>
<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>
<div class="store-collect">
<span class="mr_10" v-if="goodsMsg.data"><router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{goodsMsg.data.storeName}}</router-link></span>
<span @click="collect" ><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon custom="icomoon icon-customer-service" />联系客服</span>
<span class="mr_10" v-if="goodsMsg.data"><router-link
:to="'Merchant?id=' + goodsMsg.data.storeId">{{ goodsMsg.data.storeName }}</router-link></span>
<span @click="collect"><Icon type="ios-heart"
:color="storeCollected ? '#ed3f14' : '#666'"/>
{{storeCollected ? '已收藏店铺' : '收藏店铺'}}
</span>
<span @click="connectCs(storeMsg.yzfSign)" class="ml_10"><Icon
custom="icomoon icon-customer-service"/>联系客服</span>
</div>
</div>
</div>
@@ -22,12 +29,6 @@
<!-- 商品详细展示 -->
<ShowGoodsDetail v-if="goodsMsg.data" :detail="goodsMsg"></ShowGoodsDetail>
<!-- 猜你喜欢-->
<!-- <div class="like">
<div class="likeGoods">
<ShowLikeGoods/>
</div>
</div> -->
<Spin size="large" fix v-if="isLoading"></Spin>
<BaseFooter></BaseFooter>
</div>
@@ -38,10 +39,10 @@ import Search from '@/components/Search';
import ShopHeader from '@/components/header/ShopHeader';
import ShowGoods from '@/components/goodsDetail/ShowGoods';
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
import ShowLikeGoods from '@/components/like';
import { goodsSkuDetail } from '@/api/goods';
import { cancelCollect, collectGoods, isCollection } from '@/api/member';
import {goodsSkuDetail} from '@/api/goods';
import {cancelCollect, collectGoods, isCollection, getGoodsDistribution} from '@/api/member';
import {getDetailById} from '@/api/shopentry'
export default {
name: 'GoodsDetail',
beforeRouteEnter (to, from, next) {
@@ -61,9 +62,27 @@ export default {
};
},
methods: {
// 获取商品详情
getGoodsDetail () {
this.isLoading = true;
const params = this.$route.query
const params = this.$route.query;
// 分销员id
let distributionId = (params && params.distributionId) ? params.distributionId : this.Cookies.getItem('distributionId');
// 如果有分销信息
if (distributionId) {
console.log(distributionId)
// 先存储
this.Cookies.setItem('distributionId', params.distributionId)
let _this = this;
// 绑定关系
getGoodsDistribution(params.distributionId).then(res => {
// 绑定成功,则清除关系
if (res.success) {
_this.Cookies.removeItem('distributionId');
}
})
}
goodsSkuDetail(params).then((res) => {
this.isLoading = false;
if (res.success) {
@@ -131,14 +150,12 @@ export default {
location.reload();
}
},
computed: {
},
computed: {},
components: {
Search,
ShopHeader,
ShowGoods,
ShowGoodsDetail,
ShowLikeGoods
ShowGoodsDetail
}
};
</script>
@@ -150,23 +167,19 @@ export default {
color: #2c2c2c;
}
.like {
width: 100%;
padding: 20px 0;
@include white_background_color();
}
.shop-nav-container {
width: 1200px;
margin: 0 auto;
position: relative;
.store-collect {
position: absolute;
right: 20px;
top: 0;
color: #999;
span{
&:hover{
span {
&:hover {
cursor: pointer;
color: $theme_color;
}

View File

@@ -49,27 +49,27 @@
class="goods-show-info"
v-for="(item, index) in goodsList"
:key="index"
@click="goGoodsDetail(item.id, item.goodsId)"
@click="goGoodsDetail(item.id, item.content.goodsId)"
>
<div class="goods-show-img">
<img width="220" height="220" :src="item.thumbnail" />
<img width="220" height="220" :src="item.content.thumbnail" />
</div>
<div class="goods-show-price">
<span>
<span class="seckill-price text-danger">{{
item.price | unitPrice("¥")
item.content.price | unitPrice("¥")
}}</span>
</span>
</div>
<div class="goods-show-detail">
<span>{{ item.goodsName }}</span>
<span>{{ item.content.goodsName }}</span>
</div>
<div class="goods-show-num">
已有<span>{{ item.commentNum || 0 }}</span
已有<span>{{ item.content.commentNum || 0 }}</span
>人评价
</div>
<div class="goods-show-seller">
<Tag v-if="item.selfOperated" style="padding:0 4px;" size="default" color="error">自营</Tag><span>{{ item.storeName }}</span>
<Tag v-if="item.content.selfOperated" style="padding:0 4px;" size="default" color="error">自营</Tag><span>{{ item.content.storeName }}</span>
</div>
</div>
</div>
@@ -77,6 +77,7 @@
</div>
<div class="goods-page">
<Page
show-total
show-sizer
@on-change="changePageNum"
@on-page-size-change="changePageSize"
@@ -126,6 +127,7 @@ export default {
}
},
methods: {
// 搜索
handleSearch (key) {
this.params.keyword = key
this.params.pageNumber = 0
@@ -156,15 +158,18 @@ export default {
});
window.open(routeUrl.href, '_blank');
},
// 分页 修改页码
changePageNum (val) {
this.params.pageNumber = val;
this.getGoodsList();
},
// 分页 修改页数
changePageSize (val) {
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getGoodsList();
},
// 获取商品列表
getGoodsList () {
this.loading = true;
apiGoods.goodsList(this.params)
@@ -194,7 +199,6 @@ export default {
}
this.getGoodsList()
},
mounted () {},
components: {
GoodsClassNav
}

View File

@@ -3,7 +3,6 @@
<drawer></drawer>
<!-- 固定头部 -->
<hover-search class="hover-search" :class="{show: topSearchShow}"></hover-search>
<!-- 顶部广告 -->
<FixedTopPage :data="topAdvert"></FixedTopPage>
<!-- 头部 包括登录我的订单等 -->
@@ -11,7 +10,7 @@
<!-- 搜索框logo -->
<Search></Search>
<!-- 商品分类 -->
<cateNav :showAlways="true" v-if="showNav"></cateNav>
<cateNav :showAlways="true" v-if="showNav" :large="carouselLarge" :opacity="carouselOpacity"></cateNav>
<!-- 楼层装修部分 -->
<model-form ref="modelForm" :data="modelForm"></model-form>
<!-- 底部栏 -->
@@ -21,10 +20,11 @@
<script>
import Search from '@/components/Search';
import ModelForm from '@/components/indexDecorate/modelForm';
import ModelForm from '@/components/indexDecorate/ModelForm';
import HoverSearch from '@/components/header/hoverSearch';
import storage from '@/plugins/storage';
import { indexData } from '@/api/index.js';
import {seckillByDay} from '@/api/promotion'
export default {
name: 'Index',
mounted () {
@@ -44,7 +44,9 @@ export default {
modelForm: { list: [] }, // 楼层装修数据
topAdvert: {}, // 顶部广告
showNav: false, // 是否展示分类栏
topSearchShow: false // 滚动后顶部搜索栏展示
topSearchShow: false, // 滚动后顶部搜索栏展示
carouselLarge: false, // 不同轮播分类尺寸
carouselOpacity: false // 不同轮播分类样式
};
},
methods: {
@@ -53,12 +55,34 @@ export default {
indexData({ clientType: 'PC' }).then((res) => {
if (res.success) {
let dataJson = JSON.parse(res.result.pageData);
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
// 轮播图根据不同轮播,样式不同
for (let i = 0; i < dataJson.list.length; i++) {
let type = dataJson.list[i].type
if (type === 'carousel2') {
this.carouselLarge = true;
} else if (type === 'carousel1') {
this.carouselLarge = true
this.carouselOpacity = true
} else if (type === 'seckill') {
let seckill = this.getListByDay()
dataJson.list[i].options.list = seckill
}
}
this.modelForm = dataJson;
storage.setItem('navList', dataJson.list[1])
this.showNav = true
this.topAdvert = dataJson.list[0];
}
});
},
async getListByDay () { // 当天秒杀活动
const res = await seckillByDay()
if (res.success && res.result.length) {
return res.result
} else {
return []
}
}
},
components: {
@@ -73,42 +97,6 @@ export default {
.container {
@include sub_background_color($light_background_color);
}
/** 商品分类 */
.nav-con {
width: 1200px;
height: 40px;
background: #eee;
margin: 0 auto;
display: flex;
.all-categories {
width: 200px;
line-height: 40px;
color: #fff;
background-color: $theme_color;
text-align: center;
font-size: 16px;
}
.nav-item {
width: 1000px;
height: 40px;
line-height: 40px;
overflow: hidden;
list-style: none;
background-color: #eee;
display: flex;
li {
width: 50px;
font-size: 16px;
font-weight: bold;
margin-left: 15px;
color: rgb(89, 88, 88);
font-size: 15px;
&:hover {
color: $theme_color;
}
}
}
}
</style>
<style>
.hover-search {

View File

@@ -3,10 +3,7 @@
<!-- 顶部logo -->
<div class="top-content" @click='$refs.verify.show = false'>
<div class="logo-box">
<img
:src="logoImg"
@click="$router.push('/')"
/>
<img :src="$store.state.logoImg" @click="$router.push('/')" />
<div>欢迎登录</div>
</div>
</div>
@@ -16,9 +13,7 @@
<Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never">
<CarouselItem>
<div class="demo-carousel" @click='$refs.verify.show = false'>
<img
src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680"
/>
<img src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680" />
</div>
</CarouselItem>
</Carousel>
@@ -32,99 +27,65 @@
<div @click="$router.push('signUp')">立即注册</div>
</div>
<!-- 账号密码登录 -->
<Form
ref="formInline"
:model="formData"
:rules="ruleInline"
v-show="type === true"
@click.self='$refs.verify.show = false'
>
<Form ref="formInline" :model="formData" :rules="ruleInline" v-show="type === true"
@click.self='$refs.verify.show = false'>
<FormItem prop="username">
<i-input
type="text"
v-model="formData.username"
clearable
placeholder="用户名"
>
<i-input type="text" v-model="formData.username" clearable placeholder="用户名">
<Icon type="md-person" slot="prepend"></Icon>
</i-input>
</FormItem>
<FormItem prop="password">
<i-input
type="password"
v-model="formData.password"
clearable
placeholder="密码"
>
<i-input type="password" v-model="formData.password" clearable placeholder="密码">
<Icon type="md-lock" slot="prepend"> </Icon>
</i-input>
</FormItem>
<FormItem>
<Button
type="error"
@click.stop="handleSubmit('formInline')"
long
>登录</Button>
<Button type="error" @click.stop="handleSubmit('formInline')" long>登录</Button>
</FormItem>
</Form>
<!-- 验证码登录 -->
<Form
ref="formSms"
:model="formSms"
:rules="ruleInline"
v-show="type === false"
@click.self='$refs.verify.show = false'
>
<Form ref="formSms" :model="formSms" :rules="ruleInline" v-show="type === false"
@click.self='$refs.verify.show = false'>
<FormItem prop="mobile">
<i-input
type="text"
v-model="formSms.mobile"
clearable
placeholder="手机号"
>
<i-input type="text" v-model="formSms.mobile" clearable placeholder="手机号">
<Icon type="md-lock" slot="prepend"></Icon>
</i-input>
</FormItem>
<FormItem prop="code">
<i-input
type="text"
v-model="formSms.code"
placeholder="手机验证码"
>
<Icon
type="ios-text-outline"
style="font-weight: bold"
slot="prepend"
/>
<i-input type="text" v-model="formSms.code" placeholder="手机验证码">
<Icon type="ios-text-outline" style="font-weight: bold" slot="prepend" />
<Button slot="append" @click="sendCode">{{ codeMsg }}</Button>
</i-input>
</FormItem>
<FormItem>
<Button @click.stop="verifyBtnClick" long :type="verifyStatus?'success':'default'">{{verifyStatus?'验证通过':'点击完成安全验证'}}</Button>
<Button @click.stop="verifyBtnClick" long
:type="verifyStatus?'success':'default'">{{verifyStatus?'验证通过':'点击完成安全验证'}}</Button>
</FormItem>
<FormItem>
<Button
type="error"
@click="handleSubmit('formSms')"
long
>登录</Button>
<Button type="error" @click="handleSubmit('formSms')" long>登录</Button>
</FormItem>
</Form>
<div class="regist">
<span @click="$router.push('forgetPassword')">忘记密码</span>
</div>
<div class="other-login">
<Icon custom="icomoon icon-qq" color="" class="icon-hover" @click="handleWebLogin('QQ')"/>
<Icon custom="icomoon icon-wechat" color="" class="icon-hover" @click="handleWebLogin('WECHAT_PC')"/>
<svg t="1631154795933" class="icon" @click="handleWebLogin('QQ')" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="4969" width="32" height="32">
<path
d="M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z"
p-id="4970" fill="#1296db"></path>
</svg>
<svg t="1631154766336" class="icon" @click="handleWebLogin('WECHAT_PC')" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="3844" width="32" height="32">
<path
d="M683.058 364.695c11 0 22 1.016 32.943 1.976C686.564 230.064 538.896 128 370.681 128c-188.104 0.66-342.237 127.793-342.237 289.226 0 93.068 51.379 169.827 136.725 229.256L130.72 748.43l119.796-59.368c42.918 8.395 77.37 16.79 119.742 16.79 11 0 21.46-0.48 31.914-1.442a259.168 259.168 0 0 1-10.455-71.358c0.485-148.002 128.744-268.297 291.403-268.297l-0.06-0.06z m-184.113-91.992c25.99 0 42.913 16.79 42.913 42.575 0 25.188-16.923 42.579-42.913 42.579-25.45 0-51.38-16.85-51.38-42.58 0-25.784 25.93-42.574 51.38-42.574z m-239.544 85.154c-25.384 0-51.374-16.85-51.374-42.58 0-25.784 25.99-42.574 51.374-42.574 25.45 0 42.918 16.79 42.918 42.575 0 25.188-16.924 42.579-42.918 42.579z m736.155 271.655c0-135.647-136.725-246.527-290.983-246.527-162.655 0-290.918 110.88-290.918 246.527 0 136.128 128.263 246.587 290.918 246.587 33.972 0 68.423-8.395 102.818-16.85l93.809 50.973-25.93-84.677c68.907-51.93 120.286-119.815 120.286-196.033z m-385.275-42.58c-16.923 0-34.452-16.79-34.452-34.179 0-16.79 17.529-34.18 34.452-34.18 25.99 0 42.918 16.85 42.918 34.18 0 17.39-16.928 34.18-42.918 34.18z m188.165 0c-16.984 0-33.972-16.79-33.972-34.179 0-16.79 16.927-34.18 33.972-34.18 25.93 0 42.913 16.85 42.913 34.18 0 17.39-16.983 34.18-42.913 34.18z"
fill="#09BB07" p-id="3845"></path>
</svg>
</div>
</div>
<!-- 拼图验证码 -->
<verify
ref="verify"
class="verify-con"
verifyType="LOGIN"
@change="verifyChange"
></verify>
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
</div>
<div class="foot">
<Row type="flex" justify="space-around" class="help">
@@ -133,7 +94,7 @@
<router-link to="/article?id=1371992704333905920" class="item" target="_blank">条款</router-link>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © 2021 - Present
Copyright © {{year}} - Present
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
版权所有
</Row>
@@ -142,57 +103,58 @@
</template>
<script>
import * as RegExp from '@/plugins/RegExp.js';
import { md5 } from '@/plugins/md5.js';
import * as apiLogin from '@/api/login.js';
import { sendSms } from '@/api/common.js';
import { webLogin, loginCallback } from '@/api/login.js';
import storage from '@/plugins/storage.js';
import verify from '@/components/verify';
import * as RegExp from "@/plugins/RegExp.js";
import { md5 } from "@/plugins/md5.js";
import * as apiLogin from "@/api/login.js";
import { sendSms } from "@/api/common.js";
import { webLogin, loginCallback } from "@/api/login.js";
import storage from "@/plugins/storage.js";
import verify from "@/components/verify";
export default {
name: 'Login',
name: "Login",
components: {
verify
verify,
},
data () {
data() {
return {
type: true, // true 账号登录 false 验证码登录
formData: {
// 登录表单
username: '',
password: ''
username: "",
password: "",
},
formSms: { // 手机号登录
code: '',
mobile: ''
formSms: {
// 手机号登录
code: "",
mobile: "",
},
verifyStatus: false, // 是否图片验证通过
ruleInline: {
// 验证规则
username: [{ required: true, message: '请输入用户名' }],
username: [{ required: true, message: "请输入用户名" }],
password: [
{ required: true, message: '请输入密码' },
{ type: 'string', min: 6, message: '密码不能少于6位' }
{ required: true, message: "请输入密码" },
{ type: "string", min: 6, message: "密码不能少于6位" },
],
mobile: [
{ required: true, message: '请输入手机号码' },
{ required: true, message: "请输入手机号码" },
{
pattern: RegExp.mobile,
message: '请输入正确的手机号'
}
message: "请输入正确的手机号",
},
],
code: [{ required: true, message: '请输入手机验证码' }]
code: [{ required: true, message: "请输入手机验证码" }],
},
codeMsg: '发送验证码', // 验证码文字
codeMsg: "发送验证码", // 验证码文字
interval: null, // 定时器
time: 60, // 倒计时
logoImg: '' // logo图片
year: new Date().getFullYear(),
};
},
methods: {
// 登录
handleSubmit (name) {
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
if (this.type) {
@@ -202,17 +164,20 @@ export default {
apiLogin.smsLogin(data).then((res) => {
this.$refs.verify.show = false;
if (res.success) {
this.$Message.success('登录成功');
storage.setItem('accessToken', res.result.accessToken);
storage.setItem('refreshToken', res.result.refreshToken);
this.$Message.success("登录成功");
storage.setItem("accessToken", res.result.accessToken);
storage.setItem("refreshToken", res.result.refreshToken);
apiLogin.getMemberMsg().then((res) => {
if (res.success) {
storage.setItem('userInfo', res.result);
storage.setItem("userInfo", res.result);
let query = this.$route.query;
if (query.rePath) {
this.$router.push({path: query.rePath, query: JSON.parse(query.query)});
this.$router.push({
path: query.rePath,
query: JSON.parse(query.query),
});
} else {
this.$router.push('/');
this.$router.push("/");
}
}
});
@@ -221,35 +186,33 @@ export default {
}
});
}
} else {
// this.$Message.error('请填写正确的用户名或密码');
}
});
},
// 发送手机验证码
sendCode () {
sendCode() {
if (this.time === 60) {
if (this.formSms.mobile === '') {
this.$Message.warning('请先填写手机号');
if (this.formSms.mobile === "") {
this.$Message.warning("请先填写手机号");
return;
}
if (!this.verifyStatus) {
this.$Message.warning('请先完成安全验证');
this.$Message.warning("请先完成安全验证");
return;
}
let params = {
mobile: this.formSms.mobile,
verificationEnums: 'LOGIN'
verificationEnums: "LOGIN",
};
sendSms(params).then(res => {
sendSms(params).then((res) => {
if (res.success) {
this.$Message.success('验证码发送成功');
this.$Message.success("验证码发送成功");
let that = this;
this.interval = setInterval(() => {
that.time--;
if (that.time === 0) {
that.time = 60;
that.codeMsg = '重新发送';
that.codeMsg = "重新发送";
that.verifyStatus = false;
clearInterval(that.interval);
} else {
@@ -262,80 +225,91 @@ export default {
});
}
},
verifyChange (con) { // 拼图验证码回显
verifyChange(con) {
// 拼图验证码回显
if (!con.status) return;
if (this.type === true) { // 账号密码登录
if (this.type === true) {
// 账号密码登录
let data = JSON.parse(JSON.stringify(this.formData));
data.password = md5(data.password);
this.$refs.verify.show = false;
this.$Spin.show();
apiLogin.login(data).then((res) => {
if (res.success) {
this.$Message.success('登录成功');
storage.setItem('accessToken', res.result.accessToken);
storage.setItem('refreshToken', res.result.refreshToken);
apiLogin.getMemberMsg().then((res) => {
this.$Spin.hide();
if (res.success) {
storage.setItem('userInfo', res.result);
let query = this.$route.query;
if (query.rePath) {
this.$router.push({path: query.rePath, query: JSON.parse(query.query)});
} else {
this.$router.push('/');
apiLogin
.login(data)
.then((res) => {
if (res.success) {
this.$Message.success("登录成功");
storage.setItem("accessToken", res.result.accessToken);
storage.setItem("refreshToken", res.result.refreshToken);
apiLogin.getMemberMsg().then((res) => {
this.$Spin.hide();
if (res.success) {
storage.setItem("userInfo", res.result);
let query = this.$route.query;
if (query.rePath) {
this.$router.push({
path: query.rePath,
query: JSON.parse(query.query),
});
} else {
this.$router.push("/");
}
}
}
});
} else {
});
} else {
this.$Spin.hide();
this.$Message.error(res.message);
}
})
.catch(() => {
this.$Spin.hide();
this.$Message.error(res.message);
}
}).catch(() => {
this.$Spin.hide()
});
});
} else {
this.verifyStatus = true;
this.$refs.verify.show = false;
}
},
// 开启滑块验证
verifyBtnClick () {
verifyBtnClick() {
if (!this.verifyStatus) {
this.$refs.verify.init();
}
},
handleWebLogin (type) { // 第三方登录
handleWebLogin(type) {
// 第三方登录
webLogin(type);
}
},
},
mounted () {
mounted() {
let uuid = this.$route.query.state;
if (uuid) {
storage.setItem('uuid', uuid);
loginCallback(uuid).then(res => {
storage.setItem("uuid", uuid);
loginCallback(uuid).then((res) => {
if (res.success) {
const result = res.result;
storage.setItem('accessToken', result.accessToken);
storage.setItem('refreshToken', result.refreshToken);
storage.setItem("accessToken", result.accessToken);
storage.setItem("refreshToken", result.refreshToken);
apiLogin.getMemberMsg().then((res) => {
if (res.success) {
storage.setItem('userInfo', res.result);
storage.setItem("userInfo", res.result);
let query = this.$route.query;
if (query.rePath) {
this.$router.push({path: query.rePath, query: JSON.parse(query.query)});
this.$router.push({
path: query.rePath,
query: JSON.parse(query.query),
});
} else {
this.$router.push('/');
this.$router.push("/");
}
}
});
}
});
}
this.logoImg = this.Cookies.getItem('logo')
},
watch: {
type (v) {
type(v) {
if (v) {
this.$refs.formInline.resetFields();
} else {
@@ -344,10 +318,10 @@ export default {
this.verifyStatus = false;
this.$refs.verify.show = false;
clearInterval(this.interval);
this.codeMsg = '发送验证码';
this.codeMsg = "发送验证码";
this.time = 60;
}
}
},
},
};
</script>
<style scoped lang="scss">
@@ -405,30 +379,30 @@ export default {
top: 80px;
right: 15%;
padding: 20px;
background:rgba(255,255,255,.8);
.account-number{
background: rgba(255, 255, 255, 0.8);
.account-number {
display: flex;
justify-content: space-between;
align-items: baseline;
font-weight: bold;
>div:nth-child(2){
> div:nth-child(2) {
color: $theme_color;
cursor: pointer;
}
.tab-switch{
.tab-switch {
height: 40px;
font-size: 14px;
span:nth-child(1){
span:nth-child(1) {
font-size: 16px;
border-right: 1px solid #ddd;
padding-right: 10px;
}
span:nth-child(2){
span:nth-child(2) {
cursor: pointer;
padding-left: 10px;
&:hover{
&:hover {
color: $theme_color;
}
}
@@ -436,7 +410,7 @@ export default {
}
}
.verify-con{
.verify-con {
position: absolute;
right: 16%;
top: 90px;
@@ -445,8 +419,11 @@ export default {
.other-login {
margin: 0 auto;
.ivu-icon {
font-size: 24px;
> svg {
cursor: pointer;
width: 24px;
margin-right: 10px;
height: 24px;
}
}
.regist {
@@ -480,7 +457,7 @@ export default {
}
}
}
.icon-hover{
.icon-hover {
cursor: pointer;
}
</style>

View File

@@ -6,7 +6,7 @@
<!-- 店铺logo -->
<div class="shop-logo">
<div>
<img :src="storeMsg.storeLogo" height="50" alt="">
<img :src="storeMsg.storeLogo" height="80" alt="">
<div>
<p>{{storeMsg.storeName || 'xx店铺'}}</p>
<p class="ellipsis" :alt="storeMsg.storeDesc" v-html="storeMsg.storeDesc"></p>
@@ -20,7 +20,7 @@
<div class="store-category">
<ul class="cate-list">
<li class="cate-item" @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
<li class="cate-item" v-for="(cate, index) in cateList" :key="index" >
<li class="cate-item" v-for="(cate, index) in cateList" :key="index">
<Dropdown v-if="cate.children.length">
<div @click.self="searchByCate(cate)">{{cate.labelName}} <Icon type="ios-arrow-down"></Icon></div>
<DropdownMenu slot="list">
@@ -41,23 +41,23 @@
class="goods-show-info"
v-for="(item, index) in goodsList"
:key="index"
@click="goGoodsDetail(item.id, item.goodsId)"
@click="goGoodsDetail(item.content.id, item.content.goodsId)"
>
<div class="goods-show-img">
<img width="220" height="220" :src="item.thumbnail" />
<img width="220" height="220" :src="item.content.thumbnail" />
</div>
<div class="goods-show-price">
<span>
<span class="seckill-price text-danger">{{
item.price | unitPrice("¥")
item.content.price | unitPrice("¥")
}}</span>
</span>
</div>
<div class="goods-show-detail">
<span>{{ item.goodsName }}</span>
<span>{{ item.content.goodsName }}</span>
</div>
<div class="goods-show-num">
已有<span>{{ item.commentNum || 0 }}</span>人评价
已有<span>{{ item.content.commentNum || 0 }}</span>人评价
</div>
</div>
</div>
@@ -102,8 +102,6 @@ export default {
this.getCateList()
this.getGoodsList()
},
mounted () {
},
methods: {
getStoreMsg () { // 店铺信息
getDetailById(this.$route.query.id).then(res => {
@@ -154,10 +152,12 @@ export default {
this.cateName = cate.labelName
this.getGoodsList()
},
// 分页 修改页码
changePageNum (val) {
this.params.pageNumber = val;
this.getGoodsList();
},
// 分页 修改页数
changePageSize (val) {
this.params.pageNumber = 1;
this.params.pageSize = val;
@@ -199,10 +199,6 @@ export default {
margin: 0 auto;
align-items: center;
img {
width: 80px;
}
>div:nth-child(2){
margin-left: 10px;
flex: 1;
@@ -212,9 +208,6 @@ export default {
width: 200px;
}
}
img {
height: 80px;
}
p:nth-child(1) {
font-size: 20px;
}
@@ -244,6 +237,6 @@ export default {
}
}
.promotion-decorate::before,.promotion-decorate::after{
background-image: url('../../static/sprite@2x.png');
background-image: url('/src/assets/images/sprite@2x.png');
}
</style>

View File

@@ -53,9 +53,6 @@ export default {
mounted () {
let detail = this.$route.query.detail;
if (detail) this.detail = detail;
},
methods: {
}
};
</script>

View File

@@ -4,7 +4,7 @@
<div class="logo-box">
<img
width="150"
:src="logoImg"
:src="$store.state.logoImg"
@click="$router.push('/')"
/>
<div>注册</div>
@@ -88,7 +88,7 @@
<router-link to="/article?id=1371992704333905920" class="item" target="_blank">条款</router-link>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © 2021 - Present
Copyright © {{year}} - Present
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
版权所有
</Row>
@@ -103,10 +103,11 @@ import * as apiLogin from '@/api/login.js';
import { sendSms } from '@/api/common.js';
import Verify from '@/components/verify';
export default {
name: 'Login',
name: 'SignUp',
components: { Verify },
data () {
return {
year: new Date().getFullYear(),
formRegist: {
// 注册表单
mobilePhone: '',
@@ -135,8 +136,7 @@ export default {
verifyType: 'REGISTER', // 验证状态
codeMsg: '发送验证码', // 提示文字
interval: '', // 定时器
time: 60, // 倒计时
logoImg: '' // logo图
time: 60 // 倒计时
};
},
methods: {
@@ -157,6 +157,7 @@ export default {
} else {}
});
},
// 发送短信验证码
sendCode () {
if (this.time === 60) {
if (this.formRegist.mobilePhone === '') {
@@ -192,14 +193,13 @@ export default {
});
}
},
handleCancel () {
this.$refs.formRegist.resetFields();
},
// 图片验证码成功回调
verifyChange (con) {
if (!con.status) return;
this.$refs.verify.show = false;
this.verifyStatus = true;
},
// 打开图片验证码
verifyBtnClick () {
if (!this.verifyStatus) {
this.$refs.verify.init();
@@ -208,8 +208,6 @@ export default {
},
mounted () {
this.$refs.formRegist.resetFields();
this.logoImg = this.Cookies.getItem('logo')
console.log(window.innerHeight);
document.querySelector('.sign-up').style.height = window.innerHeight + 'px'
}
};

View File

@@ -17,7 +17,7 @@
:open-names="openName"
@on-select="onSelect"
>
<!-- 循环导航栏 -->
<!-- 循环导航栏 -->
<Submenu
v-show="menu.children"
v-for="(menu, index) in list"
@@ -34,7 +34,6 @@
>{{ chlidren.articleCategoryName }}</MenuItem
>
</Submenu>
</Menu>
</Sider>
<Layout class="layout ml_10">

View File

@@ -1,45 +1,15 @@
<template>
<div class="wrapper">
<div class="orderBox">
<!-- <ul class="orderUl">
<li>
<div class="circle">
<Icon size="50" type="ios-card" />
</div>
<div class="info">
<Badge :count="0"> 代付款 </Badge>
</div>
</li>
<li>
<div class="circle">
<Icon size="50" type="ios-card" />
</div>
<div class="info">
<Badge :count="0"> 待收货 </Badge>
</div>
</li>
<li>
<div class="circle">
<Icon size="50" type="ios-card" />
</div>
<div class="info">
<Badge :count="0"> 待评价 </Badge>
</div>
</li>
</ul> -->
<div class="userBox">
<div class="box">
<!-- 我的订单组件 -->
<myOrderPage :paging="false" :homePage="true" />
</div>
<div class="box">
<!-- 近期收藏 -->
<myFavorites :paging="false" :homePage="true" />
</div>
<div class="box">
<!-- 猜你喜欢 -->
<!-- <myLike /> -->
</div>
<div>
<div class="userBox">
<div class="box">
<!-- 我的订单组件 -->
<myOrderPage :homePage="true" />
</div>
<div class="box">
<!-- 近期收藏 -->
<myFavorites :homePage="true" />
</div>
<div class="box">
</div>
</div>
</div>
@@ -48,7 +18,6 @@
<script>
import myOrderPage from '@/pages/home/orderCenter/MyOrder'
import myFavorites from '@/pages/home/memberCenter/Favorites'
// import myLike from '@/components/like'
export default {
name: 'main',
@@ -60,42 +29,6 @@ export default {
</script>
<style scoped lang="scss">
.circle {
width: 70px;
height: 70px;
border-radius: 50%;
overflow: hidden;
background: $success_color;
margin: 0 auto;
text-align: center;
color: #fff;
> i {
line-height: 70px;
}
}
.info {
text-align: center;
font-size: 18px;
margin: 10px 0;
}
.orderUl {
overflow: hidden;
> li {
cursor: pointer;
border-radius: 0.4em;
float: left;
padding: 10px 0;
margin: 0 11px;
width: 200px;
text-align: center;
@include background_color($light_background_color);
}
}
.userBox {
padding: 0 0 20px 0;
}

View File

@@ -1,90 +0,0 @@
<template>
<div>
<Table border ref="selection" :columns="columns" :data="shoppingCart" size="large" no-data-text="您的购物车没有商品请先添加商品到购物车再点击购买">
<template slot-scope="{row}" slot="price">
<span>{{row.price | unitPrice('¥')}}</span>
</template>
</Table>
<div class="go-to">
<Button @click="goTo" type="primary">去付款</Button>
</div>
</div>
</template>
<script>
import store from '@/vuex/store';
import { mapState, mapActions } from 'vuex';
export default {
name: 'MyShoppingCart',
data () {
return {
columns: [ // 表格表头
{
type: 'selection',
width: 58,
align: 'center'
},
{
title: '图片',
key: 'img',
width: 86,
render: (h, params) => {
return h('div', [
h('img', {
attrs: {
src: params.row.img
}
})
]);
},
align: 'center'
},
{
title: '标题',
key: 'title',
align: 'center'
},
{
title: '套餐',
width: 198,
key: 'package',
align: 'center'
},
{
title: '数量',
key: 'count',
width: 68,
align: 'center'
},
{
title: '价格',
width: 68,
slot: 'price',
align: 'center'
}
]
};
},
created () {
this.loadShoppingCart();
},
computed: {
...mapState(['shoppingCart'])
},
methods: {
...mapActions(['loadShoppingCart']),
goTo () {
this.$router.push('/cart');
}
},
store
};
</script>
<style scoped>
.go-to {
margin: 15px;
display: flex;
justify-content: flex-end;
}
</style>

View File

@@ -52,10 +52,6 @@ export const afterSaleStatusList = [
name: '买家退货,待卖家收货',
status: 'BUYER_RETURN'
},
{
name: '商家换货/补发',
status: 'SELLER_RE_DELIVERY'
},
{
name: '卖家确认收货',
status: 'SELLER_CONFIRM'
@@ -75,5 +71,9 @@ export const afterSaleStatusList = [
{
name: '完成售后',
status: 'COMPLETE'
},
{
name: '等待平台退款',
status: 'WAIT_REFUND'
}
]

View File

@@ -1,46 +0,0 @@
<template>
<div class="wrapper">
<card _Title="账号绑定"/>
<div>
<Row class="bindItem">
<Col :span="2">
</Col>
<Col :span="16">
<div class="setDivItem">
绑定QQ
</div>
<div class="setDivItem theme">
添加QQ号可以使用QQ登录
</div>
</Col>
<Col :span="4">
<Button>添加绑定</Button>
</Col>
</Row>
</div>
</div>
</template>
<script>
export default {
name: 'AccountBind',
}
</script>
<style scoped lang="scss">
.bindItem {
border-bottom: 1px solid $border_color;
padding: 16px 0;
/deep/ .ivu-col {
padding: 8px 0;
}
}
.setDivItem {
line-height: 1.75;
}
/deep/ .ivu-col-span-2, .ivu-col-span-4 {
text-align: center;
color: $theme_color;
}
</style>

View File

@@ -20,9 +20,7 @@
</template>
<script>
import {
getPwdStatus
} from '@/api/account';
import { getPwdStatus } from '@/api/account';
export default {
name: 'AccountSafe',
data () {

View File

@@ -28,16 +28,13 @@
<div class="order-name hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
{{item.goodsName}}
</div>
<div>
x1
</div>
</i-col>
<i-col span="4">{{item.createBy | secrecyMobile}}</i-col>
<i-col span="4">
{{item.grade==='GOOD'?'好评' : item.grade === 'WORSE'?'差评' : '中评'}}
</i-col>
<i-col span="4">
<Tooltip >
<Tooltip transfer>
<div class="content">{{item.content}}</div>
<div style="white-space: normal;" slot="content">
{{item.content}}
@@ -54,6 +51,7 @@
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
</div>
@@ -97,7 +95,7 @@ export default {
this.getList()
},
changePageSize (val) { // 修改页数
this.pageNumber = 1;
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},

View File

@@ -27,12 +27,15 @@
<td>补充内容</td>
<td>
<div style="display:flex;align-items:center;">
<div class="demo-upload-list" v-for="(img, index) in detail.images.split(',')" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
<template v-if="detail.images">
<div class="demo-upload-list" v-for="(img, index) in detail.images.split(',')" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
</div>
</div>
</div>
</template>
<div v-else>暂无</div>
</div>
</td>
</tr>
@@ -53,12 +56,15 @@
<td>
<div style="display:flex;align-items:center;">
<div class="demo-upload-list" v-for="(img, index) in detail.appealImages.split(',')" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
<template v-if="detail.appealImages">
<div class="demo-upload-list" v-for="(img, index) in detail.appealImages.split(',')" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
</div>
</div>
</div>
</template>
<div v-else>暂无</div>
</div>
</td>
</tr>
@@ -73,7 +79,7 @@
</table>
<Alert class="l_title" show-icon type="warning">对话详情</Alert>
<div class="speak-way" v-if="detail.orderComplaintCommunications.length">
<div class="speak-way" v-if="detail.orderComplaintCommunications && detail.orderComplaintCommunications.length">
<div
class="speak-msg seller"
:class="{'speak-buyer': item.owner == 'BUYER', 'speak-platform': item.owner == 'PLATFORM', 'speak-seller': item.owner == 'STORE',}"
@@ -96,7 +102,7 @@
<td>回复</td>
<td><label>
<input type="textarea" maxlength="200" :rows="4" clearable
style="width:260px" v-model="params.content"></input>
style="width:260px" v-model="params.content" />
</label></td>
</tr>
<tr>
@@ -124,6 +130,7 @@ export default {
visible: false, // 图片预览
previewImage: '', // 预览图片地址
loading: false, // 加载状态
submitLoading: false, // 回复消息loading
// 状态
statusLabel: {
NO_APPLY: '未申请',
@@ -163,6 +170,7 @@ export default {
this.$Message.error('请填写对话内容');
return;
}
this.submitLoading = true;
this.params.complainId = this.$route.query.id;
communication(this.params).then((res) => {
this.submitLoading = false;

View File

@@ -19,7 +19,7 @@
<span>投诉单号:{{item.id}}</span>
<span class="color999 ml_10">{{item.createTime}}</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 === 'APPLYING' || item.complainStatus === 'NEW'" @click="cancel(item.id)">取消投诉</span>
</div>
<Row class="order-item-view">
<i-col span="12" class="item-view-name">
@@ -29,18 +29,10 @@
<div class="order-name hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
{{item.goodsName}}
</div>
<div>
x1
</div>
</i-col>
<i-col span="4">{{statusLabel[item.complainStatus]}}</i-col>
<i-col span="4">
<Tooltip >
<div class="content">{{item.content}}</div>
<div style="white-space: normal;" slot="content">
{{item.content}}
</div>
</Tooltip>
<div class="content">{{item.complainTopic}}</div>
</i-col>
<i-col span="4">
<Tooltip >
@@ -60,6 +52,7 @@
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
</div>
@@ -77,10 +70,10 @@ export default {
statusLabel: { // 投诉状态
NO_APPLY: '未申请',
APPLYING: '申请中',
COMPLETE: '已完成,此时可申请',
EXPIRED: '已失效,不可申请',
COMPLETE: '已完成',
EXPIRED: '已失效',
CANCEL: '已取消',
NEW: '申请中'
NEW: '新订单'
},
total: 0, // 投诉总数
params: { // 请求参数
@@ -107,7 +100,7 @@ export default {
this.getList()
},
changePageSize (val) { // 改变页数
this.pageNumber = 1;
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
@@ -193,4 +186,7 @@ export default {
color: $theme_color;
}
}
.page-size{
text-align: right;
}
</style>

View File

@@ -38,7 +38,7 @@
<TabPane label="已选商品" name="goodsChecked">
<Table stripe :columns="goodsColumns" :data="goodsData.records">
<template slot-scope="{ row }" slot="name">
<div class="goods-msg" @click="linkTo(`/goodsDetail?skuId=${row.skuId}&goodsId=${row.id}`)"><img style="vertical-align:top;" :src="row.thumbnail" width="60" height="60" alt="">&nbsp; {{row.goodsName}}</div>
<div class="goods-msg" @click="linkTo(`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`)"><img style="vertical-align:top;" :src="row.thumbnail" width="60" height="60" alt="">&nbsp; {{row.goodsName}}</div>
</template>
<template slot-scope="{ row }" slot="price">
<span> {{ row.price | unitPrice }}</span>
@@ -47,7 +47,8 @@
<span> {{ row.commission | unitPrice }}</span>
</template>
<template slot-scope="{ row }" slot="action">
<Button type="primary" size="small" style="margin-right: 5px" @click="fenxiao(row)">分销商品</Button>
<Button type="success" size="small" style="margin-right: 5px" @click="fenxiao(row)">分销商品</Button>
<Button type="error" size="small" @click="selectGoods(row.id, false)">取消选择</Button>
</template>
</Table>
<div class="page-size">
@@ -65,7 +66,7 @@
<TabPane label="未选商品" name="goodsUncheck">
<Table stripe :columns="goodsColumns" :data="goodsData.records">
<template slot-scope="{ row }" slot="name">
<div class="goods-msg" @click="linkTo(`/goodsDetail?skuId=${row.skuId}&goodsId=${row.id}`)"><img style="vertical-align:top;" :src="row.thumbnail" width="60" height="60" alt="">&nbsp; {{row.goodsName}}</div>
<div class="goods-msg" @click="linkTo(`/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}`)"><img style="vertical-align:top;" :src="row.thumbnail" width="60" height="60" alt="">&nbsp; {{row.goodsName}}</div>
</template>
<template slot-scope="{ row }" slot="price">
<span> {{ row.price | unitPrice }}</span>
@@ -74,7 +75,7 @@
<span> {{ row.commission | unitPrice }}</span>
</template>
<template slot-scope="{ row }" slot="action">
<Button type="primary" size="small" style="margin-right: 5px" @click="selectGoods(row.id)">选择商品</Button>
<Button type="primary" size="small" style="margin-right: 5px" @click="selectGoods(row.id, true)">选择商品</Button>
</template>
</Table>
<div class="page-size">
@@ -91,11 +92,15 @@
</TabPane>
<TabPane label="提现记录" name="log">
<Table stripe :columns="logColumns" :data="logData.records">
<template slot-scope="{ row }" slot="sn">
<span>{{row.sn}}</span>
</template>
<template slot-scope="{ row }" slot="time">
<span>{{row.createTime}}</span>
</template>
<template slot-scope="{ row }" slot="price">
<span> +{{ row.price | unitPrice }}</span>
<span v-if="row.distributionCashStatus == 'REFUSE'" style="color: green"> +{{ row.price | unitPrice }}</span>
<span v-else style="color: red"> -{{ row.price | unitPrice }}</span>
</template>
<template slot-scope="{ row }" slot="status">
<span> {{row.distributionCashStatus == "APPLY" ? "待处理" : row.distributionCashStatus == "PASS" ? "通过" : "拒绝"}}</span>
@@ -154,7 +159,7 @@
</template>
<script>
import {distribution, applyDistribution, distCash, distCashHistory, getDistOrderList, getDistGoodsList, selectDistGoods} from '@/api/member.js'
import {distribution, applyDistribution, distCash, distCashHistory, getDistGoodsList, selectDistGoods} from '@/api/member.js'
import { IDCard } from '@/plugins/RegExp.js';
import vueQr from 'vue-qr';
export default {
@@ -183,9 +188,10 @@ export default {
{title: '商品名称', slot: 'name', width: 400},
{title: '商品价格', slot: 'price'},
{title: '佣金', slot: 'commission'},
{title: '操作', slot: 'action', width: 120}
{title: '操作', slot: 'action', minWidth: 120}
],
logColumns: [ // 日志表头
{title: '编号', slot: 'sn'},
{title: '申请时间', slot: 'time'},
{title: '提现金额', slot: 'price'},
{title: '提现状态', slot: 'status'}
@@ -232,8 +238,9 @@ export default {
this.withdrawApplyModal = false
this.price = 0;
if (res.success) {
this.$Message.success('提现成功')
this.$Message.success('申请已提交,请等待审核')
this.distribution()
this.getLog()
} else {
this.$Message.error(res.message)
}
@@ -257,9 +264,6 @@ export default {
} else if (tab === 'goodsUncheck') {
this.params.checked = false
this.getGoodsData()
} else if (tab === 'order') {
this.orderParams.pageNumber = 1
this.getOrderData()
} else if (tab === 'log') {
this.logParams.pageNumber = 1
this.getLog()
@@ -273,16 +277,20 @@ export default {
this.logParams.pageNumber = val;
this.getLog()
},
selectGoods (id) { // 选择商品
selectDistGoods(id).then(res => {
selectGoods (id, checked) { // 选择商品
let params = {
distributionGoodsId: id,
checked: checked
}
selectDistGoods(params).then(res => {
if (res.success) {
this.$Message.success('分销商品选择成功,请在已选商品中查看')
this.$Message.success('操作成功!')
this.getGoodsData()
}
})
},
fenxiao (row) { // 分销商品
this.qrcode = `${location.origin}/goodsDetail?skuId=${row.skuId}&goodsId=${row.id}&distributionId=${this.result.id}`
this.qrcode = `${location.origin}/goodsDetail?skuId=${row.skuId}&goodsId=${row.goodsId}&distributionId=${this.result.id}`
this.goodsNameCurr = row.goodsName
this.qrcodeShow = true;
},
@@ -291,14 +299,9 @@ export default {
if (res.success) this.goodsData = res.result
})
},
getOrderData () { // 订单数据
getDistOrderList(this.orderParams).then(res => {
if (res.success) this.goodsData = res.result
})
},
getLog () { // 提现历史
distCashHistory(this.logParams).then(res => {
if (res.success) this.goodsData = res.result
if (res.success) this.logData = res.result
})
},
distribution () { // 获取分销商信息
@@ -328,39 +331,18 @@ export default {
</script>
<style scoped lang='scss'>
.afList{
display: flex;
}
.codeImg{
display: flex;
>img{
width: 150px;
height: 150px;
}
}
.mb_40{margin-bottom: 40px;}
.box {
margin: 20px 0;
}
.page-size {
margin: 15px 0px;
display: flex;
justify-content: flex-end;
align-items: center;
text-align: right;
}
.account-price {
font-weight: bold;
}
.subTips {
@include sub_color($light_sub_color);
}
.account-btns {
margin: 10px 0;
}
.ivu-btn {
margin: 0 4px;
}
.fontsize_48 {
font-size: 48px;

View File

@@ -8,8 +8,14 @@
<div class="goodsImg hover-pointer" v-if="params.type === 'GOODS'">
<img :src="item.image" />
</div>
<div class="goodsTitle hover-pointer">
{{params.type === 'GOODS'? item.goodsName : item.storeName}}
<div class="goodsImg hover-pointer" v-else>
<img :src="item.storeLogo" />
</div>
<div class="goodsTitle hover-color" v-if="params.type === 'GOODS'" @click="buynow(item.skuId, item.goodsId)">
{{item.goodsName}}
</div>
<div v-else class="goodsTitle hover-pointer">
{{item.storeName}}
</div>
<div class="goodsPrice">
<span v-if="params.type === 'GOODS'">{{item.price | unitPrice('')}}</span>
@@ -17,23 +23,15 @@
</div>
<div class="goodsBuy">
<Button size="small" type="primary" @click="buynow(item.skuId, item.goodsId)" v-if="params.type === 'GOODS'">立即购买</Button>
<Button size="small" type="primary" @click="goShop(item.storeId)" v-else>店铺购买</Button>
<Button size="small" type="error" ghost v-if="params.type === 'GOODS'" @click="cancel(item.skuId)">取消收藏</Button>
<Button size="small" type="error" ghost v-if="params.type === 'SHOP'" @click="cancel(item.storeId)">取消收藏</Button>
<Button size="small" type="primary" @click="goShop(item.id)" v-else>店铺购买</Button>
<Button size="small" v-if="params.type === 'GOODS'" @click="cancel(item.skuId)">取消收藏</Button>
<Button size="small" v-if="params.type === 'SHOP'" @click="cancel(item.id)">取消收藏</Button>
</div>
</div>
</template>
<Spin size="large" fix v-if="spinShow"></Spin>
</div>
<empty v-else />
<!-- 分页 -->
<!-- <div class="page-size mt_10" v-if="paging">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
</div> -->
</div>
</template>
@@ -42,10 +40,6 @@ import { collectList, cancelCollect } from '@/api/member.js'
export default {
name: 'Favorites',
props: {
paging: {
type: Boolean,
default: true
},
homePage: {
type: Boolean,
default: false
@@ -91,15 +85,6 @@ export default {
}
});
},
changePageNum (val) { // 修改页码
this.params.pageNumber = val;
this.getList()
},
changePageSize (val) { // 修改页数
this.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
buynow (skuId, goodsId) { // 跳转详情
let url = this.$router.resolve({
path: '/goodsDetail',

View File

@@ -1,125 +0,0 @@
<template>
<div class="wrapper">
<card _Title="我的发票"></card>
<empty v-if="list.length===0" />
<div v-else>
<Button size="small" @click="invoiceAvailable = true">新增发票</Button>
<div class="receipt-item" v-for="(item,index) in list" :key="index">
<p><span>发票抬头</span>{{item.receiptTitle}}</p>
<p><span>发票内容</span> {{item.receiptContent}}</p>
<p><span>纳税人识别号</span> {{item.taxpayerId}}</p>
</div>
</div>
<Modal v-model="invoiceAvailable" width="600" footer-hide>
<Form
:model="form"
ref="form"
label-position="left"
:rules="ruleInline"
:label-width="110"
>
<FormItem label="发票类型">
<RadioGroup v-model="form.type" type="button" button-style="solid">
<Radio :label="2">单位</Radio>
</RadioGroup>
</FormItem>
<FormItem
label="发票抬头"
prop="receiptTitle"
>
<i-input v-model="form.receiptTitle"></i-input>
</FormItem>
<FormItem
label="纳税人识别号"
prop="taxpayerId"
>
<i-input v-model="form.taxpayerId"></i-input>
</FormItem>
<FormItem label="发票内容">
<RadioGroup v-model="form.receiptContent" type="button" button-style="solid">
<Radio label="商品明细">商品明细</Radio>
</RadioGroup>
</FormItem>
</Form>
<div style="text-align: center">
<Button type="primary" :loading="loading" @click="save">保存发票信息</Button>
<Button type="default" @click="invoiceAvailable = false">取消</Button>
</div>
</Modal>
</div>
</template>
<script>
import { receiptList, saveReceipt } from '@/api/member.js';
import { TINumber } from '@/plugins/RegExp.js';
export default {
name: 'Invoice',
data () {
return {
list: [], // 发票列表
form: { // 添加发票表单
type: 2,
receiptTitle: '', // 发票抬头
taxpayerId: '', // 纳税人识别号
receiptContent: '商品明细'
},
ruleInline: { // 验证规则
receiptTitle: [{ required: true, message: '请填写公司名称' }],
taxpayerId: [
{ required: true, message: '请填写纳税人识别号' },
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
]
},
loading: false, // 加载状态
invoiceAvailable: false // 添加发票模态框显隐
};
},
mounted () {
this.getList()
},
methods: {
getList () { // 获取发票列表
receiptList().then(res => {
this.list = res.result.records;
})
},
save () { // 保存发票
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
let params = {
receiptTitle: this.form.receiptTitle,
taxpayerId: this.form.taxpayerId,
receiptContent: this.form.receiptContent
};
saveReceipt(params).then((res) => {
this.loading = false;
if (res.success) {
this.getList();
this.resetData();
this.invoiceAvailable = false;
}
}).catch(() => {
this.loading = false;
});
}
});
},
resetData () { // 重置表单数据
this.$refs.form.resetFields();
}
}
};
</script>
<style scoped lang="scss">
.receipt-item {
cursor: pointer;
font-size: 14px;
border-bottom: 1px solid #eee;
> p {
padding: 12px 0;
}
}
</style>

View File

@@ -126,7 +126,7 @@ export default {
{type: 'string', min: 6, message: '密码不能少于6位'}
],
againPassword: [
{required: true, message: '请输入新密码', trigger: 'blur'},
{required: true, message: '请确认新密码', trigger: 'blur'},
{type: 'string', min: 6, message: '密码不能少于6位'}
]
}
@@ -200,13 +200,10 @@ export default {
</script>
<style scoped lang="scss">
.wrapper {
text-align: center;
}
.phone {
text-align: left;
}
</style>

View File

@@ -1,14 +1,16 @@
<template>
<div class="point">
<card _Title="我的积分" />
<card _Title="我的积分"/>
<div class="point-content">
<span>剩余积分<span>{{pointObj.variablePoint || 0}}</span></span>
<span>累计获得<span>{{pointObj.point || 0}}</span></span>
<span>剩余积分<span>{{ pointObj.point || 0 }}</span></span>
<span>累计获得<span>{{ pointObj.totalPoint || 0 }}</span></span>
</div>
<h3>积分日志</h3>
<Table :columns="logColumns" :data="logData.records">
<template slot-scope="{ row }" slot="point">
<div><span>{{row.pointType == "1" ? '+' : '-'}}</span>{{ row.variablePoint }}</div>
<div :style="{color:row.pointType === 'INCREASE' ? 'green' : 'red'}">
<span v-if="row.pointType === 'INCREASE'">+</span>{{ row.variablePoint }}
</div>
</template>
</Table>
<!-- 分页 -->
@@ -28,6 +30,7 @@
</template>
<script>
import {memberPoint, memberPointHistory} from '@/api/member.js'
export default {
name: 'Point',
data () {
@@ -74,11 +77,11 @@ export default {
})
},
changePage (val) { // 修改页码
this.pageNumber = val
this.params.pageNumber = val
this.getHistory()
},
changePageSize (val) { // 修改页数
this.param.pageSize = val
this.params.pageSize = val
this.params.pageNumber = 1
this.getHistory()
}
@@ -90,12 +93,15 @@ h3 {
font-size: 16px;
margin: 20px 10px;
}
.point-content {
text-align: center;
margin-bottom: 30px;
>span{
> span {
color: #999;
margin-right: 100px;
span {
color: $theme_color;
font-size: 24px;

View File

@@ -159,6 +159,7 @@ export default {
}
},
mounted () {
window.scrollTo(0, 0)
this.accessToken.accessToken = storage.getItem('accessToken');
this.getOrderDetail()
}

View File

@@ -10,21 +10,22 @@
:rules="ruleInline"
>
<FormItem label="收件人" prop="name">
<i-input v-model="formData.name" style="width: 600px"></i-input>
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
</FormItem>
<FormItem label="收件地区" prop="address">
<i-input
v-model="formData.address"
disabled
placeholder="请选择收货地址"
style="width: 600px"
></i-input>
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
</FormItem>
<FormItem label="详细地址" prop="detail">
<i-input v-model="formData.detail" style="width: 600px"></i-input>
<i-input v-model="formData.detail" placeholder="请输入详细地址" style="width: 600px"></i-input>
</FormItem>
<FormItem label="手机号码" prop="mobile">
<i-input v-model="formData.mobile" style="width: 600px"></i-input>
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
</FormItem>
<FormItem label="地址别名">
<i-input

View File

@@ -4,7 +4,7 @@
<card _Title="我的售后" :_Size="16"></card>
<!-- 搜索 筛选 -->
<div class="mb_20 box">
<div class="global_float_right" >
<div class="global_float_right">
<Input
class="width_300"
search
@@ -16,46 +16,46 @@
</div>
</div>
<!-- 列表 -->
<empty v-if="orderList.length === 0" />
<empty v-if="orderList.length === 0"/>
<div class="order-content" v-else>
<template v-for="(order, onderIndex) in orderList">
<div
class="order-list"
:key="onderIndex"
>
<div class="order-list" :key="onderIndex">
<div class="order-header">
<div>
<div v-if="order.serviceStatus">{{filterOrderStatus(order.serviceStatus)}}</div>
<div v-if="order.serviceStatus">{{ filterOrderStatus(order.serviceStatus) }}</div>
<div>
售后单号{{ order.sn }} &nbsp; &nbsp; &nbsp;{{order.createTime}}
售后单号{{ order.sn }} &nbsp; &nbsp; &nbsp;{{ order.createTime }}
&nbsp; &nbsp;{{ order.memberName | secrecyMobile }}
</div>
</div>
<div>
<span>{{ order.applyRefundPrice | unitPrice("¥") }}</span>
<span>申请退款金额<span class="global_color">{{ order.applyRefundPrice | unitPrice("¥") }}</span></span>
</div>
</div>
<div class="order-body">
<div class="goods-list">
<img @click="goodsDetail(order.skuId, order.goodsId)" class="hover-color" :src="order.goodsImage" alt="" />
<img @click="goodsDetail(order.skuId, order.goodsId)" class="hover-color" :src="order.goodsImage" alt=""/>
<div>
<div class="hover-color" @click="goodsDetail(order.skuId, order.goodsId)">{{ order.goodsName }}</div>
<div class="mt_10">
<span class="global_color"
>{{ order.flowPrice | unitPrice("¥") }} </span
>x {{ order.num }}
<div class="mt_10"> x {{ order.num }}
</div>
</div>
</div>
<div>
<span @click="shopPage(order.shopId)">{{ order.storeName }}</span>
</div>
<div>
<!-- 订单基础操作 -->
<Button @click="goDetail(order.sn)" size="small">售后详情</Button>
<Button @click="cancel(order.sn)" v-if="order.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
<Button @click="goDetail(order.sn)" type="info" size="small">售后详情</Button>
<Button @click="openModal(order)"
v-if="order.serviceStatus == 'PASS' &&
order.serviceType != 'RETURN_MONEY'"
type="warning" size="small">提交物流
</Button>
<Button @click="cancel(order.sn)" type="error" v-if="order.afterSaleAllowOperationVO.cancel" size="small">
取消售后
</Button>
</div>
</div>
</div>
@@ -65,20 +65,61 @@
<!-- 分页 -->
<div class="page-size">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-sizer>
</Page>
</div>
<Modal v-model="logisticsShow" width="530">
<p slot="header">
<span>提交物流信息</span>
</p>
<div>
<div class="goods-list modal-goods">
<img @click="goodsDetail(singleOrder.skuId, singleOrder.goodsId)" class="hover-color"
:src="singleOrder.goodsImage" alt=""/>
<div>
<div class="hover-color" @click="goodsDetail(singleOrder.skuId, singleOrder.goodsId)">
{{ singleOrder.goodsName }}
</div>
<div class="mt_10">
<span class="global_color"
>{{ singleOrder.flowPrice | unitPrice("¥") }} </span
>x {{ singleOrder.num }}
</div>
</div>
</div>
<Form ref="form" :model="form" label-position="left" :label-width="100" :rules="rules">
<FormItem label="物流公司" prop="logisticsId">
<Select v-model="form.logisticsId" placeholder="请选择物流公司">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</FormItem>
<FormItem label="快递单号" prop="logisticsNo">
<Input v-model="form.logisticsNo" placeholder="请填写快递单号"></Input>
</FormItem>
<FormItem label="发货时间" prop="mDeliverTime">
<DatePicker type="date" style="width:100%" v-model="form.mDeliverTime" @on-change="changeTime"
format="yyyy-MM-dd" placeholder="选择发货时间"></DatePicker>
</FormItem>
</Form>
</div>
<div slot="footer" style="text-align: right">
<Button @click="logisticsShow = false">关闭</Button>
<Button type="primary" :loading="submitLoading" @click="submitDelivery">提交</Button>
</div>
</Modal>
</div>
</template>
<script>
import { afterSaleList, cancelAfterSale } from '@/api/member.js';
import { afterSaleStatusList } from '../enumeration.js'
import {afterSaleList, cancelAfterSale} from '@/api/member.js';
import {afterSaleDelivery, getLogisticsCompany} from '@/api/order.js';
import {afterSaleStatusList} from '../enumeration.js'
export default {
name: 'AfterSale',
data () {
data() {
return {
orderList: [], // 订单列表
params: { // 请求参数
@@ -91,20 +132,35 @@ export default {
// 状态数组
afterSaleStatusList,
total: 0, // 订单总数
spinShow: false // 加载状态
spinShow: false, // 加载状态
companyList: [], // 物流公司列表
logisticsShow: false, // 物流信息modal
singleOrder: {}, // 单独的售后信息
form: { // 物流信息数据
afterSaleSn: '',
logisticsId: '',
logisticsNo: '',
mDeliverTime: ''
},
rules: { // 必填校验
logisticsId: [{required: true, message: '请选择物流公司'}],
logisticsNo: [{required: true, message: '请填写物流编号'}],
mDeliverTime: [{required: true, message: '请选择发货时间'}]
},
submitLoading: false // 提交加载状态
};
},
mounted () {
mounted() {
this.getList();
},
methods: {
goDetail (sn) { // 跳转售后详情
goDetail(sn) { // 跳转售后详情
this.$router.push({
name: 'AfterSaleDetail',
query: {sn}
})
},
cancel (sn) { // 取消售后申请
cancel(sn) { // 取消售后申请
this.$Modal.confirm({
title: '取消',
content: '<p>确定取消此次售后申请吗?</p>',
@@ -116,26 +172,27 @@ export default {
}
})
},
onCancel: () => {}
onCancel: () => {
}
});
},
goodsDetail (skuId, goodsId) {
goodsDetail(skuId, goodsId) {
// 跳转商品详情
let routeUrl = this.$router.resolve({
path: '/goodsDetail',
query: { skuId, goodsId }
query: {skuId, goodsId}
});
window.open(routeUrl.href, '_blank');
},
// 跳转店铺首页
shopPage (id) {
shopPage(id) {
let routeUrl = this.$router.resolve({
path: '/Merchant',
query: { id: id }
query: {id: id}
});
window.open(routeUrl.href, '_blank');
},
getList () { // 获取售后列表
getList() { // 获取售后列表
this.spinShow = true;
let params = JSON.parse(JSON.stringify(this.params))
afterSaleList(params).then(res => {
@@ -146,18 +203,57 @@ export default {
}
});
},
changePageNum (val) { // 修改页码
changePageNum(val) { // 修改页码
this.params.pageNumber = val;
this.getList()
},
changePageSize (val) { // 修改页数
this.pageNumber = 1;
changePageSize(val) { // 修改页数
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
filterOrderStatus (status) { // 获取订单状态中文
const ob = this.afterSaleStatusList.filter(e => { return e.status === status });
filterOrderStatus(status) { // 获取订单状态中文
const ob = this.afterSaleStatusList.filter(e => {
return e.status === status
});
return ob[0].name
},
// 获取物流公司列表
getCompany() {
getLogisticsCompany().then(res => {
if (res.success) {
this.companyList = res.result
}
})
},
// 提交物流信息
submitDelivery() {
this.submitLoading = true
afterSaleDelivery(this.form).then(res => {
if (res.success) {
this.logisticsShow = false;
this.$Message.success('提交成功')
this.getList()
}
this.submitLoading = false
}).catch(() => {
this.submitLoading = false
})
},
// 提交物流modal
openModal(row) {
console.log(row);
this.singleOrder = row;
this.form.afterSaleSn = row.sn
this.logisticsShow = true;
this.$refs.form.resetFields()
if (!this.companyList.length) {
this.getCompany()
}
},
// 格式化时间
changeTime(time) {
this.form.mDeliverTime = time;
}
}
};
@@ -167,25 +263,31 @@ export default {
.wrapper {
margin-bottom: 40px;
}
.box {
overflow: hidden;
}
.page-size {
margin: 15px 0px;
display: flex;
justify-content: flex-end;
align-items: center;
}
/** 订单列表 */
.order-list {
border: 1px solid #ddd;
border-radius: 3px;
margin-bottom: 10px;
&:hover{
.del-btn{visibility: visible;}
&:hover {
.del-btn {
visibility: visible;
}
}
.del-btn{
.del-btn {
visibility: hidden;
}
@@ -195,45 +297,37 @@ export default {
padding: 10px;
justify-content: space-between;
border-bottom: 1px solid #ddd;
> div:nth-child(1) > div:nth-child(2) {
font-size: 12px;
color: #999;
margin-top: 3px;
}
}
.order-body {
display: flex;
justify-content: space-between;
color: #999;
padding: 10px;
.goods-list {
width: 500px;
display: flex;
margin-bottom: 10px;
img {
width: 60px;
height: 60px;
margin-right: 10px;
}
> div {
flex: 1;
}
}
> div:nth-child(2) {
width: 150px;
text-align: center;
span {
color: #438cde;
cursor: pointer;
&:hover {
color: $theme_color;
}
}
.ivu-icon {
color: #ff8f23;
cursor: pointer;
&:hover {
color: $theme_color;
}
@@ -242,10 +336,32 @@ export default {
> div:nth-child(3) {
width: 100px;
.ivu-btn {
margin-bottom: 10px;
}
}
}
}
.goods-list {
width: 500px;
display: flex;
margin-bottom: 10px;
img {
width: 60px;
height: 60px;
margin-right: 10px;
}
> div {
flex: 1;
}
}
.modal-goods {
padding: 5px;
background-color: #eee;
}
</style>

View File

@@ -1,8 +1,15 @@
<template>
<div class="order-detail">
<card _Title="售后详情" :_Size="16"></card>
<!-- 操作按钮 -->
<Card class="mb_10" v-if="(afterSale.serviceStatus == 'PASS' &&
afterSale.serviceType != 'RETURN_MONEY') || (afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel)">
<Button type="success" @click="openModal" v-if="afterSale.serviceStatus == 'PASS' &&
afterSale.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
<Button type="error" @click="cancel(afterSale.sn)" v-if="afterSale.afterSaleAllowOperationVO && afterSale.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
</Card>
<div class="order-card">
<h3>{{filterOrderStatus(afterSale.serviceStatus)}}</h3>
<h3>{{afterSale.serviceName}}</h3>
<p class="global_color fontsize_18">{{ afterSale.orderStatusValue }}</p>
<p>售后单号:{{ afterSale.sn }} &nbsp;&nbsp;&nbsp;订单号:{{afterSale.orderSn}}</p>
<div style="color:#999;" class="operation-time">创建时间:{{afterSale.createTime}}</div>
@@ -31,13 +38,30 @@
<h3 class="mb_10">服务单信息</h3>
<table border="1" cellpadding='0' cellspacing="0">
<tr>
<td>退款方式</td><td>{{afterSale.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}{{afterSale.applyRefundPrice | unitPrice('¥')}}</td>
<td>退款方式</td><td>{{afterSale.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}</td>
</tr>
<tr>
<td>申请退款金额</td><td>{{afterSale.applyRefundPrice | unitPrice('¥')}}</td>
</tr>
<tr v-if="afterSale.actualRefundPrice">
<td>实际退款金额</td><td>{{afterSale.actualRefundPrice | unitPrice('¥')}}</td>
</tr>
<template v-if="afterSale.refundWay === 'OFFLINE'">
<tr>
<td>退款开户行</td><td>{{afterSale.bankDepositName}}</td>
</tr>
<tr>
<td>退款开户名</td><td>{{afterSale.bankAccountName}}</td>
</tr>
<tr>
<td>退款卡号</td><td>{{afterSale.bankAccountNumber}}</td>
</tr>
</template>
<tr>
<td>商品处理方式</td><td>{{afterSale.serviceType == 'RETURN_MONEY' ? '退款' : '退货'}}</td>
</tr>
<tr>
<td>退款原因</td><td>{{afterSale.reason}}</td>
<td>退款原因</td><td>{{afterSale.reasonName}}</td>
</tr>
<tr>
<td>问题描述</td><td>{{afterSale.problemDesc}}</td>
@@ -50,10 +74,35 @@
<img :src="img" width="200" height="200" @click="perviewImg(img)" class="hover-pointer" alt="">
</div>
</div>
<Modal v-model="logisticsShow" width="530">
<p slot="header">
<span>提交物流信息</span>
</p>
<div>
<Form ref="form" :model="form" label-position="left" :label-width="100" :rules="rules">
<FormItem label="物流公司" prop="logisticsId">
<Select v-model="form.logisticsId" placeholder="请选择物流公司">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</FormItem>
<FormItem label="快递单号" prop="logisticsNo">
<Input v-model="form.logisticsNo" placeholder="请填写快递单号"></Input>
</FormItem>
<FormItem label="发货时间" prop="mDeliverTime">
<DatePicker type="date" style="width:100%" v-model="form.mDeliverTime" @on-change="changeTime" format="yyyy-MM-dd" placeholder="选择发货时间"></DatePicker>
</FormItem>
</Form>
</div>
<div slot="footer" style="text-align: right">
<Button @click="logisticsShow = false">关闭</Button>
<Button type="primary" :loading="submitLoading" @click="submitDelivery">提交</Button>
</div>
</Modal>
</div>
</template>
<script>
import { afterSaleDetail, afterSaleReason, afterSaleLog } from '@/api/member.js';
import { afterSaleDetail, afterSaleLog, afterSaleReason, cancelAfterSale } from '@/api/member.js';
import { afterSaleDelivery, getLogisticsCompany } from '@/api/order.js';
import { afterSaleStatusList } from '../enumeration.js'
export default {
name: 'aftersale-detail',
@@ -61,8 +110,22 @@ export default {
return {
afterSale: {}, // 售后详情数据
logList: [], // 日志
afterSaleStatusList // 售后状态列表
reasonList: [], // 售后原因列表
afterSaleStatusList, // 售后状态列表
companyList: [], // 物流公司列表
logisticsShow: false, // 物流信息modal
form: { // 物流信息数据
afterSaleSn: '',
logisticsId: '',
logisticsNo: '',
mDeliverTime: ''
},
rules: { // 必填校验
logisticsId: [{ required: true, message: '请选择物流公司' }],
logisticsNo: [{ required: true, message: '请填写物流编号' }],
mDeliverTime: [{ required: true, message: '请选择发货时间' }]
},
submitLoading: false // 提交加载状态
};
},
methods: {
@@ -70,13 +133,25 @@ export default {
afterSaleDetail(this.$route.query.sn).then(res => {
if (res.success) {
this.afterSale = res.result;
afterSaleReason(this.afterSale.serviceType).then(res => {
res.result.forEach(element => {
if (element.id === this.afterSale.reason) {
this.$set(this.afterSale, 'reason', element.reason)
}
});
this.afterSale.serviceName = this.filterOrderStatus(this.afterSale.serviceStatus)
// 如果是原因id则调接口查询原因中文释义
const pattern3 = new RegExp('[0-9]+');
if (pattern3.test(this.afterSale.reason)) {
this.getReason(this.afterSale.serviceType)
} else {
this.$set(this.afterSale, 'reasonName', this.afterSale.reason)
}
}
})
},
getReason (type) { // 获取售后原因
afterSaleReason(type).then(res => {
if (res.success) {
this.reasonList = res.result
this.reasonList.forEach(e => {
if (e.id === this.afterSale.reason) {
this.$set(this.afterSale, 'reasonName', e.reason)
}
})
}
})
@@ -88,10 +163,60 @@ export default {
},
filterOrderStatus (status) { // 获取订单状态中文
const ob = this.afterSaleStatusList.filter(e => { return e.status === status });
return ob[0].name
if (ob.length) return ob[0].name
},
perviewImg (img) {
perviewImg (img) { // 查看图片
window.open(img, '_blank')
},
cancel (sn) { // 取消售后申请
this.$Modal.confirm({
title: '取消',
content: '<p>确定取消此次售后申请吗?</p>',
onOk: () => {
cancelAfterSale(sn).then(res => {
if (res.success) {
this.$Message.success('取消售后申请成功')
this.getDetail()
}
})
},
onCancel: () => {}
});
},
// 获取物流公司列表
getCompany () {
getLogisticsCompany().then(res => {
if (res.success) {
this.companyList = res.result
}
})
},
// 提交物流信息
submitDelivery () {
this.submitLoading = true
afterSaleDelivery(this.form).then(res => {
if (res.success) {
this.logisticsShow = false;
this.$Message.success('提交成功')
this.getDetail()
}
this.submitLoading = false
}).catch(() => {
this.submitLoading = false
})
},
// 提交物流modal
openModal () {
this.form.afterSaleSn = this.afterSale.sn
this.logisticsShow = true;
this.$refs.form.resetFields()
if (!this.companyList.length) {
this.getCompany()
}
},
// 格式化时间
changeTime (time) {
this.form.mDeliverTime = time;
}
},
mounted () {

View File

@@ -8,7 +8,7 @@
>
<template slot-scope="{ row }" slot="goodsName">
<div style="padding:5px;display:flex;">
<img :src="row.image" style="vertical-align: top;" width="60" alt=""> <span class="ml_10">{{row.goodsName}}</span>
<img :src="row.image" style="vertical-align: top;" width="60" height="60" alt=""> <span class="ml_10">{{row.goodsName}}</span>
</div>
</template>
<template slot-scope="{ row }" slot="goodsPrice">
@@ -71,7 +71,7 @@
<Input v-model="form.bankAccountNumber" type="text" placeholder="请输入银行账号" style="width:260px" />
</FormItem>
</template>
<FormItem label="返回方式">
<FormItem label="返回方式" v-if="form.serviceType === 'RETURN_GOODS'">
<div>快递至第三方卖家</div>
</FormItem>
<FormItem>
@@ -129,7 +129,7 @@ export default {
{ required: true, message: '请输入银行卡号' },
{
type: 'string',
pattern: /^([1-9]{1})(\d{14}|\d{18})$/,
pattern: /^[0-9]\d*$/,
message: '请输入正确的银行卡号'
}
],

View File

@@ -8,47 +8,45 @@
<span class="color999 ml_20" v-if="order.order">{{order.order.paymentTime}}</span>
</p>
</div>
<ul class="goods-eval">
<li >
<div class="goods-con">
<img :src="orderGoods.image" class="hover-pointer" alt="" width="100" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">
<p class="hover-pointer color999" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">{{orderGoods.goodsName}}</p>
<p>{{orderGoods.goodsPrice | unitPrice('¥')}}</p>
</div>
<div class="goods-eval">
<div class="goods-con">
<img :src="orderGoods.image" class="hover-pointer" alt="" width="100" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">
<p class="hover-pointer color999" @click="goGoodsDetail(orderGoods.skuId, orderGoods.goodsId)">{{orderGoods.goodsName}}</p>
<p>{{orderGoods.goodsPrice | unitPrice('¥')}}</p>
</div>
<div class="eval-con">
<div>
<span class="color999">投诉主题</span>
<Select v-model="form.complainTopic" style="width:260px;margin-bottom:10px">
<Option v-for="item in reasonList" :value="item.reason" :key="item.id">{{ item.reason }}</Option>
</Select>
<Input type="textarea" maxlength="500" show-word-limit :rows="4" placeholder="请输入投诉内容" v-model="form.content" />
</div>
<div style="display:flex;align-items:center;">
<div class="demo-upload-list" v-for="(img, index) in orderGoods.uploadList" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
<Icon type="ios-trash-outline" @click.native="handleRemove(index)"></Icon>
</div>
</div>
<Upload
:show-upload-list="false"
:on-success="handleSuccess"
:before-upload="handleBeforeUpload"
:format="['jpg','jpeg','png']"
:action="action"
:headers="accessToken"
style="display: inline-block;width:58px;">
<div class="hover-pointer icon-upload" style="">
<Icon type="ios-camera" size="20"></Icon>
</div>
</Upload>
<div class="describe">上传投诉凭证最多5张</div>
</div>
<div class="eval-con">
<div>
<span class="color999">投诉主题</span>
<Select v-model="form.complainTopic" style="width:260px;margin-bottom:10px">
<Option v-for="item in reasonList" :value="item.reason" :key="item.id">{{ item.reason }}</Option>
</Select>
<Input type="textarea" maxlength="500" show-word-limit :rows="4" placeholder="请输入投诉内容" v-model="form.content" />
</div>
</li>
</ul>
<div style="display:flex;align-items:center;">
<div class="demo-upload-list" v-for="(img, index) in orderGoods.uploadList" :key="index">
<img :src="img">
<div class="demo-upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(img)"></Icon>
<Icon type="ios-trash-outline" @click.native="handleRemove(index)"></Icon>
</div>
</div>
<Upload
:show-upload-list="false"
:on-success="handleSuccess"
:before-upload="handleBeforeUpload"
:format="['jpg','jpeg','png']"
:action="action"
:headers="accessToken"
style="display: inline-block;width:58px;">
<div class="hover-pointer icon-upload" style="">
<Icon type="ios-camera" size="20"></Icon>
</div>
</Upload>
<div class="describe">上传投诉凭证最多5张</div>
</div>
</div>
</div>
<Button type="primary" class="mt_10" :loading="loading" @click="save">提交</Button>
<Modal title="View Image" v-model="visible">
<img :src="previewImage" v-if="visible" style="width: 100%">
@@ -140,6 +138,7 @@ export default {
mounted () {
this.accessToken.accessToken = storage.getItem('accessToken');
this.getOrderDetail()
window.scrollTo(0, 0)
}
}
</script>
@@ -155,10 +154,8 @@ export default {
font-weight: bold;
}
}
.goods-eval li{
.goods-eval{
display: flex;
border-bottom: 1px solid #eee;
.goods-con {
width: 30%;
padding: 20px;

View File

@@ -3,12 +3,10 @@
<card _Title="收货地址" _More="添加新地址" _Src="/home/addAddress"></card>
<div class="address-box" v-for="(item, index) in list" :key="index">
<div class="address-header">
<span
>{{ item.name }}
<span>
{{ item.name }}
<Tag class="ml_10" v-if="item.isDefault" color="red">默认地址</Tag>
<Tag class="ml_10" v-if="item.alias" color="warning">{{
item.alias
}}</Tag>
<Tag class="ml_10" v-if="item.alias" color="warning">{{item.alias}}</Tag>
</span>
<div class="address-action">
<span @click="edit(item.id)"><Icon type="edit"></Icon>修改</span>
@@ -81,9 +79,6 @@ export default {
},
mounted () {
this.getAddrList();
},
components: {
card
}
};
</script>
@@ -115,7 +110,7 @@ export default {
}
.address-content-title {
@include sub_color($light_sub_color);
}
.address-action span {

View File

@@ -60,17 +60,15 @@
</div>
</div>
</div>
<div>
<span @click="shopPage(order.storeId)">{{ order.storeName }}</span
>
<span @click="shopPage(order.storeId)">{{ order.storeName }}</span>
</div>
<div>
<!-- 订单基础操作 -->
<Button @click="orderDetail(order.sn)" size="small">订单详情</Button>
<Button @click="handleCancelOrder(order.sn)" v-if="order.allowOperationVO.cancel" size="small">取消订单</Button>
<Button @click="goPay(order.sn)" size="small" v-if="order.allowOperationVO.pay">去支付</Button>
<Button @click="received(order.sn)" size="small" v-if="order.allowOperationVO.rog">确认收货</Button>
<Button @click="orderDetail(order.sn)" type="info" size="small">订单详情</Button>
<Button @click="handleCancelOrder(order.sn)" type="error" v-if="order.allowOperationVO.cancel" size="small">取消订单</Button>
<Button @click="goPay(order.sn)" size="small" type="success" v-if="order.allowOperationVO.pay">去支付</Button>
<Button @click="received(order.sn)" size="small" type="warning" v-if="order.allowOperationVO.rog">确认收货</Button>
<!-- 售后 -->
<Button v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="applyAfterSale(order.orderItems)" size="small">申请售后</Button>
</div>
@@ -79,25 +77,26 @@
<Spin size="large" fix v-if="spinShow"></Spin>
</div>
<!-- 分页 -->
<div class="page-size" v-if="paging">
<div class="page-size" v-if="!homePage">
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
</div>
<!-- 选择售后商品 -->
<Modal v-model="afterSaleModal" title="请选择申请售后的商品">
<div>
<Table
border
:columns="afterSaleColumns"
:data="afterSaleArr"
@on-row-click="afterSaleSelect"
>
</Table>
</div>
<div slot="footer"></div>
<div>
<Table
border
:columns="afterSaleColumns"
:data="afterSaleArr"
@on-row-click="afterSaleSelect"
>
</Table>
</div>
<div slot="footer"></div>
</Modal>
<Modal v-model="cancelAvail" title="请选择取消订单原因" @on-ok="sureCancel" @on-cancel="cancelAvail = false">
<RadioGroup v-model="cancelParams.reason" vertical type="button" button-style="solid">
@@ -116,11 +115,7 @@ import { orderStatusList } from '../enumeration.js'
export default {
name: 'MyOrder',
props: {
paging: {
type: Boolean,
default: true
},
homePage: {
homePage: { // 判断是否个人中心首页展示内容
type: Boolean,
default: false
}
@@ -167,6 +162,7 @@ export default {
});
window.open(routeUrl.href, '_blank');
},
// 切换订单状态
change (index) {
switch (index) {
case 0:
@@ -221,23 +217,15 @@ export default {
this.afterSaleModal = true
}
},
// 申请售后
afterSaleSelect (item) {
this.$router.push({name: 'ApplyAfterSale', query: {sn: item.sn}})
},
viewComment (sn) { // 查看评价
},
comment (sn, goodsIndex) { // 评价
this.$router.push({path: '/home/addEval', query: {sn, index: goodsIndex}})
},
addComment (sn) { // 追加评价
},
complain (sn, goodsIndex) { // 投诉
this.$router.push({name: 'Complain', query: {sn, index: goodsIndex}})
},
complainResult (sn) { // 投诉结果
},
delOrder (sn) { // 删除订单
this.$Modal.confirm({
@@ -273,7 +261,7 @@ export default {
this.getList()
},
changePageSize (val) { // 修改页数
this.pageNumber = 1;
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
},
@@ -314,9 +302,7 @@ export default {
}
.page-size {
margin: 15px 0px;
display: flex;
justify-content: flex-end;
align-items: center;
text-align: right;
}
/** 订单列表 */
.order-list {

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