uni-app
uni-app工作记录
荷逸同学
这个作者很懒,什么都没留下…
展开
-
uni小程序自动更新
UpMpWeiXin() { if (uni.canIUse('getUpdateManager')) { const updateManager = uni.getUpdateManager() updateManager.onCheckForUpdate(function(res) { if (res.hasUpdate) { updateManager.onUpdateReady(function() { uni.showModa.原创 2022-02-18 19:16:03 · 164 阅读 · 0 评论 -
uniapp-安卓自动更新
update() { var that = this; domain.POST(api.appConfig, {}, function(res) { if (res.code == 200) { let data = res.data; plus.runtime.getProperty(plus.runtime.appid, function(inf) { if (inf.version != data.version) {原创 2022-02-14 09:47:36 · 595 阅读 · 1 评论 -
uniapp使用v-html无法解析其中的video标签
引言开发一套系统,前端官网使用v-html解析时能解析出其中的video标签,在页面上正常展示。但是使用uniapp的时候无法解析出来原因uniapp底层是封装的小程序技术。使用开发者工具观察,代码<view class="content" style="padding: 0 4vw;" v-html="content"></view>在微信开发者工具中现实的标签是,是解析富文本,如下图所示,其中带有video标签,但是并没有在页面展示出来解决方法将video标签拆分转载 2021-12-09 16:04:34 · 2408 阅读 · 0 评论 -
uni vue 替换接口 v-html的图片
formatRichText (html) { let newContent= html.replace(/<img[^>]*>/gi,function(match,capture){ match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, ''); match = match.replace(/width="[^"]+"/gi, '').replace(/wi原创 2021-09-30 15:56:55 · 221 阅读 · 0 评论 -
封装uni-app的request请求
http.jslet http = { 'setBaseUrl': (url) => { if (url.charAt(url.length - 1) === "/") { url = url.substr(0, url.length - 1) } http.baseUrl = url; }, 'header': {}, 'beforeRequestFilter': (config) => { return config }, 'beforeResponseF转载 2021-09-05 19:32:17 · 728 阅读 · 0 评论