duanshenglang 8 hónapja
szülő
commit
712f6a0e92
4 módosított fájl, 831 hozzáadás és 712 törlés
  1. BIN
      lottery.zip
  2. 671 639
      lottery/index.html
  3. 91 41
      lottery/registrationActivity.html
  4. 69 32
      lottery/signUp.html

BIN
lottery.zip


+ 671 - 639
lottery/index.html

@@ -19,15 +19,17 @@
 	</script> -->
 </head>
 <style>
-  body {
-    margin: 0;
-    padding: 0;
-  }
-  #box {
-    width: 100vw;
-    height: 100vh;
-    box-sizing: border-box;
-  }
+	body {
+		margin: 0;
+		padding: 0;
+	}
+
+	#box {
+		width: 100vw;
+		height: 100vh;
+		box-sizing: border-box;
+	}
+
 	.lotteryPage {
 		width: 100%;
 		height: 620px;
@@ -36,13 +38,15 @@
 		background-repeat: no-repeat;
 		position: relative;
 	}
+
 	.prize_content {
 		padding: 267px 61px 0 60px;
 		display: flex;
-    flex-wrap: wrap;
+		flex-wrap: wrap;
 		justify-content: center;
-    gap: 10px;
+		gap: 10px;
 	}
+
 	.prize_item {
 		width: 78px;
 		height: 78px;
@@ -50,37 +54,42 @@
 		background-size: 78px 78px;
 		background-repeat: no-repeat;
 		display: flex;
-    justify-content: center;
-    align-items: center;
-    flex-direction: column;
+		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;
+		height: 48px;
 		padding-bottom: 3px;
 	}
+
 	.lottery_btn {
 		position: absolute;
 		bottom: -14px;
 		display: flex;
-    flex-direction: column;
-    align-items: center;
-    width: 100%;
+		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;
+		font-size: 14px;
+		color: #FFFFFF;
+		font-weight: 600;
 		line-height: 14px;
 	}
+
 	.rule {
 		width: 100%;
 		height: 509px;
@@ -89,6 +98,7 @@
 		padding: 65px 15px 40px;
 		box-sizing: border-box;
 	}
+
 	.rule_body {
 		height: 404px;
 		background: #FEE8D0;
@@ -96,6 +106,7 @@
 		padding: 20px 15px;
 		box-sizing: border-box;
 	}
+
 	.tabs {
 		display: flex;
 		justify-content: space-around;
@@ -127,6 +138,7 @@
 	.tab_link.active {
 		background: #FFFFFF;
 	}
+
 	.tab_content {
 		p {
 			font-weight: 400;
@@ -135,11 +147,13 @@
 			margin-top: 20px;
 		}
 	}
+
 	.record_list {
 		overflow-y: auto;
 		height: 300px;
 		margin-top: 18px;
 	}
+
 	.record_item {
 		width: 315px;
 		height: 72px;
@@ -158,6 +172,7 @@
 		border-radius: 10px;
 		margin-right: 8px;
 	}
+
 	.get_btn {
 		width: 72px;
 		height: 30px;
@@ -179,65 +194,81 @@
 		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;
-  }
+		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-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;
+		border: 1px solid #FF4646;
 	}
+
 	.prize_form .el-textarea.is-active .el-textarea__inner,
 	.prize_form .el-textarea__inner:focus {
-			border: 1px solid #FF4646;
+		border: 1px solid #FF4646;
 	}
+
 	.el-radio__input.is-checked .el-radio__inner {
 		border-color: #FF4646;
-    background: #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;
-  }
+		text-align: center;
+	}
+
 	.dialog-footer button {
-    width: 100%;
-    height: 46px;
-    background: #FF4646;
-    border-radius: 20px;
-    font-weight: 500;
-    font-size: 16px;
-    color: #FFFFFF;
+		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;
@@ -251,6 +282,7 @@
 		transition: opacity 0.5s ease;
 		/* 可选:添加透明度过渡效果 */
 	}
+
 	.dialog-body {
 		width: 100%;
 		height: 100%;
@@ -320,6 +352,7 @@
 		color: #999999;
 		margin-bottom: 15px;
 	}
+
 	.goods-img {
 		width: 100px;
 		height: 100px;
@@ -338,10 +371,12 @@
 		height: 30px;
 		margin-top: 20px;
 	}
+
 	.actives {
 		border: 2px solid #df2727;
 		border-radius: 15px;
 	}
+
 	.event_notice {
 		width: 30px;
 		height: 84px;
@@ -358,19 +393,22 @@
 		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;
+		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;
+		font-size: 18px;
 	}
+
 	.alert_dialog {
 		z-index: 999;
 		position: fixed;
@@ -389,13 +427,14 @@
 		</div>
 		<el-alert v-if="showError" class="alert_dialog" :title="errorMsg" :closable="false" type="error" show-icon>
 		</el-alert>
-		<div v-if="(h5Type == 19 || h5Type == 30) && !qrCodeData.qrCode">
+		<div v-if="(h5Type == 19 && !qrCodeData.qrCode) || (h5Type == 30 && !qrCodeData.qrCode)">
 			<div class="lotteryPage">
 				<div class="event_notice" @click="handleRule">
 					<span>活动须知</span>
 				</div>
 				<div class="prize_content">
-					<div :class="['prize_item', { actives: isSpinning && index === currentIndex }]" v-for="(item, index) in prizesList" :key="index">
+					<div :class="['prize_item', { actives: isSpinning && index === currentIndex }]"
+						v-for="(item, index) in prizesList" :key="index">
 						<img class="prize_img" :src="item.img"></img>
 						<div>{{item.name}}</div>
 					</div>
@@ -408,8 +447,10 @@
 			<div class="rule">
 				<div class="rule_body">
 					<div class="tabs">
-						<Button class="tab_link" :class="{ 'active': activeName === 'tab1' }" @click="changeTab('tab1')">活动信息</Button>
-						<Button class="tab_link" :class="{ 'active': activeName === 'tab2' }" @click="changeTab('tab2')">抽奖记录</Button>
+						<Button class="tab_link" :class="{ 'active': activeName === 'tab1' }"
+							@click="changeTab('tab1')">活动信息</Button>
+						<Button class="tab_link" :class="{ 'active': activeName === 'tab2' }"
+							@click="changeTab('tab2')">抽奖记录</Button>
 					</div>
 					<div v-if="activeName === 'tab1'" class="tab_content record_list" v-html="activeMsg"></div>
 					<div v-if="activeName === 'tab2'" class="record_list">
@@ -419,38 +460,38 @@
 								<div class="prize_name">{{item.name}}</div>
 								<div class="prize_time">{{timeFormat(item.raffleTime)}}</div>
 							</div>
-							<el-button :disabled="item.status == -1 || item.status == 1" class="get_btn" @click="handleOpenForm(item.id)">{{item.status == 1 ? '已领取' : (item.status == -1 ? '审核中' : '领取')}}</el-button>
+							<el-button :disabled="item.status == -1 || item.status == 1" class="get_btn"
+								@click="handleOpenForm(item.id)">{{item.status == 1 ? '已领取' : (item.status == -1 ? '审核中'
+								: '领取')}}</el-button>
 						</div>
 					</div>
 				</div>
 			</div>
-		</div>
-		<!-- 奖励弹窗 -->
-		<div class="prize_dialog" v-if="showPrizeDialog">
-			<div class="dialog-body">
-				<img class="dialog-tip" src="./img/dialog-tip.png" />
-				<img class="dialog-bg" src="./img/dialog-bg.png" />
-				<div class="prize-msg" v-if="prizeData.acceptType === 2">
-					<div class="money-title">微信红包</div>
-					<div class="money-content">
-						<span class="prize-money">{{prizeData.money}}</span>
-						<span class="prize-unit">元</span>
+			<!-- 奖励弹窗 -->
+			<div class="prize_dialog" v-if="showPrizeDialog">
+				<div class="dialog-body">
+					<img class="dialog-tip" src="./img/dialog-tip.png" />
+					<img class="dialog-bg" src="./img/dialog-bg.png" />
+					<div class="prize-msg" v-if="prizeData.acceptType === 2">
+						<div class="money-title">微信红包</div>
+						<div class="money-content">
+							<span class="prize-money">{{prizeData.money}}</span>
+							<span class="prize-unit">元</span>
+						</div>
+						<img class="dialog-btn" src="./img/dialog-btn.png" @click="showPrizeDialog = false" />
+						<div class="money-tip">红包到账会有延迟情况,请以实际为准</div>
 					</div>
-					<img class="dialog-btn" src="./img/dialog-btn.png" @click="showPrizeDialog = false"/>
-					<div class="money-tip">红包到账会有延迟情况,请以实际为准</div>
-				</div>
-				<div class="prize-msg" v-if="prizeData.acceptType === 0 || prizeData.acceptType === 1">
-					<img class="goods-img" :src="prizeData.img" />
-					<div class="goods-name">{{prizeData.name}}</div>
-					<img class="dialog-btn" src="./img/dialog-btn.png" @click="showPrizeDialog = false" />
+					<div class="prize-msg" v-if="prizeData.acceptType === 0 || prizeData.acceptType === 1">
+						<img class="goods-img" :src="prizeData.img" />
+						<div class="goods-name">{{prizeData.name}}</div>
+						<img class="dialog-btn" src="./img/dialog-btn.png" @click="showPrizeDialog = false" />
+					</div>
+					<img class="dialog-close" src="./img/dialog-close.png" @click="showPrizeDialog = false" />
 				</div>
-				<img class="dialog-close" src="./img/dialog-close.png" @click="showPrizeDialog = false" />
 			</div>
 		</div>
 		<!-- 活动须知弹框 -->
-		<el-dialog
-			title="活动须知"
-			:visible.sync="showRuleDialog">
+		<el-dialog title="活动须知" :visible.sync="showRuleDialog">
 			<div>以下隐私协议是本产品对用户隐私保护的许诺,请您务必仔细阅读本协议,以了解我们关于管理您个人信息的情况。本隐私协议的全部条款属于本产品用户服务协议的重要部份之一。<br />
 				为了给您提供更准确、更有针对性的服务,本产品可能会以如下方式,使用您授权的个人信息。但本产品会以高度的勤勉义务对待这些信息,在未征得您许可的情况下,不会将这些信息对外公开或向第三方提供。<br />
 				请务必遵守《微信开放平台协议》、《微信公众平台协议》、《企业微信服务协议》、《企业微信隐私保护协议》、《微信商户号服务协议》、《微信外部链接内容管理规范》等微信相关管理规范,我们不承担因违反上述管理规范所导致的任何责任。<br />
@@ -482,10 +523,7 @@
 					<el-input v-model="form.phone" autocomplete="off"></el-input>
 				</el-form-item>
 				<el-form-item label="地区:">
-					<el-cascader
-						v-model="cityData"
-						:options="transformedData"
-						@change="handleChangeCity">
+					<el-cascader v-model="cityData" :options="transformedData" @change="handleChangeCity">
 					</el-cascader>
 				</el-form-item>
 				<el-form-item label="详细地址:">
@@ -500,14 +538,12 @@
 			</div>
 		</el-dialog>
 		<el-dialog :title="dialogTitle" :visible.sync="showTipDialog" :show-close="false" :close-on-click-modal="false">
-			<el-form :model="getInfoForm" class="prize_form"label-position="top">
+			<el-form :model="getInfoForm" class="prize_form" label-position="top">
 				<div v-if="preFormType">
 					<el-form-item label="手机号:">
-						<el-input v-model="getInfoForm.phone" autocomplete="off"
-						maxlength="11"
-						oninput="value=value.replace(/[^\d]/g,'')" 
-						@blur="$event => {getInfoForm.phone = Number($event.target.value) || '';}"
-						></el-input>
+						<el-input v-model="getInfoForm.phone" autocomplete="off" maxlength="11"
+							oninput="value=value.replace(/[^\d]/g,'')"
+							@blur="$event => {getInfoForm.phone = Number($event.target.value) || '';}"></el-input>
 					</el-form-item>
 					<el-form-item label="地址:">
 						<el-cascader v-model="cityData" :options="transformedData" @change="handleInfoCity">
@@ -515,11 +551,7 @@
 					</el-form-item>
 					<el-form-item label="意向车型:">
 						<el-select v-model="getInfoForm.intenModel" placeholder="请选择">
-							<el-option
-								v-for="item in allCarList"
-								:key="item"
-								:label="item"
-								:value="item">
+							<el-option v-for="item in allCarList" :key="item" :label="item" :value="item">
 							</el-option>
 						</el-select>
 					</el-form-item>
@@ -545,593 +577,593 @@
 		</el-dialog>
 	</div>
 	<script>
-    new Vue({
-        el: '#box',
-        data() {
-          return {
-          	env: '',
-						httpUrl: '',
-						h5Type: null,
-						qrCodeData: {
-							qrCode: '',
-							msg: '',
-						},
-						bId: null,
-						shareTitle: '',
-						shareDes: '',
-						shareCover: '',
-						prizesList: [],
-						useNum: null,
-						remainNum: null,
-						activeMsg: '',
-						lotteryRecords: [],
-						activeName: 'tab1',
-						showDialog: false,
-						form: {
-							name: '',
-							wxAccount: '',
-							phone: '',
-							province: '',
-							city: '',
-							address: '',
-							remark: '',
-							recordId: null,
-						},
-						transformedData: [],
-						cityData: '',
-						showTipDialog: false,
-						allCarList: [],
-						getInfoForm: {
-							buyCar: 1,
-							phone: '',
-							province: '',
-							city: '',	
-							intenModel: '',
-							car: '',
-						},
-						prizeData: {
-							acceptType: null,
-							name: '',
-							img: '',
-							money: '',
-							id: null
-						},
-						showPrizeDialog: false,
-						lotteryStatus: null,
-						currentIndex: 0, // 当前活动的格子索引
-						isSpinning: false,
-						intervalId: null,
-						showRuleDialog: false,
-						preFormType: null,
-						showError: false,
-						errorMsg: '',
-						dialogTitle: ""
-          }
-        },
-        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'
-					}
-					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.gerQwAuth(this.bId);
-									this.ifH5Type();
-								}
-							})
+		new Vue({
+			el: '#box',
+			data () {
+				return {
+					env: '',
+					httpUrl: '',
+					h5Type: null,
+					qrCodeData: {
+						qrCode: '',
+						msg: '',
 					},
-					ifH5Type () {
-						if (this.h5Type == 19 || this.h5Type == 30) {
-							if (this.getQueryParam('openId') || localStorage.getItem('openId')) {
-								if (!this.getQueryParam('externalUserid')) {
-									this.gerQwAuth(this.bId);
-								} else {
-									if (this.getQueryParam('externalUserid') === 'unknown') {
-										this.gerQwCode(this.bId);
-									} else {
-										this.raffleInfo();
-										this.raffleRecord()
-										this.getCityLevel()
-										this.getAllCar()
-										this.getQyWxSign()
-									}
-								}
-							} else {
-								// 走授权操作
-								this.getAuth();
-							}
-						} 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) {
-							this.getAuth()
-						}	
-					},
-					// 企微授权
-					gerQwAuth (bId) {
-						let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
-						fetch(this.httpUrl + `/p/insuite/p/getOAUrl?openId=${openId}&bId=${bId}`)
-              .then(res => {
-								return res.json()
-              }).then(result => {
-								let { data, code, msg } = result
-								if (code === 1) {
-									window.location.replace(data)
-								} else {
-									this.$message({
-										message: msg,
-										type: 'warning'
-									})
-								}
-              })
+					bId: null,
+					shareTitle: '',
+					shareDes: '',
+					shareCover: '',
+					prizesList: [],
+					useNum: null,
+					remainNum: null,
+					activeMsg: '',
+					lotteryRecords: [],
+					activeName: 'tab1',
+					showDialog: false,
+					form: {
+						name: '',
+						wxAccount: '',
+						phone: '',
+						province: '',
+						city: '',
+						address: '',
+						remark: '',
+						recordId: null,
 					},
-					// 获取二维码
-					gerQwCode (bId) {
-						fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/getUnknown?bId=${bId}`)
-              .then(res => {
-								return res.json()
-              }).then(result => {
-								let { data, code, msg } = result
-								if (code === 1) {
-									this.qrCodeData = data
-								} else {
-									this.$message({
-										message: msg,
-										type: 'warning'
-									})
-								}
-              })
+					transformedData: [],
+					cityData: '',
+					showTipDialog: false,
+					allCarList: [],
+					getInfoForm: {
+						buyCar: 1,
+						phone: '',
+						province: '',
+						city: '',
+						intenModel: '',
+						car: '',
 					},
-					// 内容类型的分享页,获取企业微信的签名
-					getQyWxSign () {
-						let shareUrl = `${window.location.origin}?bId=${this.bId}&h5Type=${this.h5Type}`
-						fetch(this.httpUrl + `/scrm/v1/ct-share/p/getSignature?url=${window.location.href}`)
-              .then(res => {
-								return res.json()
-              }).then(result => {
-								let { data, code, msg } = result
-								if (code === 1) {
-									wx.config({
-										debug: false,
-										appId: data.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
-										timestamp: data.timestamp, // 必填,生成签名的时间戳
-										nonceStr: data.nonceStr, // 必填,生成签名的随机串
-										signature: data.signature, // 必填,签名,见附录1
-										jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的JS接口列表
-									})
-									// 分享接口仅激活的成员数超过200人且已经认证的企业才可在微信上调用。
-									wx.ready(() => {
-										let shareData = {
-											link: shareUrl,
-											title: this.shareTitle, // 分享标题
-											desc: this.shareDes, // 分享描述
-											imgUrl: this.shareCover,
-										}
-										// 分享到朋友圈
-										wx.updateAppMessageShareData(shareData)
-										// 分享给朋友
-										wx.updateTimelineShareData(shareData);
-										// 配置失败的回调函数
-										wx.error(function(res) {
-											// 配置失败
-											console.log('配置失败', res);
-										})
-									})
-								} else {
-									// this.$message({
-									// 	message: msg,
-									// 	type: 'warning'
-									// })
-								}
-              })
+					prizeData: {
+						acceptType: null,
+						name: '',
+						img: '',
+						money: '',
+						id: null
 					},
-					// 获取抽奖信息
-					raffleInfo () {
-            fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/raffleInfoByOpenId?openId=${this.getQueryParam('openId') || localStorage.getItem('openId')}&bId=${this.bId}`)
-              .then(res => {
+					showPrizeDialog: false,
+					lotteryStatus: null,
+					currentIndex: 0, // 当前活动的格子索引
+					isSpinning: false,
+					intervalId: null,
+					showRuleDialog: false,
+					preFormType: null,
+					showError: false,
+					errorMsg: '',
+					dialogTitle: ""
+				}
+			},
+			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'
+				}
+				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, code, msg } = result
-								if (code === 1) {
-									this.lotteryStatus = data.status
-									this.prizesList = data.prizes
-									this.useNum = data.useNum
-									this.remainNum = data.raffleNum - data.useNum
-									this.activeMsg = data.activityInfo
-									this.shareTitle = data.name
-									this.shareDes = data.description
-									this.shareCover = data.cover
-									this.preFormType = data.preFormType
-									if (data.preForm && !data.isSubmit && this.getInfoForm.buyCar !== 0) {
-										if (this.preFormType) {
-											this.dialogTitle = '五菱试驾体验报名'	
-										} else {
-											this.dialogTitle = '请问您是否已购五菱/宝骏车型?'	
-										}
-										// 此处加上this.getInfoForm.buyCar !== 0的条件是当用户点击过否的时候,不再弹出此框,除非用户重新进入页面,可再次弹出此框
-										this.showTipDialog = true
-									}
+							}).then(result => {
+								let { data, msg } = result
+								if (typeof data === 'boolean' && data) {
+									this.httpUrl = 'https://wlapi.wefanbot.com'
 								} else {
-									this.showError = true
-									this.errorMsg = msg
+									this.httpUrl = 'http://test.wefanbot.com:18993'
 								}
-              })
-					},
-					// 抽奖记录
-					raffleRecord () {
-						fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/raffleRecord', {
-              method: 'post',
-              body: JSON.stringify({
-                openId: this.getQueryParam('openId') || localStorage.getItem('openId'),
-								bid: this.bId,
-								page: 1,
-								pageCount: 1000,
-              }),
-              headers: {
-                'Content-Type': 'application/json'
-              }
-            }).then(res => {
+								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.lotteryRecords = data.records
+								this.h5Type = data.h5Type
+								localStorage.setItem('openId', data.openId)
+								// this.gerQwAuth(this.bId);
+								this.ifH5Type();
 							}
 						})
-					},
-					changeTab (tabName) {
-						this.activeName = tabName
-					},
-					handleOpenForm (id) {
-						this.form.recordId = id
-						this.showDialog = true
-					},
-					handleSave () {
-						if (!this.form.name) {
-							this.$message({
-								message: '请填写姓名',
-								type: 'warning'
-							})
-							return
-						}
-						if (!this.form.phone) {
-							this.$message({
-								message: '请输入手机号',
-								type: 'warning'
-							})
-							return
-						}
-						if (!this.form.province) {
-							this.$message({
-								message: '请选择城市',
-								type: 'warning'
-							})
-							return
+				},
+				ifH5Type () {
+					if (this.h5Type == 19 || this.h5Type == 30) {
+						if (this.getQueryParam('openId') || localStorage.getItem('openId')) {
+							if (!this.getQueryParam('externalUserid')) {
+								this.gerQwAuth(this.bId);
+							} else {
+								if (this.getQueryParam('externalUserid') === 'unknown') {
+									this.gerQwCode(this.bId);
+								} else {
+									this.raffleInfo();
+									this.raffleRecord()
+									this.getCityLevel()
+									this.getAllCar()
+									this.getQyWxSign()
+								}
+							}
+						} else {
+							// 走授权操作
+							this.getAuth();
 						}
-						fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/raffleForm', {
-              method: 'post',
-              body: JSON.stringify(this.form),
-              headers: {
-                'Content-Type': 'application/json'
-              }
-            }).then(res => {
+					} 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) {
+						this.getAuth()
+					}
+				},
+				// 企微授权
+				gerQwAuth (bId) {
+					let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
+					fetch(this.httpUrl + `/p/insuite/p/getOAUrl?openId=${openId}&bId=${bId}`)
+						.then(res => {
 							return res.json()
 						}).then(result => {
 							let { data, code, msg } = result
 							if (code === 1) {
+								window.location.replace(data)
+							} else {
 								this.$message({
-									message: '提交成功!',
-									type: 'success'
-								})
-								this.showDialog = false
-								this.raffleRecord()
-							}
-						})
-					},
-					handleSaveCar () {
-						if (this.preFormType) {
-							if (!this.getInfoForm.phone) {
-								this.$message({
-									message: '请输入手机号',
+									message: msg,
 									type: 'warning'
 								})
-								return
 							}
-							if (!this.getInfoForm.city) {
+						})
+				},
+				// 获取二维码
+				gerQwCode (bId) {
+					fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/getUnknown?bId=${bId}`)
+						.then(res => {
+							return res.json()
+						}).then(result => {
+							let { data, code, msg } = result
+							if (code === 1) {
+								this.qrCodeData = data
+							} else {
 								this.$message({
-									message: '请选择城市',
+									message: msg,
 									type: 'warning'
 								})
-								return
 							}
-							if (!this.getInfoForm.intenModel) {
-								this.$message({
-									message: '请选择意向车型',
-									type: 'warning'
+						})
+				},
+				// 内容类型的分享页,获取企业微信的签名
+				getQyWxSign () {
+					let shareUrl = `${window.location.origin}?bId=${this.bId}&h5Type=${this.h5Type}`
+					fetch(this.httpUrl + `/scrm/v1/ct-share/p/getSignature?url=${window.location.href}`)
+						.then(res => {
+							return res.json()
+						}).then(result => {
+							let { data, code, msg } = result
+							if (code === 1) {
+								wx.config({
+									debug: false,
+									appId: data.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
+									timestamp: data.timestamp, // 必填,生成签名的时间戳
+									nonceStr: data.nonceStr, // 必填,生成签名的随机串
+									signature: data.signature, // 必填,签名,见附录1
+									jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的JS接口列表
 								})
-								return
-							}
-							this.getInfoForm.buyCar = null
-							this.getInfoForm.car = ''
-						} else {
-							if (this.getInfoForm.buyCar) {
-								if (!this.getInfoForm.car) {
-									this.$message({
-										message: '请选择已购车型',
-										type: 'warning'
+								// 分享接口仅激活的成员数超过200人且已经认证的企业才可在微信上调用。
+								wx.ready(() => {
+									let shareData = {
+										link: shareUrl,
+										title: this.shareTitle, // 分享标题
+										desc: this.shareDes, // 分享描述
+										imgUrl: this.shareCover,
+									}
+									// 分享到朋友圈
+									wx.updateAppMessageShareData(shareData)
+									// 分享给朋友
+									wx.updateTimelineShareData(shareData);
+									// 配置失败的回调函数
+									wx.error(function(res) {
+										// 配置失败
+										console.log('配置失败', res);
 									})
-									return	
-								}
+								})
 							} else {
-								this.getInfoForm.car = ''
+								// this.$message({
+								// 	message: msg,
+								// 	type: 'warning'
+								// })
 							}
-							this.getInfoForm.phone = ''
-							this.getInfoForm.province = ''
-							this.getInfoForm.city = ''
-							this.getInfoForm.intenModel = ''
-						}
-						fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/submitPreForm', {
-              method: 'post',
-              body: JSON.stringify({
-								bid: this.bId,
-								buyCar: this.getInfoForm.buyCar,
-								car: this.getInfoForm.car,
-								phone: this.getInfoForm.phone,
-								province: this.getInfoForm.province,
-								city: this.getInfoForm.city,
-								intenModel: this.getInfoForm.intenModel,
-								mpOpenId: this.getQueryParam('openId') || this.localStorage.getItem('openId'),
-							}),
-              headers: {
-                'Content-Type': 'application/json'
-              }
-            }).then(res => {
+						})
+				},
+				// 获取抽奖信息
+				raffleInfo () {
+					fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/raffleInfoByOpenId?openId=${this.getQueryParam('openId') || localStorage.getItem('openId')}&bId=${this.bId}`)
+						.then(res => {
 							return res.json()
 						}).then(result => {
 							let { data, code, msg } = result
 							if (code === 1) {
-								this.$message({
-									message: '提交成功!',
-									type: 'success'
-								})
-								this.showTipDialog = false
+								this.lotteryStatus = data.status
+								this.prizesList = data.prizes
+								this.useNum = data.useNum
+								this.remainNum = data.raffleNum - data.useNum
+								this.activeMsg = data.activityInfo
+								this.shareTitle = data.name
+								this.shareDes = data.description
+								this.shareCover = data.cover
+								this.preFormType = data.preFormType
+								if (data.preForm && !data.isSubmit && this.getInfoForm.buyCar !== 0) {
+									if (this.preFormType) {
+										this.dialogTitle = '五菱试驾体验报名'
+									} else {
+										this.dialogTitle = '请问您是否已购五菱/宝骏车型?'
+									}
+									// 此处加上this.getInfoForm.buyCar !== 0的条件是当用户点击过否的时候,不再弹出此框,除非用户重新进入页面,可再次弹出此框
+									this.showTipDialog = true
+								}
+							} else {
+								this.showError = true
+								this.errorMsg = msg
 							}
 						})
-					},
-					// 获取城市数据
-					getCityLevel () {
-						fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/1000/1720161853377/pc-code.json')
-              .then(res => {
-								return res.json()
-              }).then(result => {
-								this.transformedData = this.transformData(result)
-              })
-					},
-					// 获取全部车型
-					getAllCar () {
-						fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/getCarList?bId=${this.bId}`)
-              .then(res => {
-								return res.json()
-              }).then(result => {
-								let { data, code, msg } = result
-								if (code === 1) {
-									this.allCarList = data
-								}
-              })
-					},
-					handleChangeCity (value) {
-						this.form.province = value[0]
-						this.form.city = value[1]
-					},
-					handleInfoCity (value) {
-						this.getInfoForm.province = value[0]
-						this.getInfoForm.city = value[1]	
-					},
-					// 点击抽奖
-					handleLottery () {
-						if (!this.remainNum) {
+				},
+				// 抽奖记录
+				raffleRecord () {
+					fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/raffleRecord', {
+						method: 'post',
+						body: JSON.stringify({
+							openId: this.getQueryParam('openId') || localStorage.getItem('openId'),
+							bid: this.bId,
+							page: 1,
+							pageCount: 1000,
+						}),
+						headers: {
+							'Content-Type': 'application/json'
+						}
+					}).then(res => {
+						return res.json()
+					}).then(result => {
+						let { data, code, msg } = result
+						if (code === 1) {
+							this.lotteryRecords = data.records
+						}
+					})
+				},
+				changeTab (tabName) {
+					this.activeName = tabName
+				},
+				handleOpenForm (id) {
+					this.form.recordId = id
+					this.showDialog = true
+				},
+				handleSave () {
+					if (!this.form.name) {
+						this.$message({
+							message: '请填写姓名',
+							type: 'warning'
+						})
+						return
+					}
+					if (!this.form.phone) {
+						this.$message({
+							message: '请输入手机号',
+							type: 'warning'
+						})
+						return
+					}
+					if (!this.form.province) {
+						this.$message({
+							message: '请选择城市',
+							type: 'warning'
+						})
+						return
+					}
+					fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/raffleForm', {
+						method: 'post',
+						body: JSON.stringify(this.form),
+						headers: {
+							'Content-Type': 'application/json'
+						}
+					}).then(res => {
+						return res.json()
+					}).then(result => {
+						let { data, code, msg } = result
+						if (code === 1) {
 							this.$message({
-								message: '暂无抽奖次数',
+								message: '提交成功!',
+								type: 'success'
+							})
+							this.showDialog = false
+							this.raffleRecord()
+						}
+					})
+				},
+				handleSaveCar () {
+					if (this.preFormType) {
+						if (!this.getInfoForm.phone) {
+							this.$message({
+								message: '请输入手机号',
 								type: 'warning'
 							})
 							return
 						}
-						if (this.lotteryStatus === -1) {
+						if (!this.getInfoForm.city) {
 							this.$message({
-								message: '活动已结束',
+								message: '请选择城市',
 								type: 'warning'
 							})
-						} else if (this.lotteryStatus === 0) {
+							return
+						}
+						if (!this.getInfoForm.intenModel) {
 							this.$message({
-								message: '活动未开始',
+								message: '请选择意向车型',
 								type: 'warning'
 							})
-						} else if (this.lotteryStatus === 1) {
-							if (this.isSpinning) return
-							this.isSpinning = true
-							this.currentIndex = 0
-							let externalUserid = this.getQueryParam('externalUserid')
-							let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
-							const headers = new Headers();
-							headers.append('police', 110);
-							fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/lottery?externalUserid=${externalUserid}&openId=${openId}&bId=${this.bId}`, {
-								method: 'GET',
-								headers: headers
+							return
+						}
+						this.getInfoForm.buyCar = null
+						this.getInfoForm.car = ''
+					} else {
+						if (this.getInfoForm.buyCar) {
+							if (!this.getInfoForm.car) {
+								this.$message({
+									message: '请选择已购车型',
+									type: 'warning'
+								})
+								return
+							}
+						} else {
+							this.getInfoForm.car = ''
+						}
+						this.getInfoForm.phone = ''
+						this.getInfoForm.province = ''
+						this.getInfoForm.city = ''
+						this.getInfoForm.intenModel = ''
+					}
+					fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/submitPreForm', {
+						method: 'post',
+						body: JSON.stringify({
+							bid: this.bId,
+							buyCar: this.getInfoForm.buyCar,
+							car: this.getInfoForm.car,
+							phone: this.getInfoForm.phone,
+							province: this.getInfoForm.province,
+							city: this.getInfoForm.city,
+							intenModel: this.getInfoForm.intenModel,
+							mpOpenId: this.getQueryParam('openId') || this.localStorage.getItem('openId'),
+						}),
+						headers: {
+							'Content-Type': 'application/json'
+						}
+					}).then(res => {
+						return res.json()
+					}).then(result => {
+						let { data, code, msg } = result
+						if (code === 1) {
+							this.$message({
+								message: '提交成功!',
+								type: 'success'
 							})
-							  .then(res => {
-									return res.json()
-							  }).then(result => {
-									let { data, code, msg } = result
-									if (code === 1) {
-										this.stopLottery()
-										this.prizeData = data
-										this.showPrizeDialog = true
-										this.raffleInfo();
-										this.raffleRecord();
-									} else {
-										this.stopLottery()
-										this.$message({
-											message: msg,
-										})
-									}
-							  })
-							// 开始转圈
-							this.intervalId = setInterval(() => {
-								this.currentIndex = (this.currentIndex + 1) % 9;
-							}, 200); // 每 200 毫秒转一次
+							this.showTipDialog = false
 						}
-					},
-					// 停止抽奖
-					stopLottery() {
-						clearInterval(this.intervalId);
-						this.isSpinning = false;
-						this.currentIndex = null;
-					},
-					handleRule () {
-						this.showRuleDialog = true
-					},
-					// 省市数据做转换
-					transformData(data) {
-						return data.map(item => {
-								// 创建一个新对象,避免直接修改原始对象
-								const newItem = { ...item };
-				
-								// 重命名 text 为 label
-								if (newItem.text) {
-										newItem.label = newItem.text;
-										newItem.value = newItem.text;
-										delete newItem.text;
-								}
-								
-								// 如果存在 children 数组,则递归处理每个子项
-								if (newItem.children && Array.isArray(newItem.children)) {
-										newItem.children = this.transformData(newItem.children);
-								}
-				
-								return newItem;
+					})
+				},
+				// 获取城市数据
+				getCityLevel () {
+					fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/1000/1720161853377/pc-code.json')
+						.then(res => {
+							return res.json()
+						}).then(result => {
+							this.transformedData = this.transformData(result)
 						})
-					},
-					// 截取url中的数据
-					getQueryParam (paramName) {
-						// 获取当前URL的查询字符串部分  
-						const queryString = window.location.search;
-						// 创建一个URLSearchParams对象  
-						const urlParams = new URLSearchParams(queryString);
-						// 返回指定参数的值,如果不存在则返回null  
-						return urlParams.get(paramName);
-					},
-					timeFormat (time, format = 'yyyy-MM-dd hh:mm:ss') {
-						if (time === undefined || time === '' || time === null) {
-							return '/'
-						} else {
-							const date = new Date(time)
-							const o = {
-								'M+': date.getMonth() + 1,
-								'd+': date.getDate(),
-								'h+': date.getHours(),
-								'm+': date.getMinutes(),
-								's+': date.getSeconds(),
-								'q+': Math.floor((date.getMonth() + 3) / 3),
-								'S': date.getMilliseconds()
-							}
-							if (/(y+)/.test(format)) {
-								format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+				},
+				// 获取全部车型
+				getAllCar () {
+					fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/getCarList?bId=${this.bId}`)
+						.then(res => {
+							return res.json()
+						}).then(result => {
+							let { data, code, msg } = result
+							if (code === 1) {
+								this.allCarList = data
 							}
-							for (let k in o) {
-								if (new RegExp('(' + k + ')').test(format)) {
-									format = format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
+						})
+				},
+				handleChangeCity (value) {
+					this.form.province = value[0]
+					this.form.city = value[1]
+				},
+				handleInfoCity (value) {
+					this.getInfoForm.province = value[0]
+					this.getInfoForm.city = value[1]
+				},
+				// 点击抽奖
+				handleLottery () {
+					if (!this.remainNum) {
+						this.$message({
+							message: '暂无抽奖次数',
+							type: 'warning'
+						})
+						return
+					}
+					if (this.lotteryStatus === -1) {
+						this.$message({
+							message: '活动已结束',
+							type: 'warning'
+						})
+					} else if (this.lotteryStatus === 0) {
+						this.$message({
+							message: '活动未开始',
+							type: 'warning'
+						})
+					} else if (this.lotteryStatus === 1) {
+						if (this.isSpinning) return
+						this.isSpinning = true
+						this.currentIndex = 0
+						let externalUserid = this.getQueryParam('externalUserid')
+						let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
+						const headers = new Headers();
+						headers.append('police', 110);
+						fetch(this.httpUrl + `/scrm/v1/wxcp-raffle/p/lottery?externalUserid=${externalUserid}&openId=${openId}&bId=${this.bId}`, {
+							method: 'GET',
+							headers: headers
+						})
+							.then(res => {
+								return res.json()
+							}).then(result => {
+								let { data, code, msg } = result
+								if (code === 1) {
+									this.stopLottery()
+									this.prizeData = data
+									this.showPrizeDialog = true
+									this.raffleInfo();
+									this.raffleRecord();
+								} else {
+									this.stopLottery()
+									this.$message({
+										message: msg,
+									})
 								}
+							})
+						// 开始转圈
+						this.intervalId = setInterval(() => {
+							this.currentIndex = (this.currentIndex + 1) % 9;
+						}, 200); // 每 200 毫秒转一次
+					}
+				},
+				// 停止抽奖
+				stopLottery () {
+					clearInterval(this.intervalId);
+					this.isSpinning = false;
+					this.currentIndex = null;
+				},
+				handleRule () {
+					this.showRuleDialog = true
+				},
+				// 省市数据做转换
+				transformData (data) {
+					return data.map(item => {
+						// 创建一个新对象,避免直接修改原始对象
+						const newItem = { ...item };
+
+						// 重命名 text 为 label
+						if (newItem.text) {
+							newItem.label = newItem.text;
+							newItem.value = newItem.text;
+							delete newItem.text;
+						}
+
+						// 如果存在 children 数组,则递归处理每个子项
+						if (newItem.children && Array.isArray(newItem.children)) {
+							newItem.children = this.transformData(newItem.children);
+						}
+
+						return newItem;
+					})
+				},
+				// 截取url中的数据
+				getQueryParam (paramName) {
+					// 获取当前URL的查询字符串部分  
+					const queryString = window.location.search;
+					// 创建一个URLSearchParams对象  
+					const urlParams = new URLSearchParams(queryString);
+					// 返回指定参数的值,如果不存在则返回null  
+					return urlParams.get(paramName);
+				},
+				timeFormat (time, format = 'yyyy-MM-dd hh:mm:ss') {
+					if (time === undefined || time === '' || time === null) {
+						return '/'
+					} else {
+						const date = new Date(time)
+						const o = {
+							'M+': date.getMonth() + 1,
+							'd+': date.getDate(),
+							'h+': date.getHours(),
+							'm+': date.getMinutes(),
+							's+': date.getSeconds(),
+							'q+': Math.floor((date.getMonth() + 3) / 3),
+							'S': date.getMilliseconds()
+						}
+						if (/(y+)/.test(format)) {
+							format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+						}
+						for (let k in o) {
+							if (new RegExp('(' + k + ')').test(format)) {
+								format = format.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
 							}
-							return format
 						}
-					},
-        }
-    })   
-</script>
+						return format
+					}
+				},
+			}
+		})   
+	</script>
 </body>
 
 </html>

+ 91 - 41
lottery/registrationActivity.html

@@ -4,7 +4,7 @@
 <head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
   <title>活动</title>
   <!--引入 element-ui 的样式,-->
   <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
@@ -39,6 +39,7 @@
     justify-content: center;
     align-items: center;
   }
+
   .activity_content {
     width: 100%;
     height: calc(100vh - 180px);
@@ -49,25 +50,30 @@
     overflow-y: auto;
     box-sizing: border-box;
   }
+
   .activity_item {
     display: flex;
     align-items: flex-start;
     margin-bottom: 30px;
   }
+
   .item_title {
     font-weight: 500;
     font-size: 14px;
     color: #222222;
-    min-width: 70px;
+    min-width: 100px;
   }
+
   .item_content {
     font-weight: 400;
     font-size: 14px;
-    color: #222222; 
+    color: #222222;
   }
-  .item_content p{
+
+  .item_content p {
     margin: 0;
   }
+
   .foot_btn {
     position: fixed;
     bottom: 14px;
@@ -75,9 +81,10 @@
     width: 100%;
     box-sizing: border-box;
   }
+
   .signUp_btn {
     height: 52px;
-    line-height: 52px;
+    width: 100%;
     background: #1677FF;
     border-radius: 20px;
     font-weight: 500;
@@ -85,6 +92,7 @@
     color: #FFFFFF;
     text-align: center;
   }
+
   .form_content {
     width: 100%;
     height: calc(100vh - 180px);
@@ -95,18 +103,21 @@
     overflow-y: auto;
     box-sizing: border-box;
   }
+
   .form_title {
     font-weight: 500;
     font-size: 16px;
     color: #222222;
     text-align: center;
   }
+
   .el-form-item__label {
     padding-right: 0;
     font-weight: 500;
     font-size: 14px;
     color: #666666;
   }
+
   .el-input__inner {
     border: none;
     font-weight: 500;
@@ -114,15 +125,18 @@
     color: #222222;
     text-align: right;
   }
+
   .el-input--prefix .el-input__inner {
     padding-left: 0;
     padding-right: 0;
   }
+
   .el-form-item {
     margin-bottom: 0;
     border-bottom: 1px solid #F9F9F9;
     padding: 10px 0;
   }
+
   .el-textarea__inner {
     border: none;
     font-weight: 500;
@@ -130,26 +144,37 @@
     color: #222222;
     text-align: right;
   }
+
   .el-form-item__content .el-select {
-    margin-left: 18px;
+    margin-left: 55px;
   }
+
   .el-form-item__content .el-cascader {
-    margin-left: 18px;
+    margin-left: 55px;
+  }
+
+  .el-select-dropdown__item {
+    white-space: normal;
+    overflow: unset;
+    height: auto;
   }
+
   .signup_page {
     width: 100vw;
     height: 100vh;
     background: url('./img/sign_up.png') no-repeat center;
     background-size: 100vw 100vh;
-		background-repeat: no-repeat;
+    background-repeat: no-repeat;
   }
+
   .signupSucc_page {
     width: 100vw;
     height: 100vh;
     background: url('./img/signup_success.png') no-repeat center;
     background-size: 100vw 100vh;
-		background-repeat: no-repeat;
+    background-repeat: no-repeat;
   }
+
   .succ_tip {
     padding-top: 240px;
     font-weight: bold;
@@ -158,8 +183,9 @@
     line-height: 40px;
     text-align: center;
     width: 100%;
-    white-space: pre-wrap;
+    word-break: keep-all;
   }
+
   .signup_title {
     font-weight: bold;
     font-size: 24px;
@@ -168,6 +194,7 @@
     text-align: center;
     line-height: 41px;
   }
+
   .signup_box {
     margin: 30px 20px 0;
     height: 390px;
@@ -175,6 +202,7 @@
     border-radius: 20px;
     box-sizing: border-box;
   }
+
   .signup_tip {
     font-weight: 400;
     font-size: 16px;
@@ -183,6 +211,7 @@
     text-align: center;
     line-height: 30px;
   }
+
   .signup_code {
     font-weight: 500;
     font-size: 30px;
@@ -192,6 +221,7 @@
     border-radius: 20px;
     margin: 0 20px;
   }
+
   .copy_text {
     display: flex;
     align-items: center;
@@ -201,11 +231,13 @@
     font-size: 12px;
     color: #9FB3C7;
   }
+
   .copy_icon {
     width: 11px;
     height: 11px;
     margin-right: 3px;
   }
+
   .attention {
     font-weight: 400;
     font-size: 12px;
@@ -215,6 +247,7 @@
     padding-top: 50px;
     padding-left: 20px;
   }
+
   .fail_box {
     margin: 80px 20px 0;
     height: 287px;
@@ -223,11 +256,13 @@
     box-sizing: border-box;
     text-align: center;
   }
+
   .fail_img {
     width: 246px;
     height: 144px;
     margin-top: -20px;
   }
+
   .fail_title {
     font-weight: 500;
     font-size: 20px;
@@ -235,6 +270,7 @@
     line-height: 30px;
     padding: 20px 0;
   }
+
   .fail_tip {
     font-weight: 400;
     font-size: 16px;
@@ -298,9 +334,11 @@
       </div>
       <div class="form_content" v-else-if="step === 2">
         <div class="form_title">报名表单</div>
-        <el-form ref="form" label-position="left" label-width="100px">
-          <el-form-item v-for="(item, index) in toshopData.formProList" :key="index" :label="item.name" :required="Boolean(item.isNeed)">
-            <el-cascader v-if="item.type === 10" v-model="item.value" :options="transformedData" @change="handleInfoCity">
+        <el-form ref="form" label-position="left" label-width="120px">
+          <el-form-item v-for="(item, index) in toshopData.formProList" :key="index" :label="item.name"
+            :required="Boolean(item.isNeed)">
+            <el-cascader v-if="item.type === 10" v-model="item.value" :options="transformedData"
+              @change="handleInfoCity">
             </el-cascader>
             <el-select v-if="item.type === 11" v-model="item.value" placeholder="请选择" @change="handlechange">
               <el-option v-for="(sto, sindex) in storeList" :key="sindex" :label="sto.name" :value="sto.name">
@@ -310,17 +348,25 @@
             <el-input v-if="item.type === 1" type="textarea" autosize v-model="item.value" placeholder="请输入"></el-input>
             <el-input v-if="item.type === 2" type="number" v-model="item.value" placeholder="请输入"></el-input>
             <el-select v-if="item.type === 3" v-model="item.value" placeholder="请选择">
-              <el-option v-for="sto in item.formProTagReqs" :key="sto.proValue" :label="sto.proValue" :value="sto.proValue">
+              <el-option v-for="sto in item.formProTagReqs" :key="sto.proValue" :label="sto.proValue"
+                :value="sto.proValue">
               </el-option>
             </el-select>
-            <el-date-picker v-if="item.type === 5" v-model="item.value" type="date" placeholder="选择日期">
-            <el-time-picker v-if="item.type === 6" v-model="item.value" placeholder="请选择"></el-time-picker>
-            <el-date-picker v-if="item.type === 7" v-model="item.value" type="datetime" placeholder="选择日期时间"></el-date-picker>
+            <el-col :span="22" v-if="item.type === 5">
+              <el-date-picker v-model="item.value" type="date" placeholder="选择日期" style="width: 100%;">
+            </el-col>
+            <el-col :span="22" v-if="item.type === 6">
+              <el-time-picker v-model="item.value" placeholder="请选择"></el-time-picker>
+            </el-col>
+            <el-col :span="22" v-if="item.type === 7">
+              <el-date-picker v-if="item.type === 7" v-model="item.value" type="datetime"
+                placeholder="选择日期时间"></el-date-picker>
+            </el-col>
           </el-form-item>
         </el-form>
       </div>
       <div class="foot_btn">
-        <div class="signUp_btn" @click="toSignUp">{{step === 1 ? '去报名' : '确定'}}</div>
+        <el-button class="signUp_btn" :loading="loading" @click="toSignUp">{{step === 1 ? '去报名' : '确定'}}</el-button>
       </div>
     </div>
   </div>
@@ -328,7 +374,7 @@
 <script>
   new Vue({
     el: '#box',
-    data() {
+    data () {
       return {
         httpUrl: '',
         bId: null,
@@ -345,15 +391,16 @@
           verificationFailGuide: '',
           verificationFailGuide2: '',
         },
-        step: 2,
+        step: 1,
         verificationCode: '',
-				transformedData: [],
+        transformedData: [],
         storeList: [],
         province: '',
         city: '',
+        loading: false,
       }
     },
-    created() {
+    created () {
       this.bId = this.getQueryParam('bId')
       this.env = this.getQueryParam('env')
       if (!this.env || this.env === 'prod') {
@@ -364,7 +411,7 @@
       this.ifH5Type()
     },
     methods: {
-      ifH5Type() {
+      ifH5Type () {
         if (this.getQueryParam('openId') || localStorage.getItem('openId')) {
           if (!this.getQueryParam('externalUserid')) {
             this.gerQwAuth(this.bId);
@@ -377,7 +424,7 @@
           this.getAuth();
         }
       },
-      getAuth() {
+      getAuth () {
         // 获取url上的code
         let code = this.getQueryParam('code')
         if (code) {
@@ -401,7 +448,7 @@
           window.location.replace(url)
         }
       },
-      getInfoByh5Code(code) {
+      getInfoByh5Code (code) {
         fetch(this.httpUrl + `/scrm/v1/mp-client/p/getInfoByh5Code?code=${code}&bId=${this.bId}`)
           .then(res => {
             return res.json()
@@ -414,7 +461,7 @@
           })
       },
       // 企微授权
-      gerQwAuth(bId) {
+      gerQwAuth (bId) {
         let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
         fetch(this.httpUrl + `/p/insuite/p/getOAUrl?openId=${openId}&bId=${bId}`)
           .then(res => {
@@ -432,8 +479,8 @@
           })
       },
       // 获取城市数据
-      getCityLevel() {
-        fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/1000/1720161853377/pc-code.json')
+      getCityLevel () {
+        fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742009720857/four-province.json')
           .then(res => {
             return res.json()
           }).then(result => {
@@ -441,7 +488,7 @@
           })
       },
       // 省市数据做转换
-      transformData(data) {
+      transformData (data) {
         return data.map(item => {
           // 创建一个新对象,避免直接修改原始对象
           const newItem = { ...item };
@@ -458,7 +505,7 @@
           return newItem;
         })
       },
-      handleInfoCity(value) {
+      handleInfoCity (value) {
         this.province = value[0]
         this.city = value[1]
         // 清空经销商类型的数据
@@ -470,7 +517,7 @@
         this.storeList = []
         this.getStoreList()
       },
-      handlechange(value) {
+      handlechange (value) {
         this.toshopData.formProList.forEach(item => {
           if (item.type === 11) {
             item.value = value
@@ -478,7 +525,7 @@
         })
         this.$forceUpdate()
       },
-      getStoreList() {
+      getStoreList () {
         fetch(this.httpUrl + `/scrm/v1/wxcp-toshop-store/p/findListByPage?city=${this.city}&province=${this.province}`, {
           method: 'post',
           body: JSON.stringify({
@@ -502,7 +549,7 @@
           }
         })
       },
-      lightenShare() {
+      lightenShare () {
         let externalUserid = this.getQueryParam('externalUserid')
         let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
         const headers = new Headers();
@@ -540,13 +587,13 @@
       },
       toSignUp () {
         if (this.step === 1) {
-          this.step = 2 
+          this.step = 2
         } else {
           const isValid = this.toshopData.formProList.some(item => {
             if (item.isNeed && !item.value) {
               this.$message({
                 message: '必填项不能为空',
-                type: 'warning' 
+                type: 'warning'
               })
               return true
             }
@@ -559,9 +606,10 @@
               name: item.name,
               type: item.type,
               value: item.type === 10 ? [item.value.join('')] : [item.value],
-            } 
+            }
           })
           let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
+          this.loading = true
           fetch(this.httpUrl + `/scrm/v1/wxcp-toshop-share/p/formData?openId=${openId}`, {
             method: 'post',
             body: JSON.stringify({
@@ -579,7 +627,7 @@
               this.verificationCode = data.client.verificationCode
               if (data.client.state === 2) {
                 // 已提交表单
-                this.step = 3 
+                this.step = 3
               } else if (data.client.state === 3) {
                 // 已核销
                 this.step = 4
@@ -593,15 +641,17 @@
                 type: 'warning'
               })
             }
+          }).fiqually(() => {
+            this.loading = false
           })
         }
       },
       // 检测是否iOS端
-      iosAgent() {
+      iosAgent () {
         return navigator.userAgent.match(/(iPhone|iPod|iPad);?/i);
       },
       // 复制文本函数,微信端,需要在用户触发 Click 事件里面才能执行成功
-      handleCopy(message) {
+      handleCopy (message) {
         if (this.iosAgent()) {
           let inputObj = document.createElement("input");
           inputObj.value = message;
@@ -624,7 +674,7 @@
         }
       },
       // 执行浏览器命令 Copy 顺便输出一下日志,如果在移动端推荐写个方法展示日志或者用alert(msg)也行。
-      execCommand(action) {
+      execCommand (action) {
         let is = document.execCommand(action);
         if (is) {
           this.$message({
@@ -639,7 +689,7 @@
         }
       },
       // 截取url中的数据
-      getQueryParam(paramName) {
+      getQueryParam (paramName) {
         // 获取当前URL的查询字符串部分  
         const queryString = window.location.search;
         // 创建一个URLSearchParams对象  

+ 69 - 32
lottery/signUp.html

@@ -4,7 +4,7 @@
 <head>
   <meta charset="UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
   <title>活动</title>
   <!--引入 element-ui 的样式,-->
   <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
@@ -40,6 +40,7 @@
     justify-content: center;
     align-items: center;
   }
+
   .page_title {
     font-weight: 800;
     font-size: 40px;
@@ -48,6 +49,7 @@
     top: 40px;
     left: 20px;
   }
+
   .form_content {
     width: 100%;
     height: calc(100vh - 180px);
@@ -58,6 +60,7 @@
     overflow-y: auto;
     box-sizing: border-box;
   }
+
   .foot_btn {
     position: fixed;
     bottom: 14px;
@@ -65,9 +68,10 @@
     width: 100%;
     box-sizing: border-box;
   }
+
   .signUp_btn {
     height: 52px;
-    line-height: 52px;
+    width: 100%;
     background: #1677FF;
     border-radius: 20px;
     font-weight: 500;
@@ -75,37 +79,50 @@
     color: #FFFFFF;
     text-align: center;
   }
+
   .el-form-item__label {
     padding-right: 0;
     font-weight: 500;
     font-size: 14px;
     color: #666666;
   }
-  .el-input__inner{
+
+  .el-input__inner {
     border: none;
     font-weight: 500;
     font-size: 14px;
     color: #222222;
     text-align: right;
   }
+
   .el-form-item {
     margin-bottom: 0;
     border-bottom: 1px solid #F9F9F9;
     padding: 10px 0;
   }
+
   .el-form-item__content .el-select {
-    margin-left: 18px;
+    margin-left: 55px;
   }
+
   .el-form-item__content .el-cascader {
-    margin-left: 18px;
+    margin-left: 55px;
+  }
+
+  .el-select-dropdown__item {
+    white-space: normal;
+    overflow: unset;
+    height: auto;
   }
+
   .page6s {
     width: 100vw;
     height: 100vh;
     background: url('./img/signup_success.png') no-repeat center;
     background-size: 100vw 100vh;
-		background-repeat: no-repeat;
+    background-repeat: no-repeat;
   }
+
   .succ_tip {
     padding-top: 240px;
     font-weight: bold;
@@ -114,15 +131,17 @@
     line-height: 40px;
     text-align: center;
     width: 100%;
-    white-space: pre-wrap;
+    word-break: keep-all;
   }
+
   .signup_page {
     width: 100vw;
     height: 100vh;
     background: url('./img/sign_up.png') no-repeat center;
     background-size: 100vw 100vh;
-		background-repeat: no-repeat;
+    background-repeat: no-repeat;
   }
+
   .signup_title {
     font-weight: bold;
     font-size: 24px;
@@ -131,6 +150,7 @@
     text-align: center;
     line-height: 41px;
   }
+
   .fail_box {
     margin: 80px 20px 0;
     height: 287px;
@@ -139,11 +159,13 @@
     box-sizing: border-box;
     text-align: center;
   }
+
   .fail_img {
     width: 246px;
     height: 144px;
     margin-top: -20px;
   }
+
   .fail_title {
     font-weight: 500;
     font-size: 20px;
@@ -151,6 +173,7 @@
     line-height: 30px;
     padding: 20px 0;
   }
+
   .fail_tip {
     font-weight: 400;
     font-size: 16px;
@@ -158,18 +181,20 @@
     line-height: 30px;
   }
 </style>
+
 <body>
   <div id="box" class="box">
     <div class="page6" v-if="step === 1">
       <div class="page_title">核销领取礼品</div>
       <div class="form_content">
-        <el-form ref="form" label-position="left" label-width="100px">
+        <el-form ref="form" label-position="left" label-width="120px">
           <el-form-item label="核销码" required>
             <el-input v-model="verificationCode" placeholder="请输入"></el-input>
           </el-form-item>
           <el-form-item v-for="(item, index) in toshopData.formProList" :key="index" :label="item.name "
             :required="Boolean(item.isNeed)">
-            <el-cascader v-if="item.type === 10" v-model="item.value" :options="transformedData" @change="handleInfoCity">
+            <el-cascader v-if="item.type === 10" v-model="item.value" :options="transformedData"
+              @change="handleInfoCity">
             </el-cascader>
             <el-select v-if="item.type === 11" v-model="item.value" placeholder="请选择" @change="handlechange">
               <el-option v-for="(sto, sindex) in storeList" :key="sindex" :label="sto.name" :value="sto.name">
@@ -179,17 +204,25 @@
             <el-input v-if="item.type === 1" type="textarea" autosize v-model="item.value" placeholder="请输入"></el-input>
             <el-input v-if="item.type === 2" type="number" v-model="item.value" placeholder="请输入"></el-input>
             <el-select v-if="item.type === 3" v-model="item.value" placeholder="请选择">
-              <el-option v-for="sto in item.formProTagReqs" :key="sto.proValue" :label="sto.proValue" :value="sto.proValue">
+              <el-option v-for="sto in item.formProTagReqs" :key="sto.proValue" :label="sto.proValue"
+                :value="sto.proValue">
               </el-option>
             </el-select>
-            <el-date-picker v-if="item.type === 5" v-model="item.value" type="date" placeholder="选择日期">
-            <el-time-picker v-if="item.type === 6" v-model="item.value" placeholder="请选择"></el-time-picker>
-            <el-date-picker v-if="item.type === 7" v-model="item.value" type="datetime" placeholder="选择日期时间"></el-date-picker>
+            <el-col :span="22" v-if="item.type === 5">
+              <el-date-picker v-model="item.value" type="date" placeholder="选择日期" style="width: 100%;">
+            </el-col>
+            <el-col :span="22" v-if="item.type === 6">
+              <el-time-picker v-model="item.value" placeholder="请选择"></el-time-picker>
+            </el-col>
+            <el-col :span="22" v-if="item.type === 7">
+              <el-date-picker v-if="item.type === 7" v-model="item.value" type="datetime"
+                placeholder="选择日期时间"></el-date-picker>
+            </el-col>
           </el-form-item>
         </el-form>
       </div>
       <div class="foot_btn">
-        <div class="signUp_btn" @click="toSignUp">核销</div>
+        <el-button class="signUp_btn" :loading="loading" @click="toSignUp">核销</el-button>
       </div>
     </div>
     <div class="page6s" v-else-if="step === 2">
@@ -210,7 +243,7 @@
 <script>
   new Vue({
     el: '#box',
-    data() {
+    data () {
       return {
         httpUrl: '',
         bId: null,
@@ -224,13 +257,14 @@
         },
         step: 1,
         verificationCode: '',
-				transformedData: [],
+        transformedData: [],
         storeList: [],
         province: '',
         city: '',
+        loading: false,
       }
     },
-    created() {
+    created () {
       this.bId = this.getQueryParam('bId')
       this.env = this.getQueryParam('env')
       if (!this.env || this.env === 'prod') {
@@ -241,7 +275,7 @@
       this.ifH5Type()
     },
     methods: {
-      ifH5Type() {
+      ifH5Type () {
         if (this.getQueryParam('openId') || localStorage.getItem('openId')) {
           if (!this.getQueryParam('externalUserid')) {
             this.gerQwAuth(this.bId);
@@ -254,7 +288,7 @@
           this.getAuth();
         }
       },
-      getAuth() {
+      getAuth () {
         // 获取url上的code
         let code = this.getQueryParam('code')
         if (code) {
@@ -278,7 +312,7 @@
           window.location.replace(url)
         }
       },
-      getInfoByh5Code(code) {
+      getInfoByh5Code (code) {
         fetch(this.httpUrl + `/scrm/v1/mp-client/p/getInfoByh5Code?code=${code}&bId=${this.bId}`)
           .then(res => {
             return res.json()
@@ -291,7 +325,7 @@
           })
       },
       // 企微授权
-      gerQwAuth(bId) {
+      gerQwAuth (bId) {
         let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
         fetch(this.httpUrl + `/p/insuite/p/getOAUrl?openId=${openId}&bId=${bId}`)
           .then(res => {
@@ -309,8 +343,8 @@
           })
       },
       // 获取城市数据
-      getCityLevel() {
-        fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/1000/1720161853377/pc-code.json')
+      getCityLevel () {
+        fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742009720857/four-province.json')
           .then(res => {
             return res.json()
           }).then(result => {
@@ -318,7 +352,7 @@
           })
       },
       // 省市数据做转换
-      transformData(data) {
+      transformData (data) {
         return data.map(item => {
           // 创建一个新对象,避免直接修改原始对象
           const newItem = { ...item };
@@ -335,7 +369,7 @@
           return newItem;
         })
       },
-      handleInfoCity(value) {
+      handleInfoCity (value) {
         this.province = value[0]
         this.city = value[1]
         // 清空经销商类型的数据
@@ -347,7 +381,7 @@
         this.storeList = []
         this.getStoreList()
       },
-      handlechange(value) {
+      handlechange (value) {
         this.toshopData.formProList.forEach(item => {
           if (item.type === 11) {
             item.value = value
@@ -355,7 +389,7 @@
         })
         this.$forceUpdate()
       },
-      getStoreList() {
+      getStoreList () {
         fetch(this.httpUrl + `/scrm/v1/wxcp-toshop-store/p/findListByPage?city=${this.city}&province=${this.province}`, {
           method: 'post',
           body: JSON.stringify({
@@ -379,7 +413,7 @@
           }
         })
       },
-      lightenShare() {
+      lightenShare () {
         let externalUserid = this.getQueryParam('externalUserid')
         let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
         const headers = new Headers();
@@ -401,7 +435,7 @@
             }
           })
       },
-      toSignUp() {
+      toSignUp () {
         if (!this.verificationCode) {
           this.$message({
             message: '核销码不能为空',
@@ -429,6 +463,7 @@
           }
         })
         let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
+        this.loading = true
         fetch(this.httpUrl + `/scrm/v1/wxcp-toshop-verification/p/formData?openId=${openId}`, {
           method: 'post',
           body: JSON.stringify({
@@ -454,7 +489,7 @@
           } else if (code === 2) {
             this.$message({
               message: '核销码无效',
-              type: 'warning' 
+              type: 'warning'
             })
           } else if (code === 3) {
             this.$message({
@@ -467,10 +502,12 @@
               type: 'warning'
             })
           }
+        }).finally(() => {
+          this.loading = false
         })
       },
       // 截取url中的数据
-      getQueryParam(paramName) {
+      getQueryParam (paramName) {
         // 获取当前URL的查询字符串部分  
         const queryString = window.location.search;
         // 创建一个URLSearchParams对象