前端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 …...
抖音增长新引擎:品融电商,一站式全案代运营领跑者
抖音增长新引擎:品融电商,一站式全案代运营领跑者 在抖音这个日活超7亿的流量汪洋中,品牌如何破浪前行?自建团队成本高、效果难控;碎片化运营又难成合力——这正是许多企业面临的增长困局。品融电商以「抖音全案代运营…...
React19源码系列之 事件插件系统
事件类别 事件类型 定义 文档 Event Event 接口表示在 EventTarget 上出现的事件。 Event - Web API | MDN UIEvent UIEvent 接口表示简单的用户界面事件。 UIEvent - Web API | MDN KeyboardEvent KeyboardEvent 对象描述了用户与键盘的交互。 KeyboardEvent - Web…...
【JavaWeb】Docker项目部署
引言 之前学习了Linux操作系统的常见命令,在Linux上安装软件,以及如何在Linux上部署一个单体项目,大多数同学都会有相同的感受,那就是麻烦。 核心体现在三点: 命令太多了,记不住 软件安装包名字复杂&…...
项目部署到Linux上时遇到的错误(Redis,MySQL,无法正确连接,地址占用问题)
Redis无法正确连接 在运行jar包时出现了这样的错误 查询得知问题核心在于Redis连接失败,具体原因是客户端发送了密码认证请求,但Redis服务器未设置密码 1.为Redis设置密码(匹配客户端配置) 步骤: 1).修…...
处理vxe-table 表尾数据是单独一个接口,表格tableData数据更新后,需要点击两下,表尾才是正确的
修改bug思路: 分别把 tabledata 和 表尾相关数据 console.log() 发现 更新数据先后顺序不对 settimeout延迟查询表格接口 ——测试可行 升级↑:async await 等接口返回后再开始下一个接口查询 ________________________________________________________…...
Caliper 负载(Workload)详细解析
Caliper 负载(Workload)详细解析 负载(Workload)是 Caliper 性能测试的核心部分,它定义了测试期间要执行的具体合约调用行为和交易模式。下面我将全面深入地讲解负载的各个方面。 一、负载模块基本结构 一个典型的负载模块(如 workload.js)包含以下基本结构: use strict;/…...
Django RBAC项目后端实战 - 03 DRF权限控制实现
项目背景 在上一篇文章中,我们完成了JWT认证系统的集成。本篇文章将实现基于Redis的RBAC权限控制系统,为系统提供细粒度的权限控制。 开发目标 实现基于Redis的权限缓存机制开发DRF权限控制类实现权限管理API配置权限白名单 前置配置 在开始开发权限…...
【学习记录】使用 Kali Linux 与 Hashcat 进行 WiFi 安全分析:合法的安全测试指南
文章目录 📌 前言🧰 一、前期准备✅ 安装 Kali Linux✅ 获取支持监听模式的无线网卡 🛠 二、使用 Kali Linux 进行 WiFi 安全测试步骤 1:插入无线网卡并确认识别步骤 2:开启监听模式步骤 3:扫描附近的 WiFi…...
【自然语言处理】大模型时代的数据标注(主动学习)
文章目录 A 论文出处B 背景B.1 背景介绍B.2 问题提出B.3 创新点 C 模型结构D 实验设计E 个人总结 A 论文出处 论文题目:FreeAL: Towards Human-Free Active Learning in the Era of Large Language Models发表情况:2023-EMNLP作者单位:浙江大…...
Linux——TCP和UDP
一、TCP协议 1.特点 TCP提供的是面向连接、可靠的、字节流服务。 2.编程流程 (1)服务器端的编程流程 ①socket() 方法创建套接字 ②bind()方法指定套接字使用的IP地址和端口。 ③listen()方法用来创建监听队列。 ④accept()方法处理客户端的连接…...
