对应js的代码示例
my.chooseImage({
chooseImage: 1, success: res => {
console.log(JSON.stringify(res)) const path = res.apFilePaths[0]; console.log(path); my.uploadFile({
url: '对应接口url', fileType: 'image', fileName: 'file', filePath: path, header: {
"context-type":"application/x-www-form-urlencoded;charset=UTF-8","Authorization":""}, success: res => {
console.log('成功'+JSON.stringify(res)) my.alert({
title: '上传成功11111aa' }); }, fail: function(res) {
console.log('失败'+JSON.stringify(res)) my.alert({
title: '上传失败' }); }, }); }, }); },代码片
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/219952.html原文链接:https://javaforall.net
