【原创】javaScript Uncaught…

Uncaught ReferenceError: $ is not defined 
解决办法 先导入jquery!
<li class="ct-li" v-for="list in checkdData" :style="{ fontSize: sliderValue + 'px' }"> <div class="ct-li-wrap"> <span>{{ list.index }} 、</span> <div class="ct-li-info"> <p>排号: <span>{{list.UserId}}</span> &nbsp;&nbsp; <span>{{processName(list.name) }}</span> &nbsp;&nbsp; <span v-if="list.States === '过号' " :key="list.index" :style="list.States === '过号' ? 'color: red;' : ''">(过号)</span> </p> <p>{{ list.Djlsh }}</p> </div> </div> </li><input type="text" placeholder=" 输入流水号回车" class="input-ct" v-model="inputDrValues" @keydown.enter="onEnters"/>mounted() { this.grilData(); this.manData(); setInterval(() => { this.grilData(); // 每5秒获取一次数据 this.manData(); }, 500000); },async onEnter(){ try{ const roomnumber = '03'; const djlsh = this.inputValue; const isExist = this.matchedData.some(data => data.Djlsh === djlsh); if(!isExist){ const url = getCt(); const CTData = await fetchCt(url, roomnumber,djlsh ); //排队完成 this.couter1++; this.matchedData.push(CTData); this.inputValue=''; }else{ console.log("该流水号输入过") } }catch(e){ console.log("排队失败"); } },async grilData(){ try{ const gender = '0'; const roomnumber = '03'; // const urls = getCtUrl(); // const CTDatas= await fetchLine(urls,roomnumber,gender); const response = await axios.get('/line.json'); //女生数据 const CTDatas = response.data; console.log("CTDatas",CTDatas); //让获得的数据按顺序来排 this.matchedData = CTDatas.data.list.filter(data => data.States !== "正在检").map((data, index) => { data.index = index +1 ; // this.couter1++; // 计数器递增 return data; }); this.matchedData.forEach(data => { if (data.States === '叫号') { console.log("叫号",data); this.startSpeech({...data, RoomNumber: roomnumber}); } }); }catch(e){ console.log("获取数据库信息失败"); } },processName(name) { if (name.length === 2) { return name[0] + '*'; } else if (name.length === 3) { return name[0] + '*' + name[2]; } else { return name; } },为什么会显示Uncaught (in promise) TypeError: name is undefined
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值