Compare commits

..

210 Commits

Author SHA1 Message Date
GaoHao 6d72021f87 更改随机名字 2024-12-23 19:38:39 +08:00
duan b4be77303e 添加图片 2024-12-23 18:29:39 +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
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
496 changed files with 70796 additions and 4849 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"
}
]
}

124
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/ghtwwlkXYG/YEZelghNit')
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/ghtwwlkXYG/YEZelghNit')
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...'
// );
// }
// );
// })
// })
// })
}
}
});
@ -775,9 +838,9 @@
//pc使 850
this.$u.get('/app/common/type/850').then(res => {
if (res.code == 0 && res.data && res.data.value === '否') {
if (window.location.href.indexOf('/pages/me/erweimaRegister') === -1) {
if (window.location.href.indexOf('/pages/iSiAnfghCC/ghhCPInfzi') === -1) {
uni.reLaunch({
url: '/pages/me/erweimaRegister'
url: '/pages/iSiAnfghCC/ghhCPInfzi'
})
}
}
@ -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

@ -48,7 +48,7 @@ const install = (Vue, vm) => {
vm.$u.toast('验证失败,请重新登录');
setTimeout(() => {
// 此为uView的方法详见路由相关文档
vm.$u.route('/pages/login/login')
vm.$u.route('/pages/ghtwwlkXYG/wVghNzmqkQ')
}, 1500)
return false;
} else if (res.code == 401) {
@ -65,7 +65,7 @@ const install = (Vue, vm) => {
uni.removeStorageSync("zhiFuBao")
uni.removeStorageSync("zhiFuBaoName")
// 此为uView的方法详见路由相关文档
vm.$u.route('/pages/login/login')
vm.$u.route('/pages/ghtwwlkXYG/wVghNzmqkQ')
return false;
} else {
// 如果返回false则会调用Promise的reject回调

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/ghtwwlkXYG/wVghNzmqkQ"
})
},
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>

View File

@ -23,7 +23,7 @@
methods: {
goNav() {
uni.navigateTo({
url:'/pages/login/login'
url:'/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
}

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/balance/index'
})
},
toGift() {
console.log('1');
uni.navigateTo({
url: '/me/gift/gift'
})
},
//
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/invite/zhifubao'
})
}
} 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/ghtwwlkXYG',
author: '图鸟北北'
},
{
icon: 'code',
title: '消息通知',
url: '/minepages/iSiAnfghCCssage',
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: '图鸟北北'
}
]
}
]
}

37
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,41 @@ Vue.use(uView);
const app = new Vue({
...App
store,
...App
})
// 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"
}
}
//

1304
me/FrdwbsihPr/FrdwbsihPr.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,129 @@
<template>
<view style="padding-bottom: 20rpx;">
<view v-for="(item,index) in list" :key="index" class="list flex align-center justify-center">
<view class="zdwbUQKCny">
<view class="zdwbUQKCny-title">
{{item.title}}
</view>
<view class="zdwbUQKCny-content">
{{item.content}}
</view>
<view class="zdwbUQKCny-time flex align-center justify-between">
{{item.createTime}}
<text>{{item.type===1?'+':'-'}}{{item.money}}</text>
</view>
</view>
</view>
<view v-if="list.length > 3" class="jwdSnCdwbd">
<u-loadmore :status="status" />
</view>
<empty v-if="list.length===0" title="暂无明细" />
<!-- 抖音im客服 -->
<ttMsg />
</view>
</template>
<script>
import ttMsg from '../../components/ttMsg/ttMsg.vue'
import empty from '../../components/empty.vue'
export default {
components: {
empty,
ttMsg
},
data() {
return {
status: 'loadmore',
list: [], //
page: 1,
pages: 1,
limit: 10,
};
},
onLoad() {
this.getList()
},
//
onReachBottom() {
if (this.page < this.pages) {
this.page += 1
this.status = 'loading'
this.getList()
} else {
this.status = 'nomore'
}
},
onPullDownRefresh() {
this.page = 1
this.getList()
},
methods: {
getList() {
let data = {
page: this.page,
limit: this.limit
}
this.$Request.getT('/app/moneyDetails/queryUserMoneyDetails', data).then(res => {
uni.stopPullDownRefresh()
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]
}
}
})
},
}
}
</script>
<style lang="scss">
.list {
width: 100%;
height: auto;
margin-top: 20rpx;
.zdwbUQKCny {
width: 686rpx;
height: 100%;
border-radius: 24rpx;
background-color: #ffffff;
padding: 20rpx;
}
.zdwbUQKCny-title {
width: 100%;
font-size: 32rpx;
font-weight: bold;
}
.zdwbUQKCny-content {
width: 100%;
margin-top: 20rpx;
}
.zdwbUQKCny-time {
width: 100%;
margin-top: 20rpx;
color: #999999;
text {
color: #000;
font-size: 32rpx;
font-weight: bold;
}
}
}
.jwdSnCdwbd {
margin: 20rpx 0;
}
</style>

1264
me/FrdwbsihPr/vkRFXBdwbe.vue Normal file

File diff suppressed because it is too large Load Diff

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,265 @@
<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>
</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'
}
},
}
}
</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%, .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%, .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,769 @@
<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/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);
}
},
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>

BIN
me/XxSqJQgyqr/IMG_6962.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
me/XxSqJQgyqr/IMG_6963.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

BIN
me/XxSqJQgyqr/IMG_6964.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
me/XxSqJQgyqr/IMG_6965.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
me/XxSqJQgyqr/IMG_7027.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

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,301 @@
<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>
</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/mggghRAnkh/courseDet?id=' + e
});
} else {
uni.navigateTo({
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
},
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,27 @@
<template>
<view class="gyqSxFeTGt">
<image class="img CBKwkqgyqg" src="./asz.JPG" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6962.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6963.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6964.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6965.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_7027.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 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>

View File

@ -276,7 +276,7 @@
// #endif
// appapp
// #ifdef APP
this.erweima = config.APIHOST2 + '/pages/login/registerApp?invitation=' + this
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #endif
// #ifdef MP-WEIXIN

265
me/balance/index.vue Normal file
View File

@ -0,0 +1,265 @@
<template>
<view>
<view class="jf flex align-center justify-between">
<view class="jf-l">
<view class="jf-l-t">
当前余额
</view>
<view class="jf-l-b">
{{amount || '0.00'}}
</view>
</view>
<view class="jf-r" @click="withdraw()">
提现
</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>
</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'
}
})
},
withdraw() {
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'
}
},
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.jf {
width: 100%;
height: 252rpx;
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
padding: 0 40rpx;
.jf-l-t {
color: #ffffff;
font-size: 28rpx;
}
.jf-l-b {
font-size: 40rpx;
color: #ffffff;
font-weight: 600;
margin-top: 30rpx;
}
.jf-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%, .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%, .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>

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/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)
}
},
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

@ -47,8 +47,8 @@
limit: this.limit,
}
this.$u.api.collectList(data).then(res => {
if(res.code == 0) {
if( this.page == 1) {
if(res.code === 0) {
if( this.page === 1) {
this.collectList = res.data.records
uni.stopPullDownRefresh();
return
@ -67,7 +67,7 @@
},
goDet(e) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
})
}
},

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

@ -69,13 +69,13 @@
limit: this.limit,
}
this.$u.api.selectCourse(data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
res.data.list.forEach(ret => {
if (ret.avatar) {
ret.avatar = ret.avatar.split(',')
}
})
if (this.page == 1) {
if (this.page === 1) {
this.courseList = res.data.list
uni.stopPullDownRefresh();
return
@ -98,11 +98,11 @@
let userId = uni.getStorageSync('userId')
if (userId) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
});
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}

View File

@ -1,14 +1,15 @@
<template>
<view class="detail">
<list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true"
:scrollable="true">
:scrollable="true">
<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="swipers-items" @longpress="openBs()" @disappear="disappear(item.courseDetailsId,i)"
@appear="appear(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>
@ -16,7 +17,8 @@
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">
@ -143,24 +145,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/iSiAnfghCC/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 +182,8 @@
</view>
</view>
</uni-popup>
<!-- 支付弹窗 -->
<uni-popup ref="popuppay" :safe-area="false">
<view class="popuppay">
@ -188,7 +196,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 +216,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 +245,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 +299,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>
@ -301,6 +317,11 @@
export default {
data() {
return {
//可抽奖次数
freeNum: 0,
showBack: true,
noBuyVideoIndex: null,
// 奖品列表,
showMoney: true,
nowBs: 1, //当前倍速
subList: [{
@ -324,7 +345,7 @@
haibaoShow: false,
title: '',
imgSrc: '',
current: 0,
current: 2,
maskCustomStyle: {
background: 'rgba(0, 0, 0, 0.5)'
},
@ -368,6 +389,12 @@
'width': '750rpx',
},
isShowVideo: '',
noBuyVideoIndex: null,
playFlag: false,
getRedEnvelopeTips: '',
scale: 1,
// 防抖使用的变量
appearTimeout: null
};
},
onUnload() {
@ -377,10 +404,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 +427,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 +459,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 +525,127 @@
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: {
/**
* 获取金币比例
*/
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('播放结束')
})
}
}
},
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()
this.courseDetailsId = e;
// 清除已经设置的定时器
clearTimeout(this.appearTimeout);
// 设置一个新的延迟执行的定时器
this.appearTimeout = setTimeout(() => {
// 实际要执行的操作
console.log('页面出现在视图中');
// 这里可以加入你需要执行的代码
console.log("appear==="+e)
console.log("appear==="+index)
// 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.appear(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 +786,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/itkXJghyII/hLUkghGDXH?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 +932,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 +968,8 @@
//显示/隐藏适配控制器的回调
controlstoggles(e) {
this.showControls = e.detail.show
console.log(e.detail.show, '显示/隐藏控制栏')
this.showBack = this.showControls
// console.log(e.detail.show, '显示/隐藏控制栏')
},
//打开倍速弹框
openBs() {
@ -815,8 +996,8 @@
if (uni.getStorageSync('qdCode')) {
qdCode = uni.getStorageSync('qdCode')
}
let url = config.APIHOST2 + '/pages/login/registerApp?invitation=' + invitationCode + '&qdCode=' + qdCode
this.setShareNum()
let url = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + invitationCode + '&qdCode=' + qdCode
// this.setShareNum()
uni.setClipboardData({
data: url,
success(res) {
@ -834,7 +1015,7 @@
})
} else {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
@ -849,7 +1030,7 @@
this.submitPay(type)
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
@ -858,14 +1039,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 +1065,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()
//滚动到选择的位置
@ -955,7 +1158,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -982,7 +1185,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -1016,6 +1219,7 @@
this.$nextTick(() => {
//播放当前的
this.videoContext.play();
this.videoContext.playbackRate(this.subList[this.nowBs].num)
})
} else { //没有视频链接则表示没有权限,需要购买 弹出购买弹窗
this.openPay()
@ -1028,22 +1232,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 +1274,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 +1290,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 +1306,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/choujiang/choujiang'
})
} 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/choujiang/choujiang'
})
} 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: '加载失败',

View File

