作者 wumengyu

优化保存图片到相册

@@ -213,7 +213,7 @@ Page({ @@ -213,7 +213,7 @@ Page({
213 let uploadImgCount = 0; 213 let uploadImgCount = 0;
214 for (let i = 0, h = tempFilePaths.length; i < h; i++) { 214 for (let i = 0, h = tempFilePaths.length; i < h; i++) {
215 wx.uploadFile({ 215 wx.uploadFile({
216 - url: 'http://wmatchrd.com/portal/Index/upload', 216 + url: 'https://wmatchrd.com/portal/Index/upload',
217 filePath: tempFilePaths[i], 217 filePath: tempFilePaths[i],
218 name: 'file', 218 name: 'file',
219 formData: { 219 formData: {
@@ -249,7 +249,8 @@ Page({ @@ -249,7 +249,8 @@ Page({
249 count: res.data.count, // 留言板 249 count: res.data.count, // 留言板
250 is_send:res.data.is_send,//能否参加1:不能2:能 250 is_send:res.data.is_send,//能否参加1:不能2:能
251 }); 251 });
252 - self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码) 252 + // self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码)
  253 + self.getLocalImage()
253 // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除 254 // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除
254 const status = res.data.active.status; 255 const status = res.data.active.status;
255 if (status === 2 || status === 6 || status === 7 || status === 8) { 256 if (status === 2 || status === 6 || status === 7 || status === 8) {
@@ -387,34 +388,34 @@ Page({ @@ -387,34 +388,34 @@ Page({
387 // } 388 // }
388 }, 389 },
389 //获取活动二维码 390 //获取活动二维码
390 - getCode() {  
391 - const self = this;  
392 - let url = '/portal/Index/qrCode';  
393 - let params = {  
394 - id: self.data.detail_id,  
395 - token:wx.getStorageSync('token'),  
396 - type:2,//1拼活动,2拼餐  
397 - };  
398 - app.post(url, params, {}).then((res) => {  
399 - // console.log('获取活动二维码', res);  
400 - if (+res.code === 1) {  
401 - self.setData({qr_code:res.data},() => {  
402 - // console.log('二维码',self.data.qr_code);  
403 - wx.getImageInfo({  
404 - src: 'http://' + self.data.qr_code,  
405 - success(res) {  
406 - // console.log('二维码本地路径',res);  
407 - self.setData({local_qr_code:res.path});  
408 - self.getLocalImage();  
409 - },  
410 - fail() {  
411 - console.log('失败');  
412 - }  
413 - })  
414 - });  
415 - }  
416 - })  
417 - }, 391 + // getCode() {
  392 + // const self = this;
  393 + // let url = '/portal/Index/qrCode';
  394 + // let params = {
  395 + // id: self.data.detail_id,
  396 + // token:wx.getStorageSync('token'),
  397 + // type:2,//1拼活动,2拼餐
  398 + // };
  399 + // app.post(url, params, {}).then((res) => {
  400 + // // console.log('获取活动二维码', res);
  401 + // if (+res.code === 1) {
  402 + // self.setData({qr_code:res.data},() => {
  403 + // console.log('二维码',self.data.qr_code);
  404 + // wx.getImageInfo({
  405 + // src: 'https://' + self.data.qr_code,
  406 + // success(res) {
  407 + // // console.log('二维码本地路径',res);
  408 + // self.setData({local_qr_code:res.path});
  409 + // self.getLocalImage();
  410 + // },
  411 + // fail() {
  412 + // console.log('失败');
  413 + // }
  414 + // })
  415 + // });
  416 + // }
  417 + // })
  418 + // },
418 //点击分享 419 //点击分享
419 share() { 420 share() {
420 this.setData({show_canvas: true}, () => { 421 this.setData({show_canvas: true}, () => {
@@ -642,7 +642,7 @@ swiper { @@ -642,7 +642,7 @@ swiper {
642 .score-box { 642 .score-box {
643 height:696rpx; 643 height:696rpx;
644 /* top:68%; */ 644 /* top:68%; */
645 - background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png'); 645 + background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
646 background-repeat: no-repeat; 646 background-repeat: no-repeat;
647 -webkit-background-size: 100%; 647 -webkit-background-size: 100%;
648 background-size: 100%; 648 background-size: 100%;
@@ -693,7 +693,7 @@ swiper { @@ -693,7 +693,7 @@ swiper {
693 .normal-box { 693 .normal-box {
694 height: 540rpx; 694 height: 540rpx;
695 /*background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png');*/ 695 /*background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png');*/
696 - background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png'); 696 + background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
697 } 697 }
698 .normal-box .close-btn { 698 .normal-box .close-btn {
699 margin-top: 52rpx; 699 margin-top: 52rpx;
@@ -248,9 +248,9 @@ Page({ @@ -248,9 +248,9 @@ Page({
248 count:res.data.count, 248 count:res.data.count,
249 is_send:res.data.is_send,//能否参加1:不能2:能 249 is_send:res.data.is_send,//能否参加1:不能2:能
250 }); 250 });
251 - self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码) 251 + // self.getCode();//获取二维码(此二维码不能进入活动详情,已改为小程序码)
252 // self.getImage(); 252 // self.getImage();
253 - // self.getLocalImage(); 253 + self.getLocalImage();
254 // self.countDown(); 254 // self.countDown();
255 // let newTime = new Date().getTime();//当前时间戳 255 // let newTime = new Date().getTime();//当前时间戳
256 // let end_time = app.nextTime(this.data.end_time, this.data.over_hours);//截止时间 256 // let end_time = app.nextTime(this.data.end_time, this.data.over_hours);//截止时间
@@ -409,7 +409,7 @@ Page({ @@ -409,7 +409,7 @@ Page({
409 self.setData({qr_code:res.data},() => { 409 self.setData({qr_code:res.data},() => {
410 // console.log('二维码',self.data.qr_code); 410 // console.log('二维码',self.data.qr_code);
411 wx.getImageInfo({ 411 wx.getImageInfo({
412 - src: 'http://' + self.data.qr_code, 412 + src: 'https://' + self.data.qr_code,
413 success(res) { 413 success(res) {
414 // console.log('二维码本地路径',res); 414 // console.log('二维码本地路径',res);
415 self.setData({local_qr_code:res.path}); 415 self.setData({local_qr_code:res.path});
@@ -6,7 +6,8 @@ Page({ @@ -6,7 +6,8 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - peopleList:[] 9 + peopleList:[],
  10 + // section_bg:'http://qiniuyun.wmatchrd.com/aicon_03@2x.png'
10 }, 11 },
11 //导航 12 //导航
12 getNavigate() { 13 getNavigate() {
@@ -19,7 +19,7 @@ page { @@ -19,7 +19,7 @@ page {
19 -webkit-box-sizing: border-box; 19 -webkit-box-sizing: border-box;
20 -moz-box-sizing: border-box; 20 -moz-box-sizing: border-box;
21 box-sizing: border-box; 21 box-sizing: border-box;
22 - background-image: url('http://qiniuyun.wmatchrd.com/aicon_03@2x.png'); 22 + background-image: url('https://qiniuyun.wmatchrd.com/aicon_03@2x.png');
23 -webkit-background-size: 100%; 23 -webkit-background-size: 100%;
24 background-size: 100%; 24 background-size: 100%;
25 background-repeat: no-repeat; 25 background-repeat: no-repeat;
@@ -27,11 +27,11 @@ page { @@ -27,11 +27,11 @@ page {
27 } 27 }
28 /*活动票黄色*/ 28 /*活动票黄色*/
29 .change-bg { 29 .change-bg {
30 - background-image: url('http://qiniuyun.wmatchrd.com/aicon_01@2x.png'); 30 + background-image: url('https://qiniuyun.wmatchrd.com/aicon_01@2x.png');
31 } 31 }
32 /*灰色*/ 32 /*灰色*/
33 .change-bg-end { 33 .change-bg-end {
34 - background-image: url('http://qiniuyun.wmatchrd.com/aicon_02@2x.png'); 34 + background-image: url('https://qiniuyun.wmatchrd.com/aicon_02@2x.png');
35 } 35 }
36 .detail { 36 .detail {
37 padding:60rpx 40rpx 20rpx 40rpx; 37 padding:60rpx 40rpx 20rpx 40rpx;
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 align-items: center; 27 align-items: center;
28 justify-content: space-between; 28 justify-content: space-between;
29 /*background: pink;*/ 29 /*background: pink;*/
30 - background-image: url('http://qiniuyun.wmatchrd.com/fanpiao@2x.png'); 30 + background-image: url('https://qiniuyun.wmatchrd.com/fanpiao@2x.png');
31 -webkit-background-size: 100%; 31 -webkit-background-size: 100%;
32 /* background-size: 100%; */ 32 /* background-size: 100%; */
33 border-radius:4rpx; 33 border-radius:4rpx;
@@ -37,15 +37,15 @@ @@ -37,15 +37,15 @@
37 } 37 }
38 /*活动票黄色*/ 38 /*活动票黄色*/
39 .change-bg { 39 .change-bg {
40 - background-image: url('http://qiniuyun.wmatchrd.com/huodongpuao@2x.png'); 40 + background-image: url('https://qiniuyun.wmatchrd.com/huodongpuao@2x.png');
41 } 41 }
42 /*灰色*/ 42 /*灰色*/
43 .change-bg-end { 43 .change-bg-end {
44 - background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png'); 44 + background-image: url('https://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
45 } 45 }
46 /*灰色*/ 46 /*灰色*/
47 .change-bg-cancel { 47 .change-bg-cancel {
48 - background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png'); 48 + background-image: url('https://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
49 } 49 }
50 .detail { 50 .detail {
51 width:390rpx; 51 width:390rpx;
@@ -50,7 +50,7 @@ Page({ @@ -50,7 +50,7 @@ Page({
50 // console.log(tempFilePaths.length) 50 // console.log(tempFilePaths.length)
51 for (let i = 0, h = tempFilePaths.length; i < h; i++) { 51 for (let i = 0, h = tempFilePaths.length; i < h; i++) {
52 wx.uploadFile({ 52 wx.uploadFile({
53 - url: 'http://wmatchrd.com/portal/Index/upload', 53 + url: 'https://wmatchrd.com/portal/Index/upload',
54 filePath: tempFilePaths[i], 54 filePath: tempFilePaths[i],
55 name: 'file', 55 name: 'file',
56 formData: { 56 formData: {
@@ -290,7 +290,7 @@ @@ -290,7 +290,7 @@
290 .score-box { 290 .score-box {
291 height:696rpx; 291 height:696rpx;
292 /* top:68%; */ 292 /* top:68%; */
293 - background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png'); 293 + background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
294 background-repeat: no-repeat; 294 background-repeat: no-repeat;
295 -webkit-background-size: 100%; 295 -webkit-background-size: 100%;
296 background-size: 100%; 296 background-size: 100%;
@@ -340,7 +340,7 @@ @@ -340,7 +340,7 @@
340 } 340 }
341 .normal-box { 341 .normal-box {
342 height: 540rpx; 342 height: 540rpx;
343 - background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png'); 343 + background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
344 } 344 }
345 .normal-box .close-btn { 345 .normal-box .close-btn {
346 margin-top: 52rpx; 346 margin-top: 52rpx;
@@ -72,7 +72,7 @@ Page({ @@ -72,7 +72,7 @@ Page({
72 let uploadImgCount = 0; 72 let uploadImgCount = 0;
73 for (let i = 0, h = tempFilePaths.length; i < h; i++) { 73 for (let i = 0, h = tempFilePaths.length; i < h; i++) {
74 wx.uploadFile({ 74 wx.uploadFile({
75 - url: 'http://wmatchrd.com/portal/Index/upload', 75 + url: 'https://wmatchrd.com/portal/Index/upload',
76 filePath: tempFilePaths[i], 76 filePath: tempFilePaths[i],
77 name: 'file', 77 name: 'file',
78 formData: { 78 formData: {
@@ -209,7 +209,7 @@ @@ -209,7 +209,7 @@
209 .score-box { 209 .score-box {
210 height:696rpx; 210 height:696rpx;
211 /* top:68%; */ 211 /* top:68%; */
212 - background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png'); 212 + background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
213 background-repeat: no-repeat; 213 background-repeat: no-repeat;
214 -webkit-background-size: 100%; 214 -webkit-background-size: 100%;
215 background-size: 100%; 215 background-size: 100%;
@@ -259,7 +259,7 @@ @@ -259,7 +259,7 @@
259 } 259 }
260 .normal-box { 260 .normal-box {
261 height: 540rpx; 261 height: 540rpx;
262 - background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png'); 262 + background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
263 } 263 }
264 .normal-box .close-btn { 264 .normal-box .close-btn {
265 margin-top: 52rpx; 265 margin-top: 52rpx;
@@ -349,7 +349,7 @@ @@ -349,7 +349,7 @@
349 .score-box { 349 .score-box {
350 height:696rpx; 350 height:696rpx;
351 /* top:68%; */ 351 /* top:68%; */
352 - background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png'); 352 + background-image: url('https://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
353 background-repeat: no-repeat; 353 background-repeat: no-repeat;
354 -webkit-background-size: 100%; 354 -webkit-background-size: 100%;
355 background-size: 100%; 355 background-size: 100%;
@@ -399,7 +399,7 @@ @@ -399,7 +399,7 @@
399 } 399 }
400 .normal-box { 400 .normal-box {
401 height: 540rpx; 401 height: 540rpx;
402 - background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png'); 402 + background-image: url('https://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
403 } 403 }
404 .normal-box .close-btn { 404 .normal-box .close-btn {
405 margin-top: 52rpx; 405 margin-top: 52rpx;
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "ignore": [] 4 "ignore": []
5 }, 5 },
6 "setting": { 6 "setting": {
7 - "urlCheck": false, 7 + "urlCheck": true,
8 "es6": true, 8 "es6": true,
9 "postcss": true, 9 "postcss": true,
10 "minified": true, 10 "minified": true,