Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
Project
Project
Details
Activity
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
frontend
mall-webview
Commits
7a97e6f2
Commit
7a97e6f2
authored
Apr 22, 2021
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化
parent
1b008b58
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
29 deletions
+21
-29
bonus.ts
src/server/api/bonus.ts
+0
-3
request.ts
src/server/request.ts
+4
-2
add.vue
src/views/bonus/bonus-detail/add.vue
+3
-3
bak.vue
src/views/bonus/bonus-detail/bak.vue
+1
-3
reduce.vue
src/views/bonus/bonus-detail/reduce.vue
+3
-3
index.vue
src/views/bonus/index.vue
+3
-6
index.vue
src/views/bonus/withdraw/index.vue
+7
-9
No files found.
src/server/api/bonus.ts
View file @
7a97e6f2
...
...
@@ -21,9 +21,6 @@ export const getBonusList = async (params: Partial<BonusListParams>) => {
);
};
export
const
getBonusPaging
=
(
params
:
Partial
<
BonusListParams
>
)
=>
getBonusList
(
params
).
then
(
res
=>
res
.
data
);
// 奖励金账户信息
export
const
getBonusAccount
=
(
studentId
:
string
)
=>
{
return
get
<
BonusAccountResponse
>
(
`/api-jksxb-app/v1/marketingAccount/bonus/count`
,
{
studentId
});
...
...
src/server/request.ts
View file @
7a97e6f2
...
...
@@ -6,7 +6,9 @@ import axios from "./http";
* @returns
*/
export
function
get
<
T
>
(
url
:
string
,
params
?:
object
)
{
return
axios
.
get
<
T
>
(
url
,
{
params
});
return
axios
.
get
<
T
>
(
url
,
{
params
})
.
then
(
res
=>
res
.
data
);
}
/**
...
...
@@ -16,5 +18,5 @@ export function get<T>(url: string, params?: object) {
* @returns
*/
export
function
post
<
T
>
(
url
:
string
,
data
?:
object
)
{
return
axios
.
post
<
T
>
(
url
,
data
);
return
axios
.
post
<
T
>
(
url
,
data
)
.
then
(
res
=>
res
.
data
)
;
}
src/views/bonus/bonus-detail/add.vue
View file @
7a97e6f2
...
...
@@ -30,7 +30,7 @@
import
{
defineComponent
,
computed
,
onMounted
}
from
"vue"
;
import
{
List
,
PullRefresh
,
Empty
,
Loading
}
from
"vant"
;
import
{
usePaging
}
from
"@/util/use-paging"
;
import
{
getBonus
Paging
}
from
"@/server/api/bonus"
;
import
{
getBonus
List
}
from
"@/server/api/bonus"
;
import
{
FlowType
,
BizType
}
from
"@/model/bonus/constant"
;
import
{
useStore
}
from
"vuex"
;
...
...
@@ -45,7 +45,7 @@ export default defineComponent({
const
store
=
useStore
();
const
bonusStoreState
=
computed
(()
=>
store
.
state
.
bonus
);
const
[
paging
,
loadMore
,
refresh
,
helpers
]
=
usePaging
(
getBonus
Paging
,
()
=>
({
const
[
paging
,
loadMore
,
refresh
,
helpers
]
=
usePaging
(
getBonus
List
,
()
=>
({
studentId
:
bonusStoreState
.
value
.
studentId
,
flowType
:
"ADD"
}));
...
...
@@ -59,7 +59,7 @@ export default defineComponent({
<
style
lang=
"scss"
scoped
>
.tab-add
{
:
:v-
deep
(
.van-pull-refresh
)
{
:deep
(
.van-pull-refresh
)
{
min-height
:
calc
(
100vh
-
80px
);
}
}
...
...
src/views/bonus/bonus-detail/bak.vue
View file @
7a97e6f2
...
...
@@ -147,9 +147,7 @@ const BonusDetail = defineComponent({
};
try
{
const
{
data
:
{
total
,
list
}
}
=
await
getBonusList
(
params
);
const
{
total
,
list
}
=
await
getBonusList
(
params
);
if
(
!
list
||
total
===
0
)
{
state
.
finished
=
true
;
return
;
...
...
src/views/bonus/bonus-detail/reduce.vue
View file @
7a97e6f2
...
...
@@ -55,7 +55,7 @@
import
{
defineComponent
,
computed
,
onMounted
}
from
"vue"
;
import
{
List
,
PullRefresh
,
Empty
,
Loading
}
from
"vant"
;
import
{
usePaging
}
from
"@/util/use-paging"
;
import
{
getBonus
Paging
}
from
"@/server/api/bonus"
;
import
{
getBonus
List
}
from
"@/server/api/bonus"
;
import
{
FlowType
,
BizType
}
from
"@/model/bonus/constant"
;
import
{
useStore
}
from
"vuex"
;
...
...
@@ -70,7 +70,7 @@ export default defineComponent({
const
store
=
useStore
();
const
bonusStoreState
=
computed
(()
=>
store
.
state
.
bonus
);
const
[
paging
,
loadMore
,
refresh
,
helpers
]
=
usePaging
(
getBonus
Paging
,
()
=>
({
const
[
paging
,
loadMore
,
refresh
,
helpers
]
=
usePaging
(
getBonus
List
,
()
=>
({
studentId
:
bonusStoreState
.
value
.
studentId
,
flowType
:
"REDUCE"
}));
...
...
@@ -84,7 +84,7 @@ export default defineComponent({
<
style
lang=
"scss"
scoped
>
.tab-add
{
:
:v-
deep
(
.van-pull-refresh
)
{
:deep
(
.van-pull-refresh
)
{
min-height
:
calc
(
100vh
-
80px
);
}
}
...
...
src/views/bonus/index.vue
View file @
7a97e6f2
...
...
@@ -259,8 +259,7 @@ const Bonus = defineComponent({
message
:
"加载中..."
});
try
{
const
{
data
}
=
await
getBonusAccount
(
bonusStoreState
.
value
.
studentId
);
state
.
bonusAccount
=
data
;
state
.
bonusAccount
=
await
getBonusAccount
(
bonusStoreState
.
value
.
studentId
);
}
finally
{
Toast
.
clear
();
}
...
...
@@ -273,9 +272,7 @@ const Bonus = defineComponent({
const
onLoad
=
async
()
=>
{
state
.
loading
=
true
;
try
{
const
{
data
:
{
hasNextPage
,
list
,
total
}
}
=
await
getWithdrawList
(
withdrawListParams
);
const
{
hasNextPage
,
list
,
total
}
=
await
getWithdrawList
(
withdrawListParams
);
if
(
!
list
||
total
===
0
)
{
state
.
finished
=
true
;
return
;
...
...
@@ -551,7 +548,7 @@ export default Bonus;
border-top-right-radius
:
16px
;
}
}
:
:v-
deep
.bunus-rule-dialog
{
:deep
.bunus-rule-dialog
{
&
.van-dialog
{
top
:
50%
;
width
:
622px
;
...
...
src/views/bonus/withdraw/index.vue
View file @
7a97e6f2
...
...
@@ -216,7 +216,7 @@ const Withdraw = defineComponent({
state
.
tencentCaptchPass
=
true
;
state
.
smsVerifyPass
=
true
;
try
{
const
{
data
}
=
await
checkCaptcha
({
randStr
:
randstr
,
ticket
});
const
data
=
await
checkCaptcha
({
randStr
:
randstr
,
ticket
});
Toast
(
"发送验证码成功"
);
state
.
mobileTip
=
data
;
state
.
timeoutParams
=
countDown
(
60
,
1000
,
(
time
:
number
)
=>
{
...
...
@@ -266,7 +266,7 @@ const Withdraw = defineComponent({
withdrawAmount
:
state
.
withdrawAmount
,
withdrawAccountId
:
state
.
withdrawAccountId
};
const
{
data
}
=
await
withdraw
(
params
);
const
data
=
await
withdraw
(
params
);
state
.
withdrawResponse
=
data
;
state
.
showWithdrawSuccess
=
true
;
state
.
showWithdraw
=
false
;
...
...
@@ -289,9 +289,7 @@ const Withdraw = defineComponent({
// 获取风控值
const
getWithdrawRiskReq
=
async
()
=>
{
const
{
data
:
{
studentDailyWithdrawLimit
}
}
=
await
getWithdrawRisk
(
bonusStoreState
.
value
.
studentId
);
const
{
studentDailyWithdrawLimit
}
=
await
getWithdrawRisk
(
bonusStoreState
.
value
.
studentId
);
state
.
studentDailyWithdrawLimit
=
studentDailyWithdrawLimit
;
};
...
...
@@ -463,8 +461,8 @@ export default Withdraw;
border-radius
:
51px
;
}
}
:
:v-
deep
.withdraw-dialog
,
:
:v-
deep
.withdraw-success-dialog
{
:deep
.withdraw-dialog
,
:deep
.withdraw-success-dialog
{
overflow
:
initial
;
.close
{
width
:
44px
;
...
...
@@ -477,7 +475,7 @@ export default Withdraw;
top
:
-78px
;
}
}
:
:v-
deep
.withdraw-dialog
{
:deep
.withdraw-dialog
{
padding
:
48px
;
color
:
#fff
;
width
:
622px
;
...
...
@@ -532,7 +530,7 @@ export default Withdraw;
}
}
:
:v-
deep
.withdraw-success-dialog
{
:deep
.withdraw-success-dialog
{
padding
:
60px
51px
35px
;
background
:
url("~@/assets/images/bonus/withdraw-success.png")
no-repeat
;
background-size
:
100%
100%
;
...
...
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