随笔分类 -  uniapp微信小程序

摘要:抽取公共方法 // 上传图片到后端服务器,uploadUrl:上传图片的接口地址,name:上传图片的字段名,filePath:上传图片的本地路径 export const fileUpload = (uploadUrl, name, filePath) => { return new Promis 阅读全文
posted @ 2025-08-14 11:59 DL·Coder 阅读(115) 评论(0) 推荐(0)
摘要:index.html 中引入微信所需要的js uni.webview.1.5.5.js:点击查看 jweixin-1.4.0.js:点击查看 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="icon" 阅读全文
posted @ 2025-07-15 19:24 DL·Coder 阅读(10) 评论(0) 推荐(0)
摘要:1、组件myChatModel.vue <template> <view class="modal-container"> <view class="modal-mask-money"></view> <view class="modal-content"> <official-account st 阅读全文
posted @ 2025-07-04 17:38 DL·Coder 阅读(32) 评论(0) 推荐(0)
摘要:<img class="qrcode" :show-menu-by-longpress="true" src="https://img95.699pic.com/photo/60017/2391.jpg_wh860.jpg" alt="pic"> 阅读全文
posted @ 2025-06-20 16:37 DL·Coder 阅读(486) 评论(0) 推荐(0)
摘要:触发 onBackPress 函数,onShow 函数不触发 onBackPress(() => { console.log('onBackPress') }) 阅读全文
posted @ 2025-04-27 13:58 DL·Coder 阅读(126) 评论(0) 推荐(0)
摘要:html 头像UI <button class="user-avatar flex-center" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> <image class="img" :src="showAvatat()" mode 阅读全文
posted @ 2024-09-03 11:32 DL·Coder 阅读(704) 评论(0) 推荐(0)
摘要:更新方法,onLaunch或者onShow(推荐写在onShow内)调用就可以 const updateManagerFn = () => { const updateManager = uni.getUpdateManager(); updateManager.onCheckForUpdate(f 阅读全文
posted @ 2024-07-18 17:29 DL·Coder 阅读(269) 评论(0) 推荐(0)
摘要:自定义样式使用第二种方式 第一种:wx.enableAlertBeforeUnload 在开发者工具中预览效果 微信小程序官网:点我 onShow(() => { wx.enableAlertBeforeUnload({ message: "返回上页时弹出对话框", success: functio 阅读全文
posted @ 2024-07-15 11:03 DL·Coder 阅读(2080) 评论(0) 推荐(0)
摘要:vue3 纯SCSS 实现环形进度条 <template> <view class="flex align-center diygw-col-24 justify-center"> <view class="progress-circle" :class="`progress-${innerPerc 阅读全文
posted @ 2024-07-02 10:22 DL·Coder 阅读(517) 评论(0) 推荐(0)
摘要:需要先设置按钮为分享按钮 <button class="to-invite bg" open-type="share" @click="toShareFn"> 分享 </button> vue2 分享 initMenu () { uni.showShareMenu({ withShareTicket 阅读全文
posted @ 2024-04-07 09:50 DL·Coder 阅读(1868) 评论(0) 推荐(0)