中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

網站建設設計制作培訓百度下載并安裝到桌面

網站建設設計制作培訓,百度下載并安裝到桌面,效果圖制作代做網站,品牌的品牌推廣設計開發(fā)準備 上一節(jié)我們實現(xiàn)了回收金提現(xiàn)的功能,并且成功展示了當前賬戶的支出列表,但是我們的提現(xiàn)相關的記錄并沒有很好的給用戶做出展示,用戶只知道當前賬戶提現(xiàn)扣款,并不知道回收金的去向,這一節(jié)我們就要實現(xiàn)回收金記…

開發(fā)準備

上一節(jié)我們實現(xiàn)了回收金提現(xiàn)的功能,并且成功展示了當前賬戶的支出列表,但是我們的提現(xiàn)相關的記錄并沒有很好的給用戶做出展示,用戶只知道當前賬戶提現(xiàn)扣款,并不知道回收金的去向,這一節(jié)我們就要實現(xiàn)回收金記錄的查詢添加、查詢、展示

功能分析

要實現(xiàn)這些功能我們需要新建一張表,根據(jù)當前用戶綁定的信息去填充對應的信息,把提現(xiàn)的銀行卡,提現(xiàn)狀態(tài),提現(xiàn)時間,提現(xiàn)金額都先添加到表里,在用戶進入提現(xiàn)記錄頁面之后,通過userid去查詢當前用戶的記錄然后在列表里進行展示

代碼實現(xiàn)

首先我們創(chuàng)建對應的提現(xiàn)記錄表

{"objectTypeName": "withdrawal_record","fields": [{"fieldName": "id", "fieldType": "Integer", "notNull": true, "belongPrimaryKey": true},{"fieldName": "user_id", "fieldType": "Integer", "notNull": true, "defaultValue": 0},{"fieldName": "bank_name", "fieldType": "String"},{"fieldName": "bank_num", "fieldType": "String"},{"fieldName": "creat_time", "fieldType": "String"},{"fieldName": "type_str", "fieldType": "String"},{"fieldName": "money", "fieldType": "Double"}],"indexes": [{"indexName": "field1Index", "indexList": [{"fieldName":"id","sortType":"ASC"}]}],"permissions": [{"role": "World", "rights": ["Read", "Upsert", "Delete"]},{"role": "Authenticated", "rights": ["Read", "Upsert", "Delete"]},{"role": "Creator", "rights": ["Read", "Upsert", "Delete"]},{"role": "Administrator", "rights": ["Read", "Upsert", "Delete"]}]
}

我們生成對應的實體和db類之后,在提現(xiàn)成功的提交記錄里,把我們表需要的信息添加進去

 let record=new withdrawal_record()record.id=Math.floor(Math.random() * 1000000)record.user_id=this.user!.user_idrecord.bank_name=this.bankList[0].bank_namerecord.bank_num=this.bankList[0].bank_cardrecord.creat_time=this.year+"-"+this.month+"-"+this.day+" "+this.timerecord.type_str='0'record.money=this.moneyNumlet status =  await databaseZone.upsert(record);

添加完成之后我們新建一個提現(xiàn)記錄展示頁面

@Entry
@Component
struct WithdrawalRecordPage {@State user: User|null=nullbuild() {Column() {CommonTopBar({ title: "提現(xiàn)記錄", alpha: 0, titleAlignment: TextAlign.Center ,backButton:true})}.backgroundColor("#F1F3F5").height('100%').width('100%')}
}

首先進行數(shù)據(jù)的查詢

 @State user: User|null=null@State withdrawalRecordList:WithdrawalRecord[]=[]async aboutToAppear(): Promise<void> {const value = await StorageUtils.getAll('user');if (value != "") {this.user = JSON.parse(value)}let databaseZone = cloudDatabase.zone('default');let condition = new cloudDatabase.DatabaseQuery(withdrawal_record);condition.equalTo("user_id", this.user?.user_id)let listData = await databaseZone.query(condition);let json = JSON.stringify(listData)let data: WithdrawalRecord[] = JSON.parse(json)if (data.length>0) {this.withdrawalRecordList=data}}

然后把我們查詢到的數(shù)據(jù)展示到列表組件中

 List({space:10}){ForEach(this.withdrawalRecordList,(item:WithdrawalRecord,index:number)=>{ListItem(){Column({space:10}){Row(){Text(item.type_str=='0'?"提現(xiàn)成功":"提現(xiàn)中").fontColor(item.type_str=='0'?Color.Green:Color.Black).fontSize(16).fontWeight(FontWeight.Bold)Text("¥"+item.money+"").fontSize(16).fontWeight(FontWeight.Bold).fontColor(Color.Black)}.width('100%').justifyContent(FlexAlign.SpaceBetween)Row(){Text(item.bank_name+" ("+item.bank_num+")").fontColor(Color.Black).fontSize(14).fontWeight(FontWeight.Bold)Text(item.creat_time+"").fontSize(14).fontWeight(FontWeight.Bold).fontColor(Color.Grey)}.width('100%').justifyContent(FlexAlign.SpaceBetween)}.padding(10).width('100%').borderRadius(10).backgroundColor(Color.White)}})}.padding(10)

現(xiàn)在讓我們運行代碼查看效果
在這里插入圖片描述

http://www.risenshineclean.com/news/51105.html

相關文章:

  • 用php做的網站有哪些最近營銷熱點
  • 廣州做網站建設網站收錄優(yōu)化
  • 產品如何推廣濰坊百度seo公司
  • 建設企業(yè)查詢網站河北優(yōu)化seo
  • 網站建設北京公司軟件推廣平臺有哪些?哪個比較好
  • 做軟件賺錢的網站有哪些百度資源搜索平臺官網
  • 北京和田合瑞建設有限公司網站網店營銷與推廣策劃方案
  • 百度收錄最高發(fā)帖網站seo搜索方法
  • 網站搭建合同seo短視頻網頁入口引流網站
  • 網站推廣設計做哪些口碑營銷的主要手段有哪些
  • 現(xiàn)在從事網站開發(fā)如何網站優(yōu)化排名服務
  • 網站建設佰金手指科捷一ui設計
  • 甘肅網站建設seo策略什么意思
  • 網站關鍵詞重要嗎新手怎么學電商運營
  • reactjs 做的網站媒體公關
  • 萊蕪最好的網站建設公司網站注冊時間查詢
  • 運維為什么沒人干濰坊seo關鍵詞排名
  • 購物網站建設的原理谷歌外鏈
  • 廣州知名網站建設性價比高競價推廣是做什么的
  • 服裝網站模板下載360指數(shù)在線查詢
  • 百度搜不到WordPress文章seo怎么讀
  • 排版好看的網站界面百度官網網站首頁
  • 用asp做網站怎么美觀百度一下你就知道百度首頁
  • 新注冊域名做網站好處河北百度seo點擊軟件
  • 帶后臺網站模板1688關鍵詞排名查詢
  • 北流網站建設網站搭建教程
  • html5做服裝網站中國萬網域名查詢
  • 網站開發(fā)過程中出現(xiàn)的問題廣東網站seo
  • 網站主頁排版深圳十大教育培訓機構排名
  • wordpress同步發(fā)布泉州seo技術