Commit bf0b8600 authored by 贺世双's avatar 贺世双

上传问题提交

parent eba987bb
...@@ -9,12 +9,15 @@ ...@@ -9,12 +9,15 @@
<template v-if="item.type === 'image'"> <template v-if="item.type === 'image'">
<image mode="aspectFill" :src="item.url" :data-index="index" @click="previewImage" class="previewImg" /> <image mode="aspectFill" :src="item.url" :data-index="index" @click="previewImage" class="previewImg" />
</template> </template>
<template v-if="item.type === 'file'">
<image src="../../../static/img/fileIcon/file.png" :data-index="index" class="previewImg"/>
</template>
<template v-if="item.type === 'video'"> <template v-if="item.type === 'video'">
<video class="previewImg" :src="item.url" :page-gesture="true" :show-mute-btn="true" :enable-play-gesture="true"/> <video class="previewImg" :src="item.url" :page-gesture="true" :show-mute-btn="true" :enable-play-gesture="true"/>
</template> </template>
<u-icon v-if="isShowDelete" name="close-circle-fill" class="clearIcon" size="30" @click="deleteFile" :index='index' /> <u-icon v-if="isShowDelete" name="close-circle-fill" class="clearIcon" size="30" @click="deleteFile" :index='index' />
</view> </view>
<template v-if="isIos || cameraType"> <template v-if="(isIos || cameraType) && fileDetailList.length < maxCount">
<view class="uploadeBtn flex_col" @click="onUpLoad"> <view class="uploadeBtn flex_col" @click="onUpLoad">
<view class="t-icon t-icon-picture" /> <view class="t-icon t-icon-picture" />
<text style="margin-top:10rpx">{{btnTitle}}</text> <text style="margin-top:10rpx">{{btnTitle}}</text>
...@@ -36,6 +39,13 @@ ...@@ -36,6 +39,13 @@
</view> </view>
<!-- 自定义相机 --> <!-- 自定义相机 -->
<bs-customCamera :visible="visible" :cameraType="cameraType" @uploadFinish="customCameraFinish" @uploadCancel="visible=false"/> <bs-customCamera :visible="visible" :cameraType="cameraType" @uploadFinish="customCameraFinish" @uploadCancel="visible=false"/>
<!-- 水印 -->
<!-- #ifdef MP-WEIXIN -->
<canvas type="2d" id="upload-canvas" class="uploadCanvas" :style="{'width':width+'px','height':height+'px','position':'absolute','z-index':'-999','top':'0px','left':'-1000000px'}"/>
<!-- #endif -->
<!-- #ifdef H5 -->
<canvas canvas-id="upload-canvas" class="uploadCanvas" :style="{'width':width+'px','height':height+'px','position':'absolute','z-index':'-9999999','top':'0px','left':'-1000000px'}"/>
<!-- #endif -->
</view> </view>
</template> </template>
...@@ -52,7 +62,7 @@ ...@@ -52,7 +62,7 @@
}, },
uploadAccept: { uploadAccept: {
type: String, //接受的文件类型: image | video | file | all | media; file只支持H5(all、media仅小程序支持) type: String, //接受的文件类型: image | video | file | all | media; file只支持H5(all、media仅小程序支持)
default: "image" default: "all"
}, },
maxDuration: { maxDuration: {
type: [String, Number], //当accept为video时生效,拍摄视频最长拍摄时间,单位秒 type: [String, Number], //当accept为video时生效,拍摄视频最长拍摄时间,单位秒
...@@ -118,7 +128,7 @@ ...@@ -118,7 +128,7 @@
background-color: #fff; background-color: #fff;
color: #D81E06 !important; color: #D81E06 !important;
position: absolute; position: absolute;
top: 4rpx; top: 25rpx !important;
right: 4rpx; right: 4rpx;
} }
} }
......
This diff is collapsed.
...@@ -345,8 +345,8 @@ ...@@ -345,8 +345,8 @@
const nowDate = new Date(timestamp) const nowDate = new Date(timestamp)
var year = nowDate.getFullYear(); var year = nowDate.getFullYear();
var month = nowDate.getMonth() < 10 ? '0' + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1; var month = nowDate.getMonth() < 10 ? '0' + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
var date = nowDate.getDate(); var date = nowDate.getDate() < 10 ? '0' + nowDate.getDate() : nowDate.getDate() ;
const hour = nowDate.getHours(); const hour = nowDate.getHours()< 10 ? '0' + nowDate.getHours() : nowDate.getHours() ;
const minute = nowDate.getMinutes()< 10 ? '0'+ nowDate.getMinutes() : nowDate.getMinutes() ; const minute = nowDate.getMinutes()< 10 ? '0'+ nowDate.getMinutes() : nowDate.getMinutes() ;
var seconds = nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() : nowDate.getSeconds(); var seconds = nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() : nowDate.getSeconds();
if (this.dateType === 'date') { if (this.dateType === 'date') {
......
...@@ -295,6 +295,8 @@ ...@@ -295,6 +295,8 @@
const allData = getApp().globalData.all;//所有的明细 const allData = getApp().globalData.all;//所有的明细
var totle=0; var totle=0;
if(allData.length>0){ if(allData.length>0){
console.log('222=========')
console.log(allData.length)
allData.map(item => { allData.map(item => {
//费用项+币种是唯一的 //费用项+币种是唯一的
if(item.rate_item==this.formData.rate_item && item.currency==this.formData.currency){ if(item.rate_item==this.formData.rate_item && item.currency==this.formData.currency){
...@@ -419,9 +421,6 @@ ...@@ -419,9 +421,6 @@
const aa = [ const aa = [
'940507a5acc6ed1771b8f411d749d20586f96ac6.pdf', '940507a5acc6ed1771b8f411d749d20586f96ac6.pdf',
] ]
console.log('111=================')
console.log(aa)
console.log(datas)
uni.showLoading({ uni.showLoading({
title: '下载中', title: '下载中',
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment