前端uniapp请求真是案例(带源码)
目录
- 案例一
- 案例二
- 最后
案例一
<template><view class="box"><!-- <view class="title-back" @click="backPrivious"><</view> --><!-- <view class="title-back" @click="backPrivious">< </view> --><view class="currentLimit"><!-- 全部 --><view class="currentLimit-half" v-if="itemIndex === 1">当前可申请贷款额度<text>{{money2}}</text>元</view><!-- 一半 --><view class="currentLimit-half" v-if="itemIndex === 2">当前可申请贷款额度<text>{{money2}}</text>元</view><!-- 四分之一 a quarter--><view class="currentLimit-half" v-if="itemIndex === 3">当前可申请贷款额度<text>{{money2}}</text>元</view><!-- <view class="currentLimitImg" v-if="bank_open"><image src="../../static/withdrawalimg.png" mode="aspectFill"></image></view> --><view class="currentLimit-txt"><view class="currentLimit-txt-btm">我要提额</view><view class="currentLimit-txt-lft">想要更高贷款额度,试试提额吧!</view></view><view class="currentLimit-ipt"><text>¥</text> <input v-model="money" class="unir" type="number"placeholder-class="currentLimit-ipt-placeholder" placeholder="" /><image src="../../static/delete.png" mode="aspectFill" @click="getClear"></image></view><view class="currentLimit-tab"><view class="currentLimit-tab1" :class="{active:itemIndex == 1}" @click="get1(1)">全额申请</view><view class="currentLimit-tab1 currentLimit-tab2" :class="{active:itemIndex == 2}" @click="get1(2)">1/2</view><view class="currentLimit-tab1 currentLimit-tab2" :class="{active:itemIndex == 3}" @click="get1(3)">1/4</view></view></view><!-- annualcargo --><view class="annualcargo"><view class="annualcargo-list"><view class="annualcargo-list-lft">贷款期限</view><view class="annualcargo-list-rgt"><!-- 请选择<image src="../../static/right.png" mode="aspectFill"></image> --><uni-data-select v-model="value1" :localdata="term_listArray" @change="change"></uni-data-select><image src="/static/right.png" mode="aspectFill"></image></view></view><view class="annualcargo-list"><view class="annualcargo-list-lft">年化利率<image src="../../static/access.png" mode="aspectFill"></image></view><view class="annualcargo-list-rgt2">{{interest_rate}}%</view></view><view class="annualcargo-list"><view class="annualcargo-list-lft">贷款签约账号</view><view class="annualcargo-list-rgt"><!-- 请选择<image src="../../static/right.png" mode="aspectFill"></image> --><uni-data-select v-model="value2" :localdata="account_listArray" @change="change"></uni-data-select><!-- 请选择 --><image src="/static/right.png" mode="aspectFill"></image></view></view><view class="annualcargo-list"><view class="annualcargo-list-lft">借款用途</view><view class="annualcargo-list-rgt3">生产经营</view></view></view><!--statement --><view class="statement"><view class="statement-txt">用途承诺声明:本企业承诺借款仅用于日常生产经营周转。不用于 股市和证券投资、金融衍生产品、股本权益性投资固定资产投资或国家有关法律、法规和规章禁止的生产、经营领域和其他消费 投资行为。<text>复制粘贴</text></view><view class="statement-textarea">请复制上段话到此文本框中再进行下一步操作</view></view><view class="statementTey">下一步</view><view class="statementTeyTop"></view></view></view>
</template><script>export default {data() {return {money: '',money2: '',itemIndex: 1,money: '',bank_open: '',interest_rate: '',value1: '',value2: '',range: [{value: 0,text: "美元($)"},{value: 1,text: "人民币(CNY)"},],term_listArray: [],account_listArray: []}},onLoad() {this.getCurrentMoney()},methods: {change(e) {console.log("e:", e);this.money_type = e;},backPrivious() {uni.navigateBack({delta: 1});},get1(index) {this.itemIndex = index;if(index == 1){this.money = this.money2}else if(index == 2){this.money = this.money/2}else if(index == 3){this.money = this.money/2}},getCurrentMoney() {let self = this;uni.request({url: 'http://dkmoni.yunjingwl.com/index.php/api/index/getGeti',method: 'POST',data: {},success: (res) => {console.log(res.data.data.val, 'ressssssssss');self.money = res.data.data.val.money;self.money2 = res.data.data.val.money;self.bank_open = res.data.data.val.bank_open;self.interest_rate = res.data.data.val.interest_rate;// self.term_list = res.data.data.val.term_list;// console.log(res.data.data.val.term_list, 'res.data.data.val.term_lis');let term_listArray = [];res.data.data.val.term_list.forEach((item, index) => {term_listArray.push({value: index,text: item})// console.log(item,'itemmm');// console.log(term_listArray, 'term_listArray');})self.term_listArray = term_listArray;// console.log(term_listArray,'term_listArray');// self.account_list = res.data.data.val.account_list;let account_listArray = [];res.data.data.val.account_list.forEach((item, index) => {account_listArray.push({value: index,text: item})// console.log(item,'itemmm');// console.log(term_listArray, 'term_listArray');})self.account_listArray = account_listArray;// if (res.data && res.statusCode === 200) {// // 请求成功处理// } else {// // 请求失败处理// console.error('请求失败', res);// }},});},getClear(){this.money = ''}}}
</script><style scoped>page {background-color: #F8F9FA;}.box {}.currentLimit {width: 100vw !important;background-color: #FFF;}.currentLimit-half {padding: 20rpx 30rpx 10rpx 30rpx;box-sizing: border-box;font-size: 28rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #666666;line-height: 50rpx;}.currentLimit-half text {font-size: 28rpx;font-family: ;/* font-family: Source Han Sans CN-Regular, Source Han Sans CN; */font-weight: 400;color: #4E73D4;line-height: 50rpx;}.currentLimitImg {width: 182rpx;height: 40rpx;margin-left: 30rpx;}.currentLimitImg image {width: 182rpx;height: 40rpx;}.currentLimit-txt {/* float: right; */display: flex;align-items: center;padding-right: 20rpx;flex-direction: row-reverse;}.currentLimit-txt-lft {font-size: 26rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #9B9B9B;line-height: 32rpx;}.currentLimit-txt-btm {width: 160rpx;height: 60rpx;background: #4A7AE0;border-radius: 232rpx 232rpx 232rpx 232rpx;opacity: 1;font-size: 28rpx;font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;font-weight: normal;color: #FFFFFF;line-height: 40rpx;display: flex;justify-content: center;align-items: center;margin-left: 10rpx;}.currentLimit-ipt {/* height: 150rpx; */height: 120rpx;opacity: 1;display: flex;align-items: center;padding-left: 20rpx;border-bottom: 2rpx solid #F4F4F4;}.currentLimit-ipt text {font-size: 56rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #000000;line-height: 32rpx;}.currentLimit-ipt input {font-size: 90rpx;font-family: HarmonyOS Naskh Arabic UI-Regular, HarmonyOS Naskh Arabic UI;font-weight: 400;color: #000000;line-height: 0rpx;}.currentLimit-tab {padding: 24rpx;box-sizing: border-box;display: flex;flex-direction: row;margin-left: 16rpx;}.currentLimit-tab1 {width: 144rpx;height: 44rpx;background: #F8F9FA;border-radius: 74rpx 74rpx 74rpx 74rpx;opacity: 1;font-size: 24rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #999999;line-height: 32rpx;display: flex;justify-content: center;align-items: center;border: 2rpx solid #F8F9FA;}.active {width: 144rpx;height: 44rpx;background: #EEF2FE;border-radius: 74rpx 74rpx 74rpx 74rpx;opacity: 0.5;border: 2rpx solid #4A7AE0;font-size: 24rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #5D77BA;display: flex;justify-content: center;align-items: center;}.currentLimit-tab2 {margin-left: 32rpx;}.annualcargo {margin-top: 24rpx;background-color: #FFF;}.annualcargo-list {/* padding: 34rpx 32rpx 32rpx 30rpx; */padding: 34rpx 22rpx 32rpx 30rpx;display: flex;justify-content: space-between;border-bottom: 2rpx solid #F4F4F4;}.statement {margin-top: 24rpx;background-color: #FFF;padding-bottom: 12rpx;}.statement-txt {padding: 30rpx 38rpx 32rpx 30rpx;box-sizing: border-box;font-size: 24rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #666666;line-height: 36rpx;}.statement-txt text {font-size: 24rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #408ACB;line-height: 44rpx;border-bottom: 1rpx solid #408ACB;float: right;}.statement-textarea {margin: 5rpx 32rpx 32rpx 32rpx;padding-bottom: 32rpx;width: 686rpx;height: 336rpx;border-radius: 16rpx 16rpx 16rpx 16rpx;opacity: 1;border: 2rpx solid #999999;}.statementTey {width: 714rpx;height: 84rpx;background: #4A7AE0;border-radius: 137rpx 137rpx 137rpx 137rpx;opacity: 1;font-size: 32rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #FFFFFF;line-height: 36rpx;display: flex;justify-content: center;align-items: center;margin: 32rpx auto;}.statementTeyTop {height: 44rpx;}.annualcargo-list-lft {display: flex;align-items: center;font-size: 32rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;}.annualcargo-list-lft image {width: 24rpx;height: 24rpx;margin-left: 10rpx;}.statement-textarea {font-size: 28rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #666666;/* line-height: 44rpx; */padding-top: 28rpx;padding-left: 22rpx;box-sizing: border-box;}.annualcargo-list-rgt {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #999999;line-height: 50rpx;display: flex;align-items: center;}/deep/.annualcargo-list-rgt .uni-select {border: none;/* width: 130rpx; */position: relative;left: 10rpx;}/deep/ .annualcargo-list-rgt .uni-select__input-placeholder {font-size: 28rpx !important;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular !important;font-weight: normal !important;color: #999999 !important;line-height: 50rpx !important;}/deep/ .annualcargo-list-rgt .uni-select__input-text{font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;}.annualcargo-list-rgt image {/* border: 1rpx solid red; */width: 40rpx;height: 40rpx;position: relative;/* left: 3rpx; */}.annualcargo-list-rgt2 {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;margin-right: 10rpx;}.annualcargo-list-rgt3 {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;margin-right: 10rpx;}.currentLimit-ipt input {width: 620rpx;}.currentLimit-ipt image {width: 40rpx;height: 40rpx;}
</style>
案例二
<template><view class="box"><!-- <view class="title-back" @click="backPrivious"><</view> --><!-- <view class="title-back" @click="backPrivious">< </view> --><view class="currentLimit"><!-- 全部 --><view class="currentLimit-half" v-if="itemIndex === 1">当前可申请贷款额度<text>{{money2}}</text>元</view><!-- 一半 --><view class="currentLimit-half" v-if="itemIndex === 2">当前可申请贷款额度<text>{{money2}}</text>元</view><!-- 四分之一 a quarter--><view class="currentLimit-half" v-if="itemIndex === 3">当前可申请贷款额度<text>{{money2}}</text>元</view><view class="currentLimitImg" v-if="bank_open"><image src="../../static/withdrawalimg.png" mode="aspectFill"></image></view><view class="currentLimit-txt"><view class="currentLimit-txt-btm">我要提额</view><view class="currentLimit-txt-lft">想要更高贷款额度,试试提额吧!</view></view><view class="currentLimit-ipt"><text>¥</text> <input v-model="money" class="unir" type="number"placeholder-class="currentLimit-ipt-placeholder" placeholder="" /><image src="../../static/delete.png" mode="aspectFill" @click="getClear"></image></view><view class="currentLimit-tab"><view class="currentLimit-tab1" :class="{active:itemIndex == 1}" @click="get1(1)">全额申请</view><view class="currentLimit-tab1 currentLimit-tab2" :class="{active:itemIndex == 2}" @click="get1(2)">1/2</view><view class="currentLimit-tab1 currentLimit-tab2" :class="{active:itemIndex == 3}" @click="get1(3)">1/4</view></view></view><!-- annualcargo --><view class="annualcargo"><view class="annualcargo-list"><view class="annualcargo-list-lft">还款方式</view><view class="annualcargo-list-rgt"><!-- 请选择<image src="../../static/right.png" mode="aspectFill"></image> --><uni-data-select v-model="value2" :localdata="give_account_listArray" @change="change"></uni-data-select><image src="/static/right.png" mode="aspectFill"></image></view></view><view class="annualcargo-list"><view class="annualcargo-list-lft">贷款期限</view><view class="annualcargo-list-rgt"><!-- 请选择<image src="../../static/right.png" mode="aspectFill"></image> --><uni-data-select v-model="value1" :localdata="term_listArray" @change="change"></uni-data-select><image src="/static/right.png" mode="aspectFill"></image></view></view><view class="annualcargo-list"><view class="annualcargo-list-lft">年化利率<image src="../../static/access.png" mode="aspectFill"></image></view><view class="annualcargo-list-rgt2">{{interest_rate}}%</view></view><!-- <view class="annualcargo-list"><view class="annualcargo-list-lft">贷款签约账号</view><view class="annualcargo-list-rgt">请选择<image src="/static/right.png" mode="aspectFill"></image></view></view> --><view class="annualcargo-list"><view class="annualcargo-list-lft">贷款发放账户</view><view class="annualcargo-list-rgt3">{{give_account}}</view></view><view class="annualcargo-list"><view class="annualcargo-list-lft">借款用途</view><view class="annualcargo-list-rgt3">生产经营</view></view></view><!--statement --><view class="statement"><view class="statement-txt">用途承诺声明: 本企业承诺借款仅用于日常生产经营周转不用于股 市和证券投资、金融衍生产品、股本权益性投资固定资产投资或 国家有关法律、法规和规章禁止的生产、经营领域和其他消费投 资行为。若资金用途不符合上述要求贵行有权收回贷款,压降授 信额度,并追究相应法律责任。<text>复制粘贴</text></view><view class="statement-textarea">请复制上段话到此文本框中再进行下一步操作</view></view><view class="statementTey">下一步</view><view class="statementTeyTop"></view></view></view>
</template><script>export default {data() {return {money: '',itemIndex: 1,money: '',money2: '',bank_open: '',interest_rate: '',value1: '',value2: '',range: [{value: 0,text: "美元($)"},{value: 1,text: "人民币(CNY)"},],term_listArray: [],give_account_listArray: [],give_account: ''}},onLoad() {this.getCurrentMoney()},methods: {change(e) {console.log("e:", e);this.money_type = e;},backPrivious() {uni.navigateBack({delta: 1});},get1(index) {this.itemIndex = indexif (index == 1) {this.money = this.money2} else if (index == 2) {this.money = this.money / 2} else if (index == 3) {this.money = this.money / 2}},getCurrentMoney() {let self = this;uni.request({url: 'http://dkmoni.yunjingwl.com/index.php/api/index/getCredit',method: 'POST',data: {},success: (res) => {self.money = res.data.data.val.money;self.money2 = res.data.data.val.money;self.bank_open = res.data.data.val.bank_open;self.interest_rate = res.data.data.val.interest_rate;// console.log(res.data.data.val, 'ressssssssss');self.give_account = res.data.data.val.give_account.slice(0, 3) + '*'.repeat(3) + res.data.data.val.give_account.slice(6);// self.term_list = res.data.data.val.term_list;// console.log(res.data.data.val.term_list, 'res.data.data.val.term_lis');let term_listArray = [];res.data.data.val.term_list.forEach((item, index) => {term_listArray.push({value: index,text: item})// console.log(item,'itemmm');// console.log(term_listArray, 'term_listArray');})self.term_listArray = term_listArray;// console.log(term_listArray,'term_listArray');// self.account_list = res.data.data.val.account_list;let account_listArray = [];res.data.data.val.term_list.forEach((item, index) => {account_listArray.push({value: index,text: item})})self.account_listArray = account_listArray;console.log(res.data.data.val.repayment_list, 'ressssssssss');let give_account_listArray = [];res.data.data.val.repayment_list.forEach((item, index) => {give_account_listArray.push({value: index,text: item})})self.give_account_listArray = give_account_listArray;// if (res.data && res.statusCode === 200) {// // 请求成功处理// } else {// // 请求失败处理// console.error('请求失败', res);// }},});},getClear() {this.money = ''}}}
</script><style scoped>page {background-color: #F8F9FA;}.box {}.currentLimit {width: 100vw !important;background-color: #FFF;}.currentLimit-half {padding: 20rpx 30rpx 10rpx 30rpx;box-sizing: border-box;font-size: 28rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #666666;line-height: 50rpx;}.currentLimit-half text {font-size: 28rpx;font-family: ;/* font-family: Source Han Sans CN-Regular, Source Han Sans CN; */font-weight: 400;color: #4E73D4;line-height: 50rpx;}.currentLimitImg {width: 182rpx;height: 40rpx;margin-left: 30rpx;}.currentLimitImg image {width: 182rpx;height: 40rpx;}.currentLimit-txt {/* float: right; */display: flex;align-items: center;padding-right: 20rpx;flex-direction: row-reverse;}.currentLimit-txt-lft {font-size: 26rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #9B9B9B;line-height: 32rpx;}.currentLimit-txt-btm {width: 160rpx;height: 60rpx;background: #4A7AE0;border-radius: 232rpx 232rpx 232rpx 232rpx;opacity: 1;font-size: 28rpx;font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;font-weight: normal;color: #FFFFFF;line-height: 40rpx;display: flex;justify-content: center;align-items: center;margin-left: 10rpx;}.currentLimit-ipt {/* height: 150rpx; */height: 120rpx;opacity: 1;display: flex;align-items: center;padding-left: 20rpx;border-bottom: 2rpx solid #F4F4F4;}.currentLimit-ipt text {font-size: 56rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #000000;line-height: 32rpx;}.currentLimit-ipt input {font-size: 90rpx;font-family: HarmonyOS Naskh Arabic UI-Regular, HarmonyOS Naskh Arabic UI;font-weight: 400;color: #000000;line-height: 0rpx;}.currentLimit-tab {padding: 24rpx;box-sizing: border-box;display: flex;flex-direction: row;margin-left: 16rpx;}.currentLimit-tab1 {width: 144rpx;height: 44rpx;background: #F8F9FA;border-radius: 74rpx 74rpx 74rpx 74rpx;opacity: 1;font-size: 24rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #999999;line-height: 32rpx;display: flex;justify-content: center;align-items: center;border: 2rpx solid #F8F9FA;}.active {width: 144rpx;height: 44rpx;background: #EEF2FE;border-radius: 74rpx 74rpx 74rpx 74rpx;opacity: 0.5;border: 2rpx solid #4A7AE0;font-size: 24rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #5D77BA;display: flex;justify-content: center;align-items: center;}.currentLimit-tab2 {margin-left: 32rpx;}.annualcargo {margin-top: 24rpx;background-color: #FFF;}.annualcargo-list {/* padding: 34rpx 32rpx 32rpx 30rpx; */padding: 34rpx 22rpx 32rpx 30rpx;display: flex;justify-content: space-between;border-bottom: 2rpx solid #F4F4F4;}.statement {margin-top: 24rpx;background-color: #FFF;padding-bottom: 12rpx;}.statement-txt {padding: 30rpx 38rpx 32rpx 30rpx;box-sizing: border-box;font-size: 24rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #666666;line-height: 36rpx;}.statement-txt text {font-size: 24rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #408ACB;line-height: 44rpx;border-bottom: 1rpx solid #408ACB;float: right;}.statement-textarea {margin: 5rpx 32rpx 32rpx 32rpx;padding-bottom: 32rpx;width: 686rpx;height: 336rpx;border-radius: 16rpx 16rpx 16rpx 16rpx;opacity: 1;border: 2rpx solid #999999;}.statementTey {width: 714rpx;height: 84rpx;background: #4A7AE0;border-radius: 137rpx 137rpx 137rpx 137rpx;opacity: 1;font-size: 32rpx;font-family: MicrosoftYaHei-, MicrosoftYaHei;font-weight: normal;color: #FFFFFF;line-height: 36rpx;display: flex;justify-content: center;align-items: center;margin: 32rpx auto;}.statementTeyTop {height: 44rpx;}.annualcargo-list-lft {display: flex;align-items: center;font-size: 32rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;}.annualcargo-list-lft image {width: 24rpx;height: 24rpx;margin-left: 10rpx;}.statement-textarea {font-size: 28rpx;font-family: Source Han Sans CN-Regular, Source Han Sans CN;font-weight: 400;color: #666666;/* line-height: 44rpx; */padding-top: 28rpx;padding-left: 22rpx;box-sizing: border-box;}.annualcargo-list-rgt {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #999999;line-height: 50rpx;display: flex;align-items: center;}/deep/.annualcargo-list-rgt .uni-select {border: none;/* width: 130rpx; */position: relative;left: 10rpx;}/deep/ .annualcargo-list-rgt .uni-select__input-placeholder {font-size: 28rpx !important;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular !important;font-weight: normal !important;color: #999999 !important;line-height: 50rpx !important;}/deep/ .annualcargo-list-rgt .uni-select__input-text {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;}.annualcargo-list-rgt image {/* border: 1rpx solid red; */width: 40rpx;height: 40rpx;position: relative;/* left: 3rpx; */}.annualcargo-list-rgt2 {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;margin-right: 10rpx;}.annualcargo-list-rgt3 {font-size: 28rpx;font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;font-weight: normal;color: #3D3D3D;line-height: 50rpx;margin-right: 10rpx;}.currentLimit-ipt input {width: 620rpx;}.currentLimit-ipt image {width: 40rpx;height: 40rpx;}
</style>
最后
感觉文章好的话记得点个心心和关注和收藏,有错的地方麻烦指正一下,如果需要转载,请标明出处,多谢!!!
相关文章:
前端uniapp请求真是案例(带源码)
目录 案例一案例二最后 案例一 <template><view class"box"><!-- <view class"title-back" click"backPrivious"><</view> --><!-- <view class"title-back" click"backPrivious"…...
MySQL -- mysql connect
MySQL – mysql connect 文章目录 MySQL -- mysql connect一、Connector/C 使用1.环境安装2.尝试链接mysql client 二、MySQL接口1.初始化2.链接数据库3.下发mysql命令4.获取执行结果5.关闭mysql链接6.在C语言中连接MySQL 三、MySQL图形化界面推荐 使用C接口库来进行连接 一、…...
如何用AI帮你下载安卓源码
以Android 11源码下载流程图如下所示: 1. 安装Git和Repo工具 2. 创建一个工作目录 3. 初始化仓库并下载源码 4. 切换到指定的分支 5. 编译源码 具体步骤如下: 安装Git和Repo工具:在Linux或Mac上,可以通过终端运行以下命令安装Gi…...
第三章:人工智能深度学习教程-基础神经网络(第三节-Tensorflow 中的多层感知器学习)
在本文中,我们将了解多层感知器的概念及其使用 TensorFlow 库在 Python 中的实现。 多层感知器 多层感知也称为MLP。它是完全连接的密集层,可将任何输入维度转换为所需的维度。多层感知是具有多个层的神经网络。为了创建神经网络,我们将神…...
Python的版本如何查询?
要查询Python的版本,可以使用以下方法之一: 1.在命令行中使用python --version命令。这会显示安装在计算机上的Python解释器的版本号。 # Author : 小红牛 # 微信公众号:wdPython2.在Python脚本中使用import sys语句,然后打印sy…...
Git的高效使用 git的基础 高级用法
Git的高效使用 git的基础 高级用法 前言 什么是Git 在日常的软件开发过程中,软件版本的管理都离不开使用Git,Git是一个开源的分布式版本控制系统,可以有效、高速地处理从很小到非常大的项目版本管理。 也是Linus Torvalds为了帮助管理Linu…...
关于主表和子表数据的保存
业务需求: 投注站信息保存在表A里,投注站下的设备信息保存在表B里, 一个投注站会有多个设备,要在一个表单里进行投注站和设备信息的填写,保存,回填,修改。 思路: 1)将…...
如何在后台执行 SwiftData 操作
文章目录 前言Core Data 私有队列上下文SwiftData 并发支持使用 ModelActor合并上下文更改的问题通过标识符访问模型总结 前言 SwiftData 是一个用于处理数据操作的框架,特别是在 Swift 语言中进行并发操作。本文介绍了如何在后台执行 SwiftData 操作以及与 Core D…...
TCP和UPD协议
一)应用层协议简介:根据需求明确要传输的信息,明确要传输的数据格式; 应用层协议:这个协议,实际上是和程序员打交道最多的协议了 1)其它四层都是操作系统,驱动,硬件实现好了的,咱们是不需要管 2)应用层:当我…...
MySQL:锁机制
目录 概述三种层级的锁锁相关的 SQLMyISAM引擎下的锁InnoDB引擎下的锁InnoDB下的表锁和行锁InnoDB下的共享锁和排他锁InnoDB下的意向锁InnoDB下的记录锁,间隙锁,临键锁记录锁(Record Locks)间隙锁(Gap Locks࿰…...
软考-高级-系统架构设计师教程(清华第2版)【第1章-绪论-思维导图】
软考-高级-系统架构设计师教程(清华第2版)【第1章-绪论-思维导图】 课本里章节里所有蓝色字体的思维导图...
【Git】安装和常用命令的使用与讲解及项目搭建和团队开发的出现的问题并且给予解决
目录 Git的简介 介绍 Git的特点及概念 Git与SVN的区别 图解 编辑 命令使用 安装 使用前准备 搭建项目环境 编辑 团队开发 Git的简介 介绍 Git 是一种分布式版本控制系统,是由 Linux 之父 Linus Torvalds 于2005年创建的。Git 的设计目标是为了更好地管…...
Python进行数据可视化,探索和发现数据中的模式和趋势。
文章目录 前言第一步:导入必要的库第二步:加载数据第三步:创建基本图表第四步:添加更多细节第五步:使用Seaborn库创建更复杂的图表关于Python技术储备一、Python所有方向的学习路线二、Python基础学习视频三、精品Pyth…...
2023年中国自然语言处理行业研究报告
第一章 行业概况 1.1 定义 自然语言处理(Natural Language Processing,简称NLP)是一门交叉学科,它结合了计算机科学、人工智能和语言学的知识,旨在使计算机能够理解、解释和生成人类语言。NLP的核心是构建能够理解和…...
RISC-V与RISC Zero zkVM的关系
1. 引言 本文基本结构为: 编程语言背景介绍RISC-V虚拟机作为zkVM电路为何选择RISC-V? 2. 编程语言背景介绍 高级编程语言不专门针对某个架构,其便于人类编写。高级编程语言代码,经编译器编译后,会生成针对专门某架…...
20行JS代码实现屏幕录制
在开发中可能有遇到过屏幕录制的需求,无论是教学、演示还是游戏录制,都需要通过屏幕录制来记录和分享内容。一般在App内H5页基于客户端能力实现的较多,现在浏览器中的 MediaRecorder 也提供了这种能力。MediaRecorder 是一种强大的技术&#…...
基于springboot实现福聚苑社区团购平台系统项目【项目源码】
基于springboot实现福聚苑社区团购平台系统演示 Javar技术 Java是一种网络脚本语言,广泛运用于web应用开发,可以用来添加网页的格式动态效果,该语言不用进行预编译就直接运行,可以直接嵌入HTML语言中,写成js语言&…...
网际报文协议ICMP及ICMP重定向实例详解
目录 1、ICMP的概念 2、ICMP重定向 3、利用ICMP重定向进行攻击的原理 4、如何禁止ICMP重定向功能? 4.1、在Linux系统中禁用 4.2、在Windows系统中禁用 5、关于ICMP重定向的问题实例 VC常用功能开发汇总(专栏文章列表,欢迎订阅…...
前端AJAX入门到实战,学习前端框架前必会的(ajax+node.js+webpack+git)(三)
知者乐水,仁者乐山。 XMLHttpRequest AJAX原理 - XMLHttpRequest 前面与服务器交互使用的不是axios吗? ajax并不等于axios 我们使用的axios的内部,实际上对XHR对象/原理 的封装 为什么还要学习ajax? ①在一些静态网站项目中…...
Android 12 S 系统开机流程分析 - SetupSelinux(二)
Android 12 S 系统开机流程分析-FirstStageMain(一) 本文接着上文开始讲解,上文中最后一步执行后会执行init启动过程中的第二步SetupSelinux(Selinux配置阶段),这样又会走到main.cpp中的main方法。 目录 1. SetupSelinux 1.1 …...
基于数字孪生的水厂可视化平台建设:架构与实践
分享大纲: 1、数字孪生水厂可视化平台建设背景 2、数字孪生水厂可视化平台建设架构 3、数字孪生水厂可视化平台建设成效 近几年,数字孪生水厂的建设开展的如火如荼。作为提升水厂管理效率、优化资源的调度手段,基于数字孪生的水厂可视化平台的…...
ESP32 I2S音频总线学习笔记(四): INMP441采集音频并实时播放
简介 前面两期文章我们介绍了I2S的读取和写入,一个是通过INMP441麦克风模块采集音频,一个是通过PCM5102A模块播放音频,那如果我们将两者结合起来,将麦克风采集到的音频通过PCM5102A播放,是不是就可以做一个扩音器了呢…...
CocosCreator 之 JavaScript/TypeScript和Java的相互交互
引擎版本: 3.8.1 语言: JavaScript/TypeScript、C、Java 环境:Window 参考:Java原生反射机制 您好,我是鹤九日! 回顾 在上篇文章中:CocosCreator Android项目接入UnityAds 广告SDK。 我们简单讲…...
BCS 2025|百度副总裁陈洋:智能体在安全领域的应用实践
6月5日,2025全球数字经济大会数字安全主论坛暨北京网络安全大会在国家会议中心隆重开幕。百度副总裁陈洋受邀出席,并作《智能体在安全领域的应用实践》主题演讲,分享了在智能体在安全领域的突破性实践。他指出,百度通过将安全能力…...
OpenLayers 分屏对比(地图联动)
注:当前使用的是 ol 5.3.0 版本,天地图使用的key请到天地图官网申请,并替换为自己的key 地图分屏对比在WebGIS开发中是很常见的功能,和卷帘图层不一样的是,分屏对比是在各个地图中添加相同或者不同的图层进行对比查看。…...
springboot整合VUE之在线教育管理系统简介
可以学习到的技能 学会常用技术栈的使用 独立开发项目 学会前端的开发流程 学会后端的开发流程 学会数据库的设计 学会前后端接口调用方式 学会多模块之间的关联 学会数据的处理 适用人群 在校学生,小白用户,想学习知识的 有点基础,想要通过项…...
RabbitMQ入门4.1.0版本(基于java、SpringBoot操作)
RabbitMQ 一、RabbitMQ概述 RabbitMQ RabbitMQ最初由LShift和CohesiveFT于2007年开发,后来由Pivotal Software Inc.(现为VMware子公司)接管。RabbitMQ 是一个开源的消息代理和队列服务器,用 Erlang 语言编写。广泛应用于各种分布…...
Qt Quick Controls模块功能及架构
Qt Quick Controls是Qt Quick的一个附加模块,提供了一套用于构建完整用户界面的UI控件。在Qt 6.0中,这个模块经历了重大重构和改进。 一、主要功能和特点 1. 架构重构 完全重写了底层架构,与Qt Quick更紧密集成 移除了对Qt Widgets的依赖&…...
Copilot for Xcode (iOS的 AI辅助编程)
Copilot for Xcode 简介Copilot下载与安装 体验环境要求下载最新的安装包安装登录系统权限设置 AI辅助编程生成注释代码补全简单需求代码生成辅助编程行间代码生成注释联想 代码生成 总结 简介 尝试使用了Copilot,它能根据上下文补全代码,快速生成常用…...
react-pdf(pdfjs-dist)如何兼容老浏览器(chrome 49)
之前都是使用react-pdf来渲染pdf文件,这次有个需求是要兼容xp环境,xp上chrome最高支持到49,虽然说iframe或者embed都可以实现预览pdf,但为了后续的定制化需求,还是需要使用js库来渲染。 chrome 49测试环境 能用的测试…...