@ -1,5 +1,6 @@
<template>
<view>
<swiper @longpress="openBs()" :style="{height:winHeight}" :circular="true" class="swipers" @change="change"
:current="current" :vertical="true" :indicator-dots="false" :autoplay="false" :interval="0" :duration="1">
<swiper-item class="swipers-item" v-for="(item,index) in swiperList" :key="item.courseDetailsId">
@ -40,7 +41,7 @@
<!-- #endif -->
<!-- :autoplay="item.autoPlay" -->
<!-- 没有视频权限则显示封面图 -->
<image v-else @click="openShowPay();showControls = true" :src="item.titleImg"
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true" :src="item.titleImg"
class="swipers-items-imgsbg" mode="aspectFill"></image>
<!-- 返回图标 -->
<!-- #ifndef MP-TOUTIAO -->
@ -83,7 +84,7 @@
<image src="../../static/images/me/share.png" mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
分享
分享{{current}}
</view>
</view>
<!-- #endif -->
@ -102,7 +103,7 @@
<image src="../../static/images/me/shuqian.png" style="height: 60rpx;" mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
追剧
追剧{{index}}
</view>
</view>
</view>
@ -155,7 +156,7 @@
<!-- #endif -->
<!-- #ifdef MP-KUAISHOU -->
<uv-popup @maskClick="maskClick" :closeable="true" ref="popupBsss" mode="bottom" custom-style="height: 800rpx;"
:safe-area="false" bgColor="#202020">
:safe-area="true" bgColor="#202020">
<view class="list">
<view class="list-title flex align-center">
{{title}}
@ -186,40 +187,38 @@
<!-- #endif -->
<!-- 购买视频 -->
<u-popup :closeable="true" :custom-style="customStyle" :safe-area-inset-bottom="false" close-icon="close"
<u-popup :closeable="true" :custom-style="customStyle" :safe-area-inset-bottom="true" close-icon="close"
close-icon-size="30" close-icon-color="#333333" :mask-custom-style="maskCustomStyle" v-model="showPay"
border-radius="24" mode="bottom">
<view class="list">
<view class="list" :style="listStyle">
<view class="list-title flex align-center">
<!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> -->
当前视频 没有播放权限
</view>
<view class="" style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin-bottom: 20rpx;">
{{getRedEnvelopeTips}}
</view>
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{zongPrice}}金豆解锁整部视频
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(解锁后永久有效)
<!-- #endif -->
{{countPrice*scale}}金币解锁单集视频
</view>
</view>
<view class="list-item" v-if="danbu === '是' && isWxIosPay == true">
<view class="list-item-box" @click="payVideo(2)">
{{countPrice}}金豆解锁单集视频
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(解锁后永久有效)
<!-- #endif -->
{{countPrice}}元解锁单集视频
</view>
</view>
<view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="goNav('/pages/me/vip/index')">
<!-- <view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="goNav('/pages/iSiAnfghCC/vip/index')">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
开通会员
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(会员期内免费观看)
<!-- #endif -->
#ifdef MP-TOUTIAO || MP-WEIXIN-->
<!-- (会员期内免费观看) -->
<!-- #endif
</view>
</view>
</view> -->
<!-- #ifdef MP-WEIXIN -->
<view class="list-item" v-if="isGuanggao == '是'&& adUnitId && advertising">
<view class="list-item-box" @click="openVideoAd()">
@ -249,8 +248,17 @@
</view>
</u-popup>
<!-- <u-popup :closeable="true" :custom-style="customStyle" :safe-area-inset-bottom="false" close-icon="close"
close-icon-size="30" close-icon-color="#333333" :mask-custom-style="maskCustomStyle" v-model="showPay"
border-radius="24" mode="bottom">
<view class="list u-flex u-row-center u-p-t-60">
<l-dialer :prizeList="prizeList" @click="onClick" @done="onDone" ref="dialer" />
</view>
</u-popup> -->
<!-- 充值购买弹窗 -->
<payPopus v-if="showMoney" :payPrice="payPrice" :show="showMoney" @closeMoney="closeMoney"
<payPopus v-if="showMoney" :payPrice="payPrice" :orderId="ordersId" :show="showMoney" @closeMoney="closeMoney"
@paySuccess="paySuccess" />
<!-- #ifdef H5 -->
@ -298,6 +306,10 @@
var videoAd = null;
// #endif
import {
returnIsSafari
} from '@/utils/app.js'
export default {
components: {
tkiQrcode,
@ -305,10 +317,56 @@
},
data() {
return {
isSafari: returnIsSafari(),
//
noBuyVideoIndex: null,
//
prizeList: [{
id: 'coupon88',
name: '8.8折',
img: 'https://img11.360buyimg.com/pop/jfs/t1/175718/35/12595/5477/60b660c6Eb850717b/a1cfe750dcdb5b78.png',
},
{
id: 'coupon900',
Color: 'rgb(251, 219, 216)',
name: '900',
img: 'https://img11.360buyimg.com/pop/jfs/t1/190845/9/6092/4489/60b65fe8Ebb8f8284/955da889f6d1c13e.png',
},
{
id: 'coupon1',
name: '1元',
img: 'https://img11.360buyimg.com/pop/jfs/t1/189927/14/6092/4174/60b66173E23c472ea/44af15a151defca1.png',
},
{
id: 'apple',
Color: 'rgba(246, 142, 46, 0.5)',
name: '苹果手机',
img: 'https://img11.360buyimg.com/pop/jfs/t1/177670/26/4591/2514/60a25874Ee0e5332a/99c7bdfede732ae4.png'
},
{
id: 'coupon210',
name: '210元',
img: 'https://img11.360buyimg.com/pop/jfs/t1/124578/12/20170/4429/60b635d8E7089ebb0/7a47d76a2a260cc0.png'
},
{
id: 'jd100',
name: '100京豆',
img: 'https://img11.360buyimg.com/pop/jfs/t1/162790/37/15087/28046/6062a49aE8f2c10f2/5591ff0ff38a45e2.png',
},
{
id: 'coupon400',
name: '400元',
img: 'https://img11.360buyimg.com/pop/jfs/t1/177090/2/7001/4535/60b6607aEe9c1db2a/76c67675f547db3f.png'
},
{
id: 'thanks',
name: '谢谢参与',
img: 'https://storage.jd.com/cdn-upload/dialTemplateHeart.png',
}
],
checked: false,
payPrice: 0, //
showMoney: false, //
showPay: false,
dyCourseId: '',
nowBs: 1, //
subList: [{
@ -372,6 +430,9 @@
zongPrice: 0, //
countPrice: 0, //
isWxIosPay: true,
playFlag: false,
getRedEnvelopeTips: '',
scale: 1,
};
},
onShareAppMessage(res) {
@ -397,6 +458,14 @@
}
},
computed: {
listStyle() {
// if (this.isSafari) {
// return {
// 'min-height': '540rpx'
// }
// }
return ''
},
//广
advertising() {
return this.videoList.length > 0 ? this.videoList[this.current].advertising == 1 : false
@ -407,6 +476,7 @@
},
//
tabBarStyle() {
let style = {
//
'transition-duration': `${1}s`,
@ -448,6 +518,7 @@
// #endif
},
onLoad(e) {
//
this.isWxIosPay = uni.getStorageSync('isWxIosPay')
@ -519,7 +590,6 @@
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId, '跳转进来的id')
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
}
if (e.tt_album_id) {
@ -528,7 +598,23 @@
if (e.tt_episode_id) {
this.tt_episode_id = e.tt_episode_id
}
if (e.allId) {
console.log("allId ---- ");
// allId 使
if (!uni.getStorageSync('token')) {
uni.setStorageSync("isSafeView", "1")
}
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()
}
// this.$u.get('/app/common/type/817').then(res => { // 817
// if (res.code == 0 && res.data) {
// this.zhengbu = res.data.value;
@ -567,6 +653,17 @@
// #endif
},
onShow() {
console.log('onSHow video');
//
if (this.videoContext) {
this.videoContext.play()
}
const noBuyVideoIndex = uni.getStorageSync('noBuyVideoIndex')
if (noBuyVideoIndex !== null && noBuyVideoIndex !== undefined) {
this.noBuyVideoIndex = noBuyVideoIndex
}
try {
this.playType = Number(uni.getStorageSync('playType'))
} catch (e) {
@ -622,6 +719,15 @@
}
// #endif
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
if (this.courseId) {
console.log('has this.courseId getDataList()');
this.getDataList(this.courseId, this.courseDetailsId);
}
this.$Request.getT('app/course/getRedEnvelopeTips').then(res => {
if (res.code == 0) {
this.getRedEnvelopeTips = res.data
}
})
// uni.$on('back', (data) => {
// if (data.flag == true) {
@ -629,6 +735,8 @@
// that.getDataList(that.courseId, that.courseDetailsId, true);
// }
// })
this.getScale()
},
onReady() {
// #ifdef MP-WEIXIN || MP-KUAISHOU
@ -639,6 +747,21 @@
// #ifndef MP-WEIXIN || MP-KUAISHOU
this.meunTop = 37
// #endif
// const windowResizeCallback = (res) => {
// console.log('=' + res.size.windowWidth)
// console.log('=' + res.size.windowHeight)
// this.onResize(res)
// setTimeout(()=>{
// this.onResize(res)
// },500)
// }
// uni.onWindowResize(windowResizeCallback)
// #ifdef H5
// #endif
},
watch: {
//
@ -647,7 +770,9 @@
},
showControls(val) {
//
if (!this.videoList[this.current].videoUrl) {
const nowVideo = this.videoList[this.current]
const videoUrl = nowVideo ? nowVideo.videoUrl : ''
if (!videoUrl) {
this.showControls = true
this.$forceUpdate()
}
@ -667,15 +792,49 @@
// #ifdef H5
let el = document.querySelector('.uni-video-bar');
console.log(el, '2222222')
if (val) {
el.style = 'display:block !important;';
} else {
el.style = 'display:none !important;';
if (el) {
if (val) {
el.style = 'display:block !important;';
} else {
el.style = 'display:none !important;';
}
}
// #endif
},
},
methods: {
onResize(res) {
const sysInfo = uni.getSystemInfoSync()
//
const winHeight = sysInfo.windowHeight
if (winHeight && winHeight > 0) {
this.winHeight = winHeight + 'px'
} else {
this.winHeight = '100vh'
}
},
/**
* 获取金币比例
*/
getScale() {
this.$Request.getT("app/common/type/914", {}).then(res => {
if (res.code == 0) {
this.scale = Number(res.data.value)
}
});
},
onDone(index) {
const prize = this.prizeList[index]
uni.showModal({
title: prize.id == 'thanks' ? '很遗憾' : '恭喜您',
content: (prize.id !== 'thanks' ? `获得` : '') + prize.name
})
},
onClick() {
//
this.$refs.dialer.run(5)
},
goWallet(url) {
uni.navigateTo({
url: url
@ -685,10 +844,15 @@
event.preventDefault();
},
//
openShowPay() {
openShowPay(val,inx,url) {
console.log(val)
console.log(inx)
console.log(url)
console.log(this.videoList[this.current])
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex = this.current
},
//
getMyLoveStatus() {
@ -923,7 +1087,7 @@
let token = this.$queue.getData('token');
if (!token) {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
return;
}
@ -947,6 +1111,21 @@
// #ifdef H5
uni.hideLoading()
// #endif
// console.log(e.detail.currentTime)
// console.log(e.detail.duration)
if (e.detail.currentTime > e.detail.duration * 0.9) {
if (this.playFlag) {
this.playFlag = false
this.$Request.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.courseDetailsId,
type: 'end'
}).then(res => {
console.log('播放结束')
})
}
}
},
//
waiting(e) {
@ -1094,33 +1273,54 @@
this.submitPay(type)
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
//
paySuccess() {
this.payOrder(this.ordersId, this.payMoney)
paySuccess(data) {
console.log(data)
// data.h5Url
this.showMoney = false //
uni.setStorageSync('noBuyVideoIndex', this.current)
// this.payOrder(this.ordersId, this.payMoney)
// #ifdef APP
uni.navigateTo({
url: '/pages/itkXJghyII/hLUkghGDXH?ordersId=' + data.ordersId + '&url=' + data.h5Url
});
// #endif
// #ifdef H5
window.location.href = data.h5Url
// #endif
},
//
closeMoney(data) {
this.showMoney = data
},
//使
//使
submitPay(type) {
let data = {
courseId: this.courseId
}
if (type != 1) { //
data.courseDetailsId = this.videoList[this.current].courseDetailsId
}
data.courseDetailsId = this.videoList[this.current].courseDetailsId
this.$Request.getT('/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //id
this.payMoney = res.data.orders.payMoney //
console.log(type)
if (type == 1) { //
// this.showPay = false
// this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
} else if (type == 2) { //
this.showPay = false //
this.payPrice = res.data.orders.payMoney //
this.showMoney = true //
}
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
uni.showToast({
title: res.msg,
@ -1134,23 +1334,31 @@
that.$Request.postT("/app/order/payOrders", {
orderId: orderId,
}).then(res => {
that.showPay = true
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
title: '已解锁,支付' + payMoney + '金豆',
title: '已成功解锁',
icon: 'none'
})
that.showPay = false
that.showMoney = false
that.noBuyVideoIndex = null
setTimeout(() => {
that.getDataList(that.courseId, that.videoList[that.current].courseDetailsId,
true);
}, 1000)
} else { //
that.showPay = false //
this.payPrice = payMoney //
this.showMoney = true //
uni.showToast({
title: res.msg,
icon: 'none'
})
that.showPay = true
that.showMoney = false
// that.showPay = false //
// this.payPrice = payMoney //
// this.showMoney = true //
}
});
},
@ -1162,7 +1370,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -1182,7 +1390,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -1209,7 +1417,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -1254,11 +1462,15 @@
this.$forceUpdate()
},
//
selectPlay(item) {
selectPlay(item,type) {//price //videoUrl
// courseDetailsIdmeunList
const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
this.videoList = [this.meunList[index]]
this.current = 0
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
return;
}
//
this.comNumVideo()
this.setWxUrl()
@ -1290,7 +1502,8 @@
},
//
getDataList(id, courseDetailsId, type) {
getDataList(id, courseDetailsId, type, t) {
console.log('getDataList');
let data = {
id,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
@ -1344,17 +1557,27 @@
}
})
})
if (this.noBuyVideoIndex !== null) {
this.noBuyVideoIndex = null
return uni.navigateTo({
url: '/me/choujiang/choujiang'
})
}
} else { //
let indexs = -1
if (courseDetailsId) { //
console.log(courseDetailsId)
console.log(this.meunList)
this.meunList.map((item, index) => {
if (item.courseDetailsId == courseDetailsId) {
indexs = index
}
})
console.log(indexs)
if (indexs != -1) { //
if (Number(indexs + 1) === this.meunList.length) { //
console.log("最后一条")
if (this.meunList.length == 1) { //
this.videoList = this.meunList.slice(0,
3)
@ -1363,14 +1586,17 @@
3)
} else {
this.videoList = [
this.meunList[this.meunList
.length - 3],
this.meunList[this.meunList
.length - 2],
this.meunList[this.meunList
.length - 1],
this.meunList[0],
this.meunList[1],
]
}
} else if (Number(indexs) === Number(this.meunList.length - 1)) { //
console.log("倒数第二条")
if (this.meunList.length == 1) { //
this.videoList = this.meunList.slice(0,
3)
@ -1390,9 +1616,28 @@
}
} else {
console.log("如果不是最后一条,也不是倒数第二条")
//
this.videoList = this.meunList.slice(indexs,
indexs + 3)
if ( indexs == 0 ) {
this.videoList = [
this.meunList[this.meunList
.length - 2],
this.meunList[this.meunList
.length - 1],
this.meunList[0],
]
} else if ( indexs == 1) {
this.videoList = [
this.meunList[this.meunList
.length - 1],
this.meunList[0],
this.meunList[1],
]
} else {
this.videoList = this.meunList.slice(indexs-2,
indexs-2 + 3)
}
}
} else {
//
@ -1400,12 +1645,17 @@
}
} else { //
// ////
this.videoList = this.meunList.slice(0, 3)
indexs = 0
}
console.log(this.videoList, '111111111111')
console.log(this.videoList);
this.videoList.map((item, index) => {
if (item.courseDetailsId == courseDetailsId) {
this.current = index
}
})
//
this.comNumVideo()
if (indexs != -1 && this.meunList.length > 0) {
@ -1415,6 +1665,24 @@
}
}
console.log('到达判断抽奖');
// if (this.noBuyVideoIndex != null ) {
console.log(this.noBuyVideoIndex);
console.log(this.videoList);
if (this.noBuyVideoIndex !== null && this.noBuyVideoIndex !==
undefined && this.noBuyVideoIndex !== '') {
console.log('获取转盘抽奖次数')
this.$Request.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数', res.count)
if (res.count >= 1) {
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
} else {}
})
uni.removeStorageSync('noBuyVideoIndex')
this.noBuyVideoIndex = null
}
let numIdCurr = this.videoList[0].courseDetailsId
this.videoContextId = 'myVideo' + numIdCurr
this.$forceUpdate()
@ -1427,10 +1695,14 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex = this.current
}
})
if ( t == 'select') {
this.selectPlay(this.videoList[this.current],true)
}
}
} else {
uni.showToast({
@ -1471,6 +1743,7 @@
},
//swiper
change(e) {
console.log(e)
//swiper
let current = Number(e.detail.current)
// courseDetailsIdmeunList
@ -1566,8 +1839,8 @@
}
}
}
// this.courseId = this.videoList[current].courseId
// this.courseDetailsId = this.videoList[current].courseDetailsId
this.courseId = this.videoList[current].courseId
this.courseDetailsId = this.videoList[current].courseDetailsId
//
let scrollIndex = this.meunList.findIndex(ite => ite.courseDetailsId == this.videoList[current]
.courseDetailsId)
@ -1579,6 +1852,7 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex = this.current
}
this.$nextTick(() => {
//
@ -1597,10 +1871,12 @@
})
},
startPlay(current) {
console.log(222222)
if (this.videoContext) { //
this.videoContext.stop()
this.videoContext = null
}
console.log(this.videoList[current])
let numIdCurr = this.videoList[current].courseDetailsId
if (this.videoList[current].videoUrl) { //
// id
@ -1619,15 +1895,24 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex = this.current
}
},
//
videoPlay(videoId) {
this.$Request.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.courseDetailsId,
type: 'start'
}).then(res => {
this.playFlag = true
console.log('播放开始')
})
},
//
ended() {
console.log(this.current)
if (this.current == 2) {
this.current = 0
} else {
@ -1660,6 +1945,10 @@
background-color: #000;
}
::v-deep .u-drawer-content {
// position: fixed;
}
.videoListCurr {
background-color: #ff7581 !important;
color: #ffffff !important;
@ -1821,6 +2110,8 @@
.swipers {
width: 100%;
box-sizing: border-box;
overflow: hidden;
.swipers-item {
width: 100%;

View File

@ -1,13 +1,14 @@
<template>
<view class="detail">
<view class="detail" :style="{paddingBottom:paddingBottom}">
<swiper @longpress="openBs()" :circular="true" class="swipers" @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">
<!-- 视频 -->
<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>
@ -15,7 +16,8 @@
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>
@ -141,24 +143,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 v-if="isShowMoneyPay" 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/iSiAnfghCC/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>
@ -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/itkXJghyII/hLUkghGDXH?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, '显示/隐藏控制栏')
},
//打开倍速弹框
@ -823,7 +920,7 @@
if (uni.getStorageSync('qdCode')) {
qdCode = uni.getStorageSync('qdCode')
}
let url = config.APIHOST2 + '/pages/login/registerApp?invitation=' + invitationCode + '&qdCode=' + qdCode
let url = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + invitationCode + '&qdCode=' + qdCode
uni.setClipboardData({
data: url,
success(res) {
@ -852,23 +949,32 @@
this.submitPay(type)
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
//使用金购买
//使用金购买
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,13 +1111,13 @@
type: this.isCollect == false ? 1 : 0
}
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.getMyLoveStatus()
}
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -1029,7 +1144,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@ -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]

View File

@ -0,0 +1,15 @@
<template>
<view>
<web-view src="http://baidu.com/"></web-view>
</view>
</template>
<script>
</script>
<style scoped>
.bg-fff{
width: 750rpx;
height: 300rpx;background-color: #fff;
}
</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,96 @@
<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>
</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/mggghRAnkh/courseDet?id=' + e
})
}
},
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>

View File

@ -59,7 +59,7 @@
types:1
}
this.$u.api.help(data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.helpClassifyList = res.data
for (var i = 0; i < this.helpClassifyList.length; i++) {
this.helpClassifyList[i].parentId = 1

96
me/gift/duihuan.vue Normal file
View File

@ -0,0 +1,96 @@
<template>
<view class="min-page bg-gray u-font-28">
<view class="block bg-fff border-r-18 default-box-padding">
<view>
<view>中奖用户手机号</view>
<view class="border u-m-t-24 u-p-l-24" style="margin-bottom: 20rpx;">
<u-input v-model="query.phone" type="number" maxlength="11" placeholder="请输入中奖用户手机号"></u-input>
</view>
<view>收货地址</view>
<view class="border u-m-t-24 u-p-l-24" style="margin-bottom: 20rpx;">
<u-input v-model="query.address" type="text" placeholder="请输入收货地址"></u-input>
</view>
<view>备注</view>
<view class="border u-m-t-24 u-p-l-24">
<u-input v-model="query.remark" type="text" placeholder="请输入备注"></u-input>
</view>
</view>
<view class="u-m-t-48">
<view>兑换事项</view>
<view class="u-m-t-16 color-999">
请认真核实兑换账号一但兑换成功后不予退换
</view>
</view>
</view>
<view class="u-flex u-row-center">
<view class="btn-circle duihuan" @click="exchange">确认兑换</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
query: {
discSpinningRecordId: null,
source: 1,
phone: "",
address: "",
remark: "",
},
}
},
onLoad(options) {
console.log(options)
if ( options.id ) {
this.query.discSpinningRecordId = options.id
}
if ( options.source ) {
this.query.source = options.source
}
},
methods: {
exchange(){
let url = ""
if ( !this.query.phone ) {
uni.showToast({ title: '请输入中奖用户手机号', icon: 'none' });
return;
}
if ( !this.query.address ) {
uni.showToast({ title: '请输入中奖用户地址', icon: 'none' });
return;
}
this.$Request.postJson("app/userPrizeExchange/exchange", this.query).then(res => {
if (res.code == 0 ) {
uni.navigateBack()
} else {
uni.showToast({ title: res.msg, icon: 'none' });
}
})
},
}
}
</script>
<style lang="scss" scoped>
.border {
border: 1px solid #999999;
border-radius: 12rpx 12rpx 12rpx 12rpx;
}
.duihuan{
background: #ED838A;
width: 556rpx;
padding: 18rpx 0;
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #fff;
margin-top: 84rpx;
}
.min-page {
padding: 32rpx 20rpx;
}
</style>

176
me/gift/gift.vue Normal file
View File

