作者 wumengyu

删除多余图片,添加上传背景图接口

@font-face {font-family: "iconfont";
src: url('//at.alicdn.com/t/font_961048_kzif4jn6os.eot?t=1546407359461'); /* IE9*/
src: url('//at.alicdn.com/t/font_961048_kzif4jn6os.eot?t=1546407359461#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAA2EAAsAAAAAFBwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkpiY21hcAAAAYAAAADvAAAC5GwWoatnbHlmAAACcAAACHgAAAuA5LTG5mhlYWQAAAroAAAALwAAADYTxCF7aGhlYQAACxgAAAAcAAAAJAfeA5VobXR4AAALNAAAAA8AAABQUAAAAGxvY2EAAAtEAAAAKgAAACobAhhebWF4cAAAC3AAAAAfAAAAIAEjAGluYW1lAAALkAAAAUUAAAJtPlT+fXBvc3QAAAzYAAAAqgAAAPgKu2LeeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMbwoYG7438AQw9zA0AAUZgTJAQDlnQxVeJzdkkFOAkEQRd8wiDqigw5rMMYYF8MJCEvWXIUFe87DJUy4A2f4Ia5cuMdfUyw17K3Om0xXqtNd/xdwBZSmNX0oviiI+HS26PIlVZfv8+H9C8/+6wlVqjXWVDPNtdBSK2201U57HY7r0wnONY0mav+quRCF78v1yhvvvyy4d9UDI24ZUPPIk3u65oYeQ+781pKm62Bw8bb/H8Pu+33eNeFRYhXtVhK+q06sLGoSa4zGidVGk8S6o2lCnGsTe4FmiV1B8yRmTovETqFlYs/QKrF7aJPEq7VN7CjaJTGv2icxwzok0ddxnVD9ANXtYX0AeJydVmtsFNcVnnPv7sy+vLPPmd1l7fXs2DO21157XzO21/batRebV0hsCi62IC6G2C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iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxtTlsOgjAQ7PAs+Fb88wp8VO/gPSogLJI2AQmkp7f44MvJZrI7k5ksc9gHMfuPBA5cePARIARHhBgLLLHCGhtsscMeByQ4sqirdJ9JVQrPSCVikzb0KK7UNG5NcnbP0b1QI01bLNtWD2muBzXbF/72LLm2JbjZoybeVVJlVS94ozP5JK3Cr3LKSZVDQXZMRabXNqCnhtHq/Ffq2QfERMqfSDD2AsAjPtkAAA==') format('woff'),
url('//at.alicdn.com/t/font_961048_kzif4jn6os.ttf?t=1546407359461') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('//at.alicdn.com/t/font_961048_kzif4jn6os.svg?t=1546407359461#iconfont') format('svg'); /* iOS 4.1- */
src: url('//at.alicdn.com/t/font_961048_1lfcgmofki3.eot?t=1546996469479'); /* IE9 */
src: url('//at.alicdn.com/t/font_961048_1lfcgmofki3.eot?t=1546996469479#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAyEAAsAAAAAFngAAAw1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFegqbNJVnATYCJANUCywABCAFhG0HggEbtBIzknFWKtl/ncCNofjH0CpbCTK1cqPoYypKt6HlUyK4UqOcSxf3+LfrDoyalxqjw7Zx98rd+pgMglPv/wM3JcYqpRNXTKkByOTMVgcgEDpXrw+UR4HE2cllG+wBgoerATD8e2nSOmkdFOQABhOQbF9LflUquUHXG1jyoc3/B8wWQMAxnUW0W98mY1jqW9e3X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mwrq1djMjALDmdD1g+WRbmE1Uc9EA5taXU0Tj8RxMH3qaaD5rHfMHLN9sHJNFAadsZUH47Kpt4wMWGcGqq2Y7zToTcJSJJQc8coi1CF3qAcuTZpMbYcYDx3GVVvHfBOJnzhW3Stt/E9RiasOpwEwJ4C3NFCXPSZxfrUyz53z/PUbcQJA9doFbRQGI1CJghlhggwe7kWcPlJRA8C6BKPhwRwwCtLTlOCoQF2KEIx4ESEIi+MOwnhi26AYGwhHOEIwjQARybEQUMhxEDHKct+U43kdcOOAd4kFOGBLBSGxVitEaF2evDniAjh0uDAUZqTPCLGv/BSpq7qra1P8PnMdytlmum/WfYMCtYhd/VNsQJJOORvYRnQ+0JjY5GkCEZR/CtF+tZN+uS0FjMks0Dnhw4TvmcEmMgoxcPsxav/4LVNTcjQz7k/gPnMfVMxtLaw/bT4PxGnZXuvqj2gqCSmb6OhqZD0FBqxpipv71BhBhqQ+omvZWYjrpa1hu3jjeB9rnxBHkV8TOMJygUEkancHk4maxz9+8fff+g9b3FAU3alNcudnMrguN//CBWucD8pHm21aCOWPeacado9OiM2YzlLprPvhfnK+AVIeK4oCN77kRfdxUHALXHhtNggckU3d2eezQqBOg5ofoNVKITEvB5z5Ts1pc7IK8sW6mzN4kCQAA') format('woff2'),
url('//at.alicdn.com/t/font_961048_1lfcgmofki3.woff?t=1546996469479') format('woff'),
url('//at.alicdn.com/t/font_961048_1lfcgmofki3.ttf?t=1546996469479') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('//at.alicdn.com/t/font_961048_1lfcgmofki3.svg?t=1546996469479#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-shoucang1:before { content: "\e60a"; }
.icon-shoucang1:before {
content: "\e60a";
}
.icon-zan1:before { content: "\e64f"; }
.icon-zan1:before {
content: "\e64f";
}
.icon-z-likeFill:before { content: "\e6c1"; }
.icon-z-likeFill:before {
content: "\e6c1";
}
.icon-jia:before { content: "\e6a9"; }
.icon-jia:before {
content: "\e6a9";
}
.icon-shoucang2:before { content: "\e63b"; }
.icon-shoucang2:before {
content: "\e63b";
}
.icon-fenxiang2:before { content: "\e61e"; }
.icon-fenxiang2:before {
content: "\e61e";
}
.icon-arrow-down:before { content: "\e63d"; }
.icon-arrow-down:before {
content: "\e63d";
}
.icon-shoucang3:before { content: "\e645"; }
.icon-shoucang3:before {
content: "\e645";
}
.icon-xiangxia:before {
content: "\e614";
}
.icon-xiangxia:before { content: "\e614"; }
.icon-zan:before {
content: "\e870";
}
.icon-zan:before { content: "\e870"; }
.icon-bianji:before {
content: "\e67f";
}
.icon-bianji:before { content: "\e67f"; }
.icon-shanchu1:before {
content: "\e674";
}
.icon-shanchu1:before { content: "\e674"; }
.icon-shezhi:before {
content: "\e78a";
}
.icon-location:before { content: "\e600"; }
.icon-location:before {
content: "\e600";
}
.icon-shanchu:before { content: "\e60f"; }
.icon-shanchu:before {
content: "\e60f";
}
.icon-dingweiweizhizuobiaoxianxing:before { content: "\e61f"; }
.icon-dingweiweizhizuobiaoxianxing:before {
content: "\e61f";
}
.icon-shoucang:before { content: "\e613"; }
.icon-shoucang:before {
content: "\e613";
}
.icon-jia1:before { content: "\e62c"; }
.icon-jia1:before {
content: "\e62c";
}
.icon-jian:before { content: "\e62d"; }
.icon-jian:before {
content: "\e62d";
}
.icon-jian1:before { content: "\e6d4"; }
.icon-jian1:before {
content: "\e6d4";
}
... ...
... ... @@ -13,6 +13,110 @@ Page({
is_class:1,
isLogin: null,
is_write:2,//1:已填写,2:未填写
images:'',
images_params:'',
},
//上传背景图
uploadImg() { //这里是选取图片的方法
let that = this;
wx.chooseImage({
count: 1, //最多可以选择的图片总数
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function(res) {
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
let tempFilePaths = res.tempFilePaths;
console.log(tempFilePaths)
//启动上传等待中...
wx.showToast({
title: '正在上传...',
icon: 'loading',
mask: true,
duration: 1000
})
let token = wx.getStorageSync('token');
let uploadImgCount = 0;
console.log(tempFilePaths.length)
for (let i = 0, h = tempFilePaths.length; i < h; i++) {
wx.uploadFile({
url: 'http://wmatchrd.com/portal/Index/upload',
filePath: tempFilePaths[i],
name: 'file',
formData: {
'imgIndex': i
},
header: {
'content-type': 'application/x-www-form-urlencoded',
'XX-Token': token,
'XX-Device-Type': 'wxapp',
},
success: function(res) {
// console.log(res)
uploadImgCount++;
let data = JSON.parse(res.data);
// console.log('data', data);
if (+data.code == 1) {
wx.hideToast();
//服务器返回格式: { "Catalog": "testFolder", "FileName": "1.jpg", "Url": "https://test.com/1.jpg" }
let images = data.data.preview_url;
let images_params = data.data.filepath;
// images.push(data.data.preview_url);
// images_params.push(data.data.filepath);
that.setData({
images: images,
images_params:images_params,
});
// console.log('images---images_params',images,images_params);
that.getUpload();
//如果是最后一张,则隐藏等待中
// if (uploadImgCount == tempFilePaths.length) {
// wx.hideToast();
// }
} else {
wx.hideToast();
wx.showModal({
title: '提示',
content: data.msg,
showCancel: false
})
}
},
fail: function(res) {
wx.hideToast();
wx.showModal({
title: '错误提示',
content: '上传图片失败',
showCancel: false,
success: function(res) {}
})
}
});
}
}
});
},
//上传
getUpload() {
const self = this;
let url = '/portal/Member/changeBg';
let params = {
token: wx.getStorageSync('token'),
pic:self.data.images_params,
};
let header = {
"token": wx.getStorageSync('token')
};
app.post(url, params, {}).then((res) => {
console.log('上传', res);
if (+res.code === 1) {
// self.setData({
// is_write: res.data.is_write,//1:已填写2:未填写
// });
// console.log(this.data.this_week_test_info);
}
})
},
//是否填写个人信息
getIsWrite() {
... ...
<!--pages/my/my.wxml-->
<view class="head-box">
<view wx:if="{{isLogin}}" bindtap="EditUserInfo">
<view class="head" style="background-image: {{user.pic!==''?user.pic:''}}"></view>
<!--<image src="../../images/user-img@2x.png" class="user-img"></image>-->
<image src="{{user.pic}}" class="user-img"></image>
<view class="left">
<view class="class-box">
<image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image>
<image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image>
<image src="../../images/tong@2x.png" wx:if="{{user.level === 3}}"></image>
<text wx:if="{{user.level === 1}}">金火柴</text>
<text wx:if="{{user.level === 2}}">银火柴</text>
<text wx:if="{{user.level === 3}}">铜火柴</text>
</view>
<view wx:if="{{isLogin}}" >
<view class="head" bindtap='uploadImg' style="">
<image class='banner_img' wx:if="{{images !== ''}}" src='{{images}}' mode="aspectFill"></image>
<image class='banner_img' wx:else="" src="{{user.bg_pic}}" mode="aspectFill"></image>
</view>
<view class="right">
<view class="name">{{user.name}}</view>
<view class="area">
<view class="iconfont icon-dingweiweizhizuobiaoxianxing"></view>
<text>{{user.city || '定位'}}</text>
<!--<view class="margin">-->
<image src="{{user.pic}}" class="user-img"></image>
<view class="left">
<view class="class-box">
<image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image>
<image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image>
<image src="../../images/tong@2x.png" wx:if="{{user.level === 3}}"></image>
<text wx:if="{{user.level === 1}}">金火柴</text>
<text wx:if="{{user.level === 2}}">银火柴</text>
<text wx:if="{{user.level === 3}}">铜火柴</text>
</view>
</view>
<view class="qian">{{user.introduce || '个人简介'}}</view>
</view>
<view class="right">
<view class="name">{{user.name}}</view>
<view class="area">
<view class="iconfont icon-dingweiweizhizuobiaoxianxing"></view>
<text>{{user.city || '定位'}}</text>
</view>
<view class="qian">{{user.introduce || '个人简介'}}</view>
</view>
<!--</view>-->
<view class="iconfont icon-shezhi" bindtap="EditUserInfo"></view>
<!--<image src="../../images/user-img@2x.png" class="user-img"></image>-->
</view>
<view wx:if="{{!isLogin}}" class="login-box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="login">登录</button>
... ...
/* pages/my/my.wxss */
@import "../../templates/templates.wxss";
@import "../../pages/css/modal.wxss";
.icon-shezhi {
position: absolute;
right:30rpx;
top:30rpx;
color: #ffffff;
font-size: 50rpx;
}
.login-box {
width: 100%;
height: 300rpx;
... ... @@ -26,11 +33,12 @@
.head-box .head {
width: 100%;
height: 314rpx;
background-image: url('http://pic.97uimg.com/back_pic/20/15/11/05/f87b770c518ed891c289e9c3ee1f2d80.jpg');
background-repeat: no-repeat;
-webkit-background-size: cover;
background-size: cover;
padding: 40rpx;
/*background-image: url('http://pic.97uimg.com/back_pic/20/15/11/05/f87b770c518ed891c289e9c3ee1f2d80.jpg');*/
/*background: url('https://wx.qlogo.cn/mmopen/vi_32/qbkUYBgicOL3TJP6qib3QujnHriajUj69EmQObVQsrbaIEiadmhz1FSdXAH9A0Db5TFMIlNSQYS35X1ON9GVlmkiaeg/132');*/
/*background-repeat: no-repeat;*/
/*-webkit-background-size: cover;*/
/*background-size: cover;*/
/*padding: 40rpx;*/
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
... ... @@ -42,6 +50,22 @@
-ms-filter: blur(2rpx);
filter: blur(2rpx);
}
.banner_img {
z-index:-1;
width: 100%;
height: 100%;
}
.margin {
width: 50%;
height: 314rpx;
padding: 40rpx;
position: absolute;
top:0rpx;
left:0rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.left {
position: absolute;
top:65%;
... ...
... ... @@ -34,7 +34,7 @@ textarea {
height: 360rpx;
color: #666666;
font-size: 28rpx;
padding: 30rpx 30rpx 50rpx 30rpx;
padding: 30rpx 30rpx 80rpx 30rpx;
}
.placeholder {
color: #999999;
... ...