开发uniapp 小程序时遇到的问题

1、【微信开发者工具报错】routeDone with a webviewId XXX that is not the current page

解决方案:
在app.json 中添加 “lazyCodeLoading”: “requiredComponents”
uniapp的话加到manifest.json下的mp-weixin

外部链接文章:解决方案文章1
解决方案文章2

"mp-weixin" : {
    "appid": "wx0dd22774d88e0546",
     "setting" : {
         "urlCheck" : false
     },
     "usingComponents" : true,
     "libVersion": "latest",
     "lazyCodeLoading": "requiredComponents",//添加此行代码
     "requiredPrivateInfos":["getLocation"],
     "permission": {
         "scope.userLocation": {
             "desc": "将获取你的具体位置信息,用于准确为您提供所在范围内的服务信息"
         }
     }
 },

2、【微信开发者工具报错】[ project.config.json 文件内容错误] project.config.json: libVersion 字段需为 string, string

解决方案:添加"libVersion": "latest",

外部链接文章:解决方案文章

3、【微信开发者工具报错】安装pinia后编译项目报错“hasInjectionContext“ is not exported by “node_modules/vue-demi/lib/index.mjs“

解决方案:将pinia的版本改成2.0.36 固定版本

外部链接文章:解决方案文章

4、【微信开发者工具报错】<script> and <script setup> must have the same language type解决

因为想在app.vue 中添加globalData 而产生了报错 ,
解决方案:需要添加 lang='ts'

在添加globalData的时候发现 globalData 只能在App.vue中使用vue2的方式使用 vue3的ts中不能使用 想要全局变量还可以放在pinia中

<script lang='ts' >
  export default {
    name: 'CustomName',
    inheritAttrs: false,
    customOptions: {},
    globalData:{
	    baseUrl:'https://api-policy.dev.v2.chinawip.com'
	  }
  }
</script>
<script setup lang='ts' >
// ............
</script>

外部链接文章:解决方案文章

5、uniapp+vue3+setup语法糖开发微信小程序时不能定义globalData的解决方法

解决方案:setup语法糖和 vue2的语法混合使用 例如如上边的定义globalData的使用

**外部链接文章:解决方案文章
在这里插入图片描述

6、vscode px转rpx成功解决办法

vscode 安装 插件我安装的px to rpx 在这里插入图片描述
然后去设置里配置一下,改为375即全部配置完成。
在这里插入图片描述

7、微信小程序getLocation报错 getLocation:fail the api need to be declared in the requiredPrivateInfos field in

在开发地图时使用到了uni.getLocation,此时需要在uniapp的下 添加 :加到manifest.json下的mp-weixin添加"requiredPrivateInfos":["getLocation"],这样就会出现下边的弹窗
还需要添加 "permission": { "scope.userLocation": { "desc": "将获取你的具体位置信息,用于准确为您提供所在范围内的服务信息" } },这样才能使用

uni.getLocation({
      //type: 'wgs84',
      type: 'gcj02',
      success: (res:any)=>{
        // console.log(res);res.latitude res.longitude
        
      },
      fail: (res)=>{
        console.log('用户拒绝授权获取位置信息,使用默认经纬度');
        
      },
      complete: (res)=>{
        // console.log(res);
        // 根据位置数据更新页面数据
      }
    });

在这里插入图片描述
在这里插入图片描述

8、在使用scroll-view实现横向滚动时不能的滚动的解决方法

1、在scroll-view标签上加上样式属性:display: flex; white-space:nowrap;
2、scroll-view标签下的一级栏目标签需要加上样式属性:display: inline-block;
只有结合上面两步,才能实现横向滚动。

<!-- 下列代码未加规范,仅供参考,请勿模仿 -->
<scroll-view scroll-x style='display: flex;white-space:nowrap;' class=''>
  <view style='width:200rpx;height: 200rpx;display: inline-block;background-color: red;'></view>
  <view style='width:200rpx;height: 200rpx;display: inline-block;background-color: blue;'></view>
  <view style='width:200rpx;height: 200rpx;display: inline-block;background-color: green;'></view>
  <view style='width:200rpx;height: 200rpx;display: inline-block;background-color: orange;'></view>
  <view style='width:200rpx;height: 200rpx;display: inline-block;background-color: yellow;'></view>
  <view style='width:200rpx;height: 200rpx;display: inline-block;background-color: black;'></view>
