adv 7.30
This commit is contained in:
@@ -67,6 +67,34 @@ export default {
|
||||
onLoad() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
// 监听头像裁剪
|
||||
created() {
|
||||
// uni.$on('uAvatarCropper', path => {
|
||||
// const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
|
||||
// this.avatar = path;
|
||||
// // 可以在此上传到服务端
|
||||
// // uni.uploadFile({
|
||||
// // url: 'http://www.example.com/upload',
|
||||
// // filePath: path,
|
||||
// // name: 'file',
|
||||
// // complete: (res) => {
|
||||
// // console.log(res);
|
||||
// // }
|
||||
// // });
|
||||
// common.uploadFile({
|
||||
// url: url,
|
||||
// name: 'avatar',
|
||||
// filePath: path
|
||||
// }).then(result => {
|
||||
// // console.log(result);
|
||||
// this.$set(this, 'avatar', result.file_path);
|
||||
// // this.avatar = result.file_path;
|
||||
// this.uploadPath = result.file_name;
|
||||
// }, error => {
|
||||
// this.$u.toast(error);
|
||||
// })
|
||||
// })
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if( e.index == 0 ) uni.navigateBack();
|
||||
},
|
||||
@@ -94,6 +122,17 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 头像裁剪
|
||||
// chooseAvatar() {
|
||||
// this.$u.route({
|
||||
// url: '/uview-ui/components/u-avatar-cropper/u-avatar-cropper',
|
||||
// params: {
|
||||
// destWidth: 300,
|
||||
// rectWidth: 200,
|
||||
// fileType: 'jpg',
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
getUserInfo() {
|
||||
this.$u.api.getMemberInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
|
||||
Reference in New Issue
Block a user