|
|
@ -4,7 +4,7 @@ |
|
|
|
<!-- 插件名称输入和提交 --> |
|
|
|
<view class="flex item-center justify-between py-2"> |
|
|
|
<view class="flex-1"> |
|
|
|
<text v-if="deliver.deliverName" class="relative"> |
|
|
|
<view v-if="deliver.deliverName" class="relative inline-block"> |
|
|
|
{{ deliver.deliverName }} |
|
|
|
<u-badge |
|
|
|
size="mini" |
|
|
@ -12,7 +12,7 @@ |
|
|
|
style="transform: translate3d(2em, -1em, 0)" |
|
|
|
v-show="!deliver.details || !deliver.details.length" |
|
|
|
></u-badge> |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 提交 --> |
|
|
@ -103,7 +103,7 @@ const projectId = computed(() => store.getters['project/projectId']); |
|
|
|
|
|
|
|
// 验证提交的交付物信息格式 |
|
|
|
function validateDeliverForm(checkedCheckers) { |
|
|
|
const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/; |
|
|
|
const reg = /[a-zA-z]+:\/\/[^\s]*/; |
|
|
|
if (!reg.test(linkValue.value)) { |
|
|
|
// 显示toast信息 |
|
|
|
uni.$ui.showToast('请输入正确的链接'); |
|
|
@ -192,9 +192,9 @@ function uploadPhoto() { |
|
|
|
let timer = null; |
|
|
|
clearTimeout(timer); |
|
|
|
uni.chooseImage({ |
|
|
|
count: 1, //默认9 |
|
|
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
|
|
|
sourceType: ['album', 'camera'], //从相册选择 |
|
|
|
count: 1, // 默认9 |
|
|
|
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
|
|
|
sourceType: ['album', 'camera'], // 从相册选择 |
|
|
|
success: res => { |
|
|
|
if (!timer) { |
|
|
|
timer = setTimeout(() => { |
|
|
@ -202,9 +202,9 @@ function uploadPhoto() { |
|
|
|
timer = null; |
|
|
|
}, 800); |
|
|
|
} |
|
|
|
const tempFilePaths = res.tempFilePaths; |
|
|
|
const { tempFilePaths } = res; |
|
|
|
uni.uploadFile({ |
|
|
|
url: UPLOAD_URL, //仅为示例,非真实的接口地址 |
|
|
|
url: UPLOAD_URL, // 仅为示例,非真实的接口地址 |
|
|
|
filePath: tempFilePaths[0], |
|
|
|
name: 'files', |
|
|
|
formData: {}, |
|
|
|