uni-app基于vue实现商城小程序

news2024/10/6 6:40:53

一、前言

参考“网易严选”小程序

项目采用传统vue项目结构,即uni-app打包和运行成小程序,使用HBuilder开发工具开发项目,通过运行启动“微信开发者工具”完成项目启动。

二、功能效果图

1.首页

 

2.分类

 3.活动

4.我的

 5.商品详情

6.购物车

 

三、代码实现

1.项目结构截图 uni-app,Hbuilder

2.首页源码

<template>
	<view class="Header">
		<view class="myHeader">
			<view class="logos">
				网易严选
			</view>
			<view class="searchs">
				<uni-icons type="search" size="30"></uni-icons><input type="text" name="" id=""
					placeholder="请输入想搜索的商品..." @tap="goShowContract">
			</view>
			<view class="search-button">
				<view class="button" @click="onSearch">取消</view>
			</view>
		</view>
		<!-- 轮播图 -->
		<view class="backgroundBanner">
			<view class="banner">
				<swiper autoplay="true" :interval="2000" :duration="500" circular="true" indicator-active-color="#fff"
					easing-function="true" indicator-dots='true'>
					<swiper-item v-for="(item, index) in bannerList" :key="index">
						<img :src="item.url"></img>
					</swiper-item>
				</swiper>
			</view>
		</view>
		<!-- 分类部分 -->
		<view class="cates">
			<view class="cate-item" v-for="(cateItem,cateIndex) in cateList" :key="cateIndex" @tap="selPage(cateItem)">
				<image :src="cateItem.cateUrl"></image>
				<text>{{cateItem.cateName}}</text>
			</view>
		</view>
		<hr>
		<view class="time">
			<view class="timeTop">
				<view class="logo">
					<image src="../../static/zhong.jpg" mode=""></image>
					<!-- <uni-icons type="notification-filled" size="20"></uni-icons> -->
					<text>限时秒购</text>
				</view>
				<view class="timeFinish">
					<text>距结束</text>
					<uni-countdown :day="1" :hour="2" :minute="30" :second="0" color="#FFFFFF"
						background-color="#007AFF" />
				</view>
			</view>
			<view class="timeBottom">
				<view class="timeItem" v-for="(timeItem,timeIndex) in timeList" :key="timeIndex">
					<image :src="timeItem.timeUrl"></image>
					<view class="timeText">
						<text class="timeText1">¥{{timeItem.timeText1}}</text>
						<text class="timeText2">¥{{timeItem.timeText2}}</text>
					</view>
				</view>
			</view>
			<hr>
			<scroll-view scroll-x class="myNav">
				<view v-for="(item,index) in indexTypes" :key="index" @tap="selType(item)" :class="'item '+(typeId===item.id?'active':'')" style='font-size: 30rpx;'>{{item.name}}</view>
			</scroll-view>
			<index-type ref="indexType"></index-type>	
			</view>	
		</view>
	</view>
		

</template>

<script>
	import { mapState, mapGetters, mapActions, mapMutations } from 'vuex'
	import indexType from '@/components/index_type.vue'
	export default {
		components:{
			indexType,
		},
		data() {
			return {
				typeId: 0,
				cateList: [{
						cateId: 0,
						cateUrl: "../../static/zhong.jpg",
						cateName: '限时秒杀',
						path:''
					},
					{
						cateId: 0,
						cateUrl: '../../static/che.jpg',
						cateName: '断货清仓',
						path:'./okoko'
						
					},
					{
						cateId: 0,
						cateUrl: "../../static/yi.jpg",
						cateName: '宝藏女装',
					},
					{
						cateId: 0,
						cateUrl: "../../static/b3.jpg",
						cateName: '多多果园',
					},
					{
						cateId: 0,
						cateUrl: "../../static/9.9.jpg",
						cateName: '9块9特卖',
					},
					{
						cateId: 0,
						cateUrl: "../../static/1a.jpg",
						cateName: '签到',
					},
					{
						cateId: 0,
						cateUrl: "../../static/yao.jpg",
						cateName: '医药馆',
					},
					{
						cateId: 0,
						cateUrl: "../../static/54e.jpg",
						cateName: '省钱月卡',
					},

				],
				// //商品实例图
				timeList: [{
						time: 0,
						timeUrl: '../../static/7b.jpg',
						timeText1: '388',
						timeText2: '720',
					},
					{
						time: 0,
						timeUrl: '../../static/345d.jpg',
						timeText1: '18',
						timeText2: '39',
					},
					{
						time: 0,
						timeUrl: '../../static/3d.jpg',
						timeText1: '3888',
						timeText2: '3889',
					},
					{
						time: 0,
						timeUrl: '../../static/bing.jpg',
						timeText1: '12.9',
						timeText2: '18',
					},
				],
				bannerList: [{
						id: 1,
						url: '../../static/temp1.jpg'
					},
					{
						id: 2,
						url: '../../static/temp2.jpg'
					},
					{
						id: 3,
						url: '../../static/temp3.jpg'
					},
					{
						id: 4,
						url: '../../static/temp4.jpg'
					},
					{
						id: 5,
						url: '../../static/temp5.jpg'
					},
				],
			}
		},
		computed:{
			 ...mapState([
				'products',
				'indexTypes'
			])
		},
		mounted() {
			this.typeId = this.indexTypes[0].id;
			this.$refs.indexType.initProduct(this.indexTypes[0]);
		},
		methods: {
			goShowContract() {
				uni.navigateTo({
					url: '/pages/index/show-contract'
				})
			},
			selPage(cateItem){
				// uni.navigateTo({
				// 	url:cateItem.path,
				// })
			},
			//选择分类
			selType(item){
				this.typeId = item.id;
				this.$refs.indexType.initProduct(item);
			}
		}
	}
