Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
deadb831
Commit
deadb831
authored
Jul 28, 2021
by
Edwise
🍷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
爱德迭代,增加点亮接口,更换图片
parent
3ad3981a
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
112 additions
and
31 deletions
+112
-31
.DS_Store
egret/.DS_Store
+0
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+17
-0
publish.js
egret/publish.js
+2
-2
preload.tmproject
egret/resource/TextureMerger/preload.tmproject
+1
-0
no_light_title_bg.png
egret/resource/assets/start1/no_light_title_bg.png
+0
-0
no_light_ya.png
egret/resource/assets/start1/no_light_ya.png
+0
-0
success_btn.png
egret/resource/assets/task/success_btn.png
+0
-0
default.res.json
egret/resource/default.res.json
+19
-0
Start1Skin.exml
egret/resource/skins/Start1Skin.exml
+10
-5
TaskSkin.exml
egret/resource/skins/TaskSkin.exml
+1
-1
StartItem.ts
egret/src/start1/StartItem.ts
+44
-19
StartScene1.ts
egret/src/start1/StartScene1.ts
+7
-3
config.js
mock/config.js
+3
-0
index.json
mock/esports/index.json
+1
-1
light.json
mock/esports/light.json
+7
-0
No files found.
egret/.DS_Store
View file @
deadb831
No preview for this file type
egret/libs/tw/manager/NetManager.ts
View file @
deadb831
...
...
@@ -996,6 +996,23 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
}
/**兑吧任务点亮 */
public
yyh_light
(
activityId
,
callback
:
Function
):
void
{
const
param
:
any
=
{
activityId
};
const
net
:
INetData
=
{
name
:
'yyh_light'
,
uri
:
'/projectx/'
+
window
[
'projectID'
]
+
'/join_1/finish.do'
,
type
:
'get'
,
dataType
:
'json'
,
param
:
param
,
callback
:
callback
,
hideMsg
:
true
};
this
.
send
(
net
);
}
public
getProjectUserInfo
(
callback
:
Function
):
void
{
const
param
:
any
=
{
...
...
egret/publish.js
View file @
deadb831
...
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var
_this
=
this
;
this
.
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI
qO2wblIxQvwc
'
,
accessKeySecret
:
'
4brsaSRbRpjxw3oDIxJi6bNMcndIR6
'
,
accessKeyId
:
'LTAI
4Fw25WcfcGv7FvcHoiHK
'
,
accessKeySecret
:
'
NZk1NtT9J5HFaAolNbtQdzTzLLvLYm
'
,
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
});
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
...
...
egret/resource/TextureMerger/preload.tmproject
0 → 100644
View file @
deadb831
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/start1/no_light_title_bg.png","../assets/start1/no_light_ya.png","../assets/task/success_btn.png"]}
\ No newline at end of file
egret/resource/assets/start1/no_light_title_bg.png
0 → 100644
View file @
deadb831
21.2 KB
egret/resource/assets/start1/no_light_ya.png
0 → 100644
View file @
deadb831
4.97 KB
egret/resource/assets/task/success_btn.png
0 → 100644
View file @
deadb831
24.9 KB
egret/resource/default.res.json
100755 → 100644
View file @
deadb831
...
...
@@ -15,6 +15,10 @@
{
"keys"
:
"toast_png,closeCommonBtn_png,alertbg_png,去查看_png,好 的_png"
,
"name"
:
"common"
},
{
"name"
:
"preload"
,
"keys"
:
"no_light_title_bg_png,no_light_ya_png,success_btn_png"
}
],
"resources"
:
[
...
...
@@ -387,6 +391,21 @@
"url"
:
"assets/start1/start1暂无活动22.png"
,
"type"
:
"image"
,
"name"
:
"start1暂无活动22_png"
},
{
"name"
:
"no_light_title_bg_png"
,
"type"
:
"image"
,
"url"
:
"assets/start1/no_light_title_bg.png"
},
{
"name"
:
"no_light_ya_png"
,
"type"
:
"image"
,
"url"
:
"assets/start1/no_light_ya.png"
},
{
"name"
:
"success_btn_png"
,
"type"
:
"image"
,
"url"
:
"assets/task/success_btn.png"
}
]
}
\ No newline at end of file
egret/resource/skins/Start1Skin.exml
View file @
deadb831
...
...
@@ -4,17 +4,22 @@
<w:Config
id=
"16d391cc18c"
/>
<e:Image
source=
"startscenebg_jpg"
/>
<e:Group
y=
"233"
x=
"103"
>
<e:Image
id=
"notLightImg"
source=
"start 未完成暗的状态_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"lightImg"
source=
"start完成活动点亮_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Group
id=
"noLightGroup"
width=
"544"
height=
"133"
y=
"0"
horizontalCenter=
"0"
>
<e:Image
source=
"no_light_title_bg_png"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
<e:Image
source=
"no_light_ya_png"
x=
"384"
verticalCenter=
"-1"
/>
<e:Label
text=
"完成任务即可点亮"
x=
"76"
anchorOffsetX=
"0"
width=
"304"
anchorOffsetY=
"0"
height=
"52"
verticalAlign=
"middle"
verticalCenter=
"-2"
textColor=
"0x5b5b5b"
size=
"28"
textAlign=
"center"
/>
</e:Group>
<e:Image
id=
"notLightImg"
source=
"start 未完成暗的状态_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"lightImg"
source=
"start完成活动点亮_png"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
<e:Group
x=
"27"
y=
"376"
>
<e:Group
width=
"163"
height=
"90"
>
<e:Label
id=
"btn1"
text=
"全部活动"
textColor=
"0x000000"
horizontalCenter=
"0"
verticalCenter=
"0"
bold=
"true"
size=
"30"
/>
<e:Label
id=
"btn1"
text=
"全部活动"
textColor=
"0x000000"
horizontalCenter=
"0"
verticalCenter=
"0"
bold=
"true"
size=
"30"
width=
"163"
height=
"90"
textAlign=
"center"
verticalAlign=
"middle"
/>
<e:Image
id=
"line1"
source=
"start选中_png"
y=
"72"
x=
"60"
/>
</e:Group>
<e:Group
width=
"163"
height=
"90"
x=
"163"
>
<e:Label
id=
"btn2"
text=
"我参与的"
textColor=
"0x878787"
verticalAlign=
"middle"
textAlign=
"center"
horizontalCenter=
"0"
verticalCenter=
"0"
size=
"28"
/>
<e:Label
id=
"btn2"
text=
"我参与的"
textColor=
"0x878787"
verticalAlign=
"middle"
textAlign=
"center"
size=
"28"
anchorOffsetX=
"0"
width=
"163"
anchorOffsetY=
"0"
height=
"90"
x=
"0"
y=
"0"
/>
<e:Image
id=
"line2"
source=
"start选中_png"
x=
"60"
y=
"72"
visible=
"false"
/>
</e:Group>
</e:Group>
...
...
egret/resource/skins/TaskSkin.exml
View file @
deadb831
...
...
@@ -13,7 +13,7 @@
<e:Button
id=
"closeBtn1"
label=
""
horizontalCenter=
"0"
y=
"614"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"
task按钮_png"
source.down=
"task按钮_png"
source.disabled=
"task按钮
_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"
success_btn_png"
source.down=
"success_btn_png"
source.disabled=
"success_btn
_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
...
...
egret/src/start1/StartItem.ts
View file @
deadb831
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
getSkinPath
from
"../../libs/new_wx/utils/getSkinPath"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
export
default
class
StartItem
extends
eui
.
ItemRenderer
{
...
...
@@ -9,29 +11,52 @@ export default class StartItem extends eui.ItemRenderer {
}
dataChanged
()
{
this
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
const
{
data
}
=
DataManager
.
ins
.
getData
(
'getProjectUserInfo'
);
location
.
href
=
this
.
data
.
activityUrl
+
`&esports_uid=
${
data
.
partnerUserId
}
`
;
},
this
);
this
[
'img0'
].
visible
=
false
;
this
[
'img2'
].
visible
=
false
;
this
[
'img1'
].
visible
=
false
;
this
[
'status0'
].
visible
=
false
;
this
[
'status1'
].
visible
=
false
;
this
[
'status2'
].
visible
=
false
;
this
[
'status3'
].
visible
=
false
;
if
(
!
this
.
hasEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
))
{
this
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
((
this
.
data
.
activityStatus
==
0
||
this
.
data
.
activityStatus
==
2
)
&&
this
.
data
.
userStatus
!=
3
)
return
;
this
.
touchEnabled
=
false
;
this
.
touchChildren
=
false
;
setTimeout
(()
=>
{
if
(
this
)
{
this
.
touchEnabled
=
true
;
this
.
touchChildren
=
true
;
}
},
2000
)
const
{
data
}
=
DataManager
.
ins
.
getData
(
'getProjectUserInfo'
);
if
(
this
.
data
.
sourceType
==
2
)
{
NetManager
.
ins
.
yyh_light
(
this
.
data
.
activityId
,
(
s
,
r
)
=>
{
if
(
!
s
)
{
if
(
r
.
code
!=
'101001'
&&
r
.
code
!=
'101003'
&&
r
.
code
!=
'101004'
)
{
showToast
(
'网络异常
\
n请隔一段时间再尝试'
);
return
;
}
}
console
.
log
(
"跳转-->>"
,
Date
.
now
())
location
.
href
=
this
.
data
.
activityUrl
;
})
}
else
{
location
.
href
=
this
.
data
.
activityUrl
+
`&esports_uid=
${
data
.
partnerUserId
}
`
;
}
},
this
);
}
this
[
'img0'
].
visible
=
false
;
this
[
'img2'
].
visible
=
false
;
this
[
'img1'
].
visible
=
false
;
this
[
'status0'
].
visible
=
false
;
this
[
'status1'
].
visible
=
false
;
this
[
'status2'
].
visible
=
false
;
this
[
'status3'
].
visible
=
false
;
this
[
`status
${
this
.
data
.
userStatus
}
`
].
visible
=
true
;
this
[
`img
${
this
.
data
.
activityStatus
}
`
].
visible
=
true
;
this
[
`status
${
this
.
data
.
userStatus
}
`
].
visible
=
true
;
this
[
`img
${
this
.
data
.
activityStatus
}
`
].
visible
=
true
;
if
(
this
.
data
.
userStatus
==
3
)
{
this
[
`img
${
this
.
data
.
activityStatus
}
`
].
visible
=
false
;
if
(
this
.
data
.
userStatus
==
3
)
{
this
[
`img
${
this
.
data
.
activityStatus
}
`
].
visible
=
false
;
}
if
(
this
.
data
.
activityStatus
==
2
||
this
.
data
.
activityStatus
==
0
)
{
if
(
this
.
data
.
userStatus
!=
3
)
this
[
`status
${
this
.
data
.
userStatus
}
`
].
visible
=
false
;
if
(
this
.
data
.
activityStatus
==
2
||
this
.
data
.
activityStatus
==
0
)
{
if
(
this
.
data
.
userStatus
!=
3
)
this
[
`status
${
this
.
data
.
userStatus
}
`
].
visible
=
false
;
}
}
}
\ No newline at end of file
egret/src/start1/StartScene1.ts
View file @
deadb831
...
...
@@ -15,7 +15,9 @@ export default class Start1Scene extends Scene {
this
.
scroll
.
height
=
this
.
stage
.
stageHeight
-
this
.
scroll
.
y
-
30
;
const
{
data
}
=
DataManager
.
ins
.
getData
(
'yyh_index'
);
this
[
'notLightImg'
].
visible
=
!
data
.
lighten
;
//2021-07-26 爱德迭代,这里废弃之前用图片表示的未点亮,该用group+label+img,灵活性更高
// this['notLightImg'].visible = !data.lighten;
this
[
'noLightGroup'
].
visible
=
!
data
.
lighten
;
this
[
'lightImg'
].
visible
=
data
.
lighten
;
this
[
'tips'
].
text
=
`我完成的活动
${
data
.
completeCount
}
个`
;
this
.
list
.
itemRenderer
=
StartItem
;
...
...
@@ -50,8 +52,10 @@ export default class Start1Scene extends Scene {
if
(
newActs
.
length
>=
4
)
newActs
.
length
=
4
;
// console.log(newActs);
if
(
!
showSuccess
)
PanelCtrl
.
instance
.
show
(
'TaskPanel'
,
newActs
.
join
(
''
));
//2021-07-27 爱德迭代修改,不需要这个弹窗了
// if (!showSuccess)
// PanelCtrl.instance.show('TaskPanel', newActs.join(''));
localStorage
.
setItem
(
'yyh2_task'
,
JSON
.
stringify
(
currentTaskIds
));
}
...
...
mock/config.js
View file @
deadb831
...
...
@@ -9,6 +9,9 @@ const config = {
'/projectx/p32804e45/join_1/join.do'
:
{
data
:
'./esports/index.json'
},
'/projectx/p32804e45/join_1/finish.do'
:
{
data
:
'./esports/light.json'
},
'/customActivity/esports/recentlyGetJoinTimes'
:
{
data
:
'./esports/recentlyGetJoinTimes.json'
},
...
...
mock/esports/index.json
View file @
deadb831
...
...
@@ -7,7 +7,7 @@
"activityId"
:
"124"
,
"activityUrl"
:
"http://www.taobao.com"
,
"userStatus"
:
0
,
"sourceType"
:
1
,
"sourceType"
:
2
,
"activityName"
:
"活动2"
,
"activityStatus"
:
1
,
"banner"
:
"http://thirdwx.qlogo.cn/mmopen/13HuiaUpBYia5bLzmbjjdKn4WHbf63SJm2pzwDY73f2r33WbCXtBhwHLnF6iaGqdAk0eC8CbA8jQxZTYPp05iaDMTj5tDb7ibV3Rs/132"
,
...
...
mock/esports/light.json
0 → 100644
View file @
deadb831
{
"success"
:
true
,
"code"
:
"101001"
,
"desc"
:
"OK"
,
"timestamp"
:
1564553326224
,
"data"
:
null
}
\ 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