31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { onMaiDian } from "../../../utils/maiDian"
|
|
import { onGoH5Page } from '../../../utils/getUserInfo'
|
|
import { apiGoBorrow, apiProblemLog } from '../../../api/index/index'
|
|
const H5Link = require('../../../api/base').allBaseUrl.GDEnvs.web
|
|
|
|
Page({
|
|
data: {},
|
|
onLoad() {},
|
|
// 我要提额
|
|
onIncrease() {
|
|
onMaiDian('首页-点击-我要提额')
|
|
wx.showLoading({ title: '加载中' })
|
|
apiGoBorrow({ cardType: 'miniZxjhCard' }).then((res: any) => {
|
|
wx.hideLoading()
|
|
if (res.code === '1000') {
|
|
onGoH5Page({ is_need_login: true, url: res.data.url })
|
|
} else {
|
|
wx.showToast({ title: res.msg, icon: 'none', duration: 5000 })
|
|
}
|
|
|
|
})
|
|
},
|
|
async onGoH5 (e: any) {
|
|
apiProblemLog({ remark: JSON.stringify({ logName: '我要还款&我要提额', logParams: e }) })
|
|
if (['/repayment/billRecordMultiple'].includes(e.currentTarget.dataset.field)) {
|
|
onMaiDian('首页-点击-我要还款')
|
|
}
|
|
await onGoH5Page({ is_need_login: true, url: `${H5Link}${e.currentTarget.dataset.field}` })
|
|
}
|
|
})
|