Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobaominiDemo
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
taobaominiDemo
Commits
abe46f7a
Commit
abe46f7a
authored
Jul 01, 2020
by
lujinlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-a
parent
76363518
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
42 deletions
+37
-42
index.js
client/pages/index/index.js
+2
-2
output.js
client/pages/index/output.js
+35
-40
No files found.
client/pages/index/index.js
View file @
abe46f7a
...
...
@@ -172,9 +172,9 @@ Page({
const
isTmpFollow
=
await
checkShopFavoredStatus
(
app
.
sellerId
).
catch
(()
=>
{})
console
.
warn
(
'查询是否已关注过店铺'
,
isTmpFollow
);
if
(
isTmpFollow
){
this
.
postMessage
(
'isFavorShop'
,
{
success
:
true
})
this
.
postMessage
(
'
mine.
isFavorShop'
,
{
success
:
true
})
}
else
{
this
.
postMessage
(
'isFavorShop'
,
{
success
:
false
})
this
.
postMessage
(
'
mine.
isFavorShop'
,
{
success
:
false
})
}
},
...
...
client/pages/index/output.js
View file @
abe46f7a
...
...
@@ -4456,7 +4456,7 @@ exports.ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/159359
4860
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/159359
7241
/resource/"
};
...
...
@@ -8930,6 +8930,7 @@ var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var
Panel_1
=
__webpack_require__
(
/*! ../../module/views/Panel */
"./module/views/Panel.ts"
);
var
RES_1
=
__webpack_require__
(
/*! ../../module/RES */
"./module/RES.ts"
);
var
receiveTaskRewards_1
=
__webpack_require__
(
/*! ../ctrls/receiveTaskRewards */
"./src/ctrls/receiveTaskRewards.ts"
);
var
Main_1
=
__webpack_require__
(
/*! ../Main */
"./src/Main.ts"
);
var
InviteInfoPanel
=
(
function
(
_super
)
{
__extends
(
InviteInfoPanel
,
_super
);
function
InviteInfoPanel
()
{
...
...
@@ -8970,6 +8971,9 @@ var InviteInfoPanel = (function (_super) {
return
[
4
,
receiveTaskRewards_1
.
default
(
'invites'
)];
case
1
:
_a
=
_b
.
sent
(),
success
=
_a
.
success
,
message
=
_a
.
message
,
data
=
_a
.
data
;
if
(
success
||
!
success
)
{
Main_1
.
GDispatcher
.
dispatchEvent
(
'completeTaskUpdate'
);
}
return
[
2
];
}
});
...
...
@@ -9269,6 +9273,7 @@ var TaskPanel = (function (_super) {
TaskPanel
.
prototype
.
initUi
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
container
,
bg
;
var
_this
=
this
;
return
__generator
(
this
,
function
(
_a
)
{
container
=
new
FYGE
.
Container
();
this
.
closeBtn
=
new
FYGE
.
Button
(
RES_1
.
RES
.
getRes
(
"comCloseBtn.png"
));
...
...
@@ -9279,32 +9284,25 @@ var TaskPanel = (function (_super) {
container
.
addChild
(
bg
);
container
.
addChild
(
this
.
closeBtn
);
this
.
addChild
(
container
);
Main_1
.
GDispatcher
.
addEventListener
(
'isFavorShop'
,
this
.
isFavorShopInit
,
this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
isFavorShop
);
return
[
2
];
});
});
};
TaskPanel
.
prototype
.
isFavorShopInit
=
function
(
res
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
isFavor
,
_a
,
success
,
code
,
data
,
message
;
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
case
0
:
Main_1
.
GDispatcher
.
removeEventListener
(
'isFavorShop'
,
this
.
isFavorShopInit
,
this
);
isFavor
=
res
.
data
.
success
;
return
[
4
,
getTaskList_1
.
default
(
isFavor
)];
case
1
:
_a
=
_b
.
sent
(),
success
=
_a
.
success
,
code
=
_a
.
code
,
data
=
_a
.
data
,
message
=
_a
.
message
;
if
(
!
success
||
!
data
)
{
console
.
log
(
'任务数据出错'
);
ctrls_1
.
showToast
(
message
);
return
[
2
];
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
isFavorShop
,
null
,
function
(
success1
,
res
)
{
return
__awaiter
(
_this
,
void
0
,
void
0
,
function
()
{
var
_a
,
success
,
code
,
data
,
message
;
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
case
0
:
return
[
4
,
getTaskList_1
.
default
(
success1
)];
case
1
:
_a
=
_b
.
sent
(),
success
=
_a
.
success
,
code
=
_a
.
code
,
data
=
_a
.
data
,
message
=
_a
.
message
;
if
(
!
success
||
!
data
)
{
console
.
log
(
'任务数据出错'
);
ctrls_1
.
showToast
(
message
);
return
[
2
];
}
this
.
mData
=
data
;
this
.
showTaskItem
();
return
[
2
];
}
this
.
mData
=
data
;
this
.
showTaskItem
();
return
[
2
];
}
});
});
},
true
);
return
[
2
];
});
});
};
...
...
@@ -9344,6 +9342,7 @@ var TaskPanel = (function (_super) {
TaskPanel
.
prototype
.
taskClick
=
function
(
taskData
,
tmpThis
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
_a
;
var
_this
=
this
;
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
case
0
:
...
...
@@ -9374,8 +9373,16 @@ var TaskPanel = (function (_super) {
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
navigateToOutside
,
{
url
:
taskData
.
value
});
}
if
(
taskData
.
taskType
==
TASK_TYPE_1
.
TASK_TYPE
.
FOLLOW
)
{
Main_1
.
GDispatcher
.
addEventListener
(
'isFavorShop'
,
this
.
isFavorShop
,
this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
isFavorShop
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
isFavorShop
,
null
,
function
(
success
,
res
)
{
if
(
success
)
{
ctrls_1
.
showToast
(
'已关注过该店铺'
);
_this
.
updateData
(
true
);
}
else
{
Main_1
.
GDispatcher
.
addEventListener
(
TaoBaoNet_1
.
TbNetName
.
favorShop
,
_this
.
favorShopBack
,
_this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
favorShop
);
}
},
true
);
}
if
(
!
(
taskData
.
taskType
==
TASK_TYPE_1
.
TASK_TYPE
.
INVITE
))
return
[
3
,
5
];
sendLog_1
.
default
(
LogType_1
.
default
.
clickInvitation
);
...
...
@@ -9392,18 +9399,6 @@ var TaskPanel = (function (_super) {
});
});
};
TaskPanel
.
prototype
.
isFavorShop
=
function
(
res
)
{
Main_1
.
GDispatcher
.
removeEventListener
(
'isFavorShop'
,
this
.
isFavorShop
,
this
);
console
.
log
(
'是否已关注店铺事件返回'
,
res
.
data
.
success
);
if
(
res
.
data
.
success
)
{
ctrls_1
.
showToast
(
'已关注过该店铺'
);
this
.
updateData
(
true
);
}
else
{
Main_1
.
GDispatcher
.
addEventListener
(
TaoBaoNet_1
.
TbNetName
.
favorShop
,
this
.
favorShopBack
,
this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
favorShop
);
}
};
TaskPanel
.
prototype
.
updateData
=
function
(
isFavor
)
{
if
(
isFavor
===
void
0
)
{
isFavor
=
false
;
}
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
...
...
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