</script>

<style lang="scss" scoped>
	* {
		margin: 0;
		padding: 0;
	}

	.myHeader {
		display: flex;
		padding: 10rpx;
		align-items: center;

		.logos {
			width: 140rpx;
			height: 40rpx;
		}

		.searchs {
			border: 1px solid black;
			border-radius: 10rpx;
			flex: 1;
			margin: 0 10rpx;
			width: 80rpx;
			padding-left: 14rpx;
			display: flex;
			align-items: center;
			padding: 4rpx 10rpx;
			vertical-align: top;
		}

		.btn {
			width: 80rpx;
			text-align: center;
		}
	}

	.myNav {
		white-space: nowrap;
		display: flex;
		color: #333;
		box-sizing: border-box;
		height: 80rpx;

		.item {
			flex: 1;
			margin: 10rpx 20rpx;
			display: inline-block;

			&.active {
				color: #ff5555;
				border-bottom: 2px solid #ff5555;
				font-size: 24px;
			}
		}

		.item:hover {
			display: inline-block;
			color: #ff5555;
			border-bottom: 2px solid #ff5555;
		}
	}

	.backgroundBanner {
		padding: 0 10rpx;
		box-sizing: border-box;
	}

	.banner {
		width: 100%;
		margin: 0 auto;
	}

	.banner swiper {
		height: calc(750rpx / 1.9); //calc(屏幕宽度 / (图片宽度 / 图片高度))
	}

	.banner img {
		width: 100%;
		height: 100%;
	}



	.cates {
		width: 100%;
		height: 200rpx;
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: space-around;

		.cate-item {
			width: 20%;
			height: 160rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: space-around;

			image {
				width: 100rpx;
				height: 100rpx;
			}
		}
	}

	.cates {
		width: 100%;
		height: 400rpx;
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: space-around;
		flex-wrap: wrap;

		.cate-item {
			width: 22%;
			height: 160rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: space-around;
			// flex-flow: wrap;

			image {
				width: 100rpx;
				height: 100rpx;
			}
		}
	}




	.time {
		width: 100%;
		background-color: #fff;
		margin-top: 20rpx;

		.timeTop {
			height: 80rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-left: 20rpx;

			.logo {
				image {
					width: 30rpx;
					height: 30rpx;
					margin-right: 10rpx;
				}

				text {
					font-size: 16px;
				}
			}

			.timeFinish {
				margin-right: 20rpx;
				display: flex;
				align-items: center;

				text {
					font-size: 14px;
				}
			}
		}

		.timeBottom {
			width: 100%;
			display: flex;
			justify-content: space-around;
			flex-wrap: wrap;

			.timeItem {
				width: 25%;
				justify-content: space-around;
				display: flex;
				flex-direction: column;
				align-items: center;
				box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;

				image {
					width: 160rpx;
					height: 160rpx;
				}

				.timeText {
					display: flex;
					justify-content: space-between;
					font-size: 14px;

					.timeText2 {
						color: #9F9F9F;
						text-decoration: line-through;
					}
				}
			}
		}
	}
</style>

3.数据模拟通讯

通过vuex实现数据通讯共享和管理

import Vue from 'vue'