</scroll-view>

9 、Pinia报错: “getActivePinia was called with no active Pinia. Did you forget to install pinia?“pinia访问其他store的action报错:未初始化调用getActivePinia()

因为想在app.vue中引入store 而导致的报错 ,所以不能在app.vue中引入store中的数据 。
总结 在app.vue中使用pinia store时, pinia插件还没被vue框架初始化。

如果想解决 试试下边的两篇文章的方法

外部链接文章:解决方案文章1
解决方案文章2

10、小程序正式版报错600002 url not in domain list

原因是没有在小程序后台配置服务器域名

外部链接文章:解决方案文章

11、JSON 注释问题 解决红色波浪线

在vscode面板中,点击右小角设置按钮→点击设置→在搜索设置中搜索“文件关联”→找到Files: Associations的配置项→点击添加项→把 manifest.json 和 pages.json 设置为 jsonc即可;

12、微信小程序uniapp+vue3+ts+pinia的环境搭建

外部链接文章:微信小程序uniapp+vue3+ts+pinia的环境搭建

13、uniapp中获取位置信息处理

外部链接文章:uniapp中获取位置信息处理

  1. 页面中使用
  const isShowLocationControl = ref(false)//是否展示定位控件
  const defaultLatitude = "34.343119"
  const defaultLongitude = "108.93963"
  const isOpenSetting = ref(false); // 是否打开设置界面
  // 获取定位,兼容用户拒绝授权及相关处理(获取用户当前的授权状态 => 未同意授权位置时,引导用户打开设置界面,重新选择授权功能 => 允许后重新获取位置)
  const doGetLocation = async () => {
    isOpenSetting.value = false;
    uni.getSetting({
        success: (settingRes) => {
          console.log(settingRes)
          // 判断用户未同意授权位置时,提示并引导用户去打开设置界面,用户可重新选择授权功能
          if (!isOpenSetting.value && typeof(settingRes.authSetting['scope.userLocation']) != 'undefined' && !settingRes.authSetting['scope.userLocation']) {
            uni.showModal({
              title: '需要授权获取您的位置信息',
              content: '你的位置信息将用于为您提供更合适您的服务',
              success: (data) => {
                if (data.confirm) {
                  isOpenSetting.value = true;
                  // 打开设置界面
                  uni.openSetting({
                    success: (response) => {
                      if(response.authSetting['scope.userLocation']){
                        console.log('重新授权获取位置信息-同意');
                        // 重新获取定位
                        getLocation();
                      }else{
                        console.log('重新授权获取位置信息-未同意');
                        doGetLocationAfter({
                          latitude : defaultLatitude,
                          longitude : defaultLongitude,
                          isOpenSetting : isOpenSetting.value,
                        })
                      }
                    },
                    fail:()=>{
                      console.log('openSetting接口调用失败的回调函数');
                    }
                  })
                } else if (data.cancel) {
                  console.log('showModal接口:用户点击取消未打开设置界面');
                  doGetLocationAfter({
                    latitude : defaultLatitude,
                    longitude : defaultLongitude,
                    isOpenSetting : isOpenSetting.value,
                  })
                }
              },
              fail: function(){
                console.log('showModal接口:调用失败的回调函数');
              }
            });
          }else{
            // 重新获取定位
            getLocation();
          }
        }
      })
  }
   // 获取位置
  const getLocation = () =>{
    uni.getLocation({
      //type: 'wgs84',
      type: 'gcj02',
      success: (res:any)=>{
        // console.log(res);
        doGetLocationAfter({
          latitude : res.latitude,
          longitude : res.longitude,
          isOpenSetting : isOpenSetting.value,
        })
        if(!isShowLocationControl.value){
          isShowLocationControl.value = true
        }
      },
      fail: (res)=>{
        console.log('用户拒绝授权获取位置信息,使用默认经纬度');
        isShowLocationControl.value = false
        doGetLocationAfter({
          latitude : defaultLatitude,
          longitude : defaultLongitude,
          isOpenSetting : isOpenSetting.value,
        })
        // 根据位置数据更新页面数据
      },complete: (res)=>{
        // console.log(res);
        // 根据位置数据更新页面数据
      }
    });
  }
  // 最终获取到的信息数据
  const doGetLocationAfter = (data:{latitude:string,longitude:string,isOpenSetting:boolean}) =>{
    if(data.latitude != houseListParams.value.latitude || data.longitude != houseListParams.value.longitude){
      houseListParams.value.latitude = data.latitude;
      houseListParams.value.longitude = data.longitude;
      // 根据位置数据更新页面数据
      getHouseList()
    }else{
      // console.log('位置信息无变化');
      getHouseList()
    }
  }
  1. 封装组件
