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
ac49b1e2
Commit
ac49b1e2
authored
Oct 17, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
70019c6d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
61 deletions
+93
-61
api.js
taobao_mini/client/api.js
+5
-0
comattion_dan_chuang.axml
...components/comattion_dan_chuang/comattion_dan_chuang.axml
+1
-1
comattion_dan_chuang.js
...t/components/comattion_dan_chuang/comattion_dan_chuang.js
+58
-35
pageshou_ye.axml
taobao_mini/client/pages/pageshou_ye/pageshou_ye.axml
+1
-1
pageshou_ye.js
taobao_mini/client/pages/pageshou_ye/pageshou_ye.js
+28
-24
No files found.
taobao_mini/client/api.js
View file @
ac49b1e2
...
@@ -106,6 +106,11 @@ const apiList = {
...
@@ -106,6 +106,11 @@ const apiList = {
handle
:
'notification'
,
handle
:
'notification'
,
method
:
'post'
,
method
:
'post'
,
isShowLoading
:
false
isShowLoading
:
false
},
addStat
:{
handle
:
'addStat'
,
method
:
'post'
,
isShowLoading
:
false
}
}
};
};
...
...
taobao_mini/client/components/comattion_dan_chuang/comattion_dan_chuang.axml
View file @
ac49b1e2
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
<image class="prizeimg" src="{{prizeimg}}" style="top:{{prizetop}}" />
<image class="prizeimg" src="{{prizeimg}}" style="top:{{prizetop}}" />
<rich-text nodes="{{subtit}}" class="attiontxt1"></rich-text>
<rich-text nodes="{{subtit}}" class="attiontxt1"></rich-text>
<image class="kai_xin_shou_xia btnclickStyle" a:if="{{btntype==1}}" src={{resList['8f03f3b2-3ac3-4f5a-8c86-1ca251174f3a'].url}} onTap="on
Clos
e" />
<image class="kai_xin_shou_xia btnclickStyle" a:if="{{btntype==1}}" src={{resList['8f03f3b2-3ac3-4f5a-8c86-1ca251174f3a'].url}} onTap="on
JumpPrizePag
e" />
<image class="li_ji_chou_jiang btnclickStyle" a:if="{{btntype==2}}" src={{resList['07579ad9-d3d4-410a-a95f-0683d9bdda8c'].url}} onTap="onOpenJlGift" />
<image class="li_ji_chou_jiang btnclickStyle" a:if="{{btntype==2}}" src={{resList['07579ad9-d3d4-410a-a95f-0683d9bdda8c'].url}} onTap="onOpenJlGift" />
</view>
</view>
\ No newline at end of file
taobao_mini/client/components/comattion_dan_chuang/comattion_dan_chuang.js
View file @
ac49b1e2
'use strict'
;
'use strict'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
import
resList
from
'../../resconfig/resList'
;
import
resList
from
'../../resconfig/resList'
;
import
API
from
'/api'
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
,
getSystemInfo
,
getServerTime
}
=
tbcc
.
tb
;
Component
({
Component
({
props
:
{},
props
:
{},
data
:
{
data
:
{
resList
:
resList
,
resList
:
resList
,
tit
:
""
,
tit
:
""
,
subtit
:[],
subtit
:
[],
prizeimg
:
""
,
prizeimg
:
""
,
prizename
:
""
,
prizename
:
""
,
prizetype
:
""
,
prizetype
:
""
,
btntype
:
1
,
//开心收下,2立即抽奖
btntype
:
1
,
//开心收下,2立即抽奖
prizetop
:
"220rpx"
prizetop
:
"220rpx"
},
},
methods
:
{
methods
:
{
onClose
()
{
onClose
()
{
const
{
onClose
}
=
this
.
props
;
const
{
onClose
}
=
this
.
props
;
onClose
&&
onClose
();
onClose
&&
onClose
();
},
},
//领取奖励
async
getPrize
()
{
const
{
prizetype
,
prizeid
}
=
this
.
props
;
if
(
prizetype
&&
prizetype
==
1
&&
prizeid
)
{
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
id
:
prizeid
}).
catch
(
res
=>
{
// commonToast(res && res.message)
})
||
{};
if
(
success
&&
data
)
{
// commonToast('领取成功')
}
}
},
//关闭弹窗,进入奖品页
onJumpPrizePage
()
{
this
.
onClose
();
my
.
navigateTo
({
url
:
'/pages/myprize/myprize'
});
},
//立即抽奖
//立即抽奖
onOpenJlGift
()
{
onOpenJlGift
()
{
this
.
onClose
();
this
.
onClose
();
...
@@ -26,49 +49,49 @@ Component({
...
@@ -26,49 +49,49 @@ Component({
}
}
},
},
didMount
()
{
didMount
()
{
let
{
prizeimg
,
prizename
,
prizetype
,
btntype
,
attionfrom
}
=
this
.
props
;
let
{
prizeimg
,
prizename
,
prizetype
,
btntype
,
attionfrom
}
=
this
.
props
;
//tit=== 特步减震旋系列新品一双
//tit=== 特步减震旋系列新品一双
// subtit== 请至“我的奖品”处查看
// subtit== 请至“我的奖品”处查看
let
tit
=
""
;
let
tit
=
""
;
if
(
attionfrom
==
"gift"
)
{
if
(
attionfrom
==
"gift"
)
{
tit
=
"获得抽取年度人气锦鲤大奖的机会
\n
快去抽奖吧"
;
tit
=
"获得抽取年度人气锦鲤大奖的机会
\n
快去抽奖吧"
;
}
else
if
(
attionfrom
==
"prize"
)
{
}
else
if
(
attionfrom
==
"prize"
)
{
tit
=
"获得了"
+
prizename
;
tit
=
"获得了"
+
prizename
;
}
}
this
.
getPrize
();
let
subtit
=
[];
let
subtit
=
[];
let
prizetop
=
"275rpx"
;
let
prizetop
=
"275rpx"
;
if
(
btntype
==
1
)
{
if
(
btntype
==
1
)
{
prizetop
=
"220rpx"
;
prizetop
=
"220rpx"
;
subtit
=
[
subtit
=
[
{
{
name
:
"label"
,
name
:
"label"
,
attrs
:{
attrs
:
{
style
:
"color:#000000"
style
:
"color:#000000"
},
},
children
:[{
children
:
[{
type
:
"text"
,
type
:
"text"
,
text
:
"请至“"
text
:
"请至“"
}]
}]
},
},
{
{
name
:
"label"
,
name
:
"label"
,
attrs
:{
attrs
:
{
style
:
"color:#cc3333"
style
:
"color:#cc3333"
},
},
children
:[{
children
:
[{
type
:
"text"
,
type
:
"text"
,
text
:
"我的奖品"
text
:
"我的奖品"
}]
}]
},
},
{
{
name
:
"label"
,
name
:
"label"
,
attrs
:{
attrs
:
{
style
:
"color:#000000"
style
:
"color:#000000"
},
},
children
:[{
children
:
[{
type
:
"text"
,
type
:
"text"
,
text
:
"”处查看奖品"
text
:
"”处查看奖品"
}]
}]
}
}
]
]
...
@@ -80,10 +103,10 @@ Component({
...
@@ -80,10 +103,10 @@ Component({
prizeimg
:
prizeimg
,
prizeimg
:
prizeimg
,
prizename
:
prizename
,
prizename
:
prizename
,
prizetype
:
prizetype
,
prizetype
:
prizetype
,
tit
:
tit
,
tit
:
tit
,
subtit
:
subtit
,
subtit
:
subtit
,
btntype
:
btntype
,
btntype
:
btntype
,
prizetop
:
prizetop
,
prizetop
:
prizetop
,
});
});
}
}
...
...
taobao_mini/client/pages/pageshou_ye/pageshou_ye.axml
View file @
ac49b1e2
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
<!-- <ani-modal a:if="{{showani}}"></ani-modal> -->
<!-- <ani-modal a:if="{{showani}}"></ani-modal> -->
<rule-modal a:if="{{rule_v}}" onClose="closeRule" ruletxt={{rule}}></rule-modal>
<rule-modal a:if="{{rule_v}}" onClose="closeRule" ruletxt={{rule}}></rule-modal>
<rank-modal a:if="{{rank_v}}" onClose="closeRank"></rank-modal>
<rank-modal a:if="{{rank_v}}" onClose="closeRank"></rank-modal>
<attion-modal a:if="{{attion_v}}" onClose="closeAttion" onOpenJlGift="onOpenJlGift" prizeimg="{{prizeimg}}" prizename="{{prizename}}" prizetype="{{prizetype}}" btntype="{{prizebtntype}}" attionfrom="{{attionfrom}}"></attion-modal>
<attion-modal a:if="{{attion_v}}" onClose="closeAttion" onOpenJlGift="onOpenJlGift" prizeimg="{{prizeimg}}" prizename="{{prizename}}" prizetype="{{prizetype}}"
prizeid="{{prizeid}}"
btntype="{{prizebtntype}}" attionfrom="{{attionfrom}}"></attion-modal>
<info-modal a:if="{{info_v}}" onClose="closeInfo" onShareFriends="onShareSp" infobtntype="{{infobtntype}}" infotopshow="{{infotopshow}}" infotit="{{infotit}}"></info-modal>
<info-modal a:if="{{info_v}}" onClose="closeInfo" onShareFriends="onShareSp" infobtntype="{{infobtntype}}" infotopshow="{{infotopshow}}" infotit="{{infotit}}"></info-modal>
<sp-modal a:if="{{sp_v}}" onClose="closeSp" onCollectSp="onCollectSp" onShareSp="onShareSp" onJoinGame="onJoinGame" onJoinVip="onJoinVip" onCheckJoinVip="checkJoinVip" onUpdateUinfo="getUserCardInfo" cardType={{cardType}} shoesName={{shoesName}} israre={{israre}} btntype={{btntype}} spimg={{spimg}} nearchashare={{nearchashare}} nearchaprize={{nearchaprize}} ></sp-modal>
<sp-modal a:if="{{sp_v}}" onClose="closeSp" onCollectSp="onCollectSp" onShareSp="onShareSp" onJoinGame="onJoinGame" onJoinVip="onJoinVip" onCheckJoinVip="checkJoinVip" onUpdateUinfo="getUserCardInfo" cardType={{cardType}} shoesName={{shoesName}} israre={{israre}} btntype={{btntype}} spimg={{spimg}} nearchashare={{nearchashare}} nearchaprize={{nearchaprize}} ></sp-modal>
<gift-modal a:if="{{gift_v}}" onClose="closeGift" onOpenGift="getOpenNgift"></gift-modal>
<gift-modal a:if="{{gift_v}}" onClose="closeGift" onOpenGift="getOpenNgift"></gift-modal>
...
...
taobao_mini/client/pages/pageshou_ye/pageshou_ye.js
View file @
ac49b1e2
...
@@ -88,6 +88,7 @@ Page({
...
@@ -88,6 +88,7 @@ Page({
prizeimg
:
""
,
prizeimg
:
""
,
prizename
:
""
,
prizename
:
""
,
prizetype
:
""
,
prizetype
:
""
,
prizeid
:
""
,
prizebtntype
:
1
,
prizebtntype
:
1
,
attionfrom
:
""
,
//啥功能gift--人气抽奖,prize--中奖弹窗
attionfrom
:
""
,
//啥功能gift--人气抽奖,prize--中奖弹窗
//info弹窗
//info弹窗
...
@@ -107,9 +108,9 @@ Page({
...
@@ -107,9 +108,9 @@ Page({
},
},
onLoad
(
query
)
{
onLoad
(
query
)
{
console
.
log
(
"onLoad======>"
,
query
);
console
.
log
(
"onLoad======>"
,
query
);
if
(
query
)
{
if
(
query
)
{
if
(
query
.
inviteId
)
{
if
(
query
.
inviteId
)
{
app
.
inviteId
=
query
.
inviteId
;
app
.
inviteId
=
query
.
inviteId
;
...
@@ -246,7 +247,7 @@ Page({
...
@@ -246,7 +247,7 @@ Page({
// });
// });
console
.
log
(
123
)
console
.
log
(
123
)
try
{
try
{
var
canvas
=
await
new
Promise
((
r
)
=>
{
var
canvas
=
await
new
Promise
((
r
)
=>
{
my
.
createCanvas
({
my
.
createCanvas
({
id
:
'canvas'
,
id
:
'canvas'
,
...
@@ -255,7 +256,7 @@ Page({
...
@@ -255,7 +256,7 @@ Page({
const
windowWidth
=
my
.
getSystemInfoSync
().
windowWidth
;
const
windowWidth
=
my
.
getSystemInfoSync
().
windowWidth
;
const
windowHeight
=
my
.
getSystemInfoSync
().
windowHeight
;
const
windowHeight
=
my
.
getSystemInfoSync
().
windowHeight
;
ccc
.
width
=
windowWidth
*
dpr
+
dpr
;
//重新修改会有误差
ccc
.
width
=
windowWidth
*
dpr
+
dpr
;
//重新修改会有误差
ccc
.
height
=
ccc
.
width
/
750
*
1624
;
ccc
.
height
=
ccc
.
width
/
750
*
1624
;
r
(
ccc
);
r
(
ccc
);
},
},
fail
:
()
=>
{
fail
:
()
=>
{
...
@@ -263,7 +264,7 @@ Page({
...
@@ -263,7 +264,7 @@ Page({
}
}
})
})
})
})
if
(
!
canvas
)
{
if
(
!
canvas
)
{
return
;
return
;
}
}
console
.
log
(
111
)
console
.
log
(
111
)
...
@@ -277,7 +278,7 @@ Page({
...
@@ -277,7 +278,7 @@ Page({
// sysInfo && sysInfo.windowWidth || document.body.clientWidth,
// sysInfo && sysInfo.windowWidth || document.body.clientWidth,
// sysInfo && sysInfo.windowHeight || document.body.clientHeight,
// sysInfo && sysInfo.windowHeight || document.body.clientHeight,
sysInfo
.
windowWidth
,
sysInfo
.
windowWidth
,
sysInfo
.
windowWidth
/
750
*
1624
,
sysInfo
.
windowWidth
/
750
*
1624
,
FYGE
.
RENDERER_TYPE
.
CANVAS
FYGE
.
RENDERER_TYPE
.
CANVAS
);
);
var
con
=
stage
.
addChild
(
new
FYGE
.
Container
())
var
con
=
stage
.
addChild
(
new
FYGE
.
Container
())
...
@@ -401,11 +402,11 @@ Page({
...
@@ -401,11 +402,11 @@ Page({
this
.
setData
({
this
.
setData
({
showani
:
true
showani
:
true
});
});
if
(
this
.
whateani
)
{
if
(
this
.
whateani
)
{
FYGE
.
Tween
.
removeTweens
(
this
.
whateani
);
FYGE
.
Tween
.
removeTweens
(
this
.
whateani
);
this
.
whateani
.
play
(
1
);
this
.
whateani
.
play
(
1
);
}
}
// this.postMessage("playcardani", null);
// this.postMessage("playcardani", null);
},
},
/**
/**
...
@@ -933,7 +934,7 @@ Page({
...
@@ -933,7 +934,7 @@ Page({
}
}
this
.
changeBtnReady
(
false
);
this
.
changeBtnReady
(
false
);
if
(
!
app
.
inviteId
)
return
;
if
(
!
app
.
inviteId
)
return
;
commonToast
(
'正在发起助力~'
)
//
commonToast('正在发起助力~')
const
{
const
{
success
,
success
,
data
,
data
,
...
@@ -1053,7 +1054,7 @@ Page({
...
@@ -1053,7 +1054,7 @@ Page({
closeSp
()
{
closeSp
()
{
this
.
setData
({
this
.
setData
({
sp_v
:
false
,
sp_v
:
false
,
showani
:
false
showani
:
false
});
});
this
.
showDialog
(
false
);
this
.
showDialog
(
false
);
},
},
...
@@ -1140,6 +1141,7 @@ Page({
...
@@ -1140,6 +1141,7 @@ Page({
if
(
!
cancontinue
)
{
if
(
!
cancontinue
)
{
return
false
;
return
false
;
}
}
this
.
changeBtnReady
(
false
);
// console.log("点击集碎片");
// console.log("点击集碎片");
let
drawTimes
=
this
.
data
.
drawTimes
;
let
drawTimes
=
this
.
data
.
drawTimes
;
...
@@ -1156,9 +1158,12 @@ Page({
...
@@ -1156,9 +1158,12 @@ Page({
infotit
:
infotit
//"今日免费次数已用完\n再召唤x位好友就能获得xxx"
infotit
:
infotit
//"今日免费次数已用完\n再召唤x位好友就能获得xxx"
});
});
this
.
openInfo
();
this
.
openInfo
();
setTimeout
(()
=>
{
this
.
changeBtnReady
(
true
);
},
1000
);
return
;
return
;
}
}
this
.
changeBtnReady
(
false
);
let
docardata
=
await
API
.
doCardDraw
().
catch
(
res
=>
{
let
docardata
=
await
API
.
doCardDraw
().
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
})
||
{};
})
||
{};
...
@@ -1187,7 +1192,7 @@ Page({
...
@@ -1187,7 +1192,7 @@ Page({
});
});
this
.
showDialog
(
true
);
this
.
showDialog
(
true
);
// try {
// try {
this
.
onStartAni
();
this
.
onStartAni
();
// } catch (e) {
// } catch (e) {
// }
// }
...
@@ -1202,7 +1207,9 @@ Page({
...
@@ -1202,7 +1207,9 @@ Page({
// });
// });
// }, 1000);
// }, 1000);
}
}
setTimeout
(()
=>
{
this
.
changeBtnReady
(
true
);
},
1000
);
},
},
/**
/**
* 再抽一次
* 再抽一次
...
@@ -1299,11 +1306,12 @@ Page({
...
@@ -1299,11 +1306,12 @@ Page({
showPrizePage
(
success
,
data
,
atype
=
"prize"
)
{
showPrizePage
(
success
,
data
,
atype
=
"prize"
)
{
if
(
success
)
{
if
(
success
)
{
//中奖了
//中奖了
let
{
name
,
type
,
image
}
=
data
;
let
{
name
,
type
,
image
,
id
}
=
data
;
this
.
setData
({
this
.
setData
({
prizeimg
:
image
,
prizeimg
:
image
,
prizename
:
name
,
prizename
:
name
,
prizetype
:
type
,
prizetype
:
type
,
prizeid
:
id
||
0
,
prizebtntype
:
1
,
prizebtntype
:
1
,
attionfrom
:
"prize"
,
attionfrom
:
"prize"
,
});
});
...
@@ -1552,15 +1560,11 @@ Page({
...
@@ -1552,15 +1560,11 @@ Page({
},
},
//埋点
//埋点
addStat
(
type
)
{
addStat
(
type
)
{
try
{
API
.
addStat
({
API
.
addStat
({
type
:
type
type
:
type
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
console
.
error
(
res
);
});
});
}
catch
(
e
)
{
}
},
},
//修改按钮点击
//修改按钮点击
changeBtnReady
(
_v
)
{
changeBtnReady
(
_v
)
{
...
...
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