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
f054e24f
Commit
f054e24f
authored
Sep 27, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b32a8b99
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
68 deletions
+120
-68
output.js.map
project/src/canvas/game/output.js.map
+1
-1
api.js
taobao_mini/client/api.js
+5
-0
app.js
taobao_mini/client/app.js
+1
-1
comtask.js
taobao_mini/client/components/comtask/comtask.js
+3
-0
output.js
taobao_mini/client/pages/pagecanvas/output.js
+1
-0
pagecanvas.js
taobao_mini/client/pages/pagecanvas/pagecanvas.js
+109
-66
No files found.
project/src/canvas/game/output.js.map
View file @
f054e24f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
taobao_mini/client/api.js
View file @
f054e24f
...
...
@@ -23,6 +23,11 @@ const request = tbccRequest({
// api handle 列表
const
apiList
=
{
...
capi
,
doHelp
:
{
handle
:
'doHelp'
,
method
:
'get'
,
isShowLoading
:
false
},
doFollowTask
:
{
handle
:
'doFollowTask'
,
method
:
'get'
,
...
...
taobao_mini/client/app.js
View file @
f054e24f
...
...
@@ -9,7 +9,7 @@ cloud.init({
App
({
env
,
requestType
:
'cloud'
,
// yapi,cloud: 云函数
requestType
:
'local'
,
// yapi,cloud: 云函数
//
requestType: 'local', // yapi,cloud: 云函数
cloudName
:
'tmallCat'
,
// 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud
,
...
...
taobao_mini/client/components/comtask/comtask.js
View file @
f054e24f
...
...
@@ -81,6 +81,9 @@ Component({
await
this
.
handleGoFollow
(
sellerId
);
await
this
.
getTaskList
();
break
;
case
'invites'
:
my
.
showSharePanel
();
break
;
default
:
console
.
log
(
'handleTapGoBtn'
,
taskType
);
break
;
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
f054e24f
import * as FYGE from "fyge-tbmini";
import * as SvgaParser from "svga-parser";
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
taobao_mini/client/pages/pagecanvas/pagecanvas.js
View file @
f054e24f
...
...
@@ -16,6 +16,13 @@ const {
getSystemInfo
}
=
tbcc
.
tb
;
const
SHARE_CONFIG
=
{
title
:
'欧泊莱泡泡大作战'
,
desc
:
'快来领取我为你准备的超值小样吧'
,
imageUrl
:
"https://yun.duiba.com.cn/db_games/activity/pacman/share.jpg"
,
path
:
'pages/pagecanvas/pagecanvas'
}
const
checkSystem
=
async
()
=>
{
const
{
version
...
...
@@ -44,9 +51,27 @@ Page({
catbackbedModalVisible
:
false
,
catruleModalVisible
:
0
},
async
doHelp
()
{
if
(
!
app
.
inviteId
)
return
;
commonToast
(
'正在发起助力~'
)
const
{
success
,
data
,
message
}
=
await
API
.
doHelp
({
inviteId
:
app
.
inviteId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
})
||
{};
onLoad
(
props
)
{
if
(
success
)
{
commonToast
(
'助力成功~'
);
}
},
onLoad
(
query
)
{
this
.
setData
({});
if
(
query
.
openId
)
app
.
inviteId
=
query
.
openId
;
console
.
log
(
'onload=>query'
,
query
);
// my.showToast({
// content: "query " + JSON.stringify(query),
// duration: 5000
// });
checkSystem
().
then
(
r
=>
{
if
(
!
r
)
{
...
...
@@ -62,51 +87,51 @@ Page({
async
onReady
()
{
console
.
log
(
'on ready'
)
//授权和登录先搞
await
this
.
getAuth
();
this
.
initCanvas
();
my
.
__onMessage__
=
(
e
)
=>
{
this
.
onMessage
(
e
)
}
my
.
__getdata__
=
(
key
)
=>
{
my
.
__onMessage__
({
data
:
{
netName
:
'tmallCat.'
+
key
}
})
}
my
.
__showModal__
=
(
key
,
data
)
=>
{
this
.
onMessage
({
data
:
{
netName
:
'mine.showModal'
,
parameter
:
{
name
:
key
+
'Modal'
,
data
:
data
}
}
});
}
my
.
__pageTo__
=
(
key
,
data
)
=>
{
this
.
onMessage
({
data
:
{
netName
:
'mine.navigateToPage'
,
parameter
:
{
name
:
key
}
}
});
}
// await this.getAuth();
// this.initCanvas();
// my.__onMessage__ = (e) => {
// this.onMessage(e)
// }
// my.__getdata__ = (key) => {
// my.__onMessage__({
// data: {
// netName: 'tmallCat.' + key
// }
// })
// }
// my.__showModal__ = (key, data) => {
// this.onMessage({
// data: {
// netName: 'mine.showModal',
// parameter: {
// name: key + 'Modal',
// data: data
// }
// }
// });
// }
// my.__pageTo__ = (key, data) => {
// this.onMessage({
// data: {
// netName: 'mine.navigateToPage',
// parameter: {
// name: key
// }
// }
// });
// }
my
.
__updateUserInfo__
=
()
=>
{
console
.
log
(
"通知canvas刷新用户信息"
)
this
.
main
&&
this
.
main
.
dispatchGlobalEvent
(
"UPDATE_USERINFO"
)
}
setTimeout
(()
=>
{
my
.
__pageTo__
(
'myprize'
)
},
100
);
//
setTimeout(() => {
//
my.__pageTo__('myprize')
//
}, 100);
},
initCanvas
()
{
...
...
@@ -137,14 +162,16 @@ Page({
this
.
main
.
addGlobalEvent
(
"toast"
,
self
.
showToastHandler
,
self
);
this
.
main
.
addGlobalEvent
(
"loading"
,
self
.
showLoadingHandler
,
self
);
this
.
main
.
addGlobalEvent
(
"hideloading"
,
self
.
hideLoadingHandler
,
self
);
this
.
doHelp
();
}
},
fail
:
()
=>
{
console
.
log
(
'createCanvas fail'
);
}
});
},
onCanvasReady
()
{
console
.
log
(
'onCanvasReady'
)
onCanvasReady
(
query
)
{
console
.
log
(
'onCanvasReady'
,
query
)
//授权和登录先搞
checkSystem
().
then
(
r
=>
{
if
(
r
)
{
...
...
@@ -195,7 +222,8 @@ Page({
activityId
:
app
.
activityId
,
nickName
:
app
.
nickName
,
avatar
:
app
.
avatar
,
openId
:
app
.
openId
openId
:
app
.
openId
,
inviteId
:
app
.
inviteId
}
};
break
;
...
...
@@ -272,7 +300,7 @@ Page({
* 获取用户授权信息
*/
async
getAuth
()
{
return
new
Promise
(
async
(
s
,
r
)
=>
{
return
new
Promise
(
async
(
s
,
r
)
=>
{
const
userInfo
=
await
getAuthUserInfo
().
catch
(
err
=>
{
console
.
log
(
'未授权成功'
,
err
);
r
();
...
...
@@ -286,6 +314,7 @@ Page({
app
.
nickName
=
nickName
;
app
.
avatar
=
avatar
;
await
this
.
login
();
this
.
initCanvas
();
s
();
}
})
...
...
@@ -294,13 +323,13 @@ Page({
* 登录接口
*/
async
login
()
{
return
new
Promise
(
async
(
s
,
r
)
=>
{
return
new
Promise
(
async
(
s
,
r
)
=>
{
const
{
nickName
,
avatar
}
=
app
;
const
{
success
success
,
data
,
}
=
await
API
.
login
({
userNick
:
nickName
,
avatar
...
...
@@ -310,6 +339,7 @@ Page({
})
||
{};
if
(
success
)
{
data
&&
(
app
.
openId
=
data
.
openId
);
s
();
}
})
...
...
@@ -397,5 +427,18 @@ Page({
this
.
setData
({
catruleModalVisible
:
false
})
},
onShareAppMessage
()
{
// 返回自定义分享信息
let
{
path
,
...
rest
}
=
SHARE_CONFIG
if
(
app
.
openId
)
{
path
=
'/pages/pagecanvas/pagecanvas'
+
'?openId='
+
app
.
openId
;
}
console
.
log
(
path
)
return
{
...
rest
,
path
}
}
});
\ 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