import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
		//首页分类
		indexTypes:[
			{id: 1,name: '商品推荐'},
			{id: 2,name: '配饰'},
			{id: 3,name: '包包'},
			{id: 4,name: '鞋子'},
			{id: 5,name: '裙子'},
			{id: 6,name: '饮品'},
			{id: 7,name: '衣服'}
		],
		//分类菜单
		allTypes:[
			{id: 11,name: '推荐'},
			{id: 12,name: '箱包'},
			{id: 13,name: '男装'},
			{id: 14,name: '女装'},
			{id: 15,name: '鞋子'},
			{id: 16,name: '裤子'},
			{id: 17,name: '食品'},
			{id: 18,name: '维修'},
			{id: 19,name: '机票'},
			{id: 20,name: '图书'},
			{id: 21,name: '宠物'},
		],
		//活动商品 商品主键id
		activeProducts:[
			1,2,3,4,5
		],
		//全部商品
		products: [{
				id:1,
				typeIds:[1,11],
				cover: require('../../static/0fd.jpg'),
				imgList: [
					'https://img11.360buyimg.com/n1/s450x450_jfs/t1/71831/14/25245/39959/6487c621Fca760cf2/769dd8bcf43d82c1.jpg',
					'https://img.pddpic.com/mms-material-img/2022-08-11/cd9c638d-dac2-474a-aad2-0f141c146102.jpeg.a.jpeg?imageMogr2/quality/90/format/webp',
					'https://img.pddpic.com/mms-material-img/2022-08-11/b0827f91-083a-4b5b-9461-64e6d6789fcf.jpeg.a.jpeg?imageMogr2/quality/90/format/webp'
				],
				name: '联想拯救者Y9000P i7/RTX3060 2022款16英寸电竞游戏笔记本电脑',
				title: '电脑',
				price: 2000,
				oldprice: 5000,
				saleNumMonth: 120,
				saleNumTotal: 2000,
				types: [{
						name: '类型',
						items: [{
								id: 1,
								name: '13.3英寸 M1芯片 8+7核 8G+256G'
							},
							{
								id: 2,
								name: '13.3英寸 M1芯片 8+7核 8G+512G'
							},
							{
								id: 3,
								name: '13.3英寸 M1芯片 8+7核 16G+256G'
							},
							{
								id:4,
								name: '13.3英寸 M1芯片 8+7核 16G+512G'
							}
						],
					},
					{
						name: '数量',
						items: [{
							id: 1,
							name: '英特尔官方21代'
						}, {
							id: 2,
							name: '英特尔官方18代'
						}, {
							id: 3,
							name: '英特尔官方19代'
						}]
					}
				]
			},
			{
				id:2,
				typeIds:[1,11],
				cover: require('../../static/13d.jpg'),
				imgList: [
					"https://img.pddpic.com/mms-material-img/2021-12-10/6b514989-49fb-4112-b636-33fc82cb1641.jpeg.a.jpeg?imageMogr2/quality/90/format/webp",
					"https://img.pddpic.com/mms-material-img/2022-01-05/6fbb05da-e1ba-4bee-985a-300cdd7ad2e9.jpeg.a.jpeg?imageMogr2/quality/90/format/webp",
					"https://img.pddpic.com/mms-material-img/2021-12-10/21e55b15-a17d-4668-b8a9-9b8616f11cb2.jpeg.a.jpeg?imageMogr2/quality/90/format/webp"
				],
				name: '保鲜膜([食品级认证)',
				title:'保鲜膜',
				price: 12.99,
				oldprice: 20.80,
				saleNumMonth: 120,
				saleNumTotal: 2000,
				types: [{
						name: '型号',
						items: [{
								id: 1,
								name: '1卷宽30厘米6.25斤'
							},
							{
								id: 2,
								name: '1卷宽50厘米7斤'
							},
							{
								id: 3,
								name: '整箱宽50厘米4卷28斤'
							},
							{
								id:4,
								name: '整箱4卷宽50厘米重40斤约720米'
							}
						],
					},
					{
						name: '数量',
						items: [{
							id: 1,
							name: '3包'
						}, {
							id: 2,
							name: '5包'
						}, {
							id: 3,
							name: '10包'
						}]
					}
				]
			},
			{
				id:3,
				typeIds:[1,11],
				cover: require('../../static/8537c.jpg'),
				imgList: [
				"https://img.pddpic.com/mms-material-img/2022-05-28/3329312a-b971-4990-af80-6e15113b0600.jpeg.a.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/mms-material-img/2022-05-28/e12d134d-c2d8-4aec-8dc3-0e9ff80befd5.jpeg.a.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/mms-material-img/2022-05-28/1510e448-2d5b-4398-a692-ff679e2587e8.jpeg.a.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/mms-material-img/2022-05-28/248a3ffb-b4ce-4529-a7a4-8f0c97a4b331.jpeg.a.jpeg?imageMogr2/quality/90/format/webp"
				],
				name: '男士斜挎包潮牌ins工装风日系休闲男包大容量单肩包个性邮差包潮',
				title:'斜挎包',
				price: 33.00,
				oldprice: 40.75,
				saleNumMonth: 120,
				saleNumTotal: 2000,
				types: [{
						name: '颜色',
						items: [
							{
								id: 1,
								name: '大板黑色'
							},
							{
								id: 2,
								name: '灰色'
							},
							{
								id: 3,
								name: '蓝色'
							},
							{
								id:4,
								name: '白色'
							}
						],
					},
				]
					
			},
			{
				id:4,
				typeIds:[1,11],
				cover: require('../../static/fa98.jpg'),
				imgList: [
				"https://img.pddpic.com/openapi/images/2020-04-27/4cd766b88b0a4e9e8fbebaa221de7b58.jpg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/openapi/images/2020-04-27/c2090bace7f938f02819fca05e17c4e7.jpg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/openapi/images/2020-04-27/1492ab8ba1e76cca387583c80180d65e.jpg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/openapi/images/2020-04-27/13b1af9176580b3e7a035871f4456594.jpg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/openapi/images/2020-04-27/793db583c0d598c13124af5991f7794e.jpg?imageMogr2/quality/90/format/webp"
				],
				name: '高级感韩版原创ins个性多层斜挎包2023夏季新款包包女单肩链条包',
				title:'休闲 仙女',
				price: 38.39,
				oldprice: 57.80,
				saleNumMonth: 120,
				saleNumTotal: 2000,
				types: [{
						name: '颜色',
						items: [
							{
								id: 1,
								name: '大板黑色'
							},
							{
								id: 2,
								name: '灰色'
							},
							{
								id: 3,
								name: '红色'
							},
							{
								id:4,
								name: '粉色'
							},
							{
								id:5,
								name: '白色'
							},
						],
					},
				]
				
					
			},
			{
				id:5,
				typeIds:[1,11],
				cover: 'https://img.pddpic.com/goods/images/2020-06-10/52fd0f70-671c-4ab0-a867-094d8301d4e5.jpeg?imageMogr2/quality/90/format/webp',
				imgList: [
				"https://img.pddpic.com/goods/images/2020-06-10/52fd0f70-671c-4ab0-a867-094d8301d4e5.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/mms-material-img/2020-06-04/a12fe65d-ee77-4b1c-b183-7ce735fb1342.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/mms-material-img/2020-06-04/cf0eb9da-efb7-4f24-9703-6450b792b4ec.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/mms-material-img/2020-06-04/911b4c63-1212-46e7-a1eb-038b983553b0.jpeg?imageMogr2/quality/90/format/webp",
				"https://img.pddpic.com/goods/images/2020-06-10/f7e45e61-0a72-4ac9-8f56-f422327799b9.jpeg?imageMogr2/quality/90/format/webp"
				],
				name: '【驯龙士】夏季新款冰丝套装男休闲运动短袖男士大码七分裤两件套',
				title:'驯龙士',
				price: 99.99,
				oldprice: 120.80,
				saleNumMonth: 120,
				saleNumTotal: 2000,
				types: [{
						name: '颜色',
						items: [
							{
								id: 1,
								name: '军绿色'
							},
							{
								id: 2,
								name: '灰色'
							},
							{
								id: 3,
								name: '黑色'
							},
						],
					},
				]
					
			}
		],
		
		

	},
	mutations: {
		//相当于同步的操作
		getarray(state, count) {
			var shuffled = state.timesList.slice(0),
				i = state.timesList.length,
				min = i - count,
				temp,
				index;
			while (i-- > min) {
				index = Math.floor((i + 1) * Math.random());
				temp = shuffled[index];
				shuffled[index] = shuffled[i];
				shuffled[i] = temp;
			}
			return shuffled.slice(min);
		}
	},
	actions: {
		//相当于异步的操作,不能直接改变state的值,只能通过触发mutations的方法才能改变
	}
})
export default store

