This commit is contained in:
余菲 2022-11-01 14:06:06 +08:00
parent b5439888b9
commit de3765ca4b
13 changed files with 64 additions and 69 deletions

View File

@ -17,11 +17,8 @@ Component({
let arr = []
if(list.length > 0) {
list.forEach(item=> {
if(item.healthUrl) {
arr.push(item.healthUrl)
}
if(item.passingUrl) {
arr.push(item.passingUrl)
if(item.imageUrl) {
arr.push(item.imageUrl)
}
})
}

4
desktop.ini Normal file
View File

@ -0,0 +1,4 @@
[ViewState]
Mode=
Vid=
FolderType=Generic

View File

@ -2,13 +2,20 @@
<view class="task_container">
<!-- 筛选条件 -->
<view class="select_container">
<picker value="{{startTime}}" mode="date" data-type="start" bindchange="selectTime" style="width: 200rpx;padding-right: 20rpx;">
<view wx:if="{{startTime}}">{{startTime}}</view>
<view wx:else>开始日期</view>
<picker value="{{startTime}}" mode="date" data-type="start" bindchange="selectTime">
<view class="picker_box">
<view wx:if="{{startTime}}">{{startTime}}</view>
<view wx:else>开始日期</view>
<image style="width: 20rpx; height: 12rpx;margin-left: 15rpx;" src="../../../assets/img/select.png"></image>
</view>
</picker>
<picker value="{{endTime}}" mode="date" start="{{startTime}}" data-type="end" bindchange="selectTime" style="width: 200rpx;padding-right: 20rpx;">
<view wx:if="{{endTime}}">{{endTime}}</view>
<view wx:else>结束日期</view>
<text>~</text>
<picker value="{{endTime}}" mode="date" start="{{startTime}}" data-type="end" bindchange="selectTime">
<view class="picker_box">
<view wx:if="{{endTime}}">{{endTime}}</view>
<view wx:else>结束日期</view>
<image style="width: 20rpx; height: 12rpx;margin-left: 15rpx;" src="../../../assets/img/select.png"></image>
</view>
</picker>
</view>
<!-- 列表 -->

View File

@ -16,6 +16,7 @@
width: 100%;
height: 90rpx;
background-color: #fff;
border-bottom: 1rpx solid rgba(192, 188, 188, 0.35);
display: flex;
justify-content: space-evenly;
align-items: center;
@ -25,6 +26,13 @@
z-index: 99;
font-size: 30rpx;
}
.picker_box {
width: 220rpx;
padding-right: 20rpx;
display: flex;
justify-content: center;
align-items: center;
}
/* 列表样式 */
.task_list {

View File

@ -37,11 +37,8 @@ Page({
let arr = []
if(list.length > 0) {
list.forEach(item=> {
if(item.healthUrl) {
arr.push(item.healthUrl)
}
if(item.passingUrl) {
arr.push(item.passingUrl)
if(item.imageUrl) {
arr.push(item.imageUrl)
}
})
}
@ -52,12 +49,7 @@ Page({
this.getOssAuthForm()
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
// 图片预览
previewImage(e) {
let type = e.currentTarget.dataset.type
@ -155,7 +147,7 @@ Page({
this.validate(type+'List')
},
fail: (e) => {
console.log(e);
console.log('取消选择');
}
})
},
@ -215,18 +207,14 @@ Page({
'x-oss-security-token': ossForm.SecurityToken
},
success: (res)=> {
console.log(res, '=+++++++++=');
if(res.statusCode === 204) {
// 上传成功将图片路径resolve出去
resolve(key)
} else {
wx.showToast({
title: '图片上传失败',
})
reject('图片上传失败')
}
}
},
fail: (e)=> {
console.log(e);
console.log(e, '+++++++++++++++++++++++++');
reject('图片上传失败')
}
})
@ -244,13 +232,19 @@ Page({
url: '/pages/task/task',
})
}
}).catch(e=> {
console.log(e);
}).finally(()=>{
wx.hideLoading();
})
}).catch(()=> {
}).catch((e)=> {
wx.hideLoading()
console.log(e, 'promise.all失败');
wx.showToast({
title: '图片上传失败',
})
})
}
}

View File

@ -10,6 +10,7 @@
</view>
<view class="upload_image" data-limit="{{1}}" data-type="carNumber" bindtap="uploadImages" wx:if="{{(carNumberList.length<1) && (type === 'upload')}}">
<image style="height: 56rpx;width: 56rpx;" mode="widthFix" src="../../../assets/img/upload.png"></image>
<text>拍照上传</text>
</view>
</view>
<text class="tips">请上传车牌号照片</text>
@ -24,6 +25,7 @@
</view>
<view class="upload_image" data-limit="{{10}}" data-type="healthCode" bindtap="uploadImages" wx:if="{{type === 'upload'}}">
<image style="height: 56rpx;width: 56rpx;" mode="widthFix" src="../../../assets/img/upload.png"></image>
<text>拍照上传</text>
</view>
</view>
<text class="tips">请上传健康码、行程卡图片</text>

