Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
home-with-kids-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ddde4ea3
authored
2020-01-17 16:18:40 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
ddba7edf
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
102 additions
and
33 deletions
src/app.js
src/http/api.js
src/pages/blessing/blessing.js
src/pages/blessing/blessing.wxml
src/pages/detail/detail.js
src/pages/index/index.js
src/pages/personal-list/personal-list.js
src/pages/reward-completed/reward-completed.js
src/pages/reward/reward.js
src/utils/ald-stat-conf.js
src/app.js
View file @
ddde4ea
...
...
@@ -49,28 +49,26 @@ App({
this
.
globalData
.
barHeight
=
height
;
this
.
share
();
// let uuid = store.getItem("aldstat_uuid");
// console.log("uuid222:", uuid);
// store.setItem("uuid", uuid);
// console.log("uuid:", uuid);
// wx.aldstat.sendOpenid(uuid);
let
_this
=
this
;
// 阿拉丁
// wx.login({
// success: function (res) {
// wx.request({
// url: "",
// data: {
// jscode: res.code
// },
// success: function (res) {
// //.....
// //调用上传OpenID
// wx.aldstat.sendOpenid(uuid);
// }
// })
// }
// })
wx
.
login
({
success
:
function
(
res
)
{
_this
.
post
({
sid
:
false
,
url
:
api
.
openid
,
data
:
{
code
:
res
.
code
}
}).
then
((
result
)
=>
{
wx
.
aldstat
.
sendOpenid
(
result
);
wx
.
login
({
success
(
res2
)
{
store
.
setItem
(
'wxcode2'
,
res2
.
code
);
}
});
})
}
})
},
globalData
:
{
share
:
false
,
...
...
src/http/api.js
View file @
ddde4ea
module
.
exports
=
{
login
:
"/login"
,
// post 通过wxcode换取sessionId
openid
:
"/openid"
,
// post 通过wxcode换取sessionId
register
:
'/register'
,
// post 注册(用户授权)
// dataList: '/dataList', // 测试接口
...
...
src/pages/blessing/blessing.js
View file @
ddde4ea
...
...
@@ -32,7 +32,6 @@ Page({
// type: 0, // 0单人 1组队
// 个人信息修改
updateUserInfoDialogVisible
:
false
,
joinRoomDialogVisibleUnAuth
:
false
,
updateUserInfo
:
{},
// 需要更新的用户数据
files
:
[],
// 上传文件列表
...
...
@@ -81,7 +80,11 @@ Page({
shareType
=
res
.
target
.
dataset
.
data
||
""
;
console
.
log
(
"shareType:"
,
shareType
);
if
(
shareType
)
{
console
.
log
(
"shareType222:"
,
shareType
);
title
=
`
${
ownerMember
.
memberName
}
邀请您组队发祝福!体验今年最火爆的拜年方式`
wx
.
aldstat
.
sendEvent
(
'拜年页分享'
,
{
'分享'
:
'邀请分享'
});
}
else
{}
let
act
=
res
.
target
.
dataset
.
act
||
""
;
...
...
@@ -100,6 +103,10 @@ Page({
let
path
=
`pages/blessing/blessing?c=
${
detailData
.
blessCode
}
&m=
${
memberCode
}
&t=
${
shareType
}
`
;
console
.
log
(
"share path:"
,
path
);
wx
.
aldstat
.
sendEvent
(
'拜年页分享'
,
{
'分享'
:
'普通分享'
});
return
{
title
,
path
,
...
...
@@ -231,6 +238,10 @@ Page({
}
});
console
.
log
(
"memberCode:"
,
app
.
store
.
getItem
(
"memberCode"
));
wx
.
aldstat
.
sendEvent
(
'进入页面'
,
{
'页面名字'
:
'拜年详情页'
});
},
/**
...
...
@@ -288,6 +299,34 @@ Page({
})
},
onShowMakeHandler
()
{
let
{
detailData
}
=
this
.
data
;
let
_this
=
this
;
wx
.
showModal
({
title
:
'提示'
,
content
:
'需要定制祝福才能邀请亲友哦~'
,
confirmText
:
"马上创建"
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 已授权
app
.
post
({
url
:
app
.
api
.
blessMade
,
data
:
{
blessCode
:
detailData
.
blessCode
,
}
}).
then
((
result
)
=>
{
this
.
queryBlessDetail
().
then
((
result
)
=>
{
this
.
showTips
(
"定制祝福成功!马上邀请您的亲友吧!"
);
});
}).
catch
((
err
)
=>
{});
}
else
if
(
res
.
cancel
)
{
}
}
})
},
showTips
(
tips
)
{
wx
.
showToast
({
...
...
@@ -900,7 +939,6 @@ Page({
}
=
this
.
data
;
console
.
log
(
"isAuth:"
,
isAuth
);
if
(
isAuth
)
{
// 把房间变成自己
this
.
setData
({
isJoin
:
false
,
...
...
@@ -977,6 +1015,7 @@ Page({
// 授权操作
getUserInfo
(
e
)
{
console
.
log
(
"getUserInfo 1111111"
);
let
{
detailData
}
=
this
.
data
;
...
...
@@ -1074,7 +1113,6 @@ Page({
app
.
store
.
setItem
(
'sessionId'
,
res2
.
sessionId
);
app
.
store
.
setItem
(
'memberCode'
,
res2
.
memberCode
);
}
console
.
log
(
"1111"
);
this
.
queryBlessDetail
().
then
((
result
)
=>
{
this
.
onBlessMakeHandler
();
});
...
...
src/pages/blessing/blessing.wxml
View file @
ddde4ea
...
...
@@ -41,15 +41,31 @@
</view>
<!-- 邀请 房主或组队模式显示 -->
<view class="group-item" wx:if="{{options.t || ownerMember.mySelf == 1}}">
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="group-item-inv">
<!-- 未授权 -->
<block wx:if="{{!isAuth}}">
<!-- 未定制 -->
<button wx:if="{{detailData.customMade == 0}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
<button wx:else data-data="join" open-type="share" class="group-item-inv">
<!-- 已定制 -->
<button wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
<!-- <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn1">
邀亲友组团拜年
</button> -->
</block>
<block wx:else>
<!-- 未定制 -->
<block wx:if="{{detailData.customMade == 0}}">
<button bindtap="onBlessMakeHandler" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
</block>
<!-- 已定制 -->
<block wx:else>
<button data-data="join" open-type="share" class="group-item-inv">
<image class="icon-inv" mode="widthFix" src="../../image/icon/icon-inv.png" />
</button>
</block>
</block>
</view>
</view>
<!-- 更多 -->
...
...
@@ -156,9 +172,10 @@
</block>
<!-- 已授权 -->
<block wx:else>
<button data-data="join" data-act="made" open-type="share" class="btn btn1">
<button bindtap="onBlessMakeHandler" class="btn btn1">邀亲友组团拜年</button>
<!-- <button data-data="join" data-act="made" open-type="share" class="btn btn1">
邀亲友组团拜年
</button>
</button>
-->
<button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo3" class="btn btn2">
定制我的祝福
</button>
...
...
@@ -253,7 +270,7 @@
<image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" />
</view>
<view class="nickname">{{ownerMember.memberName}}</view>
<view class="t1">邀请你一起加入组队送祝福!</view>
<view class="t1">邀请你一起加入组队送祝福!
2
</view>
</view>
</van-dialog>
<van-popup class="poster-popup" show="{{ authorizeVisible }}">
...
...
src/pages/detail/detail.js
View file @
ddde4ea
...
...
@@ -67,6 +67,9 @@ Page({
// })
}).
catch
((
err
)
=>
{});;
this
.
initData
();
wx
.
aldstat
.
sendEvent
(
'进入页面'
,
{
'页面名字'
:
'视频详情页'
});
},
/**
...
...
src/pages/index/index.js
View file @
ddde4ea
...
...
@@ -53,6 +53,9 @@ Page({
options
})
this
.
initData
();
wx
.
aldstat
.
sendEvent
(
'进入页面'
,
{
'页面名字'
:
'首页'
});
},
initData
()
{
this
.
queryTabList
().
then
((
result
)
=>
{
...
...
src/pages/personal-list/personal-list.js
View file @
ddde4ea
...
...
@@ -45,6 +45,9 @@ Page({
});
console
.
log
(
"tempOptions:"
,
tempOptions
);
this
.
initData
();
wx
.
aldstat
.
sendEvent
(
'进入页面'
,
{
'页面名字'
:
'个人列表页'
});
},
initData
()
{
this
.
resetPage
();
...
...
src/pages/reward-completed/reward-completed.js
View file @
ddde4ea
...
...
@@ -56,6 +56,9 @@ Page({
});
this
.
queryVideoDetail
();
this
.
initData
();
wx
.
aldstat
.
sendEvent
(
'进入页面'
,
{
'页面名字'
:
'隐藏视频页'
});
},
/**
...
...
src/pages/reward/reward.js
View file @
ddde4ea
...
...
@@ -57,6 +57,9 @@ Page({
action
:
"reword_page"
,
primaryCode
:
""
,
});
wx
.
aldstat
.
sendEvent
(
'进入页面'
,
{
'页面名字'
:
'打赏页'
});
},
onShow
()
{
// this.checkAuth();
...
...
src/utils/ald-stat-conf.js
View file @
ddde4ea
exports
.
app_key
=
"eb6daf8e1ce2e5e29de64d5ec1286fbc"
;
//请在此行填写从阿拉丁后台获取的appkey
exports
.
getLocation
=
false
;
//默认不获取用户坐标位置
exports
.
plugin
=
false
;
//您的小程序中是否使用了插件。根据是否启用插件会有不同的接入方式,请参考文档文档。
exports
.
useOpen
=
fals
e
;
//默认不启用,是否启用openid计算,开启后必须上传openid,否则数据不会上报。
exports
.
useOpen
=
tru
e
;
//默认不启用,是否启用openid计算,开启后必须上传openid,否则数据不会上报。
...
...
Please
register
or
sign in
to post a comment