Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
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
wildfirecode13
new_taobao
Commits
b83bc7b0
Commit
b83bc7b0
authored
Oct 12, 2020
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
02e54595
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2623 additions
and
84 deletions
+2623
-84
compksuccessmodal.js
.../client/components/compksuccessmodal/compksuccessmodal.js
+5
-5
comrulemodal.js
taobao_jn/client/components/comrulemodal/comrulemodal.js
+10
-10
pagepageindex.axml
taobao_jn/client/pages/pagepageindex/pagepageindex.axml
+1
-1
pagepageindex.js
taobao_jn/client/pages/pagepageindex/pagepageindex.js
+90
-67
debug.log
taobao_jn/debug.log
+2516
-0
jn.getUserRankList.json
taobao_jn/mocks/jn.getUserRankList.json
+1
-1
No files found.
taobao_jn/client/components/compksuccessmodal/compksuccessmodal.js
View file @
b83bc7b0
...
...
@@ -3,13 +3,13 @@
import
resList
from
'../../resconfig/resList'
;
Component
({
props
:
{},
data
:
{},
data
:
{
resList
:
resList
},
methods
:
{},
onInit
(
props
)
{
this
.
setData
({
resList
:
resList
});
didMount
(){
}
});
\ No newline at end of file
taobao_jn/client/components/comrulemodal/comrulemodal.js
View file @
b83bc7b0
...
...
@@ -23,20 +23,20 @@ Component({
*/
async
getActivityBaseInfoById
()
{
my
.
showLoading
();
const
{
success
,
data
}
=
await
API
.
getActivityBaseInfoById
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
)
})
||
{};
//
const {
//
success,
//
data
//
} = await API.getActivityBaseInfoById().catch(r => {
//
my.hideLoading();
//
commonToast(r && r.message)
//
}) || {};
if
(
success
)
{
//
if (success) {
my
.
hideLoading
();
this
.
setData
({
rule
:
data
.
rule
rule
:
app
.
activityInfo
.
rule
})
}
//
}
},
},
didMount
(){
...
...
taobao_jn/client/pages/pagepageindex/pagepageindex.axml
View file @
b83bc7b0
...
...
@@ -38,6 +38,6 @@
<rule-modal a:if="{{modalStatus==1}}" onCloseModal="closeModal"></rule-modal>
</view>
<view class="popcontainer_down" a:if="{{modalStatus}}">
<view class="popcontainer_down" a:if="{{modalStatus
==2
}}">
<invitelist-modal a:if="{{modalStatus==2}}" onCloseModal="closeModal"></invitelist-modal>
</view>
taobao_jn/client/pages/pagepageindex/pagepageindex.js
View file @
b83bc7b0
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
import
resList
from
'../../resconfig/resList'
;
import
API
from
'../../api'
;
import
*
as
FYGE
from
"fyge-tbmini"
;
import
*
as
SvgaParser
from
"svga-parser"
;
...
...
@@ -26,13 +26,13 @@ Page({
/**弹窗状态 */
modalStatus
:
0
,
/**当前温暖值 */
curWarms
:
''
,
curWarms
:
''
,
/**当前排名 */
curRank
:
''
,
curRank
:
''
,
/**当前游戏阶段 */
curGameStep
:
1
,
curGameStep
:
1
,
/**活动结束后排行榜奖励信息 */
rankPrize
:{}
rankPrize
:
{}
},
onLoad
(
props
)
{
...
...
@@ -54,71 +54,72 @@ Page({
async
createMain
()
{
console
.
log
(
123
)
var
canvas
=
await
new
Promise
((
r
)
=>
{
my
.
createCanvas
({
id
:
'canvas'
,
success
:
(
ccc
)
=>
{
const
dpr
=
my
.
getSystemInfoSync
().
pixelRatio
const
windowWidth
=
my
.
getSystemInfoSync
().
windowWidth
;
const
windowHeight
=
my
.
getSystemInfoSync
().
windowHeight
;
ccc
.
width
=
windowWidth
*
dpr
+
dpr
;
//重新修改会有误差
ccc
.
height
=
windowHeight
*
dpr
+
dpr
;
r
(
ccc
);
}
})
my
.
createCanvas
({
id
:
'canvas'
,
success
:
(
ccc
)
=>
{
const
dpr
=
my
.
getSystemInfoSync
().
pixelRatio
const
windowWidth
=
my
.
getSystemInfoSync
().
windowWidth
;
const
windowHeight
=
my
.
getSystemInfoSync
().
windowHeight
;
ccc
.
width
=
windowWidth
*
dpr
+
dpr
;
//重新修改会有误差
ccc
.
height
=
windowHeight
*
dpr
+
dpr
;
r
(
ccc
);
}
})
})
console
.
log
(
111
)
FYGE
.
initedByCanvas
(
canvas
)
var
sysInfo
=
my
.
getSystemInfoSync
()
//建舞台
var
stage
=
new
FYGE
.
Stage
(
canvas
,
750
,
//设计宽度,按设计搞给的就行
1624
,
//设计高度
sysInfo
&&
sysInfo
.
windowWidth
||
document
.
body
.
clientWidth
,
sysInfo
&&
sysInfo
.
windowHeight
||
document
.
body
.
clientHeight
,
FYGE
.
RENDERER_TYPE
.
CANVAS
canvas
,
750
,
//设计宽度,按设计搞给的就行
1624
,
//设计高度
sysInfo
&&
sysInfo
.
windowWidth
||
document
.
body
.
clientWidth
,
sysInfo
&&
sysInfo
.
windowHeight
||
document
.
body
.
clientHeight
,
FYGE
.
RENDERER_TYPE
.
CANVAS
);
//stage初始化
stage
.
addEventListener
(
FYGE
.
Event
.
INIT_STAGE
,
()
=>
{
SvgaParser
.
loadSvga
(
fireSrc
,
(
v
)
=>
{
console
.
log
(
"svga"
+
v
);
var
mv
=
stage
.
addChild
(
new
FYGE
.
MovieClip
(
v
));
mv
.
x
=
275
;
mv
.
y
=
785
;
console
.
log
(
"svgmv"
,
mv
)
},
(
err
)
=>
{
console
.
log
(
err
);
}
)
SvgaParser
.
loadSvga
(
snowSrc
,
(
v
)
=>
{
console
.
log
(
"svga"
+
v
);
var
mv
=
stage
.
addChild
(
new
FYGE
.
MovieClip
(
v
));
mv
.
x
=
175
;
mv
.
y
=
585
;
console
.
log
(
"svgmv"
,
mv
)
},
(
err
)
=>
{
console
.
log
(
err
);
}
)
SvgaParser
.
loadSvga
(
fireSrc
,
(
v
)
=>
{
console
.
log
(
"svga"
+
v
);
var
mv
=
stage
.
addChild
(
new
FYGE
.
MovieClip
(
v
));
mv
.
x
=
275
;
mv
.
y
=
785
;
console
.
log
(
"svgmv"
,
mv
)
},
(
err
)
=>
{
console
.
log
(
err
);
}
)
SvgaParser
.
loadSvga
(
snowSrc
,
(
v
)
=>
{
console
.
log
(
"svga"
+
v
);
var
mv
=
stage
.
addChild
(
new
FYGE
.
MovieClip
(
v
));
mv
.
x
=
175
;
mv
.
y
=
585
;
console
.
log
(
"svgmv"
,
mv
)
},
(
err
)
=>
{
console
.
log
(
err
);
}
)
},
this
);
//循环
loop
();
function
loop
()
{
FYGE
.
Tween
.
flush
()
stage
.
flush
();
FYGE
.
getRequestAnimationFrame
()(
loop
);
FYGE
.
Tween
.
flush
()
stage
.
flush
();
FYGE
.
getRequestAnimationFrame
()(
loop
);
}
},
/**
* 获取用户授权信息
...
...
@@ -157,29 +158,51 @@ Page({
})
||
{};
if
(
success
)
{
this
.
getActivityBaseInfoById
();
}
},
/*
* 获取活动信息
*/
async
getActivityBaseInfoById
()
{
my
.
showLoading
();
const
{
success
,
data
}
=
await
API
.
getActivityBaseInfoById
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
)
})
||
{};
if
(
success
)
{
my
.
hideLoading
();
app
.
activityInfo
=
data
;
this
.
judgeDoHelp
();
}
},
/**判断是否是助力 */
judgeDoHelp
(){
judgeDoHelp
()
{
this
.
updateGameInfo
();
},
/**更新游戏信息 */
async
updateGameInfo
(){
async
updateGameInfo
()
{
my
.
showLoading
();
const
{
success
,
data
}
=
await
API
.
getGameInfo
().
catch
(
r
=>
{
const
{
success
,
data
}
=
await
API
.
getGameInfo
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
);
})
||
{};
if
(
success
)
{
commonToast
(
r
&&
r
.
message
);
})
||
{};
if
(
success
)
{
this
.
setData
({
curWarms
:
data
.
warms
+
''
,
curRank
:
data
.
rank
,
curGameStep
:
data
.
step
curWarms
:
data
.
warms
+
''
,
curRank
:
data
.
rank
,
curGameStep
:
data
.
step
})
my
.
hideLoading
();
}
},
/**打开弹窗 */
openModal
(
e
)
{
...
...
@@ -198,7 +221,7 @@ Page({
})
},
/**点击跳转页面 */
navigateTo
(
e
){
navigateTo
(
e
)
{
const
{
item
}
=
e
.
target
.
dataset
;
...
...
taobao_jn/debug.log
View file @
b83bc7b0
This diff is collapsed.
Click to expand it.
taobao_jn/mocks/jn.getUserRankList.json
View file @
b83bc7b0
...
...
@@ -3,7 +3,7 @@
"success"
:
true
,
"data"
:
{
"myRankInfo"
:
{
"rank"
:
"
56
0"
,
"rank"
:
"
45
0"
,
"warms"
:
"1"
,
"userNick"
:
"caoxingru12"
},
...
...
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