微信小程序之开发会议OA项目

目录

前言

本篇目标 

首页

会议

投票 

个人中心 

会议OA项目-首页

配置

tabbar

mock工具

page

swiper

会议信息

会议OA项目-会议 

自定义tabs组件

会议管理

会议OA项目-投票

会议OA项目-个人中心


前言

文章含源码资源,投票及个人中心详细自行查看源码即可

  1. 小程序没有DOM对象,一切基于组件化
  2. 储备知识

    1. 理解事件机制

    2. 理解组件化

    3. 理解数据绑定

    4. Flex布局

    5. 移动端适配方案

  3. 建议:学习vue后开发小程序更简单

本篇目标 

首页

会议

 

投票 

个人中心 

 

会议OA项目-首页

配置

  • config/api.js
    // 以下是业务服务器API地址// 本机开发API地址
    var WxApiRoot = 'http://localhost:8080/demo/wx/';
    // 测试环境部署api地址
    // var WxApiRoot = 'http://192.168.0.101:8070/demo/wx/';
    // 线上平台api地址
    //var WxApiRoot = 'https://www.oa-mini.com/demo/wx/';module.exports = {IndexUrl: WxApiRoot + 'home/index', //首页数据接口SwiperImgs: WxApiRoot+'swiperImgs', //轮播图MettingInfos: WxApiRoot+'meeting/list', //会议信息
    };

tabbar

  • app.json
    "list": [{"pagePath": "pages/index/index","text": "首页","iconPath": "/static/tabBar/coding.png","selectedIconPath": "/static/tabBar/coding-active.png"},{"pagePath": "pages/meeting/list/list","iconPath": "/static/tabBar/sdk.png","selectedIconPath": "/static/tabBar/sdk-active.png","text": "会议"},{"pagePath": "pages/vote/list/list","iconPath": "/static/tabBar/template.png","selectedIconPath": "/static/tabBar/template-active.png","text": "投票"},{"pagePath": "pages/ucenter/index/index","iconPath": "/static/tabBar/component.png","selectedIconPath": "/static/tabBar/component-active.png","text": "个人中心"}]

mock工具

  • imageSrcs
    {"data": {"images":[{"img": "https://tse2-mm.cn.bing.net/th/id/OIP-C.ja-L_FC01Xbzhqo4Rm3B8gHaEo?rs=1&pid=ImgDetMain","text": "1"},{"img": "https://tse2-mm.cn.bing.net/th/id/OIP-C.A3UXYP_OyP3S5UfO6HXuAgHaEK?rs=1&pid=ImgDetMain","text": "2"},{"img": "https://pic3.zhimg.com/v2-9873f715d01819718cdc59dc004052b5_1440w.jpg?source=172ae18b","text": "3"},{"img": "https://ts1.cn.mm.bing.net/th/id/R-C.8bb9ed00b8b77b8de03ca88c2c5b9c70?rik=KsLZ%2fjYfY5ELCg&riu=http%3a%2f%2fwww.kutoo8.com%2fupload%2fimage%2f10539408%2f14.jpg&ehk=HMGT1e0hcjxVw1XAbC7yJpq3qSDWlnwsj%2fRN%2f0Etimk%3d&risl=&pid=ImgRaw&r=0","text": "4"},{"img": "https://img1.pconline.com.cn/piclib/200906/09/batch/1/34797/1244512002916phjm5dpgjl.jpg","text": "5"},{"img": "https://ts1.cn.mm.bing.net/th/id/R-C.d951726778523659c8f2d7fd6ad838fd?rik=kR8VYs9ELLWFKQ&riu=http%3a%2f%2fwww.kutoo8.com%2fupload%2fimage%2f85280274%2f2017032108.jpg&ehk=%2fJInO%2fEPMaYF1q%2fu6vzk2j6hPSkAEyCyc3%2fH1Ib1tM0%3d&risl=&pid=ImgRaw&r=0","text": "6"}]},"statusCode": "200","header": {"content-type":"applicaiton/json;charset=utf-8"}
    }