// import { doGetLocation } from '@/utils/getLocation.js';
 
let isOpenSetting:any;
 
/**
 * 获取定位,兼容用户拒绝授权及相关处理(获取用户当前的授权状态 => 未同意授权位置时,引导用户打开设置界面,重新选择授权功能 => 允许后重新获取位置)
 */
export function doGetLocation(callback:any){
	isOpenSetting = false; // 是否打开设置界面
	// 获取用户当前的授权状态
	uni.getSetting({
		success: (settingRes) => {
			console.log(settingRes)
			console.log(isOpenSetting)
			// 判断用户未同意授权位置时,提示并引导用户去打开设置界面,用户可重新选择授权功能
			if (!isOpenSetting && typeof(settingRes.authSetting['scope.userLocation']) != 'undefined' && !settingRes.authSetting['scope.userLocation']) {
				uni.showModal({
					title: '需要授权获取您的位置信息',
					content: '你的位置信息将用于为您提供更合适您的服务',
					success: (data) => {
						if (data.confirm) {
							isOpenSetting = true;
							// 打开设置界面
							uni.openSetting({
								success: (response) => {
									if(response.authSetting['scope.userLocation']){
										console.log('重新授权获取位置信息-同意');
										// 重新获取定位
										getLocation((data:any)=>{
											callback({
												isOpenSetting:isOpenSetting,
												...data
											})
										});
									}else{
										console.log('重新授权获取位置信息-未同意');
										callback({
											isOpenSetting:isOpenSetting,
											latitude : '',
											longitude : '',
										})
									}
								},
								fail:()=>{
									console.log('openSetting接口调用失败的回调函数');
								}
							})
						} else if (data.cancel) {
							console.log('showModal接口:用户点击取消未打开设置界面');
							callback({
								isOpenSetting:isOpenSetting,
								latitude : '',
								longitude : '',
							})
						}
					},
					fail: function(){
						console.log('showModal接口:调用失败的回调函数');
					}
				});
			}else{
				// 重新获取定位
				getLocation((data:any)=>{
					callback({
						isOpenSetting:isOpenSetting,
						...data
					})
				});
			}
		}
	})
}
 
/**
 * 获取位置
 */
export function getLocation(callback:any){
	uni.getLocation({
		//type: 'wgs84',
		type: 'gcj02',
		success: (res)=>{
			console.log(res);
			callback({
				latitude : res.latitude,
				longitude : res.longitude,
			})
		},
		fail: (res)=>{
			console.log('用户拒绝授权获取位置信息,使用默认经纬度0 0');
			callback({
				latitude : '',
				longitude : '',
			})
		},complete: (res)=>{
			// console.log(res);
			// 根据位置数据更新页面数据
		}
	});
}

14、uniapp 使用lottiefiles动画

 <!-- canvas 的 width和height 必须设置 -->
