<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[github_38928905的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/github_38928905</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; github_38928905]]></copyright><item><title><![CDATA[uniapp项目中使用echarts]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/157513039</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/157513039</guid><author>github_38928905</author><pubDate>Thu, 29 Jan 2026 17:18:46 +0800</pubDate><description><![CDATA[因为多处使用，所以我这里直接采用封装组件的方式。({...})]]></description><category></category></item><item><title><![CDATA[小城序swiper高度设置动态跟随图片高度]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/156020098</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/156020098</guid><author>github_38928905</author><pubDate>Wed, 17 Dec 2025 16:07:10 +0800</pubDate><description><![CDATA[场景，一个页面里面多个轮播，且图片数据由后台控制
自己定义组件mySwiper
mySwiper.js
调用]]></description><category></category></item><item><title><![CDATA[主题风格配置开发]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/129831768</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/129831768</guid><author>github_38928905</author><pubDate>Wed, 29 Mar 2023 16:26:10 +0800</pubDate><description><![CDATA[副主题色data(){return {},methods:{]]></description><category></category></item><item><title><![CDATA[input[type=file]上传图片的兼容问题]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/113368438</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/113368438</guid><author>github_38928905</author><pubDate>Wed, 08 Mar 2023 11:56:09 +0800</pubDate><description><![CDATA[环境：系统浏览器
先测试一段代码：
&lt;h2&gt;普通&lt;/h2&gt; 可多选
&lt;input type="file" /&gt;

&lt;h2&gt;相机&lt;/h2&gt; Android仅文件  iOS仅相机
&lt;input type="file" capture="camera" /&gt;

&lt;h2&gt;文件&lt;/h2&gt; 可多选
&lt;input type="file" accpet="image/*" /&gt;

&lt;h2&gt;相机文件&lt;]]></description><category></category></item><item><title><![CDATA[react+antd动态设置table最大滚动高度]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/129285338</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/129285338</guid><author>github_38928905</author><pubDate>Wed, 01 Mar 2023 17:24:16 +0800</pubDate><description><![CDATA[场景，无论页面中添加多少元素，始终让table的高度自适应，这样在table设置了最大高度的情况，页面不用再出现多条滚动条。]]></description><category></category></item><item><title><![CDATA[v3+ts 中定义全局方法]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/129042949</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/129042949</guid><author>github_38928905</author><pubDate>Wed, 15 Feb 2023 14:31:51 +0800</pubDate><description><![CDATA[types文件夹下新建 global.d.ts。在util.js定义方法。扩展类型，否则打包报错。2)script 中使用。]]></description><category></category></item><item><title><![CDATA[小程序API调用问题]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/124703762</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/124703762</guid><author>github_38928905</author><pubDate>Wed, 11 May 2022 10:41:01 +0800</pubDate><description><![CDATA[开发中发现小程序一些API调用有限制导致程序不能正常流程走，下面记录一些常见的，开发时注意预防。
一、调用限制问题
接口调用频率规范

文档有几点优化方法：

1.获取定位信息 wx.getLocation
最开始是程序中多个页面拿到准确的定位地址，用的这个所以报错了。
还有使用了腾讯地图的地址逆解析(qqmap-wx-jssdk1.min.js)，里面逻辑也有调用wx.getLocation。
var QQMapWX = require('./qqmap-wx-jssdk1.min.js');
     ]]></description><category></category></item><item><title><![CDATA[实现微信小程序上传视频的注意事项]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/123127834</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/123127834</guid><author>github_38928905</author><pubDate>Fri, 25 Feb 2022 11:02:47 +0800</pubDate><description><![CDATA[小程序选择视频方法
根据官网的建议
文档原文：
拍摄视频或从手机相册中选视频。此接口不再更新，建议使用 wx.chooseMedia

，所以我这里使用的是 wx.chooseMedia
wx.chooseMedia 需要关注

sizeType属性，


但是测试后发现：
使用 wx.chooseMedia 选择视频时，sizeType的参数配置[‘compressed’]时，如果视频文件是来自【从手机相册选择】则会压缩；如果视频文件来自相机【拍摄】则该属性无效；
注意：【拍摄】sizeType属性虽无效]]></description><category></category></item><item><title><![CDATA[微信小程序wx.startLocationUpdateBackground(Object object)]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/123043340</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/123043340</guid><author>github_38928905</author><pubDate>Mon, 21 Feb 2022 11:15:46 +0800</pubDate><description><![CDATA[wx.startLocationUpdateBackground(Object object)

开启小程序进入前后台时均接收位置消息，需引导用户开启授权。授权以后，小程序在运行中或进入后台均可接受位置消息变化。
使用注意：
1） app.json配置
"requiredBackgroundModes": [
    "location"
   ]

2）小程序位置信息授权开通【使用小程序期间和离开小程序后】
3）该方法需要真机调试

...]]></description><category></category></item><item><title><![CDATA[微信小程序wx.getLocation定位错误信息汇总(腾讯地图 reverseGeocoder 错误返回也同)]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/121495228</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/121495228</guid><author>github_38928905</author><pubDate>Tue, 23 Nov 2021 15:53:15 +0800</pubDate><description><![CDATA[安卓：

系统没开启定位，无提示
message: "getLocation:fail:ERROR_NOCELL&amp;WIFI_LOCATIONSWITCHOFF"
status: 1000

系统未授权微信定位，无提示
message: "getLocation:fail system permission denied"
status: 1000


小程序未授权定位，无提示
message: "getLocation:fail auth deny"
status: 1000

ios:

系统没开]]></description><category></category></item><item><title><![CDATA[小程序wx.chooseContact获取通讯录，报错提示【你选的手机号码格式错误，请重新选择】]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/121284396</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/121284396</guid><author>github_38928905</author><pubDate>Fri, 12 Nov 2021 11:19:36 +0800</pubDate><description><![CDATA[测试中发现部分手机（集中在安卓机）出现该问题
检查后发现，该问题手机未开通微信访问通讯录的权限，而我们小程序中并不能感知这种程度的权限，所以开始没有发现问题。
优化：
在错误提示上备注一下让对方检查微信访问通讯录的权限，确保开通

...]]></description><category></category></item><item><title><![CDATA[微信小程序做图片压缩]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/120910838</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/120910838</guid><author>github_38928905</author><pubDate>Fri, 22 Oct 2021 18:25:49 +0800</pubDate><description><![CDATA[功能期望：图片需要压缩至100KB以下
注意：
1 下方用大小判断是80kb，为了防止图片输出是其大小变化有误差；
2 canvas 的大小一定要动态设置，不能写死
3 为了防止用于压缩的canvas影响页面，将其绝对定位到其他地方
&lt;!-- 页面中写，用于图片压缩 --&gt;
&lt;canvas  canvas-id="myCanvas"
  style="position:fixed;right:-{{canvasW/1+300}}px;bottom:{{canvasH/1+1000}}px;]]></description><category></category></item><item><title><![CDATA[elementUI动态添加校验规则]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/118568335</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/118568335</guid><author>github_38928905</author><pubDate>Thu, 08 Jul 2021 10:58:25 +0800</pubDate><description><![CDATA[场景：点击【添加】或删除的时候改变数组，数组格式
data(){
  return {
		formData:{
			groupIdList:[]//[12,23,34]
		},
		rules:[
		  'groupId': [
            { required: true, message: '请选择客群', trigger: 'change' },
            { required: true, message: '请选择客群', trigger: 'blur' },
 ]]></description><category></category></item><item><title><![CDATA[小程序原生开发常用]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/116647672</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/116647672</guid><author>github_38928905</author><pubDate>Thu, 24 Jun 2021 14:55:41 +0800</pubDate><description><![CDATA[独立页面设置顶部标题
index.json
  "navigationBarTitleText":"个人中心",

设置组件受页面wxss的影响
组件样式隔离 styleIsolation
通常公共样式写在app.wxss中，通常情况开发组件，组件与页面的样式是隔断的，所以会有“app.wxss的样式在组件不起效”的疑问。
设置 在 组件的 json 中设置   “styleIsolation”: “apply-shared”,即可让app.wxss样式在该组件生效。
具体的其他情况的值设置，配置位置根据基]]></description><category></category></item><item><title><![CDATA[小程序使用npm包]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/116307352</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/116307352</guid><author>github_38928905</author><pubDate>Fri, 30 Apr 2021 17:37:18 +0800</pubDate><description><![CDATA[1 、开发工具 【详情-》本地设置 -》使用npm模块】
2、手动初始化package.json
通常npm下载包的时候会自动初始化，但是当你下载包后也没有package.json文件的时候，手动创建：
npm init

注意：这里是一定要有的，没有的话下面点击构建的时候会报没有找到可构建npm包
3、下载所需包
npm i 包名 --production

4、开发工具中的工具，点击构建npm

...]]></description><category></category></item><item><title><![CDATA[小程序自动定位获取地址信息]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/112565264</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/112565264</guid><author>github_38928905</author><pubDate>Wed, 13 Jan 2021 14:55:33 +0800</pubDate><description><![CDATA[业务场景：需要用户进入小程序的时候获取用户的当前位置信息（经纬度，省市区等）。

小程序API方案：
小程序本身有提供API获取定位wx.getLocation(Object object)，不过该方法只能获取到经纬度。
百度地图API
1)百度地图开放平台注册账号；
2)然后，创建小程序应用：

3)最后得到ak;
4）相关配置可以查看这里，然后下载【百度地图微信小程序JavaScript API】，配置中有链接。
5)小程序后台配置服务器域名：https://api.map.baidu.com
6)小程]]></description><category></category></item><item><title><![CDATA[js压缩图片]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/111692275</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/111692275</guid><author>github_38928905</author><pubDate>Fri, 25 Dec 2020 17:07:33 +0800</pubDate><description><![CDATA[将传进来的文件对象压缩为一个设定的宽度；小于就不压缩，避免模糊
dealImage:function(fileObj, callback){
            var arg={width:1000};
            var file = fileObj;
            if(file) {
              var src = window.URL.createObjectURL(file);//PS:不兼容IE
              var img = new ]]></description><category></category></item><item><title><![CDATA[处理input file限制只能拍照不能选图库]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/111596638</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/111596638</guid><author>github_38928905</author><pubDate>Wed, 23 Dec 2020 18:47:25 +0800</pubDate><description><![CDATA[&lt;input type="file" class="ComImgFileObj" capture="camera" accept="image/*"/&gt;


]]></description><category></category></item><item><title><![CDATA[问题整理]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/110441217</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/110441217</guid><author>github_38928905</author><pubDate>Tue, 01 Dec 2020 17:50:05 +0800</pubDate><description><![CDATA[for循环 给数组push值
需求：循环像数组push对象（不一样）；
问题现象：数组里面的所有对象一样；
代码（大概形式）：
【大概形式就是下面这样，但实际上getValue里面的逻辑更多。下面这段代码不能复现出来】
var detailArr=[{name:"张三",age:12},{name:"张四",age:8}];
      var getValue=function(obj){
        return obj;
      }
      var itemRes = null;
    ]]></description><category></category></item><item><title><![CDATA[小程序做注册登录功能]]></title><link>https://blog.youkuaiyun.com/github_38928905/article/details/109527596</link><guid>https://blog.youkuaiyun.com/github_38928905/article/details/109527596</guid><author>github_38928905</author><pubDate>Mon, 30 Nov 2020 15:59:12 +0800</pubDate><description><![CDATA[1 获取用户信息
这里主要存一些姓名头像等相关：
通过 wx.getUserInfo 获取：
{"nickName":"XXX","gender":2,"language":"zh_CN","city":"Guangzhou","province":"Guangdong","country":"China","avatarUrl":"https://XXX"}


]]></description><category></category></item></channel></rss>