page

  • index.css
    page{height: 100%;background-color: #efeff4;
    }

swiper

  • index.wxml
    <swiper indicator-dots="true" autoplay="true" circular="true" indicator-color="#fff" indicator-active-color="blue"><block wx:for="{{images}}" wx:key="text"><swiper-item><view class="swiper-item"><image src="{{item.img}}" mode="scaleToFill"></image></view></swiper-item></block>
    </swiper>

  • index.css
    swiper {width: 100%;height: calc(100vw*9/16);
    }
    .swiper-item>image {width:100%;
    }

  • index.js
    loadSwiperImgs(){//请注意this的指向问题let that=this;wx.request({url: api.SwiperImgs,success(rs){console.log(rs);that.setData({images:rs.data.images});}})
    }

会议信息

  • mock数据
    {"data": {"lists": [{"id": "1","image": "/static/persons/Snipaste_2024-02-18_20-39-17.png","title": "微信小程序会议OA_空空","num":"1314","state":"进行中","starttime": "2024-02-18 21:00:00","location": "湖南省——长沙市"},{"id": "1","image": "/static/persons/Snipaste_2024-02-18_20-40-00.png","title": "微信小程序会议OA_空空","num":"520","state":"已结束","starttime": "2024-02-18 12:00:00","location": "湖南省——长沙市"},{"id": "1","image": "/static/persons/Snipaste_2024-02-18_20-40-45.png","title": "微信小程序会议OA_空空","num":"888","state":"进行中","starttime": "2024-02-18 08:00:00","location": "湖南省——长沙市"},{"id": "1","image": "/static/persons/Snipaste_2024-02-18_20-40-45.png","title": "微信小程序会议OA_空空","num":"666","state":"已结束","starttime": "2024-02-18 08:00:00","location": "湖南省——长沙市"},{"id": "1","image": "/static/persons/Snipaste_2024-02-18_20-40-00.png","title": "微信小程序会议OA_空空","num":"999","state":"进行中","starttime": "2024-02-18 08:00:00","location": "湖南省——长沙市"}]},"statusCode": "200","header": {"content-type":"applicaiton/json;charset=utf-8"}
    }

  • index.wxml
    <view class="mobi-title"><text class="mobi-icon"></text><text>会议信息</text>
    </view>
    <block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id"><view class="list" data-id="{{item.id}}"><view class="list-img"><image class="video-img" mode="scaleToFill" src="{{item.image}}"></image></view><view class="list-detail"><view class="list-title"><text>{{item.title}}</text></view><view class="list-tag"><view class="state">{{item.state}}</view><view class="join"><text class="list-num">{{item.num}}</text>人报名</view></view><view class="list-info"><text>{{item.address}}</text>|<text>{{item.time}}</text></view></view></view>
    </block>
    <view class="section bottom-line"><text>到底啦</text>
    </view>

  • index.js
    loadMeetingInfos(){let that=this;wx.request({url: api.MettingInfos,dataType: 'json',success(res) {console.log(res)that.setData({lists:res.data.lists})}})}

  • index.wxss
    .mobi-title {font-size: 12pt;color: #777;line-height: 110%;font-weight: bold;width: 100%;padding: 15rpx;background-color: #f3f3f3;
    }.mobi-icon {padding: 0rpx 3rpx;border-radius: 3rpx;background-color: #ff7777;position: relative;margin-right: 10rpx;
    }/*list*/
    .list {display: flex;flex-direction: row;width: 100%;padding: 0 20rpx 0 0;border-top: 1px solid #eeeeee;background-color: #fff;margin-bottom: 5rpx;/* border-radius: 20rpx;box-shadow: 0px 0px 10px 6px rgba(0,0,0,0.1); */
    }.list-img {display: flex;margin: 10rpx 10rpx;width: 150rpx;height: 220rpx;justify-content: center;align-items: center;
    }.list-img .video-img {width: 120rpx;height: 120rpx;}.list-detail {margin: 10rpx 10rpx;display: flex;flex-direction: column;width: 600rpx;height: 220rpx;
    }.list-title text {font-size: 11pt;color: #333;font-weight: bold;
    }.list-detail .list-tag {display: flex;height: 70rpx;
    }.list-tag .state {font-size: 9pt;color: #81aaf7;width: 120rpx;border: 1px solid #93b9ff;border-radius: 2px;margin: 10rpx 0rpx;display: flex;justify-content: center;align-items: center;
    }.list-tag .join {font-size: 11pt;color: #bbb;margin-left: 20rpx;display: flex;justify-content: center;align-items: center;
    }.list-tag .list-num {font-size: 11pt;color: #ff6666;
    }.list-info {font-size: 9pt;color: #bbb;margin-top: 20rpx;
    }
    .bottom-line{display: flex;height: 60rpx;justify-content: center;align-items: center;background-color: #f3f3f3;
    }
    .bottom-line text{font-size: 9pt;color: #666;
    }

会议OA项目-会议 

自定义tabs组件

 文档参考地址:自定义组件 | 微信开放文档

tabs.json

{"component": true,"usingComponents": {}
}

 tabs.wxml

<view class="tabs"><view class="tabs_title"><view wx:for="{{tabList}}" wx:key="id" class="title_item  {{index==tabIndex?'item_active':''}}" bindtap="handleItemTap" data-index="{{index}}"><view style="margin-bottom:5rpx">{{item}}</view><view style="width:30px" class="{{index==tabIndex?'item_active1':''}}"></view></view></view><view class="tabs_content"><slot></slot></view>
</view>

 tabs.wxss

.tabs {position: fixed;top: 0;width: 100%;background-color: #fff;z-index: 99;border-bottom: 1px solid #efefef;padding-bottom: 20rpx;
}.tabs_title {/* width: 400rpx; */width: 90%;display: flex;font-size: 9pt;padding: 0 20rpx;
}.title_item {color: #999;padding: 15rpx 0;display: flex;flex: 1;flex-flow: column nowrap;justify-content: center;align-items: center;
}.item_active {/* color:#ED8137; */color: #000000;font-size: 11pt;font-weight: 800;
}.item_active1 {/* color:#ED8137; */color: #000000;font-size: 11pt;font-weight: 800;border-bottom: 6rpx solid #333;border-radius: 2px;
}

 tabs.js

