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
d8a47ae5
Commit
d8a47ae5
authored
Sep 29, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tianmaoxiaoyuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into tianmaoxiaoyuan
parents
d502e8ac
68ca898c
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
26410 additions
and
40 deletions
+26410
-40
output.js
project/src/canvas/game/output.js
+3
-0
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+3
-0
Ins.ts
project/src/canvas/game/src/Ins.ts
+2
-1
MainScene.ts
project/src/canvas/game/src/scenes/MainScene.ts
+5
-2
comcatname.acss
taobao_mini/client/components/comcatname/comcatname.acss
+9
-0
comcatname.axml
taobao_mini/client/components/comcatname/comcatname.axml
+3
-2
comcatname.js
taobao_mini/client/components/comcatname/comcatname.js
+28
-10
comrecallcat.axml
taobao_mini/client/components/comrecallcat/comrecallcat.axml
+1
-1
comrecallcat.js
taobao_mini/client/components/comrecallcat/comrecallcat.js
+26
-22
output.js
taobao_mini/client/pages/pagecanvas/output.js
+3
-0
pagecanvas.axml
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
+1
-1
pagecanvasoutput.js
taobao_mini/client/pages/pagecanvasoutput.js
+3
-0
resList.js
taobao_mini/client/resconfig/resList.js
+6
-0
debug.log
taobao_mini/debug.log
+26316
-0
No files found.
project/src/canvas/game/output.js
View file @
d8a47ae5
...
...
@@ -46956,6 +46956,7 @@ var MainScene = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
that.letter.visible = true;
that.initRecallCatTimer();
}
};
MainScene.prototype.initRecallCatTimer = function () {
...
...
@@ -47171,6 +47172,8 @@ var MainScene = (function (_super) {
Ins_1.Ins.senceInfo = r.data;
if (r.data.sence < 4) {
Ins_1.Ins.catIsOut = false;
clearTimeout(that.recallTimer);
console.log("删除召回倒计时", that.recallTimer);
that.letter.visible = false;
if (r.data.sence == 3) {
that.cat.visible = true;
project/src/canvas/game/output.js.map
View file @
d8a47ae5
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
d8a47ae5
...
...
@@ -46958,6 +46958,7 @@ var MainScene = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
that.letter.visible = true;
that.initRecallCatTimer();
}
};
MainScene.prototype.initRecallCatTimer = function () {
...
...
@@ -47173,6 +47174,8 @@ var MainScene = (function (_super) {
Ins_1.Ins.senceInfo = r.data;
if (r.data.sence < 4) {
Ins_1.Ins.catIsOut = false;
clearTimeout(that.recallTimer);
console.log("删除召回倒计时", that.recallTimer);
that.letter.visible = false;
if (r.data.sence == 3) {
that.cat.visible = true;
project/src/canvas/game/src/Ins.ts
View file @
d8a47ae5
...
...
@@ -33,7 +33,8 @@ export class Ins {
"senceTips"
:
string
[],
//场景互动文案(猫咪说话)
"energyMax"
:
number
,
"experienceMax"
:
number
,
"senceGuide"
:
boolean
"senceGuide"
:
boolean
,
"lastEnergyTime"
:
number
}
...
...
project/src/canvas/game/src/scenes/MainScene.ts
View file @
d8a47ae5
...
...
@@ -49,6 +49,8 @@ export class MainScene extends Scene {
/**场景引导 */
private
Guide
:
Guide
;
/**是否是重新进入游戏场景 */
initUi
()
{
var
that
=
this
;
that
.
initSceneEle
();
...
...
@@ -112,7 +114,7 @@ export class MainScene extends Scene {
//当猫出走的时候,隐藏猫咪,创建信封
that
.
letter
.
visible
=
true
;
//
that.initRecallCatTimer()
that
.
initRecallCatTimer
()
}
}
...
...
@@ -354,7 +356,8 @@ export class MainScene extends Scene {
Ins
.
senceInfo
=
r
.
data
;
if
(
r
.
data
.
sence
<
4
)
{
Ins
.
catIsOut
=
false
;
// clearTimeout(that.recallTimer)
clearTimeout
(
that
.
recallTimer
)
console
.
log
(
"删除召回倒计时"
,
that
.
recallTimer
)
that
.
letter
.
visible
=
false
;
if
(
r
.
data
.
sence
==
3
)
{
that
.
cat
.
visible
=
true
;
...
...
taobao_mini/client/components/comcatname/comcatname.acss
View file @
d8a47ae5
...
...
@@ -51,6 +51,15 @@
position: absolute;
transform-origin: 50% 50% 0rpx;
}
.catname .catnameNo {
width: 282rpx;
height: 106rpx;
opacity: 1;
left: 111rpx;
top: 736rpx;
position: absolute;
transform-origin: 50% 50% 0rpx;
}
.catname .catnameinput {
width: 500rpx;
height: 147rpx;
...
...
taobao_mini/client/components/comcatname/comcatname.axml
View file @
d8a47ae5
...
...
@@ -4,10 +4,11 @@
<image class="catnamedialogbg" src={{resList['50779aee-069e-4dd9-b2ff-88beda9f43d1'].url}} />
<label class="catnamedialoglabel">铲屎官~帮我取个名字吧!喵~</label>
</view>
<image class="catnamesure btn" onTap="catNameSure" src={{resList['c7916d41-ea9d-4f8e-b5aa-e2060d6ae265'].url}} />
<image class="catnamesure btn" a:if="{{btnV}}" onTap="catNameSure" src={{resList['c7916d41-ea9d-4f8e-b5aa-e2060d6ae265'].url}} />
<image class="catnameNo" a:if="{{!btnV}}" src={{resList['3fe9ac60-f1aa-4da3-93da-c67e5a9dc3a6'].url}} />
<view class="catnameinput">
<image class="catnameinputbg" src={{resList['947d970f-52bf-4319-82f0-a3e65620ed75'].url}} />
<input class="catnameinputlabel" maxlength="6" on
Focus="getCatName" onInput="getCatName" onConfirm="getCatName" onBlur="getCatName" value="{{catName
}}" placeholder="输入名字" name="" ></input>
<input class="catnameinputlabel" maxlength="6" on
Input="getCatName" controlled="true" value="{{catNameText
}}" placeholder="输入名字" name="" ></input>
<text class="catnameinputrandom" onTap="randomName" >随机名字</text>
</view>
</view>
taobao_mini/client/components/comcatname/comcatname.js
View file @
d8a47ae5
...
...
@@ -15,13 +15,16 @@ const {
Component
({
props
:
{
//catImgArr: ["90b114e6-83cb-46f1-b607-f88c50077b05", "4e471df6-01ab-421d-ba0b-084b2110dc6d", "003e9904-aee4-4b8d-8d5d-fb4b1188bec1", "90283bd3-4b18-4535-97a8-90318f068781"],
catImgArr
:
[
"3e6311fd-15ab-4656-bb84-1c49f4ad4ed9"
,
"bbb10ff2-f4fb-43a8-83d8-abbb04949f2d"
,
"9fc6517e-debe-4457-88ef-9c733d5bc072"
,
"ecb49f23-2e65-4507-8be6-1eee021a3b35"
],
catImgArr
:
[
"3e6311fd-15ab-4656-bb84-1c49f4ad4ed9"
,
"bbb10ff2-f4fb-43a8-83d8-abbb04949f2d"
,
"9fc6517e-debe-4457-88ef-9c733d5bc072"
,
"ecb49f23-2e65-4507-8be6-1eee021a3b35"
],
catName
:
""
},
data
:
{
resList
:
resList
,
catName
:
""
,
catImg
:
""
catNameText
:
""
,
catImg
:
""
,
btnV
:
false
,
isControlled
:
false
},
methods
:
{
/**获取字符串字符长度 */
...
...
@@ -54,22 +57,37 @@ Component({
console
.
log
(
"随即名字"
)
let
name
=
"Edwise"
this
.
setData
({
catName
:
name
catName
Text
:
name
})
this
.
props
.
catName
=
name
;
},
this
.
setCatName
(
name
);
},
/**获取名字 */
getCatName
(
e
)
{
// console.log(e.detail.value)
this
.
props
.
catName
=
e
.
detail
.
value
;
// console.log(this.props.catName)
this
.
setData
({
catNameText
:
e
.
detail
.
value
})
console
.
log
(
"input"
,
e
)
this
.
setCatName
(
e
.
detail
.
value
)
},
/**设置名字 */
setCatName
(
name
)
{
this
.
props
.
catName
=
name
;
if
(
this
.
props
.
catName
&&
this
.
props
.
catName
.
length
>
0
)
{
this
.
setData
({
btnV
:
true
})
}
else
{
this
.
setData
({
btnV
:
false
})
}
},
/**确认领养 */
async
catNameSure
()
{
let
name
=
this
.
props
.
catName
;
let
len
=
this
.
getlen
(
name
);
console
.
log
(
"名称字符长度"
,
len
)
console
.
log
(
"名称字符长度"
,
len
)
if
(
len
<=
0
)
{
my
.
showToast
({
content
:
"名字不能为空哦"
,
...
...
taobao_mini/client/components/comrecallcat/comrecallcat.axml
View file @
d8a47ae5
...
...
@@ -4,7 +4,7 @@
<label class="recallcathappycoin">{{happyCoinCnt}}</label>
<view class="recallbtngroup">
<image class="recallbtncancel btn" onTap="onModalClose" src={{resList['6957d9f3-9aa4-4ed6-9b83-57cc68f16512'].url}} />
<image class="recallbtngo btn" disable="{{btnEnable}}" onTap="onRecallCat" src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
<image class="recallbtngo btn" disable
d
="{{btnEnable}}" onTap="onRecallCat" src={{resList['6d8cdd11-fbc5-4e84-b5ef-1f74c9070738'].url}} />
</view>
<image class="recallbtnclose" onTap="onModalClose" src={{resList['29e80fbb-98ed-40fb-a11b-e14b45fee158'].url}} />
</view>
taobao_mini/client/components/comrecallcat/comrecallcat.js
View file @
d8a47ae5
...
...
@@ -3,17 +3,21 @@
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
commonToast
}
=
tbcc
.
tb
;
const
{
tbcc
}
=
app
;
const
{
commonToast
}
=
tbcc
.
tb
;
Component
({
props
:
{
mydata
:
null
mydata
:
null
},
data
:
{
resList
:
resList
,
timeText
:
''
,
happyCoinCnt
:
''
,
btnEnable
:
true
btnEnable
:
true
},
methods
:
{
onModalClose
()
{
...
...
@@ -33,7 +37,7 @@ Component({
let
hours
=
date
.
getHours
();
let
minutes
=
date
.
getMinutes
();;
let
seconds
=
date
.
getSeconds
();
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
// if (seconds <= 0) {
...
...
@@ -55,11 +59,11 @@ Component({
},
/**计算两个时间戳相差的时间,小时,分,秒 */
compareTime
(
startTime
,
endTime
)
{
let
between
=
(
endTime
-
startTime
)
/
1000
;
let
hours
=
Math
.
floor
(
between
%
(
24
*
36000
)
/
3600
);
let
minutes
=
Math
.
floor
(
between
%
3600
/
60
);
let
seconds
=
Math
.
floor
(
between
%
60
/
60
);
compareTime
(
startTime
,
endTime
)
{
let
between
=
(
endTime
-
startTime
)
/
1000
;
let
hours
=
Math
.
floor
(
between
%
(
24
*
36000
)
/
3600
);
let
minutes
=
Math
.
floor
(
between
%
3600
/
60
);
let
seconds
=
Math
.
floor
(
between
%
60
/
60
);
let
date
;
if
(
hours
<=
0
)
{
if
(
minutes
<=
0
)
{
...
...
@@ -81,14 +85,14 @@ Component({
/**召回猫,打开召回猫的奖励弹窗 */
async
onRecallCat
()
{
if
(
!
this
.
data
.
btnEnable
)
return
;
// if
(!this.data.btnEnable) return;
console
.
log
(
"召回猫"
)
my
.
__clickDelay__
(
this
);
//
my.__clickDelay__(this);
my
.
showLoading
();
const
recallCat
=
await
API
.
recallCat
().
catch
(
r
=>
{
const
recallCat
=
await
API
.
recallCat
().
catch
(
r
=>
{
my
.
hideLoading
();
commonToast
(
r
&&
r
.
message
);
})
||
{};
commonToast
(
r
&&
r
.
message
);
})
||
{};
if
(
recallCat
&&
recallCat
.
success
)
{
my
.
hideLoading
();
this
.
onModalClose
();
...
...
@@ -96,8 +100,8 @@ Component({
onRecallCat
}
=
this
.
props
;
onRecallCat
&&
onRecallCat
(
recallCat
.
data
);
}
}
}
},
...
...
@@ -108,11 +112,11 @@ Component({
// })||{};
// console.log(recall);
// if (recall && recall.success) {
var
text
=
"猫咪预计"
+
this
.
compareTime
(
this
.
props
.
mydata
.
recallInfo
.
serverTime
,
this
.
props
.
mydata
.
recallInfo
.
backTime
)
+
"后回寝"
;
this
.
setData
({
timeText
:
text
,
happyCoinCnt
:
this
.
props
.
mydata
.
recallInfo
.
value
+
''
})
var
text
=
"猫咪预计"
+
this
.
compareTime
(
this
.
props
.
mydata
.
recallInfo
.
serverTime
,
this
.
props
.
mydata
.
recallInfo
.
backTime
)
+
"后回寝"
;
this
.
setData
({
timeText
:
text
,
happyCoinCnt
:
this
.
props
.
mydata
.
recallInfo
.
value
+
''
})
// }
}
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
d8a47ae5
...
...
@@ -46958,6 +46958,7 @@ var MainScene = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
that.letter.visible = true;
that.initRecallCatTimer();
}
};
MainScene.prototype.initRecallCatTimer = function () {
...
...
@@ -47173,6 +47174,8 @@ var MainScene = (function (_super) {
Ins_1.Ins.senceInfo = r.data;
if (r.data.sence < 4) {
Ins_1.Ins.catIsOut = false;
clearTimeout(that.recallTimer);
console.log("删除召回倒计时", that.recallTimer);
that.letter.visible = false;
if (r.data.sence == 3) {
that.cat.visible = true;
taobao_mini/client/pages/pagecanvas/pagecanvas.axml
View file @
d8a47ae5
<view disable-scroll="true" class="page-game">
<canvas disable-scroll="true" id="canvas"
type="webgl"
class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
<canvas disable-scroll="true" id="canvas" class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
</canvas>
</view>
...
...
taobao_mini/client/pages/pagecanvasoutput.js
View file @
d8a47ae5
...
...
@@ -46958,6 +46958,7 @@ var MainScene = (function (_super) {
if (Ins_1.Ins.catIsOut) {
that.cat.visible = false;
that.letter.visible = true;
that.initRecallCatTimer();
}
};
MainScene.prototype.initRecallCatTimer = function () {
...
...
@@ -47173,6 +47174,8 @@ var MainScene = (function (_super) {
Ins_1.Ins.senceInfo = r.data;
if (r.data.sence < 4) {
Ins_1.Ins.catIsOut = false;
clearTimeout(that.recallTimer);
console.log("删除召回倒计时", that.recallTimer);
that.letter.visible = false;
if (r.data.sence == 3) {
that.cat.visible = true;
taobao_mini/client/resconfig/resList.js
View file @
d8a47ae5
...
...
@@ -562,6 +562,12 @@ const resList = {
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/catMessageBg.e74d2bf93254933a994d05aa9ce29f9e3914c149.png'
,
uuid
:
'fc1fd3ee-e606-46de-9bb6-ea5fb41567df'
},
'3fe9ac60-f1aa-4da3-93da-c67e5a9dc3a6'
:
{
name
:
'catNameBtnGray'
,
ext
:
'.png'
,
url
:
'//yun.duiba.com.cn/spark/assets/catNameBtnGray.954587775085edff2210de9ab0d7ca1ef9e34e4e.png'
,
uuid
:
'3fe9ac60-f1aa-4da3-93da-c67e5a9dc3a6'
}
};
export
default
resList
;
taobao_mini/debug.log
View file @
d8a47ae5
This diff is collapsed.
Click to expand it.
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