Commit 2a68d0f7 authored by wangxuelai's avatar wangxuelai

''

parent 898bec43
......@@ -75,12 +75,16 @@ Component({
wx.showLoading({
title: '图片下载中',
})
wxAuthorize('scope.writePhotosAlbum').then((res) => {
return wxGetImageInfo({
src: this.data.canvasimagepath
})
// wxSaveImageToPhotosAlbum({
// filePath: path
// })
// wxAuthorize('scope.writePhotosAlbum').then((res) => {
// return wxGetImageInfo({
// src: this.data.canvasimagepath
// })
wxGetImageInfo({
src: this.data.canvasimagepath
}).then((res) => {
console.log(res);
const {errMsg, path} = res;
if (errMsg == 'getImageInfo:ok') {
return wxSaveImageToPhotosAlbum({
......@@ -109,15 +113,14 @@ Component({
})
}
wx.hideLoading();
}).catch((e) => {
}).catch((err) => {
wx.hideLoading();
if (e && e.errMsg == 'authorize:fail auth deny') {
if (err && (err.errMsg == "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg == "saveImageToPhotosAlbum:fail auth deny" || err.errMsg == "saveImageToPhotosAlbum:fail authorize no response")) {
this.setData({
showAuthSettingDia: true
})
return;
}
wx.showModal({
title: '提示',
content: '图片下载失败',
......
......@@ -49,7 +49,7 @@ function timeCompare (date) {
var timestampCompare = nowTimestamp - startTimestamp;
var text = '时间';
if (timestampCompare < oneHourTimestamp) { // 一小时以内
text = (Math.round(timestampCompare / 1000 / 60) == 0 ? 1 : (Math.round(timestampCompare / 1000 / 60) == 60 ? 59 : Math.round(timestampCompare / 1000 / 60))) + '分钟前';
text = (timestampCompare <= 0 ? 1 : (Math.round(timestampCompare / 1000 / 60) == 60 ? 59 : Math.round(timestampCompare / 1000 / 60))) + '分钟前';
} else if (timestampCompare < oneDayTimestamp) { // 一小时到24小时之间
text = Math.round(timestampCompare / 1000 / 60 / 60) + '小时前';
} else { // 一天以外
......@@ -69,7 +69,7 @@ function bulletTimeCompare (date) {
if (timestampCompare < oneMinuteTimestamp) {
text = '刚刚';
} else if (timestampCompare < oneHourTimestamp) { // 一小时以内
text = (Math.round(timestampCompare / 1000 / 60) <= 0 ? 1 : (Math.round(timestampCompare / 1000 / 60) == 60 ? 59 : Math.round(timestampCompare / 1000 / 60))) + '分钟前';
text = (timestampCompare <= 0 ? 1 : (Math.round(timestampCompare / 1000 / 60) == 60 ? 59 : Math.round(timestampCompare / 1000 / 60))) + '分钟前';
} else if (timestampCompare < oneDayTimestamp) { // 一小时到24小时之间
text = Math.round(timestampCompare / 1000 / 60 / 60) + '小时前';
} else { // 一天以外
......
......@@ -139,6 +139,7 @@ Page({
const visitor = LocalStorage.getItem('visitor');
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
if (options.scene) {
console.log(options.scene);
let sceneQuery = scenQueryGet(options.scene);
const {
t,
......
......@@ -1343,7 +1343,6 @@ Page({
title: '日签生成中...'
})
generateCustomerQrcode({
scene: `c=${clockDetail[0].id}&t=${this.data.themeSelect.id}`,
page: `src/pages/clockdetail/newindex`
// scene: `ctd=${visitor && visitor.id}&t=${this.data.tid}`,
......
......@@ -1429,7 +1429,6 @@ Page({
scene: `c=${clockDetail.id}&t=${this.data.tid}`,
page: `src/pages/clockdetail/newindex`
}).then((res) => {
console.log("res",res)
const {
code,
data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment