Commit bba3b957 by LJM

兼容

parent 6cc13f41
Showing with 8 additions and 7 deletions
......@@ -403,8 +403,9 @@
chooseImageChange() {
this.noexebshowFalg = false;
// 使用 chooseImage选择图片
uni.chooseImage({
uni.chooseMedia({
count: this.maxNum,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
......@@ -416,7 +417,7 @@
});
// 获取选择的图片路径数组
const imagePaths = chooseImageRes.tempFilePaths;
const imagePaths = chooseImageRes.tempFiles;
// 判断选择的图片数量是否超过最大限制数量
let maxNum = Number(imagePaths.length) + Number(this.image_list.length); //当前上传的+已经上传的
......@@ -433,7 +434,7 @@
imagePaths.forEach(imagePath => {
// 使用compressImage 压缩图片
uni.compressImage({
src: imagePath,
src: imagePath.tempFilePath,
quality: 50, //压缩质量,范围0~100,数值越小,质量越低,压缩率越高
success: compressedRes => {
console.log('压缩图片成功:', compressedRes);
......
// const API_BASE = 'https://api.ichunt.com';
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API_BASE = 'https://api.ichunt.com';
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API_BASE = 'http://api.liexin.com';
const API_BASE_OSS = 'http://image.liexindev.net';
// const API_BASE = 'http://api.liexin.com';
// const API_BASE_OSS = 'http://image.liexindev.net';
const API = {
/**
......
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 sign in to comment