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
c2c079c7
Commit
c2c079c7
authored
Oct 16, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jiaoneiqunuan' of gitlab2.dui88.com:wanghongyuan/new_taobao into jiaoneiqunuan
parents
d0925085
746c1354
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6603 additions
and
27 deletions
+6603
-27
app.js
taobao_jn/client/app.js
+4
-2
cominvitemodal.js
taobao_jn/client/components/cominvitemodal/cominvitemodal.js
+9
-0
comtask.js
taobao_jn/client/components/comtask/comtask.js
+8
-1
goodsModal.js
taobao_jn/client/components/goodsModal/goodsModal.js
+7
-4
goodsPage.js
taobao_jn/client/pages/goodsPage/goodsPage.js
+38
-19
pagepageindex.js
taobao_jn/client/pages/pagepageindex/pagepageindex.js
+9
-1
debug.log
taobao_jn/debug.log
+6528
-0
No files found.
taobao_jn/client/app.js
View file @
c2c079c7
...
...
@@ -9,7 +9,7 @@ cloud.init({
App
({
env
,
requestType
:
'cloud'
,
// yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
cloudName
:
'jn'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
...
...
@@ -31,7 +31,9 @@ App({
*/
handleQuery
(
query
)
{
const
{
activityId
}
=
query
;
this
.
activityId
=
activityId
||
'5f8550a3964f97be3647a635'
;
// this.activityId = activityId || '5f8550a3964f97be3647a635';
this
.
activityId
=
activityId
||
'5f8831e67389891bfd6bb35f'
;
//赵然1
}
});
taobao_jn/client/components/cominvitemodal/cominvitemodal.js
View file @
c2c079c7
...
...
@@ -33,6 +33,7 @@ Component({
},
/**助力 */
async
doHelp
()
{
my
.
showLoading
();
const
{
success
,
data
,
...
...
@@ -42,13 +43,20 @@ Component({
inviteStep
:
app
.
step
}).
catch
(
r
=>
{
if
(
r
.
data
&&
!
r
.
data
.
isVip
)
{
my
.
hideLoading
();
commonToast
(
"3s入会,即可为好友助力"
,
1500
,
()
=>
{
app
.
isGoVip
=
true
;
navigateToOutside
(
r
.
data
.
url
);
})
}
else
if
(
r
.
data
&&
r
.
data
.
isVip
)
{
my
.
hideLoading
();
this
.
openInviteFailedModal
();
}
else
{
my
.
hideLoading
();
const
{
onCloseModal
}
=
this
.
props
;
onCloseModal
&&
onCloseModal
();
commonToast
(
r
&&
r
.
message
);
}
})
||
{};
...
...
@@ -56,6 +64,7 @@ Component({
if
(
success
)
{
this
.
openInviteSuccessModal
();
}
my
.
hideLoading
();
}
},
...
...
taobao_jn/client/components/comtask/comtask.js
View file @
c2c079c7
...
...
@@ -72,7 +72,8 @@ Component({
const
{
taskType
,
sellerId
,
rewards
rewards
,
todayCompleteTimes
}
=
item
;
const
{
success
,
...
...
@@ -103,7 +104,11 @@ Component({
// }
console
.
log
(
'taskType'
,
taskType
)
// if (taskType == 'invites')
if
(
taskType
==
'collectGoods'
)
{
str
=
`任务完成,增加
${
data
.
addWarms
}
个温暖值`
}
else
{
str
=
`任务完成,增加
${
rewards
}
个温暖值`
}
commonToast
(
str
||
'领取成功'
);
}
/**领取成功,增加温暖值 */
...
...
@@ -152,6 +157,7 @@ Component({
flag
=
0
;
},
async
handleGoColletcGoods
(
itemIds
)
{
this
.
onModalClose
();
my
.
navigateTo
({
url
:
'/pages/goodsPage/goodsPage?taskType=collectGoods&&itemIds='
+
itemIds
})
...
...
@@ -162,6 +168,7 @@ Component({
})
||
{};
},
async
handleGoBrowseGoods
(
itemIds
)
{
this
.
onModalClose
();
my
.
navigateTo
({
url
:
'/pages/goodsPage/goodsPage?taskType=browseGoods&&itemIds='
+
itemIds
})
...
...
taobao_jn/client/components/goodsModal/goodsModal.js
View file @
c2c079c7
...
...
@@ -86,10 +86,13 @@ Component({
})
const
{
itemId
,
url
url
,
collected
}
=
e
.
target
.
dataset
.
item
const
{
onSetCurItemId
}
=
this
.
props
;
onSetCurItemId
&&
onSetCurItemId
(
itemId
);
if
(
!
collected
){
const
{
onSetCurItemId
}
=
this
.
props
;
onSetCurItemId
&&
onSetCurItemId
(
itemId
);
}
// const {
// onSetNotColletArr
// } = this.props;
...
...
@@ -128,7 +131,7 @@ Component({
},
()
=>
{
if
(
this
.
data
.
usePercent
>=
10
)
{
console
.
log
(
this
.
data
.
usePercent
)
this
.
props
.
onCompleteTask
(
taskType
,
1
)
this
.
props
.
onCompleteTask
(
taskType
)
clearInterval
(
this
.
timer
)
}
})
...
...
taobao_jn/client/pages/goodsPage/goodsPage.js
View file @
c2c079c7
...
...
@@ -30,6 +30,7 @@ Page({
collectGoodsArr
:
[],
notCollectGoodsArr
:
[],
curItemId
:
null
,
defaultItemId
:
0
,
data
:
{
query
:
{},
task
:
{},
...
...
@@ -66,25 +67,32 @@ Page({
},
jdgeCollect
(){
console
.
log
(
"判断是否收藏"
)
my
.
tb
.
checkGoodsCollectedStatus
({
id
:
this
.
curItemId
,
success
:
(
res
)
=>
{
const
{
isCollect
,
id
}
=
res
;
if
(
isCollect
){
this
.
onCompleteTask
(
"collectGoods"
,
id
)
console
.
log
(
"收藏成功"
)
}
else
{
let
index
=
this
.
notCollectGoodsArr
.
indexOf
(
this
.
curItemId
)
if
(
index
>=
0
){
my
.
tb
.
checkGoodsCollectedStatus
({
id
:
this
.
curItemId
,
success
:
(
res
)
=>
{
const
{
isCollect
,
id
}
=
res
;
if
(
isCollect
){
this
.
notCollectGoodsArr
.
splice
(
index
,
1
);
this
.
onCompleteTask
(
"collectGoods"
,
this
.
curItemId
)
console
.
log
(
"收藏成功"
)
}
else
{
console
.
log
(
"收藏失败"
,
id
)
}
// my.alert({ content: "success - " + isCollect })
},
fail
:
(
res
)
=>
{
const
{
isCollect
,
id
}
=
res
;
console
.
log
(
"收藏失败"
,
id
)
// my.alert({ content: "fail - " + isCollect })
}
// my.alert({ content: "success - " + isCollect })
},
fail
:
(
res
)
=>
{
const
{
isCollect
,
id
}
=
res
;
console
.
log
(
"收藏失败"
,
id
)
// my.alert({ content: "fail - " + isCollect })
}
})
})
}
else
{
return
;
}
},
init
()
{
const
{
...
...
@@ -167,6 +175,10 @@ Page({
res
&&
commonToast
(
res
)
})
||
{}
if
(
success
)
{
this
.
defaultItemId
=
data
[
0
]?
data
[
0
].
itemId
:
0
;
if
(
taskType
==
'collectGoods'
){
this
.
getNotCollectItem
(
data
);
}
this
.
setData
({
goodsList
:
data
||
[]
})
...
...
@@ -176,6 +188,13 @@ Page({
// this.isCanCompleteCollectTask();
// }
},
getNotCollectItem
(
list
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
!
list
[
i
].
collected
){
this
.
notCollectGoodsArr
.
push
(
list
[
i
].
itemId
);
}
}
},
/**判断收藏商品任务是否完成 */
async
isCanCompleteCollectTask
(
itemId
)
{
// let result = await checkGoodsCollectedStatus(itemId);
...
...
@@ -208,7 +227,7 @@ Page({
success
,
data
}
=
await
API
.
doCollectGoodsTask
({
taskType
,
itemId
itemId
:
itemId
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
...
...
@@ -219,7 +238,7 @@ Page({
case
'browseGoods'
:
let
browsResult
=
await
API
.
doBrowseGoodsTask
({
taskType
,
itemId
itemId
:
this
.
defaultItemId
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
...
...
taobao_jn/client/pages/pagepageindex/pagepageindex.js
View file @
c2c079c7
...
...
@@ -33,6 +33,7 @@ Page({
gameConfigList
:
{},
favoredStatus
:
false
,
goVip
:
false
,
start
:
false
,
data
:
{
indexPrize
:
[{
id
:
1
,
...
...
@@ -309,6 +310,7 @@ Page({
})
}
this
.
canOpenGamePage
=
true
;
this
.
start
=
true
;
my
.
hideLoading
();
}
...
...
@@ -317,6 +319,7 @@ Page({
/**进入游戏页面 */
async
openGamePage
()
{
if
(
!
this
.
canOpenGamePage
)
return
;
this
.
canOpenGamePage
=
false
my
.
showLoading
();
const
{
success
,
...
...
@@ -327,14 +330,17 @@ Page({
}).
catch
(
r
=>
{
if
(
r
&&
r
.
data
&&
!
r
.
data
.
isVip
)
{
commonToast
(
"3s入会,即可为好友助力"
,
1500
,
()
=>
{
this
.
canOpenGamePage
=
true
;
navigateToOutside
(
r
.
data
.
url
);
})
}
else
{
this
.
canOpenGamePage
=
true
;
commonToast
(
r
&&
r
.
message
)
}
my
.
hideLoading
();
})
||
{};
if
(
success
)
{
this
.
canOpenGamePage
=
true
;
const
winRate
=
this
.
gameConfigList
[
this
.
data
.
curGameStep
-
1
].
winRate
*
0.01
;
const
propsCD
=
this
.
gameConfigList
[
this
.
data
.
curGameStep
-
1
].
propsCD
;
my
.
redirectTo
({
...
...
@@ -344,13 +350,14 @@ Page({
})
my
.
hideLoading
();
}
else
{
}
console
.
log
(
"点击进入游戏页面"
)
},
/**打开弹窗 */
openModal
(
e
)
{
if
(
!
this
.
start
)
return
;
console
.
log
(
e
);
const
{
item
...
...
@@ -367,6 +374,7 @@ Page({
},
/**点击跳转页面 */
navigateTo
(
e
)
{
if
(
!
this
.
start
)
return
;
const
{
item
}
=
e
.
target
.
dataset
;
...
...
taobao_jn/debug.log
View file @
c2c079c7
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