<canvas id="Mycanvas" ref="canvas" type="2d" :style="{width:windowWidth+'px',height:windowHeight+'px'}" style="position: absolute;top: 0;z-index: -1;"></canvas>
import { onLoad } from '@dcloudio/uni-app';
import lottie from 'lottie-miniprogram';
import animationData from "@/assets/myAnimation.json"
//获取设备的宽高进行等比例放大缩小
const windowWidth = uni.getWindowInfo().windowWidth
const windowHeight = windowWidth/375*812
onLoad(() => {
  init()
})
const init = () => {
  uni.createSelectorQuery().select('#Mycanvas').node(res => {
    const canvas = res.node
    //因为ui给的json文件的宽高是375*812的 所以这里把animationData的宽高给重新改了一下
    animationData.h = windowHeight
    animationData.w = windowWidth
    //此处的canvas的宽高也必须设置 ,
    // 页面中和此处的canvas必须设置宽高 不然会导致动画样式错误  这是我在开发中遇到的问题
    canvas.width = windowWidth//设置宽高
    canvas.height = windowHeight
    setTimeout(()=>{
      const context = canvas.getContext('2d')
      lottie.setup(canvas)//要执行动画,必须调用setup,传入canvas对象
      lottie.loadAnimation({//微信小程序给的接口
        loop: true,//是否循环播放(选填)
        autoplay: true,//是否自动播放(选填)
        animationData,
        // path:"",//lottie json包的网络链接,可以防止小程序的体积过大,要注意请求域名要添加到小程序的合法域名中
        rendererSettings:{
          context,//es6语法:等同于context:context(必填)
          // preserveAspectRatio:"fill" 
        }       
      })
    })
  }).exec()
}

外部链接文章:解决方案文章1

解决方案文章2

15、uniapp 微信小程序地图map组件样式自定义

uniapp 微信小程序地图map组件样式自定义

16、在小程序中使用网络字体,和使用字体后ios生效,安卓不生效的问题

	@font-face {
	  font-family: 'Barlow';
	  src: url('https://img.cyeyi.com/realtor-mini/fonts/Barlow-Medium.ttf');
	}

我是使用的网络字体的方法后发现ios生效,安卓不生效,原因是跨域的问题导致的

外部链接文章:解决方案文章1
解决方案文章2
解决方案文章3

17、小程序获取机型

 // 获取系统信息
  const systemInfo = uni.getSystemInfoSync();
 
 // 获取设备机型
 const platform = systemInfo.platform;
 const paddingTop = ref(0)
 // 判断机型
 if (platform == 'ios') {
   console.log('当前设备是 ios');
   paddingTop.value = 0
 } else if (platform == 'android') {
   console.log('当前设备是 android');
   paddingTop.value = 12
 } else if (platform == 'windows') {
   console.log('当前设备是 windows');
   paddingTop.value = 0
 }else if (platform == 'mac') {
   console.log('当前设备是 mac');
   paddingTop.value = 0
 } else {
   console.log('当前设备是其他类型');
   paddingTop.value = 0
 }

18、MapContext.includePoints(Object object)用于将地图标记展示在可视区域内

官网地址
因为地图是整个页面,但是想展示的地图标记想展示在可视区域内所以就是使用了地图的includePoints方法,这个方法中有个padding属性

padding:坐标点形成的矩形边缘到地图边缘的距离,单位像素。格式为[上,右,下,左]。开发者工具暂不支持padding参数。

在这里插入图片描述

let includePoints = data.map((item:HouseModel) => {
   return {
     latitude:Number(item.latitude),
     longitude:Number(item.longitude)
   }
 })
 mapContext.includePoints({
   points:includePoints,
   padding:[225,18,280,18]
 })

19、自定义展示地图标记上的气泡文字

	<map :id="mapId" :scale="14"  class="map" :latitude="houseListParams.latitude" :longitude="houseListParams.longitude" :markers="covers" :show-location="true" @markertap="markerClick">
	 <view class="locationControl" v-if="isShowLocationControl" @click="controltap"><image class="locationControlImg" :src="globalDataStore.imgUrl + 'locationControl.png'"></image></view>
	   <!-- 自定义展示气泡 -->
	   <cover-view slot="callout" style="line-height: normal;">
	     <cover-view class="customCallout" :marker-id="markerIdStyle.markerId">
	       <!-- &thinsp; 解决ios文字展示不全  paddingTop 安卓展示问题-->
	       <cover-view class="content" :style="{paddingTop: paddingTop+'rpx'}">{{markerIdStyle.markerTitle}}&thinsp;</cover-view>
	     </cover-view>
	   </cover-view>
	 </map>

