|
@@ -65,16 +65,33 @@ async function clickJoin() {
|
|
|
if (!_userInfo) {
|
|
|
return
|
|
|
}
|
|
|
- sendChromeTabMessage({
|
|
|
- actionType: "IFRAME_SHOW_JOIN_DIALOG",
|
|
|
- data: {
|
|
|
- type: 'join',
|
|
|
- buy_nft_status: state.data.buyNftStatus,
|
|
|
- nft_group_Id: state.data.nftGroupId,
|
|
|
- nftGroupIcon: state.data.nftGroupIcon,
|
|
|
- nftGroupName: state.data.nftGroupName
|
|
|
- }
|
|
|
- })
|
|
|
+ // 如果没购买过 弹出购买
|
|
|
+ if (state.data.buyNftStatus == 0) {
|
|
|
+ sendChromeTabMessage({
|
|
|
+ actionType: "IFRAME_SHOW_JOIN_DIALOG",
|
|
|
+ data: {
|
|
|
+ type: 'buy',
|
|
|
+ buy_nft_status: state.data.buyNftStatus,
|
|
|
+ nft_group_Id: state.data.nftGroupId,
|
|
|
+ buyNftProjectId: state.data.buyNftProjectId,
|
|
|
+ nftGroupIcon: state.data.nftGroupIcon,
|
|
|
+ nftGroupName: state.data.nftGroupName
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ // 如果购买过 没加入 显示加入按钮
|
|
|
+ } else if (state.data.buyNftStatus == 1 && state.data.joinStatus == 0) {
|
|
|
+ sendChromeTabMessage({
|
|
|
+ actionType: "IFRAME_SHOW_JOIN_DIALOG",
|
|
|
+ data: {
|
|
|
+ type: 'join',
|
|
|
+ buy_nft_status: state.data.buyNftStatus,
|
|
|
+ nft_group_Id: state.data.nftGroupId,
|
|
|
+ nftGroupIcon: state.data.nftGroupIcon,
|
|
|
+ nftGroupName: state.data.nftGroupName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const init = (callback) => {
|
|
@@ -86,6 +103,7 @@ const init = (callback) => {
|
|
|
if (res.code == 0) {
|
|
|
state.data = res.data
|
|
|
if (state.data) {
|
|
|
+ res.data.joinStatus == 0
|
|
|
// 未加入
|
|
|
if (res.data.joinStatus == 0) {
|
|
|
state.show2 = 'join'
|
|
@@ -155,8 +173,8 @@ async function clickPost() {
|
|
|
nftGroupName: state.data.nftGroupName
|
|
|
}
|
|
|
})
|
|
|
- // 购买过
|
|
|
- } else if (state.data.buyNftStatus == 1) {
|
|
|
+ // 购买过 && 加入过
|
|
|
+ } else if (state.data.buyNftStatus == 1 && state.data.joinStatus == 1) {
|
|
|
sendChromeTabMessage({
|
|
|
actionType: "IFRAME_SHOW_POST_DIALOG",
|
|
|
data: {
|