四、总结

项目功能完整,后续可能将不断升级。

关注作者,及时了解更多好项目!

作者主页也有更多好项目分享!

获取源码或如需帮助,可通过博客后面名片+作者即可!

 其他作品集合

  1. 《Springboot+Spring Security+OAuth2+redis+mybatis-plus+mysql+vue+elementui实现请假考勤系统》
  2. 《vue+element实现电商商城礼品代发网,商品、订单管理》
  3. 《vue+vant2完美实现香奈儿移动端商城网站》
  4. 《vue+elementui实现联想购物商城,样式美观大方》
  5. 《vue+elementui实现英雄联盟道具城》
  6. 《vue+elementui实现app布局小米商城,样式美观大方,功能完整》
  7. 《vue完美模拟pc版快手,实现短视频,含短视频详情播放》
  8. 《vue+element实现美观大方好看的音乐网站,仿照咪咕音乐网》     

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

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

相关文章

什么是AI算子开发

今天在某离职群里看到前同事聊天&#xff0c;说到国内某大厂的一个面试&#xff0c;本来求职面试的岗位是通信库&#xff0c;类似于英伟达的 nccl&#xff0c; 但是却被问到了很多与算子开发相关的问题。 看来算子开发岗位依然很稀缺。 联想到之前写过的一篇关于AI算子开发的文…

