Compare commits

...

243 Commits

Author SHA1 Message Date
gyq 37a9b16de5 Merge branch 'ios-2' of e.coding.net:g-cphe0354/duanju/video_app into gyq-ios-2 2024-12-24 14:12:09 +08:00
gyq 3d508f9970 增加随机代码 2024-12-24 14:12:00 +08:00
duan 8fe612ce0b 修改问题 2024-12-24 13:33:27 +08:00
duan 4301fd358f 添加代码 2024-12-24 13:23:05 +08:00
GaoHao 903c584ac7 修改任务/修改首页 2024-12-24 10:53:29 +08:00
YeMingfei666 1039e9713b Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf-ios 2024-12-23 19:33:17 +08:00
YeMingfei666 90c4322dc7 修改邀请页面问题 2024-12-23 19:33:08 +08:00
duan 7e8e45805a Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 19:27:53 +08:00
duan 3b9b20c076 提交跳转 2024-12-23 19:27:48 +08:00
YeMingfei666 cad182bf51 修复海报保存问题 2024-12-23 19:19:12 +08:00
YeMingfei666 628846db7e Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 19:15:55 +08:00
YeMingfei666 852ab64e15 修复提现点击无反应问题 2024-12-23 19:15:46 +08:00
wwz 7ab31b61c0 Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into wwzios 2024-12-23 19:10:23 +08:00
wwz 79f25136f6 Merge branch 'wwzios' of https://e.coding.net/g-cphe0354/duanju/video_app into wwzios 2024-12-23 19:09:48 +08:00
YeMingfei666 bb0074cc0f 修复分享一键分享问题 2024-12-23 19:06:43 +08:00
wwz 75a2aae759 1 2024-12-23 19:03:55 +08:00
YeMingfei666 7b8f7fc4b0 Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf-ios 2024-12-23 19:03:44 +08:00
wwz 3a1e2e4a08 1 2024-12-23 19:03:22 +08:00
YeMingfei666 a7e1f0f3c4 处理红包提现记录跳转不对问题 2024-12-23 19:03:22 +08:00
duan 5585cb84ae 修改图片路径 2024-12-23 19:02:59 +08:00
duan 778a0139c2 Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 18:58:25 +08:00
duan aa09fd06df 修改报错 2024-12-23 18:58:23 +08:00
YeMingfei666 8a2e752c02 Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf-ios 2024-12-23 18:57:41 +08:00
YeMingfei666 bebd48a64a 处理跳转页面问题 2024-12-23 18:57:31 +08:00
duan 11b6f3305d Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 18:54:53 +08:00
duan 7ef2d47b91 引入pages。json 2024-12-23 18:54:48 +08:00
YeMingfei666 e2214b8ad2 代码合并 2024-12-23 18:46:29 +08:00
YeMingfei666 3acee65862 代码合并 2024-12-23 18:45:22 +08:00
wwz 7924ef4ba7 1 2024-12-23 18:40:49 +08:00
wwz d747791c9a 合并前 2024-12-23 18:33:22 +08:00
YeMingfei666 303783634b 修改页面配置和跳转 2024-12-23 18:31:02 +08:00
YeMingfei666 a0529aaf7d 修改记录,剧情,消息,下单等页面目录下单文件名称 2024-12-23 18:30:38 +08:00
duan b4be77303e 添加图片 2024-12-23 18:29:39 +08:00
YeMingfei666 30f3d244e9 修改积分下的文件名称以及相关跳转 2024-12-23 18:24:02 +08:00
duan d2dbaa640d Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 18:21:26 +08:00
duan 942f93a77c 添加html内容 2024-12-23 18:21:17 +08:00
YeMingfei666 002fb06447 增加页面,修改邀请页面名称以及相关跳转 2024-12-23 18:20:08 +08:00
gyq ecc0549cfc Merge branch 'ios' of e.coding.net:g-cphe0354/duanju/video_app into gyq 2024-12-23 18:19:05 +08:00
gyq a78cc2ecf7 更改 2024-12-23 18:18:20 +08:00
duan c8f7016f8d 添加图片 2024-12-23 18:17:54 +08:00
duan 9cbde62fd9 修改类名 2024-12-23 16:59:35 +08:00
GaoHao 54250730ce index文件夹修改 2024-12-23 16:38:42 +08:00
GaoHao 5a55632bc0 Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 16:18:35 +08:00
GaoHao 267d1fcd9b index文件夹修改 2024-12-23 16:18:32 +08:00
GYJ 7b44d1f9fb pages 2024-12-23 15:50:21 +08:00
GaoHao 9bc7e710cc Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-23 13:48:10 +08:00
GaoHao 415269084f 任务页面未登录情况调整,隐藏签到按钮 2024-12-23 13:47:54 +08:00
GaoHao 5fe52bb52a Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-23 13:25:27 +08:00
GaoHao 35854982fb 我的页面增加判断是否在ios 2024-12-23 13:24:57 +08:00
YeMingfei666 35af3b0652 修改安装打包配置文件page.json 2024-12-23 11:18:35 +08:00
YeMingfei666 b35b2ed530 增加ios打包page.json文件 2024-12-23 11:08:44 +08:00
YeMingfei666 e598f50faf 提交ios打包的page.json文件 2024-12-23 11:06:37 +08:00
GaoHao c719ce1f27 抽奖列表,兑换列表调试 2024-12-23 10:32:42 +08:00
GaoHao 7c339bc617 抽象更新 2024-12-23 09:41:13 +08:00
GaoHao a67f470f5c Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into gaohao 2024-12-21 18:26:46 +08:00
GaoHao 4c8c89a844 任务修改 2024-12-21 18:26:35 +08:00
YeMingfei666 24b7eae649 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-21 18:25:27 +08:00
YeMingfei666 9600fcf2a9 修复抽奖抽到物品展示问题 2024-12-21 18:25:03 +08:00
GaoHao cfde959d35 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into gaohao 2024-12-21 10:54:51 +08:00
GaoHao defeede5d7 任务相关修改 2024-12-21 10:54:39 +08:00
GYJ f87a4b285e 混淆,改动代码 2024-12-21 10:38:04 +08:00
YeMingfei666 a7f6209b08 隐藏other入口 2024-12-21 09:17:25 +08:00
YeMingfei666 52506bb2af 转盘抽奖增加类型 2024-12-20 18:17:28 +08:00
YeMingfei666 c9826276e9 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-20 18:03:20 +08:00
YeMingfei666 b2fd3ba347 增加other分包页面
我的页面里增加跳转other分包跳转(仅在ios不是浏览器审核时展示)
2024-12-20 18:02:58 +08:00
GaoHao 896cf17599 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-20 17:10:40 +08:00
GaoHao 4d52a796da 结构调整、任务中心调整 2024-12-20 17:10:21 +08:00
YeMingfei666 908205200b 增加新的抽奖页面 2024-12-20 09:46:09 +08:00
YeMingfei666 168665eebc 代码合并 2024-12-19 18:19:37 +08:00
YeMingfei666 3535322923 pages下增加开屏页未启用,增加分包other以及静态页面 2024-12-19 18:18:24 +08:00
GaoHao 86af5ab3a9 任务已签到事件取消 2024-12-19 16:46:20 +08:00
GaoHao 4232765731 任务修改 2024-12-19 16:42:55 +08:00
GYJ 206546aed8 iOS 适配 2024-12-19 16:22:50 +08:00
YeMingfei666 a147eaab4f Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-19 15:11:25 +08:00
GaoHao 8488799080 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into gaohao 2024-12-19 14:52:58 +08:00
GaoHao a0e49f9830 H5中0元支付弹窗修改 2024-12-19 14:52:19 +08:00
GYJ 444b897528 iOS 跳转页面配置
适配 iOS 的视频播放大小
2024-12-19 11:39:43 +08:00
GaoHao 8e7d038dba 增加签到,修改0元支付问题 2024-12-19 10:00:04 +08:00
YeMingfei666 a30d2ed9fa 部分配置更新 2024-12-18 17:42:33 +08:00
YeMingfei666 dc67568b6b 提现限制最多两位小数 2024-12-18 17:41:38 +08:00
GaoHao c401d2695d Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into gaohao 2024-12-18 17:34:53 +08:00
GaoHao 71f0e2215c 签到修改 2024-12-18 17:33:49 +08:00
YeMingfei666 66e9d9a460 更新红包图片 2024-12-18 14:01:57 +08:00
YeMingfei666 5c067b3ef7 修改红包图片 2024-12-18 13:52:07 +08:00
YeMingfei666 3de0070cb6 我的团队接口增加参数 2024-12-18 13:24:03 +08:00
YeMingfei666 f9f33f7086 修改转盘为红包 2024-12-18 09:48:15 +08:00
YeMingfei666 50fd6369a9 调整追剧页面样式 2024-12-18 09:47:56 +08:00
YeMingfei666 ad01ea7faf 增加红包gif图 2024-12-18 09:22:53 +08:00
YeMingfei666 2cd3dbf0ac 登录成功增加处理,路由栈小于等于1时跳转到首页,为2时返回一层 2024-12-18 09:22:34 +08:00
YeMingfei666 f4796c76f0 修改追剧页面展示形式和数量 2024-12-18 09:18:49 +08:00
YeMingfei666 a5554ae3ea 版本号升级为7 2024-12-18 09:17:54 +08:00
YeMingfei666 6376a92caf 去除抽奖原生弹框 2024-12-18 09:17:28 +08:00
YeMingfei666 de3cf30105 修复Safari 浏览器没有最下面的工具栏跳转到视频详情时引起的选集被遮挡以及购买支付被遮挡问题
解决方案:跳转视频前先让页面滚动然后再跳转,让浏览器最下方工具栏出现再跳转
2024-12-18 09:16:34 +08:00
YeMingfei666 0636654dc2 修改视频播放形式 2024-12-18 09:13:31 +08:00
YeMingfei666 a291c2f629 修改抽奖页面样式 2024-12-18 09:13:02 +08:00
YeMingfei666 e4f6a3b14a 增加部分方法 2024-12-17 18:49:54 +08:00
YeMingfei666 a03f005009 当用户信息rate>0时展示团队 2024-12-17 18:49:41 +08:00
YeMingfei666 dee181749b 体现明细失败判断修改 2024-12-17 18:49:12 +08:00
YeMingfei666 9ac5b0c512 绑定支付宝增加修改上限提醒 2024-12-17 18:48:28 +08:00
YeMingfei666 57cfb4babd 修复ios浏览器刷太快时支付弹窗部分被遮挡 2024-12-17 18:47:36 +08:00
YeMingfei666 b5b403c7b1 处理h5报错问题 2024-12-17 11:31:39 +08:00
YeMingfei666 43c79cc554 修改协议,增加拒绝按钮,app上拒绝退出app,h5返回。 登录后不展示同意拒绝 2024-12-17 11:30:58 +08:00
YeMingfei666 f7650fb95f 红包明细提取到申请提现页面 2024-12-17 11:21:53 +08:00
YeMingfei666 3738cd5344 部分配置文件修改 2024-12-16 18:08:11 +08:00
YeMingfei666 0c0a30e85a 修改h5为有抽奖机会就跳转 2024-12-16 18:05:58 +08:00
YeMingfei666 cfaadad802 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-16 16:52:28 +08:00
YeMingfei666 57fbc3c9b9 修改抽奖未绑定支付宝跳转 2024-12-16 16:52:06 +08:00
YeMingfei666 497e9b9311 修改抽奖未绑定支付宝跳转 2024-12-16 16:52:06 +08:00
YeMingfei666 210737d357 修改协议文字 2024-12-16 16:52:06 +08:00
YeMingfei666 56c84e1b18 取消首页搜索 2024-12-16 16:52:06 +08:00
GaoHao 2d61ed447f 图片保存修改 2024-12-16 16:50:15 +08:00
YeMingfei666 88d32d8789 修改抽奖未绑定支付宝跳转 2024-12-16 16:50:11 +08:00
YeMingfei666 efd651aac7 修改抽奖未绑定支付宝跳转 2024-12-16 16:50:01 +08:00
YeMingfei666 087bb2b3e2 修改协议文字 2024-12-16 16:49:36 +08:00
YeMingfei666 66f7b6f57a 取消首页搜索 2024-12-16 13:21:40 +08:00
YeMingfei666 aa7f7f3392 修复首页报错问题 2024-12-16 10:19:05 +08:00
YeMingfei666 b4542559ae 协议增加我已知晓 2024-12-16 10:18:17 +08:00
YeMingfei666 5372daf2a7 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-16 09:14:07 +08:00
YeMingfei666 3c209118a6 修改版本1.0.6 2024-12-16 09:14:04 +08:00
GYJ e7afd83085 注册页添加登录按钮 2024-12-15 18:21:24 +08:00
GYJ fa60aeec42 首页 undefined 2024-12-14 17:19:48 +08:00
GYJ 31601ff334 返回键 显示 隐藏 2024-12-14 17:08:05 +08:00
GYJ cfcc0c15ec 查询流水进行区分 2024-12-14 14:40:56 +08:00
GYJ e79e7f5874 隐藏我的团队 2024-12-14 11:18:11 +08:00
GYJ 421a3fe4f1 处理h5无痕浏览问题 2024-12-14 11:09:58 +08:00
巩奕杰 ec7c3742bf Accept Merge Request #2: (ymf -> test)
Merge Request: h5 支付合并

Created By: @巩奕杰
Accepted By: @巩奕杰
URL: https://g-cphe0354.coding.net/p/duanju/d/video_app/git/merge/2?initial=true
2024-12-14 10:34:50 +08:00
GYJ 30ba7cde34 修改同意协议位置 2024-12-14 10:34:05 +08:00
YeMingfei666 4b9d78ec5a 修改iOS H5支付 2024-12-14 10:30:16 +08:00
GYJ 7b6044f4eb 调整抽奖页布局 2024-12-14 10:15:40 +08:00
GYJ 119a3d3c07 隐藏微信注册页面浏览器打开引导提示 2024-12-14 09:55:22 +08:00
巩奕杰 3b6d560539 Accept Merge Request #1: (ymf -> test)
Merge Request: 合并代码

Created By: @巩奕杰
Accepted By: @巩奕杰
URL: https://g-cphe0354.coding.net/p/duanju/d/video_app/git/merge/1?initial=true
2024-12-14 09:30:43 +08:00
YeMingfei666 e822e614b8 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-13 16:46:25 +08:00
YeMingfei666 b344413b2a 修改支付跳转修改打包版本 2024-12-13 16:46:16 +08:00
GaoHao 073f8a0797 增加了引导弹窗 2024-12-13 16:03:33 +08:00
YeMingfei666 f0edf9f419 修改购买剧时h5跳转支付方式
增加ios 自带浏览器快捷方式图标
2024-12-13 15:27:02 +08:00
YeMingfei666 5ad0d54662 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-13 14:19:57 +08:00
YeMingfei666 3ff35d7eb6 修改首页跳转 2024-12-13 14:19:48 +08:00
GaoHao 9083c9a454 支付拉起调整 2024-12-13 14:06:56 +08:00
GaoHao 3d7d5178e6 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into gaohao 2024-12-13 11:40:46 +08:00
GaoHao f3f9af86f9 保存海报修改 2024-12-13 11:40:29 +08:00
YeMingfei666 d5aac20fd0 修改版本1.0.4 2024-12-13 09:48:42 +08:00
YeMingfei666 44a9d8669e 增加:
抽奖次数不足时不跳转
增加配速播放
2024-12-12 18:20:35 +08:00
YeMingfei666 fbdeaee553 修改邀请页面 2024-12-12 16:51:17 +08:00
YeMingfei666 b5a610660e 猜测未定义位置处理 2024-12-12 16:50:55 +08:00
YeMingfei666 e39688ab9f 修改金豆为金币 2024-12-12 16:18:41 +08:00
YeMingfei666 679df05a66 修改app保存海报按钮 2024-12-12 16:12:35 +08:00
YeMingfei666 d7650332a2 修改版本号 2024-12-12 13:55:32 +08:00
YeMingfei666 0a27d79563 修改更新 2024-12-12 13:55:12 +08:00
YeMingfei666 6fe850ed20 修改支付跳转判断 2024-12-12 13:54:54 +08:00
YeMingfei666 2c14e6c588 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-12 11:08:24 +08:00
YeMingfei666 6b40cf8089 增加新的支付跳转页面 2024-12-12 11:06:24 +08:00
YeMingfei666 3edfedb4ab 修改支付跳转页面 2024-12-12 11:05:04 +08:00
GaoHao 8ba1fd7f96 任务调整 2024-12-12 10:34:54 +08:00
GaoHao 9f4e438a31 支付webview修改 2024-12-11 18:08:56 +08:00
GaoHao 55fa85a8a3 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-11 17:17:42 +08:00
GaoHao c531d15343 下载版本增加遮罩 2024-12-11 17:17:23 +08:00
GaoHao f48de14b28 领取完成获取列表增加延迟 2024-12-11 16:47:07 +08:00
GaoHao 3be46138ae 任务中心接口修改 2024-12-11 16:45:43 +08:00
GaoHao 0699489b2d 版本号获取修改 2024-12-11 16:38:29 +08:00
GaoHao a87c94fdba Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-11 16:33:19 +08:00
GaoHao 21cf4b9524 增加版本号显示 2024-12-11 16:32:58 +08:00
YeMingfei666 c83901fb46 Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-11 16:30:26 +08:00
YeMingfei666 fa5f11cac3 修改邀请页面 2024-12-11 16:27:30 +08:00
GaoHao ae276c6a50 金币明细、红包明细区分 2024-12-11 16:22:14 +08:00
YeMingfei666 9b565065f9 增加空组件 2024-12-11 14:45:21 +08:00
YeMingfei666 264739b6e7 修改分享页面顶部导航栏 2024-12-11 14:04:01 +08:00
YeMingfei666 9f6eb2eb09 修改分享好友页面,增加海报保存按钮 2024-12-11 14:02:31 +08:00
GaoHao ca7c293d0e 任务中心修改 2024-12-11 11:02:08 +08:00
YeMingfei666 4964043cda Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-11 09:38:06 +08:00
YeMingfei666 61a878b326 增加部分公共函数 2024-12-11 09:35:09 +08:00
GaoHao d05abf5c80 升级更新 2024-12-11 09:31:49 +08:00
GaoHao dc4bf2a5c1 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 17:57:32 +08:00
GaoHao f1f5582381 抽奖次数修改 2024-12-09 17:56:54 +08:00
GaoHao afa4afbab6 抽奖次数修改,视频详情修改 2024-12-09 17:50:49 +08:00
YeMingfei666 483423531d 修改app跳转 2024-12-09 16:51:04 +08:00
YeMingfei666 f87dbc2ff5 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-09 16:40:50 +08:00
YeMingfei666 5458022b20 增加h5跳转app 2024-12-09 16:40:37 +08:00
GaoHao 9bb1b060e3 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 16:40:16 +08:00
GaoHao 6f931f7157 任务中心调试 2024-12-09 16:39:33 +08:00
YeMingfei666 78c8acf09b 增加支付成功跳转app页面 2024-12-09 16:32:04 +08:00
YeMingfei666 f1728def4e Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 15:10:49 +08:00
GaoHao 97f627fded Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 15:08:05 +08:00
GaoHao ca6baa5254 提现增加lodin,提现记录,红包记录修改 2024-12-09 15:07:36 +08:00
YeMingfei666 608c7b1678 修复抽奖不跳转问题 2024-12-09 15:06:11 +08:00
GaoHao 85e1b96557 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 14:29:18 +08:00
GaoHao 2edc997c39 修改红包记录字体颜色 2024-12-09 14:28:55 +08:00
GaoHao b1978752aa Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 14:07:31 +08:00
GaoHao 69b1f22c82 金币解锁提示修改 2024-12-09 14:07:04 +08:00
GaoHao 72347c4c7b Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 13:32:14 +08:00
GaoHao ff44f08b93 分享海报更换 2024-12-09 13:31:37 +08:00
YeMingfei666 5f109be94d Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 10:54:13 +08:00
YeMingfei666 0041214912 修改支付跳转逻辑 2024-12-09 10:50:02 +08:00
YeMingfei666 c63deab9f8 修改转盘时间 2024-12-09 10:49:37 +08:00
GaoHao bd98f12d4d 金币解锁修改 2024-12-09 10:44:30 +08:00
GaoHao d63cdea1ec 跳转抽奖处理 2024-12-09 10:08:47 +08:00
GaoHao 02ca722970 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into gaohao 2024-12-09 10:01:24 +08:00
GaoHao c6a81de8fb 视频详情修改 2024-12-09 10:01:08 +08:00
GaoHao 4c6603de45 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-09 09:31:05 +08:00
GaoHao 06b5c4f99b 隐藏首页追剧入口 2024-12-09 09:30:19 +08:00
YeMingfei666 e796c086f8 Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-07 18:34:53 +08:00
YeMingfei666 57e7a9c032 增加跳转转盘时视频暂停 2024-12-07 18:33:55 +08:00
GaoHao 191297c1f6 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-07 18:29:22 +08:00
GaoHao da79e53e70 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-07 18:28:58 +08:00
YeMingfei666 a234802534 修改判断跳转转盘逻辑,不进行是否是当前未购买视频判断 2024-12-07 18:26:55 +08:00
GaoHao 51d60f2dcb 增加金币解锁 2024-12-07 18:26:08 +08:00
YeMingfei666 8b61108053 增加返回按钮显示隐藏 2024-12-07 18:09:46 +08:00
YeMingfei666 f78b4fc14a Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-07 17:40:08 +08:00
YeMingfei666 014f71b43b 增加视频播放返回按钮显示隐藏 2024-12-07 17:39:56 +08:00
GaoHao d5aa9080b6 任务页面调整 2024-12-07 16:29:34 +08:00
GaoHao 3ecd48231f 视频抽奖次数显示修改 2024-12-07 15:46:08 +08:00
GaoHao ff96875de7 注册页面/下载页面更新 2024-12-07 14:41:23 +08:00
GaoHao 665db9bb9a 视频抽奖增加提示 2024-12-07 11:24:58 +08:00
GaoHao 5a97705726 Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 18:18:10 +08:00
GaoHao f55c9a9ee1 下载地址复制修改 2024-12-06 18:18:01 +08:00
YeMingfei666 2404b96717 Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 18:08:30 +08:00
YeMingfei666 f3ca591e6a 隐藏个人中心抽奖项 2024-12-06 18:08:16 +08:00
YeMingfei666 1429b7277c Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 18:06:37 +08:00
GaoHao ab815d703d 隐藏邀请码 2024-12-06 17:38:42 +08:00
YeMingfei666 e7d2b21ec2 修改红包弹窗 2024-12-06 17:13:32 +08:00
GaoHao 6ad0c6ab09 增加logo、修改下载app名字 2024-12-06 16:57:11 +08:00
GaoHao 817a4f7d55 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 16:47:41 +08:00
GaoHao d625d301cf 首页增加抽奖悬浮,tab增加任务 2024-12-06 16:47:09 +08:00
YeMingfei666 1206f0ea22 Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 15:18:40 +08:00
YeMingfei666 c97811b50d 修改转盘抽奖领取弹窗 2024-12-06 15:18:00 +08:00
GaoHao 6d91b3ec15 Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 15:11:15 +08:00
GaoHao 2506dd8d57 任务中心修改 2024-12-06 15:10:46 +08:00
GaoHao 51652f2f4f Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test 2024-12-06 14:24:14 +08:00
GaoHao f77d4b60f9 推荐视频播放统计 2024-12-06 14:23:53 +08:00
YeMingfei666 98d3572526 修改跳转抽奖逻辑 2024-12-06 13:58:49 +08:00
YeMingfei666 47751a7267 修改sdk版本号 2024-12-06 13:53:06 +08:00
YeMingfei666 d85b101e30 修复代码合并报错 2024-12-06 11:35:11 +08:00
YeMingfei666 eae93ae6c7 代码合并 2024-12-06 11:30:48 +08:00
YeMingfei666 8a340fabdd 修改转盘 2024-12-06 11:28:33 +08:00
GaoHao e1eff87490 提现/我的页面修改 2024-12-06 11:11:29 +08:00
YeMingfei666 fb9733d9eb Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/video_app into ymf 2024-12-05 17:22:38 +08:00
YeMingfei666 bf17bb3a5d 抽奖增加领取 2024-12-05 17:22:18 +08:00
GaoHao 400126ffeb 余额相关更新 2024-12-05 17:21:14 +08:00
GaoHao 30ceee0f2b 任务中心更新 2024-12-05 15:46:54 +08:00
GaoHao c7df084278 任务中心添加 2024-12-05 14:38:36 +08:00
YeMingfei666 9156891770 代码合并 2024-12-05 14:18:50 +08:00
YeMingfei666 f15ed3a330 增加我的奖品页面,兑换页面 2024-12-05 14:13:01 +08:00
GaoHao 3bcc491fc2 解锁视频修改更新 2024-12-05 10:25:34 +08:00
YeMingfei666 fb8c9f8431 修改域名配置等文件 2024-12-03 14:39:59 +08:00
576 changed files with 80418 additions and 8450 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/unpackage/
/test/

29
.hbuilderx/launch.json Normal file
View File

@ -0,0 +1,29 @@
{
"version" : "1.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"h5" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"provider" : "aliyun",
"type" : "uniCloud"
},
{
"playground" : "custom",
"type" : "uni-app:app-android"
},
{
"playground" : "standard",
"type" : "uni-app:app-ios"
}
]
}

120
App.vue
View File

@ -1,4 +1,6 @@
<script>
import config from '@/common/config.js'
import store from './store/index.js'
export default {
onLaunch: function() {
let that = this
@ -277,27 +279,29 @@
setInterval(d => { //
let userId = uni.getStorageSync('userId')
if (userId) {
this.$Request.getT('/app/message/selectMessageCount').then(res => {
if (res.code === 0) {
let num = res.data
uni.setStorageSync('numCount', num)
if (num == 0) {
uni.removeTabBarBadge({
index: 3
})
} else {
uni.setTabBarBadge({
index: 3,
text: num + ''
})
}
}
});
}
}, 3000);
// setInterval(d => { //
// let userId = uni.getStorageSync('userId')
// if (userId) {
// this.$Request.getT('/app/message/selectMessageCount').then(res => {
// if (res.code === 0) {
// let num = res.data
// uni.setStorageSync('numCount', num)
// if (num == 0) {
// uni.removeTabBarBadge({
// index: 3
// })
// } else {
// uni.setTabBarBadge({
// index: 3,
// text: num + ''
// })
// }
// }
// });
// }
// }, 3000);
//#ifdef H5
this.$u.get('/app/common/type/108').then(res => { //// 108
@ -366,12 +370,13 @@
}
});
} else {
//
//
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
//
that.$Request.getT('/app/user/selectNewApp').then(res => {
res = res.data[0];
if (res.wgtUrl && widgetInfo.version < res.version) {
if (widgetInfo.version < res.version) {
let downloadLink = '';
let androidLink = res.androidWgtUrl;
let iosLink = res.iosWgtUrl;
@ -455,20 +460,30 @@
}
} else {
//线
if (res.method == 'true') {
if (res.method == "true") {
uni.showModal({
showCancel: false,
confirmText: '立即更新',
title: '发现新版本',
confirmText: '立即更新',
content: res.des,
success: res => {
if (res.confirm) {
that.$queue.showLoading('下载中...');
plus.runtime.openURL(config.APIHOST2 +
'/pages/login/appEq')
return
uni.showLoading({
title: '下载中...',
mask: true
});
if (uni.getSystemInfoSync().platform ==
'android') {
uni.downloadFile({
url: androidLink,
success: downloadResult => {
console.log(
downloadResult
)
if (downloadResult
.statusCode ===
200) {
@ -487,12 +502,25 @@
.restart();
},
e => {
console
.log(
e
)
console
.error(
'install fail...'
);
}
);
// plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => {
// entry.getParent(_oldFile=>{
// entry.moveTo(_oldFile,'.apk',newFilePath=>{
// console.log('newFilePath',newFilePath.fullPath)
// })
// })
// })
}
}
});
@ -515,7 +543,13 @@
content: res.des,
success: res => {
if (res.confirm) {
that.$queue.showLoading('下载中...');
plus.runtime.openURL(config.APIHOST2 +
'/pages/login/appEq')
return
uni.showLoading({
title: '下载中...',
mask: true
});
if (uni.getSystemInfoSync().platform ==
'android') {
uni.downloadFile({
@ -539,12 +573,41 @@
.restart();
},
e => {
console
.log(
e
)
console
.error(
'install fail...'
);
}
);
// plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => {
// entry.getParent(_oldFile=>{
// entry.moveTo(_oldFile,'.apk',newFilePath=>{
// console.log('newFilePath',newFilePath.fullPath)
// plus.runtime
// .install(newFilePath.fullPath, { force: false },
// d => {
// console
// .log(
// 'install success...'
// );
// plus.runtime
// .restart();
// },
// e => {
// console.log(e)
// console
// .error(
// 'install fail...'
// );
// }
// );
// })
// })
// })
}
}
});
@ -798,4 +861,7 @@
@import "uview-ui/index.scss";
@import 'components/colorui/main.css';
@import 'components/colorui/icon.css';
@import '@/common/style/common.scss';
@import './tuniao-ui/index.scss';
@import './tuniao-ui/iconfont.css';
</style>

View File

@ -1,27 +1,15 @@
const ROOTPATH1 = "https://duanju.xianmxkj.com/sqx_fast"; //
const ROOTPATH = "https://duanju.xianmxkj.com/sqx_fast"; //后台服务域名
const ROOTPATH2 = "https://duanju.xianmxkj.com"; //后台服务域名
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = location.origin + "/sqx_fast"; //
// const ROOTPATH = location.origin + "/sqx_fast"; //后台服务域名
// const ROOTPATH2 = location.origin; //后台服务域名
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://duanju12.xianmxkj.com/sqx_fast"; //
// const ROOTPATH = "https://duanju12.xianmxkj.com/sqx_fast"; //后台服务域名
// const ROOTPATH2 = "https://duanju12.xianmxkj.com"; //后台服务域名
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
// const ROOTPATH2 = "http://192.168.1.5:8100"; //后台服务域名
// const ROOTPATH1 = "https://wap.xingqiu1985.com/sqx_fast"; //
// const ROOTPATH = "https://wap.xingqiu1985.com/sqx_fast"; //后台服务域名
// const ROOTPATH2 = "https://wap.xingqiu1985.com"; //后台服务域名
// const ROOTPATH1 = "https://jc.118zp.com/sqx_fast"; //
// const ROOTPATH = "https://jc.118zp.com/sqx_fast"; //后台服务域名
// const ROOTPATH2 = "https://jc.118zp.com"; //后台服务域名
// const ROOTPATH1 = "http://192.168.0.132:8100/sqx_fast"; //后台服务域名
// const ROOTPATH = "http://192.168.0.132:8100/sqx_fast"; //后台服务域名
// const ROOTPATH2 = "http://192.168.0.132:8100"; //后台服务域名
module.exports = {
APIHOST: ROOTPATH,
APIHOST1: ROOTPATH1,

8
common/config/config.js Normal file
View File

@ -0,0 +1,8 @@
export default {
baseUrl: 'http://127.0.0.1/',
baseApi: 'http://127.0.0.1:7001/',
color:{
main:'#FFC428',
red:'#fa3534'
}
}

View File

@ -51,10 +51,13 @@ const install = (Vue, vm) => {
let userMoney = (params = {}) => vm.$u.get('app/invite/selectUserMoney', params); //查看钱包
let cashMoney = (params = {}) => vm.$u.get('app/cash/cashMoney', params); //申请提现
let withdraw = (params = {}) => vm.$u.get('app/cash/withdraw', params); //申请提现
let selectPay = (params = {}) => vm.$u.get('app/cash/selectPayDetails', params); //提现记录
let moneyDet = (params = {}) => vm.$u.get('app/cash/queryUserMoneyDetails', params); //钱包明细
let type = (params = {}) => vm.$u.get('app/common/type', params); //钱包明细
let myPurseDet = (params = {}) => vm.$u.get('app/moneyDetails/queryUserMoneyDetails', params); //我的钱包
let myPurse = (params = {}) => vm.$u.get('app/moneyDetails/selectUserMoney', params); //钱包明细
let help = (params = {}) => vm.$u.get('app/helpWord/selectHelpList', params); //帮助中心
let helpDet = (params = {}) => vm.$u.get('app/helpWord/selectHelpWordDetails', params); //帮助中心 详情
@ -105,10 +108,14 @@ const install = (Vue, vm) => {
moneyList,
userMoney,
cashMoney,
withdraw,
selectPay,
moneyDet,
type,
myPurseDet,
myPurse,
help,
helpDet,
selectCourseDetailsById

View File

@ -26,6 +26,17 @@ module.exports = {
},
logout: function() {
let that = this;
// 获取当前页面实例
const pages = getCurrentPages();
// 获取当前页面的实例
const currentPage = pages[pages.length - 1];
// 获取页面路径
const pagePath = currentPage.route
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
if ( pagePath == "pages/task/index") {
return;
}
uni.removeStorageSync("token")
uni.removeStorageSync("userId")
uni.removeStorageSync("phone")
@ -41,7 +52,9 @@ module.exports = {
title: '用户信息失效,请重新登录!',
icon: 'none'
})
uni.navigateTo({
url: "/pages/login/login"
})
},
post: function(url, data, header) {
let that = this;

View File

@ -18,11 +18,11 @@ module.exports = {
},
//全局域名 部分html中需要单独替换 需要修改config中的网络请求域名
publicYuMing() {
return 'https://duanju.xianmxkj.com'
return 'https://dj-api.hnsiyao.cn'
},
//全局域名 部分html中需要单独替换 需要修改config中的网络请求域名
publicYuMingAll() {
return 'https://duanju.xianmxkj.com/sqx_fast'
return 'https://dj-api.hnsiyao.cn/sqx_fast/'
},
minMoney() {
return uni.getStorageSync("minMoney") ? uni.getStorageSync("minMoney") : '0.3'

409
common/style/common.scss Normal file
View File

@ -0,0 +1,409 @@
.u-relative,
.u-rela {
position: relative;
}
.u-absolute,
.u-abso {
position: absolute;
}
.u-fixed,.u-fix{
position: fixed;
}
.left-top{
left: 0;
top: 0;
}
.u-overflow-hide{
overflow: hidden;
}
// nvue不能用标签命名样式不能放在微信组件中否则微信开发工具会报警告无法使用标签名当做选择器
/* #ifndef APP-NVUE */
image {
display: inline-block;
}
// 在weex也即nvue中所有元素默认为border-box
view,
text {
box-sizing: border-box;
}
/* #endif */
.u-font-xs {
font-size: 22rpx;
}
.u-font-sm {
font-size: 26rpx;
}
.u-font-md {
font-size: 28rpx;
}
.u-font-lg {
font-size: 30rpx;
}
.u-font-xl {
font-size: 34rpx;
}
.u-flex {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
}
.u-flex-wrap {
flex-wrap: wrap;
}
.u-flex-nowrap {
flex-wrap: nowrap;
}
.u-col-center {
align-items: center;
}
.u-col-top {
align-items: flex-start;
}
.u-col-bottom {
align-items: flex-end;
}
.u-row-center {
justify-content: center;
}
.u-row-left {
justify-content: flex-start;
}
.u-row-right {
justify-content: flex-end;
}
.u-row-between {
justify-content: space-between;
}
.u-row-around {
justify-content: space-around;
}
.u-text-left {
text-align: left;
}
.u-text-center {
text-align: center;
}
.u-text-right {
text-align: right;
}
.u-flex-col {
/* #ifndef APP-NVUE */
display: flex!important;
/* #endif */
flex-direction: column!important;
}
// 定义flex等分
@for $i from 0 through 12 {
.u-flex-#{$i} {
flex: $i;
}
}
// 定义字体(px)单位小于20都为px单位字体
@for $i from 9 to 20 {
.u-font-#{$i} {
font-size: $i + px;
}
}
// 定义字体(rpx)单位大于或等于20的都为rpx单位字体
@for $i from 20 through 40 {
.u-font-#{$i} {
font-size: $i + rpx;
}
}
// 定义内外边距历遍1-80
@for $i from 0 through 80 {
// 只要双数和能被5除尽的数
@if $i % 2 == 0 or $i % 5 == 0 {
// 得出u-margin-30或者u-m-30
.u-margin-#{$i}, .u-m-#{$i} {
margin: $i + rpx!important;
}
// 得出u-padding-30或者u-p-30
.u-padding-#{$i}, .u-p-#{$i} {
padding: $i + rpx!important;
}
@each $short, $long in l left, t top, r right, b bottom {
// 缩写版结果如 u-m-l-30
// 定义外边距
.u-m-#{$short}-#{$i} {
margin-#{$long}: $i + rpx!important;
}
// 定义内边距
.u-p-#{$short}-#{$i} {
padding-#{$long}: $i + rpx!important;
}
// 完整版结果如u-margin-left-30
// 定义外边距
.u-margin-#{$long}-#{$i} {
margin-#{$long}: $i + rpx!important;
}
// 定义内边距
.u-padding-#{$long}-#{$i} {
padding-#{$long}: $i + rpx!important;
}
}
}
}
// 重置nvue的默认关于flex的样式
.u-reset-nvue {
flex-direction: row;
align-items: center;
}
/* start--文本行数限制--start */
.u-line-1 {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.u-line-2 {
-webkit-line-clamp: 2;
}
.u-line-3 {
-webkit-line-clamp: 3;
}
.u-line-4 {
-webkit-line-clamp: 4;
}
.u-line-5 {
-webkit-line-clamp: 5;
}
.u-line-2, .u-line-3, .u-line-4, .u-line-5 {
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box; // 弹性伸缩盒
-webkit-box-orient: vertical; // 设置伸缩盒子元素排列方式
}
/* end--文本行数限制--end */
/* start--不同颜色文字--start */
.color-333{
color: #333;
}
.color-666{
color: #666;
}
.color-999{
color: #999;
}
.color-red{
color: $my-red-color;
}
.color-main{
color:$my-main-color
}
/* end--不同颜色文字--end */
.tranistion{
transition: all .3s ease-in-out;
}
.tranistion-1{
transition: all .1s ease-in-out;
}
.tranistion-2{
transition: all .2s ease-in-out;
}
.font-bold{
font-weight: 700;
}
/* start--不同颜色背景--start */
.my-bg-main{
background-color:$my-main-color
}
/* end--不同颜色背景--end */
.safe-page{
padding-bottom: 60rpx!important;
}
::v-deep .uni-switch-input.uni-switch-input-checked{
border-color: $my-main-color;
background-color: $my-main-color;
}
.btn-circle{
border-radius: 200px;
}
.min-page{
/* #ifdef H5 */
min-height: calc(100vh - 44px);
/* #endif */
/* #ifndef H5 */
min-height: 100vh;
/* #endif */
}
.w-full{
width: 100%;
}
.gap-20{
gap: 20rpx;
}
.color-000{
color: #000;
}
.color-fff{
color: #fff;
}
.bg-fff{
background-color: #fff;
}
.bg-gray{
background-color: #F9F9F9;
}
.overflow-hide{
/* #ifdef H5 */
height: calc(100vh - 44px);
/* #endif */
/* #ifndef H5 */
height: 100vh;
/* #endif */
overflow: hidden;
}
.no-wrap{
white-space: nowrap;
}
.border-r-12{
border-radius: 12rpx;
}
.border-r-18{
border-radius: 18rpx;
}
.border-top{
border-top: 1px solid #E5E5E5;
}
.border-bottom{
border-bottom: 1px solid #E5E5E5;
}
.scale7{
transform: scale(0.7);
}
.page-gray {
min-height: calc(100vh);
/* #ifdef H5 */
min-height: calc(100vh - var(--window-top));
/* #endif */
display: flex;
flex-direction: column;
background: #F9F9F9;
}
.box-shadow{
box-shadow: 0 0 5px #eee;
}
.safe-bottom{
padding-bottom: env(safe-area-inset-bottom);
/* #ifdef H5 */
padding-bottom: 28rpx;
/* #endif */
}
.position-all{
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.fixed-top{
position: fixed;
/* #ifdef H5 */
top: 44px;
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
left: 0;
right: 0;
}
.lh30 {
line-height: 30px;
}
.default-box-padding{
padding: 32rpx 24rpx;
}
.icon-arrow-down-fill {
width: 16rpx;
height: 10rpx;
}
.zIndex-999{
z-index: 999;
}
.icon-default-size{
width: 28rpx;
height: 28rpx;
}
::v-deep.uni-easyinput__placeholder-class{
font-size: 28rpx!important;
}
.filter-gray{
filter: grayscale(1);
}
// .u-font-20{
// font-size: 10px;
// }
// .u-font-24{
// font-size: 12px;
// }
// .u-font-28{
// font-size: 14px;
// }
// .u-font-32{
// font-size: 16px;
// }
.line-th{
text-decoration: line-through;
}
//覆盖u-view-plus 颜色
.u-primary-light {
color: $my-main-color;
}
::v-deep .u-border{
border-width: 1px!important;
}
::v-deep .u-m-t-16 .u-textarea{
border-width: 1px!important;
}

42
components/my-empty.vue Normal file
View File

@ -0,0 +1,42 @@
<template>
<view class="u-flex u-row-center ">
<view class="color-999 my-empty u-relative">{{text}}</view>
</view>
</template>
<script>
export default{
props:{
text:{
type:String,
default:'空空如也~'
}
},
data(){
return {
}
}
}
</script>
<style lang="scss" scoped>
.my-empty{
&:before,&::after{
content: '';
display: block;
position: absolute;
border-bottom: 1px solid #999;
top: 50%;
transform: translateY(-50%);
}
&:before{
left: -80rpx;
width: 60rpx;
}
&::after{
width: 60rpx;
right: -80rpx;
}
}
</style>

458
components/other-xuafu.vue Normal file
View File

@ -0,0 +1,458 @@
<template>
<button @click="navThanks" v-if="show">
<view class="dong">
<view class="monster">
<view class="monster__face">
<view class="monster__eye avatar-eye avatar-eye--green eye--left">
<view class="avatar-eye-pupil pupil--green"><span class="avatar-eye-pupil-blackThing"><span
class="avatar-eye-pupil-lightReflection"></span></span></view>
</view>
<view class="monster__eye avatar-eye avatar-eye--violet eye--right">
<view class="avatar-eye-pupil pupil--pink"><span class="avatar-eye-pupil-blackThing"><span
class="avatar-eye-pupil-lightReflection"></span></span></view>
</view>
<view class="monster__noses">
<view class="monster__nose"></view>
<view class="monster__nose"></view>
</view>
<view class="monster__mouth">
<view class="monster__top"></view>
<view class="monster__bottom"></view>
</view>
</view>
</view>
</view>
</button>
</template>
<script>
import {returnIsShenhe} from '@/utils/api.js'
import {isIos} from '@/utils/app.js'
export default {
name: "other-xuanu",
data() {
return {
show:false
};
},
methods:{
navThanks(){
uni.navigateTo({
url:'/other/index/index'
})
},
async init(){
const isShehe=await returnIsShenhe()
this.show=isShehe
}
},
mounted() {
// #ifdef APP
if(isIos()){
// this.init()
}
// #endif
}
}
</script>
<style scoped>
/* 大嘴鸟*/
.dong {
z-index: 9999;
position: fixed;
bottom: 0;
right: -80px;
transform: scale(0.24);
-webkit-transform: scale(0.24);
-moz-transform: scale(0.24);
}
.monster {
transform: rotate(-50deg);
-ms-transform: rotate(-50deg);
/* IE 9 */
-moz-transform: rotate(-50deg);
/* Firefox */
-webkit-transform: rotate(-50deg);
/* Safari 和 Chrome */
-o-transform: rotate(-50deg);
/* Opera */
display: flex;
justify-content: center;
position: relative;
width: 170px;
height: 400px;
border-top-left-radius: 200px;
border-top-right-radius: 200px;
background-color: rgb(255, 117, 129);
box-shadow: 20px 20px 60px rgba(255, 117, 129,.7);
}
.monster__face {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: absolute;
top: 14%;
width: 75%;
height: 160px;
}
.monster__noses {
top: 50%;
display: flex;
justify-content: space-between;
width: 28%;
height: auto;
margin-bottom: 10px;
}
.monster__nose {
width: 8px;
height: 12px;
border-radius: 20px;
background: rgba(0, 0, 0, 0.5);
box-shadow: 4px 8px 5px rgba(0, 0, 0, 0.1);
}
.monster__mouth {
display: flex;
justify-content: center;
align-items: center;
position: relative;
width: 100%;
height: 0%;
overflow: hidden;
border: 25px solid #FFC333;
border-radius: 100px;
background-color: #810332;
animation: mouth 1.75s infinite;
box-shadow: 4px 8px 5px rgba(0, 0, 0, 0.2);
box-sizing: border-box;
}
.monster__mouth::before {
content: '';
position: absolute;
width: 150px;
height: 80px;
border-radius: 100px;
background-color: #400018;
}
.monster__mouth::after {
content: '';
position: absolute;
bottom: -80px;
width: 160px;
height: 80px;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
background-color: #DC1B50;
animation: tongue 1.75s infinite;
}
.monster__top {
position: absolute;
top: -30px;
width: 170px;
height: 30px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
background-color: #ffffff;
z-index: 100;
animation: t 1.75s infinite;
}
.monster__bottom {
position: absolute;
bottom: 0;
width: 100px;
height: 30px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background-color: #ffffff;
z-index: 100;
animation: b 1.75s infinite;
}
.avatar-eye {
position: absolute;
top: -10%;
width: 65px;
height: 65px;
background: linear-gradient(105deg, white, #cb87f4);
border-radius: 100%;
box-shadow: 4px 8px 5px rgba(0, 0, 0, 0.2);
margin: 3px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
.avatar-eye--green {
background: linear-gradient(to bottom, #fdfdfd, #c3efea);
}
.avatar-eye--violet {
background: linear-gradient(to bottom, #fdfdfd, #e6d6f6);
}
.eye--left {
left: 10%;
}
.eye--right {
left: 85%;
}
.eye--center {
left: 45%;
top: 10%;
}
.avatar-eye-pupil {
position: absolute;
width: 55%;
height: 55%;
left: 50%;
top: 25%;
-webkit-transform: translate(-50%);
transform: translate(-50%);
z-index: 100;
border-radius: 100%;
}
.pupil--green {
background: linear-gradient(135deg, rgba(188, 248, 177, 0.7), #2fa38c 75%);
}
.pupil--pink {
background: linear-gradient(135deg, #f1a183, #8535cd);
}
.avatar-eye-pupil-blackThing {
position: absolute;
width: 55%;
height: 55%;
left: 50%;
top: 25%;
background: #2c2f32;
-webkit-transform: translate(-50%);
transform: translate(-50%);
border-radius: 100%;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
.avatar-eye-pupil-lightReflection {
position: absolute;
width: 7px;
height: 7px;
left: 25%;
top: 10%;
background: #ebebeb;
-webkit-transform: translate(-50%);
transform: translate(-50%);
border-radius: 100%;
box-shadow: 10px 10px 10px rgba(255, 255, 255, 0.2);
}
/*大嘴动起来*/
@keyframes t {
0%,
10%,
80%,
100% {
top: -30px;
}
20% {
top: 0px;
}
30% {
top: -20px;
}
40% {
top: -0px;
}
50% {
top: -25px;
}
70% {
top: 0px;
}
}
@keyframes b {
0%,
10%,
80%,
100% {
bottom: -30px;
}
20% {
bottom: 0px;
}
30% {
bottom: -20px;
}
40% {
bottom: -0px;
}
50% {
bottom: -25px;
}
70% {
bottom: 0px;
}
}
@keyframes mouth {
0%,
10%,
100% {
width: 100%;
height: 0%;
}
15% {
width: 90%;
height: 30%;
}
20% {
width: 50%;
height: 70%;
}
25% {
width: 70%;
height: 70%;
}
30% {
width: 80%;
height: 60%;
}
35% {
width: 60%;
height: 70%;
}
40% {
width: 55%;
height: 75%;
}
45% {
width: 50%;
height: 90%;
}
50% {
width: 40%;
height: 70%;
}
55% {
width: 70%;
height: 95%;
}
60% {
width: 40%;
height: 50%;
}
65% {
width: 100%;
height: 60%;
}
70% {
width: 100%;
height: 70%;
}
75% {
width: 90%;
height: 70%;
}
80% {
width: 50%;
height: 70%;
}
85% {
width: 90%;
height: 50%;
}
85% {
width: 40%;
height: 70%;
}
90% {
width: 90%;
height: 30%;
}
95% {
width: 100%;
height: 10%;
}
}
@keyframes tongue {
0%,
20%,
100% {
bottom: -80px;
}
30%,
90% {
bottom: -40px;
}
40% {
bottom: -45px;
}
50% {
bottom: -50px;
}
70% {
bottom: -80px;
}
90% {
bottom: -40px;
}
}
</style>

View File

@ -3,45 +3,45 @@
<u-popup v-model="shows" @close="close" :mask-close-able="false" :safe-area-inset-bottom="true" mode="bottom"
border-radius="32" closeable>
<view class="title">购买后继续观看</view>
<view class="money">
<!-- <view class="money">
<view class="money-l flex align-center">
账号余额:
<text>{{moneyNum}}</text>
<text>{{moneyNum}}</text>
<view class="money-l-go" @click="goWallet('/me/wallet/wallet')">
查看明细
</view>
</view>
<view class="money-r">
解锁价格:
<text>{{payPrice}}</text>
<text>{{payPrice}}</text>
</view>
</view>
<scroll-view scroll-y="true" class="payLists">
</view> -->
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="payList">
<view class="payList-item" @click="current = index" :class="current == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
v-for="(item,index) in wallet" :key="index"> -->
<!-- #ifdef MP-TOUTIAO -->
<view class="payList-item-price">
<!-- <view class="payList-item-price">
{{item.payDiamond}}钻石
</view>
</view> -->
<!-- #endif -->
<!-- #ifndef MP-TOUTIAO -->
<view class="payList-item-price">
<!-- <view class="payList-item-price">
¥{{item.price}}
</view>
</view> -->
<!-- #endif -->
<view class="payList-item-dou">
{{item.money}}
<!-- <view class="payList-item-dou">
{{item.money}}
</view>
<view class="payList-item-duo" v-if="item.giveMoney>0">
多送{{item.giveMoney}}
多送{{item.giveMoney}}
</view>
<view class="payList-item-hui" v-if="item.remarks">
{{item.remarks}}
</view>
</view>
</view>
</scroll-view>
</scroll-view> -->
<!-- 支付类型 -->
<view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -132,7 +132,11 @@
type: Boolean,
default: true
},
//
orderId: {
type: Number,
default: null
},
//
payPrice: {
type: Number,
default: 0
@ -176,55 +180,61 @@
// #endif
// #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
} else {
let checkIosPay = this.$queue.getData('checkIosPay');
if (checkIosPay === '是') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '苹果',
id: 3
}];
this.openWay = 3;
} else {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
}
];
this.openWay = 1;
let syPaySel = this.$queue.getData('syPaySel')
// if (syPaySel === '') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = this.$queue.getData('checkIosPay');
// if (checkIosPay === '') {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '',
// id: 3
// }];
// this.openWay = 3;
// } else {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}
];
this.openWay = 1;
let syPaySel = this.$queue.getData('syPaySel')
// if (syPaySel === '') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
// }
}
// #endif
@ -240,31 +250,31 @@
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}];
this.openWay = 2;
} else {
// if (ua.indexOf('micromessenger') !== -1) {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '',
// id: 2
// }];
// this.openWay = 2;
// } else {
this.openLists = [{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 1;
}
// }
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
// if (syPaySel === '') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
// #endif
},
methods: {
@ -562,28 +572,36 @@
// #endif
} else if (this.openWay == 1) {
console.log(this.orderId)
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
console.log('paypop payType='+paytype);
// APP
// #ifdef APP
this.$Request.postT("/app/aliPay/payMoney", {
classify: 1,
payClassifyId: this.wallet[this.current].payClassifyId,
}).then(ret => {
this.$Request.getT("/app/wuyou/payOrder/"+ this.orderId+'?payType='+paytype,{}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
// this.isCheckPay(ret.code, 'alipay', ret.data);
that.$emit('paySuccess', ret.data)
});
// #endif
// #ifdef H5
let data = {
classify: 2,
payClassifyId: this.wallet[this.current].payClassifyId,
orderId: this.orderId,
}
this.$Request.postT('/app/aliPay/payMoney', data).then(
this.$Request.getT("/app/wuyou/payOrder/"+ this.orderId+'?payType='+paytype, {}).then(
res => {
if (res.code === 0) {
const div = document.createElement('div')
div.innerHTML = res.data //form
document.body.appendChild(div)
document.forms[0].submit()
console.log(res)
that.$emit('paySuccess', {
ordersId: this.orderId,
h5Url: res.data.h5Url
})
// const div = document.createElement('div')
// div.innerHTML = res.data //form
// document.body.appendChild(div)
// document.forms[0].submit()
} else {
uni.showToast({
icon: 'none',
@ -601,7 +619,7 @@
this.$Request.postT("/app/ios/insertPayMoneyOrders", data).then(res => {
if (res.code === 0) {
this.iosPayId = res.data.orderId;
this.iphonepay();
// this.iphonepay();
} else {
uni.showToast({
icon: 'none',

View File

@ -0,0 +1,742 @@
<template>
<view>
<u-popup v-model="show">
<view class="almost-lottery">
<!-- head -->
<view class="almost-lottery__head">
<view class="btn-group u-flex u-row-between">
<view :class="['action', isApple && 'action-shadow']" @click="toRed">
<text class="pack"></text>
<text class="content">红包<text class="num">{{ totalMoney }}</text></text>
</view>
<view :class="['action', isApple && 'action-shadow']" @click="toGift">
<text class="gift"></text>
<text class="content">我的奖品</text>
</view>
</view>
<!-- <view class="tip"><text class="tip-content">每次抽奖消耗 {{ goldNum }} 金币不限次数</text></view> -->
</view>
<!-- action -->
<!-- <view class="almost-lottery__action-dev" @tap="handleInitCanvas" v-if="isDev">
<text class="text">重新生成画板-开发模式使用</text>
</view>
<view class="almost-lottery__action-dev" @tap="handleCheckPopup">
<text class="text">查看 uni-popup 用例</text>
</view> -->
<!-- lottery -->
<view class="almost-lottery__wheel">
<almost-lottery :lottery-size="lotteryConfig.lotterySize" :action-size="lotteryConfig.actionSize"
:ring-count="2" :duration="1" :self-rotaty="false" :img-circled="true" :canvasCached="true"
:prize-list="prizeList" :prize-index="prizeIndex" :lotteryBg="lotteryBg" :actionBg="actionBg"
@reset-index="prizeIndex = -1" @draw-before="handleDrawBefore" @draw-start="handleDrawStart"
@draw-end="handleDrawEnd" @finish="handleDrawFinish" v-if="prizeList.length" />
<view class="almost-lottery__count">
<text class="text">剩余免费抽奖 {{ freeNum }} </text>
</view>
</view>
<!-- rule -->
<view class="almost-lottery__rule">
<view class="rule-head">
<view class="line"></view>
<text class="title">活动规则</text>
<view class="line"></view>
</view>
<view class="rule-body">
<view class="item">
<view class="number">1</view>
<view class="text">
<text>抽奖细则</text>
<text>每人每天最多拥有{{ freeNumDay }}次抽奖机会</text>
</view>
</view>
<view class="item item-rule">
<view class="number">2</view>
<view class="text">
<text>奖励说明</text>
<text>a.现金奖系统会即时转入红包余额可提现</text>
<!-- <text>b.金币奖系统会即时转入金币账户可在平台内使用</text> -->
<text>b.实物奖中奖后需联系客服领取</text>
</view>
</view>
<!-- <template >
<view class="item">
<view class="number">3</view>
<view class="text">本次活动由XXXXXXX发起</view>
</view>
<view class="item">
<view class="number">4</view>
<view class="text">本活动仅限17岁以上用户参加</view>
</view>
<view class="item">
<view class="number">5</view>
<view class="text">本活动最终解释权归XXXXXXX所有</view>
</view>
</template> -->
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import AlmostLottery from '@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue'
import {
clearCacheFile,
clearStore
} from '@/uni_modules/almost-lottery/utils/almost-utils.js'
export default {
name: 'Home',
components: {
AlmostLottery
},
data() {
return {
show:true,
//
totalMoney: 0,
//
result: '',
//
isDev: true,
option: {},
//
lotteryConfig: {
// rpx
lotterySize: 600,
// rpx
actionSize: 200
},
// UI
// 稿
lotteryBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__bg2x.png'),
//
actionBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__action2x.png'),
//
//
prizeList: [],
//
onStock: true,
//
prizeIndex: -1,
//
prizeing: false,
//
//
onFrontend: false,
//
prizeWeightMax: 0,
//
prizeWeightArr: [],
//
//
goldCoin: 20,
//
freeNum: 1,
//
goldNum: 20,
//
freeNumDay: 10
}
},
computed: {
isApple() {
return uni.getSystemInfoSync().platform === 'ios'
}
},
methods: {
toRed() {
uni.navigateTo({
url: '/me/HEWZtgyqRH/HEWZtgyqRH'
})
},
toGift() {
console.log('1');
uni.navigateTo({
url: '/me/giftczgw/giftczgw'
})
},
//
handleInitCanvas() {
clearCacheFile()
clearStore()
this.prizeList = []
this.getPrizeList()
},
// popup
handleCheckPopup() {
uni.navigateTo({
url: '/pages/popup/popup'
})
},
//
async getPrizeList() {
uni.showLoading({
title: '奖品准备中...'
})
//
let res = await this.requestApiGetPrizeList()
console.log('获取奖品列表', res)
if (res.ok) {
let data = res.data
if (data.length) {
this.prizeList = data
console.log('已获取到奖品列表数据,开始绘制抽奖转盘')
//
if (console.time) {
console.time('绘制转盘用时')
}
//
//
if (this.onFrontend) {
//
this.prizeWeightArr = this.prizeList.map(item => item.prizeWeight)
let prizeWeightArrSort = [...this.prizeWeightArr]
prizeWeightArrSort.sort((a, b) => b - a)
//
this.prizeWeightMax = this.prizeWeightMax > 0 ? this.prizeWeightMax : prizeWeightArrSort[0]
}
}
} else {
uni.hideLoading()
uni.showToast({
title: '获取奖品失败',
mask: true,
icon: 'none'
})
}
},
//
// Promise
//
async requestApiGetPrizeList() {
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning')
if (res.code == 0) {
return {
ok: true,
data: res.data.records.map(v => {
return {
...v,
prizeId: v.id,
prizeName: v.name,
prizeStock: 10,
prizeWeight: 200,
prizeImage: v.url,
// prizeImage: require('@/static/git.png')
}
})
}
}
return
return new Promise((resolve, reject) => {
let requestTimer = setTimeout(() => {
clearTimeout(requestTimer)
requestTimer = null
// prizeStock
// prizeWeight
resolve({
ok: true,
data: [{
prizeId: 1,
prizeName: '0.1元现金',
prizeStock: 10,
prizeWeight: 200,
prizeImage: require('@/static/git.png')
},
{
prizeId: 2,
prizeName: '10元现金',
prizeStock: 0,
prizeWeight: 50,
prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
},
{
prizeId: 3,
prizeName: '5元话费',
prizeStock: 1,
prizeWeight: 80
},
{
prizeId: 4,
prizeName: '50元现金',
prizeStock: 0,
prizeWeight: 10,
prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB2klEQVRIia3Wv09TURjG8U+u2kQZcNENh2ok0cnJ0R+L0RB2g/EvwITEwRgnV0Zx0fAHYBh0khBD4sBAmAgDiwQNg4qwmSBDAYf7Fi+n97al9UlObnvO836f3tO355b2GsAYZrCBPRzGdSPmx8J3YtXwDDsB7TR2wl/rNmAYK13C07ES9W11E9s9BjTHdnBKVf8PAcWgehpwCssF0w/5FzqLgw7AA7zDQ/wqzC8H90jjSeFMYW0Yr8PzALfjOh7z1wve2YTzpLlQw2ay+KZ1N7vS24SziVqGexhKzB07pEJXk/dDwTetdZ9HewwZLWFNw2oyudZjQFNrCW8109pqS32GpPX1TOu586fPkLR+IEMjmbzYZ0ha34Atx/fwW58hXxPeFixo7Yg7PQbcKmEtZFgsMb/C4AkDBuUnQKpFuFZI3cZuvP6C+8g6wDP572O95C4Og49/W/YJl/G5YPqO9yV3dh4f8LMCfhjcI93Afix8xAX5SVx2YBY10yagEdxjmiwY7uISXuIFrlSEPG0TMllWcAbzYViXd0rzeXC6ImSiImA+eKU6h7mCeV/eCBMnCJkLzpHSztnFCJ7L//ZkOFv1iRLtRd1IcLpSHVP4jccVnkexPqXkmd7UX15b7tiz29ReAAAAAElFTkSuQmCC'
},
{
prizeId: 5,
prizeName: '1卷抽纸',
prizeStock: 3,
prizeWeight: 3000,
prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAABCElEQVRoge3YMa4BURSH8Y8o7UAp0WgkotBZwluAfhqlZSgUGr23ENUUCpppJnTswAIUSCaTiziZJ8d9/193zdzrfMltABF5plb+oLscDoAV0Pn8OC/lwDhL0k35QT3wstcIuM61Cj0IhXiNuAvOFwr5SgrxRiHeKMSbhnHfAVgU1i1gajhnBpwK6wnQtgxkDTlmSTq/L7rLYQ9byG+WpLvCOT8YQ6K5WgrxRiHeKMQbhXijEG8U4o1CvIkmxPrDquwMrI37KlFJSJake2BUxVlW0VytaEKsV6t5+8Ohak3rRmtIH9hav/QvRHO1FOKNQrwJheQfn+I9wflCIeNHLzuQc51PRP6rC1ZeIm1I8cC5AAAAAElFTkSuQmCC'
},
{
prizeId: 6,
prizeName: '0.2元现金',
prizeStock: 8,
prizeWeight: 120
},
{
prizeId: 7,
prizeName: '谢谢参与',
prizeStock: 100,
prizeWeight: 10000
},
{
prizeId: 8,
prizeName: '100金币',
prizeStock: 100,
prizeWeight: 3000
}
]
})
}, 200)
})
},
//
async handleDrawBefore(callback) {
console.log('抽奖开始之前')
let flag = false
//
if (this.freeNum > 0) {
this.freeNum--
flag = true
} else {
flag = false
uni.showToast({
title: '抽奖次数不足',
icon: 'none'
})
}
callback(flag)
},
//
handleDrawStart() {
console.log('触发抽奖按钮')
if (this.prizeing) return
this.prizeing = true
this.tryLotteryDraw()
},
//
tryLotteryDraw() {
console.log('旋转开始,获取中奖下标......')
//
if (this.onFrontend) {
this.localGetPrizeIndex()
} else {
this.remoteGetPrizeIndex()
}
},
//
localGetPrizeIndex() {
console.warn('###当前处于前端控制中奖概率,安全起见,强烈建议由后端控制###')
//
// prizeId
if (!this.prizeWeightMax || !this.prizeWeightArr.length) {
console.warn('###当前已开启前端控制中奖概率,但是奖品数据列表中的 prizeWeight 参数似乎配置不正确###')
return
}
console.log('当前权重最大值为 =>', this.prizeWeightMax)
// 使 Math.ceil 0
let randomWeight = Math.ceil(Math.random() * this.prizeWeightMax)
console.log('本次权重随机数 =>', randomWeight)
//
let tempMaxArrs = []
this.prizeList.forEach((item) => {
if (item.prizeWeight >= randomWeight) {
tempMaxArrs.push(item.prizeWeight)
}
})
console.log('tempMaxArrs', tempMaxArrs)
//
//
let tempMaxArrsLen = tempMaxArrs.length
if (tempMaxArrsLen) {
tempMaxArrs.sort((a, b) => a - b)
//
if (tempMaxArrsLen > 1) {
//
let sameCount = 0
for (let i = 0; i < tempMaxArrs.length; i++) {
if (tempMaxArrs[i] === tempMaxArrs[0]) {
sameCount++
}
}
// 1
if (sameCount === 1) {
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0])
} else {
//
let sameWeight = tempMaxArrs[0]
let sameWeightArr = []
let sameWeightItem = {}
this.prizeWeightArr.forEach((item, index) => {
if (item === sameWeight) {
sameWeightArr.push({
prizeWeight: item,
index
})
}
})
console.log('sameWeightArr', sameWeightArr)
sameWeightItem = sameWeightArr[Math.floor(Math.random() * sameWeightArr.length)]
console.log('sameWeightItem', sameWeightItem)
this.prizeIndex = sameWeightItem.index
}
} else {
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0])
}
}
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName)
//
if (this.onStock) {
console.log('本次奖品库存 =>', this.prizeList[this.prizeIndex].prizeStock)
}
},
//
//
async remoteGetPrizeIndex() {
this.result = ''
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###')
const res = await this.$Request.getT('app/discSpinning/draw', {
orderId: this.option.orderId || 2145
})
console.log(res);
if (res.code != 0) {
return uni.showToast({
title: res.msg
})
}
this.result = res.data
let list = [...this.prizeList]
// prizeId prizeId
const arr = list.filter(v => v.type == res.data.type)
let prizeId = arr[0].prizeId
// prizeId
for (let i = 0; i < list.length; i++) {
let item = list[i]
if (item.prizeId === prizeId) {
//
this.prizeIndex = i
break
}
}
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName)
},
//
handleDrawEnd() {
console.log('旋转结束,执行拿到结果后到逻辑')
//
// const prize = this.prizeList[this.prizeIndex]
const prize = this.result
let {
name
} = prize
let tipContent = ''
if (name.type == 1) {
tipContent = '很遗憾,没有中奖,请再接再厉!'
} else {
tipContent = `恭喜您,获得 ${name}${this.result.type==2?(this.result.number+'元'):''} `
}
const _this = this;
uni.showModal({
content: tipContent,
showCancel: false,
success() {
const {
orderId,
id
} = _this.result
_this.$Request.postJson('app/discSpinning/receive', _this.result).then(res => {
_this.result = ''
console.log(res)
if (res.code == 0) {
uni.showToast({
title: '领取成功',
icon: 'none'
})
_this.getRedPack()
} else {
uni.showToast({
title: '领取失败',
icon: 'none'
})
}
})
},
complete: () => {
this.prizeing = false
}
})
},
//
handleDrawFinish(res) {
console.log('抽奖转盘绘制完成', res)
if (res.ok) {
//
if (console.timeEnd) {
console.timeEnd('绘制转盘用时')
}
}
let stoTimer = setTimeout(() => {
stoTimer = null
uni.hideLoading()
// uni.showToast({
// title: res.msg,
// mask: true,
// icon: 'none'
// })
}, 50)
},
async getRedPack() {
const res = await this.$Request.getT('app/moneyDetails/selectUserMoney')
if (res.code == 0) {
this.totalMoney = res.data.amount
}
}
},
onLoad(opt) {
this.option = opt
this.prizeList = []
this.getRedPack()
this.getPrizeList()
},
onUnload() {
uni.hideLoading()
}
}
</script>
<style lang="scss" scoped>
.btn-group {
position: absolute;
left: 0;
right: 0;
z-index: 2;
top: 200px;
gap: 20rpx;
padding: 0 32rpx;
}
.almost-lottery {
flex: 1;
background-color: #FF893F;
}
.almost-lottery__head {
position: relative;
width: 100%;
height: 640rpx;
background: url('~static/images/lottery/top-bg.png') no-repeat center center/cover;
.action {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
height: 88rpx;
line-height: 88rpx;
margin: 0 auto;
color: #FFFFFF;
font-size: 32rpx;
background-color: rgba(255, 136, 61, 1);
border-radius: 44rpx;
}
.action-shadow {
box-shadow: 0px 14rpx 0px 0px rgba(235, 112, 36, 1);
}
.pack {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url("~static/red-pack.png");
}
.gift {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url("~static/gift.png");
}
.gold {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url("~static/images/lottery/gold.png");
@media (-webkit-min-device-pixel-ratio: 2),
(min-device-pixel-ratio: 2) {
background-image: url("~static/images/lottery/gold@2x.png");
}
@media (-webkit-min-device-pixel-ratio: 3),
(min-device-pixel-ratio: 3) {
background-image: url("~static/images/lottery/gold@3x.png");
}
}
.num {
color: #F9FC31;
}
.tip {
position: relative;
top: 428rpx;
color: #FFFFFF;
font-size: 24rpx;
text-align: center;
}
}
.almost-lottery__wheel {
text-align: center;
.almost-lottery__count {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 40rpx 0;
}
.text {
color: #FFFFFF;
font-size: 24rpx;
}
}
.almost-lottery__rule {
padding: 0 28rpx;
color: #FFF8CB;
.rule-head {
display: flex;
justify-content: space-around;
align-items: center;
margin: 40rpx 0;
.line {
flex: 1;
height: 1px;
background-color: #FFF3A5;
}
.title {
width: 280rpx;
color: #F63857;
line-height: 70rpx;
text-align: center;
margin: 0 20rpx;
border-radius: 8rpx;
background-image: linear-gradient(0deg, rgba(255, 242, 158, 1), rgba(255, 244, 168, 1));
}
}
.rule-body {
color: #FFF8CB;
font-size: 24rpx;
padding: 10rpx 0 40rpx;
.item {
display: flex;
margin-bottom: 10rpx;
}
.number {
position: relative;
top: 4rpx;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
color: #F63857;
background: #FFF8CB;
border-radius: 50%;
margin-right: 10rpx;
}
.text {
flex: 1;
}
.item-rule .text {
display: flex;
flex-direction: column;
}
}
}
.almost-lottery__action-dev {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 400rpx;
height: 80rpx;
border-radius: 10rpx;
text-align: center;
background-color: red;
margin: 0 auto 40rpx;
.text {
color: #FFFFFF;
font-size: 28rpx;
}
}
.almost-lottery__popup-wrap {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
.almost-lottery {
background: transparent;
}
}
</style>

View File

@ -0,0 +1,175 @@
<template>
<view>
<u-popup v-model="show" mode="center" @close="close">
<view class="bg">
<view class="title">恭喜您获得</view>
<view class="goods">
<template v-if="result&&result.type==3">
<view class="u-flex u-col-center u-row-center">
<image style="height: 42px;" src="/static/red-pack.png" mode="heightFix"></image>
</view>
<view class="u-flex u-row-center">
<view class="type">物品</view>
</view>
</template>
<template v-if="result&&result.type==2">
<view class="u-flex color-money u-col-center u-row-center">
<view class="money">{{result.number}}</view>
<view class="font-bold" style="margin-top: 20rpx;"></view>
</view>
<view class="u-flex u-row-center">
<view class="type">现金红包</view>
</view>
</template>
</view>
<view class="u-flex u-row-center btn-box">
<view class="btn" @click="lingqu">立即领取</view>
</view>
</view>
<view class="u-flex u-row-center">
<u-icon name="close-circle" :size="54" @click="close" color="#fff"></u-icon>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
result: ''
}
},
methods: {
open(data) {
console.log(data);
this.result = data
this.show = true
},
lingqu() {
const {
orderId,
id
} = this.result
this.$Request.postJson('app/discSpinning/receive', this.result).then(res => {
this.result = ''
console.log(res)
if (res.code == 0) {
uni.showToast({
title: '领取成功',
icon: 'none'
})
this.$emit('success')
this.close()
} else {
uni.showToast({
title: '领取失败',
icon: 'none'
})
}
})
},
close() {
this.show = false
if(!this.result){
return
}
const {
orderId,
id
} = this.result
this.$Request.postJson('app/discSpinning/receive', this.result).then(res => {
this.result = ''
console.log(res)
if (res.code == 0) {
this.$emit('success')
this.close()
} else {
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .u-mode-center-box {
background-color: transparent;
}
.color-money {
color: #E42F00;
}
.money {
font-weight: 700;
font-size: 72rpx;
letter-spacing: 2px;
}
.bg {
width: 628rpx;
height: 770rpx;
margin-right: 10rpx;
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-image: url("~static/images/zhuanpan/ling-qu.png");
position: relative;
@media (-webkit-min-device-pixel-ratio: 2),
(min-device-pixel-ratio: 2) {
background-image: url("~static/images/zhuanpan/ling-qu@2x.png");
}
.title {
position: absolute;
top: 238rpx;
text-align: center;
left: 0;
right: 0;
font-weight: 700;
font-size: 58rpx;
color: #AF6920;
letter-spacing: 4rpx;
}
.goods {
position: absolute;
top: 326rpx;
text-align: center;
left: 0;
right: 0;
text-align: center;
}
.type {
padding: 6rpx 28rpx;
border-radius: 100rpx;
background: #E25B41;
font-size: 28rpx;
color: #fff;
font-weight: bold;
}
.btn-box {
position: absolute;
top: 574rpx;
left: 0;
right: 0;
.btn {
padding: 10rpx 60rpx 10rpx 64rpx;
text-align: center;
font-weight: bold;
font-size: 44rpx;
color: #AF6920;
letter-spacing: 2px;
}
}
}
</style>

163
components/pop-ling-qu.vue Normal file
View File

@ -0,0 +1,163 @@
<template>
<view>
<u-popup v-model="show" mode="center" @close="close">
<view class="bg">
<view class="title">恭喜您获得</view>
<view class="goods">
<template v-if="result&&result.type==3">
<view class="u-flex u-col-center u-row-center">
<image style="height: 100px;" :src="result.img" mode="heightFix"></image>
</view>
<view class="u-flex u-row-center u-m-t-30">
<view class="type">{{result.name}}</view>
</view>
</template>
<template v-if="result&&result.type==2">
<view class="u-flex color-money u-col-center u-row-center">
<view class="money">{{result.number}}</view>
<view class="font-bold " style="margin-top: 20rpx;font-size: 36rpx;"></view>
</view>
<view class="u-flex u-m-t-24 u-row-center">
<view class="type">现金红包</view>
</view>
</template>
</view>
<view class="u-flex close u-row-center">
<u-icon name="close-circle" :size="54" @click="close" color="#fff"></u-icon>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
result: ''
}
},
methods: {
open(data) {
console.log(data);
this.result = data
this.show = true
},
close() {
console.log('抽奖弹窗关闭');
this.show = false
if(!this.result){
return
}
const {
orderId,
id
} = this.result
this.$Request.postJson('app/discSpinning/receive', this.result).then(res => {
this.result = ''
console.log(res)
if (res.code == 0) {
console.log('抽奖领取成功');
const key=res.data==0?'isBindAliPay':undefined
this.$emit('close',key)
if(key&&key=='isBindAliPay'){
uni.navigateTo({
url:'/me/yaoqing/zhifubao-tixain'
})
}
} else {
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .u-mode-center-box {
background-color: transparent;
}
.color-money {
color: #E42F00;
}
.money {
font-weight: 700;
font-size: 96rpx;
letter-spacing: 2px;
}
.bg {
width: 628rpx;
height: 770rpx;
margin-right: 10rpx;
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-image: url("~static/images/zhuanpan/gift.png");
position: relative;
@media (-webkit-min-device-pixel-ratio: 2),
(min-device-pixel-ratio: 2) {
background-image: url("~static/images/zhuanpan/gift@2x.png");
}
.title {
position: absolute;
top: 218rpx;
text-align: center;
left: 0;
right: 0;
font-weight: 700;
font-size: 60rpx;
color: #AF6920;
letter-spacing: 4rpx;
}
.goods {
position: absolute;
top: 336rpx;
text-align: center;
left: 0;
right: 0;
text-align: center;
}
.type {
padding: 6rpx 28rpx;
border-radius: 100rpx;
background: #E25B41;
font-size: 28rpx;
color: #fff;
font-weight: bold;
}
.close{
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.btn-box {
position: absolute;
top: 574rpx;
left: 0;
right: 0;
.btn {
padding: 10rpx 60rpx 10rpx 64rpx;
text-align: center;
font-weight: bold;
font-size: 44rpx;
color: #AF6920;
letter-spacing: 2px;
}
}
}
</style>

View File

@ -4,7 +4,7 @@
<view class="list-box">
<view class="list-box-title flex align-center justify-between">
<view class="list-box-title-name">
{{title}}
{{title||''}}
</view>
<view @click="clickItem('more')" class="list-box-title-more flex align-center">
查看更多

BIN
key/certificate.cer Normal file

Binary file not shown.

1
key/readme.md Normal file
View File

@ -0,0 +1 @@
vMLdZb1r

BIN
key/video.keystore Normal file

Binary file not shown.

View File

@ -0,0 +1,94 @@
<template>
<view class="demo-title">
<view>
<view v-if="type === 'first'" class="main_title">
<view v-if="leftIcon" class="main_title__icon main_title__icon--left" :class="[`tn-icon-${leftIcon}`]"></view>
<view class="main_title__content">{{ title }}</view>
<view v-if="rightIcon" class="main_title__icon main_title__icon--right" :class="[`tn-icon-${rightIcon}`]"></view>
</view>
<view v-if="type === 'second'" class="second_title">
<view class="second_title__content">{{ title }}</view>
</view>
</view>
<view class="content" :class="[{
'content--padding': contentPadding
}]">
<slot></slot>
</view>
</view>
</template>
<script>
export default {
name: 'demo-title',
options: {
// Vue(shadow)
virtualHost: true
},
props: {
//
type: {
type: String,
default: 'first'
},
//
title: {
type: String,
default: ''
},
//
leftIcon: {
type: String,
default: 'star'
},
//
rightIcon: {
type: String,
default: 'star'
},
//
contentPadding: {
type: Boolean,
default: true
}
}
}
</script>
<style lang="scss" scoped>
.main_title {
display: flex;
align-items: center;
justify-content: center;
margin-top: 50rpx;
font-size: 36rpx;
font-weight: bold;
&__content {
padding: 0 18rpx;
}
&__icon {
font-size: 34rpx;
}
}
.second_title {
margin: 24rpx 0;
margin-left: 30rpx;
&__content {
font-size: 32rpx;
font-weight: bold;
}
}
.content {
margin-top: 30rpx;
&--padding {
margin-left: 30rpx;
margin-right: 30rpx;
}
}
</style>

View File

@ -0,0 +1,689 @@
<template>
<view class="dynamic-demo">
<!-- 效果预览窗口 -->
<view v-if="!noDemo" class="demo-container" :class="{'demo-container--full': full}">
<view class="demo">
<slot></slot>
</view>
<!-- 提示信息 -->
<view v-if="haveTips">
<view class="demo__tips__icon" @click="demoTipsClick">
<view class="icon tn-icon-help"></view>
</view>
<view class="demo__tips__content"
:class="[showContentTips ? 'demo__tips__content--show' : 'demo__tips__content--hide']">
<view v-for="(item,index) in tipsData" :key="index" class="demo__tips__content--item">{{ item }}</view>
</view>
</view>
</view>
<!-- 模式切换 -->
<view v-if="multiMode" class="mode-switch">
<view class="mode-switch__container">
<view v-for="(item, index) in sectionModeListInfos" :key="index" class="mode-switch__item"
:class="[`mode-switch-item-${index}`,{'mode-switch__item--active': modeIndex === index}]"
@click="switchMode(index)">{{ item.name }}</view>
<!-- 滑块样式 -->
<view class="mode-switch__slider" :style="[modeSwitchSliderStyle]"></view>
</view>
</view>
<!-- 组件对应可选项容器 -->
<view class="section-container">
<scroll-view
class="section__scroll-view"
:class="{'section__scroll-view--auto': sectionScrollViewStyle.height === 'auto'}"
:style="[sectionScrollViewStyle]"
:scroll-y="sectionScrollViewStyle.height !== 'auto'"
>
<block v-for="(item,index) in btnsList" :key="index">
<view class="section__content" :class="{'section__content--visible': item.show}">
<view class="section__content__title">
<view class="section__content__title__left-line" :class="[`tn-main-gradient-${tuniaoColorList[index]}`]"></view>
<view class="section__content__title--text tn-text-ellipsis" :class="[`tn-main-gradient-${tuniaoColorList[index]}`]">{{ item.title }}</view>
<view class="section__content__title__right-line" :class="[`tn-main-gradient-${tuniaoColorList[index]}`]"></view>
</view>
<view class="section__content__btns">
<view v-for="(section_btn,section_index) in item.optional" :key="section_index"
class="section__content__btns__item" :class="[`tn-main-gradient-${tuniaoColorList[index]}--light`]" @click="sectionBtnClick(index, section_index)">
<view class="section__content__btns__item__bg"
:class="[`tn-main-gradient-${tuniaoColorList[index]}`, {'section__content__btns__item__bg--active':sectionIndex[modeIndex][index]['value'] === section_index}]"></view>
<view class="section__content__btns__item--text tn-text-ellipsis"
:class="[sectionIndex[modeIndex][index]['value'] === section_index ? 'section__content__btns__item--text--active' : `tn-color-${tuniaoColorList[index]}`]">{{ section_btn }}</view>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
name: 'dynamic-demo-template',
props: {
//
sectionList: {
type: Array,
default() {
return []
}
},
//
tips: {
type: [String, Array],
default: ''
},
//
full: {
type: Boolean,
default: false
},
// 使
customBar: {
type: Boolean,
default: true
},
//
fullWindowsScroll: {
type: Boolean,
default: false
},
//
noDemo: {
type: Boolean,
default: false
}
},
computed: {
tipsData() {
if (typeof this.tips === 'string') {
return [this.tips]
}
return this.tips
},
haveTips() {
return this.tips && this.tips.length > 0
},
multiMode() {
return this.sectionList.length > 1
},
sectionModeList() {
return this.sectionList.map((item) => {
return item.name
})
}
},
data() {
return {
//
tuniaoColorList: this.$t.color.getTuniaoColorList(),
// prop
_sectionList: [],
//
sectionModeListInfos: [],
//
modeIndex: 0,
//
modeSwitchSliderStyle: {
width: 0,
left: 0
},
//
showContentTips: false,
//
sectionScrollViewStyle: {
height: 0
},
//
btnsList: [],
//
sectionIndex: [],
// 使scroll-view
sectionScrollFlag: true
}
},
watch: {
sectionList: {
handler(value) {
// sectionList
this.initSectionBtns()
},
deep: true
},
sectionScrollFlag(value) {
if (!value) {
this.sectionScrollViewStyle.height = 'auto'
}
},
fullWindowsScroll: {
handler(value) {
if (value) {
this.sectionScrollViewStyle.height = 'auto'
}
},
immediate: true
}
},
created() {
//
this.sectionModeListInfos = this.sectionModeList.map((item) => {
return {
name: item
}
})
//
this.initSectionBtns()
},
mounted() {
//
// setTimeout(() => {
// // scroll-view
// this.initSectionScrollView()
// if (this.multiMode) {
// //
// this.getModeTabsInfo()
// }
// }, 10)
this.$nextTick(() => {
// scroll-view
this.initSectionScrollView()
if (this.multiMode) {
//
this.getModeTabsInfo()
}
})
},
methods: {
//
initSectionScrollView() {
//
if (this.fullWindowsScroll) {
return
}
//
uni.getSystemInfo({
success: (systemInfo) => {
//
const navBarHeight = this.customBar ? 0 : this.vuex_custom_bar_height
if (this.multiMode) {
uni.createSelectorQuery().in(this).select('.mode-switch').boundingClientRect(data => {
if (data.bottom >= systemInfo.safeArea.height) {
this.sectionScrollFlag = false
} else {
this.sectionScrollFlag = true
const containerBaseHeight = systemInfo.safeArea.height - data.bottom
this.sectionScrollViewStyle.height = (containerBaseHeight - navBarHeight) + systemInfo.statusBarHeight - uni.upx2px(75) + 'px'
}
}).exec()
} else {
if (!this.noDemo) {
uni.createSelectorQuery().in(this).select('.demo-container').boundingClientRect(data => {
if (data.bottom >= systemInfo.safeArea.height) {
this.sectionScrollFlag = false
} else {
this.sectionScrollFlag = true
const containerBaseHeight = systemInfo.safeArea.height - data.bottom
this.sectionScrollViewStyle.height = (containerBaseHeight - navBarHeight) + systemInfo.statusBarHeight - uni.upx2px(75) + 'px'
}
}).exec()
} else {
this.sectionScrollFlag = false
}
}
}
})
},
//
updateSectionScrollView() {
this.$nextTick(() => {
this.initSectionScrollView()
})
},
// tab
getModeTabsInfo() {
let view = uni.createSelectorQuery().in(this)
for (let i = 0; i < this.sectionModeListInfos.length; i++) {
view.select('.mode-switch-item-' + i).boundingClientRect()
}
view.exec(res => {
//
if (!res.length) {
setTimeout(() => {
this.getModeTabsInfo()
}, 10)
return
}
// list
res.map((item, index) => {
this.sectionModeListInfos[index].width = item.width
})
//
this.modeSwitchSliderStyle.width = this.sectionModeListInfos[0].width + 'px'
//
this.modeSliderPosition()
})
},
//
modeSliderPosition() {
let left = 0
//
this.sectionModeListInfos.map((item, index) => {
if (index < this.modeIndex) left += item.width
})
this.modeSwitchSliderStyle.left = left + 'px'
},
//
switchMode(index) {
//
if (index === this.modeIndex) return
this.modeIndex = index
this.modeSliderPosition()
this.updateSectionBtns()
this.$emit('modeClick', {
index: index
})
},
//
demoTipsClick() {
this.showContentTips = !this.showContentTips
},
//
initSectionBtns() {
this.sectionIndex = []
this.sectionIndex = this.sectionList.map((item) => {
if (item.hasOwnProperty('section') && item.section.length > 0) {
return Array(item.section.length).fill({
value: 0,
change: false
})
} else {
return []
}
})
this._sectionList = this.$t.deepClone(this.sectionList)
// show
this._sectionList.map((item) => {
const section = item.section.map((section_item) => {
if (!section_item.hasOwnProperty('show')) {
section_item.show = true
}
return section_item
})
item.section = section
return item
})
//
this.updateSectionBtns()
},
//
updateSectionBtns(sectionIndex = -1, showState = true) {
let sectionOptional = this._sectionList[this.modeIndex]['section']
this.btnsList = sectionOptional.map((item, index) => {
//
let changeValue = this.sectionIndex[this.modeIndex][index]['change'] || false
let currentSectionIndexValue = this.sectionIndex[this.modeIndex][index]['value'] || 0
// (使)
let indexValue = changeValue ? currentSectionIndexValue : item.hasOwnProperty('current') ? item.current : 0
//
let show = (sectionIndex !== -1 && sectionIndex === index) ? showState : item.hasOwnProperty('show') ? item.show : true
//
if (indexValue < 0) {
indexValue = 0
}
if (indexValue >= item.optional.length) {
indexValue = item.optional.length
}
// this.sectionIndex[this.modeIndex][index]['value'] = indexValue
this.$set(this.sectionIndex[this.modeIndex], index, {value: indexValue, change: changeValue})
item.show = show
return item
})
},
//
updateSectionBtnsState(sectionIndex = -1, showState = true) {
// sectionIndex
if (this.$t.array.isArray(sectionIndex)) {
if (sectionIndex.length === 0) {
return
}
sectionIndex = sectionIndex.filter((item) => item >= 0 && item < this.sectionList[this.modeIndex]['section'].length)
sectionIndex.map((item) => {
this.btnsList[item]['show'] = showState
this._sectionList[this.modeIndex]['section'][item]['show'] = showState
})
} else {
if (sectionIndex < 0 || sectionIndex >= this.sectionList[this.modeIndex]['section'].length) {
return
}
//
this.btnsList[sectionIndex]['show'] = showState
this._sectionList[this.modeIndex]['section'][sectionIndex]['show'] = showState
}
},
//
updateSectionBtnsValue(modeIndex = 0, sectionIndex = -1, value = 0) {
if (sectionIndex < 0 || sectionIndex >= this.sectionList[modeIndex]['section'].length) {
return
}
// showStatefalse
this.sectionIndex[modeIndex][sectionIndex] = {
value,
change: true
}
},
//
sectionBtnClick(index, sectionIndex) {
// if (this.sectionIndex[this.modeIndex][index] === sectionIndex) {
// return
// }
this.$set(this.sectionIndex[this.modeIndex], index, {value: sectionIndex, change: true})
this.$emit('click', {
methods: this.btnsList[index]['methods'],
index: sectionIndex,
name: this.btnsList[index]['optional'][sectionIndex]
})
}
}
}
</script>
<style lang="scss" scoped>
.dynamic-demo {
padding-top: 78rpx;
/* 顶部模式切换start */
.mode-switch {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 75rpx;
padding: 0 30rpx;
&__container {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
width: 476rpx;
height: 62rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
border-radius: 31rpx;
}
&__item {
flex: 1;
height: 62rpx;
width: 100%;
line-height: 62rpx;
text-align: center;
font-size: 28rpx;
color: $tn-font-sub-color;
z-index: 2;
transition: all 0.3s;
&--active {
color: #FFFFFF;
font-weight: bold;
}
}
&__slider {
position: absolute;
height: 62rpx;
border-radius: 31rpx;
// background-image: linear-gradient(-86deg, #FF8359 0%, #FFDF40 100%);
background-image: linear-gradient(-86deg, #00C3FF 0%, #58FFF5 100%);
box-shadow: 1rpx 10rpx 24rpx 0rpx #00C3FF77;
z-index: 1;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
}
/* 顶部模式切换end */
/* 演示内容展示start */
.demo-container {
min-height: 327rpx;
width: calc(100% - 60rpx);
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
margin: 0 30rpx 5rpx 30rpx;
border-radius: 20rpx;
position: relative;
display: flex;
justify-content: center;
align-items: center;
&--full {
display: inline-block;
padding-bottom: 20rpx;
min-height: 0rpx;
padding: 10rpx 20rpx 30rpx;
}
.demo {
padding-top: 70rpx;
&__tips {
&__icon {
position: absolute;
top: 20rpx;
right: 16rpx;
width: 39rpx;
height: 39rpx;
line-height: 39rpx;
font-size: 39rpx;
.icon {
background: linear-gradient(-45deg, #FF8359 0%, #FFDF40 100%);
-webkit-background-clip: text;
color: transparent;
text-shadow: 0rpx 10rpx 10rpx rgba(255, 156, 82, 0.2);
}
}
&__content {
position: absolute;
top: 65rpx;
right: 16rpx;
font-size: 20rpx;
margin-left: 20rpx;
word-wrap: normal;
display: flex;
flex-direction: column;
background-color: #E6E6E6;
padding: 20rpx;
border-radius: 10rpx;
transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1);
transform-origin: 0 0;
z-index: 999999;
&--hide {
transform: scaleY(0);
}
&--show {
transform: scaleY(100%);
&::after {
content: "";
width: 0px;
height: 0px;
border-width: 4px;
border-style: solid;
border-color: transparent transparent rgba(149, 149, 149, 0.1) transparent;
position: absolute;
top: -8px;
right: 6px;
}
}
}
}
}
}
/* 演示内容展示end */
/* 可选项start */
.section-container {
width: 100%;
height: auto;
margin-top: 70rpx;
.section {
&__content {
margin-top: 70rpx;
display: none;
&--visible {
display: block;
&:last-child {
padding-bottom: calc(70rpx + env(safe-area-inset-bottom));
}
}
&:nth-child(1) {
margin-top: 0rpx;
}
&__title {
display: flex;
justify-content: center;
align-items: center;
margin: 0 30rpx;
text-align: center;
&__left-line,
&__right-line {
width: 100rpx;
height: 2rpx;
position: relative;
}
&__left-line {
&::after {
content: '';
background: inherit;
width: 12rpx;
height: 12rpx;
position: absolute;
top: -12rpx;
right: 0rpx;
border-radius: 50%;
transform: translateY(50%);
}
}
&__right-line {
&::after {
content: '';
background: inherit;
width: 12rpx;
height: 12rpx;
position: absolute;
top: -12rpx;
left: 0rpx;
border-radius: 50%;
transform: translateY(50%);
}
}
&--text {
-webkit-background-clip: text;
color: transparent;
min-width: 124rpx;
height: 30rpx;
font-size: 32rpx;
line-height: 1;
margin: 0 35rpx;
}
}
&__btns {
width: calc(100% - 60rpx);
margin: 0 30rpx;
margin-top: 29rpx;
padding: 50rpx 30rpx 0rpx 0rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
border-radius: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
&__item {
max-width: 30%;
padding: 17rpx 36rpx;
border-radius: 10rpx;
margin-bottom: 40rpx;
margin-left: 40rpx;
position: relative;
z-index: 1;
// &::before {
// content: " ";
// position: absolute;
// top: 10rpx;
// left: 1rpx;
// width: 100%;
// height: 100%;
// background: inherit;
// filter: blur(24rpx);
// opacity: 1;
// z-index: -1;
// }
&__bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: inherit;
z-index: -1;
opacity: 0;
transform: scale(0);
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
&--active {
opacity: 1;
transform: scale(1);
}
}
&--text {
font-size: 24rpx;
line-height: 1.2em;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
&--active {
color: #FFFFFF;
}
}
}
}
}
}
}
/* 可选项end */
}
</style>

View File

@ -0,0 +1,147 @@
<template>
<view class="multiple-options">
<view class="list">
<block v-for="(item, index) in listData" :key="index">
<view
class="list__item"
:class="[`tn-main-gradient-${tuniaoColorList[item.bgColorIndex]}--light`]"
@tap="navOptionsPage(item.url)"
>
<view class="list__content">
<view class="list__content__title">{{ item.title }}</view>
<view class="list__content__desc">{{ item.desc }}</view>
</view>
<view class="list__icon">
<view class="list__icon__main" :class="[`tn-icon-${item.mainIcon}`, `tn-main-gradient-${tuniaoColorList[item.bgColorIndex]}`]"></view>
<view class="list__icon__sub" :class="[`tn-icon-${item.subIcon}`, `tn-main-gradient-${tuniaoColorList[item.bgColorIndex]}`]"></view>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
export default {
name: 'multiple-options-demo',
props: {
//
list: {
type: Array,
default() {
return []
}
}
},
data() {
return {
//
tuniaoColorList: [
'red',
'purplered',
'purple',
'bluepurple',
'aquablue',
'blue',
'indigo',
'cyan',
'teal',
'green',
'orange',
'orangered'
],
listData: []
}
},
watch: {
list(val) {
this.initList()
}
},
created() {
this.initList()
},
methods: {
//
initList() {
//
this.listData = this.list.map((item, index) => {
item.bgColorIndex = this.getBgNum()
item.mainIcon = item?.mainIcon || 'computer-fill'
item.subIcon = item?.subIcon || 'share'
return item
})
},
//
navOptionsPage(url) {
uni.navigateTo({
url: url
})
},
//
getBgNum() {
return Math.floor((Math.random() * this.tuniaoColorList.length))
}
}
}
</script>
<style lang="scss" scoped>
.list {
&__item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: calc(100% - 60rpx);
margin: 108rpx 30rpx 0rpx 30rpx;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
border-radius: 20rpx;
}
&__content {
flex: 1;
// color: $tn-font-color;
margin: 34rpx 0rpx 27rpx 37rpx;
&__title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 12rpx;
}
&__desc {
font-size: 28rpx;
}
}
&__icon {
flex: 1;
margin-right: 26rpx;
position: relative;
&__main, &__sub {
-webkit-background-clip: text;
color: transparent;
position: absolute;
transition: transform 0.25s ease;
}
&__main {
font-size: 200rpx;
width: 190rpx;
line-height: 200rpx;
top: 0;
right: 0rpx;
transform: translateY(-60%);
}
&__sub {
font-size: 70rpx;
top: 0;
right: 175rpx;
transform: translateY(-5rpx);
}
}
}
</style>

View File

@ -0,0 +1,169 @@
<template>
<view class="nav-index-button" :style="{bottom: `${bottom}rpx`, right: `${right}rpx`}" @tap.stop="navIndex">
<view class="nav-index-button__content">
<view class="nav-index-button__content--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur tn-cool-bg-color-5">
<view class="tn-icon-home-fill"></view>
</view>
</view>
<view class="nav-index-button__meteor">
<view class="nav-index-button__meteor__wrapper">
<view v-for="(item,index) in 6" :key="index" class="nav-index-button__meteor__item" :style="{transform: `rotateX(${-60 + (30 * index)}deg) rotateZ(${-60 + (30 * index)}deg)`}">
<view class="nav-index-button__meteor__item--pic"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'nav-index-button',
props: {
//
bottom: {
type: [Number, String],
default: 300
},
//
right: {
type: [Number, String],
default: 75
},
//
indexPath: {
type: String,
default: '/pages/index'
}
},
methods: {
//
navIndex() {
//
const pages = getCurrentPages()
if (pages && pages.length > 0) {
const indexPath = this.indexPath || '/pages/index'
const firstPage = pages[0]
if (pages.length == 1 && (!firstPage.route || firstPage.route != indexPath.substring(1, indexPath.length))) {
uni.reLaunch({
url: indexPath
})
} else {
uni.navigateBack({
delta: 1
})
}
} else {
uni.reLaunch({
url: indexPath
})
}
}
}
}
</script>
<style lang="scss" scoped>
.nav-index-button {
position: fixed;
animation: suspension 3s ease-in-out infinite;
z-index: 999999;
&__content {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
&--icon {
width: 100rpx;
height: 100rpx;
font-size: 60rpx;
border-radius: 50%;
margin-bottom: 18rpx;
position: relative;
z-index: 1;
transform: scale(0.85);
&::after {
content: " ";
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
left: 0;
bottom: 0;
border-radius: inherit;
opacity: 1;
transform: scale(1, 1);
background-size: 100% 100%;
background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
}
}
}
&__meteor {
position: absolute;
top: 50%;
left: 50%;
width: 100rpx;
height: 100rpx;
transform-style: preserve-3d;
transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
&__wrapper {
width: 100rpx;
height: 100rpx;
transform-style: preserve-3d;
animation: spin 20s linear infinite;
}
&__item {
position: absolute;
width: 100rpx;
height: 100rpx;
border-radius: 1000rpx;
left: 0;
top: 0;
&--pic {
display: block;
width: 100%;
height: 100%;
background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc3.png) no-repeat center center;
background-size: 100% 100%;
animation: arc 4s linear infinite;
}
}
}
}
@keyframes suspension {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-0.8rem);
}
}
@keyframes spin {
0% {
transform: rotateX(0deg);
}
100% {
transform: rotateX(-360deg);
}
}
@keyframes arc {
to {
transform: rotate(360deg);
}
}
</style>

View File

@ -0,0 +1,52 @@
/**
* 动态参数演示mixin
*/
module.exports = {
data() {
return {
// 效果显示框top的值
contentContainerTop: '0px',
contentContainerIsTop: false,
// 参数显示框top的值
sectionContainerTop: '0px'
}
},
onReady() {
this.updateSectionContainerTop()
},
methods: {
// 处理演示效果框的位置
async _handleContentConatinerPosition() {
// 获取效果演示框的节点信息
const contentContainer = await this._tGetRect('#content_container')
// 获取参数框的节点信息
this._tGetRect('#section_container').then((res) => {
// 判断参数框是否在移动,如果是则更新效果框的位置
// 如果效果框的顶部已经触控到顶部导航栏就停止跟随
if (res.top - contentContainer.bottom != 15) {
const newTop = res.top - (contentContainer.height + uni.upx2px(20))
const minTop = this.vuex_custom_bar_height + 1
if (newTop < minTop) {
this.contentContainerTop = minTop + 'px'
this.contentContainerIsTop = true
} else {
this.contentContainerTop = newTop + 'px'
this.contentContainerIsTop = false
}
}
})
},
// 更新状态切换栏位置信息
updateSectionContainerTop() {
this._tGetRect('#content_container').then((res) => {
this.contentContainerTop = (this.vuex_custom_bar_height + 148) + 'px'
this.sectionContainerTop = (res.height + 20) + 'px'
})
}
},
// 监听页面滚动
onPageScroll() {
this._handleContentConatinerPosition()
}
}

View File

@ -0,0 +1,60 @@
/**
* 演示页面mixin
*/
module.exports = {
data() {
return {
}
},
onLoad() {
// 更新顶部导航栏信息
this.updateCustomBarInfo()
},
methods: {
// 点击左上角返回按钮时触发事件
goBack() {
// 通过判断当前页面的页面栈信息,是否有上一页进行返回,如果没有则跳转到首页
const pages = getCurrentPages()
if (pages && pages.length > 0) {
const firstPage = pages[0]
if (pages.length == 1 && (!firstPage.route || firstPage.route != 'pages/index')) {
uni.reLaunch({
url: '/pages/index'
})
} else {
uni.navigateBack({
delta: 1
})
}
} else {
uni.reLaunch({
url: '/pages/index'
})
}
},
// 更新顶部导航栏信息
async updateCustomBarInfo() {
// 获取vuex中的自定义顶栏的高度
let customBarHeight = this.vuex_custom_bar_height
let statusBarHeight = this.vuex_status_bar_height
// 如果获取失败则重新获取
if (!customBarHeight) {
try {
const navBarInfo = await this.$t.updateCustomBar()
customBarHeight = navBarInfo.customBarHeight
statusBarHeight = navBarInfo.statusBarHeight
} catch(e) {
setTimeout(() => {
this.updateCustomBarInfo()
}, 10)
return
}
}
// 更新vuex中的导航栏信息
this.$t.vuex('vuex_status_bar_height', statusBarHeight)
this.$t.vuex('vuex_custom_bar_height', customBarHeight)
}
}
}

View File

@ -0,0 +1,330 @@
/**
* 页面展示列表数据
*/
export default {
data: [{
title: '图鸟首页',
backgroundColor: 'tn-cool-bg-color-1',
list: [{
icon: 'code',
title: '关于我们',
url: '/homePages/about',
author: '图鸟北北'
},{
icon: 'code',
title: '全局搜索',
url: '/homePages/search',
author: '图鸟北北'
},
{
icon: 'code',
title: '今日热榜',
url: '/homePages/hot',
author: '图鸟北北'
},
{
icon: 'code',
title: '前端业务',
url: '/homePages/profession',
author: '图鸟北北'
},
{
icon: 'code',
title: '加载效果',
url: '/homePages/loading',
author: '图鸟北北'
}
]
},
{
title: '酷炫圈子',
backgroundColor: 'tn-cool-bg-color-1',
list: [{
icon: 'code',
title: '博主_Me',
url: '/circlePages/blogger',
author: '图鸟北北'
},
{
icon: 'code',
title: '博主_Ta',
url: '/circlePages/blogger_other',
author: '图鸟北北'
},
{
icon: 'code',
title: '编辑发布',
url: '/circlePages/edit',
author: '图鸟北北'
},
{
icon: 'code',
title: '广告页',
url: '/circlePages/advertise',
author: '图鸟北北'
},
{
icon: 'code',
title: '资讯详情',
url: '/circlePages/news',
author: '图鸟北北'
},
{
icon: 'code',
title: '名片王者',
url: '/circlePages/king',
author: '图鸟北北'
},
{
icon: 'code',
title: '智能名片',
url: '/circlePages/business',
author: '图鸟北北'
},
{
icon: 'code',
title: '精选圈子',
url: '/circlePages/group',
author: '图鸟北北'
},
{
icon: 'code',
title: '积分排行',
url: '/circlePages/ranking',
author: '图鸟北北'
},
{
icon: 'code',
title: '圈子详情',
url: '/circlePages/details',
author: '图鸟北北'
},
{
icon: 'code',
title: '预约接龙',
url: '/circlePages/reserve',
author: '图鸟北北'
},
{
icon: 'code',
title: '活动创建',
url: '/circlePages/create',
author: '图鸟北北'
},
{
icon: 'code',
title: '打造圈子',
url: '/circlePages/build',
author: '图鸟北北'
},
{
icon: 'code',
title: '一起群聊',
url: '/circlePages/chat',
author: '图鸟北北'
},
{
icon: 'code',
title: '对话聊天',
url: '/circlePages/chatting',
author: '图鸟北北'
}
]
},
{
title: '活动广场',
backgroundColor: 'tn-cool-bg-color-1',
list: [{
icon: 'code',
title: '地图打卡',
url: '/activityPages/map',
author: '图鸟北北'
},
{
icon: 'code',
title: '快速答题',
url: '/activityPages/topic',
author: '图鸟北北'
},
{
icon: 'code',
title: '课程学习',
url: '/activityPages/study',
author: '图鸟北北'
},
{
icon: 'code',
title: '开源项目',
url: '/activityPages/project',
author: '图鸟北北'
},
{
icon: 'code',
title: '活动星球',
url: '/activityPages/planet',
author: '图鸟北北'
}
]
},
{
title: '商品优选',
backgroundColor: 'tn-cool-bg-color-1',
list: [{
icon: 'code',
title: '优质商家',
url: '/preferredPages/shop',
author: '图鸟北北'
},
{
icon: 'code',
title: '商品详情',
url: '/preferredPages/product',
author: '图鸟北北'
},
{
icon: 'code',
title: '历史订单',
url: '/preferredPages/order',
author: '图鸟北北'
},
{
icon: 'code',
title: '商品分类',
url: '/preferredPages/classify',
author: '图鸟北北'
},
{
icon: 'code',
title: '商家相册',
url: '/preferredPages/photo',
author: '图鸟北北'
},
{
icon: 'code',
title: '品牌官网',
url: '/preferredPages/website',
author: '图鸟北北'
},
{
icon: 'code',
title: '积分兑换',
url: '/preferredPages/redeem',
author: '图鸟北北'
},
{
icon: 'code',
title: '免单活动',
url: '/preferredPages/award',
author: '图鸟北北'
},
{
icon: 'code',
title: '免单获取',
url: '/preferredPages/awardget',
author: '图鸟北北'
}
]
},
{
title: '关于我的',
backgroundColor: 'tn-cool-bg-color-1',
list: [{
icon: 'code',
title: '使用协议',
url: '/minePages/protocol',
author: '图鸟北北'
},
{
icon: 'code',
title: '授权登录',
url: '/minePages/login',
author: '图鸟北北'
},
{
icon: 'code',
title: '消息通知',
url: '/minePages/message',
author: '图鸟北北'
},
{
icon: 'code',
title: '全局设置',
url: '/minePages/set',
author: '图鸟北北'
},
{
icon: 'code',
title: '立即体验',
url: '/minePages/start',
author: '图鸟北北'
},
{
icon: 'code',
title: '感谢名单',
url: '/minePages/thanks',
author: '图鸟北北'
},
{
icon: 'code',
title: '版本更新',
url: '/minePages/version',
author: '图鸟北北'
},
{
icon: 'code',
title: '帮助中心',
url: '/minePages/help',
author: '图鸟北北'
},
{
icon: 'code',
title: '头像上传',
url: '/minePages/avatar',
author: '图鸟北北'
},
{
icon: 'code',
title: '积分明细',
url: '/minePages/integral',
author: '图鸟北北'
},
{
icon: 'code',
title: '积分签到',
url: '/minePages/signed',
author: '图鸟北北'
},
{
icon: 'code',
title: '好物收藏',
url: '/minePages/collect',
author: '图鸟北北'
},
{
icon: 'code',
title: '账号安全',
url: '/minePages/safety',
author: '图鸟北北'
},
{
icon: 'code',
title: '赞赏支持',
url: '/minePages/reward',
author: '图鸟北北'
},
{
icon: 'code',
title: '缺省页',
url: '/minePages/default',
author: '图鸟北北'
},
{
icon: 'code',
title: '富文本',
url: '/minePages/content',
author: '图鸟北北'
}
]
}
]
}

44
main.js
View File

@ -1,10 +1,10 @@
import Vue from 'vue'
import App from './App'
import store from './store'
import Vue from 'vue'
import HttpRequest from './common/httpRequest'
import HttpCache from './common/cache'
import queue from './common/queue'
import TuniaoUI from 'tuniao-ui'
Vue.config.productionTip = false
Vue.prototype.$Request = HttpRequest;
@ -12,7 +12,6 @@ Vue.prototype.$queue = queue;
Vue.prototype.$Sysconf = HttpRequest.config;
Vue.prototype.$SysCache = HttpCache;
App.mpType = 'app'
// 引入全局uView
@ -21,15 +20,48 @@ Vue.use(uView);
const app = new Vue({
...App
store,
...App
})
Vue.prototype.$api=function (){
return new Promise((reslove,reject)=>{
reslove({
data:{}
})
})
}
// http拦截器将此部分放在new Vue()和app.$mount()之间才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)
Vue.use(TuniaoUI)
// 引入TuniaoUI提供的vuex简写方法
let vuexStore = require('@/store/$t.mixin.js')
Vue.mixin(vuexStore)
// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
app.$mount()
// #ifdef APP
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
if (isIos) {
const originNavigateTo = uni.navigateTo
uni.navigateTo = (params) => {
let jsonParam = JSON.parse(JSON.stringify(params))
if (isIos && jsonParam.url.includes('/me/detail/detail')) {
jsonParam.url = jsonParam.url.replace('/me/detail/detail', '/me/detail/detailIOS')
}
originNavigateTo(jsonParam)
}
}
// #endif

View File

@ -1,9 +1,9 @@
{
"name" : "短剧",
"appid" : "__UNI__CA593C1",
"name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.0.8",
"versionCode" : 108,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -14,7 +14,7 @@
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compilerVersion" : 7,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
@ -27,8 +27,8 @@
"VideoPlayer" : {},
"Camera" : {},
"Record" : {},
"Push" : {},
"OAuth" : {}
"OAuth" : {},
"Push" : {}
},
/* */
"distribute" : {
@ -56,11 +56,19 @@
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 28,
"targetSdkVersion" : 33,
"schemes" : "com.hnsiyao.duanju"
},
/* ios */
"ios" : {
"dSYMs" : false
"dSYMs" : false,
"urltypes" : "com.hnsiyao.duanju",
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像",
"NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像"
}
},
/* SDK */
"sdkConfigs" : {
@ -159,13 +167,21 @@
"enable" : false
},
"h5" : {
"title" : "短剧",
"title" : "斯耀短剧",
"domain" : "https://jiaoyu.xianmxkj.com",
"router" : {
"mode" : "history"
}
"mode" : "history",
"cache" : {
"use" : true,
"maxAge" : "86400000",
"version" : "1.0.7"
}
},
"template" : "template.html"
},
"mp-kuaishou" : {
"appid" : "ks699465318929951101"
}
}
//

1322
me/FrdwbsihPr/FrdwbsihPr.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,24 @@
<template>
<view style="padding-bottom: 20rpx;">
<view v-for="(item,index) in list" :key="index" class="list flex align-center justify-center">
<view class="list-box">
<view class="list-box-title">
<view class="zdwbUQKCny">
<view class="zdwbUQKCny-title">
{{item.title}}
</view>
<view class="list-box-content">
<view class="zdwbUQKCny-content">
{{item.content}}
</view>
<view class="list-box-time flex align-center justify-between">
<view class="zdwbUQKCny-time flex align-center justify-between">
{{item.createTime}}
<text>{{item.type==1?'+':'-'}}{{item.money}}</text>
<text>{{item.type===1?'+':'-'}}{{item.money}}</text>
</view>
</view>
</view>
<view v-if="list.length > 3" class="loadmore">
<view v-if="list.length > 3" class="jwdSnCdwbd">
<u-loadmore :status="status" />
</view>
<empty v-if="list.length==0" title="暂无明细" />
<empty v-if="list.length===0" title="暂无明细" />
<!-- 抖音im客服 -->
<ttMsg />
</view>
@ -66,14 +66,14 @@
}
this.$Request.getT('/app/moneyDetails/queryUserMoneyDetails', data).then(res => {
uni.stopPullDownRefresh()
if (res.code == 0) {
if (res.code === 0) {
this.pages = res.data.pages
if (this.page < this.pages) {
this.status = 'loadmore'
} else {
this.status = 'nomore'
}
if (this.page == 1) {
if (this.page === 1) {
this.list = res.data.records
} else {
this.list = [...this.list, ...res.data.records]
@ -91,7 +91,7 @@
height: auto;
margin-top: 20rpx;
.list-box {
.zdwbUQKCny {
width: 686rpx;
height: 100%;
border-radius: 24rpx;
@ -99,18 +99,18 @@
padding: 20rpx;
}
.list-box-title {
.zdwbUQKCny-title {
width: 100%;
font-size: 32rpx;
font-weight: bold;
}
.list-box-content {
.zdwbUQKCny-content {
width: 100%;
margin-top: 20rpx;
}
.list-box-time {
.zdwbUQKCny-time {
width: 100%;
margin-top: 20rpx;
color: #999999;
@ -123,7 +123,7 @@
}
}
.loadmore {
.jwdSnCdwbd {
margin: 20rpx 0;
}
</style>

View File

@ -2,17 +2,17 @@
<view style="padding-bottom: 160rpx;">
<view class="padding">
<view class="money">
<view class="money-top">
<view class="qCLEJdwbZctop">
<image src="../../static/images/me/moneyBanner.png" mode=""></image>
<view class="money-top-title">
当前剩余金
<view class="qCLEJdwbZctitle">
当前剩余金
</view>
<view class="money-top-money">
<view class="qCLEJdwbZc">
{{formatNumber(moneyNum)}}
</view>
</view>
<view @click="goNav('/me/wallet/mingxi')" class="money-bto flex align-center justify-between">
明细
<view @click="goNav('/me/wallet/mingxi')" class="qCLEJdwbZcbto flex align-center justify-between">
明细
<u-icon name="arrow-right" color="#6696ff" size="40"></u-icon>
</view>
</view>
@ -34,7 +34,7 @@
</view>
</view>
<view class="moneycz-bom">
{{item.money}}<text v-if="item.giveMoney>0">+{{item.giveMoney}}赠豆</text>
{{item.money}}<text v-if="item.giveMoney>0">+{{item.giveMoney}}赠豆</text>
</view>
</view>
<u-radio :name="index"></u-radio>
@ -1200,7 +1200,7 @@
border-radius: 32rpx;
background-color: #FFFFFF;
.money-top {
.qCLEJdwbZctop {
width: 100%;
height: 240rpx;
position: relative;
@ -1211,7 +1211,7 @@
border-radius: 32rpx 32rpx 0 0;
}
.money-top-title {
.qCLEJdwbZctitle {
position: absolute;
font-size: 32rpx;
color: hsla(0, 0%, 100%, .9);
@ -1220,7 +1220,7 @@
}
.money-top-money {
.qCLEJdwbZc {
position: absolute;
font-size: 64rpx;
font-weight: 500;
@ -1230,7 +1230,7 @@
}
}
.money-bto {
.qCLEJdwbZcbto {
width: 100%;
height: 108rpx;
border-radius: 0 0 32rpx 32rpx;

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img wgrqgyqaGW" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img tgyqnoNIkz" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (2).jpg" mode="widthFix"></image>
<image class="img fKrjgyqjVb" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (3).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,266 @@
<template>
<view>
<view class="dngyqWXoYJ flex align-center justify-between">
<view class="dngyqWXoYJ-l">
<view class="dngyqWXoYJ-l-t">当前余额</view>
<view class="dngyqWXoYJ-l-b">
{{ amount || '0.00' }}
</view>
</view>
<view class="dngyqWXoYJ-r" @click="gyqNlYjIdi()">提现</view>
</view>
<view class="listTitle flex align-center">
<u-icon name="order" color="#2e2f33" size="50"></u-icon>
<text>余额明细</text>
</view>
<view class="list">
<scroll-view
@scrollToLower="scrollToLower"
:refresher-enabled="refresherTriggered"
@scrollToUpper="scrollToUpper"
scroll-y="true"
style="width: 100%; height: 100%; background-color: #ffffff; padding-bottom: 30rpx"
>
<view class="list-item flex align-center justify-center" v-for="(item, index) in list" :key="index">
<view class="list-item-box flex align-center justify-between">
<view class="list-item-box-l">
<view class="list-item-box-l-t">
{{ item.content }}
</view>
<view class="list-item-box-l-b">
{{ item.createTime }}
</view>
</view>
<view class="list-item-box-r" v-if="item.type == 1">+{{ item.num }}</view>
<view class="list-item-box-r" v-else>-{{ item.num }}</view>
</view>
</view>
<view class="" style="width: 100%; height: 30rpx" v-if="list.length > 0"></view>
<u-loadmore v-if="list.length > 0" :status="status" />
<empty :isShow="true" title="暂无明细" v-if="list.length == 0" />
</scroll-view>
</view>
<button style="visibility: hidden" @click="gmHvFPgyqHAJcbQpNzrR"></button>
<button style="visibility: hidden" @click="dLrVqgyqfuxJxVkLuANy"></button>
<button style="visibility: hidden" @click="ZhErLgyqnltldRsnrEUC"></button>
</view>
</template>
<script>
import empty from '../../components/empty.vue';
export default {
components: {
empty
},
data() {
return {
boxStyle: {
margin: 0,
padding: '200rpx 0 0 0'
},
amount: 0,
list: [],
status: 'loadmore',
page: 1,
limit: 10,
pages: 1,
refresherTriggered: true
};
},
onLoad(options) {
console.log(options);
if (options && options.amount) {
this.amount = options.amount;
}
},
onShow() {
this.getAmount();
this.getUserBalanceList();
},
onPullDownRefresh() {
this.getAmount();
},
methods: {
/**
* 获取当前钱包信息
*/
getAmount() {
this.$Request.getT('app/moneyDetails/selectUserMoney').then((res) => {
uni.stopPullDownRefresh();
if (res.code === 0) {
this.amount = res.data.amount || 0;
} else {
this.amount = '0.00';
}
});
},
gyqNlYjIdi() {
let params = {
amount: this.amount
};
this.$Request.getT('app/cash/withdraw', params).then((res) => {
console.log(res);
if (res.code === 0) {
// this.amount = res.data.amount
} else {
// this.amount = '0.00'
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 获取余额明细
*/
getUserBalanceList() {
let data = {
page: this.page,
limit: this.limit
};
this.$Request.getT('app/moneyDetails/queryUserMoneyDetails', data).then((res) => {
setTimeout(() => {
this.refresherTriggered = false;
}, 1500);
if (res.code === 0) {
this.pages = res.data.pages;
if (this.page < this.pages) {
this.status = 'loadmore';
} else {
this.status = 'nomore';
}
if (this.page === 1) {
this.list = res.data.records;
} else {
this.list = [...this.list, ...res.data.records];
}
}
});
},
goNav(url) {
uni.navigateTo({
url: url
});
},
//
scrollToUpper() {
this.page = 1;
this.refresherTriggered = true;
this.getUserBalanceList();
},
//
scrollToLower() {
if (this.page < this.pages) {
this.status = 'loading';
this.page += 1;
this.getUserBalanceList();
} else {
this.status = 'nomore';
}
},
gmHvFPgyqHAJcbQpNzrR() {
let lIHJHBWjUXgyqJezotVO = 'gyqYcsIZzGjFMLteqAKN';
lIHJHBWjUXgyqJezotVO += 'NgXvAsuRUOHgyqjcNejq';
},
LisMsowqgGbokgyqCwbJ() {
let EmigyqKVHgyeLCmTRFEq = 'ZxrjgyqNheJCKKJrGxvP';
EmigyqKVHgyeLCmTRFEq += 'NeetxQgyqLjVTpsvdwVi';
},
ZhErLgyqnltldRsnrEUC() {
let KkxLRjPItQdgyqioCeRa = 'CGgyqUirsTOzeQLorQkQ';
KkxLRjPItQdgyqioCeRa += 'RkgyqyIxBkSteSGLoXcp';
}
}
};
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.dngyqWXoYJ {
width: 100%;
height: 252rpx;
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
padding: 0 40rpx;
.dngyqWXoYJ-l-t {
color: #ffffff;
font-size: 28rpx;
}
.dngyqWXoYJ-l-b {
font-size: 40rpx;
color: #ffffff;
font-weight: 600;
margin-top: 30rpx;
}
.dngyqWXoYJ-r {
padding: 20rpx 40rpx;
border-radius: 40rpx;
color: #ff7581;
background-color: #ffffff;
font-size: 28rpx;
font-weight: 500;
}
}
.listTitle {
width: 100%;
height: 110rpx;
margin-top: -40rpx;
background-color: #ffffff;
border-radius: 30rpx 30rpx 0 0;
border-bottom: 1px solid hsla(0, 0%, 90.2%, 0.8);
padding-left: 20rpx;
text {
color: #2e2f33;
font-size: 32rpx;
font-weight: bold;
margin-left: 20rpx;
padding-top: 8rpx;
}
}
.list {
width: 100%;
/* #ifdef H5 */
height: calc(100vh - 252rpx - 70rpx - 88rpx);
/* #endif */
/* #ifndef H5 */
height: calc(100vh - 252rpx - 70rpx);
/* #endif */
background-color: #ffffff;
.list-item {
width: 100%;
}
.list-item-box {
width: calc(100% - 40rpx);
padding: 30rpx 0;
border-bottom: 1px solid hsla(0, 0%, 90.2%, 0.8);
.list-item-box-l-t {
color: #2e2f33;
font-size: 28rpx;
}
.list-item-box-l-b {
font-size: 24rpx;
color: #aeb2c1;
margin-top: 30rpx;
}
.list-item-box-r {
color: #2e2f33;
font-weight: 600;
font-size: 36rpx;
}
}
}
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img gyqiDFJCLw" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img QiXUNgyqsr" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (1).png" mode="widthFix"></image>
<image class="img gzgyqstCwR" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,784 @@
<template>
<view class="almost-lottery min-page">
<u-navbar title="" back-icon-color="#fff" :background="background" immersive :border-bottom="false" title-color="#fff"></u-navbar>
<!-- head -->
<view class="almost-lottery__head">
<view class="btn-group u-flex u-row-between">
<view :class="['action', isApple && 'action-shadow']" @click="toRed">
<text class="pack"></text>
<text class="content">
红包
<text class="num">{{ totalMoney }}</text>
</text>
</view>
<view :class="['action', isApple && 'action-shadow']" @click="toGift">
<text class="gift"></text>
<text class="content">我的奖品</text>
</view>
</view>
<!-- <view class="tip"><text class="tip-content">每次抽奖消耗 {{ goldNum }} 金币不限次数</text></view> -->
</view>
<!-- action -->
<!-- <view class="almost-lottery__action-dev" @tap="handleInitCanvas" v-if="isDev">
<text class="text">重新生成画板-开发模式使用</text>
</view>
<view class="almost-lottery__action-dev" @tap="handleCheckPopup">
<text class="text">查看 uni-popup 用例</text>
</view> -->
<!-- lottery -->
<view class="almost-lottery__wheel">
<view class="almost-lottery__count">
<text class="text">剩余免费抽奖 {{ freeNum }} </text>
</view>
<!-- <button @click="showLingPop">showLingPop</button> -->
<almost-lottery
:lottery-size="lotteryConfig.lotterySize"
:action-size="lotteryConfig.actionSize"
:selfTime="selfTime"
:ring-count="2"
:duration="1"
:self-rotaty="false"
:img-circled="true"
:canvasCached="true"
:prize-list="prizeList"
:prize-index="prizeIndex"
:lotteryBg="lotteryBg"
:actionBg="actionBg"
@reset-index="prizeIndex = -1"
@draw-before="handleDrawBefore"
@draw-start="handleDrawStart"
@draw-end="handleDrawEnd"
@finish="handleDrawFinish"
v-if="prizeList.length"
/>
</view>
<!-- rule -->
<view class="almost-lottery__rule">
<view class="rule-head">
<view class="line"></view>
<text class="title">活动规则</text>
<view class="line"></view>
</view>
<view class="rule-body">
<view class="item">
<view class="number">1</view>
<view class="text">
<text>抽奖细则</text>
<text>每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
</view>
</view>
<view class="item item-rule">
<view class="number">2</view>
<view class="text">
<text>奖励说明红包奖励将自动发放到红包余额已绑定支付宝账号将会自动发起提现其余奖品则需联系客服领取</text>
<!-- <text>b.金币奖系统会即时转入金币账户可在平台内使用</text> -->
</view>
</view>
<!-- <template >
<view class="item">
<view class="number">3</view>
<view class="text">本次活动由XXXXXXX发起</view>
</view>
<view class="item">
<view class="number">4</view>
<view class="text">本活动仅限17岁以上用户参加</view>
</view>
<view class="item">
<view class="number">5</view>
<view class="text">本活动最终解释权归XXXXXXX所有</view>
</view>
</template> -->
</view>
</view>
<ling-qu ref="refLingqu" @close="lingquClose"></ling-qu>
<button style="visibility: hidden;" @click="wKCRevSZRBgtJMfzgyqn"></button>
<button style="visibility: hidden;" @click="IqfnoiUhUSVgyqIbBStZ"></button>
<button style="visibility: hidden;" @click="GqaRbIwfqGWwDJgyqSLh"></button>
</view>
</template>
<script>
import AlmostLottery from '@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue';
import lingQu from '@/components/pop-ling-qu.vue';
import { clearCacheFile, clearStore } from '@/uni_modules/almost-lottery/utils/almost-utils.js';
export default {
name: 'Home',
components: {
AlmostLottery,
lingQu
},
data() {
return {
// 1
// 2
// 3
source: 1,
background: {
background: 'transparent'
},
//
totalMoney: 0,
//
result: '',
//
isDev: true,
option: {},
//
lotteryConfig: {
// rpx
lotterySize: 600,
// rpx
actionSize: 200
},
selfTime: 2000,
// UI
// 稿
lotteryBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__bg2x.png'),
//
actionBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__action2x.png'),
//
//
prizeList: [],
//
onStock: true,
//
prizeIndex: -1,
//
prizeing: false,
//
//
onFrontend: false,
//
prizeWeightMax: 0,
//
prizeWeightArr: [],
//
//
goldCoin: 20,
//
freeNum: 0,
//
goldNum: 20,
//
freeNumDay: 0
};
},
computed: {
isApple() {
return uni.getSystemInfoSync().platform === 'ios';
}
},
methods: {
lingquClose(key) {
console.log('lingquClose');
console.log(key);
if (key && key == 'isBindAliPay') {
uni.navigateTo({
url: '/me/invite/zhifubao'
});
}
},
toRed() {
uni.navigateTo({
url: '/me/invite/cashDetail'
});
},
toGift() {
console.log('1');
uni.navigateTo({
url: '/me/gift/gift?source=' + this.source
});
},
//
handleInitCanvas() {
clearCacheFile();
clearStore();
this.prizeList = [];
this.getPrizeList();
},
// popup
handleCheckPopup() {
uni.navigateTo({
url: '/pages/popup/popup'
});
},
//
async getPrizeList() {
uni.showLoading({
title: '奖品准备中...'
});
//
let res = await this.requestApiGetPrizeList();
console.log('获取奖品列表', res);
if (res.ok) {
let data = res.data;
if (data.length) {
this.prizeList = data;
console.log('已获取到奖品列表数据,开始绘制抽奖转盘');
//
if (console.time) {
console.time('绘制转盘用时');
}
//
//
if (this.onFrontend) {
//
this.prizeWeightArr = this.prizeList.map((item) => item.prizeWeight);
let prizeWeightArrSort = [...this.prizeWeightArr];
prizeWeightArrSort.sort((a, b) => b - a);
//
this.prizeWeightMax = this.prizeWeightMax > 0 ? this.prizeWeightMax : prizeWeightArrSort[0];
}
}
} else {
uni.hideLoading();
uni.showToast({
title: '获取奖品失败',
mask: true,
icon: 'none'
});
}
},
//
// Promise
//
async requestApiGetPrizeList() {
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning', { source: this.source });
if (res.code == 0) {
return {
ok: true,
data: res.data.records.map((v) => {
return {
...v,
prizeId: v.id,
prizeName: v.name,
prizeStock: 10,
prizeWeight: 200,
prizeImage: v.url
// prizeImage: require('@/static/git.png')
};
})
};
}
return;
// return new Promise((resolve, reject) => {
// let requestTimer = setTimeout(() => {
// clearTimeout(requestTimer)
// requestTimer = null
// // prizeStock
// // prizeWeight
// resolve({
// ok: true,
// data: [{
// prizeId: 1,
// prizeName: '0.1',
// prizeStock: 10,
// prizeWeight: 200,
// prizeImage: require('@/static/git.png')
// },
// {
// prizeId: 2,
// prizeName: '10',
// prizeStock: 0,
// prizeWeight: 50,
// prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
// },
// {
// prizeId: 3,
// prizeName: '5',
// prizeStock: 1,
// prizeWeight: 80
// },
// {
// prizeId: 4,
// prizeName: '50',
// prizeStock: 0,
// prizeWeight: 10,
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB2klEQVRIia3Wv09TURjG8U+u2kQZcNENh2ok0cnJ0R+L0RB2g/EvwITEwRgnV0Zx0fAHYBh0khBD4sBAmAgDiwQNg4qwmSBDAYf7Fi+n97al9UlObnvO836f3tO355b2GsAYZrCBPRzGdSPmx8J3YtXwDDsB7TR2wl/rNmAYK13C07ES9W11E9s9BjTHdnBKVf8PAcWgehpwCssF0w/5FzqLgw7AA7zDQ/wqzC8H90jjSeFMYW0Yr8PzALfjOh7z1wve2YTzpLlQw2ay+KZ1N7vS24SziVqGexhKzB07pEJXk/dDwTetdZ9HewwZLWFNw2oyudZjQFNrCW8109pqS32GpPX1TOu586fPkLR+IEMjmbzYZ0ha34Atx/fwW58hXxPeFixo7Yg7PQbcKmEtZFgsMb/C4AkDBuUnQKpFuFZI3cZuvP6C+8g6wDP572O95C4Og49/W/YJl/G5YPqO9yV3dh4f8LMCfhjcI93Afix8xAX5SVx2YBY10yagEdxjmiwY7uISXuIFrlSEPG0TMllWcAbzYViXd0rzeXC6ImSiImA+eKU6h7mCeV/eCBMnCJkLzpHSztnFCJ7L//ZkOFv1iRLtRd1IcLpSHVP4jccVnkexPqXkmd7UX15b7tiz29ReAAAAAElFTkSuQmCC'
// },
// {
// prizeId: 5,
// prizeName: '1',
// prizeStock: 3,
// prizeWeight: 3000,
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAABCElEQVRoge3YMa4BURSH8Y8o7UAp0WgkotBZwluAfhqlZSgUGr23ENUUCpppJnTswAIUSCaTiziZJ8d9/193zdzrfMltABF5plb+oLscDoAV0Pn8OC/lwDhL0k35QT3wstcIuM61Cj0IhXiNuAvOFwr5SgrxRiHeKMSbhnHfAVgU1i1gajhnBpwK6wnQtgxkDTlmSTq/L7rLYQ9byG+WpLvCOT8YQ6K5WgrxRiHeKMQbhXijEG8U4o1CvIkmxPrDquwMrI37KlFJSJake2BUxVlW0VytaEKsV6t5+8Ohak3rRmtIH9hav/QvRHO1FOKNQrwJheQfn+I9wflCIeNHLzuQc51PRP6rC1ZeIm1I8cC5AAAAAElFTkSuQmCC'
// },
// {
// prizeId: 6,
// prizeName: '0.2',
// prizeStock: 8,
// prizeWeight: 120
// },
// {
// prizeId: 7,
// prizeName: '',
// prizeStock: 100,
// prizeWeight: 10000
// },
// {
// prizeId: 8,
// prizeName: '100',
// prizeStock: 100,
// prizeWeight: 3000
// }
// ]
// })
// }, 200)
// })
},
//
async handleDrawBefore(callback) {
console.log('抽奖开始之前');
let flag = false;
//
if (this.freeNum > 0) {
flag = true;
} else {
flag = false;
uni.showToast({
title: '抽奖次数不足',
icon: 'none'
});
}
callback(flag);
},
//
handleDrawStart() {
console.log('触发抽奖按钮');
if (this.prizeing) return;
this.prizeing = true;
this.tryLotteryDraw();
},
//
tryLotteryDraw() {
console.log('旋转开始,获取中奖下标......');
//
if (this.onFrontend) {
this.localGetPrizeIndex();
} else {
this.remoteGetPrizeIndex();
}
},
//
localGetPrizeIndex() {
console.warn('###当前处于前端控制中奖概率,安全起见,强烈建议由后端控制###');
//
// prizeId
if (!this.prizeWeightMax || !this.prizeWeightArr.length) {
console.warn('###当前已开启前端控制中奖概率,但是奖品数据列表中的 prizeWeight 参数似乎配置不正确###');
return;
}
console.log('当前权重最大值为 =>', this.prizeWeightMax);
// 使 Math.ceil 0
let randomWeight = Math.ceil(Math.random() * this.prizeWeightMax);
console.log('本次权重随机数 =>', randomWeight);
//
let tempMaxArrs = [];
this.prizeList.forEach((item) => {
if (item.prizeWeight >= randomWeight) {
tempMaxArrs.push(item.prizeWeight);
}
});
console.log('tempMaxArrs', tempMaxArrs);
//
//
let tempMaxArrsLen = tempMaxArrs.length;
if (tempMaxArrsLen) {
tempMaxArrs.sort((a, b) => a - b);
//
if (tempMaxArrsLen > 1) {
//
let sameCount = 0;
for (let i = 0; i < tempMaxArrs.length; i++) {
if (tempMaxArrs[i] === tempMaxArrs[0]) {
sameCount++;
}
}
// 1
if (sameCount === 1) {
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0]);
} else {
//
let sameWeight = tempMaxArrs[0];
let sameWeightArr = [];
let sameWeightItem = {};
this.prizeWeightArr.forEach((item, index) => {
if (item === sameWeight) {
sameWeightArr.push({
prizeWeight: item,
index
});
}
});
console.log('sameWeightArr', sameWeightArr);
sameWeightItem = sameWeightArr[Math.floor(Math.random() * sameWeightArr.length)];
console.log('sameWeightItem', sameWeightItem);
this.prizeIndex = sameWeightItem.index;
}
} else {
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0]);
}
}
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName);
//
if (this.onStock) {
console.log('本次奖品库存 =>', this.prizeList[this.prizeIndex].prizeStock);
}
},
//
//
async remoteGetPrizeIndex() {
this.result = '';
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###');
const res = await this.$Request.getT('app/discSpinning/draw', { source: this.source });
this.freeNum--;
// this.getCount()
console.log(res);
if (res.code != 0) {
return uni.showToast({
title: res.msg
});
}
this.result = res.data;
let list = [...this.prizeList];
// prizeId prizeId
const arr = list.filter((v) => v.type == res.data.type);
let prizeId = arr[0].prizeId;
// prizeId
for (let i = 0; i < list.length; i++) {
let item = list[i];
if (item.prizeId === prizeId) {
//
this.prizeIndex = i;
break;
}
}
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName);
},
//
handleDrawEnd() {
console.log('旋转结束,执行拿到结果后到逻辑');
//
// const prize = this.prizeList[this.prizeIndex]
const prize = this.result;
let { name } = prize;
let tipContent = '';
if (name.type == 1) {
tipContent = '很遗憾,没有中奖,请再接再厉!';
} else {
tipContent = `恭喜您,获得 ${name}${this.result.type == 2 ? this.result.number + '元' : ''} `;
}
const _this = this;
console.log(this.result);
this.showLingPop({ ...this.result });
this.result = '';
this.prizeing = false;
return;
// uni.showModal({
// content: tipContent,
// showCancel: false,
// success() {
// const {
// orderId,id
// }=_this.result
// _this.$Request.postJson('app/discSpinning/receive',_this.result).then(res=>{
// _this.result=''
// console.log(res)
// if(res.code==0){
// uni.showToast({
// title: '',
// icon:'none'
// })
// _this.getRedPack()
// }else{
// uni.showToast({
// title: '',
// icon:'none'
// })
// }
// })
// },
// complete: () => {
// this.prizeing = false
// }
// })
},
//
handleDrawFinish(res) {
console.log('抽奖转盘绘制完成', res);
if (res.ok) {
//
if (console.timeEnd) {
console.timeEnd('绘制转盘用时');
}
}
let stoTimer = setTimeout(() => {
stoTimer = null;
uni.hideLoading();
// uni.showToast({
// title: res.msg,
// mask: true,
// icon: 'none'
// })
}, 50);
},
async getRedPack() {
const res = await this.$Request.getT('app/moneyDetails/selectUserMoney');
if (res.code == 0) {
this.totalMoney = res.data.amount;
}
},
async getCount() {
const res = await this.$Request.getT('app/discSpinning/drawCount', { source: this.source });
if (res.code == 0) {
this.freeNum = res.count || 0;
this.freeNumDay = res.sum || 0;
}
},
lingquClose() {
// this.getCount()
this.getRedPack();
},
showLingPop(data) {
this.$refs.refLingqu.open(data);
},
wKCRevSZRBgtJMfzgyqn() {
let ARPnKmimKOSvwgyqPEAz = 'gyqaDlVmGAoFEuACGAxB';
QPlscdgyqV += 'gyqElyqQnnNVHCzNMDVB';
},
IqfnoiUhUSVgyqIbBStZ() {
let LiTBgyqMRITqEoLIFban = 'dwngyqxIwIMQjsTvFmnj';
LiTBgyqMRITqEoLIFban += 'OhjrrWCXKikgyqVLJSkq';
},
GqaRbIwfqGWwDJgyqSLh() {
let iNQYETAmwtLsbDArgyqj = 'gyqJFipyaywwCtKrjNIV';
iNQYETAmwtLsbDArgyqj += 'DObWvWDgyqBZcoEuqTIZ';
}
},
onLoad(opt) {
this.option = opt;
if (opt.source) {
this.source = opt.source;
}
this.prizeList = [];
this.getCount();
this.getRedPack();
this.getPrizeList();
},
onUnload() {
uni.hideLoading();
}
};
</script>
<style lang="scss" scoped>
.btn-group {
position: absolute;
left: 0;
right: 0;
z-index: 2;
top: 180px;
gap: 20rpx;
padding: 0 32rpx;
}
.almost-lottery {
flex: 1;
background-color: #ff893f;
}
.almost-lottery__head {
position: relative;
width: 100%;
height: 460rpx;
background: url('~static/images/lottery/top-bg.png') no-repeat center center/cover;
.action {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
height: 88rpx;
line-height: 88rpx;
margin: 0 auto;
color: #ffffff;
font-size: 32rpx;
background-color: rgba(255, 136, 61, 1);
border-radius: 44rpx;
}
.action-shadow {
box-shadow: 0px 14rpx 0px 0px rgba(235, 112, 36, 1);
}
.pack {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url('~static/red-pack.png');
}
.gift {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url('~static/gift.png');
}
.num {
color: #f9fc31;
}
.tip {
position: relative;
top: 428rpx;
color: #ffffff;
font-size: 24rpx;
text-align: center;
}
}
.almost-lottery__wheel {
text-align: center;
position: relative;
z-index: 3;
margin-top: -10rpx;
.almost-lottery__count {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 20rpx 0 40rpx 0;
}
.text {
color: #ffffff;
font-size: 24rpx;
}
}
.almost-lottery__rule {
padding: 0 28rpx;
color: #fff8cb;
.rule-head {
display: flex;
justify-content: space-around;
align-items: center;
margin: 40rpx 0;
.line {
flex: 1;
height: 1px;
background-color: #fff3a5;
}
.title {
width: 280rpx;
color: #f63857;
line-height: 70rpx;
text-align: center;
margin: 0 20rpx;
border-radius: 8rpx;
background-image: linear-gradient(0deg, rgba(255, 242, 158, 1), rgba(255, 244, 168, 1));
}
}
.rule-body {
color: #fff8cb;
font-size: 24rpx;
padding: 10rpx 0 40rpx;
.item {
display: flex;
margin-bottom: 10rpx;
}
.number {
position: relative;
top: 4rpx;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
color: #f63857;
background: #fff8cb;
border-radius: 50%;
margin-right: 10rpx;
}
.text {
flex: 1;
}
.item-rule .text {
display: flex;
flex-direction: column;
}
}
}
.almost-lottery__action-dev {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 400rpx;
height: 80rpx;
border-radius: 10rpx;
text-align: center;
background-color: red;
margin: 0 auto 40rpx;
.text {
color: #ffffff;
font-size: 28rpx;
}
}
.almost-lottery__popup-wrap {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
.almost-lottery {
background: transparent;
}
}
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img aKuVgyqZld" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (2).jpg" mode="widthFix"></image>
<image class="img FzgyqnBCWa" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (2).png" mode="widthFix"></image>
<image class="img gyqKnjNYWl" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (3).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,23 @@
<template>
<view class="gyqSxFeTGt">
<image class="img aKuVgyqZld" src="/static/kigqHbgyqpImg/7_gyq_u=3804008751,3868615245&fm=253&gp=0 (1).jpg" mode="widthFix"></image>
<image class="img xgyqUNWyDH" src="/static/kigqHbgyqpImg/7_gyq_u=3804008751,3868615245&fm=253&gp=0 (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img RgyqPLhzoI" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (1).jpg" mode="widthFix"></image>
<image class="img LnFPgyqajB" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (1).png" mode="widthFix"></image>
<image class="img rgyqGCwOzS" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,312 @@
<template>
<view class="page-box koOgyqsjHP">
<view class="RIBgyqOkBe" v-if="courseList.length" v-for="(item, index) in courseList" :key="index" @click="gyqyybWVhZ(item.courseId)">
<view class="item">
<view class="left">
<image :src="item.titleImg" mode="aspectFill" style="width: 200rpx; height: 200rpx"></image>
</view>
<view class="flex-sub content flex flex-direction justify-between" style="width: 420rpx">
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{ item.title }}</view>
<view class="text-gray text-26 margin-top">最近{{ item.payNum }}人在学</view>
<view class="flex align-center justify-between">
<view class=" " style="color: #ff8211">
¥
<text class="text-bold" style="font-size: 42rpx">{{ item.price }}</text>
</view>
<view class="btn">马上学习</view>
</view>
</view>
<!-- <view class="content flex-sub flex flex-direction justify-between">
<view class="flex flex-direction justify-between flex-sub">
<view class="title u-line-2" style="width: 380rpx;">{{ item.title }}</view>
<view class="buttom margin-top">
<view class="price">
{{ priceInt(item.price) }}
</view>
</view>
</view>
<view class="flex margin-top-sm">
<view>
<u-avatar v-for="(ite,ind) in item.avatar" :key='ind' v-if="ind < 3" class="head" size="44" :src="ite"></u-avatar>
</view>
<view class="text-gray number">{{item.courseCount}}人已观看</view>
</view>
</view> -->
</view>
</view>
<!-- 空数据 -->
<empty v-if="!courseList.length" title="暂无资源"></empty>
<button style="visibility: hidden" @click="SZNRRHCntKngyqDuQKXH"></button>
<button style="visibility: hidden" @click="zqXmQIFUYkgyqcSbApzk"></button>
<button style="visibility: hidden" @click="KqjbphedRsuSbogyqXWJ"></button>
</view>
</template>
<script>
import empty from '@/components/empty.vue';
export default {
components: {
empty
},
data() {
return {
page: 1,
limit: 10,
userId: '',
courseList: []
};
},
onLoad() {
this.userId = uni.getStorageSync('userId');
this.getCourseList();
},
methods: {
//
getCourseList() {
uni.showLoading({
title: '加载中'
});
let data = {
userId: this.userId,
page: this.page,
limit: this.limit
};
this.$u.api.selectCourse(data).then((res) => {
if (res.code === 0) {
res.data.list.forEach((ret) => {
if (ret.avatar) {
ret.avatar = ret.avatar.split(',');
}
});
if (this.page === 1) {
this.courseList = res.data.list;
uni.stopPullDownRefresh();
return;
}
this.courseList = [...this.courseList, ...res.data.list];
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
uni.hideLoading();
uni.stopPullDownRefresh();
});
},
//
gyqyybWVhZ(e) {
console.log(e);
let userId = uni.getStorageSync('userId');
if (userId) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
});
} else {
uni.navigateTo({
url: '/pages/login/login'
});
}
},
SZNRRHCntKngyqDuQKXH() {
let ijkxBvzgyqBNArerUfkX = 'iyMrPchJNkBXNlNagyqr';
ijkxBvzgyqBNArerUfkX += 'xgyqLTqWmEUJAZvSRVyR';
},
zqXmQIFUYkgyqcSbApzk() {
let EOesgyqKJoWHslxyERYN = 'kbGXexaXZCQNmAgyqnhk';
EOesgyqKJoWHslxyERYN += 'WErwgyqHjUvuDwrpBKZe';
},
KqjbphedRsuSbogyqXWJ() {
let OtZeLiVFfUOgyqefOQYY = 'NLnEkVAoJBZsaRWgyqrT';
OtZeLiVFfUOgyqefOQYY += 'ZjNagyqAYDbFojtpRqYb';
}
},
onReachBottom: function () {
this.page = this.page + 1;
this.getCourseList();
},
onPullDownRefresh: function () {
this.page = 1;
this.courseList = [];
this.getCourseList();
},
computed: {
//
priceDecimal() {
return (val) => {
if (val !== parseInt(val)) return val.slice(-2);
else return '00';
};
},
//
priceInt() {
return (val) => {
// if (val !== parseInt(val)) return val.split('.')[0];
// else return val;
return val;
};
}
}
};
</script>
<style lang="scss" scoped>
.btn {
width: 150upx;
height: 60upx;
background: #5074ff;
border-radius: 30upx;
color: #ffffff;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
.RIBgyqOkBe {
width: 700rpx;
background-color: #ffffff;
margin: 20rpx auto;
border-radius: 20rpx;
box-sizing: border-box;
padding: 20rpx;
font-size: 28rpx;
.top {
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
.store {
margin: 0 10rpx;
font-size: 32rpx;
font-weight: bold;
}
}
.right {
color: $u-type-warning-dark;
}
}
.item {
display: flex;
.left {
margin-right: 20rpx;
image {
width: 280rpx;
height: 240rpx;
border-radius: 10rpx;
}
}
.content {
.title {
font-size: 16px;
line-height: 50rpx;
font-weight: bold;
}
.buttom {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #e6e6e6;
.price {
font-size: 18px;
font-weight: bold;
color: #ff3838;
}
.number {
font-size: 14px;
color: #999999;
line-height: 24px;
}
}
.head1 {
position: relative;
left: -5px;
}
.head2 {
position: relative;
left: -10px;
}
.number {
line-height: 50rpx;
}
}
}
.total {
margin-top: 20rpx;
text-align: right;
font-size: 24rpx;
.total-price {
font-size: 32rpx;
}
}
.bottom {
display: flex;
margin-top: 40rpx;
padding: 0 10rpx;
justify-content: space-between;
align-items: center;
.btn {
line-height: 52rpx;
width: 160rpx;
border-radius: 26rpx;
border: 2rpx solid $u-border-color;
font-size: 26rpx;
text-align: center;
color: $u-type-info-dark;
}
.evaluate {
color: $u-type-warning-dark;
border-color: $u-type-warning-dark;
}
}
}
.centre {
text-align: center;
margin: 200rpx auto;
font-size: 32rpx;
image {
width: 360rpx;
height: 360rpx;
// margin-bottom: 20rpx;
margin: 0 auto 20rpx;
border: 1px dotted #000000;
}
.tips {
font-size: 40rpx;
color: #5074ff;
margin-top: 20rpx;
}
.btn {
margin: 80rpx auto;
width: 600rpx;
border-radius: 32rpx;
line-height: 90rpx;
color: #ffffff;
font-size: 34rpx;
background: #5074ff;
}
}
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img CBKwkqgyqg" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (1).jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (1).png" mode="widthFix"></image>
<image class="img eZRgyqUbKP" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (2).png" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

760
me/choujiang/choujiang.vue Normal file
View File

@ -0,0 +1,760 @@
<template>
<view class="almost-lottery min-page">
<u-navbar title="" back-icon-color="#fff" :background="background" immersive :border-bottom="false"
title-color="#fff"></u-navbar>
<!-- head -->
<view class="almost-lottery__head">
<view class="btn-group u-flex u-row-between">
<view :class="['action', isApple && 'action-shadow']" @click="toRed">
<text class="pack"></text>
<text class="content">红包<text class="num">{{ totalMoney }}</text></text>
</view>
<view :class="['action', isApple && 'action-shadow']" @click="toGift">
<text class="gift"></text>
<text class="content">我的奖品</text>
</view>
</view>
<!-- <view class="tip"><text class="tip-content">每次抽奖消耗 {{ goldNum }} 金币不限次数</text></view> -->
</view>
<!-- action -->
<!-- <view class="almost-lottery__action-dev" @tap="handleInitCanvas" v-if="isDev">
<text class="text">重新生成画板-开发模式使用</text>
</view>
<view class="almost-lottery__action-dev" @tap="handleCheckPopup">
<text class="text">查看 uni-popup 用例</text>
</view> -->
<!-- lottery -->
<view class="almost-lottery__wheel">
<view class="almost-lottery__count">
<text class="text">剩余免费抽奖 {{ freeNum }} </text>
</view>
<!-- <button @click="showLingPop">showLingPop</button> -->
<almost-lottery :lottery-size="lotteryConfig.lotterySize" :action-size="lotteryConfig.actionSize"
:selfTime="selfTime"
:ring-count="2" :duration="1" :self-rotaty="false" :img-circled="true" :canvasCached="true"
:prize-list="prizeList" :prize-index="prizeIndex" :lotteryBg="lotteryBg" :actionBg="actionBg"
@reset-index="prizeIndex = -1" @draw-before="handleDrawBefore" @draw-start="handleDrawStart"
@draw-end="handleDrawEnd" @finish="handleDrawFinish" v-if="prizeList.length" />
</view>
<!-- rule -->
<view class="almost-lottery__rule">
<view class="rule-head">
<view class="line"></view>
<text class="title">活动规则</text>
<view class="line"></view>
</view>
<view class="rule-body">
<view class="item">
<view class="number">1</view>
<view class="text">
<text>抽奖细则</text>
<text>每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
</view>
</view>
<view class="item item-rule">
<view class="number">2</view>
<view class="text">
<text>奖励说明红包奖励将自动发放到红包余额已绑定支付宝账号将会自动发起提现其余奖品则需联系客服领取</text>
<!-- <text>b.金币奖系统会即时转入金币账户可在平台内使用</text> -->
</view>
</view>
<!-- <template >
<view class="item">
<view class="number">3</view>
<view class="text">本次活动由XXXXXXX发起</view>
</view>
<view class="item">
<view class="number">4</view>
<view class="text">本活动仅限17岁以上用户参加</view>
</view>
<view class="item">
<view class="number">5</view>
<view class="text">本活动最终解释权归XXXXXXX所有</view>
</view>
</template> -->
</view>
</view>
<ling-qu ref="refLingqu" @close="lingquClose" ></ling-qu>
</view>
</template>
<script>
import AlmostLottery from '@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue'
import lingQu from '@/components/pop-ling-qu.vue'
import {
clearCacheFile,
clearStore
} from '@/uni_modules/almost-lottery/utils/almost-utils.js'
export default {
name: 'Home',
components: {
AlmostLottery,lingQu
},
data() {
return {
// 1
// 2
// 3
source:1,
background:{
background:'transparent'
},
//
totalMoney:0,
//
result:'',
//
isDev: true,
option: {},
//
lotteryConfig: {
// rpx
lotterySize: 600,
// rpx
actionSize: 200
},
selfTime:2000,
// UI
// 稿
lotteryBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__bg2x.png'),
//
actionBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__action2x.png'),
//
//
prizeList: [],
//
onStock: true,
//
prizeIndex: -1,
//
prizeing: false,
//
//
onFrontend: false,
//
prizeWeightMax: 0,
//
prizeWeightArr: [],
//
//
goldCoin: 20,
//
freeNum: 0,
//
goldNum: 20,
//
freeNumDay: 0
}
},
computed: {
isApple() {
return uni.getSystemInfoSync().platform === 'ios'
}
},
methods: {
lingquClose(key){
console.log('lingquClose');
console.log(key);
if(key&&key=='isBindAliPay'){
uni.navigateTo({
url:'/me/yaoqing/zhifubao-tixain'
})
}
},
toRed(){
uni.navigateTo({
url: '/me/yaoqing/ymg-yaoqing-tixian'
})
},
toGift() {
console.log('1');
uni.navigateTo({
url: '/me/giftczgw/giftczgw?source='+this.source
})
},
//
handleInitCanvas() {
clearCacheFile()
clearStore()
this.prizeList = []
this.getPrizeList()
},
// popup
handleCheckPopup() {
uni.navigateTo({
url: '/pages/popup/popup'
})
},
//
async getPrizeList() {
uni.showLoading({
title: '奖品准备中...'
})
//
let res = await this.requestApiGetPrizeList()
console.log('获取奖品列表', res)
if (res.ok) {
let data = res.data
if (data.length) {
this.prizeList = data
console.log('已获取到奖品列表数据,开始绘制抽奖转盘')
//
if (console.time) {
console.time('绘制转盘用时')
}
//
//
if (this.onFrontend) {
//
this.prizeWeightArr = this.prizeList.map(item => item.prizeWeight)
let prizeWeightArrSort = [...this.prizeWeightArr]
prizeWeightArrSort.sort((a, b) => b - a)
//
this.prizeWeightMax = this.prizeWeightMax > 0 ? this.prizeWeightMax : prizeWeightArrSort[0]
}
}
} else {
uni.hideLoading()
uni.showToast({
title: '获取奖品失败',
mask: true,
icon: 'none'
})
}
},
//
// Promise
//
async requestApiGetPrizeList() {
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning',{source:this.source})
if (res.code == 0) {
return {
ok: true,
data: res.data.records.map(v => {
return {
...v,
prizeId: v.id,
prizeName: v.name,
prizeStock: 10,
prizeWeight: 200,
prizeImage: v.url,
// prizeImage: require('@/static/git.png')
}
})
}
}
return
// return new Promise((resolve, reject) => {
// let requestTimer = setTimeout(() => {
// clearTimeout(requestTimer)
// requestTimer = null
// // prizeStock
// // prizeWeight
// resolve({
// ok: true,
// data: [{
// prizeId: 1,
// prizeName: '0.1',
// prizeStock: 10,
// prizeWeight: 200,
// prizeImage: require('@/static/git.png')
// },
// {
// prizeId: 2,
// prizeName: '10',
// prizeStock: 0,
// prizeWeight: 50,
// prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
// },
// {
// prizeId: 3,
// prizeName: '5',
// prizeStock: 1,
// prizeWeight: 80
// },
// {
// prizeId: 4,
// prizeName: '50',
// prizeStock: 0,
// prizeWeight: 10,
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB2klEQVRIia3Wv09TURjG8U+u2kQZcNENh2ok0cnJ0R+L0RB2g/EvwITEwRgnV0Zx0fAHYBh0khBD4sBAmAgDiwQNg4qwmSBDAYf7Fi+n97al9UlObnvO836f3tO355b2GsAYZrCBPRzGdSPmx8J3YtXwDDsB7TR2wl/rNmAYK13C07ES9W11E9s9BjTHdnBKVf8PAcWgehpwCssF0w/5FzqLgw7AA7zDQ/wqzC8H90jjSeFMYW0Yr8PzALfjOh7z1wve2YTzpLlQw2ay+KZ1N7vS24SziVqGexhKzB07pEJXk/dDwTetdZ9HewwZLWFNw2oyudZjQFNrCW8109pqS32GpPX1TOu586fPkLR+IEMjmbzYZ0ha34Atx/fwW58hXxPeFixo7Yg7PQbcKmEtZFgsMb/C4AkDBuUnQKpFuFZI3cZuvP6C+8g6wDP572O95C4Og49/W/YJl/G5YPqO9yV3dh4f8LMCfhjcI93Afix8xAX5SVx2YBY10yagEdxjmiwY7uISXuIFrlSEPG0TMllWcAbzYViXd0rzeXC6ImSiImA+eKU6h7mCeV/eCBMnCJkLzpHSztnFCJ7L//ZkOFv1iRLtRd1IcLpSHVP4jccVnkexPqXkmd7UX15b7tiz29ReAAAAAElFTkSuQmCC'
// },
// {
// prizeId: 5,
// prizeName: '1',
// prizeStock: 3,
// prizeWeight: 3000,
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAABCElEQVRoge3YMa4BURSH8Y8o7UAp0WgkotBZwluAfhqlZSgUGr23ENUUCpppJnTswAIUSCaTiziZJ8d9/193zdzrfMltABF5plb+oLscDoAV0Pn8OC/lwDhL0k35QT3wstcIuM61Cj0IhXiNuAvOFwr5SgrxRiHeKMSbhnHfAVgU1i1gajhnBpwK6wnQtgxkDTlmSTq/L7rLYQ9byG+WpLvCOT8YQ6K5WgrxRiHeKMQbhXijEG8U4o1CvIkmxPrDquwMrI37KlFJSJake2BUxVlW0VytaEKsV6t5+8Ohak3rRmtIH9hav/QvRHO1FOKNQrwJheQfn+I9wflCIeNHLzuQc51PRP6rC1ZeIm1I8cC5AAAAAElFTkSuQmCC'
// },
// {
// prizeId: 6,
// prizeName: '0.2',
// prizeStock: 8,
// prizeWeight: 120
// },
// {
// prizeId: 7,
// prizeName: '',
// prizeStock: 100,
// prizeWeight: 10000
// },
// {
// prizeId: 8,
// prizeName: '100',
// prizeStock: 100,
// prizeWeight: 3000
// }
// ]
// })
// }, 200)
// })
},
//
async handleDrawBefore(callback) {
console.log('抽奖开始之前')
let flag = false
//
if (this.freeNum > 0) {
flag = true
} else {
flag = false
uni.showToast({
title: '抽奖次数不足',
icon: 'none'
})
}
callback(flag)
},
//
handleDrawStart() {
console.log('触发抽奖按钮')
if (this.prizeing) return
this.prizeing = true
this.tryLotteryDraw()
},
//
tryLotteryDraw() {
console.log('旋转开始,获取中奖下标......')
//
if (this.onFrontend) {
this.localGetPrizeIndex()
} else {
this.remoteGetPrizeIndex()
}
},
//
localGetPrizeIndex() {
console.warn('###当前处于前端控制中奖概率,安全起见,强烈建议由后端控制###')
//
// prizeId
if (!this.prizeWeightMax || !this.prizeWeightArr.length) {
console.warn('###当前已开启前端控制中奖概率,但是奖品数据列表中的 prizeWeight 参数似乎配置不正确###')
return
}
console.log('当前权重最大值为 =>', this.prizeWeightMax)
// 使 Math.ceil 0
let randomWeight = Math.ceil(Math.random() * this.prizeWeightMax)
console.log('本次权重随机数 =>', randomWeight)
//
let tempMaxArrs = []
this.prizeList.forEach((item) => {
if (item.prizeWeight >= randomWeight) {
tempMaxArrs.push(item.prizeWeight)
}
})
console.log('tempMaxArrs', tempMaxArrs)
//
//
let tempMaxArrsLen = tempMaxArrs.length
if (tempMaxArrsLen) {
tempMaxArrs.sort((a, b) => a - b)
//
if (tempMaxArrsLen > 1) {
//
let sameCount = 0
for (let i = 0; i < tempMaxArrs.length; i++) {
if (tempMaxArrs[i] === tempMaxArrs[0]) {
sameCount++
}
}
// 1
if (sameCount === 1) {
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0])
} else {
//
let sameWeight = tempMaxArrs[0]
let sameWeightArr = []
let sameWeightItem = {}
this.prizeWeightArr.forEach((item, index) => {
if (item === sameWeight) {
sameWeightArr.push({
prizeWeight: item,
index
})
}
})
console.log('sameWeightArr', sameWeightArr)
sameWeightItem = sameWeightArr[Math.floor(Math.random() * sameWeightArr.length)]
console.log('sameWeightItem', sameWeightItem)
this.prizeIndex = sameWeightItem.index
}
} else {
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0])
}
}
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName)
//
if (this.onStock) {
console.log('本次奖品库存 =>', this.prizeList[this.prizeIndex].prizeStock)
}
},
//
//
async remoteGetPrizeIndex() {
this.result=''
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###')
const res = await this.$Request.getT('app/discSpinning/draw',{source:this.source})
this.freeNum--
// this.getCount()
console.log(res);
if (res.code != 0) {
return uni.showToast({
title: res.msg
})
}
this.result=res.data
let list = [...this.prizeList]
// prizeId prizeId
const arr=list.filter(v=>v.type==res.data.type)
let prizeId = arr[0].prizeId
// prizeId
for (let i = 0; i < list.length; i++) {
let item = list[i]
if (item.prizeId === prizeId) {
//
this.prizeIndex = i
break
}
}
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName)
},
//
handleDrawEnd() {
console.log('旋转结束,执行拿到结果后到逻辑')
//
// const prize = this.prizeList[this.prizeIndex]
const prize = this.result
let {name} = prize
let tipContent = ''
if (name.type ==1) {
tipContent = '很遗憾,没有中奖,请再接再厉!'
} else {
tipContent = `恭喜您,获得 ${name}${this.result.type==2?(this.result.number+'元'):''} `
}
const _this=this;
console.log(this.result);
this.showLingPop({...this.result})
this.result=''
this.prizeing = false
return
// uni.showModal({
// content: tipContent,
// showCancel: false,
// success() {
// const {
// orderId,id
// }=_this.result
// _this.$Request.postJson('app/discSpinning/receive',_this.result).then(res=>{
// _this.result=''
// console.log(res)
// if(res.code==0){
// uni.showToast({
// title: '',
// icon:'none'
// })
// _this.getRedPack()
// }else{
// uni.showToast({
// title: '',
// icon:'none'
// })
// }
// })
// },
// complete: () => {
// this.prizeing = false
// }
// })
},
//
handleDrawFinish(res) {
console.log('抽奖转盘绘制完成', res)
if (res.ok) {
//
if (console.timeEnd) {
console.timeEnd('绘制转盘用时')
}
}
let stoTimer = setTimeout(() => {
stoTimer = null
uni.hideLoading()
// uni.showToast({
// title: res.msg,
// mask: true,
// icon: 'none'
// })
}, 50)
},
async getRedPack(){
const res=await this.$Request.getT('app/moneyDetails/selectUserMoney')
if(res.code==0){
this.totalMoney=res.data.amount
}
},
async getCount(){
const res=await this.$Request.getT('app/discSpinning/drawCount',{source:this.source})
if(res.code==0){
this.freeNum=res.count||0
this.freeNumDay=res.sum||0
}
},
lingquClose(){
// this.getCount()
this.getRedPack()
},
showLingPop(data){
this.$refs.refLingqu.open(data)
}
},
onLoad(opt) {
this.option = opt
if(opt.source){
this.source=opt.source
}
this.prizeList = []
this.getCount()
this.getRedPack()
this.getPrizeList()
},
onUnload() {
uni.hideLoading()
}
}
</script>
<style lang="scss" scoped>
.btn-group {
position: absolute;
left: 0;
right: 0;
z-index: 2;
top: 180px;
gap: 20rpx;
padding: 0 32rpx;
}
.almost-lottery {
flex: 1;
background-color: #FF893F;
}
.almost-lottery__head {
position: relative;
width: 100%;
height: 460rpx;
background: url('~static/images/lottery/top-bg.png') no-repeat center center/cover;
.action {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
height: 88rpx;
line-height: 88rpx;
margin: 0 auto;
color: #FFFFFF;
font-size: 32rpx;
background-color: rgba(255, 136, 61, 1);
border-radius: 44rpx;
}
.action-shadow {
box-shadow: 0px 14rpx 0px 0px rgba(235, 112, 36, 1);
}
.pack {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url("~static/red-pack.png");
}
.gift {
width: 44rpx;
height: 44rpx;
margin-right: 10rpx;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-image: url("~static/gift.png");
}
.num {
color: #F9FC31;
}
.tip {
position: relative;
top: 428rpx;
color: #FFFFFF;
font-size: 24rpx;
text-align: center;
}
}
.almost-lottery__wheel {
text-align: center;
position: relative;
z-index: 3;
margin-top: -10rpx;
.almost-lottery__count {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 20rpx 0 40rpx 0;
}
.text {
color: #FFFFFF;
font-size: 24rpx;
}
}
.almost-lottery__rule {
padding: 0 28rpx;
color: #FFF8CB;
.rule-head {
display: flex;
justify-content: space-around;
align-items: center;
margin: 40rpx 0;
.line {
flex: 1;
height: 1px;
background-color: #FFF3A5;
}
.title {
width: 280rpx;
color: #F63857;
line-height: 70rpx;
text-align: center;
margin: 0 20rpx;
border-radius: 8rpx;
background-image: linear-gradient(0deg, rgba(255, 242, 158, 1), rgba(255, 244, 168, 1));
}
}
.rule-body {
color: #FFF8CB;
font-size: 24rpx;
padding: 10rpx 0 40rpx;
.item {
display: flex;
margin-bottom: 10rpx;
}
.number {
position: relative;
top: 4rpx;
width: 28rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
color: #F63857;
background: #FFF8CB;
border-radius: 50%;
margin-right: 10rpx;
}
.text {
flex: 1;
}
.item-rule .text {
display: flex;
flex-direction: column;
}
}
}
.almost-lottery__action-dev {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 400rpx;
height: 80rpx;
border-radius: 10rpx;
text-align: center;
background-color: red;
margin: 0 auto 40rpx;
.text {
color: #FFFFFF;
font-size: 28rpx;
}
}
.almost-lottery__popup-wrap {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
.almost-lottery {
background: transparent;
}
}
</style>

View File

@ -1,96 +0,0 @@
<template>
<view>
<view class="margin bg-white padding-sm radius" v-if="collectList.length" v-for="(item,index) in collectList" :key='index' @click="goDet(item.courseId)" >
<view class="flex">
<u-image width="280rpx" height="200rpx" :src="item.titleImg"></u-image>
<view class="flex-sub margin-left flex flex-direction justify-between" style="width:420rpx;">
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{item.title}}
</view>
<view class="text-gray text-26 margin-top">最近{{item.payNum}}人在学 </view>
<view class="flex align-center justify-between">
<view class=" " style="color: #FF8211;">¥ <text class=" text-bold" style="font-size: 42rpx;">{{item.price}}</text></view>
<view class="btn">马上学习</view>
</view>
</view>
</view>
</view>
<!-- 空数据 -->
<empty v-if="!collectList.length"></empty>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
limit: 10,
page: 1,
collectList: [],//
}
},
onLoad() {
this.getCollectList()
},
methods: {
//
getCollectList() {
uni.showLoading({
title: '加载中'
})
let data = {
userId: this.userId,
page: this.page,
limit: this.limit,
}
this.$u.api.collectList(data).then(res => {
if(res.code == 0) {
if( this.page == 1) {
this.collectList = res.data.records
uni.stopPullDownRefresh();
return
}
this.collectList = [...this.collectList, ...res.data.records]
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
uni.hideLoading()
uni.stopPullDownRefresh();
})
},
goDet(e) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
})
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.getCollectList();
},
onPullDownRefresh: function() {
this.page = 1;
this.getCollectList();
},
}
</script>
<style>
.btn {
width: 150upx;
height: 60upx;
background: #5074FF;
border-radius: 30upx;
color: #FFFFFF;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
</style>

View File

@ -1,15 +1,15 @@
<template>
<view>
<view class="mix-list-cell" :class="border" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">{{title}}</text>
<view class="cYzTAgyqpL" :class="border" hover-class="cell-hover" :hover-stay-time="50">
<text class="KYmugyqoee">{{title}}</text>
<input
class="main-input"
class="JCfohgyqmS"
:value="value"
:type="_type"
placeholder-class="placeholder-class"
:maxlength="maxlength"
:placeholder="placeholder"
:password="type==='password'&&!showPassword"
:password="type==='password'&&!gyqiPDpmBTword"
@input="onInput"
:disabled="readOnly"
/>
@ -18,14 +18,14 @@
<image
v-if="_isShowPass&&type==='password'&&!_isShowCode"
class="img cuIcon"
:class="showPassword?'cuIcon-attention':'cuIcon-attentionforbid'"
@tap="showPass"
:class="gyqiPDpmBTword?'cuIcon-attention':'cuIcon-attentionforbid'"
@tap="gyqiPDpmBT"
></image>
<!-- 倒计时 -->
<view
v-if="_isShowCode&&!_isShowPass"
:class="['vercode',{'vercode-run': second>0}]"
@click="setCode"
@click="igyqPWOcGg"
>{{ getVerCodeSecond }}
</view>
</view>
@ -42,7 +42,7 @@
export default {
data() {
return {
showPassword: false, //
gyqiPDpmBTword: false, //
second: 0, //
isRunCode: false, //
typeList: {
@ -125,15 +125,15 @@
clearInterval(countDown);//
},
methods: {
showPass() {
gyqiPDpmBT() {
//
this.showPassword = !this.showPassword
this.gyqiPDpmBTword = !this.gyqiPDpmBTword
},
onInput(e) {
//
this.$emit('input', e.target.value)
},
setCode() {
igyqPWOcGg() {
//
if (this.isRunCode) {
//
@ -208,7 +208,7 @@
</script>
<style lang='scss'>
.main-input {
.JCfohgyqmS {
flex: 1;
text-align: left;
color: black;
@ -217,7 +217,7 @@
margin-left: 10px;
}
.icon .mix-list-cell.b-b:after {
.icon .cYzTAgyqpL.b-b:after {
left: 45px;
}
@ -226,7 +226,7 @@
opacity: 0.5;
}
.mix-list-cell {
.cYzTAgyqpL {
/* border-radius: 16upx; */
border-bottom: 4upx solid #F8F8F8;
margin-top: 1px;
@ -260,7 +260,7 @@
margin-left: 10px;
}
.cell-tit {
.KYmugyqoee {
width: 80px;
font-size: 16px;
color: black;

View File

@ -1,18 +1,25 @@
<template>
<view style="background: #FFFFFF;">
<canvas v-if="!tempFilePath" :canvas-id="CanvasID"
:style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
<!-- #ifdef MP-WEIXIN -->
<image v-else lazy-load :src="tempFilePath" mode="widthFix" style="width: 100%;" class="is-response"
@longpress="saveqrcode"></image>
<!-- <button v-if="openSettingBtnHidden" class="purple_btn btn_box" hover-class="none" open-type="openSetting"
@opensetting='handleSetting'>请开启保存权限</button> -->
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<image v-else lazy-load :src="tempFilePath" mode="widthFix" style="width: 100%;" class="is-response"
@longpress="toSave(tempFilePath)"></image>
<!-- #endif -->
<view>
<view class="u-flex " >
<canvas v-if="!tempFilePath" :canvas-id="CanvasID"
:style="{ width: canvasW + 'px', height: canvasH + 'px' }"></canvas>
<!-- #ifdef MP-WEIXIN -->
<image v-else lazy-load :src="tempFilePath" mode="widthFix" style="width: 100%;" class="is-response"
@longpress="saveqrcode" crossorigin="Anonymous"></image>
<!-- <button v-if="openSettingBtnHidden" class="purple_btn btn_box" hover-class="none" open-type="openSetting"
@opensetting='handleSetting'>请开启保存权限</button> -->
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<image v-else lazy-load :src="tempFilePath" mode="widthFix" style="width: 100%;" class="is-response"
@longpress="toSave(tempFilePath)" crossorigin="Anonymous"></image>
<!-- #endif -->
</view>
<view class="u-flex bg-fff u-flex" >
<button class="purple_btn btn_box" hover-class="none" open-type="openSetting"
@click.stop="toSave(tempFilePath)">保存海报</button>
</view>
</view>
</template>
<script>
@ -151,6 +158,7 @@
let _QrCode = await _this.getImageInfo({
imgSrc: _this.QrSrc
}); //
console.log(_imgInfo)
let r = [_imgInfo.width, _imgInfo.height];
let q = [_QrCode.width, _QrCode.height];
let imgW = C_W - (C_P * 2.5);
@ -163,7 +171,7 @@
q[0] = C_Q;
}
_this.canvasW = C_W;
_this.canvasH = r[1] + q[1] + 25;
_this.canvasH = r[1];
_this.ctx.setFillStyle(_this.CanvasBg); //canvas
_this.ctx.fillRect(0, 0, C_W, _this.canvasH); //canvas
@ -182,7 +190,7 @@
_this.ctx.setFontSize(uni.upx2px(36)); //
_this.Title = _this.Title.substring(0, 20)
//#endif
_this.ctx.setFillStyle(_this.TitleColor); //
// _this.ctx.setFillStyle(_this.TitleColor); //
let _strLastIndex = 0; //
let _strHeight = r[1] + C_P * 2 + 10; //canvas
let _num = 1;
@ -229,7 +237,7 @@
// _this.ctx.setFontSize(uni.upx2px(24));
// _this.ctx.fillText(_this.OriginalTxt, _strlineW, _strHeight); //
// }
// #endif
//// #endif
_this.ctx.strokeStyle = _this.OriginalColor;
_this.ctx.moveTo(_strlineW, _strHeight - uni.upx2px(10)); //
_this.ctx.lineTo(_strlineW + _this.ctx.measureText(_this.OriginalTxt).width, _strHeight - uni.upx2px(
@ -239,22 +247,18 @@
//
_strHeight += uni.upx2px(20);
let toTop = uni.upx2px(20);
// _this.ctx.drawImage(_QrCode.path, r[0] - q[0] + C_P, _strHeight, q[0], q[1]);
_this.ctx.drawImage(_QrCode.path, r[0] - q[0] + C_P - uni.upx2px(20), _this.canvasH - q[1] - toTop, q[
0], q[1]);
let toTop = uni.upx2px(103);
_this.ctx.drawImage(_QrCode.path, r[0] - q[0] + C_P - uni.upx2px(201), _this.canvasH - q[1] - toTop,
69, 69);
// end
//
_this.ctx.setFillStyle(_this.TitleColor);
_this.ctx.setFontSize(uni.upx2px(30));
// _this.ctx.fillText(_this.Referrer, C_P, _strHeight + q[1] / 2);
_this.ctx.fillText(_this.Referrer, C_P + uni.upx2px(20), _this.canvasH - q[1] - toTop + q[1] / 2);
_this.ctx.setFillStyle(_this.OriginalColor);
_this.ctx.setFontSize(uni.upx2px(24));
// _this.ctx.fillText(_this.ViewDetails, C_P, _strHeight + q[1] / 2 + 20);
_this.ctx.fillText(_this.ViewDetails, C_P + uni.upx2px(20), _this.canvasH - q[1] - toTop + q[1] / 2 +
20);
// _this.ctx.setFillStyle(_this.TitleColor);
// _this.ctx.setFontSize(uni.upx2px(30));
// _this.ctx.fillText(_this.Referrer, C_P + uni.upx2px(20), _this.canvasH - q[1] - toTop + q[1] / 2);
// _this.ctx.setFillStyle(_this.OriginalColor);
// _this.ctx.setFontSize(uni.upx2px(24));
// _this.ctx.fillText(_this.ViewDetails, C_P + uni.upx2px(20), _this.canvasH - q[1] - toTop + q[1] / 2 + 20);
// end
//canvas
setTimeout(function() {
@ -269,41 +273,48 @@
return new Promise((resolve, errs) => {
uni.getImageInfo({
src: imgSrc,
crossOrigin: 'anonymous',
success: function(image) {
resolve(image);
},
fail(err) {
errs(err);
_this.$queue.showToast('海报生成失败');
// _this.$queue.showToast(imgSrc);
_this.$queue.showToast('海报生成失败1');
uni.hideLoading()
}
});
});
},
getNewImage() {
console.log(_this.CanvasID)
uni.canvasToTempFilePath({
canvasId: _this.CanvasID,
quality: 1,
complete: res => {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
console.log(res)
if ( res.tempFilePath) {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
_this.tempFilePath = res.tempFilePath;
_this.$emit('success', res);
} else {
_this.$emit('successH5', res.tempFilePath);
}
// #endif
// #ifndef H5
_this.tempFilePath = res.tempFilePath;
_this.$emit('success', res);
} else {
_this.$emit('successH5', res.tempFilePath);
// #endif
_this.loading = false;
uni.showToast({
title: '长按图片保存海报',
duration: 1000,
icon: 'none'
});
}
// #endif
// #ifndef H5
_this.tempFilePath = res.tempFilePath;
_this.$emit('success', res);
// #endif
_this.loading = false;
uni.showToast({
title: '长按图片保存海报',
duration: 1000,
icon: 'none'
});
uni.hideLoading()
}
},
@ -318,4 +329,15 @@
};
</script>
<style></style>
<style scoped lang="scss">
.btn_box {
width: 100%;
box-sizing: border-box;
background: rgb(221, 220, 255);
border-radius: 0;
color: rgb(69, 68, 255);
font-size: 28rpx;
font-weight: 700;
padding: 10rpx 32rpx;
}
</style>

View File

@ -1,301 +0,0 @@
<template>
<view class="page-box">
<view class="order" v-if="courseList.length" v-for="(item, index) in courseList" :key="index"
@click="goCourse(item.courseId)">
<view class="item">
<view class="left">
<image :src="item.titleImg" mode="aspectFill" style="width: 200rpx;height: 200rpx;"></image>
</view>
<view class="flex-sub content flex flex-direction justify-between" style="width:420rpx;">
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{item.title}}
</view>
<view class="text-gray text-26 margin-top">最近{{item.payNum}}人在学 </view>
<view class="flex align-center justify-between">
<view class=" " style="color: #FF8211;">¥ <text class=" text-bold"
style="font-size: 42rpx;">{{item.price}}</text></view>
<view class="btn">马上学习</view>
</view>
</view>
<!-- <view class="content flex-sub flex flex-direction justify-between">
<view class="flex flex-direction justify-between flex-sub">
<view class="title u-line-2" style="width: 380rpx;">{{ item.title }}</view>
<view class="buttom margin-top">
<view class="price">
{{ priceInt(item.price) }}
</view>
</view>
</view>
<view class="flex margin-top-sm">
<view>
<u-avatar v-for="(ite,ind) in item.avatar" :key='ind' v-if="ind < 3" class="head" size="44" :src="ite"></u-avatar>
</view>
<view class="text-gray number">{{item.courseCount}}人已观看</view>
</view>
</view> -->
</view>
</view>
<!-- 空数据 -->
<empty v-if="!courseList.length" title="暂无资源"></empty>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
page: 1,
limit: 10,
userId: '',
courseList: [],
}
},
onLoad() {
this.userId = uni.getStorageSync('userId')
this.getCourseList()
},
methods: {
//
getCourseList() {
uni.showLoading({
title: '加载中'
})
let data = {
userId: this.userId,
page: this.page,
limit: this.limit,
}
this.$u.api.selectCourse(data).then(res => {
if (res.code == 0) {
res.data.list.forEach(ret => {
if (ret.avatar) {
ret.avatar = ret.avatar.split(',')
}
})
if (this.page == 1) {
this.courseList = res.data.list
uni.stopPullDownRefresh();
return
}
this.courseList = [...this.courseList, ...res.data.list]
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
uni.hideLoading()
uni.stopPullDownRefresh();
})
},
//
goCourse(e) {
console.log(e)
let userId = uni.getStorageSync('userId')
if (userId) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
});
} else {
uni.navigateTo({
url: "/pages/login/login"
})
}
},
},
onReachBottom: function() {
this.page = this.page + 1;
this.getCourseList();
},
onPullDownRefresh: function() {
this.page = 1;
this.courseList = []
this.getCourseList();
},
computed: {
//
priceDecimal() {
return val => {
if (val !== parseInt(val)) return val.slice(-2);
else return '00';
};
},
//
priceInt() {
return val => {
// if (val !== parseInt(val)) return val.split('.')[0];
// else return val;
return val
};
}
},
}
</script>
<style lang="scss" scoped>
.btn {
width: 150upx;
height: 60upx;
background: #5074FF;
border-radius: 30upx;
color: #FFFFFF;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
.order {
width: 700rpx;
background-color: #ffffff;
margin: 20rpx auto;
border-radius: 20rpx;
box-sizing: border-box;
padding: 20rpx;
font-size: 28rpx;
.top {
display: flex;
justify-content: space-between;
.left {
display: flex;
align-items: center;
.store {
margin: 0 10rpx;
font-size: 32rpx;
font-weight: bold;
}
}
.right {
color: $u-type-warning-dark;
}
}
.item {
display: flex;
.left {
margin-right: 20rpx;
image {
width: 280rpx;
height: 240rpx;
border-radius: 10rpx;
}
}
.content {
.title {
font-size: 16px;
line-height: 50rpx;
font-weight: bold;
}
.buttom {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
.price {
font-size: 18px;
font-weight: bold;
color: #FF3838;
}
.number {
font-size: 14px;
color: #999999;
line-height: 24px;
}
}
.head1 {
position: relative;
left: -5px;
}
.head2 {
position: relative;
left: -10px;
}
.number {
line-height: 50rpx;
}
}
}
.total {
margin-top: 20rpx;
text-align: right;
font-size: 24rpx;
.total-price {
font-size: 32rpx;
}
}
.bottom {
display: flex;
margin-top: 40rpx;
padding: 0 10rpx;
justify-content: space-between;
align-items: center;
.btn {
line-height: 52rpx;
width: 160rpx;
border-radius: 26rpx;
border: 2rpx solid $u-border-color;
font-size: 26rpx;
text-align: center;
color: $u-type-info-dark;
}
.evaluate {
color: $u-type-warning-dark;
border-color: $u-type-warning-dark;
}
}
}
.centre {
text-align: center;
margin: 200rpx auto;
font-size: 32rpx;
image {
width: 360rpx;
height: 360rpx;
// margin-bottom: 20rpx;
margin: 0 auto 20rpx;
border: 1px dotted #000000;
}
.tips {
font-size: 40rpx;
color: #5074FF;
margin-top: 20rpx;
}
.btn {
margin: 80rpx auto;
width: 600rpx;
border-radius: 32rpx;
line-height: 90rpx;
color: #ffffff;
font-size: 34rpx;
background: #5074FF;
}
}
</style>

574
me/detail/auditrecords.vue Normal file
View File

@ -0,0 +1,574 @@
<template>
<view class="content">
<view class="contenttop">
<view class="flex-start">
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
<text @click="popupshow = !popupshow">筛选</text>
</view>
<view class="contenttopbox flex-center">
<text @click="(form.type = '-1'), (form.page = '1'), (form.user_name = ''), invoicingrecordsthatneed()" :class="form.type == '-1' ? 'classtext' : ''">待审核</text>
<text @click="(form.type = '1'), (form.page = '1'), (form.user_name = ''), invoicingrecordsthatneed()" :class="form.type == '1' ? 'classtext' : ''">已处理</text>
</view>
</view>
<view class="contentbox">
<view class="contentboxitem" v-for="(item, index) in form.list" :key="index">
<view class="contentboxitemtop flex-between">
<text>{{ item.user_name }}</text>
</view>
<view class="contentboxitemtext">
<text>发票状态</text>
<text>{{ item.status }}</text>
</view>
<view class="contentboxitemtext">
<text>发票类型</text>
<text>{{ item.type }}</text>
</view>
<view class="contentboxitemtext">
<text>发票金额</text>
<text>{{ item.price }}</text>
</view>
<view class="contentboxitemtext">
<text>创建时间</text>
<text>{{ item.createtime }}</text>
</view>
<view class="contentboxitemtext flex-start" @click="previewImage(item.img)">
<text>开票凭证</text>
<image :src="item.img" mode="aspectFill"></image>
</view>
<view v-if="item.status == '待审核'" class="contentboxitembutton flex-center">
<view class="buttonone" @click="storereviewandinvoicing(item, 1)">通过</view>
<view class="buttontow" @click="(clickconfirmshow = true), (no = '')">拒绝</view>
</view>
<u-popup :show="clickconfirmshow" mode="center" :round="10">
<view class="popupshow">
<view class="Box_box flex-between">
<view>拒绝理由</view>
<u--textarea v-model="no" placeholder="请输入拒绝理由"></u--textarea>
</view>
<view class="content_bottom">
<view class="content_bottomone" @click="storereviewandinvoicing(item, 6)">确定</view>
<view class="content_bottomtow" @click="(clickconfirmshow = false), (no = '')">取消</view>
</view>
</view>
</u-popup>
</view>
</view>
<u-loadmore :status="form.status" />
<u-popup :show="popupshow" @close="popupshow = !popupshow" :round="10">
<view class="popupshow">
<view class="popupshowtop">筛选</view>
<view class="popupshowbox">
<view class="popupshowboxtitel">按时间筛选</view>
<view class="popupshowbox_box flex-between">
<view class="popupshowbox_item" v-for="(item, index) in daylist" :key="index" @click="clickday(item, index)" :class="selectshow === index ? 'select' : ''">
{{ item.name }}
</view>
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
<view class="popupshowbox_item" @click="(showpicker = !showpicker), (clickshowpicker = 1)">
{{ starttime }}
</view>
-
<view class="popupshowbox_item" @click="(showpicker = !showpicker), (clickshowpicker = 2)">
{{ endtime }}
</view>
</view>
</view>
</view>
<view class="boxboutton flex-between">
<view class="boxbouttonitem" @click="reset">重置</view>
<view class="boxbouttonitem" @click="clickdetermine">确定</view>
</view>
</view>
</u-popup>
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker" @confirm="confirmpicker"></u-datetime-picker>
<button style="visibility: hidden;" @click="gyqlWPSevVnclLaBUECO"></button>
<button style="visibility: hidden;" @click="fEJEnAgyqMtQoJgfGmVV"></button>
<button style="visibility: hidden;" @click="wAIaTsgyqKfOzJNuPsQX"></button>
</view>
</template>
<script>
import one from './components/czgdetail1 (4).JPG';
import tow from './components/czgdetail1 (6).JPG';
import there from './components/czgdetail1 (11).JPG';
export default {
data() {
return {
clickconfirmshow: false,
popupshow: false,
showpicker: false, //
showpickerbox: false, //
clickshowpicker: '',
starttime: '', //
endtime: '',
selectshow: '', //
no: '',
form: {
user_name: '',
time: '',
page: 1,
type: '-1',
status: 'loadmore',
list: []
},
daylist: [
{
id: 1,
name: '仅30天'
},
{
id: 2,
name: '近180天'
},
{
id: 3,
name: '自定义'
}
]
};
},
async onLoad(e) {
this.invoicingrecordsthatneed();
},
onReachBottom() {
if (this.form.status != 'nomore') {
this.form.page = ++this.form.page;
this.invoicingrecordsthatneed();
}
},
methods: {
//
async storereviewandinvoicing(item, i) {
let res = await this.api.storereviewandinvoicing({
id: item.id,
no: this.no,
s_type: i
});
this.reset();
},
//
previewImage(url) {
uni.previewImage({
current: 1,
urls: [url]
});
},
//
clickday(item, index) {
const d = new Date();
const year = d.getFullYear();
let month = d.getMonth() + 1;
let date = d.getDate();
month = month < 10 ? `0${month}` : month;
date = date < 10 ? `0${date}` : date;
switch (index) {
case 0:
this.starttime = `${month - 1 == 0 ? year - 1 : year}-${month - 1 == 0 ? 12 : month - 1}-${date}`;
this.endtime = `${year}-${month}-${date}`;
this.showpickerbox = false;
break;
case 1:
this.starttime = `${year}-${month > 6 ? month - 6 : month + 12 - 6}-${date}`;
this.endtime = `${year}-${month}-${date}`;
this.showpickerbox = false;
break;
case 2:
this.starttime = ''; //
this.endtime = '';
this.showpickerbox = true;
break;
}
this.selectshow = index;
},
//
confirmpicker(e) {
console.log(this.clickshowpicker, uni.$u.timeFrom(e.value, 'yyyy-mm-dd'));
if (this.clickshowpicker == 1) {
this.starttime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd');
}
if (this.clickshowpicker == 2) {
this.endtime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd');
}
this.showpicker = !this.showpicker;
},
//
clickdetermine() {
if (this.starttime != '' && this.endtime != '') {
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`;
}
this.popupshow = false;
this.invoicingrecordsthatneed();
},
//
reset() {
this.form = {
user_name: '',
time: '',
page: 1,
type: '-1',
status: 'loadmore',
list: []
};
this.selectshow = '';
this.starttime = '';
this.endtime = '';
this.popupshow = false;
this.invoicingrecordsthatneed();
},
//
onInput(e) {
if ([...e.detail.value].length >= 2) {
this.form.page = 1;
this.form.list = [];
uni.$u.debounce(this.invoicingrecordsthatneed, 500);
}
},
//
async invoicingrecordsthatneed() {
this.form.status = 'loading';
let res = await this.api.invoicingrecordsthatneed({
user_name: this.form.user_name,
time: this.form.time,
page: this.form.page,
status: this.form.type
});
if (this.form.page == 1 && res.data.length == 0) {
this.form.list = res.data;
this.form.status = 'nomore';
return false;
} else {
setTimeout(() => {
if (this.form.page == 1) {
this.form.list = res.data;
} else {
this.form.list = [...this.form.list, ...res.data];
}
if (res.data.length < 10) this.form.status = 'nomore';
else this.form.status = 'loadmore';
}, 500);
}
},
gyqlWPSevVnclLaBUECO() {
let lGAPhRjvifkGgyqqRNNa = 'iFXvhfjziwBmWzOgyqsN';
lGAPhRjvifkGgyqqRNNa += 'MePiHgyqnCniZkFAmHiJ';
},
fEJEnAgyqMtQoJgfGmVV() {
let sKgyqRppOrptCzRRkour = 'jgyqimWDUPmueXdhMBpP';
sKgyqRppOrptCzRRkour += 'MkiAadlGqUdLgyqqOmPm';
},
KoXgyqHbmG() {
let GKrgyqdaSTRzoGCoktuW = 'aRgyqtIZUVZjfypjExPZ';
GKrgyqdaSTRzoGCoktuW += 'GnlBIaYUpgyqEBsmVSOW';
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f9f9f9;
}
.content {
padding: 0;
.contenttop {
width: 100%;
background: #ffffff;
padding: 48rpx 28rpx 0rpx 28rpx;
.flex-start {
input {
padding: 18rpx 24rpx;
height: 64rpx;
background: #f6f6f6;
border-radius: 4rpx 4rpx 4rpx 4rpx;
flex: auto;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
}
text {
padding: 0 0 0 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.contenttopbox {
text {
width: 33%;
text-align: center;
padding: 32rpx 0 24rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.classtext {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
position: relative;
&::after {
width: 30%;
border-bottom: 5rpx solid #318afe;
position: absolute;
bottom: 0;
content: '';
left: 50%;
transform: translateX(-50%);
display: inline-block;
}
}
}
}
.popupshow {
padding: 0 28rpx;
.popupshowtop {
margin-top: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #666666;
}
.popupshowbox {
.popupshowboxtitel {
margin-top: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.popupshowbox_box {
width: 100%;
.popupshowbox_item {
margin-top: 24rpx;
width: 176rpx;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: center;
line-height: 56rpx;
}
&::after {
content: '';
width: 176rpx;
}
.select {
border: 1px solid #1b00ff;
color: #0600ff;
}
.popupshowbox_itemzdy {
width: 100%;
.popupshowbox_item {
margin-top: 24rpx;
width: 40%;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: center;
line-height: 56rpx;
}
}
}
}
.boxboutton {
margin: 400rpx 0 50rpx 0;
.boxbouttonitem {
width: 330rpx;
height: 72rpx;
border-radius: 50rpx 50rpx 50rpx 50rpx;
}
.boxbouttonitem:nth-child(1) {
border: 2rpx solid #d9d9d9;
background: #ffffff;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #333333;
text-align: center;
line-height: 72rpx;
}
.boxbouttonitem:nth-child(2) {
background: #2f87fd;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #ffffff;
text-align: center;
line-height: 72rpx;
}
}
}
.contentbox {
width: 100%;
padding: 0 28rpx;
.contentboxitem {
margin-top: 32rpx;
padding: 32rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentboxitemtop {
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
text:nth-child(2) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #f39d52;
}
}
.contentboxitemtext {
margin-top: 24rpx;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
text:nth-child(2) {
margin-left: 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
image {
margin-left: 24rpx;
width: 158rpx;
height: 94rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #d9d9d9;
}
}
.contentboxitembutton {
margin-top: 32rpx;
.buttonone {
width: 244rpx;
height: 72rpx;
background: #2f87fd;
border-radius: 8rpx 8rpx 8rpx 8rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #ffffff;
text-align: center;
line-height: 72rpx;
}
.buttontow {
margin-left: 32rpx;
width: 244rpx;
height: 72rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #707070;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
text-align: center;
line-height: 72rpx;
}
}
.popupshow {
width: 600rpx;
border-radius: 16rpx;
.Box_box {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
text-align: right;
padding: 24rpx;
border-bottom: 1px solid #e5e5e5;
font-size: 28rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
}
.content_bottom {
margin: 70rpx auto 60rpx auto;
width: 70%;
height: 84rpx;
display: flex;
justify-content: space-between;
align-items: center;
.content_bottomone {
padding: 16rpx 60rpx;
background: #288efb;
border-radius: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #ffffff;
text-align: center;
}
.content_bottomtow {
padding: 16rpx 60rpx;
background: red;
border-radius: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #ffffff;
text-align: center;
}
}
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

View File

@ -1,76 +1,79 @@
<template>
<view class="detail">
<view class="subNvueweight">
<list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true"
:scrollable="true">
:scrollable="true">
<image src="components/czgdetail1 (5).JPG" mode=""></image>
<cell v-for="(item,i) in videoList" :key="i" :ref="'list'+item.courseDetailsId">
<view class="swipers-items" @longpress="openBs()" @appear="appear(item.courseDetailsId,i)"
:style="boxStyle">
<view class="subNvueswipers-items" @longpress="openBs()" @disappear="disappear(item.courseDetailsId,i)"
@appear="czgwappear(item.courseDetailsId,i)" :style="boxStyle">
<!-- 视频 -->
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="cover"
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="contain"
v-if="isShowVideo == item.courseDetailsId && item.videoUrl" :play-strategy="2"
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="true"
@timeupdate="timeupdate" @play="videoPlay('myVideo'+item.courseDetailsId, item.courseDetailsId)"
@ended="ended" :enable-progress-gesture="false" :poster="item.titleImg"
:ref="'myVideo'+item.courseDetailsId" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"
:autoplay="item.autoPlay" class="swipers-items-video"></video>
<image v-else @click="!item.videoUrl?openPay():''" :src="item.titleImg" class="swipers-items-imgsbg"
:autoplay="item.autoPlay" class="detailswipers-items-video"></video>
<image v-else @click="!item.videoUrl?openPay():''" :src="item.titleImg" class="detailswipers-items-imgsbg"
mode="aspectFill">
</image>
<!-- 返回图标 -->
<image src="../static/nvueIcon/backs.png" @click="goBack()" class="swipers-items-back" mode="">
<image v-if="showBack" src="../static/nvueIcon/backs.png" @click="goBack()"
class="detailswipers-items-back" mode="">
</image>
<!-- 右边操作 -->
<view class="swipers-items-right" :style="rightTop" v-if="showControls">
<view class="swipers-items-right-item">
<view class="swipers-items-right-item-img" @click.stop="dianzan(item)">
<image v-if="item.isGood!=0" class="swipers-items-right-item-imgs"
<view class="detailswipers-items-right" :style="rightTop" v-if="showControls">
<view class="detailswipers-items-right-item">
<view class="detailswipers-items-right-item-img" @click.stop="dianzan(item)">
<image v-if="item.isGood!=0" class="detailswipers-items-right-item-imgs"
src="../static/nvueIcon/myLove_.png" mode=""></image>
<image v-else class="swipers-items-right-item-imgs" src="../static/nvueIcon/myLove.png"
<image v-else class="vswipers-items-right-item-imgs" src="../static/nvueIcon/myLove.png"
mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
<text class="swipers-items-right-item-txts">
<view class="detaswipers-items-right-item-txt">
<text class="detaswipers-items-right-item-txts">
{{item.goodNum}}
</text>
</view>
</view>
<view class="swipers-items-right-item" @click="share()">
<view class="swipers-items-right-item-img">
<image class="swipers-items-right-item-imgs" src="../../static/images/me/share.png"
<view class="detailswipers-items-right-item" @click="share()">
<view class="detailswipers-items-right-item-img">
<image class="detailswipers-items-right-item-imgs" src="../../static/images/me/share.png"
mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
<text class="swipers-items-right-item-txts">
<view class="detaswipers-items-right-item-txt">
<text class="detaswipers-items-right-item-txts">
分享
</text>
</view>
</view>
<view class="swipers-items-right-item" v-if="isCollect">
<view class="swipers-items-right-item-img" @click.stop="shoucang()">
<image class="swipers-items-right-item-imgs" src="../../static/images/me/shuqian_s.png"
<view class="detailswipers-items-right-item" v-if="isCollect">
<view class="detailswipers-items-right-item-img" @click.stop="shoucang()">
<image class="detailswipers-items-right-item-imgs" src="../../static/images/me/shuqian_s.png"
mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
<text class="swipers-items-right-item-txts">
<view class="detaswipers-items-right-item-txt">
<text class="detaswipers-items-right-item-txts">
已追
</text>
</view>
</view>
<view class="swipers-items-right-item" v-else>
<view class="swipers-items-right-item-img" @click.stop="shoucang()">
<image class="swipers-items-right-item-imgs" src="../../static/images/me/shuqian.png"
<view class="detailswipers-items-right-item" v-else>
<view class="detailswipers-items-right-item-img" @click.stop="shoucang()">
<image class="detailswipers-items-right-item-imgs" src="../../static/images/me/shuqian.png"
mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
<text class="swipers-items-right-item-txts">
<view class="detaswipers-items-right-item-txt">
<text class="detaswipers-items-right-item-txts">
追剧
</text>
</view>
</view>
</view>
<!-- 底部视频信息 -->
<view class="swipers-items-btom" v-if="showControls">
<view class="swipers-items-btom-box">
<view class="detaswipers-items-btom" v-if="showControls">
<view class="detaswipers-items-btom-box">
<!-- 标题 -->
<view class="swipers-items-btom-box-title">
<text class="swipers-items-btom-box-titles">
@ -90,6 +93,7 @@
</view>
</view>
</view>
<image src="components/czgdetail1 (8).JPG" mode=""></image>
</cell>
</list>
<!-- 选集弹窗 -->
@ -143,24 +147,28 @@
<image class="list-title-rs" src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
</view>
<text class=""
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
{{getRedEnvelopeTips}}
</text>
<view class="pay-content">
<view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<view class="pay-content-item" @click="payVideo(1)">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
{{zongPrice}}金币解锁整部视频
{{countPrice*scale}}金币解锁单集视频
</text>
</view>
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
<view class="pay-content-item" @click="payVideo(2)">
<text class="pay-content-items">
{{countPrice}}金币解锁单集视频
{{countPrice}}解锁单集视频
</text>
</view>
<view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
开通会员
</text>
</view>
</view> -->
</view>
</view>
@ -176,6 +184,8 @@
</view>
</view>
</uni-popup>
<!-- 支付弹窗 -->
<uni-popup ref="popuppay" :safe-area="false">
<view class="popuppay">
@ -188,7 +198,7 @@
src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
<!-- 余额 -->
<view class="popuppay-money">
<!-- <view class="popuppay-money">
<view class="popuppay-money-l">
<text class="popuppay-money-l-ye">
账号余额:
@ -208,9 +218,9 @@
{{payPrice}}金币
</text>
</view>
</view>
</view> -->
<!-- 充值类型列表 -->
<scroll-view scroll-y="true" class="payLists">
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
@ -237,7 +247,7 @@
</view>
</view>
</view>
</scroll-view>
</scroll-view> -->
<!-- 支付类型 -->
<view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -291,6 +301,14 @@
</view>
</uni-popup>
<!-- 抽奖弹窗 -->
<!-- <uni-popup ref="refPopupZhuanPan" :safe-area="true" background-color="#ffffff">
<view case="">
111
<l-dialer :prizeList="prizeList" @click="onClick" @done="onDone" ref="dialer" />
</view>
</uni-popup> -->
</view>
</template>
@ -298,9 +316,17 @@
const listDom = uni.requireNativePlugin('dom')
import config from '../../common/config.js'
import httpsRequest from '../../common/httpRequest.js'
import one from './components/czgdetail1 (11).JPG'
import tow from './components/czgdetail1 (14).JPG'
import there from './components/czgdetail1 (15).JPG'
export default {
data() {
return {
//可抽奖次数
freeNum: 0,
showBack: true,
noBuyVideoIndex: null,
// 奖品列表,
showMoney: true,
nowBs: 1, //当前倍速
subList: [{
@ -324,7 +350,7 @@
haibaoShow: false,
title: '',
imgSrc: '',
current: 0,
current: 2,
maskCustomStyle: {
background: 'rgba(0, 0, 0, 0.5)'
},
@ -368,6 +394,12 @@
'width': '750rpx',
},
isShowVideo: '',
noBuyVideoIndex: null,
playFlag: false,
getRedEnvelopeTips: '',
scale: 1,
// 防抖使用的变量
appearTimeout: null
};
},
onUnload() {
@ -377,10 +409,15 @@
}
},
onShow() {
// console.log('onSHow video');
//当应用从后台进入前台时自动播放
if (this.videoContext) {
this.videoContext.play()
}
const noBuyVideoIndex = uni.getStorageSync('noBuyVideoIndex')
if (noBuyVideoIndex !== null && noBuyVideoIndex !== undefined) {
this.noBuyVideoIndex = noBuyVideoIndex
}
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
let that = this
uni.$on('back', (data) => {
@ -395,25 +432,28 @@
this.moneyTips = uni.getStorageSync('moneyTips')
// #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = uni.getStorageSync('checkIosPay');
if (checkIosPay === '是') {
@ -424,29 +464,45 @@
}];
this.openWay = 3;
} else {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
}
}
// #endif
this.$nextTick(() => {
this.closePopusPay()
})
if (this.courseId) {
this.getDataList(this.courseId, this.courseDetailsId);
}
httpsRequest.getT('app/course/getRedEnvelopeTips').then(res => {
if (res.code == 0) {
this.getRedEnvelopeTips = res.data
}
})
this.getScale()
},
onLoad(e) {
//是开启整部购买
@ -474,25 +530,125 @@
if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId
}
this.getDataList(this.courseId, this.courseDetailsId);
console.log(this.courseDetailsId)
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
} else {
console.log("allId====="+e.allId)
if (e.allId) {
const arr = e.allId.split('-')
this.courseId = arr[0];
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
}
if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
bodyTag = document.getElementsByTagName('body')[0];
bodyTag.style.height = document.documentElement.clientWidth / screen.width * screen.height + 'px';
}
},
methods: {
appear(e, index) {
this.current = index
this.showControls = true
this.isShowVideo = e
this.scrollIntoViews = 'video' + index
this.scrollIntoView = 'video' + index
console.log(this.scrollIntoViews, '当前位置')
//播放并更新video的上下文
this.startPlay(index)
//插入历史记录
this.setHistor(this.videoList[index].courseId, this.videoList[index].courseDetailsId);
this.$forceUpdate()
/**
* 获取金币比例
*/
getScale() {
httpsRequest.getT("app/common/type/914", {}).then(res => {
if (res.code == 0) {
this.scale = Number(res.data.value)
}
});
},
//播放时的回掉
videoPlay(videoId, courseDetailsId) {
console.log(courseDetailsId)
// this.courseDetailsId = courseDetailsId
if (!this.playFlag) {
this.playFlag = true
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: courseDetailsId,
type: 'start'
}).then(res => {
console.log('播放开始')
})
}
},
//播放进度变化回掉
timeupdate(e) {
// console.log(this.courseDetailsId)
if (e.detail.currentTime > e.detail.duration * 0.9) {
if (this.playFlag) {
this.playFlag = false
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.courseDetailsId,
type: 'end'
}).then(res => {
console.log('播放结束')
})
}
}
},
czgwappear(e, index) {
this.courseDetailsId = e;
// 清除已经设置的定时器
clearTimeout(this.appearTimeout);
// 设置一个新的延迟执行的定时器
this.appearTimeout = setTimeout(() => {
// 实际要执行的操作
console.log('页面出现在视图中');
// 这里可以加入你需要执行的代码
// this.courseDetailsId = e
this.current = index
this.showControls = true
this.isShowVideo = e
this.scrollIntoViews = 'video' + index
this.scrollIntoView = 'video' + index
console.log(this.scrollIntoViews, '当前位置')
//播放并更新video的上下文
this.startPlay(index)
//插入历史记录
this.setHistor(this.videoList[index].courseId, this.videoList[index].courseDetailsId);
this.$forceUpdate()
}, 500); // 延迟500毫秒执行
},
disappear(e, index) {
// if (this.videoContext) { //判断之前是否有视频的上下文
// this.videoContext.stop();
// this.videoContext = null;
// }
// console.log("disappear==="+index)
// if (this.current > index) {
// index = index + 1
// } else {
// index = index - 1
// }
// let numIdCurr = this.videoList[index].courseDetailsId;
// if (this.videoList[index].videoUrl) { //已经购买可直接播放
// // 播放时记录当前播放的id
// this.czgwappear(numIdCurr, index)
// this.videoContextId = 'myVideo' + numIdCurr;
// this.videoContext = uni.createVideoContext(this.videoContextId, this);
// console.log('走更新了')
// this.$nextTick(() => {
// //播放当前的
// this.videoContext.play();
// })
// }
// this.$forceUpdate();
},
//选集弹窗的回调
changeXj(e) {
@ -633,15 +789,26 @@
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => {
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
})
} else if (this.openWay == 1) {
let paytype = 'h5'
// #ifdef APP
paytype = 'app'
// #endif
// APP支付宝支付
httpsRequest.postT("/app/aliPay/payMoney", {
classify: 1,
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
console.log('nvue payType=' + paytype);
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
// plus.runtime.openURL(ret.data.h5Url)
uni.navigateTo({
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
});
// uni.navigateTo({
// url: '/pages/index/webView?ordersId='+this.ordersId+'url=' + ret.data.h5Url
// });
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
} else if (this.openWay == 3) {
let userId = uni.getStorageSync('userId');
@ -768,6 +935,22 @@
//打开支付弹窗
openPopusPay() {
this.$refs.popuppay.open('bottom')
return
// 通过 id 获取 nvue 子窗体
// const subNVue = uni.getSubNVueById('pay')
// subNVue.setStyle({
// height: '350rpx',
// })
// // 打开 nvue 子窗体
// subNVue.show('slide-in-bottom', 300, function() {
// // 打开后进行一些操作...
// //
// console.log('subnvue open')
// });
// 关闭 nvue 子窗体
// subNVue.hide('fade-out', 300)
// this.$refs.refPopupZhuanPan.open('bottom')
},
// 获取收藏状态
getMyLoveStatus() {
@ -788,7 +971,8 @@
//显示/隐藏适配控制器的回调
controlstoggles(e) {
this.showControls = e.detail.show
console.log(e.detail.show, '显示/隐藏控制栏')
this.showBack = this.showControls
// console.log(e.detail.show, '显示/隐藏控制栏')
},
//打开倍速弹框
openBs() {
@ -816,7 +1000,7 @@
qdCode = uni.getStorageSync('qdCode')
}
let url = config.APIHOST2 + '/pages/login/registerApp?invitation=' + invitationCode + '&qdCode=' + qdCode
this.setShareNum()
// this.setShareNum()
uni.setClipboardData({
data: url,
success(res) {
@ -858,14 +1042,22 @@
let data = {
courseId: this.courseId
}
if (type != 1) { //购买单集
data.courseDetailsId = this.videoList[this.current].courseDetailsId
}
data.courseDetailsId = this.videoList[this.current].courseDetailsId
httpsRequest.getT('/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
if (type == 1) { //金币
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else if (type == 2) { //支付宝
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
}
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
uni.showToast({
title: res.msg,
@ -876,44 +1068,58 @@
},
payOrder(orderId, payMoney) {
let that = this
console.log("orderId==" + orderId)
httpsRequest.postT("/app/order/payOrders", {
orderId: orderId,
}).then(res => {
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
title: '已解锁,支付' + payMoney + '金币',
title: '已成功解锁',
icon: 'none'
})
this.closePopusPay()
this.closePay()
that.showPay = false
that.showMoney = false
that.noBuyVideoIndex = null
setTimeout(() => {
that.getDataList(that.courseId, that.videoList[that.current].courseDetailsId,
true);
}, 1000)
} else { //支付失败(余额不足)
that.closePay() //关闭购买选择弹窗
this.payPrice = payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
uni.showToast({
title: res.msg,
icon: 'none'
})
that.showPay = true
that.showMoney = false
// that.closePay() //关闭购买选择弹窗
// this.payPrice = payMoney //需要支付的价格
// this.openPopusPay() //显示充值弹窗
}
});
},
//打开购买弹窗
openPay() {
//获取总价跟单集价格
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.$refs.popupPya.open('bottom')
this.noBuyVideoIndex = this.current
uni.setStorageSync('noBuyVideoIndex', this.current)
},
//关闭购买弹窗
closePay() {
this.$refs.popupPya.close()
},
//选择播放
selectPlay(item) {
selectPlay(item,type) {
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
return;
}
//重新计算一下当前观看的是哪个视频
this.comNumVideo()
//滚动到选择的位置
@ -1016,6 +1222,7 @@
this.$nextTick(() => {
//播放当前的
this.videoContext.play();
this.videoContext.playbackRate(this.subList[this.nowBs].num)
})
} else { //没有视频链接则表示没有权限,需要购买 弹出购买弹窗
this.openPay()
@ -1028,22 +1235,35 @@
},
//滚动到指定位置
goListPosition(courseDetailsId) {
let _this = this;
// this.scrollIntoViews = 'video0'
this.$nextTick(() => {
// setTimeout(()=>{
console.log(courseDetailsId, '开始移动了')
const el = this.$refs['list' + courseDetailsId][0]
const el = _this.$refs['list' + courseDetailsId][0]
listDom.scrollToElement(el, {
animated: false
})
this.$forceUpdate()
console.log(el, '移动结束')
_this.$forceUpdate()
console.log('移动结束', el)
// },1000)
})
},
async getCount() {
console.log('getCount')
const res = await this.$Request.getT('app/discSpinning/drawCount')
if (res.code == 0) {
this.freeNum = res.count || 0
}
console.log(res);
return res
},
/**
* @param {Number} courseId 总id
* @param {Number} courseDetailsId 当前视频id
* @param {boolean} type 是购买后返回的还是直接进来的
*/
getDataList(courseId, courseDetailsId, type) {
getDataList(courseId, courseDetailsId, type, t) {
let data = {
id: courseId,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
@ -1057,7 +1277,10 @@
const indexs = arr.findIndex(menu => menu.courseDetailsId ===
Number(courseDetailsId));
this.current = indexs
this.scrollIntoViews = 'video' + indexs
this.scrollIntoView = 'video' + indexs
console.log(this.current)
// this.scrollIntoView = 'video' + indexs
arr.map((item, index) => {
item.num = index + 1;
if (item.videoUrl) {
@ -1070,6 +1293,7 @@
//菜单数组
this.meunList = arr;
if (type == true) { //购买视频后返回的
console.log('购买视频后返回的')
let courseDetailsIds = this.videoList[this.current].courseDetailsId;
this.meunList.some((item) => {
if (item.courseDetailsId == courseDetailsIds) {
@ -1085,30 +1309,74 @@
}
})
})
if (this.noBuyVideoIndex !== null && this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.noBuyVideoIndex = null
uni.removeStorageSync('noBuyVideoIndex')
this.videoContext.stop()
httpsRequest.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数')
console.log(res)
if (res.count >= 1) {
uni.navigateTo({
url: '/me/VjgyqAzklr/VjgyqAzklr'
})
} else {
this.videoContext.play();
}
})
}
// console.log('this.noBuyVideoIndex', this.noBuyVideoIndex)
} else { //直接跳转进来的
this.videoList = this.meunList
//滚动到记录视频的位置(如果有记录)
if (indexs > 0) {
console.log(indexs, '有记录吗?')
this.goListPosition(this.videoList[indexs].courseDetailsId)
}
this.$nextTick(() => {
let indexss = indexs > 0 ? indexs : 0
//滚动到记录视频的位置(如果有记录)
if (indexs > 0) {
console.log(indexs, '有记录吗?')
this.goListPosition(this.videoList[indexs].courseDetailsId)
}
// console.log('this.noBuyVideoIndex', this.noBuyVideoIndex)
if (this.videoList[indexss].videoUrl) { //有播放权限
console.log('有播放权限进入是否抽取转盘判断')
let numIdCurr = this.videoList[indexss].courseDetailsId;
this.videoContextId = 'myVideo' + numIdCurr;
this.videoContext = uni.createVideoContext(this
.videoContextId,
this);
this.videoContext.play();
if (this.noBuyVideoIndex != null && this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.videoContext.stop();
httpsRequest.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数')
if (res.count >= 1) {
uni.navigateTo({
url: '/me/VjgyqAzklr/VjgyqAzklr'
})
} else {
this.videoContext.play();
}
})
uni.removeStorageSync('noBuyVideoIndex')
this.noBuyVideoIndex = null
} else {
this.videoContext.play();
}
} else { //没有播放权限打开购买弹窗
this.openPay()
}
this.$forceUpdate();
})
}
if ( t == 'select') {
this.selectPlay(this.videoList[this.current],true)
}
this.$forceUpdate();
}
} else {
uni.showToast({
title: '加载失败',
@ -1562,34 +1830,34 @@
background-color: #000;
}
.swipers {
.detailswipers {
width: 750rpx;
flex: 1;
}
.swipers-item {
.detailswipers-item {
width: 750rpx;
flex: 1;
}
.swipers-items {
.subNvueweightswipers-items {
width: 750rpx;
flex: 1;
position: relative;
background-color: #000;
}
.swipers-items-video {
.detailswipers-items-video {
width: 750rpx;
flex: 1;
}
.swipers-items-imgsbg {
.detailswipers-items-imgsbg {
width: 750rpx;
flex: 1;
}
.swipers-items-back {
.detailswipers-items-back {
position: absolute;
left: 40rpx;
top: 120rpx;
@ -1598,40 +1866,40 @@
z-index: 999;
}
.swipers-items-right {
.detailswipers-items-right {
position: absolute;
width: 60rpx;
top: 100rpx;
right: 20rpx;
}
.swipers-items-right-item {
.detailswipers-items-right-item {
width: 60rpx;
margin-bottom: 40rpx;
}
.swipers-items-right-item-img {
.detailswipers-items-right-item-img {
width: 60rpx;
height: 60rpx;
}
.swipers-items-right-item-imgs {
.detailswipers-items-right-item-imgs {
width: 60rpx;
height: 60rpx;
}
.swipers-items-right-item-txt {
.detaswipers-items-right-item-txt {
width: 60rpx;
}
.swipers-items-right-item-txts {
.detaswipers-items-right-item-txts {
width: 60rpx;
color: #ffffff;
font-size: 24rpx;
text-align: center;
}
.swipers-items-btom {
.detaswipers-items-btom {
width: 750rpx;
let: 0;
position: absolute;
@ -1640,7 +1908,7 @@
/* transition-duration: 1s, */
}
.swipers-items-btom-box {
.detaswipers-items-btom-box {
width: 710rpx;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,23 @@
<template>
<view class="detail">
<swiper @longpress="openBs()" :circular="true" class="swipers" @change="change" :current="current"
<view class="subNvuedetail" :style="{paddingBottom:paddingBottom}">
<swiper @longpress="openBs()" :circular="true" class="swipersas" @change="change" :current="current"
:vertical="true" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="300">
<swiper-item class="swipers-item" v-for="(item,index) in swiperList" :key="item.courseDetailsId">
<view class="swipers-items" v-if="current == index">
<swiper-item class="swipersasda" v-for="(item,index) in swiperList" :key="item.courseDetailsId">
<view class="swipersasts" v-if="current == index">
<!-- 视频 -->
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="cover"
<video :show-fullscreen-btn="false" @controlstoggle="controlStoggles" object-fit="contain"
v-if="current === index && item.videoUrl" :play-strategy="2" :show-loading="true"
codec="software" :muted="false" :show-center-play-btn="true" :loop="true" @ended="ended"
@timeupdate="timeupdate" @play="videoPlay('myVideo'+item.courseDetailsId, item.courseDetailsId)"
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :autoplay="item.autoPlay"
class="swipers-items-video"></video>
<image v-else @click="!item.videoUrl?openPay():''" :src="item.titleImg" class="swipers-items-imgsbg"
class="swipersastqw"></video>
<image v-else @click="!item.videoUrl?openPay():''" :src="item.titleImg" class="swipers-items-imgsbgwq"
mode="aspectFill">
</image>
<!-- 返回图标 -->
<image src="../static/nvueIcon/backs.png" @click="goBack()" class="swipers-items-back" mode="">
<image v-if="showBack" src="../static/nvueIcon/backs.png" @click="goBack()"
class="swipers-items-back" mode="">
</image>
<!-- 右边操作 -->
<view class="swipers-items-right" :style="rightTop" v-if="showControls">
@ -44,7 +46,7 @@
</view>
</view>
<view class="swipers-items-right-item" v-if="isCollect">
<view class="swipers-items-right-item-img" @click.stop="shoucang()">
<view class="swipers-items-right-item-img" @click.stop="collectVideo()">
<image class="swipers-items-right-item-imgs" src="../../static/images/me/shuqian_s.png"
mode=""></image>
</view>
@ -55,7 +57,7 @@
</view>
</view>
<view class="swipers-items-right-item" v-else>
<view class="swipers-items-right-item-img" @click.stop="shoucang()">
<view class="swipers-items-right-item-img" @click.stop="collectVideo()">
<image class="swipers-items-right-item-imgs" src="../../static/images/me/shuqian.png"
mode=""></image>
</view>
@ -101,7 +103,7 @@
<text class="list-title-lsn">共{{meunList.length}}集</text>
</view>
<view class="list-title-r" @click="closeList()">
<image class="list-title-rs" src="../../static/images/me/closeIconss.png" mode=""></image>
<image class="list-title-rsczg" src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
</view>
<view class="list-content">
@ -138,27 +140,31 @@
</text>
</view>
<view class="list-title-r" @click="closePay()">
<image class="list-title-rs" src="../../static/images/me/closeIconss.png" mode=""></image>
<image class="list-title-rsczg" src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
</view>
<text class=""
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
{{getRedEnvelopeTips}}
</text>
<view class="pay-content">
<view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<view class="pay-content-itemczg" @click="payVideo(1)">
<image class="pay-content-item-iconczg" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
{{zongPrice}}金豆解锁整部视频
{{countPrice*scale}}金币解锁整部视频
</text>
</view>
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
<view v-if="isShowMoneyPay" class="pay-content-itemczg" @click="payVideo(2)">
<text class="pay-content-items">
{{countPrice}}金豆解锁单集视频
{{countPrice}}解锁单集视频
</text>
</view>
<view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<!-- <view class="pay-content-itemczg" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<image class="pay-content-item-iconczg" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
开通会员
</text>
</view>
</view> -->
</view>
</view>
@ -182,17 +188,17 @@
<text class="popuppay-title-l">
购买后继续观看
</text>
<image @click="closePopusPay()" class="popuppay-title-r"
<image @click="closePopupPay()" class="popuppay-title-r"
src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
<!-- 余额 -->
<view class="popuppay-money">
<!-- <view class="popuppay-money">
<view class="popuppay-money-l">
<text class="popuppay-money-l-ye">
账号余额:
</text>
<text class="popuppay-money-l-jd">
{{moneyNum}}金
{{moneyNum}}金
</text>
<text class="popuppay-money-l-mx" @click="goWallet('/me/wallet/wallet')">
查看明细
@ -203,12 +209,12 @@
解锁价格:
</text>
<text class="popuppay-money-jd">
{{payPrice}}金
{{payPrice}}金
</text>
</view>
</view>
</view> -->
<!-- 充值类型列表 -->
<scroll-view scroll-y="true" class="payLists">
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
@ -220,12 +226,12 @@
</view>
<view class="payList-item-dou">
<text class="payList-item-dous">
{{item.money}}金
{{item.money}}金
</text>
</view>
<view class="payList-item-duo" v-if="item.giveMoney>0">
<text class="payList-item-duos">
多送{{item.giveMoney}}金
多送{{item.giveMoney}}金
</text>
</view>
<view class="payList-item-hui" v-if="item.remarks">
@ -235,7 +241,7 @@
</view>
</view>
</view>
</scroll-view>
</scroll-view> -->
<!-- 支付类型 -->
<view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@ -298,6 +304,7 @@
export default {
data() {
return {
showBack: true,
nowBs: 1, //当前倍速
subList: [{
name: '0.5x',
@ -358,6 +365,11 @@
payPrice: 0, //解锁价格
iosPayId: '',
isCollect: false,
playFlag: false,
getRedEnvelopeTips: '',
scale: 1,
paddingBottom: '0',
isShowMoneyPay: true,
};
},
computed: {
@ -385,7 +397,7 @@
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
let that = this
uni.$on('back', (data) => {
if (data.flag == true) {
if (data.flag) {
that.showPay = false
that.getDataList(that.courseId, that.courseDetailsId, true);
that.getMyLoveStatus()
@ -396,58 +408,97 @@
this.moneyTips = uni.getStorageSync('moneyTips')
// #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
} else {
let checkIosPay = uni.getStorageSync('checkIosPay');
if (checkIosPay === '是') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '苹果',
id: 3
}];
this.openWay = 3;
} else {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
let syPaySel = uni.getStorageSync('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
}
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel')
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = uni.getStorageSync('checkIosPay');
// if (checkIosPay === '是') {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '苹果',
// id: 3
// }];
// this.openWay = 3;
// } else {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel')
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
// }
}
// #endif
this.$nextTick(() => {
this.closePopupPay()
})
if (this.courseId) {
this.getDataList(this.courseId, this.courseDetailsId);
}
httpsRequest.getT('app/course/getRedEnvelopeTips').then(res => {
if (res.code === 0) {
this.getRedEnvelopeTips = res.data
}
})
this.getScale()
const sysInfo = uni.getSystemInfoSync()
console.log(sysInfo);
const padB = sysInfo.safeAreaInsets.bottom;
console.log('win height == ' + padB);
if (padB && padB > 0) {
this.paddingBottom = padB + 'px'
} else {
this.paddingBottom = '0'
}
console.log('this bottom padding = ' + this.paddingBottom);
httpsRequest.getT("app/common/type/919", {}).then(res => {
if (res.code === 0) {
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
}
});
},
onLoad(e) {
let that = this
@ -472,16 +523,57 @@
if (e.courseDetailsId) {
this.courseDetailsId = e.courseDetailsId;
}
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
},
methods: {
/**
* 获取金币比例
*/
getScale() {
httpsRequest.getT("app/common/type/914", {}).then(res => {
if (res.code === 0) {
this.scale = Number(res.data.value)
}
});
},
//播放时的回掉
videoPlay(videoId, courseDetailsId) {
this.courseDetailsId = courseDetailsId
if (!this.playFlag) {
this.playFlag = true
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: courseDetailsId,
type: 'start'
}).then(res => {
console.log('播放开始')
})
}
},
//播放进度变化回掉
timeupdate(e) {
if (e.detail.currentTime > e.detail.duration * 0.9) {
if (this.playFlag) {
this.playFlag = false
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.courseDetailsId,
type: 'end'
}).then(res => {
console.log('播放结束')
})
}
}
},
//选集弹窗的回调
changeXj(e) {
if (e.show == false) {
if (!e.show) {
//关闭弹窗的时候重置scrollIntoViews防止关闭后第二次点就不能自动滑动到当前集的位置
this.scrollIntoViews = 'video0'
}
@ -522,7 +614,7 @@
});
},
isCheckPay(status, name, order) {
if (status == 0) {
if (status === 0) {
this.setPayment(name, order);
} else {
uni.hideLoading();
@ -532,7 +624,7 @@
});
}
},
iphonepay() {
iphonePay() {
let that = this
plus.payment.getChannels((res) => {
let channel = res.find(i => i.id === 'appleiap')
@ -588,7 +680,7 @@
httpsRequest.postT('/app/ios/isoPayApp?receipt=' + receipt + '&ordersId=' + that.iosPayId).then(
res => {
uni.hideLoading();
if (res.status == 0) {
if (res.status === 0) {
uni.showToast({
title: '支付成功',
duration: 2000,
@ -600,7 +692,7 @@
},
// 充值
pay() {
if (this.checked == false) {
if (!this.checked) {
uni.showToast({
title: '请阅读并同意《付费须知说明》',
icon: 'none'
@ -611,7 +703,7 @@
uni.showLoading({
title: '支付中...'
})
if (this.openWay == 2) {
if (this.openWay === 2) {
// 微信APP支付 根据订单id获取支付信息
httpsRequest.postT("/app/wxPay/payMoney", {
classify: 1,
@ -619,16 +711,20 @@
}).then(ret => {
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
} else if (this.openWay == 1) {
} else if (this.openWay === 1) {
let paytype = 'h5'
// #ifdef APP
paytype = 'app'
// #endif
// APP支付宝支付
httpsRequest.postT("/app/aliPay/payMoney", {
classify: 1,
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
// plus.runtime.openURL(ret.data.h5Url)
uni.navigateTo({
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
});
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
} else if (this.openWay == 3) {
} else if (this.openWay === 3) {
let userId = uni.getStorageSync('userId');
let data = {
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
@ -645,7 +741,7 @@
});
}
});
} else if (this.openWay == 4) {
} else if (this.openWay === 4) {
let userId = uni.getStorageSync('userId');
let data = {
// money: this.wallet[this.current].price
@ -675,7 +771,7 @@
getMyMoney() {
if (uni.getStorageSync('token')) {
httpsRequest.getT('/app/moneyDetails/selectUserMoney').then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.moneyNum = res.data.money
}
})
@ -729,7 +825,7 @@
*/
getMoneyList() {
httpsRequest.getT('/app/payClassify/selectPayClassifyList').then(res => {
if (res.code == 0) {
if (res.code === 0) {
let priceObj = this.findMinMaxPricesWithIndexes(res.data)
this.wallet = res.data
this.wallet[priceObj.minPriceIndex].remarks = '特惠'
@ -746,7 +842,7 @@
this.wallet = arr
}
// #ifdef APP
this.iphonepay()
this.iphonePay()
// #endif
} else {
uni.showToast({
@ -757,11 +853,11 @@
})
},
//关闭支付弹窗
closePopusPay() {
closePopupPay() {
this.$refs.popuppay.close()
},
//打开支付弹窗
openPopusPay() {
openPopupPay() {
this.$refs.popuppay.open('bottom')
},
// 获取收藏状态
@ -781,8 +877,9 @@
})
},
//显示/隐藏适配控制器的回调
controlstoggles(e) {
controlStoggles(e) {
this.showControls = e.detail.show
this.showBack = this.showControls
console.log(e.detail.show, '显示/隐藏控制栏')
},
//打开倍速弹框
@ -856,19 +953,28 @@
})
}
},
//使用金购买
//使用金购买
submitPay(type) {
let data = {
courseId: this.courseId
}
if (type != 1) { //购买单集
data.courseDetailsId = this.videoList[this.current].courseDetailsId
}
data.courseDetailsId = this.videoList[this.current].courseDetailsId
httpsRequest.getT('/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
if (type === 1) { //金币
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else if (type === 2) { //支付宝
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopupPay() //显示充值弹窗
}
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
uni.showToast({
title: res.msg,
@ -882,25 +988,30 @@
httpsRequest.postT("/app/order/payOrders", {
orderId: orderId,
}).then(res => {
if (res.code == 0) {
if (res.code === 0) {
uni.hideLoading()
uni.showToast({
title: '已解锁,支付' + payMoney + '金豆',
title: '已成功解锁',
icon: 'none'
})
this.closePopusPay()
this.closePopupPay()
this.closePay()
that.showPay = false
that.showMoney = false
that.noBuyVideoIndex = null
setTimeout(() => {
that.getDataList(that.courseId, that.videoList[that.current].courseDetailsId,
true);
}, 1000)
} else { //支付失败(余额不足)
that.closePay() //关闭购买选择弹窗
this.payPrice = payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
uni.showToast({
title: res.msg,
icon: 'none'
})
that.showPay = true
that.showMoney = false
}
});
},
@ -925,7 +1036,7 @@
this.videoList = [...this.videoList, ...this.meunList.slice(index + 1, index + 3)]
}
//只剩一条数据
if (lengths == 1) {
if (lengths === 1) {
//把剩下的一条给放进去
this.videoList = [
//选中的那条
@ -937,7 +1048,7 @@
]
}
//选择的就是最后一条数据
if (lengths == 0) {
if (lengths === 0) {
//后两条拿总数组的前两条就可以了
this.videoList = [...this.videoList, ...this.meunList.slice(0, 2)]
}
@ -945,11 +1056,15 @@
this.$forceUpdate()
},
//选择播放
selectPlay(item, index) {
selectPlay(item, index, type) {
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
// this.videoList = [this.meunList[index]]
this.current = index
if (this.videoList[this.current].videoUrl === '' && this.videoList[this.current].price <= 0 && !type) {
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
return;
}
//重新计算一下当前观看的是哪个视频
this.comNumVideo()
// 把选择的视频的自动播放设置为true
@ -988,7 +1103,7 @@
this.$refs.popup.close()
},
//收藏
shoucang() {
collectVideo() {
if (uni.getStorageSync('token')) {
let data = {
courseId: this.courseId,
@ -996,7 +1111,7 @@
type: this.isCollect == false ? 1 : 0
}
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.getMyLoveStatus()
}
})
@ -1183,7 +1298,7 @@
* @param {Number} courseDetailsId 当前视频id
* @param {boolean} type 是购买后返回的还是直接进来的
*/
getDataList(courseId, courseDetailsId, type) {
getDataList(courseId, courseDetailsId, type, t) {
let data = {
id: courseId,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
@ -1294,7 +1409,9 @@
} else { //不能播放则需要购买
this.openPay()
}
if (t == 'select') {
this.selectPlay(this.videoList[this.current], this.current, true)
}
this.$forceUpdate();
//插入历史记录
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current]
@ -1613,35 +1730,35 @@
border-radius: 6rpx;
}
.detail {
.subNvuedetail {
width: 750rpx;
flex: 1;
background-color: #000;
}
.swipers {
.swipersas {
width: 750rpx;
flex: 1;
}
.swipers-item {
.swipersasda {
width: 750rpx;
flex: 1;
}
.swipers-items {
.swipersasts {
width: 750rpx;
flex: 1;
position: relative;
background-color: #000;
}
.swipers-items-video {
.swipersastqw {
width: 750rpx;
flex: 1;
}
.swipers-items-imgsbg {
.swipers-items-imgsbgwq {
width: 750rpx;
flex: 1;
}
@ -1774,7 +1891,7 @@
height: 30rpx;
}
.list-title-rs {
.list-title-rsczg {
width: 26rpx;
height: 26rpx;
}
@ -1871,7 +1988,7 @@
margin-bottom: 40rpx;
}
.pay-content-item {
.pay-content-itemczg {
width: 710rpx;
height: 92rpx;
border-radius: 20rpx;
@ -1882,7 +1999,7 @@
justify-content: center;
}
.pay-content-item-icon {
.pay-content-item-iconczg {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;

View File

@ -0,0 +1,14 @@
<template>
<view>
<web-view src="https://fanyi.baidu.com/mtpe-individual/multimodal"></web-view>
</view>
</template>
<script>
import one from '../components/czgdetail1 (1).JPG'
import tow from '../components/czgdetail1 (2).JPG'
import there from '../components/czgdetail1 (3).JPG'
</script>
<style scoped>
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img gyqOMUsWCr" src="/static/kigqHbgyqpImg/gyq_0e6c28f35b182aecb579ef23de5439c507e521bb8a06-uzr0QA_fw1200.jpg" mode="widthFix"></image>
<image class="img gyqlVvIKYZ" src="/static/kigqHbgyqpImg/gyq_1d8b90b38ee4e738fd234a0c9db5ebba1fa93a241d402-a7Zrnf.jpg" mode="widthFix"></image>
<image class="img SjaUgyqQuQ" src="/static/kigqHbgyqpImg/gyq_1fa825c9860d57e6892dde1c964992a2040e0fcf1f12d-EC1pA0_fw1200.png" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img MaLngyqocj" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (2).jpg" mode="widthFix"></image>
<image class="img NvgGgyqTIL" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (3).jpg" mode="widthFix"></image>
<image class="img VgyqgRFZVA" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (4).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@ -0,0 +1,113 @@
<template>
<view>
<view class="margin bg-white padding-sm radius" v-if="collectList.length" v-for="(item, index) in collectList" :key="index" @click="BfgyqOmGub(item.courseId)">
<view class="flex">
<u-image width="280rpx" height="200rpx" :src="item.titleImg"></u-image>
<view class="flex-sub margin-left flex flex-direction justify-between" style="width: 420rpx">
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{ item.title }}</view>
<view class="text-gray text-26 margin-top">最近{{ item.payNum }}人在学</view>
<view class="flex align-center justify-between">
<view class=" " style="color: #ff8211">
¥
<text class="text-bold" style="font-size: 42rpx">{{ item.price }}</text>
</view>
<view class="JrqPDigyqC">马上学习</view>
</view>
</view>
</view>
</view>
<!-- 空数据 -->
<empty v-if="!collectList.length"></empty>
<button style="visibility: hidden;" @click="GcrgyqsLlpITivXemXYq"></button>
<button style="visibility: hidden;" @click="irtvgyqvTIksTNOhoJfy"></button>
<button style="visibility: hidden;" @click="ARcakhGgyqabSQxIMhBz"></button>
</view>
</template>
<script>
import empty from '@/components/empty.vue';
export default {
components: {
empty
},
data() {
return {
limit: 10,
page: 1,
collectList: [] //
};
},
onLoad() {
this.scJRgyqScE();
},
methods: {
//
scJRgyqScE() {
uni.showLoading({
title: '加载中'
});
let data = {
userId: this.userId,
page: this.page,
limit: this.limit
};
this.$u.api.collectList(data).then((res) => {
if (res.code === 0) {
if (this.page === 1) {
this.collectList = res.data.records;
uni.stopPullDownRefresh();
return;
}
this.collectList = [...this.collectList, ...res.data.records];
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
uni.hideLoading();
uni.stopPullDownRefresh();
});
},
BfgyqOmGub(e) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
});
},
GcrgyqsLlpITivXemXYq() {
let HzClMtDVxgyqnSGAZdnx = 'YPaavBgyqVuuJXWPIHGB';
HzClMtDVxgyqnSGAZdnx += 'SGgyqaIDNmppZzTyRSwT';
},
irtvgyqvTIksTNOhoJfy() {
let GVmgyqyDOkTkfOwtkwZI = 'ebRIgyqMyLABUAweUCTb';
GVmgyqyDOkTkfOwtkwZI += 'kApJeEHJCwdYxgyqtBiP';
},
BMoJcMfaxYmiYqfgyqCw() {
let GKrgyqdaSTRzoGCoktuW = 'eYJJRPtPeuqYAigyqEeu';
GKrgyqdaSTRzoGCoktuW += 'TgyqPdCmWXXQctgSvKmo';
}
},
onReachBottom: function () {
this.page = this.page + 1;
this.scJRgyqScE();
},
onPullDownRefresh: function () {
this.page = 1;
this.scJRgyqScE();
}
};
</script>
<style>
.JrqPDigyqC {
width: 150upx;
height: 60upx;
background: #5074ff;
border-radius: 30upx;
color: #ffffff;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View File

@ -1,126 +1,134 @@
<template>
<view class="">
<view class="feedback-title">
<view class="feedback-titleczg">
<text>问题和意见</text>
<text @tap="chooseMsg">快速键入</text>
<text @tap="czgwchooseMsg">快速键入</text>
</view>
<view class="feedback-body" style="background: #F5F5F5;">
<view class="feedback-body" style="background: #f5f5f5">
<textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.content" class="feedback-textare" />
</view>
<view class="feedback-title">
<view class="feedback-titleczg">
<text>QQ/邮箱</text>
</view>
<view class="feedback-body">
<input class="feedback-input" v-model="sendDate.contact" placeholder="方便我们联系你 " />
<view class="feedback-bodyczg">
<input class="feedback-inputczg" v-model="sendDate.contact" placeholder="方便我们联系你 " />
</view>
<button style="" class="feedback-submit" @tap="send">提交</button>
<button style="" class="feedback-submit" @tap="czgwsend">提交</button>
<button style="visibility: hidden" @click="KqoaOuwSAlXtAtagyqBi"></button>
<button style="visibility: hidden" @click="zagyqgnMvQKDwZScUVEB"></button>
<button style="visibility: hidden" @click="rtsYPNlMIgyqQMZPuxVB"></button>
</view>
</template>
<script>
export default {
data() {
return {
msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视丑哭了', '偶发性崩溃'],
stars: [1, 2, 3, 4, 5],
imageList: [],
sendDate: {
score: 5,
content: '',
contact: ''
}
};
import langeone from './components/lang1.jpg';
import langetow from './components/lang2.jpg';
import langethere from './components/lange4.jpg';
export default {
data() {
return {
msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视丑哭了', '偶发性崩溃'],
stars: [1, 2, 3, 4, 5],
imageList: [],
sendDate: {
score: 5,
content: '',
contact: ''
}
};
},
onLoad() {
let deviceInfo = {
appid: plus.runtime.appid,
imei: plus.device.imei, //
p: plus.os.name === 'Android' ? 'a' : 'i', //iiOSaAndroid
md: plus.device.model, //
app_version: plus.runtime.version,
plus_version: plus.runtime.innerVersion, //
os: plus.os.version,
net: '' + plus.networkinfo.getCurrentType()
};
this.sendDate = Object.assign(deviceInfo, this.sendDate);
},
methods: {
close(e) {
this.imageList.splice(e, 1);
},
onLoad() {
let deviceInfo = {
appid: plus.runtime.appid,
imei: plus.device.imei, //
p: plus.os.name === 'Android' ? 'a' : 'i', //iiOSaAndroid
md: plus.device.model, //
app_version: plus.runtime.version,
plus_version: plus.runtime.innerVersion, //
os: plus.os.version,
net: '' + plus.networkinfo.getCurrentType()
};
this.sendDate = Object.assign(deviceInfo, this.sendDate);
czgwchooseMsg() {
//
uni.showActionSheet({
itemList: this.msgContents,
success: (res) => {
this.sendDate.content = this.msgContents[res.tapIndex];
}
});
},
methods: {
close(e) {
this.imageList.splice(e, 1);
},
chooseMsg() {
//
uni.showActionSheet({
itemList: this.msgContents,
success: res => {
this.sendDate.content = this.msgContents[res.tapIndex];
}
});
},
chooseImg() {
//
uni.chooseImage({
sourceType: ['camera', 'album'],
sizeType: 'compressed',
count: 8 - this.imageList.length,
success: res => {
this.imageList = this.imageList.concat(res.tempFilePaths);
}
});
},
chooseStar(e) {
//
this.sendDate.score = e;
},
previewImage() {
//
uni.previewImage({
urls: this.imageList
});
},
send() {
//
console.log(JSON.stringify(this.sendDate));
if (!this.sendDate.content) {
uni.showToast({
icon: 'none',
title: '请输入反馈内容'
});
return;
chooseImg() {
//
uni.chooseImage({
sourceType: ['camera', 'album'],
sizeType: 'compressed',
count: 8 - this.imageList.length,
success: (res) => {
this.imageList = this.imageList.concat(res.tempFilePaths);
}
// if (this.$queue.getChatSearchKeys(this.sendDate.content)) {
// uni.showToast({
// title: "",
// mask: false,
// duration: 1500,
// icon: "none"
// });
});
},
chooseStar(e) {
//
this.sendDate.score = e;
},
previewImage() {
//
uni.previewImage({
urls: this.imageList
});
},
czgwsend() {
//
console.log(JSON.stringify(this.sendDate));
// return;
// }
if (!this.sendDate.contact) {
uni.showToast({
icon: 'none',
title: '请填写QQ或邮箱'
});
return;
}
// this.$queue.showLoading('...');
uni.showLoading({
title: '加载中...'
})
this.$u.post('/app/message/insertMessage', {
if (!this.sendDate.content) {
uni.showToast({
icon: 'none',
title: '请输入反馈内容'
});
return;
}
// if (this.$queue.getChatSearchKeys(this.sendDate.content)) {
// uni.showToast({
// title: "",
// mask: false,
// duration: 1500,
// icon: "none"
// });
// return;
// }
if (!this.sendDate.contact) {
uni.showToast({
icon: 'none',
title: '请填写QQ或邮箱'
});
return;
}
// this.$queue.showLoading('...');
uni.showLoading({
title: '加载中...'
});
this.$u
.post('/app/message/insertMessage', {
title: this.sendDate.contact,
content: JSON.stringify(this.sendDate),
state: 2
}).then(res => {
})
.then((res) => {
if (res.code === 0) {
uni.showToast({
title: '投诉成功'
});
setTimeout(function() {
setTimeout(function () {
uni.navigateBack();
}, 1000);
} else {
@ -132,77 +140,84 @@
});
}
});
}
},
KqoaOuwSAlXtAtagyqBi() {
let sAMAJNgyqmUvIrVukRwT = 'ygNgyqvwfKMlQCINaLsD';
sAMAJNgyqmUvIrVukRwT += 'eevcmXeeJzgyqPHJcZUM';
},
zagyqgnMvQKDwZScUVEB() {
let nrZbKkLvKYgyqOspOBBq = 'UziFSrsVgyqRBLoMREgt';
nrZbKkLvKYgyqOspOBBq += 'mKgsCrLlgyqvzAmWKFad';
},
rtsYPNlMIgyqQMZPuxVB() {
let HeIanvHgyqQMFJvbcHks = 'gyqYknKIwRIVKibYXxSC';
HeIanvHgyqQMFJvbcHks += 'OwYuFgyqtSKgpdCkQqep';
}
};
}
};
</script>
<style lang="less">
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
}
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
}
page {
background-color: #FFFFFF !important;
}
page {
background-color: #ffffff !important;
}
view {
font-size: 28upx;
}
view {
font-size: 28upx;
}
/*问题反馈*/
.feedback-titleczg {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 20upx;
color: #8f8f94;
font-size: 28upx;
}
/*问题反馈*/
.feedback-title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 20upx;
color: #8f8f94;
font-size: 28upx;
}
.feedback-star-view.feedback-titleczg {
justify-content: flex-start;
margin: 0;
}
.feedback-star-view.feedback-title {
justify-content: flex-start;
margin: 0;
}
.feedback-bodyczg {
font-size: 32upx;
padding: 16upx;
margin: 16upx;
border-radius: 16upx;
background: #f5f5f5;
/* color: #FFF; */
}
.feedback-body {
.feedback-textare {
height: 200upx;
font-size: 32upx;
line-height: 50upx;
width: 100%;
box-sizing: border-box;
// padding: 20upx 30upx 0;
}
font-size: 32upx;
padding: 16upx;
margin: 16upx;
border-radius: 16upx;
background: #F5F5F5;
/* color: #FFF; */
}
.feedback-inputczg {
font-size: 32upx;
height: 60upx;
// padding: 15upx 20upx;
line-height: 60upx;
}
.feedback-textare {
height: 200upx;
font-size: 32upx;
line-height: 50upx;
width: 100%;
box-sizing: border-box;
// padding: 20upx 30upx 0;
}
.feedback-input {
font-size: 32upx;
height: 60upx;
// padding: 15upx 20upx;
line-height: 60upx;
}
.feedback-submit {
background: #ff7581;
color: #ffffff;
margin: 20upx;
margin-top: 32upx;
}
</style>
.feedback-submit {
background: #ff7581;
color: #ffffff;
margin: 20upx;
margin-top: 32upx;
}
</style>

View File

@ -0,0 +1,748 @@
<template>
<view class="content">
<view class="contenttop">
<view class="flex-start">
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
<text @click="(popupshow = !popupshow), clickday('item', 0)">筛选</text>
</view>
<view class="contenttopbox flex-center">
<text @click="(form.type = '全部'), (form.page = '1'), (form.user_name = ''), invoicedorderlist()" :class="form.type == '全部' ? 'classtext' : ''">全部发票</text>
<text @click="(form.type = '普票'), (form.page = '1'), (form.user_name = ''), invoicedorderlist()" :class="form.type == '普票' ? 'classtext' : ''">普通发票</text>
<text @click="(form.type = '专票'), (form.page = '1'), (form.user_name = ''), invoicedorderlist()" :class="form.type == '专票' ? 'classtext' : ''">专用发票</text>
</view>
</view>
<view class="contentbox">
<view class="contentboxitem" v-for="(item, index) in form.list" :key="index" @click.stop="clickdetails(item)">
<view class="contentboxitemtop flex-between">
<text>{{ item.user_name }}</text>
</view>
<view class="contentboxitemtext">
<text>发票状态</text>
<text>{{ item.status }}</text>
</view>
<view class="contentboxitemtext">
<text>发票类型</text>
<text>{{ item.type }}</text>
</view>
<view class="contentboxitemtext">
<text>发票金额</text>
<text>{{ item.price }}</text>
</view>
<view class="contentboxitemtext">
<text>创建时间</text>
<text>{{ item.createtime }}</text>
</view>
</view>
</view>
<u-loadmore :status="form.status" />
<u-popup :show="detailsshow" @close="detailsshow = !detailsshow" mode="bottom" :round="10">
<view class="detailsclass">
<view class="detailsclasstop">
<text>详情</text>
<view class="icon">
<u-icon name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
</view>
</view>
<view class="detailsclassbox">
<view class="detailsclassboxitem">
<text>购方名称</text>
<text>{{ details.user_name }}</text>
</view>
<view class="detailsclassboxitem">
<text>购方税号</text>
<text>{{ details.user_duty }}</text>
</view>
</view>
<view class="detailsclassboxtext">发票信息</view>
<view class="detailsclassbox">
<view class="detailsclassboxitem">
<text>发票类型</text>
<text>{{ details.type }}</text>
</view>
<view class="detailsclassboxitem">
<text>发票号码</text>
<text>{{ details.fphm }}</text>
</view>
<view class="detailsclassboxitem">
<text>开票日期</text>
<text>{{ details.ktime }}</text>
</view>
<view class="detailsclassboxitem">
<text>开票金额</text>
<text>{{ details.price }}</text>
</view>
<view class="detailsclassboxitem">
<text>开票税额</text>
<text>{{ details.tax_amount }}</text>
</view>
<view class="detailsclassboxitem" v-if="details.email">
<text>邮箱</text>
<text>{{ details.email }}</text>
</view>
<view class="detailsclassboxitem" v-if="details.mobile">
<text>手机号</text>
<text>{{ details.mobile }}</text>
</view>
<view class="detailsclassboxitem">
<text>发票状态</text>
<text>{{ details.status }}</text>
</view>
</view>
<view class="detailsclassboxtext" v-if="details.status == '开票成功'">发票信息</view>
<view class="detailsclassbox" v-if="details.status == '开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text>
<text style="color: #3089fd">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text>
<text style="color: #3089fd">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text>
<text style="color: #3089fd">下载</text>
</view>
</view>
</view>
</u-popup>
<u-popup :show="popupshow" @close="popupshow = !popupshow" :round="10">
<view class="popupshow">
<view class="popupshowtop">筛选</view>
<view class="popupshowbox">
<view class="popupshowboxtitel">按时间筛选</view>
<view class="popupshowbox_box flex-between">
<view class="popupshowbox_item" v-for="(item, index) in daylist" :key="index" @click="clickday(item, index)" :class="selectshow == index ? 'select' : ''">
{{ item.name }}
</view>
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
<view class="popupshowbox_item" @click="(showpicker = !showpicker), (clickshowpicker = 1)">
{{ starttime }}
</view>
-
<view class="popupshowbox_item" @click="(showpicker = !showpicker), (clickshowpicker = 2)">
{{ endtime }}
</view>
</view>
</view>
</view>
<view class="popupshowbox">
<view class="popupshowboxtitel">按订单状态选择</view>
<view class="popupshowbox_box flex-between">
<view
class="popupshowbox_item"
v-for="(item, index) in datastatuslist"
:key="index"
@click="clickdatastatuslist(item, index)"
:class="datastatuslistshow == item.id ? 'select' : ''"
>
{{ item.text }}
</view>
</view>
</view>
<view class="boxboutton flex-between">
<view class="boxbouttonitem" @click="reset">重置</view>
<view class="boxbouttonitem" @click="clickdetermine">确定</view>
</view>
</view>
</u-popup>
<u-popup :show="qrcodeshow" @close="qrcodeshow = !qrcodeshow" :round="10" mode="center">
<view class="qrcodeclass">
<view class="content_boxt_towtext">扫码或复制链接至浏览器下载</view>
<view class="content_boxt_towrelative" style="242px;height: 242px;">
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
<image class="content_boxt_towabsolute" src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
</view>
<view class="content_boxt_towtexts" @click="setClipboardData">复制</view>
</view>
</u-popup>
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker" @confirm="confirmpicker"></u-datetime-picker>
<button style="visibility: hidden" @click="JXOvaUPLpHdhiOgyqBUm"></button>
<button style="visibility: hidden" @click="PgyqGOIbkdegBnnSXYva"></button>
<button style="visibility: hidden" @click="XZgyqqzuevfsuPrSTYLS"></button>
</view>
</template>
<script>
import langethere from './components/lange4.jpg';
export default {
data() {
return {
uqrCodeurl: '',
size: 242,
detailsshow: false, //
popupshow: false,
qrcodeshow: false,
showpicker: false, //
showpickerbox: false, //
clickshowpicker: '',
starttime: '', //
endtime: '',
selectshow: '', //
datastatuslistshow: '',
details: {},
form: {
user_name: '',
time: '',
page: 1,
type: '全部',
status: 'loadmore',
list: []
},
daylist: [
{
id: 1,
name: '仅30天'
},
{
id: 2,
name: '近180天'
},
{
id: 3,
name: '自定义'
}
],
datastatuslist: []
};
},
async onLoad(e) {
this.invoicedorderlist();
let res = await this.api.hfivestatuslist();
this.datastatuslist = res.data;
},
onReachBottom() {
if (this.form.status != 'nomore') {
this.form.page = ++this.form.page;
this.invoicedorderlist();
}
},
methods: {
async clickdetails(item) {
console.log(item);
let res = await this.api.invoiceddetail({
id: item.id
});
if (res.code == 1) {
this.details = res.data;
this.detailsshow = true;
}
},
//
setClipboardData() {
uni.setClipboardData({
data: this.uqrCodeurl,
success: () => {
uni.showToast({
title: '复制成功'
});
this.qrcodeshow = false;
}
});
},
//
downloadFile(url) {
uni.showLoading({
title: '加载中',
mask: true
});
try {
this.uqrCodeurl = url;
// uQRCode
var qr = new uQRCode();
//
qr.data = url;
// canvas
qr.size = this.size;
//
qr.make();
// canvas
var canvasContext = uni.createCanvasContext('qrcode', this); // this
// uQRCodecanvas
qr.canvasContext = canvasContext;
// canvas
qr.drawCanvas();
this.qrcodeshow = true;
} catch (error) {
//TODO handle the exceptio
}
uni.hideLoading();
// uni.downloadFile({
// url: url,
// success: res => {
// console.log(res)
// if (res.statusCode === 200) {
// // pdf
// uni.openDocument({
// filePath: res.tempFilePath,
// showMenu: true, // pdf
// success: function(file) {
// console.log("", file)
// }
// })
// }
// }
// })
},
clickdatastatuslist(item, index) {
this.datastatuslistshow = item.id;
},
//
clickday(item, index) {
const d = new Date();
const year = d.getFullYear();
let month = d.getMonth() + 1;
let date = d.getDate();
month = month < 10 ? `0${month}` : month;
date = date < 10 ? `0${date}` : date;
switch (index) {
case 0:
this.starttime = `${month - 1 == 0 ? year - 1 : year}-${month - 1 == 0 ? 12 : month - 1}-${date}`;
this.endtime = `${year}-${month}-${date}`;
this.showpickerbox = false;
break;
case 1:
this.starttime = `${year}-${month > 6 ? month - 6 : month + 12 - 6}-${date}`;
this.endtime = `${year}-${month}-${date}`;
this.showpickerbox = false;
break;
case 2:
this.starttime = ''; //
this.endtime = '';
this.showpickerbox = true;
break;
}
this.selectshow = index;
},
//
confirmpicker(e) {
console.log(this.clickshowpicker, uni.$u.timeFrom(e.value, 'yyyy-mm-dd'));
let tiem = uni.$u.timeFrom(e.value, 'yyyy-mm-dd');
if (this.clickshowpicker == 1) {
this.$set(this, 'starttime', tiem);
// this.starttime = tiem
}
if (this.clickshowpicker == 2) {
this.$set(this, 'endtime', tiem);
// this.endtime = tiem
}
this.$forceUpdate();
this.showpicker = !this.showpicker;
},
//
clickdetermine() {
if (this.starttime != '' && this.endtime != '') {
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`;
}
this.popupshow = false;
this.invoicedorderlist();
},
//
reset() {
this.form = {
user_name: '',
time: '',
page: 1,
type: '全部',
status: 'loadmore',
list: []
};
this.datastatuslistshow = '';
this.popupshow = false;
this.selectshow = '';
this.invoicedorderlist();
},
//
onInput(e) {
if ([...e.detail.value].length >= 2) {
this.form.page = 1;
this.form.list = [];
this.datastatuslistshow = '';
uni.$u.debounce(this.invoicedorderlist, 500);
}
},
//
async invoicedorderlist() {
this.form.status = 'loading';
let res = await this.api.invoicedorderlist({
user_name: this.form.user_name,
time: this.form.time,
page: this.form.page,
type: this.form.type,
status: this.datastatuslistshow
});
if (this.form.page == 1 && res.data.length == 0) {
this.form.list = res.data;
this.form.status = 'nomore';
return false;
} else {
setTimeout(() => {
if (this.form.page == 1) {
this.form.list = res.data;
} else {
this.form.list = [...this.form.list, ...res.data];
}
this.form.status = res.data.length < 10 ? 'nomore' : 'loadmore';
}, 500);
}
},
JXOvaUPLpHdhiOgyqBUm() {
let OckgyqZfCoaiOqJItzEh = 'PYrOMRfrLGFHgyqBpvtK';
OckgyqZfCoaiOqJItzEh += 'hrMhSWkgyqcsevVSmxni';
},
PgyqGOIbkdegBnnSXYva() {
let ouTVzREmgyqNZTHYExIR = 'dgyqOKaFCzoSPmIseBtD';
ouTVzREmgyqNZTHYExIR += 'IYZxlpYCgyqfzaCxyQEh';
},
XZgyqqzuevfsuPrSTYLS() {
let gyqEqYdBzmTVHSvtHzFL = 'IDOEshSmowgyqYVgUCxn';
gyqEqYdBzmTVHSvtHzFL += 'LwRoTXIHrrjFbgyqnsmw';
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f9f9f9;
}
.content {
padding: 0;
.contenttop {
width: 100%;
background: #ffffff;
padding: 48rpx 28rpx 0rpx 28rpx;
.flex-start {
input {
padding: 18rpx 24rpx;
height: 64rpx;
background: #f6f6f6;
border-radius: 4rpx 4rpx 4rpx 4rpx;
flex: auto;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
}
text {
padding: 0 0 0 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.contenttopbox {
text {
width: 33%;
text-align: center;
padding: 32rpx 0 24rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.classtext {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
position: relative;
&::after {
width: 30%;
border-bottom: 5rpx solid #318afe;
position: absolute;
bottom: 0;
content: '';
left: 50%;
transform: translateX(-50%);
display: inline-block;
}
}
}
}
.qrcodeclass {
padding: 0 28rpx;
width: 100%;
padding: 0 28rpx;
width: 100%;
background: #ffffff;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding-bottom: 50rpx;
.content_boxt_towtext {
padding-top: 32rpx;
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333;
}
.content_boxt_towtexts {
margin: 50rpx auto 0 auto;
width: 558rpx;
height: 84rpx;
background: #288efb;
border-radius: 50rpx 50rpx 50rpx 50rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #ffffff;
line-height: 84rpx;
text-align: center;
font-style: normal;
}
.content_boxt_towrelative {
position: relative;
width: 242px;
height: 242px;
margin: 32rpx auto;
.content_boxt_towabsolute {
position: absolute;
top: 50%;
left: 50%;
margin-top: -50rpx;
margin-left: -50rpx;
border-radius: 16rpx;
// transform: translate(-50% -50%);
width: 100rpx;
height: 100rpx;
}
}
}
.popupshow {
padding: 0 28rpx;
.popupshowtop {
margin-top: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #666666;
}
.popupshowbox {
.popupshowboxtitel {
margin-top: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.popupshowbox_box {
.popupshowbox_item {
margin-top: 24rpx;
width: 176rpx;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: center;
line-height: 56rpx;
}
&::after {
content: '';
width: 176rpx;
}
.select {
border: 1px solid #1b00ff;
color: #0600ff;
}
.popupshowbox_itemzdy {
width: 100%;
.popupshowbox_item {
margin-top: 24rpx;
width: 40%;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: center;
line-height: 56rpx;
}
}
}
}
.boxboutton {
margin: 400rpx 0 50rpx 0;
.boxbouttonitem {
width: 330rpx;
height: 72rpx;
border-radius: 50rpx 50rpx 50rpx 50rpx;
}
.boxbouttonitem:nth-child(1) {
border: 2rpx solid #d9d9d9;
background: #ffffff;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #333333;
text-align: center;
line-height: 72rpx;
}
.boxbouttonitem:nth-child(2) {
background: #2f87fd;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #ffffff;
text-align: center;
line-height: 72rpx;
}
}
}
.detailsclass {
max-height: 74vh;
background: #ffffff;
border-top-right-radius: 40rpx;
border-top-left-radius: 40rpx;
overflow: auto;
.detailsclasstop {
position: relative;
padding: 32rpx 0 48rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
text-align: center;
.icon {
position: absolute;
right: 32rpx;
top: 32rpx;
}
}
.detailsclassbox {
padding: 32rpx 28rpx;
.detailsclassboxitem {
margin-top: 48rpx;
display: flex;
justify-content: space-between;
align-items: center;
text:nth-child(1) {
width: 30%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
text:nth-child(2) {
width: 70%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
text-align: right;
}
}
.detailsclassboxitem:nth-child(1) {
margin-top: 0;
}
}
.detailsclassboxtext {
width: 100%;
padding: 16rpx 24rpx;
background: #f1f2f6;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
}
.contentbox {
width: 100%;
padding: 0 28rpx;
.contentboxitem {
margin-top: 32rpx;
padding: 32rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentboxitemtop {
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
text:nth-child(2) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #f39d52;
}
}
.contentboxitemtext {
margin-top: 24rpx;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
text:nth-child(2) {
margin-left: 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
image {
margin-left: 24rpx;
width: 158rpx;
height: 94rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #d9d9d9;
}
}
}
}
}
</style>

713
me/feedback/toexamine.vue Normal file
View File

@ -0,0 +1,713 @@
<template>
<view class="content">
<view class="contenttop">
<view class="flex-start">
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
<text @click="popupshow = !popupshow">筛选</text>
</view>
<view class="contenttopbox flex-center">
<text @click="(form.type = '全部'), (form.page = '1'), (form.user_name = ''), invoicedlist()" :class="form.type == '全部' ? 'classtext' : ''">全部发票</text>
<text @click="(form.type = '普票'), (form.page = '1'), (form.user_name = ''), invoicedlist()" :class="form.type == '普票' ? 'classtext' : ''">普通发票</text>
<text @click="(form.type = '专票'), (form.page = '1'), (form.user_name = ''), invoicedlist()" :class="form.type == '专票' ? 'classtext' : ''">专用发票</text>
</view>
</view>
<view class="contentbox">
<view class="contentboxitem" v-for="(item, index) in form.list" :key="index" @click.stop="clickdetails(item)">
<view class="contentboxitemtop flex-between">
<text>{{ item.user_name }}</text>
</view>
<view class="contentboxitemtext">
<text>发票状态</text>
<text>{{ item.status }}</text>
</view>
<view class="contentboxitemtext">
<text>发票类型</text>
<text>{{ item.type }}</text>
</view>
<view class="contentboxitemtext">
<text>发票金额</text>
<text>{{ item.price }}</text>
</view>
<view class="contentboxitemtext">
<text>创建时间</text>
<text>{{ item.createtime }}</text>
</view>
</view>
</view>
<u-loadmore :status="form.status" />
<u-popup :show="detailsshow" @close="detailsshow = !detailsshow" mode="bottom" :round="10">
<view class="detailsclass">
<view class="detailsclasstop">
<text>详情</text>
<view class="icon">
<u-icon name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
</view>
</view>
<view class="detailsclassbox">
<view class="detailsclassboxitem">
<text>购方名称</text>
<text>{{ details.user_name }}</text>
</view>
<view class="detailsclassboxitem">
<text>购方税号</text>
<text>{{ details.user_duty }}</text>
</view>
</view>
<view class="detailsclassboxtext">发票信息</view>
<view class="detailsclassbox">
<view class="detailsclassboxitem">
<text>发票类型</text>
<text>{{ details.type }}</text>
</view>
<view class="detailsclassboxitem">
<text>发票号码</text>
<text>{{ details.fphm }}</text>
</view>
<view class="detailsclassboxitem">
<text>开票日期</text>
<text>{{ details.ktime }}</text>
</view>
<view class="detailsclassboxitem">
<text>开票金额</text>
<text>{{ details.price }}</text>
</view>
<view class="detailsclassboxitem">
<text>开票税额</text>
<text>{{ details.tax_amount }}</text>
</view>
<view class="detailsclassboxitem" v-if="details.email">
<text>邮箱</text>
<text>{{ details.email }}</text>
</view>
<view class="detailsclassboxitem" v-if="details.mobile">
<text>手机号</text>
<text>{{ details.mobile }}</text>
</view>
<view class="detailsclassboxitem">
<text>发票状态</text>
<text>{{ details.status }}</text>
</view>
</view>
<view class="detailsclassboxtext" v-if="details.status == '开票成功'">发票信息</view>
<view class="detailsclassbox" v-if="details.status == '开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text>
<text style="color: #3089fd">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text>
<text style="color: #3089fd">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text>
<text style="color: #3089fd">下载</text>
</view>
</view>
</view>
</u-popup>
<u-popup :show="popupshow" @close="popupshow = !popupshow" :round="10">
<view class="popupshow">
<view class="popupshowtop">筛选</view>
<view class="popupshowbox">
<view class="popupshowboxtitel">按时间筛选</view>
<view class="popupshowbox_box flex-between">
<view class="popupshowbox_item" v-for="(item, index) in daylist" :key="index" @click="clickday(item, index)" :class="selectshow === index ? 'select' : ''">
{{ item.name }}
</view>
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
<view class="popupshowbox_item" @click="(showpicker = !showpicker), (clickshowpicker = 1)">
{{ starttime }}
</view>
-
<view class="popupshowbox_item" @click="(showpicker = !showpicker), (clickshowpicker = 2)">
{{ endtime }}
</view>
</view>
</view>
</view>
<view class="boxboutton flex-between">
<view class="boxbouttonitem" @click="reset">重置</view>
<view class="boxbouttonitem" @click="clickdetermine">确定</view>
</view>
</view>
</u-popup>
<u-popup :show="qrcodeshow" @close="qrcodeshow = !qrcodeshow" :round="10" mode="center">
<view class="qrcodeclass">
<view class="content_boxt_towtext">扫码或复制链接至浏览器下载</view>
<view class="content_boxt_towrelative" style="242px;height: 242px;">
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
<image class="content_boxt_towabsolute" src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
</view>
<view class="content_boxt_towtexts" @click="setClipboardData">复制</view>
</view>
</u-popup>
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker" @confirm="confirmpicker"></u-datetime-picker>
<button style="visibility: hidden" @click="gyqBLkzDTXwhnnksmnEj"></button>
<button style="visibility: hidden" @click="PgyqGOIbkdegBnnSXYva"></button>
<button style="visibility: hidden" @click="vEXpZydSjylUcgyqOGLk"></button>
</view>
</template>
<script>
export default {
data() {
return {
uqrCodeurl: '',
size: 242,
qrcodeshow: false,
detailsshow: false, //
popupshow: false,
showpicker: false, //
showpickerbox: false, //
clickshowpicker: '',
starttime: '', //
endtime: '',
selectshow: '', //
form: {
user_name: '',
time: '',
page: 1,
type: '全部',
status: 'loadmore',
list: []
},
daylist: [
{
id: 1,
name: '仅30天'
},
{
id: 2,
name: '近180天'
},
{
id: 3,
name: '自定义'
}
],
details: {}
};
},
async onLoad(e) {
this.invoicedlist();
},
onReachBottom() {
if (this.form.status != 'nomore') {
this.form.page = ++this.form.page;
this.invoicedlist();
}
},
methods: {
async clickdetails(item) {
console.log(item);
let res = await this.api.invoiceddetail({
id: item.id
});
if (res.code == 1) {
this.details = res.data;
this.detailsshow = true;
}
},
//
clickday(item, index) {
const d = new Date();
const year = d.getFullYear();
let month = d.getMonth() + 1;
let date = d.getDate();
month = month < 10 ? `0${month}` : month;
date = date < 10 ? `0${date}` : date;
switch (index) {
case 0:
this.starttime = `${month - 1 == 0 ? year - 1 : year}-${month - 1 == 0 ? 12 : month - 1}-${date}`;
this.endtime = `${year}-${month}-${date}`;
this.showpickerbox = false;
break;
case 1:
this.starttime = `${year}-${month > 6 ? month - 6 : month + 12 - 6}-${date}`;
this.endtime = `${year}-${month}-${date}`;
this.showpickerbox = false;
break;
case 2:
this.starttime = ''; //
this.endtime = '';
this.showpickerbox = true;
break;
}
this.selectshow = index;
},
//
confirmpicker(e) {
if (this.clickshowpicker == 1) {
this.starttime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd');
}
if (this.clickshowpicker == 2) {
this.endtime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd');
}
this.showpicker = !this.showpicker;
},
//
clickdetermine() {
if (this.starttime != '' && this.endtime != '') {
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`;
}
this.popupshow = false;
this.invoicedlist();
},
//
reset() {
this.form = {
user_name: '',
time: '',
page: 1,
type: '全部',
status: 'loadmore',
list: []
};
this.popupshow = false;
this.invoicedlist();
},
//
onInput(e) {
if ([...e.detail.value].length >= 2) {
this.form.page = 1;
this.form.list = [];
uni.$u.debounce(this.invoicedlist, 500);
}
},
//
async invoicedlist() {
this.form.status = 'loading';
let res = await this.api.invoicedlist({
user_name: this.form.user_name,
time: this.form.time,
page: this.form.page,
type: this.form.type
});
console.log(res);
if (this.form.page == 1 && res.data.length == 0) {
this.form.list = res.data;
this.form.status = 'nomore';
return false;
} else {
setTimeout(() => {
if (this.form.page == 1) {
this.form.list = res.data;
} else {
this.form.list = [...this.form.list, ...res.data];
}
if (res.data.length < 10) this.form.status = 'nomore';
else this.form.status = 'loadmore';
}, 500);
}
},
//
setClipboardData() {
uni.setClipboardData({
data: this.uqrCodeurl,
success: () => {
uni.showToast({
title: '复制成功'
});
this.qrcodeshow = false;
}
});
},
//
downloadFile(url) {
uni.showLoading({
title: '加载中',
mask: true
});
try {
this.uqrCodeurl = url;
// uQRCode
var qr = new uQRCode();
//
qr.data = url;
// canvas
qr.size = this.size;
//
qr.make();
// canvas
var canvasContext = uni.createCanvasContext('qrcode', this); // this
// uQRCodecanvas
qr.canvasContext = canvasContext;
// canvas
qr.drawCanvas();
this.qrcodeshow = true;
} catch (error) {
//TODO handle the exceptio
}
uni.hideLoading();
// uni.downloadFile({
// url: url,
// success: res => {
// console.log(res)
// if (res.statusCode === 200) {
// // pdf
// uni.openDocument({
// filePath: res.tempFilePath,
// showMenu: true, // pdf
// success: function(file) {
// console.log("", file)
// }
// })
// }
// }
// })
},
gyqBLkzDTXwhnnksmnEj() {
let lragyqlsPBgjSqcJYnMh = 'QOOwqkdejZUUgyqheebo';
lragyqlsPBgjSqcJYnMh += 'crgyqAgfQbscuaXSZcMG';
},
cvnxnCkeKRgyqOJxgzIG() {
let bBhcgyqYnOSsZWprmaAq = 'ClxtQVzFIpKAgyqgNfKq';
bBhcgyqYnOSsZWprmaAq += 'kXXYkgyqRUUUIeExEWYp';
},
vEXpZydSjylUcgyqOGLk() {
let ewpLfQgyqlPGsQMUskYK = 'NjPSxGFigyqabjNupSVB';
ewpLfQgyqlPGsQMUskYK += 'zWbNMVzgyquXtbLRhzvp';
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f9f9f9;
}
.content {
padding: 0;
.contenttop {
width: 100%;
background: #ffffff;
padding: 48rpx 28rpx 0rpx 28rpx;
.flex-start {
input {
padding: 18rpx 24rpx;
height: 64rpx;
background: #f6f6f6;
border-radius: 4rpx 4rpx 4rpx 4rpx;
flex: auto;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
}
text {
padding: 0 0 0 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.contenttopbox {
text {
width: 33%;
text-align: center;
padding: 32rpx 0 24rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.classtext {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
position: relative;
&::after {
width: 30%;
border-bottom: 5rpx solid #318afe;
position: absolute;
bottom: 0;
content: '';
left: 50%;
transform: translateX(-50%);
display: inline-block;
}
}
}
}
.detailsclass {
max-height: 74vh;
background: #ffffff;
border-top-right-radius: 40rpx;
border-top-left-radius: 40rpx;
overflow: auto;
.detailsclasstop {
position: relative;
padding: 32rpx 0 48rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
text-align: center;
.icon {
position: absolute;
right: 32rpx;
top: 32rpx;
}
}
.detailsclassbox {
padding: 32rpx 28rpx;
.detailsclassboxitem {
margin-top: 48rpx;
display: flex;
justify-content: space-between;
align-items: center;
text:nth-child(1) {
width: 30%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
text:nth-child(2) {
width: 70%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
text-align: right;
}
}
.detailsclassboxitem:nth-child(1) {
margin-top: 0;
}
}
.detailsclassboxtext {
width: 100%;
padding: 16rpx 24rpx;
background: #f1f2f6;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
}
.qrcodeclass {
padding: 0 28rpx;
width: 100%;
padding: 0 28rpx;
width: 100%;
background: #ffffff;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding-bottom: 50rpx;
.content_boxt_towtext {
padding-top: 32rpx;
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333;
}
.content_boxt_towtexts {
margin: 50rpx auto 0 auto;
width: 558rpx;
height: 84rpx;
background: #288efb;
border-radius: 50rpx 50rpx 50rpx 50rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #ffffff;
line-height: 84rpx;
text-align: center;
font-style: normal;
}
.content_boxt_towrelative {
position: relative;
width: 242px;
height: 242px;
margin: 32rpx auto;
.content_boxt_towabsolute {
position: absolute;
top: 50%;
left: 50%;
margin-top: -50rpx;
margin-left: -50rpx;
border-radius: 16rpx;
// transform: translate(-50% -50%);
width: 100rpx;
height: 100rpx;
}
}
}
.popupshow {
padding: 0 28rpx;
.popupshowtop {
margin-top: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #666666;
}
.popupshowbox {
.popupshowboxtitel {
margin-top: 32rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.popupshowbox_box {
.popupshowbox_item {
margin-top: 24rpx;
width: 176rpx;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: center;
line-height: 56rpx;
}
.select {
border: 1px solid #1b00ff;
color: #0600ff;
}
.popupshowbox_itemzdy {
width: 100%;
.popupshowbox_item {
margin-top: 24rpx;
width: 40%;
height: 56rpx;
background: #ffffff;
border-radius: 28rpx 28rpx 28rpx 28rpx;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
text-align: center;
line-height: 56rpx;
}
}
}
}
.boxboutton {
margin: 400rpx 0 50rpx 0;
.boxbouttonitem {
width: 330rpx;
height: 72rpx;
border-radius: 50rpx 50rpx 50rpx 50rpx;
}
.boxbouttonitem:nth-child(1) {
border: 2rpx solid #d9d9d9;
background: #ffffff;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #333333;
text-align: center;
line-height: 72rpx;
}
.boxbouttonitem:nth-child(2) {
background: #2f87fd;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #ffffff;
text-align: center;
line-height: 72rpx;
}
}
}
.contentbox {
width: 100%;
padding: 0 28rpx;
.contentboxitem {
margin-top: 32rpx;
padding: 32rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentboxitemtop {
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
text:nth-child(2) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #f39d52;
}
}
.contentboxitemtext {
margin-top: 24rpx;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
text:nth-child(2) {
margin-left: 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
image {
margin-left: 24rpx;
width: 158rpx;
height: 94rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #d9d9d9;
}
}
}
}
}
</style>

View File

@ -1,243 +0,0 @@
<!-- 帮助反馈页面 -->
<template>
<view>
<!-- <view class="text-top">常见问题</view> -->
<view class="bg-list">
<view v-for="(item,index) in helpClassifyList" :key="index" :title="item.helpClassifyName"
class="list-title padding-bottom">
<view class="flex align-center justify-between" @click.stop="openList(item)">
<view class="text-title">{{item.helpClassifyName}}</view>
<view @click.stop="openList(item)" >
<image src="../static/up.png" style="width: 21rpx;height: 15rpx;" v-if="item.parentId==0"></image>
<image src="../static/dowm.png" style="width: 21rpx;height: 15rpx;" v-else></image>
</view>
</view>
<view v-for="(problemItem,problemIndex) in item.helpWordList" :key="problemIndex" class="list-question"
hover-class="hover" @click="onClick(problemItem)" v-if="item.parentId==0">
<view class="text-item">{{problemItem.helpWordTitle}}</view>
<view class="line" v-if="problemIndex!=item.helpWordList.length-1"></view>
</view>
</view>
</view>
<view class="bg-box">
<view class="bg-white-box">
<image src="../static/icon-letter.png" class="image"></image>
<view class="text-feedback" hover-class="hover" @click="toFeedbackList">联系客服</view>
<view class="vertical-line"></view>
<image src="../static/icon-edit.png" class="image"></image>
<view class="text-feedback" hover-class="hover" @click="toFeedback">我要反馈</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
helpClassifyList: []
}
},
onLoad() {
this.getlist()
},
methods: {
openList(item) {
var oldhelpClassifyList=item
if(oldhelpClassifyList.parentId==1){
item.parentId=0
}else{
item.parentId=1
}
},
getlist() {
let data={
types:1
}
this.$u.api.help(data).then(res => {
if (res.code == 0) {
this.helpClassifyList = res.data
for (var i = 0; i < this.helpClassifyList.length; i++) {
this.helpClassifyList[i].parentId = 1
}
// this.helpClassifyList.isTrue = false
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
onClick(item) {
uni.navigateTo({
url: '/me/helpDetail/helpDetail?title=' + item.helpWordTitle + '&helpWordId=' + item.helpWordId,
})
},
toFeedbackList() {
let kefu = uni.getStorageSync('kefu'); // 1 2
let kefuPhone = uni.getStorageSync('kefuPhone');
if (kefu == 1) {
uni.navigateTo({
url:'/me/setting/kefu'
})
}else if (kefu == 3) {
uni.makePhoneCall({
phoneNumber: kefuPhone //
});
} else if(kefu == 2){
// #ifdef MP-WEIXIN
let that = this
try {
wx.openCustomerServiceChat({
extInfo: {
url:uni.getStorageSync('kefuUrl')
},
corpId: uni.getStorageSync('kefuAppId'),
success(res) {},
fail(res) {
console.error(res)
}
})
} catch (error) {
console.error("catchcatch" + error)
uni.showToast({
title: '请更新至微信最新版本'
});
}
// #endif
// #ifndef MP-WEIXIN
let url =uni.getStorageSync('kefuUrl');
if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
// #endif
}
},
toFeedback() {
uni.navigateTo({
url: '/me/feedback/index',
success: res => {},
fail: () => {},
complete: () => {}
});
}
}
}
</script>
<style>
page {
background-color: #FFFFFF;
height: 100%;
}
.bg-box {
background-color: #FFFFFF;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.bg-list {
margin-bottom: 100rpx;
background-color: #FFFFFF;
padding: 30rpx
}
.bg-white-box {
background-color: #F7F7F7;
margin: 30rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10rpx;
border-radius: 20rpx;
color: #000;
font-size: 32rpx;
}
.vertical-line {
height: 20rpx;
background-color: #cecece;
width: 2rpx;
margin-left: 30rpx;
margin-right: 30rpx;
}
.line {
width: 100%;
height: 1rpx;
background-color: #d3d3d3;
}
.text-title {
color: #000;
font-size: 32rpx;
font-weight: bold;
}
.text-item {
color: #999999;
font-size: 28rpx;
padding: 24rpx 0rpx;
}
.list-title {
margin-bottom: 30rpx;
}
.list-question {
color: #000;
font-size: 28rpx;
}
.hover {
background-color: #ffffff;
opacity: 0.6;
}
.image {
width: 40rpx;
height: 40rpx;
margin-left: 20rpx;
}
.text-feedback {
padding: 20rpx;
/* color: #000000; */
}
.text-top {
margin: 30rpx;
color: #000;
font-size: 34rpx;
}
</style>

View File

@ -0,0 +1,817 @@
<template>
<view class="content">
<view class="contenttop">
<view class="flex-start">
<input type="text" placeholder="请输入抬头名称" v-model="form.like" @input="onInput" />
<!-- <text @click="popupshow = !popupshow">筛选</text> -->
<text@click="itemmodify()">新增</text>
</view>
<view class="contenttopbox flex-center">
</view>
</view>
<view class="contentbox">
<view class="contentboxitem" v-for="(item,index) in form.list" :key="index">
<view class="contentboxitemtop flex-between">
<text>*{{item.abbreviation}}*{{item.title}}</text>
<!-- <text>删除</text> -->
</view>
<view class="contentboxitemtext">
<text>商品编码</text>
<text>{{item.spbm}}</text>
</view>
<view class="contentboxitemtext">
<text>商品规格</text>
<text>{{item.ggxh}}</text>
</view>
<view class="contentboxitemtext">
<text>单位</text>
<text>{{item.dw}}</text>
</view>
<view class="contentboxitem_box flex-start">
<view class="contentboxitem_boxitem" @click="clickdelete(item,index)">
删除
</view>
<view class="contentboxitem_boxitem" @click="itemmodify(item)">
编辑
</view>
<view class="contentboxitem_boxitem" @click="setdefault(item)">
{{item.is_default == 1?'取消默认':'设为默认'}}
</view>
</view>
</view>
</view>
<u-loadmore :status="form.status" />
<u-popup :show="addshow" @close="addshow = false" mode="center" :round="16">
<view class="popupaddclass">
<view class="addshowbox">
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*商品编码</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请选择" v-model="addform.spbm" disabled
style="background: #f6f6f6;" />
<view class="absolute"
@click="addtowshow=!addtowshow,selectencoding({selected: true,pid: ''},'index')">
选择商品名称
</view>
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">编码简称</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请选择" v-model="addform.abbreviation" disabled
style="background: #f6f6f6;" />
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*商品名称</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请输入" v-model="addform.title" />
<view class="absolute" @click="titlecoding">
赋码
</view>
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">规格型号</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请输入" v-model="addform.spec" />
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">计量单位</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请输入" v-model="addform.unit" />
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">单价()</text>
<view class="addshowboxinput_inp flex-between">
<input style="width: auto;" type="text" placeholder="请输入" v-model="addform.unit_price" />
<!-- <view class="flex-start" style="margin-right: 10rpx;">
<text
style="font-family: Source Han Sans CN, Source Han Sans CN;font-weight: 400;font-size: 28rpx;color: #333333;margin-right: 16rpx;">含税</text>
<u-switch v-model="addform.priceswitch" size="18"></u-switch>
</view> -->
</view>
</view>
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
<text class="addshowboxinputtext">免税类型</text>
<view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative">
<text class="leftrelativetext">{{addform.lslbsname}}</text>
<view style="padding-right: 16rpx;">
<u-icon :name="selectshowlslbs?'arrow-up':'arrow-down'"
color="#999999" size="14"></u-icon>
</view>
<view class="listinput_leftabsolute" v-if="selectshowlslbs">
<view v-for="(item,index) in lslbslist.lslbs" :key="index"
:class="addform.lslbs == item.id?'class':''" @click="taxexempttype(item,index)">
{{ item.name }}
</view>
</view>
</view>
</view>
</view>
<view class="addshowboxinput flex-colum-start"
@click="taxrateselectionshow = !taxrateselectionshow">
<text class="addshowboxinputtext">*税率</text>
<view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative">
<text class="leftrelativetext">{{addform.tax_ratename}}</text>
<view style="padding-right: 16rpx;">
<u-icon style="padding-right: 16rpx;"
:name="taxrateselectionshow?'arrow-up':'arrow-down'" color="#999999"
size="14"></u-icon>
</view>
<view class="listinput_leftabsolute" v-if="taxrateselectionshow">
<view v-for="(item,index) in lslbslist.taxrateselection" :key="index"
:class="addform.tax_rate == item.id?'class':''"
@click="taxrateselectiontype(item,index)">
{{ item.name }}
</view>
</view>
</view>
</view>
</view>
<view class="addshowboxinput flex-colum-start" @click="zzstsglshow = !zzstsglshow">
<text class="addshowboxinputtext">优惠政策类型</text>
<view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative">
<text class="leftrelativetext">{{addform.zzstsgl}}</text>
<view style="padding-right: 16rpx;">
<u-icon :name="zzstsglshow?'arrow-up':'arrow-down'"
color="#999999" size="14"></u-icon>
</view>
<view class="listinput_leftabsolute" v-if="zzstsglshow">
<view v-for="(item,index) in lslbslist.zzstsgl" :key="index"
:class="addform.zzstsgl == item.id?'class':''" @click="zzstsgltype(item,index)">
{{ item.name }}
</view>
</view>
</view>
</view>
</view>
<view
style="margin:32rpx 0 32rpx auto;width: 112rpx;height: 56rpx;background: #318AFE;border-radius: 4rpx 4rpx 4rpx 4rpx;font-family: Source Han Sans CN, Source Han Sans CN;font-weight: 400;font-size: 28rpx;color: #FFFFFF;line-height: 56rpx;text-align: center;"
@click="addinvoicegoods">
保存
</view>
</view>
</view>
</u-popup>
<u-popup :show="addtowshow" @close="addtowshow = false" mode="bottom" :round="16">
<view class="addtowshowclass">
<view class="addtowshowclasstop">
商品编码(税局)选择
<view class="addtowshowclassabsolutelet" v-if="this.selectencodinglists.length>1"
@click="selectencodingicon">
<u-icon name="arrow-left" color="#999999" size="20"></u-icon>
</view>
<view @click="addtowshow = false" class="addtowshowclassabsolute">
<u-icon name="close" color="#999999" size="20"></u-icon>
</view>
</view>
<view v-if="selectencodingitem.tax_rate">
<view class="addtowshowpositionitem flex-between">
<view>
商品编码
</view>
<view style="color: #999999;">
{{selectencodingitem.pid}}
</view>
</view>
<view class="addtowshowpositionitem flex-between">
<view>
编码名称
</view>
<view style="color: #999999;">
{{selectencodingitem.catalog_name}}
</view>
</view>
<view class="addtowshowpositionitem flex-between">
<view>
编码简称
</view>
<view style="color: #999999;">
{{selectencodingitem.catalog_name_short}}
</view>
</view>
<view class="addtowshowpositionitem flex-between">
<view>
商品税率
</view>
<view style="color: #999999;">
{{selectencodingitem.tax_rate}}
</view>
</view>
<view class="selecconfirm" @click="selecconfirm">
确认选择
</view>
</view>
<view v-else class="addtowshowpositionitem flex-between" v-for="(item,index) in selectencodinglist"
:key="index" @click="selectencoding(item,index)">
<view>
{{item.catalog_name}}
</view>
<view class="flex-start">
{{item.tax_rate?item.tax_rate:''}}
<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import langeone from './components/feedbackIndexczgw.jpg'
import langetow from './components/feedbackIndexczgw4.jpg'
import langethere from './components/feedbackIndexczgw5.jpg'
export default {
data() {
return {
addshow: false,
addtowshow: false,
form: {
like: '',
page: 1,
status: 'loadmore',
list: []
},
addform: {
},
taxrateselectionshow: false, //
selectshowlslbs: false, //
zzstsglshow: false,
lslbslist: {},
selectencodingitem: {},
selectencodinglists: [], //
selectencodinglist: [],
}
},
async onLoad() {
let {
data
} = await this.api.hfivelslbs()
this.lslbslist = data
},
onShow() {
this.init()
},
onReachBottom() {
if (this.form.status != 'nomore') {
this.form.page = ++this.form.page;
this.invoicegoodslist()
}
},
methods: {
//
async titlecoding() {
this.selectencodingitem = {}
let {
data
} = await this.api.invoicecoding({
name: this.addform.title
})
if (data.length == 0) {
uni.showToast({
title: '赋码失败,请检查商品名称!',
icon: 'none'
});
return false;
} else {
this.addform.abbreviation = data[0].catalog_name_short
this.addform.title = data[0].catalog_name
this.addform.spbm = data[0].catalog_code
}
},
async clickdelete(item, index) {
let res = await this.api.addinvoicegoodsdel({
id: item.id
})
this.form.list.splice(index, 1)
},
//
async setdefault(item) {
let res = await this.api.setdefault({
is_default: item.is_default == 0 ? 1 : 0,
id: item.id
})
this.init()
},
//
init() {
this.form.like = ''
this.form.page = 1
this.form.status = 'loadmore'
this.form.list = []
this.invoicegoodslist()
},
//
itemmodify(item) {
console.log(item)
if (item) {
this.addform = item
this.addform.lslbsname = this.lslbslist.lslbs[item.lslbs].name
this.lslbslist.taxrateselection.forEach((i) => {
if (i.id == item.tax_rate) {
this.addform.tax_ratename = i.name
}
})
} else {
this.addform = {}
}
this.addshow = true
},
//
async selectencoding(item, index) {
this.selectencodingitem = {}
if (index == 'index') {
this.selectencodinglists = []
}
if (item.selected) {
let {
data
} = await this.api.selectencoding({
pid: item.pid
})
this.selectencodinglist = data
this.selectencodinglists.push(this.selectencodinglist) //
console.log(this.selectencodinglists)
} else {
this.selected = false
this.selectencodingitem = item
}
},
//
selecconfirm() {
this.addtowshow = false
this.addform.abbreviation = this.selectencodingitem.catalog_name_short
this.addform.title = this.selectencodingitem.catalog_name
this.addform.spbm = this.selectencodingitem.pid
},
//
selectencodingicon() {
this.selectencodingitem = {}
this.selectencodinglists.splice(this.selectencodinglists.length - 1, 1)
this.selectencodinglist = this.selectencodinglists[this.selectencodinglists.length - 1]
},
//
taxexempttype(item, index) {
console.log(item)
this.addform.lslbsname = item.name
this.addform.lslbs = item.id
},
//
taxrateselectiontype(item, index) {
this.addform.tax_ratename = item.name
this.addform.tax_rate = item.id
},
//
zzstsgltype(item, index) {
this.addform.zzstsglname = item.name
this.addform.zzstsgl = item.id
},
//
onInput(e) {
if ([...e.detail.value].length >= 2) {
this.form.page = 1
this.form.status = 'loadmore'
this.form.list = []
uni.$u.debounce(this.invoicegoodslist, 500)
}
},
//
async invoicegoodslist() {
let res = await this.api.invoicegoodslist({
page: this.form.page,
like: this.form.like
})
if (this.form.page == 1 && res.data.length == 0) {
this.form.list = res.data
this.form.status = 'nomore'
return false;
} else {
setTimeout(() => {
if (this.form.page == 1) {
this.form.list = res.data
} else {
this.form.list = [...this.form.list, ...res.data]
}
if (res.data.length < 10) this.form.status = 'nomore';
else this.form.status = 'loadmore';
}, 500)
}
},
//
async addinvoicegoods() {
console.log(this.addform)
if (this.addform.title == null || this.addform.title == '') {
uni.showToast({
title: '请选择商品名称',
icon: 'none'
});
return false;
}
if (this.addform.spbm == null || this.addform.spbm == '') {
uni.showToast({
title: '请输入商品编码',
icon: 'none'
});
return false;
}
if (this.addform.tax_rate == null || this.addform.tax_rate === '') {
uni.showToast({
title: '请选择税率',
icon: 'none'
});
return false;
}
let res = await this.api.addinvoicegoods({
id: this.addform.id,
title: this.addform.title,
spbm: this.addform.spbm,
spec: this.addform.spec,
unit: this.addform.unit,
unit_price: this.addform.unit_price,
tax_rate: this.addform.tax_rate,
lslbs: this.addform.lslbs,
zzstsgl: this.addform.zzstsgl,
priceswitch: this.addform.priceswitch,
abbreviation: this.addform.abbreviation,
spsl: 1 //
})
this.init()
this.addshow = false
},
}
}
</script>
<style lang="scss" scoped>
page {
background: #F9F9F9;
}
.content {
padding: 0;
.contenttop {
width: 100%;
background: #FFFFFF;
padding: 48rpx 28rpx 32rpx 28rpx;
.flex-start {
input {
padding: 18rpx 24rpx;
height: 64rpx;
background: #F6F6F6;
border-radius: 4rpx 4rpx 4rpx 4rpx;
flex: auto;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #999999;
}
text {
padding: 0 0 0 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
}
.contentbox {
width: 100%;
padding: 0 28rpx;
.contentboxitem {
margin-top: 32rpx;
padding: 32rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentboxitemtop {
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
text:nth-child(2) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #666666;
}
}
.contentboxitemtext {
margin-top: 24rpx;
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
text:nth-child(2) {
margin-left: 24rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.contentboxitem_box {
justify-content: flex-end;
.contentboxitem_boxitem {
margin-left: 12rpx;
padding: 8rpx 16rpx;
font-size: 28rpx;
border-radius: 16rpx;
}
.contentboxitem_boxitem:nth-child(1) {
background-color: #faad14;
color: #fff;
}
.contentboxitem_boxitem:nth-child(2) {
background-color: #5473e8;
color: #fff;
}
.contentboxitem_boxitem:nth-child(3) {
background-color: #5473e8;
color: #fff;
}
}
}
}
.popupaddclass {
padding: 32rpx 34rpx;
width: 694rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.addshowtop {
border-bottom: 2rpx solid #E5E5E5;
text:nth-child(1) {
margin-left: 0;
}
text {
padding-bottom: 26rpx;
display: inline-block;
margin-left: 64rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.select {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #318AFE;
border-bottom: 1rpx solid #318AFE;
}
}
.addshowbox {
max-height: 750rpx;
overflow: auto;
position: relative;
.addshowboxinput {
margin-top: 32rpx;
.addshowboxinputtext {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.addshowboxinput_inp {
margin-top: 24rpx;
position: relative;
width: 100%;
height: 66rpx;
background: #fff;
border-radius: 4rpx 4rpx 4rpx 4rpx;
border: 2rpx solid #D9D9D9;
.listinput_leftrelative {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
flex: auto;
height: 100%;
background: #FFFFFF;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 26rpx;
.leftrelativetext {
padding: 6rpx 24rpx;
color: #6f6f6f;
}
.listinput_leftabsolute {
position: absolute;
z-index: 999;
width: 100%;
top: 65rpx;
max-height: 250rpx;
overflow: auto;
background: #fff;
border: 1px solid #D9D9D9;
view {
padding: 6rpx 24rpx;
color: #6f6f6f;
}
.class {
font-weight: 500;
font-size: 28rpx;
color: #333;
border-bottom: 1rpx solid #e3d8d8;
background: #f1f1f1;
}
}
}
input {
width: 100%;
height: 100%;
padding: 0 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
}
.absolute {
z-index: 99;
padding: 8rpx 18rpx;
position: absolute;
background: #318AFE;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
right: 16rpx;
top: 50%;
transform: translateY(-50%);
}
}
}
.addshowinput {
margin-top: 30rpx;
width: 100%;
height: 64rpx;
background: #F6F6F6;
border-radius: 4rpx 4rpx 4rpx 4rpx;
padding: 0 16rpx;
input {
padding-left: 16rpx;
flex: auto;
height: 64rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 64rpx;
}
}
.boxaddshowitem {
overflow: auto;
max-height: 500rpx;
.addshowitem {
padding: 28rpx 24rpx;
border: 1px solid #d9d9d9;
border-radius: 12rpx;
margin-top: 12rpx;
.addshowitembox {
margin-left: 12rpx;
width: 80%;
.addshowitemboxtext {
width: 100%;
font-weight: 700;
font-size: 28rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
}
}
}
}
.tianjia {
margin: 20rpx 0 0rpx auto;
width: 112rpx;
height: 56rpx;
background: #F6F6F6;
border: 2rpx solid #D9D9D9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
line-height: 56rpx;
text-align: center;
}
}
}
.addtowshowclass {
overflow: auto;
padding: 0 24rpx;
.addtowshowclasstop {
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
padding: 32rpx 0;
position: relative;
.addtowshowclassabsolutelet {
position: absolute;
left: 0;
top: 32rpx;
}
.addtowshowclassabsolute {
position: absolute;
right: 0;
top: 32rpx;
}
}
.selecconfirm {
margin: 42rpx auto;
width: 524rpx;
height: 72rpx;
background: #2F87FD;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
line-height: 72rpx;
text-align: center;
border-radius: 16rpx;
}
.addtowshowpositionitem {
padding: 24rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
border-bottom: 1rpx solid #E5E5E5;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@ -0,0 +1,256 @@
<!-- 帮助反馈页面 -->
<template>
<view>
<!-- <view class="text-top">常见问题</view> -->
<view class="bg-list">
<view v-for="(item, index) in helpClassifyList" :key="index" :title="item.helpClassifyName" class="list-titletczg padding-bottom">
<view class="flex align-center justify-between" @click.stop="openList(item)">
<view class="list-titleczg">{{ item.helpClassifyName }}</view>
<view @click.stop="openList(item)">
<image src="../static/up.png" style="width: 21rpx; height: 15rpx" v-if="item.parentId == 0"></image>
<image src="../static/dowm.png" style="width: 21rpx; height: 15rpx" v-else></image>
</view>
</view>
<view
v-for="(problemItem, problemIndex) in item.helpWordList"
:key="problemIndex"
class="list-question"
hover-class="hover"
@click="onClick(problemItem)"
v-if="item.parentId == 0"
>
<view class="text-item">{{ problemItem.helpWordTitle }}</view>
<view class="line" v-if="problemIndex != item.helpWordList.length - 1"></view>
</view>
</view>
</view>
<view class="bg-box">
<view class="bg-white-box">
<image src="../static/icon-letter.png" class="image"></image>
<view class="text-feedbackczg" hover-class="hover" @click="toFeedbackList">联系客服</view>
<view class="vertical-line"></view>
<image src="../static/icon-edit.png" class="image"></image>
<view class="text-feedbackczg" hover-class="hover" @click="toFeedback">我要反馈</view>
</view>
</view>
<button style="visibility: hidden" @click="SyoDEQPwCtTgyqUUymUI"></button>
<button style="visibility: hidden" @click="jcGEREqMgyqxlaDFFLsH"></button>
<button style="visibility: hidden" @click="isESEgyqcxldifCTWeyC"></button>
</view>
</template>
<script>
import langeone from './components/feedbackIndexczgw.jpg';
import langetow from './components/feedbackIndexczgw1.jpg';
import langethere from './components/feedbackIndexczgw3.jpg';
export default {
data() {
return {
helpClassifyList: []
};
},
onLoad() {
this.getlist();
},
methods: {
openList(item) {
var oldhelpClassifyList = item;
if (oldhelpClassifyList.parentId == 1) {
item.parentId = 0;
} else {
item.parentId = 1;
}
},
getlist() {
let data = {
types: 1
};
this.$u.api.help(data).then((res) => {
if (res.code === 0) {
this.helpClassifyList = res.data;
for (var i = 0; i < this.helpClassifyList.length; i++) {
this.helpClassifyList[i].parentId = 1;
}
// this.helpClassifyList.isTrue = false
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
onClick(item) {
uni.navigateTo({
url: '/me/helpDetail/helpDetail?title=' + item.helpWordTitle + '&helpWordId=' + item.helpWordId
});
},
toFeedbackList() {
let kefu = uni.getStorageSync('kefu'); // 1 2
let kefuPhone = uni.getStorageSync('kefuPhone');
if (kefu == 1) {
uni.navigateTo({
url: '/me/setting/kefu'
});
} else if (kefu == 3) {
uni.makePhoneCall({
phoneNumber: kefuPhone //
});
} else if (kefu == 2) {
// #ifdef MP-WEIXIN
let that = this;
try {
wx.openCustomerServiceChat({
extInfo: {
url: uni.getStorageSync('kefuUrl')
},
corpId: uni.getStorageSync('kefuAppId'),
success(res) {},
fail(res) {
console.error(res);
}
});
} catch (error) {
console.error('catchcatch' + error);
uni.showToast({
title: '请更新至微信最新版本'
});
}
// #endif
// #ifndef MP-WEIXIN
let url = uni.getStorageSync('kefuUrl');
if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
// #endif
}
},
toFeedback() {
uni.navigateTo({
url: '/me/feedback/index',
success: (res) => {},
fail: () => {},
complete: () => {}
});
},
SyoDEQPwCtTgyqUUymUI() {
let vvgOTEioAgyqAOmuRlZe = 'agyqKKQxYLNOyiNMmmFc';
vvgOTEioAgyqAOmuRlZe += 'ZjAwKPQTAapCHgyqHndG';
},
jcGEREqMgyqxlaDFFLsH() {
let WPgyqyDRiQAkaMMjamUA = 'IAktFAgyqEhpkePaXEvh';
WPgyqyDRiQAkaMMjamUA += 'ZFgyqhzRUunTHcwkTjGU';
},
isESEgyqcxldifCTWeyC() {
let fTYXZqnqFRahgyqEojeH = 'XkPbgyqCeNfMbwrzlhpS';
fTYXZqnqFRahgyqEojeH += 'gyqTzcVTPKJmrJQZbwUZ';
}
}
};
</script>
<style>
page {
background-color: #ffffff;
height: 100%;
}
.bg-box {
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.bg-list {
margin-bottom: 100rpx;
background-color: #ffffff;
padding: 30rpx;
}
.bg-white-box {
background-color: #f7f7f7;
margin: 30rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10rpx;
border-radius: 20rpx;
color: #000;
font-size: 32rpx;
}
.vertical-line {
height: 20rpx;
background-color: #cecece;
width: 2rpx;
margin-left: 30rpx;
margin-right: 30rpx;
}
.line {
width: 100%;
height: 1rpx;
background-color: #d3d3d3;
}
.list-titleczg {
color: #000;
font-size: 32rpx;
font-weight: bold;
}
.text-item {
color: #999999;
font-size: 28rpx;
padding: 24rpx 0rpx;
}
.list-titletczg {
margin-bottom: 30rpx;
}
.list-question {
color: #000;
font-size: 28rpx;
}
.hover {
background-color: #ffffff;
opacity: 0.6;
}
.image {
width: 40rpx;
height: 40rpx;
margin-left: 20rpx;
}
.text-feedbackczg {
padding: 20rpx;
/* color: #000000; */
}
.text-top {
margin: 30rpx;
color: #000;
font-size: 34rpx;
}
</style>

View File

@ -0,0 +1,828 @@
<template>
<view class="content">
<view class="contentitem" v-for="(item, index) in form.list" :key="index">
<image src="components/feedbackIndexczgw1.jpg" mode=""></image>
<view class="contentitemtop flex-between">
<text>{{ item.name }}</text>
<text v-if="item.dlzh_status == 0" style="color: green">无需登录</text>
<text v-if="item.dlzh_status == 1" style="color: red">需要登录</text>
<text v-if="item.dlzh_status == 9">未知</text>
</view>
<text v-if="item.is_default == 1" style="background: #1989fa; color: #fff; padding: 0 6rpx; border-radius: 10rpx; font-size: 24rpx">默认</text>
<view class="contentitemtext">电局账号 {{ item.dlzh }}</view>
<view class="contentitemtext">登录身份 {{ item.k_identity }}</view>
<view class="contentitemtext">手机号码 {{ item.phone }}</view>
<view class="contentitembotton flex-between">
<view class="flex-colum" @click="login(item, '登录')">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername5.png" mode="aspectFill"></image>
<text>登录</text>
</view>
<view class="flex-colum" @click="renlian(item, '人脸')">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername1.png" mode="aspectFill"></image>
<text>人脸</text>
</view>
<view class="flex-colum" @click="modify(item, '修改')">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername2.png" mode="aspectFill"></image>
<text>修改</text>
</view>
<view class="flex-colum" @click="setdefault(item, '默认')">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername3.png" mode="aspectFill"></image>
<text>默认</text>
</view>
<!-- <view class="flex-colum">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername4.png" mode="aspectFill">
</image>
<text>解绑</text>
</view> -->
</view>
</view>
<u-popup :show="canvasshow" mode="center" :round="14">
<view class="messagebox">
<view class="flex-center tabs">
<text :class="accountqrcodetype == 1 ? 'tabsselect' : ''" @click="(accountqrcodetype = 1), accountqrcode()">电子税务局</text>
<text :class="accountqrcodetype == 2 ? 'tabsselect' : ''" @click="(accountqrcodetype = 2), accountqrcode()">个人所得税</text>
</view>
<view style="text-align: center; margin: 16rpx">
{{ formCode.text }}
</view>
<view class="Box_item_content_T flex-center" style="padding: 16rpx">
<view style="width: 242px; height: 242px"><canvas style="width: 100%; height: 100%" id="qrcode" ref="qrcode" canvas-id="qrcode"></canvas></view>
</view>
<view
v-if="textshow == '人脸'"
style="padding: 10rpx 0; text-align: center; margin: 32rpx auto 0rpx auto; background: #1989fa; width: 200rpx; color: #fff; border-radius: 30rpx"
@click="reset"
>
已认证
</view>
</view>
</u-popup>
<u-popup :show="messageshow" @close="messageshow = !messageshow" mode="center" :round="14">
<view class="messagebox">
<view class="messageboxtop">短信验证</view>
<view class="messageboxtoptext">
{{ codephone }}
</view>
<view class="messageboxtoptext flex-between">
<input type="mobile" v-model="codelang" placeholder="请输入短信验证码" maxlength="6" />
<view class="repeats">
<view v-if="showText == true" style="padding: 8rpx 16rpx 6rpx 16rpx; background: #288efb; border-radius: 15rpx; color: #fff" @click="clickfasongyanzhengm">
{{ Recapture }}
</view>
<view v-else style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx">{{ second }}s重新发送</view>
</view>
</view>
<view class="box" @click="queding">确定</view>
</view>
</u-popup>
<u-popup :show="showpopup" @close="showpopup = !showpopup" mode="center" :round="14">
<view class="popupbox">
<view class="popupboxtop">
<text>开票人登记信息</text>
<view style="position: absolute; right: 22rpx; top: 40rpx">
<u-icon name="close" color="#999999" @click="showpopup = false" size="20"></u-icon>
</view>
</view>
<view class="popupboxform">
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
<text class="addshowboxinputtext">*选择等录身份</text>
<view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative">
<text class="leftrelativetext">{{ addform.dlsfname }}</text>
<u-icon style="padding-right: 16rpx" :name="selectshowlslbs ? 'arrow-up' : 'arrow-down'" color="#999999" size="14"></u-icon>
<view class="listinput_leftabsolute" v-if="selectshowlslbs">
<view v-for="(item, index) in columnsdlsf" :key="index" :class="addform.dlsf == item.id ? 'class' : ''" @click="taxexempttype(item, index)">
{{ item.name }}
</view>
</view>
</view>
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*电子税务局账号</text>
<view class="addshowboxinput_inp">
<input type="text" disabled style="background: #f6f6f6" placeholder="请输入" v-model="addform.dlzh" />
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*电子税务局登录密码</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请输入" v-model="addform.dlmm" />
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*电子税务局地区</text>
<view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative" disabled style="background: #f6f6f6">
<text class="leftrelativetext">{{ addform.dqbmname }}</text>
<u-icon style="padding-right: 16rpx" :name="regionshow ? 'arrow-up' : 'arrow-down'" color="#999999" size="14"></u-icon>
<!-- <view class="listinput_leftabsolute" v-if="regionshow">
<view v-for="(item,index) in region" :key="index"
:class="addform.region == item.code?'class':''"
@click="regionclick(item,index)">
{{ item.name }}
</view>
</view> -->
</view>
</view>
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*办税人姓名</text>
<view class="addshowboxinput_inp">
<input type="text" placeholder="请输入" v-model="addform.taxname" />
</view>
w
</view>
<view class="addshowboxinput flex-colum-start">
<text class="addshowboxinputtext">*办税人手机号码</text>
<view class="addshowboxinput_inp">
<input type="number" disabled placeholder="请输入" v-model="addform.taxphone" />
</view>
</view>
</view>
<view class="addshowbox_box">
<view class="addshowbox_boxitem" @click="showpopup = false">取消</view>
<view class="addshowbox_boxitem" @click="szzpyaddinvoicer">保存</view>
</view>
</view>
</u-popup>
<button style="visibility: hidden" @click="EaZrKfQgyqXCtzYjvZBU"></button>
<button style="visibility: hidden" @click="NtmXefeUxogyqLakpPYh"></button>
<button style="visibility: hidden" @click="YzZuegyqagqgqJjKKDWd"></button>
</view>
</template>
<script>
import langeone from './components/feedbackIndexczgw.jpg';
import langetow from './components/feedbackIndexczgw6.jpg';
import langethere from './components/feedbackIndexczgw7.jpg';
export default {
data() {
return {
formCode: {
text: '超掌柜',
url: 'https://www.baidu.com/baidu?ie=utf-8&wd=312'
}, //
text: 'uQRCode',
size: 242,
codephone: '', //
codelang: '', //
textshow: '', //
loginid: '', //id
showpopup: false,
messageshow: false, //
canvasshow: false, //
columnsdlsf: [],
selectshowlslbs: false, //
regionshow: false, //
//
second: 60,
showText: false,
Recapture: '发送验证码',
accountqrcodetype: 1,
form: {
user_name: '',
time: '',
page: 1,
type: '-1',
status: 'loadmore',
list: []
},
addform: {},
region: [] //
};
},
async onLoad() {
this.newissuedbyliststatus();
let res = await this.api.szzpygetprovinceno();
this.region = res.data;
this.onShowdatadlsf();
},
onReachBottom() {
if (this.form.status != 'nomore') {
this.form.page = ++this.form.page;
this.invoicingrecordsthatneed();
}
},
onReady() {
this.merchantStoreshowMerchantStoreReceipt();
},
methods: {
//
async setdefault(item) {
uni.showModal({
title: '设置默认开票人',
content: `确定设置办税员【${item.name}】为默认吗?`,
success: async (res) => {
if (res.confirm) {
let resdata = await this.api.kpdefault({
is_default: item.is_default == 0 ? 1 : 0,
id: item.id
});
if (resdata.code == 1) {
this.reset();
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
async merchantStoreshowMerchantStoreReceipt() {
// uQRCode
var qr = new uQRCode();
//
qr.data = this.formCode.url;
// canvas
qr.size = this.size;
//
qr.make();
// canvas
var canvasContext = uni.createCanvasContext('qrcode', this); // this
// uQRCodecanvas
qr.canvasContext = canvasContext;
// canvas
qr.drawCanvas();
},
//
renlian(item, textshow) {
this.textshow = textshow;
this.loginid = item.id;
uni.showModal({
title: '人脸验证',
content: `确定使用办税员【${item.name}】进行人脸吗?`,
success: (res) => {
if (res.confirm) {
//
this.accountqrcode();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
async accountqrcode() {
let res = await this.api.accountqrcode({
type: this.accountqrcodetype,
id: this.loginid
});
if (res.data.url) {
this.messageshow = false;
this.formCode.url = res.data.url;
this.formCode.text = res.data.text;
this.canvasshow = true;
this.$nextTick(() => {
this.merchantStoreshowMerchantStoreReceipt();
});
} else {
uni.showToast({
title: res.data.msg,
icon: 'none'
});
this.yanzhengm(false);
this.codephone = res.data.msg;
this.messageshow = true;
}
},
//
login(item, textshow) {
this.textshow = textshow;
this.loginid = item.id;
uni.showModal({
title: '登录验证',
content: `确定使用办税员【${item.name}】进行登录验证吗?`,
success: (res) => {
if (res.confirm) {
this.getsendsms();
this.yanzhengm(false);
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
async getsendsms() {
let res = await this.api.getsendsms({
id: this.loginid
});
if (res.code == 1) {
uni.showToast({
title: res.data.msg,
icon: 'none'
});
this.codephone = res.data.msg;
this.messageshow = true;
}
},
//
async sensms() {
console.log(this.textshow);
let res = await this.api.sensms({
id: this.loginid,
code: this.codelang
});
console.log(res);
if (res.code == 1) {
switch (this.textshow) {
case '登录':
uni.showToast({
title: '登录成功',
icon: 'none'
});
this.messageshow = false;
this.reset(); //
break;
case '人脸':
await this.accountqrcode();
break;
}
}
},
//
async onShowdatadlsf() {
let res = await this.api.szzpytypeofinvoicer();
this.columnsdlsf = res.data;
},
taxexempttype(item, index) {
this.addform.dlsfname = item.name;
this.addform.dlsf = item.id;
},
regionclick(item, index) {
this.addform.regionname = item.name;
this.addform.region = item.code;
},
//
modify(item, textshow) {
this.textshow = textshow;
this.addform = item;
this.addform.taxname = item.name;
this.addform.taxphone = item.phone;
this.addform.dlsf = item.dlsf;
//
this.region.forEach((i) => {
if (i.code == item.dqbm) {
this.addform.dqbmname = i.name;
}
});
//
this.columnsdlsf.forEach((i) => {
if (i.id == item.dlsf) {
this.addform.dlsfname = i.name;
}
});
this.showpopup = true;
},
//
async szzpyaddinvoicer() {
if (this.addform.dlsfname == null || this.addform.dlsfname == '') {
uni.showToast({
title: '选择等录身份不能为空',
icon: 'none'
});
return false;
}
if (this.addform.dlmm == null || this.addform.dlmm == '') {
uni.showToast({
title: '电子税务局登录密码不能为空',
icon: 'none'
});
return false;
}
if (this.addform.taxname == null || this.addform.taxname == '') {
uni.showToast({
title: '办税人姓名不能为空',
icon: 'none'
});
return false;
}
if (this.addform.taxphone == null || this.addform.taxphone == '') {
uni.showToast({
title: '办税人手机号码不能为空',
icon: 'none'
});
return false;
}
// this.addform.taxphone = this.codephone
let res = await this.api.szzpyaddinvoicer(this.addform);
if (res.code == 1) {
this.showpopup = false;
this.messageshow = true;
}
},
//
async szzpyaddinvoicersendsms() {
this.codelang = this.addform.code;
let res = await this.api.szzpyaddinvoicersendsms(this.addform);
if (res.code == 1) {
this.showpopup = false;
uni.showToast({
title: '修改成功',
icon: 'none'
});
this.messageshow = false;
this.reset(); //
}
},
//
async clickfasongyanzhengm() {
switch (this.textshow) {
case '修改':
await this.szzpyaddinvoicer();
break;
case '登录':
await this.getsendsms();
break;
case '人脸':
await this.accountqrcode();
break;
}
this.yanzhengm(true); //
},
//
queding() {
console.log(this.textshow);
switch (this.textshow) {
case '修改':
this.szzpyaddinvoicersendsms();
break;
case '登录':
this.sensms();
break;
case '人脸':
this.sensms();
break;
}
},
//
yanzhengm(e) {
if (e) {
uni.showToast({
title: '验证码发送成功',
icon: 'none'
});
}
//
this.showText = false;
this.Recapture = '重新获取';
var interval = setInterval(() => {
let times = --this.second;
this.second = times < 10 ? '0' + times : times; //10 0
}, 1000);
setTimeout(() => {
clearInterval(interval);
this.second = 60;
this.showText = true;
}, 60000);
},
//
reset() {
this.form = {
user_name: '',
time: '',
page: 1,
type: '-1',
status: 'loadmore',
list: []
};
this.textshow = '';
this.loginid = '';
this.codelang = '';
this.codephone = '';
this.popupshow = false;
this.canvasshow = false;
this.newissuedbyliststatus();
},
//
async newissuedbyliststatus() {
this.form.status = 'loading';
let res = await this.api.newissuedbyliststatus({
user_name: this.form.user_name,
time: this.form.time,
page: this.form.page,
status: this.form.type
});
if (this.form.page == 1 && res.data.length == 0) {
this.form.list = res.data;
this.form.status = 'nomore';
return false;
} else {
setTimeout(() => {
if (this.form.page == 1) {
this.form.list = res.data;
} else {
this.form.list = [...this.form.list, ...res.data];
}
if (res.data.length < 10) this.form.status = 'nomore';
else this.form.status = 'loadmore';
}, 500);
}
}
},
EaZrKfQgyqXCtzYjvZBU() {
let pThygyqEelfVZZDGljfY = 'gyqtqDMmQdTGlvTZWshR';
pThygyqEelfVZZDGljfY += 'RwUYUjxPUEhYugyqTyeX';
},
NtmXefeUxogyqLakpPYh() {
let rdShZsOHgyqTMvodwXaR = 'dsdtdwmfNZtstgyqRRiB';
rdShZsOHgyqTMvodwXaR += 'YHPFUawGXsgyqHZxICRw';
},
YzZuegyqagqgqJjKKDWd() {
let KLeulvkgyqsGwLWSSpTf = 'RSFswYAtDSjCdSbgyquW';
KLeulvkgyqsGwLWSSpTf += 'xyOOjQPxWQDjzgyqcOzn';
}
};
</script>
<style lang="scss">
page {
background: #f9f9f9;
}
.content {
padding: 0 28rpx;
.contentitem {
margin-top: 32rpx;
padding: 32rpx;
width: 100%;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.contentitemtop {
text:nth-child(1) {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
text:nth-child(2) {
font-weight: 400;
font-size: 28rpx;
color: #f39d52;
}
}
.contentitemtext {
margin-top: 26rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.contentitembotton {
margin-top: 34rpx;
border-top: 1rpx solid #e5e5e5;
padding-top: 30rpx;
.flex-colum {
padding: 0 22rpx;
image {
width: 37.89rpx;
height: 37.89rpx;
}
text {
margin-top: 8rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
}
}
.messagebox {
width: 694rpx;
max-height: 870rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
padding: 28rpx 32rpx;
.tabs {
text {
margin-left: 10rpx;
font-size: 34rpx;
text-align: center;
margin: 16rpx;
}
text:nth-child(1) {
margin-left: 0;
}
.tabsselect {
color: #318afe;
font-weight: bold;
}
}
.messageboxtop {
padding: 10rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
border-bottom: 2rpx solid #e5e5e5;
}
.messageboxtoptext {
position: relative;
margin-top: 28rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 300;
font-size: 24rpx;
color: #666;
input {
font-size: 28rpx;
}
.repeat {
position: absolute;
bottom: 0;
right: 26rpx;
width: 25rpx;
height: 17rpx;
}
.repeats {
position: absolute;
bottom: 0;
right: 26rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
border-radius: 12rpx;
}
}
.box {
width: 300rpx;
margin: 100rpx auto 0rpx auto;
text-align: center;
padding: 8rpx 16rpx 6rpx 16rpx;
background: #288efb;
border-radius: 15rpx;
color: #fff;
}
}
.popupbox {
width: 694rpx;
max-height: 870rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.popupboxtop {
position: relative;
padding: 32rpx 0 26rpx 38rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
border-bottom: 2rpx solid #e5e5e5;
}
.popupboxform {
padding: 0rpx 32rpx 30rpx 32rpx;
overflow: auto;
height: 74%;
.addshowboxinput {
margin-top: 32rpx;
.addshowboxinputtext {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.addshowboxinput_inp {
margin-top: 24rpx;
position: relative;
width: 100%;
height: 66rpx;
background: #fff;
border-radius: 4rpx 4rpx 4rpx 4rpx;
border: 2rpx solid #d9d9d9;
.listinput_leftrelative {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
flex: auto;
height: 100%;
background: #ffffff;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 26rpx;
.leftrelativetext {
padding: 6rpx 24rpx;
color: #6f6f6f;
}
.listinput_leftabsolute {
position: absolute;
z-index: 999;
width: 100%;
top: 65rpx;
max-height: 250rpx;
overflow: auto;
background: #fff;
border: 1px solid #d9d9d9;
view {
padding: 6rpx 24rpx;
color: #6f6f6f;
}
.class {
font-weight: 500;
font-size: 28rpx;
color: #333;
border-bottom: 1rpx solid #e3d8d8;
background: #f1f1f1;
}
}
}
input {
width: 100%;
height: 100%;
padding: 0 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
}
.absolute {
padding: 8rpx 18rpx;
position: absolute;
background: #318afe;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #ffffff;
right: 16rpx;
top: 50%;
transform: translateY(-50%);
}
}
}
}
.addshowbox_box {
padding-top: 32rpx;
padding-right: 16rpx;
width: 100%;
border-top: 2rpx solid #e5e5e5;
display: flex;
justify-content: flex-end;
align-items: flex-start;
.addshowbox_boxitem {
width: 112rpx;
height: 56rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 56rpx;
margin-left: 16rpx;
}
.addshowbox_boxitem:nth-child(1) {
text-align: center;
background: #ffffff;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.addshowbox_boxitem:nth-child(2) {
text-align: center;
background: #318afe;
border: 2rpx solid #d9d9d9;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 28rpx;
color: #ffffff;
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

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