Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
2a68d0f7
Commit
2a68d0f7
authored
Aug 29, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
898bec43
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
index.js
components/posterbox/index.js
+11
-8
index.wxs
filter/index.wxs
+2
-2
newindex.js
src/pages/clockdetail/newindex.js
+1
-0
index.js
src/pages/morethemeindex/index.js
+0
-1
index.js
src/pages/themeindex/index.js
+0
-1
No files found.
components/posterbox/index.js
View file @
2a68d0f7
...
...
@@ -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
((
e
rr
)
=>
{
wx
.
hideLoading
();
if
(
e
&&
e
.
errMsg
==
'authorize:fail auth deny'
)
{
if
(
e
rr
&&
(
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
:
'图片下载失败'
,
...
...
filter/index.wxs
View file @
2a68d0f7
...
...
@@ -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 { // 一天以外
...
...
src/pages/clockdetail/newindex.js
View file @
2a68d0f7
...
...
@@ -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
,
...
...
src/pages/morethemeindex/index.js
View file @
2a68d0f7
...
...
@@ -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}`,
...
...
src/pages/themeindex/index.js
View file @
2a68d0f7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment