| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>活动</title>
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!--引入 element-ui 的样式,-->
- <link rel="stylesheet"
- href="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742018383195/element-ui.css">
- <!-- 必须先引入vue, 后使用element-ui -->
- <script
- src="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742017957144/vue.js"></script>
- <!-- 引入element 的组件库-->
- <script
- src="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742017747738/element-ui.js"></script>
- <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
- <!-- <script src="js/vconsole.min.js"></script>
- <script>
- var vConsole = new window.VConsole();
- </script> -->
- </head>
- <style>
- body {
- margin: 0;
- padding: 0;
- }
- #box {
- width: 100vw;
- height: 100vh;
- box-sizing: border-box;
- }
- .lotteryPage {
- width: 100%;
- height: 620px;
- background: url('./img/lottery-bg.png');
- background-size: 100% 620px;
- background-repeat: no-repeat;
- position: relative;
- }
- .prize_content {
- padding: 267px 61px 0 60px;
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- gap: 10px;
- }
- .prize_item {
- width: 78px;
- height: 78px;
- background: url('./img/prize-bg.png');
- background-size: 78px 78px;
- background-repeat: no-repeat;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- font-weight: 400;
- font-size: 10px;
- color: #CC745A;
- box-sizing: border-box;
- }
- .prize_img {
- width: 48px;
- height: 48px;
- padding-bottom: 3px;
- }
- .lottery_btn {
- position: absolute;
- bottom: -14px;
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 100%;
- }
- .btn_img {
- width: 290px;
- }
- .lottery_tip {
- text-align: center;
- font-size: 14px;
- color: #FFFFFF;
- font-weight: 600;
- line-height: 14px;
- }
- .rule {
- width: 100%;
- height: 509px;
- background: linear-gradient(180deg, #FF6C52 0%, #FFBA9B 100%);
- margin-top: -50px;
- padding: 65px 15px 40px;
- box-sizing: border-box;
- }
- .rule_body {
- height: 404px;
- background: #FEE8D0;
- border-radius: 20px;
- padding: 20px 15px;
- box-sizing: border-box;
- }
- .tabs {
- display: flex;
- justify-content: space-around;
- align-items: center;
- padding: 0 2px;
- margin: 0 auto;
- width: 255px;
- height: 34px;
- background: rgba(255, 125, 97, 0.2);
- border-radius: 17px 17px 17px 17px;
- }
- .tab_link {
- border: none;
- outline: none;
- cursor: pointer;
- transition: 0.3s;
- color: #FF765B;
- background: unset;
- width: 125px;
- height: 30px;
- border-radius: 17px
- }
- .tab_link:active {
- background: rgba(255, 125, 97, 0.2);
- }
- .tab_link.active {
- background: #FFFFFF;
- }
- .tab_content {
- p {
- font-weight: 400;
- font-size: 14px;
- color: #CB4E35;
- margin-top: 20px;
- }
- }
- .record_list {
- overflow-y: auto;
- height: 300px;
- margin-top: 18px;
- }
- .record_item {
- width: 315px;
- height: 72px;
- background: #FEDFC9;
- border-radius: 10px;
- padding: 9px 10px 8px;
- display: flex;
- align-items: center;
- margin: 0 auto 10px;
- box-sizing: border-box;
- }
- .record_img {
- width: 55px;
- height: 55px;
- border-radius: 10px;
- margin-right: 8px;
- }
- .get_btn {
- width: 72px;
- height: 30px;
- background: #FF4646;
- border-radius: 17px;
- font-size: 14px;
- color: #FFFFFF;
- margin-left: 30px;
- padding: 0;
- }
- .prize_name {
- font-size: 14px;
- font-weight: 500;
- color: #FF4646;
- }
- .prize_time {
- font-size: 12px;
- color: #FF6767;
- }
- .el-dialog {
- width: 335px;
- border-radius: 20px;
- }
- .el-dialog__header {
- text-align: center;
- }
- .el-dialog__title {
- font-weight: 500;
- font-size: 16px;
- color: #222222;
- }
- .el-dialog__body {
- height: 260px;
- overflow-y: auto;
- }
- .prize_form .el-form-item {
- padding: 0;
- }
- .prize_form .el-form-item__label {
- line-height: 20px;
- }
- .prize_form .el-input {
- width: 295px;
- }
- .prize_form .el-input__inner {
- text-align: left;
- }
- .prize_form .el-input.is-active .el-input__inner,
- .prize_form .el-input__inner:focus {
- border: 1px solid #FF4646;
- }
- .prize_form .el-textarea.is-active .el-textarea__inner,
- .prize_form .el-textarea__inner:focus {
- border: 1px solid #FF4646;
- }
- .el-radio__input.is-checked .el-radio__inner {
- border-color: #FF4646;
- background: #FF4646;
- }
- .el-radio__input.is-checked+.el-radio__label {
- color: #FF4646;
- }
- .el-select .el-input.is-focus .el-input__inner {
- border-color: #FF4646;
- }
- .dialog-footer {
- text-align: center;
- }
- .dialog-footer button {
- width: 100%;
- height: 46px;
- background: #FF4646;
- border-radius: 20px;
- font-weight: 500;
- font-size: 16px;
- color: #FFFFFF;
- border: none;
- }
- .prize_dialog {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- /* 半透明黑色 */
- z-index: 1000;
- /* 确保遮罩层在顶部 */
- transition: opacity 0.5s ease;
- /* 可选:添加透明度过渡效果 */
- }
- .dialog-body {
- width: 100%;
- height: 100%;
- z-index: 1001;
- /* 确保遮罩层在顶部 */
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .dialog-tip {
- width: 100%;
- height: 100px;
- }
- .dialog-bg {
- width: 295px;
- height: 251px;
- position: relative;
- }
- .prize-msg {
- position: absolute;
- text-align: center;
- }
- .money-title {
- font-weight: 500;
- font-size: 16px;
- color: #FF4E4E;
- padding-top: 90px;
- padding-bottom: 10px;
- }
- .money-content {
- margin-bottom: 30px;
- height: 60px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .prize-money {
- font-weight: bold;
- font-size: 60px;
- color: #FF4E4E;
- }
- .prize-unit {
- font-weight: 500;
- font-size: 16px;
- color: #FF4E4E;
- padding-left: 10px;
- padding-top: 28px;
- }
- .dialog-btn {
- width: 235px;
- height: 52px;
- margin-bottom: 10px;
- }
- .money-tip {
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- margin-bottom: 15px;
- }
- .goods-img {
- width: 100px;
- height: 100px;
- margin: 70px 0 10px;
- }
- .goods-name {
- font-weight: 500;
- font-size: 16px;
- color: #222222;
- margin-bottom: 20px;
- }
- .dialog-close {
- width: 30px;
- height: 30px;
- margin-top: 20px;
- }
- .actives {
- border: 2px solid #df2727;
- border-radius: 15px;
- }
- .event_notice {
- width: 30px;
- height: 84px;
- background: rgba(255, 255, 255, 0.5);
- border-radius: 15px 0px 0px 15px;
- border: 1px solid #FFFFFF;
- font-weight: 500;
- font-size: 14px;
- color: #FF4E4E;
- position: absolute;
- right: 0;
- top: 20%;
- writing-mode: vertical-rl;
- text-align: center;
- padding-right: 4px;
- }
- .qrcode {
- width: 100vw;
- height: 100vh;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- }
- .qrcode-msg {
- text-align: center;
- font-size: 18px;
- }
- .alert_dialog {
- z-index: 999;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- }
- </style>
- <body>
- <div id="box">
- </div>
- <script>
- new Vue({
- el: '#box',
- data () {
- return {
- env: '',
- httpUrl: '',
- h5Type: null,
- bId: null,
- }
- },
- created () {
- this.bId = this.getQueryParam('bId')
- this.env = this.getQueryParam('env')
- this.h5Type = this.getQueryParam('h5Type')
- if (!this.env || this.env === 'prod') {
- this.httpUrl = 'https://wlapi.wefanbot.com'
- } else {
- this.httpUrl = 'http://test.wefanbot.com:18993'
- }
- localStorage.removeItem('openId')
- this.ifH5Type()
- },
- methods: {
- // 公众号授权,获取code
- getAuth () {
- // 获取url上的code
- let code = this.getQueryParam('code')
- if (code) {
- // 判断业务id是否生产环境业务id
- fetch(this.httpUrl + `/p/insuite/p/isProdId?id=${this.bId}`)
- .then(res => {
- return res.json()
- }).then(result => {
- let { data, msg } = result
- if (typeof data === 'boolean' && data) {
- this.httpUrl = 'https://wlapi.wefanbot.com'
- } else {
- this.httpUrl = 'http://test.wefanbot.com:18993'
- }
- this.getInfoByh5Code(this.getQueryParam('code'))
- })
- } else {
- let redirect_uri = window.location.href
- // code 不存在,走微信网页授权逻辑
- let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appId=wx99ec0d0828a4d2d3&redirect_uri=${redirect_uri}&scope=snsapi_userinfo&state=STATE#wechat_redirect`
- window.location.replace(url)
- }
- },
- getInfoByh5Code (code) {
- fetch(this.httpUrl + `/scrm/v1/mp-client/p/getInfoByh5Code?code=${code}&bId=${this.bId}`)
- .then(res => {
- return res.json()
- }).then(result => {
- let { data, code, msg } = result
- if (code === 1) {
- this.h5Type = data.h5Type
- localStorage.setItem('openId', data.openId)
- this.ifH5Type();
- }
- })
- },
- ifH5Type () {
- if (this.h5Type == 19 || this.h5Type == 30) {
- // 抽奖
- var currentQueryParams = window.location.search;
- window.location.replace('lottery.html' + currentQueryParams)
- } else if (this.h5Type == 20) {
- // 宝骏云海送祝福
- var currentQueryParams = window.location.search;
- window.location.replace('h5Type-20.html' + currentQueryParams)
- } else if (this.h5Type == 21) {
- // 活码
- var currentQueryParams = window.location.search;
- window.location.replace('live_code.html' + currentQueryParams)
- } else if (this.h5Type == 22) {
- // 红包兑换
- var currentQueryParams = window.location.search;
- window.location.replace('receiveMoney.html' + currentQueryParams)
- } else if (this.h5Type == 23) {
- // 会话列表
- var currentQueryParams = window.location.search;
- window.location.replace('sessionList.html' + currentQueryParams)
- } else if (this.h5Type == 24) {
- // 客户SOP提醒
- var currentQueryParams = window.location.search;
- window.location.replace('clientSopTip.html' + currentQueryParams)
- } else if (this.h5Type == 25) {
- // 客户SOP内容
- var currentQueryParams = window.location.search;
- window.location.replace('clientSop.html' + currentQueryParams)
- } else if (this.h5Type == 26) {
- // 群SOP提醒
- var currentQueryParams = window.location.search;
- window.location.replace('groupSopTip.html' + currentQueryParams)
- } else if (this.h5Type == 27) {
- // 群SOP内容
- var currentQueryParams = window.location.search;
- window.location.replace('groupSop.html' + currentQueryParams)
- } else if (this.h5Type == 28) {
- // 点亮五菱
- var currentQueryParams = window.location.search;
- window.location.replace('lightUpWl.html' + currentQueryParams)
- } else if (this.h5Type == 29) {
- // 车主筛选,试驾筛选,预约试驾
- var currentQueryParams = window.location.search;
- window.location.replace('carOwnerScreening.html' + currentQueryParams)
- } else if (this.h5Type == 31) {
- // 活动报名
- var currentQueryParams = window.location.search;
- window.location.replace('registrationActivity.html' + currentQueryParams)
- } else if (this.h5Type == 32) {
- // 核销
- var currentQueryParams = window.location.search;
- window.location.replace('signUp.html' + currentQueryParams)
- } else if (this.h5Type == 33) {
- // 跟进列表
- var currentQueryParams = window.location.search;
- window.location.replace('followUpList.html' + currentQueryParams)
- } else if (this.h5Type == 34) {
- // 客户画像
- var currentQueryParams = window.location.search;
- window.location.replace('userProfile.html' + currentQueryParams)
- } else if (!this.h5Type) {
- this.getAuth()
- }
- },
- // 截取url中的数据
- getQueryParam (paramName) {
- // 获取当前URL的查询字符串部分
- const queryString = window.location.search;
- // 创建一个URLSearchParams对象
- const urlParams = new URLSearchParams(queryString);
- // 返回指定参数的值,如果不存在则返回null
- return urlParams.get(paramName);
- },
- }
- })
- </script>
- </body>
- </html>
|