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
Show 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
<dialog-wrap
title="中奖信息"
title="中奖信息"
visible="{{
fals
e}}"
visible="{{
visibl
e}}"
onClose="onCloseDialog"
onClose="onCloseDialog"
width="
8
00"
width="
10
00"
>
>
<view class="rank-dialog-wrap">
<view class="rank-dialog-wrap">
<!-- <view class="other-winner-list">
<!-- <view class="other-winner-list">
...
@@ -15,14 +15,14 @@
...
@@ -15,14 +15,14 @@
key="{{item.key}}"
key="{{item.key}}"
> -->
> -->
<view class="now-winner-list">
<view class="now-winner-list">
<button type="primary">导出中奖名单</button>
<button type="primary"
onTap="exportWinnerList"
>导出中奖名单</button>
</view>
</view>
<table dataSource="{{
dataSource
}}">
<table dataSource="{{
list
}}">
<table-column a:for="{{columns}}" a:key="*this" title="{{item.title}}" dataIndex="{{item.prop}}"/>
<table-column a:for="{{columns}}" a:key="*this" title="{{item.title}}" dataIndex="{{item.prop}}"
width="{{item.width}}"
/>
</table>
</table>
<view class="rank-pagination">
<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}}" />
<pagination shape="arrow-only" hideOnlyOnePage="true" defaultCurrent="1" current="{{pageInfo.pageNo}}" pageSize="{{pageInfo.pageSize}}" onChange="changePagination" pageShowCount="100" total="{{pageInfo.total}}" />
</view>
</view>
<!-- </tab-item>
<!-- </tab-item>
...
...
client/components/dialog/rank-dialog/rank-dialog.js
View file @
5614b819
...
@@ -41,20 +41,22 @@ Component({
...
@@ -41,20 +41,22 @@ Component({
columns
:
[
columns
:
[
{
title
:
'排名'
,
prop
:
'rank'
},
{
title
:
'排名'
,
prop
:
'rank'
},
{
title
:
'用户昵称'
,
prop
:
'userNick'
},
{
title
:
'用户昵称'
,
prop
:
'userNick'
},
{
title
:
'奖品类型'
,
prop
:
'type'
},
{
title
:
'奖品类型'
,
prop
:
'type
Name
'
},
{
title
:
'奖品名称'
,
prop
:
'
n
ame'
},
{
title
:
'奖品名称'
,
prop
:
'
prizeN
ame'
},
{
title
:
'收货人'
,
prop
:
'receiveName'
},
{
title
:
'收货人'
,
prop
:
'receiveName'
},
{
title
:
'联系方式'
,
prop
:
'phone'
},
{
title
:
'联系方式'
,
prop
:
'phone'
},
{
title
:
'收货地址'
,
prop
:
'address'
}
{
title
:
'收货地址'
,
prop
:
'address'
,
width
:
240
}
],
],
pageInfo
:
{
pageInfo
:
{
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
100
,
pageSize
:
100
,
total
:
0
total
:
0
}
}
,
},
},
props
:
{
props
:
{
avtivityId
:
''
,
onClose
:
()
=>
{},
list
:
[],
selectedItem
:
{},
},
},
didMount
()
{},
didMount
()
{},
didUpdate
()
{},
didUpdate
()
{},
...
@@ -71,20 +73,27 @@ Component({
...
@@ -71,20 +73,27 @@ Component({
})
})
},
},
onCloseDialog
()
{
this
.
props
.
onClose
&&
this
.
props
.
onClose
();
},
// 导出中奖名单
// 导出中奖名单
async
exportWinnerList
(
evt
)
{
async
exportWinnerList
(
evt
)
{
const
{
a
vtivityId
}
=
this
.
props
;
const
{
a
ctivityId
,
title
}
=
this
.
props
.
selectedItem
;
const
{
type
}
=
evt
.
target
.
dataset
;
const
{
type
}
=
evt
.
target
.
dataset
;
my
.
showLoading
({
content
:
"生成文件中..."
});
my
.
showLoading
({
content
:
"生成文件中..."
});
try
{
try
{
const
{
success
,
data
,
message
}
=
await
uploadDataCreateFile
({
const
{
success
,
data
,
message
}
=
await
uploadDataCreateFile
({
activityId
,
activityId
,
isObject
:
false
,
title
});
});
my
.
hideLoading
();
my
.
hideLoading
();
if
(
success
)
{
if
(
success
)
{
await
setClipboard
({
text
:
data
.
url
.
replace
(
/amp;/g
,
""
)
});
await
setClipboard
({
text
:
data
.
url
.
replace
(
/amp;/g
,
""
)
});
my
.
showToast
({
type
:
'success'
,
content
:
'下载链接复制成功,请在浏览器中打开下载'
});
this
.
setData
({
this
.
setData
({
exportDialogVisible
:
true
,
exportDialogVisible
:
true
,
exportUrl
:
data
.
url
.
replace
(
/amp;/g
,
""
)
exportUrl
:
data
.
url
.
replace
(
/amp;/g
,
""
)
...
...
client/components/dialog/winner-list-dialog/winner-list-dialog.js
View file @
5614b819
...
@@ -6,12 +6,7 @@ Component({
...
@@ -6,12 +6,7 @@ Component({
props
:
{
props
:
{
visible
:
false
,
visible
:
false
,
onClose
:
()
=>
{},
onClose
:
()
=>
{},
list
:
[
list
:
[],
{
rank
:
'1-3'
,
winnerDetailList
:
[]
}
],
selectedItem
:
{}
selectedItem
:
{}
},
},
didMount
()
{},
didMount
()
{},
...
...
client/components/list/list-table/list-table.axml
View file @
5614b819
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
onClose="onCloseConfirmDialog"
onClose="onCloseConfirmDialog"
onConfirm="onConfirmDelete"
onConfirm="onConfirmDelete"
/>
/>
<winner-list-dialog visible="{{winnerListDialogVisible}}" onClose="onCloseWinnerListDialog" list="{{winnerList}}" selectedItem="{{selectedItem}}"/>
<rank-dialog />
<rank-dialog visible="{{winnerListDialogVisible}}" onClose="onCloseWinnerListDialog" list="{{winnerList}}" selectedItem="{{selectedItem}}"/>
\ No newline at end of file
\ No newline at end of file
client/components/list/list-table/list-table.js
View file @
5614b819
...
@@ -97,7 +97,12 @@ Component({
...
@@ -97,7 +97,12 @@ Component({
if
(
success
)
{
if
(
success
)
{
this
.
setData
({
this
.
setData
({
winnerListDialogVisible
:
true
,
winnerListDialogVisible
:
true
,
winnerList
:
data
,
winnerList
:
data
.
map
(
v
=>
{
return
{
...
v
,
typeName
:
v
.
type
==
1
?
'优惠券'
:
'实物'
}
}),
selectedItem
:
evt
.
target
.
dataset
.
x
.
record
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