在自定义过程中遇到的问题:

  1. 苹果手机文字末尾展示不全的现象
    解决方法: 我在文字的末尾添加了  让文字尽可能的展示出来

    HTML中&nbsp; &ensp; &emsp; &thinsp;等6种空白空格的区别

  2. 文字在ios上展示的没有问题,在安卓机上的高度展示有问题,内容整体靠上
    解决方法: 针对不同的机型 设置文字的上padding (padding-top),来解决安卓机上文字展示的问题

20、封装requeset

import useglobalDataStore from "@/store/globalData"
const baseUrl = useglobalDataStore().baseUrl;
// globalData获取baseUrl
// const baseUrl = getApp().globalData.baseUrl;
let tokenAbnormal = false;
let apiList = <any>[];
let errorNum = 0;
const MAX_NUM = 3;
interface OptionsModel {
	url : string
	data ?: any,
	method ?: "OPTIONS" | "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE" | "CONNECT",
	callback ?: (value : any) => void;
}

class Request {

	// api在原型上,实例可以调用
	// private 只能在内部调用,外部是无法调用到api这个函数的
	private api<T>(options : OptionsModel) : Promise<T> {

		return new Promise((resolve, reject) => {

			let header : any = { 'content-type': 'application/json' }

			let token = uni.getStorageSync("TOKEN");
			if (token) {
				header.Authorization = token
			}

			uni.request({
				url: baseUrl + options.url,
				data: options.data,
				method: options.method || 'GET',
				header,
				timeout: 30000,
				dataType: 'json',
				responseType: 'text',
				success: (result : UniApp.RequestSuccessCallbackResult) => {

					let res = result.data as AnyObject // 拿到响应体

					if (res.code == 200) {
						if (options.callback) {
							options.callback(res.data)
							return
						}
						resolve(res.data)

					} else if (res.code == 401) { // 代表未登录,或者是token过期,提示去登录页
						uni.removeStorageSync('TOKEN')
						apiList.push({ url: options.url, method: options.method || 'GET', data: options.data, header, timeout: 30000, callback: resolve })
						if (!tokenAbnormal) {
							errorNum++
							tokenAbnormal = true
							uni.login({
								success: (resLogin) => {
									console.log(resLogin, 'login');
									this.post({
										url: `/realtor-mini-api/api/login`,
										data: { code: resLogin.code }
									}).then(resLoginData => {
										console.log(resLoginData, 'token');
										uni.setStorageSync('TOKEN', resLoginData.token)
									})
								}
							})
							setTimeout(() => {
								if (errorNum < MAX_NUM) {
									apiList.forEach(item => {
										this.api(item)
									})
								}
								tokenAbnormal = false;
								apiList = []
							}, 1000);
						}
					} else {

						reject(res)

					}

				},
				fail: (error) => {
					reject(error)
				},
				complete: () => { }
			});

		})

	}


	get<T>(options : OptionsModel) {
		return this.api<T>({ ...options, method: 'GET' })
	}

	post<T>(options : OptionsModel) {
		return this.api<T>({ ...options, method: 'POST' })
	}

	put<T>(options : OptionsModel) {
		return this.api<T>({ ...options, method: 'PUT' })
	}

	delete<T>(options : OptionsModel) {
		return this.api<T>({ ...options, method: 'DELETE' })
	}

}

export default Request

使用

import Request from "@/utils/request";

export interface LoginModel {
  token: string
}

export interface UserInfoModel {
  user_details: {
    mobile: number | string | null
  },
  realtor_details: {
    name: string | null,
    is_admin: number | null
    admin_name: string
  }
}

class UserRequest extends Request {
  // 获取token
  login(code: string) {
    return this.post<LoginModel>({
      url: `/realtor-mini-api/api/login`,
      data:{code}
    })
  }
  // 获取用户详情,需要请求头携带token
  getUserInfo () {
    return this.get<UserInfoModel>({
      url: `/realtor-mini-api/api/user/details`
    })
  }
  // 用户-授权手机号码登录
  saveMobile(code: string | number) {
    return this.post<null>({
      url: `/realtor-mini-api/api/phone`,
      data:{code}
    })
  }
  // 用户-退出登录
  logout() {
    return this.post<null>({
      url: `/realtor-mini-api/api/logout`,
    })
  }
}

