<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Allanwhy的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Allanwhy</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Allanwhy]]></copyright><item><title><![CDATA[vue移动端input上传视频、音频]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/98873523</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/98873523</guid><author>Allanwhy</author><pubDate>Thu, 08 Aug 2019 15:45:24 +0800</pubDate><description><![CDATA[vue移动端input上传视频、音频

html部分

&lt;div class="title"&gt;现场视频&lt;/div&gt;
       &lt;div class="upLoad"&gt;
           &lt;label for="pop_video" id="labelr"&gt;
               &lt;video id="videoId" contr...]]></description><category></category></item><item><title><![CDATA[小程序上传视频]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/98215896</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/98215896</guid><author>Allanwhy</author><pubDate>Fri, 02 Aug 2019 17:34:05 +0800</pubDate><description><![CDATA[小程序上传视频.js文件.wxml.wxss
.js文件
// miniprogram/pages/message/messageForm/messageForm.js
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
    webServer: 'https://xxxx.xxx.com',
    src: '',
    webviewshow: 'hide',...]]></description><category></category></item><item><title><![CDATA[获取地理位置定位信息-app端]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/96429987</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/96429987</guid><author>Allanwhy</author><pubDate>Thu, 18 Jul 2019 14:21:08 +0800</pubDate><description><![CDATA[获取地理位置定位信息-app端
getLoad() {
    let site = {}
    let onSuccess = (position) =&gt; {
        site.code = 0
        //获取经纬度
        site.position = [position.coords.longitude, position.coords.latitude]...]]></description><category></category></item><item><title><![CDATA[js 根据当天日期获取本周信息]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/95506718</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/95506718</guid><author>Allanwhy</author><pubDate>Thu, 18 Jul 2019 14:14:18 +0800</pubDate><description><![CDATA[js 根据当天日期获取本周信息
function getDates() {
    var new_Date = new Date()
    var timesStamp = new_Date.getTime();
    var currenDay = new_Date.getDay();
    var dates = [];
    for(var i = 0; i &lt; 7; i++...]]></description><category></category></item><item><title><![CDATA[vue 导航守卫]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/90605293</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/90605293</guid><author>Allanwhy</author><pubDate>Mon, 27 May 2019 16:08:02 +0800</pubDate><description><![CDATA[全局前置守卫
你可以使用 router.beforeEach 注册一个全局前置守卫：
const router = new VueRouter({ ... })

router.beforeEach((to, from, next) =&gt; {
  // ...
  console.log(from)//从哪儿跳转过来的 path:"/" .从"/" 跳转过来！
  //{name: null...]]></description><category></category></item><item><title><![CDATA[【520】移动端上传图片功能(二)]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/90386760</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/90386760</guid><author>Allanwhy</author><pubDate>Tue, 21 May 2019 00:22:44 +0800</pubDate><description><![CDATA[base64转file
核心部分
这部分主要是将input type=file获取到的base64码转成file形式,一般看情况，如果后端需要base64，辣么就不用转啦，直接用。
dataURLtoFile(dataurl,filename) {//将base64转换为文件 (base64, 'jpg/png/gif')
   var arr = dataurl.split(','), mime...]]></description><category></category></item><item><title><![CDATA[【案例】移动端上传图片功能(一)]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/90299867</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/90299867</guid><author>Allanwhy</author><pubDate>Fri, 17 May 2019 20:17:01 +0800</pubDate><description><![CDATA[核心部分(.html)

 window.onload = function() {
     let fileTag = document.getElementById('file');
      // console.log(fileTag)
      // console.log(this.pic)
      let that = this
      
      fileTag....]]></description><category></category></item><item><title><![CDATA[数组对象去重【其二】]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/90018665</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/90018665</guid><author>Allanwhy</author><pubDate>Thu, 09 May 2019 09:09:44 +0800</pubDate><description><![CDATA[一个数组中有多个对象，如何将对象属性相同的进行去重？

类似于这样

arr = [
   {
       a: '1',
       b: 'q1'
   },
   {
       a: '2',
       b: 'q2'
   },
   {
       a: '1',
       b: 'q3'
   },
   {
       a: '1',
       b: 'q4'...]]></description><category></category></item><item><title><![CDATA[日常搞笑（一）]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89925005</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89925005</guid><author>Allanwhy</author><pubDate>Tue, 07 May 2019 17:08:44 +0800</pubDate><description><![CDATA[日常探讨一个色调问题

同事：这个按钮的颜色不对啊~
ME：取色就是这样滴~
同事：这个绿的颜色太暗了
ME：绿  有很多种啊，你要哪种绿
同事：要绿的发光的那种



...]]></description><category></category></item><item><title><![CDATA[CSS 手写按钮]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89921321</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89921321</guid><author>Allanwhy</author><pubDate>Tue, 07 May 2019 15:03:38 +0800</pubDate><description><![CDATA[CSS 手写按钮

HTML部分

&lt;template&gt;
    &lt;div id="index" @click="checked"&gt;
        &lt;div class="btn btnOff" v-if='isChecked'&gt;
            &lt;div class="raio"&gt;&lt;/div&gt;
            &lt;...]]></description><category></category></item><item><title><![CDATA[vue  懒加载]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89881027</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89881027</guid><author>Allanwhy</author><pubDate>Mon, 06 May 2019 13:59:20 +0800</pubDate><description><![CDATA[懒加载概念
对于页面有很多静态资源的情况下（比如网商购物页面），为了节省用户流量和提高页面性能，可以在用户浏览到当前资源的时候，再对资源进行请求和加载。
为什么需要懒加载？
像vue这种单页面应用，如果没有应用懒加载，运用webpack打包后的文件将会异常的大，造成进入首页时，需要加载的内容过多，时间过长，会出啊先长时间的白屏，即使做了loading也是不利于用户体验，而运用懒加载则可以将页面进行...]]></description><category></category></item><item><title><![CDATA[sessionStrorage保存、获取、清空等一些方法]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89711496</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89711496</guid><author>Allanwhy</author><pubDate>Tue, 30 Apr 2019 16:08:24 +0800</pubDate><description><![CDATA[sessionStrorage保存、获取、清空等一些方法
1、存值
sessionStorage[‘key’]=‘value’;
sessionStorage.setItem(‘key’,‘value’);
2、取值
var v=sessionStorage[‘key’];
var f=sessionStorage.getItem(‘key’);
3、删除
sessionStorage.remov...]]></description><category></category></item><item><title><![CDATA[如何搭建vue-cli脚手架开发vue项目]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89475963</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89475963</guid><author>Allanwhy</author><pubDate>Tue, 23 Apr 2019 16:45:35 +0800</pubDate><description><![CDATA[如何搭建vue-cli脚手架开发vue项目
使用vue-cli搭建vue项目，需要的本地环境是node和npm，node.jsde 安装详细可以去官网了解，安装流程清晰.地址：node.js.关于npm包的安装这里有两种形式。一种是npm，另一种是cnpm淘宝镜像。区别是：cnpm的下载速度比npm快，原因是，cnpm的服务器在国内，npm在国外，下载npm包的时候如果网络不给力，经常下不了报错。...]]></description><category></category></item><item><title><![CDATA[数组去重之数组内对象去重【其一】]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89463613</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89463613</guid><author>Allanwhy</author><pubDate>Mon, 22 Apr 2019 23:32:35 +0800</pubDate><description><![CDATA[首先得到一组需要去重的数组
toUp:[
	{questionId:1,selectContent:'满意'},
	{questionId:2,selectContent:'满意'},
	{questionId:3,selectContent:'一般'},
	{questionId:4,selectContent:'较满意'},
	{questionId:5,selectContent:'不满意'...]]></description><category></category></item><item><title><![CDATA[【前后端联调】接口传参之data:{}和params:{}]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89448175</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89448175</guid><author>Allanwhy</author><pubDate>Mon, 22 Apr 2019 11:15:52 +0800</pubDate><description><![CDATA[【前后端联调】接口传参之data:{}和params:{}使用axios请求后台接口的时候传参有两种形式使用axios的时候可以将其组件化：利于多页面引用某个页面的接口请求POST/GET方式请求将在data:{}中传值，或使用params:{}
使用axios请求后台接口的时候传参有两种形式
Axios 是一个基于 promise 的 HTTP 库，可以用在浏览器和 node.js 中。
特点：...]]></description><category></category></item><item><title><![CDATA[vue实例方法：$emit() 事件(其一)]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89434218</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89434218</guid><author>Allanwhy</author><pubDate>Sun, 21 Apr 2019 15:56:16 +0800</pubDate><description><![CDATA[理解emit是做什么用的
官方给出的解释是，触发当前事件附加参数都会传给监听器回调。。。
然后就会一大串东西了。
详情可以看官网对它 的解释：$emit()
那么就来个栗子吧~

我有两个.vue页面：shopCart页面和cartcontrol页面。
cartcontrol页面作为组件被shopCart页面应该用。
这是shopCart页面需要做的事~
import cartcontrol fr...]]></description><category></category></item><item><title><![CDATA[vue 移动端的软键盘对页面css布局影响的解决办法-底部样式被顶起]]></title><link>https://blog.youkuaiyun.com/Allanwhy/article/details/89425186</link><guid>https://blog.youkuaiyun.com/Allanwhy/article/details/89425186</guid><author>Allanwhy</author><pubDate>Sat, 20 Apr 2019 22:50:25 +0800</pubDate><description><![CDATA[vue 移动端的软键盘对页面css布局影响的解决办法-底部样式被顶起出现的问题是：输入框聚焦时，手机自带的弹出框把原来的样式顶起。OMG~解决方法：我累代码载这~
出现的问题是：输入框聚焦时，手机自带的弹出框把原来的样式顶起。OMG~
出现的效果图片是这样滴：
解决方法：
1.首先要获取整个窗口的高度；
2.找到需要聚焦的模块,我这里是input标签；
3.对input标签使用addEventLi...]]></description><category></category></item></channel></rss>