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({
...
@@ -9,7 +9,7 @@ cloud.init({
App
({
App
({
env
,
env
,
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'cloud'
,
// yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
cloudName
:
'jn'
,
// 主云函数项目名 tmallCat
cloudName
:
'jn'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
cloud
,
...
@@ -31,7 +31,9 @@ App({
...
@@ -31,7 +31,9 @@ App({
*/
*/
handleQuery
(
query
)
{
handleQuery
(
query
)
{
const
{
activityId
}
=
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({
...
@@ -33,6 +33,7 @@ Component({
},
},
/**助力 */
/**助力 */
async
doHelp
()
{
async
doHelp
()
{
my
.
showLoading
();
const
{
const
{
success
,
success
,
data
,
data
,
...
@@ -42,13 +43,20 @@ Component({
...
@@ -42,13 +43,20 @@ Component({
inviteStep
:
app
.
step
inviteStep
:
app
.
step
}).
catch
(
r
=>
{
}).
catch
(
r
=>
{
if
(
r
.
data
&&
!
r
.
data
.
isVip
)
{
if
(
r
.
data
&&
!
r
.
data
.
isVip
)
{
my
.
hideLoading
();
commonToast
(
"3s入会,即可为好友助力"
,
1500
,
()
=>
{
commonToast
(
"3s入会,即可为好友助力"
,
1500
,
()
=>
{
app
.
isGoVip
=
true
;
app
.
isGoVip
=
true
;
navigateToOutside
(
r
.
data
.
url
);
navigateToOutside
(
r
.
data
.
url
);
})
})
}
else
if
(
r
.
data
&&
r
.
data
.
isVip
)
{
}
else
if
(
r
.
data
&&
r
.
data
.
isVip
)
{
my
.
hideLoading
();
this
.
openInviteFailedModal
();
this
.
openInviteFailedModal
();
}
else
{
}
else
{
my
.
hideLoading
();
const
{
onCloseModal
}
=
this
.
props
;
onCloseModal
&&
onCloseModal
();
commonToast
(
r
&&
r
.
message
);
commonToast
(
r
&&
r
.
message
);
}
}
})
||
{};
})
||
{};
...
@@ -56,6 +64,7 @@ Component({
...
@@ -56,6 +64,7 @@ Component({
if
(
success
)
{
if
(
success
)
{
this
.
openInviteSuccessModal
();
this
.
openInviteSuccessModal
();
}
}
my
.
hideLoading
();
}
}
},
},
...
...
taobao_jn/client/components/comtask/comtask.js
View file @
c2c079c7
...
@@ -72,7 +72,8 @@ Component({
...
@@ -72,7 +72,8 @@ Component({
const
{
const
{
taskType
,
taskType
,
sellerId
,
sellerId
,
rewards
rewards
,
todayCompleteTimes
}
=
item
;
}
=
item
;
const
{
const
{
success
,
success
,
...
@@ -103,7 +104,11 @@ Component({
...
@@ -103,7 +104,11 @@ Component({
// }
// }
console
.
log
(
'taskType'
,
taskType
)
console
.
log
(
'taskType'
,
taskType
)
// if (taskType == 'invites')
// if (taskType == 'invites')
if
(
taskType
==
'collectGoods'
)
{
str
=
`任务完成,增加
${
data
.
addWarms
}
个温暖值`
}
else
{
str
=
`任务完成,增加
${
rewards
}
个温暖值`
str
=
`任务完成,增加
${
rewards
}
个温暖值`
}
commonToast
(
str
||
'领取成功'
);
commonToast
(
str
||
'领取成功'
);
}
}
/**领取成功,增加温暖值 */
/**领取成功,增加温暖值 */
...
@@ -152,6 +157,7 @@ Component({
...
@@ -152,6 +157,7 @@ Component({
flag
=
0
;
flag
=
0
;
},
},
async
handleGoColletcGoods
(
itemIds
)
{
async
handleGoColletcGoods
(
itemIds
)
{
this
.
onModalClose
();
my
.
navigateTo
({
my
.
navigateTo
({
url
:
'/pages/goodsPage/goodsPage?taskType=collectGoods&&itemIds='
+
itemIds
url
:
'/pages/goodsPage/goodsPage?taskType=collectGoods&&itemIds='
+
itemIds
})
})
...
@@ -162,6 +168,7 @@ Component({
...
@@ -162,6 +168,7 @@ Component({
})
||
{};
})
||
{};
},
},
async
handleGoBrowseGoods
(
itemIds
)
{
async
handleGoBrowseGoods
(
itemIds
)
{
this
.
onModalClose
();
my
.
navigateTo
({
my
.
navigateTo
({
url
:
'/pages/goodsPage/goodsPage?taskType=browseGoods&&itemIds='
+
itemIds
url
:
'/pages/goodsPage/goodsPage?taskType=browseGoods&&itemIds='
+
itemIds
})
})
...
...
taobao_jn/client/components/goodsModal/goodsModal.js
View file @
c2c079c7
...
@@ -86,10 +86,13 @@ Component({
...
@@ -86,10 +86,13 @@ Component({
})
})
const
{
const
{
itemId
,
itemId
,
url
url
,
collected
}
=
e
.
target
.
dataset
.
item
}
=
e
.
target
.
dataset
.
item
const
{
onSetCurItemId
}
=
this
.
props
;
if
(
!
collected
){
onSetCurItemId
&&
onSetCurItemId
(
itemId
);
const
{
onSetCurItemId
}
=
this
.
props
;
onSetCurItemId
&&
onSetCurItemId
(
itemId
);
}
// const {
// const {
// onSetNotColletArr
// onSetNotColletArr
// } = this.props;
// } = this.props;
...
@@ -128,7 +131,7 @@ Component({
...
@@ -128,7 +131,7 @@ Component({
},
()
=>
{
},
()
=>
{
if
(
this
.
data
.
usePercent
>=
10
)
{
if
(
this
.
data
.
usePercent
>=
10
)
{
console
.
log
(
this
.
data
.
usePercent
)
console
.
log
(
this
.
data
.
usePercent
)
this
.
props
.
onCompleteTask
(
taskType
,
1
)
this
.
props
.
onCompleteTask
(
taskType
)
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
}
}
})
})
...
...
taobao_jn/client/pages/goodsPage/goodsPage.js
View file @
c2c079c7
...
@@ -30,6 +30,7 @@ Page({
...
@@ -30,6 +30,7 @@ Page({
collectGoodsArr
:
[],
collectGoodsArr
:
[],
notCollectGoodsArr
:
[],
notCollectGoodsArr
:
[],
curItemId
:
null
,
curItemId
:
null
,
defaultItemId
:
0
,
data
:
{
data
:
{
query
:
{},
query
:
{},
task
:
{},
task
:
{},
...
@@ -66,25 +67,32 @@ Page({
...
@@ -66,25 +67,32 @@ Page({
},
},
jdgeCollect
(){
jdgeCollect
(){
console
.
log
(
"判断是否收藏"
)
console
.
log
(
"判断是否收藏"
)
my
.
tb
.
checkGoodsCollectedStatus
({
let
index
=
this
.
notCollectGoodsArr
.
indexOf
(
this
.
curItemId
)
id
:
this
.
curItemId
,
if
(
index
>=
0
){
success
:
(
res
)
=>
{
my
.
tb
.
checkGoodsCollectedStatus
({
const
{
isCollect
,
id
}
=
res
;
id
:
this
.
curItemId
,
if
(
isCollect
){
success
:
(
res
)
=>
{
this
.
onCompleteTask
(
"collectGoods"
,
id
)
const
{
isCollect
,
id
}
=
res
;
console
.
log
(
"收藏成功"
)
if
(
isCollect
){
}
else
{
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
)
console
.
log
(
"收藏失败"
,
id
)
// my.alert({ content: "fail - " + isCollect })
}
}
})
// my.alert({ content: "success - " + isCollect })
}
else
{
},
return
;
fail
:
(
res
)
=>
{
}
const
{
isCollect
,
id
}
=
res
;
console
.
log
(
"收藏失败"
,
id
)
// my.alert({ content: "fail - " + isCollect })
}
})
},
},
init
()
{
init
()
{
const
{
const
{
...
@@ -167,6 +175,10 @@ Page({
...
@@ -167,6 +175,10 @@ Page({
res
&&
commonToast
(
res
)
res
&&
commonToast
(
res
)
})
||
{}
})
||
{}
if
(
success
)
{
if
(
success
)
{
this
.
defaultItemId
=
data
[
0
]?
data
[
0
].
itemId
:
0
;
if
(
taskType
==
'collectGoods'
){
this
.
getNotCollectItem
(
data
);
}
this
.
setData
({
this
.
setData
({
goodsList
:
data
||
[]
goodsList
:
data
||
[]
})
})
...
@@ -176,6 +188,13 @@ Page({
...
@@ -176,6 +188,13 @@ Page({
// this.isCanCompleteCollectTask();
// 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
)
{
async
isCanCompleteCollectTask
(
itemId
)
{
// let result = await checkGoodsCollectedStatus(itemId);
// let result = await checkGoodsCollectedStatus(itemId);
...
@@ -208,7 +227,7 @@ Page({
...
@@ -208,7 +227,7 @@ Page({
success
,
data
success
,
data
}
=
await
API
.
doCollectGoodsTask
({
}
=
await
API
.
doCollectGoodsTask
({
taskType
,
taskType
,
itemId
itemId
:
itemId
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
res
&&
commonToast
(
res
)
})
||
{}
})
||
{}
...
@@ -219,7 +238,7 @@ Page({
...
@@ -219,7 +238,7 @@ Page({
case
'browseGoods'
:
case
'browseGoods'
:
let
browsResult
=
await
API
.
doBrowseGoodsTask
({
let
browsResult
=
await
API
.
doBrowseGoodsTask
({
taskType
,
taskType
,
itemId
itemId
:
this
.
defaultItemId
}).
catch
(
res
=>
{
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
res
&&
commonToast
(
res
)
})
||
{}
})
||
{}
...
...
taobao_jn/client/pages/pagepageindex/pagepageindex.js
View file @
c2c079c7
...
@@ -33,6 +33,7 @@ Page({
...
@@ -33,6 +33,7 @@ Page({
gameConfigList
:
{},
gameConfigList
:
{},
favoredStatus
:
false
,
favoredStatus
:
false
,
goVip
:
false
,
goVip
:
false
,
start
:
false
,
data
:
{
data
:
{
indexPrize
:
[{
indexPrize
:
[{
id
:
1
,
id
:
1
,
...
@@ -309,6 +310,7 @@ Page({
...
@@ -309,6 +310,7 @@ Page({
})
})
}
}
this
.
canOpenGamePage
=
true
;
this
.
canOpenGamePage
=
true
;
this
.
start
=
true
;
my
.
hideLoading
();
my
.
hideLoading
();
}
}
...
@@ -317,6 +319,7 @@ Page({
...
@@ -317,6 +319,7 @@ Page({
/**进入游戏页面 */
/**进入游戏页面 */
async
openGamePage
()
{
async
openGamePage
()
{
if
(
!
this
.
canOpenGamePage
)
return
;
if
(
!
this
.
canOpenGamePage
)
return
;
this
.
canOpenGamePage
=
false
my
.
showLoading
();
my
.
showLoading
();
const
{
const
{
success
,
success
,
...
@@ -327,14 +330,17 @@ Page({
...
@@ -327,14 +330,17 @@ Page({
}).
catch
(
r
=>
{
}).
catch
(
r
=>
{
if
(
r
&&
r
.
data
&&
!
r
.
data
.
isVip
)
{
if
(
r
&&
r
.
data
&&
!
r
.
data
.
isVip
)
{
commonToast
(
"3s入会,即可为好友助力"
,
1500
,
()
=>
{
commonToast
(
"3s入会,即可为好友助力"
,
1500
,
()
=>
{
this
.
canOpenGamePage
=
true
;
navigateToOutside
(
r
.
data
.
url
);
navigateToOutside
(
r
.
data
.
url
);
})
})
}
else
{
}
else
{
this
.
canOpenGamePage
=
true
;
commonToast
(
r
&&
r
.
message
)
commonToast
(
r
&&
r
.
message
)
}
}
my
.
hideLoading
();
my
.
hideLoading
();
})
||
{};
})
||
{};
if
(
success
)
{
if
(
success
)
{
this
.
canOpenGamePage
=
true
;
const
winRate
=
this
.
gameConfigList
[
this
.
data
.
curGameStep
-
1
].
winRate
*
0.01
;
const
winRate
=
this
.
gameConfigList
[
this
.
data
.
curGameStep
-
1
].
winRate
*
0.01
;
const
propsCD
=
this
.
gameConfigList
[
this
.
data
.
curGameStep
-
1
].
propsCD
;
const
propsCD
=
this
.
gameConfigList
[
this
.
data
.
curGameStep
-
1
].
propsCD
;
my
.
redirectTo
({
my
.
redirectTo
({
...
@@ -344,13 +350,14 @@ Page({
...
@@ -344,13 +350,14 @@ Page({
})
})
my
.
hideLoading
();
my
.
hideLoading
();
}
else
{
}
else
{
}
}
console
.
log
(
"点击进入游戏页面"
)
console
.
log
(
"点击进入游戏页面"
)
},
},
/**打开弹窗 */
/**打开弹窗 */
openModal
(
e
)
{
openModal
(
e
)
{
if
(
!
this
.
start
)
return
;
console
.
log
(
e
);
console
.
log
(
e
);
const
{
const
{
item
item
...
@@ -367,6 +374,7 @@ Page({
...
@@ -367,6 +374,7 @@ Page({
},
},
/**点击跳转页面 */
/**点击跳转页面 */
navigateTo
(
e
)
{
navigateTo
(
e
)
{
if
(
!
this
.
start
)
return
;
const
{
const
{
item
item
}
=
e
.
target
.
dataset
;
}
=
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