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
9d22853a
Commit
9d22853a
authored
Sep 30, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
7aa323bf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
71 deletions
+10
-71
README.md
README.md
+1
-17
app.json
taobao_mini/client/app.json
+1
-1
index.js
taobao_mini/client/pages/index/index.js
+8
-53
No files found.
README.md
View file @
9d22853a
# canvas开发
http://gitlab2.dui88.com/wanghongyuan/hello_canvas
# 注意的点
-
不要一次性预加载整个项目的图片,只预加载canvas game需要的。
-
复杂动效用Lottie
-
project/src/canvas/game/resCanvasList.js里URL要https开头
# 打开弹窗
```
js
sendTbNet
(
TbNetName
.
showModal
,
{
name
:
'ruleModal'
},
(
s
,
res
)
=>
{
})
```
# 切换场景
```
js
sendTbNet
(
TbNetName
.
navigateToPage
,
{
name
:
'pageshop'
},
(
s
,
res
)
=>
{
})
```
\ No newline at end of file
# 邀请mvp
\ No newline at end of file
taobao_mini/client/app.json
View file @
9d22853a
{
"pages"
:
[
"pages/index/index"
,
"pages/homePage/homePage"
,
"pages/myprize/myprize"
,
"pages/index/index"
,
"pages/pageshop/pageshop"
,
"pages/tbccDemo/tbccDemo"
,
"pages/goodsPage/goodsPage"
,
...
...
taobao_mini/client/pages/index/index.js
View file @
9d22853a
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
SHARE_CONFIG
,
REDIRECT_URL
}
=
tbcc
.
constants
;
import
API
from
'../../api'
;
const
{
commonToast
,
getAuthUserInfo
,
navigateToOutside
}
=
tbcc
.
tb
;
const
SHARE_CONFIG
=
{
title
:
'雅顿乐园'
,
desc
:
'雅顿乐园 邀请好友助力'
,
imageUrl
:
'https://isv.alibabausercontent.com/00000000/imgextra/i2/676606897/O1CN01eNrwLl20osHoB4Y7d_!!676606897-2-isvtu-00000000.png'
,
// 分享图片URL
path
:
'/pages/invitePage/invitePage'
};
Page
({
doExchange
:
()
=>
{
my
.
navigateTo
({
url
:
`/pages/pageshop/pageshop`
});
},
data
:
{
title
:
''
,
content
:
''
,
...
...
@@ -25,7 +26,6 @@ Page({
onLoad
(
query
)
{
// 页面加载
// this.getAuth();
my
.
navigateTo
({
url
:
'../homePage/homePage'
})
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
},
init
()
{
...
...
@@ -108,52 +108,7 @@ Page({
const
{
commonModalConfirm
}
=
this
.
data
;
commonModalConfirm
&&
commonModalConfirm
();
},
/**
* 执行开始
*/
doStart
()
{
this
.
showCommonModal
({
content
:
'活动还未开始
\
n请稍后'
,
btnText
:
'我知道了'
,
commonModalVisible
:
true
,
confirmCallback
:
()
=>
{
this
.
closeCommonModal
();
}
});
},
/**
* 显示通用弹层
* @param {object} options content: 通用弹层内容 btnText:按钮文案 confirmCallback: 按钮确认回调
*/
showCommonModal
({
content
,
btnText
,
confirmCallback
})
{
this
.
setData
({
commonModalConfirm
:
confirmCallback
||
null
,
commonModalVisible
:
true
,
commonModalData
:
{
content
,
btnText
}
});
},
/**
* 跳转到天猫页面
*/
goTmallPage
()
{
navigateToOutside
(
REDIRECT_URL
[
'tmall'
]);
},
/**
* 关闭通用弹层
*/
closeCommonModal
()
{
this
.
setData
({
commonModalVisible
:
false
});
},
/**
* 关闭活动规则弹层
*/
closeRuleModal
()
{
this
.
setData
({
ruleModalVisible
:
false
});
},
onShareAppMessage
()
{
// 返回自定义分享信息
return
SHARE_CONFIG
;
...
...
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