上传头像
This commit is contained in:
parent
455d4e742c
commit
8d49e12325
|
@ -788,7 +788,7 @@
|
||||||
onok(ev) {
|
onok(ev) {
|
||||||
var that=this;
|
var that=this;
|
||||||
this.url = "";
|
this.url = "";
|
||||||
that.form.headImg = ev.path;
|
// that.form.headImg = ev.path;
|
||||||
var url = null;
|
var url = null;
|
||||||
if(ev.path){
|
if(ev.path){
|
||||||
that.$queue.showLoading("上传中...");
|
that.$queue.showLoading("上传中...");
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<!-- 普通弹窗 -->
|
<!-- 普通弹窗 -->
|
||||||
<uni-popup ref="popup" type="bottom" background-color="#fff" @change="change">
|
<uni-popup ref="popup" type="bottom" background-color="#fff">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view class="popup-content-top">
|
<view class="popup-content-top">
|
||||||
<view @click="uploadImg(0)" class="popup-content-top-btn" style="border-bottom: 1px solid #ccc;">
|
<view @click="uploadImg(0)" class="popup-content-top-btn" style="border-bottom: 1px solid #ccc;">
|
||||||
|
@ -208,8 +208,6 @@
|
||||||
onok(ev) {
|
onok(ev) {
|
||||||
var that=this;
|
var that=this;
|
||||||
this.url = "";
|
this.url = "";
|
||||||
this.avatar = ev.path;
|
|
||||||
var url = null;
|
|
||||||
if(ev.path){
|
if(ev.path){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '上传中...'
|
title: '上传中...'
|
||||||
|
@ -224,8 +222,7 @@
|
||||||
},
|
},
|
||||||
name: 'file',
|
name: 'file',
|
||||||
success: uploadFileRes => {
|
success: uploadFileRes => {
|
||||||
url = JSON.parse(uploadFileRes.data);
|
that.avatar = JSON.parse(uploadFileRes.data).data;
|
||||||
// that.avatar = url.data
|
|
||||||
that.$refs.popup.close('bottom')
|
that.$refs.popup.close('bottom')
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue