Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
points-mall
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c0d80c49
authored
Aug 25, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
积分接口联调
1 parent
b9d66b94
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
105 additions
and
34 deletions
components/EnableWallet/EnableWallet.js
packageIndex/pages/integral/index/components/noOpen/index.js
packageIndex/pages/integral/index/index.js
packageIndex/pages/integral/index/index.json
packageIndex/pages/integral/index/index.wxml
packageIndex/pages/integral/withdrawalRules/withdrawalRules.js
packageIndex/pages/integral/withdrawalRules/withdrawalRules.json
packageIndex/pages/integral/withdrawalRules/withdrawalRules.wxml
components/EnableWallet/EnableWallet.js
View file @
c0d80c4
...
@@ -85,6 +85,7 @@ Component({
...
@@ -85,6 +85,7 @@ Component({
show
:
false
show
:
false
})
})
this
.
replaceNickName
(
walletObj
)
this
.
replaceNickName
(
walletObj
)
this
.
triggerEvent
(
'open'
)
}
else
{
}
else
{
wx
.
p
.
wxApi
.
showToast
(
message
)
wx
.
p
.
wxApi
.
showToast
(
message
)
}
}
...
...
packageIndex/pages/integral/index/components/noOpen/index.js
View file @
c0d80c4
...
@@ -50,13 +50,14 @@ Component({
...
@@ -50,13 +50,14 @@ Component({
methods
:
{
methods
:
{
go
(
e
){
go
(
e
){
console
.
log
(
e
)
console
.
log
(
e
)
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
index
}
=
e
.
currentTarget
.
dataset
;
const
thisPage
=
wx
.
p
.
router
.
getPageInstance
()
let
arr
=
[
let
arr
=
[
()
=>
{
()
=>
{
// 积分钱包
// 积分钱包
thisPage
.
open
()
},
},
()
=>
{
()
=>
{
const
thisPage
=
wx
.
p
.
router
.
getPageInstance
()
thisPage
.
toBank
()
thisPage
.
toBank
()
}
}
]
]
...
...
packageIndex/pages/integral/index/index.js
View file @
c0d80c4
...
@@ -30,8 +30,12 @@ Page({
...
@@ -30,8 +30,12 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
async
onLoad
(
options
)
{
async
onLoad
(
options
)
{
let
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
this
.
setData
({
userInfo
})
//是否开通
//是否开通
//
await this.openPointsWallet()
await
this
.
openPointsWallet
()
this
.
searchScoreSummaryData
()
this
.
searchScoreSummaryData
()
this
.
getScoreProfitListData
()
this
.
getScoreProfitListData
()
},
},
...
@@ -39,10 +43,10 @@ Page({
...
@@ -39,10 +43,10 @@ Page({
const
{
const
{
phone
,
phone
,
channelSource
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
;
}
=
this
.
data
.
userInfo
;
wx
.
p
.
api
.
withdrawalApi
.
openPointsWallet
({
wx
.
p
.
api
.
withdrawalApi
.
openPointsWallet
({
phone
,
phone
,
source
:
channelSource
//1.阳光激励 2.续保用户 3.管理层
s
coreS
ource
:
channelSource
//1.阳光激励 2.续保用户 3.管理层
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
setData
({
this
.
setData
({
...
@@ -55,6 +59,31 @@ Page({
...
@@ -55,6 +59,31 @@ Page({
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
})
})
},
},
open
()
{
const
{
userInfo
:
{
phone
,
channelSource
,
nickName
},
scoreSummary
:
{
currentScore
}
}
=
this
.
data
;
this
.
setData
({
showEnableWallet
:
true
,
walletObj
:
{
"name"
:
nickName
,
phone
,
"scoreSource"
:
channelSource
,
currentScore
}
})
},
//更新开通状态
update
(){
this
.
openPointsWallet
()
},
jump
()
{
jump
()
{
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawalNote/withdrawalNote'
)
wx
.
p
.
router
.
go
(
'/packageIndex/pages/integral/withdrawalNote/withdrawalNote'
)
},
},
...
@@ -63,7 +92,7 @@ Page({
...
@@ -63,7 +92,7 @@ Page({
phone
,
phone
,
channelSource
channelSource
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
;
}
=
this
.
data
.
userInfo
;
wx
.
p
.
api
.
withdrawalApi
.
searchScoreSummary
({
wx
.
p
.
api
.
withdrawalApi
.
searchScoreSummary
({
staffPhone
:
phone
,
staffPhone
:
phone
,
channelSource
,
//1.阳光激励 2.续保用户 3.管理层
channelSource
,
//1.阳光激励 2.续保用户 3.管理层
...
@@ -89,7 +118,7 @@ Page({
...
@@ -89,7 +118,7 @@ Page({
}
=
this
.
data
,
{
}
=
this
.
data
,
{
phone
,
phone
,
channelSource
,
channelSource
,
}
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
;
}
=
this
.
data
.
userInfo
;
wx
.
p
.
api
.
withdrawalApi
.
getScoreProfitList
({
wx
.
p
.
api
.
withdrawalApi
.
getScoreProfitList
({
staffPhone
:
phone
,
staffPhone
:
phone
,
merchantId
:
'44211227'
,
merchantId
:
'44211227'
,
...
...
packageIndex/pages/integral/index/index.json
View file @
c0d80c4
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
"usingComponents"
:
{
"usingComponents"
:
{
"profit-list"
:
"./components/profitList"
,
"profit-list"
:
"./components/profitList"
,
"have-open"
:
"./components/open"
,
"have-open"
:
"./components/open"
,
"have-no-ope"
:
"./components/noOpen"
"have-no-ope"
:
"./components/noOpen"
,
"enable-wallet"
:
"/components/EnableWallet/EnableWallet"
}
}
}
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/integral/index/index.wxml
View file @
c0d80c4
...
@@ -20,3 +20,5 @@
...
@@ -20,3 +20,5 @@
</view>
</view>
</block>
</block>
<!-- 开通钱包 -->
<enable-wallet show="{{showEnableWallet}}" walletObj="{{walletObj}}" bindopen="update"></enable-wallet>
packageIndex/pages/integral/withdrawalRules/withdrawalRules.js
View file @
c0d80c4
...
@@ -6,8 +6,8 @@ Page({
...
@@ -6,8 +6,8 @@ Page({
*/
*/
data
:
{
data
:
{
showConfirmDialog
:
false
,
showConfirmDialog
:
false
,
taxRateObj
:
{
goodsList
:
[],
},
taxRateObj
:
{
},
confirmButtons
:
[{
confirmButtons
:
[{
text
:
'取消'
,
text
:
'取消'
,
extClass
:
'btn_cancel'
extClass
:
'btn_cancel'
...
@@ -24,6 +24,36 @@ Page({
...
@@ -24,6 +24,36 @@ Page({
wx
.
p
.
router
.
getRouterParams
().
then
(
params
=>
{
wx
.
p
.
router
.
getRouterParams
().
then
(
params
=>
{
this
.
setData
(
params
)
this
.
setData
(
params
)
this
.
getTaxRate
()
this
.
getTaxRate
()
this
.
getGoodsList
()
})
},
// 获取商品数据
getGoodsList
()
{
let
{
pageNum
,
goodsList
,
goodsSkuName
,
frontendCategoryId
,
activeTab
}
=
this
.
data
let
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
let
params
=
{
pageNum
:
2
,
pageSize
:
4
,
canExchange
:
1
,
staffPhone
:
userInfo
?.
phone
,
staffPlatform
:
userInfo
?.
channelSource
,
merchantNo
:
userInfo
?.
merchantId
}
wx
.
p
.
api
.
homeApi
.
getGoodsStockroomList
(
params
).
then
(
res
=>
{
res
?.
list
?.
forEach
((
val
,
index
)
=>
{
if
(
index
==
0
)
val
.
goodsSource
=
2
else
val
.
goodsSource
=
1
})
this
.
setData
({
goodsList
:
res
?.
list
})
})
})
},
},
getTaxRate
()
{
getTaxRate
()
{
...
@@ -35,7 +65,7 @@ Page({
...
@@ -35,7 +65,7 @@ Page({
}
=
this
.
data
;
}
=
this
.
data
;
wx
.
p
.
api
.
withdrawalApi
.
getTaxRate
({
wx
.
p
.
api
.
withdrawalApi
.
getTaxRate
({
withdrawalScore
:
sumbitScore
,
withdrawalScore
:
sumbitScore
,
staffPhone
:
phone
,
staffPhone
:
phone
,
channelSource
,
channelSource
,
merchantId
:
'44211227'
,
merchantId
:
'44211227'
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
...
...
packageIndex/pages/integral/withdrawalRules/withdrawalRules.json
View file @
c0d80c4
{
{
"usingComponents"
:
{},
"usingComponents"
:
{
"goods"
:
"/components/goods/goods"
},
"navigationBarTitleText"
:
"积分提现"
"navigationBarTitleText"
:
"积分提现"
}
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/integral/withdrawalRules/withdrawalRules.wxml
View file @
c0d80c4
...
@@ -13,35 +13,39 @@
...
@@ -13,35 +13,39 @@
<view class="item">您的本次提现金额 <view class="price">{{taxRateObj.withdrawalScore}}<text>元</text></view>
<view class="item">您的本次提现金额 <view class="price">{{taxRateObj.withdrawalScore}}<text>元</text></view>
</view>
</view>
</view>
</view>
<view class="label">以下为无工资收入和有工资收入的相关税率与收入对比:</view>
<view class="label">以下为无工资收入和有工资收入的相关税率与收入对比:</view>
</view>
</view>
<view class="salary-comparison">
<view class="salary-comparison">
<view class="salary flex_scb">
<view class="salary flex_scb">
<view class="proportion">{{taxRateObj.taxRateWithoutSalary}}%</view>
<view class="proportion">{{taxRateObj.taxRateWithoutSalary}}%</view>
<view class="proportion income">{{taxRateObj.taxRateWithSalary}}%</view>
<view class="proportion income">{{taxRateObj.taxRateWithSalary}}%</view>
</view>
<view class="accumulative flex_sc">
<view class="earning have-no">
<view class="money">{{taxRateObj.totalIncomeWithoutSalary}}元</view>
<view class="text">累计提现+本次提现</view>
</view>
</view>
<view class="accumulative flex_sc">
<view class=" earning have">
<view class="earning have-no">
<view class="money">{{taxRateObj.totalIncomeWithSalary}}元</view>
<view class="money">{{taxRateObj.totalIncomeWithoutSalary}}元</view>
<view class="text">{{taxRateObj.withdrawalScore}}*{{taxRateObj.month}}个月+累计提现+本次提现</view>
<view class="text">累计提现+本次提现</view>
</view>
<view class=" earning have">
<view class="money">{{taxRateObj.totalIncomeWithSalary}}元</view>
<view class="text">{{taxRateObj.withdrawalScore}}*{{taxRateObj.month}}个月+累计提现+本次提现</view>
</view>
</view>
</view>
<view class="tips">以上仅为本平台评估展示,本次提现金额不会扣除,您的真实税务建议您去<text>个人所得税APP</text>查询</view>
</view>
<view class="tips">以上仅为本平台评估展示,本次提现金额不会扣除,您的真实税务建议您去<text>个人所得税APP</text>查询</view>
</view>
</view>
<view class="tax-container"></view>
<view class="tax-container"></view>
<view class="recommend-container">
<view class="recommend-container">
<view class="recommend-title">以下为根据您此次的提现积分推荐的积分商品</view>
<view class="recommend-title">以下为根据您此次的提现积分推荐的积分商品</view>
<view class="goods-container"></view>
<view class="suggest">若以上没有心仪商品,您可以点击<text>“去商城”</text>一键跳转积分商城选购更多商品</view>
<view class="goods-box" wx:if="{{goodsList.length}}">
<view class="suggest">若您仍然想提现,请点击<text>“继续提现”</text>按钮提交提现申请。</view>
<goods list="{{goodsList}}" bindjoin="handleAddToCart"></goods>
<view class="btns flex_scb">
</view>
<view class="btn-text" bind:tap="goMall">去商城</view>
<view class="btn-text withdraw" bind:tap="goContinue">继续提现</view>
<view class="suggest">若以上没有心仪商品,您可以点击<text>“去商城”</text>一键跳转积分商城选购更多商品</view>
</view>
<view class="suggest">若您仍然想提现,请点击<text>“继续提现”</text>按钮提交提现申请。</view>
<view class="btns flex_scb">
<view class="btn-text" bind:tap="goMall">去商城</view>
<view class="btn-text withdraw" bind:tap="goContinue">继续提现</view>
</view>
</view>
</view>
</view>
</view>
<Dialog show="{{ showConfirmDialog }}" mask="true" bindbuttontap="bindButton" buttons="{{confirmButtons}}" title="提示">
<Dialog show="{{ showConfirmDialog }}" mask="true" bindbuttontap="bindButton" buttons="{{confirmButtons}}" title="提示">
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment