| | |
| | | <div class="spinner-dot"></div> |
| | | </div> |
| | | <!-- 标题 --> |
| | | <h1 class="relay-title">正在加载服务</h1> |
| | | <h1 class="relay-title">请输入手机号</h1> |
| | | <!-- 描述 --> |
| | | <p class="relay-desc">请稍候,即将为您跳转至问卷页面</p> |
| | | <!-- 进度条装饰 --> |
| | | <div class="progress-bar"> |
| | | <div class="progress-fill"></div> |
| | | </div> |
| | | <p class="relay-desc">请输入您的手机号,用于获取问卷链接</p> |
| | | <!-- 手机号输入 --> |
| | | <el-input |
| | | v-model="phone" |
| | | class="phone-input" |
| | | placeholder="请输入手机号" |
| | | maxlength="11" |
| | | clearable |
| | | @keyup.enter.native="handleRedirect" |
| | | ></el-input> |
| | | <!-- 确认按钮 --> |
| | | <el-button |
| | | type="primary" |
| | | class="confirm-btn" |
| | | :loading="submitting" |
| | | @click="handleRedirect" |
| | | >确 定</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | export default { |
| | | name: "RelayPage", |
| | | created() { |
| | | this.handleRedirect(); |
| | | data() { |
| | | return { |
| | | phone: "", |
| | | submitting: false |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleRedirect() { |
| | |
| | | this.$message.error("缺少任务标识,请重新扫码"); |
| | | return; |
| | | } |
| | | |
| | | // 手机号必填校验 |
| | | const tel = (this.phone || "").trim(); |
| | | if (!tel) { |
| | | this.$message.warning("请输入手机号"); |
| | | return; |
| | | } |
| | | if (!/^1[3-9]\d{9}$/.test(tel)) { |
| | | this.$message.warning("请输入正确的11位手机号"); |
| | | return; |
| | | } |
| | | |
| | | this.submitting = true; |
| | | const params = { |
| | | taskid: taskid, |
| | | deptcode: deptcode, |
| | | leaveldeptcodes: leaveldeptcodes, |
| | | phone: tel |
| | | }; |
| | | scanGenerateSubtask(params) |
| | | .then((res) => { |
| | | console.log(res,'初始'); |
| | | console.log(res, "初始"); |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.msg,'res.msg'); |
| | | console.log(res.msg, "res.msg"); |
| | | // return |
| | | window.location.href = res.msg; |
| | | console.log("window后"); |
| | |
| | | .catch((err) => { |
| | | console.error(err); |
| | | this.$message.error("服务异常,请稍后重试"); |
| | | }) |
| | | .finally(() => { |
| | | this.submitting = false; |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | line-height: 1.6; |
| | | } |
| | | |
| | | /* 进度条(装饰) */ |
| | | .progress-bar { |
| | | /* 手机号输入框 */ |
| | | .phone-input { |
| | | margin-bottom: 24px; |
| | | } |
| | | |
| | | /* 确认按钮 */ |
| | | .confirm-btn { |
| | | width: 100%; |
| | | height: 4px; |
| | | background: #e0e7f1; |
| | | border-radius: 4px; |
| | | overflow: hidden; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .progress-fill { |
| | | width: 60%; |
| | | height: 100%; |
| | | background: linear-gradient(90deg, #409eff, #79bbff); |
| | | border-radius: 4px; |
| | | animation: progressMove 1.8s ease-in-out infinite alternate; |
| | | } |
| | | |
| | | @keyframes progressMove { |
| | | 0% { |
| | | transform: translateX(-10%); |
| | | width: 40%; |
| | | } |
| | | 100% { |
| | | transform: translateX(10%); |
| | | width: 80%; |
| | | } |
| | | height: 44px; |
| | | font-size: 16px; |
| | | letter-spacing: 4px; |
| | | } |
| | | |
| | | /* 移动端适配 */ |
| | |
| | | // target: `http://192.168.100.10:8094`,//省立同德 |
| | | // target: `http://192.168.100.10:8095`,//新华 |
| | | // target: `http://192.168.100.10:8098`,//市一 |
| | | target:`http://localhost:8095`, |
| | | // target:`http://localhost:8095`, |
| | | // target: `http://192.168.100.168:8095`, |
| | | // target:`http://35z1t16164.qicp.vip`, |
| | | // target: `http://220.66.154.95:8095`, |
| | | target: `http://220.66.154.95:8095`, |
| | | // target: `http://192.168.100.10:8089`,//南华 |
| | | // target: `https://9.208.38.93:8092/`, |
| | | changeOrigin: true, |