ICode9

精准搜索请尝试: 精确搜索
  • uni-app 滑动到最右边或者触底分页加载数据2021-12-24 15:05:00

    HTML <scroll-view class="todaysDeal-scroll" :scroll-x="true" enable-flex="true" @scrolltolower="scorllClick"> <view class="todaysDeal-list" v-for="(item,index) in todaysDeal" :key=�

  • uni-app 163断线自动重连处理2021-12-24 09:03:28

    /common/free-lib/chat.js import $U from "./util.js"; import $H from './request.js'; import $store from '@/store/index.js'; class chat { constructor(arg) { this.url = arg.url this.isOnline = false this.socket = null t

  • uni-app 170邀请加入群聊(二)2021-12-22 23:01:43

    下图是我测试截图 app/controller/group.js 'use strict'; const Controller = require('egg').Controller; class GroupController extends Controller { // 获取群聊列表 async list() { const { ctx, app } = this; let current_user_id = c

  • uni-app 161朋友圈查看权限2021-12-22 20:02:03

    下图是我测试的截图 /pages/find/add-moment/add-moment.vue <template> <view class="px-3"> <!-- 导航栏 --> <free-nav-bar showBack :showRight="true"> <free-main-button name="发表" slot="right" @cli

  • uni-app个人中心2021-12-21 19:58:48

    个人中心页面 <template> <view> <view class="u-m-t-20"> <view class="center"> <view class="u-m-t-12 u-m-l-60"> <!-- <u-avatar :src="src" mode="circle" size=

  • uni 引用Image时会闪烁的问题2021-12-21 14:31:37

    使用uni时,引用图片image时,初加载时会闪一下,很影响体验,官网的介绍方法是image{will-change: transform}就可以了。 其实还不行,因为image默认都是有宽高的。把它宽高变成auto就可以了 image { will-change: transform; width: auto; height: auto;}

  • uni-app 157发布朋友圈-批量上传图片2021-12-20 21:02:02

    如下是我测试的截图 /components/free-ui/free-upload-image.vue <template> <view class="flex flex-wrap"> <view style="width: 230rpx;" v-for="(item,index) in imageList" :key='index' class="flex align-cen

  • uni-app 150朋友圈点赞功能2021-12-20 09:30:01

    /pages/find/moments/moments.vue <template> <view> <free-transparent-bar :scrollTop="scrollTop" @clickRight="clickRight"></free-transparent-bar> <view class="position-relative" style="heig

  • uni-app: APP平台的uni.getLocation前进行授权判断2021-12-18 11:58:17

    引用插件:App平台的授权判断方式,另见:App权限判断和提示 - DCloud 插件市场 import permision from '../../js_sdk/wa-permission/permission'; onload onLoad(option) { // #ifdef APP-PLUS this.isIos = plus.os.name == 'iOS'; // #endif }, method //安卓的判

  • uniapp-登录成功之后返回对应的页面2021-12-18 09:30:45

    我们有这样一个需求,就是初次进入页面我们不需要登录,但是如果进入到某个详情页,需要下单,或者填写收发货地址等,我们需要返回到登录页去登录,登录成功之后,再次返回对应的下单页面或者收发货地址页面 比如我们有这样四个页面,一个是首页,一个是首页详情页,一个订单页,一个是登录页(注意登

  • uniapp 小程序支付功能2021-12-16 19:02:35

    项目需求 项目生成订单,需要用户通过小程序进行支付。 解决方案 使用uni.requestPayment(),调用小程序中的付款功能。 <script> export default { data() { return { request:{ id:xxxxx, info:'xxxx' } } }, onLoad() { },

  • uni-app控件学习总结2021-12-16 18:04:29

    控件: 1、navigator页面跳转 //关闭当前页面,返回上一页面或多级页面 <navigator open-type="navigateBack"> </navigator> 2、将 data 存储在本地缓存中指定的 key 中,从本地缓存中异步获取指定 key 对应的内容 //data存储本地缓存key uni.setStorageSync(KEY,DATA) 例: uni.

  • uni-app检测版本升级并显示下载进度2021-12-15 14:31:13

    uni-app检测版本升级并显示下载进度 一、检测版本 1、自动检测 即打开应用是就检测应用版本,检测方法需要写在app.vue文件中,代码如下 //APP更新 import configService from '@/common/service/config.service.js' import store from '@/store' console.log('configService', confi

  • uni-app获取上层路由的方法2021-12-14 19:33:35

    uni-app获取上层路由的方法 var pages = getCurrentPages();//获取页面 var beforePage = pages[pages.length - 2];//上个页面 调上个页面方法 // #ifdef H5 beforePage.submitAct() // #endif 但是,在uni-app中是适配多端的,beforePage.submitAct()只在h5中有效,在app端和微信小

  • uni-app 上传文件2021-12-13 14:59:49

    <view class="img" @tap="getUploadImg"> <image :src='list.logo'></image> </view> getUploadImg(e) { uni.chooseImage({ count: 1, // 默认9 sizeType: ['compressed'], sour

  • uniapp选择所有城市通过索引方式(源码自带所有城市json格式数据)2021-12-13 13:32:20

    中国所有城市json数据,通过uniapp打开,直接运行项目 项目源码: <template> <view class="content"> <!-- <view class="top-view"></view> --> <ss-select-city :hotCitys="hotCitys" v-model="locationValue" :loc

  • 推荐工具 HBuilder2021-12-13 09:30:01

    HBuilder,H是HTML的缩写,Builder是建设者 它是为前端开发者服务的通用IDE,或者称为编辑器。与vscode、sublime、webstorm类似 它可以开发普通web项目,也可以开发DCloud出品的uni-app项目、5+App项目、wap2app项目 目前有800万开发者在使用HBuilder 老版的HBuilder是红色logo,已于

  • #uni-app#元素节点操作-uni.createSelectorQuery(),实现页面定位2021-12-12 17:31:27

    1、需求: 使用uni-app,实现点击页面里面的某一个版块,(滚动到)跳转到当前同一个页面的指定位置 2、代码示例: //定制目标按钮 <button class="custom-btn" @click="totarget">定制目标</button> //12月挑战版块,设置id类名 <view id="chanllge-month"> <swiper class="challenge-

  • uniapp之APP的支付宝支付2021-12-11 19:34:28

    1.在uniapp的manifest.json文件中勾选   2.支付宝支付代码     uni.request({         method: "POST",         url: this.httpUrl + '5fe',         header: {             'content-type': "application/x-www-form-urlencoded"       

  • uniapp uview2使用笔记2021-12-11 14:58:01

    1、创建项目安装组件 npm install uview-ui 2、配置 引入uView主JS库 在项目src目录中的main.js中,引入并使用uView的JS库,注意这两行要放在import Vue之后。 // main.js import uView from "uview-ui"; Vue.use(uView); 在引入uView的全局SCSS主题文件 在项目src目录的uni.s

  • uni-app【网络通信API】2021-12-11 14:02:41

    uni-app 网络通信API 发起请求uni.request(OBJECT)uni.configMTLS(OBJECT) 上传、下载uni.uploadFile(OBJECT)uni.downloadFile(OBJECT) WebSocketuni.connectSocket(OBJECT)uni.onSocketOpen(CALLBACK)uni.onSocketError(CALLBACK)uni.sendSocketMessage(OBJECT)uni.onSoc

  • uni-app【API概述】2021-12-11 10:02:45

    uni-app API概述 标准js和浏览器js的区别各端特色API调用说明API `Promise 化`Vue 2 和 Vue 3 的 API `Promise 化`Vue 2Vue 3Vue 2 写法转 Vue 3 写法Vue 3 写法转 Vue 2 写法 API 列表网络发起请求上传、下载WebSocketSocketTask 媒体图片文件录音管理背景音频播放管理

  • uniapp热更新,告别云打包2021-12-08 17:59:01

    前言 项目一直使用uniapp来打包APP,但是每次发布测试或者上线,都要使用官方的云打包…有大小限制不说,周五等时间等待的时间比打包的时间更加长,所以就想着能不能热更新呢?说干就干 调研阶段 首先在官网的文档上找了一下,发现原来官方就有热更新的平台,这不巧了嘛官方文档

  • uniapp 缓存多个数据2021-12-08 17:35:37

    获取 uni.getStorage({ key:'username', }).then(res => { // 如果返回数组为两位就是正确 if(res.length==2){ this.username = res[1].data; } return uni.getStorage({ key:'password', }) }).then(res => { i

  • uni-app h5端 使用webView2021-12-08 13:33:08

        h5端使用webview时,苹果手机浏览网页时空了一截,使用 iframe 框架 ,获取当前可视网页大小        

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有