@ -0,0 +1,176 @@
<template>
<view class="min-page bg-gray u-font-28">
<u-navbar :background="background" back-icon-color="#fff" immersive :border-bottom="false"></u-navbar>
<view class="gift-bg">
</view>
<view class="list">
<view class="tab">
<view class="tab_item"
:class="{active: item.type == tabIndex}"
@click="tabClick(item)"
v-for="(item,index) in tab" :key="index"
>{{item.label}}</view>
</view>
<view class="item" v-for="(item,index) in list" :key="index">
<view class="color-666 u-font-24">中奖时间 2024-09-11 10:20:11</view>
<view class="u-m-t-24 u-flex u-row-between">
<view class="u-flex-1 u-flex u-col-top">
<u-image width="128rpx" height="128rpx" src="/static/red-pack.png"></u-image>
<view class="u-m-l-16">
<view>大额红包</view>
<view class="color-999 u-font-24 u-m-t-16">×1</view>
</view>
</view>
<view class="">
<view class="btn-circle duihuan" @click="toDuiHuan(item)">立即兑换</view>
<!-- <view class="btn-circle duihuan finish">已完成</view> -->
</view>
</view>
</view>
<view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!list.length">
<u-empty text="暂无记录" src="/static/icon-empty.svg"></u-empty>
</view>
</view>
<!-- <view class="u-p-30">
<u-loadmore font-size="24" color="#999" :status="status" />
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
background: {
backgroundColor: 'transparent'
},
tab: [{label: '抽奖记录', type: 1},{label: '兑换记录', type: 2}],
tabIndex: 1,
query: {
page: 10,
limit: 1,
source: 1,
},
total: 0,
status: 'nomore',
hasAjax:true,
list:[]
}
},
onLoad(options) {
if ( options.source ) {
this.query.source = options.source
}
},
onShow() {
this.getList()
},
methods: {
toDuiHuan(item){
uni.navigateTo({
url:`/me/gift/duihuan?source=${this.query.source}&id=${item.id}`
})
},
tabClick(item){
this.list = [];
this.tabIndex = item.type;
this.getList()
},
getList(){
let url = ""
if ( this.tabIndex == 1) {
url = "app/discSpinningRecord/selectDiscSpinningRecord"
} else {
url = "/app/userPrizeExchange/page"
}
this.$Request.getT(url, this.query).then(res => {
if (res.code == 0 ) {
if ( this.tabIndex == 1) {
this.list = res.data.records
this.total = res.data.total
} else {
this.list = res.page.list
this.total = res.page.totalCount
}
}
})
},
onReachBottom: function () {
if (this.page * this.limit < this.total) {
this.page = this.page + 1;
this.getList();
}
},
}
}
</script>
<style lang="scss" scoped>
.duihuan {
background: linear-gradient(87deg, #ED8087 0%, #ECA2AA 100%);
font-size: 24rpx;
color: #fff;
padding: 8rpx 16rpx;
text-align: center;
&.finish {
background: #E5E5E5;
color: #999;
}
}
.gift-bg {
position: relative;
width: 100%;
height: 524rpx;
background: url('~static/images/gift-bg.png') no-repeat center center/cover;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-image: url("~static/images/gift-bg.png");
@media (-webkit-min-device-pixel-ratio: 2),
(min-device-pixel-ratio: 2) {
background-image: url("~static/images/gift-bg@2x.png");
}
}
.empty{
// min-height: 50vh;
}
.min-page {
min-height: 100vh;
}
.list {
margin: 0 20rpx;
position: relative;
z-index: 2;
margin-top: -148rpx;
border-radius: 18rpx 18rpx 18rpx 18rpx;
overflow: hidden;
background-color: #fff;
.tab{
display: flex;
.tab_item{
height: 80rpx;
line-height: 80rpx;
width: 50%;
text-align: center;
font-size: 32rpx;
color: #333;
}
.tab_item.active{
background-color: #ECA2AA;
color: #fff;
}
}
.item {
padding: 32rpx 24rpx;
border-bottom: 1rpx solid #E5E5E5;
}
}
</style>

View File

@ -48,7 +48,7 @@
methods: {
getIntegral() {
this.$u.api.integral().then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.integralNum = res.data.integralNum
}else {
uni.showToast({

View File

@ -1,373 +1,532 @@
<template>
<view class="cash">
<view
style="background-color: #ff7581;height: 400upx;border-bottom-right-radius: 40upx;border-bottom-left-radius: 40upx;">
<view style="font-size: 32upx;color: #FFFFFF;padding-top: 100upx;">可提现总额</view>
<view style="font-size: 40upx;color: #FFFFFF;padding-top: 20upx;">¥ {{mayMoney}}</view>
<view class="cash">
<view
style="background-color: #ff7581;height: 400upx;border-bottom-right-radius: 40upx;border-bottom-left-radius: 40upx;">
<view style="font-size: 32upx;color: #FFFFFF;padding-top: 100upx;">可提现总额</view>
<view style="font-size: 40upx;color: #FFFFFF;padding-top: 20upx;">¥ {{ mayMoney }}</view>
<view
style="width: 90%;height: max-content;margin-left: 40upx;background-color: #FFFFFF;box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;margin-top: 50upx;border-radius: 20upx;">
<view style="display: flex;flex-direction: row;padding: 20upx;">
<view style="font-size: 32upx;color: #333333;">提现金额 <text style="font-size: 28upx;color: #ff7581;"
v-if="shouxufei">提现手续费为{{shouxufei * 100}}%</text>
</view>
</view>
<view style="display: flex;flex-direction: row;padding: 20upx;">
<view style="font-size: 40upx;color: #333333;">¥</view>
<input type="number" v-model="money" placeholder="请输入金额"
style="font-size: 40upx;color: #333333;text-align: left;margin-left: 10upx;width: 100%;" />
</view>
<view style="background: #E6E6E6;width: 100%;height: 1upx;"></view>
<view
style="width: 90%;height: max-content;margin-left: 40upx;background-color: #FFFFFF;box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;margin-top: 50upx;border-radius: 20upx;">
<view style="display: flex;flex-direction: row;padding: 20upx;">
<view style="font-size: 32upx;color: #333333;">提现金额
<!-- <text style="font-size: 28upx;color: #ff7581;"
v-if="shouxufei">提现手续费为{{shouxufei * 100}}%</text> -->
</view>
</view>
<view
style="display: flex;flex-direction: row;padding: 20upx;justify-content: space-between;align-items: center;">
<view style="display: flex;align-items: center;">
<view style="font-size: 40upx;color: #333333;">¥</view>
<input type="number" v-model="money" placeholder="请输入金额" @input="moneyInput" @blur="moneyBlur"
style="font-size: 40upx;color: #333333;text-align: left;margin-left: 10upx;width: 80%;"/>
</view>
<view @click="setAllMoney"
style="font-size: 30rpx;color: #333333;background: #ff7581;color: white;border-radius: 10rpx;padding: 7rpx 15rpx;flex-shrink: 0;">
全部
</view>
<view style="display: flex;flex-direction: row;flex-wrap: wrap;">
<view style="display: flex;flex-direction: row;" v-for="(item, index) in moneyList" :key="index">
<view>
<view style="padding: 20upx;" @click="getOut1(item.money)">
<view
style="padding-top: 40upx;width: 180upx; height: 120upx;background-color: #FFFFFF;border:1px solid #ff7581;border-radius: 10upx;">
{{ item.money }}
</view>
</view>
</view>
</view>
</view>
</view>
<view @click="getOut"
style="margin: 32upx;font-size: 18px;background: #ff7581;color: white;border-radius: 10px;height: 40px;line-height: 40px">
提现
</view>
</view>
<view style="background: #E6E6E6;width: 100%;height: 1upx;"></view>
<view style="display: flex;width: 100%;justify-content: center;">
<view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="goZhifuBao">提现账号
</view>
<view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="goqianbao">钱包明细
</view>
<view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="gojilu">提现记录
</view>
</view>
</view>
</view>
<!-- <view style="display: flex;flex-direction: row;flex-wrap: wrap;">
<view style="display: flex;flex-direction: row;" v-for="(item, index) in moneyList" :key="index">
<view>
<view style="padding: 20upx;" @click="getOut1(item.money)">
<view
style="padding-top: 40upx;width: 180upx; height: 120upx;background-color: #FFFFFF;border:1px solid #ff7581;border-radius: 10upx;">
{{ item.money }}
</view>
</view>
</view>
</view>
</view> -->
</view>
<view @click="getOut"
style="margin: 32upx;font-size: 18px;background: #ff7581;color: white;border-radius: 10px;height: 40px;line-height: 40px;">
提现
</view>
<view style="display: flex;width: 100%;justify-content: center;">
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="goZhifuBao">
提现账号
</view>
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="goqianbao">
红包明细
</view>
<!-- <view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="gojilu">提现记录
</view> -->
</view>
<view style="text-align: left" class="moneyList u-p-b-30">
<view v-if="list.length" v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="margin-bottom: 8upx;text-align: right;">
<text style="margin-bottom: 8upx;color: green" v-if="item.state===1"> 提现成功</text>
<text style="margin-bottom: 8upx;color: green" v-if="item.state===0"> 提现中</text>
<text style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1||item.state===2">
提现失败
</text>
</view>
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx"> 收款人账号{{ item.zhifubao }}</view>
<view style="margin-bottom: 8upx"> 收款人姓名{{ item.zhifubaoName }}</view>
<view style="margin-bottom: 8upx"> 发起时间{{ item.createAt }}</view>
<view style="margin-bottom: 8upx" v-if="item.state===1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1||item.state===2">
失败原因{{ item.refund }}
</view>
<view style="margin-bottom: 8upx;text-align: right;">
<!-- 提现金额 -->
<text style="color: #FD6416;font-size: 32upx;font-weight: 600"> {{ item.money }}</text>
</view>
</view>
</view>
</view>
<view class="page-box" v-if="!list.length">
<view class="centre">
<image src="../../static/images/learn/none.png" mode=""></image>
<view class="tips">
暂无记录
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
money: '',
mayMoney: '0',
shouxufei: '',
moneyList: [{
money: '10'
},
{
money: '20'
},
{
money: '50'
},
{
money: '100'
},
{
money: '200'
},
{
money: '500'
}
],
value: 0,
min: '',
token: '',
userId: '',
zhifubao: '',
zhifubaoName: '',
};
},
onLoad() {
this.getshouxufei();
},
onShow() {
this.token = uni.getStorageSync('token')
this.userId = uni.getStorageSync('userId')
this.zhifubao = uni.getStorageSync('zhiFuBao')
this.zhifubaoName = uni.getStorageSync('zhiFuBaoName')
export default {
data() {
return {
money: '',
mayMoney: '0',
shouxufei: '',
moneyList: [{
money: '10'
},
{
money: '20'
},
{
money: '50'
},
{
money: '100'
},
{
money: '200'
},
{
money: '500'
}
],
value: 0,
min: '',
token: '',
userId: '',
zhifubao: '',
zhifubaoName: '',
list: [],
page: 1,
limit: 10,
totalCount: 0,
};
},
onLoad() {
this.getExtractFei();
this.getMoneyDetail();
},
onShow() {
this.token = uni.getStorageSync('token')
this.userId = uni.getStorageSync('userId')
this.zhifubao = uni.getStorageSync('zhiFuBao')
this.zhifubaoName = uni.getStorageSync('zhiFuBaoName')
this.getcashMoney()
},
onReachBottom: function () {
if (this.page * this.limit < this.totalCount) {
this.page = this.page + 1;
this.getMoneyDetail();
}
},
onPullDownRefresh: function () {
this.page = 1;
// that.list = []
this.getMoneyDetail();
},
onNavigationBarButtonTap() {
// this.list();
},
methods: {
moneyInput(e) {
let num = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
this.$nextTick(() => {
this.money = num;
});
this.getcashMoney()
},
moneyBlur(e) {
let num = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
this.$nextTick(() => {
this.money = num;
});
},
setAllMoney() {
this.money = Math.floor(this.mayMoney * 100) / 100
},
getMoneyDetail() {
let that = this;
let token = uni.getStorageSync('token')
console.log(1);
if (token) {
//
let data = {
page: this.page,
limit: this.limit
}
this.$Request.getT('app/cash/selectPayDetails', data).then(res => {
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
this.list = [...this.list, ...res.data.list];
}
})
}
},
onNavigationBarButtonTap() {
// this.list();
},
methods: {
//
getshouxufei() {
this.$u.get('app/common/type/152').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.shouxufei = res.data.value;
}
}
});
this.$u.get('app/common/type/112').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.cashMoney = res.data.value;
}
}
});
},
},
//
getcashMoney() {
let data = {
page: this.page,
limit: this.limit
}
this.$u.api.queryInviter(data).then(res => {
if (res.code == 0) {
this.mayMoney = res.data.inviteMoney.money
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
//
gojilu() {
uni.navigateTo({
url: '/me/invite/cashList'
});
},
//
goqianbao() {
uni.navigateTo({
url: '/me/invite/moneyList'
});
},
list() {
// uni.navigateTo({
// url: '/me/invite/cashList'
// })
},
goZhifuBao() {
uni.navigateTo({
url: '/me/invite/zhifubao'
});
},
getMoney() {
let that = this;
let token = that.token
let userId = that.userId
if (token) {
//this.$queue.showLoading("...");
//
let data = {
money: that.money
}
this.$u.api.cashMoney(data).then(res => {
if (res.code == 0) {
uni.showToast({
title: '提现申请成功,预计三个工作日到账',
icon: 'none'
})
that.money = ''
setTimeout(function() {
that.getcashMoney()
}, 1500)
//
getExtractFei() {
this.$u.get('app/common/type/152').then(res => {
if (res.code === 0) {
if (res.data && res.data.value) {
this.shouxufei = res.data.value;
}
}
});
this.$u.get('app/common/type/112').then(res => {
if (res.code === 0) {
if (res.data && res.data.value) {
this.cashMoney = res.data.value;
}
}
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
}
},
//
checkMobile(money) {
return RegExp(/^1[34578]\d{9}$/).test(money);
},
getOut() {
let that = this;
let token = that.token
let userId = that.userId
console.log(token)
let cashMoney = that.cashMoney;
},
//
getcashMoney() {
let data = {
page: this.page,
limit: this.limit
}
// this.$u.api.myPurseDet(data).then(res => {
// if (res.code == 0) {
// this.mayMoney = res.data.inviteMoney.money
// } else {
// uni.showToast({
// title: res.msg,
// duration: 1000,
// icon: 'none'
// });
// }
// })
this.$Request.getT('app/moneyDetails/selectUserMoney').then(res => {
if (res.code == 0) {
this.mayMoney = res.data.amount || 0
}
})
},
//
gojilu() {
uni.navigateTo({
url: '/me/invite/cashList'
});
},
//
goqianbao() {
uni.navigateTo({
url: '/me/invite/moneyList?moneyType=1&viewType=2'
});
},
goZhifuBao() {
uni.navigateTo({
url: '/me/invite/zhifubao'
});
},
getMoney() {
let that = this;
let token = that.token
let userId = that.userId
if (token) {
//this.$queue.showLoading("...");
//
let data = {
amount: that.money
}
uni.showLoading({
title: '提现中'
});
this.$u.api.withdraw(data).then(res => {
if (res.code == 0) {
uni.showToast({
title: res.msg,
icon: 'none'
})
that.money = ''
setTimeout(function () {
that.getcashMoney()
}, 1500)
if (token) {
if (that.zhifubao && that.zhifubaoName) {
if (!/^\d+$/.test(that.money)) {
uni.showToast({
icon: 'none',
title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
});
return;
}
let shouxufei = parseFloat(that.money * that.shouxufei).toFixed(2);
if (parseFloat(that.mayMoney).toFixed(1) >= parseFloat(that.money) + shouxufei * 1) {
if (parseFloat(that.money).toFixed(1) >= parseFloat(cashMoney)) {
if (that.shouxufei > 0) {
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
}
},
//
checkMobile(money) {
return RegExp(/^1[34578]\d{9}$/).test(money);
},
getOut() {
let that = this;
let token = that.token
let userId = that.userId
let cashMoney = that.cashMoney;
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + that
.money + '元\n\n提现手续费' + shouxufei +
'\n\n收款人账号' + that.zhifubao + '',
success: (e) => {
if (e.confirm) {
// that.money = money
that.getMoney();
}
}
});
} else {
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + that
.money + '元\n\n收款人账号' + that.zhifubao +
'',
success: (e) => {
if (e.confirm) {
// that.money = money
that.getMoney();
}
}
});
}
if (token) {
if (that.zhifubao && that.zhifubaoName) {
if (!/^\d+(\.\d{1,2})?$/.test(that.money)) {
uni.showToast({
icon: 'none',
title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
});
return;
}
let shouxufei = parseFloat(that.money * that.shouxufei).toFixed(2);
console.log(parseFloat(that.mayMoney))
console.log(parseFloat(that.money))
if (parseFloat(that.mayMoney).toFixed(2) >= parseFloat(that.money)) {
// if (parseFloat(that.mayMoney).toFixed(1) >= parseFloat(that.money) + shouxufei * 1) {
if (parseFloat(that.money).toFixed(2) >= parseFloat(cashMoney)) {
if (that.shouxufei > 0) {
} else {
uni.showToast({
icon: 'none',
title: "提现金额必须大于或等于" + cashMoney + "元才可提现"
});
}
} else {
uni.showToast({
icon: 'none',
title: "您的余额不足"
});
}
} else {
uni.navigateTo({
url: "/me/invite/zhifubao"
})
}
} else {
uni.navigateTo({
url: '/pages/login/login'
});
}
},
getOut1(money) {
let that = this;
let token = that.token
let userId = that.userId
if (token) {
if (that.zhifubao && that.zhifubaoName) {
if (parseFloat(this.mayMoney).toFixed(1) >= parseFloat(money)) {
if (parseFloat(money).toFixed(1) >= 10) {
if (this.shouxufei > 0) {
let shouxufei = parseFloat(money * this.shouxufei).toFixed(2);
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + money +
'元\n\n提现手续费' + shouxufei +
'\n\n收款人账号' + that.zhifubao + '',
confirmColor: '#ff7581',
success: e => {
if (e.confirm) {
this.money = money
that.getMoney();
// uni.showToast({
// icon: 'none',
// title: ''
// })
}
}
});
} else {
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + money +
'元\n\n收款人账号' + that.zhifubao +
'',
success: e => {
if (e.confirm) {
this.money = money
that.getMoney();
// uni.showToast({
// icon: 'none',
// title: ''
// })
}
}
});
}
} else {
uni.showToast({
icon: 'none',
title: '提现金额必须大于或等于10元才可提现'
});
}
} else {
uni.showToast({
icon: 'none',
title: '您的余额不足'
});
}
} else {
uni.navigateTo({
url: '/me/invite/zhifubao'
});
}
} else {
uni.navigateTo({
url: '/pages/login/login'
});
}
}
}
};
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + that
.money + '元\n\n收款人账号' + that.zhifubao + '',
// content: '\n\n:' + that.zhifubaoName + '\n\n:' + that
// .money + '\n\n' + shouxufei +
// '\n\n' + that.zhifubao + '',
success: (e) => {
if (e.confirm) {
// that.money = money
that.getMoney();
that.getMoneyDetail();
}
}
});
} else {
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + that
.money + '元\n\n收款人账号' + that.zhifubao +
'',
success: (e) => {
if (e.confirm) {
// that.money = money
that.getMoney();
that.getMoneyDetail();
}
}
});
}
} else {
uni.showToast({
icon: 'none',
title: "提现金额必须大于或等于" + cashMoney + "元才可提现"
});
}
} else {
uni.showToast({
icon: 'none',
title: "您的余额不足"
});
}
} else {
uni.navigateTo({
url: "/me/invite/zhifubao"
})
}
} else {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
});
}
},
getOut1(money) {
let that = this;
let token = that.token
let userId = that.userId
if (token) {
if (that.zhifubao && that.zhifubaoName) {
if (parseFloat(this.mayMoney).toFixed(1) >= parseFloat(money)) {
if (parseFloat(money).toFixed(1) >= 10) {
if (this.shouxufei > 0) {
let shouxufei = parseFloat(money * this.shouxufei).toFixed(2);
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + money +
'元\n\n收款人账号' + that.zhifubao + '',
// content: '\n\n:' + that.zhifubaoName + '\n\n:' + money +
// '\n\n' + shouxufei +
// '\n\n' + that.zhifubao + '',
confirmColor: '#ff7581',
success: e => {
if (e.confirm) {
this.money = money
that.getMoney();
// uni.showToast({
// icon: 'none',
// title: ''
// })
}
}
});
} else {
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.zhifubaoName + '\n\n提现金额:' + money +
'元\n\n收款人账号' + that.zhifubao +
'',
success: e => {
if (e.confirm) {
this.money = money
that.getMoney();
// uni.showToast({
// icon: 'none',
// title: ''
// })
}
}
});
}
} else {
uni.showToast({
icon: 'none',
title: '提现金额必须大于或等于10元才可提现'
});
}
} else {
uni.showToast({
icon: 'none',
title: '您的余额不足'
});
}
} else {
uni.navigateTo({
url: '/me/invite/zhifubao'
});
}
} else {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
});
}
}
}
};
</script>
<style lang="less">
// @import '../../static/css/index.css';
// @import '../../static/css/index.css';
.view2-view-text {
font-size: 14px;
color: #000000;
margin-left: 20upx;
width: 80%;
}
.view2-view-text {
font-size: 14px;
color: #000000;
margin-left: 20upx;
width: 80%;
}
.view2-view-image-right {
width: 18upx;
height: 30upx;
margin-left: 50upx;
}
.view2-view-image-right {
width: 18upx;
height: 30upx;
margin-left: 50upx;
}
.cash {
text-align: center;
background: white;
height: 100%;
position: absolute;
width: 100%;
.cash {
text-align: center;
background: white;
height: 100%;
position: absolute;
width: 100%;
.cash-top {
padding: 32upx 32upx 50upx 32upx;
/* border-bottom: 1px solid gainsboro; */
background: #5074FF;
}
.cash-top {
padding: 32upx 32upx 50upx 32upx;
/* border-bottom: 1px solid gainsboro; */
background: #5074FF;
}
.leiji {
font-size: 14px;
color: #ffffff;
margin-bottom: 10px;
}
}
.leiji {
font-size: 14px;
color: #ffffff;
margin-bottom: 10px;
}
}
.moneyList {
.item {
background: white;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
.item:first-child {
margin-top: 0;
}
}
.centre {
text-align: center;
padding: 200rpx 0;
font-size: 32rpx;
box-sizing: border-box;
image {
width: 360rpx;
height: 360rpx;
// margin-bottom: 20rpx;
margin: 0 auto 20rpx;
// border: 1px dotted #000000;
}
.tips {
font-size: 34rpx;
color: #999999;
margin-top: 20rpx;
}
.btn {
margin: 80rpx auto;
width: 600rpx;
border-radius: 32rpx;
line-height: 90rpx;
color: #ffffff;
font-size: 34rpx;
background: #ff7581;
}
}
</style>

View File

@ -1,137 +1,133 @@
<template>
<view style="text-align: left">
<view v-if="list.length" v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="margin-bottom: 8upx;text-align: right;">
<text style="margin-bottom: 8upx;color: green" v-if="item.state==1"> 提现成功</text>
<text style="margin-bottom: 8upx;color: green" v-if="item.state==0"> 提现中</text>
<text style="margin-bottom: 8upx;color: #FD6416" v-if="item.state==-1"> 提现失败</text>
</view>
<view style="text-align: left">
<view v-if="list.length" v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="margin-bottom: 8upx;text-align: right;">
<text style="margin-bottom: 8upx;color: green" v-if="item.state===1"> 提现成功</text>
<text style="margin-bottom: 8upx;color: green" v-if="item.state===0"> 提现中</text>
<text style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1"> 提现失败</text>
</view>
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx"> 收款人账号{{item.zhifubao}}</view>
<view style="margin-bottom: 8upx"> 收款人姓名{{item.zhifubaoName}}</view>
<view style="margin-bottom: 8upx"> 发起时间{{item.createAt}}</view>
<view style="margin-bottom: 8upx" v-if="item.state==1">成功时间 {{item.outAt}}</view>
<view style="margin-bottom: 8upx;color: #FD6416" v-if="item.state==-1">{{item.refund}}</view>
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx"> 收款人账号{{ item.zhifubao }}</view>
<view style="margin-bottom: 8upx"> 收款人姓名{{ item.zhifubaoName }}</view>
<view style="margin-bottom: 8upx"> 发起时间{{ item.createAt }}</view>
<view style="margin-bottom: 8upx" v-if="item.state===1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1">{{ item.refund }}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<!-- 提现金额 -->
<text style="color: #FD6416;font-size: 32upx;font-weight: 600"> {{item.money}}</text>
</view>
</view>
</view>
</view>
<view style="margin-bottom: 8upx;text-align: right;">
<!-- 提现金额 -->
<text style="color: #FD6416;font-size: 32upx;font-weight: 600"> {{ item.money }}</text>
</view>
</view>
</view>
</view>
<view class="page-box" v-if="!list.length">
<view class="centre">
<image src="../../static/images/learn/none.png" mode=""></image>
<view class="tips">
暂无记录
</view>
</view>
</view>
<view class="page-box" v-if="!list.length">
<view class="centre">
<image src="../../static/images/learn/none.png" mode=""></image>
<view class="tips">
暂无记录
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
page: 1,
limit: 10
}
},
onLoad: function(e) {
this.getMoney();
},
export default {
data() {
return {
list: [],
page: 1,
limit: 10,
totalCount: 0,
}
},
onLoad: function (e) {
this.getMoney();
},
methods: {
getMoney() {
let that = this;
let token = uni.getStorageSync('token')
methods: {
getMoney() {
let that = this;
let token = uni.getStorageSync('token')
if (token) {
//
let data = {
page: that.page,
limit: that.limit
}
that.$u.api.selectPay(data).then(res => {
if (that.page == 1) {
that.list = res.data.list
uni.stopPullDownRefresh();
return
}
that.list = res.data.list;
})
// this.$Request.getT("/cash/selectCashOutList/" + userId).then(res => {
// if (res.status === 0 && res.data) {
// that.list = res.data;
// }
// uni.hideLoading();
// });
}
if (token) {
//
let data = {
page: this.page,
limit: this.limit
}
this.$Request.getT('app/cash/selectPayDetails', data).then(res => {
this.totalCount = res.data.totalCount;
if (res.data.list.length > 0) {
this.list = [...this.list, ...res.data.list];
}
})
}
},
},
onReachBottom: function() {
this.page = this.page + 1;
this.getMoney();
},
onPullDownRefresh: function() {
this.page = 1;
// that.list = []
this.getMoney();
},
}
},
},
onReachBottom: function () {
if (this.page * this.limit < this.totalCount) {
this.page = this.page + 1;
this.getMoney();
}
},
onPullDownRefresh: function () {
this.page = 1;
// that.list = []
this.getMoney();
},
}
</script>
<style lang='scss' scoped>
/* @import "../../static/css/index.css"; */
/* @import "../../static/css/index.css"; */
page {
background: #FFFFFF;
}
page {
background: #FFFFFF;
}
.item {
background: white;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
.item {
background: white;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
.centre {
text-align: center;
margin: 200rpx auto;
font-size: 32rpx;
.centre {
text-align: center;
padding: 200rpx 0;
font-size: 32rpx;
box-sizing: border-box;
image {
width: 360rpx;
height: 360rpx;
// margin-bottom: 20rpx;
margin: 0 auto 20rpx;
// border: 1px dotted #000000;
}
image {
width: 360rpx;
height: 360rpx;
// margin-bottom: 20rpx;
margin: 0 auto 20rpx;
// border: 1px dotted #000000;
}
.tips {
font-size: 34rpx;
color: #999999;
margin-top: 20rpx;
}
.tips {
font-size: 34rpx;
color: #999999;
margin-top: 20rpx;
}
.btn {
margin: 80rpx auto;
width: 600rpx;
border-radius: 32rpx;
line-height: 90rpx;
color: #ffffff;
font-size: 34rpx;
background: #ff7581;
}
}
.btn {
margin: 80rpx auto;
width: 600rpx;
border-radius: 32rpx;
line-height: 90rpx;
color: #ffffff;
font-size: 34rpx;
background: #ff7581;
}
}
</style>

View File

@ -0,0 +1,768 @@
<!-- 我的邀请 -->
<template>
<view>
<u-image src="/me/static/invite/juxing.png" alt="" width="100%" mode="widthFix"></u-image>
<view class="padding" style="position: relative;height: 360rpx;">
<u-image src="@/me/static/invite/fenxiang.png" alt="" width="100%" height="100%"></u-image>
<view class="text-center padding-top yaoqing">
<view class="margin-top-xl margin-bottom-sm padding-top-sm text-xxl text-red text-bold">
{{invitationCode}}
</view>
<!-- #ifdef H5 -->
<u-button @tap="sharurl" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef APP -->
<u-button @tap="sharurl" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef MP-TOUTIAO || MP-KUAISHOU -->
<u-button open-type="share" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<u-button open-type="share" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifndef MP-KUAISHOU -->
<u-button style="margin-left: 50rpx;" @click.stop="onSaveImg()" :custom-style="customStyle"
:hair-line="false" shape="circle" size="mini" :ripple="true">保存海报</u-button>
<!-- #endif -->
</view>
</view>
<view class="margin padding bg-white radius" v-if="inviterList.length">
<view class="flex justify-between" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
:key='index'>
<view class="flex">
<!-- <u-image :src="item.avatar == null?avatar:item.avatar" width="40px" mode="widthFix"></u-image> -->
<image src="../static/invite/5.png" style="width: 80rpx;" mode="widthFix"></image>
<text class="margin-left-sm">{{item.userName}}</text>
</view>
<view style="width: 160rpx;">
<text>获得</text>
<text class="margin-left-xs text-red">{{item.money}}</text>
</view>
</view>
</view>
<view class="padding" style="position: relative;height: 160px;">
<u-image src="@/me/static/invite/yaoqing.png" alt="" width="100%" height="100%"></u-image>
<view class="text-center padding-top flex justify-center flex-direction zhanji">
<view class="flex justify-around margin-top-sm">
<view>
<view class="margin-bottom-sm">已邀请</view>
<view class="text-red"><text class="text-bold u-font-18">{{inviterNumber}}</text></view>
</view>
<view>
<view class="margin-bottom-sm">累计收益</view>
<view class="text-red"><text class="text-bold u-font-18">{{cumulativeRevenue}}</text></view>
</view>
<view>
<view class="margin-bottom-sm">已提现</view>
<view class="text-red">¥<text class="text-bold u-font-18">{{withdrawn}}</text></view>
</view>
</view>
</view>
</view>
<view class="padding" style="position: relative;height: 250rpx;">
<u-image src="@/me/static/invite/jiqiao.png" alt="" width="100%" height="100%"></u-image>
<view class="padding-top jiqiao" style="">
<view class="padding-top-xl padding-lr padding-bottom" style="line-height: 48rpx;">
<block v-if="price2==0">
<view class="flex padding-sm" style="background-color: #ffffff;">
<text class="cuIcon-title text-yellow"></text>
<view>邀请好友可得开通会员及消费金额 {{price}}%的佣金奖励</view>
</view>
</block>
<block v-else>
<view class="flex padding-sm" style="background-color: #ffffff;">
<text class="cuIcon-title text-yellow"></text>
<view>可得一级好友开通会员及消费金额 {{price}}%的佣金奖励</view>
</view>
<view class="flex padding-sm" style="background-color: #ffffff;">
<text class="cuIcon-title text-yellow"></text>
<view>可得二级好友开通会员及消费金额 {{price2}}%的佣金奖励</view>
</view>
</block>
</view>
</view>
</view>
<tki-qrcode ref="qrcode" :val="erweima" :size="200" background="#fff" foreground="#000" pdground="#000"
:onval="true" :loadMake="true" @result="qrR" :show="false"></tki-qrcode>
<view class="cu-modal" :class="modalName == 'Image' ? 'show' : ''" @tap="hideModal">
<view class="cu-dialog" v-if="bgImg && erweimapath && haibaoShow" @tap="hideModal">
<view class="bg-img">
<wm-poster @success="posterSuccess" @successH5="successH5" :imgSrc="bgImg"
:Referrer="'我的邀请码:'+invitationCode" :QrSrc="erweimapath" :LineType="false"></wm-poster>
</view>
</view>
</view>
</view>
</template>
<script>
let settingWritePhotosAlbum = false;
import tkiQrcode from '../../components/tki-qrcode/tki-qrcode.vue';
import wmPoster from '../components/wm-poster/wm-posterorders.vue';
import config from '../../common/config.js'
export default {
components: {
tkiQrcode,
wmPoster
},
data() {
return {
erweimapath: '',
poster: {},
qrShow: false,
haibaoImg: null,
haibaoShow: false,
modalName: '',
canvasId: 'default_PosterCanvasId',
avatar: '../../static/images/logo.png',
customStyle: {
background: '#FFE0E0',
border: '0',
color: 'rgb(254,30,35)',
fontSize: '12px',
fontWeight: '500',
padding: '15px 20px',
},
page: 1,
limit: 10,
inviterName: '', //
cumulativeRevenue: '', //
inviterNumber: '', //
withdrawn: '', //
inviterList: [],
erweima: '',
bgImg: '',
tuiguang: '',
invitationCode: 0,
price: 0,
price2: 0,
h5SaveImg: '',
modalName: '',
haibaoImgH5: '',
qdCode: '', //
}
},
onShareAppMessage(res) {
return {
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
.qdCode, // onload(data){let id=data.id;}
title: this.tuiguang,
imageUrl: this.bgImg
}
},
onShareTimeline(res) {
return {
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
.qdCode, // onload(data){let id=data.id;}
title: this.tuiguang,
imageUrl: this.bgImg
}
},
onLoad() {
this.getInviter()
this.queryInviter()
this.invitationCode = uni.getStorageSync('invitationCode')
this.getUserInfoBl()
this.getBgImg()
if (uni.getStorageSync('qdCode')) {
this.qdCode = uni.getStorageSync('qdCode')
}
// h5
// #ifdef H5
this.erweima = config.APIHOST2 + '/?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #endif
// appapp
// #ifdef APP
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp/?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #endif
// #ifdef MP-WEIXIN
this.getWxEq()
// #endif
// #ifdef MP-TOUTIAO
this.getTouTiao()
// #endif
},
methods: {
//
getUserInfoBl() {
this.$Request.getT('/app/user/selectUserById').then(res => {
if (res.code == 0) {
//
if (res.data.rate) {
this.price = (Number(res.data.rate) * 100).toFixed(0)
} else {
this.price = 0
}
//
if (res.data.twoRate) {
this.price2 = (Number(res.data.twoRate) * 100).toFixed(0)
} else {
this.price2 = 0
}
}
})
},
//
getTouTiao() {
let that = this
uni.downloadFile({
url: config.APIHOST +
'/app/invite/dyCreateQr?invitationCode=' + that
.invitationCode + ',' + that.qdCode + '&page=/pages/index/index',
success: (res) => {
console.log(res)
if (res.statusCode === 200) {
that.erweimapath = res.tempFilePath
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
});
},
//
getWxEq() {
let that = this
uni.downloadFile({
url: config.APIHOST +
'/app/invite/mpCreateQr?invitationCode=' + that
.invitationCode + ',' + that.qdCode,
success: (res) => {
console.log(res)
if (res.statusCode === 200) {
that.erweimapath = res.tempFilePath
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
});
},
sharurl() {
let that = this;
uni.showModal({
title: '链接推广',
content: this.tuiguang + this.erweima,
showCancel: true,
cancelText: '关闭',
confirmText: '一键复制',
success: res => {
if (res.confirm) {
uni.setClipboardData({
data: this.tuiguang + this.erweima,
success: function() {
console.log('success');
uni.showToast({
title: '复制成功',
duration: 1000,
icon: 'none'
});
}
});
}
}
});
},
posterSuccess(haibaoImg) {
this.haibaoImg = haibaoImg;
this.modalName = 'Image';
uni.hideLoading();
},
successH5(haibaoImg) {
this.haibaoImgH5 = haibaoImg
uni.previewImage({
urls: [haibaoImg],
current: 1,
})
},
showModal() {
// #ifndef H5
if (!this.haibaoImg) {
this.haibaoShow = true;
uni.showLoading({
title: '海报生成中'
});
} else {
this.modalName = 'Image';
}
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
//
if (!this.haibaoImg) {
this.haibaoShow = true;
uni.showLoading({
title: '海报生成中'
});
} else {
this.modalName = 'Image';
}
} else {
if (!this.haibaoImgH5) {
this.haibaoShow = true;
uni.showLoading({
title: '海报生成中'
});
} else {
uni.previewImage({
urls: [this.haibaoImgH5],
current: 1,
})
}
}
// #endif
},
hideModal() {
this.modalName = null;
},
qrR(path) {
this.erweimapath = path;
},
getInviter() {
let data = {
page: this.page,
limit: this.limit
}
this.$u.api.inviter(data).then(res => {
if (res.code == 0) {
this.inviterList = res.data.list
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
queryInviter() {
this.$u.api.queryInviter().then(res => {
if (res.code == 0) {
this.cumulativeRevenue = res.data.inviteMoney.moneySum //
this.inviterNumber = res.data.inviteCount //
this.withdrawn = res.data.inviteMoney.cashOut //
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
goNav(e) {
uni.navigateTo({
url: e
})
},
//
getBgImg() {
this.$u.get('app/banner/selectBannerList?classify=5').then(res => {
if (res.code == 0) {
this.bgImg = res.data[0].imageUrl
this.tuiguang = res.data[0].describes
console.log(this.bgImg)
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
});
},
//h5
createH5Poster() {
let that = this;
return new Promise((resolve, reject) => {
uni.showLoading({
title: '海报生成中'
});
const ctx = uni.createCanvasContext('poster');
ctx.fillRect(0, 0, 375, 673);
ctx.setFillStyle("#FFF");
ctx.fillRect(0, 0, 375, 673);
let imgUrl = that.bgImg;
uni.downloadFile({
url: imgUrl,
success: (res) => {
console.log(res, '***************')
if (res.statusCode === 200) {
uni.downloadFile({
url: that.erweima,
success: (res2) => {
console.log(res2)
if (res.statusCode === 200) {
ctx.drawImage(res.tempFilePath, 0, 0, 375,
500);
// 访
let textTop = 0;
ctx.setFontSize(19);
ctx.setFillStyle('#333');
ctx.fillText("长按识别图中二维码", 17, textTop + 590);
//
ctx.drawImage(res2.tempFilePath, 238, textTop +
526, 120, 120);
ctx.draw(true, () => {
// canvas
uni.canvasToTempFilePath({
canvasId: 'poster',
width: 375,
height: 673,
success: (res) => {
console.log(
"海报制作成功!"
);
resolve(res
.tempFilePath
);
},
fail: () => {
uni
.hideLoading();
reject();
}
})
});
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
},
complete: com => {
console.log(com)
uni.showToast({
title: com,
icon: 'none'
});
},
});
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
// that.yu.toast(err)
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none',
});
}
});
});
},
//
createPoster() {
let that = this;
return new Promise((resolve, reject) => {
uni.showLoading({
title: '海报生成中'
});
const ctx = uni.createCanvasContext('poster');
ctx.fillRect(0, 0, 375, 673);
ctx.setFillStyle("#FFF");
ctx.fillRect(0, 0, 375, 673);
let imgUrl = that.bgImg;
uni.downloadFile({
url: imgUrl,
success: (res) => {
console.log(res, '***************')
if (res.statusCode === 200) {
uni.downloadFile({
url: config.APIHOST +
'/app/invite/mpCreateQr?invitationCode=' + that
.invitationCode,
// url: 'https://jiaoyu.xianmxkj.com/sqx_fast/app/invite/mpCreateQr?invitationCode=' +
// that.invitationCode,
success: (res2) => {
console.log(res2)
if (res.statusCode === 200) {
ctx.drawImage(res.tempFilePath, 0, 0, 375,
500);
// 访
let textTop = 0;
ctx.setFontSize(19);
ctx.setFillStyle('#333');
ctx.fillText("长按识别图中二维码", 17, textTop + 590);
//
ctx.drawImage(res2.tempFilePath, 238, textTop +
526, 120, 120);
ctx.draw(true, () => {
// canvas
uni.canvasToTempFilePath({
canvasId: 'poster',
width: 375,
height: 673,
success: (res) => {
console.log(
"海报制作成功!"
);
resolve(res
.tempFilePath
);
},
fail: () => {
uni
.hideLoading();
reject();
}
})
});
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
},
complete: com => {
console.log(com)
uni.showToast({
title: com,
icon: 'none'
});
},
});
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
// that.yu.toast(err)
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none',
});
}
});
});
},
//
async onSaveImg() {
this.showModal();
return
// #ifndef MP-WEIXIN
this.showModal();
// #endif
// #ifdef MP-WEIXIN
let imgUrl = await this.createPoster();
uni.showLoading({
title: '海报下载中'
});
if (settingWritePhotosAlbum) {
uni.getSetting({
success: res => {
if (res.authSetting['scope.writePhotosAlbum']) {
uni.saveImageToPhotosAlbum({
filePath: imgUrl,
success: () => {
uni.hideLoading();
uni.showToast({
title: '保存成功'
});
}
});
} else {
uni.showModal({
title: '提示',
content: '请先在设置页面打开“保存相册”使用权限',
confirmText: '去设置',
cancelText: '算了',
success: data => {
if (data.confirm) {
uni.hideLoading();
uni.openSetting();
}
}
});
}
}
});
} else {
uni.hideLoading();
settingWritePhotosAlbum = true;
uni.authorize({
scope: 'scope.writePhotosAlbum',
success: () => {
uni.saveImageToPhotosAlbum({
filePath: imgUrl,
success: () => {
uni.hideLoading();
uni.showToast({
title: '保存成功'
});
}
});
}
});
}
// #endif
},
}
}
</script>
<style>
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1110;
opacity: 0;
outline: 0;
text-align: center;
-ms-transform: scale(1.185);
transform: scale(1.185);
backface-visibility: hidden;
perspective: 2000upx;
background: rgba(0, 0, 0, 0.6);
transition: all 0.3s ease-in-out 0s;
pointer-events: none;
}
.modal.show {
opacity: 1;
transition-duration: 0.3s;
-ms-transform: scale(1);
transform: scale(1);
overflow-x: hidden;
overflow-y: auto;
pointer-events: auto;
}
page {
background: #E0EFFF;
}
img {
display: block;
}
.poster_canvas {
width: 750upx;
height: 1334upx;
position: fixed;
top: -10000upx;
left: 0;
}
.yaoqing {
width: 100%;
height: 136px;
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
/* background-image: url('@/me/static/invite/fenxiang.png'); */
/* background-size: 100%; */
/* background-repeat: no-repeat; */
}
.zhanji {
width: 100%;
height: 119px;
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
/* background-image: url('@/me/static/invite/yaoqing.png'); */
/* background-size: 100%; */
/* background-repeat: no-repeat; */
}
.jiqiao {
width: 100%;
height: 160rpx;
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
/* background-image: url('@/me/static/invite/jiqiao.png');
background-size: 100%;
background-repeat: no-repeat; */
}
</style>

View File

@ -1,73 +1,124 @@
<!-- 我的邀请 -->
<template>
<view>
<u-image src="/me/static/invite/juxing.png" alt="" width="100%" mode="widthFix"></u-image>
<view class="padding" style="position: relative;height: 360rpx;">
<u-image src="@/me/static/invite/fenxiang.png" alt="" width="100%" height="100%"></u-image>
<view class="text-center padding-top yaoqing">
<view class="margin-top-xl margin-bottom-sm padding-top-sm text-xxl text-red text-bold">
<view class="min-page">
<u-navbar title="分享好友" back-icon-color="#fff" :background="background" immersive :border-bottom="false"
title-color="#fff"></u-navbar>
<view class="u-relative">
<u-image src="/me/static/invite/top-bg.png" alt="" width="100%" mode="widthFix"></u-image>
<view class="u-absolute top-title">
<view class="u-flex u-row-center">
<u-image src="/me/static/invite/title.png" alt="" width="544rpx" mode="widthFix"></u-image>
</view>
<view class="u-flex u-row-right" style="padding-right:70rpx;">
<u-image src="/me/static/invite/rule.png" alt="" width="400rpx" mode="widthFix"></u-image>
</view>
<!-- <view class="u-m-t-24 color-fff u-font-28 u-text-left "
style=" padding-left: 248rpx;text-shadow: 0 0 10px #000;">
<view>好友首次签到成功送1元现金红包</view>
<view>满15人签到额外送9.9元红包</view>
<view>满99人签到额外送100元红包</view>
</view> -->
</view>
</view>
<view class=" inviteBox u-relative">
<view class="top">
<u-image src="/me/static/invite/bg1.png" alt="" width="422rpx" height="76rpx"></u-image>
<view class="u-absolute font-bold">
<text>邀请详情</text>
</view>
</view>
<view class="u-font-32 font-bold u-text-center color-000" style="padding-top: 84rpx;">
您的邀请码
</view>
<view class="text-center ">
<view class=" u-m-t-32 text-xxl text-red text-bold u-m-b-32">
{{invitationCode}}
</view>
<!-- #ifdef H5 -->
<u-button @tap="sharurl" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<view class="u-flex u-row-between" style="padding: 0 88rpx;">
<!-- #ifdef H5 -->
<u-button @tap="sharurl" :custom-style="customStyle" :hair-line="false"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef APP -->
<u-button @tap="sharurl" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef APP -->
<u-button @tap="sharurl" :custom-style="customStyle" :hair-line="false"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef MP-TOUTIAO || MP-KUAISHOU -->
<u-button open-type="share" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef MP-TOUTIAO || MP-KUAISHOU -->
<u-button open-type="share" :custom-style="customStyle" :hair-line="false"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<u-button open-type="share" :custom-style="customStyle" :hair-line="false" shape="circle" size="mini"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifndef MP-KUAISHOU -->
<u-button style="margin-left: 50rpx;" @click.stop="onSaveImg()" :custom-style="customStyle"
:hair-line="false" shape="circle" size="mini" :ripple="true">保存海报</u-button>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<u-button open-type="share" :custom-style="customStyle" :hair-line="false"
:ripple="true">一键分享</u-button>
<!-- #endif -->
<!-- #ifndef MP-KUAISHOU -->
<u-button style="margin-left: 50rpx;" @click.stop="onSaveImg()" :custom-style="customStyle"
:hair-line="false" :ripple="true">保存海报</u-button>
<!-- #endif -->
</view>
</view>
</view>
<view class="margin padding bg-white radius" v-if="inviterList.length">
<view class="flex justify-between" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
:key='index'>
<view class="flex">
<!-- <u-image :src="item.avatar == null?avatar:item.avatar" width="40px" mode="widthFix"></u-image> -->
<image src="../static/invite/5.png" style="width: 80rpx;" mode="widthFix"></image>
<text class="margin-left-sm">{{item.userName}}</text>
</view>
<view style="width: 160rpx;">
<text>获得</text>
<text class="margin-left-xs text-red">{{item.money}}</text>
<view class="gap u-m-t-32"></view>
<view class="u-m-t-32">
<view class="font-bold color-000 u-font-32 u-text-center">我的邀请战绩</view>
<view class="flex justify-around u-m-t-32 u-text-center font-bold" style="line-height: 46rpx;">
<view>
<view class="">已邀请</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{inviterNumber}}</text></view>
</view>
<view>
<view class="">签到</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{inviteSignCount}}</text></view>
</view>
<view @click="toGold">
<view class="">金币收益</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteGoldMoney}}</text></view>
</view>
<view @click="toPack">
<view class="">红包收益</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{earning.inviteMoney}}</text></view>
</view>
<!-- <view>
<view class="">累计收益</view>
<view class="text-red u-m-t-16 "><text class=" u-font-40">{{cumulativeRevenue}}</text></view>
</view> -->
<!-- <view>
<view class="">已提现</view>
<view class="text-red u-m-t-16 "><text class="u-font-40">{{withdrawn}}</text></view>
</view> -->
</view>
<view class="u-m-t-16 color-999 u-text-center u-p-b-32">好友签到成功可额外获得1元现金红包</view>
</view>
</view>
<view class="padding" style="position: relative;height: 160px;">
<u-image src="@/me/static/invite/yaoqing.png" alt="" width="100%" height="100%"></u-image>
<view class="text-center padding-top flex justify-center flex-direction zhanji">
<view class="flex justify-around margin-top-sm" @click="goNav('/me/invite/inviteDet')">
<view>
<view class="margin-bottom-sm">已邀请</view>
<view class="text-red"><text class="text-bold u-font-18">{{inviterNumber}}</text></view>
<view class="margin u-m-t-40 u-m-b-32 padding bg-white radius-16">
<view class="u-font-32 color-333 font-bold u-text-center">已邀请列表</view>
<view v-if="inviterList.length" class="u-m-t-20">
<view class="flex justify-between" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
:key='index'>
<view class="flex">
<!-- <u-image :src="item.avatar == null?avatar:item.avatar" width="40px" mode="widthFix"></u-image> -->
<image src="../static/invite/5.png" style="width: 80rpx;" mode="widthFix"></image>
<text class="margin-left-sm">{{item.userName}}</text>
</view>
<view>
<view class="margin-bottom-sm">累计收益</view>
<view class="text-red"><text class="text-bold u-font-18">{{cumulativeRevenue}}</text></view>
</view>
<view>
<view class="margin-bottom-sm">已提现</view>
<view class="text-red">¥<text class="text-bold u-font-18">{{withdrawn}}</text></view>
<view style="width: 160rpx;" class="u-flex u-row-right font-bold">
<text class=" text-red" v-if="item.recordNum>0">已签到</text>
<text class=" color-999" v-else>未签到</text>
</view>
</view>
</view>
<!-- <view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!inviterList.length">
<my-empty ></my-empty>
</view> -->
</view>
<view class="padding" style="position: relative;height: 250rpx;">
<!-- <view class="padding" style="position: relative;height: 250rpx;">
<u-image src="@/me/static/invite/jiqiao.png" alt="" width="100%" height="100%"></u-image>
<view class="padding-top jiqiao" style="">
<view class="padding-top-xl padding-lr padding-bottom" style="line-height: 48rpx;">
@ -90,7 +141,7 @@
</view>
</view>
</view>
</view> -->
<tki-qrcode ref="qrcode" :val="erweima" :size="200" background="#fff" foreground="#000" pdground="#000"
@ -110,14 +161,24 @@
let settingWritePhotosAlbum = false;
import tkiQrcode from '../../components/tki-qrcode/tki-qrcode.vue';
import wmPoster from '../components/wm-poster/wm-posterorders.vue';
import myEmpty from '@/components/my-empty.vue';
import config from '../../common/config.js'
export default {
components: {
tkiQrcode,
myEmpty,
wmPoster
},
data() {
return {
earning: {
inviteMoney: 0,
inviteGoldMoney: 0,
},
//
inviteCount: 0,
hasAjax: false,
erweimapath: '',
poster: {},
qrShow: false,
@ -126,13 +187,16 @@
modalName: '',
canvasId: 'default_PosterCanvasId',
avatar: '../../static/images/logo.png',
background: {
'background-color': 'transparent'
},
customStyle: {
background: '#FFE0E0',
border: '0',
color: 'rgb(254,30,35)',
fontSize: '12px',
fontWeight: '500',
padding: '15px 20px',
background: '#DDDCFF',
border: '8rpx',
color: '#4544FF',
fontSize: '28rpx',
fontWeight: '700',
padding: '10rpx 32rpx',
},
page: 1,
limit: 10,
@ -186,7 +250,7 @@
// #endif
// appapp
// #ifdef APP
this.erweima = config.APIHOST2 + '/pages/login/registerApp/?invitation=' + this
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp/?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #endif
// #ifdef MP-WEIXIN
@ -197,6 +261,16 @@
// #endif
},
methods: {
toGold(){
uni.navigateTo({
url:'/me/invite/moneyList?moneyType=2&viewType=1'
})
},
toPack(){
uni.navigateTo({
url:'/me/invite/moneyList?moneyType=1&viewType=1'
})
},
//
getUserInfoBl() {
this.$Request.getT('/app/user/selectUserById').then(res => {
@ -305,11 +379,14 @@
uni.hideLoading();
},
successH5(haibaoImg) {
this.haibaoImgH5 = haibaoImg
uni.previewImage({
urls: [haibaoImg],
current: 1,
})
if ( haibaoImg ) {
this.haibaoImgH5 = haibaoImg
uni.previewImage({
urls: [haibaoImg],
current: 1,
})
}
},
showModal() {
// #ifndef H5
@ -322,6 +399,7 @@
this.modalName = 'Image';
}
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
@ -346,7 +424,6 @@
current: 1,
})
}
}
// #endif
},
@ -364,6 +441,7 @@
this.$u.api.inviter(data).then(res => {
if (res.code == 0) {
this.inviterList = res.data.list
this.hasAjax = true;
} else {
uni.showToast({
title: res.msg,
@ -379,6 +457,8 @@
this.cumulativeRevenue = res.data.inviteMoney.moneySum //
this.inviterNumber = res.data.inviteCount //
this.withdrawn = res.data.inviteMoney.cashOut //
this.inviteSignCount = res.data.inviteSignCount
Object.assign(this.earning,res.data.earning)
} else {
uni.showToast({
title: res.msg,
@ -399,6 +479,7 @@
//
getBgImg() {
this.$u.get('app/banner/selectBannerList?classify=5').then(res => {
console.log(res)
if (res.code == 0) {
this.bgImg = res.data[0].imageUrl
this.tuiguang = res.data[0].describes
@ -543,10 +624,9 @@
let textTop = 0;
ctx.setFontSize(19);
ctx.setFillStyle('#333');
ctx.fillText("长按识别图中二维码", 17, textTop + 590);
// ctx.fillText("", 17, textTop + 590);
//
ctx.drawImage(res2.tempFilePath, 238, textTop +
526, 120, 120);
// ctx.drawImage(res2.tempFilePath, 238, textTop + 526, 120, 120);
ctx.draw(true, () => {
// canvas
uni.canvasToTempFilePath({
@ -615,6 +695,7 @@
//
async onSaveImg() {
this.showModal();
return
// #ifndef MP-WEIXIN
this.showModal();
@ -678,7 +759,87 @@
}
</script>
<style>
<style lang="scss" scoped>
$color1: #5857FF;
.cu-dialog {
background-color: transparent;
}
.text-red {
color: $color1;
}
.gap {
width: 100%;
height: 0;
position: relative;
border-bottom: 1px dashed #eee;
&:before,
&::after {
display: block;
content: '';
position: absolute;
width: 34rpx;
height: 34rpx;
background: #F3F4F8;
border-radius: 50%;
z-index: 2;
top: 50%;
transform: translateY(-50%);
background-size: 100% 18px;
background-repeat: repeat-x
}
&:before {
left: -16rpx;
}
&::after {
right: -16rpx;
}
}
.radius-16 {
border-radius: 16rpx;
}
.min-page {
background: #F3F4F8;
}
.inviteBox {
position: relative;
margin-top: -240rpx;
background-color: #fff;
border-radius: 16rpx 16rpx 16rpx 16rpx;
margin-left: 28rpx;
margin-right: 28rpx;
.top {
position: absolute;
display: flex;
justify-content: center;
left: 134rpx;
right: 134rpx;
top: -24rpx;
.u-absolute {
left: 0;
right: 0;
z-index: 1;
top: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
.modal {
position: fixed;
top: 0;
@ -698,6 +859,10 @@
pointer-events: none;
}
.bg-img {
background-color: transparent;
}
.modal.show {
opacity: 1;
transition-duration: 0.3s;
@ -709,7 +874,7 @@
}
page {
background: #E0EFFF;
background: #F3F4F8;
}
img {
@ -738,15 +903,24 @@
/* background-repeat: no-repeat; */
}
.zhanji {
width: 100%;
height: 119px;
position: absolute;
margin: auto;
top: 0;
.top-title {
left: 0;
right: 0;
bottom: 0;
top: 192rpx;
.rule {
line-height: 32rpx;
width: 428rpx;
padding-right: 150rpx;
}
.top-title-img {
width: 550rpx;
height: 92rpx;
}
}
.zhanji {
/* background-image: url('@/me/static/invite/yaoqing.png'); */
/* background-size: 100%; */
/* background-repeat: no-repeat; */

View File

@ -7,7 +7,7 @@
<view class="" style="position: relative;overflow: hidden;width: 90px;">
<view style="position: absolute;bottom:0;">
<!-- <view class="flex"> -->
<button @tap="getOut" class="cu-btn round">立即提现</button>
<button @tap="getOut" class="cuBtn round">立即提现</button>
<!-- </view> -->
</view>
</view>
@ -33,7 +33,7 @@
style="width: 80rpx;height:80rpx;border-radius: 50rpx;"></image>
<view class="margin-left-sm">
<view class="userName_view">{{item.userName}}</view>
<view class="text-cut" style="font-size: 24rpx;" v-if="item.userType && item.userType == 2">二级好友
<view class="text-cut" style="font-size: 24rpx;" v-if="item.userType && item.userType === 2">二级好友
</view>
<view class="text-cut" style="font-size: 24rpx;" v-else>一级好友
</view>
@ -45,7 +45,7 @@
</view>
</view>
<empty v-if="userList.length == 0" />
<empty v-if="userList.length === 0" />
</view>
</view>
</template>
@ -84,7 +84,7 @@
limit: this.limit
}
this.$u.api.queryInviter(data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
this.inviterRecord = res.data.inviteMoney.money
} else {
uni.showToast({
@ -98,11 +98,12 @@
getInviter() {
let data = {
page: this.page,
limit: this.limit
limit: this.limit,
userType:1
}
this.$u.api.inviter(data).then(res => {
if (res.code == 0) {
if (this.page == 1) {
if (res.code === 0) {
if (this.page === 1) {
this.userList = res.data.list
} else {
this.userList = [...this.userList, ...res.data.list]
@ -127,7 +128,7 @@
</script>
<style>
.cu-btn {
.cuBtn {
background: rgba(255, 117, 129, 0.2);
color: #ff7581;
font-weight: bold;

View File

@ -9,8 +9,8 @@
<view style="margin-bottom: 8upx"> 时间 {{item.createTime}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<!-- 提现金额 -->
<text v-if="item.type==2" style="color: #FD6416;font-size: 32upx;font-weight: 600"> - {{item.money}}</text>
<text v-if="item.type==1" style="color: #FD6416;font-size: 32upx;font-weight: 600">+ {{item.money}}</text>
<text v-if="item.type===2" style="color: #666;font-size: 32upx;font-weight: 600"> - {{item.money}}</text>
<text v-if="item.type===1" style="color: #FD6416;font-size: 32upx;font-weight: 600">+ {{item.money}}</text>
</view>
</view>
@ -34,10 +34,23 @@
return {
list: [],
page: 1,
limit: 10
limit: 10,
totalCount: 0,
moneyType: null,
viewType: null,
}
},
onLoad: function(e) {
console.log(e)
if (e.moneyType) {
this.moneyType = e.moneyType
uni.setNavigationBarTitle({
title: e.moneyType === 1 ? '红包明细' : '金币明细'
});
}
if (e.viewType) {
this.viewType = e.viewType
}
this.getMoney();
},
@ -49,15 +62,16 @@
if (token) {
let data = {
page : that.page,
limit : that.limit
limit : that.limit,
moneyType : this.moneyType,
viewType: this.viewType,
}
that.$u.api.moneyDet(data).then(res => {
if(that.page == 1) {
that.list = res.data.records
uni.stopPullDownRefresh();
return
this.$Request.getT('app/moneyDetails/queryUserMoneyDetails', data).then(res => {
this.totalCount = res.data.total;
if ( res.data.records.length > 0) {
this.list = [...this.list,...res.data.records];
}
that.list = [...that.list, ...res.data.records]
})
}
@ -65,8 +79,10 @@
},
},
onReachBottom: function() {
this.page = this.page + 1;
this.getMoney();
if (this.page*this.limit < this.totalCount) {
this.page = this.page + 1;
this.getMoney();
}
},
onPullDownRefresh: function() {
this.page = 1;
@ -94,8 +110,9 @@
.centre {
text-align: center;
margin: 200rpx auto;
padding: 200rpx 0;
font-size: 32rpx;
box-sizing: border-box;
image {
width: 360rpx;
height: 360rpx;
@ -105,7 +122,7 @@
}
.tips {
font-size: 34rpx;
color: #5074FF;
color: #999999;
margin-top: 20rpx;
}
.btn {

View File

@ -1,5 +1,5 @@
<template>
<view class="container">
<view class="containerView">
<list-cell title="收款人姓名" type="text" placeholder="请输入支付宝收款人姓名" v-model="zhiFuBaoName"></list-cell>
<list-cell title="支付宝账号" type="text" placeholder="请输入要绑定的支付宝手机号" v-model="zhiFuBao"></list-cell>
@ -10,7 +10,6 @@
<view style="padding: 32upx 64upx;font-size: 24upx;color: #999999;">提示请正确填写收款人的支付宝账户和真实的收款人姓名否则将无法正常收款</view>
</view>
</view>
</template>
<script>
@ -31,7 +30,7 @@
if (userId) {
this.$u.api.userinfo().then(res => {
if (res.code == 0) {
if (res.code === 0) {
if (res.data.zhiFuBao) {
this.zhiFuBao = res.data.zhiFuBao;
}
@ -78,18 +77,26 @@
} else {
this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&zhiFuBaoName=' + zhiFuBaoName).then(
res => {
// console.log(res);
uni.setStorageSync('zhiFuBao', zhiFuBao)
uni.setStorageSync('zhiFuBaoName', zhiFuBaoName)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
console.log(res);
if(res.code===0){
uni.setStorageSync('zhiFuBao', zhiFuBao)
uni.setStorageSync('zhiFuBaoName', zhiFuBaoName)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
}else{
uni.showToast({
title:res.msg||'修改失败',
icon:'none'
})
}
});
@ -127,7 +134,7 @@
background: #FFFFFF;
}
.container {
.containerView {
padding-top: 32upx;
position: relative;
width: 100%;

View File

@ -77,7 +77,7 @@
integral: this.value
}
this.$Request.postT('/app/integral/creditsExchange', data).then(res => {
if (res.code == 0) {
if (res.code === 0) {
uni.showToast({
title: '积分兑换成功'
})
@ -97,7 +97,7 @@
//
getBili() {
this.$u.get('/app/common/type/104').then(res => { // 104
if (res.code == 0 && res.data) {
if (res.code === 0 && res.data) {
this.bili = res.data.value
}
});

View File

@ -112,14 +112,14 @@
setTimeout(() => {
this.refresherTriggered = false
}, 1500)
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]
@ -131,7 +131,7 @@
getNum() {
this.$Request.getT('/app/integral/selectByUserId').then(res => {
uni.stopPullDownRefresh()
if (res.code == 0) {
if (res.code === 0) {
this.num = res.data.integralNum
} else {
this.num = 0

View File

@ -15,7 +15,7 @@
</view>
<view class="list-box-r-new flex align-center justify-between">
<view class="list-box-r-new-l">
{{item.over==1?'完结':'更新'+item.courseDetailsCount+'集'}}
{{item.over===1?'完结':'更新'+item.courseDetailsCount+'集'}}
</view>
<view class="list-box-r-new-r">
继续观看
@ -27,7 +27,7 @@
<view class="" style="margin: 20rpx;" v-if="list.length > 0">
<u-loadmore :status="status" />
</view>
<empty v-if="list.length == 0" title="暂无记录" />
<empty v-if="list.length === 0" title="暂无记录" />
</view>
</template>
@ -47,17 +47,17 @@
};
},
onShow() {
this.getList()
this.getDataList()
},
onPullDownRefresh() {
this.page = 1
this.getList()
this.getDataList()
},
onReachBottom() {
if (this.page < this.pages) {
this.page += 1
this.status = 'loading'
this.getList()
this.getDataList()
} else {
this.status = 'nomore'
}
@ -70,7 +70,7 @@
})
},
//
getList() {
getDataList() {
let data = {
page: this.page,
limit: this.limit,
@ -78,14 +78,14 @@
}
this.$Request.getT('/app/courseCollect/selectByUserId', 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]

View File

@ -64,7 +64,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
@ -79,14 +79,14 @@
}
this.$u.api.courseList(data).then(res => {
uni.stopPullDownRefresh()
if (res.code == 0) {
if (res.code === 0) {
this.pages = res.data.totalPage
if (this.page < this.pages) {
this.status = 'loadmore'
} else {
this.status = 'nomore'
}
if (this.page == 1) {
if (this.page === 1) {
this.jqList = res.data.list
} else {
this.jqList = [...this.jqList, ...res.data.list]

View File

@ -0,0 +1,111 @@
<template>
<view>
<view class="mFYpdwbMdk flex align-center justify-center">
<view class="mFYpdwbMdk-box flex justify-between align-center flex-wrap">
<view class="mFYpdwbMdk-box-item" v-for="(item,index) in wallpaperList" :key="index">
<image @click="priveImg(item.imageUrl)" :src="item.imageUrl" mode="aspectFill"></image>
</view>
</view>
</view>
<empty v-if="wallpaperList.length == 0" />
<u-loadmore v-if="wallpaperList.length >= 4" :status="status" />
</view>
</template>
<script>
import empty from '../../components/empty.vue'
export default {
components: {
empty
},
data() {
return {
wallpaperList: [], //
page: 1,
limit: 10,
pages: 1,
status: 'loadmore',
};
},
onLoad() {
this.getWallpaperList() //
},
onReachBottom() {
if (this.page < this.pages) {
this.page += 1
this.status = 'loading'
this.getWallpaperList()
} else {
this.status = 'nomore'
}
},
onPullDownRefresh() {
this.page = 1
this.getWallpaperList()
},
methods: {
/**
* @param {Object} url 图片链接
* 预览图片
*/
priveImg(url) {
console.log(url)
uni.previewImage({
urls: [url],
current: 0
})
},
//
getWallpaperList() {
let data = {
classify: 10,
page: this.page,
limit: this.limit,
}
// selectBannerPage
this.$u.api.selectBannerPage(data).then(res => {
uni.stopPullDownRefresh()
if (res.code == 0) {
this.pages = res.data.totalPage
if (this.page < this.pages) {
this.status = 'loadmore'
} else {
this.status = 'nomore'
}
if (this.page == 1) {
this.wallpaperList = res.data.list
} else {
this.wallpaperList = [...this.wallpaperList, ...res.data.list]
}
}
})
},
}
}
</script>
<style lang="scss">
.mFYpdwbMdk {
width: 100%;
padding-top: 20rpx;
height: auto;
.mFYpdwbMdk-box {
width: 686rpx;
height: 100%;
}
.mFYpdwbMdk-box-item {
width: 49%;
height: 500rpx;
border-radius: 18rpx;
margin-bottom: 20rpx;
image {
width: 100%;
height: 500rpx;
border-radius: 18rpx;
}
}
}
</style>

243
me/mFYpdwbMdk/slkj.html Normal file
View File

@ -0,0 +1,243 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/common.css">
<style>
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.box {
position: relative;
width: 840px;
height: 525px;
margin: 100px auto;
overflow: hidden;
}
ul,
ol,
li {
padding: 0;
margin: 0;
list-style: none;
}
ul {
position: absolute;
}
ul li {
float: left;
width: 840px;
height: 525px;
}
ul img {
display: block;
width: 840px;
height: 525px;
}
ol {
position: absolute;
left: 50%;
bottom: 20px;
transform: translateX(-50%);
}
ol li {
float: left;
width: 15px;
height: 15px;
background-color: #fff;
border: 2px solid #ccc;
margin: 0 5px;
border-radius: 50%;
}
.active {
background-color: greenyellow;
}
.left,
.right {
display: none;
position: absolute;
width: 30px;
height: 60px;
line-height: 60px;
font-size: 24px;
font-weight: bold;
color: greenyellow;
background-color: rgba(129, 92, 148, 0.5);
top: 50%;
transform: translateY(-50%);
}
.right {
right: 0;
}
</style>
</head>
<body>
<!-- 搭建结构 -->
<div class="box">
<ul>
<li><img src="./images/1.jpg" alt=""></li>
</ul>
<ol></ol>
<span class="left iconfont">&#xe64a;</span>
<span class="right iconfont">&#xe637;</span>
</div>
<script src="./js/animate.js"></script>
<script>
// 1.获取元素
let box = document.querySelector('.box');
let ul = document.querySelector('ul');
let ol = document.querySelector('ol');
let left = document.querySelector('.left');
let right = document.querySelector('.right');
let flag = true; // 假设动画已经执行完成了
// 创建计数器
let num = 0;
// 将第一张图片克隆放到后面
ul.appendChild(ul.children[0].cloneNode(true));
// 计算ul的宽度
ul.style.width = ul.children.length * 840 + 'px';
// 更具图片的数量来创建小圆点
for (let i = 0; i < ul.children.length - 1; i++) {
// 创建节点
let li = document.createElement('li');
// 给每个li添加自定属性
li.dataset['index'] = i;
// 将节点添加到ol里面
ol.appendChild(li);
// 绑定事件
li.onclick = function () {
// 清除其他小圆点的类名
for (let i = 0; i < ol.children.length; i++) {
ol.children[i].classList.remove('active');
}
// 给被点击的元素添加类名
this.classList.add('active');
// 让ul移动到对应的位置
num = this.dataset['index'];
animate(ul, {
left: -num * box.offsetWidth
});
console.log(box.offsetWidth)
}
}
// 默认给第一个小圆点添加样式
ol.children[0].classList.add('active');
// 给右箭头添加事件
right.addEventListener('click', () => {
if (flag) {
flag = false;
// 判断是不是在最后一个元素
if (num == ul.children.length - 1) {
num = 0;
// 如果在最后一个元素,瞬间回到第一个元素
// 实现无缝切换
ul.style.left = 0;
}
num++;
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
animate(ul, {
left: -num * box.offsetWidth
},() => {
// 当动画执行完成后,执行回调函数
// 让flag变为true
flag = true;
})
// 让小圆点跟着图片走
for (let i = 0; i < ol.children.length; i++) {
ol.children[i].classList.remove('active');
}
// 给对应的小圆点添加上样式
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
if (num == ul.children.length - 1) {
ol.children[0].classList.add('active');
} else {
ol.children[num].classList.add('active');
}
}
})
// 给左箭头添加事件
left.addEventListener('click', () => {
if (flag) {
flag = false;
// 判断是不是第一个元素
if (num == 0) {
num = ul.children.length - 1;
// 如果是第一个元素,我们瞬间切换到最后一个元素
// 应为第一个元素和最后一个元素是一样的,所以可以实现
// 无缝切换
ul.style.left = -num * box.offsetWidth + 'px';
}
num--;
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
animate(ul, {
left: -num * box.offsetWidth
},() => {
// 当动画执行完成后,执行回调函数
// 让flag变为true
flag = true;
})
// 让小圆点跟着图片走
for (let i = 0; i < ol.children.length; i++) {
ol.children[i].classList.remove('active');
}
// 给对应的小圆点添加上样式
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
if (num == ul.children.length - 1) {
ol.children[0].classList.add('active');
} else {
ol.children[num].classList.add('active');
}
}
})
// 让轮播图自动轮播
let timer = setInterval(function() {
right.click();
},2000)
// 鼠标移入,显示箭头,并且停止轮播
box.addEventListener('mouseenter',()=> {
right.style.display = 'block';
left.style.display = 'block';
// 清除定时器
clearInterval(timer);
})
// 鼠标移出,继续轮播
box.addEventListener('mouseleave',() => {
// 隐藏按钮
right.style.display = 'none';
left.style.display = 'none';
timer = setInterval(function() {
right.click();
},2000)
})
</script>
</body>
</html>

View File

@ -51,8 +51,8 @@
state: 5
}
this.$u.api.message(data).then(res => {
if (res.code == 0) {
if (this.page == 1) {
if (res.code === 0) {
if (this.page === 1) {
this.msgList = res.data.list
uni.stopPullDownRefresh();
return

View File

@ -128,7 +128,7 @@
},
{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}
]
@ -138,7 +138,7 @@
if (checkIosPay === '是') {
this.payList = [{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}]
this.payAway = 3
@ -155,7 +155,7 @@
},
{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}
]
@ -166,7 +166,7 @@
// #ifdef MP-WEIXIN
this.payList = [{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}]
this.payAway = 3
@ -181,7 +181,7 @@
},
{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}
]
@ -194,7 +194,7 @@
},
{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}
]
@ -209,7 +209,7 @@
},
{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}
]
@ -225,7 +225,7 @@
},
{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}
]
@ -233,7 +233,7 @@
} else {
this.payList = [{
imgurl: '/static/images/pay/lingqian.png',
name: '金支付',
name: '金支付',
payAway: 3
}]
this.payAway = 3
@ -385,7 +385,7 @@
}
})
} else {
switch (this.payAway) { //1:,2: 3:
switch (this.payAway) { //1:,2: 3:
case 1: //
// #ifdef MP-WEIXIN
that.$Request.postT("/app/wxPay/wxPayJsApiOrder", {

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img gyqIAcrOXs" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img JoPEzFgyqW" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (1).png" mode="widthFix"></image>
<image class="img gyqxIEWvDB" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (2).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,815 @@
<template>
<view class="nngyqngmIx">
<!-- 背景图片 -->
<image src="../static/assist/zlBg.png" class="bg" mode="widthFix"></image>
<!-- 内容 -->
<view class="iRgyqeOdqI">
<!-- #ifdef H5 -->
<image v-if="isBack" src="/static/images/index/left.png" class="left_viewimage" @tap="goBack"></image>
<!-- #endif -->
<!-- 标题 -->
<view class="iRgyqeOdqI-title">
邀好友助力
</view>
<!-- 副标题 -->
<view class="iRgyqeOdqI-titles">
免费领会员
</view>
<!-- 邀请好友展示框 -->
<view class="iRgyqeOdqI-hy flex align-center justify-center">
<view class="iRgyqeOdqI-hy-box">
<view class="iRgyqeOdqI-hy-box-title1" v-if="rlueList[rlueIndex] && rlueList[rlueIndex].inviteMonth>0">
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可再得{{rlueList[rlueIndex].inviteMonth}}个月会员
</view>
<view class="iRgyqeOdqI-hy-box-title1" v-else>
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可升级永久免费无限会员
</view>
<view class="" v-for="(item,index) in rlueList" :key="index">
<view v-if="index>rlueIndex" class="iRgyqeOdqI-hy-box-title2">
<block v-if="item.inviteMonth>0">
再邀请{{item.inviteCount - nowPeopNum}}位好友可再得{{item.inviteMonth}}个月会员
</block>
<block v-else>
再邀请{{item.inviteCount - nowPeopNum}}位好友可升级永久免费无限会员
</block>
</view>
</view>
<view class="iRgyqeOdqI-hy-box-peop">
<view class="iRgyqeOdqI-hy-box-peop-my flex align-center justify-center">
<image :src="avatar?avatar:'../../static/images/logo.png'" mode=""></image>
</view>
<view class="iRgyqeOdqI-hy-box-peop-title">
您已注册成功还需邀请
</view>
<view class="iRgyqeOdqI-hy-box-peop-list flex align-center justify-between flex-wrap">
<view class="iRgyqeOdqI-hy-box-peop-list-i flex align-center justify-center"
v-for="(item,index) in getPeopNum" :key="index">
<block v-if="getPeopList[index]">
<view class="iRgyqeOdqI-hy-box-peop-list-ia flex align-center justify-center"
style="border: none;">
<image style="width: 100%;height: 100%;border-radius: 50%;"
:src="getPeopList[index].avatar?getPeopList[index].avatar:'../../static/images/logo.png'"
mode=""></image>
</view>
<view class="iRgyqeOdqI-hy-box-peop-list-it flex align-center justify-center">
{{getPeopList[index].userName}}
</view>
</block>
<block v-else>
<view @click="onSaveImg()"
class="iRgyqeOdqI-hy-box-peop-list-ia flex align-center justify-center">
<u-icon name="plus" color="#ffffff" size="28"></u-icon>
</view>
<view class="iRgyqeOdqI-hy-box-peop-list-it flex align-center justify-center">
待助力
</view>
</block>
</view>
<view class="iRgyqeOdqI-hy-box-peop-list-i flex align-center justify-center"
style="height: 0;">
</view>
</view>
</view>
<block v-if="getPeopList.length>0">
<!-- 进度条 -->
<view class="iRgyqeOdqI-hy-box-schedule">
<u-line-progress height="16" inactive-color="#f5e0b0" active-color="#edb840"
:show-percent="false" :percent="getMathNum()" :round="true"></u-line-progress>
</view>
<view class="iRgyqeOdqI-hy-box-schedulet">
距离领取会员仅差<span>{{getUserPeopNum}}</span>位好友
</view>
<view class="iRgyqeOdqI-hy-box-peops">
<swiper class="iRgyqeOdqI-hy-box-peopss" next-margin="80px" :circular="true"
:indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item class="iRgyqeOdqI-hy-box-peopssi" v-for="(item,index) in getPeopList"
:key="index">
<view class="iRgyqeOdqI-hy-box-peopssis flex align-center">
<image :src="item.avatar?item.avatar:'../../static/images/logo.png'" mode="">
</image>
<view class="iRgyqeOdqI-hy-box-peopssit">
{{item.userName}}已为您助力
</view>
</view>
</swiper-item>
</swiper>
</view>
</block>
</view>
</view>
<!-- 助力按钮 -->
<!-- #ifndef MP-KUAISHOU -->
<view class="iRgyqeOdqI-btn flex align-center justify-center" @click="onSaveImg()">
{{getPeopList.length==0?'开始助力':'继续助力'}}
</view>
<!-- #endif -->
<!-- #ifdef MP-KUAISHOU -->
<view class="iRgyqeOdqI-btn flex align-center justify-center">
<u-button open-type="share" :custom-style="customStyle" :hair-line="false"
style="width: 100%;height: 100%;" shape="circle"
:ripple="true">{{getPeopList.length==0?'开始助力':'继续助力'}}</u-button>
</view>
<!-- #endif -->
<!-- 活动流程 -->
<view class="iRgyqeOdqI-lc">
<view class="iRgyqeOdqI-lc-title flex align-center justify-center">
活动流程
</view>
<view class="iRgyqeOdqI-lc-ls flex justify-between">
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as1.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
点击发起助力
</view>
</view>
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as2.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
邀请对应数量好友
</view>
</view>
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as3.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
每位好友注册成功
</view>
</view>
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as4.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
领取对应时间会员
</view>
</view>
</view>
</view>
<!-- 活动规则 -->
<view class="iRgyqeOdqI-rule">
<view class="iRgyqeOdqI-rule-title flex align-center justify-center">
活动规则
</view>
<view class="iRgyqeOdqI-rule-list">
<view class="iRgyqeOdqI-rule-list-i flex align-center" v-for="(item,index) in rlueList" :key="index">
<image :src="item.inviteImg" mode=""></image>
<view class="iRgyqeOdqI-rule-list-i-r">
<view class="iRgyqeOdqI-rule-list-i-r-t" v-if="item.inviteMonth>0">
领取{{item.inviteMonth}}个月会员
</view>
<view class="iRgyqeOdqI-rule-list-i-r-t" v-else>
领取永久会员
</view>
<view class="iRgyqeOdqI-rule-list-i-r-b" v-if="item.inviteMonth>0">
邀请{{item.inviteCount}}位好友,您可以免费{{item.inviteMonth}}个月无限看短剧
</view>
<view class="iRgyqeOdqI-rule-list-i-r-b" v-else>
邀请{{item.inviteCount}}位好友,您可以永久免费无限看短剧
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <image src="../../static/images/logo.png" mode=""></image> -->
<tki-qrcode ref="qrcode" :val="erweima" :size="100" background="#ffffff" foreground="#000000" pdground="#000000"
:onval="true" :loadMake="true" @result="qrR" :show="false"></tki-qrcode>
<view class="cu-modal" :class="modalName == 'Image' ? 'show' : ''" @tap="hideModal">
<view class="cu-dialog" v-if="bgImg && erweimapath && haibaoShow" @tap="hideModal">
<view class="bg-img">
<wm-poster @success="posterSuccess" @successH5="successH5" :imgSrc="bgImg"
:Referrer="'我的邀请码:'+invitationCode" :QrSrc="erweimapath" :LineType="false"></wm-poster>
</view>
</view>
</view>
</view>
</template>
<script>
import tkiQrcode from '../../components/tki-qrcode/tki-qrcode.vue';
import wmPoster from '../components/wm-poster/wm-posterordershd.vue';
import config from '../../common/config.js'
export default {
components: {
tkiQrcode,
wmPoster
},
data() {
return {
customStyle: {
width: '100%',
height: '98rpx',
border: 'none',
background: 'transparent',
color: '#ffffff',
fontSize: '12px',
fontWeight: '500',
// padding: '24px 20px',
},
avatar: '',
inviteAwardId: '', //id
rlueList: [], //
getPeopNum: 0, //
getUserPeopNum: 0, //
rlueIndex: 0, //
nowPeopNum: 0, //
getPeopList: [], //
userName: '', //
avatar: '', //
erweima: '',
modalName: '',
bgImg: '',
erweimapath: '',
haibaoShow: false,
invitationCode: 0,
erweimapath: '',
haibaoImgH5: '',
qdCode: '', //
isBack: false,
bgImgs: '',
tuiguang: '',
}
},
onShareAppMessage(res) {
return {
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
.qdCode, // onload(data){let id=data.id;}
title: this.tuiguang,
imageUrl: this.bgImgs
}
},
onShareTimeline(res) {
return {
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
.qdCode, // onload(data){let id=data.id;}
title: this.tuiguang,
imageUrl: this.bgImgs
}
},
onLoad() {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.isBack = false
} else {
this.isBack = true
}
// #endif
if (uni.getStorageSync('qdCode')) {
this.qdCode = uni.getStorageSync('qdCode')
}
this.getBgImg()
this.invitationCode = uni.getStorageSync('invitationCode')
// h5
// #ifdef H5
this.erweima = config.APIHOST2 + '/?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #endif
// appapp
// #ifdef APP
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #endif
// #ifdef MP-WEIXIN
this.getWxEq()
// #endif
// #ifdef MP-TOUTIAO
this.getTouTiao()
// #endif
this.getUserInfo()
this.getActivity()
},
methods: {
goBack() {
uni.navigateBack();
},
//
getTouTiao() {
let that = this
uni.downloadFile({
url: config.APIHOST +
'/app/invite/dyCreateQr?invitationCode=' + that
.invitationCode + ',' + that.qdCode + '&page=/pages/index/index',
success: (res) => {
console.log(res)
if (res.statusCode === 200) {
that.erweimapath = res.tempFilePath
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
});
},
//
getWxEq() {
let that = this
uni.downloadFile({
url: config.APIHOST +
'/app/invite/mpCreateQr?invitationCode=' + that
.invitationCode + ',' + that.qdCode,
success: (res) => {
console.log(res)
if (res.statusCode === 200) {
that.erweimapath = res.tempFilePath
} else {
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
},
fail: err => {
console.log(err)
uni.hideLoading();
uni.showToast({
title: '海报制作失败,图片下载失败',
icon: 'none'
});
}
});
},
//
getBgImg() {
this.$Request.get('/app/common/type/812').then(res => {
if (res.code == 0 && res.data.value) {
this.bgImg = res.data.value
}
})
this.$u.get('app/banner/selectBannerList?classify=5').then(res => {
if (res.code == 0) {
this.bgImgs = res.data[0].imageUrl
this.tuiguang = res.data[0].describes
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
});
},
showModal() {
console.log(this.erweima, '二维码地址')
// #ifndef H5
if (!this.haibaoImg) {
this.haibaoShow = true;
uni.showLoading({
title: '海报生成中'
});
} else {
this.modalName = 'Image';
}
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
//
if (!this.haibaoImg) {
this.haibaoShow = true;
uni.showLoading({
title: '海报生成中'
});
} else {
this.modalName = 'Image';
}
} else {
if (!this.haibaoImgH5) {
this.haibaoShow = true;
uni.showLoading({
title: '海报生成中'
});
} else {
uni.previewImage({
urls: [this.haibaoImgH5],
current: 1,
})
}
}
// #endif
},
onSaveImg() {
this.showModal();
},
posterSuccess(haibaoImg) {
this.haibaoImg = haibaoImg;
this.modalName = 'Image';
uni.hideLoading();
},
successH5(haibaoImg) {
this.haibaoImgH5 = haibaoImg
uni.previewImage({
urls: [haibaoImg],
current: 1,
})
},
hideModal() {
this.modalName = null;
},
qrR(path) {
console.log(path, '二维码回调地址')
this.erweimapath = path;
},
//
getMathNum() {
return (this.getPeopList.length / this.getPeopNum).toFixed(2) * 100
},
//
getUserInfo() {
this.$u.api.userinfo().then(res => {
if (res.code == 0) {
this.userName = res.data.userName;
this.avatar = res.data.avatar;
}
})
},
//
getActivity() {
this.$Request.getT('/app/invite/selectInviteAwardByUserId').then(res => {
if (res.code == 0) {
if (res.data) {
this.inviteAwardId = res.data.inviteAwardId
this.getPeopNum = res.data.inviteCount
this.getActivityrule()
}
}
})
},
//
getActivityrule() {
this.$Request.getT('/app/invite/selectInviteAwardList', {
page: 1,
limit: 100
}).then(res => {
if (res.code == 0) {
if (res.data) {
this.rlueList = res.data.records
this.rlueIndex = this.rlueList.findIndex(item => item.inviteAwardId === this
.inviteAwardId)
this.getActivityList()
}
}
})
},
//
getActivityList() {
this.$Request.getT('/app/invite/selectInviteUserListByUserId').then(res => {
if (res.code == 0) {
if (res.data) {
this.nowPeopNum = res.data.length
this.getPeopList = res.data
this.getUserPeopNum = Number(this.getPeopNum) - Number(res.data.length)
}
}
})
},
}
}
</script>
<style lang="scss">
.nngyqngmIx {
background-color: #F22947;
position: relative;
}
page {
background-color: #f8cfc3;
}
.left_viewimage {
width: 50rpx;
height: 50rpx;
position: absolute;
top: 60rpx;
left: 40rpx;
z-index: 99;
}
.bg {
width: 100%;
position: absolute;
top: 0;
left: 0;
}
.iRgyqeOdqI {
width: 100%;
position: absolute;
top: 0;
left: 0;
}
.iRgyqeOdqI-title {
width: 100%;
text-align: center;
font-size: 78rpx;
font-weight: bold;
color: #FFF4E4;
text-shadow: 0rpx 6rpx 9rpx rgba(118, 4, 17, 0.26);
margin-top: 40rpx;
}
.iRgyqeOdqI-titles {
width: 100%;
text-align: center;
font-size: 100rpx;
font-weight: bold;
color: #FFF4E4;
text-shadow: 0rpx 6rpx 9rpx rgba(118, 4, 17, 0.26);
}
.iRgyqeOdqI-hy {
width: 100%;
height: auto;
margin-top: 40rpx;
.iRgyqeOdqI-hy-box {
padding: 40rpx 0;
width: 615rpx;
height: 100%;
background: linear-gradient(0deg, #FBEDCC 0%, #FFF7F0 98%);
border-radius: 48rpx 48rpx 24rpx 24rpx;
.iRgyqeOdqI-hy-box-title1 {
width: 90%;
margin: 0 auto;
text-align: center;
color: #F22947;
font-size: 30rpx;
font-weight: bold;
span {
font-size: 54rpx;
}
}
.iRgyqeOdqI-hy-box-title2 {
width: 100%;
text-align: center;
margin-top: 16rpx;
color: #F22947;
font-size: 26rpx;
}
.iRgyqeOdqI-hy-box-peop {
width: 550rpx;
height: auto;
background: linear-gradient(45deg, #f27e8c 0%, #fa3653 100%);
border-radius: 24rpx;
margin: 0 auto;
margin-top: 20rpx;
padding: 30rpx 0;
}
.iRgyqeOdqI-hy-box-peop-my {
width: 100%;
height: 90rpx;
image {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
}
}
.iRgyqeOdqI-hy-box-peop-title {
width: 100%;
text-align: center;
margin-top: 20rpx;
color: #ffffff;
font-weight: 500;
font-size: 24rpx;
}
.iRgyqeOdqI-hy-box-peop-list {
width: calc(100% - 60rpx);
margin: 0 auto;
margin-top: 30rpx;
}
.iRgyqeOdqI-hy-box-peop-list-i {
width: 32%;
flex-direction: column;
margin-bottom: 20rpx;
font-size: 24rpx;
.iRgyqeOdqI-hy-box-peop-list-ia {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
border: 1px dashed #ffffff;
}
.iRgyqeOdqI-hy-box-peop-list-it {
color: #ffffff;
margin-top: 14rpx;
}
}
.iRgyqeOdqI-hy-box-schedule {
width: 550rpx;
margin: 0 auto;
margin-top: 26rpx;
}
.iRgyqeOdqI-hy-box-schedulet {
width: 550rpx;
margin: 0 auto;
font-size: 22rpx;
span {
color: #F22A48;
font-size: 26rpx;
}
}
.iRgyqeOdqI-hy-box-peops {
width: 550rpx;
margin: 0 auto;
margin-top: 26rpx;
height: 50rpx;
}
.iRgyqeOdqI-hy-box-peopss {
width: 100%;
height: 100%;
.iRgyqeOdqI-hy-box-peopssi {
width: 100%;
height: 100%;
}
.iRgyqeOdqI-hy-box-peopssis {
width: 90%;
// width: 300rpx;
height: 100%;
background-color: green;
padding: 0 10rpx;
background: linear-gradient(-90deg, #FCE9A4 0%, #FDFBD4 100%);
border-radius: 25rpx;
image {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
.iRgyqeOdqI-hy-box-peopssit {
width: 80%;
font-size: 24rpx;
margin-left: 10rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}
.iRgyqeOdqI-btn {
width: 666rpx;
height: 98rpx;
background: linear-gradient(-90deg, #F22C49 0%, #FF7989 100%);
border: 1px solid #FFD4CF;
border-radius: 49rpx;
margin: 0 auto;
margin-top: 50rpx;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
}
.iRgyqeOdqI-lc {
width: 666rpx;
height: 344rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
margin: 0 auto;
margin-top: 50rpx;
.iRgyqeOdqI-lc-title {
width: 434rpx;
height: 80rpx;
background: linear-gradient(90deg, #FF969B 0%, #FF345B 100%);
border-radius: 0rpx 0rpx 50rpx 50rpx;
margin: 0 auto;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
}
.iRgyqeOdqI-lc-ls {
width: calc(100% - 40rpx);
margin: 0 auto;
margin-top: 50rpx;
.iRgyqeOdqI-lc-ls-ir {
width: 26rpx;
height: 16rpx;
margin-top: 50rpx;
}
.iRgyqeOdqI-lc-ls-i {
width: 100rpx;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.iRgyqeOdqI-lc-ls-it {
width: 100%;
text-align: center;
font-size: 26rpx;
color: #9C2A2A;
font-weight: bold;
margin-top: 14rpx;
}
}
}
}
.iRgyqeOdqI-rule {
width: 666rpx;
height: auto;
background-color: #FFFFFF;
border-radius: 24rpx;
margin: 0 auto;
margin-top: 50rpx;
.iRgyqeOdqI-rule-title {
width: 434rpx;
height: 80rpx;
background: linear-gradient(90deg, #FF969B 0%, #FF345B 100%);
border-radius: 0rpx 0rpx 50rpx 50rpx;
margin: 0 auto;
color: #FFFFFF;
font-size: 32rpx;
font-weight: bold;
}
.iRgyqeOdqI-rule-list {
width: 626rpx;
height: auto;
margin: 0 auto;
margin-top: 40rpx;
padding-bottom: 20rpx;
}
.iRgyqeOdqI-rule-list-i {
padding: 18rpx 12rpx;
background-color: #FFF8E6;
border-radius: 14rpx;
margin-bottom: 30rpx;
image {
width: 106rpx;
height: 82rpx;
}
.iRgyqeOdqI-rule-list-i-r {
margin-left: 18rpx;
.iRgyqeOdqI-rule-list-i-r-t {
color: #9C2A2A;
font-size: 30rpx;
font-weight: bold;
}
.iRgyqeOdqI-rule-list-i-r-b {
font-size: 24rpx;
color: #9C2A2A;
font-weight: 500;
}
}
}
}
</style>

View File

@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img ZgyqRCsasY" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img Vgyqvunkwy" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (1).png" mode="widthFix"></image>
<image class="img oGEJgyqEDt" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_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>

196
me/setting/FdwbsxoKnh.vue Normal file
View File

@ -0,0 +1,196 @@
<template>
<view class="FdwbsxoKnh">
<view class="cu-form-group"
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<view class="title">手机号</view>
<input type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
<view class="cu-form-group"
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">验证码</text>
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
@confirm="toLogin" />
<button class="dwbCkbEBqX" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
</view>
<button class="qKdwbBRntC" @click="toLogin" :disabled="logining">立即换绑
</button>
</view>
</template>
<script>
// import listCell from '@/components/com-input';
export default {
components: {
// listCell
},
data() {
return {
mobile: '',
code: '',
logining: false,
sending: false,
sendTime: '获取验证码',
count: 60,
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
countDown() {
const {
count
} = this;
if (count === 1) {
this.count = 60;
this.sending = false;
this.sendTime = '获取验证码'
} else {
this.count = count - 1;
this.sending = true;
this.sendTime = count - 1 + '秒后重新获取';
setTimeout(this.countDown.bind(this), 1000);
}
},
sendMsg() {
const {
mobile
} = this;
if (!mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (mobile.length !== 11) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 1000
})
} else {
uni.showLoading({
title: '正在发送验证码...'
})
this.$u.get('/app/Login/sendMsg/' + mobile + '/login').then(res => {
if (res.code === 0) {
this.sending = true;
uni.showToast({
title: '验证码发送成功请注意查收',
icon: 'none',
duration: 1000
})
this.countDown();
uni.hideLoading();
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
});
}
});
}
},
toLogin() {
const {
mobile,
code,
} = this;
if (!mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (code.length == 0) {
uni.showToast({
title: '请输入验证码',
icon: 'none',
duration: 1000
})
} else {
this.logining = true;
uni.showLoading({
title: '更换中...'
})
this.$u.post('/app/user/updatePhone?phone=' + mobile + '&msg=' + code).then(res => {
if (res.code === 0) {
// this.$queue.remove('invitation');
// uni.setStorageSync('token', res.token)
// uni.setStorageSync('userId', res.userId)
// uni.setStorageSync('mobile', res.mobile)
uni.showToast({
title: '更换成功',
icon: 'none'
})
setTimeout(function() {
uni.navigateBack()
}, 1000)
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '更换失败',
content: res.msg
});
}
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #ffffff;
}
.dwbCkbEBqX {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #ff7581;
}
.FdwbsxoKnh {
top: 0;
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.qKdwbBRntC {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70px;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
</style>

View File

@ -17,7 +17,6 @@
<button class="confirm-btn" @click="toLogin" :disabled="logining">立即换绑
</button>
</view>
</view>
</template>
<script>

View File

@ -29,6 +29,7 @@
<view>退出登录</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<view class="version" style="position: absolute;bottom: 50rpx;left: 0;right: 0;margin: auto;text-align: center;color: #666;">{{ version }}版本</view>
</view>
</template>
@ -36,11 +37,22 @@
export default {
data() {
return {
version: null,
}
},
onLoad() {
const systemInfo = uni.getSystemInfoSync();
//#ifdef APP-PLUS
this.version = systemInfo.appWgtVersion;
//#endif
// #ifdef H5
this.version = systemInfo.appVersion;
// #endif
console.log(this.version,'版本号');
// plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
// console.log(widgetInfo)
// this.version = widgetInfo.version
// })
},
methods: {
goNav(e) {

View File

@ -104,7 +104,7 @@
uni.removeStorageSync('isVIP')
setTimeout(function() {
uni.switchTab({
url: '/pages/me/index'
url: '/pages/iSiAnfghCC/abKTySghjA'
})
}, 1500)
}

View File

@ -1,21 +1,38 @@
<template>
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1 ">
<view style="font-size: 28upx;" v-html="content"></view>
<view class="btn-box u-flex u-row-center" v-if="!isLogin">
<view class="btn cancel" @click="cancel">拒绝</view>
<view class="btn" @click="back">同意</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
content:''
data() {
return {
content: '',
isLogin:false
}
},
},
onLoad() {
this.getGuize();
this.isLogin=uni.getStorageSync('token')?true:false
},
methods: {
getGuize(){
methods: {
cancel(){
// #ifdef H5
uni.navigateBack()
// #endif
// #ifdef APP
plus.runtime.quit();
// #endif
},
back(){
uni.navigateBack()
},
getGuize() {
this.$u.get('app/common/type/155').then(res => {
this.content = res.data.value
});
@ -24,8 +41,25 @@
}
</script>
<style>
page {
<style scoped>
.btn {
width: 100%;
height: 42px;
line-height: 42px;
border-radius: 30px;
background: #ff7581;
color: #ffffff;
text-align: center;
}
.btn-box{
gap: 20px;
padding: 30rpx 130rpx;
}
.cancel{
background-color: #eee;
color: #999;
}
page{
/* background: #1c1b20; */
}
</style>
</style>

View File

@ -1,6 +1,10 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<view style="line-height: 26px;padding: 32upx;" class="home1 ">
<view style="font-size: 28upx;" v-html="content"></view>
<view class="btn-box u-flex u-row-center" v-if="!isLogin">
<view class="btn cancel" @click="cancel">拒绝</view>
<view class="btn" @click="back">同意</view>
</view>
</view>
</template>
@ -8,13 +12,26 @@
export default {
data() {
return {
content:''
content:'',
isLogin:false
}
},
onLoad() {
this.getGuize();
this.isLogin=uni.getStorageSync('token')?true:false
},
methods: {
cancel(){
// #ifdef H5
uni.navigateBack()
// #endif
// #ifdef APP
plus.runtime.quit();
// #endif
},
back(){
uni.navigateBack()
},
getGuize(){
// this.$Request.getT('/agreement/find?id=1').then(res =>{
// if(res.status === 0){
@ -30,7 +47,24 @@
}
</script>
<style>
<style scoped>
.btn {
width: 100%;
height: 42px;
line-height: 42px;
border-radius: 30px;
background: #ff7581;
color: #ffffff;
text-align: center;
}
.btn-box{
gap: 20px;
padding: 30rpx 130rpx;
}
.cancel{
background-color: #eee;
color: #999;
}
page{
/* background: #1c1b20; */
}

BIN
me/static/invite/bg1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
me/static/invite/rule.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
me/static/invite/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
me/static/invite/top-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

View File

@ -5,14 +5,14 @@
<view class="money-top">
<image src="../../static/images/me/moneyBanner.png" mode=""></image>
<view class="money-top-title">
当前剩余金
当前剩余金
</view>
<view class="money-top-money">
{{formatNumber(moneyNum)}}
</view>
</view>
<view @click="goNav('/me/wallet/mingxi')" class="money-bto flex align-center justify-between">
明细
<view @click="goNav('/me/wallet/wallet_detail')" class="money-bto flex align-center justify-between">
明细
<u-icon name="arrow-right" color="#ff7581" size="40"></u-icon>
</view>
</view>
@ -41,7 +41,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>

View File

@ -10,15 +10,15 @@
</view>
<view class="list-box-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="loadMore">
<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]
@ -123,7 +123,7 @@
}
}
.loadmore {
.loadMore {
margin: 20rpx 0;
}
</style>

View File

@ -5,14 +5,14 @@
<view class="money-top">
<image src="../../static/images/me/moneyBanner.png" mode=""></image>
<view class="money-top-title">
当前剩余金
当前剩余金
</view>
<view class="money-top-money">
{{formatNumber(moneyNum)}}
</view>
</view>
<view @click="goNav('/me/wallet/mingxi')" class="money-bto 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>
@ -298,7 +298,7 @@
this.getMyMoney()
} else {
uni.navigateTo({
url: '/pages/login/bind'
url: '/pages/ghtwwlkXYG/MFkHiQghje'
});
}
});
@ -319,7 +319,7 @@
this.getMyMoney()
} else {
uni.navigateTo({
url: '/pages/login/bind'
url: '/pages/ghtwwlkXYG/MFkHiQghje'
});
}
});

17
other/about/about.vue Normal file
View File

@ -0,0 +1,17 @@
<template>
<view>
关于我们
</view>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="scss" scoped></style>

139
other/address/address.vue Normal file
View File

@ -0,0 +1,139 @@
<template>
<view>
<view class="item" v-for="(res, index) in siteList" :key="res.id">
<view class="top">
<view class="name">{{ res.name }}</view>
<view class="phone">{{ res.phone }}</view>
<view class="tag">
<text v-for="(item, index) in res.tag" :key="index" :class="{red:item.tagText=='默认'}">{{ item.tagText }}</text>
</view>
</view>
<view class="bottom">
广东省深圳市宝安区 自由路66号
<u-icon name="edit-pen" :size="40" color="#999999"></u-icon>
</view>
</view>
<view class="addSite" @tap="toAddSite">
<view class="add">
<u-icon name="plus" color="#ffffff" class="icon" :size="30"></u-icon>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
siteList: []
};
},
onLoad() {
this.getData();
},
methods: {
getData() {
this.siteList = [
{
id: 1,
name: '游X',
phone: '183****5523',
tag: [
{
tagText: '默认'
},
{
tagText: '家'
}
],
site: '广东省深圳市宝安区 自由路66号'
},
{
id: 2,
name: '李XX',
phone: '183****5555',
tag: [
{
tagText: '公司'
}
],
site: '广东省深圳市宝安区 翻身路xx号'
},
{
id: 3,
name: '王YY',
phone: '153****5555',
tag: [],
site: '广东省深圳市宝安区 平安路13号'
}
];
},
toAddSite(){
uni.navigateTo({
url: '/pages/template/address/addSite'
});
}
}
};
</script>
<style lang="scss" scoped>
.item {
padding: 40rpx 20rpx;
.top {
display: flex;
font-weight: bold;
font-size: 34rpx;
.phone {
margin-left: 60rpx;
}
.tag {
display: flex;
font-weight: normal;
align-items: center;
text {
display: block;
width: 60rpx;
height: 34rpx;
line-height: 34rpx;
color: #ffffff;
font-size: 20rpx;
border-radius: 6rpx;
text-align: center;
margin-left: 30rpx;
background-color:rgb(49, 145, 253);
}
.red{
background-color:red
}
}
}
.bottom {
display: flex;
margin-top: 20rpx;
font-size: 28rpx;
justify-content: space-between;
color: #999999;
}
}
.addSite {
display: flex;
justify-content: space-around;
width: 600rpx;
line-height: 100rpx;
position: absolute;
bottom: 30rpx;
left: 80rpx;
background-color: red;
border-radius: 60rpx;
font-size: 30rpx;
.add{
display: flex;
align-items: center;
color: #ffffff;
.icon{
margin-right: 10rpx;
}
}
}
</style>

1206
other/blogger/blogger.vue Normal file

File diff suppressed because it is too large Load Diff

800
other/blogger/details.vue Normal file
View File

@ -0,0 +1,800 @@
<template>
<view class="template-details tn-safe-area-inset-bottom">
<!-- 顶部自定义导航 -->
<tn-nav-bar fixed alpha customBack>
<view slot="back" class='tn-custom-nav-bar__back'
@click="goBack">
<text class='icon tn-icon-left'></text>
<text class='icon tn-icon-home-capsule-fill'></text>
</view>
</tn-nav-bar>
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<!-- 图文信息 -->
<block v-for="(item,index) in content" :key="index">
<view class="blogger__item">
<view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
<view class="justify__author__info" @click="tn('/circlePages/blogger_other')">
<view class="tn-flex tn-flex-row-center">
<view class="tn-flex tn-flex-row-center tn-flex-col-center">
<view class="">
<tn-avatar
class=""
shape="circle"
:src="item.userAvatar"
size="lg">
</tn-avatar>
</view>
<view class="tn-padding-right tn-text-ellipsis">
<view class="tn-padding-right tn-padding-left-sm tn-text-bold tn-text-lg">{{ item.userName }}</view>
<view class="tn-padding-right tn-padding-left-sm tn-padding-top-xs tn-color-gray">{{ item.date }}</view>
</view>
</view>
</view>
</view>
<view class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
<!-- 既然都点到详情里面了加个关注按钮呗 -->
<text class="tn-bg-brown--light tn-round tn-text-df tn-text-bold tn-color-brown" style="padding: 10rpx 24rpx;">+ 关注</text>
</view>
</view>
<view class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left">
<view v-for="(label_item,label_index) in item.label" :key="label_index" class="blogger__desc__label tn-float-left tn-margin-right tn-bg-gray--light tn-round tn-text-sm tn-text-bold">
<text class="blogger__desc__label--prefix">#</text>
<text class="tn-text-df">{{ label_item }}</text>
</view>
<!-- 不用限制长度了因为发布的时候限制长度了-->
<text v-if="!item.label || item.label.length < 4" class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.desc }}</text>
</view>
<!-- 内容太多疲劳了-->
<!-- <view
v-if="item.content"
class="blogger__content"
:id="`blogger__content--${index}`"
>
<view
class="blogger__content__data clamp-text-2">
{{ item.content }}
</view>
</view> -->
<block v-if="item.mainImage">
<view v-if="[1,2,4].indexOf(item.mainImage.length) != -1" class="tn-padding-top-xs">
<image v-for="(image_item,image_index) in item.mainImage" :key="image_index"
class="blogger__main-image"
:class="{
'blogger__main-image--1 tn-margin-bottom-sm': item.mainImage.length === 1,
'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.mainImage.length === 2 || item.mainImage.length === 4
}"
:src="image_item"
mode="aspectFill"
></image>
</view>
<view v-else class="tn-padding-top-xs">
<tn-grid hoverClass="none" :col="3">
<block v-for="(image_item,image_index) in item.mainImage" :key="image_index">
<!-- #ifndef MP-WEIXIN -->
<tn-grid-item style="width: 30%;margin: 10rpx;">
<image
class="blogger__main-image blogger__main-image--3"
:src="image_item"
mode="aspectFill"
></image>
</tn-grid-item>
<!-- #endif-->
<!-- #ifdef MP-WEIXIN -->
<tn-grid-item style="width: 30%;margin: 10rpx;">
<image
class="blogger__main-image blogger__main-image--3"
:src="image_item"
mode="aspectFill"
></image>
</tn-grid-item>
<!-- #endif-->
</block>
</tn-grid>
</view>
</block>
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
<view class="justify-content-item tn-flex tn-flex-col-center">
<view style="margin-right: 10rpx;">
<tn-avatar-group :lists="item.viewUser.latestUserAvatar" size="sm"></tn-avatar-group>
</view>
<text class="tn-color-gray">{{ item.viewUser.viewUserCount }}</text>
</view>
<view class="justify-content-item tn-color-gray tn-text-center">
<view class="">
<text class="blogger__count-icon tn-icon-footprint"></text>
<text class="tn-padding-right">{{ item.collectionCount }}</text>
<text class="blogger__count-icon tn-icon-message"></text>
<text class="tn-padding-right">{{ item.commentCount }}</text>
<text class="blogger__count-icon tn-icon-like"></text>
<text class="">{{ item.likeCount }}</text>
</view>
</view>
</view>
</view>
<!-- 边距间隔 -->
<!-- <view class="tn-strip-bottom" v-if="index != content.length - 1"></view> -->
</block>
<!-- 按钮-->
<view class="tn-flex tn-flex-row-between" style="margin: 40rpx 0 60rpx 0;">
<view class="tn-flex-1 justify-content-item tn-margin-xs tn-text-center">
<tn-button backgroundColor="#00FFC6" padding="40rpx 0" width="90%" shadow fontBold>
<text class="tn-icon-like-lack tn-padding-right-xs tn-color-black"></text>
<text class="tn-color-black"> </text>
</tn-button>
</view>
<view class="tn-flex-1 justify-content-item tn-margin-xs tn-text-center">
<tn-button backgroundColor="#FFF00D" padding="40rpx 0" width="90%" shadow fontBold open-type="share">
<text class="tn-icon-share-triangle tn-padding-right-xs tn-color-black"></text>
<text class="tn-color-black"> </text>
</tn-button>
</view>
</view>
</view>
<!-- 评论 -->
<view class="tn-margin" style="padding-bottom: 120rpx;">
<!-- 图标logo/头像 -->
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xl" @click="tn('/circlePages/blogger_other')">
<view class="justify-content-item">
<view class="tn-flex tn-flex-col-center tn-flex-row-left">
<view class="logo-pic tn-shadow">
<view class="logo-image">
<view class="tn-shadow-blur" style="background-image:url('https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg');width: 60rpx;height: 60rpx;background-size: cover;">
</view>
</view>
</view>
<view class="tn-padding-right tn-padding-left-sm">
<view class="tn-padding-right tn-text-df tn-text-bold tn-color-black">
抓住那只高产母猪
</view>
<view class="tn-padding-right tn-text-ellipsis tn-text-xs tn-color-gray" style="padding-top: 5rpx;">
2024年5月26日
</view>
</view>
</view>
</view>
<view class="justify-content-item tn-flex-row-center tn-flex-col-center tn-color-gray">
<view class="tn-text-center">
<text class="tn-icon-like-lack tn-padding-xs"></text>
</view>
<view class="tn-text-center">
<text class="tn-text-xs">26</text>
</view>
</view>
</view>
<view class="" style="margin: 20rpx 30rpx 30rpx 80rpx;">
求打卡地点
</view>
<view class="tn-bg-gray--light tn-padding-sm" style="margin: 20rpx 30rpx 30rpx 80rpx;border-radius: 10rpx;">
<text class="tn-text-bold tn-padding-right-xs">博主回复: </text>
<text style="line-height: 40rpx;">保密</text>
<view class="tn-flex tn-flex-row-between tn-margin-top-xs">
<view class="justify-content-item tn-text-xs tn-color-gray" style="padding-top: 5rpx;">
2024年5月26日
</view>
<view class="justify-content-item tn-text-xs tn-color-gray">
<text class="tn-padding-xs">16</text>
<text class="tn-icon-like-lack"></text>
</view>
</view>
</view>
<!-- 评论2-->
<!-- 图标logo/头像 -->
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xl" @click="tn('/circlePages/blogger_other')">
<view class="justify-content-item">
<view class="tn-flex tn-flex-col-center tn-flex-row-left">
<view class="logo-pic tn-shadow">
<view class="logo-image">
<view class="tn-shadow-blur" style="background-image:url('https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg');width: 60rpx;height: 60rpx;background-size: cover;">
</view>
</view>
</view>
<view class="tn-padding-right tn-padding-left-sm">
<view class="tn-padding-right tn-text-df tn-text-bold tn-color-black">
北染陌人
</view>
<view class="tn-padding-right tn-text-ellipsis tn-text-xs tn-color-gray" style="padding-top: 5rpx;">
2024年5月25日
</view>
</view>
</view>
</view>
<view class="justify-content-item tn-flex-row-center tn-flex-col-center tn-color-gray">
<view class="tn-text-center">
<text class="tn-icon-like-lack tn-padding-xs"></text>
</view>
<view class="tn-text-center">
<text class="tn-text-xs">68</text>
</view>
</view>
</view>
<view class="" style="margin: 20rpx 30rpx 30rpx 80rpx;">
求摄影师微信谢谢
</view>
<!-- 评论3-->
<!-- 图标logo/头像 -->
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xl" @click="tn('/circlePages/blogger_other')">
<view class="justify-content-item">
<view class="tn-flex tn-flex-col-center tn-flex-row-left">
<view class="logo-pic tn-shadow">
<view class="logo-image">
<view class="tn-shadow-blur" style="background-image:url('https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg');width: 60rpx;height: 60rpx;background-size: cover;">
</view>
</view>
</view>
<view class="tn-padding-right tn-padding-left-sm">
<view class="tn-padding-right tn-text-df tn-text-bold tn-color-black">
原来是吖释鸭
</view>
<view class="tn-padding-right tn-text-ellipsis tn-text-xs tn-color-gray">
2024年5月25日
</view>
</view>
</view>
</view>
<view class="justify-content-item tn-flex-row-center tn-flex-col-center tn-color-gray">
<view class="tn-text-center">
<text class="tn-icon-like-lack tn-padding-xs"></text>
</view>
<view class="tn-text-center">
<text class="tn-text-xs">43</text>
</view>
</view>
</view>
<view class="" style="margin: 20rpx 30rpx 30rpx 80rpx;">
吃瓜群众到此一游阿巴阿巴
</view>
</view>
<view class="tabbar footerfixed dd-glass">
<view class="tn-flex tn-flex-row-between tn-flex-col-center">
<view class="justify-content-item tn-margin-top">
<view class="tn-flex tn-flex-row-center tn-flex-col-center">
<!-- <view class="tn-flex tn-flex-row-center tn-padding-right tn-padding-left">
<text class="tn-icon-emoji-good tn-text-xxl"></text>
</view> -->
<view class="tn-flex tn-flex-row-center tn-flex-col-center tn-padding-right tn-padding-left-sm">
<view class="avatar-all">
<view class="tn-shadow-blur" style="background-image:url('https://resource.tuniaokj.com/images/blogger/onepiece-1.jpg');width: 60rpx;height: 60rpx;background-size: cover;">
</view>
</view>
</view>
<view class="topic__info__item__input tn-flex tn-flex-direction-row tn-flex-nowrap tn-flex-col-center tn-flex-row-left">
<view class="topic__info__item__input__left-icon">
<view class="tn-icon-emoji-good"></view>
</view>
<view class="topic__info__item__input__content">
<input maxlength="20" placeholder-class="input-placeholder" :cursor-spacing="18" placeholder="不说点啥子吗?" />
</view>
</view>
</view>
</view>
<view class="justify-content-item tn-flex-row-center tn-flex-col-center tn-margin-top tn-margin-right">
<view class="topic__info__item__sure">
<view class="tn-flex-1 justify-content-item tn-text-center">
<tn-button shape="round" backgroundColor="tn-cool-bg-color-15--reverse" width="100%" shadow>
<text class="tn-color-white" hover-class="tn-hover" :hover-stay-time="150">
</text>
</tn-button>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
export default {
name: 'TemplateDetails',
mixins: [template_page_mixin],
data(){
return {
content: [
/* {
userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg',
userName: '可我会像',
date: '2024年5月20日',
label: ['追剧达人','重生粉','UI框架'],
desc: '追剧比追人要轻松多了助你开发酷炫UI一臂之力',
content: '基础常用的布局元素,酷炫完善的配色体系,统一可增的图标 icon ,简便调用的功能组件,酷炫的前端页面,吖,编不下去了',
viewUser: {
latestUserAvatar: [
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'},
],
viewUserCount: 62
},
collectionCount: 439,
commentCount: 46,
likeCount: 83
},
{
userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg',
userName: '可我会像',
date: '2024年5月20日',
label: ['追剧达人','重生粉','UI框架'],
desc: '追剧比追人要轻松多了助你开发酷炫UI一臂之力',
content: '基础常用的布局元素,酷炫完善的配色体系,统一可增的图标 icon ,简便调用的功能组件,酷炫的前端页面,吖,编不下去了',
mainImage:[
'https://resource.tuniaokj.com/images/blogger/content_1.jpeg'
],
viewUser: {
latestUserAvatar: [
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'},
],
viewUserCount: 12
},
collectionCount: 902,
commentCount: 64,
likeCount: 83
},
{
userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg',
userName: '可我会像',
date: '2024年5月20日',
label: [],
desc: '',
content: '',
mainImage:[
'https://resource.tuniaokj.com/images/shop/computer2.jpg',
'https://resource.tuniaokj.com/images/shop/prototype2.jpg',
],
viewUser: {
latestUserAvatar: [
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'},
],
viewUserCount: 56
},
collectionCount: 431,
commentCount: 26,
likeCount: 84
},
{
userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg',
userName: '可我会像',
date: '2024年5月20日',
label: ['追剧达人','重生粉'],
desc: '追剧比追人要轻松多了',
content: '基础常用的布局元素,酷炫完善的配色体系,统一可增的图标 icon ,简便调用的功能组件,酷炫的前端页面,吖,编不下去了 基础常用的布局元素,酷炫完善的配色体系,统一可增的图标 icon ,简便调用的功能组件,酷炫的前端页面,吖,编不下去了',
mainImage:[
'https://resource.tuniaokj.com/images/swiper/swiper2.jpg',
'https://resource.tuniaokj.com/images/swiper/swiper3.jpg',
'https://resource.tuniaokj.com/images/swiper/swiper4.jpg',
],
viewUser: {
latestUserAvatar: [
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'},
],
viewUserCount: 231
},
collectionCount: 780,
commentCount: 89,
likeCount: 82
},
{
userAvatar: 'https://resource.tuniaokj.com/images/blogger/content_1.jpeg',
userName: '可我会像',
date: '2024年5月20日',
label: ['追剧达人','链接'],
desc: 'https://www.yuque.com/tuniao',
mainImage:[
'https://resource.tuniaokj.com/images/shop/watch1.jpg',
'https://resource.tuniaokj.com/images/shop/watch2.jpg',
'https://resource.tuniaokj.com/images/shop/pillow2.jpg',
'https://resource.tuniaokj.com/images/shop/pillow.jpg',
],
viewUser: {
latestUserAvatar: [
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'},
],
viewUserCount: 28
},
collectionCount: 432,
commentCount: 33,
likeCount: 12
}, */
{
userAvatar: 'https://resource.tuniaokj.com/images/blogger/blogger_beibei.jpg',
userName: '可我会像',
date: '2024年5月20日',
label: ['追剧达人','重生粉'],
desc: '追剧比追人要轻松多了',
mainImage:[
'https://resource.tuniaokj.com/images/blogger/y11.jpg',
'https://resource.tuniaokj.com/images/blogger/y33.jpg',
'https://resource.tuniaokj.com/images/blogger/y22.jpg',
'https://resource.tuniaokj.com/images/blogger/y44.jpg',
'https://resource.tuniaokj.com/images/blogger/y55.jpg',
],
viewUser: {
latestUserAvatar: [
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'},
{src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'},
],
viewUserCount: 65
},
collectionCount: 265,
commentCount: 22,
likeCount: 102
}
],
}
},
methods: {
//
tn(e) {
uni.navigateTo({
url: e,
});
},
}
}
</script>
<style lang="scss" scoped>
/* 胶囊*/
.tn-custom-nav-bar__back {
width: 100%;
height: 100%;
position: relative;
display: flex;
justify-content: space-evenly;
align-items: center;
box-sizing: border-box;
background-color: rgba(0, 0, 0, 0.15);
border-radius: 1000rpx;
border: 1rpx solid rgba(255, 255, 255, 0.5);
color: #FFFFFF;
font-size: 18px;
.icon {
display: block;
flex: 1;
margin: auto;
text-align: center;
}
&:before {
content: " ";
width: 1rpx;
height: 110%;
position: absolute;
top: 22.5%;
left: 0;
right: 0;
margin: auto;
transform: scale(0.5);
transform-origin: 0 0;
pointer-events: none;
box-sizing: border-box;
opacity: 0.7;
background-color: #FFFFFF;
}
}
/* 文章内容 start*/
.blogger {
&__item {
padding: 30rpx;
}
&__author {
&__btn {
margin-right: -12rpx;
padding: 0 20rpx;
}
}
&__desc {
line-height: 55rpx;
&__label {
padding: 0 20rpx;
margin: 0rpx 18rpx 0 0;
&--prefix {
color: #00FFC8;
padding-right: 10rpx;
}
}
&__content {
}
}
&__content {
margin-top: 18rpx;
padding-right: 18rpx;
&__data {
line-height: 46rpx;
text-align: justify;
overflow: hidden;
transition: all 0.25s ease-in-out;
}
&__status {
margin-top: 10rpx;
font-size: 26rpx;
color: #82B2FF;
}
}
&__main-image {
border-radius: 16rpx;
&--1 {
max-width: 80%;
max-height: 300rpx;
}
&--2 {
max-width: 260rpx;
max-height: 260rpx;
}
&--3 {
height: 212rpx;
width: 100%;
}
}
&__count-icon {
font-size: 40rpx;
padding-right: 5rpx;
}
&__ad {
width: 100%;
height: 500rpx;
transform: translate3d(0px, 0px, 0px) !important;
::v-deep .uni-swiper-slide-frame {
transform: translate3d(0px, 0px, 0px) !important;
}
.uni-swiper-slide-frame {
transform: translate3d(0px, 0px, 0px) !important;
}
&__item {
position: absolute;
width: 100%;
height: 100%;
transform-origin: left center;
transform: translate3d(100%, 0px, 0px) scale(1) !important;
transition: transform 0.25s ease-in-out;
z-index: 1;
&--0 {
transform: translate3d(0%, 0px, 0px) scale(1) !important;
z-index: 4;
}
&--1 {
transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
z-index: 3;
}
&--2 {
transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
z-index: 2;
}
}
&__content {
border-radius: 40rpx;
width: 640rpx;
height: 500rpx;
overflow: hidden;
}
&__image {
width: 100%;
height: 100%;
}
}
}
/* 文章内容 end*/
/* 间隔线 start*/
.tn-strip-bottom {
width: 100%;
border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
}
/* 间隔线 end*/
/* 头像 start */
.logo-image {
width: 60rpx;
height: 60rpx;
position: relative;
}
.logo-pic {
background-size: cover;
background-repeat: no-repeat;
// background-attachment:fixed;
background-position: top;
box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 50%;
overflow: hidden;
// background-color: #FFFFFF;
}
/* 底部 start*/
.footerfixed{
position: fixed;
width: 100%;
bottom: 0;
z-index: 999;
background-color: rgba(255,255,255,0.5);
box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
}
.tabbar {
align-items: center;
min-height: 130rpx;
padding: 0;
height: calc(130rpx + env(safe-area-inset-bottom) / 2);
padding-bottom: calc(30rpx + env(safe-area-inset-bottom) / 2);
padding-left: 10rpx;
padding-right: 10rpx;
}
/* 毛玻璃*/
.dd-glass {
width: 100%;
backdrop-filter: blur(20rpx);
-webkit-backdrop-filter: blur(20rpx);
}
/* 头像*/
.avatar-all {
width: 60rpx;
height: 60rpx;
border: 4rpx solid rgba(255,255,255,0.05);
border-radius: 50%;
overflow: hidden;
box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
}
/* 内容*/
.topic {
position: relative;
height: 100%;
z-index: 1;
margin-bottom: 120rpx;
/* 表单信息 start */
&__info {
margin: 0 50rpx;
margin-top: 105rpx;
padding: 30rpx 51rpx;
border-radius: 20rpx;
background-color: rgba(255,255,255,1);
border: 2rpx solid rgba(255, 255, 255, 0.1);
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
&__item {
&__input {
width: 400rpx;
height: 60rpx;
border: 1rpx solid #C6D1D8;
border-radius: 39rpx;
&__left-icon {
width: 10%;
font-size: 44rpx;
margin-left: 20rpx;
margin-right: 5rpx;
color: #C6D1D8;
}
&__content {
width: 80%;
padding-left: 10rpx;
&--verify-code {
width: 56%;
}
input {
font-size: 30rpx;
color: #78909C;
// letter-spacing: 0.1em;
}
}
&__right-icon {
width: 10%;
font-size: 34rpx;
margin-right: 20rpx;
color: #78909C;
}
&__right-verify-code {
width: 34%;
margin-right: 20rpx;
}
}
&__button {
width: 100%;
height: 60rpx;
text-align: center;
font-size: 31rpx;
font-weight: bold;
line-height: 77rpx;
// text-indent: 1em;
border-radius: 100rpx;
color: #FFFFFF;
background-color: rgba(255,255,255,0.2);
// border: 2rpx solid #FFFFFF;
}
&__sure {
height: 60rpx;
width: 140rpx;
}
}
}
/* 表单信息 end */
/* 内容 end */
}
/deep/.input-placeholder {
font-size: 30rpx;
color: #C6D1D8;
}
</style>

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