作者 wumengyu

优化保存图片到相册

... ... @@ -213,7 +213,7 @@ Page({
let uploadImgCount = 0;
for (let i = 0, h = tempFilePaths.length; i < h; i++) {
wx.uploadFile({
url: 'http://wmatchrd.com/portal/Index/upload',
url: 'https://wmatchrd.com/portal/Index/upload',
filePath: tempFilePaths[i],
name: 'file',
formData: {
... ...
... ... @@ -249,7 +249,8 @@ Page({
count: res.data.count, // 留言板
is_send:res.data.is_send,//能否参加1:不能2:能
});
self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码)
// self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码)
self.getLocalImage()
// (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除
const status = res.data.active.status;
if (status === 2 || status === 6 || status === 7 || status === 8) {
... ... @@ -387,34 +388,34 @@ Page({
// }
},
//获取活动二维码
getCode() {
const self = this;
let url = '/portal/Index/qrCode';
let params = {
id: self.data.detail_id,
token:wx.getStorageSync('token'),
type:2,//1拼活动,2拼餐
};
app.post(url, params, {}).then((res) => {
// console.log('获取活动二维码', res);
if (+res.code === 1) {
self.setData({qr_code:res.data},() => {
// getCode() {
// const self = this;
// let url = '/portal/Index/qrCode';
// let params = {
// id: self.data.detail_id,
// token:wx.getStorageSync('token'),
// type:2,//1拼活动,2拼餐
// };
// app.post(url, params, {}).then((res) => {
// // console.log('获取活动二维码', res);
// if (+res.code === 1) {
// self.setData({qr_code:res.data},() => {
// console.log('二维码',self.data.qr_code);
wx.getImageInfo({
src: 'http://' + self.data.qr_code,
success(res) {
// console.log('二维码本地路径',res);
self.setData({local_qr_code:res.path});
self.getLocalImage();
},
fail() {
console.log('失败');
}
})
});
}
})
},
// wx.getImageInfo({
// src: 'https://' + self.data.qr_code,
// success(res) {
// // console.log('二维码本地路径',res);
// self.setData({local_qr_code:res.path});
// self.getLocalImage();
// },
// fail() {
// console.log('失败');
// }
// })
// });
// }
// })
// },
//点击分享
share() {
this.setData({show_canvas: true}, () => {
... ...
... ... @@ -642,7 +642,7 @@ swiper {
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ... @@ -693,7 +693,7 @@ swiper {
.normal-box {
height: 540rpx;
/*background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png');*/
background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
}
.normal-box .close-btn {
margin-top: 52rpx;
... ...
... ... @@ -248,9 +248,9 @@ Page({
count:res.data.count,
is_send:res.data.is_send,//能否参加1:不能2:能
});
self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码)
// self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码)
// self.getImage();
// self.getLocalImage();
self.getLocalImage();
// self.countDown();
// let newTime = new Date().getTime();//当前时间戳
// let end_time = app.nextTime(this.data.end_time, this.data.over_hours);//截止时间
... ... @@ -409,7 +409,7 @@ Page({
self.setData({qr_code:res.data},() => {
// console.log('二维码',self.data.qr_code);
wx.getImageInfo({
src: 'http://' + self.data.qr_code,
src: 'https://' + self.data.qr_code,
success(res) {
// console.log('二维码本地路径',res);
self.setData({local_qr_code:res.path});
... ...
... ... @@ -6,7 +6,8 @@ Page({
* 页面的初始数据
*/
data: {
peopleList:[]
peopleList:[],
// section_bg:'http://qiniuyun.wmatchrd.com/aicon_03@2x.png'
},
//导航
getNavigate() {
... ...
... ... @@ -19,7 +19,7 @@ page {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background-image: url('http://qiniuyun.wmatchrd.com/aicon_03@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/aicon_03@2x.png');
-webkit-background-size: 100%;
background-size: 100%;
background-repeat: no-repeat;
... ... @@ -27,11 +27,11 @@ page {
}
/*活动票黄色*/
.change-bg {
background-image: url('http://qiniuyun.wmatchrd.com/aicon_01@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/aicon_01@2x.png');
}
/*灰色*/
.change-bg-end {
background-image: url('http://qiniuyun.wmatchrd.com/aicon_02@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/aicon_02@2x.png');
}
.detail {
padding:60rpx 40rpx 20rpx 40rpx;
... ...
... ... @@ -27,7 +27,7 @@
align-items: center;
justify-content: space-between;
/*background: pink;*/
background-image: url('http://qiniuyun.wmatchrd.com/fanpiao@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/fanpiao@2x.png');
-webkit-background-size: 100%;
/* background-size: 100%; */
border-radius:4rpx;
... ... @@ -37,15 +37,15 @@
}
/*活动票黄色*/
.change-bg {
background-image: url('http://qiniuyun.wmatchrd.com/huodongpuao@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/huodongpuao@2x.png');
}
/*灰色*/
.change-bg-end {
background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
}
/*灰色*/
.change-bg-cancel {
background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
}
.detail {
width:390rpx;
... ...
... ... @@ -50,7 +50,7 @@ Page({
// console.log(tempFilePaths.length)
for (let i = 0, h = tempFilePaths.length; i < h; i++) {
wx.uploadFile({
url: 'http://wmatchrd.com/portal/Index/upload',
url: 'https://wmatchrd.com/portal/Index/upload',
filePath: tempFilePaths[i],
name: 'file',
formData: {
... ...
... ... @@ -290,7 +290,7 @@
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ... @@ -340,7 +340,7 @@
}
.normal-box {
height: 540rpx;
background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
}
.normal-box .close-btn {
margin-top: 52rpx;
... ...
... ... @@ -72,7 +72,7 @@ Page({
let uploadImgCount = 0;
for (let i = 0, h = tempFilePaths.length; i < h; i++) {
wx.uploadFile({
url: 'http://wmatchrd.com/portal/Index/upload',
url: 'https://wmatchrd.com/portal/Index/upload',
filePath: tempFilePaths[i],
name: 'file',
formData: {
... ...
... ... @@ -209,7 +209,7 @@
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ... @@ -259,7 +259,7 @@
}
.normal-box {
height: 540rpx;
background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
}
.normal-box .close-btn {
margin-top: 52rpx;
... ...
... ... @@ -349,7 +349,7 @@
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ... @@ -399,7 +399,7 @@
}
.normal-box {
height: 540rpx;
background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
}
.normal-box .close-btn {
margin-top: 52rpx;
... ...
... ... @@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
... ...