Commit 9d013e6b by mamingqun

还原成了初始状态

parent a7e1cc4c
......@@ -279,41 +279,40 @@ export default {
vm.isPhoto = false;
vm.isPreivw = true;
vm.uploadPicture();
}
});
// wx.uploadImage({
// localId: vm.imgUrls[0], // 需要上传的图片的本地ID,由chooseImage接口获得
// isShowProgressTips: 1, // 默认为1,显示进度提示
// success: function (res) {
// var serverId = res.serverId; // 返回图片的服务器端ID
// // console.log('上传成功');
// // console.log(res);
// axios
// .get('/contest/wx/upload', {
// params: { media_id: serverId }
// })
// .then(res => {
// console.log('发给服务serverid');
// console.log(res);
// if (res.data.code === 0) {
// vm.small_image =
// res.data.data.small_image;
// vm.big_image =
// res.data.data.big_image;
// }
// })
// .catch(error => {
// console.log('发给服务serverid的错误');
// console.log(error);
// Toast({
// message: error.response.data.msg
// });
// });
// }
// });
wx.uploadImage({
localId: vm.imgUrls[0], // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
var serverId = res.serverId; // 返回图片的服务器端ID
axios
.get('/contest/wx/upload', {
params: { media_id: serverId }
})
.then(res => {
console.log('发给服务serverid');
console.log(res);
if (res.data.code === 0) {
vm.small_image =
res.data.data.small_image;
vm.big_image =
res.data.data.big_image;
}
})
.catch(error => {
console.log('发给服务serverid的错误');
console.log(error);
Toast({
message: error.response.data.msg
});
});
}
});
}
});
});
......@@ -482,7 +481,8 @@ export default {
jsApiList: [
'chooseImage',
'getLocalImgData',
'uploadImage'
'uploadImage',
'downloadImage'
]
});
......@@ -518,6 +518,8 @@ export default {
})
},
uploadPicture() {
var vm = this;
axios.post('/contest/base/upload', {
content: this.base64[0]
}).then(res => {
......@@ -557,6 +559,13 @@ body {
// background: red;
}
.bottomView {
img {
width: 100%;
height: auto;
}
}
.marginTop20 {
margin-top: 10px;
}
......
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