完善提现功能
This commit is contained in:
67
view/peko/modules/h5Income/js/rule.js
Normal file
67
view/peko/modules/h5Income/js/rule.js
Normal file
@@ -0,0 +1,67 @@
|
||||
let urlPrefix = getUrlPrefix()
|
||||
let browser = checkVersion()
|
||||
let env = EnvCheck();
|
||||
if (env == 'test') {
|
||||
new VConsole();
|
||||
}
|
||||
// 封裝layer消息提醒框
|
||||
let layerIndex
|
||||
const showLoading = (content = '加載中...') => {
|
||||
layer.open({
|
||||
type: 2,
|
||||
shadeClose: false,
|
||||
content,
|
||||
success (e) {
|
||||
layerIndex = $(e).attr('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
const hideLoading = (index) => {
|
||||
layer.close(index)
|
||||
}
|
||||
const toastMsg = (content = '操作完成', time = 2) => {
|
||||
layer.open({
|
||||
content,
|
||||
time,
|
||||
skin: 'msg'
|
||||
})
|
||||
}
|
||||
$(function () {
|
||||
setTimeout(function () {
|
||||
getInfoFromClient()
|
||||
if (browser.app) {
|
||||
$('.back').hide();
|
||||
}
|
||||
setTimeout(function () {
|
||||
getConfig()
|
||||
}, 100)
|
||||
})
|
||||
})
|
||||
// 提領配置接口接口
|
||||
function getConfig () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GET',
|
||||
url: urlPrefix + '/withdrawUser/config',
|
||||
data: { uid: pubInfo.uid },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
$('.box p b').text(res.data.weekMaxValue);
|
||||
} else if (res.code ? res.code == 401 : JSON.parse(res).code == 401) {
|
||||
window.location.href = './login.html'
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
console.log();
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error (err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('網絡錯誤,請退出重進')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 返回按鈕
|
||||
$('.back').click(function () {
|
||||
window.history.go(-1)
|
||||
})
|
Reference in New Issue
Block a user