View File

@ -16,7 +16,7 @@
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
font-size: 28rpx;
font-size: 34rpx;
color: #666666;
position: relative;
}
@ -56,7 +56,7 @@
display: block;
position: absolute;
width: 60%;
height: 6rpx;
height: 10rpx;
top:50%;
left:50%;
background:rgb(124, 124, 124);
@ -69,7 +69,7 @@
display: block;
position: absolute;
width: 60%;
height: 6rpx;
height: 10rpx;
top:50%;
left:50%;
background:rgb(124, 124, 124);
@ -81,6 +81,7 @@
width: 200rpx;
height: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 1rpx dashed #A6A6A6;
@ -129,13 +130,7 @@
border-radius: 40rpx;
line-height: 80rpx;
text-align: center;
font-size: 30rpx;
}
.cancel_btn {
color: #333333;
border: 1rpx solid #E6E6E6;
}
.submit_btn {
font-size: 32rpx;
color: #ffffff;
background-color: #477DF3;
}
}

View File

@ -3,10 +3,9 @@
<image class="background_img" mode="heightFix" style="width: 100%;" src="../../assets/img/data_bg.png"></image>
<view class="mine_head">
<view class="user_box">
<image style="margin-right: 20rpx;border-radius: 50%; background-color: #eeeeee;" class="user_avatar" src="{{userInfo.avatar}}"></image>
<view class="company_box">
<text class="user_name">{{userInfo.name}}</text>
<text class="user_name" style="margin: 15rpx 0;">防疫负责人:{{userInfo.contactsName}}</text>
<text class="user_name" style="font-size: 36;font-weight: bolder;">{{userInfo.name}}</text>
<text class="user_name" style="margin: 20rpx 0;">防疫负责人:{{userInfo.contactsName}}</text>
<text class="user_name">联系方式:{{userInfo.contactsPhone}}</text>
</view>
</view>

View File

@ -28,23 +28,19 @@
.user_box {
box-sizing: border-box;
width: 100%;
padding: 30rpx;
padding: 40rpx;
display: flex;
justify-content: flex-start;
align-items: flex-start;
}
.user_avatar {
width: 120rpx;
height: 120rpx;
margin-right: 30rpx;
}
.company_box {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
font-size: 30rpx;
font-size: 32rpx;
color: #ffffff;
}
.label_list {
width: 100%;

View File

@ -7,18 +7,7 @@ Page({
*/
data: {
userInfo: {},
dataList: [
// {
// createTime: '2020-2-10 14:44:21',
// carUrl: 'http://www.baidu.com/img/bdlogo.png',
// registerFlowmanVoList: [{healthUrl: 'http://rongcloud-web.qiniudn.com/docs_demo_rongcloud_logo.png',passingUrl: 'http://rongcloud-web.qiniudn.com/docs_demo_rongcloud_logo.png'}]
// },
// {
// createTime: '2020-2-10 14:44:21',
// carUrl: 'http://www.baidu.com/img/bdlogo.png',
// registerFlowmanVoList: [{healthUrl: 'http://rongcloud-web.qiniudn.com/docs_demo_rongcloud_logo.png',passingUrl: 'http://rongcloud-web.qiniudn.com/docs_demo_rongcloud_logo.png'}]
// }
]
dataList: []
},
onLoad() {
@ -34,7 +23,7 @@ Page({
},
// 获取近期记录
getRecodesList() {
getAllTask({page: 1, limit:5}).then(res=> {
getAllTask({page: 1, limit:3}).then(res=> {
if(res?.code === 0) {
this.setData({dataList: res.data?.records})
}

View File

@ -3,8 +3,7 @@
<!-- 上传 -->
<view class="upload_box">
<view class="company_message">
<image style="width: 80rpx; height: 80rpx;margin-right: 20rpx;border-radius: 50%; background-color: #eeeeee;" src="{{userInfo.avatar}}"></image>
<text style="font-size: 28rpx;">{{userInfo.name}}</text>
<text>{{userInfo.name}}</text>
</view>
<view class="to_upload" bindtap="goUpload">
<image style="width: 80rpx;height: 60rpx;margin-right: 20rpx;" src="../../assets/img/photo.png"></image>

View File

@ -12,6 +12,7 @@
box-sizing: border-box;
width: 100%;
height: 420rpx;
flex-shrink: 0;
padding: 30rpx;
display: flex;
flex-direction: column;
@ -24,8 +25,11 @@
width: 100%;
margin-bottom: 20rpx;
display: flex;
justify-content: flex-start;
justify-content: center;
align-items: center;
font-size: 36rpx;
font-weight: bolder;
color: #ffffff;
}
.to_upload {
width: 600rpx;

View File

@ -51,5 +51,6 @@
"setting": {
"urlCheck": false,
"compileHotReLoad": true
}
},
"libVersion": "2.27.0"
}