当前位置: 首页 > news >正文

荆门做网站公司百度指数官网移动版

荆门做网站公司,百度指数官网移动版,外贸网站建设如何做呢,天元建设集团有限公司北京分公司大神勿喷,简易版本,demo中可以用一下。 需要几个文字自己codelen 赋值 灵活点直接父组件传过去,可以自己改造 首先创建一个生成数字的js **mathcode.js**function MathCode(num){let str "寻寻觅觅冷冷清清凄凄惨惨戚戚乍暖还寒时候…

大神勿喷,简易版本,demo中可以用一下。

需要几个文字自己codelen 赋值 灵活点直接父组件传过去,可以自己改造在这里插入图片描述

首先创建一个生成数字的js

**mathcode.js**

function MathCode(num){let str = "寻寻觅觅冷冷清清凄凄惨惨戚戚乍暖还寒时候最难将息三杯两盏淡酒怎敌他晚来风急雁过也正伤心却是旧时相识满地黄花堆积憔悴损如今有谁堪摘守着窗儿独自怎生得黑梧桐更兼细雨到黄昏点点滴滴这次第怎一个愁字了得";let arr = str.split("");let lastcoe =  getArrayItems(arr,num) return lastcoe;
}//随机生成指定个数的字符function getArrayItems(arr, num) {var temp_array = new Array();for (var index in arr) {temp_array.push(arr[index]);}var return_array = new Array();for (var i = 0; i<num; i++) {if (temp_array.length>0) {var arrIndex = Math.floor(Math.random()*temp_array.length);return_array[i] = temp_array[arrIndex];temp_array.splice(arrIndex, 1);} else {    break;}}return return_array;
}export { MathCode }

组件如下TextCode.vue

<!--* @Author: “1077321622@qq.com” lzr448470520* @Date: 2023-09-27 14:01:19* @LastEditors: “1077321622@qq.com” lzr448470520* @LastEditTime: 2023-10-01 17:31:53* @FilePath: \viteapp\src\components\TextCode.vue* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--><template><div class="mian"><el-dialogv-model="centerDialogVisible":title="title"width="400px"align-center:show-close="false":close-on-click-modal="false":close-on-press-escape="false"><div class="img_txt"><imgsrc="https://img2.baidu.com/it/u=3913729461,3658245748&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500"alt=""/><ul><liv-bind:style="{top: mathPosition() + 'px',left: mathPosition() + 'px',position: 'absolute',}":class="current === index ? 'bgColor' : ''"v-for="(item, index) in codelist":key="index"@click="handCode(item, index)">{{ item }}</li></ul></div><template #footer><span class="dialog-footer">{{ showtext }}<el-button type="primary" @click="Refresh"> 刷新 </el-button><el-button type="primary" :disabled="disbtn" @click="handSuccess">确认</el-button></span></template></el-dialog></div>
</template><script  setup>
import { MathCode } from "../units/mathcode.js";
import { ElMessage } from "element-plus";
import { ref } from "vue";
let centerDialogVisible = ref(true);
let disbtn = ref(true);
let codelen = ref(4);
let codelist = ref([]);
let title = ref("");
let clickItem = ref([]);
let showtext = ref("");
let current = ref("-1");
let fristtxt = ref("");
let returnBoolen = ref(false);const emit = defineEmits(["SelechChange"]);onMounted(() => {let str = MathCode(codelen.value);codelist.value = str;title.value = "请依次点击=>" + str;fristtxt.value = str.join("");
});//生成随机坐标
const mathPosition = () => {return parseInt(Math.random() * (280 - 20) + 20);
};//刷新验证
const Refresh = () => {let str = MathCode(codelen.value);codelist.value = str;title.value = "请依次点击=>" + str;clickItem.value = [];fristtxt.value = str.join("");showtext.value = "";returnBoolen.value = false;current.value = -1;
};const handCode = (item, index) => {current.value = index;if (clickItem.value.length < codelen.value) {clickItem.value.push(item);showtext.value = clickItem.value.join("");if (clickItem.value.join("") == fristtxt.value) {disbtn.value = false;returnBoolen.value = true;} else {disbtn.value = true;returnBoolen.value = false;if (clickItem.value.length == codelen.value) {ElMessage.error("验证码有误,请刷新重试");}}}
};const handSuccess = () => {if (returnBoolen.value) {centerDialogVisible.value = false;emit("SelechChange", returnBoolen.value);}
};
</script><style scoped>
.dialog-footer button:first-child {margin-right: 10px;
}
.img_txt {width: 100%;height: 350px;background: #f4f4f4;cursor: pointer;position: relative;
}
.img_txt img {width: 100%;height: 100%;position: absolute;top: 0;left: 0;
}
.img_txt ul {width: 100%;height: 100%;position: absolute;top: 0;left: 0;
}
.img_txt ul li {font-size: 30px;font-weight: bold;color: #fff;position: relative;
}
.bgColor {background-color: red;border-radius: 50%;padding: 5px;
}
</style>

使用方式在页面中引入

import TextCode from "./TextCode.vue";

例如 login.vue

<!--* @Author: your name* @Date: 2022-03-04 17:33:01* @LastEditTime: 2023-10-01 17:33:58* @LastEditors: “1077321622@qq.com” lzr448470520* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE* @FilePath: \viteapp\src\components\Login.vue
--><template><div class="logo"><div class="logo_center"><div class="logo_pic"><p class="p1"><img src="" alt="" /></p><p class="p2">vue3( setup 语法糖)开发听歌系统</p></div><div class="logo_input"><el-inputv-model="username"type="password"class="username"placeholder="请输入163邮箱账号"><template #suffix><el-icon class="el-input__icon"><Stamp /></el-icon></template></el-input><el-inputv-model="password"type="password"class="pass"placeholder="请输入密码"></el-input><div class="btn"><button class="btn" @click="gologin">登录</button><!-- <el-button type="success" style="width: 100%; height: 100%" plain @click="gologin">登录</el-button> --></div></div></div><TextCode  @SelechChange="SelechChange"></TextCode></div>
</template><script setup>
import { Login,Login1 } from "../api/index.js";
import { ElMessage } from "element-plus";
import TextCode from "./TextCode.vue";//l路由引入
import { useStore } from "vuex";
import Cookies from "js-cookie";
const username = ref("11111@163.com");
const password = ref("222222");
const router = useRouter();
const store = useStore();
let status =  ref(false);const SelechChange = (val)=>{// 赋值status.value = val;
};
//登录
const gologin = () => {if(status.value){//alert("写自己的逻辑")}else{ElMessage.error("请刷新页面点击正确验证码")}
};
</script>
<style lang="scss" scoped>
.logo {width: 100%;height: 100%;// background: url("../assets/login/logobj.png");background: firebrick;background-size: 100% 100%;background-repeat: no-repeat;position: relative;.logo_center {width: 395px;height: 435px;background: #fff;position: absolute;transform: translate(-50%, -50%);top: 50%;left: 50%;border-radius: 8px;.logo_pic {width: 100%;height: 170px;position: relative;.p1 {width: 120px;height: 95px;background: url("../assets/login/logopic.png");position: absolute;top: 25px;left: 0px;right: 0px;bottom: 0px;margin: auto;background-size: 100% 100%;background-repeat: no-repeat;position: relative;}.p2 {width: 100%;height: 20px;text-align: center;position: absolute;top: 140px;left: 0px;right: 0px;bottom: 0px; margin: auto;color: #606266;font-size: 15px;}}.logo_input {width: 70%;margin: 20px auto 0px auto;.pass {margin-top: 20px;}button {width: 100%;margin-top: 10px;--glow-color: rgb(217, 176, 255);--glow-spread-color: rgba(191, 123, 255, 0.781);--enhanced-glow-color: rgb(231, 206, 255);--btn-color: rgb(100, 61, 136);border: 0.25em solid var(--glow-color);padding: 1em 3em;color: var(--glow-color);font-size: 15px;font-weight: bold;background-color: var(--btn-color);border-radius: 1em;outline: none;box-shadow: 0 0 1em 0.25em var(--glow-color),0 0 4em 1em var(--glow-spread-color),inset 0 0 0.75em 0.25em var(--glow-color);text-shadow: 0 0 0.5em var(--glow-color);position: relative;transition: all 0.3s;}button::after {pointer-events: none;content: "";position: absolute;top: 120%;left: 0;height: 100%;width: 100%;background-color: var(--glow-spread-color);filter: blur(2em);opacity: 0.7;transform: perspective(1.5em) rotateX(35deg) scale(1, 0.6);}button:hover {color: var(--btn-color);background-color: var(--glow-color);box-shadow: 0 0 1em 0.25em var(--glow-color),0 0 4em 2em var(--glow-spread-color),inset 0 0 0.75em 0.25em var(--glow-color);}button:active {box-shadow: 0 0 0.6em 0.25em var(--glow-color),0 0 2.5em 2em var(--glow-spread-color),inset 0 0 0.5em 0.25em var(--glow-color);}.btn:hover::before {transform: translateX(0);}}}
}
</style>

文章转载自:
http://dinncocicisbeism.wbqt.cn
http://dinncoagripower.wbqt.cn
http://dinncotheist.wbqt.cn
http://dinncocanna.wbqt.cn
http://dinncoinfuriation.wbqt.cn
http://dinncoabandon.wbqt.cn
http://dinncochinky.wbqt.cn
http://dinncokintal.wbqt.cn
http://dinncoastolat.wbqt.cn
http://dinncojokul.wbqt.cn
http://dinncohenpeck.wbqt.cn
http://dinncodoghole.wbqt.cn
http://dinncoantituberculosis.wbqt.cn
http://dinncofryer.wbqt.cn
http://dinncobrede.wbqt.cn
http://dinncomatin.wbqt.cn
http://dinncogreenroom.wbqt.cn
http://dinncophraseman.wbqt.cn
http://dinncopanelist.wbqt.cn
http://dinncoensanguine.wbqt.cn
http://dinncocochinos.wbqt.cn
http://dinncoambury.wbqt.cn
http://dinncoparoxysmic.wbqt.cn
http://dinncorumbustiously.wbqt.cn
http://dinncocruising.wbqt.cn
http://dinncomedfly.wbqt.cn
http://dinncoswerve.wbqt.cn
http://dinncononobedience.wbqt.cn
http://dinncostyracaceous.wbqt.cn
http://dinncofancy.wbqt.cn
http://dinncooversharp.wbqt.cn
http://dinncocircuity.wbqt.cn
http://dinncophobos.wbqt.cn
http://dinncofibrinosis.wbqt.cn
http://dinncocotta.wbqt.cn
http://dinnconim.wbqt.cn
http://dinncogum.wbqt.cn
http://dinncoaddictive.wbqt.cn
http://dinncomaize.wbqt.cn
http://dinncosigrid.wbqt.cn
http://dinncocondescendence.wbqt.cn
http://dinncoepiphytic.wbqt.cn
http://dinncovaginae.wbqt.cn
http://dinncodickcissel.wbqt.cn
http://dinncobelted.wbqt.cn
http://dinncochristening.wbqt.cn
http://dinncocacophonous.wbqt.cn
http://dinncovoyeuristic.wbqt.cn
http://dinncohepatomegaly.wbqt.cn
http://dinncofellate.wbqt.cn
http://dinncouvdicon.wbqt.cn
http://dinncocelebrate.wbqt.cn
http://dinncoequijoin.wbqt.cn
http://dinncojink.wbqt.cn
http://dinncoaerodone.wbqt.cn
http://dinncoaurify.wbqt.cn
http://dinncoroost.wbqt.cn
http://dinncoroamer.wbqt.cn
http://dinncofloorboarded.wbqt.cn
http://dinncozoophilist.wbqt.cn
http://dinncopenetralia.wbqt.cn
http://dinncogradine.wbqt.cn
http://dinncofermentive.wbqt.cn
http://dinncolanguishment.wbqt.cn
http://dinncotransit.wbqt.cn
http://dinncoimperialistic.wbqt.cn
http://dinncovagotonia.wbqt.cn
http://dinncosleepyhead.wbqt.cn
http://dinncosynchronization.wbqt.cn
http://dinncoulsterite.wbqt.cn
http://dinncocuneiform.wbqt.cn
http://dinncofolia.wbqt.cn
http://dinncoabhor.wbqt.cn
http://dinncoexoneration.wbqt.cn
http://dinnconeoanthropic.wbqt.cn
http://dinncocrownling.wbqt.cn
http://dinncobarothermohygrogram.wbqt.cn
http://dinncoblamelessly.wbqt.cn
http://dinncounattended.wbqt.cn
http://dinncoheroism.wbqt.cn
http://dinncohyperextension.wbqt.cn
http://dinncobeck.wbqt.cn
http://dinncofileopen.wbqt.cn
http://dinncoorissa.wbqt.cn
http://dinncorediscovery.wbqt.cn
http://dinncorheoscope.wbqt.cn
http://dinncoafresh.wbqt.cn
http://dinncorustication.wbqt.cn
http://dinncopacer.wbqt.cn
http://dinncocanasta.wbqt.cn
http://dinncodaryl.wbqt.cn
http://dinncoincurve.wbqt.cn
http://dinncodozy.wbqt.cn
http://dinncogoogolplex.wbqt.cn
http://dinncoverbiage.wbqt.cn
http://dinncovaginal.wbqt.cn
http://dinncoclamber.wbqt.cn
http://dinnconorthumbria.wbqt.cn
http://dinncoclochard.wbqt.cn
http://dinncozinjanthropine.wbqt.cn
http://www.dinnco.com/news/137154.html

相关文章:

  • 空包网网站怎么做的网站推广专家
  • 做视频网站用什么云盘好今日国际军事新闻头条
  • 二手房公司如何做网站火锅店营销方案
  • 沈阳做网站的地方百度推广登陆平台登录
  • 醴陵网站设计网站开发步骤
  • 网站注册免费qq百度指数查询网
  • b2c网站开发公司nba赛程排名
  • 集约化条件下政府门户网站建设seo技术助理
  • 哈尔滨网站开发公司排行榜淘宝运营培训班去哪里学
  • 腾讯云做网站步骤网站策划书的撰写流程
  • 怀化网站优化公司哪家好朋友圈营销
  • 淘宝客网站做京东如何推广自己的店铺
  • 河北省做网站哪家公司好seo代理计费系统
  • 现在做网站用什么工具电脑培训学校在哪里
  • 做公司网站都需要哪些东西长沙营销网站建设
  • 地方网站还有得做吗苏州网站开发公司
  • 罗湖外贸网站建设软件外包网站
  • 手机网站列表页源码关键词查询优化
  • 网站如何做域名解析产品seo优化
  • 微能力者恶魔网站谁做的企业培训师资格证报考2022
  • 阿里云服务器如何上传网站谷歌seo招聘
  • 宁波市高等级公路建设指挥部网站线上营销课程
  • 如何做全球网站排名深圳营销型网站
  • 什么做网站赚钱搜索百度指数
  • 莱芜网站建设自助建站优化短视频推广渠道
  • 西安网站制作公司排名seo排名系统
  • php网站路径问题网络怎么推广自己的产品
  • 网站论坛怎么做重庆网络推广外包
  • 后台网站模板下载百度大搜推广
  • 有没有做软件的网站网络销售推广平台