Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
5614b819
Commit
5614b819
authored
Jul 15, 2020
by
秦海涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
26cfb9a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
22 deletions
+30
-22
rank-dialog.axml
client/components/dialog/rank-dialog/rank-dialog.axml
+6
-6
rank-dialog.js
client/components/dialog/rank-dialog/rank-dialog.js
+16
-7
winner-list-dialog.js
...omponents/dialog/winner-list-dialog/winner-list-dialog.js
+1
-6
list-table.axml
client/components/list/list-table/list-table.axml
+1
-2
list-table.js
client/components/list/list-table/list-table.js
+6
-1
No files found.
client/components/dialog/rank-dialog/rank-dialog.axml
View file @
5614b819
<dialog-wrap
title="中奖信息"
visible="{{
fals
e}}"
visible="{{
visibl
e}}"
onClose="onCloseDialog"
width="
8
00"
width="
10
00"
>
<view class="rank-dialog-wrap">
<!-- <view class="other-winner-list">
...
...
@@ -15,14 +15,14 @@
key="{{item.key}}"
> -->
<view class="now-winner-list">
<button type="primary">导出中奖名单</button>
<button type="primary"
onTap="exportWinnerList"
>导出中奖名单</button>
</view>
<table dataSource="{{
dataSource
}}">
<table-column a:for="{{columns}}" a:key="*this" title="{{item.title}}" dataIndex="{{item.prop}}"/>
<table dataSource="{{
list
}}">
<table-column a:for="{{columns}}" a:key="*this" title="{{item.title}}" dataIndex="{{item.prop}}"
width="{{item.width}}"
/>
</table>
<view class="rank-pagination">
<text class="rank-pagination-text">共{{
pageInfo.total
}}条</text>
<text class="rank-pagination-text">共{{
list.length
}}条</text>
<pagination shape="arrow-only" hideOnlyOnePage="true" defaultCurrent="1" current="{{pageInfo.pageNo}}" pageSize="{{pageInfo.pageSize}}" onChange="changePagination" pageShowCount="100" total="{{pageInfo.total}}" />
</view>
<!-- </tab-item>
...
...
client/components/dialog/rank-dialog/rank-dialog.js
View file @
5614b819
...
...
@@ -41,20 +41,22 @@ Component({
columns
:
[
{
title
:
'排名'
,
prop
:
'rank'
},
{
title
:
'用户昵称'
,
prop
:
'userNick'
},
{
title
:
'奖品类型'
,
prop
:
'type'
},
{
title
:
'奖品名称'
,
prop
:
'
n
ame'
},
{
title
:
'奖品类型'
,
prop
:
'type
Name
'
},
{
title
:
'奖品名称'
,
prop
:
'
prizeN
ame'
},
{
title
:
'收货人'
,
prop
:
'receiveName'
},
{
title
:
'联系方式'
,
prop
:
'phone'
},
{
title
:
'收货地址'
,
prop
:
'address'
}
{
title
:
'收货地址'
,
prop
:
'address'
,
width
:
240
}
],
pageInfo
:
{
pageNo
:
1
,
pageSize
:
100
,
total
:
0
}
}
,
},
props
:
{
avtivityId
:
''
,
onClose
:
()
=>
{},
list
:
[],
selectedItem
:
{},
},
didMount
()
{},
didUpdate
()
{},
...
...
@@ -71,20 +73,27 @@ Component({
})
},
onCloseDialog
()
{
this
.
props
.
onClose
&&
this
.
props
.
onClose
();
},
// 导出中奖名单
async
exportWinnerList
(
evt
)
{
const
{
a
vtivityId
}
=
this
.
props
;
const
{
a
ctivityId
,
title
}
=
this
.
props
.
selectedItem
;
const
{
type
}
=
evt
.
target
.
dataset
;
my
.
showLoading
({
content
:
"生成文件中..."
});
try
{
const
{
success
,
data
,
message
}
=
await
uploadDataCreateFile
({
activityId
,
isObject
:
false
,
title
});
my
.
hideLoading
();
if
(
success
)
{
await
setClipboard
({
text
:
data
.
url
.
replace
(
/amp;/g
,
""
)
});
my
.
showToast
({
type
:
'success'
,
content
:
'下载链接复制成功,请在浏览器中打开下载'
});
this
.
setData
({
exportDialogVisible
:
true
,
exportUrl
:
data
.
url
.
replace
(
/amp;/g
,
""
)
...
...
client/components/dialog/winner-list-dialog/winner-list-dialog.js
View file @
5614b819
...
...
@@ -6,12 +6,7 @@ Component({
props
:
{
visible
:
false
,
onClose
:
()
=>
{},
list
:
[
{
rank
:
'1-3'
,
winnerDetailList
:
[]
}
],
list
:
[],
selectedItem
:
{}
},
didMount
()
{},
...
...
client/components/list/list-table/list-table.axml
View file @
5614b819
...
...
@@ -38,7 +38,6 @@
onClose="onCloseConfirmDialog"
onConfirm="onConfirmDelete"
/>
<winner-list-dialog visible="{{winnerListDialogVisible}}" onClose="onCloseWinnerListDialog" list="{{winnerList}}" selectedItem="{{selectedItem}}"/>
<rank-dialog />
\ No newline at end of file
<rank-dialog visible="{{winnerListDialogVisible}}" onClose="onCloseWinnerListDialog" list="{{winnerList}}" selectedItem="{{selectedItem}}"/>
\ No newline at end of file
client/components/list/list-table/list-table.js
View file @
5614b819
...
...
@@ -97,7 +97,12 @@ Component({
if
(
success
)
{
this
.
setData
({
winnerListDialogVisible
:
true
,
winnerList
:
data
,
winnerList
:
data
.
map
(
v
=>
{
return
{
...
v
,
typeName
:
v
.
type
==
1
?
'优惠券'
:
'实物'
}
}),
selectedItem
:
evt
.
target
.
dataset
.
x
.
record
})
}
...
...
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