index.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>活动</title>
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!--引入 element-ui 的样式,-->
  9. <link rel="stylesheet"
  10. href="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742018383195/element-ui.css">
  11. <!-- 必须先引入vue, 后使用element-ui -->
  12. <script
  13. src="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742017957144/vue.js"></script>
  14. <!-- 引入element 的组件库-->
  15. <script
  16. src="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742017747738/element-ui.js"></script>
  17. <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  18. <!-- <script src="js/vconsole.min.js"></script>
  19. <script>
  20. var vConsole = new window.VConsole();
  21. </script> -->
  22. </head>
  23. <style>
  24. body {
  25. margin: 0;
  26. padding: 0;
  27. }
  28. #box {
  29. width: 100vw;
  30. height: 100vh;
  31. box-sizing: border-box;
  32. }
  33. .lotteryPage {
  34. width: 100%;
  35. height: 620px;
  36. background: url('./img/lottery-bg.png');
  37. background-size: 100% 620px;
  38. background-repeat: no-repeat;
  39. position: relative;
  40. }
  41. .prize_content {
  42. padding: 267px 61px 0 60px;
  43. display: flex;
  44. flex-wrap: wrap;
  45. justify-content: center;
  46. gap: 10px;
  47. }
  48. .prize_item {
  49. width: 78px;
  50. height: 78px;
  51. background: url('./img/prize-bg.png');
  52. background-size: 78px 78px;
  53. background-repeat: no-repeat;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. flex-direction: column;
  58. font-weight: 400;
  59. font-size: 10px;
  60. color: #CC745A;
  61. box-sizing: border-box;
  62. }
  63. .prize_img {
  64. width: 48px;
  65. height: 48px;
  66. padding-bottom: 3px;
  67. }
  68. .lottery_btn {
  69. position: absolute;
  70. bottom: -14px;
  71. display: flex;
  72. flex-direction: column;
  73. align-items: center;
  74. width: 100%;
  75. }
  76. .btn_img {
  77. width: 290px;
  78. }
  79. .lottery_tip {
  80. text-align: center;
  81. font-size: 14px;
  82. color: #FFFFFF;
  83. font-weight: 600;
  84. line-height: 14px;
  85. }
  86. .rule {
  87. width: 100%;
  88. height: 509px;
  89. background: linear-gradient(180deg, #FF6C52 0%, #FFBA9B 100%);
  90. margin-top: -50px;
  91. padding: 65px 15px 40px;
  92. box-sizing: border-box;
  93. }
  94. .rule_body {
  95. height: 404px;
  96. background: #FEE8D0;
  97. border-radius: 20px;
  98. padding: 20px 15px;
  99. box-sizing: border-box;
  100. }
  101. .tabs {
  102. display: flex;
  103. justify-content: space-around;
  104. align-items: center;
  105. padding: 0 2px;
  106. margin: 0 auto;
  107. width: 255px;
  108. height: 34px;
  109. background: rgba(255, 125, 97, 0.2);
  110. border-radius: 17px 17px 17px 17px;
  111. }
  112. .tab_link {
  113. border: none;
  114. outline: none;
  115. cursor: pointer;
  116. transition: 0.3s;
  117. color: #FF765B;
  118. background: unset;
  119. width: 125px;
  120. height: 30px;
  121. border-radius: 17px
  122. }
  123. .tab_link:active {
  124. background: rgba(255, 125, 97, 0.2);
  125. }
  126. .tab_link.active {
  127. background: #FFFFFF;
  128. }
  129. .tab_content {
  130. p {
  131. font-weight: 400;
  132. font-size: 14px;
  133. color: #CB4E35;
  134. margin-top: 20px;
  135. }
  136. }
  137. .record_list {
  138. overflow-y: auto;
  139. height: 300px;
  140. margin-top: 18px;
  141. }
  142. .record_item {
  143. width: 315px;
  144. height: 72px;
  145. background: #FEDFC9;
  146. border-radius: 10px;
  147. padding: 9px 10px 8px;
  148. display: flex;
  149. align-items: center;
  150. margin: 0 auto 10px;
  151. box-sizing: border-box;
  152. }
  153. .record_img {
  154. width: 55px;
  155. height: 55px;
  156. border-radius: 10px;
  157. margin-right: 8px;
  158. }
  159. .get_btn {
  160. width: 72px;
  161. height: 30px;
  162. background: #FF4646;
  163. border-radius: 17px;
  164. font-size: 14px;
  165. color: #FFFFFF;
  166. margin-left: 30px;
  167. padding: 0;
  168. }
  169. .prize_name {
  170. font-size: 14px;
  171. font-weight: 500;
  172. color: #FF4646;
  173. }
  174. .prize_time {
  175. font-size: 12px;
  176. color: #FF6767;
  177. }
  178. .el-dialog {
  179. width: 335px;
  180. border-radius: 20px;
  181. }
  182. .el-dialog__header {
  183. text-align: center;
  184. }
  185. .el-dialog__title {
  186. font-weight: 500;
  187. font-size: 16px;
  188. color: #222222;
  189. }
  190. .el-dialog__body {
  191. height: 260px;
  192. overflow-y: auto;
  193. }
  194. .prize_form .el-form-item {
  195. padding: 0;
  196. }
  197. .prize_form .el-form-item__label {
  198. line-height: 20px;
  199. }
  200. .prize_form .el-input {
  201. width: 295px;
  202. }
  203. .prize_form .el-input__inner {
  204. text-align: left;
  205. }
  206. .prize_form .el-input.is-active .el-input__inner,
  207. .prize_form .el-input__inner:focus {
  208. border: 1px solid #FF4646;
  209. }
  210. .prize_form .el-textarea.is-active .el-textarea__inner,
  211. .prize_form .el-textarea__inner:focus {
  212. border: 1px solid #FF4646;
  213. }
  214. .el-radio__input.is-checked .el-radio__inner {
  215. border-color: #FF4646;
  216. background: #FF4646;
  217. }
  218. .el-radio__input.is-checked+.el-radio__label {
  219. color: #FF4646;
  220. }
  221. .el-select .el-input.is-focus .el-input__inner {
  222. border-color: #FF4646;
  223. }
  224. .dialog-footer {
  225. text-align: center;
  226. }
  227. .dialog-footer button {
  228. width: 100%;
  229. height: 46px;
  230. background: #FF4646;
  231. border-radius: 20px;
  232. font-weight: 500;
  233. font-size: 16px;
  234. color: #FFFFFF;
  235. border: none;
  236. }
  237. .prize_dialog {
  238. position: fixed;
  239. top: 0;
  240. left: 0;
  241. width: 100%;
  242. height: 100%;
  243. background-color: rgba(0, 0, 0, 0.5);
  244. /* 半透明黑色 */
  245. z-index: 1000;
  246. /* 确保遮罩层在顶部 */
  247. transition: opacity 0.5s ease;
  248. /* 可选:添加透明度过渡效果 */
  249. }
  250. .dialog-body {
  251. width: 100%;
  252. height: 100%;
  253. z-index: 1001;
  254. /* 确保遮罩层在顶部 */
  255. display: flex;
  256. flex-direction: column;
  257. align-items: center;
  258. justify-content: center;
  259. }
  260. .dialog-tip {
  261. width: 100%;
  262. height: 100px;
  263. }
  264. .dialog-bg {
  265. width: 295px;
  266. height: 251px;
  267. position: relative;
  268. }
  269. .prize-msg {
  270. position: absolute;
  271. text-align: center;
  272. }
  273. .money-title {
  274. font-weight: 500;
  275. font-size: 16px;
  276. color: #FF4E4E;
  277. padding-top: 90px;
  278. padding-bottom: 10px;
  279. }
  280. .money-content {
  281. margin-bottom: 30px;
  282. height: 60px;
  283. display: flex;
  284. justify-content: center;
  285. align-items: center;
  286. }
  287. .prize-money {
  288. font-weight: bold;
  289. font-size: 60px;
  290. color: #FF4E4E;
  291. }
  292. .prize-unit {
  293. font-weight: 500;
  294. font-size: 16px;
  295. color: #FF4E4E;
  296. padding-left: 10px;
  297. padding-top: 28px;
  298. }
  299. .dialog-btn {
  300. width: 235px;
  301. height: 52px;
  302. margin-bottom: 10px;
  303. }
  304. .money-tip {
  305. font-weight: 400;
  306. font-size: 12px;
  307. color: #999999;
  308. margin-bottom: 15px;
  309. }
  310. .goods-img {
  311. width: 100px;
  312. height: 100px;
  313. margin: 70px 0 10px;
  314. }
  315. .goods-name {
  316. font-weight: 500;
  317. font-size: 16px;
  318. color: #222222;
  319. margin-bottom: 20px;
  320. }
  321. .dialog-close {
  322. width: 30px;
  323. height: 30px;
  324. margin-top: 20px;
  325. }
  326. .actives {
  327. border: 2px solid #df2727;
  328. border-radius: 15px;
  329. }
  330. .event_notice {
  331. width: 30px;
  332. height: 84px;
  333. background: rgba(255, 255, 255, 0.5);
  334. border-radius: 15px 0px 0px 15px;
  335. border: 1px solid #FFFFFF;
  336. font-weight: 500;
  337. font-size: 14px;
  338. color: #FF4E4E;
  339. position: absolute;
  340. right: 0;
  341. top: 20%;
  342. writing-mode: vertical-rl;
  343. text-align: center;
  344. padding-right: 4px;
  345. }
  346. .qrcode {
  347. width: 100vw;
  348. height: 100vh;
  349. box-sizing: border-box;
  350. display: flex;
  351. align-items: center;
  352. justify-content: center;
  353. flex-direction: column;
  354. }
  355. .qrcode-msg {
  356. text-align: center;
  357. font-size: 18px;
  358. }
  359. .alert_dialog {
  360. z-index: 999;
  361. position: fixed;
  362. top: 0;
  363. left: 0;
  364. width: 100%;
  365. }
  366. </style>
  367. <body>
  368. <div id="box">
  369. </div>
  370. <script>
  371. new Vue({
  372. el: '#box',
  373. data () {
  374. return {
  375. env: '',
  376. httpUrl: '',
  377. h5Type: null,
  378. bId: null,
  379. }
  380. },
  381. created () {
  382. this.bId = this.getQueryParam('bId')
  383. this.env = this.getQueryParam('env')
  384. this.h5Type = this.getQueryParam('h5Type')
  385. if (!this.env || this.env === 'prod') {
  386. this.httpUrl = 'https://wlapi.wefanbot.com'
  387. } else {
  388. this.httpUrl = 'http://test.wefanbot.com:18993'
  389. }
  390. localStorage.removeItem('openId')
  391. this.ifH5Type()
  392. },
  393. methods: {
  394. // 公众号授权,获取code
  395. getAuth () {
  396. // 获取url上的code
  397. let code = this.getQueryParam('code')
  398. if (code) {
  399. // 判断业务id是否生产环境业务id
  400. fetch(this.httpUrl + `/p/insuite/p/isProdId?id=${this.bId}`)
  401. .then(res => {
  402. return res.json()
  403. }).then(result => {
  404. let { data, msg } = result
  405. if (typeof data === 'boolean' && data) {
  406. this.httpUrl = 'https://wlapi.wefanbot.com'
  407. } else {
  408. this.httpUrl = 'http://test.wefanbot.com:18993'
  409. }
  410. this.getInfoByh5Code(this.getQueryParam('code'))
  411. })
  412. } else {
  413. let redirect_uri = window.location.href
  414. // code 不存在,走微信网页授权逻辑
  415. let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appId=wx99ec0d0828a4d2d3&redirect_uri=${redirect_uri}&scope=snsapi_userinfo&state=STATE#wechat_redirect`
  416. window.location.replace(url)
  417. }
  418. },
  419. getInfoByh5Code (code) {
  420. fetch(this.httpUrl + `/scrm/v1/mp-client/p/getInfoByh5Code?code=${code}&bId=${this.bId}`)
  421. .then(res => {
  422. return res.json()
  423. }).then(result => {
  424. let { data, code, msg } = result
  425. if (code === 1) {
  426. this.h5Type = data.h5Type
  427. localStorage.setItem('openId', data.openId)
  428. this.ifH5Type();
  429. }
  430. })
  431. },
  432. ifH5Type () {
  433. if (this.h5Type == 19 || this.h5Type == 30) {
  434. // 抽奖
  435. var currentQueryParams = window.location.search;
  436. window.location.replace('lottery.html' + currentQueryParams)
  437. } else if (this.h5Type == 20) {
  438. // 宝骏云海送祝福
  439. var currentQueryParams = window.location.search;
  440. window.location.replace('h5Type-20.html' + currentQueryParams)
  441. } else if (this.h5Type == 21) {
  442. // 活码
  443. var currentQueryParams = window.location.search;
  444. window.location.replace('live_code.html' + currentQueryParams)
  445. } else if (this.h5Type == 22) {
  446. // 红包兑换
  447. var currentQueryParams = window.location.search;
  448. window.location.replace('receiveMoney.html' + currentQueryParams)
  449. } else if (this.h5Type == 23) {
  450. // 会话列表
  451. var currentQueryParams = window.location.search;
  452. window.location.replace('sessionList.html' + currentQueryParams)
  453. } else if (this.h5Type == 24) {
  454. // 客户SOP提醒
  455. var currentQueryParams = window.location.search;
  456. window.location.replace('clientSopTip.html' + currentQueryParams)
  457. } else if (this.h5Type == 25) {
  458. // 客户SOP内容
  459. var currentQueryParams = window.location.search;
  460. window.location.replace('clientSop.html' + currentQueryParams)
  461. } else if (this.h5Type == 26) {
  462. // 群SOP提醒
  463. var currentQueryParams = window.location.search;
  464. window.location.replace('groupSopTip.html' + currentQueryParams)
  465. } else if (this.h5Type == 27) {
  466. // 群SOP内容
  467. var currentQueryParams = window.location.search;
  468. window.location.replace('groupSop.html' + currentQueryParams)
  469. } else if (this.h5Type == 28) {
  470. // 点亮五菱
  471. var currentQueryParams = window.location.search;
  472. window.location.replace('lightUpWl.html' + currentQueryParams)
  473. } else if (this.h5Type == 29) {
  474. // 车主筛选,试驾筛选,预约试驾
  475. var currentQueryParams = window.location.search;
  476. window.location.replace('carOwnerScreening.html' + currentQueryParams)
  477. } else if (this.h5Type == 31) {
  478. // 活动报名
  479. var currentQueryParams = window.location.search;
  480. window.location.replace('registrationActivity.html' + currentQueryParams)
  481. } else if (this.h5Type == 32) {
  482. // 核销
  483. var currentQueryParams = window.location.search;
  484. window.location.replace('signUp.html' + currentQueryParams)
  485. } else if (this.h5Type == 33) {
  486. // 跟进列表
  487. var currentQueryParams = window.location.search;
  488. window.location.replace('followUpList.html' + currentQueryParams)
  489. } else if (this.h5Type == 34) {
  490. // 客户画像
  491. var currentQueryParams = window.location.search;
  492. window.location.replace('userProfile.html' + currentQueryParams)
  493. } else if (!this.h5Type) {
  494. this.getAuth()
  495. }
  496. },
  497. // 截取url中的数据
  498. getQueryParam (paramName) {
  499. // 获取当前URL的查询字符串部分
  500. const queryString = window.location.search;
  501. // 创建一个URLSearchParams对象
  502. const urlParams = new URLSearchParams(queryString);
  503. // 返回指定参数的值,如果不存在则返回null
  504. return urlParams.get(paramName);
  505. },
  506. }
  507. })
  508. </script>
  509. </body>
  510. </html>