<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[moshark的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/moshark</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; moshark]]></copyright><item><title><![CDATA[百度提前批 前端 企业运营部 二面 面经分享]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/119745037</link><guid>https://blog.youkuaiyun.com/moshark/article/details/119745037</guid><author>moshark</author><pubDate>Tue, 17 Aug 2021 00:09:38 +0800</pubDate><description><![CDATA[面试时间：2021.8.16
自我介绍
聊之前项目（使用的框架，遇到的问题，如何解决，有啥看法感悟）（感觉面试官自己也不知道问啥，所以这里就聊了足足半小时…）
Vue和React的区别你有什么看法
编程题
//结构定义
function TreeNode(v) {
    this.val = v;
    this.left = this.right = null;
}
//设置根节点
const root = new TreeNode(1);
root.left = new TreeNode(2);
r]]></description><category></category></item><item><title><![CDATA[百度提前批 前端 企业运营部 一面 面经分享]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/119697294</link><guid>https://blog.youkuaiyun.com/moshark/article/details/119697294</guid><author>moshark</author><pubDate>Sat, 14 Aug 2021 10:47:30 +0800</pubDate><description><![CDATA[面试时间：2021.8.12
面试官是一个小姐姐，约的晚上7点
(因为自己也在实习，没有其他时间了，跟她反复道歉 囧）
了解信息
自我介绍
为什么选择前端
看了哪些书，有什么感受
foreach如何跳出循环
（当时谈到我提到foreach内部不能使用continue和break会报错,使用return会跳过本次循环，她就问我那如果想跳有啥办法吗，我说如果是我的话如果存在这种需求可能在之前就不会使用foreach，会规避这个问题）
后来搜索后发现可以通过try - catch的特性将foreach包裹在内部来]]></description><category></category></item><item><title><![CDATA[小说网站 数据库]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/106732714</link><guid>https://blog.youkuaiyun.com/moshark/article/details/106732714</guid><author>moshark</author><pubDate>Fri, 30 Jul 2021 10:18:37 +0800</pubDate><description><![CDATA[小说网站数据库的建立
一、创建数据库
create database novel;

二、数据表的建立
小说表
create table `n_book`(
	`book_id` int auto_increment,
	`book_name` char(10) unique not null,
	`book_intro` tinytext not null,
	`book_author_id` int,
	`book_class_id` int,  
	`book_star` int default 0,]]></description><category></category></item><item><title><![CDATA[字节跳动 前端 面经 实习-基础架构]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/119003947</link><guid>https://blog.youkuaiyun.com/moshark/article/details/119003947</guid><author>moshark</author><pubDate>Mon, 26 Jul 2021 18:05:14 +0800</pubDate><description><![CDATA[面试时间：2021.7.21
一面

node的模块加载流程
commonjs和es6模块加载的区别
vue的nexttick函数的作用 底层如何实现的
问了一下项目的爬虫实现
说一下微信小程序的rpx，那计算出来0.5px就渲染0.5px吗
跨域方式，如果跨域发生，服务器返回的是什么呢？
displaynone 和visibility hidden区别 是否存在与dom tree中呢 将他们显示出来会发生什么
完成一个计算梯度税费的函数

// Calculate the tax owed on a sa]]></description><category></category></item><item><title><![CDATA[字节跳动 前端 面经 实习-国际化短视频]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/118091974</link><guid>https://blog.youkuaiyun.com/moshark/article/details/118091974</guid><author>moshark</author><pubDate>Tue, 22 Jun 2021 00:18:41 +0800</pubDate><description><![CDATA[一面
1、CSS选择器有哪些、优先级如何
注意一下兄弟、父子选择器的优先级
2、position有哪些取值？absolute和fixed的区别
3、说一下移动端viewport
4、Vue的响应式原理，以及为什么不能检测到对象、数组内部的变化应该如何处理
5、改错题：
下面代码存在一些问题，请指出问题并改正
var coder = {
    name: " jsCoder",
    skill: ["css3","html5", "es6", "react", "angular", "vue"],
  ]]></description><category></category></item><item><title><![CDATA[export 和 export default 的使用]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/108686574</link><guid>https://blog.youkuaiyun.com/moshark/article/details/108686574</guid><author>moshark</author><pubDate>Sat, 19 Sep 2020 22:02:55 +0800</pubDate><description><![CDATA[转载一篇博客，对该关键字的用法讲解的很详细，用以记录学习。
https://www.cnblogs.com/fanyanzhao/p/10298543.html

]]></description><category></category></item><item><title><![CDATA[Mysql查询当结果集为空时（无结果）的返回值]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/106871190</link><guid>https://blog.youkuaiyun.com/moshark/article/details/106871190</guid><author>moshark</author><pubDate>Sat, 20 Jun 2020 13:29:39 +0800</pubDate><description><![CDATA[在作者表中查询作者名为 “我吃西红”（表中不存在）的记录
$author_name = "我吃西红";
$sql = "select `author_id` from `n_author` where `author_name` = '$author_name'";
$rs = execQuery($sql,$link);
if($rs==null)echo "return is null &lt;br&gt;";
if($rs=="")echo "return is empty &lt;br&gt;";
]]></description><category></category></item><item><title><![CDATA[uniapp request报错 request fail abort statusCode:-1]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/106827195</link><guid>https://blog.youkuaiyun.com/moshark/article/details/106827195</guid><author>moshark</author><pubDate>Thu, 18 Jun 2020 11:46:09 +0800</pubDate><description><![CDATA[在H5端调试一切正常，真机调试就报错。
后来发现，请求地址是本地局域网，手机需要用wifi连接该网络才能成功请求。

]]></description><category></category></item><item><title><![CDATA[uniapp项目中store模式的使用]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/106196823</link><guid>https://blog.youkuaiyun.com/moshark/article/details/106196823</guid><author>moshark</author><pubDate>Mon, 18 May 2020 17:54:33 +0800</pubDate><description><![CDATA[安装Vuex
hbuilderx中，右键项目，使用命令行窗口打开所在目录，（若未安装插件会提示安装），输入   npm install vuex --save
创建Store
在项目下新建目录store，在目录下新建文件store.js（注意，此处为js文件而非vue），可将state、mutations等写在该文件内。也可将store.js拆分成多个文件，最后在index.js中引用，如下
这里只简单举例单文件store.js的创建
//引用Vuex
import Vue from 'vue'
impor]]></description><category></category></item><item><title><![CDATA[Vue中 常用的命名规范]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/106165632</link><guid>https://blog.youkuaiyun.com/moshark/article/details/106165632</guid><author>moshark</author><pubDate>Sat, 16 May 2020 21:47:00 +0800</pubDate><description><![CDATA[组件名
官方推荐的组件名是 每个单词首字母大写（PascalCase） 或者 全小写用 - 连接（kebab-case）。在DOM中使用的时候， 改为全小写， 单词之间用 - 连接。
Vue.component('MyComponent', {})；
 或者     
Vue.component('my-component', {}); 

import MyComponent from 'MyComponent.vue'; 
export default {
	       name: 'MyCompon]]></description><category></category></item><item><title><![CDATA[理解 JavaScript 的 async/await]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/105494663</link><guid>https://blog.youkuaiyun.com/moshark/article/details/105494663</guid><author>moshark</author><pubDate>Mon, 13 Apr 2020 19:08:28 +0800</pubDate><description><![CDATA[async 和 await 在干什么
任意一个名称都是有意义的，先从字面意思来理解。async 是“异步”的简写，而 await 可以认为是 async wait 的简写。所以应该很好理解 async 用于申明一个 function 是异步的，而 await 用于等待一个异步方法执行完成。
另外还有一个很有意思的语法规定，await 只能出现在 async 函数中。然后细心的朋友会产生一个疑问，如...]]></description><category></category></item><item><title><![CDATA[微信云开发时小程序端调用数据库remove()方法报错]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/105316744</link><guid>https://blog.youkuaiyun.com/moshark/article/details/105316744</guid><author>moshark</author><pubDate>Sat, 04 Apr 2020 21:02:41 +0800</pubDate><description><![CDATA[在小程序端按照文档写法调用remove()却报错了。
errCode: -1  | errMsg: query.remove is only available in server SDK / API;at api showActionSheet success callback function
Error: errCode: -1  | errMsg: query.remove is only...]]></description><category></category></item><item><title><![CDATA[Node.js  request模块 将body解析为json（附request参数）]]></title><link>https://blog.youkuaiyun.com/moshark/article/details/105164262</link><guid>https://blog.youkuaiyun.com/moshark/article/details/105164262</guid><author>moshark</author><pubDate>Sat, 28 Mar 2020 17:24:04 +0800</pubDate><description><![CDATA[node.js开发时，用request模块爬取京东商品价格信息返回的是

显然是个json数组，但是用body[0].p却没有返回值，最开始百度发现header里应该要加上 “content-type”: “application/json”，但是仍然没有返回值。最后查到应该还要给request添加个json：true属性

这样，就可以成功返回想要的p:“2299”了。

最后，附上reques...]]></description><category></category></item></channel></rss>