|
|
@@ -2,7 +2,7 @@
|
|
|
<view v-if="!loading">
|
|
|
<view class="form">
|
|
|
<view class="li ddflex">
|
|
|
- <view class="label">头像</view>
|
|
|
+ <view class="label">名片页背景</view>
|
|
|
<view class="photo ddflex flex" @tap="uploadImgs()">
|
|
|
<image :src="avatar ? avatar : '../../static/images/userimg.png'" mode="aspectFill" class="userimg"></image>
|
|
|
<image src="../../static/images/rico.png" class="rico"></image>
|
|
|
@@ -212,7 +212,7 @@ export default {
|
|
|
getUserInfo(){
|
|
|
return new Promise((resolve,reject)=>{
|
|
|
req.getRequest('/api/user/info',{},res=>{
|
|
|
- this.avatar = res.avatar;
|
|
|
+ // this.avatar = res.avatar;
|
|
|
this.phone = res.mobile;
|
|
|
resolve();
|
|
|
})
|
|
|
@@ -302,11 +302,15 @@ export default {
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success: function({ tempFilePaths }) {
|
|
|
- var promise = Promise.all(
|
|
|
+ uni.showLoading({
|
|
|
+ title:'上传中'
|
|
|
+ })
|
|
|
+ var promise =Promise.all(
|
|
|
tempFilePaths.map(tempFilePath => {
|
|
|
return new Promise(function(resolve, reject) {
|
|
|
req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
|
|
|
that.avatar = res.src;
|
|
|
+ resolve()
|
|
|
});
|
|
|
});
|
|
|
})
|
|
|
@@ -314,9 +318,11 @@ export default {
|
|
|
promise
|
|
|
.then(function(results) {
|
|
|
console.log(results);
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
.catch(function(err) {
|
|
|
console.log(err);
|
|
|
+ uni.hideLoading()
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -328,11 +334,15 @@ export default {
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success: function({ tempFilePaths }) {
|
|
|
+ uni.showLoading({
|
|
|
+ title:'上传中'
|
|
|
+ })
|
|
|
var promise = Promise.all(
|
|
|
tempFilePaths.map(tempFilePath => {
|
|
|
return new Promise(function(resolve, reject) {
|
|
|
req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
|
|
|
that.wechatCode = res.src;
|
|
|
+ resolve()
|
|
|
});
|
|
|
});
|
|
|
})
|
|
|
@@ -340,9 +350,11 @@ export default {
|
|
|
promise
|
|
|
.then(function(results) {
|
|
|
console.log(results);
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
.catch(function(err) {
|
|
|
console.log(err);
|
|
|
+ uni.hideLoading()
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -355,6 +367,9 @@ export default {
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success: function({ tempFilePaths }) {
|
|
|
+ uni.showLoading({
|
|
|
+ title:'上传中'
|
|
|
+ })
|
|
|
var promise = Promise.all(
|
|
|
tempFilePaths.map(tempFilePath => {
|
|
|
return new Promise(function(resolve, reject) {
|
|
|
@@ -365,6 +380,7 @@ export default {
|
|
|
}else{
|
|
|
that.honorImgUrls = that.honorImgUrls.concat(res.src)
|
|
|
}
|
|
|
+ resolve()
|
|
|
});
|
|
|
});
|
|
|
})
|
|
|
@@ -372,9 +388,11 @@ export default {
|
|
|
promise
|
|
|
.then(function(results) {
|
|
|
console.log(results);
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
.catch(function(err) {
|
|
|
console.log(err);
|
|
|
+ uni.hideLoading()
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -391,6 +409,9 @@ export default {
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
sourceType: ['album', 'camera'],
|
|
|
success: function({ tempFilePaths }) {
|
|
|
+ uni.showLoading({
|
|
|
+ title:'上传中'
|
|
|
+ })
|
|
|
var promise = Promise.all(
|
|
|
tempFilePaths.map(tempFilePath => {
|
|
|
return new Promise(function(resolve, reject) {
|
|
|
@@ -401,6 +422,7 @@ export default {
|
|
|
}else{
|
|
|
that.styleImgUrls = that.styleImgUrls.concat(res.src)
|
|
|
}
|
|
|
+ resolve()
|
|
|
});
|
|
|
});
|
|
|
})
|
|
|
@@ -408,9 +430,11 @@ export default {
|
|
|
promise
|
|
|
.then(function(results) {
|
|
|
console.log(results);
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
.catch(function(err) {
|
|
|
console.log(err);
|
|
|
+ uni.hideLoading()
|
|
|
});
|
|
|
}
|
|
|
});
|