export default new UserRequest
import userApi from '@/api/user';
await userApi.saveMobile(e.detail.code)

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

LLM的基础模型2:Transformer的组成模块

Transformer是一种先进的语言模型&#xff0c;它在预测下一个单词或标记方面与传统的语言模型有所不同&#xff0c;但仍然遵循相同的基本原理。Transformer通过一系列复杂的步骤&#xff0c;将输入的标记序列转换为能够进行预测的丰富向量序列。 在Transformer中&#xff0c;输…

反转链表 (oj题)

一、题目链接 https://leetcode.cn/problems/reverse-linked-list/submissions/538124207 二、题目思路 1.定义三个指针&#xff0c;p1先指向NULL p2指向头结点 p3指向第二个结点 2.p2的next指向p1。然后移动指针&#xff0c;p1来到p2的位置&#xff0c;p2来到p3的位置&…

二开版微交易系统

下载地址&#xff1a;二开版微交易系统

验证码案例

目录 前言 一、Hutool工具介绍 1.1 Maven 1.2 介绍 1.3 实现类 二、验证码案例 2.1 需求 2.2 约定前后端交互接口 2.2.1 需求分析 2.2.2 接口定义 2.3 后端生成验证码 2.4 前端接收验证码图片 2.5 后端校验验证码 2.6 前端校验验证码 2.7 后端完整代码 前言…

vue项目搭建

目录 引入依赖1. elementa. notifyb. el-dropdown-item绑定点击事件点击无效c. 页面重新加载d. 路由新页面打开e.Scrollbar 滚动条 2. main.js模板3.axios post请求参数4. 数据保存在本地5. mavon-editor6. 获得路由参数7.远程搜索8.参数传入自定义参数9.固定屏幕不动10.有时事…

Elasticsearch 认证模拟题 - 14

一、题目 在集群中输入以下指令&#xff1a; PUT phones/_doc/1 {"brand":"Samsumg","model":"Galaxy S9","features":[{"type":"os", "value":"Android"},{"type":&q…

Edge怎么关闭快捷键

Edge怎么关闭快捷键 在Edge浏览器中&#xff0c;你可以通过以下步骤关闭快捷键&#xff1a; 打开Edge浏览器&#xff0c;输入&#xff1a;edge://flags 并按下回车键。 在Flags页面中&#xff0c;搜索“快捷键”(Keyboard shortcuts)选项。 将“快捷键”选项的状态设置为“…

【SpringBoot】项目搭建基本步骤(整合 Mybatis)

搭建 SpringBoot 项目有两种方式&#xff1a;使用 IDEA、或者在 Spring 官网下载。 1. IDEA 创建 打开 IDEA 后&#xff0c;英文版请点击 File -> New -> Project -> Spring Initialer。 中文版请点击 文件 -> 新建 -> 项目 -> Spring Initialer。 在打开的…

老师如何制作高考后志愿填报信息采集系统?

高考结束后&#xff0c;志愿填报成为学生们的头等大事。面对众多选择&#xff0c;如何高效、准确地填报志愿&#xff0c;是每个学生和家长都关心的问题。作为老师&#xff0c;能否利用现有的技术工具&#xff0c;帮助学生更好地完成志愿填报呢&#xff1f; 老师们需要一个能够…

机器学习作业6——svm支持向量机

目录 一、理论 概念&#xff1a; 线性可分&#xff1a; 支持向量&#xff1a; 间隔&#xff1a; 目标&#xff1a; 软间隔&#xff1a; 梯度下降法&#xff1a; 别的方法&#xff1a; 拉格朗日函数&#xff1a; SMO算法&#xff1a; 核函数&#xff1a; 二、代码 …

Zemax中FFT PSF和惠更斯PSF的区别?

