|
@@ -76,17 +76,20 @@
|
|
|
sendImg(e) {
|
|
|
const that = this;
|
|
|
let serverUrl = that.$config.serverUrl;
|
|
|
+ that.$emit('choseImg', true);
|
|
|
uni.chooseImage({
|
|
|
count: 1,
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success: async function(res) {
|
|
|
+ that.$emit('choseImg', true);
|
|
|
let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
|
|
|
const arr = await that.$apifile(`/point/upload`, 'file', tempFile[0], 'file');
|
|
|
if (arr.errcode == '0') {
|
|
|
let filePaths = serverUrl + arr.uri
|
|
|
that.send(filePaths, '1')
|
|
|
} else {
|
|
|
+ that.$emit('choseImg', false);
|
|
|
uni.showToast({
|
|
|
title: arr.errmsg,
|
|
|
icon: 'none'
|