当前位置:网站首页>4、 Interface requests data to update input information interactively
4、 Interface requests data to update input information interactively
2022-07-28 18:59:00 【Ming-Afresh】
<template>
<view class="content">
<view class="top_cont">
<button @click="toRegister" class="input_btn"> Click to jump to the page </button>
<!-- use @click Method triggers a click event Page Jump -->
</view>
<view>
<view style="margin: 20rpx 0; margin-left: 50rpx; font-size: 28rpx;">
<view style="display: flex; align-items: center;">
<view style="width: 15rpx;height: 40rpx;background: #0CC1BC;border-radius: 8rpx;"></view>
<view style="margin-left: 16rpx; font-size: 30rpx;"> Enter history </view>
</view>
</view>
<view class="history">
<view v-for="item in antList" :key='item.data' class="model">
<!-- v-for Loop the list obtained by the background interface Corresponding to the following {
{
Field }} -->
<view class="title titleMax"> code :{
{
item.reagentId }}</view>
<view class="title title1">
Testing personnel :{
{
item.name }}
</view>
<view class="title title1">
Test time :{
{
item.testingTime }}
</view>
<view class="title title1">
detection result :
<text class="callout" v-if="item.status==1"> negative </text>
<text class="callout" v-if="item.status==2"> positive </text>
<text class="callout" v-if="item.status==3"> Invalid result </text>
</view>
<view class="title title1">
Input time :{
{
item.nucleicTime }}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
const {
baseurl } = require('../../utils/config');
// An interface address is introduced here ( Negligible )
export default {
data() {
return {
reagentId: '',
idCode: '',
name: '',
testingTime: '',
status: '',
userInfo: {
},
antList:[],
Flag: true,
iphone: '',
district: '',
town: '',
village: '',
residenceCommunity: ''
}
},
onLoad:function() {
uni.request({
url: baseurl+'/epkg/testhistorytest/list',
method: 'POST',
data: {
addName: uni.getStorageSync('username'),
// there getStorageSync The method is to get the cached value From the previous page user name username
},
header: {
'content-type': 'application/json'
},
success: res => {
this.antList= res.data
},
});
},
// Read cached values
onShow:function() {
uni.request({
url: baseurl+'/epkg/testhistorytest/list',
method: 'POST',
data: {
addName: uni.getStorageSync('username'),
// there getStorageSync The method is to get the cached value From the previous page user name username
},
header: {
'content-type': 'application/json'
},
success: res => {
console.log(res);
this.antList= res.data
},
});
},
methods: {
// Update personal entry information
toRegister(){
uni.navigateTo({
url:`../index/index`
// Get the information input of the page to which the click event jumps
});
},
}
}
</script>
<style>
.top_cont{
flex: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 300rpx;
width: 100%;
border-bottom: 15rpx solid #eeeeee;
}
.input_btn{
width: 400rpx;
height: 100rpx;
background: #0CC1BC;
border-radius: 100rpx;
color: white;
line-height: 100rpx;
border: 1rpx #a9a9a9 solid;
}
.history{
overflow: auto;
height: 1000rpx;
width: 86%;
margin-left: 50rpx;
font-size: 28rpx;
}
.model{
border-bottom: #e0e0e0 .5rpx solid;
}
.txt_words{
font-size: 30rpx;
}
.title{
color: gray;
margin: 20rpx 0;
}
.titleMax{
font-size: 32rpx;
font-weight: 600;
color: #000000;
}
.callout{
font-size: 30rpx;
color: deepskyblue;
}
</style>

边栏推荐
- JVM tuning
- Introduction and advanced level of MySQL (6)
- How to choose between software testing and software development?
- A priori, a posteriori, likelihood
- MySQL date function
- Is there any prospect and way out for software testing?
- AI 改变千行万业,开发者如何投身 AI 语音新“声”态
- Configuration tutorial: how does the organizational structure of the new version of easycvr (v2.5.0) cascade to the superior platform?
- LeetCode_ 63_ Different paths II
- 现代化个人博客系统 ModStartBlog v5.4.0 登录界面改版,新增联系方式
猜你喜欢

Win11怎么调亮度?Win11调屏幕亮度的四种方法

Example of observer mode of C -- ordering milk

Win11系统svchost.exe一直在下载怎么办?

数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开

Special Lecture 6 tree DP learning experience (long-term update)

专题讲座6 树形dp 学习心得(长期更新)

Introduction and advanced MySQL (4)

Introduction and advanced level of MySQL (5)

十进制转二进制进阶版(可转化负数以及边界值)

The login interface of modern personal blog system modstartblog v5.4.0 has been revised and the contact information has been added
随机推荐
112. 使用自开发的代理服务器解决 SAP UI5 FileUploader 上传文件时遇到的跨域访问错误
视频融合云服务EasyCVR平台白名单功能如何使用?
Example of observer mode of C -- ordering milk
[actual combat] realize page distortion correction with OpenCV
Redis cache avalanche, penetration, breakdown, bloom filter, detailed explanation of distributed lock
kotlin:out in
How to adjust the brightness of win11? Four methods of adjusting screen brightness in win11
Getting started with gateway
Can I get employed after two months of software testing training?
Easynlp Chinese text and image generation model takes you to become an artist in seconds
Unity 之 切换语言导致报错:System.FormatException:String was not recognized as a valid DateTime.
How new people get started learning software testing
注意力机制及代码实现
Haproxy implements proxy configuration
QT with line encoding output cout
【实战】用OpenCV实现页面扭曲矫正
2022.7.26 constructor, interview: the role of new, deep copy and shallow copy
What is one hot code? Why use it and when?
Overview and working principle of single chip microcomputer crystal oscillator
112. Use the self-developed proxy server to solve the cross domain access error encountered when uploading files by SAP ui5 fileuploader