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
268c6669
Commit
268c6669
authored
Mar 17, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'分享海报生成日签修改未完成成长记录和成就海报'
parent
d7363f84
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
33 deletions
+83
-33
index.js
src/pages/beforeinvitation/index.js
+22
-11
newindex.js
src/pages/clockdetail/newindex.js
+23
-14
index.js
src/pages/sharemoretheme/index.js
+16
-8
index.js
utilities/index.js
+22
-0
No files found.
src/pages/beforeinvitation/index.js
View file @
268c6669
import
{
LocalStorage
,
scenQueryGet
scenQueryGet
,
newScenQueryGet
}
from
'../../../utilities/index.js'
;
import
{
userShow
,
...
...
@@ -45,14 +46,23 @@ Page({
*/
onLoad
:
function
(
options
)
{
if
(
options
.
scene
)
{
let
sceneQuery
=
scenQueryGet
(
options
.
scene
);
const
{
t
,
ctd
,
d
,
p
}
=
sceneQuery
;
this
.
setData
({
tid
:
t
,
consumerId
:
ctd
,
d
:
d
||
''
,
p
:
p
||
''
})
let
sceneQuery
=
newScenQueryGet
(
options
.
scene
);
if
(
sceneQuery
.
type
==
1
)
{
const
{
t
,
ctd
,
d
,
p
}
=
sceneQuery
.
queryObj
;
this
.
setData
({
tid
:
t
,
consumerId
:
ctd
,
d
:
d
||
''
,
p
:
p
||
''
})
}
else
if
(
sceneQuery
.
type
==
2
)
{
this
.
setData
({
tid
:
sceneQuery
.
queryObj
[
2
],
consumerId
:
sceneQuery
.
queryObj
[
1
],
d
:
''
,
p
:
sceneQuery
.
queryObj
[
0
]
})
}
}
else
{
const
{
tid
,
...
...
@@ -65,6 +75,7 @@ Page({
d
:
d
||
''
})
}
console
.
log
(
this
.
data
.
p
,
this
.
data
.
p
);
this
.
getThemeDetail
();
},
...
...
@@ -121,7 +132,7 @@ Page({
},
getThemeDetail
()
{
wx
.
showLoading
();
if
(
this
.
data
.
p
){
if
(
this
.
data
.
p
!=
0
){
unlockmodesdetail
(
this
.
data
.
tid
).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
wx
.
hideLoading
();
...
...
@@ -228,7 +239,7 @@ Page({
}
},
goThemeIndex
()
{
if
(
this
.
data
.
p
){
if
(
this
.
data
.
p
!=
0
){
wx
.
reLaunch
({
url
:
`/src/pages/morethemeindex/index?id=
${
this
.
data
.
themeDetail
.
class_id
}
&tid=
${
this
.
data
.
tid
}
`
})
...
...
src/pages/clockdetail/newindex.js
View file @
268c6669
...
...
@@ -28,7 +28,8 @@ import {
audioorigin
,
scenQueryGet
,
LocalStorage
,
imagify
imagify
,
newScenQueryGet
}
from
'../../../utilities/index.js'
;
import
{
unlockmodesdetail
,
...
...
@@ -160,19 +161,27 @@ Page({
const
launchOptions
=
wx
.
getLaunchOptionsSync
();
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
if
(
options
.
scene
)
{
let
sceneQuery
=
scenQueryGet
(
options
.
scene
);
const
{
t
,
c
,
p
}
=
sceneQuery
;
if
(
p
==
7
)
{}
this
.
setData
({
tid
:
t
,
cid
:
c
,
isQrcodeIn
:
true
})
// let sceneQuery = scenQueryGet(options.scene);
let
sceneQuery
=
newScenQueryGet
(
options
.
scene
);
if
(
sceneQuery
.
type
==
1
)
{
const
{
t
,
c
,
p
}
=
sceneQuery
.
queryObj
;
if
(
p
==
7
)
{}
this
.
setData
({
tid
:
t
,
cid
:
c
,
isQrcodeIn
:
true
})
}
else
if
(
sceneQuery
.
type
==
2
)
{
this
.
setData
({
tid
:
sceneQuery
.
queryObj
[
1
],
cid
:
sceneQuery
.
queryObj
[
0
],
isQrcodeIn
:
true
})
}
}
else
{
const
{
tid
,
...
...
src/pages/sharemoretheme/index.js
View file @
268c6669
...
...
@@ -2,7 +2,8 @@ import {
LocalStorage
,
scenQueryGet
,
audioorigin
,
imagify
imagify
,
newScenQueryGet
}
from
'../../../utilities/index.js'
;
import
{
wxPreviewImage
...
...
@@ -63,13 +64,20 @@ Page({
onLoad
:
function
(
options
)
{
// Do some initialize when page load.
const
that
=
this
;
if
(
options
.
scene
)
{
let
sceneQuery
=
scenQueryGet
(
options
.
scene
);
const
{
t
,
}
=
sceneQuery
;
this
.
setData
({
tid
:
t
||
0
})
let
sceneQuery
=
newScenQueryGet
(
options
.
scene
);
if
(
sceneQuery
.
type
==
1
)
{
const
{
t
,
}
=
sceneQuery
.
queryObj
;
this
.
setData
({
tid
:
t
||
0
})
}
else
if
(
sceneQuery
.
type
==
2
)
{
this
.
setData
({
tid
:
sceneQuery
.
queryObj
[
0
]
||
0
})
}
}
else
{
const
{
tid
...
...
utilities/index.js
View file @
268c6669
...
...
@@ -365,6 +365,27 @@ function scenQueryGet(str) {
}
return
queryObj
;
}
function
newScenQueryGet
(
str
)
{
let
_str
=
decodeURIComponent
(
str
);
if
(
_str
.
indexOf
(
'_'
)
!=
-
1
)
{
// 海报生成新的scene
let
queryArr
=
_str
.
split
(
'_'
);
return
{
type
:
2
,
queryObj
:
queryArr
};
}
else
{
// 老的海报生成方式
let
queryArr
=
_str
.
split
(
'&'
);
let
queryObj
=
{};
for
(
let
i
=
0
,
_length
=
queryArr
.
length
;
i
<
_length
;
i
++
)
{
let
arr
=
queryArr
[
i
].
split
(
'='
);
queryObj
[
arr
[
0
]]
=
arr
[
1
]
}
return
{
type
:
1
,
queryObj
};
}
}
// 违规词
function
matchBlacklist
(
text
)
{
const
matched
=
[];
...
...
@@ -548,4 +569,5 @@ export {
mediaimagify
,
transformOssVideofy
,
deepCopy
,
newScenQueryGet
,
}
\ No newline at end of file
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