var App = getApp();
Component({/*** 组件的属性列表*/properties: {tabList:Object},/*** 组件的初始数据*/data: {tabIndex:0},/*** 组件的方法列表*/methods: {handleItemTap(e){// 获取索引const {index} = e.currentTarget.dataset;// 触发 父组件的事件this.triggerEvent("tabsItemChange",{index})this.setData({tabIndex:index})}}
})

会议管理

list.json

{"usingComponents": {"tabs":"/components/tabs/tabs"}
}

list.wxml

<tabs tabList="{{tabs}}"  bindtabsItemChange="tabsItemChange">
</tabs>
<view style="height: 100rpx;"></view>
<block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id"><view class="list" data-id="{{item.id}}"><view class="list-img al-center"><image class="video-img" mode="scaleToFill" src="{{item.image}}"></image></view><view class="list-detail"><view class="list-title"><text>{{item.title}}</text></view><view class="list-tag"><view class="state al-center">{{item.state}}</view><view class="join al-center"><text class="list-num">{{item.num}}</text>人报名</view></view><view class="list-info"><text>{{item.address}}</text>|<text>{{item.time}}</text></view></view></view>
</block> 

list.wxss

.mobi-title {font-size: 12pt;color: #777;line-height: 110%;font-weight: bold;width: 100%;padding: 15rpx;background-color: #f3f3f3;
}.mobi-icon {padding: 0rpx 3rpx;border-radius: 3rpx;background-color: #ff7777;position: relative;margin-right: 10rpx;
}/*list*/
.list {display: flex;flex-direction: row;width: 100%;padding: 0 20rpx 0 0;border-top: 1px solid #eeeeee;background-color: #fff;margin-bottom: 5rpx;/* border-radius: 20rpx;box-shadow: 0px 0px 10px 6px rgba(0,0,0,0.1); */
}.list-img {display: flex;margin: 10rpx 10rpx;width: 150rpx;height: 220rpx;justify-content: center;align-items: center;
}.list-img .video-img {width: 120rpx;height: 120rpx;}.list-detail {margin: 10rpx 10rpx;display: flex;flex-direction: column;width: 600rpx;height: 220rpx;
}.list-title text {font-size: 11pt;color: #333;font-weight: bold;
}.list-detail .list-tag {display: flex;height: 70rpx;
}.list-tag .state {font-size: 9pt;color: #81aaf7;width: 120rpx;border: 1px solid #93b9ff;border-radius: 2px;margin: 10rpx 0rpx;display: flex;justify-content: center;align-items: center;
}.list-tag .join {font-size: 11pt;color: #bbb;margin-left: 20rpx;display: flex;justify-content: center;align-items: center;
}.list-tag .list-num {font-size: 11pt;color: #ff6666;
}.list-info {font-size: 9pt;color: #bbb;margin-top: 20rpx;
}
.bottom-line{display: flex;height: 60rpx;justify-content: center;align-items: center;background-color: #f3f3f3;
}
.bottom-line text{font-size: 9pt;color: #666;
}

list.js

// pages/meeting/list/list.js
Page({/*** 页面的初始数据*/data: {tabs:['会议中','已完成','已取消','全部会议'],lists: [{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'1314','state':'进行中','time': '02月18日 21:00','address': '湖南省——长沙市'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-40-00.png','title': '微信小程序会议OA_空空','num':'520','state':'已结束','time': '02月18日 21:00','address': '湖南省——长沙市'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-40-45.png','title': '微信小程序会议OA_空空','num':'666','state':'进行中','time': '02月18日 21:00','address': '湖南省——长沙市'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-40-45.png','title': '微信小程序会议OA_空空','num':'888','state':'已结束','time': '02月18日 21:00','address': '湖南省——长沙市'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'217','state':'进行中','time': '10月09日 16:59','address': '北京市·朝阳区'}],lists1: [{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'304','state':'进行中','time': '10月09日 17:59','address': '深圳市·南山区'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'380','state':'已结束','time': '10月09日 17:39','address': '北京市·朝阳区'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'500','state':'进行中','time': '10月09日 17:31','address': '大连市'}],lists2: [{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'304','state':'进行中','time': '10月09日 17:59','address': '深圳市·南山区'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'380','state':'已结束','time': '10月09日 17:39','address': '北京市·朝阳区'}],lists3: [{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'304','state':'进行中','time': '10月09日 17:59','address': '深圳市·南山区'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'380','state':'已结束','time': '10月09日 17:39','address': '北京市·朝阳区'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'500','state':'进行中','time': '10月09日 17:31','address': '大连市'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'150','state':'已结束','time': '10月09日 17:21','address': '北京市·朝阳区'},{'id': '1','image': '/static/persons/Snipaste_2024-02-18_20-39-17.png','title': '微信小程序会议OA_空空','num':'217','state':'进行中','time': '10月09日 16:59','address': '北京市·朝阳区'}]},/*** 生命周期函数--监听页面加载*/onLoad(options) {},/*** 生命周期函数--监听页面显示*/onShow() {},tabsItemChange(e){let tolists;if(e.detail.index==1){tolists = this.data.lists1;}else if(e.detail.index==2){tolists = this.data.lists2;}else{tolists = this.data.lists3;}this.setData({lists: tolists})}
})

会议OA项目-投票

list.js

// pages/vote/list/list.js
var app = getApp();
Page({/*** 页面的初始数据*/data: {tabs:['全部','发起的','参与的'],voteList:[{id:1,title:'微信小程序会议OA_空空',votes:[{id:1,img:'/static/persons/Snipaste_2024-02-18_20-40-00.png',title:'A',mem:'A'},{id:2,img:'/static/persons/Snipaste_2024-02-18_20-40-45.png',title:'B',mem:'B'}]},{id:1,title:'微信小程序会议OA_空空',votes:[{id:1,img:'/static/persons/Snipaste_2024-02-18_20-40-00.png',title:'B',mem:'B'},{id:2,img:'/static/persons/Snipaste_2024-02-18_20-40-45.png',title:'C',mem:'C'},{id:3,img:'/static/persons/Snipaste_2024-02-18_20-40-45.png',title:'D',mem:'X'},{id:4,img:'/static/persons/Snipaste_2024-02-18_20-39-17.png',title:'F',mem:'T'}]}]},/*** 生命周期函数--监听页面加载*/onLoad(options) {},/*** 生命周期函数--监听页面初次渲染完成*/onReady() {},/*** 生命周期函数--监听页面显示*/onShow() {},/*** 生命周期函数--监听页面隐藏*/onHide() {},/*** 生命周期函数--监听页面卸载*/onUnload() {},/*** 页面相关事件处理函数--监听用户下拉动作*/onPullDownRefresh() {},/*** 页面上拉触底事件的处理函数*/onReachBottom() {},/*** 用户点击右上角分享*/onShareAppMessage() {},tabsItemChange(e){let index = e.detail.index;console.log('vote.index='+index)if(index==1 || index==2){if (app.globalData.hasLogin) {}else{wx.navigateTo({url: '/pages/auth/login/login',})}}}
})

会议OA项目-个人中心

index.wxml

<view class="page-container"><view class="user-info-container"><view class="user-info"  bindtap="goLogin"><image class="user-img" mode="scaleToFill" src="{{userInfo.avatarUrl}}" /><text class="user-info-name">{{userInfo.nickName}}</text></view><image class="user-update" src="/static/tabBar/component.png" bindtap='goPages' data-url='/pages/ucenter/user/user'/></view><view class="boundary" /><view class="cells-container"><view class="cell-wrap"><image class="cell-icon" src="/static/tabBar/sdk.png" /><text class="cell-text">我主持的会议</text><view class="cell-right"><view class="cell-list-num">{{metting_pubs}}</view><view class="cell-arrow"></view></view></view><view class="cell-wrap"><image class="cell-icon" src="/static/tabBar/sdk.png" /><text class="cell-text">我参与的会议</text><view class="cell-right"><view class="cell-list-num">{{metting_joins}}</view><view class="cell-arrow"></view></view></view></view><view class="boundary" /><view class="cells-container"><view class="cell-wrap"><image class="cell-icon" src="/static/tabBar/sdk.png" /><text class="cell-text">我发布的投票</text><view class="cell-right"><view class="cell-list-num">1</view><view class="cell-arrow"></view></view></view><view class="cell-wrap"><image class="cell-icon" src="/static/tabBar/sdk.png" /><text class="cell-text">我参与的投票</text><view class="cell-right"><view class="cell-list-num">10</view><view class="cell-arrow"></view></view></view></view><view class="boundary" /><view class="cells-container"><view class="cell-wrap"><image class="cell-icon" src="/static/tabBar/template.png" /><text class="cell-text">消息</text><view class="cell-right"><view class="cell-list-num"></view><view class="cell-arrow"></view></view></view><view class="cell-wrap"><image class="cell-icon" src="/static/tabBar/component.png" /><text class="cell-text">设置</text><view class="cell-right"><view class="cell-list-num"></view><view class="cell-arrow"></view></view></view></view>
</view>

箭头样式:

.cell-arrow {width: 7px;height: 7px;border-width: 1px;border-color: rgb(136, 136, 136);border-style: none solid solid none;transform: rotate(315deg);
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/688791.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Mongodb 文本检索

Mongodb支持对字符串字段的文本检索。在Mongodb atlas中&#xff0c; 对这种文本检索的功能进行了增强。 提到文本检索&#xff0c; 难免不会想到实现非常火爆的AI&#xff0c; 聊天服务等时髦技术。mongodb提供的这种文本检索功能适当的算法实践&#xff0c;似乎可以支持这些应…

【开源】SpringBoot框架开发服装店库存管理系统

目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块2.1 数据中心模块2.2 角色管理模块2.3 服装档案模块2.4 服装入库模块2.5 服装出库模块 三、系统设计3.1 用例设计3.2 数据库设计3.2.1 角色表3.2.2 服装档案表3.2.3 服装入库表3.2.4 服装出库表 四、系统展示五、核心代码5.…

VTK Python PyQt 监听键盘 控制 Actor 移动 变色

KeyPressInteractorStyle 在vtk 中有时我们需要监听 键盘或鼠标做一些事&#xff1b; 1. 创建 Actor&#xff1b; Sphere vtk.vtkSphereSource() Sphere.SetRadius(10)mapper vtk.vtkPolyDataMapper() mapper.SetInputConnection(Sphere.GetOutputPort()) actor vtk.vtkAc…

JSON转换List<Map<String, Object>>、Map<String, Object>

废话就不说了 早上10点研究到现在 获取redis的JSON字符串 String getPalletListNew redisService.getRedis(“getPalletListNew”, abroad “” goodsLevel “” startPort “” destinationPort “” maxTon “” minTon); 转换Map<String,Object> public …

找数字

题目描述 已知两个正整数 a&#xff0c;b 。现有一个大于 1 的整数 x &#xff0c;将其作为除数分别除 a&#xff0c;b 得到的余数相同。 请问满足上述条件的 x 的最小值是多少&#xff1f;数据保证 x 有解。 输入 共一行&#xff0c;两个整数 a , b 。 输出 输出这个最小…

立创EDA专业版快速使用和一些快捷键

立创EDA专业版 介绍原理图PCB快捷键原理图PCB 介绍 器件 符号 封装 3D模型 属性 仅支持放置器件在原理图或PCB 一个Board(板&#xff09;只能有一个原理图和PCB&#xff0c;一个原理图可以有多页 原理图 网络标签 是给连接线命名 新建图页 如果一个图页上画不下&#…

第4讲 小程序首页实现

首页 create.vue <template><view class"vote_type"><view class"vote_tip_wrap"><text class"type_tip">请选择投票类型</text><!-- <text class"share">&#xe739;分享给朋友</text&g…

嵌入式开发之SQLite数据库

SQLite是一种轻量级的嵌入式关系型数据库管理系统&#xff08;RDBMS&#xff09;&#xff0c;它是一个开源项目&#xff0c;实现了自包含、零配置、无服务器的特性。以下是SQLite的详细介绍&#xff1a; SQLite特点 轻量级&#xff1a;SQLite的代码库极其精简&#xff0c;不需…

STM32中断定时器的使用

使用systimer来产生较为精确的定时&#xff0c;之前使用for循环来产生。 用示例工程时产生错误&#xff0c;原因是调用F103的3种容量器件&#xff0c;需要更换S汇编头函数。 另外在工程设置中&#xff0c;需要把HD设置为MD&#xff0c;重新编译即可成功。

二叉树基础总结

目录 树的定义&#xff1a; 深度和高度&#xff1a; 二叉树 由来 二叉树种类&#xff1a; 满二叉树&#xff1a; 完全二叉树&#xff1a; 严格二叉树&#xff08;Strict Binary Tree&#xff09;&#xff1a; 平衡二叉树&#xff08;Balanced Binary Tree&#xff09;…

DoRA(权重分解低秩适应):一种新颖的模型微调方法

来自&#xff1a;小互 DoRA&#xff08;权重分解低秩适应&#xff09;&#xff1a;一种新颖的模型微调方法 DoRA在LoRA的基础上进一步发展&#xff0c;通过将预训练权重分解为“幅度”和“方向”两个部分进行微调。 这种权重分解方法允许DoRA更精细地控制模型的学习过程&…

如何将shape数据 导入到Postgresql数据库中(单个和批量)

一. 背景 很多时候我们需要将shape数据导入到Postgresql数据库&#xff0c;将数据db化。 本文主要讲解三种方式&#xff1a; 使用QGIS工具导入&#xff08;单个&#xff09;、使用postgresql2 命令工具导入&#xff08;单个&#xff09;、使用python脚本批量导入shape数据&…

基于函数计算AIGC生成图应用

目录 基于函数计算部署AIGC应用的主要步骤 创建Stable Diffusion模型的应用 访问应用实现文字生图 函数的查看与管理 基于函数计算部署AIGC应用的主要步骤 用函数计算实现AIGC只要简单的三步&#xff0c;分别是创建应用、运行应用及查看管理。 创建Stable Diffusion模型的应…

【大厂AI课学习笔记】【2.2机器学习开发任务实例】(3)数据准备和数据预处理

项目开始&#xff0c;首先要进行数据准备和数据预处理。 数据准备的核心是找到这些数据&#xff0c;观察数据的问题。 数据预处理就是去掉脏数据。 缺失值的处理&#xff0c;格式转换等。 延伸学习&#xff1a; 在人工智能&#xff08;AI&#xff09;的众多工作流程中&#…

浏览器url地址栏空格变+号

问题描述&#xff0c;后台返回一个参数携带在url上面&#xff0c;发的时候是空格隔开的字符串&#xff0c;但是到了前端放到地址栏打开是一个号。 类似于 // 后台返回的url https://xxx.com?aaa bxxx // 打开浏览器后地址栏显示的 https://xxx.com?aaabxxx问了一下AI说是空…

k8s ipvs 模式下不支持 localhost:<nodeport>方式访问服务

简介 今天去定位一个nodeport的问题&#xff0c;发现curl 127.0.0.1:32000 访问nodeport的时候会规律的hang住&#xff0c;本来以为是后端服务的问题&#xff0c;但是curl管理ip:nodeport 是正常的。这个就奇怪了&#xff0c;深入研究了下发现 ipvs模式下是不支持这样访问的&a…

Python如何实现定时发送qq消息

因为生活中老是忘记各种事情&#xff0c;刚好又在学python&#xff0c;便突发奇想通过python实现提醒任务的功能&#xff08;尽管TIM有定时功能&#xff09;&#xff0c;也可定时给好友、群、讨论组发送qq消息。其工作流程是&#xff1a;访问数据库提取最近计划——>根据数据…

2024阿里云服务器配置怎么选择?c7、g7和r7?

阿里云服务器配置怎么选择合适&#xff1f;CPU内存、公网带宽和ECS实例规格怎么选择合适&#xff1f;阿里云服务器网aliyunfuwuqi.com建议根据实际使用场景选择&#xff0c;例如企业网站后台、自建数据库、企业OA、ERP等办公系统、线下IDC直接映射、高性能计算和大游戏并发&…

打开ps显示找不到dll怎么办?这四种方法可快速修复

在计算机操作系统中&#xff0c;当执行某程序或运行特定软件时&#xff0c;如果系统提示“ps显示找不到dll文件”&#xff0c;这其实是一个较为常见的问题现象。动态链接库&#xff08;DLL&#xff09;文件是Windows操作系统中不可或缺的重要组件&#xff0c;它包含了大量可被多…

IDEA实现序列化时如何自动生成serialVersionUID

实现步骤&#xff1a;1.安装GenerateSerialVersionUID插件 2.点击idea左上角File -> Settings -> Editor -> Inspections -> 搜索 Serialization issues &#xff0c;找到 Serializable class without ‘serialVersionUID’ ->打上勾&#xff0c;再点击Apply-&…