[置顶] vue webpack打包之后 重新修改配置文件接口API路径,无需修改代码后再打包

摘要: 用vue-cli构建的项目通常是采用前后端分离的开发模式,也就是前端与后台完全分离,此时就需要将后台接口地址打包进项目中,但是有的时候需要修改接口地址,为了避免为了修改接口地址而进行修改代码后再重新打包的繁琐,解决呢方法很多,推荐一种最便捷的方法,也是最容易操作的方法,亲测有用! 1.首先我们在pu 阅读全文

posted @ 2021-08-25 16:23 奔驰的码儿 阅读(1824) 评论(0) 推荐(0)

2025年7月7日

H5静态页面开发环境跳转小程序(微信浏览器,外部浏览器)

摘要: 一.先贴下官方开发文档,虽没能成功调起小程序,也是可以先看下的1.官方开发文档参考:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/staticstorage/jump-miniprogram.html 官方文档只提供了关 阅读全文

posted @ 2025-07-07 16:51 奔驰的码儿 阅读(717) 评论(0) 推荐(0)

2025年4月11日

Websocket实时通讯

摘要: 1 const ws = ref(null) 2 const status = ref('未连接') 3 onMounted(() => { 4 initWebSocket();//实时通讯 5 6 7 }); 8 // 实时通讯 9 // 响应式数据 10 let dataList = $ref( 阅读全文

posted @ 2025-04-11 09:28 奔驰的码儿 阅读(21) 评论(0) 推荐(0)

2025年1月9日

uniapp开发微信小程序获取用户头像、昵称和手机号一键登录

摘要: 1 <!-- 登录页面 版本一 --> 2 <!-- #ifdef MP-WEIXIN --> 3 <view class="mpwx-login column-center"> 4 <view class="loginLogo"> 5 <form @submit="onSubmit(true, $ 阅读全文

posted @ 2025-01-09 14:40 奔驰的码儿 阅读(3910) 评论(1) 推荐(1)

2025年1月4日

uni-app开发微信小程序后,解决主包过大,无法上传代码问题

摘要: 1、在开发工具HBuilderX,点击 运行>运行到模拟器>运行时是否压缩代码, 小程序运行时,这里会提示 2、所以,可以选择发行>小程序-微信 3、重新获取AppId后,继续点击发行,则会编译成功了 4、另外,在package.json文件里面加入 --minimize 最小压缩 "dev:mp- 阅读全文

posted @ 2025-01-04 11:18 奔驰的码儿 阅读(5608) 评论(1) 推荐(0)

2024年12月20日

vue3+vant-ui 上传头像,base64文件流上传及回显

摘要: 1 <script setup> 2 import { onMounted, reactive } from "vue"; 3 import { useRouter } from "vue-router"; 4 import request from '@/utils/request'; 5 imp 阅读全文

posted @ 2024-12-20 13:05 奔驰的码儿 阅读(484) 评论(0) 推荐(0)

2024年12月16日

微信小程序 uni-app piaoyi-editor 富文本上传图片失败

摘要: 1、html 1 <view class="form-input"> 2 <view class="label">{{ getText('activityDetails') }}</view> 3 <view class="richtext"> 4 <piaoyiEditor :values="va 阅读全文

posted @ 2024-12-16 08:45 奔驰的码儿 阅读(155) 评论(0) 推荐(0)

2024年12月6日

uni-app 上传头像及回显

摘要: 1 <!-- 用户头像 --> 2 <view class="form-input"> 3 <view class="label" style="display: flex; align-items: center;">{{ getText('userProfile') }}</view> 4 <v 阅读全文

posted @ 2024-12-06 15:18 奔驰的码儿 阅读(366) 评论(0) 推荐(0)

2024年11月28日

table列表 图片预览

摘要: 1 <el-table-column label="营业执照" align="center" prop="businessLicense"> 2 <template slot-scope="scope"> 3 <el-image 4 style="width: 60px; height: 60px" 阅读全文

posted @ 2024-11-28 16:25 奔驰的码儿 阅读(39) 评论(0) 推荐(0)

2024年11月18日

uni-app 返回上一页并传递下一页的值到上一页

摘要: 本页A data() { data() { return { brandSeriesStyle: {}, }; }, onShow() { console.log("this.brandSeriesStyle:",this.brandSeriesStyle); } 下一页B let pages = 阅读全文

posted @ 2024-11-18 08:43 奔驰的码儿 阅读(282) 评论(0) 推荐(0)

2024年11月14日

uniapp微信小程序video不显示,不生效

摘要: 问题描述 微信小程序开发者工具video不显示,无法播放,也没有任何错误,就是不显示 原因 报错原因:微信开发者工具调试基础库版本太高 解决方法 阅读全文

posted @ 2024-11-14 10:09 奔驰的码儿 阅读(345) 评论(0) 推荐(0)

导航