240 Commits
Author SHA1 Message Date
lifizer b348412c74 Refactor(千县):图片增加懒加载,优化渲染速度
(cherry picked from commit 23f3d8b994)
2026-07-29 17:44:40 +08:00
linxi 82455f87ce Fix:抽奖送礼还能选择优惠券
(cherry picked from commit 80078cae78)
2026-07-28 11:15:21 +08:00
lifizer a4751dc9f6 Conf:增加Fix环境的配置
(cherry picked from commit 663d8f06fb)
2026-07-24 16:55:24 +08:00
linxi 6ab3d5cc75 Fix:5536 【商城小程序】订单详情点击商品图片区域之前是可以进入商品详情的,现在点击无法进入商品详情页
(cherry picked from commit 3cd6f29e32)
2026-07-24 11:37:47 +08:00
linxi 01c400bb7e Fix:5535 【商城小程序】全国特产、文玩艺术板块的省级导航页面搜索栏,在搜索有效名称时提示“未找到该城市,请重新输入城市名称”
(cherry picked from commit 51e9d8b966)
2026-07-24 11:37:40 +08:00
linxi cb8a4bb33c Fix: 订单列表所有按钮点击都没反应了
(cherry picked from commit 76a877f2c2)
2026-07-24 11:35:35 +08:00
linxi fb03ad9f4a Fix:5174 【商城小程序】游客身份直接点击页面底部【客服】按钮并发送文字后,页面显示空白,且未弹出登录引导提示
(cherry picked from commit 55ed80acbc)
2026-07-24 11:35:20 +08:00
linxi e7557e72a5 Fix:5176 【商城小程序】省级导航在搜索无效名称时无反馈
(cherry picked from commit 956d7bf70b)
2026-07-24 11:35:08 +08:00
linxi 6e1e6233fa Fix:5349 【商城小程序】顶部标题“特色礼品”修改为“全国礼品”
(cherry picked from commit 62e7776b64)
2026-07-24 11:35:02 +08:00
linxi ce94e5d739 Fix:5371 【商城小程序】甄选好礼对应分类下无商品不会提示
(cherry picked from commit 8f7ff49641)
2026-07-24 11:34:54 +08:00
linxi ca79a820fb Fix:5397 【商城小程序】商品链接,连续快速点击“送给朋友”,重复弹出多个送礼页面
(cherry picked from commit 6d963a5bc0)
2026-07-24 11:34:48 +08:00
linxi cb6abf4a5a Fix:5420 【商城小程序】抽奖活动已开奖后取消退款,在个人主页查看我的抽奖码,“失效原因:订单取消”改为“活动已结束,抽奖码无法恢复”
(cherry picked from commit b4c1ea20ac)
2026-07-24 11:34:41 +08:00
linxi f2aeab5c41 Fix:5451 【商城小程序】店铺查看资讯详情返回列表页时,列表自动滑动至顶部
(cherry picked from commit 47ac886d5d)
2026-07-24 11:34:31 +08:00
linxi 1fad8cae64 Fix:5452 【商城小程序】收礼方申请退款被商家拒绝后,礼包订单详情显示“立即评价”按钮
(cherry picked from commit f72a68ccc3)
2026-07-24 11:34:25 +08:00
linxi 2411ae369d Fix:5453 【商城小程序】苹果手机视频列表布局方向从右到左,应该从左到右排列,与安卓同步
(cherry picked from commit 73fa5e35d4)
2026-07-24 11:34:19 +08:00
linxi e6cf9c082c Fix:5454 【商城小程序】购买商品,微信支付下单后未支付,待付款列表显示两条相同订单记录
(cherry picked from commit ea44413ac1)
2026-07-24 11:34:13 +08:00
lifizer fcccf351bf Merge branch 'v23' into prod 2026-07-24 11:32:46 +08:00
lifizer 27ac2a086d Merge branch 'dev-AI-v5' into dev 2026-07-02 10:46:23 +08:00
linxi df87d0f9c8 Feat:抽奖优化 2026-07-02 10:06:50 +08:00
linxi 7aeff7ece1 Feat:取消退款 2026-07-02 09:34:56 +08:00
lifizer 8b36c419a3 Fix(抽奖):[#5396]界面文字修改
(cherry picked from commit 7dcba7c04b)
2026-07-01 15:55:45 +08:00
lifizer 7dcba7c04b Fix(抽奖):[#5396]界面文字修改 2026-07-01 15:55:24 +08:00
lifizer 3b70c6ddf0 Merge branch 'dev' into dev-AI-v5 2026-07-01 14:39:09 +08:00
lifizer f182d3b63a Fix(云灵AI):[#5394]在云灵ai历史记录对话窗口,点击【语音播放】,播放中时点击重新生成,语音播放还在继续-2 2026-06-30 13:48:16 +08:00
lifizer ffeb37456c Fix(云灵AI):[#5395]输入框文本超字符限制无提示,超限新增内容输入框不显示,发送后又显示-2 2026-06-30 10:51:42 +08:00
lifizer c5a6ec0d21 Fix(云灵AI):县域AI也支持送礼卡片选择 2026-06-29 17:52:56 +08:00
lifizer 46eff30230 Style(云灵AI):图片识别结果增加加载效果 2026-06-29 17:30:34 +08:00
lifizer 7ee65297de Fix(云灵AI):县域AI删除历史对话使用独立接口和参数 2026-06-29 17:26:18 +08:00
lifizer 785b59c2ad Fix(云灵AI):[#5394]在云灵ai历史记录对话窗口,点击【语音播放】,播放中时点击重新生成,语音播放还在继续 2026-06-29 16:59:00 +08:00
lifizer 87f9efe143 Fix(云灵AI):[#5395]输入框文本超字符限制无提示,超限新增内容输入框不显示,发送后又显示 2026-06-29 16:58:02 +08:00
lifizer 1467bd7365 Fix(云灵AI):[#5390]苹果手机第二页的送礼选项卡行数一多,页面就滑不上去 2026-06-26 18:21:28 +08:00
lifizer 8ade9b36e6 Fix(云灵AI):[#5389]进行历史详情应自动滚动到底部 2026-06-26 18:07:41 +08:00
lifizer 6762944340 Fix(云灵AI):[#5380]历史记录的回复加载期间无加载状态提示 2026-06-26 10:11:32 +08:00
linxi 15ffeee122 Fix:5346 【商城小程序】将商品加入购物车后,从购物车进入商品详情页后返回,原已选中的商品变为未选中状态
(cherry picked from commit 4fbb35ea0d)
2026-06-26 10:10:22 +08:00
linxi d290ab6e8f Fix:5381 【商城小程序】使用指南视频默认是横屏全屏播放,如果长度大于宽度的视频,改为竖屏播放
(cherry picked from commit e4f4421799)
2026-06-26 10:10:17 +08:00
linxi be6b9d9316 Fix:5346 【商城小程序】将商品加入购物车后,从购物车进入商品详情页后返回,原已选中的商品变为未选中状态
(cherry picked from commit aa686f86ba)
2026-06-26 10:10:13 +08:00
linxi f44b87dfbb Fix:5304 【商城小程序】在中奖名单页面领取优惠券后,优惠券列表没有该优惠券
(cherry picked from commit fb9b85645b)
2026-06-26 10:10:09 +08:00
linxi 4fbb35ea0d Fix:5346 【商城小程序】将商品加入购物车后,从购物车进入商品详情页后返回,原已选中的商品变为未选中状态 2026-06-26 10:08:12 +08:00
linxi e4f4421799 Fix:5381 【商城小程序】使用指南视频默认是横屏全屏播放,如果长度大于宽度的视频,改为竖屏播放 2026-06-26 10:08:01 +08:00
linxi aa686f86ba Fix:5346 【商城小程序】将商品加入购物车后,从购物车进入商品详情页后返回,原已选中的商品变为未选中状态 2026-06-26 10:07:48 +08:00
linxi fb9b85645b Fix:5304 【商城小程序】在中奖名单页面领取优惠券后,优惠券列表没有该优惠券 2026-06-26 10:07:23 +08:00
lifizer 46c35bc1b6 Fix(云灵AI):[#5376]点击“送给朋友”按钮会弹出来立即购买 2026-06-25 17:02:10 +08:00
lifizer 34d9e21896 Fix(云灵AI):[#5383, #5386]1、点击语音播放按钮后,再次点击按钮,没有暂停播放内容,而是会重新播放;2、历史对话详情页-点击语音播放按钮,文字颜色没有跟随变化 2026-06-25 16:24:01 +08:00
lifizer 492ad9e6d4 Fix(云灵AI):[#5385]在历史对话窗口中点击“我要送礼”,页面错误返回到前一个历史窗口,未跳转至送礼选项卡 2026-06-25 16:19:52 +08:00
lifizer 6e7ffa414e Fix(云灵AI):[#5384]县域AI,简介过长时,AI图标会被遮挡,无法往下滑动 2026-06-25 16:11:32 +08:00
lifizer 7a72c4e1da Fix(寻看点):[#5375]寻看点二级页面顶部标题改为:使用指南 2026-06-25 14:52:53 +08:00
lifizer 194ef2d711 Fix(首页):导航入口滚动监听事件显示指引已屏蔽,相关代码应该不执行 2026-06-25 14:47:07 +08:00
lifizer 69597f3959 Fix(云灵AI):[#5374]历史对话详情页-点击语音播放按钮,没有播放AI回答内容,原因是后端返回的数据conversationId、messageId有可能为空,需要兼容处理 2026-06-25 14:43:01 +08:00
lifizer 98a9f10bbf Fix(云灵AI):[#5376]单规格产品点击“送给朋友”“立即下单”按钮,未跳转至送礼页面,错误触发“加入购物车”提示-2 2026-06-25 14:19:08 +08:00
lifizer c76e3b1e0a Fix(云灵AI):[#5376]单规格产品点击“送给朋友”“立即下单”按钮,未跳转至送礼页面,错误触发“加入购物车”提示 2026-06-25 11:25:24 +08:00
lifizer f3e8051983 Style(云灵AI):县域AI显示新增会话和回到底部操作按钮 2026-06-24 10:31:38 +08:00
lifizer 1701241aa9 Fix(云灵AI):[#5367]【送礼】开启新对话,送礼选项卡会保留上一次选择的内容-2 2026-06-23 14:24:14 +08:00
lifizer 87dbaef360 Fix(云灵AI):[#5367]【送礼】开启新对话,送礼选项卡会保留上一次选择的内容 2026-06-23 14:16:57 +08:00
lifizer 6ae771ecf0 Fix(云灵AI):[#5368]未选择选项卡的情况下点击“下一步”,缺少必填校验 2026-06-23 14:14:24 +08:00
lifizer 9f2fefbf28 Fix(云灵AI):[#5351]【送礼预设流程】在最后一步,快速连续点击两次「下一步」按钮,触发重复提交请求,对话页出现两条加载中的 AI 回复 2026-06-23 10:50:23 +08:00
lifizer 50dfa0e585 Feat(云灵AI):相似度字段对接 2026-06-18 15:42:17 +08:00
lifizer 13fb22d780 Fix(云灵AI):[#5329]送礼预设词条页面,调整布局,将选项区域向上移动一点,避免误触下方导航栏 2026-06-11 09:21:52 +08:00
lifizer 85c3e45dc9 Merge branch 'dev' into dev-AI-v5 2026-06-11 09:04:42 +08:00
lifizer 04b6a8d384 Fix(云灵AI):[#5321]县城AI简介文字对齐方式设置为左对齐 2026-06-08 16:27:08 +08:00
lifizer 0891b8029c Fix(云灵AI):[#5319]切换历史对话窗口后,底部导航栏文字变为“undefined” 2026-06-08 16:26:36 +08:00
linxi 26c5c4d115 Fix:5306 【商城小程序】当商品库存为0的情况下,加入购物车按钮盒立即购买按钮都置灰 2026-06-05 10:39:14 +08:00
linxi 11e69ea9c7 Fix::5313 【商城小程序】管理后台后台禁用账号后,小程序端登录提示“登录接口无法调用” 2026-06-05 09:46:45 +08:00
lifizer 0e5c07b5da Feat(云灵AI):送礼逻辑对接 2026-06-03 16:29:26 +08:00
LinCyJang 89e1e058cc Style:样式优化
(cherry picked from commit 4c008f2b55)
2026-06-03 16:28:38 +08:00
LinCyJang 7c70f65892 Merge branch 'dev' of https://gitee.com/fengyuze178/xdd-uniapp-new into dev 2026-06-02 22:01:54 +08:00
LinCyJang 4c008f2b55 Style:样式优化 2026-06-02 22:01:34 +08:00
lifizer e05ceb0f68 Feat(云灵AI):县域AI和平台AI逻辑区分 2026-06-02 10:50:02 +08:00
linxi 758d3a2127 Feat:样式修复
(cherry picked from commit 16fc923e4b)
2026-06-01 16:27:10 +08:00
linxi 16fc923e4b Feat:样式修复 2026-06-01 11:27:26 +08:00
lifizer f488fd4147 Merge branch 'dev' into dev-AI-v5 2026-06-01 09:14:12 +08:00
LinCyJang ad280253b8 Feat: 非遗加载优化,渐进式加载图片,使得整体感觉页面顺畅 2026-06-01 01:32:02 +08:00
LinCyJang e7182902ba Feat:特色礼品加载优化,不在先挤在一起了 2026-06-01 01:27:22 +08:00
LinCyJang 0c738a2dc5 Feat:康养列表加载优化 2026-06-01 01:22:20 +08:00
LinCyJang 4eb12b7a70 Feat:县域详情加载优化 2026-06-01 01:07:28 +08:00
LinCyJang 48e037e44e Feat:礼包卡加载优化 2026-06-01 00:46:54 +08:00
lifizer 4e0972f38a Feat(云灵AI):首页送礼重构&交互使用模拟数据书写对应逻辑 2026-05-28 18:03:38 +08:00
linxi 9c6aa2351b Fix:5299 【商城小程序】微信转发县城,如果县城顶部是视频,加载不出图片,改为调取县城图片@lifizer 2026-05-26 11:48:44 +08:00
linxi 88d5421322 Fix:5299 【商城小程序】微信转发县城,如果县城顶部是视频,加载不出图片,改为调取县城图片@lifizer 2026-05-26 11:17:35 +08:00
linxi b72e7db15e Fix:样式加载问题 2026-05-26 10:12:33 +08:00
lifizer dba726dc12 Fix(订单):抽奖商品购买,微信支付成功应该跳转至订单详情 2026-05-25 12:24:46 +08:00
linxi fe1cdf4dd5 Fix:5295 【商城小程序】点击购物车底部弹窗底下留白太多了,整体往下移一点 2026-05-25 11:05:23 +08:00
linxi 778702a877 Fix:5298 【商城小程序】商品详情页点击分享按钮,生成的分享海报被底部遮挡 2026-05-25 11:05:06 +08:00
linxi cf1f2791f6 Fix:5296 【商城小程序】礼品下单页面重新放出增减数量按钮 2026-05-25 10:29:48 +08:00
lifizer 7bf0344028 Feat(入驻):扫码跳转增加子账号参数字段 2026-05-24 15:26:07 +08:00
LinCyJang 3826e11a3e Fix:抽奖活动商品不允许修改数量 2026-05-22 14:57:56 +08:00
LinCyJang 1b4db7d4f8 Fix:抽奖活动商品不允许修改数量 2026-05-22 14:36:54 +08:00
lifizer e0dd9aa7ed Refactor(首页):首页定位获取逻辑调整为只用于左上角显示之用 2026-05-21 17:06:31 +08:00
lifizer 656c27fdb8 Refactor(首页):如果当前定位成功和上一次的定位城市不同,才更新城市名称,并重新获取首页的数据 2026-05-21 16:37:02 +08:00
lifizer 2cddb59530 Refactor(我的):未登录状态下不获取抽奖的配置 2026-05-21 15:32:54 +08:00
lifizer 27924672a2 Refactor(首页):优化渲染加载速度 2026-05-21 15:32:14 +08:00
lifizer 638eadb632 Fix(千县&店铺入驻):[#5234]后台店铺分类添加超过 10 个类别,前端页面只展示前 10 个,多余分类展示缺失 2026-05-20 17:06:40 +08:00
lifizer 1e78f76be1 Fix(订单):[#5293]待付款的活动商品,点击立即付款并付款后,页面未出现已获得抽奖码的弹窗 2026-05-20 14:12:49 +08:00
lifizer f113bf75be Feat(订单):增加订阅消息 2026-05-20 10:54:51 +08:00
lifizer 1453220d04 Fix(订单):[#5292]开奖后,用户已领取奖品,此时隐藏源订单的退款按钮 2026-05-20 10:40:57 +08:00
linxi 3c6c153cfd Fix:5289 【商城小程序】奖品领取成功弹窗、实名认证跳转弹窗,右上角关闭按钮的 “×” 图标未居中对齐,存在视觉偏移问题 2026-05-19 11:59:19 +08:00
linxi b1aad14d43 Fix:5290 【商城小程序】商品设置为抽奖活动商品后,隐藏商品增减数量按钮,若是礼品,送礼界面隐藏一人领取所有礼品开关 2026-05-19 11:39:58 +08:00
linxi 6ad916df62 Fix:5288 【商城小程序】从抽奖名单页面直接领取奖品,输入收货地址并提交,页面会提示“缺少奖券ID” 2026-05-19 11:39:35 +08:00
linxi 292f2b2745 Fix:5282 【商城小程序】订单列表和详情页未获取到奖品规格数据 2026-05-15 12:03:29 +08:00
linxi be8c2301f4 Fix:5287 【商城小程序】右上角关闭按钮的 “×” 图标未居中对齐,存在视觉偏移问题 2026-05-15 11:59:02 +08:00
linxi 4c84a96e07 Fix:5286 【商城小程序】奖品收货地址页,未读取后台配置 2026-05-15 11:52:59 +08:00
LinCyJang 45b98c7bf1 Fix:5283 【商城小程序】待收货状态订单,将订单详情页“联系商家”按钮改为“联系客服”,并跳转至拨号页面 2026-05-14 23:32:11 +08:00
LinCyJang 71d9a8907b Fix:5281 【商城小程序】中奖奖品信息“颜色随机”修改为奖品规格 2026-05-14 23:26:18 +08:00
LinCyJang e50df3d893 Fix:5280 【商城小程序】未中奖抽奖码右上角显示改为“未中奖” 2026-05-14 23:17:06 +08:00
LinCyJang b6703830cf Fix:5279 【商城小程序】奖品类型为优惠券时,抽奖码列表将跳转按钮名称改为“查看优惠券” 2026-05-14 23:15:16 +08:00
LinCyJang 5987d9254e Fix:5278 【商城小程序】送礼方购买的礼包金额使用优惠券后未达到抽奖门槛,前端仍会提示好友领取后可获取抽奖码 2026-05-14 23:13:23 +08:00
LinCyJang c18030a3c3 Fix:5276 【商城小程序】奖品池-奖品名称文字显示长度改为八个字 2026-05-14 23:07:32 +08:00
LinCyJang 7e8e888886 Fix:5276 【商城小程序】奖品池-奖品名称文字显示长度改为八个字 2026-05-14 23:05:31 +08:00
LinCyJang 56d8fb78b2 Fix:5268 【商城小程序】背景海报区域显示效果调整,图片被拉伸变形 2026-05-14 23:02:52 +08:00
LinCyJang 85838b64a4 Fix:5268 【商城小程序】背景海报区域显示效果调整,图片被拉伸变形 2026-05-14 23:00:32 +08:00
linxi a896523128 Fix:5255 【商城小程序】下单普通活动奖品后,抽奖码弹窗内没有显示开奖时间数据 2026-05-14 10:45:30 +08:00
linxi 0636c93695 Fix:5257 【商城小程序】奖品轮播卡片按效果图再大小调大一点 2026-05-14 10:40:37 +08:00
linxi e0e475c0d0 Fix:5259 【商城小程序】后台新增了奖品规格设置,开奖页面的奖品没有调取规格数据 2026-05-14 10:38:39 +08:00
linxi 39a94a51ec Fix:5265 【商城小程序】点击购物车按钮选择多个活动商品,跳转下单页面时商品数量仍显示为1 2026-05-14 10:15:50 +08:00
linxi cb607556e5 Fix:5266 2026-05-14 10:12:31 +08:00
linxi a5a2652f19 Fix:5267 【商城小程序】开奖倒计时上方的活动开奖时间,字体调小一点 2026-05-14 09:59:06 +08:00
linxi badd8eecc9 Fix:5268 【商城小程序】背景海报区域显示效果调整,图片被拉伸变形 2026-05-14 09:55:44 +08:00
linxi b0d49cc6d5 Fix:5269 【商城小程序】奖品池-奖品等级图片显示效果调整(图片放大,位置左移一些) 2026-05-14 09:54:39 +08:00
linxi 3a214a3b9d Fix:5272 【商城小程序】身份证号末尾输入小写“x”,应提示格式错误 2026-05-14 09:44:35 +08:00
linxi fe442424b0 Fix:5257 【商城小程序】奖品轮播卡片按效果图再大小调大一点 2026-05-13 09:44:36 +08:00
LinCyJang 933c6a3628 Fix:5249 【商城小程序】抽奖海报弹窗设置:每次进入小程序时弹窗。当前效果:切换页面回到首页就会弹窗(过于频繁 2026-05-13 01:02:31 +08:00
LinCyJang d0cff1e562 Fix:5245 【商城小程序】已过开奖时间,从千县进入抽奖活动应跳转至中奖名单页 2026-05-13 00:58:56 +08:00
LinCyJang ac45a0dfee Fix:5254 【商城小程序】奖品订单详情页,点击商品图片,显示空白。需关闭商品图片交互 2026-05-13 00:51:23 +08:00
LinCyJang 84e72f9313 Fix:5256 【商城小程序】抽奖码页面,往期中奖名单轮播不见了 2026-05-13 00:26:14 +08:00
LinCyJang 05ef78870b Fix:5258 【商城小程序】中奖奖品名称过长时,奖品图片被压缩 2026-05-13 00:24:15 +08:00
LinCyJang de0699e705 Fix:5251 【商城小程序】抽奖页面调整 2026-05-13 00:07:48 +08:00
LinCyJang b4935444b6 Fix:5248 【商城小程序】弹窗进入当前已开奖中奖名单,隐藏图标显示 2026-05-12 23:57:07 +08:00
lifizer 535a98e43a Refactor:分包 2026-05-12 15:19:37 +08:00
lifizer 6caf9afcc0 Fix(云灵AI):订单价格显示调整 2026-05-12 09:49:45 +08:00
linxi d2a27c08e2 Fix:5183 【商城小程序】商品足迹列表中已下架/删除的商品增加灰色蒙版提示“商品已下架” 2026-05-11 15:03:03 +08:00
linxi 153df11ed4 Fix:5230 【商城小程序】开奖页面及往期中奖页面,奖品名称改为一行显示,超出用... 2026-05-11 14:57:29 +08:00
linxi 58d21cafda Fix:5231 【商城小程序】无规格时为空,不显示null 2026-05-11 14:48:05 +08:00
linxi 9a27e2df49 Fix:5232 【商城小程序】我的抽奖码页面,缺了状态分类 2026-05-11 14:46:12 +08:00
linxi bf31bf859e Fix:5234 【商城小程序】后台店铺分类添加超过 10 个类别,前端页面只展示前 10 个,多余分类展示缺失 2026-05-11 14:29:46 +08:00
lifizer e982bc0595 Fix(云灵AI):订单价格显示调整 2026-05-09 09:09:08 +08:00
linxi c367a236c1 Fix:5221 【商城小程序】抽奖界面优化1 2026-05-08 20:08:19 +08:00
linxi 842ba2ff7f Fix:5222 【商城小程序】抽奖界面优化2 2026-05-08 19:28:36 +08:00
linxi 02e1015594 Fix:5184 【商城小程序】猜你喜欢商品列表,点击购物车图标商品未添加购物车 2026-05-08 18:37:35 +08:00
linxi 2da80cd30b Fix:5208 【商城小程序】抽奖订单增加规格,隐藏支付状态,支付方式,增加来源订单字段,参考效果图 2026-05-08 12:12:43 +08:00
linxi ebe76499a5 Fix(商城小程序):[#5175] 用户在小程序客服页面发送商品卡片后,点击进入该商品卡片详情页,再返回客服页面时,系统会自动重复弹出一条相同的商品卡片。 2026-05-08 09:33:34 +08:00
lifizer a54b674e6f Fix(云灵AI):[#5193]“我要送礼”推荐结果,点击下单/送礼按钮,规格弹窗弹出时,左上角的返回按钮仍然可以点击-2 2026-05-07 17:07:05 +08:00
lifizer 76eea8dcb4 Fix(云灵AI):[#5228]礼品卡片显示调整为供应商名称 2026-05-07 14:17:51 +08:00
LinCyJang aa44879dff Fix:5205 【商城小程序】县域抽奖活动开始时,县城详情页简介处未替换成抽奖入口图片 2026-05-07 01:08:11 +08:00
LinCyJang 5d7c3ac0c0 Fix:5208 【商城小程序】抽奖订单增加规格,隐藏支付状态,支付方式,增加来源订单字段,参考效果图 2026-05-07 00:54:50 +08:00
LinCyJang 3f9463258e Fix:5207 【商城小程序】开奖以后有多个抽奖码,需要把所有抽奖码列出来 2026-05-07 00:51:34 +08:00
LinCyJang 976dd1b096 Fix:5215 【商城小程序】抽奖码列表奖品名称前需要增加X等奖 2026-05-07 00:47:54 +08:00
LinCyJang cff3dba809 Fix:5221 【商城小程序】抽奖界面优化1 2026-05-07 00:46:26 +08:00
LinCyJang 57410cc656 Fix:5222 【商城小程序】抽奖界面优化2 2026-05-07 00:27:04 +08:00
LinCyJang 1f2a504086 Fix:5223 【商城小程序】抽奖界面优化3 2026-05-07 00:22:50 +08:00
LinCyJang da380c000f Fix:5224 【商城小程序】抽奖界面优化4 2026-05-07 00:19:38 +08:00
LinCyJang 2f26d70a0e Fix:5211 【商城小程序】订单列表处的奖品的订单号名称改为:奖品订单号 2026-05-07 00:18:13 +08:00
LinCyJang 0a68bd1ca1 Fix:5211 【商城小程序】订单列表处的奖品的订单号名称改为:奖品订单号 2026-05-07 00:14:33 +08:00
LinCyJang 94df324fc5 Merge branch 'dev' of https://gitee.com/fengyuze178/xdd-uniapp-new into dev 2026-05-07 00:10:42 +08:00
LinCyJang 59565871d9 Task:抽奖 2026-05-07 00:10:09 +08:00
lifizer a50d274a59 Style(云灵AI):开放以图搜商品入口 2026-05-06 15:42:54 +08:00
lifizer ced676832e Style(云灵AI):界面调整,屏蔽以图搜商品入口 2026-05-06 11:50:48 +08:00
lifizer 69e5ba0169 Refactor(云灵AI):无内容时可以展示列表卡片内容 2026-05-06 10:21:04 +08:00
linxi 91aad660e6 Feat:抽奖2.0(细节调整,查漏补缺) 2026-04-30 18:19:23 +08:00
LinCyJang c3c0483625 Feat:抽奖2.0(查漏补缺) 2026-04-30 02:04:25 +08:00
lifizer 6cb403c5d5 Fix(云灵AI):[#5186]订单查询,盲盒订单显示商品区域,隐藏金额信息-2 2026-04-29 16:29:05 +08:00
lifizer 28ee55f9fd Fix(云灵AI):[#5193]返回主页,需要关闭规格弹窗 2026-04-29 15:05:57 +08:00
lifizer c8bf87aa4b Fix(云灵AI):[#5186]订单查询,盲盒订单显示商品区域,隐藏金额信息 2026-04-29 14:34:11 +08:00
lifizer 53312c889e Fix(云灵AI):[#5193]“我要送礼”推荐结果,点击下单/送礼按钮,规格弹窗弹出时,左上角的返回按钮仍然可以点击 2026-04-29 14:24:56 +08:00
lifizer e3a69a708c Fix(云灵AI):[#5192]规格名称较长的订单,查询结果规格数据显示异常,改为规格数据超出一行时超出内容省略号隐藏 2026-04-29 14:11:14 +08:00
lifizer a113312712 Fix(云灵AI):[#5194]店铺封面为视频的店铺,推荐结果店铺封面显示空白 2026-04-29 14:06:31 +08:00
lifizer 77f803ef10 Fix(云灵AI):[#5188]订单查询,点击发送的问题修改为“帮我查询我的待发货、待收货订单信息” 2026-04-29 10:38:55 +08:00
lifizer 52817b48a8 Fix(云灵AI):[#5185]送礼,点击下单/送礼按钮,弹出的规格弹窗内,立即购买按钮位置太靠下 2026-04-29 10:36:08 +08:00
lifizer 09a8d1b476 Fix(云灵AI):[#5186]订单查询,盲盒订单显示商品区域,隐藏金额信息 2026-04-29 10:29:47 +08:00
lifizer 20ca6c988e Style(云灵AI):界面调整 2026-04-29 09:30:48 +08:00
LinCyJang 092ef55293 Feat:抽奖2.0(中奖名单缺中奖等级,优惠券领取接口异常) 2026-04-29 00:52:34 +08:00
linxi a14d89efff Feat:抽奖2.0(抽奖活动无法正常进入到下一个抽奖活动,购买抽奖商品无法获取到抽奖码)/V2 2026-04-28 18:46:01 +08:00
lifizer 9bf4febea6 Style(云灵AI):界面调整 2026-04-28 18:08:52 +08:00
lifizer 3b8faf1eea Refactor(云灵AI):卡片列表换一换接口使用新的 2026-04-28 10:59:44 +08:00
lifizer 898c3b74bc Refactor(云灵AI):换一换动态效果实现 2026-04-28 09:53:04 +08:00
LinCyJang 8a1a58d14a Merge branch 'dev' of https://gitee.com/fengyuze178/xdd-uniapp-new into dev 2026-04-28 01:21:55 +08:00
LinCyJang 8f164cc6ef Feat:抽奖2.0(抽奖活动无法正常进入到下一个抽奖活动,购买抽奖商品无法获取到抽奖码) 2026-04-28 01:21:38 +08:00
lifizer 3b935811e3 Refactor(云灵AI):换一换动态效果实现 2026-04-27 15:42:01 +08:00
lifizer 0d1dfae3bd Chore(入驻):解决合并冲突未完全解决问题 2026-04-27 14:21:12 +08:00
lifizer 5d4ad3f427 Chore(入驻):解决合并冲突未完全解决问题 2026-04-27 10:44:38 +08:00
lifizer fd583b7a2e Style(云灵AI):标题调整
(cherry picked from commit 8c1aa62024)
2026-04-27 10:35:06 +08:00
lifizer 94b2af52d0 Refactor(首页):优化页面加载,图片使用懒加载 2026-04-27 10:34:49 +08:00
lifizer 8c1aa62024 Style(云灵AI):标题调整 2026-04-27 10:34:07 +08:00
LinCyJang d3602c010e Feat:抽奖2.0(部分接口未调通) 2026-04-27 08:47:33 +08:00
linxi 7dedcf773f Fix:体验店显示判断调整 2026-04-24 18:18:25 +08:00
linxi a8907717b2 Fix:体验店显示判断调整 2026-04-24 14:21:19 +08:00
linxi ed23d2e220 Style:资讯店铺链接优化
(cherry picked from commit a863ee7c85)
2026-04-24 09:18:14 +08:00
linxi 7d55bdf879 Style:体验店封面优化
(cherry picked from commit 49580bc511)
2026-04-24 09:18:09 +08:00
linxi 4b56c2cce7 Fix:订单列表商品图片调大
(cherry picked from commit 341d4d5c70)
2026-04-24 09:18:04 +08:00
linxi 77e900e02c Fix:团购订单核销后没有同步弹出体验券领取弹窗,用户首次进入该团购订单详情页才会显示弹窗
(cherry picked from commit a86b416ed8)
2026-04-24 09:17:58 +08:00
LinCyJang 75e9c404fc Fix:旅居订单增加轮询 2026-04-24 09:17:49 +08:00
linxi 0a70e4af6c Fix:5126 【商城小程序】地址被驳回状态的提示词修改 2026-04-22 15:50:05 +08:00
linxi 11e294bcdc Fix:5173 【商城小程序】首页甄选好礼的轮播,长时间熄屏再打开,首页甄选好礼的轮播会异常卡顿,目前发现有这个现象的机型:iPhone XR、iPhone 16Pro
(cherry picked from commit b4b6fed1ab)
2026-04-22 15:36:24 +08:00
linxi 3e0e1542b6 Fix:5168 【商城小程序】文化图片改为非必填,去除必填标识
(cherry picked from commit 9dc63c2207)
2026-04-22 15:36:18 +08:00
linxi ae3fbf914b Fix:5172 【商城小程序】将左右间距加宽一点
(cherry picked from commit 9fa58286e8)
2026-04-22 15:36:13 +08:00
linxi 8ee399823d Fix:5126 【商城小程序】地址被驳回状态的提示词修改
(cherry picked from commit 3e0940f42c)
2026-04-22 15:36:06 +08:00
LinCyJang dac7c96189 Fix:5168 【商城小程序】文化图片改为非必填,去除必填标识 2026-04-21 20:45:50 +08:00
LinCyJang 458d2b8b65 Fix:5115 【商城小程序】店铺链接数据显示混乱
(cherry picked from commit 505d383bff)
2026-04-21 20:28:35 +08:00
LinCyJang 33a1125294 Fix:5126 【商城小程序】地址被驳回状态的提示词修改
(cherry picked from commit 23af0da8fa)
2026-04-21 20:28:30 +08:00
linxi a2d0ef8dfa Fix:5162 【商城小程序】待收货订单申请退款,退款中状态地址信息部分显示null 2026-04-21 20:27:44 +08:00
LinCyJang b0c4a5621e Fix:5160 【商城小程序】在订单列表购物“正在加载中”状态下快速切换旅居标签,出现数据错位
(cherry picked from commit e3316844e3)
2026-04-21 20:27:10 +08:00
linxi 8c83e0a1bc Fix:5147 【商城小程序】修改地址审核中状态下申请退款,订单详情页只需显示原地址 2026-04-16 10:25:02 +08:00
linxi 97c4d7fe4f Fix:5149 【商城小程序】商品详情页,点击「联系商家」弹出的商家电话弹窗,号码显示空白但可正常跳转拨号 2026-04-16 10:18:53 +08:00
linxi 29827b250a Fix:5148 【商城小程序】列表体验店卡片页面样式调整 2026-04-16 10:16:01 +08:00
linxi edaba70c6e Fix:5150 【商城小程序】体验券按钮栏左右滑动时,按钮内容被异常遮挡,显示不完整 2026-04-16 10:13:29 +08:00
linxi e5c7900b89 Fix:5128 【商城小程序】修改申请被驳回后订单详情只需显示原地址 2026-04-13 19:48:03 +08:00
linxi d69cf4c9e2 Fix:5075 【商城小程序】点击体验店,链接跳转的体验店详情数据错误,获取的是旅居店铺的数据,应获取体验店数据
(cherry picked from commit 1d8b75e2d2)
2026-04-13 19:37:44 +08:00
linxi 4a29b1cd27 Fix:5085 【商城小程序】用户多笔订单支付成功后,自动跳转到"我的订单"-"待发货"页面
(cherry picked from commit 8f6b2a23d1)
2026-04-13 19:37:39 +08:00
linxi df1c6dfb73 Fix:5081 【商城小程序】用户订单创建后未支付,自动跳转到"我的订单"-“待付款”页面
(cherry picked from commit 8c4d588ffa)
2026-04-13 19:37:34 +08:00
linxi 13201d251b Fix:5145 【商城小程序】首页海报状态未实时更新,需重启小程序才生效
(cherry picked from commit 9cbf35d693)
2026-04-13 19:37:29 +08:00
lifizer be90572388 Merge branch 'dev' into test 2026-04-13 15:32:21 +08:00
lifizer 335793676b Merge branch 'dev' into test 2026-02-25 10:23:01 +08:00
lifizer 377852a65f Merge branch 'dev' into test 2026-01-20 10:04:02 +08:00
LinCyJang f202fca716 Merge branch 'dev' into test 2026-01-19 21:44:44 +08:00
lifizer d288547259 Merge branch 'dev' into test 2026-01-07 09:48:46 +08:00
lifizer 5568cf039e Merge branch 'dev' into test 2025-12-22 16:29:14 +08:00
linxi ef66206182 Fix:收礼页调整
(cherry picked from commit e05eb3e389)
2025-12-15 10:09:18 +08:00
linxi d00fe87625 Fix:康养搜索增加 shopType=wellness
(cherry picked from commit a6735d284e)
2025-12-15 10:09:11 +08:00
linxi 749e3901f8 Fix:旅居分享问题
(cherry picked from commit 1f4ea5c0c8)
2025-12-15 10:09:06 +08:00
lifizer 1710f4809c Fix(专题页):尖货&节日分享朋友圈进入小程序渲染错误
(cherry picked from commit eaa36dcf44)
2025-12-15 10:08:55 +08:00
lifizer 38545cd76e Merge branch 'dev' into test 2025-12-09 16:39:27 +08:00
linxi b9dcbe6560 Fix:4004 【商城小程序】在互动消息列表回复资讯评论,内容被顶至屏幕之外
(cherry picked from commit 7a44ed3265)
2025-11-22 16:25:47 +08:00
linxi 50e143f13c Fix:4628 【旅居商城小程序】团购订单提交页面——输入框内容,未固定位置。
(cherry picked from commit b2121e71ef)
2025-11-22 16:25:39 +08:00
linxi 7c65d839d9 Fix:4646 【旅居商城小程序】团购礼包退款后,收礼方领取时的提示信息改为“礼品卡已失效”(iOS需修改提示,安卓需增加提示)
(cherry picked from commit d43fc253c9)
2025-11-22 16:25:35 +08:00
linxi f29ca88ab3 Fix:4643 【旅居商城小程序】没开转赠的团购礼包领取页面需要单独关闭右上角转发功能
(cherry picked from commit c9f3767cbd)
2025-11-21 12:34:20 +08:00
linxi 56402e37f3 Fix:4601 【旅居管理后台,商城小程序】旅居商户管理—修改所属分类为“康养分类”,在前端小程序中不显示
(cherry picked from commit 889b0de9b7)
2025-11-21 12:34:15 +08:00
linxi c39f2a4da8 Fix:4629 【旅居供应链小程序】供应链小程序/PC端修改资讯,将图片资讯改为视频后,视频无法正常播放
(cherry picked from commit 6e316a9f2c)
2025-11-21 12:34:11 +08:00
linxi c894689365 Fix:4634 【旅居商城小程序】播放资讯视频时,旅居店铺封面视频未暂停
(cherry picked from commit 4686c6d87a)
2025-11-21 12:34:06 +08:00
linxi 5c23dc9773 Fix:4632 【旅居商城小程序】团购详情轮播图循环逻辑错误
(cherry picked from commit 896f8dee7f)
2025-11-21 12:34:02 +08:00
linxi bad10982b7 Fix:4639 【旅居商城小程序】预约日期包含以下几个时间段时无法预约:1.31-2.1,3.31-4.1,5.31-6.1,8.31-9.1,10.31-11.1(应改为:只要选择的时间段可预约、并且等于团购天数,就可以预约成功)
(cherry picked from commit d9ee41d8f3)
2025-11-21 12:33:56 +08:00
linxi fe0397a483 Fix:4623 【旅居商城小程序】新增的视频资讯无法正常播放 2025-11-19 10:26:32 +08:00
linxi a535c8192e Fix:4613 【旅居商城小程序】待支付订单进行支付时,取消订单状态导航栏可点击状态 2025-11-18 14:28:34 +08:00
linxi 2e1fa524fa Fix:4598 【旅居商城小程序】供应链小程序新增视频资讯,前端视频未显示 2025-11-18 14:22:41 +08:00
linxi 48284adb6b Fix:4610 【旅居商城小程序】资讯正文的文本格式(换行、字体加粗等)在前端未生效 2025-11-18 14:19:19 +08:00
linxi 2af9fe99ee Fix:4260 【旅居商城小程序】管理后台新增旅居商户后,相应的用户进入商城小程序点击入驻入口,弹出提示窗,即将打开供应链小程序。确认后打开供应链小程序,如下图所示
(cherry picked from commit f884d1c764)
2025-11-17 15:36:09 +08:00
linxi 5caa9b176a Fix:4432 【旅居商城小程序】订单状态列表,待确认订单未显示确认倒计时
(cherry picked from commit 31ce97db6a)
2025-11-17 15:36:04 +08:00
linxi 438b7a98e4 Fix:4373 【旅居商城小程序】审核中状态下无法撤销入驻申请(参考供应商和特色店铺的入驻流程,【审核中】状态标识提到顶部显示,底部改成【撤销申请】)/接口
(cherry picked from commit 7786f88896)
2025-11-17 15:36:00 +08:00
linxi a2f1d9f59e Fix:4373 【旅居商城小程序】审核中状态下无法撤销入驻申请(参考供应商和特色店铺的入驻流程,【审核中】状态标识提到顶部显示,底部改成【撤销申请】)
(cherry picked from commit b260bb9e34)
2025-11-17 15:35:55 +08:00
linxi c4787b56e8 Fix:4519 【旅居商城小程序】送礼—礼包订单类型改为“礼包订单”
(cherry picked from commit 51ff86e4f8)
2025-11-17 15:35:51 +08:00
linxi 0937a32bce Fix:4388 【旅居商城小程序】管理后台配置商家号码在前端小程序未生效
(cherry picked from commit 3d8df506e0)
2025-11-17 15:35:47 +08:00
linxi cfef9c5b39 Fix:4600 【旅居管理后台,商城小程序】旅居商户管理—修改所属分类为“康养顶部”,在前端小程序所有康养城市顶部都会显示
(cherry picked from commit 2d8f2b16a9)
2025-11-17 15:35:43 +08:00
linxi 85906cbe44 Fix:4602 【旅居商城小程序】提交团购订单页面,联系商家-点击立即拨打按钮无效
(cherry picked from commit 1d34f4dd08)
2025-11-17 15:35:39 +08:00
114 changed files with 9441 additions and 22985 deletions
+9 -5
View File
@@ -112,6 +112,10 @@ export default {
keyboardHeight: { keyboardHeight: {
type: Number, type: Number,
default: 0 default: 0
},
voiceException: {
type: String,
default: '没有听清您说了什么,请再说一遍'
} }
}, },
data() { data() {
@@ -262,11 +266,11 @@ export default {
fail: err => { fail: err => {
console.log(err) console.log(err)
uni.hideLoading() uni.hideLoading()
_this.$toast('没有听清您说了什么,请再说一遍') _this.$toast(_this.voiceException)
} }
}) })
} else { } else {
_this.$toast('没有听清您说了什么,请再说一遍') _this.$toast(_this.voiceException)
} }
}) })
} }
@@ -282,7 +286,7 @@ export default {
_this.getTransResultReq() _this.getTransResultReq()
}).catch(() => { }).catch(() => {
uni.hideLoading() uni.hideLoading()
_this.$toast('没有听清您说了什么,请再说一遍') _this.$toast(_this.voiceException)
}) })
}, },
getTransResultReq() { getTransResultReq() {
@@ -296,7 +300,7 @@ export default {
uni.hideLoading() uni.hideLoading()
_this.clearIntervalFn() _this.clearIntervalFn()
if (data === '__NULL__') { if (data === '__NULL__') {
_this.$toast('没有听清您说了什么,请再说一遍') _this.$toast(_this.voiceException)
} else { } else {
if (data.length > 0) { if (data.length > 0) {
const prompt = data[0].Text const prompt = data[0].Text
@@ -308,7 +312,7 @@ export default {
} }
}).catch(() => { }).catch(() => {
uni.hideLoading() uni.hideLoading()
_this.$toast('没有听清您说了什么,请再说一遍') _this.$toast(_this.voiceException)
}) })
}, 1000) }, 1000)
}, },
+28 -4
View File
@@ -112,7 +112,9 @@
<script> <script>
import { import {
getChatList, getChatList,
deleteChatListByType deleteChatListByType,
getCountyAiChatList,
deleteCountyChatListByType
} from '@/api/chat/index' } from '@/api/chat/index'
export default { export default {
name: 'AiHistoryList', name: 'AiHistoryList',
@@ -125,6 +127,10 @@ export default {
formModule: { formModule: {
type: String, type: String,
default: '' default: ''
},
countyId: {
type: String,
default: ''
} }
}, },
data() { data() {
@@ -142,7 +148,17 @@ export default {
this.getChatListReq() this.getChatListReq()
}, },
getChatListReq() { getChatListReq() {
getChatList().then(res => { let reqFn = null
let params = {}
if (this.countyId) {
reqFn = getCountyAiChatList
params = {
countyId: this.countyId
}
} else {
reqFn = getChatList
}
reqFn(params).then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
this.todayList = data['今天'] || [] this.todayList = data['今天'] || []
@@ -152,7 +168,15 @@ export default {
}) })
}, },
deleteRecords(type) { deleteRecords(type) {
deleteChatListByType(type).then(res => { let reqFn = null
let params = ''
if (this.countyId) {
reqFn = deleteCountyChatListByType
params = `?countyId=${this.countyId}&type=${type}`
} else {
reqFn = deleteChatListByType
}
reqFn(type, params).then(res => {
const { success } = res const { success } = res
if (success) { if (success) {
this.getChatListReq() this.getChatListReq()
@@ -160,7 +184,7 @@ export default {
}) })
}, },
historyItemClick(item) { historyItemClick(item) {
const paramsStr = `?chatNumber=${item.chatNumber}&title=${item.title}&click=1` const paramsStr = `?chatNumber=${item.chatNumber}&title=${item.title}&click=1&countyId=${this.countyId}`
if (!this.formModule) { if (!this.formModule) {
uni.navigateTo({ uni.navigateTo({
url: '/aiChat/views/history' + paramsStr url: '/aiChat/views/history' + paramsStr
+1 -1
View File
@@ -91,7 +91,7 @@
<view class="total"> <view class="total">
{{ item.totalNum }}件商品 {{ item.totalNum }}件商品
<text v-if="item.isGiftCardReceiveBlind === 0" class="total-txt"> <text v-if="item.isGiftCardReceiveBlind === 0" class="total-txt">
&nbsp;&nbsp;&nbsp;&nbsp;总金额<text class="color-red">{{ item.totalPrice }}</text> &nbsp;&nbsp;&nbsp;&nbsp;总金额<text class="color-red">{{ item.payPrice }}</text>
</text> </text>
</view> </view>
</view> </view>
+8 -5
View File
@@ -100,10 +100,7 @@ export const chatMixins = {
}.bind(this)).exec() }.bind(this)).exec()
}, },
onUnload() { onUnload() {
if (this.audioContext) { this.audioStopHandle()
this.audioContext.stop()
}
wx.getBackgroundAudioManager().stop()
this.closeWsFn() this.closeWsFn()
}, },
created() { created() {
@@ -447,9 +444,15 @@ export const chatMixins = {
this.audioAyy = [] this.audioAyy = []
if (this.audioContext) { if (this.audioContext) {
this.audioContext.stop() this.audioContext.stop()
this.audioContext.destroy() // 强制销毁释放资源
this.audioContext = null
} }
this.isPlayAudio = false this.isPlayAudio = false
wx.getBackgroundAudioManager().stop()
// 强制关闭微信小程序背景音频
if (typeof wx !== 'undefined' && wx.getBackgroundAudioManager) {
wx.getBackgroundAudioManager().stop()
}
}, },
ttsHandle(item) { ttsHandle(item) {
this.audioAyy = [] this.audioAyy = []
+343 -90
View File
@@ -3,9 +3,18 @@ import {
getCompletionsV3, getCompletionsV3,
deleteChatItemByConversationId, deleteChatItemByConversationId,
// getAnalyzeKeywordsV1, // getAnalyzeKeywordsV1,
getAnalyzeKeywordsChangeV3 getAnalyzeKeywordsChangeV3,
getSseCountyAiConfigV1,
getCountyAiCompletionsV1,
getGiftRecommendOptions,
getGiftRecommendPrompt
} from '@/api/chat/index' } from '@/api/chat/index'
import { import {
getExceptionConfig,
getBottomNavigationConfigList
} from '@/api/public'
import {
getProductDetail,
postCartAdd postCartAdd
} from '@/api/store' } from '@/api/store'
import { VUE_APP_API_URL } from '@/config' import { VUE_APP_API_URL } from '@/config'
@@ -21,29 +30,7 @@ export const chatMixinsV2 = {
token: cookie.get('login_status'), token: cookie.get('login_status'),
userInfo: cookie.get('userInfo'), userInfo: cookie.get('userInfo'),
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
bottomTools: Object.freeze([ bottomTools: [],
{
icon: 'icon-50',
text: '我要送礼',
type: 'prompt',
prompt: '我要送礼,请给我推荐一些平台的礼品',
url: ''
},
{
icon: 'icon-51',
text: '订单查询',
type: 'prompt',
prompt: '帮我查询我的待发货、待收货订单信息',
url: ''
},
{
icon: 'icon-52',
text: '拍照识图',
type: 'link',
prompt: '',
url: '/aiChat/views/imageRecognition'
}
]),
scrollData: {}, scrollData: {},
scrollTop: 0, scrollTop: 0,
isScrollToBottom: false, isScrollToBottom: false,
@@ -57,31 +44,20 @@ export const chatMixinsV2 = {
loading: false, loading: false,
chatNumber: '', chatNumber: '',
infoResData: {}, infoResData: {},
chatMessageList: [ chatMessageList: [],
/*
{
type: -2,
isError: false,
showCursor: false,
conversationId: '',
prompt: '',
nodes: '-------------监听 WebSocket 接受到服务器的消息事件',
content: '-------------监听 WebSocket 接受到服务器的消息事件',
listQuestion: [
'监听 WebSocket 接受到服务器的消息事件',
'监听 WebSocket 接受到服务器的消息事件',
'监听 WebSocket 接受到服务器的消息事件'
]
}
*/
],
errorMsg: Object.freeze('您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!'),
audioAyy: [], audioAyy: [],
isPlayAudio: false, isPlayAudio: false,
audioContext: null, audioContext: null,
audioPlayId: '', audioPlayId: '',
showGiftBtn: false, showGiftBtn: false,
buyLoading: false buyLoading: false,
buyActionLock: false,
exceptionConfig: {
model_exception: '您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!',
voice_exception: ''
},
giftStepLoading: false,
onlyOneToAddCart: false
} }
}, },
computed: { computed: {
@@ -106,12 +82,12 @@ export const chatMixinsV2 = {
}.bind(this)).exec() }.bind(this)).exec()
}, },
onUnload() { onUnload() {
if (this.audioContext) { this.audioStopHandle()
this.audioContext.stop()
}
wx.getBackgroundAudioManager().stop()
this.closeWsFn() this.closeWsFn()
}, },
onHide() {
this.audioStopHandle()
},
created() { created() {
const _this = this const _this = this
uni.getSystemInfo({ uni.getSystemInfo({
@@ -131,7 +107,37 @@ export const chatMixinsV2 = {
}, },
methods: { methods: {
createdCallbak() { createdCallbak() {
console.log('页面初始话回调') this.$nextTick(() => {
this.scrollToBottomHandle()
getExceptionConfig().then(res => {
const { success, data } = res
if (success) {
this.exceptionConfig = data || {}
}
})
// 县域AI没有底部快捷操作和送礼配置
if (!this.countyId) {
getBottomNavigationConfigList().then(res => {
const { success, data } = res
if (success) {
this.bottomTools = data || []
this.bottomTools.forEach(item => {
item.display = true
})
}
})
getGiftRecommendOptions().then(res => {
const { success, data } = res
if (success) {
this.giftBuyOptions = data || {}
}
})
}
this.extraReqFn()
})
},
extraReqFn() {
console.log('首页/历史详情页面单独请求接口逻辑')
}, },
inputFocusHandle(value) { inputFocusHandle(value) {
this.onFocus = value === 1 this.onFocus = value === 1
@@ -215,7 +221,16 @@ export const chatMixinsV2 = {
handleLoginFailure() handleLoginFailure()
return return
} }
const prompt = params.prompt if (params.prompt.length > 500) {
uni.showToast({
title: "字数已超出限制",
icon: "none",
duration: 5000
})
return
}
if (this.loading) return
const prompt = params.prompt.substr(0, 500)
if (params.init !== 1) { if (params.init !== 1) {
_this.chatMessageList.push({ _this.chatMessageList.push({
prompt, prompt,
@@ -257,21 +272,49 @@ export const chatMixinsV2 = {
}) })
_this.loading = true _this.loading = true
_this.showCursor = false _this.showCursor = false
getSseConfigV1({ let reqFn = null
'chatNumber': _this.chatNumber, let postData = {}
prompt if (_this.countyId) {
}).then(resConfig => { reqFn = getSseCountyAiConfigV1
postData = {
'countyId': _this.countyId,
'chatNumber': _this.chatNumber,
prompt
}
} else {
reqFn = getSseConfigV1
postData = {
'chatNumber': _this.chatNumber,
prompt
}
}
reqFn(postData).then(resConfig => {
const conversationId = resConfig.data.conversationId const conversationId = resConfig.data.conversationId
_this.chatNumber = resConfig.data.chatNumber || '' _this.chatNumber = resConfig.data.chatNumber || ''
_this.chatMessageList[_this.chatMessageListLength - 1].showCursor = true _this.chatMessageList[_this.chatMessageListLength - 1].showCursor = true
_this.chatMessageList[_this.chatMessageListLength - 1].conversationId = conversationId _this.chatMessageList[_this.chatMessageListLength - 1].conversationId = conversationId
if (conversationId) { if (conversationId) {
_this.initWebSocket(conversationId, () => { _this.initWebSocket(conversationId, () => {
getCompletionsV3({
conversationId, let completionsReqFn = null
ws: true, let completionsPostData = {}
isNoNeedPublicErrorNotification: 1 if (_this.countyId) {
}).then(sseRes => { completionsReqFn = getCountyAiCompletionsV1
completionsPostData = {
conversationId,
countyId: _this.countyId,
ws: true,
isNoNeedPublicErrorNotification: 1
}
} else {
completionsReqFn = getCompletionsV3
completionsPostData = {
conversationId,
ws: true,
isNoNeedPublicErrorNotification: 1
}
}
completionsReqFn(completionsPostData).then(sseRes => {
console.log(sseRes) console.log(sseRes)
// _this.closeWsFn() // _this.closeWsFn()
}).catch(err => { }).catch(err => {
@@ -483,16 +526,72 @@ export const chatMixinsV2 = {
}) })
}, },
productItemBuyNowClickHandle(item) { productItemBuyNowClickHandle(item) {
this.audioStopHandle()
this.showGiftBtn = false this.showGiftBtn = false
this.cart_num = 1 this.productItemBuyNowOrGiftBuy(item, 1)
this.addToCart(item)
}, },
productItemGiftBuyClickHandle(item) { productItemGiftBuyClickHandle(item) {
this.audioStopHandle()
this.showGiftBtn = true this.showGiftBtn = true
this.productItemBuyNowOrGiftBuy(item, 2)
},
productItemBuyNowOrGiftBuy(item, BuyNowOrGiftBuyType) {
if (this.buyActionLock) {
return
}
this.buyActionLock = true
this.audioStopHandle()
this.cart_num = 1 this.cart_num = 1
this.addToCart(item) this.m_id = item.id
getProductDetail(item.id).then(res => {
const { data } = res
this.storeInfo = {...data.storeInfo}
if(data.storeInfo.stock === 0) {
this.buyActionLock = false
uni.showToast({
title: "产品库存不足,请选择其他商品",
icon: "none",
duration: 5000
})
return
}
this.isWenwan = data.isWenwan
this.qualifications = data.qualifications || []
// 给 attr 赋值,将请求回来的规格赋值给 attr
if (this.source !== 'pre' && this.source !== 'day' && this.source !== 'kill' && this.source !== 'spe') {
this.attr.productAttr = data.productAttr || []
this.productValueArr = []
for (const key in data.productValue) {
this.productValueArr.push({
attrItemkey: key,
...data.productValue[key]
})
}
// 初始化认为所有的规格都是可以选的
this.attr.productAttr.map(item => {
item.attrValue.map(subItem => {
subItem.canUsed = true
})
})
}
this.attr.defaultSku = data.defaultSku
this.attr.defaultSkuIndex = data.defaultSkuIndex
this.DefaultSelect()
// 是否单一规格
const onlyOne = Object.keys(data.productValue).length === 1
if(onlyOne) {
this.buyNowOrGiftBuyReq(BuyNowOrGiftBuyType)
return
}
this.attr.cartAttr = !this.isOpen ? true : false
this.buyActionLock = false
}).catch(error => {
this.buyActionLock = false
uni.showToast({
title: error.msg || '操作失败,请稍后重试',
icon: "none",
duration: 3000
})
})
}, },
buyNowOrGiftBuyReq(type) { buyNowOrGiftBuyReq(type) {
const _this = this const _this = this
@@ -532,6 +631,7 @@ export const chatMixinsV2 = {
}) })
}).finally(() => { }).finally(() => {
_this.buyLoading = false _this.buyLoading = false
_this.buyActionLock = false
}) })
}, },
closeAttrWindow() { closeAttrWindow() {
@@ -570,8 +670,8 @@ export const chatMixinsV2 = {
}, },
chatErrorSetContent() { chatErrorSetContent() {
this.chatMessageList[this.chatMessageListLength - 1].isError = true this.chatMessageList[this.chatMessageListLength - 1].isError = true
this.chatMessageList[this.chatMessageListLength - 1].content = this.errorMsg this.chatMessageList[this.chatMessageListLength - 1].content = this.exceptionConfig.model_exception
this.chatMessageList[this.chatMessageListLength - 1].nodes = this.errorMsg this.chatMessageList[this.chatMessageListLength - 1].nodes = this.exceptionConfig.model_exception
this.closeWsFn() this.closeWsFn()
}, },
closeWsFn() { closeWsFn() {
@@ -589,13 +689,26 @@ export const chatMixinsV2 = {
}) })
}, },
audioStopHandle() { audioStopHandle() {
// 强制关闭微信小程序背景音频
try {
const bgAudio = wx.getBackgroundAudioManager ? wx.getBackgroundAudioManager() : null
if (bgAudio && typeof bgAudio.stop === 'function') {
bgAudio.stop()
bgAudio.src = ''
bgAudio.title = ''
}
} catch (e) {
console.warn('stop background audio failed', e)
}
this.audioPlayId = ''
// Fix bug#4049 // Fix bug#4049
this.audioAyy = [] this.audioAyy = []
if (this.audioContext) { if (this.audioContext) {
this.audioContext.stop() this.audioContext.stop()
this.audioContext.destroy() // 强制销毁释放资源
this.audioContext = null
} }
this.isPlayAudio = false this.isPlayAudio = false
wx.getBackgroundAudioManager().stop()
}, },
ttsHandle(item) { ttsHandle(item) {
this.audioAyy = [] this.audioAyy = []
@@ -604,13 +717,13 @@ export const chatMixinsV2 = {
// this.audioContext.destroy() // this.audioContext.destroy()
} }
// 如果正在播放,点击当前播放的则认为是暂停 // 如果正在播放,点击当前播放的则认为是暂停
if (this.isPlayAudio && item.conversationId === this.audioPlayId) { if (this.isPlayAudio && [item.conversationId, item.messageId, item.parentMessageId].includes(this.audioPlayId)) {
this.isPlayAudio = false this.isPlayAudio = false
this.audioPlayId = '' this.audioPlayId = ''
return return
} }
this.isPlayAudio = false this.isPlayAudio = false
this.audioPlayId = item.conversationId this.audioPlayId = item.conversationId || item.messageId || item.parentMessageId
const flag = 1 const flag = 1
if (flag === 1) { if (flag === 1) {
console.log(removeMarkdown(item.content).replace(/[\n\t\s]/g, '')) console.log(removeMarkdown(item.content).replace(/[\n\t\s]/g, ''))
@@ -674,34 +787,74 @@ export const chatMixinsV2 = {
} }
}, },
playNextChunk() { playNextChunk() {
if (this.audioAyy.length > 0 && this.audioPlayId) { if (!this.audioAyy.length || !this.audioPlayId) {
const src = this.audioAyy.shift()
this.isPlayAudio = true
const audioContext = uni.createInnerAudioContext({
// 是否使用 WebAudio 作为底层音频驱动,默认关闭。对于短音频、播放频繁的音频建议开启此选项,开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长,因此对于长音频建议关闭此选项
useWebAudioImplement: false
})
this.audioContext = audioContext
audioContext.src = src
audioContext.onEnded(() => {
audioContext.destroy()
this.playNextChunk()
})
audioContext.play()
console.log('------------src' + src)
} else {
console.log('------------end')
this.isPlayAudio = false this.isPlayAudio = false
return
} }
// 销毁旧实例
if (this.audioContext) {
this.audioContext.stop()
this.audioContext.destroy()
this.audioContext = null
}
const src = this.audioAyy.shift()
this.isPlayAudio = true
const audioContext = uni.createInnerAudioContext({
useWebAudioImplement: true // 短音频建议 true
})
this.audioContext = audioContext
audioContext.src = src
audioContext.onPlay(() => {
console.log('audio play:', src)
})
audioContext.onEnded(() => {
this.audioContext = null
audioContext.destroy()
this.playNextChunk()
})
audioContext.onError((err) => {
console.error('audio error', err)
this.audioContext = null
audioContext.destroy()
this.playNextChunk()
})
audioContext.play()
}, },
bottomToolClickHandle(item) { bottomToolClickHandle(item) {
if (item.type === 'prompt') { // 非界面跳转的需要校验登录状态
if (!this.token && item.navType !== 'url') {
handleLoginFailure()
return
}
const idx = this.bottomTools.findIndex((i) => i.giftCardEnabled === 1)
if (item.giftCardEnabled === 1) {
// 新建会话
this.createNewHandle('giftChat')
this.$set(this, 'showGiftSteps', true)
if (idx > -1) {
this.$set(this.bottomTools[idx], 'display', false)
}
return
}
this.$set(this, 'showGiftSteps', false)
if (idx > -1) {
this.$set(this.bottomTools[idx], 'display', true)
}
if (item.navType === 'prompt') {
this.streamReq({ this.streamReq({
prompt: item.prompt, prompt: item.promptContent,
init: 0 init: 0
}) })
} }
if (item.type === 'link') { if (item.navType === 'url') {
uni.navigateTo({ uni.navigateTo({
url: item.url url: item.url
}) })
@@ -709,7 +862,107 @@ export const chatMixinsV2 = {
}, },
viewOrderTrackHandle(order) { viewOrderTrackHandle(order) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order/OrderDetails/index?id=' + order.orderId url: '/pagesOrder/order/OrderDetails/index?id=' + order.orderId
})
},
isGiftOptionSelected(configId, optionId) {
if (!this.giftSelections[configId]) return false
return this.giftSelections[configId].includes(optionId)
},
toggleGiftOption(configId, optionId) {
if (!this.giftSelections[configId]) {
this.$set(this.giftSelections, configId, [])
}
const index = this.giftSelections[configId].indexOf(optionId)
if (index > -1) {
this.giftSelections[configId].splice(index, 1)
} else {
this.giftSelections[configId].push(optionId)
}
},
prevGiftStep() {
if (this.currentGiftStepIndex > 0) {
this.currentGiftStepIndex--
}
},
nextGiftStep() {
const currentStep = this.giftBuyOptions[this.currentGiftStepIndex]
let hasSelection = false
// 校验是否已选择
if (currentStep.type === 'option_card') {
const selectedIds = this.giftSelections[currentStep.id] || []
hasSelection = selectedIds.length > 0
} else if (currentStep.type === 'price_input') {
hasSelection = !!this.giftBudget
}
if (!hasSelection) {
uni.showToast({
title: '请完善信息后再点击下一步',
icon: 'none'
})
return
}
if (this.currentGiftStepIndex < this.giftBuyOptions.length - 1) {
this.currentGiftStepIndex++
} else {
this.finishGiftSteps()
}
},
skipGiftStep() {
if (this.currentGiftStepIndex < this.giftBuyOptions.length - 1) {
this.currentGiftStepIndex++
} else {
this.finishGiftSteps()
}
},
finishGiftSteps() {
if (this.giftStepLoading || this.loading) return
const selectedSteps = []
this.giftBuyOptions.forEach(step => {
if (step.type === 'option_card') {
const selectedIds = this.giftSelections[step.id] || []
if (selectedIds.length > 0) {
const selectedNames = step.options.filter(opt => selectedIds.includes(opt.id)).map(opt => opt.optionName)
selectedSteps.push({
sort: step.sort,
title: step.title,
type: step.type,
options: selectedNames
})
}
} else if (step.type === 'price_input') {
if (this.giftBudget) {
selectedSteps.push({
sort: step.sort,
title: step.title,
type: step.type,
options: [this.giftBudget]
})
}
}
})
console.log(selectedSteps)
uni.showLoading()
this.giftStepLoading = true
getGiftRecommendPrompt(selectedSteps).then(res => {
const { success, data } = res
if (success) {
this.showGiftSteps = false
this.streamReq({
prompt: data.prompt || '我想送礼',
init: 0
})
// 清空所有送礼选项
this.giftSelections = {}
this.giftBudget = ''
this.currentGiftStepIndex = 0
}
}).finally(() => {
uni.hideLoading()
this.giftStepLoading = false
}) })
} }
} }
+53 -12
View File
@@ -45,14 +45,14 @@
</view> </view>
</view> </view>
<view v-if="item.type === -2" class="chat-message-body"> <view v-if="item.type === -2" class="chat-message-body">
<view v-if="item.nodes && item.nodes.length" class="avatar"> <view class="avatar">
<image <image
:src="webUrl + '/aiChat/avatar.png'" :src="webUrl + '/aiChat/avatar.png'"
class="chat-avatar" class="chat-avatar"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
<view v-if="item.nodes && item.nodes.length" class="item-left"> <view class="item-left">
<view class="txt"> <view class="txt">
<view <view
ref="rich-text-box" ref="rich-text-box"
@@ -67,7 +67,7 @@
space="nbsp" space="nbsp"
/> />
<view v-if="!(item.nodes && item.nodes.length) && loading" class="loader-wrap"> <view v-if="!(item.nodes && item.nodes.length) && loading" class="loader-wrap">
<div class="loader" /> <div class="loading2" />
</view> </view>
</view> </view>
<view <view
@@ -109,13 +109,13 @@
</view> </view>
<view <view
:class="{ :class="{
'playing': audioPlayId === item.conversationId && isPlayAudio 'playing': [item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio
}" }"
class="item" class="item"
@click="ttsHandle(item)" @click="ttsHandle(item)"
> >
<image <image
:src="webUrl + '/aiChat/' + ((audioPlayId === item.conversationId && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'" :src="webUrl + '/aiChat/' + (([item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
class="icon" class="icon"
mode="widthFix" mode="widthFix"
/> />
@@ -379,7 +379,12 @@
@click="scrollToBottomHandle" @click="scrollToBottomHandle"
/> />
</view> </view>
<view class="container"> <view
:class="{
'container-county': !!countyId
}"
class="container"
>
<view <view
v-if="chatNumber" v-if="chatNumber"
class="new-chat" class="new-chat"
@@ -393,17 +398,21 @@
开启新对话 开启新对话
</view> </view>
<view <view
v-if="!countyId"
v-for="(item, index) in bottomTools" v-for="(item, index) in bottomTools"
:key="index" :key="index"
:class="{
'hide': !item.display
}"
class="bottom-tool-item" class="bottom-tool-item"
@click="bottomToolClickHandle(item)" @click="bottomToolClickHandle(item)"
> >
<image <image
:src="webUrl + '/aiChat/' + item.icon + '.png'" :src="item.icon"
class="tool-icon" class="tool-icon"
mode="widthFix" mode="widthFix"
/> />
{{ item.text }} {{ item.name }}
</view> </view>
</view> </view>
</view> </view>
@@ -411,6 +420,7 @@
ref="bottomSend" ref="bottomSend"
:loading="loading" :loading="loading"
:keyboard-height="keyboardHeight" :keyboard-height="keyboardHeight"
:voice-exception="exceptionConfig.voice_exception"
@send="streamReq" @send="streamReq"
@history="historyViewHandle" @history="historyViewHandle"
@focus="inputFocusHandle" @focus="inputFocusHandle"
@@ -418,6 +428,7 @@
<AiHistoryList <AiHistoryList
ref="historyView" ref="historyView"
:status-bar-height="statusBarHeight" :status-bar-height="statusBarHeight"
:county-id="countyId"
form-module="history" form-module="history"
@enter-history="audioStopHandle" @enter-history="audioStopHandle"
/> />
@@ -445,7 +456,8 @@ import BottomSend from '../components/bottomSend.vue'
import OrderItem from '../components/orderItem.vue' import OrderItem from '../components/orderItem.vue'
import ProductWindow from '@/components/ProductWindow' import ProductWindow from '@/components/ProductWindow'
import { import {
historyChatMessage historyChatMessage,
getCountyAiHistoryChatMessage
} from '@/api/chat/index' } from '@/api/chat/index'
import { formatAiMsgContent } from '../utils/aiChat' import { formatAiMsgContent } from '../utils/aiChat'
export default { export default {
@@ -459,19 +471,27 @@ export default {
mixins: [chatMixinsV2, goCartMixin], mixins: [chatMixinsV2, goCartMixin],
data() { data() {
return { return {
pageTitle: '' pageTitle: '',
countyId: ''
} }
}, },
onLoad(options) { onLoad(options) {
this.chatNumber = options.chatNumber this.chatNumber = options.chatNumber
this.pageTitle = options.title this.pageTitle = options.title || ''
this.countyId = options.countyId || ''
this.pageTitle = this.pageTitle.length > 8 ? (this.pageTitle.substring(0, 8) + '...') : this.pageTitle this.pageTitle = this.pageTitle.length > 8 ? (this.pageTitle.substring(0, 8) + '...') : this.pageTitle
this.init() this.init()
}, },
methods: { methods: {
init() { init() {
this.loading = true this.loading = true
historyChatMessage({ let reqFn = null
if (this.countyId) {
reqFn = getCountyAiHistoryChatMessage
} else {
reqFn = historyChatMessage
}
reqFn({
chatNumber: this.chatNumber chatNumber: this.chatNumber
}).then(res => { }).then(res => {
const { success, data = [] } = res const { success, data = [] } = res
@@ -547,6 +567,9 @@ export default {
} }
}) })
console.log(this.chatMessageList) console.log(this.chatMessageList)
this.$nextTick(() => {
this.scrollToBottomHandle()
})
} catch (err) { } catch (err) {
uni.showModal({ uni.showModal({
title: '错误提示', title: '错误提示',
@@ -572,6 +595,24 @@ export default {
createNewHandle() { createNewHandle() {
uni.setStorageSync('addNewChat', '1') uni.setStorageSync('addNewChat', '1')
uni.navigateBack() uni.navigateBack()
},
bottomToolClickHandle(item) {
if (item.giftCardEnabled === 1) {
uni.setStorageSync('addNewChat', '2')
uni.navigateBack()
return
}
if (item.navType === 'prompt') {
this.streamReq({
prompt: item.promptContent,
init: 0
})
}
if (item.navType === 'url') {
uni.navigateTo({
url: item.url
})
}
} }
} }
} }
+21 -1
View File
@@ -38,7 +38,10 @@
</view> </view>
</view> </view>
<view class="sheet-divider" /> <view class="sheet-divider" />
<view class="goods-grid"> <view v-if="!loaded" class="loading-state">
<u-loading-icon mode="circle" size="36" text="正在识别中..." vertical textSize="14"></u-loading-icon>
</view>
<view v-else class="goods-grid">
<view <view
v-for="(item, index) in goodsList" v-for="(item, index) in goodsList"
:key="index" :key="index"
@@ -66,6 +69,9 @@
lazy-load lazy-load
/> />
</view> </view>
<view v-if="item.similarityScore > 0" class="goods-desc">
相似度{{ item.similarityScore }}%
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -84,6 +90,7 @@ export default {
}, },
data() { data() {
return { return {
loaded: false,
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
statusBarHeight: 20, statusBarHeight: 20,
imageUrl: '', imageUrl: '',
@@ -245,6 +252,13 @@ export default {
margin: 0 32rpx; margin: 0 32rpx;
} }
.loading-state {
padding: 120rpx 0;
display: flex;
justify-content: center;
align-items: center;
}
.empty-state { .empty-state {
text-align: center; text-align: center;
} }
@@ -301,6 +315,12 @@ export default {
align-items: flex-end; align-items: flex-end;
justify-content: space-between; justify-content: space-between;
} }
.goods-desc {
padding: 10rpx 14rpx 20rpx 14rpx;
font-size: 24rpx;
color: #999;
line-height: 1;
}
.price-left { .price-left {
display: flex; display: flex;
+226 -34
View File
@@ -16,7 +16,7 @@
transparent="auto" transparent="auto"
barPlaceholder="hidden" barPlaceholder="hidden"
title="云灵" title="云灵"
@click-left="clickBackHandle" @click-left="pageContainerBeforeleave"
/> />
<page-container <page-container
:show="true" :show="true"
@@ -40,17 +40,25 @@
conversationId: '123' conversationId: '123'
})">播放</button> --> })">播放</button> -->
<block v-if="chatMessageListLength < 1"> <block v-if="chatMessageListLength < 1">
<view class="home-wrap"> <view
:class="{
'county-home-wrap': !!countyId
}"
class="home-wrap"
>
<view class="home-focus-wrap"> <view class="home-focus-wrap">
<view class="focus-guide-wrap"> <view class="focus-guide-wrap">
<view class="guide-left"> <view class="guide-left">
<image <image
:src="webUrl + '/aiChat/logo-01.gif'" :src="webUrl + '/aiChat/logo-transition.png'"
class="avatar" :class="{
'county-avatar': !!countyId
}"
class="avatar avatar-bounce"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
<view class="guide-right"> <view v-if="!showGiftSteps" class="guide-right">
<view class="title">{{ settingInfo.helloMessageTitle }}</view> <view class="title">{{ settingInfo.helloMessageTitle }}</view>
<view class="content">{{ settingInfo.helloMessageContent }}</view> <view class="content">{{ settingInfo.helloMessageContent }}</view>
</view> </view>
@@ -99,7 +107,8 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> --> </view> -->
<view class="topic-wrap"> <!-- 大家都在问 -->
<view v-if="!showGiftSteps && !countyId" class="topic-wrap">
<view class="title"> <view class="title">
<view class="title-left">大家都在问</view> <view class="title-left">大家都在问</view>
<view class="title-right" @click="loadData('click')"> <view class="title-right" @click="loadData('click')">
@@ -133,6 +142,61 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 县域 -->
<view v-if="!showGiftSteps && countyId" class="county-tools-wrap">
<view class="list-cont">
<view
v-for="(item, index) in countyTools"
:key="index"
class="list-item"
@click="countyToolItemClickHandle(item)"
>
<image
:src="item.icon"
class="icon"
mode="widthFix"
/>
<view class="name">{{ item.name }}</view>
</view>
</view>
</view>
<!-- 在这里实现送礼步骤 -->
<view v-if="showGiftSteps" class="gift-steps-wrap">
<view
v-for="(item, index) in giftBuyOptions"
:key="index"
style="width: 100%;"
>
<view v-show="currentGiftStepIndex === index" class="gift-step-item">
<view class="gift-step-title">{{ item.title }}</view>
<view v-if="item.type === 'option_card'" class="gift-options">
<view
v-for="opt in item.options"
:key="opt.id"
class="gift-option-item"
:class="{ active: isGiftOptionSelected(item.id, opt.id) }"
@click="toggleGiftOption(item.id, opt.id)"
>
{{ opt.optionName }}
<image v-if="isGiftOptionSelected(item.id, opt.id)" :src="webUrl + '/aiChat/gift-options-check.png'" class="icon-check" />
</view>
</view>
<view v-if="item.type === 'price_input'" class="gift-price-input">
<view class="input-wrap">
<text class="label">价格预算</text>
<input v-model="giftBudget" placeholder="例如100以内/300~500元" class="input-budget" placeholder-style="color: #ccc;" />
</view>
</view>
</view>
</view>
<view class="gift-step-actions">
<view class="action-btn-group">
<view v-if="currentGiftStepIndex > 0" class="btn btn-prev" @click="prevGiftStep">上一步</view>
<view class="btn btn-next" :class="{'full-width': currentGiftStepIndex === 0}" @click="nextGiftStep">下一步</view>
</view>
<view class="btn-skip" @click="skipGiftStep">跳过</view>
</view>
</view>
</view> </view>
</block> </block>
<view v-if="chatMessageListLength > 0" class="chat-wrap"> <view v-if="chatMessageListLength > 0" class="chat-wrap">
@@ -224,13 +288,13 @@
</view> </view>
<view <view
:class="{ :class="{
'playing': audioPlayId === item.conversationId && isPlayAudio 'playing': [item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio
}" }"
class="item" class="item"
@click="ttsHandle(item)" @click="ttsHandle(item)"
> >
<image <image
:src="webUrl + '/aiChat/' + ((audioPlayId === item.conversationId && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'" :src="webUrl + '/aiChat/' + (([item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
class="icon" class="icon"
mode="widthFix" mode="widthFix"
/> />
@@ -500,9 +564,14 @@
@click="scrollToBottomHandle" @click="scrollToBottomHandle"
/> />
</view> </view>
<view class="container"> <view
:class="{
'container-county': !!countyId
}"
class="container"
>
<view <view
v-if="chatNumber" v-if="chatNumber || showGiftSteps"
class="new-chat" class="new-chat"
@click="createNewHandle" @click="createNewHandle"
> >
@@ -514,17 +583,21 @@
开启新对话 开启新对话
</view> </view>
<view <view
v-if="!countyId"
v-for="(item, index) in bottomTools" v-for="(item, index) in bottomTools"
:key="index" :key="index"
:class="{
'hide': !item.display
}"
class="bottom-tool-item" class="bottom-tool-item"
@click="bottomToolClickHandle(item)" @click="bottomToolClickHandle(item)"
> >
<image <image
:src="webUrl + '/aiChat/' + item.icon + '.png'" :src="item.icon"
class="tool-icon" class="tool-icon"
mode="widthFix" mode="widthFix"
/> />
{{ item.text }} {{ item.name }}
</view> </view>
</view> </view>
</view> </view>
@@ -532,6 +605,7 @@
ref="bottomSend" ref="bottomSend"
:loading="loading" :loading="loading"
:keyboard-height="keyboardHeight" :keyboard-height="keyboardHeight"
:voice-exception="exceptionConfig.voice_exception"
@send="streamReq" @send="streamReq"
@add="createNewHandle" @add="createNewHandle"
@history="historyViewHandle" @history="historyViewHandle"
@@ -540,6 +614,7 @@
<AiHistoryList <AiHistoryList
ref="historyView" ref="historyView"
:status-bar-height="statusBarHeight" :status-bar-height="statusBarHeight"
:county-id="countyId"
@enter-history="audioStopHandle" @enter-history="audioStopHandle"
/> />
<ProductWindow <ProductWindow
@@ -565,6 +640,9 @@ import {
getAiSystemInfoSetting, getAiSystemInfoSetting,
getAiSystemInfoTopic getAiSystemInfoTopic
} from '@/api/public' } from '@/api/public'
import {
getCountyAiDetail
} from '@/api/chat/index'
import AiHistoryList from '../components/historyList' import AiHistoryList from '../components/historyList'
import BottomSend from '../components/bottomSend.vue' import BottomSend from '../components/bottomSend.vue'
import OrderItem from '../components/orderItem.vue' import OrderItem from '../components/orderItem.vue'
@@ -581,39 +659,68 @@ export default {
data() { data() {
return { return {
cityName: '', cityName: '',
countyId: '',
animationWidth: '150%', animationWidth: '150%',
animationStr: '', animationStr: '',
settingInfo: {}, settingInfo: {},
topicList: [], topicList: [],
onlyOneToAddCart: false, topicIsRotate: false,
topicIsRotate: false showGiftSteps: false,
currentGiftStepIndex: 0,
giftSelections: {},
giftBudget: '',
giftBuyOptions: [],
countyTools: []
} }
}, },
onLoad(options) { onLoad(options) {
this.cityName = options.cityName || '' this.cityName = options.cityName || ''
this.countyId = options.countyId || ''
}, },
onShow() { onShow() {
const addNewChat = uni.getStorageSync('addNewChat') === '1' // 1-新对话,2-我要送礼
const addNewChat = uni.getStorageSync('addNewChat') || ''
// 从历史界面点击新增对话 // 从历史界面点击新增对话
if (addNewChat && this.chatNumber) { if (addNewChat) {
console.log(addNewChat) if (addNewChat === '1' && (this.chatNumber || this.showGiftSteps)) {
this.createNewHandle()
}
if (addNewChat === '2') {
const giftOptionItem = this.bottomTools.find((i) => i.giftCardEnabled === 1)
if (giftOptionItem) {
this.bottomToolClickHandle(giftOptionItem)
}
}
uni.removeStorageSync('addNewChat') uni.removeStorageSync('addNewChat')
this.createNewHandle()
} }
this.audioStopHandle()
}, },
methods: { methods: {
createdCallbak() { extraReqFn() {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollToBottomHandle() this.scrollToBottomHandle()
getAiSystemInfoSetting().then(res => { if (this.countyId) {
const { success, data } = res getCountyAiDetail({
if (success) { countyId: this.countyId
this.settingInfo = data }).then(res => {
this.animationWidth = `${data.systemTopicDivMaxWidth * 750}rpx` const { success, data } = res
this.animationStr = `TranslateXSwiper-${data.systemTopicDivMaxWidth * 10} ${data.systemTopicDivScrollDuration}s infinite linear alternate` if (success) {
} this.settingInfo.helloMessageTitle = data.title || ''
}) this.settingInfo.helloMessageContent = data.introduction || ''
this.loadData() this.countyTools = data.modules || []
}
})
} else {
getAiSystemInfoSetting().then(res => {
const { success, data } = res
if (success) {
this.settingInfo = data
this.animationWidth = `${data.systemTopicDivMaxWidth * 750}rpx`
this.animationStr = `TranslateXSwiper-${data.systemTopicDivMaxWidth * 10} ${data.systemTopicDivScrollDuration}s infinite linear alternate`
}
})
this.loadData()
}
}) })
}, },
loadData(type = '') { loadData(type = '') {
@@ -643,13 +750,12 @@ export default {
}) })
}, },
// 创建新会话 // 创建新会话
createNewHandle() { createNewHandle(type = '') {
this.closeAttrWindow() this.closeAttrWindow()
if (this.audioContext) { if (this.audioContext) {
this.audioContext.stop() this.audioContext.stop()
} }
wx.getBackgroundAudioManager().stop() wx.getBackgroundAudioManager().stop()
if (!this.chatNumber) return
this.closeWsFn() this.closeWsFn()
this.chatNumber = '' this.chatNumber = ''
this.showCursor = false this.showCursor = false
@@ -657,9 +763,21 @@ export default {
this.getConfigLoading = false this.getConfigLoading = false
this.chatMessageList = [] this.chatMessageList = []
this.loadData() this.loadData()
// 清空所有送礼选项
this.giftSelections = {}
this.giftBudget = ''
this.currentGiftStepIndex = 0
if (type !== 'giftChat') {
const idx = this.bottomTools.findIndex((i) => i.giftCardEnabled === 1)
this.$set(this, 'showGiftSteps', false)
if (idx > -1) {
this.$set(this.bottomTools[idx], 'display', true)
}
}
}, },
/*
clickBackHandle() { clickBackHandle() {
if (!this.chatNumber) { if (!this.chatNumber && !this.showGiftSteps) {
if (getCurrentPages().length > 1) { if (getCurrentPages().length > 1) {
uni.navigateBack() uni.navigateBack()
} else { } else {
@@ -671,8 +789,9 @@ export default {
this.createNewHandle() this.createNewHandle()
} }
}, },
*/
pageContainerBeforeleave() { pageContainerBeforeleave() {
if (!this.chatNumber) { if (!this.chatNumber && !this.showGiftSteps) {
if (getCurrentPages().length > 1) { if (getCurrentPages().length > 1) {
uni.navigateBack() uni.navigateBack()
} else { } else {
@@ -683,6 +802,19 @@ export default {
} else { } else {
this.createNewHandle() this.createNewHandle()
} }
},
countyToolItemClickHandle(item) {
if (item.moduleType === 'prompt') {
this.streamReq({
prompt: item.promptContent,
init: 0
})
}
if (item.moduleType === 'url') {
uni.navigateTo({
url: item.url
})
}
} }
} }
} }
@@ -728,6 +860,7 @@ export default {
height: calc(100vh - 240rpx); height: calc(100vh - 240rpx);
padding: 0 0 240rpx 0; padding: 0 0 240rpx 0;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto;
} }
.focus-guide-wrap { .focus-guide-wrap {
display: flex; display: flex;
@@ -737,8 +870,13 @@ export default {
.guide-left { .guide-left {
.avatar { .avatar {
display: block; display: block;
width: 230rpx; width: 400rpx;
height: 404rpx; }
.county-avatar {
width: 360rpx;
}
.avatar-bounce {
animation: bounce 2s infinite ease-in-out;
} }
} }
.guide-right { .guide-right {
@@ -822,4 +960,58 @@ export default {
transform: translateX(-50%); transform: translateX(-50%);
} }
} }
@keyframes bounce {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-20rpx);
}
}
.county-home-wrap {
justify-content: flex-start;
.guide-right {
.content {
padding: 30rpx 32rpx 0 32rpx;
color: #666;
text-align: left;
}
}
}
.county-tools-wrap {
width: 100%;
padding: 40rpx 0 0 0;
.list-cont {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
width: 100%;
padding: 0 60rpx;
box-sizing: border-box;
.list-item {
display: flex;
align-items: center;
flex-direction: column;
width: 28%;
padding: 20rpx 0 12rpx 0;
margin: 0 0 24rpx 0;
border-radius: 12rpx;
background-color: #fff;
box-shadow: 0 0 12rpx rgba(0, 0, 0, 0.1);
.icon {
display: block;
width: 60rpx;
height: 60rpx;
margin: 0 8rpx 0 0;
}
.name {
padding: 8rpx 0 0 0;
font-size: 28rpx;
color: #333;
}
}
}
}
</style> </style>
+34
View File
@@ -38,6 +38,10 @@ export function deleteChatListByType(type) {
return request.delete('/v1/chat/type/' + type, {}, { login: true }) return request.delete('/v1/chat/type/' + type, {}, { login: true })
} }
export function deleteCountyChatListByType(type, params) {
return request.delete('/county-ai/chat/type/' + type + params, {}, { login: true })
}
export function getWeatherData(params) { export function getWeatherData(params) {
return request.get('/v1/chat/weatherData', params, { login: true }) return request.get('/v1/chat/weatherData', params, { login: true })
} }
@@ -59,3 +63,33 @@ export function getAnalyzeKeywordsChangeV3(data) {
export function getAnalyzeByImageV3(data) { export function getAnalyzeByImageV3(data) {
return request.post('/v1/chat/image/recognition', data, { login: true }) return request.post('/v1/chat/image/recognition', data, { login: true })
} }
// 获取送礼选项配置
export function getGiftRecommendOptions(params) {
return request.get('/ai/gift-recommend/options', params, { login: true })
}
// 获取县域AI详情
export function getCountyAiDetail(params) {
return request.get('/county-ai/detail', params, { login: true })
}
export function getSseCountyAiConfigV1(data) {
return request.post('/county-ai/chat', data, { login: true })
}
export function getCountyAiCompletionsV1(params) {
return request.get('/county-ai/chat/recognize', params, { login: true })
}
export function getCountyAiChatList(params) {
return request.get('/county-ai/chat/list', params, { login: true })
}
export function getCountyAiHistoryChatMessage(params) {
return request.get('/county-ai/chat/message', params, { login: true })
}
export function getGiftRecommendPrompt(data) {
return request.post('/ai/gift-recommend/build-prompt', data, { login: true })
}
+25 -12
View File
@@ -11,10 +11,8 @@ export function getImages() {
} }
// 商户申请页面数据 // 商户申请页面数据
export function getShopData(partnerId) { export function getShopData(params) {
let param = {}; return request.get("/merchantApply/index", params, {login: true})
if (partnerId) param.partnerId = partnerId;
return request.get("/merchantApply/index", param, {login: true})
} }
// 查看商户申请 // 查看商户申请
@@ -29,23 +27,38 @@ export function getWholesaler() {
} }
// 提交店铺入驻申请 // 提交店铺入驻申请
export function saveShop(hotelInfo, captcha, partnerId) { export function saveShop(hotelInfo, partnerId = '', promoterUid = '') {
let param = {hotelInfo, captcha: hotelInfo.captcha}; let param = {hotelInfo, captcha: hotelInfo.captcha};
if (partnerId && partnerId.length > 0) param.partnerId = partnerId; if (partnerId && partnerId.length > 0) {
param.partnerId = partnerId;
}
if (promoterUid && promoterUid.length > 0) {
param.promoterUid = promoterUid;
}
return request.post("/merchantApply/hotel/submit", param, {login: true}) return request.post("/merchantApply/hotel/submit", param, {login: true})
} }
// 提交特产供应商入驻申请 // 提交特产供应商入驻申请
export function saveSupplier(hotelInfo, supplierInfo, partnerId) { export function saveSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha}; let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
if (partnerId && partnerId.length > 0) param.partnerId = partnerId; if (partnerId && partnerId.length > 0) {
param.partnerId = partnerId;
}
if (promoterUid && promoterUid.length > 0) {
param.promoterUid = promoterUid;
}
return request.post("/merchantApply/goodSupplier/submit", param, {login: true}) return request.post("/merchantApply/goodSupplier/submit", param, {login: true})
} }
// 提交文玩供应商入驻申请 // 提交文玩供应商入驻申请
export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId) { export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha}; let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
if (partnerId && partnerId.length > 0) param.partnerId = partnerId; if (partnerId && partnerId.length > 0) {
param.partnerId = partnerId;
}
if (promoterUid && promoterUid.length > 0) {
param.promoterUid = promoterUid;
}
return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true}) return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true})
} }
@@ -82,8 +95,8 @@ export function getHotelInfo(params) {
} }
// 获取千县名品店铺类型列表 // 获取千县名品店铺类型列表
export function getCountyFamousHotelType() { export function getCountyFamousHotelType(params) {
return request.get("/countyFamous/hotelType", {}, {login: true}) return request.get("/countyFamous/hotelType", params, {login: true})
} }
/** /**
+115 -5
View File
@@ -3,15 +3,77 @@ import request from '@/utils/request'
/** /**
* 抽奖活动信息 * 抽奖活动信息
* */ * */
export function getDetail() { export function getDetail(params = {}) {
return request.get('/lottery/dice/detail') return request.get('/lottery/dice/detail', params)
} }
/** /**
* 抽奖 * 抽奖
* */ * */
export function getPrize() { export function getPrize(data = {}) {
return request.post('/lottery/dice/draw') return request.post('/lottery/dice/draw', data)
}
/**
* 县域抽奖活动详情
* @param activityId 抽奖活动ID
*/
export function getDrawActivityInfo(activityId) {
return request.get('/draw/activityInfo', { activityId })
}
/**
* 县域抽奖活动规则
*/
export function getDrawRuleConfig() {
return request.get('/draw/ruleConfig')
}
/**
* 我的抽奖码列表
* @param status 抽奖码状态(0:等待开奖, 1:已中奖, 2:未中奖, -1:已失效)
*/
export function getDrawMyTickets(status) {
const params = {}
if (status !== undefined && status !== null && status !== '') {
params.status = status
}
return request.get('/draw/myTickets', params)
}
/**
* 抽奖活动中奖记录
* @param activityId 抽奖活动ID
*/
export function getActivityWinRecord(activityId) {
return request.get('/draw/activityWinRecord', { activityId })
}
/**
* 获取最新中奖名单
* @param activityId 抽奖活动ID(可选)
*/
export function getDrawLatestWinners(activityId) {
const params = {}
if (activityId !== undefined && activityId !== null && activityId !== '') {
params.activityId = activityId
}
return request.get('/draw/latestWinners', params)
}
/**
* 历史抽奖活动列表
* 用于在中奖名单页面切换历史抽奖活动
*/
export function getDrawHistoryActivities() {
return request.get('/draw/historyActivities')
}
/**
* 获取抽奖相关显示配置
*/
export function getDrawConfig() {
return request.get('/draw/config')
} }
/** /**
@@ -35,4 +97,52 @@ export function getLogs(page = 1, limit = 10) {
* */ * */
export function getLotteryShareInfo() { export function getLotteryShareInfo() {
return request.get('/lottery/shareImage') return request.get('/lottery/shareImage')
} }
/**
* 订单支付完成后检查抽奖码
* @param orderId 订单号
*/
export function getDrawTicketByOrder(orderId) {
return request.get('/draw/ticketCheck', { orderId })
}
/**
* 校验抽奖活动是否到开奖时间
* @param activityId 抽奖活动ID
*/
export function checkDrawTime(activityId) {
return request.get('/draw/checkTime', { activityId })
}
/**
* 领取优惠券奖品
* @param ticketId 抽奖券ID
*/
export function claimCoupon(ticketId) {
return request.post('/draw/claimCoupon', { ticketId })
}
/**
* 领取实物奖品
* @param ticketId 抽奖券ID
* @param addressId 用户收货地址ID
*/
export function claimPrize(ticketId, addressId) {
return request.post('/draw/claimPrize', { ticketId, addressId })
}
/**
* 获取实名认证信息
*/
export function getDrawRealname() {
return request.get('/draw/realname')
}
/**
* 提交实名认证
* @param data { realName, idCard, phone }
*/
export function submitDrawRealname(data = {}) {
return request.post('/draw/realname', data)
}
+11
View File
@@ -102,6 +102,17 @@ export function postOrderRefund(data) {
return request.post("/order/refund/verify", data); return request.post("/order/refund/verify", data);
} }
/**
* 取消退款申请
* @param uni
* @returns {*}
*/
export function cancelOrderRefund(uni) {
return request.post("/order/refund/cancel", {
uni
});
}
/** /**
* 确认收货 * 确认收货
* @returns {*} * @returns {*}
+10
View File
@@ -223,6 +223,16 @@ export function getAiSystemInfoTopic() {
return request.get('/ai/systemTopic', {}, { login: false }) return request.get('/ai/systemTopic', {}, { login: false })
} }
// 获取异常提示配置
export function getExceptionConfig() {
return request.get('/ai/exceptionConfig', {}, { login: true })
}
// 获取已启用的底部导航配置列表
export function getBottomNavigationConfigList() {
return request.get('/ai/bottom-navigation/list', {}, { login: true })
}
// 获取通用分享配置 // 获取通用分享配置
export function getWeixinShareConfig() { export function getWeixinShareConfig() {
return request.get('/weixinShareConfig', {}, { login: false }) return request.get('/weixinShareConfig', {}, { login: false })
+2 -2
View File
@@ -313,8 +313,8 @@ export function getCityShopList(params) {
return request.get('/countyFamous/hotel', params, {login: true}) return request.get('/countyFamous/hotel', params, {login: true})
} }
export function getCountyFamousHotelType() { export function getCountyFamousHotelType(params) {
return request.get('/countyFamous/hotelType', {}, {login: true}) return request.get('/countyFamous/hotelType', params, {login: true})
} }
/** /**
+132
View File
@@ -111,6 +111,12 @@ page {
box-sizing: border-box; box-sizing: border-box;
overflow-x: auto; overflow-x: auto;
} }
.container-county {
justify-content: flex-end;
.new-chat {
margin-right: 0;
}
}
.new-chat { .new-chat {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -161,6 +167,9 @@ page {
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
&.hide {
display: none;
}
.tool-icon { .tool-icon {
display: block; display: block;
width: 32rpx; width: 32rpx;
@@ -1365,3 +1374,126 @@ page {
transform: rotate(720deg); transform: rotate(720deg);
} }
} }
.gift-steps-wrap {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 0 80rpx;
box-sizing: border-box;
.gift-step-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
margin-bottom: 60rpx;
text-align: center;
}
.gift-options {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
.gift-option-item {
width: 48%;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #f2f4ff;
color: #333;
border-radius: 12rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
position: relative;
transition: all 0.2s;
&.active {
background-color: #3D4CF0;
color: #fff;
}
.icon-check {
margin-left: 8rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.gift-price-input {
width: 100%;
margin-bottom: 40rpx;
.input-wrap {
display: flex;
align-items: center;
padding: 0 24rpx;
height: 88rpx;
background-color: #f2f4ff;
border-radius: 12rpx;
.label {
font-size: 28rpx;
color: #333;
white-space: nowrap;
}
.input-budget {
flex: 1;
font-size: 28rpx;
color: #333;
padding-left: 10rpx;
}
}
}
.gift-step-actions {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
.action-btn-group {
display: flex;
justify-content: space-between;
width: 100%;
margin-bottom: 20rpx;
.btn {
height: 62rpx;
line-height: 62rpx;
text-align: center;
border-radius: 12rpx;
font-size: 30rpx;
&-prev {
width: 48%;
background-color: #fff;
color: #3D4CF0;
border: 2rpx solid #3D4CF0;
box-sizing: border-box;
}
&-next {
width: 48%;
background-color: #3D4CF0;
color: #fff;
&.full-width {
width: 100%;
}
}
}
}
.btn-skip {
font-size: 28rpx;
color: #3D4CF0;
padding: 10rpx 20rpx;
}
}
}
+189
View File
@@ -8231,3 +8231,192 @@ rich-text {
font-size: 28rpx; font-size: 28rpx;
} }
} }
.draw-ticket-mask {
position: fixed;
inset: 0;
z-index: 1000;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
padding: 24rpx;
box-sizing: border-box;
}
.draw-ticket-popup {
width: 100%;
max-width: 640rpx;
background: #fff;
border-radius: 40rpx;
padding: 50rpx 40rpx 60rpx;
position: relative;
box-sizing: border-box;
.draw-ticket-close {
position: absolute;
top: 30rpx;
right: 30rpx;
width: 40rpx;
height: 40rpx;
border: 4rpx solid #333;
border-radius: 50%;
color: #333;
text-align: center;
font-weight: bold;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
line-height: 40rpx;
}
.draw-ticket-icon {
display: flex;
justify-content: center;
margin-top: 20rpx;
}
.ticket-icon-box {
width: 100rpx;
height: 70rpx;
border-radius: 10rpx;
position: relative;
box-sizing: border-box;
}
.ticket-icon-check {
width: 100%;
height: 100%;
}
.draw-ticket-title {
font-size: 56rpx;
color: #222;
font-weight: 800;
text-align: center;
margin-top: 24rpx;
letter-spacing: 2rpx;
}
.ticket-card-container {
margin-top: 50rpx;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
.ticket-badge {
background-color: #fff9eb;
border: 6rpx solid #111;
border-radius: 40rpx;
padding: 12rpx 40rpx;
font-size: 46rpx;
font-weight: 800;
color: #222;
position: relative;
z-index: 2;
margin-bottom: -36rpx;
letter-spacing: 2rpx;
}
.ticket-badge-arrow {
position: absolute;
bottom: -22rpx;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-left: 22rpx solid transparent;
border-right: 22rpx solid transparent;
border-top: 22rpx solid #111;
&::after {
content: '';
position: absolute;
top: -26rpx;
left: -16rpx;
border-left: 16rpx solid transparent;
border-right: 16rpx solid transparent;
border-top: 16rpx solid #fff9eb;
}
}
.ticket-card {
width: 100%;
background: #c23326;
border-radius: 36rpx;
padding: 70rpx 36rpx 40rpx;
box-sizing: border-box;
text-align: center;
position: relative;
}
.ticket-card-subtitle {
display: flex;
justify-content: center;
}
.ticket-card-subtitle-text {
color: #fff;
font-size: 34rpx;
font-weight: 700;
border: 2rpx solid #fff;
border-radius: 40rpx;
padding: 8rpx 50rpx;
letter-spacing: 4rpx;
}
.ticket-card-code-box {
background: #fff;
border-radius: 20rpx;
margin-top: 36rpx;
padding: 36rpx 0;
}
.ticket-card-code {
color: #c23326;
font-size: 72rpx;
font-weight: 800;
letter-spacing: 8rpx;
}
.ticket-card-time {
color: #fff;
font-size: 30rpx;
margin-top: 36rpx;
text-align: left;
}
.draw-ticket-actions {
margin-top: 60rpx;
display: flex;
justify-content: space-between;
align-items: center;
gap: 20rpx;
.action-btn {
flex: 1;
height: 86rpx;
border-radius: 44rpx;
font-size: 32rpx;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
white-space: nowrap;
&.home-btn {
color: #c23326;
border: 2rpx solid #c23326;
background: #fff;
}
&.primary {
color: #fff;
background: #c23326;
}
}
}
}
-57
View File
@@ -1,57 +0,0 @@
<template>
<view class="components-checkbox-icon jc-center ai-center" :class="{'isSelected':isSelected}" @click="change"
v-if="ready">
<image class="icon-hook" :src="webUrl+'/20240109175325131970.png'" mode="scaleToFill" v-if="isSelected"/>
</view>
</template>
<script setup>
import {computed, getCurrentInstance, onMounted, ref} from '@vue/composition-api'
import {VUE_APP_RESOURCES_URL} from '../config/index'
const webUrl = VUE_APP_RESOURCES_URL
const emit = defineEmits(['change'])
const {proxy} = getCurrentInstance()
const props = defineProps({
defaultState: {
type: Boolean,
default: false
},
mark: Array
})
const ready = ref(false)
onMounted(() => {
ready.value = true
})
const isSelected = computed(() => {
return props.defaultState
})
const change = () => {
emit('change', !isSelected.value, props.mark)
}
</script>
<style scoped lang="less">
.components-checkbox-icon {
display: inline-flex;
width: 32rpx;
height: 32rpx;
box-sizing: border-box;
border: 2rpx solid #D5D7D8;
border-radius: 50%;
}
.icon-hook {
width: 24rpx;
height: 24rpx;
}
.isSelected {
border: 3px solid #FD5749;
background: #FD5749;
}
</style>
+1 -1
View File
@@ -82,7 +82,7 @@ export default {
methods: { methods: {
routerGo(cart) { routerGo(cart) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsEvaluate/index", path: "/pagesShop/shop/GoodsEvaluate/index",
query: { id: cart.unique } query: { id: cart.unique }
}); });
} }
+19 -8
View File
@@ -1,11 +1,8 @@
<template> <template>
<view> <view>
<view <view
:class="{ :class="[{ on: attr.cartAttr === true }, className]"
'on': attr.cartAttr === true, :style="{ paddingBottom: paddingBottom }"
[className]: className
}"
:style="{paddingBottom: paddingBottom}"
class="product-window" class="product-window"
> >
<view class="textpic acea-row row-between-wrapper"> <view class="textpic acea-row row-between-wrapper">
@@ -52,7 +49,7 @@
</view> </view>
<view class="cart v12-justify-between v12-align-center"> <view class="cart v12-justify-between v12-align-center">
<view class="titlev12-dark-text f12-font-32">购买数量</view> <view class="titlev12-dark-text f12-font-32">购买数量</view>
<view class="carnum acea-row row-left"> <view v-if="!hideQuantityControls" class="carnum acea-row row-left">
<view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view> <view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
<input <input
type="number" type="number"
@@ -73,11 +70,12 @@
@click="CartNumAdd" @click="CartNumAdd"
>+</view> >+</view>
</view> </view>
<view v-else class="v12-font-28 v12-dark-text">x1</view>
</view> </view>
<view class="v12-px-2 v12-mt-3" v-if="showOk"> <view class="v12-px-2 v12-mt-3" v-if="showOk">
<u-button <u-button
shape="circle" shape="circle"
color="#C52733" :color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
@click="$emit('ok')" @click="$emit('ok')"
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)" :disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
>{{ okText }}</u-button> >{{ okText }}</u-button>
@@ -85,7 +83,7 @@
<view class="v12-px-2 v12-mt-3" v-if="isGift"> <view class="v12-px-2 v12-mt-3" v-if="isGift">
<u-button <u-button
shape="circle" shape="circle"
color="#C52733" :color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
@click="$emit('gift')" @click="$emit('gift')"
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)" :disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
>送给朋友</u-button> >送给朋友</u-button>
@@ -139,6 +137,10 @@ export default {
className: { className: {
type: String, type: String,
default: '' default: ''
},
hideQuantityControls: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@@ -253,6 +255,15 @@ export default {
} }
</script> </script>
<style scope> <style scope>
.btn-car-disabled {
border: 2rpx solid #9D9D9D !important;
color: #9D9D9D !important;
}
.btn-buy-disabled {
background: #9D9D9D !important;
color: #FFFFFF !important;
}
.itemn{ .itemn{
margin: 28rpx 0 0 34rpx !important; margin: 28rpx 0 0 34rpx !important;
width: auto; width: auto;
+21 -1
View File
@@ -13,12 +13,19 @@
import { import {
getAiSystemInfoSetting getAiSystemInfoSetting
} from '@/api/public' } from '@/api/public'
import {
getCountyAiDetail
} from '@/api/chat/index'
export default { export default {
name: 'AiEntrance', name: 'AiEntrance',
props: { props: {
cityName: { cityName: {
type: String, type: String,
default: '' default: ''
},
countyId: {
type: String,
default: ''
} }
}, },
data() { data() {
@@ -33,6 +40,19 @@ export default {
}, },
methods: { methods: {
init() { init() {
if (this.countyId) {
getCountyAiDetail({
countyId: this.countyId
}).then(res => {
const { success, data } = res
if (success) {
const aiImage = data.aiImage || ''
this.settingInfo.mainImage = aiImage
this.showImg = !!aiImage
}
})
return
}
getAiSystemInfoSetting().then(res => { getAiSystemInfoSetting().then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
@@ -43,7 +63,7 @@ export default {
}, },
enterAiChat() { enterAiChat() {
uni.navigateTo({ uni.navigateTo({
url: '/aiChat/views/index?click=1&cityName=' + (this.cityName || this.localCityName) url: '/aiChat/views/index?click=1&cityName=' + (this.cityName || this.localCityName) + '&countyId=' + (this.countyId || '')
}) })
} }
} }
-343
View File
@@ -1,343 +0,0 @@
<template>
<view>
<view class="upload">
<block v-for="(upload,index) in uploads" :key="index">
<view class="uplode-file">
<image v-if="types == 'image'" class="uploade-img" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" :src="upload" :data-src="upload" @tap="previewImage"></image>
<image v-if="types == 'image'" class="clear-one-icon" :src="clearIcon" @tap="delImage(index)"></image>
<video v-if="types == 'video'" class="uploade-img" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" :src="upload" controls>
<cover-image v-if="types == 'video'" class="clear-one-icon" :src="clearIcon" @tap="delImage(index)"></cover-image>
</video>
</view>
</block>
<view v-if="uploads.length < uploadCount" :class="uploadIcon ? 'uploader-icon' : 'uploader-input-box'" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" >
<view v-if="!uploadIcon" class="uploader-input" @tap="chooseUploads"></view>
<image v-else class="image-cion" :src="uploadIcon" @tap="chooseUploads"></image>
</view>
</view>
<!-- <button type="primary" v-if="types == 'image' && !autoUpload" @tap="unifiedUpload">上传</button> -->
</view>
</template>
<script>
export default{
props: {
header:{
type:Object,
default:{}
},
types: {
type: String,
default: 'image'
},
dataList: {
type: Array,
default: function() {
return []
}
},
clearIcon: {
type: String,
default: 'http://img1.imgtn.bdimg.com/it/u=451604666,2295832001&fm=26&gp=0.jpg'
},
uploadIcon: {
type: String,
default: ''
},
uploadUrl: {
type: String,
default: ''
},
deleteUrl: {
type: String,
default: ''
},
uploadCount: {
type: Number,
default: 1
},
//上传图片大小 默认3M
upload_max: {
type: Number,
default: 3
},
//上传视频大小 默认30M
upload_video_max: {
type: Number,
default: 50
},
// 图片/选择宽高
upload_img_wh: {
type: Number,
default: 210
},
autoUpload: {
type: Boolean,
default: false
}
},
data(){
return {
//上传的图片地址
uploadImages: [],
//展示的图片地址
uploads: [],
// 超出限制数组
exceeded_list: [],
}
},
watch:{
dataList:{
handler(val){
this.uploads = val;
},
immediate: true
}
},
methods:{
previewImage (e) {
var current = e.target.dataset.src
uni.previewImage({
current: current,
urls: this.dataList
})
},
chooseUploads(){
switch (this.types){
case 'image':
uni.chooseImage({
count: this.uploadCount - this.uploads.length, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], //从相册选择
success: (res) => {
for(let i = 0; i< res.tempFiles.length; i++){
if(Math.ceil(res.tempFiles[i].size / 1024) < this.upload_max * 1024){
this.uploads.push(res.tempFiles[i].path)
console.log(this.uploads);
if(this.autoUpload){
this.uploadFile(res.tempFiles[i].path)
}else{
this.uploadImages.push(res.tempFiles[i].path);
}
}else {
this.exceeded_list.push(i === 0 ? 1 : i + 1);
uni.showModal({
title: '提示',
content: `${[...new Set(this.exceeded_list)].join(',')}张图片超出限制${this.upload_max}MB,已过滤`
});
}
}
},
fail: (err) => {
uni.showModal({
content: JSON.stringify(err)
});
}
});
break;
case 'video' :
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: (res) => {
if(Math.ceil(res.size / 1024) < this.upload_video_max * 1024){
this.uploads.push(res.tempFilePath)
uni.uploadFile({
url: this.uploadUrl, //仅为示例,非真实的接口地址
filePath: res.tempFilePath,
name: 'file',
//请求参数
formData: {
'user': 'test'
},
success: (uploadFileRes) => {
this.$emit('successVideo',uploadFileRes)
}
});
}else {
uni.showModal({
title: '提示',
content: `${[...new Set(this.exceeded_list)].join(',')}张视频超出限制${this.upload_max}MB,已过滤`
});
}
},
fail: (err) => {
uni.showModal({
content: JSON.stringify(err)
});
}
});
break;
}
},
delImage(index){
this.uploads.splice(index,1)
//如果不自动上传
if(!this.autoUpload){
this.uploadImages.splice(index,1)
}
// //第一个是判断app或者h5的 第二个是判断小程序的
// if(this.uploads[index].substring(0,4) !== 'http' || this.uploads[index].substring(0,11) == 'http://tmp/'){
// this.uploads.splice(index,1)
// //如果不自动上传
// if(!this.autoUpload){
// this.uploadImages.splice(index,1)
// }
// return;
// };
// if(!this.deleteUrl) {
// uni.showModal({
// content: '请填写删除接口'
// });
// return;
// };
// uni.request({
// url: this.deleteUrl,
// method: 'DELETE',
// data: {
// image: this.dataList[index]
// },
// success: res => {
// if(res.data.status == 1) {
// uni.showToast({
// title: '删除成功'
// })
// this.uploads.splice(index,1)
// }
// },
// });
},
uploadFile(path){
// uni.uploadFile({
// url: this.uploadUrl, //仅为示例,非真实的接口地址
// filePath: path,
// name: 'file',
// //自定义请求参数
// formData: {
// 'user': 'test'
// },
// success: (uploadFileRes) => {
// this.$emit('successImage',uploadFileRes)
// }
// });
uni.uploadFile({
url: this.uploadUrl,
filePath: path,
header: this.header,
name: "file",
success: res => {
console.log(res);
this.$emit('successImage',uploadFileRes)
},
fail: err => {
console.log(err);
},
complete: res => {
}
});
},
unifiedUpload(){
if(!this.uploadUrl) {
uni.showModal({
content: '请填写上传接口'
});
return;
};
for (let i of this.uploadImages) {
this.uploadFile(i)
}
}
}
}
</script>
<style scoped>
.upload {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.uplode-file {
margin: 10rpx;
/* width: 210upx;
height: 210upx; */
position: relative;
}
.uploade-img {
display: block;
/* width: 210upx;
height: 210upx; */
}
.clear-one{
position: absolute;
top: -10rpx;
right: 0;
}
.clear-one-icon{
position: absolute;
width: 20px;
height: 20px;
top: 0;
right: 0;
z-index: 9;
}
.uploader-input-box {
position: relative;
margin:10upx;
/* width: 208upx;
height: 208upx; */
border: 2upx solid #D9D9D9;
box-sizing: border-box;
}
.uploader-input-box:before,
.uploader-input-box:after {
content: " ";
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #D9D9D9;
}
.uploader-input-box:before {
width: 4upx;
height: 79upx;
}
.uploader-input-box:after {
width: 79upx;
height: 4upx;
}
.uploader-input-box:active {
border-color: #999999;
}
.uploader-input-box:active:before,
.uploader-input-box:active:after {
background-color: #999999;
}
.uploader-input {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
.uploader-icon{
position: relative;
margin:10upx;
/* width: 208upx;
height: 208upx; */
}
.uploader-icon .image-cion{
width: 100%;
height: 100%;
}
</style>
-51
View File
@@ -1,51 +0,0 @@
### easy-upload 组件
使用方法
```js
<easy-upload
:dataList="dataList"
uploadUrl="http://localhost:3000/upload"
deleteUrl='http://localhost:3000/upload'
:types="types"
@successImage="successImage"
@successVideo="successvideo"
/>
//使用 hbuilderX (easycom) 可以直接使用 或
import easyUpload from '@/components/easy-upload/easy-upload.vue'
export default {
//用easycom 则省略注册组件
components:{
easyUpload
},
data() {
return {
dataList: [],
types: 'image'
}
}
}
```
| 参数 | 类型 | 是否必填 | 参数描述
| ---- | ---- | ---- | ----
| types | String | 否 | 上传类型 image/video
| autoUpload | Boolean | 否 | 自动上传 默认false
| dataList | Array | 否 | 图片/视频数据展示
| clearIcon | String | 否 | 删除图标(可以换成自己的图片)
| uploadIcon | String | 否 | 上传图标(可以换成自己的图片)
| uploadUrl | String | 否 | 上传的接口
| deleteUrl | String | 否 | 删除的接口
| uploadCount | Number | 否 | 上传图片最大个数(默认为一张)
| upload_max | Number | 否 | 上传大小(默认为3M)
| upload_max | Number | 否 | 上传大小(默认为3M)
| upload_max | Number | 否 | 上传大小(默认为3M)
| 事件 | 是否必填 | 参数描述
| ---- | ---- | ----
| successImage | 否 | 上传图片成功事件
| successVideo | 否 | 上传视频成功回调
示例项目中有简单的服务端代码 /server (node.js)
如果本地测试可以先运行一下服务端的代码
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,143 +0,0 @@
/* eslint-disable */
var provinceData = [{
"label": "北京市",
"value": "11"
},
{
"label": "天津市",
"value": "12"
},
{
"label": "河北省",
"value": "13"
},
{
"label": "山西省",
"value": "14"
},
{
"label": "内蒙古自治区",
"value": "15"
},
{
"label": "辽宁省",
"value": "21"
},
{
"label": "吉林省",
"value": "22"
},
{
"label": "黑龙江省",
"value": "23"
},
{
"label": "上海市",
"value": "31"
},
{
"label": "江苏省",
"value": "32"
},
{
"label": "浙江省",
"value": "33"
},
{
"label": "安徽省",
"value": "34"
},
{
"label": "福建省",
"value": "35"
},
{
"label": "江西省",
"value": "36"
},
{
"label": "山东省",
"value": "37"
},
{
"label": "河南省",
"value": "41"
},
{
"label": "湖北省",
"value": "42"
},
{
"label": "湖南省",
"value": "43"
},
{
"label": "广东省",
"value": "44"
},
{
"label": "广西壮族自治区",
"value": "45"
},
{
"label": "海南省",
"value": "46"
},
{
"label": "重庆市",
"value": "50"
},
{
"label": "四川省",
"value": "51"
},
{
"label": "贵州省",
"value": "52"
},
{
"label": "云南省",
"value": "53"
},
{
"label": "西藏自治区",
"value": "54"
},
{
"label": "陕西省",
"value": "61"
},
{
"label": "甘肃省",
"value": "62"
},
{
"label": "青海省",
"value": "63"
},
{
"label": "宁夏回族自治区",
"value": "64"
},
{
"label": "新疆维吾尔自治区",
"value": "65"
},
{
"label": "台湾",
"value": "66"
},
{
"label": "香港",
"value": "67"
},
{
"label": "澳门",
"value": "68"
},
{
"label": "钓鱼岛",
"value": "69"
}
]
export default provinceData;
@@ -1,381 +0,0 @@
<template>
<view class="simple-address" v-if="showPopup" @touchmove.stop.prevent="clear">
<!-- 遮罩层 -->
<view
class="simple-address-mask"
@touchmove.stop.prevent="clear"
v-if="maskClick"
:class="[ani + '-mask', animation ? 'mask-ani' : '']"
:style="{
'background-color': maskBgColor
}"
@tap="hideMask(true)"
></view>
<view class="simple-address-content simple-address--fixed" :class="[type, ani + '-content', animation ? 'content-ani' : '']">
<view class="simple-address__header">
<view class="simple-address__header-btn-box" @click="pickerCancel"><text class="simple-address__header-text">取消</text></view>
<view class="simple-address__header-btn-box" @click="pickerConfirm"><text class="simple-address__header-text" :style="{ color: themeColor }">确定</text></view>
</view>
<view class="simple-address__box">
<picker-view indicator-style="height: 70rpx;" class="simple-address-view" :value="pickerValue" @change="pickerChange">
<picker-view-column>
<!-- #ifndef APP-NVUE -->
<view class="picker-item" v-for="(item, index) in provinceDataList" :key="index">{{ item.label }}</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<text class="picker-item" v-for="(item, index) in provinceDataList" :key="index">{{ item.label }}</text>
<!-- #endif -->
</picker-view-column>
<picker-view-column>
<!-- #ifndef APP-NVUE -->
<view class="picker-item" v-for="(item, index) in cityDataList" :key="index">{{ item.label }}</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<text class="picker-item" v-for="(item, index) in cityDataList" :key="index">{{ item.label }}</text>
<!-- #endif -->
</picker-view-column>
<picker-view-column>
<!-- #ifndef APP-NVUE -->
<view class="picker-item" v-for="(item, index) in areaDataList" :key="index">{{ item.label }}</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<text class="picker-item" v-for="(item, index) in areaDataList" :key="index">{{ item.label }}</text>
<!-- #endif -->
</picker-view-column>
</picker-view>
</view>
</view>
</view>
</template>
<script>
import provinceData from './city-data/province.js';
import cityData from './city-data/city.js';
import areaData from './city-data/area.js';
export default {
name: 'simpleAddress',
props: {
mode: {
// 地址类型
// default 则代表老版本根据index索引获取数据
//
type: String,
default: 'default'
},
// 开启动画
animation: {
type: Boolean,
default: true
},
/* 弹出层类型,可选值;
bottom:底部弹出层
*/
type: {
type: String,
default: 'bottom'
},
// maskClick
maskClick: {
type: Boolean,
default: true
},
show: {
type: Boolean,
default: true
},
maskBgColor: {
type: String,
default: 'rgba(0, 0, 0, 0.4)' //背景颜色 rgba(0, 0, 0, 0.4) 为空则调用 uni.scss
},
themeColor: {
type: String,
default: '' // 主题色
},
/* 默认值 */
pickerValueDefault: {
type: Array,
default() {
return [0, 0, 0];
}
}
},
data() {
return {
ani: '',
showPopup: false,
pickerValue: [0, 0, 0],
provinceDataList: [],
cityDataList: [],
areaDataList: []
};
},
watch: {
show(newValue) {
if (newValue) {
this.open();
} else {
this.close();
}
},
pickerValueDefault() {
this.init();
}
},
created() {
this.init();
},
methods: {
init() {
this.handPickValueDefault(); // 对 pickerValueDefault 做兼容处理
this.provinceDataList = provinceData;
this.cityDataList = cityData[this.pickerValueDefault[0]];
this.areaDataList = areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]];
this.pickerValue = this.pickerValueDefault;
},
handPickValueDefault() {
if (this.pickerValueDefault !== [0, 0, 0]) {
if (this.pickerValueDefault[0] > provinceData.length - 1) {
this.pickerValueDefault[0] = provinceData.length - 1;
}
if (this.pickerValueDefault[1] > cityData[this.pickerValueDefault[0]].length - 1) {
this.pickerValueDefault[1] = cityData[this.pickerValueDefault[0]].length - 1;
}
if (this.pickerValueDefault[2] > areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length - 1) {
this.pickerValueDefault[2] = areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length - 1;
}
}
},
pickerChange(e) {
let changePickerValue = e.detail.value;
if (this.pickerValue[0] !== changePickerValue[0]) {
// 第一级发生滚动
this.cityDataList = cityData[changePickerValue[0]];
this.areaDataList = areaData[changePickerValue[0]][0];
changePickerValue[1] = 0;
changePickerValue[2] = 0;
} else if (this.pickerValue[1] !== changePickerValue[1]) {
// 第二级滚动
this.areaDataList = areaData[changePickerValue[0]][changePickerValue[1]];
changePickerValue[2] = 0;
}
this.pickerValue = changePickerValue;
this._$emit('onChange');
},
_$emit(emitName) {
let pickObj = {
label: this._getLabel(),
value: this.pickerValue,
cityCode: this._getCityCode(),
areaCode: this._getAreaCode(),
provinceCode: this._getProvinceCode(),
labelArr:this._getLabel().split('-')
};
console.log(this._getLabel().split('-'));
this.$emit(emitName, pickObj);
},
_getLabel() {
let pcikerLabel =
this.provinceDataList[this.pickerValue[0]].label + '-' + this.cityDataList[this.pickerValue[1]].label + '-' + this.areaDataList[this.pickerValue[2]].label;
return pcikerLabel;
},
_getCityCode() {
return this.cityDataList[this.pickerValue[1]].value;
},
_getProvinceCode() {
return this.provinceDataList[this.pickerValue[0]].value;
},
_getAreaCode() {
return this.areaDataList[this.pickerValue[2]].value;
},
queryIndex(params = [], type = 'value') {
// params = [ 11 ,1101,110101 ];
// 1.获取省份的index
let provinceIndex = provinceData.findIndex(res => res[type] == params[0]);
let cityIndex = cityData[provinceIndex].findIndex(res => res[type] == params[1]);
let areaIndex = areaData[provinceIndex][cityIndex].findIndex(res => res[type] == params[2]);
return {
index: [provinceIndex, cityIndex, areaIndex],
data: {
province: provinceData[provinceIndex],
city: cityData[provinceIndex][cityIndex],
area: areaData[cityIndex][0][areaIndex]
}
};
},
clear() {},
hideMask() {
this._$emit('onCancel');
this.close();
},
pickerCancel() {
this._$emit('onCancel');
this.close();
},
pickerConfirm() {
this._$emit('onConfirm');
this.close();
},
open() {
this.showPopup = true;
this.$nextTick(() => {
setTimeout(() => {
this.ani = 'simple-' + this.type;
}, 100);
});
},
close(type) {
if (!this.maskClick && type) return;
this.ani = '';
this.$nextTick(() => {
setTimeout(() => {
this.showPopup = false;
}, 300);
});
}
}
};
</script>
<style lang="scss" scoped>
.simple-address {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
}
.simple-address-mask {
position: fixed;
bottom: 0;
top: 0;
left: 0;
right: 0;
transition-property: opacity;
transition-duration: 0.3s;
opacity: 0;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.mask-ani {
transition-property: opacity;
transition-duration: 0.2s;
}
.simple-bottom-mask {
opacity: 1;
}
.simple-center-mask {
opacity: 1;
}
.simple-address--fixed {
position: fixed;
bottom: 0;
left: 0;
right: 0;
transition-property: transform;
transition-duration: 0.3s;
transform: translateY(460rpx);
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.simple-address-content {
background-color: #ffffff;
}
.simple-content-bottom {
bottom: 0;
left: 0;
right: 0;
transform: translateY(500rpx);
}
.content-ani {
transition-property: transform, opacity;
transition-duration: 0.2s;
}
.simple-bottom-content {
transform: translateY(0);
}
.simple-center-content {
transform: scale(1);
opacity: 1;
}
.simple-address__header {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
border-bottom-color: #f2f2f2;
border-bottom-style: solid;
border-bottom-width: 1rpx;
}
.simple-address--fixed-top {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-between;
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 1rpx;
}
.simple-address__header-btn-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 70rpx;
}
.simple-address__header-text {
text-align: center;
font-size: $uni-font-size-base;
color: #1aad19;
line-height: 70rpx;
padding-left: 40rpx;
padding-right: 40rpx;
}
.simple-address__box {
position: relative;
}
.simple-address-view {
position: relative;
bottom: 0;
left: 0;
/* #ifndef APP-NVUE */
width: 100%;
/* #endif */
/* #ifdef APP-NVUE */
width: 750rpx;
/* #endif */
height: 408rpx;
background-color: rgba(255, 255, 255, 1);
}
.picker-item {
text-align: center;
line-height: 70rpx;
text-overflow: ellipsis;
font-size: 28rpx;
}
</style>
@@ -1,134 +0,0 @@
<template>
<view :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]" :style="{ borderColor: styleType === 'text' ? '' : activeColor }"
class="segmented-control">
<view v-for="(item, index) in values" :class="[ styleType === 'text'?'segmented-control__item--text': 'segmented-control__item--button' , index === currentIndex&&styleType === 'button'?'segmented-control__item--button--active': '' , index === 0&&styleType === 'button'?'segmented-control__item--button--first': '',index === values.length - 1&&styleType === 'button'?'segmented-control__item--button--last': '' ]"
:key="index" :style="{
backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : '',borderColor: index === currentIndex&&styleType === 'text'||styleType === 'button'?activeColor:'transparent'
}"
class="segmented-control__item" @click="_onClick(index)">
<text :style="{color:
index === currentIndex
? styleType === 'text'
? activeColor
: '#fff'
: styleType === 'text'
? '#000'
: activeColor}"
class="segmented-control__text">{{ item }}</text>
</view>
</view>
</template>
<script>
/**
* SegmentedControl 分段器
* @description 用作不同视图的显示
* @tutorial https://ext.dcloud.net.cn/plugin?id=54
* @property {Number} current 当前选中的tab索引值,从0计数
* @property {String} styleType = [button|text] 分段器样式类型
* @value button 按钮类型
* @value text 文字类型
* @property {String} activeColor 选中的标签背景色与边框颜色
* @property {Array} values 选项数组
* @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
*/
export default {
name: 'UniSegmentedControl',
props: {
current: {
type: Number,
default: 0
},
values: {
type: Array,
default () {
return []
}
},
activeColor: {
type: String,
default: '#007aff'
},
styleType: {
type: String,
default: 'button'
}
},
data() {
return {
currentIndex: 0
}
},
watch: {
current(val) {
if (val !== this.currentIndex) {
this.currentIndex = val
}
}
},
created() {
this.currentIndex = this.current
},
methods: {
_onClick(index) {
if (this.currentIndex !== index) {
this.currentIndex = index
this.$emit('clickItem', {
currentIndex: index
})
}
}
}
}
</script>
<style lang="scss" scoped>
.segmented-control {
/* #ifndef APP-NVUE */
display: flex;
box-sizing: border-box;
/* #endif */
flex-direction: row;
height: 50rpx;
overflow: hidden;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.segmented-control__item {
/* #ifndef APP-NVUE */
display: inline-flex;
box-sizing: border-box;
/* #endif */
position: relative;
flex: 1;
justify-content: center;
align-items: center;
padding: 10rpx;
}
.segmented-control__item--button {
border-style: solid;
border-top-width: 1px;
border-bottom-width: 1px;
border-right-width: 1px;
border-left-width: 0;
}
.segmented-control__item--button--first {
border-left-width: 1px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.segmented-control__item--button--last {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.segmented-control__item--text {
border-bottom-style: solid;
border-bottom-width: 3px;
}
.segmented-control__text {
font-size: 28rpx;
line-height: 28rpx;
text-align: center;
}
</style>
+8 -1
View File
@@ -12,7 +12,14 @@ const settings = {
/* 系统接口前缀,没有统一的填空字符串 */ /* 系统接口前缀,没有统一的填空字符串 */
sysPrefix: '/', sysPrefix: '/',
/* 是否收集错误日志 */ /* 是否收集错误日志 */
collectRequestError: false collectRequestError: false,
/* 订阅消息模板ID */
SubscribeMessageTmplIds: [
'7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE',
'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU',
'9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU',
'v0GegDmzjpqiinmdj7dOwRK1MaTAPVyCOpqn8hJ3Y3Q'
]
} }
export default settings export default settings
+8
View File
@@ -10,6 +10,14 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') {
enableDebug: false enableDebug: false
}) })
} }
if (NODE_ENV === 'fix') {
BASE_URL = 'https://shop-pre.xdd618.com/api'
SERVICE_URL = 'https://service-pre.xdd618.com/api'
SERVICE_WS_URL = 'wss://service-pre.xdd618.com/ws'
wx.setEnableDebug({
enableDebug: false
})
}
if (NODE_ENV === 'prod') { if (NODE_ENV === 'prod') {
BASE_URL = 'https://wxapp.xdd618.com/api' BASE_URL = 'https://wxapp.xdd618.com/api'
SERVICE_URL = 'https://service.xdd618.com/api' SERVICE_URL = 'https://service.xdd618.com/api'
+2 -2
View File
@@ -1,4 +1,4 @@
import { subscribeMessage } from '@/libs/order' // import { subscribeMessage } from '@/libs/order'
import { getProvider } from '@/utils' import { getProvider } from '@/utils'
import WechatJSSDK from 'wechat-jssdk/dist/client.umd' import WechatJSSDK from 'wechat-jssdk/dist/client.umd'
import { getWechatConfig, wechatAuth } from '@/api/public' import { getWechatConfig, wechatAuth } from '@/api/public'
@@ -65,7 +65,7 @@ export const weappPay = option => {
resolve(success) resolve(success)
}, 3000) }, 3000)
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
subscribeMessage() // subscribeMessage()
// #endif // #endif
}, },
fail: error => { fail: error => {
@@ -0,0 +1,72 @@
import { getDrawTicketByOrder } from '@/api/lottery'
export const orderPaySuccessToCheckDrawStatus = {
data(){
return {
drawTicketPopup: {
show: false,
ticketCode: '',
drawTime: ''
}
}
},
methods: {
setDrawTicketPopupFromQuery(ticketData = '') {
const drawTicketData = ticketData || this.$yroute.query.drawTicketData
if (!drawTicketData) {
return
}
let result = {}
try {
result = typeof drawTicketData === 'string' ? JSON.parse(decodeURIComponent(drawTicketData)) : drawTicketData
console.log(result)
} catch (e) {
result = {}
}
const hasTicket = Number(result.hasTicket || 0) === 1
const howPopup = Number(result.showPopup || 0) === 1
if (!hasTicket || !howPopup) {
return
}
this.drawTicketPopup = {
show: true,
ticketCode: result.ticketCode || result.code || '',
drawTime: result.drawTime || ''
}
},
closeDrawTicketPopup() {
this.drawTicketPopup.show = false
},
goHomeFromPopup() {
this.drawTicketPopup.show = false
uni.switchTab({
url: '/pages/home/index'
})
},
goTicketsFromPopup() {
this.drawTicketPopup.show = false
uni.navigateTo({
url: '/pkg-video/views/county-my-tickets'
})
},
buildOrderDetailQuery(orderId, drawTicketResult = {}) {
return {
id: orderId,
drawTicketData: encodeURIComponent(JSON.stringify(drawTicketResult || {}))
}
},
async afterPaySuccess(orderId, fallback) {
if (!orderId) {
fallback && fallback()
return
}
try {
const res = await getDrawTicketByOrder(orderId)
const result = (res && res.data) || {}
fallback && fallback(result)
return
} catch (e) {
}
fallback && fallback({})
}
}
}
+11
View File
@@ -133,6 +133,17 @@
"CUSTOM-CONST": true "CUSTOM-CONST": true
} }
}, },
"mp-weixin-fix": {
"title": "微信小程序(Fix环境)",
"env": {
"UNI_PLATFORM": "mp-weixin",
"VUE_APP_ENV": "fix",
"UNI_OUTPUT_DIR": "dist"
},
"define": {
"CUSTOM-CONST": true
}
},
"mp-weixin": { "mp-weixin": {
"title": "微信小程序(生产环境)", "title": "微信小程序(生产环境)",
"env": { "env": {
+245 -152
View File
@@ -76,12 +76,6 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/shop/StoreList/index",
"style": {
"navigationBarTitleText": "商家列表"
}
},
{ {
"path": "pages/shop/GoodsList/index", "path": "pages/shop/GoodsList/index",
"style": { "style": {
@@ -110,24 +104,6 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/shop/GoodsCollection/index",
"style": {
"navigationBarTitleText": "商品收藏"
}
},
{
"path": "pages/shop/EvaluateList/index",
"style": {
"navigationBarTitleText": "评价列表"
}
},
{
"path": "pages/shop/GoodsEvaluate/index",
"style": {
"navigationBarTitleText": "商品评价"
}
},
{ {
"path": "pages/shop/GoodsCon/index", "path": "pages/shop/GoodsCon/index",
"style": { "style": {
@@ -149,88 +125,18 @@
"navigationBarTitleText": "新增收货地址" "navigationBarTitleText": "新增收货地址"
} }
}, },
{
"path": "pages/user/UserAccount/index",
"style": {
"navigationBarTitleText": "账户余额"
}
},
{ {
"path": "pages/user/address/AddressManagement/index", "path": "pages/user/address/AddressManagement/index",
"style": { "style": {
"navigationBarTitleText": "收货地址" "navigationBarTitleText": "收货地址"
} }
}, },
{
"path": "pages/user/promotion/CashAudit/index",
"style": {
"navigationBarTitleText": "提现结果"
}
},
{
"path": "pages/user/promotion/PromoterOrder/index",
"style": {
"navigationBarTitleText": "分销详情"
}
},
{
"path": "pages/user/promotion/PromoterList/index",
"style": {
"navigationBarTitleText": "分销列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/promotion/UserPromotion/index",
"style": {
"navigationBarTitleText": "团队管理",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/History/index",
"style": {
"navigationBarTitleText": "商品足迹",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/UserBill/index",
"style": {
"navigationBarTitleText": "账单记录"
}
},
{
"path": "pages/user/promotion/CommissionDetails/index",
"style": {
"navigationBarTitleText": "佣金明细"
}
},
{ {
"path": "pages/user/signIn/Integral/index", "path": "pages/user/signIn/Integral/index",
"style": { "style": {
"navigationBarTitleText": "我的积分" "navigationBarTitleText": "我的积分"
} }
}, },
{
"path": "pages/user/promotion/UserCash/index",
"style": {
"navigationBarTitleText": "提现"
}
},
{
"path": "pages/user/CustomerList/index",
"style": {
"navigationBarTitleText": "客服列表"
}
},
{
"path": "pages/user/Recharge/index",
"style": {
"navigationBarTitleText": "充值"
}
},
{ {
"path": "pages/order/MyOrder/index", "path": "pages/order/MyOrder/index",
"style": { "style": {
@@ -239,18 +145,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/order/Logistics/index",
"style": {
"navigationBarTitleText": "查看物流"
}
},
{
"path": "pages/order/OrderDetails/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{ {
"path": "pages/order/OrderSubmission/index", "path": "pages/order/OrderSubmission/index",
"style": { "style": {
@@ -258,48 +152,16 @@
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
} }
}, },
{
"path": "pages/order/PaymentStatus/index",
"style": {
"navigationBarTitleText": "支付状态"
}
},
{
"path": "pages/order/GoodsReturn/index",
"style": {
"navigationBarTitleText": "申请退款"
}
},
{
"path": "pages/order/ReturnList/index",
"style": {
"navigationBarTitleText": "退货列表"
}
},
{ {
"path": "pages/map/index", "path": "pages/map/index",
"style": { "style": {
"navigationBarTitleText": "地图" "navigationBarTitleText": "地图"
} }
}, },
{
"path": "pages/user/Message/Message",
"style": {
"navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/MessageDetail/MessageDetail",
"style": {
"navigationBarTitleText": "消息详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{ {
"path": "pages/VideoPlayBackList/VideoPlayBackList", "path": "pages/VideoPlayBackList/VideoPlayBackList",
"style": { "style": {
"navigationBarTitleText": "寻看点", "navigationBarTitleText": "使用指南",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
}, },
@@ -309,18 +171,6 @@
"navigationBarTitleText": "视频详情", "navigationBarTitleText": "视频详情",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},
{
"path": "pages/user/UserFavorite/UserFavorite",
"style": {
"navigationBarTitleText": "我的喜欢"
}
},
{
"path": "pages/user/Points/index",
"style": {
"navigationBarTitleText": "积分"
}
} }
], ],
"subPackages": [ "subPackages": [
@@ -401,11 +251,47 @@
"navigationBarTitleText": "抽奖" "navigationBarTitleText": "抽奖"
} }
}, },
{
"path": "views/county-lottery",
"style": {
"navigationBarTitleText": "抽奖"
}
},
{ {
"path": "views/lottery-log", "path": "views/lottery-log",
"style": { "style": {
"navigationBarTitleText": "抽奖记录" "navigationBarTitleText": "抽奖记录"
} }
},
{
"path": "views/county-lottery-rules",
"style": {
"navigationBarTitleText": "活动规则"
}
},
{
"path": "views/county-my-tickets",
"style": {
"navigationBarTitleText": "我的抽奖码"
}
},
{
"path": "views/county-winners",
"style": {
"navigationBarTitleText": "中奖名单"
}
},
{
"path": "views/county-claim-address",
"style": {
"navigationBarTitleText": "填写收货地址"
}
},
{
"path": "views/county-realname",
"style": {
"navigationBarTitleText": "实名认证"
}
} }
] ]
}, },
@@ -604,7 +490,7 @@
{ {
"path": "views/giftList", "path": "views/giftList",
"style": { "style": {
"navigationBarTitleText": "特色礼品" "navigationBarTitleText": "全国礼品"
} }
}, },
{ {
@@ -1008,6 +894,213 @@
} }
} }
] ]
},
{
"root": "pagesOrder",
"pages": [
{
"path": "order/GoodsReturn/index",
"style": {
"navigationBarTitleText": "申请退款"
}
},
{
"path": "order/Logistics/index",
"style": {
"navigationBarTitleText": "查看物流"
}
},
{
"path": "order/OrderDetails/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "order/ReturnList/index",
"style": {
"navigationBarTitleText": "退货列表"
}
}
]
},
{
"root": "pagesShop",
"pages": [
{
"path": "shop/EvaluateList/index",
"style": {
"navigationBarTitleText": "评价列表"
}
},
{
"path": "shop/GoodsCollection/index",
"style": {
"navigationBarTitleText": "商品收藏"
}
},
{
"path": "shop/GoodsEvaluate/index",
"style": {
"navigationBarTitleText": "商品评价"
}
},
{
"path": "shop/GoodsPromotion/index",
"style": {
"navigationBarTitleText": "商品促销"
}
},
{
"path": "shop/StoreList/index",
"style": {
"navigationBarTitleText": "商家列表"
}
}
]
},
{
"root": "pagesUser",
"pages": [
{
"path": "user/CustomerList/index",
"style": {
"navigationBarTitleText": "客服列表"
}
},
{
"path": "user/History/index",
"style": {
"navigationBarTitleText": "商品足迹",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": false
}
},
{
"path": "user/MemberUpgradeIntro/MemberUpgradeIntro",
"style": {
"navigationBarTitleText": "升级介绍"
}
},
{
"path": "user/Message/Message",
"style": {
"navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "user/MessageDetail/MessageDetail",
"style": {
"navigationBarTitleText": "消息详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "user/ModifyPayPassword/ModifyPayPassword",
"style": {
"navigationBarTitleText": "评价列表"
}
},
{
"path": "user/Points/index",
"style": {
"navigationBarTitleText": "积分"
}
},
{
"path": "user/Recharge/index",
"style": {
"navigationBarTitleText": "充值"
}
},
{
"path": "user/RetrievePassword/index",
"style": {
"navigationBarTitleText": "找回密码"
}
},
{
"path": "user/UpgradeElectronicProtocol/UpgradeElectronicProtocol",
"style": {
"navigationBarTitleText": "升级电子协议"
}
},
{
"path": "user/UpgradeProtocolDetail/UpgradeProtocolDetail",
"style": {
"navigationBarTitleText": "升级电子协议详情"
}
},
{
"path": "user/UserAccount/index",
"style": {
"navigationBarTitleText": "账户余额"
}
},
{
"path": "user/UserBill/index",
"style": {
"navigationBarTitleText": "账单记录"
}
},
{
"path": "user/UserFavorite/UserFavorite",
"style": {
"navigationBarTitleText": "我的喜欢"
}
},
{
"path": "user/UserVip/index",
"style": {
"navigationBarTitleText": "用户等级"
}
},
{
"path": "user/promotion/CashAudit/index",
"style": {
"navigationBarTitleText": "提现审核"
}
},
{
"path": "user/promotion/CommissionDetails/index",
"style": {
"navigationBarTitleText": "提现审核"
}
},
{
"path": "user/promotion/Poster/index",
"style": {
"navigationBarTitleText": "海报生成"
}
},
{
"path": "user/promotion/PromoterList/index",
"style": {
"navigationBarTitleText": "分销列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "user/promotion/PromoterOrder/index",
"style": {
"navigationBarTitleText": "分销详情"
}
},
{
"path": "user/promotion/UserCash/index",
"style": {
"navigationBarTitleText": "提现"
}
},
{
"path": "user/promotion/UserPromotion/index",
"style": {
"navigationBarTitleText": "团队管理",
"navigationBarBackgroundColor": "#FFFFFF"
}
}
]
} }
], ],
"preloadRule": { "preloadRule": {
@@ -1,6 +1,16 @@
<template> <template>
<view class=""> <view class="">
<video class="video" :show-fullscreen-btn="false" id="myVideo" autoplay :src="curPlayVideoUrl" @error="videoErrorCallback" controls></video> <video
class="video"
:show-fullscreen-btn="false"
:direction="videoDirection"
id="myVideo"
autoplay
:src="curPlayVideoUrl"
@loadedmetadata="handleLoadedMetadata"
@error="videoErrorCallback"
controls
></video>
</view> </view>
</template> </template>
<script> <script>
@@ -15,12 +25,14 @@ export default {
return { return {
curPlayVideoUrl:'', curPlayVideoUrl:'',
isVideoPopupShow:false, isVideoPopupShow:false,
pageKeyId: '' pageKeyId: '',
videoDirection: 90,
hasLoadedMetadata: false,
hasRequestedFullscreen: false
} }
}, },
onReady(res) { onReady(res) {
this.videoContext = uni.createVideoContext('myVideo'); this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen();
}, },
onLoad(options) { onLoad(options) {
if (!options.click) { if (!options.click) {
@@ -32,6 +44,29 @@ export default {
this.pageKeyId = `findVideo_videoId_${id}` this.pageKeyId = `findVideo_videoId_${id}`
}, },
methods: { methods: {
handleLoadedMetadata(e) {
const detail = e.detail || {}
const width = Number(detail.width) || 0
const height = Number(detail.height) || 0
if (height > width && width > 0) {
this.videoDirection = 0
} else {
this.videoDirection = 90
}
this.hasLoadedMetadata = true
this.enterFullScreen()
},
enterFullScreen() {
if (!this.videoContext || !this.hasLoadedMetadata || this.hasRequestedFullscreen) {
return
}
this.hasRequestedFullscreen = true
this.videoContext.requestFullScreen({
direction: this.videoDirection
})
},
videoErrorCallback: function(e) { videoErrorCallback: function(e) {
uni.showModal({ uni.showModal({
content: e.target.errMsg, content: e.target.errMsg,
+29 -13
View File
@@ -7,21 +7,23 @@
</view> </view>
<view class="list" v-if="list.length"> <view class="list" v-if="list.length">
<custom-waterfalls-flow :value="list" imageKey="cover"> <view class="video-waterfalls-wrap">
<view class="item" v-for="(item,index) in list" :key="index" slot="slot{{index}}" @click="goDetail(item)"> <custom-waterfalls-flow :value="list" imageKey="cover">
<image class="cover" :src="item.cover" mode="widthFix"></image> <view class="item" v-for="(item,index) in list" :key="index" slot="slot{{index}}" @click="goDetail(item)">
<view class="content"> <image class="cover" :src="item.cover" mode="widthFix"></image>
<view class="title more-t">{{ item.title }}</view> <view class="content">
<view class="footer flex jc-between ai-center"> <view class="title more-t">{{ item.title }}</view>
<view class="visit flex ai-center"> <view class="footer flex jc-between ai-center">
<image class="icon" style="margin-right: 8rpx" :src="item.storeLogo" mode="scaleToFill"></image> <view class="visit flex ai-center">
{{ item.storeName }} <image class="icon" style="margin-right: 8rpx" :src="item.storeLogo" mode="scaleToFill"></image>
{{ item.storeName }}
</view>
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
</view> </view>
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
</view> </view>
</view> </view>
</view> </custom-waterfalls-flow>
</custom-waterfalls-flow> </view>
</view> </view>
<view class="v4-nodata" v-else> <view class="v4-nodata" v-else>
@@ -114,6 +116,7 @@ export default {
border-radius: 20rpx; border-radius: 20rpx;
background: #fff; background: #fff;
font-size: 26rpx; font-size: 26rpx;
white-space: nowrap;
} }
.active { .active {
@@ -125,6 +128,19 @@ export default {
.list { .list {
margin: 28rpx 32rpx; margin: 28rpx 32rpx;
.video-waterfalls-wrap {
direction: ltr;
/deep/ .waterfalls-flow {
direction: ltr;
text-align: left;
}
/deep/ .waterfalls-flow-column {
float: left !important;
}
}
.item { .item {
border-radius: 4rpx; border-radius: 4rpx;
background: #fff; background: #fff;
@@ -174,4 +190,4 @@ export default {
} }
} }
} }
</style> </style>
+84 -19
View File
@@ -109,7 +109,7 @@
<view v-if="item.isNegotiable === 1" class="v12-primary-text v12-font-32 v12-font-weight" @clicks.stop="goRoom(item)"> <view v-if="item.isNegotiable === 1" class="v12-primary-text v12-font-32 v12-font-weight" @clicks.stop="goRoom(item)">
价格面议 价格面议
</view> </view>
<view class="btn"> <view class="btn" @click.stop="addToCart(item, 'productId')">
<image <image
:src="webUrl + '/home/icon-cart.png'" :src="webUrl + '/home/icon-cart.png'"
class="img-icon" class="img-icon"
@@ -309,14 +309,14 @@
:key="attr" :key="attr"
:class="{ :class="{
'on': attr.check, 'on': attr.check,
'disabled': getAttrItemData(attr.attr).stock === 0 'disabled': getAttrItemData1(attr.attr).stock === 0
}" }"
class="attr" class="attr"
@click="attrItemClick(attr, attrIndex, index)" @click="attrItemClick(attr, attrIndex, index)"
> >
{{ attr.attr }} {{ attr.attr }}
<text <text
v-if="getAttrItemData(attr.attr).stock === 0" v-if="getAttrItemData1(attr.attr).stock === 0"
class="tag" class="tag"
>缺货</text> >缺货</text>
</view> </view>
@@ -368,28 +368,41 @@
</view> </view>
</u-popup> </u-popup>
<ProductWindow
ref="attrWindow"
:attr="attr"
:cartNum="cart_num"
:showOk="true"
@changeFun="changeFun"
@ok="handleOk(() => this.getCart())"
/>
<xdd-tabbar :curr-index="2" /> <xdd-tabbar :curr-index="2" />
</view> </view>
</template> </template>
<script> <script>
import XddTabbar from '@/components/xdd-tabbar' import XddTabbar from '@/components/xdd-tabbar'
import ProductWindow from '@/components/ProductWindow'
import {getAddressList, getUserLike} from "@/api/user"; import {getAddressList, getUserLike} from "@/api/user";
import { import {
changeCartNum, changeCartNum,
getCartGroup, getCartGroup,
postCartDel, postCartDel,
postCartAdd,
getCartGoodAttr, getCartGoodAttr,
cartGoodChangeAttr cartGoodChangeAttr
} from '@/api/store' } from '@/api/store'
import CheckboxIcon from '@/components/CheckboxIcon.vue' import CheckboxIcon from '@/components/CheckboxIcon.vue'
import { pageListenMixins } from '@/mixins/pageListenMixins' import { pageListenMixins } from '@/mixins/pageListenMixins'
import goCartMixin from '@/mixins/goCartMixins'
import { mapGetters } from 'vuex'
import cookie from "@/utils/store/cookie" import cookie from "@/utils/store/cookie"
export default { export default {
components: { components: {
CheckboxIcon, CheckboxIcon,
XddTabbar XddTabbar,
ProductWindow
}, },
mixins: [pageListenMixins], mixins: [pageListenMixins, goCartMixin],
data() { data() {
return { return {
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
@@ -406,15 +419,18 @@ export default {
}, },
showAttr: false, showAttr: false,
pageKeyId: Object.freeze('landmarkGoodsIndex'), pageKeyId: Object.freeze('landmarkGoodsIndex'),
cartSelectedIdsCacheKey: Object.freeze('cartSelectedIds'),
isEdit: false, isEdit: false,
addressList:[], addressList:[],
addressInfo: {}, addressInfo: {},
userLikeList: [], userLikeList: [],
selectedCartIds: [],
// 是否已登录 // 是否已登录
isNoLogin: false isNoLogin: false
} }
}, },
computed: { computed: {
...mapGetters(['isLogin']),
total() { total() {
let price = 0 let price = 0
this.list.forEach(item => { this.list.forEach(item => {
@@ -435,6 +451,7 @@ export default {
} }
}, },
created() { created() {
this.selectedCartIds = this.getSelectedCartIds()
this.getCart() this.getCart()
this.getAddress() this.getAddress()
}, },
@@ -581,22 +598,75 @@ export default {
isInvalid: true isInvalid: true
} }
}) })
this.list = res.data['valid'].concat(invalid) this.list = this.restoreCartState(res.data['valid'].concat(invalid))
this.handleAll(false)
const _res = await getUserLike() const _res = await getUserLike()
this.userLikeList = _res.data this.userLikeList = _res.data
} }
}, },
handleAll(state) { getSelectedCartIds() {
this.isAll = state const ids = uni.getStorageSync(this.cartSelectedIdsCacheKey)
return Array.isArray(ids) ? ids : []
},
syncSelectedCartIds() {
const ids = []
this.list.forEach(item => {
item.carts.forEach(good => {
if (good.state) {
ids.push(good.id)
}
})
})
this.selectedCartIds = ids
uni.setStorageSync(this.cartSelectedIdsCacheKey, ids)
},
refreshSelectionState() {
let hasSelectableGoods = false
let isAll = true
this.list = this.list.map(item => { this.list = this.list.map(item => {
item.state = state const selectableCarts = item.carts.filter(() => !item.isInvalid || this.isEdit)
if (selectableCarts.length > 0) {
hasSelectableGoods = true
}
item.state = selectableCarts.length > 0 && selectableCarts.every(good => good.state)
if (selectableCarts.length > 0 && !item.state) {
isAll = false
}
return item
})
this.isAll = hasSelectableGoods && isAll
this.syncSelectedCartIds()
},
restoreCartState(list) {
const selectedCartIds = new Set(this.selectedCartIds)
const nextList = list.map(item => {
const canSelect = !item.isInvalid || this.isEdit
const carts = item.carts.map(good => {
return {
...good,
state: canSelect ? selectedCartIds.has(good.id) : false
}
})
return {
...item,
carts,
state: false
}
})
this.list = nextList
this.refreshSelectionState()
return this.list
},
handleAll(state) {
this.list = this.list.map(item => {
const canSelect = !item.isInvalid || this.isEdit
item.state = canSelect ? state : false
item.carts = item.carts.map(good => { item.carts = item.carts.map(good => {
good.state = item.isInvalid && !this.isEdit ? false : state good.state = canSelect ? state : false
return good return good
}) })
return item return item
}) })
this.refreshSelectionState()
}, },
navToStore(id) { navToStore(id) {
if (id === 0) { if (id === 0) {
@@ -615,6 +685,7 @@ export default {
if (mark.length === 1) { if (mark.length === 1) {
if (mark[0] === -1) { if (mark[0] === -1) {
this.handleAll(state) this.handleAll(state)
return
} else { } else {
this.list[mark[0]]['state'] = state this.list[mark[0]]['state'] = state
this.list[mark[0]]['carts'] = this.list[mark[0]]['carts'].map(good => { this.list[mark[0]]['carts'] = this.list[mark[0]]['carts'].map(good => {
@@ -634,13 +705,7 @@ export default {
}) })
this.list[mark[0]]['state'] = count === length this.list[mark[0]]['state'] = count === length
} }
let shopCheckNumber = 0 this.refreshSelectionState()
this.list.map(item => {
if (item.state) {
shopCheckNumber++
}
})
this.isAll = shopCheckNumber === this.list.length
}, },
inputChangeHandle(index, gIndex, good, e) { inputChangeHandle(index, gIndex, good, e) {
@@ -766,7 +831,7 @@ export default {
uni.hideLoading() uni.hideLoading()
}) })
}, },
getAttrItemData(attr) { getAttrItemData1(attr) {
let result = { let result = {
stock: 0 stock: 0
} }
+16 -13
View File
@@ -384,20 +384,23 @@ export default {
this.mescroll && this.mescroll.triggerDownScroll() this.mescroll && this.mescroll.triggerDownScroll()
}, },
search() { search() {
if(this.keyword === '') return const keyword = (this.keyword || '').trim()
this.listGroup.findIndex((group, index) => { if (!keyword) return
let result const matchIndex = this.listGroup.findIndex(group => {
group.city.forEach(item => { const cityList = Array.isArray(group.city) ? group.city : []
result = item.cityName.indexOf(this.keyword, 0) return cityList.some(item => item && item.cityName && item.cityName.indexOf(keyword) !== -1)
if (result !== -1) {
this.asideTap(index);
return null;
}
})
if (result !== -1) {
return result
}
}) })
if (matchIndex !== -1) {
this.keyword = keyword
this.asideTap(matchIndex)
return
}
if (matchIndex === -1) {
uni.showToast({
title: '未找到该城市,请重新输入城市名称',
icon: 'none'
})
}
}, },
select(item) { select(item) {
if (this.type === 0 && item.hasData === 0) return if (this.type === 0 && item.hasData === 0) return
+163 -790
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-454
View File
@@ -1,454 +0,0 @@
<template>
<view class="pkg-product-land-mark" v-if="mapData">
<view class="top-box" :style="{'backgroundColor':topBoxBgColor}">
<view class="view-box">
<view class="search-box flex ai-center">
<input
v-model="keyword"
type="text"
placeholder="搜索商品"
placeholder-style="color:#999"
@confirm="search()"
/>
<image
:src="webUrl+'/20231223183627184005.png'"
mode="scaleToFill"
style="width:30rpx;height:30rpx"
@click="search()"
/>
</view>
<view class="map-box">
<image class="img-map" :src="mapData.mapImage" mode="widthFix"/>
<view
v-for="(item, index) in mapLocations"
:key="index"
class="item"
:style="{'left':item.gx+'rpx','top':item.gy+'rpx'}"
@click="goGoods(item.productId)"
>
<view class="round">
<view class="line" :class="'line-'+directionClass[item.labelDirection]"></view>
</view>
<view class="label flex ai-end" :class="'label-'+directionClass[item.labelDirection]">
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection===4"/>
<view class="title flex ai-center">{{ item.mapTitle }}</view>
<image class="cover flex-0" :src="item.mapImage" mode="scaleToFill" v-if="item.labelDirection!==4"/>
</view>
</view>
</view>
</view>
<view class="nav flex">
<view class="flex flex-0 ai-center" :class="{'active': navIndex===index}" v-for="(item,index) in navList"
:key="index" @click="changeNav(index)">{{ item.provinceName }}
</view>
</view>
</view>
<view class="main-box" v-if="mapData.recommended.storeImage"
@click="goGoods(mapData.recommended.productId)">
<image class="bg-main" :src="mapData.recommended.storeImage" mode="scaleToFill"/>
<view class="box-mask flex flex-col jc-end">
<view class="one-t bold">{{ mapData.recommended.title }}</view>
<view class="more-t">{{ mapData.recommended.description }}</view>
</view>
</view>
<view class="list-box flex flex-wrap">
<view class="item" v-for="item in goods" :key="item.id" @click="goGoods(item.productId)">
<image :src="item.storeImage" mode="scaleToFill"/>
<view class="content flex flex-col jc-between">
<view class="more-t bold">{{ item.title }}</view>
<view class="flex jc-between ai-center">
<text class="price">{{ item.price }}</text>
<image class="btn" :src="webUrl+'/20231114151028082368.png'" mode="scaleToFill"/>
<!-- <view class="btn flex jc-center ai-center">立即购买</view>-->
</view>
</view>
</view>
</view>
<image class="img-nodata" :src="webUrl+'/20231023131208675588.png'" mode="scaleToFill"
v-if="goods.length===0"/>
</view>
</template>
<script>
import {getProvince, getProvinceGoods, getProvinceList} from "@/api/product";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: 'LandMarkPage',
mixins: [pageListenMixins],
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
keyword: '',
page: 1,
navList: [],
navIndex: 0,
mapData: null,
mapLocations: [],
goods: [],
directionClass: ['', 'up', 'right', 'down', 'left'],
pageKeyId: Object.freeze('landmarkGoodsIndex')
}
},
computed: {
topBoxBgColor() {
return this.navList.length > 0 ? this.navList[this.navIndex]['backgroundColor'] : '#FFFFFF';
},
viewBoxBgColor() {
return this.mapData?.backgroundColor || '#FFFFFF';
},
scale() {
return 718 / (this.mapData?.mapImageWidth || 1);
}
},
onLoad() {
this.getNavList();
},
onHide() {
this.pageToHideHandle()
},
onReachBottom() {
this.page++;
this.fetchGoods();
},
methods: {
getNavList() {
getProvinceList().then(({data}) => {
this.navList = data;
this.changeNav(this.navIndex);
});
},
search() {
this.page = 1;
this.fetchGoods();
},
changeNav(index) {
this.navIndex = index;
this.page = 1;
this.getMap();
this.fetchGoods();
},
getMap() {
const id = this.navList[this.navIndex]['id']
getProvince(id).then(({data}) => {
this.mapData = data;
this.mapLocations = data.mapLocations;
this.calcPosition();
});
},
// 计算位置
calcPosition() {
this.mapLocations?.forEach(item => {
item.gx = item.x * this.scale;
item.gy = item.y * this.scale;
})
},
fetchGoods() {
const id = this.navList[this.navIndex]['id']
getProvinceGoods(id, this.keyword, this.page).then(({data}) => {
if (this.page === 1) this.goods = [];
for (let i = 0; i < data.length; i++) {
this.goods.push(data[i]);
}
})
},
goGoods(id) {
uni.navigateTo({
url: `/pages/shop/GoodsCon/index?id=${id}&from=landmark`
})
}
}
}
</script>
<style scoped lang="less">
.pkg-product-land-mark {
background: #F7F3ED;
image {
vertical-align: middle;
}
.top-box {
padding: 32rpx 0 20rpx;
.view-box {
position: relative;
margin: 0 16rpx;
border-radius: 40rpx;
overflow: hidden;
.search-box {
position: absolute;
top: 20rpx;
left: 34rpx;
width: 650rpx;
height: 64rpx;
padding: 0 32rpx;
box-sizing: border-box;
border-radius: 32rpx;
background: #FFFFFF;
z-index: 10;
input {
width: 100%;
height: 100%;
line-height: 64rpx;
font-size: 28rpx;
}
}
.map-box {
position: relative;
width: 718rpx;
.img-map {
width: 718rpx;
height: auto;
}
.item {
position: absolute;
.round {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
box-shadow: 0 0 0 8rpx rgba(225, 38, 65, .4);;
background: #E12641;
}
.line {
position: relative;
border: 2rpx solid #E12641;
}
.line-up {
left: 50%;
transform: translate(-50%, -100%);
width: 0;
height: 30rpx;
}
.line-right {
top: 50%;
transform: translate(0, -50%);
width: 30rpx;
height: 0;
}
.line-down {
left: 50%;
transform: translate(-50%, 0);
width: 0;
height: 30rpx;
}
.line-left {
top: 50%;
transform: translate(-100%, -50%);
width: 30rpx;
height: 0;
}
.label {
position: relative;
.cover {
width: 60rpx;
height: 60rpx;
box-sizing: border-box;
border: 6rpx solid #E12641;
border-radius: 50%;
z-index: 20;
}
.title {
height: 32rpx;
box-sizing: border-box;
margin-bottom: 10rpx;
padding: 0 16rpx;
background: #E12641;
color: #FFFFFF;
font-size: 22rpx;
line-height: 32rpx;
white-space: nowrap;
z-index: 10;
}
}
.label-up {
top: -80rpx;
left: -50%;
.title {
margin-right: -9rpx;
border-radius: 20rpx 0 0 20rpx;
}
}
.label-right {
top: -40rpx;
left: 32rpx;
.title {
margin-right: -9rpx;
border-radius: 20rpx 0 0 20rpx;
}
}
.label-down {
left: -50%;
.title {
margin-right: -9rpx;
border-radius: 20rpx 0 0 20rpx;
}
}
.label-left {
left: -100%;
transform: translate(-30rpx, -40rpx);
.title {
margin-left: -9rpx;
border-radius: 0 20rpx 20rpx 0;
}
}
}
}
}
.nav {
padding: 30rpx 20rpx 0;
overflow-x: scroll;
view {
height: 52rpx;
box-sizing: border-box;
padding: 0 18rpx;
border: 4rpx solid transparent;
color: #FFFFFF;
font-size: 32rpx;
}
.active {
border-color: #FFFFFF;
border-radius: 26rpx;
}
}
}
.main-box {
position: relative;
width: 718rpx;
height: 360rpx;
margin: 24rpx 16rpx;
border-radius: 16rpx;
overflow: hidden;
.bg-main {
width: 718rpx;
height: 360rpx;
}
.box-mask {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 200rpx;
box-sizing: border-box;
padding: 20rpx 16rpx 16rpx;
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
color: #FFFFFF;
.one-t {
margin-bottom: 16rpx;
font-size: 46rpx;
line-height: 52rpx;
}
.more-t {
width: 100%;
box-sizing: border-box;
padding-top: 10rpx;
border-top: 1rpx solid #FFFFFF;
font-size: 28rpx;
line-height: 32rpx;
}
}
}
.list-box {
margin-top: 24rpx;
padding: 0 16rpx 34rpx;
.item {
width: 234rpx;
height: 380rpx;
margin-right: 8rpx;
margin-bottom: 24rpx;
border-radius: 12rpx;
background: #FFFFFF;
overflow: hidden;
image {
width: 234rpx;
height: 234rpx;
}
.content {
height: 122rpx;
margin: 6rpx 6rpx 18rpx;
.more-t {
font-size: 28rpx;
line-height: 36rpx;
color: #333333;
}
.price {
font-size: 28rpx;
line-height: 36rpx;
color: #DC1616;
}
.btn {
width: 118rpx;
height: 42rpx;
//background: linear-gradient(180deg, #EFEDC7 0%, #EAC94B 100%);
//border-radius: 4rpx;
//color: #764A00;
//font-size: 24rpx;
}
}
}
.item:nth-child(3n) {
margin-right: 0;
}
}
.img-nodata {
position: relative;
top: 0;
left: 50%;
transform: translate(-50%, 0);
width: 352rpx;
height: 338rpx;
margin-bottom: 60rpx;
}
}
</style>
+22 -4
View File
@@ -36,7 +36,7 @@
</view> </view>
</view> </view>
<view class="product-wrap v12-mt-3"> <view v-if="products.length > 0" class="product-wrap v12-mt-3">
<view class="product-card" v-for="(item, index) in products" :key="index" @click="toGoods(item)"> <view class="product-card" v-for="(item, index) in products" :key="index" @click="toGoods(item)">
<image :src="item.productImage" class="product-card-img" mode="heightFix|widthFix"></image> <image :src="item.productImage" class="product-card-img" mode="heightFix|widthFix"></image>
<view class="new-info"> <view class="new-info">
@@ -53,6 +53,9 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else class="empty-wrap">
<view class="empty-text">暂无数据</view>
</view>
<ProductWindow <ProductWindow
ref="attrWindow" ref="attrWindow"
:attr="attr" :attr="attr"
@@ -99,8 +102,12 @@ export default{
onLoad() { onLoad() {
queryNewZone().then(res => { queryNewZone().then(res => {
this.details = res.data this.details = res.data
this.tabs = res.data.categories this.tabs = Array.isArray(res.data.categories) ? res.data.categories : []
this.handleClick(0, this.tabs[0]) if (this.tabs.length > 0) {
this.handleClick(0, this.tabs[0])
} else {
this.products = []
}
}) })
}, },
computed: { computed: {
@@ -112,7 +119,7 @@ export default{
methods: { methods: {
handleClick(index, tab) { handleClick(index, tab) {
this.activeIndex = index this.activeIndex = index
this.products = tab.products this.products = Array.isArray(tab && tab.products) ? tab.products : []
}, },
handleChange(e) { handleChange(e) {
this.current = e.detail.current this.current = e.detail.current
@@ -144,6 +151,17 @@ export default{
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
} }
.empty-wrap{
min-height: 260rpx;
display: flex;
align-items: center;
justify-content: center;
}
.empty-text{
font-size: 28rpx;
color: #999999;
text-align: center;
}
.tab-line{ .tab-line{
position: absolute; position: absolute;
bottom: 0; bottom: 0;
+401 -88
View File
@@ -54,14 +54,14 @@
<view class="list v12-ma-0" style="padding: 0rpx 0 30rpx;"> <view class="list v12-ma-0" style="padding: 0rpx 0 30rpx;">
<view <view
v-for="(order, orderListIndex) in orderList" v-for="(order, orderListIndex) in orderList"
:key="orderListIndex" :key="order.orderId || orderListIndex"
class="item" class="item"
> >
<view <view
v-if="order.experienceOrderInfo" v-if="order.experienceOrderInfo"
class="shop-info flex jc-between ai-center" class="shop-info flex jc-between ai-center"
style="padding-bottom: 0" style="padding-bottom: 0"
@click.stop="goStore(order)" @click.stop="goStore(orderListIndex)"
> >
<view class="flex ai-center"> <view class="flex ai-center">
<image <image
@@ -79,7 +79,7 @@
v-if="order.merName && !order.experienceOrderInfo" v-if="order.merName && !order.experienceOrderInfo"
class="shop-info flex jc-between ai-center" class="shop-info flex jc-between ai-center"
style="padding-bottom: 0" style="padding-bottom: 0"
@click="goStore(order)" @click="goStore(orderListIndex)"
> >
<view class="flex ai-center"> <view class="flex ai-center">
<image <image
@@ -120,7 +120,7 @@
<text v-if="order.bargainId > 0">砍价</text> <text v-if="order.bargainId > 0">砍价</text>
<text v-if="order.storeId > 0">门店</text> <text v-if="order.storeId > 0">门店</text>
</text> </text>
订单号:{{ order.orderId }} {{ order.isDrawOrder === 1 ? '奖品订单号' : '订单号' }}:{{ order.orderId }}
</view> </view>
<view <view
v-if="order.isTickets === 1 && parseInt(order._status._type) === 1" v-if="order.isTickets === 1 && parseInt(order._status._type) === 1"
@@ -133,7 +133,7 @@
class="font-color-white statusTag v12-primary" class="font-color-white statusTag v12-primary"
>{{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : (getStatus(order) || (order._status && order._status._title) || '已完成') }}</view> >{{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : (getStatus(order) || (order._status && order._status._title) || '已完成') }}</view>
</view> </view>
<view @click="goOrderDetails(order)"> <view @click="goOrderDetails(orderListIndex)">
<view <view
v-if="order.isGiftCardReceiveBlind === 1" v-if="order.isGiftCardReceiveBlind === 1"
class="item-info acea-row row-between row-top" class="item-info acea-row row-between row-top"
@@ -186,6 +186,64 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else-if="order.isDrawOrder === 1">
<view class="item-info acea-row row-between row-top draw-order-info">
<view class="pictrue">
<image :src="order.drawOrderInfo && order.drawOrderInfo.prizeImage" />
</view>
<view class="text" style="margin-top: 0 !important;">
<view class="acea-row name-wrap" style="flex-wrap: nowrap">
<view class="name more-t v12-font-bold">{{ (order.drawOrderInfo && order.drawOrderInfo.prizeName) || '抽奖商品' }}</view>
<view class="money draw-price">
<view class="draw-price-origin">
<text class="v12-font-22"></text>
<text class="v12-font-28">{{ force2Decimal((order.drawOrderInfo && order.drawOrderInfo.prizePrice) || 0) }}</text>
</view>
<view class="v12-font-22 v12-secondary-dark-text draw-qty">x1</view>
</view>
</view>
<view class="">
{{ order.drawOrderInfo && order.drawOrderInfo.prizeAttrName || '' }}
</view>
</view>
</view>
<view class="totalPrice acea-row row-between row-middle" :style="{'padding-bottom': '0'}">
<view v-if="order.createTime">
<span class="orderTime v12-font-24 v12-dark1-text">{{ order.createTime }}</span>
</view>
<view class="v12-font-24 v12-dark1-text">
{{ order.totalNum || 0 }}件商品
<text v-if="order.isGiftCardReceiveBlind === 0">
<text class="v12-dark-text v12-font-28 v12-font-bold">
总金额
</text>
<text class="v12-font-22 v12-primary-text v12-font-bold">
</text>
<text class="money font-color-lightred v12-font-28 v12-primary-text v12-font-bold">
{{ force2Decimal(order.payPrice) }}
</text>
</text>
</view>
</view>
<view class="v12-mt-3">
<u-line></u-line>
</view>
<view class="draw-code-row acea-row row-between row-middle">
<view class="v12-font-28 v12-dark-text">
抽奖码:
<text class="v12-primary-text v12-font-bold draw-ticket-code">
{{ order.drawOrderInfo && order.drawOrderInfo.ticketCode }}
</text>
</view>
<view
v-if="order.drawOrderInfo && order.drawOrderInfo.drawStatusName"
class="font-color-white statusTag v12-primary"
>
{{ order.drawOrderInfo.drawStatusName }}
</view>
</view>
</view>
<view v-else> <view v-else>
<view <view
v-for="(cart,cartInfoIndex) in order.cartInfo" v-for="(cart,cartInfoIndex) in order.cartInfo"
@@ -196,22 +254,22 @@
<image <image
v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0" v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"
:src="cart.productInfo.image" :src="cart.productInfo.image"
@click.stop="gotoGoodDetail(cart, 1, { id: cart.productInfo.id })" @click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
/> />
<image <image
v-else-if="cart.combinationId > 0" v-else-if="cart.combinationId > 0"
:src="cart.productInfo.image" :src="cart.productInfo.image"
@click.stop="gotoGoodDetail(cart, 2, { id: cart.combinationId })" @click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
/> />
<image <image
v-else-if="cart.bargainId > 0" v-else-if="cart.bargainId > 0"
:src="cart.productInfo.image" :src="cart.productInfo.image"
@click.stop="gotoGoodDetail(cart, 3, { id: cart.bargainId })" @click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
/> />
<image <image
v-else-if="cart.seckillId > 0" v-else-if="cart.seckillId > 0"
:src="cart.productInfo.image" :src="cart.productInfo.image"
@click.stop="gotoGoodDetail(cart, 4, { id: cart.seckillId })" @click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
/> />
</view> </view>
<view class="text" style="margin-top: 0 !important;"> <view class="text" style="margin-top: 0 !important;">
@@ -237,7 +295,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="!order.experienceOrderInfo" class="totalPrice acea-row row-between row-middle" :style="{'padding-bottom': order.isTravelGroup === 1 ? '0rpx !important' : '30rpx'}"> <view v-if="!order.experienceOrderInfo && order.isDrawOrder === 0" class="totalPrice acea-row row-between row-middle" :style="{'padding-bottom': order.isTravelGroup === 1 ? '0rpx !important' : '30rpx'}">
<view v-if="order.createTime"> <view v-if="order.createTime">
<span class="orderTime v12-font-24 v12-dark1-text">{{ order.createTime }}</span> <span class="orderTime v12-font-24 v12-dark1-text">{{ order.createTime }}</span>
</view> </view>
@@ -276,46 +334,53 @@
<view <view
v-if="order.experienceOrderStatus === 0 || order.experienceOrderStatus === 1" v-if="order.experienceOrderStatus === 0 || order.experienceOrderStatus === 1"
class="bnt service" class="bnt service"
@click.stop="goRoom(order)" @click.stop="goRoom(orderListIndex)"
>联系商家</view> >联系商家</view>
<view <view
v-if="order.experienceOrderStatus === 0" v-if="order.experienceOrderStatus === 0"
class="bnt v12-primary v12-white-text v12-primary-border v12-radius-40" class="bnt v12-primary v12-white-text v12-primary-border v12-radius-40"
@click.stop="goOrderDetails(order)" @click.stop="goOrderDetails(orderListIndex)"
>去使用</view> >去使用</view>
<view <view
v-if="order.experienceOrderStatus === 1 || order.experienceOrderStatus === 2" v-if="order.experienceOrderStatus === 1 || order.experienceOrderStatus === 2"
class="bnt service" class="bnt service"
@click.stop="delOrder(order)" @click.stop="delOrder(orderListIndex)"
>删除订单</view> >删除订单</view>
</view> </view>
<view <view
v-if="!order.isGiftCardSend && !order.experienceOrderInfo" v-if="!order.isGiftCardSend && !order.experienceOrderInfo"
class="bottom flex jc-between ai-center" class="bottom flex jc-between ai-center"
> >
<view <view
v-if="[2, 3].includes(parseInt(order._status._type)) && order.isTickets === 0" v-if="[2, 3].includes(parseInt(order._status._type)) && order.isTickets === 0 && order.isDrawOrder === 0"
class="group-btn" class="group-btn"
> >
<text <text
class="btn-more v12-font-28 v12-font-bold" class="btn-more v12-font-28 v12-font-bold"
@click.stop="tapShowMore(order, orderListIndex)" @click.stop="tapShowMore(orderListIndex)"
>更多</text> >更多</text>
<view class="group-float" v-show="order.showMore"> <view class="group-float" v-show="order.showMore">
<view <view
v-if="order.merName && order.isGiftCardReceiveBlind === 0" v-if="order.merName && order.isGiftCardReceiveBlind === 0"
class="btn btn-service flex jc-center ai-center v12-font-24" class="btn btn-service flex jc-center ai-center v12-font-24"
@click="goRoom(order)" @click="goRoom(orderListIndex)"
>联系商家</view> >联系商家</view>
<view <view
v-if="order.isTravelGroup === 0" v-if="order.isTravelGroup === 0 && order.refundSystemStatus !== 2"
class="btn flex jc-center ai-center v12-font-24" class="btn flex jc-center ai-center v12-font-24"
@click="goRefund(order)" @click="goRefund(orderListIndex)"
>申请退款</view> >申请退款</view>
</view> </view>
</view> </view>
<template v-else> <template v-else>
<view class="v12-justify-between" style="width: 100%"> <view class="v12-justify-between" style="width: 100%">
<view
v-if="order.isDrawOrder > 0"
class="bnt service"
@click.stop="callMerPhone(orderListIndex)"
>联系客服
</view>
<view> <view>
<view <view
v-if="order.isGiftCardReceiveBlind === 0 && v-if="order.isGiftCardReceiveBlind === 0 &&
@@ -324,110 +389,111 @@
parseInt(order._status._type) !== 9 parseInt(order._status._type) !== 9
" "
class="bnt service" class="bnt service"
@click="goRoom(order)" @click="goRoom(orderListIndex)"
>联系商家</view> >联系商家</view>
</view> </view>
<view class="v12-justify-between"> <view class="v12-justify-between">
<view <view
class="bnt service" class="bnt service"
@click="goOrderDetails(order)" @click="goOrderDetails(orderListIndex)"
v-if="[-1, -2, -3].includes(parseInt(order._status._type))" v-if="[-1, -2, -3].includes(parseInt(order._status._type))"
>查看详情</view> >查看详情</view>
<view <view
class="bnt service" class="bnt service"
@click="delOrder(order)" @click="delOrder(orderListIndex)"
v-if="[9].includes(parseInt(order._status._type))" v-if="[9].includes(parseInt(order._status._type))"
>删除订单</view> >删除订单</view>
</view> </view>
</view> </view>
</template> </template>
<view class="flex"> <view class="flex">
<template v-if="parseInt(order._status._type) === 0"> <template v-if="parseInt(order._status._type) === 0">
<view <view
class="bnt cancelBnt v12-dark-text v12-dark-border" class="bnt cancelBnt v12-dark-text v12-dark-border"
@click="cancelOrder(order)" @click="cancelOrder(orderListIndex)"
>取消订单</view> >取消订单</view>
<view <view
v-if="order.isTravelGroup === 0" v-if="order.isTravelGroup === 0 && order.isDrawOrder === 0"
class="bnt cancelBnt v12-dark-text v12-dark-border" class="bnt cancelBnt v12-dark-text v12-dark-border"
@click="addressTap(order)" @click="addressTap(orderListIndex)"
>修改地址</view> >修改地址</view>
<view <view
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
@click="subscribePay(order)" @click="subscribePay(orderListIndex)"
>立即付款</view> >立即付款</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 1 && order.isTickets === 0"> <template v-if="parseInt(order._status._type) === 1 && order.isTickets === 0">
<view <view
v-if="order.isTravelGroup === 1" v-if="order.isTravelGroup === 1"
class="bnt service" class="bnt service"
@click="editTime(order)" @click="editTime(orderListIndex)"
>{{ '修改时间' }}</view> >{{ '修改时间' }}</view>
<view <view
v-if="order.isTravelGroup === 1" v-if="order.isTravelGroup === 1"
class="bnt service" class="bnt service"
@click="applyRefund(order)" @click="applyRefund(orderListIndex)"
>{{ '申请退款' }}</view> >{{ '申请退款' }}</view>
<view <view
v-if="canShowModifyAddress(order)" v-if="canShowModifyAddress(order) && order.isDrawOrder === 0"
class="bnt service" class="bnt service"
@click="addressTap(order)" @click="addressTap(orderListIndex)"
>修改地址</view> >修改地址</view>
<view <view
class="bnt service" class="bnt service"
:class="{'v12-primary-text v12-primary-border': order.isTravelGroup === 1}" :class="{'v12-primary-text v12-primary-border': order.isTravelGroup === 1}"
@click="goOrderDetails(order)" @click="goOrderDetails(orderListIndex)"
>{{ order.isTravelGroup === 0 ? '查看详情' : '查看券码' }}</view> >{{ order.isTravelGroup === 0 ? '查看详情' : '查看券码' }}</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 1 && order.isTickets === 1"> <template v-if="parseInt(order._status._type) === 1 && order.isTickets === 1">
<view <view
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
@click="goOrderDetails(order)" @click="goOrderDetails(orderListIndex)"
>立即核销</view> >立即核销</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 2 && order.isTickets === 0 && order.isTravelGroup === 1"> <template v-if="parseInt(order._status._type) === 2 && order.isTickets === 0 && order.isTravelGroup === 1">
<view <view
v-if="order.isTravelGroup === 1" v-if="order.isTravelGroup === 1"
class="bnt service" class="bnt service"
@click="editTime(order)" @click="editTime(orderListIndex)"
>{{ '修改时间' }}</view> >{{ '修改时间' }}</view>
<view <view
v-if="order.isTravelGroup === 1" v-if="order.isTravelGroup === 1"
class="bnt service" class="bnt service"
@click="applyRefund(order)" @click="applyRefund(orderListIndex)"
>{{ '申请退款' }}</view> >{{ '申请退款' }}</view>
<view <view
class="bnt service" class="bnt service"
:class="{'v12-primary-text v12-primary-border': order.isTravelGroup === 1}" :class="{'v12-primary-text v12-primary-border': order.isTravelGroup === 1}"
@click="goOrderDetails(order)" @click="goOrderDetails(orderListIndex)"
>{{ order.isTravelGroup === 0 ? '查看详情' : '查看券码' }}</view> >{{ order.isTravelGroup === 0 ? '查看详情' : '查看券码' }}</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 2 && order.isTickets === 0 && order.isTravelGroup === 0"> <template v-if="parseInt(order._status._type) === 2 && order.isTickets === 0 && order.isTravelGroup === 0">
<view <view
v-if="order.isExtendedDelivery === 0" v-if="order.isExtendedDelivery === 0 && order.isDrawOrder === 0"
class="bnt default" class="bnt default"
@click="toDelay(order.orderId)" @click="toDelay(order.orderId)"
>延长收货 >延长收货
</view> </view>
<view <view
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
@click="takeOrder(order)" @click="takeOrder(orderListIndex)"
>确认收货</view> >确认收货</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 0"> <template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 0">
<view <view
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
@click="goOrderDetails(order)" @click="goOrderDetails(orderListIndex)"
>去评价</view> >去评价</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 1"> <template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 1">
<view <view
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40" class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
@click="goOrderDetails(order)" @click="goOrderDetails(orderListIndex)"
>去评价</view> >去评价</view>
</template> </template>
<template v-if="parseInt(order._status._type) === 4"> <template v-if="parseInt(order._status._type) === 4">
<view class="bnt service" @click="goOrderDetails(order)">查看订单</view> <view class="bnt service" @click="goOrderDetails(orderListIndex)">查看订单</view>
</template> </template>
</view> </view>
</view> </view>
@@ -439,7 +505,7 @@
<view <view
v-if="order.merName && order.isGiftCardReceiveBlind === 0" v-if="order.merName && order.isGiftCardReceiveBlind === 0"
class="bnt btn-service flex jc-center ai-center v12-font-24" class="bnt btn-service flex jc-center ai-center v12-font-24"
@click="goRoom(order)" @click="goRoom(orderListIndex)"
>联系商家 >联系商家
</view> </view>
<view class="v12-align-center"> <view class="v12-align-center">
@@ -453,14 +519,14 @@
" "
open-type="share" open-type="share"
class="gift-btn service v12-primary-text v12-primary-border" class="gift-btn service v12-primary-text v12-primary-border"
@click="shareGift(order)" @click="shareGift(orderListIndex)"
>送给朋友</button> >送给朋友</button>
<button <button
v-if="Number(order.status) === 0" v-if="Number(order.status) === 0"
class="gift-btn service v12-primary-text v12-primary-border" class="gift-btn service v12-primary-text v12-primary-border"
@click="subscribePay(order)" @click="subscribePay(orderListIndex)"
>立即支付</button> >立即支付</button>
<view class="bnt service" @click="goOrderDetails(order)">查看详情</view> <view class="bnt service" @click="goOrderDetails(orderListIndex)">查看详情</view>
</view> </view>
</view> </view>
</view> </view>
@@ -536,6 +602,40 @@
@update:show="showDatePicker = false" @update:show="showDatePicker = false"
@input="handleDateSelected" @input="handleDateSelected"
></DateRangePicker> ></DateRangePicker>
<view
v-if="drawTicketPopup.show"
class="draw-ticket-mask"
@touchmove.stop.prevent
>
<view class="draw-ticket-popup">
<view class="draw-ticket-close" @click="closeDrawTicketPopup">×</view>
<view class="draw-ticket-icon">
<view class="ticket-icon-box">
<image class="ticket-icon-check" :src="webUrl + '/home/gongxi.png'" mode="widthFix"></image>
</view>
</view>
<view class="draw-ticket-title">支付成功</view>
<view class="ticket-card-container">
<view class="ticket-badge">
<text>恭喜获得抽奖码!</text>
<view class="ticket-badge-arrow"></view>
</view>
<view class="ticket-card">
<view class="ticket-card-subtitle">
<text class="ticket-card-subtitle-text">您的专属抽奖码</text>
</view>
<view class="ticket-card-code-box">
<text class="ticket-card-code">{{ drawTicketPopup.ticketCode }}</text>
</view>
<view class="ticket-card-time">开奖时间:{{ (drawTicketPopup.drawTime) }}</view>
</view>
</view>
<view class="draw-ticket-actions">
<view class="action-btn home-btn" @click="goHomeFromPopup">返回首页</view>
<view class="action-btn primary" @click="goTicketsFromPopup">查看我的抽奖码</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
@@ -559,10 +659,12 @@ import Loading from "@/components/Loading"
import Payment from "@/components/Payment" import Payment from "@/components/Payment"
import { mapGetters } from "vuex" import { mapGetters } from "vuex"
import { pageListenMixins } from '@/mixins/pageListenMixins' import { pageListenMixins } from '@/mixins/pageListenMixins'
import settings from '@/config/baseSetting.js'
import { orderPaySuccessToCheckDrawStatus } from '@/mixins/orderPaySuccessToCheckDrawStatus.js'
export default { export default {
name: "MyOrder", name: "MyOrder",
mixins: [pageListenMixins], mixins: [pageListenMixins, orderPaySuccessToCheckDrawStatus],
data() { data() {
return { return {
giftItem: {}, giftItem: {},
@@ -623,7 +725,8 @@ export default {
showDatePicker: false, showDatePicker: false,
dateRange: [], dateRange: [],
userLatitude: null, userLatitude: null,
userLongitude: null userLongitude: null,
orderListRequestId: 0
} }
}, },
components: { components: {
@@ -827,12 +930,28 @@ export default {
uni.hideLoading(); uni.hideLoading();
}) })
}, },
editTime(order) { editTime(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
this.showDatePicker = true this.showDatePicker = true
this.travelGroupOrderInfo = order.travelGroupOrderInfo this.travelGroupOrderInfo = order.travelGroupOrderInfo
this.orderInfo = order this.orderInfo = order
}, },
applyRefund(order) { applyRefund(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
// 这里可以添加申请退款的逻辑,比如跳转到退款页面 // 这里可以添加申请退款的逻辑,比如跳转到退款页面
uni.navigateTo({ uni.navigateTo({
url: '/pkg_product/views/sojoumOrderRefund?id=' + order.orderId url: '/pkg_product/views/sojoumOrderRefund?id=' + order.orderId
@@ -848,8 +967,16 @@ export default {
} }
return timeMap[type] return timeMap[type]
}, },
shareGift(item) { shareGift(orderOrIndex) {
this.giftItem = item const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
this.giftItem = order
}, },
getGiftTips(giftCardInfo) { getGiftTips(giftCardInfo) {
// giftCardStatus int 礼品卡状态 0-未领取 1-已领取 2-已失效 // giftCardStatus int 礼品卡状态 0-未领取 1-已领取 2-已失效
@@ -880,14 +1007,30 @@ export default {
}) })
this.$forceUpdate() this.$forceUpdate()
}, },
delOrder(order) { getOrderByIndex(orderOrIndex) {
if (typeof orderOrIndex === 'number') {
return this.orderList[orderOrIndex]
}
if (typeof orderOrIndex === 'string' && /^\d+$/.test(orderOrIndex)) {
return this.orderList[Number(orderOrIndex)]
}
return orderOrIndex
},
delOrder(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
delOrderHandle(order.orderId).then(() => { delOrderHandle(order.orderId).then(() => {
this.page = 1 this.changeType()
this.orderList = [];
this.getOrderListReq()
}) })
}, },
goStore(order) { goStore(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) { if (!order) {
return return
} }
@@ -950,9 +1093,14 @@ export default {
}) })
}, },
async toYuePay(payPwd) { async toYuePay(payPwd) {
const that = this; const that = this
//网络请求 const orderId = this.orderInfo.orderId
await yuePayOrderHandle(this.orderInfo.orderId, "yue", that.from, payPwd); // 网络请求
await yuePayOrderHandle(orderId, "yue", that.from, payPwd).then(() => {
this.afterPaySuccess(orderId, (drawTicketResult) => {
this.setDrawTicketPopupFromQuery(drawTicketResult)
})
});
that.changeType(); that.changeType();
this.payPassword = ""; this.payPassword = "";
}, },
@@ -964,18 +1112,30 @@ export default {
this.toYuePay(payPwd) this.toYuePay(payPwd)
this.isShowPayPwdPop = false this.isShowPayPwdPop = false
}, },
subscribePay(order) { subscribePay(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
this.orderInfo = order this.orderInfo = order
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: [ tmplIds: settings.SubscribeMessageTmplIds,
'7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE',
'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU',
'9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU'
],
complete: () => this.pay = true complete: () => this.pay = true
}) })
}, },
addressTap(order) { addressTap(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
this._orderId = order.orderId this._orderId = order.orderId
uni.setStorageSync('updateOrderSourceAddress', { uni.setStorageSync('updateOrderSourceAddress', {
id: order.addressId || order.userAddressId || '', id: order.addressId || order.userAddressId || '',
@@ -993,10 +1153,31 @@ export default {
force2Decimal(v) { force2Decimal(v) {
return this.$force2Decimal(v) return this.$force2Decimal(v)
}, },
goRoom(order) { callMerPhone(orderOrIndex) {
console.log(order); const order = this.getOrderByIndex(orderOrIndex)
const phone = String((order && order.merPhone) || '').trim()
if (!phone) {
uni.showToast({
title: '暂无电话',
icon: 'none'
})
return
}
uni.makePhoneCall({
phoneNumber: phone
})
},
goRoom(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
if (order.experienceOrderInfo) { if (order.experienceOrderInfo) {
const phone = order.merchantPhone || order.merPhone || order.experienceOrderInfo.phone || order.companyTel; const phone = order.merchantPhone || order.merPhone || order.experienceOrderInfo.phone || order.companyTel
if (phone) { if (phone) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: phone phoneNumber: phone
@@ -1027,7 +1208,15 @@ export default {
url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}&params=${JSON.stringify(params)}` url: `/pkg_common/views/room?id=${order.merId}&name=${order.merName}&params=${JSON.stringify(params)}`
}) })
}, },
goRefund(order) { goRefund(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
// fix bug#1631 // fix bug#1631
if (this.type === 4 || parseInt(order._status._type) === 3) { if (this.type === 4 || parseInt(order._status._type) === 3) {
// 打开售后的目的就是开启已完成/待评价订单的退款功能,确认打开售后之后,小程序用户再点击申请退款,就可以进入退款申请填写页面,正常走退款流程,提交退款申请以后,订单状态变为退款中 // 打开售后的目的就是开启已完成/待评价订单的退款功能,确认打开售后之后,小程序用户再点击申请退款,就可以进入退款申请填写页面,正常走退款流程,提交退款申请以后,订单状态变为退款中
@@ -1049,15 +1238,31 @@ export default {
}) })
} }
}, },
goLogistics(order) { goLogistics(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/order/Logistics/index", path: "/pagesOrder/order/Logistics/index",
query: { query: {
id: order.orderId id: order.orderId
} }
}); });
}, },
goOrderDetails(order) { goOrderDetails(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
if (order.experienceOrderInfo) { if (order.experienceOrderInfo) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pkg_product/views/experienceCouponOrderDetail", path: "/pkg_product/views/experienceCouponOrderDetail",
@@ -1078,7 +1283,7 @@ export default {
return return
} }
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/order/OrderDetails/index", path: "/pagesOrder/order/OrderDetails/index",
query: { query: {
id: order.orderId, id: order.orderId,
isGift: order.isGiftCardSend ? 1 : '' isGift: order.isGiftCardSend ? 1 : ''
@@ -1094,9 +1299,39 @@ export default {
} }
} }
}, },
gotoGoodDetail(cart, type, query){ gotoGoodDetail(orderOrIndex, cartOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
const cartList = Array.isArray(order && order.cartInfo) ? order.cartInfo : []
const cart = typeof cartOrIndex === 'number' ? cartList[cartOrIndex] : cartOrIndex
if (!cart) {
uni.showToast({
title: '未获取到商品信息',
icon: 'none'
})
return
}
const productInfo = cart.productInfo || {}
let type = 1
let id = productInfo.id || cart.productId || ''
if (Number(cart.combinationId) > 0) {
type = 2
id = cart.combinationId
} else if (Number(cart.bargainId) > 0) {
type = 3
id = cart.bargainId
} else if (Number(cart.seckillId) > 0) {
type = 4
id = cart.seckillId
}
if (!id) {
uni.showToast({
title: '未获取到商品详情参数',
icon: 'none'
})
return
}
// isProductStillExist:0-不存在,1-存在 // isProductStillExist:0-不存在,1-存在
const isProductStillExist = cart.isProductStillExist || 0 const isProductStillExist = Number(cart.isProductStillExist || 0)
if (isProductStillExist === 0) { if (isProductStillExist === 0) {
this.$dialog.toast({ mes: '商品已下架' }) this.$dialog.toast({ mes: '商品已下架' })
return return
@@ -1116,14 +1351,32 @@ export default {
path = '/pages/activity/SeckillDetails/index' path = '/pages/activity/SeckillDetails/index'
break break
} }
this.$yrouter.push({ path, query }) if (!path) {
uni.showToast({
title: '未找到商品详情页',
icon: 'none'
})
return
}
this.$yrouter.push({
path,
query: { id }
})
}, },
getOrderData() { getOrderData() {
getOrderData().then(res => { getOrderData().then(res => {
this.orderData = res.data this.orderData = res.data
}) })
}, },
takeOrder(order) { takeOrder(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
const that = this const that = this
uni.showModal({ uni.showModal({
title: '是否确认收货?', title: '是否确认收货?',
@@ -1144,6 +1397,23 @@ export default {
reload() { reload() {
this.changeType(this.type) this.changeType(this.type)
}, },
normalizeOrderList(list = []) {
const orderKeySet = new Set()
return list.reduce((result, item) => {
const orderKey = item && (item.orderId || item.id)
if (orderKey && orderKeySet.has(orderKey)) {
return result
}
if (orderKey) {
orderKeySet.add(orderKey)
}
result.push({
...item,
showMore: false
})
return result
}, [])
},
tabChange(item) { tabChange(item) {
this.type = item.index this.type = item.index
this.$yroute.query.type = this.type this.$yroute.query.type = this.type
@@ -1184,6 +1454,7 @@ export default {
}) })
}, },
changeType() { changeType() {
this.orderListRequestId += 1
this.orderList = [] this.orderList = []
this.page = 1 this.page = 1
this.loaded = false this.loaded = false
@@ -1192,7 +1463,8 @@ export default {
}, },
getOrderListReq() { getOrderListReq() {
if (this.loading || this.loaded) return if (this.loading || this.loaded) return
// this.loading = true this.loading = true
const currentRequestId = this.orderListRequestId
uni.showLoading({ uni.showLoading({
mask: true, mask: true,
}) })
@@ -1219,22 +1491,27 @@ export default {
keyword, keyword,
orderType orderType
}).then(res => { }).then(res => {
this.orderList = this.orderList.concat(res.data) if (currentRequestId !== this.orderListRequestId) {
if (this.orderList.length > 0) { return
this.orderList.forEach(item => {
item.showMore = false;
})
} }
const nextOrderList = page === 1 ? res.data : this.orderList.concat(res.data)
this.orderList = this.normalizeOrderList(nextOrderList)
this.updateOrderDistances() this.updateOrderDistances()
this.page++; this.page = page + 1
this.loaded = res.data.length < this.limit this.loaded = res.data.length < this.limit
this.loading = false
}).finally(() => { }).finally(() => {
if (currentRequestId !== this.orderListRequestId) {
return
}
this.loading = false this.loading = false
uni.hideLoading() uni.hideLoading()
}); });
}, },
tapShowMore(order, index) { tapShowMore(index) {
const order = this.getOrderByIndex(index)
if (!order) {
return
}
order.showMore = !order.showMore; order.showMore = !order.showMore;
this.$set(this.orderList, index, order); this.$set(this.orderList, index, order);
}, },
@@ -1274,7 +1551,15 @@ export default {
} }
return status return status
}, },
cancelOrder(order) { cancelOrder(orderOrIndex) {
const order = this.getOrderByIndex(orderOrIndex)
if (!order) {
uni.showToast({
title: '订单信息异常',
icon: 'none'
})
return
}
cancelOrderHandle(order.orderId).then(() => { cancelOrderHandle(order.orderId).then(() => {
this.getOrderData(); this.getOrderData();
this.orderList.splice(this.orderList.indexOf(order), 1) this.orderList.splice(this.orderList.indexOf(order), 1)
@@ -1303,13 +1588,17 @@ export default {
} }
}, },
toPay(type) { toPay(type) {
const that = this
// 余额支付需要输入支付密码 // 余额支付需要输入支付密码
if (type == "yue") { if (type == "yue") {
this.isShowPayPwdPop = true this.isShowPayPwdPop = true
return return
} else { } else {
payOrderHandle(this.orderInfo.orderId, type, that.from) const orderId = this.orderInfo.orderId
payOrderHandle(orderId, type, this.from).then(() => {
this.afterPaySuccess(orderId, (drawTicketResult) => {
this.setDrawTicketPopupFromQuery(drawTicketResult)
})
})
} }
}, },
toDelay(id) { toDelay(id) {
@@ -1543,4 +1832,28 @@ page {
width: 160rpx !important; width: 160rpx !important;
height: 160rpx !important; height: 160rpx !important;
} }
.draw-order-info .draw-price{
text-align: right;
}
.draw-order-info .draw-price-origin{
color: #999;
text-decoration: line-through;
}
.draw-order-info .draw-qty{
margin-top: 8rpx;
}
.draw-code-row{
margin: 0rpx 0rpx 20rpx 30rpx;
padding-top: 20rpx;
}
.draw-ticket-code{
margin-left: 8rpx;
}
.draw-status-tag{
color: #fff;
background: #c52733;
border-radius: 999rpx;
padding: 6rpx 24rpx;
line-height: 1.4;
}
</style> </style>
File diff suppressed because it is too large Load Diff
+98 -57
View File
@@ -117,7 +117,7 @@
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text> <text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
</view> </view>
</view> --> </view> -->
<view class="v12-justify-between v12-align-center v12-py-1"> <view v-if="!isLotteryOrder()" class="v12-justify-between v12-align-center v12-py-1">
<view class="v12-font-24 v12-dark-text v12-align-center"> <view class="v12-font-24 v12-dark-text v12-align-center">
<text>优惠券</text> <text>优惠券</text>
<view class="v12-align-center v12-ml-1" v-if="couponTitle"> <view class="v12-align-center v12-ml-1" v-if="couponTitle">
@@ -255,7 +255,7 @@
</view> </view>
<!-- v9 优惠券开始 --> <!-- v9 优惠券开始 -->
<u-popup <u-popup
v-if="show" v-if="!isLotteryOrder() && show"
:show="show" :show="show"
:round="10" :round="10"
mode="bottom" mode="bottom"
@@ -263,7 +263,7 @@
@close="close" @close="close"
> >
<CouponsPopup <CouponsPopup
v-if="couponList.usable.length > 0 && show" v-if="!isLotteryOrder() && couponList.usable.length > 0 && show"
:two-list="couponList" :two-list="couponList"
@change="changeCoupons" @change="changeCoupons"
@close="close" @close="close"
@@ -328,7 +328,10 @@ import {isNullOrEmpty, isWeixin} from "@/utils"
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue' import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue'
import uniPopup from '@/components/uni-popup/uni-popup.vue' import uniPopup from '@/components/uni-popup/uni-popup.vue'
import CouponsPopup from "@/components/CouponsPopup.vue" import CouponsPopup from "@/components/CouponsPopup.vue"
import { getDrawTicketByOrder } from '@/api/lottery'
import { pageListenMixins } from '@/mixins/pageListenMixins' import { pageListenMixins } from '@/mixins/pageListenMixins'
import settings from '@/config/baseSetting.js'
import { orderPaySuccessToCheckDrawStatus } from '@/mixins/orderPaySuccessToCheckDrawStatus.js'
const NAME = "OrderSubmission" const NAME = "OrderSubmission"
const _isWeixin = isWeixin() const _isWeixin = isWeixin()
@@ -342,7 +345,7 @@ export default {
passkeyborad, passkeyborad,
CouponsPopup CouponsPopup
}, },
mixins: [pageListenMixins], mixins: [pageListenMixins, orderPaySuccessToCheckDrawStatus],
props: {}, props: {},
data: function () { data: function () {
return { return {
@@ -395,7 +398,8 @@ export default {
pageKeyId: Object.freeze('orderConfirm'), pageKeyId: Object.freeze('orderConfirm'),
total: 0, total: 0,
couponTitle: '', couponTitle: '',
hasCoupon: false hasCoupon: false,
pageQuery: {}
} }
}, },
computed: mapGetters(["userInfo", "storeItems"]), computed: mapGetters(["userInfo", "storeItems"]),
@@ -414,17 +418,18 @@ export default {
}, },
onLoad(opts) { onLoad(opts) {
const that = this const that = this
if (that.$yroute.query.pinkid !== undefined) { that.pageQuery = Object.assign({}, that.resolvePageQuery(), opts || {})
that.pinkId = that.$yroute.query.pinkid if (that.pageQuery.pinkid !== undefined) {
that.pinkId = that.pageQuery.pinkid
} }
if (that.$yroute.query.id !== undefined) { if (that.pageQuery.id !== undefined) {
that.cartid = that.$yroute.query.id that.cartid = that.pageQuery.id
console.log(that.cartid) console.log(that.cartid)
} }
if (that.$yroute.query.lotteryRecordId !== undefined) { if (that.pageQuery.lotteryRecordId !== undefined) {
that.lotteryRecordId = that.$yroute.query.lotteryRecordId that.lotteryRecordId = that.pageQuery.lotteryRecordId
} }
that.hasCoupon = opts.couponId !== '' that.hasCoupon = !!(opts && opts.couponId !== '')
that.getCartInfo() that.getCartInfo()
}, },
onShow() { onShow() {
@@ -449,6 +454,37 @@ export default {
}, },
methods: { methods: {
isNullOrEmpty, isNullOrEmpty,
resolvePageQuery() {
if (this.$yroute && this.$yroute.query) {
return this.$yroute.query
}
if (this.$route && this.$route.query) {
return this.$route.query
}
if (this._route && this._route.query) {
return this._route.query
}
return {}
},
isLotteryOrder() {
const cartInfo = Array.isArray(this.orderGroupInfo && this.orderGroupInfo.cartInfo)
? this.orderGroupInfo.cartInfo
: []
return Boolean(
this.lotteryRecordId ||
this.pageQuery.from === 'countyLottery' ||
Number(this.pageQuery.drawActivityId || 0) > 0 ||
cartInfo.some(item => Number(
item.drawActivityId ||
(item.productInfo && item.productInfo.drawActivityId) ||
0
) > 0)
)
},
getOrderCouponId() {
if (this.isLotteryOrder()) return 0
return this.couponList.usable.length === 0 ? 0 : (this.couponId || 0)
},
couponMax(e) { couponMax(e) {
// this.couponTitle = e.couponTitle // this.couponTitle = e.couponTitle
// this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0 // this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
@@ -456,7 +492,7 @@ export default {
showStoreList() { showStoreList() {
this.$store.commit("get_to", "orders") this.$store.commit("get_to", "orders")
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/StoreList/index" path: "/pagesShop/shop/StoreList/index"
}) })
}, },
force2Decimal(value) { force2Decimal(value) {
@@ -474,18 +510,23 @@ export default {
postOrderComputed(this.orderGroupInfo.orderKey, { postOrderComputed(this.orderGroupInfo.orderKey, {
addressId: this.addressInfo.id, addressId: this.addressInfo.id,
useIntegral: this.useIntegral ? 1 : 0, useIntegral: this.useIntegral ? 1 : 0,
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId, couponId: this.getOrderCouponId(),
usePoints: this.usePointsCheck ? 1 : 0, usePoints: this.usePointsCheck ? 1 : 0,
shipping_type: parseInt(this.shipping_type) + 1 shipping_type: parseInt(this.shipping_type) + 1
}).then(res => { }).then(res => {
this.couponList = res.data.result.couponList this.couponList = res.data.result.couponList
if(!f) { if (this.isLotteryOrder()) {
this.couponTitle = ''
if (this.couponId !== 0) {
this.couponId = 0
}
} else if(!f) {
this.couponId = res.data.result.defaultCouponId this.couponId = res.data.result.defaultCouponId
} }
const data = res.data; const data = res.data;
if (data.status === "EXTEND_ORDER") { if (data.status === "EXTEND_ORDER") {
this.$yrouter.replace({ this.$yrouter.replace({
path: "/pages/order/OrderDetails/index", path: "/pagesOrder/order/OrderDetails/index",
query: { query: {
id: data.result.orderId id: data.result.orderId
} }
@@ -540,8 +581,8 @@ export default {
} }
_this.systemStore = data.systemStore || {} _this.systemStore = data.systemStore || {}
_this.storeSelfMention = data.storeSelfMention _this.storeSelfMention = data.storeSelfMention
if(_this.$yroute.query.address !== undefined ) { if(_this.pageQuery.address !== undefined ) {
_this.addressInfo = JSON.parse(_this.$yroute.query.address) || {} _this.addressInfo = JSON.parse(_this.pageQuery.address) || {}
_this.computedPrice() _this.computedPrice()
} else { } else {
// _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {} // _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {}
@@ -600,11 +641,7 @@ export default {
}, },
subscribePay() { subscribePay() {
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: [ tmplIds: settings.SubscribeMessageTmplIds,
'7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE',
'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU',
'9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU'
],
complete: () => this.createOrder(false) complete: () => this.createOrder(false)
}) })
}, },
@@ -684,7 +721,7 @@ export default {
phone: this.contactsTel, phone: this.contactsTel,
addressId: this.addressInfo.id, addressId: this.addressInfo.id,
useIntegral: this.useIntegral ? 1 : 0, useIntegral: this.useIntegral ? 1 : 0,
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId || 0, couponId: this.getOrderCouponId(),
usePoints: this.usePointsNumber || 0, usePoints: this.usePointsNumber || 0,
payType: this.active, payType: this.active,
pinkId: this.pinkId, pinkId: this.pinkId,
@@ -707,6 +744,7 @@ export default {
createOrder(this.orderGroupInfo.orderKey, params).then(res => { createOrder(this.orderGroupInfo.orderKey, params).then(res => {
uni.hideLoading() uni.hideLoading()
const data = res.data const data = res.data
const orderId = data && data.result ? data.result.orderId : ''
switch (data.status) { switch (data.status) {
case "ORDER_EXIST": case "ORDER_EXIST":
case "EXTEND_ORDER": case "EXTEND_ORDER":
@@ -716,9 +754,9 @@ export default {
duration: 2000 duration: 2000
}) })
this.$yrouter.replace({ this.$yrouter.replace({
path: "/pages/order/OrderDetails/index", path: "/pagesOrder/order/OrderDetails/index",
query: { query: {
id: data.result.orderId id: orderId
} }
}) })
break; break;
@@ -743,21 +781,7 @@ export default {
icon: "none", icon: "none",
duration: 2000 duration: 2000
}) })
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) { this.paySuccessToMyOrderOrDetail(orderId)
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: {
id: data.result.orderId
}
})
} else {
this.$yrouter.replace({
path: "/pages/order/MyOrder/index",
query: {
type: 2
}
})
}
break; break;
case "WECHAT_H5_PAY": case "WECHAT_H5_PAY":
// H5支付 // H5支付
@@ -770,24 +794,18 @@ export default {
break; break;
case "WECHAT_PAY": case "WECHAT_PAY":
// 小程序支付 // 小程序支付
weappPay(data.result.jsConfig).finally(() => { weappPay(data.result.jsConfig).then(() => {
this.$yrouter.replace({ this.paySuccessToMyOrderOrDetail(orderId)
path: "/pages/order/MyOrder/index", }).catch(() => {
query: { this.paySuccessToMyOrderOrDetail(orderId)
type: 1
}
})
}) })
break; break;
case "WECHAT_APP_PAY": case "WECHAT_APP_PAY":
// APP支付 // APP支付
weappPay(data.result.jsConfig).finally(() => { weappPay(data.result.jsConfig).then(() => {
this.$yrouter.replace({ this.paySuccessToMyOrderOrDetail(orderId)
path: "/pages/order/MyOrder/index", }).catch(() => {
query: { this.paySuccessToMyOrderOrDetail(orderId)
type: 1
}
});
}) })
break; break;
} }
@@ -802,20 +820,42 @@ export default {
duration: 2000 duration: 2000
}) })
}).finally(function () { }).finally(function () {
if (that.$refs.payPwdPop) {
that.$refs.payPwdPop.clear()
that.$refs.payPwdPop.close()
}
that.isShowPayPwdPop = false that.isShowPayPwdPop = false
that.$refs.payPwdPop.clear() })
that.$refs.payPwdPop.close() },
paySuccessToMyOrderOrDetail(orderId) {
this.afterPaySuccess(orderId, (drawTicketResult) => {
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
this.$yrouter.replace({
path: "/pagesOrder/order/OrderDetails/index",
query: this.buildOrderDetailQuery(orderId, drawTicketResult)
})
} else {
this.$yrouter.replace({
path: "/pages/order/MyOrder/index",
query: {
type: 2,
query: this.buildOrderDetailQuery(orderId, drawTicketResult)
}
})
}
}) })
}, },
close() { close() {
this.show = !this.show this.show = !this.show
}, },
showCouponsPopup() { showCouponsPopup() {
if (this.isLotteryOrder()) return
if (this.couponList.usable.length === 0) return if (this.couponList.usable.length === 0) return
this.show = !this.show this.show = !this.show
}, },
// v9-2 // v9-2
changeCoupons(item) { changeCoupons(item) {
if (this.isLotteryOrder()) return
if(!item) return if(!item) return
if (this.couponList.usable.length === 0) return if (this.couponList.usable.length === 0) return
this.show = !this.show this.show = !this.show
@@ -1007,4 +1047,5 @@ export default {
padding: 20rpx 0 0 0; padding: 20rpx 0 0 0;
color: #999; color: #999;
} }
</style> </style>
-34
View File
@@ -1,34 +0,0 @@
<template>
<view class="payment-status">
<!--失败时 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-red-->
<view class="iconfont icon-duihao2 bg-color-red"></view>
<!-- 失败时订单支付失败 -->
<view class="status">订单支付成功</view>
<view class="wrapper">
<view class="item acea-row row-between-wrapper">
<view>订单编号</view>
<view class="itemCom">wx3265361456134568</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>下单时间</view>
<view class="itemCom">2019-01-09 18:05</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>支付方式</view>
<view class="itemCom">微信支付</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>支付金额</view>
<view class="itemCom">2222.00</view>
</view>
<!--失败时加上这个 -->
<!--<view class='item acea-row row-between-wrapper'>-->
<!--<view>失败原因</view>-->
<!--<view class='itemCom'>账户余额不足</view>-->
<!--</view>-->
</view>
<!--失败时 重新购买 -->
<view class="returnBnt bg-color-red">返回查看订单</view>
<view class="returnBnt cart-color">返回首页</view>
</view>
</template>
+101 -14
View File
@@ -32,9 +32,9 @@
<image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image> <image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image>
</view> </view>
</view> </view>
<view v-if="couponListLimit2ToShow.length > 0 || attr.productSelect.earnPoints" class="v12-mt-1 v12-mb-1"> <view v-if="(!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0) || attr.productSelect.earnPoints" class="v12-mt-1 v12-mb-1">
<view class="cell flex jc-between ai-center"> <view class="cell flex jc-between ai-center">
<view v-if="couponListLimit2ToShow.length > 0" class="v12-justify-start"> <view v-if="!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0" class="v12-justify-start">
<view <view
v-for="(item, index) in couponListLimit2ToShow" v-for="(item, index) in couponListLimit2ToShow"
:key="index" :key="index"
@@ -48,7 +48,7 @@
</view> </view>
<view <view
v-if="couponListLimit2ToShow.length > 0" v-if="!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0"
class="value value2 v12-font-24 v12-primary-text" class="value value2 v12-font-24 v12-primary-text"
@click="changeCoupons()" @click="changeCoupons()"
> >
@@ -201,7 +201,7 @@
</view> </view>
<!-- v9 优惠券开始 --> <!-- v9 优惠券开始 -->
<u-popup :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons()"> <u-popup v-if="!isCountyLotteryGoodsDetail()" :show="show" :round="10" mode="bottom" closeOnClickOverlay @close="changeCoupons()">
<CouponsPopup <CouponsPopup
:two-list="couponList" :two-list="couponList"
@ok="setCoupon" @ok="setCoupon"
@@ -493,6 +493,7 @@
ref="attrWindow" ref="attrWindow"
:attr="attr" :attr="attr"
:cartNum="cart_num" :cartNum="cart_num"
:hideQuantityControls="source === 'countyLottery' && Number(activityId) > 0"
@changeFun="changeFun" @changeFun="changeFun"
:isNegotiable="storeInfo.isNegotiable === 1" :isNegotiable="storeInfo.isNegotiable === 1"
@gift="gift" @gift="gift"
@@ -539,7 +540,7 @@ import {
getProductSkuBySelected getProductSkuBySelected
} from '@/api/store' } from '@/api/store'
import { userBindParent } from '@/api/user' import { userBindParent } from '@/api/user'
import { handleQrCode, isWeixin } from '@/utils' import { handleLoginFailure, handleQrCode, isWeixin } from '@/utils'
import { getHomeData } from '@/api/public' import { getHomeData } from '@/api/public'
import { import {
getDailyGoods, getDailyGoods,
@@ -654,7 +655,8 @@ export default {
pageKeyId: '', pageKeyId: '',
couponListLimit2ToShow: [], couponListLimit2ToShow: [],
qualifications: [], qualifications: [],
couponId: null couponId: null,
submitActionLock: false
} }
}, },
computed: mapGetters(['isLogin', 'location', 'userInfo']), computed: mapGetters(['isLogin', 'location', 'userInfo']),
@@ -820,6 +822,7 @@ export default {
} }
}, },
onShow() { onShow() {
this.submitActionLock = false
this.getMapData() this.getMapData()
getGiftCardSendBackground().then(res => { getGiftCardSendBackground().then(res => {
if (res.status === 200) { if (res.status === 200) {
@@ -875,6 +878,15 @@ export default {
}) })
}, },
goRoom() { goRoom() {
if (!this.isLogin) {
uni.showToast({
title: '请先登录后联系客服',
icon: 'none',
duration: 2000
})
handleLoginFailure()
return
}
console.log(this.storeInfo); console.log(this.storeInfo);
const params = { const params = {
goodsId: this.id, goodsId: this.id,
@@ -1070,12 +1082,12 @@ export default {
}, },
goStoreList() { goStoreList() {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/shop/StoreList/index' path: '/pagesShop/shop/StoreList/index'
}) })
}, },
goEvaluateList(id) { goEvaluateList(id) {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/shop/EvaluateList/index', path: '/pagesShop/shop/EvaluateList/index',
query: { query: {
id id
} }
@@ -1495,28 +1507,55 @@ export default {
case "day": case "day":
q.dailyGoodsId = Number(this.activityId) q.dailyGoodsId = Number(this.activityId)
break break
case "countyLottery":
q.drawActivityId = Number(this.activityId || 0)
break
} }
if (that.submitActionLock) {
return
}
that.submitActionLock = true
postCartAdd(q).then(function (res) { postCartAdd(q).then(function (res) {
that.isOpen = false that.isOpen = false
that.attr.cartAttr = false that.attr.cartAttr = false
if (news === 1) { if (news === 1) {
const orderQuery = {
id: res.data.cartId,
discount: that.storeInfo.discount,
}
if (that.source === 'countyLottery') {
orderQuery.from = 'countyLottery'
orderQuery.drawActivityId = Number(that.activityId || 0)
}
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/order/OrderSubmission/index", path: "/pages/order/OrderSubmission/index",
query: { query: orderQuery
id: res.data.cartId,
discount: that.storeInfo.discount,
}
}) })
setTimeout(() => {
that.submitActionLock = false
}, 1500)
return return
} }
if(news === 2) { if(news === 2) {
const coupId = that.couponId ? that.couponId : (that.couponList.usable[0] && that.couponList.usable[0].id || '') const coupId = that.couponId ? that.couponId : (that.couponList.usable[0] && that.couponList.usable[0].id || '')
let giftUrl = '/pkg_user/views/gift/gift?cartId=' + res.data.cartId
if (that.storeInfo.discount) {
giftUrl += '&discount=' + that.storeInfo.discount
}
if (that.source === 'countyLottery') {
giftUrl += '&from=countyLottery'
giftUrl += '&drawActivityId=' + Number(that.activityId || 0)
}
uni.navigateTo({ uni.navigateTo({
// + '&couponId=' + coupId // + '&couponId=' + coupId
url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + (that.storeInfo.discount ? '&discount=' + that.storeInfo.discount : '') url: giftUrl
}) })
setTimeout(() => {
that.submitActionLock = false
}, 1500)
} }
if(news === 0) { if(news === 0) {
that.submitActionLock = false
uni.showToast({ uni.showToast({
title: "添加购物车成功", title: "添加购物车成功",
icon: "success", icon: "success",
@@ -1529,6 +1568,7 @@ export default {
} }
}).catch(error => { }).catch(error => {
that.isOpen = false; that.isOpen = false;
that.submitActionLock = false
uni.showToast({ uni.showToast({
title: error.msg, title: error.msg,
icon: "none", icon: "none",
@@ -1564,11 +1604,16 @@ export default {
listenerActionClose() { listenerActionClose() {
this.posters = false this.posters = false
}, },
isCountyLotteryGoodsDetail() {
return this.source === 'countyLottery' && Number(this.activityId || 0) > 0
},
// v9-2 // v9-2
changeCoupons(e) { changeCoupons(e) {
if (this.isCountyLotteryGoodsDetail()) return
this.show = !this.show this.show = !this.show
}, },
setCoupon(couponId) { setCoupon(couponId) {
if (this.isCountyLotteryGoodsDetail()) return
this.couponId = couponId this.couponId = couponId
}, },
async checkFavorite() { async checkFavorite() {
@@ -1874,7 +1919,8 @@ export default {
} }
.btn-buy-disabled { .btn-buy-disabled {
background: #9D9D9D; background: #9D9D9D !important;
color: #FFFFFF !important;
} }
} }
@@ -2102,6 +2148,7 @@ export default {
.product-con .footer{ .product-con .footer{
height: 140rpx !important; height: 140rpx !important;
padding-bottom: 20rpx; padding-bottom: 20rpx;
// z-index: 1002 !important;
} }
.product-con .product-intro .conter view { .product-con .product-intro .conter view {
width: 100% !important; width: 100% !important;
@@ -2234,3 +2281,43 @@ export default {
word-break: keep-all; word-break: keep-all;
} }
</style> </style>
}
.gift-wrap{
position: relative;
}
.gift-bg{
position: absolute;
left: 0;
width: 100%;
}
.ll-text{
margin-left: 250rpx;
word-break: keep-all;
}
</style>
.gift-img{
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
}
.gift-wrap{
position: relative;
}
.gift-bg{
position: absolute;
left: 0;
width: 100%;
}
.ll-text{
margin-left: 250rpx;
word-break: keep-all;
}
</style>
left: 0;
width: 100%;
}
.ll-text{
margin-left: 250rpx;
word-break: keep-all;
}
</style>
+44 -7
View File
@@ -86,7 +86,7 @@
</view> </view>
</view> </view>
<view class="my-hdeader-bottom"> <view class="my-hdeader-bottom">
<view class="item" @click="linkTo('/pages/user/UserBill/index')"> <view class="item" @click="linkTo('/pagesUser/user/UserBill/index')">
<view v-if="!isNoLogin" class="number"> <view v-if="!isNoLogin" class="number">
{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }} {{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}
</view> </view>
@@ -98,7 +98,7 @@
余额 余额
</view> </view>
</view> </view>
<view class="item" @click="linkTo('/pages/user/Points/index')"> <view class="item" @click="linkTo('/pagesUser/user/Points/index')">
<view v-if="!isNoLogin" class="number"> <view v-if="!isNoLogin" class="number">
{{ userInfo.integral || 0 }} {{ userInfo.integral || 0 }}
</view> </view>
@@ -215,6 +215,16 @@
</view> </view>
</view> </view>
</view> </view>
<view
v-if="(store.getters.token || userInfo.uid) &&
drawConfig.myTicketImageEnable === 1 &&
drawConfig.myTicketImage
"
class="my-ticket-entry"
@click="goMyTicketList"
>
<image :src="drawConfig.myTicketImage" mode="widthFix" class="img" />
</view>
<!-- 我的服务开始 --> <!-- 我的服务开始 -->
<view class="myService" style="margin-top: 30rpx !important;"> <view class="myService" style="margin-top: 30rpx !important;">
<view class="title acea-row row-middle"> <view class="title acea-row row-middle">
@@ -301,6 +311,7 @@ import {
noticeList, noticeList,
getUserCenterBanner getUserCenterBanner
} from "@/api/user" } from "@/api/user"
import { getDrawConfig } from '@/api/lottery'
import {isWeixin} from "@/utils" import {isWeixin} from "@/utils"
import cookie from "@/utils/store/cookie" import cookie from "@/utils/store/cookie"
import { pageListenMixins } from '@/mixins/pageListenMixins' import { pageListenMixins } from '@/mixins/pageListenMixins'
@@ -364,7 +375,7 @@ export default {
}, },
{ {
text: '账户明细', text: '账户明细',
url: '/pages/user/UserBill/index', url: '/pagesUser/user/UserBill/index',
icon: '/icon/icon-coin.png', icon: '/icon/icon-coin.png',
allowEnter: true allowEnter: true
}, },
@@ -376,19 +387,23 @@ export default {
}, },
{ {
text: '团队管理', text: '团队管理',
url: '/pages/user/promotion/UserPromotion/index', url: '/pagesUser/user/promotion/UserPromotion/index',
icon: '/icon/icon-users.png', icon: '/icon/icon-users.png',
allowEnter: true allowEnter: true
}, },
{ {
text: '商品足迹', text: '商品足迹',
url: '/pages/user/History/index', url: '/pagesUser/user/History/index',
icon: '/icon/icon-help.png', icon: '/icon/icon-help.png',
allowEnter: true allowEnter: true
} }
], ],
bannerBgUrl: '', bannerBgUrl: '',
userCenterBannerUrl: '', userCenterBannerUrl: '',
drawConfig: {
myTicketImage: '',
myTicketImageEnable: 0
},
pageKeyId: Object.freeze('userIndex'), pageKeyId: Object.freeze('userIndex'),
nowrap: true, nowrap: true,
// 是否已登录 // 是否已登录
@@ -413,6 +428,7 @@ export default {
this.getUserLevelInfoReq() this.getUserLevelInfoReq()
this.isWeixin = isWeixin() this.isWeixin = isWeixin()
// this.getUnreadMsgList() // this.getUnreadMsgList()
this.getDrawConfigReq()
} else { } else {
this.isNoLogin = true this.isNoLogin = true
/* /*
@@ -429,6 +445,19 @@ export default {
}, },
methods: { methods: {
...mapMutations(['updateAuthorizationPage']), ...mapMutations(['updateAuthorizationPage']),
getDrawConfigReq() {
getDrawConfig().then(res => {
if (res && res.data) {
this.drawConfig = {
myTicketImage: res.data.myTicketImage || '',
myTicketImageEnable: Number(res.data.myTicketImageEnable) || 0
}
}
}).catch(() => {})
},
goMyTicketList() {
this.linkTo('/pkg-video/views/county-my-tickets')
},
// 新增方法:计算文本像素长度 // 新增方法:计算文本像素长度
getTextWidth() { getTextWidth() {
this.$nextTick(() => { this.$nextTick(() => {
@@ -486,7 +515,7 @@ export default {
} }
}, },
goReturnList() { goReturnList() {
this.$yrouter.push('/pages/order/ReturnList/index') this.$yrouter.push('/pagesOrder/order/ReturnList/index')
}, },
goMyOrder(type) { goMyOrder(type) {
if (this.isNoLogin) { if (this.isNoLogin) {
@@ -509,7 +538,7 @@ export default {
}, },
goUserAccount() { goUserAccount() {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/user/UserAccount/index' path: '/pagesUser/user/UserAccount/index'
}) })
}, },
goPersonalData() { goPersonalData() {
@@ -681,6 +710,14 @@ export default {
} }
.my-wrapper { .my-wrapper {
padding: 30upx; padding: 30upx;
.my-ticket-entry {
margin-top: 30rpx;
.img {
width: 100%;
border-radius: 24rpx;
display: block;
}
}
&.wrapper { &.wrapper {
padding: 0 0 30rpx 0 !important; padding: 0 0 30rpx 0 !important;
} }
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -588,7 +588,8 @@ export default {
pageKeyId: '', pageKeyId: '',
shareImg: '', shareImg: '',
videoPlayers: [], videoPlayers: [],
isView: false isView: false,
skipRefreshOnShow: false
} }
}, },
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景 // 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
@@ -679,6 +680,10 @@ export default {
if (!this.isLoad) { if (!this.isLoad) {
return return
} }
if (this.skipRefreshOnShow) {
this.skipRefreshOnShow = false
return
}
this.fetchInnDetail() this.fetchInnDetail()
if(this.isView) return if(this.isView) return
if(this.activeIndex === 1) { if(this.activeIndex === 1) {
@@ -834,6 +839,7 @@ export default {
}) })
}, },
infoClick: function (info) { infoClick: function (info) {
this.skipRefreshOnShow = true
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id) this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
}, },
coverPlay(){ coverPlay(){
File diff suppressed because it is too large Load Diff
@@ -76,7 +76,7 @@ export default {
}, },
goOrderDetails(order) { goOrderDetails(order) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/order/OrderDetails/index", path: "/pagesOrder/order/OrderDetails/index",
query: {id: order.orderId} query: {id: order.orderId}
}); });
}, },
@@ -39,6 +39,9 @@
:src="historyItem.image" :src="historyItem.image"
mode="scaleToFill" mode="scaleToFill"
/> />
<view v-if="isInvalidItem(historyItem)" class="invalid-mask">
<text class="invalid-mask-text">商品已下架</text>
</view>
<view class="good-info"> <view class="good-info">
<view <view
v-if="historyItem.couponName" v-if="historyItem.couponName"
@@ -179,6 +182,13 @@ export default {
return str.replace(regx, '') return str.replace(regx, '')
}, },
goodsDetail (item) { goodsDetail (item) {
if (this.isInvalidItem(item)) {
uni.showToast({
title: '商品已下架',
icon: 'none'
})
return
}
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/shop/GoodsCon/index', path: '/pages/shop/GoodsCon/index',
query: { query: {
@@ -186,6 +196,11 @@ export default {
} }
}) })
}, },
isInvalidItem(item) {
if (!item) return false
if (item.isInvalid === true || item.isInvalid === 'true') return true
return Number(item.isInvalid) === 1
},
deleteHistoryItem(historyItem) { deleteHistoryItem(historyItem) {
const id = historyItem.id const id = historyItem.id
if (!id) return if (!id) return
@@ -276,6 +291,26 @@ export default {
width: 226rpx; width: 226rpx;
height: 226rpx; height: 226rpx;
} }
.invalid-mask{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
.invalid-mask-text{
color: #fff;
font-size: 24rpx;
padding: 8rpx 16rpx;
border: 1px solid rgba(255, 255, 255, 0.7);
border-radius: 24rpx;
background: rgba(0, 0, 0, 0.2);
}
}
.good-info { .good-info {
padding: 12rpx 12rpx 20rpx 12rpx; padding: 12rpx 12rpx 20rpx 12rpx;
.price { .price {
@@ -97,13 +97,7 @@ export default {
methods: { methods: {
dataFormat, dataFormat,
toDetail(mid){ toDetail(mid){
this.$yrouter.push('/pages/user/MessageDetail/MessageDetail?id='+mid); this.$yrouter.push('/pagesUser/user/MessageDetail/MessageDetail?id='+mid);
// this.$yrouter.push({
// path: "/pages/user/MessageDetail/MessageDetail",
// query: {
// id:mid
// }
// });
} }
}, },
onLoad:function(e){ onLoad:function(e){
@@ -198,7 +198,7 @@ export default {
}, },
goOrderDetails(order) { goOrderDetails(order) {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/order/OrderDetails/index', path: '/pagesOrder/order/OrderDetails/index',
query: { query: {
id: order.orderId id: order.orderId
} }
@@ -129,7 +129,7 @@ export default {
// //
toggleProtocolPage() { toggleProtocolPage() {
//this.$refs.popup.open(); //this.$refs.popup.open();
this.$yrouter.push('/pages/user/UpgradeProtocolDetail/UpgradeProtocolDetail') this.$yrouter.push('/pagesUser/user/UpgradeProtocolDetail/UpgradeProtocolDetail')
}, },
chooseIdCardFrontImage() { chooseIdCardFrontImage() {
@@ -8,7 +8,7 @@
<view style="color: #fff;">总资产()</view> <view style="color: #fff;">总资产()</view>
<view class="money">{{ now_money }}</view> <view class="money">{{ now_money }}</view>
</view> </view>
<!-- <navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator> --> <!-- <navigator url="/pagesUser/user/Recharge/index" class="recharge font-color-red">充值</navigator> -->
</view> </view>
<view class="cumulative acea-row row-top"> <view class="cumulative acea-row row-top">
<view class="item"> <view class="item">
@@ -66,7 +66,7 @@ export default {
methods: { methods: {
goUserBill(types) { goUserBill(types) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/user/UserBill/index", path: "/pagesUser/user/UserBill/index",
query: { types } query: { types }
}); });
}, },
@@ -25,8 +25,7 @@ export default {
}, },
methods: { methods: {
goUserPromotion() { goUserPromotion() {
this.$yrouter.back(); this.$yrouter.back();
// this.$yrouter.push({ path: "/pages/user/promotion/UserPromotion/index" });
} }
} }
}; };
@@ -127,19 +127,19 @@ export default {
return this.$force2Decimal(v); return this.$force2Decimal(v);
}, },
goPoster() { goPoster() {
this.$yrouter.push("/pages/user/promotion/Poster/index"); this.$yrouter.push("/pagesUser/user/promotion/Poster/index");
}, },
goCashRecord() { goCashRecord() {
this.$yrouter.push('/pkg_user/views/withdrawalLog'); this.$yrouter.push('/pkg_user/views/withdrawalLog');
}, },
goPromoterList() { goPromoterList() {
this.$yrouter.push("/pages/user/promotion/PromoterList/index"); this.$yrouter.push("/pagesUser/user/promotion/PromoterList/index");
}, },
goCommissionDetails() { goCommissionDetails() {
this.$yrouter.push("/pages/user/promotion/CommissionDetails/index"); this.$yrouter.push("/pagesUser/user/promotion/CommissionDetails/index");
}, },
goPromoterOrder() { goPromoterOrder() {
this.$yrouter.push("/pages/user/promotion/PromoterOrder/index"); this.$yrouter.push("/pagesUser/user/promotion/PromoterOrder/index");
}, },
getInfo: function() { getInfo: function() {
let that = this; let that = this;
-924
View File
@@ -1,924 +0,0 @@
{
"easycom": {
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/Loading/index",
"style": {
"navigationBarTitleText": "香道滇",
"navigationStyle": "custom"
}
},
{
"path": "pages/authorization/index",
"style": {
"navigationBarTitleText": "微信授权"
}
},
{
"path": "pages/user/Login/index",
"style": {
"navigationBarTitleText": "登录"
}
},
{
"path": "pages/user/RetrievePassword/index",
"style": {
"navigationBarTitleText": "重置密码"
}
},
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "香道滇",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "components/chose-city/chose-city",
"style": {
"navigationBarTitleText": "选择城市"
}
},
{
"path": "pages/foodInfomation/information",
"style": {
"navigationBarTitleText": "彩云资讯"
}
},
{
"path": "pages/foodInfomation/foodInfomation",
"style": {
"navigationBarTitleText": "美食攻略",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
}
},
{
"path": "pages/foodInfomation/foodInfomationDetail",
"style": {
"navigationBarTitleText": "资讯详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/shop/GoodSearch/index",
"style": {
"navigationBarTitleText": "搜索商品"
}
},
{
"path": "pages/shop/GoodsClass/index",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/ShoppingCart/index",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/StoreList/index",
"style": {
"navigationBarTitleText": "商家列表"
}
},
{
"path": "pages/shop/GoodsList/index",
"style": {
"navigationBarTitleText": "商品列表"
}
},
{
"path": "pages/NotDefined/index",
"style": {
"navigationBarTitleText": "404"
}
},
// {
// "path": "pages/cloud/cloud",
// "style": {
// "navigationBarTitleText": "七彩云上"
// }
// },
{
"path": "pages/cloud/haveFun",
"style": {
"navigationBarTitleText": "寻趣味",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/User/index",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/GoodsCollection/index",
"style": {
"navigationBarTitleText": "商品收藏"
}
},
{
"path": "pages/shop/EvaluateList/index",
"style": {
"navigationBarTitleText": "评价列表"
}
},
{
"path": "pages/shop/GoodsEvaluate/index",
"style": {
"navigationBarTitleText": "商品评价"
}
},
{
"path": "pages/shop/GoodsPromotion/index",
"style": {
"navigationBarTitleText": "促销商品"
}
},
{
"path": "pages/shop/HotNewGoods/index",
"style": {
"navigationBarTitleText": "热门商品"
}
},
{
"path": "pages/shop/GoodsCon/index",
"style": {
"navigationBarTitleText": "商品详情",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/user/address/AddAddress/index",
"style": {
"navigationBarTitleText": "新增收货地址"
}
},
{
"path": "pages/user/UserAccount/index",
"style": {
"navigationBarTitleText": "账户余额"
}
},
{
"path": "pages/user/address/AddressManagement/index",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "pages/user/promotion/Poster/index",
"style": {
"navigationBarTitleText": "推广名片"
}
},
{
"path": "pages/user/signIn/Sign/index",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "pages/user/signIn/SignRecord/index",
"style": {
"navigationBarTitleText": "签到记录"
}
},
{
"path": "pages/user/promotion/CashAudit/index",
"style": {
"navigationBarTitleText": "提现结果"
}
},
{
"path": "pages/user/promotion/PromoterOrder/index",
"style": {
"navigationBarTitleText": "分销详情"
}
},
{
"path": "pages/user/promotion/PromoterList/index",
"style": {
"navigationBarTitleText": "分销列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/promotion/UserPromotion/index",
"style": {
"navigationBarTitleText": "团队管理",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UserBill/index",
"style": {
"navigationBarTitleText": "账单记录"
}
},
{
"path": "pages/user/promotion/CashRecord/index",
"style": {
"navigationBarTitleText": "提现记录"
}
},
{
"path": "pages/user/promotion/CommissionDetails/index",
"style": {
"navigationBarTitleText": "佣金明细"
}
},
{
"path": "pages/user/signIn/Integral/index",
"style": {
"navigationBarTitleText": "我的积分"
}
},
{
"path": "pages/user/UserVip/index",
"style": {
"navigationBarTitleText": "用户vip"
}
},
{
"path": "pages/user/coupon/UserCoupon/index",
"style": {
"navigationBarTitleText": "优惠券"
}
},
{
"path": "pages/user/coupon/GetCoupon/index",
"style": {
"navigationBarTitleText": "领取优惠券"
}
},
{
"path": "pages/user/promotion/UserCash/index",
"style": {
"navigationBarTitleText": "提现"
}
},
{
"path": "pages/user/CustomerList/index",
"style": {
"navigationBarTitleText": "客服列表"
}
},
{
"path": "pages/user/Recharge/index",
"style": {
"navigationBarTitleText": "充值"
}
},
{
"path": "pages/order/MyOrder/index",
"style": {
"navigationBarTitleText": "我的订单",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "pages/order/Logistics/index",
"style": {
"navigationBarTitleText": "查看物流"
}
},
{
"path": "pages/order/OrderDetails/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "pages/order/OrderSubmission/index",
"style": {
"navigationBarTitleText": "提交订单",
"navigationBarBackgroundColor": "#fff"
}
},
{
"path": "pages/order/PaymentStatus/index",
"style": {
"navigationBarTitleText": "支付状态"
}
},
{
"path": "pages/order/GoodsReturn/index",
"style": {
"navigationBarTitleText": "商品退货"
}
},
{
"path": "pages/order/ReturnList/index",
"style": {
"navigationBarTitleText": "退货列表"
}
},
{
"path": "pages/orderAdmin/OrderIndex/index",
"style": {
"navigationBarTitleText": "商家订单统计"
}
},
{
"path": "pages/orderAdmin/AdminOrderList/index",
"style": {
"navigationBarTitleText": "订单"
}
},
{
"path": "pages/orderAdmin/GoodsDeliver/index",
"style": {
"navigationBarTitleText": "发货"
}
},
{
"path": "pages/orderAdmin/AdminOrder/index",
"style": {
"navigationBarTitleText": "商家订单列表"
}
},
{
"path": "pages/orderAdmin/Statistics/index",
"style": {
"navigationBarTitleText": "商家统计数据"
}
},
{
"path": "pages/orderAdmin/OrderCancellation/index",
"style": {
"navigationBarTitleText": "商家取消订单"
}
},
{
"path": "pages/activity/Poster/index",
"style": {
"navigationBarTitleText": "推广海报"
}
},
{
"path": "pages/activity/DargainDetails/index",
"style": {
"navigationBarTitleText": "帮砍价"
}
},
{
"path": "pages/activity/GoodsBargain/index",
"style": {
"navigationBarTitleText": "砍价列表"
}
},
{
"path": "pages/activity/BargainRecord/index",
"style": {
"navigationBarTitleText": "砍价记录"
}
},
{
"path": "pages/activity/GoodsGroup/index",
"style": {
"navigationBarTitleText": "团购商品列表"
}
},
{
"path": "pages/activity/GroupDetails/index",
"style": {
"navigationBarTitleText": "团购商品详情"
}
},
{
"path": "pages/activity/GroupRule/index",
"style": {
"navigationBarTitleText": "团购规则"
}
},
{
"path": "pages/activity/GoodsSeckill/index",
"style": {
"navigationBarTitleText": "秒杀"
}
},
{
"path": "pages/activity/SeckillDetails/index",
"style": {
"navigationBarTitleText": "秒杀详情"
}
},
{
"path": "pages/map/index",
"style": {
"navigationBarTitleText": "地图"
}
},
{
"path": "pages/user/Message/Message",
"style": {
"navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/MessageDetail/MessageDetail",
"style": {
"navigationBarTitleText": "消息详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/MemberUpgradeIntro/MemberUpgradeIntro",
"style": {
"navigationBarTitleText": "升级说明",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/VideoPlayBackList/VideoPlayBackList",
"style": {
"navigationBarTitleText": "寻看点",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/VideoPlayBackList/VideoPlayBackDetail",
"style": {
"navigationBarTitleText": "视频详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UpgradeElectronicProtocol/UpgradeElectronicProtocol",
"style": {
"navigationBarTitleText": "升级",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UpgradeProtocolDetail/UpgradeProtocolDetail",
"style": {
"navigationBarTitleText": "共享股东协议"
}
},
{
"path": "pages/LiveAndShortVideo/LiveAndShortVideo",
"style": {
"navigationBarTitleText": "直播/视频"
}
},
{
"path": "pages/LiveBroadcastList/LiveBroadcastList",
"style": {
"navigationBarTitleText": "直播列表"
}
},
{
"path": "pages/user/UserFavorite/UserFavorite",
"style": {
"navigationBarTitleText": "我的喜欢"
}
}
],
"subPackages": [
{
"root": "pagesInn",
"pages": [
{
"path": "inn/innHome",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "inn/innApply",
"style": {
"navigationBarTitleText": "店铺申请"
}
},
{
"path": "inn/innInfoPublish",
"style": {
"navigationBarTitleText": "发布店铺动态"
}
},
{
"path": "inn/innProfileEdit",
"style": {
"navigationBarTitleText": "修改店铺资料"
}
},
{
"path": "inn/innInfoDetail",
"style": {
"navigationBarTitleText": "资讯详情"
}
},
{
"path": "inn/innPartnerAgreement",
"style": {
"navigationBarTitleText": "店主合伙人条款协议"
}
}
]
},
{
"root": "pkg_common",
"pages": [
{
"path": "views/pdf",
"style": {
"navigationBarTitleText": "详情"
}
},
{
"path": "views/room",
"style": {
"navigationBarTitleText": "客服"
}
},
{
"path": "views/roomLogs",
"style": {
"navigationBarTitleText": "历史会话"
}
},
{
"path": "views/xiaoZhi",
"style": {
"navigationBarTitleText": ""
}
}
]
},
{
"root": "pkg_join",
"pages": [
{
"path": "views/index",
"style": {
"navigationBarTitleText": "商户入驻"
}
},
{
"path": "views/shop",
"style": {
"navigationBarTitleText": "店铺入驻"
}
},
{
"path": "views/supplier",
"style": {
"navigationBarTitleText": "供应商入驻"
}
},
{
"path": "views/wholesaler",
"style": {
"navigationBarTitleText": "采购批发商入驻"
}
}
]
},
{
"root": "pkg_orders",
"pages": [
{
"path": "views/refund",
"style": {
"navigationBarTitleText": "申请退款"
}
}
]
},
{
"root": "pkg_product",
"pages": [
{
"path": "views/healthList",
"style": {
"navigationBarTitleText": "康养 · 食材"
}
},
{
"path": "views/giftList",
"style": {
"navigationBarTitleText": "特色礼品",
"onReachBottomDistance": 100
}
},
{
"path": "views/landMark",
"style": {
"navigationBarTitleText": "地标好物"
}
},
{
"path": "views/famousList",
"style": {
"navigationBarTitleText": "千县名品"
}
},
{
"path": "views/famousStory",
"style": {
"navigationBarTitleText": "名品故事"
}
},
{
"path": "views/famousHot",
"style": {
"navigationBarTitleText": "爆款主推"
}
},
{
"path": "views/scenicSpot",
"style": {
"navigationBarTitleText": "景点门票"
}
},
{
"path": "views/seckill",
"style": {
"navigationBarTitleText": "天天秒杀"
}
},
{
"path": "views/sharpList",
"style": {
"navigationBarTitleText": "尖货推荐"
}
},
{
"path": "views/nativeList",
"style": {
"navigationBarTitleText": "特产",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FF564A"
}
},
{
"path": "views/seasonList",
"style": {
"navigationBarTitleText": "时令尝鲜"
}
},
{
"path": "views/season",
"style": {
"navigationBarTitleText": "时令尝鲜"
}
}
]
},
{
"root": "pkg_user",
"pages": [
{
"path": "views/bankCardList",
"style": {
"navigationBarTitleText": "银行卡列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "views/addBankCard",
"style": {
"navigationBarTitleText": "添加银行卡",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "views/withdrawal",
"style": {
"navigationBarTitleText": "提现",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "views/personalData",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "views/bindPhone",
"style": {
"navigationBarTitleText": "绑定手机号"
}
},
{
"path": "views/payPassword",
"style": {
"navigationBarTitleText": "修改支付密码"
}
}
]
},
{
"root": "v4",
"pages": [
{
"path": "views/preSale/preSale",
"style": {
"navigationBarTitleText": "预售"
}
},
{
"path": "views/seckill/seckill",
"style": {
"navigationBarTitleText": "限时秒杀"
}
},
{
"path": "views/offer/offer",
"style": {
"navigationBarTitleText": "每天特价"
}
},
{
"path": "components/select-city",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "views/specialty/specialty",
"style": {
"navigationBarTitleText": "特产",
"enablePullDownRefresh": true
}
},
{
"path": "views/shop/shop",
"style": {
"navigationBarTitleText": "店铺"
}
},
{
"path": "views/shop/detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "views/trial/trial",
"style": {
"navigationBarTitleText": "体验店"
}
},
{
"path": "views/live/live",
"style": {
"navigationBarTitleText": "直播"
}
},
{
"path": "views/attract/attract",
"style": {
"navigationBarTitleText": "招商"
}
},
{
"path": "views/attract/project",
"style": {
"navigationBarTitleText": "招商项目"
}
},
{
"path": "views/attract/projectList",
"style": {
"navigationBarTitleText": "招商项目"
}
},
{
"path": "views/luck/luck",
"style": {
"navigationBarTitleText": "幸运抽奖"
}
},
{
"path": "views/luck/logs",
"style": {
"navigationBarTitleText": "抽奖记录"
}
},
{
"path": "views/luck/receive",
"style": {
"navigationBarTitleText": "选择收货地址"
}
}
]
},
{
"root": "wenwan",
"pages": [
{
"path": "views/goodsClass",
"style": {
"navigationBarTitleText": "文玩"
}
},
{
"path": "views/store",
"style": {
"navigationBarTitleText": "文玩店铺详情",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "views/storeList",
"style": {
"navigationBarTitleText": "文玩"
}
}
]
}
],
"preloadRule": {
"pages/user/User/index": {
"network": "all",
"packages": [
"pagesInn"
]
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#8B8F99",
"selectedColor": "#FF564A",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/home/index",
"iconPath": "static/tabbar/icon-home.png",
"selectedIconPath": "static/tabbar/icon-home-hot.png",
"text": "首页"
},
{
"pagePath": "pages/shop/ShoppingCart/index",
"iconPath": "static/tabbar/icon-cart.png",
"selectedIconPath": "static/tabbar/icon-cart-hot.png",
"text": "购物车"
},
{
"pagePath": "pages/cloud/haveFun",
"iconPath": "static/tabbar/icon-cloud.png",
"selectedIconPath": "static/tabbar/icon-cloud-hot.png",
"text": "寻趣味"
},
{
"pagePath": "pages/user/User/index",
"iconPath": "static/tabbar/icon-user.png",
"selectedIconPath": "static/tabbar/icon-user-hot.png",
"text": "我的"
}
]
},
"condition": {
"current": 0,
"list": [
{
"name": "商品详情",
"path": "pages/shop/GoodsCon/index",
"query": "id=369"
},
{
"name": "DEBUG",
"path": "pages/shop/ShoppingCart/index",
"query": "id=297"
},
{
"name": "No.8",
"path": "pages/shop/GoodsEvaluate/index",
"query": "id=eb30f8a98b1c4952addbdccb1d37533d"
},
{
"name": "时令尝鲜",
"path": "pkg_product/views/season",
"query": "id=20"
}
]
}
}
File diff suppressed because it is too large Load Diff
+880
View File
@@ -0,0 +1,880 @@
<template>
<view class="claim-page">
<!-- <view class="custom-header" :style="{ paddingTop: `${statusBarHeight}px` }">
<view class="header-inner">
<view class="header-back" @click="goBack">
<u-icon name="arrow-left" size="24" color="#333" class="header-back-icon"></u-icon>
</view>
<view class="header-title">填写收货地址</view>
<view class="header-right">
<view class="dot"></view>
<view class="ring"></view>
</view>
</view>
</view> -->
<scroll-view class="page-body" scroll-y >
<view class="card prize-card">
<view class="section-title">奖品信息</view>
<view class="prize-content">
<view class="prize-image-wrap">
<image class="prize-image" :src="prizeImage" mode="aspectFill" />
</view>
<view class="prize-info">
<view class="prize-name">{{ form.prizeName || '神秘奖品' }}</view>
<view class="prize-desc">{{ form.prizeAttrName || '默认' }}</view>
<view class="prize-code">抽奖码{{ form.ticketCode || '--' }}</view>
</view>
</view>
</view>
<view class="card form-card">
<view class="form-card-header">
<view class="form-card-title">填写收货地址</view>
<view class="select-address-entry" @click="chooseExistingAddress">
<text class="select-address-text" style="margin-bottom: 4rpx;">选择现有地址 </text>
<u-icon name="arrow-right" size="14" color="#BD3124"></u-icon>
</view>
</view>
<view class="form-row">
<text class="label">收货人</text>
<input v-model="form.realName" class="input" placeholder="请填写收货人" placeholder-style="color:#b2b2b2;" />
</view>
<view class="form-row">
<text class="label">手机号码</text>
<input
v-model="form.phone"
class="input"
type="number"
maxlength="11"
placeholder="请填写收货手机号"
placeholder-style="color:#b2b2b2;"
/>
</view>
<view class="form-row">
<text class="label">所在地区</text>
<view class="city-wrap">
<view class="city-select" :class="{'has-val': !!addressText}">
<CitySelect
ref="cityselect"
:defaultValue="addressText || '请选择'"
:items="district"
@callback="onCityChange"
/>
</view>
<image class="locate-icon" :src="`${webUrl}/home/dingwei.png`" mode="aspectFit" @click="getCurAddressFn"></image>
</view>
</view>
<view class="form-row no-border">
<text class="label">详细地址</text>
<input v-model="form.detail" class="input" placeholder="请填写具体地址" placeholder-style="color:#b2b2b2;" />
</view>
<view class="analysis-box">
<textarea
:value="addressInput"
@input="onAddressInput"
placeholder="请粘贴收件人手机号、姓名、收货地址并用空格区分,系统将自动识别地址信息"
placeholder-style="font-size:24rpx;color:#999;"
class="analysis-textarea"
/>
<view class="analysis-actions">
<view class="action-btn btn-clear" @click="clearAddressInput">清空</view>
<view class="action-btn btn-recognize" :class="{ disabled: !addressInput }" @click="recognizeAddress">识别</view>
</view>
</view>
</view>
<view class="tips">*请仔细核对收货信息提交后不可修改奖品将在{{ shipDayText }}个工作日内寄出</view>
</scroll-view>
<view class="submit-wrap">
<view class="submit-btn" @click="submit">确认提交</view>
</view>
<view class="popup-mask" v-if="showRealnamePopup" @click="closePopup">
<view class="popup-panel auth-panel" @click.stop>
<view class="popup-close" @click="closePopup">×</view>
<view class="popup-icon-wrap">
<image class="popup-realname-icon" :src="webUrl + '/home/shiming.png'" mode="aspectFit" />
</view>
<view class="popup-title">实名认证</view>
<view class="popup-desc">根据平台活动规则领取电子数码产品需要进行实名认证</view>
<view class="popup-actions">
<view class="popup-btn btn-confirm btn-wide" @click="goRealname">去实名认证</view>
</view>
</view>
</view>
<view class="popup-mask" v-if="showSubmitSuccessPopup" @click="confirmSuccess">
<view class="popup-panel success-panel" @click.stop>
<view class="popup-close" @click="confirmSuccess">×</view>
<view class="popup-icon-wrap">
<image class="popup-success-icon" :src="webUrl + '/home/qingzhu.png'" mode="aspectFit" />
</view>
<view class="popup-title">提交成功</view>
<view class="popup-desc">奖品将在{{ shipDayText }}个工作日内寄出</view>
<view class="popup-actions">
<view class="popup-btn btn-ghost" @click="confirmSuccess">返回</view>
<view class="popup-btn btn-confirm" @click="goMyTicket">查看</view>
</view>
</view>
</view>
</view>
</template>
<script>
import CitySelect from '@/components/CitySelect'
import { getCity, analysisAddress, postAddress } from '@/api/user'
import { claimCoupon, claimPrize, getDrawRealname } from '@/api/lottery'
import { getCurAddress, getLocation } from '@/utils/common'
export default {
name: 'CountyClaimAddressPage',
components: { CitySelect },
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
statusBarHeight: 20,
district: [],
addressText: '',
addressInput: '',
address: {
province: '',
city: '',
district: ''
},
form: {
lotteryRecordId: '',
prizeName: '',
prizeAttrName: '',
prizeType: '',
prizeTypeName: '',
prizeImage: '',
ticketCode: '',
realName: '',
phone: '',
detail: ''
},
showRealnamePopup: false,
showSubmitSuccessPopup: false,
shipDay: 7,
prizeInfo: {},
prizeOrderId: '',
userInfo: {},
realnameStatus: 0,
waitSubmitAfterRealname: false,
submitting: false
}
},
computed: {
prizeImage() {
return this.form.prizeImage || ''
},
shipDayText() {
const day = Number(this.shipDay)
if (!day || Number.isNaN(day) || day < 1) return 7
return day
}
},
onLoad(options) {
const routeParams = this.decodeRouteParams(options)
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
this.prizeInfo = routeParams
this.form = {
...this.form,
...routeParams,
lotteryRecordId: this.resolveLotteryRecordId(routeParams),
prizeName: routeParams.prizeName || '',
prizeAttrName: routeParams.prizeAttrName || '',
prizeType: routeParams.prizeType || '',
prizeTypeName: routeParams.prizeTypeName || '',
prizeImage: routeParams.prizeImage || '',
ticketCode: routeParams.ticketCode || ''
}
this.shipDay = Number(routeParams.shipDay || 0) || 7
this.getCityList()
this.fetchRealnameStatus()
},
onShow() {
this.handleChooseAddress()
const done = uni.getStorageSync('countyClaimAuthDone')
const needAutoSubmit = uni.getStorageSync('countyClaimNeedAutoSubmit')
if (done && (this.waitSubmitAfterRealname || needAutoSubmit)) {
uni.removeStorageSync('countyClaimAuthDone')
uni.removeStorageSync('countyClaimNeedAutoSubmit')
this.fetchRealnameStatus().then(() => {
this.submitPhysicalClaim()
})
}
},
methods: {
decodeRouteParams(options = {}) {
return Object.keys(options).reduce((result, key) => {
const value = options[key]
if (value === undefined || value === null) return result
try {
result[key] = decodeURIComponent(value)
} catch (e) {
result[key] = value
}
return result
}, {})
},
resolveLotteryRecordId(data = {}) {
return data.lotteryRecordId || data.id || data.ticketId || data.recordId || ''
},
goBack() {
uni.navigateBack()
},
chooseExistingAddress() {
uni.setStorageSync('sourceAddress', {
realName: this.form.realName || '',
phone: this.form.phone || '',
userAddress: `${this.address.province || ''}${this.address.city || ''}${this.address.district || ''}${this.form.detail || ''}`,
province: this.address.province || '',
city: this.address.city || '',
district: this.address.district || '',
detail: this.form.detail || ''
})
this.$yrouter.push({
path: '/pages/user/address/AddressManagement/index',
query: {
choosMode: 1
}
})
},
handleChooseAddress() {
const chooseAddress = uni.getStorageSync('chooseAddress') || {}
if (!chooseAddress.id) return
uni.setStorageSync('chooseAddress', {})
this.fillAddressForm(chooseAddress)
},
fillAddressForm(address = {}) {
this.form.realName = address.realName || address.real_name || ''
this.form.phone = address.phone || ''
this.form.detail = address.detail || ''
this.address = {
province: address.province || '',
city: address.city || '',
district: address.district || '',
city_id: address.city_id || address.cityId || address.city_id
}
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`.trim()
},
getCityList() {
getCity().then(res => {
this.district = res.data || []
})
},
fetchRealnameStatus() {
return getDrawRealname().then((res) => {
const data = (res && res.data) || {}
this.realnameStatus = Number(data.status || 0)
}).catch(() => {
this.realnameStatus = 0
})
},
isDigitalPrize() {
const typeVal = String(this.form.prizeType || '').toLowerCase()
const typeName = String(this.form.prizeTypeName || '').toLowerCase()
const prizeName = String(this.form.prizeName || '').toLowerCase()
if (['1', 'electronic', 'digital', 'electronics'].includes(typeVal)) return true
if (/电子|数码/.test(typeName)) return true
return /电子|数码/.test(prizeName)
},
hasRealNameAuth() {
if (Number(this.realnameStatus) === 1) return true
const user = this.userInfo || {}
const flag = [
user.isRealName,
user.realNameAuth,
user.isAuth,
user.authStatus,
user.realNameStatus,
user.idAuthStatus
]
if (flag.some(v => Number(v) === 1 || v === true || String(v).toUpperCase() === 'Y')) return true
if (Number(user.authStatus) === 2 || Number(user.realNameStatus) === 2 || Number(user.idAuthStatus) === 2) return true
return !!(String(user.realName || '').trim() && String(user.idCard || user.idcard || '').trim())
},
isCouponPrize() {
const typeVal = String(this.form.prizeType || '').toLowerCase()
const typeName = String(this.form.prizeTypeName || '')
const prizeName = String(this.form.prizeName || '')
if (['3', 'coupon'].includes(typeVal)) return true
return /券/.test(typeName) || /券/.test(prizeName)
},
async createAddress() {
const payload = {
id: '',
real_name: this.form.realName,
phone: this.form.phone,
address: this.address,
detail: this.form.detail,
is_default: false,
post_code: ''
}
const res = await postAddress(payload)
const addressId = Number(res && res.data && res.data.id)
if (!addressId) {
throw new Error('地址保存失败,请重试')
}
return addressId
},
validatePhysicalForm() {
if (!this.form.realName) {
uni.showToast({ title: '请填写收货人', icon: 'none' })
return false
}
if (!/^1\d{10}$/.test(this.form.phone)) {
uni.showToast({ title: '请输入正确手机号', icon: 'none' })
return false
}
if (!this.addressText) {
uni.showToast({ title: '请选择所在地区', icon: 'none' })
return false
}
if (!this.form.detail) {
uni.showToast({ title: '请填写详细地址', icon: 'none' })
return false
}
return true
},
async submitCouponClaim() {
const ticketId = Number(this.resolveLotteryRecordId(this.form))
if (!ticketId) {
uni.showToast({ title: '缺少抽奖券ID', icon: 'none' })
return
}
await claimCoupon(ticketId)
this.shipDay = Number(this.prizeInfo.shipDay || 0) || 7
this.prizeOrderId = ''
this.showSubmitSuccessPopup = true
},
async submitPhysicalClaim() {
if (this.submitting) return
if (!this.validatePhysicalForm()) return
const ticketId = Number(this.resolveLotteryRecordId(this.form))
if (!ticketId) {
uni.showToast({ title: '缺少抽奖券ID', icon: 'none' })
return
}
this.submitting = true
uni.showLoading({ title: '提交中...' })
try {
if (this.isDigitalPrize()) {
await this.fetchRealnameStatus()
if (!this.hasRealNameAuth()) {
this.waitSubmitAfterRealname = true
this.showRealnamePopup = true
return
}
}
const addressId = await this.createAddress()
const res = await claimPrize(ticketId, addressId)
const data = (res && res.data) || {}
this.shipDay = Number(data.shipDay || 0) || 7
this.prizeOrderId = String(data.orderId || '')
this.waitSubmitAfterRealname = false
this.showSubmitSuccessPopup = true
} catch (e) {
uni.showToast({
title: (e && e.msg) || (e && e.message) || '提交失败',
icon: 'none'
})
} finally {
uni.hideLoading()
this.submitting = false
}
},
onCityChange(values) {
this.address = {
province: values.province.name || '',
city: values.city.name || '',
district: values.district.name || '',
city_id: values.city.id
}
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`
},
async getCurAddressFn() {
uni.showLoading({ title: '定位中...' })
try {
const map = await getLocation()
if (map.length > 1) {
const { latitude, longitude } = map[1]
getCurAddress(latitude, longitude, (addr) => {
this.address = {
province: addr.province || '',
city: addr.city || '',
district: addr.county || ''
}
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`
this.form.detail = addr.formattedAddress || this.form.detail
})
}
} finally {
uni.hideLoading()
}
},
onAddressInput(e) {
this.addressInput = (e.detail && e.detail.value ? e.detail.value : '').trim()
},
clearAddressInput() {
this.addressInput = ''
},
recognizeAddress() {
if (!this.addressInput) return
uni.showLoading({ title: '识别中...' })
analysisAddress({ content: this.addressInput }).then((res) => {
uni.hideLoading()
const data = (res && res.data) || {}
this.form.realName = data.realName || this.form.realName
this.form.phone = data.phone || this.form.phone
this.form.detail = data.detail || this.form.detail
this.address = {
province: data.province || '',
city: data.city || '',
district: data.district || '',
city_id: data.cityId
}
this.addressText = `${this.address.province} ${this.address.city} ${this.address.district}`.trim()
}).catch(() => {
uni.hideLoading()
uni.showToast({
title: '识别失败,请手动填写',
icon: 'none'
})
})
},
async submit() {
if (this.isCouponPrize()) {
this.submitting = true
uni.showLoading({ title: '领取中...' })
try {
await this.submitCouponClaim()
} catch (e) {
uni.showToast({
title: (e && e.msg) || (e && e.message) || '领取失败',
icon: 'none'
})
} finally {
uni.hideLoading()
this.submitting = false
}
return
}
this.submitPhysicalClaim()
},
closePopup() {
this.showRealnamePopup = false
this.showSubmitSuccessPopup = false
},
goRealname() {
this.showRealnamePopup = false
uni.navigateTo({
url: '/pkg-video/views/county-realname'
})
},
confirmSuccess() {
this.showSubmitSuccessPopup = false
uni.redirectTo({
url: '/pkg-video/views/county-my-tickets'
})
},
goMyTicket() {
this.showSubmitSuccessPopup = false
uni.redirectTo({
url: `/pagesOrder/order/OrderDetails/index?id=${this.prizeOrderId}`
})
}
}
}
</script>
<style scoped lang="less">
.claim-page {
min-height: 100vh;
background: #F0F0F0;
}
.custom-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 20;
}
.header-inner {
height: 88rpx;
display: flex;
align-items: center;
padding: 0 24rpx;
}
.header-back {
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-back-icon {
font-size: 60rpx;
color: #111;
line-height: 1;
}
.header-title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: 700;
color: #222;
}
.header-right {
width: 88rpx;
height: 44rpx;
border-radius: 24rpx;
border: 2rpx solid #d8d8d8;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.dot {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: #111;
margin-right: 14rpx;
}
.ring {
width: 18rpx;
height: 18rpx;
border: 2rpx solid #111;
border-radius: 50%;
}
.page-body {
height: 100vh;
box-sizing: border-box;
padding: 20rpx 24rpx 220rpx;
}
.section-title {
color: #9b9b9b;
font-size: 28rpx;
margin-bottom: 18rpx;
}
.card {
background: #fff;
border-radius: 24rpx;
margin-bottom: 24rpx;
}
.prize-card {
padding: 24rpx;
}
.prize-content {
display: flex;
align-items: center;
}
.prize-image-wrap {
width: 182rpx;
height: 182rpx;
border-radius: 16rpx;
border: 2rpx solid #f0f0f0;
margin-right: 24rpx;
overflow: hidden;
flex-shrink: 0;
}
.prize-image {
width: 100%;
height: 100%;
}
.prize-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.prize-name {
font-size: 30rpx;
font-weight: 700;
color: #2f2f2f;
margin-bottom: 12rpx;
}
.prize-desc,
.prize-code {
font-size: 28rpx;
color: #9c9c9c;
margin-top: 8rpx;
}
.form-card {
padding: 0 24rpx 24rpx;
}
.form-card-header {
min-height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2rpx dashed #e5e5e5;
}
.form-card-title {
color: #262626;
font-size: 30rpx;
font-weight: 700;
}
.select-address-entry {
display: flex;
align-items: center;
color: #BD3124;
}
.select-address-text {
font-size: 26rpx;
margin-right: 8rpx;
}
.form-row {
min-height: 92rpx;
display: flex;
align-items: center;
border-bottom: 2rpx dashed #e5e5e5;
}
.form-row.no-border {
border-bottom: none;
}
.label {
width: 180rpx;
color: #262626;
font-size: 28rpx;
font-weight: 600;
}
.input {
flex: 1;
color: #333;
font-size: 28rpx;
}
.city-wrap {
flex: 1;
display: flex;
align-items: center;
}
.city-select {
flex: 1;
color: #b2b2b2;
font-size: 28rpx;
}
.city-select.has-val {
color: #333;
}
.locate-icon {
width: 42rpx;
height: 42rpx;
margin-left: 20rpx;
flex-shrink: 0;
}
.analysis-box {
background: #f8f8f8;
border-radius: 16rpx;
padding: 20rpx 20rpx 16rpx;
margin-top: 20rpx;
}
.analysis-textarea {
width: 100%;
height: 110rpx;
color: #333;
font-size: 30rpx;
}
.analysis-actions {
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 16rpx;
}
.action-btn {
font-size: 24rpx;
border-radius: 30rpx;
text-align: center;
}
.btn-clear {
color: #BD3124;
border: 2rpx solid #BD3124;
padding: 6rpx 32rpx;
margin-right: 20rpx;
background: transparent;
}
.btn-recognize {
color: #fff;
background: #BD3124;
border: 2rpx solid #BD3124;
padding: 6rpx 32rpx;
}
.btn-recognize.disabled {
opacity: 0.6;
}
.tips {
color: #2f2f2f;
font-size: 24rpx;
line-height: 1.5;
margin: 20rpx 10rpx;
}
.submit-wrap {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 24rpx 40rpx calc(30rpx + env(safe-area-inset-bottom));
}
.submit-btn {
height: 92rpx;
border-radius: 46rpx;
background: #BD3124;
color: #fff;
text-align: center;
line-height: 92rpx;
font-size: 40rpx;
font-weight: 700;
letter-spacing: 18rpx;
}
.popup-mask {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.48);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
padding: 0 52rpx;
}
.popup-panel {
width: 540rpx;
height: 550rpx;
background: #fff;
border-radius: 24rpx;
padding: 40rpx 32rpx;
position: relative;
box-sizing: border-box;
}
.popup-title {
text-align: center;
color: #333;
font-size: 50rpx;
font-weight: 700;
}
.popup-desc {
color: #666;
font-size: 28rpx;
line-height: 1.6;
text-align: center;
margin-top: 30rpx;
}
.popup-close {
position: absolute;
right: 20rpx;
top: 16rpx;
width: 44rpx;
height: 44rpx;
border: 4rpx solid #333;
border-radius: 50%;
font-size: 32rpx;
line-height: 44rpx;
text-align: center;
color: #333;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
}
.popup-icon-wrap {
display: flex;
justify-content: center;
}
.popup-icon {
font-size: 54rpx;
}
.popup-realname-icon {
width: 92rpx;
height: 92rpx;
}
.popup-success-icon {
width: 92rpx;
height: 92rpx;
}
.popup-actions {
display: flex;
align-items: center;
justify-content: center;
margin-top: 120rpx;
}
.popup-btn {
min-width: 180rpx;
height: 72rpx;
line-height: 72rpx;
border-radius: 36rpx;
text-align: center;
font-size: 28rpx;
}
.btn-confirm {
color: #fff;
background: #BD3124;
}
.btn-wide {
width: 100%;
}
.btn-ghost {
color: #BD3124;
border: 2rpx solid #BD3124;
background: #fff;
margin-right: 22rpx;
}
</style>
+171
View File
@@ -0,0 +1,171 @@
<template>
<view class="county-lottery-rules-page">
<!-- <view class="custom-header" :style="{ paddingTop: `${statusBarHeight}px` }">
<view class="header-inner">
<view class="header-back" @click="goBack">
<u-icon name="arrow-left" size="24" color="#333" class="header-back-icon"></u-icon>
</view>
<view class="header-title">活动规则</view>
<view class="header-right">
</view>
</view>
</view> -->
<view class="page-body" >
<view class="rule-card">
<view class="rule-content">
<rich-text v-if="ruleContent" :nodes="ruleContent" />
<view class="state-text" v-else>{{ loading ? '规则加载中...' : '暂无活动规则' }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getDrawRuleConfig } from '@/api/lottery'
export default {
name: 'CountyLotteryRulesPage',
data() {
return {
statusBarHeight: 20,
loading: true,
ruleContent: ''
}
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
this.fetchRuleConfig()
},
methods: {
fetchRuleConfig() {
this.loading = true
getDrawRuleConfig().then(res => {
const data = res.data || {}
this.ruleContent = data.ruleContent || ''
}).finally(() => {
this.loading = false
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
return
}
uni.switchTab({
url: '/pages/home/index'
})
}
}
}
</script>
<style scoped lang="less">
.county-lottery-rules-page {
min-height: 100vh;
background: #f5f5f5;
}
.custom-header {
position: fixed;
left: 0;
top: 0;
width: 100%;
background: #f5f5f5;
z-index: 20;
}
.header-inner {
height: 88rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
}
.header-back {
width: 56rpx;
height: 56rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.header-back-icon {
font-size: 44rpx;
color: #111;
line-height: 1;
margin-top: -4rpx;
}
.header-title {
flex: 1;
text-align: center;
margin-left: 56rpx;
font-size: 34rpx;
color: #333;
font-weight: 700;
}
.header-right {
width: 88rpx;
height: 44rpx;
border-radius: 24rpx;
border: 2rpx solid #d8d8d8;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.right-dot {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: #111;
margin-right: 14rpx;
}
.right-ring {
width: 18rpx;
height: 18rpx;
border-radius: 50%;
border: 2rpx solid #111;
}
.page-body {
padding: 24rpx;
box-sizing: border-box;
}
.rule-card {
background: #fff;
border-radius: 24rpx;
padding: 24rpx;
}
.rule-title {
font-size: 34rpx;
font-weight: 700;
color: #333;
line-height: 1.4;
}
.rule-content {
margin-top: 20rpx;
font-size: 32rpx;
color: #444;
line-height: 1.8;
}
.state-text {
color: #999;
font-size: 28rpx;
}
/deep/ .rule-content p {
margin-bottom: 10rpx;
}
</style>
+913
View File
@@ -0,0 +1,913 @@
<template>
<view class="county-lottery-page">
<view class="banner-wrapper">
<view class="top-banner" :style="topBannerStyle">
<view class="banner-content">
<view class="banner-date">开奖时间{{ openDateText }}</view>
<view class="banner-countdown">
<text class="text">距离开奖还有</text>
<text class="num">{{ countdownData.day }}</text>
<text class="text"></text>
<text class="num">{{ countdownData.time }}</text>
</view>
</view>
</view>
</view>
<view class="side-entry rules" @click="openRulesModel">活动规则</view>
<view class="side-entry mine" @click="navToLog">我的抽奖码</view>
<view class="winners-wrap">
<view class="winners-text" v-if="!winnerSortedList.length">暂时无人中奖</view>
<view class="winners-text one-t" v-else-if="winnerSortedList.length === 1">
恭喜 <text class="blue">{{ winnerSortedList[0].name }}</text>
在第 <text class="blue">{{ winnerSortedList[0].periodNo }}</text> 期抽奖活动中获得
<text class="red">{{ winnerSortedList[0].prizeName }}</text>
</view>
<swiper
v-else
class="winner-swiper"
vertical
circular
autoplay
:interval="3000"
:duration="500"
>
<swiper-item v-for="(winner, index) in winnerSortedList" :key="index">
<view class="winners-text one-t">
恭喜 <text class="blue">{{ winner.name }}</text>
在第 <text class="blue">{{ winner.periodNo }}</text> 期抽奖活动中获得
<text class="red">{{ winner.prizeName }}</text>
</view>
</swiper-item>
</swiper>
<view class="winners-btn" @click="navToWinners">查看全部 <text class="arrow"></text></view>
</view>
<view class="pool-wrap">
<view class="pool-header" style="background: linear-gradient(to bottom, #fff 50%, #CB302C 50%);">
<view class="pool-title-wrap">
<view class="pool-title">奖品池 <text class="sub">/ prize pool</text></view>
</view>
<view class="pool-desc">实付满{{ buyThresholdText }}不包括优惠券金额即可获得抽奖码定时统一开奖</view>
</view>
<view class="pool-body">
<swiper
class="pool-swiper"
:autoplay="prizeList.length > 1"
:circular="prizeList.length > 1"
:interval="3000"
:duration="500"
previous-margin="180rpx"
next-margin="180rpx"
@change="onSwiperChange"
v-if="prizeList.length"
>
<swiper-item v-for="(prize, gIndex) in prizeList" :key="gIndex">
<view class="pool-list-group">
<view
class="pool-item"
:class="{ 'is-active': currentSwiperIndex === gIndex }"
style="margin: 0 auto;"
>
<view class="item-inner">
<view class="item-dashed">
<image class="pool-image" :src="prize.prizeImage" mode="aspectFit" />
</view>
</view>
<image class="prize-tag" :src="prize.levelIcon" v-if="prize.levelIcon" mode="aspectFit" />
<view class="pool-name-wrap">
<view class="pool-name one-t">{{ prize.prizeName }}</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
<view class="goods-section">
<view class="goods-header-box">
<view class="goods-title-pill">
<view style="background: #ffb611;
padding: 8rpx 40rpx;
border-radius: 40rpx;"><text class="dot">·</text> 活动商品 <text class="dot">·</text></view>
</view>
<view class="goods-sub"> 购买即得抽奖码 </view>
</view>
<view class="goods-list">
<view
v-for="(item, index) in activityGoodsList"
:key="index"
class="goods-item"
>
<image
v-if="Number(item.isGiftCard) === 1"
class="goods-gift-tag"
:src="webUrl + '/home/gift-tag.png'"
mode="widthFix"
/>
<image class="goods-image" :src="item.image" mode="aspectFill" @click="goGoodsDetail(item)" />
<view class="goods-name more-t">{{ item.storeName }}</view>
<view class="goods-bottom">
<text class="goods-price">{{ item.price }}</text>
<view class="goods-cart" @click.stop="openGoodsSku(item)"></view>
</view>
</view>
</view>
</view>
<ProductWindow
ref="attrWindow"
:attr="attr"
:cartNum="cart_num"
:hideQuantityControls="true"
:showOk="true"
:okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '立即下单' : '立即下单'"
@changeFun="changeFun"
paddingBottom="80rpx"
@ok="submitFromSku()"
/>
</view>
</template>
<script>
import { getDrawActivityInfo, getDrawLatestWinners } from '@/api/lottery'
import { postCartAdd } from '@/api/store'
import ProductWindow from '@/components/ProductWindow'
import goCartMixin from '@/mixins/goCartMixins'
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: 'CountyLotteryPage',
components: {
ProductWindow
},
mixins: [pageListenMixins, goCartMixin],
data() {
return {
ready: false,
activityInfo: {
drawImage: '',
drawTime: '',
winnerList: [],
prizePool: [],
products: []
},
latestWinnerList: [],
activityId: 0,
onlyOneToAddCart: false,
statusBarHeight: 20,
countdownData: {
day: '--',
time: '--:--:--'
},
countdownTimer: null,
currentSwiperIndex: 0,
webUrl: this.$VUE_APP_RESOURCES_URL,
currentGoodsItem: null
}
},
computed: {
topBannerStyle() {
const drawImage = String(this.activityInfo.drawImage || '').trim()
if (!drawImage) return ''
return `background-image:url(${drawImage});background-size:100% 100%;background-repeat:no-repeat;background-position:center top;`
},
prizeList() {
return this.activityInfo.prizePool || []
},
activityGoodsList() {
const list = this.activityInfo.products || []
if (list.length > 0) {
return list.map(item => ({
id: item.productId || item.id || 0,
image: item.productImage || item.image || item.pic || '',
storeName: item.storeName || '',
productName: item.productName || item.name || item.prizeName || '',
price: item.productPrice || item.price || item.salePrice || 0,
isGiftCard: Number(item.isGiftCard || 0)
}))
}
return this.prizeList.map(item => ({
id: item.productId || 0,
image: item.prizeImage || '',
name: item.prizeName || '',
price: item.productPrice || item.price || 0,
isGiftCard: Number(item.isGiftCard || 0)
}))
},
winnerSortedList() {
const list = this.latestWinnerList || []
if (!list.length) return []
const mapped = list.map(item => ({
name: item.realName || item.phone || '用户',
periodNo: item.periodNo || '-',
prizeName: item.prizeName || '神秘奖品'
}))
return mapped.sort((a, b) => this.getPeriodNoValue(b.periodNo) - this.getPeriodNoValue(a.periodNo))
},
buyThresholdText() {
const spendThreshold = this.activityInfo.spendThreshold || 0
return spendThreshold
},
openDateText() {
const target = this.getTargetDate()
if (!target) return '--'
const year = target.getFullYear()
const month = String(target.getMonth() + 1).padStart(2, '0')
const day = String(target.getDate()).padStart(2, '0')
return `${year}${month}${day}`
}
},
onLoad(options) {
this.activityId = Number(options.activityId || options.areaId) || 0
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
this.init()
},
onUnload() {
this.clearCountdownTimer()
},
methods: {
init() {
if (!this.activityId) {
uni.showToast({
title: '缺少活动ID',
icon: 'none'
})
return
}
Promise.all([
getDrawActivityInfo(this.activityId),
getDrawLatestWinners()
]).then(([activityRes, winnersRes]) => {
if (activityRes && activityRes.success) {
const data = activityRes.data || {}
// 如果活动已开奖(或已过开奖时间),直接重定向至中奖名单页
const targetTime = data.drawTime || ''
let isPassed = false
if (targetTime) {
const date = new Date(String(targetTime).replace(/-/g, '/'))
if (!Number.isNaN(date.getTime()) && date.getTime() <= Date.now()) {
isPassed = true
}
}
if (isPassed || Number(data.status) === 2 || Number(data.status) === 3) {
uni.redirectTo({ url: `/pkg-video/views/county-winners?activityId=${this.activityId}` })
return
}
this.activityInfo = {
...this.activityInfo,
...data,
drawImage: data.drawImage || ''
}
this.ready = true
this.startCountdown()
}
const winnersData = winnersRes && winnersRes.data
const list = Array.isArray(winnersData)
? winnersData
: (Array.isArray(winnersData && winnersData.list) ? winnersData.list : [])
this.latestWinnerList = list
})
},
getTargetDate() {
const targetTime = this.activityInfo.drawTime || ''
if (!targetTime) return null
const date = new Date(String(targetTime).replace(/-/g, '/'))
if (Number.isNaN(date.getTime())) return null
return date
},
startCountdown() {
this.clearCountdownTimer()
const calc = () => {
const target = this.getTargetDate()
if (!target) {
this.countdownData = { day: '--', time: '--:--:--' }
return
}
let diff = target.getTime() - Date.now()
if (diff <= 0) {
this.countdownData = { day: '00', time: '00:00:00' }
return
}
const day = Math.floor(diff / (24 * 60 * 60 * 1000))
diff -= day * 24 * 60 * 60 * 1000
const hour = Math.floor(diff / (60 * 60 * 1000))
diff -= hour * 60 * 60 * 1000
const minute = Math.floor(diff / (60 * 1000))
diff -= minute * 60 * 1000
const second = Math.floor(diff / 1000)
const dd = String(day).padStart(2, '0')
const hh = String(hour).padStart(2, '0')
const mm = String(minute).padStart(2, '0')
const ss = String(second).padStart(2, '0')
this.countdownData = {
day: dd,
time: `${hh}:${mm}:${ss}`
}
}
calc()
this.countdownTimer = setInterval(calc, 1000)
},
clearCountdownTimer() {
if (this.countdownTimer) {
clearInterval(this.countdownTimer)
this.countdownTimer = null
}
},
getPeriodNoValue(periodNo) {
const text = String(periodNo || '')
const match = text.match(/\d+/g)
if (!match || !match.length) return 0
return Number(match.join('')) || 0
},
openRulesModel() {
uni.navigateTo({ url: '/pkg-video/views/county-lottery-rules' })
},
navToWinners() {
const targetDate = this.getTargetDate()
const isNotOpened = targetDate && targetDate.getTime() > Date.now()
const url = isNotOpened
? '/pkg-video/views/county-winners'
: `/pkg-video/views/county-winners?activityId=${this.activityId}`
uni.navigateTo({ url })
},
navToLog() {
uni.navigateTo({ url: '/pkg-video/views/county-my-tickets' })
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
return
}
uni.switchTab({
url: '/pages/home/index'
})
},
onSwiperChange(e) {
this.currentSwiperIndex = e.detail.current
},
goGoodsDetail(item) {
if (!item.id) return
uni.navigateTo({ url: `/pages/shop/GoodsCon/index?id=${item.id}&from=countyLottery&activityId=${this.activityId}` })
},
openGoodsSku(item) {
if (!item.id) return
this.currentGoodsItem = item
this.cart_num = 1
if (this.attr && this.attr.productSelect) {
this.$set(this.attr.productSelect, 'cart_num', 1)
}
this.addToCart(item)
},
submitFromSku() {
const productSelect = this.getAttrItemData(this.attrValue)
const currentSelect = {
...(productSelect || {}),
...(this.attr.productSelect || {})
}
// const isGiftOrder = Number(this.currentGoodsItem && this.currentGoodsItem.isGiftCard) === 1
const isGiftOrder = false
const stock = Number(currentSelect.stock || 0)
const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0
if (hasNo) {
uni.showToast({
title: '产品库存不足,请选择其他商品',
icon: 'none',
duration: 3000
})
return
}
const q = {
productId: this.m_id,
cartNum: 1,
new: 1,
uniqueId: currentSelect.unique || ''
}
if (this.activityId) {
q.drawActivityId = Number(this.activityId)
}
postCartAdd(q).then(res => {
this.isOpen = false
this.attr.cartAttr = false
this.$set(this.attr.productSelect, 'cart_num', 1)
this.cart_num = 1
const cartId = (res.data && res.data.cartId) || ''
if (!cartId) return
if (isGiftOrder) {
uni.navigateTo({
url: `/pkg_user/views/gift/gift?cartId=${cartId}&from=countyLottery&drawActivityId=${this.activityId || 0}`
})
return
}
uni.navigateTo({
url: `/pages/order/OrderSubmission/index?id=${cartId}`
})
})
}
}
}
</script>
<style scoped lang="less">
.county-lottery-page {
min-height: 100vh;
background-color: #f5f5f5;
padding-bottom: 40rpx;
}
.custom-header {
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 30;
background: rgba(255, 255, 255, 0);
}
.custom-header-inner {
height: 88rpx;
display: flex;
align-items: center;
padding: 0 24rpx;
}
.header-back {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: rgba(0, 0, 0, .35);
display: flex;
align-items: center;
justify-content: center;
}
.header-back-icon {
color: #fff;
font-size: 56rpx;
line-height: 1;
margin-top: -6rpx;
}
.banner-wrapper {
position: relative;
background: #f5f5f5;
padding-bottom: 30rpx;
}
.banner-red-curve {
background: #cb302c;
height: 40rpx;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
border-bottom-left-radius: 60rpx;
border-bottom-right-radius: 60rpx;
z-index: 1;
}
.top-banner {
// background-color: #ffb611;
background-size: 100% 100%;
background-repeat: no-repeat;
height: 530rpx;
position: relative;
border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx;
z-index: 2;
}
.banner-content {
position: absolute;
bottom: 40rpx;
left: 0;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.banner-date {
position: relative;
background: #3b7cf6;
color: #fff;
border: 4rpx solid #fff;
border-radius: 40rpx;
padding: 6rpx 30rpx;
font-size: 28rpx;
margin-bottom: 24rpx;
box-shadow: 0 -10rpx 0 #3b7cf6;
&::after {
content: '';
position: absolute;
bottom: -14rpx;
left: 50%;
transform: translateX(-50%);
border-width: 14rpx 14rpx 0;
border-style: solid;
border-color: #fff transparent transparent transparent;
}
&::before {
content: '';
position: absolute;
bottom: -8rpx;
left: 50%;
transform: translateX(-50%);
border-width: 10rpx 10rpx 0;
border-style: solid;
border-color: #3b7cf6 transparent transparent transparent;
z-index: 1;
}
}
.banner-countdown {
background: #cb302c;
color: #fff;
border: 6rpx solid #fff;
border-radius: 60rpx;
padding: 10rpx 40rpx;
display: flex;
align-items: baseline;
box-shadow: inset 0 0 0 6rpx rgba(0, 0, 0, 0.1);
.text {
font-size: 38rpx;
}
.num {
font-size: 38rpx;
font-weight: bold;
margin: 0 10rpx;
}
}
.side-entry {
position: fixed;
right: 0;
background: #fff;
color: #333;
font-size: 24rpx;
width: 44rpx;
padding: 24rpx 0;
text-align: center;
border-radius: 24rpx 24rpx 0 24rpx;
z-index: 10;
writing-mode: vertical-rl;
letter-spacing: 6rpx;
font-weight: bold;
box-shadow: -2rpx 2rpx 8rpx rgba(0, 0, 0, 0.1);
line-height: 44rpx;
&::after{
content: '';
position: absolute;
bottom: -12rpx;
right: 0; /* 修改为对齐右侧,以匹配侧边栏的布局 */
width: 0;
height: 0;
border-width: 14rpx 0 0 14rpx; /* 将三角形反转:顶部和左侧保留宽度,形成一个斜边向右下的直角三角形 */
border-style: solid;
border-color: #fff transparent transparent transparent; /* 顶部为白色 */
}
}
.side-entry.rules {
top: 60rpx;
}
.side-entry.mine {
top: 260rpx;
}
.winners-wrap {
margin: 0 24rpx;
background: #fff;
border-radius: 40rpx;
padding: 0rpx 0rpx 0rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
border: 2rpx solid #333;
.winners-text {
font-size: 24rpx;
color: #333;
flex: 1;
.blue {
color: #3b7cf6;
}
.red {
color: #cb302c;
}
}
.winner-swiper {
flex: 1;
height: 36rpx;
margin-right: 8rpx;
margin-top: 4rpx;
}
.winners-btn {
background: #3b7cf6;
color: #fff;
font-size: 24rpx;
padding: 16rpx 20rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
white-space: nowrap;
margin-left: 16rpx;
.arrow {
margin-left: 4rpx;
font-size: 22rpx;
}
}
}
.pool-wrap {
margin: 24rpx;
background: #fff;
border-radius: 40rpx 40rpx 40rpx 40rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
.pool-header {
display: flex;
align-items: stretch;
.pool-title-wrap{
background: #CB302C;
border-top-right-radius: 40rpx;
position: relative;
}
.pool-title {
background: #ffb611;
color: #333;
font-weight: bold;
font-size: 34rpx;
padding: 10rpx 14rpx;
border-radius: 40rpx;
margin: 10rpx;
display: flex;
align-items: baseline;
position: relative;
.sub {
font-size: 20rpx;
font-weight: bold;
margin-left: 8rpx;
}
}
.pool-desc {
font-size: 24rpx;
color: #666;
flex: 1;
background: #fff;
display: flex;
align-items: center;
padding: 0 20rpx 0 30rpx;
border-bottom-left-radius: 40rpx;
}
}
.pool-body {
padding: 30rpx 0 40rpx 20rpx;
background: #cb302c;
border-radius: 0 40rpx 0 0;
}
.pool-swiper {
height: 374rpx;
width: 100%;
}
.pool-list-group {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
padding: 0;
transform: scale(1.1);
transform-origin: center center;
}
.pool-item {
width: 220rpx; /* 恢复正常大小 */
margin: 0 auto;
position: relative;
flex-shrink: 0;
transform: scale(0.85); /* 默认两侧缩小 */
transition: transform 0.3s ease;
color: #333;
&.is-active {
transform: scale(1.2); /* 当前项放大 */
z-index: 10;
color: #cb302c;
}
.item-inner {
background: #fff;
border-radius: 16rpx 48rpx 16rpx 16rpx;
padding: 12rpx;
height: 270rpx;
box-sizing: border-box;
border: 10rpx solid #ffb611;
border-bottom-width: 60rpx;
// box-shadow: 10rpx 10rpx 0 #ffb611;
.item-dashed {
// border: 2rpx dashed #ccc;
border-radius: 8rpx 36rpx 8rpx 8rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.pool-image {
width: 150rpx;
height: 150rpx;
}
}
}
.prize-tag {
position: absolute;
left: -25rpx;
bottom: 20rpx;
width: 90rpx;
height: 90rpx;
z-index: 6;
}
.pool-name-wrap {
position: absolute;
bottom: 10rpx;
right: -10rpx;
z-index: 3;
max-width: 99%;
&::after {
content: '';
position: absolute;
top: -10rpx;
right: 0;
width: 0;
height: 0;
border-bottom: 10rpx solid #A19669;
border-right: 10rpx solid transparent;
}
.pool-name {
background: #fff;
font-size: 22rpx;
font-weight: bold;
padding: 6rpx 10rpx;
border-radius: 30rpx 0 0 30rpx;
text-align: center;
}
}
}
}
.goods-section {
margin: 60rpx 24rpx 24rpx;
background: #fff;
border-radius: 24rpx;
position: relative;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
.goods-header-box {
background: #cb302c;
border-radius: 24rpx 24rpx 0 0;
padding: 50rpx 0 20rpx;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
.goods-title-pill {
position: absolute;
top: -34rpx;
left: 50%;
transform: translateX(-50%);
background: #ffb611;
color: #333;
font-size: 32rpx;
font-weight: bold;
border-radius: 40rpx;
border: 6rpx solid #fff;
display: flex;
align-items: center;
white-space: nowrap;
box-shadow: 0 -6rpx 0 #CB302C;
.dot {
margin: 0 8rpx;
}
&::after {
content: '';
position: absolute;
bottom: -16rpx;
left: 50%;
transform: translateX(-50%) rotate(-45deg);
width: 30rpx;
height: 30rpx;
border: 6rpx solid #fff;
background: #ffb611;
/* 为了不让这个三角形的边框跑到上方的背景前,可以设置层级或者利用边框隐藏等,目前看原来的效果是直接叠加在底下的。
由于要模拟原本的 .triangle 元素层级,我们用 z-index: -1 把它垫在 pill 下面即可 */
z-index: -1;
}
}
.goods-sub {
color: #fff;
font-size: 24rpx;
font-weight: 500;
}
}
.goods-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 24rpx;
}
.goods-item {
width: 316rpx;
background: #fff;
margin-bottom: 30rpx;
position: relative;
.goods-gift-tag {
position: absolute;
left: 0;
top: 0;
width: 120rpx;
z-index: 2;
pointer-events: none;
}
.goods-image {
width: 100%;
height: 316rpx;
background: #f8f8f8;
border-radius: 16rpx;
}
.goods-name {
font-size: 26rpx;
color: #333;
line-height: 1.4;
margin: 16rpx 0;
height: 72rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.goods-bottom {
display: flex;
align-items: center;
justify-content: space-between;
.goods-price {
color: #cb302c;
font-size: 32rpx;
font-weight: bold;
}
.goods-cart {
width: 48rpx;
height: 48rpx;
background-color: #cb302c;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E");
background-size: 28rpx 28rpx;
background-repeat: no-repeat;
background-position: center;
color: transparent;
}
}
}
}
</style>
+806
View File
@@ -0,0 +1,806 @@
<template>
<view class="county-my-tickets-page">
<view class="custom-header">
<view class="tabs">
<view
v-for="tab in tabs"
:key="tab.key"
class="tab-item v12-font-bold"
:class="{ active: activeTab === tab.key }"
@click="onChangeTab(tab.key)"
>
{{ tab.label }}
</view>
</view>
</view>
<scroll-view class="page-body" scroll-y>
<view class="tip-bar">
<view class="tip-text" v-if="!winnerSortedList.length">暂时无人中奖</view>
<view class="tip-text one-t" v-else-if="winnerSortedList.length === 1">
恭喜 <text class="blue">{{ winnerSortedList[0].name }}</text>
在第 <text class="blue">{{ winnerSortedList[0].periodNo }}</text> 期抽奖活动中获得
<text class="red">{{ winnerSortedList[0].prizeName }}</text>
</view>
<swiper
v-else
class="winner-swiper"
vertical
circular
autoplay
:interval="3000"
:duration="500"
>
<swiper-item v-for="(winner, index) in winnerSortedList" :key="index">
<view class="tip-text one-t">
恭喜 <text class="blue">{{ winner.name }}</text>
在第 <text class="blue">{{ winner.periodNo }}</text> 期抽奖活动中获得
<text class="red">{{ winner.prizeName }}</text>
</view>
</swiper-item>
</swiper>
<view class="tip-btn" @click="goWinnersPage">查看全部 <text class="icon-expand"></text></view>
</view>
<view class="ticket-list" v-if="displayList.length">
<view class="ticket-card" v-for="item in displayList" :key="item.id">
<view class="ticket-head">
<view class="ticket-code">
<image class="code-icon" :src="`${webUrl}/home/juan.png`" mode="aspectFit" />
<text class="code-label">抽奖码:</text>
<text class="code-value">{{ item.ticketCode || '--' }}</text>
</view>
<view class="ticket-status" :class="[ `status-${item.status}`, item.status === 0 ? 'status-pill' : '', item.status === 1 && item.claimStatus === 1 ? 'status-claimed' : '' ]">{{ getStatusText(item) }}</view>
</view>
<view class="ticket-info-row">
<text class="label">来源订单</text>
<text class="value">{{ item.sourceOrderId || '--' }}</text>
</view>
<view class="ticket-info-row">
<text class="label">开奖时间</text>
<text class="value">{{ formatDrawTime(item.drawTime) }}</text>
</view>
<view class="prize-box" v-if="showPrize(item)">
恭喜获得{{ formatPrizeText(item) }}
</view>
<view class="ticket-footer" v-if="item.status === 1">
<template v-if="item.claimStatus === 0">
<view class="footer-note">注意请在{{ getClaimDaysText(item) }}内领取过期不予发放</view>
<view class="footer-btn btn-claim" @click="onClaim(item)"> </view>
</template>
<template v-else-if="item.claimStatus === 1">
<view class="footer-note done">奖品已领取</view>
<view class="footer-btn btn-order" @click="goOrder(item)">{{ isCouponPrize(item) ? '查看优惠券' : '查看订单' }}</view>
</template>
</view>
<view class="invalid-reason" v-if="item.status === -1">
失效原因{{ getInvalidReason(item) }}
</view>
</view>
</view>
<view class="empty-wrap" v-else>
<view class="empty-text">{{ loading ? '加载中...' : '暂无抽奖码记录' }}</view>
</view>
</scroll-view>
<view class="coupon-popup-mask" v-if="showCouponSuccessPopup" @click="closeCouponSuccessPopup">
<view class="coupon-popup" @click.stop>
<view class="popup-close" @click="closeCouponSuccessPopup">×</view>
<view class="popup-icon-wrap">
<text class="popup-icon">🎉</text>
</view>
<view class="popup-title">领取成功</view>
<view class="popup-desc">您的奖品已经领取成功请前往我的优惠券查看详情</view>
<view class="popup-btn" @click="goMyCoupons">去查看我的优惠券</view>
</view>
</view>
</view>
</template>
<script>
import { claimCoupon, getDrawLatestWinners, getDrawMyTickets } from '@/api/lottery'
export default {
name: 'CountyMyTicketsPage',
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
statusBarHeight: 20,
loading: false,
activeTab: 'all',
activityId: 0,
tabs: [
{ key: 'all', label: '全部' },
{ key: 'wait', label: '待开奖' },
{ key: 'opened', label: '已开奖' },
{ key: 'invalid', label: '已失效' }
],
list: [],
openedList: [],
latestWinnerList: [],
showCouponSuccessPopup: false,
claiming: false
}
},
computed: {
displayList() {
return this.activeTab === 'opened' ? this.openedList : this.list
},
winnerSortedList() {
const list = this.latestWinnerList || []
if (!list.length) return []
const mapped = list.map(item => ({
name: item.realName || item.phone || '用户',
periodNo: item.periodNo || '-',
prizeName: item.prizeName || '神秘奖品'
}))
return mapped.sort((a, b) => this.getPeriodNoValue(b.periodNo) - this.getPeriodNoValue(a.periodNo))
}
},
onLoad(options) {
if (options && options.activityId) {
this.activityId = Number(options.activityId) || 0
}
},
onShow() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
this.fetchLatestWinners()
this.fetchList()
},
methods: {
getPeriodNoValue(periodNo) {
const text = String(periodNo || '')
const match = text.match(/\d+/g)
if (!match || !match.length) return 0
return Number(match.join('')) || 0
},
async fetchLatestWinners() {
try {
const res = await getDrawLatestWinners()
const winnersData = res && res.data
const list = Array.isArray(winnersData)
? winnersData
: (Array.isArray(winnersData && winnersData.list) ? winnersData.list : [])
this.latestWinnerList = list
} catch (e) {
this.latestWinnerList = []
}
},
mapTabToStatus(tab) {
const map = {
wait: 0,
invalid: -1
}
return map[tab]
},
mergeTicketListById(list = []) {
const map = new Map()
list.forEach(item => {
if (!item) return
const key = item.id || item.ticketId || item.lotteryRecordId || item.recordId || Math.random()
map.set(String(key), item)
})
return Array.from(map.values())
},
normalizeListData(res) {
if (!res) return []
if (Array.isArray(res)) return res
if (Array.isArray(res.data)) return res.data
if (Array.isArray(res.data && res.data.list)) return res.data.list
if (Array.isArray(res.list)) return res.list
return []
},
normalizeTicketItem(item = {}) {
const statusNum = Number(item.status)
const claimStatusNum = Number(item.claimStatus)
return {
...item,
id: item.id || item.lotteryRecordId || item.ticketId || item.recordId || '',
ticketCode: item.ticketCode || item.code || '',
status: Number.isNaN(statusNum) ? -999 : statusNum,
claimStatus: Number.isNaN(claimStatusNum) ? 0 : claimStatusNum,
sourceOrderId: item.sourceOrderId || item.orderId || item.orderNo || '',
drawTime: item.drawTime || item.openTime || '',
claimDeadline: item.claimDeadline || '',
levelName: item.levelName || item.prizeLevelName || item.awardLevelName || '',
prizeName: item.prizeName || item.awardName || '',
prizeType: item.prizeType || item.awardType || '',
prizeTypeName: item.prizeTypeName || item.awardTypeName || ''
}
},
filterByActivity(list = []) {
if (!this.activityId) return list
return list.filter(item => Number(item.activityId || item.drawActivityId || 0) === this.activityId)
},
filterByTab(list = []) {
if (this.activeTab === 'wait') {
return list.filter(item => item.status === 0)
}
if (this.activeTab === 'opened') {
return list.filter(item => item.status === 1 || item.status === 2)
}
if (this.activeTab === 'invalid') {
return list.filter(item => item.status === -1)
}
return list
},
onChangeTab(tab) {
if (this.activeTab === tab) return
this.activeTab = tab
this.fetchList()
},
goWinnersPage() {
uni.navigateTo({
url: `/pkg-video/views/county-winners?activityId=${this.activityId}`
})
},
async fetchList() {
this.loading = true
try {
// 已开奖需要包含:1-已中奖、2-未中奖
if (this.activeTab === 'opened') {
const [winRes, loseRes] = await Promise.all([
getDrawMyTickets(1),
getDrawMyTickets(2)
])
const winList = this.normalizeListData(winRes).map(this.normalizeTicketItem)
const loseList = this.normalizeListData(loseRes).map(this.normalizeTicketItem)
const merged = this.mergeTicketListById([...winList, ...loseList])
const openedAllList = this.filterByActivity(merged)
this.openedList = openedAllList
this.list = openedAllList
} else {
const status = this.mapTabToStatus(this.activeTab)
const res = await getDrawMyTickets(status)
const allList = this.filterByActivity(this.normalizeListData(res).map(this.normalizeTicketItem))
this.openedList = allList.filter(item => item.status === 1 || item.status === 2)
this.list = this.filterByTab(allList)
}
} catch (e) {
this.list = []
this.openedList = []
uni.showToast({
title: '抽奖码加载失败',
icon: 'none'
})
} finally {
this.loading = false
}
},
getStatusText(item) {
const status = Number(item.status)
if (status === 0) return '等待开奖'
if (status === 1) return item.claimStatus === 1 ? '已领取' : '已开奖'
if (status === 2) return '未中奖'
if (status === -1) return '已失效'
return '--'
},
showPrize(item) {
return [1, 2, -1].includes(Number(item.status)) && !!item.prizeName
},
getInvalidReason(item) {
return item.invalidReason || ''
},
formatPrizeText(item = {}) {
const prizeName = item.prizeName || '神秘奖品'
const levelName = String(item.levelName || '').trim()
if (!levelName) return prizeName
if (/等奖$/.test(levelName)) {
return `${levelName}${prizeName}`
}
return `${levelName}等奖${prizeName}`
},
isCouponPrize(item = {}) {
const prizeType = String(item.prizeType || '').toLowerCase()
const prizeTypeName = String(item.prizeTypeName || '')
const prizeName = String(item.prizeName || '')
if (prizeType === 'coupon' || prizeType === '3') return true
return /券/.test(prizeTypeName) || /券/.test(prizeName)
},
formatDrawTime(time) {
if (!time) return '--'
const date = new Date(String(time).replace(/-/g, '/'))
if (Number.isNaN(date.getTime())) return time
const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0')
const d = String(date.getDate()).padStart(2, '0')
const hh = String(date.getHours()).padStart(2, '0')
const mm = String(date.getMinutes()).padStart(2, '0')
return `${y}${m}${d}${hh}:${mm}`
},
formatDateTime(time) {
if (!time) return '--'
const text = String(time).trim()
const date = new Date(text.replace(/-/g, '/'))
if (Number.isNaN(date.getTime())) return text
const y = date.getFullYear()
const m = String(date.getMonth() + 1).padStart(2, '0')
const d = String(date.getDate()).padStart(2, '0')
const hh = String(date.getHours()).padStart(2, '0')
const mm = String(date.getMinutes()).padStart(2, '0')
const ss = String(date.getSeconds()).padStart(2, '0')
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
},
getClaimDeadlineText(item = {}) {
return this.formatDateTime(item.claimDeadline || '')
},
getClaimDaysText(item = {}) {
const drawTime = String(item.drawTime || '').trim()
const claimDeadline = String(item.claimDeadline || '').trim()
if (!drawTime || !claimDeadline) return '--'
const drawDate = new Date(drawTime.replace(/-/g, '/'))
const deadlineDate = new Date(claimDeadline.replace(/-/g, '/'))
if (Number.isNaN(drawDate.getTime()) || Number.isNaN(deadlineDate.getTime())) return '--'
const diff = deadlineDate.getTime() - drawDate.getTime()
if (diff <= 0) return '0天'
const days = Math.ceil(diff / (24 * 60 * 60 * 1000))
return `${days}`
},
async onClaim(item) {
if (!item.id) return
if (this.claiming) return
if (this.isCouponPrize(item)) {
this.claiming = true
uni.showLoading({ title: '领取中...' })
try {
await claimCoupon(Number(item.id))
this.showCouponSuccessPopup = true
this.fetchList()
} catch (e) {
uni.showToast({
title: (e && e.msg) || (e && e.message) || '领取失败',
icon: 'none'
})
} finally {
uni.hideLoading()
this.claiming = false
}
return
}
const queryParams = {
...item,
lotteryRecordId: item.lotteryRecordId || item.id || ''
}
const query = Object.keys(queryParams)
.filter((key) => queryParams[key] !== undefined && queryParams[key] !== null && typeof queryParams[key] !== 'object')
.map((key) => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&')
uni.navigateTo({
url: `/pkg-video/views/county-claim-address?${query}`
})
},
closeCouponSuccessPopup() {
this.showCouponSuccessPopup = false
},
goMyCoupons() {
this.showCouponSuccessPopup = false
uni.navigateTo({
url: '/pkg_user/views/myCoupons'
})
},
goOrder(item) {
if (this.isCouponPrize(item)) {
this.goMyCoupons()
return
}
if (!item.prizeOrderId) {
uni.showToast({
title: '缺少订单号',
icon: 'none'
})
return
}
uni.navigateTo({
url: `/pagesOrder/order/OrderDetails/index?id=${item.prizeOrderId}`
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
return
}
uni.switchTab({
url: '/pages/home/index'
})
}
}
}
</script>
<style scoped lang="less">
.county-my-tickets-page {
min-height: 100vh;
background: #f5f5f5;
}
.custom-header {
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 20;
background: #f5f5f5;
}
.header-inner {
height: 88rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
}
.header-back {
width: 56rpx;
height: 56rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-back-icon {
font-size: 60rpx;
color: #111;
line-height: 1;
margin-top: -4rpx;
}
.header-title {
flex: 1;
text-align: center;
margin-left: 56rpx;
font-size: 34rpx;
color: #333;
font-weight: 700;
}
.header-right {
width: 88rpx;
height: 44rpx;
border-radius: 24rpx;
border: 2rpx solid #d8d8d8;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.right-dot {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: #111;
margin-right: 14rpx;
}
.right-ring {
width: 18rpx;
height: 18rpx;
border-radius: 50%;
border: 2rpx solid #111;
}
.tabs {
height: 80rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
background: #f5f5f5;
}
.tab-item {
margin-right: 20rpx;
padding: 8rpx 24rpx;
border-radius: 30rpx;
color: #666;
font-size: 26rpx;
background: #fff;
font-weight: bold;
}
.tab-item.active {
color: #BD3124;
background: rgba(220,60,53,0.39);
}
.page-body {
box-sizing: border-box;
height: calc(100vh - 120rpx);
margin-top: 80rpx;
}
.tip-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 24rpx;
font-size: 24rpx;
color: #666;
background: #fff;
border-radius: 160rpx;
margin: 0 20rpx;
}
.tip-text {
flex: 1;
font-weight: 500;
color: #333;
.blue {
color: #3b7cf6;
}
.red {
color: #cb302c;
}
}
.winner-swiper {
flex: 1;
height: 36rpx;
margin-right: 8rpx;
margin-top: 8rpx;
}
.tip-btn {
background: #FCF9EA;
padding: 6rpx 16rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
font-size: 22rpx;
color: #333;
margin-left: 10rpx;
}
.icon-expand {
font-size: 20rpx;
margin-left: 4rpx;
}
.ticket-list {
padding-top: 10rpx;
padding-bottom: 40rpx;
}
.ticket-card {
background: #fff;
border-radius: 16rpx;
margin: 0 24rpx 20rpx;
padding: 24rpx;
}
.ticket-head {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 20rpx;
border-bottom: 2rpx dashed #eee;
margin-bottom: 20rpx;
position: relative;
}
.ticket-code {
display: flex;
align-items: center;
color: #333;
}
.code-icon {
margin-right: 8rpx;
width: 44rpx;
height: 44rpx;
flex-shrink: 0;
}
.code-label {
font-size: 32rpx;
font-weight: 700;
margin-right: 12rpx;
}
.code-value {
font-size: 34rpx;
font-weight: 700;
letter-spacing: 1rpx;
}
.ticket-status {
font-size: 26rpx;
font-weight: bold;
}
.status-pill {
background: #BD3124;
color: #fff;
padding: 4rpx 16rpx;
border-radius: 20rpx 0 0 20rpx;
font-size: 24rpx;
font-weight: normal;
position: absolute;
right: -24rpx;
}
.status-0 {
/* handled by pill */
}
.status-1,
.status-2 {
color: #BD3124;
}
.status-claimed {
color: #999 !important;
}
.status--1 {
color: #999;
}
.ticket-info-row {
margin-top: 14rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.ticket-info-row .label {
color: #999;
font-size: 26rpx;
}
.ticket-info-row .value {
color: #333;
font-size: 26rpx;
}
.prize-box {
margin-top: 24rpx;
border: 2rpx solid #BD3124;
border-radius: 40rpx;
color: #BD3124;
font-size: 30rpx;
text-align: center;
padding: 16rpx 0;
font-weight: 600;
}
.ticket-footer {
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.footer-note {
flex: 1;
color: #BD3124;
font-size: 22rpx;
}
.footer-note.done {
color: #BD3124;
}
.footer-btn {
width: 170rpx;
height: 54rpx;
border-radius: 30rpx;
color: #fff;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: center;
}
.btn-claim {
background: #BD3124;
}
.btn-order {
background: #BD3124;
}
.invalid-reason {
margin-top: 14rpx;
font-size: 24rpx;
color: #BD3124;
}
.empty-wrap {
padding-top: 120rpx;
text-align: center;
}
.empty-text {
color: #999;
font-size: 28rpx;
}
.coupon-popup-mask {
position: fixed;
inset: 0;
z-index: 1000;
background: rgba(0, 0, 0, 0.55);
display: flex;
align-items: center;
justify-content: center;
padding: 24rpx;
}
.coupon-popup {
width: 100%;
max-width: 620rpx;
background: #fff;
border-radius: 32rpx;
padding: 26rpx 34rpx 42rpx;
position: relative;
}
.popup-close {
position: absolute;
right: 18rpx;
top: 18rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #333;
font-weight: 700;
color: #333;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.popup-icon-wrap {
width: 112rpx;
height: 112rpx;
margin: 20rpx auto 8rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.popup-icon {
font-size: 70rpx;
}
.popup-title {
text-align: center;
font-size: 60rpx;
font-weight: 900;
color: #222;
margin-top: 12rpx;
}
.popup-desc {
margin: 38rpx auto 42rpx;
text-align: center;
font-size: 28rpx;
line-height: 1.6;
color: #9a9a9a;
width: 92%;
}
.popup-btn {
width: 86%;
height: 96rpx;
margin: 0 auto;
border-radius: 48rpx;
background: #c43124;
color: #fff;
font-size: 40rpx;
font-weight: 900;
text-align: center;
line-height: 96rpx;
letter-spacing: 2rpx;
}
</style>
+300
View File
@@ -0,0 +1,300 @@
<template>
<view class="realname-page">
<!-- <view class="custom-header" :style="{ paddingTop: `${statusBarHeight}px` }">
<view class="header-inner">
<view class="header-back" @click="goBack">
<u-icon name="arrow-left" size="24" color="#333" class="header-back-icon"></u-icon>
</view>
<view class="header-title">实名认证</view>
<view class="header-right">
<view class="dot"></view>
<view class="ring"></view>
</view>
</view>
</view> -->
<view class="page-body">
<view class="body-title">请完善以下信息</view>
<view class="body-desc">根据平台活动规则领取电子数码产品需要进行实名认
我们会对信息进行严格保密</view>
<view class="form-wrap">
<view class="form-row">
<text class="required">*</text>
<text class="label">真实姓名</text>
<input v-model="form.realName" class="input" placeholder="请输入真实姓名" placeholder-style="color:#999;" />
</view>
<view class="form-row">
<text class="required">*</text>
<text class="label">身份证号</text>
<input v-model="form.idCard" class="input" placeholder="请输入身份证号码" placeholder-style="color:#999;" />
</view>
<view class="form-row">
<text class="required">*</text>
<text class="label">手机号</text>
<input
v-model="form.phone"
class="input"
type="number"
maxlength="11"
placeholder="请输入手机号"
placeholder-style="color:#999;"
/>
</view>
</view>
</view>
<view class="submit-wrap">
<view class="submit-btn" @click="submitAuth">提交认证</view>
</view>
</view>
</template>
<script>
import { getDrawRealname, submitDrawRealname } from '@/api/lottery'
export default {
name: 'CountyRealnamePage',
data() {
return {
statusBarHeight: 20,
form: {
realName: '',
idCard: '',
phone: ''
}
}
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 20
this.fetchRealnameStatus()
},
methods: {
fetchRealnameStatus() {
getDrawRealname().then((res) => {
const data = (res && res.data) || {}
if (Number(data.status) === 1) {
uni.setStorageSync('countyClaimAuthDone', 1)
uni.showToast({
title: data.result || '已完成实名认证',
icon: 'none'
})
setTimeout(() => {
this.backToClaimPage()
}, 300)
}
})
},
backToClaimPage() {
const targetRoute = 'pkg-video/views/county-claim-address'
const pages = getCurrentPages()
const targetIndex = pages.findIndex(
item =>
item.route === targetRoute ||
item.route === `/${targetRoute}`
)
if (targetIndex >= 0) {
const delta = pages.length - 1 - targetIndex
uni.navigateBack({
delta: delta > 0 ? delta : 1
})
return
}
uni.redirectTo({
url: '/pkg-video/views/county-claim-address'
})
},
goBack() {
uni.navigateBack()
},
async submitAuth() {
if (!this.form.realName) {
uni.showToast({ title: '请输入真实姓名', icon: 'none' })
return
}
const idCard = String(this.form.idCard || '').trim().toUpperCase()
this.form.idCard = idCard
if (!/^\d{15}$|^\d{17}[\dX]$/.test(idCard)) {
uni.showToast({ title: '请输入正确身份证号', icon: 'none' })
return
}
if (!/^1\d{10}$/.test(this.form.phone)) {
uni.showToast({ title: '请输入正确手机号', icon: 'none' })
return
}
uni.showLoading({ title: '认证中...' })
try {
const res = await submitDrawRealname({
realName: this.form.realName,
idCard,
phone: this.form.phone
})
const data = (res && res.data) || {}
if (Number(data.status) !== 1) {
uni.showToast({
title: data.result || '认证失败,请重试',
icon: 'none'
})
return
}
uni.setStorageSync('countyClaimAuthDone', 1)
uni.showToast({
title: data.result || '认证成功',
icon: 'success'
})
setTimeout(() => {
this.backToClaimPage()
}, 350)
} catch (e) {
uni.showToast({
title: (e && e.msg) || (e && e.message) || '认证失败',
icon: 'none'
})
} finally {
// uni.hideLoading()
}
}
}
}
</script>
<style scoped lang="less">
.realname-page {
min-height: 100vh;
background: #fff;
}
.custom-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 20;
background: #fff;
}
.header-inner {
height: 88rpx;
display: flex;
align-items: center;
padding: 0 24rpx;
}
.header-back {
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-back-icon {
font-size: 60rpx;
color: #111;
line-height: 1;
}
.header-title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: 700;
color: #222;
}
.header-right {
width: 88rpx;
height: 44rpx;
border-radius: 24rpx;
border: 2rpx solid #d8d8d8;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.dot {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: #111;
margin-right: 14rpx;
}
.ring {
width: 18rpx;
height: 18rpx;
border: 2rpx solid #111;
border-radius: 50%;
}
.page-body {
padding: 28rpx 24rpx 180rpx;
}
.body-title {
font-size: 40rpx;
color: #333;
font-weight: 700;
padding: 20rpx;
}
.body-desc {
margin-top: 12rpx;
color: #666;
font-size: 28rpx;
line-height: 1.45;
padding: 20rpx;
background: rgba(244,244,244,0.39);
border-radius: 16rpx;
}
.form-wrap {
margin-top: 24rpx;
}
.form-row {
height: 94rpx;
display: flex;
align-items: center;
border-bottom: 2rpx solid #efefef;
}
.required {
color: #c23225;
font-size: 28rpx;
margin-right: 4rpx;
}
.label {
width: 150rpx;
color: #333;
font-size: 32rpx;
}
.input {
flex: 1;
font-size: 32rpx;
color: #333;
}
.submit-wrap {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 18rpx 24rpx calc(18rpx + env(safe-area-inset-bottom));
background: #fff;
}
.submit-btn {
border-radius: 44rpx;
background: #bd3124;
color: #fff;
line-height: 88rpx;
text-align: center;
font-size: 38rpx;
font-weight: 600;
letter-spacing: 14rpx;
}
</style>
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -104,7 +104,7 @@ export default {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') console.log('用户点击确定')
uni.navigateTo({ uni.navigateTo({
url: '/pages/user/Points/index' url: '/pagesUser/user/Points/index'
}) })
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
@@ -157,4 +157,4 @@ export default {
} }
} }
} }
</style> </style>
+2 -2
View File
@@ -144,7 +144,7 @@ export default {
}, },
methods: { methods: {
navToPoint() { navToPoint() {
uni.navigateTo({url: '/pages/user/Points/index'}) uni.navigateTo({url: '/pagesUser/user/Points/index'})
}, },
init() { init() {
getDetail().then(res => { getDetail().then(res => {
@@ -403,4 +403,4 @@ image {
background-size: 175rpx 185rpx; background-size: 175rpx 185rpx;
} }
} }
</style> </style>
+1 -1
View File
@@ -137,6 +137,7 @@ export default {
onShow() { onShow() {
this.content = uni.getStorageSync(this.merName+this.uid+this.storeId) this.content = uni.getStorageSync(this.merName+this.uid+this.storeId)
this.connectSocketInit(); this.connectSocketInit();
this.list = []
}, },
onUnload() { onUnload() {
if (this.socketOpen) { if (this.socketOpen) {
@@ -158,7 +159,6 @@ export default {
}, },
methods: { methods: {
toGoods(item) { toGoods(item) {
console.log(item);
const itemJson = JSON.parse(item.msg_content) const itemJson = JSON.parse(item.msg_content)
if(!itemJson.goodsId) { if(!itemJson.goodsId) {
// 提示数据错误 // 提示数据错误
+5 -3
View File
@@ -480,7 +480,8 @@ export default {
videos: [], videos: [],
district: [], district: [],
qualificationImg: [], qualificationImg: [],
partnerId: 0, partnerId: '',
promoterUid: '',
experienceStoreCategoryList: [], experienceStoreCategoryList: [],
experienceStoreCategoryIndex: 0, experienceStoreCategoryIndex: 0,
form: { form: {
@@ -518,9 +519,10 @@ export default {
} }
}, },
onLoad(opts) { onLoad(opts) {
this.partnerId = opts.partnerId this.partnerId = opts.partnerId || ''
this.promoterUid = opts.promoterUid || ''
this.queryCity() this.queryCity()
getShopData().then(({ data }) => { getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({ data }) => {
this.notice = data.merchantApplyNotice this.notice = data.merchantApplyNotice
}) })
getExperienceStoreCategoryList().then(({ data }) => { getExperienceStoreCategoryList().then(({ data }) => {
+8 -6
View File
@@ -57,6 +57,7 @@ export default {
return { return {
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
partnerId: '', partnerId: '',
promoterUid: '',
partnerType: '', partnerType: '',
hotelId: null, hotelId: null,
hasHotel: null, hasHotel: null,
@@ -71,8 +72,9 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.partnerId = options.partnerId || '' this.partnerId = options.partnerId || ''
this.promoterUid = options.promoterUid || ''
getImages().then(({data}) => this.images = data) getImages().then(({data}) => this.images = data)
getShopData(this.partnerId).then(({data}) => { getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
this.partnerType = data.partnerType this.partnerType = data.partnerType
this.hotelId = data.hotelId this.hotelId = data.hotelId
this.hasHotel = data.hasHotel this.hasHotel = data.hasHotel
@@ -91,7 +93,7 @@ export default {
if (this.hasTravel === 1) { if (this.hasTravel === 1) {
this.$global.goSupplierMini() this.$global.goSupplierMini()
} else { } else {
this.$yrouter.push('/pkg_join/views/travelResidence?partnerId=' + this.partnerId) this.$yrouter.push('/pkg_join/views/travelResidence?partnerId=' + this.partnerId + '&promoterUid=' + this.promoterUid)
} }
}, },
/** /**
@@ -104,14 +106,14 @@ export default {
if (this.hasSupplier === 1) { if (this.hasSupplier === 1) {
this.$global.goSupplierMini() this.$global.goSupplierMini()
} else { } else {
this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}`) this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}&promoterUid=${this.promoterUid}`)
} }
break break
case 'wenwan_supplier': case 'wenwan_supplier':
if (this.hasSupplier === 1) { if (this.hasSupplier === 1) {
this.$global.goSupplierMini() this.$global.goSupplierMini()
} else { } else {
this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}`) this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}&promoterUid=${this.promoterUid}`)
} }
break break
case 'shop': case 'shop':
@@ -129,13 +131,13 @@ export default {
this.$global.goSupplierMini() this.$global.goSupplierMini()
return return
} }
this.$yrouter.push('/pkg_join/views/experienceStore?partnerId=' + this.partnerId) this.$yrouter.push('/pkg_join/views/experienceStore?partnerId=' + this.partnerId + '&promoterUid=' + this.promoterUid)
break break
case 'wholesaler': case 'wholesaler':
if (this.hasWholesaler === 1) { if (this.hasWholesaler === 1) {
this.$global.goSupplierMini() this.$global.goSupplierMini()
} else { } else {
this.$yrouter.push(`/pkg_join/views/wholesaler`) this.$yrouter.push(`/pkg_join/views/wholesaler?partnerId=${this.partnerId}&promoterUid=${this.promoterUid}`)
} }
break break
} }
+14 -6
View File
@@ -473,7 +473,8 @@ export default {
mixins: [pageListenMixins], mixins: [pageListenMixins],
data() { data() {
return { return {
partnerId: null, partnerId: '',
promoterUid: '',
pics: [], pics: [],
quaPics: [], quaPics: [],
tips: '获取验证码', tips: '获取验证码',
@@ -603,7 +604,8 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.partnerId = options.partnerId this.partnerId = options.partnerId || ''
this.promoterUid = options.promoterUid || ''
const local_form = uni.getStorageSync('merchantApplyHotel' + '_form') || {} const local_form = uni.getStorageSync('merchantApplyHotel' + '_form') || {}
this.quaPics = uni.getStorageSync('merchantApplyHotel' + '_quaPics') || [] this.quaPics = uni.getStorageSync('merchantApplyHotel' + '_quaPics') || []
if(!local_form.serviceTime) { if(!local_form.serviceTime) {
@@ -694,11 +696,14 @@ export default {
getCity().then(({data}) => { getCity().then(({data}) => {
this.district = data this.district = data
}) })
getShopData().then(({data}) => { getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
this.hotelTypeList = data.hotelTypeList || [] this.hotelTypeList = data.hotelTypeList || []
this.columnsType = this.hotelTypeList this.columnsType = this.hotelTypeList
this.notice = data.merchantApplyNotice this.notice = data.merchantApplyNotice
getCountyFamousHotelType().then(res => { getCountyFamousHotelType({
page: 1,
limit: 9999
}).then(res => {
const listData = Array.isArray(res.data) const listData = Array.isArray(res.data)
? res.data ? res.data
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || [] : (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
@@ -843,7 +848,10 @@ export default {
this.form.isCountyFamous = value this.form.isCountyFamous = value
if (value === 1) { if (value === 1) {
if (this.countyFamousHotelTypeList.length === 0) { if (this.countyFamousHotelTypeList.length === 0) {
getCountyFamousHotelType().then(res => { getCountyFamousHotelType({
page: 1,
limit: 9999
}).then(res => {
const listData = Array.isArray(res.data) const listData = Array.isArray(res.data)
? res.data ? res.data
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || [] : (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
@@ -963,7 +971,7 @@ export default {
if (postData.coverType === 2) { if (postData.coverType === 2) {
postData.cover = postData.coverVideo postData.cover = postData.coverVideo
} }
saveShop(postData, this.partnerId).then(res => { saveShop(postData, this.partnerId, this.promoterUid).then(res => {
if (res.status === 200) { if (res.status === 200) {
uni.showToast({ uni.showToast({
title: '您的入驻申请已提交成功,请耐心等待审核', title: '您的入驻申请已提交成功,请耐心等待审核',
+5 -3
View File
@@ -567,6 +567,7 @@ export default {
data() { data() {
return { return {
partnerId: '', partnerId: '',
promoterUid: '',
tips: '获取验证码', tips: '获取验证码',
infoTitle: '', infoTitle: '',
pics: [], pics: [],
@@ -763,6 +764,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.partnerId = options.partnerId || '' this.partnerId = options.partnerId || ''
this.promoterUid = options.promoterUid || ''
const type = options.type const type = options.type
const local = uni.getStorageSync(type) || {} const local = uni.getStorageSync(type) || {}
const local_form = uni.getStorageSync(type + '_form') || {} const local_form = uni.getStorageSync(type + '_form') || {}
@@ -881,7 +883,7 @@ export default {
getCity().then(({data}) => { getCity().then(({data}) => {
this.district = data this.district = data
}) })
getShopData().then(({data}) => { getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
this.columnsType = data.hotelTypeList this.columnsType = data.hotelTypeList
this.columnsSupplierType = data.supplierTypeList this.columnsSupplierType = data.supplierTypeList
this.notice = data.merchantApplyNotice this.notice = data.merchantApplyNotice
@@ -1161,7 +1163,7 @@ export default {
postData.cover = postData.coverVideo postData.cover = postData.coverVideo
} }
if (this.infoTitle === '特产') { if (this.infoTitle === '特产') {
saveSupplier(postData, this.formSupplier, this.partnerId).then(res => { saveSupplier(postData, this.formSupplier, this.partnerId, this.promoterUid).then(res => {
if (res.status === 200) { if (res.status === 200) {
uni.showToast({ uni.showToast({
title: '您的入驻申请已提交成功,请耐心等待审核', title: '您的入驻申请已提交成功,请耐心等待审核',
@@ -1182,7 +1184,7 @@ export default {
}) })
}) })
} else { } else {
saveWenwanSupplier(postData, this.formSupplier, this.partnerId).then(res => { saveWenwanSupplier(postData, this.formSupplier, this.partnerId, this.promoterUid).then(res => {
if (res.status === 200) { if (res.status === 200) {
uni.showToast({ uni.showToast({
title: '您的入驻申请已提交成功,请耐心等待审核', title: '您的入驻申请已提交成功,请耐心等待审核',
+5 -3
View File
@@ -408,7 +408,8 @@ export default {
cultureImg: [], cultureImg: [],
// 资质图片 // 资质图片
qualificationImg: [], qualificationImg: [],
partnerId: 0, partnerId: '',
promoterUid: '',
captcha: '', captcha: '',
form: { form: {
/** /**
@@ -466,9 +467,10 @@ export default {
} }
}, },
onLoad(opts) { onLoad(opts) {
this.partnerId = opts.partnerId this.partnerId = opts.partnerId || ''
this.promoterUid = opts.promoterUid || ''
this.queryCity() this.queryCity()
getShopData().then(({data}) => { getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
this.notice = data.merchantApplyNotice this.notice = data.merchantApplyNotice
this.initInfo() this.initInfo()
}) })
+6 -2
View File
@@ -322,10 +322,14 @@ export default {
stateType: 'primary', stateType: 'primary',
// 是否为审核中 // 是否为审核中
reviewing: false, reviewing: false,
pageKeyId: Object.freeze('merchantApplyWholesaler') pageKeyId: Object.freeze('merchantApplyWholesaler'),
partnerId: '',
promoterUid: ''
} }
}, },
onLoad(options) { onLoad(options) {
this.partnerId = options.partnerId || ''
this.promoterUid = options.promoterUid || ''
this.init() this.init()
}, },
onReady() { onReady() {
@@ -373,7 +377,7 @@ export default {
getCity().then(({data}) => { getCity().then(({data}) => {
this.district = data this.district = data
}) })
getShopData().then(({data}) => { getShopData({partnerId: this.partnerId, promoterUid: this.promoterUid}).then(({data}) => {
this.notice = data.merchantApplyNotice this.notice = data.merchantApplyNotice
this.initInfo() this.initInfo()
}) })
+11
View File
@@ -24,6 +24,7 @@
:src="countyFamousTopImage" :src="countyFamousTopImage"
class="img" class="img"
mode="widthFix" mode="widthFix"
:lazy-load="true"
/> />
<view v-if="list.length > 0" class="province-wrap" id="province-wrap"> <view v-if="list.length > 0" class="province-wrap" id="province-wrap">
<view <view
@@ -39,6 +40,7 @@
<image <image
:src="item.icon" :src="item.icon"
class="img" class="img"
:lazy-load="true"
/> />
<view class="name one-t"> <view class="name one-t">
{{ item.provinceName }} {{ item.provinceName }}
@@ -61,6 +63,7 @@
<image <image
:src="webUrl + '/page/qianxian/icon-06.png'" :src="webUrl + '/page/qianxian/icon-06.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
</view> </view>
</view> </view>
@@ -95,11 +98,13 @@
<image <image
:src="county.logo" :src="county.logo"
class="county-img" class="county-img"
:lazy-load="true"
/> />
<view class="county-name"> <view class="county-name">
<image <image
:src="webUrl + '/home/icon-location.png'" :src="webUrl + '/home/icon-location.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
<view class="county-txt one-t"> <view class="county-txt one-t">
{{ county.countyName }} {{ county.countyName }}
@@ -118,11 +123,13 @@
<image <image
:src="county.logo" :src="county.logo"
class="county-img" class="county-img"
:lazy-load="true"
/> />
<view class="county-name"> <view class="county-name">
<image <image
:src="webUrl + '/home/icon-location.png'" :src="webUrl + '/home/icon-location.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
<view class="county-txt one-t"> <view class="county-txt one-t">
{{ county.countyName }} {{ county.countyName }}
@@ -140,11 +147,13 @@
<image <image
:src="county.logo" :src="county.logo"
class="county-img" class="county-img"
:lazy-load="true"
/> />
<view class="county-name"> <view class="county-name">
<image <image
:src="webUrl + '/home/icon-location.png'" :src="webUrl + '/home/icon-location.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
<view class="county-txt one-t"> <view class="county-txt one-t">
{{ county.countyName }} {{ county.countyName }}
@@ -160,6 +169,7 @@
:src="webUrl + '/home/no-data-bg.png'" :src="webUrl + '/home/no-data-bg.png'"
mode="widthFix" mode="widthFix"
class="loadend" class="loadend"
:lazy-load="true"
/> />
</view> </view>
<image <image
@@ -167,6 +177,7 @@
:src="webUrl + '/orderIcon/nodata.png'" :src="webUrl + '/orderIcon/nodata.png'"
class="img-nodata v12-mt-16" class="img-nodata v12-mt-16"
mode="scaleToFill" mode="scaleToFill"
:lazy-load="true"
/> />
</view> </view>
<goo-skeleton <goo-skeleton
+453 -122
View File
@@ -92,7 +92,18 @@
</view> </view>
<view class="inn-signature-wrap"> <view class="inn-signature-wrap">
<view class="triangle"></view> <view class="triangle"></view>
<view class="inn-signature"> <view
v-if="detail.isDrawActivityStart && detail.drawActivityImage"
class="inn-signature draw-activity-entry"
@click="goDrawActivity"
>
<image
:src="detail.drawActivityImage"
mode="widthFix"
class="draw-activity-image"
/>
</view>
<view v-else class="inn-signature">
{{ inn.shopIntro }} {{ inn.shopIntro }}
</view> </view>
<view class="share-btn" @click="changeShare"> <view class="share-btn" @click="changeShare">
@@ -213,7 +224,7 @@
@click.stop="handleInfoHotelClick(item)" @click.stop="handleInfoHotelClick(item)"
> >
<view class="info-shop-logo"> <view class="info-shop-logo">
<image :src="item.linkHotelLogo" mode="aspectFill" /> <image :src="item.linkHotelLogo" mode="aspectFill" :lazy-load="true" />
</view> </view>
<view class="info-shop-main"> <view class="info-shop-main">
<view class="info-shop-name"> <view class="info-shop-name">
@@ -234,6 +245,7 @@
<image <image
:src="webUrl + '/20230803152147141807.png'" :src="webUrl + '/20230803152147141807.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text> <text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
</view> </view>
@@ -242,12 +254,14 @@
v-if="!item.hasZan" v-if="!item.hasZan"
:src="webUrl + '/page/hotel/zan-off-2.png'" :src="webUrl + '/page/hotel/zan-off-2.png'"
class="zan-off-icon" class="zan-off-icon"
:lazy-load="true"
@click="likeInfoItemHandle(item, index, item.zan + 1, true)" @click="likeInfoItemHandle(item, index, item.zan + 1, true)"
/> />
<image <image
v-else v-else
:src="webUrl + '/page/hotel/zan-on-2.png'" :src="webUrl + '/page/hotel/zan-on-2.png'"
class="zan-on-icon" class="zan-on-icon"
:lazy-load="true"
@click="likeInfoItemHandle(item, index, item.zan - 1, false)" @click="likeInfoItemHandle(item, index, item.zan - 1, false)"
/> />
<text <text
@@ -338,7 +352,7 @@
</view> </view>
</view> </view>
<view class="v12-px-6" > <view class="v12-px-6" >
<u-divider :text="infoArray.length === 0 ? ' · 暂无资讯 · ' : ' · 已经到底啦 · '" textPosition="center"></u-divider> <u-divider :text="infoArray.length === 0 ? ' · 暂无资讯 · ' : ` · ${getLoadMoreText(infoLoading, infoHasMore, infoArray)} · `" textPosition="center"></u-divider>
</view> </view>
</view> </view>
</view> </view>
@@ -379,6 +393,7 @@
<image <image
:src="item" :src="item"
class="img" class="img"
:lazy-load="true"
@click="showPic(index)" @click="showPic(index)"
/> />
</view> </view>
@@ -390,7 +405,7 @@
v-if="activeIndex === 2" v-if="activeIndex === 2"
class="guide-section" class="guide-section"
> >
<view v-if="isLoadInfoListSuccess"> <view v-if="isLoadGuideListoSuccess">
<view class="guide-list"> <view class="guide-list">
<view <view
v-for="(item, index) in guideList" v-for="(item, index) in guideList"
@@ -402,6 +417,7 @@
:src="item.image" :src="item.image"
mode="widthFix" mode="widthFix"
class="img" class="img"
:lazy-load="true"
/> />
<view class="info-wrap"> <view class="info-wrap">
<view class="time"> <view class="time">
@@ -419,7 +435,7 @@
class="no-data-loadend" class="no-data-loadend"
/> --> /> -->
<view class="v12-px-6" > <view class="v12-px-6" >
<u-divider :text="guideList.length === 0 ? ' · 暂无攻略 · ' : ' · 已经到底啦 · '" textPosition="center"></u-divider> <u-divider :text="guideList.length === 0 ? ' · 暂无攻略 · ' : ` · ${getLoadMoreText(guideLoading, guideHasMore, guideList)} · `" textPosition="center"></u-divider>
</view> </view>
</view> </view>
<goo-skeleton v-else /> <goo-skeleton v-else />
@@ -459,6 +475,7 @@
<image <image
:src="webUrl + '/page/qianxian/icon-02.png'" :src="webUrl + '/page/qianxian/icon-02.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
重点项目 重点项目
</view> </view>
@@ -475,6 +492,7 @@
<image <image
:src="webUrl + '/page/qianxian/icon-05.png'" :src="webUrl + '/page/qianxian/icon-05.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
</view> </view>
</view> </view>
@@ -492,6 +510,7 @@
<image <image
:src="webUrl + '/page/qianxian/icon-02.png'" :src="webUrl + '/page/qianxian/icon-02.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
招商政策 招商政策
</view> </view>
@@ -514,6 +533,7 @@
<image <image
:src="webUrl + '/page/qianxian/icon-05.png'" :src="webUrl + '/page/qianxian/icon-05.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
</view> </view>
</view> </view>
@@ -522,6 +542,9 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="industryList.length > 0 || investmentFileList.length > 0" class="load-more-status">
{{ getLoadMoreText(industryLoading || investmentLoading, industryHasMore || investmentHasMore, industryList.length ? industryList : investmentFileList) }}
</view>
<!-- <view class="project-wrap"> <!-- <view class="project-wrap">
<view class="title"> <view class="title">
<image <image
@@ -591,11 +614,13 @@
<image <image
:src="shop.cover + (shop.coverType === 2 ? '?vframe/jpg/offset/1' : '')" :src="shop.cover + (shop.coverType === 2 ? '?vframe/jpg/offset/1' : '')"
class="img" class="img"
:lazy-load="true"
/> />
<view class="location"> <view class="location">
<image <image
:src="webUrl + '/page/qianxian/icon-08.png'" :src="webUrl + '/page/qianxian/icon-08.png'"
class="icon" class="icon"
:lazy-load="true"
/> />
<view class="addr one-t"> <view class="addr one-t">
{{ shop.address }} {{ shop.address }}
@@ -610,6 +635,7 @@
<image <image
:src="shop.logo" :src="shop.logo"
class="logo" class="logo"
:lazy-load="true"
/> />
<view class="name one-t"> <view class="name one-t">
{{ shop.name }} {{ shop.name }}
@@ -622,6 +648,9 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="shopList.length > 0" class="load-more-status">
{{ getLoadMoreText(shopLoading, shopHasMore, shopList) }}
</view>
</view> </view>
<view v-if="industryTabIndex === 2"> <view v-if="industryTabIndex === 2">
<view class="card-wrap"> <view class="card-wrap">
@@ -687,6 +716,9 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="jiaLouList.length > 0" class="load-more-status">
{{ getLoadMoreText(jiaLouLoading, jiaLouHasMore, jiaLouList) }}
</view>
</view> </view>
<view v-if="industryTabIndex === 3"> <view v-if="industryTabIndex === 3">
<view class="card-wrap"> <view class="card-wrap">
@@ -758,6 +790,9 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="villageList.length > 0" class="load-more-status">
{{ getLoadMoreText(villageLoading, villageHasMore, villageList) }}
</view>
</view> </view>
</view> </view>
<!-- 产品 --> <!-- 产品 -->
@@ -881,7 +916,10 @@
@ok="handleOk" @ok="handleOk"
/> />
<FunctionGuide @hide="setGuide('countyFamousIndex')" :maxStep="2" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide> <FunctionGuide @hide="setGuide('countyFamousIndex')" :maxStep="2" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<AiEntrance /> <AiEntrance
v-if="isLoad"
:county-id="inn.areaId"
/>
</view> </view>
</template> </template>
@@ -896,7 +934,6 @@ import {
postCountyFamousNewsZan, postCountyFamousNewsZan,
postCountyFamousNewsView, postCountyFamousNewsView,
getCountyFamousIndustry, getCountyFamousIndustry,
getCountyFamousIndustryProject,
getCountyFamousInvestmentFile, getCountyFamousInvestmentFile,
getCountyFamousVillage, getCountyFamousVillage,
getCountyFamousCityDetail, getCountyFamousCityDetail,
@@ -918,6 +955,7 @@ import { pageListenMixins } from '@/mixins/pageListenMixins'
import FunctionGuide from '@/components/FunctionGuide' import FunctionGuide from '@/components/FunctionGuide'
import GuideMixins from '@/mixins/GuideMixins' import GuideMixins from '@/mixins/GuideMixins'
import AiEntrance from '@/components/aiChat/entrance' import AiEntrance from '@/components/aiChat/entrance'
import { checkDrawTime } from '@/api/lottery'
export default { export default {
components: { components: {
imgBox, imgBox,
@@ -946,6 +984,7 @@ export default {
showShare: false, showShare: false,
posterUrl: '', // posterUrl: '', //
id: null, id: null,
pageSize: 10,
partnerId: null, partnerId: null,
isLike: false, // isLike: false, //
isFavorite: false, isFavorite: false,
@@ -994,9 +1033,42 @@ export default {
countyId: null, countyId: null,
newsCategoryList: [], newsCategoryList: [],
newsCurrent: 0, newsCurrent: 0,
newsCategoryInited: false,
newsCategoryLoading: false,
shopList: [], shopList: [],
shopTypeList: [], shopTypeList: [],
shopTypeActive: '', shopTypeActive: '',
shopTypeInited: false,
detail: {},
infoPage: 1,
infoHasMore: true,
infoLoading: false,
infoInited: false,
guidePage: 1,
guideHasMore: true,
guideLoading: false,
guideInited: false,
industryPage: 1,
industryHasMore: true,
industryLoading: false,
industryInited: false,
investmentPage: 1,
investmentHasMore: true,
investmentLoading: false,
investmentInited: false,
shopPage: 1,
shopHasMore: true,
shopLoading: false,
shopInited: false,
jiaLouPage: 1,
jiaLouHasMore: true,
jiaLouLoading: false,
jiaLouInited: false,
villagePage: 1,
villageHasMore: true,
villageLoading: false,
villageInited: false,
saleListInited: false
} }
}, },
onShareAppMessage() { onShareAppMessage() {
@@ -1007,13 +1079,42 @@ export default {
return { return {
title: this.inn.countyName || this.share.title, title: this.inn.countyName || this.share.title,
path: '/pkg_product/views/famousQianxianShop?id=' + this.id, path: '/pkg_product/views/famousQianxianShop?id=' + this.id,
imageUrl: this.inn.cover || this.share.imageUrl imageUrl: this.detail.logo || this.inn.cover
} }
}, },
// onPageScroll(e){} // onPageScroll(e){}
onPageScroll(e) { onPageScroll(e) {
this.scrollData = e this.scrollData = e
}, },
onReachBottom() {
if (this.activeIndex === 3) {
this.getInfoReq()
return
}
if (this.activeIndex === 2) {
this.getGuideReq()
return
}
if (this.activeIndex !== 0) {
return
}
if (this.industryTabIndex === 0) {
this.getIndustryReq()
this.getInvestmentFileReq()
return
}
if (this.industryTabIndex === 1) {
this.getShopList()
return
}
if (this.industryTabIndex === 2) {
this.getJiaLouListReq()
return
}
if (this.industryTabIndex === 3) {
this.getVillageListReq()
}
},
onLoad(options) { onLoad(options) {
const id = options.id || '' const id = options.id || ''
this.id = id this.id = id
@@ -1031,29 +1132,77 @@ export default {
} }
if (this.partnerId) cookie.set('spread', this.partnerId) if (this.partnerId) cookie.set('spread', this.partnerId)
this.getShopDetailReq() this.getShopDetailReq()
this.getInfoReq()
this.getGuideReq()
// this.initPoster()
this.getListReq() this.getListReq()
this.getsaleList()
this.queryGuide('countyFamousIndex') this.queryGuide('countyFamousIndex')
this.getCityNewsCategoryReq()
}, },
methods: { methods: {
getPageList(data) {
if (Array.isArray(data)) {
return data
}
return (data && (data.records || data.list || data.data)) || []
},
getHasMore(data, list, page) {
const pageCount = Number(
data && (data.pages || data.totalPage || data.last_page || data.pageCount || 0)
)
const total = Number(
data && (data.total || data.totalCount || data.count || 0)
)
if (pageCount > 0) {
return page < pageCount
}
if (total > 0) {
return page * this.pageSize < total
}
return list.length >= this.pageSize
},
getLoadMoreText(loading, hasMore, list) {
if (!list.length) return ''
if (loading) return '加载中...'
if (hasMore) return '上拉加载更多'
return '没有更多了'
},
formatInfoList(list = []) {
return list.map(info => {
var pt = info.createTime.replace(/-/g, "/")
info.year = formatDateTime(pt, 'yyyy')
info.monthDay = formatDateTime(pt, 'MM/dd')
info.time = formatDateTime(pt, 'HH:mm:ss')
info.showMore = false
return info
})
},
formatGuideList(list = []) {
return list.map((info) => {
var pt = info.createTime.replace(/-/g, "/")
info.year = formatDateTime(pt, 'yyyy')
info.monthDay = formatDateTime(pt, 'MM/dd')
info.time = formatDateTime(pt, 'HH:mm:ss')
return info
})
},
/** /**
* 获取县城资讯类别 * 获取县城资讯类别
*/ */
getCityNewsCategoryReq() { getCityNewsCategoryReq() {
getCityNewsCategory().then(res => { if (this.newsCategoryInited || this.newsCategoryLoading) {
return Promise.resolve()
}
this.newsCategoryLoading = true
return getCityNewsCategory().then(res => {
if(res.status === 200) { if(res.status === 200) {
this.newsCategoryList = [{name: '全部', id: ''}].concat(res.data || []) this.newsCategoryList = [{name: '全部', id: ''}].concat(res.data || [])
this.newsCategoryInited = true
} }
}).finally(() => {
this.newsCategoryLoading = false
}) })
}, },
changeNewsTab(index) { changeNewsTab(index) {
if (this.newsCurrent === index) return if (this.newsCurrent === index) return
this.newsCurrent = index this.newsCurrent = index
this.getInfoReq() this.getInfoReq(true)
}, },
formatterTime(time) { formatterTime(time) {
const now = new Date(); const now = new Date();
@@ -1216,25 +1365,18 @@ export default {
} else { } else {
this.saleActived = e.id this.saleActived = e.id
} }
this.getVillageListReq(true)
getCountyFamousVillage({
countyFamousDataId: this.id,
categoryId: this.saleActived,
page: 1,
limit: 9999
}).then(res => {
const { success, data } = res
if (success) {
this.villageList = data.records || []
}
})
}, },
getsaleList() { getSaleListReq() {
if (this.saleListInited) {
return Promise.resolve()
}
const params = { const params = {
countyFamousDataId: this.id countyFamousDataId: this.id
} }
getSaleList(params).then(res => { return getSaleList(params).then(res => {
this.saleList = [{name: '全部', id: ''}].concat(res.data || []) this.saleList = [{name: '全部', id: ''}].concat(res.data || [])
this.saleListInited = true
}) })
}, },
goStore(item) { goStore(item) {
@@ -1261,52 +1403,13 @@ export default {
} }
}) })
}, },
getListReq(id) { getListReq() {
// getPoster(this.id).then(({data}) => this.posterUrl = data) this.getIndustryReq(true)
getCountyFamousIndustry({ this.getInvestmentFileReq(true)
countyFamousDataId: this.id,
page: 1,
limit: 9999
}).then(res => {
const { success, data } = res
if (success) {
this.industryList = data.records || []
}
})
getCountyFamousIndustryProject({
countyFamousDataId: this.id,
page: 1,
limit: 9999
}).then(res => {
const { success, data } = res
if (success) {
this.industryProjectList = data.records || []
}
})
getCountyFamousInvestmentFile({
countyFamousDataId: this.id,
page: 1,
limit: 9999
}).then(res => {
const { success, data } = res
if (success) {
this.investmentFileList = data.records || []
}
})
getCountyFamousVillage({
countyFamousDataId: this.id,
categoryId: id,
page: 1,
limit: 9999
}).then(res => {
const { success, data } = res
if (success) {
this.villageList = data.records || []
}
})
getCountyFamousCityDetail(this.id).then(res => { getCountyFamousCityDetail(this.id).then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
this.detail = data
this.countyId = data.countyId this.countyId = data.countyId
const products = data.products || [] const products = data.products || []
const farmerShops = data.farmerShops || [] const farmerShops = data.farmerShops || []
@@ -1389,34 +1492,38 @@ export default {
}) })
}, },
// //
getInfoReq() { getInfoReq(reset = false) {
const _this = this const _this = this
if (_this.loading) { if (_this.infoLoading) {
return
}
if (!reset && !_this.infoHasMore) {
return return
} }
_this.isLoadInfoListSuccess = false _this.isLoadInfoListSuccess = false
_this.loading = true _this.infoLoading = true
_this.infoArray = [] const page = reset ? 1 : _this.infoPage
if (reset) {
_this.infoPage = 1
_this.infoHasMore = true
_this.infoArray = []
}
const categoryId = this.newsCategoryList[this.newsCurrent] ? this.newsCategoryList[this.newsCurrent].id : '' const categoryId = this.newsCategoryList[this.newsCurrent] ? this.newsCategoryList[this.newsCurrent].id : ''
getCountyFamousCityNews({ getCountyFamousCityNews({
page: 1, page,
limit: 9999, limit: this.pageSize,
countyFamousDataId: _this.id, countyFamousDataId: _this.id,
categoryId: categoryId categoryId: categoryId
}).then(res => { }).then(res => {
const { data } = res const { data } = res
_this.loading = false const list = _this.formatInfoList(_this.getPageList(data))
_this.infoArray.push.apply(_this.infoArray, _this.toTop(data.records).map((info) => { const merged = page === 1 ? list : _this.infoArray.concat(list)
var pt = info.createTime.replace(/-/g, "/") _this.infoArray = _this.toTop(merged)
info.year = formatDateTime(pt, 'yyyy') _this.infoHasMore = _this.getHasMore(data, list, page)
info.monthDay = formatDateTime(pt, 'MM/dd') _this.infoPage = page + 1
info.time = formatDateTime(pt, 'HH:mm:ss') _this.infoInited = true
info.showMore = false
return info
}))
// console.log(this.toTop(_this.infoArray));
}).finally(() => { }).finally(() => {
_this.loading = false _this.infoLoading = false
_this.isLoadInfoListSuccess = true _this.isLoadInfoListSuccess = true
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
@@ -1427,30 +1534,35 @@ export default {
}) })
}, },
// //
getGuideReq() { getGuideReq(reset = false) {
const _this = this const _this = this
if (_this.loading) { if (_this.guideLoading) {
return
}
if (!reset && !_this.guideHasMore) {
return return
} }
_this.isLoadGuideListoSuccess = false _this.isLoadGuideListoSuccess = false
_this.loading = true _this.guideLoading = true
_this.guideList = [] const page = reset ? 1 : _this.guidePage
if (reset) {
_this.guidePage = 1
_this.guideHasMore = true
_this.guideList = []
}
getCountyFamousCityGuide({ getCountyFamousCityGuide({
page: 1, page,
limit: 9999, limit: this.pageSize,
countyFamousDataId: _this.id countyFamousDataId: _this.id
}).then(res => { }).then(res => {
const { data } = res const { data } = res
_this.loading = false const list = _this.formatGuideList(_this.getPageList(data))
_this.guideList.push.apply(_this.guideList, data.records.map((info) => { _this.guideList = page === 1 ? list : _this.guideList.concat(list)
var pt = info.createTime.replace(/-/g, "/") _this.guideHasMore = _this.getHasMore(data, list, page)
info.year = formatDateTime(pt, 'yyyy') _this.guidePage = page + 1
info.monthDay = formatDateTime(pt, 'MM/dd') _this.guideInited = true
info.time = formatDateTime(pt, 'HH:mm:ss')
return info
}))
}).finally(() => { }).finally(() => {
_this.loading = false _this.guideLoading = false
_this.isLoadGuideListoSuccess = true _this.isLoadGuideListoSuccess = true
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
@@ -1462,10 +1574,35 @@ export default {
// //
switch (this.activeIndex) { switch (this.activeIndex) {
case 3: case 3:
this.getInfoReq() this.getCityNewsCategoryReq().finally(() => {
if (!this.infoInited) {
this.getInfoReq(true)
}
})
break break
case 2: case 2:
this.getGuideReq() if (!this.guideInited) {
this.getGuideReq(true)
}
break
case 0:
if (this.industryTabIndex === 1) {
if (!this.shopTypeInited) {
this.getShopTypeList()
}
if (!this.shopInited) {
this.getShopList(true)
}
}
if (this.industryTabIndex === 2 && !this.jiaLouInited) {
this.getJiaLouListReq(true)
}
if (this.industryTabIndex === 3) {
this.getSaleListReq()
if (!this.villageInited) {
this.getVillageListReq(true)
}
}
break break
default: default:
break break
@@ -1639,6 +1776,34 @@ export default {
toggleCountyIntro() { toggleCountyIntro() {
this.toggleCountyIntroStatus = !this.toggleCountyIntroStatus this.toggleCountyIntroStatus = !this.toggleCountyIntroStatus
}, },
parseCheckTimeResult(res) {
if (typeof res === 'boolean') return res
if (typeof (res && res.data) === 'boolean') return res.data
if (res && typeof res.success !== 'undefined') return Boolean(res.data)
return false
},
async goDrawActivity() {
const activityId = Number(this.detail.drawActivityId) || 0
if (!activityId) {
uni.showToast({
title: '活动暂未配置',
icon: 'none'
})
return
}
let opened = false
try {
const res = await checkDrawTime(activityId)
opened = this.parseCheckTimeResult(res)
} catch (e) {
opened = false
}
uni.navigateTo({
url: opened
? `/pkg-video/views/county-winners?activityId=${activityId}`
: `/pkg-video/views/county-lottery?activityId=${activityId}`
})
},
showPic(index) { showPic(index) {
uni.previewImage({ uni.previewImage({
current: index, current: index,
@@ -1682,50 +1847,202 @@ export default {
if (index === this.industryTabIndex) return if (index === this.industryTabIndex) return
this.industryTabIndex = index this.industryTabIndex = index
if (index === 2) { if (index === 2) {
const params = { if (!this.jiaLouInited) {
countyId: this.countyId, this.getJiaLouListReq(true)
shopType: 'countyFamous',
name: '',
page: 1,
limit: 9999
} }
getJiaLouList(params).then(res => {
this.jiaLouList = res.data.records || []
})
} }
if (index === 1) { if (index === 1) {
this.shopTypeActive = '' this.shopTypeActive = ''
if (this.shopTypeList.length === 0) { if (this.shopTypeList.length === 0) {
this.getShopTypeList() this.getShopTypeList()
} }
this.getShopList() if (!this.shopInited) {
this.getShopList(true)
}
}
if (index === 3) {
this.getSaleListReq()
if (!this.villageInited) {
this.getVillageListReq(true)
}
} }
}, },
getShopTypeList() { getShopTypeList() {
getCountyFamousHotelType().then(res => { if (this.shopTypeInited) {
return
}
getCountyFamousHotelType({
page: 1,
limit: 9999
}).then(res => {
const listData = Array.isArray(res.data) const listData = Array.isArray(res.data)
? res.data ? res.data
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || [] : (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
this.shopTypeList = [{ name: '全部', id: '' }].concat(listData || []) this.shopTypeList = [{ name: '全部', id: '' }].concat(listData || [])
this.shopTypeInited = true
}) })
}, },
getShopList() { getIndustryReq(reset = false) {
if (this.industryLoading) {
return
}
if (!reset && !this.industryHasMore) {
return
}
const page = reset ? 1 : this.industryPage
if (reset) {
this.industryPage = 1
this.industryHasMore = true
this.industryList = []
}
this.industryLoading = true
getCountyFamousIndustry({
countyFamousDataId: this.id,
page,
limit: this.pageSize
}).then(res => {
const { success, data } = res
if (success) {
const list = this.getPageList(data)
this.industryList = page === 1 ? list : this.industryList.concat(list)
this.industryHasMore = this.getHasMore(data, list, page)
this.industryPage = page + 1
this.industryInited = true
}
}).finally(() => {
this.industryLoading = false
})
},
getInvestmentFileReq(reset = false) {
if (this.investmentLoading) {
return
}
if (!reset && !this.investmentHasMore) {
return
}
const page = reset ? 1 : this.investmentPage
if (reset) {
this.investmentPage = 1
this.investmentHasMore = true
this.investmentFileList = []
}
this.investmentLoading = true
getCountyFamousInvestmentFile({
countyFamousDataId: this.id,
page,
limit: this.pageSize
}).then(res => {
const { success, data } = res
if (success) {
const list = this.getPageList(data)
this.investmentFileList = page === 1 ? list : this.investmentFileList.concat(list)
this.investmentHasMore = this.getHasMore(data, list, page)
this.investmentPage = page + 1
this.investmentInited = true
}
}).finally(() => {
this.investmentLoading = false
})
},
getJiaLouListReq(reset = false) {
if (this.jiaLouLoading || !this.countyId) {
return
}
if (!reset && !this.jiaLouHasMore) {
return
}
const page = reset ? 1 : this.jiaLouPage
if (reset) {
this.jiaLouPage = 1
this.jiaLouHasMore = true
this.jiaLouList = []
}
this.jiaLouLoading = true
const params = {
countyId: this.countyId,
shopType: 'countyFamous',
name: '',
page,
limit: this.pageSize
}
getJiaLouList(params).then(res => {
const list = this.getPageList(res.data)
this.jiaLouList = page === 1 ? list : this.jiaLouList.concat(list)
this.jiaLouHasMore = this.getHasMore(res.data, list, page)
this.jiaLouPage = page + 1
this.jiaLouInited = true
}).finally(() => {
this.jiaLouLoading = false
})
},
getShopList(reset = false) {
if (this.shopLoading) {
return
}
if (!reset && !this.shopHasMore) {
return
}
const page = reset ? 1 : this.shopPage
if (reset) {
this.shopPage = 1
this.shopHasMore = true
this.shopList = []
}
const params = { const params = {
countyFamousDataId: this.id, countyFamousDataId: this.id,
page: 1, page,
limit: 9999 limit: this.pageSize
} }
if (this.shopTypeActive) { if (this.shopTypeActive) {
params.countyFamousHotelType = this.shopTypeActive params.countyFamousHotelType = this.shopTypeActive
} }
this.shopLoading = true
getCityShopList(params).then(res => { getCityShopList(params).then(res => {
this.shopList = (res.data && (res.data.records || res.data.list)) || [] const list = this.getPageList(res.data)
this.shopList = page === 1 ? list : this.shopList.concat(list)
this.shopHasMore = this.getHasMore(res.data, list, page)
this.shopPage = page + 1
this.shopInited = true
}).finally(() => {
this.shopLoading = false
}) })
}, },
handleShopType(type) { handleShopType(type) {
if (this.shopTypeActive === type.id) return if (this.shopTypeActive === type.id) return
this.shopTypeActive = type.id this.shopTypeActive = type.id
this.getShopList() this.getShopList(true)
},
getVillageListReq(reset = false) {
if (this.villageLoading) {
return
}
if (!reset && !this.villageHasMore) {
return
}
const page = reset ? 1 : this.villagePage
if (reset) {
this.villagePage = 1
this.villageHasMore = true
this.villageList = []
}
this.villageLoading = true
getCountyFamousVillage({
countyFamousDataId: this.id,
categoryId: this.saleActived,
page,
limit: this.pageSize
}).then(res => {
const { success, data } = res
if (success) {
const list = this.getPageList(data)
this.villageList = page === 1 ? list : this.villageList.concat(list)
this.villageHasMore = this.getHasMore(data, list, page)
this.villagePage = page + 1
this.villageInited = true
}
}).finally(() => {
this.villageLoading = false
})
}, },
fileItemClick(file) { fileItemClick(file) {
const url = file.attachment || '' const url = file.attachment || ''
@@ -1853,6 +2170,12 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
} }
.load-more-status{
padding: 24rpx 0 8rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
.video-item { .video-item {
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
@@ -2024,6 +2347,14 @@ export default {
background: rgba(243,243,246,0.39); background: rgba(243,243,246,0.39);
box-shadow: 0px 6px 12px rgba(0,0,0,0.12); box-shadow: 0px 6px 12px rgba(0,0,0,0.12);
} }
.draw-activity-entry {
padding: 0;
}
.draw-activity-image {
width: 100%;
display: block;
border-radius: 8rpx;
}
.share-btn { .share-btn {
position: absolute; position: absolute;
right: 0; right: 0;
+42 -6
View File
@@ -1,7 +1,13 @@
<template> <template>
<view class="gift-page"> <view class="gift-page">
<view class="banner" @click="linkTo"> <view class="banner" @click="linkTo">
<rich-text :nodes="topBannerHtml" /> <view v-if="topBannerImage" class="banner-image-wrap">
<image
:src="topBannerImage"
class="banner-img"
mode="aspectFill"
/>
</view>
</view> </view>
<view class="province-enter-wrap"> <view class="province-enter-wrap">
<view <view
@@ -60,7 +66,13 @@
class="item" class="item"
> >
<view class="bg" @click="provinceItemClick(item)"> <view class="bg" @click="provinceItemClick(item)">
<rich-text :nodes="item.bgHtml" /> <!-- <rich-text :nodes="item.bgHtml" /> -->
<image
:src="item.backgroundImage"
class="bg-img"
mode="widthFix|aspectFill"
lazy-load
/>
</view> </view>
<view class="good-list"> <view class="good-list">
<view <view
@@ -70,7 +82,7 @@
@click.stop="goodItemClick(goodItem)" @click.stop="goodItemClick(goodItem)"
> >
<view class="good-img"> <view class="good-img">
<image :src="goodItem.productImage" class="img" /> <image :src="goodItem.productImage" class="img" lazy-load />
</view> </view>
<view class="name"> <view class="name">
{{ goodItem.productName }} {{ goodItem.productName }}
@@ -97,7 +109,7 @@ export default {
data() { data() {
return { return {
provinceList: [], provinceList: [],
topBannerHtml: '', topBannerImage: '',
topBannerUrl: '', topBannerUrl: '',
toggleStatus: false, toggleStatus: false,
pageKeyId: Object.freeze('customizedGiftIndex') pageKeyId: Object.freeze('customizedGiftIndex')
@@ -111,7 +123,7 @@ export default {
customizedGift().then(res => { customizedGift().then(res => {
const { success, data } = res const { success, data } = res
if (success) { if (success) {
this.topBannerHtml = `<img src="${data.topBanner.image}" style="display: block;max-width: 100%;">` this.topBannerImage = data.topBanner.image || ''
this.topBannerUrl = data.topBanner.appUrl || '' this.topBannerUrl = data.topBanner.appUrl || ''
const list = data.cities || [] const list = data.cities || []
if (list.length > 0) { if (list.length > 0) {
@@ -120,7 +132,7 @@ export default {
if (backgroundImage && item.productList.length > 0) { if (backgroundImage && item.productList.length > 0) {
this.provinceList.push({ this.provinceList.push({
...item, ...item,
bgHtml: `<img src="${item.backgroundImage}" style="display: block;max-width: 100%;">` backgroundImage
}) })
} }
}) })
@@ -164,6 +176,21 @@ export default {
.banner { .banner {
position: relative; position: relative;
z-index: 1; z-index: 1;
.banner-image-wrap {
position: relative;
width: 100%;
padding-top: 46%;
overflow: hidden;
background-color: #f6f6f6;
}
.banner-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
}
} }
.province-enter-wrap { .province-enter-wrap {
position: relative; position: relative;
@@ -243,6 +270,15 @@ export default {
.bg { .bg {
position: relative; position: relative;
z-index: 2; z-index: 2;
width: 100%;
overflow: hidden;
border-radius: 20rpx;
background-color: #f6f6f6;
.bg-img {
top: 0;
width: 100%;
display: block;
}
} }
.good-list { .good-list {
position: absolute; position: absolute;

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