在Zemax“分析”选项卡中&#xff0c;有PSF&#xff08;“点扩散函数”&#xff09;图&#xff0c;主要包括如下两种计算方式&#xff1a; 1. FFT PSF&#xff0c;快速傅里叶变换&#xff08;fast fourier transform&#xff0c;FFT&#xff09; 该方法可以看做是以下点扩散函…

【录制,纯正人声】OBS录制软件,音频电流音,杂音解决办法,录制有噪声的解决办法

速度解决的方法 &#xff08;1&#xff09;用RNNoise去除噪声。RNNoise是一个开源的&#xff0c;效果不好的噪声去除器。使用方法就是点击滤镜&#xff0c;然后加噪声抑制RNNoise。【这方法不好用】 &#xff08;2&#xff09;用Krisp(https://krisp.ai/) 去除噪声。这个Kris…

华为云服务器-云容器引擎 CCE环境构建及项目部署

1、切换地区 2、搜索云容器引擎 CCE 3、购买集群 4、创建容器节点 通过漫长的等待(五分钟左右)&#xff0c;由创建中变为运行中&#xff0c;则表明容器已经搭建成功 购买成功后&#xff0c;返回容器控制台界面 5、节点容器管理 6、创建redis工作负载 7、创建mysql工作负载 8、…

有效的括号(oj题)

一、题目链接 https://leetcode.cn/problems/valid-parentheses/submissions/538110206 二、题目思路 利用栈的性质&#xff0c;后进先出 1.依次读取字符串&#xff0c;判断是否为左括号&#xff0c;如果是&#xff0c;就将其入栈。 2.如果读取的不是左括号&#xff0c;就说…

c++编译器在什么情况下会提供类的默认构造函数等,与析构函数

我们都知道&#xff0c;在 c 里&#xff0c;编写的简单类&#xff0c;若没有自己编写构造析构函数与 copy 构造函数 与 赋值运算符函数&#xff0c;那么编译器会提供这些函数&#xff0c;并实现简单的语义&#xff0c;比如成员赋值。看 源码时&#xff0c;出现了下图类似的情形…

如何使用Python的Turtle模块绘制小猪

一、前置条件 在开始学习如何使用Python的Turtle模块进行绘画之前&#xff0c;请确保你的电脑已安装Python环境。如果尚未安装Python&#xff0c;你可以从Python官网下载并安装最新版本。 Turtle模块是Python内置的一个用于绘图的库&#xff0c;通常不需要额外安装。如果你发…

vivado DIAGRAM、HW_AXI

图表 描述 块设计&#xff08;.bd&#xff09;是在IP中创建的互连IP核的复杂系统 Vivado设计套件的集成商。Vivado IP集成器可让您创建复杂的 通过实例化和互连Vivado IP目录中的IP进行系统设计。一块 设计是一种分层设计&#xff0c;可以写入磁盘上的文件&#xff08;.bd&…

【TB作品】MSP430F5529 单片机,数字时钟设计与实现,整点时通过蜂鸣器播放音乐进行报时

基于单片机的数字时钟设计与实现 作品名称 基于MSP430单片机的OLED显示数字时钟 作品功能 本作品实现了一个具有时间显示和整点报时功能的数字时钟。通过OLED屏幕显示当前时间&#xff0c;用户可以通过按键设置时间&#xff0c;并在整点时通过蜂鸣器播放音乐进行报时。 作…

vue处理json数据

背景&#xff1a;后端返回的数据不是我想要的&#xff0c;现在需要把 name 替换为title&#xff08;小声蛐蛐&#xff1a;又让我处理数据&#xff09; 后端返回数据格式 修改字段操作&#xff1a;&#xff08;使用递归遍历的方式将title属性赋了name的值&#xff09; renderT…

八、【源码】细化XML语句构建器,完善静态SQL解析

源码地址&#xff1a;https://github.com/mybatis/mybatis-3/ 仓库地址&#xff1a;https://gitcode.net/qq_42665745/mybatis/-/tree/08-optimize-xml-parse 细化XML语句构建器&#xff0c;完善静态SQL解析 这一节主要是优化XML解析SQL部分&#xff0c;流程大概为&#xff…