关闭EasyConnect进程详细步骤

1、不关闭导致的问题 nacos浏览器可以正常访问&#xff0c;但idea启动的时候连不上nacos&#xff0c;而且第二次启动都启动不了&#xff0c;一直卡在那里&#xff0c;排查了半天&#xff0c;怀疑是装的EasyConnect的VPN导致的&#xff0c;于是停止掉相关服务即可。但直接结束进…

Ubuntu中安装rabbitMQ

一、安装 RabbitMQ ①&#xff1a;更新源 sudo apt-get update②&#xff1a;安装Rrlang语言 由于RabbitMq需要erlang语言的支持&#xff0c;在安装RabbitMq之前需要安装erlang sudo apt-get install erlang-nox③&#xff1a;安装rabbitMQ sudo apt-get install rabbitmq-s…

【Proteus仿真】【Arduino单片机】数码管显示

文章目录 一、功能简介二、软件设计三、实验现象联系作者 一、功能简介 本项目使用Proteus8仿真Arduino单片机控制器&#xff0c;使用TM1637、共阳数码管等。 主要功能&#xff1a; 系统运行后&#xff0c;数码管显示数字、字符。 二、软件设计 /* 作者&#xff1a;嗨小易&am…

如何手动获取spring/springboot中的IOC容器(全局上下文对象)?

IDE&#xff1a;IntelliJ IDEA 2022.2.3 x64 操作系统&#xff1a;win10 x64 位 家庭版 JDK: 1.8 文章目录 前言一、如何手动获取spring容器[ApplicationContext]&#xff1f;方式①&#xff1a;在启动类中获取spring容器方式②&#xff1a;自定义工具类实现ServletContextList…

6.1二叉树的递归遍历(LC144,LC15,LC94)

什么是递归函数&#xff1f; 递归函数是一种函数调用自身的编程技巧。 在递归函数中&#xff0c;函数通过不断调用自身来解决一个问题&#xff0c;直到达到基本情况&#xff08;递归终止条件&#xff09;并返回结果。 递归函数在解决一些问题时非常有用&#xff0c;特别是那些…

kmp算法详解+next数组求解

KMP算法是一种高效的字符串匹配算法&#xff0c;其核心思想是利用已经匹配的部分信息&#xff0c;尽可能减少匹配次数。KMP算法通过预处理阶段计算一个最大前后缀长度数组&#xff08;也称为“部分匹配表”或“失败函数”&#xff09;&#xff0c;用于在匹配失败时确定模式串应…

互联网Java工程师面试题·Spring篇·第七弹

目录 36、什么是基于 Java 的 Spring 注解配置? 给一些注解的例子. 37、什么是基于注解的容器配置? 38、怎样开启注解装配&#xff1f; 39、Required 注解 40、Autowired 注解 41、Qualifier 注解 42、在 Spring 框架中如何更有效地使用 JDBC? 43、JdbcTemplate 44…

网络安全(黑客)-零基础自学

想自学网络安全&#xff08;黑客技术&#xff09;首先你得了解什么是网络安全&#xff01;什么是黑客&#xff01; 网络安全可以基于攻击和防御视角来分类&#xff0c;我们经常听到的 “红队”、“渗透测试” 等就是研究攻击技术&#xff0c;而“蓝队”、“安全运营”、“安全…

