338 Commits
Author SHA1 Message Date
lifizer 736112a28d Merge branch 'dev' into test 2026-09-15 09:14:05 +08:00
lifizer 46d8fe8b70 Fix(送礼):[#6046]输入框限制修改为300字 2026-09-15 09:13:10 +08:00
lifizer 108f204f03 Fix(送礼):[#6106]送礼完成后点击【再送一份】按钮,屏幕会变成白屏 2026-09-14 10:54:43 +08:00
linxi 77fee4ea46 Fix:5967 【商城小程序】已发过消息的聊天页面,进行图片相关操作后页面出现白屏 2026-09-11 16:22:35 +08:00
linxi 0e04c560bc Fix:6018 【礼品集采中心小程序】我的订单-集采中心,隐藏自建订单详情页的实付款 2026-09-11 16:01:27 +08:00
lifizer e6d8bff772 Fix(送礼):[#6073]在页面超时后,点击付款并赠送,界面显示“订单已过期,请刷新当前界面”,需自动刷新该页面 2026-09-11 10:11:41 +08:00
lifizer 44093a5893 Fix(送礼):[#6046]输入框限制修改为500字 2026-09-11 09:55:08 +08:00
lifizer 7f058ec10b Fix(送礼):[#6064]收礼方查看的AI礼包封面图不需要显示商品图片 2026-09-11 09:45:02 +08:00
lifizer c226263289 Fix(送礼):[#6075]1、预览图底部增加红色文字;2、点击生成礼包封面后,按钮文字变为:礼包封面生成中... 2026-09-11 09:27:00 +08:00
lifizer a59d10e7dc Feat(送礼):支持AI的文生图-4 2026-09-09 14:32:51 +08:00
lifizer 3523ce5599 Feat(送礼):支持AI的文生图-3 2026-09-09 11:42:47 +08:00
lifizer 41d9da4c7e Feat(送礼):支持AI的文生图-2 2026-09-08 16:06:25 +08:00
lifizer 733048e2c9 Feat(送礼):支持AI的文生图 2026-09-08 15:23:29 +08:00
lifizer 8c00c82e3f Feat(商品详情):店铺资料通过配置控制是否显示 2026-09-08 10:09:47 +08:00
linxi 452f3e3327 Fix:5926 【商城小程序】多规格商品默认组合无库存时,组成该组合的两个规格属性因各自均无可售组合,导致全部规格按钮置灰。 2026-09-04 15:04:28 +08:00
linxi 61cecbe8e5 Fix:5955 【商城小程序】特产供应商/文玩供应商/特色店铺,入驻申请被驳回后页面不显示驳回原因 。 2026-09-04 14:38:55 +08:00
linxi 88147f3783 Fix:5956 【商城小程序】进入招商项目页面,连续点击多次招商项目文件,阅读文件左滑返回后有报错 2026-09-04 11:39:18 +08:00
linxi 069f0fa413 Fix:5954 【商城小程序】进入趣游页面时会短暂出现“暂无数据”后才加载出内容 2026-09-04 11:33:13 +08:00
linxi 6e14b8dd69 Fix:5953 【商城小程序】使用指南页面切换分类类型时页面刷新,短暂展示“暂无数据”,需优化页面切换刷新效果 2026-09-04 11:27:06 +08:00
linxi ed5792b860 Fix:5950 【商城小程序】文玩页面当前城市标识显示的是“当前定位”,参考图2进行文字调整 2026-09-04 11:20:30 +08:00
linxi 98a142dba1 Fix:5948 【商城小程序】旅居团购提交订单取消支付后,错误跳转到【购物‑待付款】页面 2026-09-04 11:14:17 +08:00
linxi b3ae93633c Fix:5921 【商城小程序】划动店铺列表区域无法加载出全部店铺 2026-09-04 10:41:26 +08:00
linxi cb5449eaac Fix:取消体现金额最低限制(界面) 2026-08-31 09:11:45 +08:00
LinCyJang 37c1277a83 Feat:增加提现规则 2026-08-29 15:07:51 +08:00
lifizer 05d7400f64 Merge branch 'dev' into test 2026-08-28 17:48:51 +08:00
linxi 36585188c4 Fix:5453 【商城小程序】苹果手机视频列表布局方向从右到左,应该从左到右排列,与安卓同步 2026-08-26 16:25:21 +08:00
linxi 2ee9876f01 Fix:5453 【商城小程序】苹果手机视频列表布局方向从右到左,应该从左到右排列,与安卓同步 2026-08-26 15:54:51 +08:00
linxi 1687f417d7 Fix:5882 【商城小程序】【商户入驻-特产供应商/文玩供应商】填写特产供应商的基本信息资料,文玩供应商的基本信息会被自动同步填写成一模一样的(测试用户ID:5838 配) 2026-08-26 09:37:02 +08:00
linxi 59dec5c11c Fix:5873 【商城小程序】开屏广告持续时间改成5秒 2026-08-25 12:20:08 +08:00
linxi d5d85d2cd2 Fix:5863 【商城小程序】【商户入驻-体验店入驻】当体验店入驻申请被驳回后,入驻申请详情页不显示【提交申请】按钮 2026-08-25 11:57:57 +08:00
linxi 708aa88914 Fix:5872 【商城小程序】【商户入驻-礼品集采中心】礼品集采中心入驻详情页面中,中心名称错误显示为“请填写批发商名称” 2026-08-25 11:34:26 +08:00
linxi dfb92b7332 Fix:5874 【商城小程序】【商户入驻-礼品集采中心】入驻详情页中,“中心名称”“营业执照名称”“联系人姓名”“联系方式”“省市区”“详细地址”与输入框文案间距过大,且“省市区”与“详细地址”输入框文案未对齐 2026-08-25 11:33:23 +08:00
linxi df47b96e87 Fix:5857 【商城小程序】我的订单-集采中心,商城小程序订单详情页商品总价和礼品价值的金额与文字不在一行 2026-08-25 11:24:03 +08:00
linxi 5d8ea0cbd5 Fix:5565 【商城小程序】千县攻略简介和定位的文字字体大小调整 2026-08-24 12:41:24 +08:00
linxi f38ba76ac0 Fix:5851 【商城小程序】【商户入驻-店铺入驻】提交店铺申请后点击“撤销申请”按钮,店铺入驻详情页验证码输入框无法输入内容并且缺失【获取验证码】按钮 2026-08-24 12:25:59 +08:00
linxi 1845171a1e Fix:5852 【商城小程序】验证码输入框旁的“验证码”文案显示位置错位 2026-08-24 12:14:18 +08:00
linxi 007e80bebb Fix:5850 【礼品集采中心小程序】我的订单-集采中心,商城小程序自建礼品订单详情页,自建礼品关闭礼品价值时隐藏礼品价值 2026-08-24 11:54:01 +08:00
linxi a427cfbb92 Fix:5844 【商城小程序】【礼品集采中心入驻】商户入驻申请被驳回后页面未显示驳回原因 2026-08-22 11:58:00 +08:00
linxi f1e063aab9 Fix:5527 【管理后台】媒体管理-弹窗海报,在填写使用指南板块链接时每次从其他板块切换至首页均重复弹出弹窗 2026-08-22 11:05:27 +08:00
linxi 876e15b655 Merge branch 'dev' of gitee.com:fengyuze178/xdd-uniapp-new into dev 2026-08-21 10:20:38 +08:00
linxi b0d8d3163e Fix:5835 【商城小程序】【商户入驻-礼品集采中心】扫码入驻审核通过后,再次进入入驻详情页仍显示“未提交申请”(状态未同步) 2026-08-21 10:20:31 +08:00
lifizer 1e58a29d9b Merge branch 'dev' of https://gitee.com/fengyuze178/xdd-uniapp-new into dev 2026-08-21 10:02:21 +08:00
lifizer e6ff7fafce Fix(云灵AI):[#5831]上滑时背景图相对底部固定 2026-08-21 10:02:03 +08:00
linxi 640d61fd49 Fix:5832 【商城小程序】【商户入驻】各接口入驻详情页,点击“撤销申请”,页面会自动返回至商户入驻列表页 2026-08-21 10:01:56 +08:00
lifizer 6843be82cb Fix(云灵AI):[#5796]预设礼品条件选择界面,苹果16以后出的手机,页面无法往下滑动 2026-08-20 17:05:48 +08:00
linxi c58f785304 Fix:5819 【礼品集采中心小程序】我的订单-集采中心,把自建礼品订单详情页的支付状态和支付方式都删掉 2026-08-20 16:04:13 +08:00
linxi 2062046901 Fix:5824 【商城小程序】【商户入驻】进入任意接口入驻页面时,先闪现未填写资料界面,过几秒才会显示已填写的资料页面 2026-08-20 15:59:59 +08:00
linxi 1adef8d00b Fix:5798 【礼品集采中心小程序】【商户入驻-礼品集采中心入驻】礼品集采中心入驻详情页,商家资质上传位置仅支持上传单张图片 2026-08-20 12:31:56 +08:00
linxi 62b227034f Merge branch 'dev' of gitee.com:fengyuze178/xdd-uniapp-new into dev 2026-08-20 11:57:25 +08:00
linxi 60c3e0f572 Fix: 语法错误 2026-08-20 11:57:18 +08:00
lifizer 0f76d54e27 Feat(云灵AI):增加引导内容配置 2026-08-20 11:53:04 +08:00
linxi 0369f0f1d3 Fix:5808 【商城小程序】【商户入驻-文玩供应商】入驻详情页填写资料后返回商户入驻列表页,再次进入时已填写的店铺资料未自动保存 2026-08-20 11:52:35 +08:00
linxi 085730bb9c Fix:5808 【商城小程序】【商户入驻-文玩供应商】入驻详情页填写资料后返回商户入驻列表页,再次进入时已填写的店铺资料未自动保存 2026-08-20 10:57:01 +08:00
linxi d68f734f95 Fix:5801 【商城小程序】从(体验版)香道滇小程序【商户入驻】点击礼品集采中心入驻接口会跳转到(正式版)香道滇产业供应链 2026-08-20 10:43:29 +08:00
linxi 41d99e95f9 Fix:5805 【商城小程序】【商户入驻-入驻申请须知】用户未勾选“我已仔细阅读并同意”时,点击弹窗空白区域即可关闭弹窗,不符合逻辑 2026-08-20 10:39:11 +08:00
linxi ae72fc0a8f Fix:5809 【商城小程序】【商户入驻】商户入驻详情页视频上传位置缺少删除键 2026-08-20 10:33:31 +08:00
linxi 8e00a1e477 Fix:5812 【商城小程序】【商户入驻-店铺入驻】商户入驻详情页店铺图片封面及店铺logo上传位置缺少删除键 2026-08-20 10:30:01 +08:00
linxi 75d4b43e5e Fix:5793 【商城小程序】我的订单-集采中心,在采购批发订单详情页点击商品信息卡片,改为无法进入批发商品详情页 2026-08-18 18:22:45 +08:00
linxi 62d8cfd13b Fix:5785 【商城小程序】【商户入驻-礼品集采中心入驻】入驻详情页,省市区填写栏错误显示为null 2026-08-18 14:19:09 +08:00
linxi 96b175a562 Fix:5785 【商城小程序】【商户入驻-礼品集采中心入驻】入驻详情页,省市区填写栏错误显示为null 2026-08-18 14:15:49 +08:00
linxi 230fe66e82 Fix:5689 【礼品集采中心小程序】【我的订单-联系商家】向商家发送图片时,页面图片显示为纯白色 2026-08-18 14:11:47 +08:00
linxi 20c53f245c Fix:5680 【商城小程序】购物类订单:收礼方确认收货后订单变为待评价状态,点击【去评价】跳转页面错误,应跳转到图2的页面 2026-08-18 14:00:43 +08:00
linxi ac741f9339 Fix:5701 【商城小程序】【我的订单-集采中心】订单列表采购批发商品卡片未显示商品名称信息 2026-08-18 13:44:00 +08:00
linxi f0284d1b06 Fix:5693 【商城小程序】【我的订单-订单列表】删除已完成订单后,页面跳转至“购物”Tab 2026-08-18 13:31:09 +08:00
linxi 3ac6fa4e14 Fix:5785 【商城小程序】【商户入驻-礼品集采中心入驻】入驻详情页,省市区填写栏错误显示为null 2026-08-18 10:26:04 +08:00
linxi 691f8eabd0 Fix:5695 【商城小程序】已发货订单申请退款被驳回后,订单详情页面没有物流一栏 2026-08-18 10:19:08 +08:00
linxi b0e7628f65 Fix:5728 【商城小程序】我的礼品卡-收到的,商品名称长会被标识遮挡 2026-08-17 18:32:40 +08:00
linxi 920e7cc1dc Fix:5730 【管理后台】我的订单-集采中心,自建礼品订单详情页“商品总价”改成“礼品价值”,支付方式未显示余额支付/微信支付 2026-08-17 16:21:44 +08:00
linxi f4539ccf4a Fix:5778 【商城小程序】【商户入驻-入驻申请须知】香道滇小程序展示的“入驻申请须知”段落格式,与香道滇后台管理系统中配置的内容格式不一致 2026-08-17 16:18:47 +08:00
linxi f20e73e859 Fix:5777 【礼品集采中心小程序】【商户入驻-礼品集采中心】入驻详情页增加“营业执照名称”填写栏,必填项 2026-08-17 16:08:23 +08:00
linxi 57fc90b030 Fix:5759 【礼品集采中心小程序】我的订单-集采中心,领取采购批发礼品的盲盒,订单列表和订单详情页效果显示错误 2026-08-17 15:36:56 +08:00
linxi 6b09cf8a90 Fix:5761 【礼品集采中心PC端】【商户入驻-礼品集采中心】头像、资质内容,点击图片可重新上传,无删除按键。 2026-08-17 14:39:29 +08:00
linxi 4670b51a5a Feat:开屏页调整至5s 2026-08-17 14:39:22 +08:00
linxi e729fb3c94 Merge branch 'dev' of gitee.com:fengyuze178/xdd-uniapp-new into dev 2026-08-12 10:50:17 +08:00
linxi c6ef03434e Fix:5689 【礼品集采中心小程序】【我的订单-联系商家】向商家发送图片时,页面图片显示为纯白色 2026-08-12 10:50:10 +08:00
lifizer f7a3bdc3fe Refactor(云灵AI):ws连接使用uid拼接,兼容APP登录没有获取到unionId 2026-08-12 10:42:57 +08:00
linxi b636cd905b Fix:5707 【礼品集采中心小程序】【我的订单-集采中心】订单详情有【再买一单】按钮,需要删除 2026-08-12 10:28:07 +08:00
linxi 9102c47804 Fix:查看订单详情后返回订单列表,应停留在用户进入详情页前的位置 2026-08-12 10:23:43 +08:00
linxi 238f56ab11 Fix:5716 【商城小程序】【我的订单-集采中心】删除已完成订单后,页面自动刷新跳转至【我的订单-购物】页面 2026-08-12 10:18:44 +08:00
LinCyJang e92027d74e Fix:5593 【商城小程序】自建礼品设置了商品价值,但是收礼人领取后,商城小程序端未显示礼品价值 2026-08-10 22:13:39 +08:00
LinCyJang 90d908a959 Fix:5686 【商城小程序】小程序【我的订单-集采中心】的礼品订单中未显示礼品价值 2026-08-10 21:32:00 +08:00
LinCyJang 3f0ca5e55e Feat:开放采购批发商入驻 2026-08-03 11:56:55 +08:00
LinCyJang 63bebfdb94 Fix:5564 【商城小程序】【旅居团购-退款】退款被驳回后再次进入退款页面,金额仅显示“¥”且“确认退款”按钮可点击显示“加载中” 2026-08-02 11:23:29 +08:00
LinCyJang 35f7127134 Fix:5590 【商城小程序】进入订单详情页时,应默认为全部分类,现在默认进入订单详情页是待支付分类,3个商品订单分类都是同样的问题 2026-08-02 11:17:59 +08:00
LinCyJang 50fe0e78c8 Feat:礼包列表增加角标 2026-08-02 11:12:53 +08:00
LinCyJang 9f843f3bba Merge branch 'dev' of https://gitee.com/fengyuze178/xdd-uniapp-new into dev 2026-08-02 11:02:16 +08:00
LinCyJang eb3db99cb8 Fix:5595 【商城小程序】礼品集采中心收到礼品,在商城小程序-我的礼品卡-收到的,未显示商品信息 2026-08-02 11:02:10 +08:00
linxi d7aecbe755 Feat:集采中心采购订单 2026-07-31 10:59:56 +08:00
lifizer 23f3d8b994 Refactor(千县):图片增加懒加载,优化渲染速度 2026-07-29 14:39:21 +08:00
lifizer 663d8f06fb Conf:增加Fix环境的配置 2026-07-24 16:55:13 +08:00
linxi e643ac58b7 Merge branch 'dev' into test 2026-07-24 11:28:26 +08:00
linxi 37ba270104 Fix:5550 【商城小程序】千县图文攻略, 管理后台上传的图片在香道滇小程序端图片显示调整 2026-07-21 17:26:32 +08:00
linxi 3cd6f29e32 Fix:5536 【商城小程序】订单详情点击商品图片区域之前是可以进入商品详情的,现在点击无法进入商品详情页 2026-07-21 17:19:33 +08:00
linxi 51e9d8b966 Fix:5535 【商城小程序】全国特产、文玩艺术板块的省级导航页面搜索栏,在搜索有效名称时提示“未找到该城市,请重新输入城市名称” 2026-07-21 17:14:13 +08:00
linxi 50363edc6e Fix:5498 【商城小程序】将抽奖商品加入购物车,从购物车进商品详情页,点击【送给朋友】仍可使用优惠券,改为不可使用 2026-07-21 17:09:35 +08:00
linxi 2bc47e46f1 Fix:5485 【商城小程序】简介和定位的文字调大一点,加大1号 2026-07-21 17:01:25 +08:00
linxi 6c851d4f29 Fix:5484 【供应链小程序】扫描县域代理商的推广码,入驻页面接口显示不全,应显示所有入驻接口(通过县域代理商入驻,均存在上下级绑定关系) 2026-07-21 16:56:39 +08:00
linxi 76a877f2c2 Fix: 订单列表所有按钮点击都没反应了 2026-07-14 17:19:39 +08:00
linxi 55ed80acbc Fix:5174 【商城小程序】游客身份直接点击页面底部【客服】按钮并发送文字后,页面显示空白,且未弹出登录引导提示 2026-07-14 14:36:03 +08:00
linxi 956d7bf70b Fix:5176 【商城小程序】省级导航在搜索无效名称时无反馈 2026-07-14 14:28:00 +08:00
linxi 62e7776b64 Fix:5349 【商城小程序】顶部标题“特色礼品”修改为“全国礼品” 2026-07-14 14:21:38 +08:00
linxi 8f7ff49641 Fix:5371 【商城小程序】甄选好礼对应分类下无商品不会提示 2026-07-14 14:17:31 +08:00
linxi 6d963a5bc0 Fix:5397 【商城小程序】商品链接,连续快速点击“送给朋友”,重复弹出多个送礼页面 2026-07-14 14:06:41 +08:00
linxi b4c1ea20ac Fix:5420 【商城小程序】抽奖活动已开奖后取消退款,在个人主页查看我的抽奖码,“失效原因:订单取消”改为“活动已结束,抽奖码无法恢复” 2026-07-14 11:52:36 +08:00
linxi ffadc6c501 Fix:5448 【商城小程序】在详情图区域上传多张图片,详情图现在是一列显示,改为一行显示,可左右滑动查看图片,不自动轮播 2026-07-14 11:12:22 +08:00
linxi 47ac886d5d Fix:5451 【商城小程序】店铺查看资讯详情返回列表页时,列表自动滑动至顶部 2026-07-14 10:54:55 +08:00
linxi f72a68ccc3 Fix:5452 【商城小程序】收礼方申请退款被商家拒绝后,礼包订单详情显示“立即评价”按钮 2026-07-14 10:51:07 +08:00
linxi 73fa5e35d4 Fix:5453 【商城小程序】苹果手机视频列表布局方向从右到左,应该从左到右排列,与安卓同步 2026-07-14 10:41:37 +08:00
linxi 93c9445008 Fix:5463 【商城小程序】千县攻略的简介和定位的文字加粗 2026-07-14 10:28:48 +08:00
linxi ea44413ac1 Fix:5454 【商城小程序】购买商品,微信支付下单后未支付,待付款列表显示两条相同订单记录 2026-07-14 10:01:13 +08:00
linxi 13a9b7a2f6 Feat:千县图文攻略 2026-07-07 15:09:58 +08:00
linxi 80078cae78 Fix:抽奖送礼还能选择优惠券 2026-07-07 09:56:07 +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 44f514393d Merge branch 'dev-AI-v5' into test 2026-07-01 18:04:47 +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 01508b073f Merge branch 'dev' into test 2026-06-13 13:35:31 +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 0b163f883f Merge branch 'dev' into test 2026-05-21 09:17:50 +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
129 changed files with 12586 additions and 23694 deletions
+9 -5
View File
@@ -112,6 +112,10 @@ export default {
keyboardHeight: {
type: Number,
default: 0
},
voiceException: {
type: String,
default: '没有听清您说了什么,请再说一遍'
}
},
data() {
@@ -262,11 +266,11 @@ export default {
fail: err => {
console.log(err)
uni.hideLoading()
_this.$toast('没有听清您说了什么,请再说一遍')
_this.$toast(_this.voiceException)
}
})
} else {
_this.$toast('没有听清您说了什么,请再说一遍')
_this.$toast(_this.voiceException)
}
})
}
@@ -282,7 +286,7 @@ export default {
_this.getTransResultReq()
}).catch(() => {
uni.hideLoading()
_this.$toast('没有听清您说了什么,请再说一遍')
_this.$toast(_this.voiceException)
})
},
getTransResultReq() {
@@ -296,7 +300,7 @@ export default {
uni.hideLoading()
_this.clearIntervalFn()
if (data === '__NULL__') {
_this.$toast('没有听清您说了什么,请再说一遍')
_this.$toast(_this.voiceException)
} else {
if (data.length > 0) {
const prompt = data[0].Text
@@ -308,7 +312,7 @@ export default {
}
}).catch(() => {
uni.hideLoading()
_this.$toast('没有听清您说了什么,请再说一遍')
_this.$toast(_this.voiceException)
})
}, 1000)
},
+28 -4
View File
@@ -112,7 +112,9 @@
<script>
import {
getChatList,
deleteChatListByType
deleteChatListByType,
getCountyAiChatList,
deleteCountyChatListByType
} from '@/api/chat/index'
export default {
name: 'AiHistoryList',
@@ -125,6 +127,10 @@ export default {
formModule: {
type: String,
default: ''
},
countyId: {
type: String,
default: ''
}
},
data() {
@@ -142,7 +148,17 @@ export default {
this.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
if (success) {
this.todayList = data['今天'] || []
@@ -152,7 +168,15 @@ export default {
})
},
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
if (success) {
this.getChatListReq()
@@ -160,7 +184,7 @@ export default {
})
},
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) {
uni.navigateTo({
url: '/aiChat/views/history' + paramsStr
+53 -6
View File
@@ -14,14 +14,14 @@
{{ item.merName }}
</view>
<view class="order-id">
{{ item.orderId }}
订单号{{ item.orderId }}
</view>
</view>
<view class="status">
{{ item.statusName }}
</view>
</view>
<view class="product-info-wrap">
<view v-if="item.isGiftCardReceiveBlind === 0" class="product-info-wrap">
<view
v-for="cartItem in item.cartInfo"
:key="cartItem.productId"
@@ -53,15 +53,45 @@
</view>
</view>
</view>
<view v-else class="product-info-wrap">
<view
class="product-info product-info2"
>
<view class="good-img">
<image
:src="webUrl + '/orderIcon/盲盒礼包.png'"
class="img"
mode="widthFix"
lazy-load
/>
</view>
<view class="name-wrap">
<view class="name one-t">
盲盒礼物
</view>
<view class="attr">
待收货后展示商品信息
</view>
</view>
<view class="price-num">
<view style="color: #fff;">
0.00
</view>
<view class="num">
x1
</view>
</view>
</view>
</view>
<view class="order-bottom">
<view class="time-total">
<view class="time">
{{ formatDateTime(item.createTime) }}
</view>
<view class="total">
{{ item.totalNum }}件商品
<text class="total-txt">
总金额<text class="color-red">{{ item.totalPrice }}</text>
{{ item.totalNum }}件商品
<text v-if="item.isGiftCardReceiveBlind === 0" class="total-txt">
&nbsp;&nbsp;&nbsp;&nbsp;总金额<text class="color-red">{{ item.payPrice }}</text>
</text>
</view>
</view>
@@ -161,13 +191,17 @@ export default {
}
.attr {
display: inline-block;
min-height: 50rpx;
height: 50rpx;
max-width: 100%;
padding: 0 25rpx;
margin: 20rpx 0 0 0;
border-radius: 25rpx;
line-height: 50rpx;
color: #252525;
background: rgba(239,239,239,0.39);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.price-num {
@@ -179,6 +213,19 @@ export default {
}
}
}
.product-info2 {
.name-wrap {
display: flex;
flex-direction: column;
justify-content: space-between;
.attr {
padding: 0;
font-size: 24rpx;
color: #999;
background-color: #fff;
}
}
}
.order-bottom {
.time-total {
display: flex;
+9 -6
View File
@@ -100,10 +100,7 @@ export const chatMixins = {
}.bind(this)).exec()
},
onUnload() {
if (this.audioContext) {
this.audioContext.stop()
}
wx.getBackgroundAudioManager().stop()
this.audioStopHandle()
this.closeWsFn()
},
created() {
@@ -375,7 +372,7 @@ export const chatMixins = {
const _this = this
console.log('------------------创建连接')
uni.connectSocket({
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.uid}-${conversationId}`,
header: {
'content-type': 'application/json'
},
@@ -447,9 +444,15 @@ export const chatMixins = {
this.audioAyy = []
if (this.audioContext) {
this.audioContext.stop()
this.audioContext.destroy() // 强制销毁释放资源
this.audioContext = null
}
this.isPlayAudio = false
wx.getBackgroundAudioManager().stop()
// 强制关闭微信小程序背景音频
if (typeof wx !== 'undefined' && wx.getBackgroundAudioManager) {
wx.getBackgroundAudioManager().stop()
}
},
ttsHandle(item) {
this.audioAyy = []
+369 -97
View File
@@ -3,9 +3,18 @@ import {
getCompletionsV3,
deleteChatItemByConversationId,
// getAnalyzeKeywordsV1,
getAnalyzeKeywordsChangeV3
getAnalyzeKeywordsChangeV3,
getSseCountyAiConfigV1,
getCountyAiCompletionsV1,
getGiftRecommendOptions,
getGiftRecommendPrompt
} from '@/api/chat/index'
import {
getExceptionConfig,
getBottomNavigationConfigList
} from '@/api/public'
import {
getProductDetail,
postCartAdd
} from '@/api/store'
import { VUE_APP_API_URL } from '@/config'
@@ -21,29 +30,7 @@ export const chatMixinsV2 = {
token: cookie.get('login_status'),
userInfo: cookie.get('userInfo'),
webUrl: this.$VUE_APP_RESOURCES_URL,
bottomTools: Object.freeze([
{
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'
}
]),
bottomTools: [],
scrollData: {},
scrollTop: 0,
isScrollToBottom: false,
@@ -57,31 +44,20 @@ export const chatMixinsV2 = {
loading: false,
chatNumber: '',
infoResData: {},
chatMessageList: [
/*
{
type: -2,
isError: false,
showCursor: false,
conversationId: '',
prompt: '',
nodes: '-------------监听 WebSocket 接受到服务器的消息事件',
content: '-------------监听 WebSocket 接受到服务器的消息事件',
listQuestion: [
'监听 WebSocket 接受到服务器的消息事件',
'监听 WebSocket 接受到服务器的消息事件',
'监听 WebSocket 接受到服务器的消息事件'
]
}
*/
],
errorMsg: Object.freeze('您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!'),
chatMessageList: [],
audioAyy: [],
isPlayAudio: false,
audioContext: null,
audioPlayId: '',
showGiftBtn: false,
buyLoading: false
buyLoading: false,
buyActionLock: false,
exceptionConfig: {
model_exception: '您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!',
voice_exception: ''
},
giftStepLoading: false,
onlyOneToAddCart: false
}
},
computed: {
@@ -106,12 +82,12 @@ export const chatMixinsV2 = {
}.bind(this)).exec()
},
onUnload() {
if (this.audioContext) {
this.audioContext.stop()
}
wx.getBackgroundAudioManager().stop()
this.audioStopHandle()
this.closeWsFn()
},
onHide() {
this.audioStopHandle()
},
created() {
const _this = this
uni.getSystemInfo({
@@ -131,7 +107,37 @@ export const chatMixinsV2 = {
},
methods: {
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) {
this.onFocus = value === 1
@@ -215,7 +221,16 @@ export const chatMixinsV2 = {
handleLoginFailure()
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) {
_this.chatMessageList.push({
prompt,
@@ -252,25 +267,54 @@ export const chatMixinsV2 = {
type: -2,
showMoreInfo: {},
currentSwiperIndex: 0,
showChangeBtn: true
showChangeBtn: true,
changeIsRotate: false
})
_this.loading = true
_this.showCursor = false
getSseConfigV1({
'chatNumber': _this.chatNumber,
prompt
}).then(resConfig => {
let reqFn = null
let postData = {}
if (_this.countyId) {
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
_this.chatNumber = resConfig.data.chatNumber || ''
_this.chatMessageList[_this.chatMessageListLength - 1].showCursor = true
_this.chatMessageList[_this.chatMessageListLength - 1].conversationId = conversationId
if (conversationId) {
_this.initWebSocket(conversationId, () => {
getCompletionsV3({
conversationId,
ws: true,
isNoNeedPublicErrorNotification: 1
}).then(sseRes => {
let completionsReqFn = null
let completionsPostData = {}
if (_this.countyId) {
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)
// _this.closeWsFn()
}).catch(err => {
@@ -290,7 +334,7 @@ export const chatMixinsV2 = {
const _this = this
console.log('------------------创建连接')
uni.connectSocket({
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.unionId}-${conversationId}`,
url: VUE_APP_API_URL.replace('https', 'wss') + settings.sysPrefix + `v1/chat/websocket/${_this.userInfo.uid}-${conversationId}`,
header: {
'content-type': 'application/json'
},
@@ -408,6 +452,18 @@ export const chatMixinsV2 = {
this.chatMessageList[index].currentSwiperIndex = e.detail.current
},
analyzeKeywordsChangeHandle(conversationId, item) {
let idx = -1
this.chatMessageList.map((item, index) => {
if (item.conversationId === conversationId) {
idx = index
}
})
if (idx > -1) {
if (this.chatMessageList[idx].changeIsRotate) {
return
}
this.$set(this.chatMessageList[idx], 'changeIsRotate', true)
}
let listKey = ''
// 抽奖和订单查询没有换一换
if (item.goodsList.length > 0) {
@@ -431,18 +487,21 @@ export const chatMixinsV2 = {
const { success, data } = res
if (success) {
let changeList = []
let idx = -1
this.chatMessageList.map((item, index) => {
this.chatMessageList.map((item) => {
if (item.conversationId === conversationId) {
changeList = data.list || []
idx = index
}
})
if (idx > -1 && listKey) {
this.$set(this.chatMessageList[idx], 'listKey', changeList)
this.$set(this.chatMessageList[idx], listKey, changeList)
this.$forceUpdate()
}
setTimeout(() => {
this.$set(this.chatMessageList[idx], 'changeIsRotate', false)
}, 1000)
}
}).catch(error => {
this.$set(this.chatMessageList[idx], 'changeIsRotate', false)
})
},
productItemClickHandle(item) {
@@ -467,16 +526,72 @@ export const chatMixinsV2 = {
})
},
productItemBuyNowClickHandle(item) {
this.audioStopHandle()
this.showGiftBtn = false
this.cart_num = 1
this.addToCart(item)
this.productItemBuyNowOrGiftBuy(item, 1)
},
productItemGiftBuyClickHandle(item) {
this.audioStopHandle()
this.showGiftBtn = true
this.productItemBuyNowOrGiftBuy(item, 2)
},
productItemBuyNowOrGiftBuy(item, BuyNowOrGiftBuyType) {
if (this.buyActionLock) {
return
}
this.buyActionLock = true
this.audioStopHandle()
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) {
const _this = this
@@ -491,7 +606,7 @@ export const chatMixinsV2 = {
uniqueId: _this.attr.productSelect !== undefined ? _this.attr.productSelect.unique : ''
}).then(function (res) {
try {
_this.$set(_this.attr, 'cartAttr', false)
_this.closeAttrWindow()
const { cartId } = res.data
if (type === 1) {
uni.navigateTo({
@@ -516,8 +631,12 @@ export const chatMixinsV2 = {
})
}).finally(() => {
_this.buyLoading = false
_this.buyActionLock = false
})
},
closeAttrWindow() {
this.$set(this.attr, 'cartAttr', false)
},
hotelItemClickHandle(item) {
this.audioStopHandle()
this.$yrouter.push({
@@ -551,8 +670,8 @@ export const chatMixinsV2 = {
},
chatErrorSetContent() {
this.chatMessageList[this.chatMessageListLength - 1].isError = true
this.chatMessageList[this.chatMessageListLength - 1].content = this.errorMsg
this.chatMessageList[this.chatMessageListLength - 1].nodes = this.errorMsg
this.chatMessageList[this.chatMessageListLength - 1].content = this.exceptionConfig.model_exception
this.chatMessageList[this.chatMessageListLength - 1].nodes = this.exceptionConfig.model_exception
this.closeWsFn()
},
closeWsFn() {
@@ -570,13 +689,26 @@ export const chatMixinsV2 = {
})
},
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
this.audioAyy = []
if (this.audioContext) {
this.audioContext.stop()
this.audioContext.destroy() // 强制销毁释放资源
this.audioContext = null
}
this.isPlayAudio = false
wx.getBackgroundAudioManager().stop()
},
ttsHandle(item) {
this.audioAyy = []
@@ -585,13 +717,13 @@ export const chatMixinsV2 = {
// 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.audioPlayId = ''
return
}
this.isPlayAudio = false
this.audioPlayId = item.conversationId
this.audioPlayId = item.conversationId || item.messageId || item.parentMessageId
const flag = 1
if (flag === 1) {
console.log(removeMarkdown(item.content).replace(/[\n\t\s]/g, ''))
@@ -655,34 +787,74 @@ export const chatMixinsV2 = {
}
},
playNextChunk() {
if (this.audioAyy.length > 0 && 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')
if (!this.audioAyy.length || !this.audioPlayId) {
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) {
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({
prompt: item.prompt,
prompt: item.promptContent,
init: 0
})
}
if (item.type === 'link') {
if (item.navType === 'url') {
uni.navigateTo({
url: item.url
})
@@ -690,7 +862,107 @@ export const chatMixinsV2 = {
},
viewOrderTrackHandle(order) {
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
})
}
}
+95 -30
View File
@@ -45,14 +45,14 @@
</view>
</view>
<view v-if="item.type === -2" class="chat-message-body">
<view v-if="item.nodes && item.nodes.length" class="avatar">
<view class="avatar">
<image
:src="webUrl + '/aiChat/avatar.png'"
class="chat-avatar"
mode="widthFix"
/>
</view>
<view v-if="item.nodes && item.nodes.length" class="item-left">
<view class="item-left">
<view class="txt">
<view
ref="rich-text-box"
@@ -67,7 +67,7 @@
space="nbsp"
/>
<view v-if="!(item.nodes && item.nodes.length) && loading" class="loader-wrap">
<div class="loader" />
<div class="loading2" />
</view>
</view>
<view
@@ -109,13 +109,13 @@
</view>
<view
:class="{
'playing': audioPlayId === item.conversationId && isPlayAudio
'playing': [item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio
}"
class="item"
@click="ttsHandle(item)"
>
<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"
mode="widthFix"
/>
@@ -170,7 +170,7 @@
mode="widthFix"
lazy-load
/>
<text class="s-name">{{ goodItem.storeName }}</text>
<text class="s-name">{{ goodItem.merName ||goodItem.storeName }}</text>
<u-icon name="arrow-right" color="#999" size="12"></u-icon>
</view>
<view class="title one-t">{{ goodItem.name }}</view>
@@ -225,7 +225,7 @@
{{ hotel.hotelTypeName }}
</view>
<image
:src="hotel.img"
:src="hotel.img + ((hotel.img && hotel.img.indexOf('.mp4') > -1) ? '?vframe/jpg/offset/1' : '')"
class="img"
lazy-load
/>
@@ -320,12 +320,17 @@
"
class="change-btn"
>
<image
:src="webUrl + '/aiChat/icon-change.png'"
class="icon"
mode="widthFix"
@click="analyzeKeywordsChangeHandle(item.conversationId, item)"
/>
<view class="change-btn-content" @click="analyzeKeywordsChangeHandle(item.conversationId, item)">
<image
:src="webUrl + '/aiChat/icon-53.png'"
:class="{
'rotate': item.changeIsRotate
}"
class="icon"
mode="widthFix"
/>
换一换
</view>
</view>
</view>
<!-- 建议提问 -->
@@ -365,7 +370,21 @@
}"
class="page-to-bottom"
>
<view class="container">
<view class="down-icon-wrap">
<image
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
:src="webUrl + '/aiChat/down.png'"
class="icon down-icon"
mode="widthFix"
@click="scrollToBottomHandle"
/>
</view>
<view
:class="{
'container-county': !!countyId
}"
class="container"
>
<view
v-if="chatNumber"
class="new-chat"
@@ -378,25 +397,22 @@
/>
开启新对话
</view>
<image
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
:src="webUrl + '/aiChat/down.png'"
class="icon"
mode="widthFix"
@click="scrollToBottomHandle"
/>
<view
v-if="!countyId"
v-for="(item, index) in bottomTools"
:key="index"
:class="{
'hide': !item.display
}"
class="bottom-tool-item"
@click="bottomToolClickHandle(item)"
>
<image
:src="webUrl + '/aiChat/' + item.icon + '.png'"
:src="item.icon"
class="tool-icon"
mode="widthFix"
/>
{{ item.text }}
{{ item.name }}
</view>
</view>
</view>
@@ -404,6 +420,7 @@
ref="bottomSend"
:loading="loading"
:keyboard-height="keyboardHeight"
:voice-exception="exceptionConfig.voice_exception"
@send="streamReq"
@history="historyViewHandle"
@focus="inputFocusHandle"
@@ -411,19 +428,36 @@
<AiHistoryList
ref="historyView"
:status-bar-height="statusBarHeight"
:county-id="countyId"
form-module="history"
@enter-history="audioStopHandle"
/>
<ProductWindow
ref="attrWindow"
:attr="attr"
:cart-num="cart_num"
:show-ok="!showGiftBtn"
:is-gift="showGiftBtn"
:padding-bottom="'60px'"
class-name="ai-product-window"
ok-text="立即购买"
@changeFun="changeFun"
@ok="buyNowOrGiftBuyReq(1)"
@gift="buyNowOrGiftBuyReq(2)"
/>
</view>
</template>
<script>
import { chatMixinsV2 } from '../mixins/chatMixinsV2.js'
import goCartMixin from '@/mixins/goCartMixins'
import AiHistoryList from '../components/historyList'
import BottomSend from '../components/bottomSend.vue'
import OrderItem from '../components/orderItem.vue'
import ProductWindow from '@/components/ProductWindow'
import {
historyChatMessage
historyChatMessage,
getCountyAiHistoryChatMessage
} from '@/api/chat/index'
import { formatAiMsgContent } from '../utils/aiChat'
export default {
@@ -431,24 +465,33 @@ export default {
components: {
AiHistoryList,
BottomSend,
OrderItem
OrderItem,
ProductWindow
},
mixins: [chatMixinsV2],
mixins: [chatMixinsV2, goCartMixin],
data() {
return {
pageTitle: ''
pageTitle: '',
countyId: ''
}
},
onLoad(options) {
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.init()
},
methods: {
init() {
this.loading = true
historyChatMessage({
let reqFn = null
if (this.countyId) {
reqFn = getCountyAiHistoryChatMessage
} else {
reqFn = historyChatMessage
}
reqFn({
chatNumber: this.chatNumber
}).then(res => {
const { success, data = [] } = res
@@ -489,7 +532,8 @@ export default {
type: -2,
showMoreInfo: {},
currentSwiperIndex: 0,
showChangeBtn: false
showChangeBtn: false,
changeIsRotate: false
}
if (item.cardData) {
const { contentType, finish, items = [] } = item.cardData
@@ -523,6 +567,9 @@ export default {
}
})
console.log(this.chatMessageList)
this.$nextTick(() => {
this.scrollToBottomHandle()
})
} catch (err) {
uni.showModal({
title: '错误提示',
@@ -548,6 +595,24 @@ export default {
createNewHandle() {
uni.setStorageSync('addNewChat', '1')
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
})
}
}
}
}
+22 -2
View File
@@ -38,7 +38,10 @@
</view>
</view>
<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
v-for="(item, index) in goodsList"
:key="index"
@@ -66,6 +69,9 @@
lazy-load
/>
</view>
<view v-if="item.similarityScore > 0" class="goods-desc">
相似度{{ item.similarityScore }}%
</view>
</view>
</view>
</view>
@@ -84,6 +90,7 @@ export default {
},
data() {
return {
loaded: false,
webUrl: this.$VUE_APP_RESOURCES_URL,
statusBarHeight: 20,
imageUrl: '',
@@ -130,7 +137,7 @@ export default {
<style lang="scss" scoped>
.image-recognition-result-page {
min-height: 100vh;
background: #F5F8FF;
background: #fff;
.page-body {
min-height: 100vh;
@@ -245,6 +252,13 @@ export default {
margin: 0 32rpx;
}
.loading-state {
padding: 120rpx 0;
display: flex;
justify-content: center;
align-items: center;
}
.empty-state {
text-align: center;
}
@@ -301,6 +315,12 @@ export default {
align-items: flex-end;
justify-content: space-between;
}
.goods-desc {
padding: 10rpx 14rpx 20rpx 14rpx;
font-size: 24rpx;
color: #999;
line-height: 1;
}
.price-left {
display: flex;
+294 -60
View File
@@ -1,6 +1,9 @@
<template>
<view
:class="scrollTop > 0 ? 'page-scroll' : ''"
:class="{
'page-scroll': scrollTop > 0,
'new-chat': chatMessageListLength === 0
}"
class="fix-tabbar-page"
>
<hx-navbar
@@ -12,8 +15,8 @@
color="#333"
transparent="auto"
barPlaceholder="hidden"
title="云灵AI助手"
@click-left="clickBackHandle"
title="云灵"
@click-left="pageContainerBeforeleave"
/>
<page-container
:show="true"
@@ -37,17 +40,25 @@
conversationId: '123'
})">播放</button> -->
<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="focus-guide-wrap">
<view class="guide-left">
<image
:src="webUrl + '/aiChat/logo-01.gif'"
class="avatar"
:src="webUrl + '/aiChat/logo-transition.png'"
:class="{
'county-avatar': !!countyId
}"
class="avatar avatar-bounce"
mode="widthFix"
/>
</view>
<view class="guide-right">
<view v-if="!showGiftSteps" class="guide-right">
<view class="title">{{ settingInfo.helloMessageTitle }}</view>
<view class="content">{{ settingInfo.helloMessageContent }}</view>
</view>
@@ -96,12 +107,16 @@
</swiper-item>
</swiper>
</view> -->
<view class="topic-wrap">
<!-- 大家都在问 -->
<view v-if="!showGiftSteps && !countyId" class="topic-wrap">
<view class="title">
<view class="title-left">大家都在问</view>
<view class="title-right" @click="loadData">
<view class="title-right" @click="loadData('click')">
<image
:src="webUrl + '/aiChat/icon-53.png'"
:class="{
'rotate': topicIsRotate
}"
class="icon"
mode="widthFix"
/>
@@ -127,6 +142,66 @@
</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="item.guideContent || '例如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>
</block>
<view v-if="chatMessageListLength > 0" class="chat-wrap">
@@ -218,13 +293,13 @@
</view>
<view
:class="{
'playing': audioPlayId === item.conversationId && isPlayAudio
'playing': [item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio
}"
class="item"
@click="ttsHandle(item)"
>
<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"
mode="widthFix"
/>
@@ -237,8 +312,6 @@
<!-- 换一换 -->
<view
v-if="!item.showCursor &&
item.nodes &&
item.nodes.length &&
!item.isError &&
(item.orderList.length > 0 ||
item.giftGoodsList.length > 0 ||
@@ -282,7 +355,7 @@
mode="widthFix"
lazy-load
/>
<text class="s-name">{{ goodItem.storeName }}</text>
<text class="s-name">{{ goodItem.merName ||goodItem.storeName }}</text>
<u-icon name="arrow-right" color="#999" size="12"></u-icon>
</view>
<view class="title one-t">{{ goodItem.name }}</view>
@@ -337,7 +410,7 @@
{{ hotel.hotelTypeName }}
</view>
<image
:src="hotel.img"
:src="hotel.img + ((hotel.img && hotel.img.indexOf('.mp4') > -1) ? '?vframe/jpg/offset/1' : '')"
class="img"
lazy-load
/>
@@ -433,12 +506,17 @@
"
class="change-btn"
>
<image
:src="webUrl + '/aiChat/icon-change.png'"
class="icon"
mode="widthFix"
@click="analyzeKeywordsChangeHandle(item.conversationId, item)"
/>
<view class="change-btn-content" @click="analyzeKeywordsChangeHandle(item.conversationId, item)">
<image
:src="webUrl + '/aiChat/icon-53.png'"
:class="{
'rotate': item.changeIsRotate
}"
class="icon"
mode="widthFix"
/>
换一换
</view>
</view>
</view>
<!-- 建议提问 -->
@@ -482,9 +560,23 @@
}"
class="page-to-bottom"
>
<view class="container">
<view class="down-icon-wrap">
<image
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
:src="webUrl + '/aiChat/down.png'"
class="icon down-icon"
mode="widthFix"
@click="scrollToBottomHandle"
/>
</view>
<view
:class="{
'container-county': !!countyId
}"
class="container"
>
<view
v-if="chatNumber"
v-if="chatNumber || showGiftSteps"
class="new-chat"
@click="createNewHandle"
>
@@ -495,25 +587,22 @@
/>
开启新对话
</view>
<image
v-if="chatMessageListLength > 0 && !isScrollToBottom && !loading"
:src="webUrl + '/aiChat/down.png'"
class="icon"
mode="widthFix"
@click="scrollToBottomHandle"
/>
<view
v-if="!countyId"
v-for="(item, index) in bottomTools"
:key="index"
:class="{
'hide': !item.display
}"
class="bottom-tool-item"
@click="bottomToolClickHandle(item)"
>
<image
:src="webUrl + '/aiChat/' + item.icon + '.png'"
:src="item.icon"
class="tool-icon"
mode="widthFix"
/>
{{ item.text }}
{{ item.name }}
</view>
</view>
</view>
@@ -521,6 +610,7 @@
ref="bottomSend"
:loading="loading"
:keyboard-height="keyboardHeight"
:voice-exception="exceptionConfig.voice_exception"
@send="streamReq"
@add="createNewHandle"
@history="historyViewHandle"
@@ -529,6 +619,7 @@
<AiHistoryList
ref="historyView"
:status-bar-height="statusBarHeight"
:county-id="countyId"
@enter-history="audioStopHandle"
/>
<ProductWindow
@@ -537,7 +628,8 @@
:cart-num="cart_num"
:show-ok="!showGiftBtn"
:is-gift="showGiftBtn"
:padding-bottom="bottomSafeDistance + 'px'"
:padding-bottom="'60px'"
class-name="ai-product-window"
ok-text="立即购买"
@changeFun="changeFun"
@ok="buyNowOrGiftBuyReq(1)"
@@ -553,6 +645,9 @@ import {
getAiSystemInfoSetting,
getAiSystemInfoTopic
} from '@/api/public'
import {
getCountyAiDetail
} from '@/api/chat/index'
import AiHistoryList from '../components/historyList'
import BottomSend from '../components/bottomSend.vue'
import OrderItem from '../components/orderItem.vue'
@@ -569,41 +664,75 @@ export default {
data() {
return {
cityName: '',
countyId: '',
animationWidth: '150%',
animationStr: '',
settingInfo: {},
topicList: [],
onlyOneToAddCart: false
topicIsRotate: false,
showGiftSteps: false,
currentGiftStepIndex: 0,
giftSelections: {},
giftBudget: '',
giftBuyOptions: [],
countyTools: []
}
},
onLoad(options) {
this.cityName = options.cityName || ''
this.countyId = options.countyId || ''
},
onShow() {
const addNewChat = uni.getStorageSync('addNewChat') === '1'
// 1-新对话,2-我要送礼
const addNewChat = uni.getStorageSync('addNewChat') || ''
// 从历史界面点击新增对话
if (addNewChat && this.chatNumber) {
console.log(addNewChat)
if (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')
this.createNewHandle()
}
this.audioStopHandle()
},
methods: {
createdCallbak() {
extraReqFn() {
this.$nextTick(() => {
this.scrollToBottomHandle()
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()
if (this.countyId) {
getCountyAiDetail({
countyId: this.countyId
}).then(res => {
const { success, data } = res
if (success) {
this.settingInfo.helloMessageTitle = data.title || ''
this.settingInfo.helloMessageContent = data.introduction || ''
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() {
loadData(type = '') {
if (this.topicIsRotate) return
if (type === 'click') {
this.topicIsRotate = true
}
getAiSystemInfoTopic().then(res => {
const { success, data } = res
if (success) {
@@ -619,16 +748,19 @@ export default {
}
list.sort(() => Math.random() - 0.5)
this.topicList = list.slice(0, 3)
setTimeout(() => {
this.topicIsRotate = false
}, 1000)
}
})
},
// 创建新会话
createNewHandle() {
createNewHandle(type = '') {
this.closeAttrWindow()
if (this.audioContext) {
this.audioContext.stop()
}
wx.getBackgroundAudioManager().stop()
if (!this.chatNumber) return
this.closeWsFn()
this.chatNumber = ''
this.showCursor = false
@@ -636,9 +768,21 @@ export default {
this.getConfigLoading = false
this.chatMessageList = []
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() {
if (!this.chatNumber) {
if (!this.chatNumber && !this.showGiftSteps) {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
@@ -650,8 +794,9 @@ export default {
this.createNewHandle()
}
},
*/
pageContainerBeforeleave() {
if (!this.chatNumber) {
if (!this.chatNumber && !this.showGiftSteps) {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
@@ -662,6 +807,19 @@ export default {
} else {
this.createNewHandle()
}
},
countyToolItemClickHandle(item) {
if (item.moduleType === 'prompt') {
this.streamReq({
prompt: item.promptContent,
init: 0
})
}
if (item.moduleType === 'url') {
uni.navigateTo({
url: item.url
})
}
}
}
}
@@ -704,9 +862,18 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 220rpx);
padding: 0 0 220rpx 0;
min-height: calc(100vh - 240rpx);
height: auto;
padding: 0 0 240rpx 0;
padding-bottom: calc(240rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(240rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
overflow: visible;
}
.gift-steps-wrap {
padding-bottom: 40rpx;
padding-bottom: calc(40rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
}
.focus-guide-wrap {
display: flex;
@@ -716,8 +883,13 @@ export default {
.guide-left {
.avatar {
display: block;
width: 230rpx;
height: 404rpx;
width: 400rpx;
}
.county-avatar {
width: 360rpx;
}
.avatar-bounce {
animation: bounce 2s infinite ease-in-out;
}
}
.guide-right {
@@ -731,7 +903,7 @@ export default {
font-size: 34rpx;
}
.content {
padding: 30rpx 0 0 0;
padding: 30rpx 24rpx 0 24rpx;
color: #3D4CF0;
}
}
@@ -755,8 +927,12 @@ export default {
}
.icon {
display: flex;
width: 40rpx;
width: 32rpx;
height: 32rpx;
margin: 0 8rpx 0 0;
&.rotate {
animation: spin-icon 1s linear;
}
}
}
.list-wrap {
@@ -766,15 +942,19 @@ export default {
.list-cont {
padding: 0 24rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: flex-start;
.list-item {
display: flex;
align-items: center;
padding: 12rpx 18rpx;
padding: 6rpx 12rpx;
margin: 0 0 24rpx 0;
border-radius: 12rpx;
border: 1rpx solid #ddd;
font-size: 28rpx;
color: #666;
background-color: #fff;
.icon {
display: block;
width: 24rpx;
@@ -793,4 +973,58 @@ export default {
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>
+35 -1
View File
@@ -38,6 +38,10 @@ export function deleteChatListByType(type) {
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) {
return request.get('/v1/chat/weatherData', params, { login: true })
}
@@ -52,10 +56,40 @@ export function getCompletionsV3(params) {
// 通过关键字-搜索列表-换一换
export function getAnalyzeKeywordsChangeV3(data) {
return request.post('/v1/chat/goods/refresh', data, { login: true })
return request.post('/v1/chat/skill/refresh', data, { login: true })
}
// 以图搜索商品
export function getAnalyzeByImageV3(data) {
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 })
}
+24
View File
@@ -124,3 +124,27 @@ export function computedSojoumGroupBuyGiftOrderPrice(params) {
login: true
})
}
/**
* 文生图发起生成
* @param {*} data
* @returns
*/
export function aiGiftImageGenerate(data) {
return request.post("/aiGiftImage/generate", data, {
login: true
})
}
/**
* 文生图状态查询
* @param {*} params
* @returns
*/
export function aiGiftImageStatus(params) {
return request.get("/aiGiftImage/" + params.productId, {
login: true
})
}
+57 -14
View File
@@ -11,16 +11,14 @@ export function getImages() {
}
// 商户申请页面数据
export function getShopData(partnerId) {
let param = {};
if (partnerId) param.partnerId = partnerId;
return request.get("/merchantApply/index", param, {login: true})
export function getShopData(params) {
return request.get("/merchantApply/index", params, {login: true})
}
// 查看商户申请
// 1-特产供应商 2-店铺 3-文玩供应商
export function getShopInfo() {
return request.get("/merchantApply/info", {}, {login: true})
export function getShopInfo(params) {
return request.get("/merchantApply/info", params, {login: true})
}
// 4-采购批发商
@@ -29,32 +27,77 @@ export function getWholesaler() {
}
// 提交店铺入驻申请
export function saveShop(hotelInfo, captcha, partnerId) {
export function saveShop(hotelInfo, partnerId = '', promoterUid = '') {
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})
}
// 保存店铺入驻草稿
export function saveHotelDraft(hotelInfo, partnerId = '', promoterUid = '') {
let param = {hotelInfo, captcha: hotelInfo.captcha};
if (partnerId && partnerId.length > 0) {
param.partnerId = partnerId;
}
if (promoterUid && promoterUid.length > 0) {
param.promoterUid = promoterUid;
}
return request.post("/merchantApply/hotel/saveDraft", param, {login: true})
}
// 提交特产供应商入驻申请
export function saveSupplier(hotelInfo, supplierInfo, partnerId) {
export function saveSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
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})
}
// 提交文玩供应商入驻申请
export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId) {
export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
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})
}
// 保存供应商入驻草稿(特产/文玩共用)
export function saveSupplierDraft(hotelInfo, supplierInfo, partnerId = '', promoterUid = '') {
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
if (partnerId && partnerId.length > 0) {
param.partnerId = partnerId;
}
if (promoterUid && promoterUid.length > 0) {
param.promoterUid = promoterUid;
}
return request.post("/merchantApply/supplier/saveDraft", param, {login: true})
}
// 提交采购批发商入驻申请
export function saveWholesaler(wholesalerInfo) {
let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
return request.post("/merchantApply/wholesaler/submit", param, {login: true})
}
// 保存采购批发商入驻草稿
export function saveWholesalerDraft(wholesalerInfo) {
let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
return request.post("/merchantApply/wholesaler/saveDraft", param, {login: true})
}
export function saveExperienceStore(params) {
return request.post("/merchantApply/experienceStore/submit", params, {login: true})
}
@@ -82,8 +125,8 @@ export function getHotelInfo(params) {
}
// 获取千县名品店铺类型列表
export function getCountyFamousHotelType() {
return request.get("/countyFamous/hotelType", {}, {login: true})
export function getCountyFamousHotelType(params) {
return request.get("/countyFamous/hotelType", params, {login: true})
}
/**
+115 -5
View File
@@ -3,15 +3,77 @@ import request from '@/utils/request'
/**
* 抽奖活动信息
* */
export function getDetail() {
return request.get('/lottery/dice/detail')
export function getDetail(params = {}) {
return request.get('/lottery/dice/detail', params)
}
/**
* 抽奖
* */
export function getPrize() {
return request.post('/lottery/dice/draw')
export function getPrize(data = {}) {
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() {
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);
}
/**
* 取消退款申请
* @param uni
* @returns {*}
*/
export function cancelOrderRefund(uni) {
return request.post("/order/refund/cancel", {
uni
});
}
/**
* 确认收货
* @returns {*}
+10
View File
@@ -223,6 +223,16 @@ export function getAiSystemInfoTopic() {
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() {
return request.get('/weixinShareConfig', {}, { login: false })
+7 -2
View File
@@ -60,6 +60,11 @@ export function getCountyFamousCityGuideContent(param) {
return request.get('/countyFamous/guide/content', param, { login: true })
}
// 获取千县名品县城图文攻略详情
export function getCountyFamousGraphicGuideContent(param) {
return request.get('/countyFamous/guide/graphic/content', param, { login: true })
}
// 获取千县名品县城重点产业列表
export function getCountyFamousIndustry(param) {
return request.get('/countyFamous/industry', param, { login: true })
@@ -313,8 +318,8 @@ export function getCityShopList(params) {
return request.get('/countyFamous/hotel', params, {login: true})
}
export function getCountyFamousHotelType() {
return request.get('/countyFamous/hotelType', {}, {login: true})
export function getCountyFamousHotelType(params) {
return request.get('/countyFamous/hotelType', params, {login: true})
}
/**
+8
View File
@@ -603,3 +603,11 @@ export function queryUserGuide(params) {
export function setUserGuide(params) {
return request.post('/user/guide/status', params)
}
/**
* 提现规则
*/
export function getWithdrawalRules() {
return request.get('/extract/rule')
}
+186 -20
View File
@@ -8,14 +8,22 @@ page {
justify-content: space-between;
}
.fix-tabbar-page {
position: relative;
min-height: 100vh;
background: linear-gradient(155deg, rgba(61, 76, 241, 0.15) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(61, 76, 241, 0.15) 100%);
// background-color: #fff;
// background-size: 100% 100vh;
// background-image: url(https://wxapp.xdd618.com/api/file/pic/aiChat/bg.png);
// background-repeat: no-repeat;
// background-attachment: fixed;
position: relative;
z-index: 0;
min-height: 100vh;
background: transparent;
isolation: isolate;
&::before {
content: '';
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
pointer-events: none;
background: linear-gradient(155deg, rgba(61, 76, 241, 0.15) 0%, rgba(255,255,255,1) 25%, rgba(255,255,255,1) 75%, rgba(61, 76, 241, 0.15) 100%);
}
.fix-tabbar-header {
position: fixed;
top: 0;
@@ -90,12 +98,11 @@ page {
}
.page-to-bottom {
position: fixed;
bottom: 180rpx;
bottom: 160rpx;
left: 0;
right: 0;
z-index: 8;
transition: all 0.2s;
overflow-x: auto;
&.focus {
transform: translateY(-40rpx);
}
@@ -104,8 +111,15 @@ page {
flex-wrap: nowrap;
align-items: center;
width: 100%;
padding: 0 24rpx;
padding: 24rpx;
box-sizing: border-box;
overflow-x: auto;
}
.container-county {
justify-content: flex-end;
.new-chat {
margin-right: 0;
}
}
.new-chat {
display: flex;
@@ -119,7 +133,7 @@ page {
font-size: 30rpx;
color: #fff;
background-color: #3D4CF1;
box-shadow: 0rpx 6rpx 20rpx rgba(74,74,74,0.1);
box-shadow: 0rpx 0 12rpx rgba(74,74,74,0.2);
.btn-icon {
display: block;
width: 40rpx;
@@ -127,14 +141,19 @@ page {
margin: 0 8rpx 0 0;
}
}
.down-icon-wrap {
display: flex;
justify-content: flex-end;
padding: 0 24rpx 0 0;
}
.icon {
display: block;
flex-shrink: 0;
width: 64rpx;
height: 64rpx;
margin: 0 20rpx 0 0;
border-radius: 16rpx;
box-shadow: 0rpx 6rpx 20rpx rgba(74,74,74,0.1);
background-color: #fff;
box-shadow: 0rpx 0 12rpx rgba(74,74,74,0.2);
}
.bottom-tool-item {
display: flex;
@@ -149,6 +168,12 @@ page {
color: #333;
background-color: #fff;
box-shadow: 0rpx 6rpx 20rpx rgba(74,74,74,0.1);
&:last-child {
margin-right: 0;
}
&.hide {
display: none;
}
.tool-icon {
display: block;
width: 32rpx;
@@ -1081,10 +1106,21 @@ page {
align-items: center;
justify-content: center;
padding: 0 0 20rpx 0;
.icon {
display: block;
width: 124rpx;
height: 38rpx;
.change-btn-content {
display: flex;
align-items: center;
justify-content: center;
color: #3D4CF0;
font-size: 28rpx;
.icon {
display: block;
width: 32rpx;
height: 32rpx;
margin: 0 8rpx 0 0;
&.rotate {
animation: spin-icon 1s linear;
}
}
}
}
}
@@ -1224,8 +1260,6 @@ page {
}
}
}
.page-to-bottom {
}
.recommend-goods-wrap {
width: calc(100% + 48rpx);
padding: 24rpx 0;
@@ -1335,3 +1369,135 @@ page {
margin: 24rpx 0 0 0;
}
}
@keyframes spin-icon {
0% {
transform: rotate(0deg);
}
100% {
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;
}
}
}
+19
View File
@@ -127,6 +127,25 @@
height: 52vh;
overflow-y: auto;
margin: 30rpx 0;
// 小程序rich-text内块级标签无默认段间距,补充与后台富文本编辑器一致的段落格式
rich-text {
display: block;
width: 100%;
p, div, ul, ol {
display: block;
margin: 0 0 16rpx;
&:last-child {
margin-bottom: 0;
}
}
li {
margin: 0 0 8rpx;
}
}
}
.agree-box {
+6
View File
@@ -37,6 +37,12 @@ input{line-height: normal; box-sizing:border-box;}
.line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width: 100%;}
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5);}
.ai-product-window.product-window {
z-index: 1002;
}
.ai-product-window.mask {
z-index: 1001;
}
+189
View File
@@ -8231,3 +8231,192 @@ rich-text {
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;
}
}
}
}
+11
View File
@@ -42,9 +42,20 @@ export default {
},
goSupplierMini() {
// 区分当前小程序环境:正式版跳正式版,体验版/开发版跳体验版
let envVersion = 'release'
try {
const accountInfo = uni.getAccountInfoSync()
if (accountInfo && accountInfo.miniProgram && accountInfo.miniProgram.envVersion !== 'release') {
envVersion = 'trial'
}
} catch (e) {
envVersion = 'release'
}
uni.navigateToMiniProgram({
appId: "wx9ca93d1f2a9c8156",
path: "pages/auth/login",
envVersion,
success(msg) {
console.log("success", msg)
},
-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: {
routerGo(cart) {
this.$yrouter.push({
path: "/pages/shop/GoodsEvaluate/index",
path: "/pagesShop/shop/GoodsEvaluate/index",
query: { id: cart.unique }
});
}
+37 -10
View File
@@ -1,6 +1,10 @@
<template>
<view>
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''" :style="{paddingBottom: paddingBottom}">
<view
:class="[{ on: attr.cartAttr === true }, className]"
:style="{ paddingBottom: paddingBottom }"
class="product-window"
>
<view class="textpic acea-row row-between-wrapper">
<view class="pictrue" @click="previewImg(attrObj.productSelect.image)">
<image :src="attrObj.productSelect.image" class="image" />
@@ -31,8 +35,7 @@
v-for="(subItem, subIndex) in item.attrValue"
:key="subIndex"
:class="{
'actived': subItem.check,
'disabled': !subItem.canUsed
'actived': subItem.check
}"
class="itemn v12-radius-40"
@click="tapAttr(index, subIndex, subItem)"
@@ -45,7 +48,7 @@
</view>
<view class="cart v12-justify-between v12-align-center">
<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>
<input
type="number"
@@ -66,11 +69,12 @@
@click="CartNumAdd"
>+</view>
</view>
<view v-else class="v12-font-28 v12-dark-text">x1</view>
</view>
<view class="v12-px-2 v12-mt-3" v-if="showOk">
<u-button
shape="circle"
color="#C52733"
:color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
@click="$emit('ok')"
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
>{{ okText }}</u-button>
@@ -78,13 +82,19 @@
<view class="v12-px-2 v12-mt-3" v-if="isGift">
<u-button
shape="circle"
color="#C52733"
:color="(attr.productSelect.stock === 0 && attr.cartAttr) ? '#9D9D9D' : '#C52733'"
@click="$emit('gift')"
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
>送给朋友</u-button>
</view>
</view>
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
<view
:hidden="attr.cartAttr === false"
:class="className"
class="mask"
@touchmove.prevent
@click="closeAttr"
></view>
</view>
</template>
<script>
@@ -122,6 +132,14 @@ export default {
okText: {
type: String,
default: '加入购物车'
},
className: {
type: String,
default: ''
},
hideQuantityControls: {
type: Boolean,
default: false
}
},
data() {
@@ -199,9 +217,9 @@ export default {
},
tapAttr(index, subIndex, subItem) {
// 缺货的点击了没效果
if (!subItem.canUsed || subItem.check) {
return
}
// if (!subItem.canUsed || subItem.check) {
// return
// }
this.attrObj.productAttr[index].attrValue.map((subItem, subIdx) => {
subItem.check= false
if (subIndex === subIdx) {
@@ -236,6 +254,15 @@ export default {
}
</script>
<style scope>
.btn-car-disabled {
border: 2rpx solid #9D9D9D !important;
color: #9D9D9D !important;
}
.btn-buy-disabled {
background: #9D9D9D !important;
color: #FFFFFF !important;
}
.itemn{
margin: 28rpx 0 0 34rpx !important;
width: auto;
+21 -1
View File
@@ -13,12 +13,19 @@
import {
getAiSystemInfoSetting
} from '@/api/public'
import {
getCountyAiDetail
} from '@/api/chat/index'
export default {
name: 'AiEntrance',
props: {
cityName: {
type: String,
default: ''
},
countyId: {
type: String,
default: ''
}
},
data() {
@@ -33,6 +40,19 @@ export default {
},
methods: {
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 => {
const { success, data } = res
if (success) {
@@ -43,7 +63,7 @@ export default {
},
enterAiChat() {
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>
+16 -6
View File
@@ -5,13 +5,15 @@
v-if="!item.isFarmerShop"
:src="item[imageKey]"
class="img"
lazy-load
/>
<image
:src="item.farmerShopCover"
v-if="item.farmerShopCoverType === 1 && item.isFarmerShop"
class="img"
mode="heightFix|widthFix">
</image>
mode="heightFix|widthFix"
lazy-load
/>
<image
:src="item.farmerShopCover + '?vframe/jpg/offset/1'"
mode="heightFix|widthFix"
@@ -20,30 +22,35 @@
:show-fullscreen-btn="false"
:show-play-btn="false"
class="img"
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'">
</image>
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'"
lazy-load
/>
<image
v-if="item.isOldBrand"
:src="webUrl + '/home/old-mark.png'"
class="mark-img"
lazy-load
/>
<image
v-if="item.isGiftCard"
style="left: 0;width: 120rpx;"
:src="webUrl + '/home/gift-tag.png'"
class="mark-img"
lazy-load
/>
<image
v-if="item.isLandmarkGoods"
:src="webUrl + '/home/mark-land.png'"
class="mark-img"
style="right: 20rpx"
lazy-load
/>
<image
v-if="item.isCountyFamous"
:src="webUrl + '/home/qixian-mark.png'"
class="mark-img"
lazy-load
/>
<image
v-if="item.isIch"
@@ -55,6 +62,7 @@
v-if="item.isFarmerShop"
:src="webUrl + '/orderIcon/nm.png'"
class="mark-img-nm"
lazy-load
/>
</view>
<view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view>
@@ -83,12 +91,14 @@
<text class="v12-font-20">
</text>
{{ item[priceKey] }}</text>
{{ item[priceKey] }}
</text>
</view>
<view v-if="item.isNegotiable === 0" class="btn" @click.stop="$emit('add', item)">
<image
:src="webUrl + '/home/icon-cart.png'"
class="img"
lazy-load
/>
</view>
</view>
@@ -97,7 +107,7 @@
v-if="item.isFarmerShop"
class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2">
<view class="btn v12-mr-2">
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100"></image>
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100" lazy-load />
</view>
<view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view>
</view>
+8 -1
View File
@@ -12,7 +12,14 @@ const settings = {
/* 系统接口前缀,没有统一的填空字符串 */
sysPrefix: '/',
/* 是否收集错误日志 */
collectRequestError: false
collectRequestError: false,
/* 订阅消息模板ID */
SubscribeMessageTmplIds: [
'7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE',
'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU',
'9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU',
'v0GegDmzjpqiinmdj7dOwRK1MaTAPVyCOpqn8hJ3Y3Q'
]
}
export default settings
+8
View File
@@ -10,6 +10,14 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') {
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') {
BASE_URL = 'https://wxapp.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 WechatJSSDK from 'wechat-jssdk/dist/client.umd'
import { getWechatConfig, wechatAuth } from '@/api/public'
@@ -65,7 +65,7 @@ export const weappPay = option => {
resolve(success)
}, 3000)
// #ifdef MP-WEIXIN
subscribeMessage()
// subscribeMessage()
// #endif
},
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
}
},
"mp-weixin-fix": {
"title": "微信小程序(Fix环境)",
"env": {
"UNI_PLATFORM": "mp-weixin",
"VUE_APP_ENV": "fix",
"UNI_OUTPUT_DIR": "dist"
},
"define": {
"CUSTOM-CONST": true
}
},
"mp-weixin": {
"title": "微信小程序(生产环境)",
"env": {
+255 -155
View File
@@ -76,12 +76,6 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/shop/StoreList/index",
"style": {
"navigationBarTitleText": "商家列表"
}
},
{
"path": "pages/shop/GoodsList/index",
"style": {
@@ -110,24 +104,6 @@
"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",
"style": {
@@ -149,88 +125,18 @@
"navigationBarTitleText": "新增收货地址"
}
},
{
"path": "pages/user/UserAccount/index",
"style": {
"navigationBarTitleText": "账户余额"
}
},
{
"path": "pages/user/address/AddressManagement/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/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",
"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": {
@@ -239,18 +145,6 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/order/Logistics/index",
"style": {
"navigationBarTitleText": "查看物流"
}
},
{
"path": "pages/order/OrderDetails/index",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "pages/order/OrderSubmission/index",
"style": {
@@ -258,48 +152,16 @@
"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",
"style": {
"navigationBarTitleText": "地图"
}
},
{
"path": "pages/user/Message/Message",
"style": {
"navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/MessageDetail/MessageDetail",
"style": {
"navigationBarTitleText": "消息详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/VideoPlayBackList/VideoPlayBackList",
"style": {
"navigationBarTitleText": "寻看点",
"navigationBarTitleText": "使用指南",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
@@ -309,18 +171,6 @@
"navigationBarTitleText": "视频详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/user/UserFavorite/UserFavorite",
"style": {
"navigationBarTitleText": "我的喜欢"
}
},
{
"path": "pages/user/Points/index",
"style": {
"navigationBarTitleText": "积分"
}
}
],
"subPackages": [
@@ -401,11 +251,47 @@
"navigationBarTitleText": "抽奖"
}
},
{
"path": "views/county-lottery",
"style": {
"navigationBarTitleText": "抽奖"
}
},
{
"path": "views/lottery-log",
"style": {
"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": "实名认证"
}
}
]
},
@@ -469,7 +355,7 @@
{
"path": "views/wholesaler",
"style": {
"navigationBarTitleText": "采购批发商入驻"
"navigationBarTitleText": "礼品集采中心入驻"
}
},
{
@@ -604,7 +490,7 @@
{
"path": "views/giftList",
"style": {
"navigationBarTitleText": "特色礼品"
"navigationBarTitleText": "全国礼品"
}
},
{
@@ -646,6 +532,13 @@
"navigationStyle": "custom"
}
},
{
"path": "views/famousQianxianGraphicGuide",
"style": {
"navigationBarTitleText": "攻略详情",
"navigationStyle": "custom"
}
},
{
"path": "views/famousQianxianVillageShop",
"style": {
@@ -885,7 +778,7 @@
{
"path": "views/index",
"style": {
"navigationBarTitleText": "云灵AI助手",
"navigationBarTitleText": "云灵",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
@@ -893,7 +786,7 @@
{
"path": "views/history",
"style": {
"navigationBarTitleText": "云灵AI助手",
"navigationBarTitleText": "云灵",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
@@ -1008,6 +901,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": {
+9 -16
View File
@@ -49,21 +49,18 @@ export default {
// 注释下面一行,会停留在启动页
setTimeout(() => {
this.toLaunch();
}, 2000)
}, 5000)
return;
}
// 未登录:静默处理登录,5秒后跳转业务页面
cookie.get("spread");
// this.toLaunch();
if (this.$deviceType == "app") {
// this.toLaunch();
this.$yrouter.switchTab({
path: "/pages/home/index"
});
return;
if (this.$deviceType != "app") {
//检查授权信息
this.checkUserInfo();
}
//检查授权信息
this.checkUserInfo();
setTimeout(() => {
this.toLaunch();
}, 5000);
},
methods: {
...mapActions(["changeAuthorization", "setUserInfo"]),
@@ -89,11 +86,7 @@ export default {
}
}
login(loginInfo).finally(() => {
this.$yrouter.switchTab({
path: "/pages/home/index"
});
});
login(loginInfo);
}
@@ -1,6 +1,16 @@
<template>
<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>
</template>
<script>
@@ -15,12 +25,14 @@ export default {
return {
curPlayVideoUrl:'',
isVideoPopupShow:false,
pageKeyId: ''
pageKeyId: '',
videoDirection: 90,
hasLoadedMetadata: false,
hasRequestedFullscreen: false
}
},
onReady(res) {
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen();
},
onLoad(options) {
if (!options.click) {
@@ -32,6 +44,29 @@ export default {
this.pageKeyId = `findVideo_videoId_${id}`
},
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) {
uni.showModal({
content: e.target.errMsg,
+123 -23
View File
@@ -6,25 +6,44 @@
</view>
</view>
<view class="list" v-if="list.length">
<custom-waterfalls-flow :value="list" imageKey="cover">
<view class="item" v-for="(item,index) in list" :key="index" slot="slot{{index}}" @click="goDetail(item)">
<image class="cover" :src="item.cover" mode="widthFix"></image>
<view class="content">
<view class="title more-t">{{ item.title }}</view>
<view class="footer flex jc-between ai-center">
<view class="visit flex ai-center">
<image class="icon" style="margin-right: 8rpx" :src="item.storeLogo" mode="scaleToFill"></image>
{{ item.storeName }}
<view class="list" v-show="hasList">
<view class="video-waterfalls-wrap">
<view class="waterfalls-column">
<view class="item" v-for="(lItem,lIndex) in leftList" :key="lIndex" @click="goDetail(lItem)">
<image class="cover" :src="lItem.cover" mode="widthFix" lazy-load></image>
<view class="content">
<view class="title more-t">{{ lItem.title }}</view>
<view class="footer flex jc-between ai-center">
<view class="visit flex ai-center">
<image class="icon" style="margin-right: 8rpx" :src="lItem.storeLogo" mode="scaleToFill"></image>
{{ lItem.storeName }}
</view>
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
</view>
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
</view>
</view>
</view>
</custom-waterfalls-flow>
<view class="waterfalls-column">
<view class="item" v-for="(rItem,rIndex) in rightList" :key="rIndex" @click="goDetail(rItem)">
<image class="cover" :src="rItem.cover" mode="widthFix" lazy-load></image>
<view class="content">
<view class="title more-t">{{ rItem.title }}</view>
<view class="footer flex jc-between ai-center">
<view class="visit flex ai-center">
<image class="icon" style="margin-right: 8rpx" :src="rItem.storeLogo" mode="scaleToFill"></image>
{{ rItem.storeName }}
</view>
<image class="icon flex-0" :src="webUrl+'/20210806121203835373.png'" mode="scaleToFill"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="v4-nodata" v-else>
<view class="loading-more" v-show="isWait">加载中...</view>
<view class="v4-nodata" v-show="showEmpty">
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
<view class="text">暂无数据</view>
</view>
@@ -36,6 +55,11 @@ import {getStoreVideoType, getArticleList} from '@/api/public'
import {getVideoList} from '@/api/user'
import { pageListenMixins } from '@/mixins/pageListenMixins'
// 封面固定宽度(rpx
const COVER_WIDTH = 332
// 每项除封面外的文字内容预估高度(rpx)
const TEXT_HEIGHT = 120
export default {
mixins: [pageListenMixins],
data() {
@@ -46,11 +70,23 @@ export default {
page: 1,
limit: 10,
keyword: '',
list: [],
leftList: [],
rightList: [],
leftHeight: 0,
rightHeight: 0,
isWait: false,
requestId: 0,
pageKeyId: Object.freeze('findVideoList')
}
},
computed: {
hasList() {
return this.leftList.length + this.rightList.length > 0
},
showEmpty() {
return !this.isWait && !this.hasList
}
},
onLoad(options) {
if (!options.click) {
uni.switchTab({ url: '/pages/home/index' })
@@ -76,27 +112,73 @@ export default {
changeType(item) {
this.type = item.value
this.page = 1
this.list = []
// 使进行中的请求失效并解锁,避免切换时被上一次请求阻塞
this.requestId++
this.isWait = false
this.fetchList()
},
fetchList() {
resetList() {
this.leftList = []
this.rightList = []
this.leftHeight = 0
this.rightHeight = 0
},
async fetchList() {
if (this.isWait) return
const requestId = ++this.requestId
this.isWait = true
const params = {
type: this.type,
page: this.page,
limit: this.limit
}
getVideoList(params).then(res => {
try {
const res = await getVideoList(params)
// 请求已被更新的请求(如切换分类)取代,丢弃本次结果
if (requestId !== this.requestId) return
if (res.status === 200) {
for (let i = 0; i < res.data.length; i++) {
res.data[i].hide = true
this.list.push(res.data[i])
const items = res.data
for (let i = 0; i < items.length; i++) {
items[i].hide = true
}
// 并行获取所有封面高度,完成后一次性替换列表,避免闪现空列表
const heights = await Promise.all(items.map(item => this.getImageHeight(item.cover)))
if (requestId !== this.requestId) return
if (this.page === 1) this.resetList()
items.forEach((item, i) => {
this.pushToColumn(item, heights[i] + TEXT_HEIGHT)
})
}
this.isWait = false
} catch (e) {
// 忽略请求或图片尺寸获取失败
} finally {
if (requestId === this.requestId) {
this.isWait = false
}
}
},
getImageHeight(src) {
return new Promise(resolve => {
uni.getImageInfo({
src,
success: res => {
resolve(res.height / res.width * COVER_WIDTH)
},
fail: () => {
resolve(COVER_WIDTH)
}
})
})
},
pushToColumn(item, height) {
if (this.leftHeight <= this.rightHeight) {
this.leftList.push(item)
this.leftHeight += height
} else {
this.rightList.push(item)
this.rightHeight += height
}
},
goDetail(item) {
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1')
}
@@ -114,6 +196,7 @@ export default {
border-radius: 20rpx;
background: #fff;
font-size: 26rpx;
white-space: nowrap;
}
.active {
@@ -125,13 +208,23 @@ export default {
.list {
margin: 28rpx 32rpx;
.video-waterfalls-wrap {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.waterfalls-column {
width: 332rpx;
}
.item {
margin-bottom: 20rpx;
border-radius: 4rpx;
background: #fff;
.cover {
width: 332rpx;
//height: 200rpx;
vertical-align: middle;
}
@@ -174,4 +267,11 @@ export default {
}
}
}
</style>
.loading-more {
padding: 24rpx 0;
text-align: center;
font-size: 24rpx;
color: #999;
}
</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>
<view class="btn">
<view class="btn" @click.stop="addToCart(item, 'productId')">
<image
:src="webUrl + '/home/icon-cart.png'"
class="img-icon"
@@ -309,14 +309,14 @@
:key="attr"
:class="{
'on': attr.check,
'disabled': getAttrItemData(attr.attr).stock === 0
'disabled': getAttrItemData1(attr.attr).stock === 0
}"
class="attr"
@click="attrItemClick(attr, attrIndex, index)"
>
{{ attr.attr }}
<text
v-if="getAttrItemData(attr.attr).stock === 0"
v-if="getAttrItemData1(attr.attr).stock === 0"
class="tag"
>缺货</text>
</view>
@@ -368,28 +368,41 @@
</view>
</u-popup>
<ProductWindow
ref="attrWindow"
:attr="attr"
:cartNum="cart_num"
:showOk="true"
@changeFun="changeFun"
@ok="handleOk(() => this.getCart())"
/>
<xdd-tabbar :curr-index="2" />
</view>
</template>
<script>
import XddTabbar from '@/components/xdd-tabbar'
import ProductWindow from '@/components/ProductWindow'
import {getAddressList, getUserLike} from "@/api/user";
import {
changeCartNum,
getCartGroup,
postCartDel,
postCartAdd,
getCartGoodAttr,
cartGoodChangeAttr
} from '@/api/store'
import CheckboxIcon from '@/components/CheckboxIcon.vue'
import { pageListenMixins } from '@/mixins/pageListenMixins'
import goCartMixin from '@/mixins/goCartMixins'
import { mapGetters } from 'vuex'
import cookie from "@/utils/store/cookie"
export default {
components: {
CheckboxIcon,
XddTabbar
XddTabbar,
ProductWindow
},
mixins: [pageListenMixins],
mixins: [pageListenMixins, goCartMixin],
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
@@ -406,15 +419,18 @@ export default {
},
showAttr: false,
pageKeyId: Object.freeze('landmarkGoodsIndex'),
cartSelectedIdsCacheKey: Object.freeze('cartSelectedIds'),
isEdit: false,
addressList:[],
addressInfo: {},
userLikeList: [],
selectedCartIds: [],
// 是否已登录
isNoLogin: false
}
},
computed: {
...mapGetters(['isLogin']),
total() {
let price = 0
this.list.forEach(item => {
@@ -435,6 +451,7 @@ export default {
}
},
created() {
this.selectedCartIds = this.getSelectedCartIds()
this.getCart()
this.getAddress()
},
@@ -581,22 +598,75 @@ export default {
isInvalid: true
}
})
this.list = res.data['valid'].concat(invalid)
this.handleAll(false)
this.list = this.restoreCartState(res.data['valid'].concat(invalid))
const _res = await getUserLike()
this.userLikeList = _res.data
}
},
handleAll(state) {
this.isAll = state
getSelectedCartIds() {
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 => {
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 => {
good.state = item.isInvalid && !this.isEdit ? false : state
good.state = canSelect ? state : false
return good
})
return item
})
this.refreshSelectionState()
},
navToStore(id) {
if (id === 0) {
@@ -615,6 +685,7 @@ export default {
if (mark.length === 1) {
if (mark[0] === -1) {
this.handleAll(state)
return
} else {
this.list[mark[0]]['state'] = state
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
}
let shopCheckNumber = 0
this.list.map(item => {
if (item.state) {
shopCheckNumber++
}
})
this.isAll = shopCheckNumber === this.list.length
this.refreshSelectionState()
},
inputChangeHandle(index, gIndex, good, e) {
@@ -766,7 +831,7 @@ export default {
uni.hideLoading()
})
},
getAttrItemData(attr) {
getAttrItemData1(attr) {
let result = {
stock: 0
}
+16 -13
View File
@@ -384,20 +384,23 @@ export default {
this.mescroll && this.mescroll.triggerDownScroll()
},
search() {
if(this.keyword === '') return
this.listGroup.findIndex((group, index) => {
let result
group.city.forEach(item => {
result = item.cityName.indexOf(this.keyword, 0)
if (result !== -1) {
this.asideTap(index);
return null;
}
})
if (result !== -1) {
return result
}
const keyword = (this.keyword || '').trim()
if (!keyword) return
const matchIndex = this.listGroup.findIndex(group => {
const cityList = Array.isArray(group.city) ? group.city : []
return cityList.some(item => item && item.cityName && item.cityName.indexOf(keyword) !== -1)
})
if (matchIndex !== -1) {
this.keyword = keyword
this.asideTap(matchIndex)
return
}
if (matchIndex === -1) {
uni.showToast({
title: '未找到该城市,请重新输入城市名称',
icon: 'none'
})
}
},
select(item) {
if (this.type === 0 && item.hasData === 0) return
+5 -1
View File
@@ -114,7 +114,8 @@
<view class="icon-box"><u-icon name="arrow-rightward" color="#fff" size="8"></u-icon></view>
</view>
</view>
<view class="v4-nodata" v-if="townList.length === 0">
<goo-skeleton v-if="!townLoaded" :show-avatar="false"/>
<view class="v4-nodata" v-else-if="townList.length === 0">
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
<view class="text">暂无数据</view>
</view>
@@ -203,6 +204,7 @@ export default {
isNext: false,
townConfig: {},
townList: [],
townLoaded: false,
randomSeed: null,
hotelBanner: [],
goodCityId: '',
@@ -519,6 +521,8 @@ export default {
}
getAncientTownList(params).then(res => {
this.townList = res.data.records
}).finally(() => {
this.townLoaded = true
})
return
}
+184 -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 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)">
<image :src="item.productImage" class="product-card-img" mode="heightFix|widthFix"></image>
<view class="new-info">
@@ -53,6 +53,9 @@
</view>
</view>
</view>
<view v-else class="empty-wrap">
<view class="empty-text">暂无数据</view>
</view>
<ProductWindow
ref="attrWindow"
:attr="attr"
@@ -99,8 +102,12 @@ export default{
onLoad() {
queryNewZone().then(res => {
this.details = res.data
this.tabs = res.data.categories
this.handleClick(0, this.tabs[0])
this.tabs = Array.isArray(res.data.categories) ? res.data.categories : []
if (this.tabs.length > 0) {
this.handleClick(0, this.tabs[0])
} else {
this.products = []
}
})
},
computed: {
@@ -112,7 +119,7 @@ export default{
methods: {
handleClick(index, tab) {
this.activeIndex = index
this.products = tab.products
this.products = Array.isArray(tab && tab.products) ? tab.products : []
},
handleChange(e) {
this.current = e.detail.current
@@ -144,6 +151,17 @@ export default{
justify-content: space-between;
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{
position: absolute;
bottom: 0;
File diff suppressed because it is too large Load Diff
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>
</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">
<text>优惠券</text>
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
@@ -255,7 +255,7 @@
</view>
<!-- v9 优惠券开始 -->
<u-popup
v-if="show"
v-if="!isLotteryOrder() && show"
:show="show"
:round="10"
mode="bottom"
@@ -263,7 +263,7 @@
@close="close"
>
<CouponsPopup
v-if="couponList.usable.length > 0 && show"
v-if="!isLotteryOrder() && couponList.usable.length > 0 && show"
:two-list="couponList"
@change="changeCoupons"
@close="close"
@@ -328,7 +328,10 @@ import {isNullOrEmpty, isWeixin} from "@/utils"
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue'
import uniPopup from '@/components/uni-popup/uni-popup.vue'
import CouponsPopup from "@/components/CouponsPopup.vue"
import { getDrawTicketByOrder } from '@/api/lottery'
import { pageListenMixins } from '@/mixins/pageListenMixins'
import settings from '@/config/baseSetting.js'
import { orderPaySuccessToCheckDrawStatus } from '@/mixins/orderPaySuccessToCheckDrawStatus.js'
const NAME = "OrderSubmission"
const _isWeixin = isWeixin()
@@ -342,7 +345,7 @@ export default {
passkeyborad,
CouponsPopup
},
mixins: [pageListenMixins],
mixins: [pageListenMixins, orderPaySuccessToCheckDrawStatus],
props: {},
data: function () {
return {
@@ -395,7 +398,8 @@ export default {
pageKeyId: Object.freeze('orderConfirm'),
total: 0,
couponTitle: '',
hasCoupon: false
hasCoupon: false,
pageQuery: {}
}
},
computed: mapGetters(["userInfo", "storeItems"]),
@@ -414,17 +418,18 @@ export default {
},
onLoad(opts) {
const that = this
if (that.$yroute.query.pinkid !== undefined) {
that.pinkId = that.$yroute.query.pinkid
that.pageQuery = Object.assign({}, that.resolvePageQuery(), opts || {})
if (that.pageQuery.pinkid !== undefined) {
that.pinkId = that.pageQuery.pinkid
}
if (that.$yroute.query.id !== undefined) {
that.cartid = that.$yroute.query.id
if (that.pageQuery.id !== undefined) {
that.cartid = that.pageQuery.id
console.log(that.cartid)
}
if (that.$yroute.query.lotteryRecordId !== undefined) {
that.lotteryRecordId = that.$yroute.query.lotteryRecordId
if (that.pageQuery.lotteryRecordId !== undefined) {
that.lotteryRecordId = that.pageQuery.lotteryRecordId
}
that.hasCoupon = opts.couponId !== ''
that.hasCoupon = !!(opts && opts.couponId !== '')
that.getCartInfo()
},
onShow() {
@@ -449,6 +454,37 @@ export default {
},
methods: {
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) {
// this.couponTitle = e.couponTitle
// this.couponId = this.$yroute.query.couponId || uni.getStorageSync('couponId') || 0
@@ -456,7 +492,7 @@ export default {
showStoreList() {
this.$store.commit("get_to", "orders")
this.$yrouter.push({
path: "/pages/shop/StoreList/index"
path: "/pagesShop/shop/StoreList/index"
})
},
force2Decimal(value) {
@@ -474,18 +510,23 @@ export default {
postOrderComputed(this.orderGroupInfo.orderKey, {
addressId: this.addressInfo.id,
useIntegral: this.useIntegral ? 1 : 0,
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId,
couponId: this.getOrderCouponId(),
usePoints: this.usePointsCheck ? 1 : 0,
shipping_type: parseInt(this.shipping_type) + 1
}).then(res => {
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
}
const data = res.data;
if (data.status === "EXTEND_ORDER") {
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
path: "/pagesOrder/order/OrderDetails/index",
query: {
id: data.result.orderId
}
@@ -540,8 +581,8 @@ export default {
}
_this.systemStore = data.systemStore || {}
_this.storeSelfMention = data.storeSelfMention
if(_this.$yroute.query.address !== undefined ) {
_this.addressInfo = JSON.parse(_this.$yroute.query.address) || {}
if(_this.pageQuery.address !== undefined ) {
_this.addressInfo = JSON.parse(_this.pageQuery.address) || {}
_this.computedPrice()
} else {
// _this.addressInfo = uni.getStorageSync('sourceAddress') || data.addressInfo || {}
@@ -600,11 +641,7 @@ export default {
},
subscribePay() {
uni.requestSubscribeMessage({
tmplIds: [
'7O3wKw7_D4t7yfSOlvecKuOQP8QEPY88uBx2FJg43HE',
'TSmTnGibZ8IxWCiRWOvLxha6-0u7tE-V1-WbDCiPkKU',
'9Q6xLHe6HyjkU5Zn5k_2zxYPf2y4MxVyUbOSW8pcZRU'
],
tmplIds: settings.SubscribeMessageTmplIds,
complete: () => this.createOrder(false)
})
},
@@ -684,7 +721,7 @@ export default {
phone: this.contactsTel,
addressId: this.addressInfo.id,
useIntegral: this.useIntegral ? 1 : 0,
couponId: this.couponList.usable.length === 0 ? 0 : this.couponId || 0,
couponId: this.getOrderCouponId(),
usePoints: this.usePointsNumber || 0,
payType: this.active,
pinkId: this.pinkId,
@@ -707,6 +744,7 @@ export default {
createOrder(this.orderGroupInfo.orderKey, params).then(res => {
uni.hideLoading()
const data = res.data
const orderId = data && data.result ? data.result.orderId : ''
switch (data.status) {
case "ORDER_EXIST":
case "EXTEND_ORDER":
@@ -716,9 +754,9 @@ export default {
duration: 2000
})
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
path: "/pagesOrder/order/OrderDetails/index",
query: {
id: data.result.orderId
id: orderId
}
})
break;
@@ -743,21 +781,7 @@ export default {
icon: "none",
duration: 2000
})
if (this.orderGroupInfo.cartInfo && this.orderGroupInfo.cartInfo.length === 1) {
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
}
})
}
this.paySuccessToMyOrderOrDetail(orderId)
break;
case "WECHAT_H5_PAY":
// H5支付
@@ -770,24 +794,18 @@ export default {
break;
case "WECHAT_PAY":
// 小程序支付
weappPay(data.result.jsConfig).finally(() => {
this.$yrouter.replace({
path: "/pages/order/MyOrder/index",
query: {
type: 1
}
})
weappPay(data.result.jsConfig).then(() => {
this.paySuccessToMyOrderOrDetail(orderId)
}).catch(() => {
this.paySuccessToMyOrderOrDetail(orderId)
})
break;
case "WECHAT_APP_PAY":
// APP支付
weappPay(data.result.jsConfig).finally(() => {
this.$yrouter.replace({
path: "/pages/order/MyOrder/index",
query: {
type: 1
}
});
weappPay(data.result.jsConfig).then(() => {
this.paySuccessToMyOrderOrDetail(orderId)
}).catch(() => {
this.paySuccessToMyOrderOrDetail(orderId)
})
break;
}
@@ -802,20 +820,42 @@ export default {
duration: 2000
})
}).finally(function () {
if (that.$refs.payPwdPop) {
that.$refs.payPwdPop.clear()
that.$refs.payPwdPop.close()
}
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() {
this.show = !this.show
},
showCouponsPopup() {
if (this.isLotteryOrder()) return
if (this.couponList.usable.length === 0) return
this.show = !this.show
},
// v9-2
changeCoupons(item) {
if (this.isLotteryOrder()) return
if(!item) return
if (this.couponList.usable.length === 0) return
this.show = !this.show
@@ -1007,4 +1047,5 @@ export default {
padding: 20rpx 0 0 0;
color: #999;
}
</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>
+85 -23
View File
@@ -32,9 +32,9 @@
<image :src="webUrl+'/20210806121714655368.png'" mode="" style="width: 36rpx;height: 36rpx;"></image>
</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 v-if="couponListLimit2ToShow.length > 0" class="v12-justify-start">
<view v-if="!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0" class="v12-justify-start">
<view
v-for="(item, index) in couponListLimit2ToShow"
:key="index"
@@ -48,7 +48,7 @@
</view>
<view
v-if="couponListLimit2ToShow.length > 0"
v-if="!isCountyLotteryGoodsDetail() && couponListLimit2ToShow.length > 0"
class="value value2 v12-font-24 v12-primary-text"
@click="changeCoupons()"
>
@@ -201,7 +201,7 @@
</view>
<!-- 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
:two-list="couponList"
@ok="setCoupon"
@@ -309,7 +309,7 @@
</view>
</view>
<!-- v6服务项目结束 -->
<view class="store-section goods-section" v-if="systemStore">
<view class="store-section goods-section" v-if="systemStore && appProductHideMerchant !== '1'">
<view class="flex jc-between ai-center">
<view class="title bold flex ai-center">
<view>
@@ -493,6 +493,7 @@
ref="attrWindow"
:attr="attr"
:cartNum="cart_num"
:hideQuantityControls="source === 'countyLottery' && Number(activityId) > 0"
@changeFun="changeFun"
:isNegotiable="storeInfo.isNegotiable === 1"
@gift="gift"
@@ -539,7 +540,7 @@ import {
getProductSkuBySelected
} from '@/api/store'
import { userBindParent } from '@/api/user'
import { handleQrCode, isWeixin } from '@/utils'
import { handleLoginFailure, handleQrCode, isWeixin } from '@/utils'
import { getHomeData } from '@/api/public'
import {
getDailyGoods,
@@ -578,6 +579,7 @@ export default {
mixins: [pageListenMixins],
data: function () {
return {
appProductHideMerchant: '0',
isGift: false,
giftBg: '',
// 商品信息是否展开
@@ -654,7 +656,8 @@ export default {
pageKeyId: '',
couponListLimit2ToShow: [],
qualifications: [],
couponId: null
couponId: null,
submitActionLock: false
}
},
computed: mapGetters(['isLogin', 'location', 'userInfo']),
@@ -730,6 +733,7 @@ export default {
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())
console.log("getEnterOptionsSync", uni.getEnterOptionsSync())
uni.removeStorageSync('couponId')
const pageQuery = Object.assign({}, this.resolvePageQuery(), options || {})
const from = options.from
const id = options.id
switch (from) {
@@ -777,10 +781,10 @@ export default {
if (url && url.productId) {
this.id = url.productId
} else if (options.id) {
this.id = options.id || null
this.partnerId = options.partnerId || null
this.activityId = this._route.query.activityId
this.source = this._route.query.from || ''
this.id = pageQuery.id || options.id || null
this.partnerId = pageQuery.partnerId || options.partnerId || null
this.activityId = Number(pageQuery.activityId || pageQuery.drawActivityId || 0)
this.source = pageQuery.from || ''
} else {
const obj = uni.getEnterOptionsSync()
if (options.scene != null || obj.query.scene != null) {
@@ -820,6 +824,7 @@ export default {
}
},
onShow() {
this.submitActionLock = false
this.getMapData()
getGiftCardSendBackground().then(res => {
if (res.status === 200) {
@@ -844,6 +849,18 @@ export default {
}
},
methods: {
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 {}
},
gift() {
this.goCat(2)
},
@@ -875,14 +892,23 @@ export default {
})
},
goRoom() {
console.log(this.storeInfo);
if (!this.isLogin) {
uni.showToast({
title: '请先登录后联系客服',
icon: 'none',
duration: 2000
})
handleLoginFailure()
return
}
console.log(this.attr);
const params = {
goodsId: this.id,
goodsName: this.attr.productSelect.store_name,
skuStr: this.attrValue,
price: this.attr.productSelect.price,
seckillId: this.activityId,
cover: this.attr.productSelect.image,
cover: this.attr.productSelect.image || this.storeInfo.image,
goodsData: '',
seckillData: '',
isNegotiable: this.storeInfo.isNegotiable
@@ -1070,12 +1096,12 @@ export default {
},
goStoreList() {
this.$yrouter.push({
path: '/pages/shop/StoreList/index'
path: '/pagesShop/shop/StoreList/index'
})
},
goEvaluateList(id) {
this.$yrouter.push({
path: '/pages/shop/EvaluateList/index',
path: '/pagesShop/shop/EvaluateList/index',
query: {
id
}
@@ -1185,6 +1211,7 @@ export default {
this.posterData.price = this.storeInfo.price
this.posterData.code = this.storeInfo.codeBase
this.systemStore = data.systemStore
this.appProductHideMerchant = data.appProductHideMerchant
const good_list = data.goodList || []
const goodArray = []
const count = Math.ceil(good_list.length / 6)
@@ -1251,7 +1278,7 @@ export default {
'store_name',
this.storeInfo.storeName
)
this.$set(this.attr.productSelect, 'image', productSelect.image)
this.$set(this.attr.productSelect, 'image', productSelect.image || this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', productSelect.price)
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
@@ -1378,7 +1405,7 @@ export default {
subItem.check = true
}
})
this.$set(this.attr.productSelect, 'image', productSelect.image)
this.$set(this.attr.productSelect, 'image', productSelect.image || this.storeInfo.image)
this.$set(this.attr.productSelect, 'price', productSelect.price)
this.$set(this.attr.productSelect, 'otPrice', productSelect.otPrice)
this.$set(this.attr.productSelect, 'stock', productSelect.stock)
@@ -1495,28 +1522,55 @@ export default {
case "day":
q.dailyGoodsId = Number(this.activityId)
break
case "countyLottery":
q.drawActivityId = Number(this.activityId || 0)
break
}
if (that.submitActionLock) {
return
}
that.submitActionLock = true
postCartAdd(q).then(function (res) {
that.isOpen = false
that.attr.cartAttr = false
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({
path: "/pages/order/OrderSubmission/index",
query: {
id: res.data.cartId,
discount: that.storeInfo.discount,
}
query: orderQuery
})
setTimeout(() => {
that.submitActionLock = false
}, 1500)
return
}
if(news === 2) {
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({
// + '&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) {
that.submitActionLock = false
uni.showToast({
title: "添加购物车成功",
icon: "success",
@@ -1529,6 +1583,7 @@ export default {
}
}).catch(error => {
that.isOpen = false;
that.submitActionLock = false
uni.showToast({
title: error.msg,
icon: "none",
@@ -1564,11 +1619,16 @@ export default {
listenerActionClose() {
this.posters = false
},
isCountyLotteryGoodsDetail() {
return this.source === 'countyLottery' && Number(this.activityId || 0) > 0
},
// v9-2
changeCoupons(e) {
if (this.isCountyLotteryGoodsDetail()) return
this.show = !this.show
},
setCoupon(couponId) {
if (this.isCountyLotteryGoodsDetail()) return
this.couponId = couponId
},
async checkFavorite() {
@@ -1874,7 +1934,8 @@ export default {
}
.btn-buy-disabled {
background: #9D9D9D;
background: #9D9D9D !important;
color: #FFFFFF !important;
}
}
@@ -2102,6 +2163,7 @@ export default {
.product-con .footer{
height: 140rpx !important;
padding-bottom: 20rpx;
// z-index: 1002 !important;
}
.product-con .product-intro .conter view {
width: 100% !important;
+44 -7
View File
@@ -86,7 +86,7 @@
</view>
</view>
<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">
{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}
</view>
@@ -98,7 +98,7 @@
余额
</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">
{{ userInfo.integral || 0 }}
</view>
@@ -215,6 +215,16 @@
</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="title acea-row row-middle">
@@ -301,6 +311,7 @@ import {
noticeList,
getUserCenterBanner
} from "@/api/user"
import { getDrawConfig } from '@/api/lottery'
import {isWeixin} from "@/utils"
import cookie from "@/utils/store/cookie"
import { pageListenMixins } from '@/mixins/pageListenMixins'
@@ -364,7 +375,7 @@ export default {
},
{
text: '账户明细',
url: '/pages/user/UserBill/index',
url: '/pagesUser/user/UserBill/index',
icon: '/icon/icon-coin.png',
allowEnter: true
},
@@ -376,19 +387,23 @@ export default {
},
{
text: '团队管理',
url: '/pages/user/promotion/UserPromotion/index',
url: '/pagesUser/user/promotion/UserPromotion/index',
icon: '/icon/icon-users.png',
allowEnter: true
},
{
text: '商品足迹',
url: '/pages/user/History/index',
url: '/pagesUser/user/History/index',
icon: '/icon/icon-help.png',
allowEnter: true
}
],
bannerBgUrl: '',
userCenterBannerUrl: '',
drawConfig: {
myTicketImage: '',
myTicketImageEnable: 0
},
pageKeyId: Object.freeze('userIndex'),
nowrap: true,
//
@@ -413,6 +428,7 @@ export default {
this.getUserLevelInfoReq()
this.isWeixin = isWeixin()
// this.getUnreadMsgList()
this.getDrawConfigReq()
} else {
this.isNoLogin = true
/*
@@ -429,6 +445,19 @@ export default {
},
methods: {
...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() {
this.$nextTick(() => {
@@ -486,7 +515,7 @@ export default {
}
},
goReturnList() {
this.$yrouter.push('/pages/order/ReturnList/index')
this.$yrouter.push('/pagesOrder/order/ReturnList/index')
},
goMyOrder(type) {
if (this.isNoLogin) {
@@ -509,7 +538,7 @@ export default {
},
goUserAccount() {
this.$yrouter.push({
path: '/pages/user/UserAccount/index'
path: '/pagesUser/user/UserAccount/index'
})
},
goPersonalData() {
@@ -681,6 +710,14 @@ export default {
}
.my-wrapper {
padding: 30upx;
.my-ticket-entry {
margin-top: 30rpx;
.img {
width: 100%;
border-radius: 24rpx;
display: block;
}
}
&.wrapper {
padding: 0 0 30rpx 0 !important;
}
File diff suppressed because it is too large Load Diff
+1 -76
View File
@@ -219,7 +219,6 @@ import CitySelect from "@/components/CitySelect";
import tmUpload from '@/components/tm-upload/tm-upload.vue';
import {getCity} from "@/api/user";
import {chooseImage, isWeixin} from "@/utils";
import {getHomeData} from "@/api/public";
import {VUE_APP_API_URL} from "@/config"
import {getHotelTypeList, postHotelApply, postHotelReApply} from "@/api/inn.js";
@@ -440,81 +439,7 @@ export default {
}
});
},
getIndex(value, arr) {
var idx = -1;
for (var i = 0; i < arr.length; i++) {
if (arr[i].n == value) {
idx = i;
break;
}
}
return idx;
},
getCityList: function () {
let that = this;
getCity()
.then(res => {
that.district = res.data;
// that.ready = true;
// if(this.id){
// //city_id
// var pIdx = that.getIndex(that.address.province,that.district);
// if(pIdx>-1){
// var citys = that.district[pIdx].c;
// var cIdx = that.getIndex(that.address.city,citys);
// if(cIdx>-1){
// var city = citys[cIdx];
// that.address.city_id = city.v;
// console.log('city_id:'+city.v);
// }
// }
// }
})
.catch(err => {
that.$dialog.error(err.msg);
});
},
chooseQrcodeImg: function () {
chooseImage(img => {
console.log(img)
that.$set(that.innApplyInfo, 'qrcode', img);
});
},
chooseLogoImg: function () {
chooseImage(img => {
console.log(img)
that.innApplyInfo.logo = img;
});
},
chooseCoverImg: function () {
chooseImage(img => {
console.log(img)
that.innApplyInfo.cover = img;
});
},
//
uploadedImgChange: function (uploadedFilesList) {
this.uploadedFilesArray = uploadedFilesList;
},
submit: function () {
if (this.innApplyInfo.name.length == 0) {
this.$dialog.error("请输入店铺名称");
return;
}
if (this.innApplyInfo.type.length == 0) {
this.$dialog.error("请选择店铺类型");
return;
}
submit() {
if (this.addressText.length == 0) {
this.$dialog.error("请选择店铺所在省市区");
return;
+7 -1
View File
@@ -588,7 +588,8 @@ export default {
pageKeyId: '',
shareImg: '',
videoPlayers: [],
isView: false
isView: false,
skipRefreshOnShow: false
}
},
// onPageScroll(e){}
@@ -679,6 +680,10 @@ export default {
if (!this.isLoad) {
return
}
if (this.skipRefreshOnShow) {
this.skipRefreshOnShow = false
return
}
this.fetchInnDetail()
if(this.isView) return
if(this.activeIndex === 1) {
@@ -834,6 +839,7 @@ export default {
})
},
infoClick: function (info) {
this.skipRefreshOnShow = true
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
},
coverPlay(){
File diff suppressed because it is too large Load Diff
@@ -76,7 +76,7 @@ export default {
},
goOrderDetails(order) {
this.$yrouter.push({
path: "/pages/order/OrderDetails/index",
path: "/pagesOrder/order/OrderDetails/index",
query: {id: order.orderId}
});
},
@@ -39,6 +39,9 @@
:src="historyItem.image"
mode="scaleToFill"
/>
<view v-if="isInvalidItem(historyItem)" class="invalid-mask">
<text class="invalid-mask-text">商品已下架</text>
</view>
<view class="good-info">
<view
v-if="historyItem.couponName"
@@ -179,6 +182,13 @@ export default {
return str.replace(regx, '')
},
goodsDetail (item) {
if (this.isInvalidItem(item)) {
uni.showToast({
title: '商品已下架',
icon: 'none'
})
return
}
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
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) {
const id = historyItem.id
if (!id) return
@@ -276,6 +291,26 @@ export default {
width: 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 {
padding: 12rpx 12rpx 20rpx 12rpx;
.price {
@@ -97,13 +97,7 @@ export default {
methods: {
dataFormat,
toDetail(mid){
this.$yrouter.push('/pages/user/MessageDetail/MessageDetail?id='+mid);
// this.$yrouter.push({
// path: "/pages/user/MessageDetail/MessageDetail",
// query: {
// id:mid
// }
// });
this.$yrouter.push('/pagesUser/user/MessageDetail/MessageDetail?id='+mid);
}
},
onLoad:function(e){
@@ -198,7 +198,7 @@ export default {
},
goOrderDetails(order) {
this.$yrouter.push({
path: '/pages/order/OrderDetails/index',
path: '/pagesOrder/order/OrderDetails/index',
query: {
id: order.orderId
}
@@ -129,7 +129,7 @@ export default {
//
toggleProtocolPage() {
//this.$refs.popup.open();
this.$yrouter.push('/pages/user/UpgradeProtocolDetail/UpgradeProtocolDetail')
this.$yrouter.push('/pagesUser/user/UpgradeProtocolDetail/UpgradeProtocolDetail')
},
chooseIdCardFrontImage() {
@@ -8,7 +8,7 @@
<view style="color: #fff;">总资产()</view>
<view class="money">{{ now_money }}</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 class="cumulative acea-row row-top">
<view class="item">
@@ -66,7 +66,7 @@ export default {
methods: {
goUserBill(types) {
this.$yrouter.push({
path: "/pages/user/UserBill/index",
path: "/pagesUser/user/UserBill/index",
query: { types }
});
},
@@ -25,8 +25,7 @@ export default {
},
methods: {
goUserPromotion() {
this.$yrouter.back();
// this.$yrouter.push({ path: "/pages/user/promotion/UserPromotion/index" });
this.$yrouter.back();
}
}
};
@@ -23,7 +23,7 @@
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
<input v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
@@ -45,7 +45,7 @@
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
<input placeholder="请输入提现金额" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
@@ -127,19 +127,19 @@ export default {
return this.$force2Decimal(v);
},
goPoster() {
this.$yrouter.push("/pages/user/promotion/Poster/index");
this.$yrouter.push("/pagesUser/user/promotion/Poster/index");
},
goCashRecord() {
this.$yrouter.push('/pkg_user/views/withdrawalLog');
},
goPromoterList() {
this.$yrouter.push("/pages/user/promotion/PromoterList/index");
this.$yrouter.push("/pagesUser/user/promotion/PromoterList/index");
},
goCommissionDetails() {
this.$yrouter.push("/pages/user/promotion/CommissionDetails/index");
this.$yrouter.push("/pagesUser/user/promotion/CommissionDetails/index");
},
goPromoterOrder() {
this.$yrouter.push("/pages/user/promotion/PromoterOrder/index");
this.$yrouter.push("/pagesUser/user/promotion/PromoterOrder/index");
},
getInfo: function() {
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) {
console.log('用户点击确定')
uni.navigateTo({
url: '/pages/user/Points/index'
url: '/pagesUser/user/Points/index'
})
} else if (res.cancel) {
console.log('用户点击取消')
@@ -157,4 +157,4 @@ export default {
}
}
}
</style>
</style>
+2 -2
View File
@@ -144,7 +144,7 @@ export default {
},
methods: {
navToPoint() {
uni.navigateTo({url: '/pages/user/Points/index'})
uni.navigateTo({url: '/pagesUser/user/Points/index'})
},
init() {
getDetail().then(res => {
@@ -403,4 +403,4 @@ image {
background-size: 175rpx 185rpx;
}
}
</style>
</style>
+99 -40
View File
@@ -11,9 +11,9 @@
<view class="name one-t">{{ item.username }}</view>
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
<view class="msg" v-if="item.msg_type===1">
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
<image class="img" :src="imgUrl(item.msg_content)" @click="preview(imgUrl(item.msg_content))"></image>
</view>
</view>
</view>
@@ -22,7 +22,7 @@
<view class="name one-t">{{ item.username }}</view>
<text class="msg" v-if="item.msg_type===0">{{ item.msg_content }}</text>
<view class="msg" v-if="item.msg_type===1">
<image class="img" :src="item.msg_content" @click="preview(item.msg_content)"></image>
<image class="img" :src="imgUrl(item.msg_content)" @click="preview(imgUrl(item.msg_content))"></image>
</view>
<view class="msg v12-d-flex" style="box-sizing: content-box" v-if="item.msg_type===2" @click="toGoods(item)">
<view class="goods-logo">
@@ -108,8 +108,11 @@ export default {
uploadToken: null, //token
socketOpen: false,
socketConnecting: false, //
socketTask: null,
socketMsgQueue: [],
hasConnected: false, //
reconnectHistory: false, //
roomId: null, //ID
content: "", //
@@ -136,30 +139,22 @@ export default {
},
onShow() {
this.content = uni.getStorageSync(this.merName+this.uid+this.storeId)
this.connectSocketInit();
// / list ( onHide/onShow)
if (!this.socketOpen && !this.socketConnecting) {
this.connectSocketInit();
}
},
onUnload() {
if (this.socketOpen) {
this.socketTask.close();
}
uni.onSocketClose(res => {
console.log('WebSocket 已关闭!', res);
});
this.closeSocket();
uni.setStorageSync(this.merName+this.uid+this.storeId, this.content)
},
onHide() {
if (this.socketOpen) {
this.socketTask.close();
}
uni.onSocketClose(res => {
console.log('WebSocket 已关闭!', res);
});
this.closeSocket();
uni.setStorageSync(this.merName+this.uid+this.storeId, this.content)
},
methods: {
toGoods(item) {
console.log(item);
const itemJson = JSON.parse(item.msg_content)
const itemJson = this.wsJson(item.msg_content)
if(!itemJson.goodsId) {
//
// uni.showToast({
@@ -177,7 +172,18 @@ export default {
})
},
wsJson(json) {
return JSON.parse(json)
//
try {
return JSON.parse(json) || {}
} catch (e) {
return {}
}
},
// keyhttp https
imgUrl(content) {
if (!content) return ''
if (/^https?:\/\//i.test(content)) return content.replace(/^http:\/\//i, 'https://')
return this.webUrl + '/' + content
},
getUploadToken() {
let that = this;
@@ -249,33 +255,68 @@ export default {
});
},
// websocket使
// websocket使
connectSocketInit() {
if (this.socketOpen || this.socketConnecting) return;
this.socketConnecting = true;
// this.socketTasksocket
this.socketTask = uni.connectSocket({
const task = uni.connectSocket({
url: this.$SOCKET_URL,
success: () => {
}
})
if (!task) {
this.socketConnecting = false;
return;
}
this.socketTask = task;
uni.onSocketOpen(res => {
console.log('WebSocket连接已打开!', res);
// uni.onSocket*
const isCurrent = () => this.socketTask === task;
task.onOpen(() => {
if (!isCurrent()) return;
this.socketOpen = true;
this.socketConnecting = false;
// 线
this.reconnectHistory = this.hasConnected && this.list.length > 0;
this.hasConnected = true;
this.createRoom();
//
if (this.socketMsgQueue.length) {
const queue = this.socketMsgQueue.splice(0);
queue.forEach(msg => this.sendSocketMessage(msg));
}
});
uni.onSocketError(err => {
console.log('WebSocket连接打开失败,请检查!', err);
});
uni.onSocketMessage(res => {
console.log('收到服务器内容:', res.data);
task.onMessage(res => {
if (!isCurrent()) return;
this.handleMessage(res.data);
});
uni.onSocketClose(res => {
console.log('WebSocket 已关闭', res);
task.onError(err => {
console.log('WebSocket连接打开失败,请检查', err);
if (!isCurrent()) return;
this.socketOpen = false;
this.socketConnecting = false;
});
task.onClose(() => {
if (!isCurrent()) return;
this.socketOpen = false;
this.socketConnecting = false;
});
},
closeSocket() {
this.socketOpen = false;
this.socketConnecting = false;
if (this.socketTask) {
try {
this.socketTask.close({});
} catch (e) {}
}
},
userInput(event) {
@@ -315,11 +356,14 @@ export default {
},
sendSocketMessage(msg) {
if (this.socketOpen) {
uni.sendSocketMessage({
if (this.socketOpen && this.socketTask) {
this.socketTask.send({
data: msg,
success(res) {
console.log("消息发送成功", res,msg);
fail: () => {
//
this.socketMsgQueue.push(msg);
this.closeSocket();
this.connectSocketInit();
}
});
} else {
@@ -328,7 +372,12 @@ export default {
},
handleMessage(str) {
let data = JSON.parse(str);
let data;
try {
data = JSON.parse(str);
} catch (e) {
return;
}
switch (data.type) {
case "room_id":
this.roomId = data.msg_content;
@@ -338,13 +387,23 @@ export default {
case "leave":
break;
case "msg":
this.list.push(data.msg_content);
this.scrollLast();
if (data.msg_content) {
this.list.push(data.msg_content);
this.scrollLast();
}
break;
case "msg_history":
this.list = data.msg_content.concat(this.list);
case "msg_history": {
const history = data.msg_content || [];
if (this.reconnectHistory) {
//
this.reconnectHistory = false;
this.list = history;
} else {
this.list = history.concat(this.list);
}
this.scrollLast();
break;
}
default:
break;
}

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