随笔分类 -  uniapp

摘要:小程序或者uniapp使用request发起请求时一般method有GET和POST,默认是下面这段(所以GET请求时这段可省略) method: "GET", header: { 'content-type': 'application/json' }, 但是用POST请求时,有两种情况,第一种: 阅读全文
posted @ 2021-10-12 22:22 赵永强 阅读(7922) 评论(0) 推荐(0)
摘要:1、页面标签 基本相同 view,text、scroll-view,input、picker、swiper等等 2、api基本相同,wx换成uni即可 原生写法:wx.request、wx.showModal、wx.showToast、wx.showLoading、wx.chooseImage、wx 阅读全文
posted @ 2021-10-09 14:53 赵永强 阅读(6609) 评论(0) 推荐(0)
摘要:let pages = getCurrentPages(); let prevPage = pages[pages.length - 2]; //上一页 prevPage['$vm'].list=[]; //修改上个页面的数据 prevPage['$vm'].dingdan(); //调用上个页面的 阅读全文
posted @ 2021-09-24 11:23 赵永强 阅读(573) 评论(0) 推荐(0)
摘要:openSocket() { //打开时的动作 uni.onSocketOpen(() => { console.log('WebSocket 已连接') this.socketStatus = 'connected' uni.showToast({ title: '实时推送已连接', icon: 阅读全文
posted @ 2021-09-24 11:17 赵永强 阅读(2531) 评论(1) 推荐(0)
摘要:<button type="primary" @click='getVerificationCode' :disabled='disabled'>{{btntxt}}</button> <script> import Vue from 'vue'; export default Vue.extend 阅读全文
posted @ 2021-09-24 10:59 赵永强 阅读(803) 评论(2) 推荐(0)
摘要:<template> <view> <canvas canvas-id="gameCanvas" style="width:750rpx; height:1232rpx;"></canvas> </view> </template> <script> export default { data() 阅读全文
posted @ 2021-09-24 10:49 赵永强 阅读(2053) 评论(0) 推荐(0)
摘要:第一步:新建文件夹services 第二步:新建文件request.ts //服务器接口地址 const baseURL:string='http://xxxxxx' //本地调试接口地址 // const baseURL:string='http://xxxxxx' // 封装公共上传图片 fun 阅读全文
posted @ 2021-08-16 16:54 赵永强 阅读(626) 评论(0) 推荐(0)
摘要:进度条提示基于uView框架,如何安装使用请查看官方文档,这里不做赘述 uView文档地址 介绍 | uView - 多平台快速开发的UI框架 - uni-app UI框架 (uviewui.com) 在App.vue中的onLaunch或者onShow里写方法获取服务器版本数据 <script l 阅读全文
posted @ 2021-07-30 15:54 赵永强 阅读(1583) 评论(0) 推荐(0)
摘要:第一步:新建文件夹services 第二步:新建文件request.ts //服务器接口地址 const baseURL:string='http://xxxxxx' //本地调试接口地址 // const baseURL:string='http://xxxxxx' // 封装公共请求方法 fun 阅读全文
posted @ 2021-06-02 12:53 赵永强 阅读(894) 评论(0) 推荐(0)
摘要:第一步:打开终端,全局安装 vue-cli npm install -g @vue/cli 或者 cnpm install -g @vue/cli 第二步:创建 uniapp, tsdemo为项目名(可以随便起) vue create -p dcloudio/uni-preset-vue tsdem 阅读全文
posted @ 2021-06-02 10:26 赵永强 阅读(3314) 评论(0) 推荐(0)