NowCoder | 环形链表的约瑟夫问题

NowCoder | 环形链表的约瑟夫问题 OJ链接 思路&#xff1a; 创建带环链表带环链表的删除节点 代码如下&#xff1a; #include<stdlib.h>typedef struct ListNode ListNode; ListNode* ListBuyNode(int x) {ListNode* node (ListNode*)malloc(sizeof(ListNode));node…

基于springboot+vue的图书馆管理系统

图书馆管理系统 springboot32阿博图书馆管理系统 源码合集&#xff1a; www.yuque.com/mick-hanyi/javaweb 源码下载&#xff1a;博主私 摘 要 随着社会的发展&#xff0c;计算机的优势和普及使得阿博图书馆管理系统的开发成为必需。阿博图书馆管理系统主要是借助计算机&…

vue3高德地图+搜索+点击获取经纬度

首先 安装依赖 npm i amap/amap-jsapi-loader --save html&#xff08;设置一个容器&#xff09;点击位置控制台可以打印到数据 如果想要回显到input 只需在input内绑定v-modal即可 <template><div><input style"width: 80%; height: 30px" v-mode…

Java进阶篇--线程池之ScheduledThreadPoolExecutor

目录 ScheduledThreadPoolExecutor简介 构造方法 特有方法 可周期性执行的任务-ScheduledFutureTask DelayedWorkQueue 什么是DelayedWorkQueue&#xff1f; 为什么要使用DelayedWorkQueue呢&#xff1f; DelayedWorkQueue的数据结构 ScheduledThreadPoolExecutor执行…

uniApp页面通讯

Uniapp 是一款基于 Vue.js 开发的框架&#xff0c;它可以用来开发多端应用&#xff0c;包括微信小程序、H5、APP 等。在 Uniapp 中&#xff0c;页面通讯分为三种方式&#xff1a;事件总线、Vuex 和 uni.$emit。 事件总线&#xff08;EventBus&#xff09;&#xff1a;事件总线是…

挖掘非结构化数据潜能——向量数据库的探索之路

“ 摸着石头过河&#xff0c;一直向前&#xff0c;不断尝试 ” 整理 | 小白 出品&#xff5c;极新 IDC 预测&#xff0c;到 2025 年&#xff0c;中国的数据量将增长到 48.6ZB&#xff0c;80% 是非结构化数据&#xff0c;并且将成为全球最大的数据圈。在我们的日常生活中&…

rancher或者其他容器平台使用非root用户启动jar

场景&#xff1a; java程序打成镜像&#xff0c;在rancher上运行&#xff0c;默认是root账户&#xff0c;发现hdfs或者hive不允许root账户操作&#xff1b;所以打算用费root账户启动jar&#xff0c;使其具有hive和hdfs的操作权限。 Dockerfile entrypoint.sh 思路就是上面这样…

git and svn 行尾风格配置强制为lf

git CLI配置&#xff1a; // 提交时转换为LF&#xff0c;检出时转换为CRLF git config --global core.autocrlf true // 提交时转换为LF&#xff0c;检出时不转换 git config --global core.autocrlf input // 提交检出均不转换 git config --global core.autocrlf f…

C# wpf 实现任意控件(包括窗口)更多拖动功能

系列文章目录 第一章 Grid内控件拖动 第二章 Canvas内控件拖动 第三章 任意控件拖动 第四章 窗口拖动 第五章 附加属性实现任意拖动 第六章 拓展更多拖动功能&#xff08;本章&#xff09; 文章目录 系列文章目录前言一、添加的功能1、任意控件MoveTo2、任意控件DragMove3、边…

19 款Agent产品工具合集

原文&#xff1a;19 款Agent产品工具合集 什么是Agent? 你告诉GPT完成一项任务&#xff0c;它就会完成一项任务。 如果你不想为GPT提出所有任务怎么办&#xff1f;如果你想让GPT自己思考怎么办&#xff1f; 想象一下&#xff0c;你创建了一个AI&#xff0c;你可以给它一个…

第一章:IDEA

系列文章目录 文章目录 系列文章目录前言一、IDEA 的使用1.1 IDEA 工作界面1.2 IDEA 的基本介绍和使用1.3 IDEA 使用技巧和经验1.4 IDEA编译与源文件1.5 IDEA 常用快捷键1.6 IDEA模板/自定义模板 总结 前言 IDEA 全称 IntelliJ IDEA&#xff0c;在业界被公认为最好的 Java 开发…