Commit 32d514a8 by wangzhihui

积分接口联调

1 parent a14426e8
......@@ -63,5 +63,9 @@ module.exports = {
/**查询上传证件配置信息 */
getConfig(data){
return api.fetch('scrm.api.shopmall.score.bank.get.document.config',data)
},
/**开通积分钱包 */
openPointsWallet(data){
return api.fetch('scrm.api.shopmall.pointswallet.open',data)
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ Page({
* 页面的初始数据
*/
data: {
isFlag:true,
scoreSummary: {
currentScore: 345333.00, //当前积分
bankCardSize: 4,
......@@ -38,11 +39,33 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
async onLoad(options) {
console.log(wx.p)
await this.openPointsWallet()
this.searchScoreSummaryData()
this.getScoreProfitListData()
},
openPointsWallet(){
const {
staffPhone,
channelSource
} = wx.p.storage.get('userInfo');
wx.p.api.withdrawalApi.openPointsWallet({
phone:staffPhone,
source:channelSource //1.阳光激励 2.续保用户 3.管理层
}).then(res => {
if (res.code == 0) {
this.setData({
open: res.data,
isFlag:true
})
}
}).catch((err) => {
wx.p.wxApi.showToast(JSON.stringify(err))
})
},
jump() {
wx.p.router.go('/packageIndex/pages/integral/withdrawalNote/withdrawalNote')
},
......
<!--packageIndex/pages/integral/index/index.wxml-->
<!--积分中心 -->
<view class="integral-container {{!open?'bgF':''}}">
<block wx:if="{{isFlag}}">
<view class="integral-container {{!open?'bgF':''}}">
<have-no-ope wx:if="{{open}}" scoreSummary="{{scoreSummary}}">
<profit-list list="{{scoreList}}"></profit-list>
</have-no-ope>
......@@ -18,3 +19,4 @@
</view>
</view>
</block>
......@@ -17,7 +17,8 @@ Page({
baseIncome: 8989
},
confirmButtons: [{
text: '取消'
text: '取消',
extClass: 'btn_cancel'
}, {
text: '确认',
extClass: 'btn_primary'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!